From ae073edee9d0e90ca7e05af60484756256ac387d Mon Sep 17 00:00:00 2001 From: Paul Falgout Date: Thu, 12 Nov 2020 16:04:35 +0900 Subject: [PATCH] v5 Migration DO NOT MERGE This PR serves as a migration guide for moving to https://github.com/marionettejs/marionette with the exception of Radio integration. But it should make relevent breaking changes more obvious --- lib/backbone.marionette.esm.js | 1216 +++- lib/backbone.marionette.js | 1282 ++-- lib/backbone.marionette.js.map | 2 +- lib/backbone.marionette.min.js | 4 +- lib/backbone.marionette.min.js.map | 2 +- package-lock.json | 9508 ++++++++++++++++++++++++++++ package.json | 3 +- src/behavior.js | 57 +- src/collection-view.js | 126 +- src/common/view.js | 8 + src/config/dom.js | 48 +- src/config/event-delegator.js | 53 + src/mixins/events.js | 275 +- src/mixins/view-events.js | 92 + src/mixins/view.js | 96 +- src/region.js | 71 +- src/utils/build-event-args.js | 24 + src/utils/call-handler.js | 10 + src/utils/extend.js | 32 +- src/utils/make-callback.js | 9 + src/utils/once-wrap.js | 14 + src/view.js | 60 +- 22 files changed, 12021 insertions(+), 971 deletions(-) create mode 100644 package-lock.json create mode 100644 src/config/event-delegator.js create mode 100644 src/mixins/view-events.js create mode 100644 src/utils/build-event-args.js create mode 100644 src/utils/call-handler.js create mode 100644 src/utils/make-callback.js create mode 100644 src/utils/once-wrap.js diff --git a/lib/backbone.marionette.esm.js b/lib/backbone.marionette.esm.js index 4597b85aa2..efc5ea73ff 100644 --- a/lib/backbone.marionette.esm.js +++ b/lib/backbone.marionette.esm.js @@ -1,5 +1,5 @@ +import _, { has, extend as extend$1, create, reduce, keys, once, each, uniqueId, result, isFunction, isString, isObject, map, matches } from 'underscore'; import Backbone from 'backbone'; -import _ from 'underscore'; import Radio from 'backbone.radio'; var version = "4.1.2"; @@ -17,7 +17,31 @@ var proxy = function proxy(method) { // Marionette.extend -var extend = Backbone.Model.extend; +function extend (protoProps, staticProps) { + var parent = this; + var child; // The constructor function for the new subclass is either defined by you + // (the "constructor" property in your `extend` definition), or defaulted + // by us to simply call the parent constructor. + + if (protoProps && has(protoProps, 'constructor')) { + child = protoProps.constructor; + } else { + child = function child() { + return parent.apply(this, arguments); + }; + } // Add static properties to the constructor function, if supplied. + + + extend$1(child, parent, staticProps); // Set the prototype chain to inherit from `parent`, without calling + // `parent`'s constructor function and add the prototype properties. + + child.prototype = create(parent.prototype, protoProps); + child.prototype.constructor = child; // Set a convenience property in case the parent's prototype is needed + // later. + + child.__super__ = parent.prototype; + return child; +} // ---------------------- // Pass in a mapping of events => functions or function names @@ -307,7 +331,454 @@ function triggerMethod(event) { return result; } +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); +} + +var eventSplitter = /\s+/; // Iterates over the standard `event, callback` (as well as the fancy multiple +// space-separated events `"change blur", callback` and jQuery-style event +// maps `{event: callback}`). + +function buildEventArgs(name, callback, context, listener) { + if (name && _typeof(name) === 'object') { + return reduce(keys(name), function (eventArgs, key) { + return eventArgs.concat(buildEventArgs(key, name[key], context || callback, listener)); + }, []); + } + + if (name && eventSplitter.test(name)) { + return reduce(name.split(eventSplitter), function (eventArgs, n) { + eventArgs.push({ + name: n, + callback: callback, + context: context, + listener: listener + }); + return eventArgs; + }, []); + } + + return [{ + name: name, + callback: callback, + context: context, + listener: listener + }]; +} + +// An optimized way to execute callbacks. +function callHandler(callback, context) { + var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; + + switch (args.length) { + case 0: + return callback.call(context); + + case 1: + return callback.call(context, args[0]); + + case 2: + return callback.call(context, args[0], args[1]); + + case 3: + return callback.call(context, args[0], args[1], args[2]); + + default: + return callback.apply(context, args); + } +} + +// `offCallback` unbinds the `onceWrapper` after it has been called. + +function onceWrap(callback, offCallback) { + var onceCallback = once(function () { + offCallback(onceCallback); + return callback.apply(this, arguments); + }); + onceCallback._callback = callback; + return onceCallback; +} + +// a custom event channel. You may bind a callback to an event with `on` or +// remove with `off`; `trigger`-ing an event fires all callbacks in +// succession. +// +// var object = {}; +// _.extend(object, Events); +// object.on('expand', function(){ alert('expanded'); }); +// object.trigger('expand'); +// +// The reducing API that adds a callback to the `events` object. + +var onApi = function onApi(_ref) { + var events = _ref.events, + name = _ref.name, + callback = _ref.callback, + context = _ref.context, + ctx = _ref.ctx, + listener = _ref.listener; + var handlers = events[name] || (events[name] = []); + handlers.push({ + callback: callback, + context: context, + ctx: context || ctx, + listener: listener + }); + return events; +}; + +var onReducer = function onReducer(events, _ref2) { + var name = _ref2.name, + callback = _ref2.callback, + context = _ref2.context; + + if (!callback) { + return events; + } + + return onApi({ + events: events, + name: name, + callback: callback, + context: context, + ctx: this + }); +}; + +var onceReducer = function onceReducer(events, _ref3) { + var name = _ref3.name, + callback = _ref3.callback, + context = _ref3.context; + + if (!callback) { + return events; + } + + var onceCallback = onceWrap(callback, this.off.bind(this, name)); + return onApi({ + events: events, + name: name, + callback: onceCallback, + context: context, + ctx: this + }); +}; + +var cleanupListener = function cleanupListener(_ref4) { + var obj = _ref4.obj, + listeneeId = _ref4.listeneeId, + listenerId = _ref4.listenerId, + listeningTo = _ref4.listeningTo; + delete listeningTo[listeneeId]; + delete obj._rdListeners[listenerId]; +}; // The reducing API that removes a callback from the `events` object. + + +var offReducer = function offReducer(events, _ref5) { + var name = _ref5.name, + callback = _ref5.callback, + context = _ref5.context; + var names = name ? [name] : keys(events); + each(names, function (key) { + var handlers = events[key]; // Bail out if there are no events stored. + + if (!handlers) { + return; + } // Find any remaining events. + + + events[key] = reduce(handlers, function (remaining, handler) { + if (callback && callback !== handler.callback && callback !== handler.callback._callback || context && context !== handler.context) { + remaining.push(handler); + return remaining; + } // If not including event, clean up any related listener + + + if (handler.listener) { + var listener = handler.listener; + listener.count--; + + if (!listener.count) { + cleanupListener(listener); + } + } + + return remaining; + }, []); + + if (!events[key].length) { + delete events[key]; + } + }); + return events; +}; + +var getListener = function getListener(obj, listenerObj) { + var listeneeId = obj._rdListenId || (obj._rdListenId = uniqueId('l')); + obj._rdEvents = obj._rdEvents || {}; + var listeningTo = listenerObj._rdListeningTo || (listenerObj._rdListeningTo = {}); + var listener = listeningTo[listeneeId]; // This listenerObj is not listening to any other events on `obj` yet. + // Setup the necessary references to track the listening callbacks. + + if (!listener) { + var listenerId = listenerObj._rdListenId || (listenerObj._rdListenId = uniqueId('l')); + listeningTo[listeneeId] = { + obj: obj, + listeneeId: listeneeId, + listenerId: listenerId, + listeningTo: listeningTo, + count: 0 + }; + return listeningTo[listeneeId]; + } + + return listener; +}; + +var listenToApi = function listenToApi(_ref6) { + var name = _ref6.name, + callback = _ref6.callback, + context = _ref6.context, + listener = _ref6.listener; + + if (!callback) { + return; + } + + var obj = listener.obj, + listenerId = listener.listenerId; + var listeners = obj._rdListeners || (obj._rdListeners = {}); + obj._rdEvents = onApi({ + events: obj._rdEvents, + name: name, + callback: callback, + context: context, + listener: listener + }); + listeners[listenerId] = listener; + listener.count++; // Call `on` for interop + + obj.on(name, callback, context, { + _rdInternal: true + }); +}; + +var listenToOnceApi = function listenToOnceApi(_ref7) { + var name = _ref7.name, + callback = _ref7.callback, + context = _ref7.context, + listener = _ref7.listener; + + if (!callback) { + return; + } + + var offCallback = this.stopListening.bind(this, listener.obj, name); + var onceCallback = onceWrap(callback, offCallback); + listenToApi({ + name: name, + callback: onceCallback, + context: context, + listener: listener + }); +}; // Handles triggering the appropriate event callbacks. + + +var triggerApi = function triggerApi(_ref8) { + var events = _ref8.events, + name = _ref8.name, + args = _ref8.args; + var objEvents = events[name]; + var allEvents = objEvents && events.all ? events.all.slice() : events.all; + + if (objEvents) { + triggerEvents(objEvents, args); + } + + if (allEvents) { + triggerEvents(allEvents, [name].concat(args)); + } +}; + +var triggerEvents = function triggerEvents(events, args) { + each(events, function (_ref9) { + var callback = _ref9.callback, + ctx = _ref9.ctx; + callHandler(callback, ctx, args); + }); +}; + var Events = { + // Bind an event to a `callback` function. Passing `"all"` will bind + // the callback to all events fired. + on: function on(name, callback, context, opts) { + if (opts && opts._rdInternal) { + return; + } + + var eventArgs = buildEventArgs(name, callback, context); + this._rdEvents = reduce(eventArgs, onReducer.bind(this), this._rdEvents || {}); + return this; + }, + // Remove one or many callbacks. If `context` is null, removes all + // callbacks with that function. If `callback` is null, removes all + // callbacks for the event. If `name` is null, removes all bound + // callbacks for all events. + off: function off(name, callback, context, opts) { + if (!this._rdEvents) { + return this; + } + + if (opts && opts._rdInternal) { + return; + } // Delete all event listeners and "drop" events. + + + if (!name && !context && !callback) { + this._rdEvents = void 0; + var listeners = this._rdListeners; + each(keys(listeners), function (listenerId) { + cleanupListener(listeners[listenerId]); + }); + return this; + } + + var eventArgs = buildEventArgs(name, callback, context); + this._rdEvents = reduce(eventArgs, offReducer, this._rdEvents); + return this; + }, + // Bind an event to only be triggered a single time. After the first time + // the callback is invoked, its listener will be removed. If multiple events + // are passed in using the space-separated syntax, the handler will fire + // once for each event, not once for a combination of all events. + once: function once(name, callback, context) { + var eventArgs = buildEventArgs(name, callback, context); + this._rdEvents = reduce(eventArgs, onceReducer.bind(this), this._rdEvents || {}); + return this; + }, + // Inversion-of-control versions of `on`. Tell *this* object to listen to + // an event in another object... keeping track of what it's listening to + // for easier unbinding later. + listenTo: function listenTo(obj, name, callback) { + if (!obj) { + return this; + } + + var listener = getListener(obj, this); + var eventArgs = buildEventArgs(name, callback, this, listener); + each(eventArgs, listenToApi); + return this; + }, + // Inversion-of-control versions of `once`. + listenToOnce: function listenToOnce(obj, name, callback) { + if (!obj) { + return this; + } + + var listener = getListener(obj, this); + var eventArgs = buildEventArgs(name, callback, this, listener); + each(eventArgs, listenToOnceApi.bind(this)); + return this; + }, + // Tell this object to stop listening to either specific events ... or + // to every object it's currently listening to. + stopListening: function stopListening(obj, name, callback) { + var _this = this; + + var listeningTo = this._rdListeningTo; + + if (!listeningTo) { + return this; + } + + var eventArgs = buildEventArgs(name, callback, this); + var listenerIds = obj ? [obj._rdListenId] : keys(listeningTo); + + var _loop = function _loop(i) { + var listener = listeningTo[listenerIds[i]]; // If listening doesn't exist, this object is not currently + // listening to obj. Break out early. + + if (!listener) { + return "break"; + } + + each(eventArgs, function (args) { + var listenToObj = listener.obj; + var events = listenToObj._rdEvents; + + if (!events) { + return; + } + + listenToObj._rdEvents = offReducer(events, args); // Call `off` for interop + + listenToObj.off(args.name, args.callback, _this, { + _reInternal: true + }); + }); + }; + + for (var i = 0; i < listenerIds.length; i++) { + var _ret = _loop(i); + + if (_ret === "break") break; + } + + return this; + }, + // Trigger one or many events, firing all bound callbacks. Callbacks are + // passed the same arguments as `trigger` is, apart from the event name + // (unless you're listening on `"all"`, which will cause your callback to + // receive the true name of the event as the first argument). + trigger: function trigger(name) { + var _this2 = this; + + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + if (!this._rdEvents) { + return this; + } + + if (name && _typeof(name) === 'object') { + each(keys(name), function (key) { + triggerApi({ + events: _this2._rdEvents, + name: key, + args: [name[key]] + }); + }); + } + + if (name && eventSplitter.test(name)) { + each(name.split(eventSplitter), function (n) { + triggerApi({ + events: _this2._rdEvents, + name: n, + args: args + }); + }); + return this; + } + + triggerApi({ + events: this._rdEvents, + name: name, + args: args + }); + return this; + }, triggerMethod: triggerMethod }; @@ -647,88 +1118,6 @@ var TemplateRenderMixin = { } }; -// Borrow event splitter from Backbone -var delegateEventSplitter = /^(\S+)\s*(.*)$/; // Set event name to be namespaced using a unique index -// to generate a non colliding event namespace -// http://api.jquery.com/event.namespace/ - -var getNamespacedEventName = function getNamespacedEventName(eventName, namespace) { - var match = eventName.match(delegateEventSplitter); - return "".concat(match[1], ".").concat(namespace, " ").concat(match[2]); -}; - -// Add Feature flags here -// e.g. 'class' => false -var FEATURES = { - childViewEventPrefix: false, - triggersStopPropagation: true, - triggersPreventDefault: true, - DEV_MODE: false -}; - -function isEnabled(name) { - return !!FEATURES[name]; -} - -function setEnabled(name, state) { - return FEATURES[name] = state; -} - -// 'click:foo' - -function buildViewTrigger(view, triggerDef) { - if (_.isString(triggerDef)) { - triggerDef = { - event: triggerDef - }; - } - - var eventName = triggerDef.event; - var shouldPreventDefault = !!triggerDef.preventDefault; - - if (isEnabled('triggersPreventDefault')) { - shouldPreventDefault = triggerDef.preventDefault !== false; - } - - var shouldStopPropagation = !!triggerDef.stopPropagation; - - if (isEnabled('triggersStopPropagation')) { - shouldStopPropagation = triggerDef.stopPropagation !== false; - } - - return function (event) { - if (shouldPreventDefault) { - event.preventDefault(); - } - - if (shouldStopPropagation) { - event.stopPropagation(); - } - - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - view.triggerMethod.apply(view, [eventName, view, event].concat(args)); - }; -} - -var TriggersMixin = { - // Configure `triggers` to forward DOM events to view - // events. `triggers: {"click .foo": "do:foo"}` - _getViewTriggers: function _getViewTriggers(view, triggers) { - var _this = this; - - // Configure the triggers, prevent default - // action and stop propagation of DOM events - return _.reduce(triggers, function (events, value, key) { - key = getNamespacedEventName(key, "trig".concat(_this.cid)); - events[key] = buildViewTrigger(view, value); - return events; - }, {}); - } -}; - // a given key for triggers and events // swaps the @ui with the associated selector. // Returns a new, non-mutated, parsed events hash. @@ -846,18 +1235,204 @@ var UIMixin = { } }; -// DomApi +// Add Feature flags here +// e.g. 'class' => false +var FEATURES = { + childViewEventPrefix: false, + triggersStopPropagation: true, + triggersPreventDefault: true, + DEV_MODE: false +}; -function _getEl(el) { - return el instanceof Backbone.$ ? el : Backbone.$(el); -} // Static setter +function isEnabled(name) { + return !!FEATURES[name]; +} +function setEnabled(name, state) { + return FEATURES[name] = state; +} + +// Event Delegator + +function setEventDelegator(mixin) { + this.prototype.EventDelegator = extend$1({}, this.prototype.EventDelegator, mixin); + return this; +} +var EventDelegator = { + shouldCapture: function shouldCapture(eventName) { + return ['focus', 'blur'].indexOf(eventName) !== -1; + }, + // this.$el.on(eventName + '.delegateEvents' + this.cid, selector, handler); + delegate: function delegate(_ref) { + var eventName = _ref.eventName, + selector = _ref.selector, + handler = _ref.handler, + events = _ref.events, + rootEl = _ref.rootEl; + var shouldCapture = this.shouldCapture(eventName); + + if (selector) { + var delegateHandler = function delegateHandler(evt) { + var node = evt.target; + + for (; node && node !== rootEl; node = node.parentNode) { + if (Element.prototype.matches.call(node, selector)) { + evt.delegateTarget = node; + handler(evt); + } + } + }; + + events.push({ + eventName: eventName, + handler: delegateHandler + }); + Element.prototype.addEventListener.call(rootEl, eventName, delegateHandler, shouldCapture); + return; + } + + events.push({ + eventName: eventName, + handler: handler + }); + Element.prototype.addEventListener.call(rootEl, eventName, handler, shouldCapture); + }, + // this.$el.off('.delegateEvents' + this.cid); + undelegateAll: function undelegateAll(_ref2) { + var _this = this; + + var events = _ref2.events, + rootEl = _ref2.rootEl; + + if (!rootEl) { + return; + } + + each(events, function (_ref3) { + var eventName = _ref3.eventName, + handler = _ref3.handler; + + var shouldCapture = _this.shouldCapture(eventName); + + Element.prototype.removeEventListener.call(rootEl, eventName, handler, shouldCapture); + }); + events.length = 0; + } +}; + +var delegateEventSplitter = /^(\S+)\s*(.*)$/; // Internal method to create an event handler for a given `triggerDef` like +// 'click:foo' + +function buildViewTrigger(view, triggerDef) { + if (isString(triggerDef)) { + triggerDef = { + event: triggerDef + }; + } + + var eventName = triggerDef.event; + var shouldPreventDefault = !!triggerDef.preventDefault; + + if (isEnabled('triggersPreventDefault')) { + shouldPreventDefault = triggerDef.preventDefault !== false; + } + + var shouldStopPropagation = !!triggerDef.stopPropagation; + + if (isEnabled('triggersStopPropagation')) { + shouldStopPropagation = triggerDef.stopPropagation !== false; + } + + return function (event) { + if (shouldPreventDefault) { + event.preventDefault(); + } + + if (shouldStopPropagation) { + event.stopPropagation(); + } + + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + view.triggerMethod.apply(view, [eventName, view, event].concat(args)); + }; +} + +var ViewEventsMixin = { + EventDelegator: EventDelegator, + _initViewEvents: function _initViewEvents() { + this._domEvents = []; + }, + _undelegateViewEvents: function _undelegateViewEvents() { + this.EventDelegator.undelegateAll({ + events: this._domEvents, + rootEl: this.el + }); + }, + _delegateViewEvents: function _delegateViewEvents() { + var view = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this; + + var uiBindings = this._getUIBindings(); + + this._delegateEvents(uiBindings); + + this._delegateTriggers(uiBindings, view); + }, + _delegateEvents: function _delegateEvents(uiBindings) { + var _this = this; + + if (!this.events) { + return; + } + + each(result(this, 'events'), function (handler, key) { + if (!isFunction(handler)) { + handler = _this[handler]; + } + + if (!handler) { + return; + } + + _this._delegate(handler.bind(_this), _this.normalizeUIString(key, uiBindings)); + }); + }, + _delegateTriggers: function _delegateTriggers(uiBindings, view) { + var _this2 = this; + + if (!this.triggers) { + return; + } + + each(result(this, 'triggers'), function (value, key) { + _this2._delegate(buildViewTrigger(view, value), _this2.normalizeUIString(key, uiBindings)); + }); + }, + _delegate: function _delegate(handler, key) { + var match = key.match(delegateEventSplitter); + this.EventDelegator.delegate({ + eventName: match[1], + selector: match[2], + handler: handler, + events: this._domEvents, + rootEl: this.el + }); + } +}; + +// DomApi function setDomApi(mixin) { - this.prototype.Dom = _.extend({}, this.prototype.Dom, mixin); + this.prototype.Dom = extend$1({}, this.prototype.Dom, mixin); return this; } var DomApi = { + // Returns a new HTML DOM node of tagName + createElement: function createElement(tagName) { + return document.createElement(tagName); + }, // Returns a new HTML DOM node instance createBuffer: function createBuffer() { return document.createDocumentFragment(); @@ -866,16 +1441,10 @@ var DomApi = { getDocumentEl: function getDocumentEl(el) { return el.ownerDocument.documentElement; }, - // Lookup the `selector` string - // Selector may also be a DOM element - // Returns an array-like object of nodes - getEl: function getEl(selector) { - return _getEl(selector); - }, // Finds the `selector` string with the el // Returns an array-like object of nodes findEl: function findEl(el, selector) { - return _getEl(el).find(selector); + return el.querySelectorAll(selector); }, // Returns true if the el contains the node childEl hasEl: function hasEl(el, childEl) { @@ -883,9 +1452,9 @@ var DomApi = { }, // Detach `el` from the DOM without removing listeners detachEl: function detachEl(el) { - var _$el = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _getEl(el); - - _$el.detach(); + if (el.parentNode) { + el.parentNode.removeChild(el); + } }, // Remove `oldEl` from the DOM and put `newEl` in its place replaceEl: function replaceEl(newEl, oldEl) { @@ -919,22 +1488,20 @@ var DomApi = { parent1.insertBefore(el2, next1); parent2.insertBefore(el1, next2); }, - // Replace the contents of `el` with the HTML string of `html` + // Replace the contents of `el` with the `html` setContents: function setContents(el, html) { - var _$el = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _getEl(el); - - _$el.html(html); + el.innerHTML = html; + }, + // Sets attributes on a DOM node + setAttributes: function setAttributes(el, attrs) { + each(keys(attrs), function (attr) { + attr in el ? el[attr] = attrs[attr] : el.setAttribute(attr, attrs[attr]); + }); }, // Takes the DOM node `el` and appends the DOM node `contents` // to the end of the element's contents. appendContents: function appendContents(el, contents) { - var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, - _ref$_$el = _ref._$el, - _$el = _ref$_$el === void 0 ? _getEl(el) : _ref$_$el, - _ref$_$contents = _ref._$contents, - _$contents = _ref$_$contents === void 0 ? _getEl(contents) : _ref$_$contents; - - _$el.append(_$contents); + el.appendChild(contents); }, // Does the el have child nodes hasContents: function hasContents(el) { @@ -943,24 +1510,56 @@ var DomApi = { // Remove the inner contents of `el` from the DOM while leaving // `el` itself in the DOM. detachContents: function detachContents(el) { - var _$el = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _getEl(el); - - _$el.contents().detach(); + el.textContent = ''; } }; // ViewMixin +// - attributes // - behaviors // - childViewEventPrefix // - childViewEvents // - childViewTriggers +// - className +// - collection // - collectionEvents +// - el +// - events +// - id +// - model // - modelEvents +// - tagName // - triggers // - ui var ViewMixin = { + tagName: 'div', + // This is a noop method intended to be overridden + preinitialize: function preinitialize() {}, Dom: DomApi, + // Create an element from the `id`, `className` and `tagName` properties. + _getEl: function _getEl() { + if (!this.el) { + var el = this.Dom.createElement(result(this, 'tagName')); + var attrs = extend$1({}, result(this, 'attributes')); + + if (this.id) { + attrs.id = result(this, 'id'); + } + + if (this.className) { + attrs.class = result(this, 'className'); + } + + this.Dom.setAttributes(el, attrs); + return el; + } + + return result(this, 'el'); + }, + $: function $(selector) { + return this.Dom.findEl(this.el, selector); + }, _isElAttached: function _isElAttached() { return !!this.el && this.Dom.hasEl(this.Dom.getDocumentEl(this.el), this.el); }, @@ -978,43 +1577,6 @@ var ViewMixin = { isAttached: function isAttached() { return !!this._isAttached; }, - // Overriding Backbone.View's `delegateEvents` to handle - // `events` and `triggers` - delegateEvents: function delegateEvents(events) { - this._proxyBehaviorViewProperties(); - - this._buildEventProxies(); - - var combinedEvents = _.extend({}, this._getBehaviorEvents(), this._getEvents(events), this._getBehaviorTriggers(), this._getTriggers()); - - Backbone.View.prototype.delegateEvents.call(this, combinedEvents); - return this; - }, - // Allows Backbone.View events to utilize `@ui.` selectors - _getEvents: function _getEvents(events) { - if (events) { - return this.normalizeUIKeys(events); - } - - if (!this.events) { - return; - } - - return this.normalizeUIKeys(_.result(this, 'events')); - }, - // Configure `triggers` to forward DOM events to view - // events. `triggers: {"click .foo": "do:foo"}` - _getTriggers: function _getTriggers() { - if (!this.triggers) { - return; - } // Allow `triggers` to be configured as a function - - - var triggers = this.normalizeUIKeys(_.result(this, 'triggers')); // Configure the triggers, prevent default - // action and stop propagation of DOM events - - return this._getViewTriggers(this, triggers); - }, // Handle `modelEvents`, and `collectionEvents` configuration delegateEntityEvents: function delegateEntityEvents() { this._delegateEntityEvents(this.model, this.collection); // bind each behaviors model and collection events @@ -1048,9 +1610,12 @@ var ViewMixin = { } // unbind UI elements - this.unbindUIElements(); // remove the view from the DOM + this.unbindUIElements(); + + this._undelegateViewEvents(); // remove the view from the DOM + - this._removeElement(); + this.Dom.detachEl(this.el); if (shouldTriggerDetach) { this._isAttached = false; @@ -1074,11 +1639,6 @@ var ViewMixin = { this.stopListening(); return this; }, - // Equates to this.$el.remove - _removeElement: function _removeElement() { - this.$el.off().removeData(); - this.Dom.detachEl(this.el, this.$el); - }, // This method binds the elements specified in the "ui" hash bindUIElements: function bindUIElements() { this._bindUIElements(); @@ -1100,15 +1660,13 @@ var ViewMixin = { }, // Cache `childViewEvents` and `childViewTriggers` _buildEventProxies: function _buildEventProxies() { - this._childViewEvents = this.normalizeMethods(_.result(this, 'childViewEvents')); - this._childViewTriggers = _.result(this, 'childViewTriggers'); + this._childViewEvents = this.normalizeMethods(result(this, 'childViewEvents')); + this._childViewTriggers = result(this, 'childViewTriggers'); this._eventPrefix = this._getEventPrefix(); }, _getEventPrefix: function _getEventPrefix() { var defaultPrefix = isEnabled('childViewEventPrefix') ? 'childview' : false; - - var prefix = _.result(this, 'childViewEventPrefix', defaultPrefix); - + var prefix = result(this, 'childViewEventPrefix', defaultPrefix); return prefix === false ? prefix : prefix + ':'; }, _proxyChildViewEvents: function _proxyChildViewEvents(view) { @@ -1139,9 +1697,14 @@ var ViewMixin = { } } }; +extend$1(ViewMixin, BehaviorsMixin, CommonMixin, DelegateEntityEventsMixin, TemplateRenderMixin, UIMixin, ViewEventsMixin); -_.extend(ViewMixin, BehaviorsMixin, CommonMixin, DelegateEntityEventsMixin, TemplateRenderMixin, TriggersMixin, UIMixin); - +function isView(view) { + return view.render && (view.destroy || view.remove); +} +function isViewClass(ViewClass) { + return ViewClass.prototype.render && (ViewClass.prototype.destroy || ViewClass.prototype.remove); +} function renderView(view) { if (view._isRendered) { return; @@ -1198,12 +1761,9 @@ var ClassOptions$1 = ['allowMissingEl', 'parentEl', 'replaceElement']; var Region = function Region(options) { this._setOptions(options, ClassOptions$1); - this.cid = _.uniqueId(this.cidPrefix); // getOption necessary because options.el may be passed as undefined + this.cid = uniqueId(this.cidPrefix); // getOption necessary because options.el may be passed as undefined - this._initEl = this.el = this.getOption('el'); // Handle when this.el is passed in as a $ wrapped element. - - this.el = this.el instanceof Backbone.$ ? this.el[0] : this.el; - this.$el = this._getEl(this.el); + this._initEl = this.el = this.getOption('el'); this.initialize.apply(this, arguments); }; @@ -1211,14 +1771,12 @@ Region.extend = extend; Region.setDomApi = setDomApi; // Region Methods // -------------- -_.extend(Region.prototype, CommonMixin, { +extend$1(Region.prototype, CommonMixin, { Dom: DomApi, cidPrefix: 'mnr', replaceElement: false, _isReplaced: false, _isSwappingView: false, - // This is a noop method intended to be overridden - initialize: function initialize() {}, // Displays a view instance inside of the region. If necessary handles calling the `render` // method for you. Reads content directly from the `el` attribute. show: function show(view, options) { @@ -1258,7 +1816,12 @@ _.extend(Region.prototype, CommonMixin, { this._isSwappingView = false; return this; }, - _getEl: function _getEl(el) { + _setEl: function _setEl(el) { + if (isObject(el)) { + this.el = el; + return; + } + if (!el) { throw new MarionetteError({ name: classErrorName, @@ -1267,19 +1830,7 @@ _.extend(Region.prototype, CommonMixin, { }); } - return this.getEl(el); - }, - _setEl: function _setEl() { - this.$el = this._getEl(this.el); - - if (this.$el.length) { - this.el = this.$el[0]; - } // Make sure the $el contains only the el - - - if (this.$el.length > 1) { - this.$el = this.Dom.getEl(this.el); - } + this.el = this.getEl(el); }, // Set the `el` of the region and move any current view to the new `el`. _setElement: function _setElement(el) { @@ -1291,9 +1842,7 @@ _.extend(Region.prototype, CommonMixin, { this._restoreEl(); - this.el = el; - - this._setEl(); + this._setEl(el); if (this.currentView) { var view = this.currentView; @@ -1338,7 +1887,7 @@ _.extend(Region.prototype, CommonMixin, { replaceElement = _ref.replaceElement; var shouldTriggerAttach = !view._isAttached && this._isElAttached() && !this._shouldDisableMonitoring(); - var shouldReplaceEl = typeof replaceElement === 'undefined' ? !!_.result(this, 'replaceElement') : !!replaceElement; + var shouldReplaceEl = typeof replaceElement === 'undefined' ? !!result(this, 'replaceElement') : !!replaceElement; if (shouldTriggerAttach) { view.triggerMethod('before:attach', view); @@ -1361,12 +1910,10 @@ _.extend(Region.prototype, CommonMixin, { _ensureElement: function _ensureElement() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - if (!_.isObject(this.el)) { - this._setEl(); - } + this._setEl(this.el); - if (!this.$el || this.$el.length === 0) { - var allowMissingEl = typeof options.allowMissingEl === 'undefined' ? !!_.result(this, 'allowMissingEl') : !!options.allowMissingEl; + if (!this.el) { + var allowMissingEl = typeof options.allowMissingEl === 'undefined' ? !!result(this, 'allowMissingEl') : !!options.allowMissingEl; if (allowMissingEl) { return false; @@ -1398,7 +1945,7 @@ _.extend(Region.prototype, CommonMixin, { }); } - if (view instanceof Backbone.View) { + if (isView(view)) { return view; } @@ -1409,13 +1956,13 @@ _.extend(Region.prototype, CommonMixin, { // This allows for a template or a static string to be // used as a template _getViewOptions: function _getViewOptions(viewOptions) { - if (_.isFunction(viewOptions)) { + if (isFunction(viewOptions)) { return { template: viewOptions }; } - if (_.isObject(viewOptions)) { + if (isObject(viewOptions)) { return viewOptions; } @@ -1430,13 +1977,8 @@ _.extend(Region.prototype, CommonMixin, { // Override this method to change how the region finds the DOM element that it manages. Return // a jQuery selector object scoped to a provided parent el or the document if none exists. getEl: function getEl(el) { - var context = _.result(this, 'parentEl'); - - if (context && _.isString(el)) { - return this.Dom.findEl(context, el); - } - - return this.Dom.getEl(el); + var context = result(this, 'parentEl'); + return this.Dom.findEl(context || document, el)[0]; }, _replaceEl: function _replaceEl(view) { // Always restore the el to ensure the regions el is present before replacing @@ -1474,10 +2016,7 @@ _.extend(Region.prototype, CommonMixin, { // Override this method to change how the new view is appended to the `$el` that the // region is managing attachHtml: function attachHtml(view) { - this.Dom.appendContents(this.el, view.el, { - _$el: this.$el, - _$contents: view.$el - }); + this.Dom.appendContents(this.el, view.el); }, // Destroy the current view, if there is one. If there is no current view, // it will detach any html inside the region's `el`. @@ -1579,7 +2118,7 @@ _.extend(Region.prototype, CommonMixin, { }, // Override this method to change how the region detaches current content detachHtml: function detachHtml() { - this.Dom.detachContents(this.el, this.$el); + this.Dom.detachContents(this.el); }, // Checks whether a view is currently present within the region. Returns `true` if there is // and `false` if no view is present. @@ -1800,7 +2339,7 @@ function setRenderer(renderer) { } // View -var ClassOptions$2 = ['behaviors', 'childViewEventPrefix', 'childViewEvents', 'childViewTriggers', 'collectionEvents', 'events', 'modelEvents', 'regionClass', 'regions', 'template', 'templateContext', 'triggers', 'ui']; // Used by _getImmediateChildren +var ClassOptions$2 = ['attributes', 'behaviors', 'childViewEventPrefix', 'childViewEvents', 'childViewTriggers', 'className', 'collection', 'collectionEvents', 'el', 'events', 'id', 'model', 'modelEvents', 'regionClass', 'regions', 'tagName', 'template', 'templateContext', 'triggers', 'ui']; // Used by _getImmediateChildren function childReducer(children, region) { if (region.currentView) { @@ -1812,26 +2351,46 @@ function childReducer(children, region) { // templates, nested views, and more. -var View = Backbone.View.extend({ - constructor: function constructor(options) { - this._setOptions(options, ClassOptions$2); +var View = function View(options) { + this.cid = uniqueId(this.cidPrefix); - monitorViewEvents(this); + this._setOptions(options, ClassOptions$2); - this._initBehaviors(); + this.preinitialize.apply(this, arguments); - this._initRegions(); + this._initViewEvents(); - Backbone.View.prototype.constructor.apply(this, arguments); - this.delegateEntityEvents(); + this.setElement(this._getEl()); + monitorViewEvents(this); + + this._initBehaviors(); + + this._initRegions(); + + this._buildEventProxies(); + + this.initialize.apply(this, arguments); + this.delegateEntityEvents(); + + this._triggerEventOnBehaviors('initialize', this, options); +}; + +extend$1(View, { + extend: extend, + setRenderer: setRenderer, + setDomApi: setDomApi, + setEventDelegator: setEventDelegator +}); + +extend$1(View.prototype, ViewMixin, RegionsMixin, { + cidPrefix: 'mnv', + setElement: function setElement(element) { + this._undelegateViewEvents(); + + this.el = element; + + this._setBehaviorElements(); - this._triggerEventOnBehaviors('initialize', this, options); - }, - // Overriding Backbone.View's `setElement` to handle - // if an el was previously defined. If so, the view might be - // rendered or attached on setElement. - setElement: function setElement() { - Backbone.View.prototype.setElement.apply(this, arguments); this._isRendered = this.Dom.hasContents(this.el); this._isAttached = this._isElAttached(); @@ -1839,6 +2398,8 @@ var View = Backbone.View.extend({ this.bindUIElements(); } + this._delegateViewEvents(); + return this; }, // If a template is available, renders it into the view's `el` @@ -1869,15 +2430,10 @@ var View = Backbone.View.extend({ this.removeRegions(); }, _getImmediateChildren: function _getImmediateChildren() { - return _.reduce(this._regions, childReducer, []); + return reduce(this._regions, childReducer, []); } -}, { - setRenderer: setRenderer, - setDomApi: setDomApi }); -_.extend(View.prototype, ViewMixin, RegionsMixin); - // shut down child views. var Container = function Container() { @@ -2038,29 +2594,46 @@ _.extend(Container.prototype, { // Collection View var classErrorName$1 = 'CollectionViewError'; -var ClassOptions$3 = ['behaviors', 'childView', 'childViewContainer', 'childViewEventPrefix', 'childViewEvents', 'childViewOptions', 'childViewTriggers', 'collectionEvents', 'emptyView', 'emptyViewOptions', 'events', 'modelEvents', 'sortWithCollection', 'template', 'templateContext', 'triggers', 'ui', 'viewComparator', 'viewFilter']; // A view that iterates over a Backbone.Collection +var ClassOptions$3 = ['attributes', 'behaviors', 'childView', 'childViewContainer', 'childViewEventPrefix', 'childViewEvents', 'childViewOptions', 'childViewTriggers', 'className', 'collection', 'collectionEvents', 'el', 'emptyView', 'emptyViewOptions', 'events', 'id', 'model', 'modelEvents', 'sortWithCollection', 'tagName', 'template', 'templateContext', 'triggers', 'ui', 'viewComparator', 'viewFilter']; // A view that iterates over a Backbone.Collection // and renders an individual child view for each model. -var CollectionView = Backbone.View.extend({ - // flag for maintaining the sorted order of the collection - sortWithCollection: true, - // constructor - constructor: function constructor(options) { - this._setOptions(options, ClassOptions$3); +var CollectionView = function CollectionView(options) { + this.cid = uniqueId(this.cidPrefix); - monitorViewEvents(this); + this._setOptions(options, ClassOptions$3); - this._initChildViewStorage(); + this.preinitialize.apply(this, arguments); - this._initBehaviors(); + this._initViewEvents(); - Backbone.View.prototype.constructor.apply(this, arguments); // Init empty region + this.setElement(this._getEl()); + monitorViewEvents(this); - this.getEmptyRegion(); - this.delegateEntityEvents(); + this._initChildViewStorage(); - this._triggerEventOnBehaviors('initialize', this, options); - }, + this._initBehaviors(); + + this._buildEventProxies(); // Init empty region + + + this.getEmptyRegion(); + this.initialize.apply(this, arguments); + this.delegateEntityEvents(); + + this._triggerEventOnBehaviors('initialize', this, options); +}; + +extend$1(CollectionView, { + extend: extend, + setRenderer: setRenderer, + setDomApi: setDomApi, + setEventDelegator: setEventDelegator +}); + +extend$1(CollectionView.prototype, ViewMixin, { + cidPrefix: 'mncv', + // flag for maintaining the sorted order of the collection + sortWithCollection: true, // Internal method to set up the `children` object for storing all of the child views // `_children` represents all child views // `children` represents only views filtered to be shown @@ -2070,16 +2643,16 @@ var CollectionView = Backbone.View.extend({ }, // Create an region to show the emptyView getEmptyRegion: function getEmptyRegion() { - var $emptyEl = this.$container || this.$el; + var emptyEl = this.container || this.el; if (this._emptyRegion && !this._emptyRegion.isDestroyed()) { - this._emptyRegion._setElement($emptyEl[0]); + this._emptyRegion._setElement(emptyEl); return this._emptyRegion; } this._emptyRegion = new Region({ - el: $emptyEl[0], + el: emptyEl, replaceElement: false }); this._emptyRegion._parentView = this; @@ -2140,7 +2713,7 @@ var CollectionView = Backbone.View.extend({ _removeChildModels: function _removeChildModels(models) { var _this = this; - return _.reduce(models, function (views, model) { + return reduce(models, function (views, model) { var removeView = _this._removeChildModel(model); if (removeView) { @@ -2170,7 +2743,7 @@ var CollectionView = Backbone.View.extend({ }, // Added views are returned for consistency with _removeChildModels _addChildModels: function _addChildModels(models) { - return _.map(models, this._addChildModel.bind(this)); + return map(models, this._addChildModel.bind(this)); }, _addChildModel: function _addChildModel(model) { var view = this._createChildView(model); @@ -2228,14 +2801,14 @@ var CollectionView = Backbone.View.extend({ // First check if the `view` is a view class (the common case) // Then check if it's a function (which we assume that returns a view class) _getView: function _getView(view, child) { - if (view.prototype instanceof Backbone.View || view === Backbone.View) { + if (isViewClass(view)) { return view; - } else if (_.isFunction(view)) { + } else if (isFunction(view)) { return view.call(this, child); } }, _getChildViewOptions: function _getChildViewOptions(child) { - if (_.isFunction(this.childViewOptions)) { + if (isFunction(this.childViewOptions)) { return this.childViewOptions(child); } @@ -2244,7 +2817,7 @@ var CollectionView = Backbone.View.extend({ // Build a `childView` for a model in the collection. // Override to customize the build buildChildView: function buildChildView(child, ChildViewClass, childViewOptions) { - var options = _.extend({ + var options = extend$1({ model: child }, childViewOptions); @@ -2267,9 +2840,17 @@ var CollectionView = Backbone.View.extend({ // Overriding Backbone.View's `setElement` to handle // if an el was previously defined. If so, the view might be // attached on setElement. - setElement: function setElement() { - Backbone.View.prototype.setElement.apply(this, arguments); + setElement: function setElement(element) { + this._undelegateViewEvents(); + + this.el = element; + + this._setBehaviorElements(); + this._isAttached = this._isElAttached(); + + this._delegateViewEvents(); + return this; }, // Render children views. @@ -2305,11 +2886,10 @@ var CollectionView = Backbone.View.extend({ }, // Get a container within the template to add the children within _getChildViewContainer: function _getChildViewContainer() { - var childViewContainer = _.result(this, 'childViewContainer'); + var childViewContainer = result(this, 'childViewContainer'); + this.container = childViewContainer ? this.$(childViewContainer)[0] : this.el; - this.$container = childViewContainer ? this.$(childViewContainer) : this.$el; - - if (!this.$container.length) { + if (!this.container) { throw new MarionetteError({ name: classErrorName$1, message: "The specified \"childViewContainer\" was not found: ".concat(childViewContainer), @@ -2364,7 +2944,7 @@ var CollectionView = Backbone.View.extend({ removeComparator: function removeComparator(options) { return this.setComparator(null, options); }, - // If viewComparator is overriden it will be returned here. + // If viewComparator is overridden it will be returned here. // Additionally override this function to provide custom // viewComparator logic getComparator: function getComparator() { @@ -2417,8 +2997,7 @@ var CollectionView = Backbone.View.extend({ this.triggerMethod('before:filter', this); var attachViews = []; var detachViews = []; - - _.each(this._children._views, function (view, key, children) { + each(this._children._views, function (view, key, children) { (viewFilter.call(_this2, view, key, children) ? attachViews : detachViews).push(view); }); @@ -2437,21 +3016,20 @@ var CollectionView = Backbone.View.extend({ return false; } - if (_.isFunction(viewFilter)) { + if (isFunction(viewFilter)) { return viewFilter; } // Support filter predicates `{ fooFlag: true }` - if (_.isObject(viewFilter)) { - var matcher = _.matches(viewFilter); - + if (isObject(viewFilter)) { + var matcher = matches(viewFilter); return function (view) { return matcher(view.model && view.model.attributes); }; } // Filter by model attribute - if (_.isString(viewFilter)) { + if (isString(viewFilter)) { return function (view) { return view.model && view.model.get(viewFilter); }; @@ -2489,7 +3067,7 @@ var CollectionView = Backbone.View.extend({ return this.setFilter(null, options); }, _detachChildren: function _detachChildren(detachingViews) { - _.each(detachingViews, this._detachChildView.bind(this)); + each(detachingViews, this._detachChildView.bind(this)); }, _detachChildView: function _detachChildView(view) { var shouldTriggerDetach = view._isAttached && this.monitorViewEvents !== false; @@ -2509,7 +3087,7 @@ var CollectionView = Backbone.View.extend({ }, // Override this method to change how the collectionView detaches a child view detachHtml: function detachHtml(view) { - this.Dom.detachEl(view.el, view.$el); + this.Dom.detachEl(view.el); }, _renderChildren: function _renderChildren() { // If there are unrendered views prevent add to end perf @@ -2539,34 +3117,27 @@ var CollectionView = Backbone.View.extend({ var _this3 = this; var elBuffer = this.Dom.createBuffer(); - - _.each(views, function (view) { + each(views, function (view) { renderView(view); // corresponds that view is shown in a Region or CollectionView view._isShown = true; - _this3.Dom.appendContents(elBuffer, view.el, { - _$contents: view.$el - }); + _this3.Dom.appendContents(elBuffer, view.el); }); - return elBuffer; }, _attachChildren: function _attachChildren(els, views) { var shouldTriggerAttach = this._isAttached && this.monitorViewEvents !== false; views = shouldTriggerAttach ? views : []; - - _.each(views, function (view) { + each(views, function (view) { if (view._isAttached) { return; } view.triggerMethod('before:attach', view); }); - - this.attachHtml(els, this.$container); - - _.each(views, function (view) { + this.attachHtml(els, this.container); + each(views, function (view) { if (view._isAttached) { return; } @@ -2577,10 +3148,8 @@ var CollectionView = Backbone.View.extend({ }, // Override this method to do something other than `.append`. // You can attach any HTML at this point including the els. - attachHtml: function attachHtml(els, $container) { - this.Dom.appendContents($container[0], els, { - _$el: $container - }); + attachHtml: function attachHtml(els, container) { + this.Dom.appendContents(container, els); }, isEmpty: function isEmpty() { return !this.children.length; @@ -2620,7 +3189,7 @@ var CollectionView = Backbone.View.extend({ _getEmptyViewOptions: function _getEmptyViewOptions() { var emptyViewOptions = this.emptyViewOptions || this.childViewOptions; - if (_.isFunction(emptyViewOptions)) { + if (isFunction(emptyViewOptions)) { return emptyViewOptions.call(this); } @@ -2663,7 +3232,7 @@ var CollectionView = Backbone.View.extend({ }); } - if (_.isObject(index)) { + if (isObject(index)) { options = index; } // If options has defined index we should use it @@ -2725,7 +3294,7 @@ var CollectionView = Backbone.View.extend({ return view; }, _removeChildViews: function _removeChildViews(views) { - _.each(views, this._removeChildView.bind(this)); + each(views, this._removeChildView.bind(this)); }, _removeChildView: function _removeChildView(view) { var _ref4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, @@ -2766,7 +3335,7 @@ var CollectionView = Backbone.View.extend({ this.triggerMethod('before:destroy:children', this); if (this.monitorViewEvents === false) { - this.Dom.detachContents(this.el, this.$el); + this.Dom.detachContents(this.el); } this._removeChildViews(this._children._views); // After all children have been destroyed re-init the container @@ -2778,13 +3347,8 @@ var CollectionView = Backbone.View.extend({ this.triggerMethod('destroy:children', this); } -}, { - setDomApi: setDomApi, - setRenderer: setRenderer }); -_.extend(CollectionView.prototype, ViewMixin); - // Behavior var ClassOptions$4 = ['collectionEvents', 'events', 'modelEvents', 'triggers', 'ui']; @@ -2797,7 +3361,11 @@ var Behavior = function Behavior(options, view) { this._setOptions(options, ClassOptions$4); - this.cid = _.uniqueId(this.cidPrefix); // Construct an internal UI hash using the behaviors UI + this.cid = uniqueId(this.cidPrefix); + + this._initViewEvents(); + + this.setElement(); // Construct an internal UI hash using the behaviors UI // hash combined and overridden by the view UI hash. // This allows the user to use UI hash elements defined // in the parent view as well as those defined in the behavior. @@ -2805,7 +3373,7 @@ var Behavior = function Behavior(options, view) { // between multiple views, while letting a view override // a selector under an UI key. - this.ui = _.extend({}, _.result(this, 'ui'), _.result(view, 'ui')); // Proxy view triggers + this.ui = extend$1({}, result(this, 'ui'), result(view, 'ui')); // Proxy view triggers this.listenTo(view, 'all', this.triggerMethod); this.initialize.apply(this, arguments); @@ -2814,10 +3382,8 @@ var Behavior = function Behavior(options, view) { Behavior.extend = extend; // Behavior Methods // -------------- -_.extend(Behavior.prototype, CommonMixin, DelegateEntityEventsMixin, TriggersMixin, UIMixin, { +extend$1(Behavior.prototype, CommonMixin, DelegateEntityEventsMixin, UIMixin, ViewEventsMixin, { cidPrefix: 'mnb', - // This is a noop method intended to be overridden - initialize: function initialize() {}, // proxy behavior $ method to the view // this is useful for doing jquery DOM lookups // scoped to behaviors view. @@ -2826,6 +3392,8 @@ _.extend(Behavior.prototype, CommonMixin, DelegateEntityEventsMixin, TriggersMix }, // Stops the behavior from listening to events. destroy: function destroy() { + this._undelegateViewEvents(); + this.stopListening(); this.view._removeBehavior(this); @@ -2834,9 +3402,13 @@ _.extend(Behavior.prototype, CommonMixin, DelegateEntityEventsMixin, TriggersMix return this; }, - proxyViewProperties: function proxyViewProperties() { - this.$el = this.view.$el; + setElement: function setElement() { + this._undelegateViewEvents(); + this.el = this.view.el; + + this._delegateViewEvents(this.view); + return this; }, bindUIElements: function bindUIElements() { @@ -2862,42 +3434,6 @@ _.extend(Behavior.prototype, CommonMixin, DelegateEntityEventsMixin, TriggersMix this._undelegateEntityEvents(this.view.model, this.view.collection); return this; - }, - _getEvents: function _getEvents() { - var _this = this; - - if (!this.events) { - return; - } // Normalize behavior events hash to allow - // a user to use the @ui. syntax. - - - var behaviorEvents = this.normalizeUIKeys(_.result(this, 'events')); // binds the handler to the behavior and builds a unique eventName - - return _.reduce(behaviorEvents, function (events, behaviorHandler, key) { - if (!_.isFunction(behaviorHandler)) { - behaviorHandler = _this[behaviorHandler]; - } - - if (!behaviorHandler) { - return events; - } - - key = getNamespacedEventName(key, _this.cid); - events[key] = behaviorHandler.bind(_this); - return events; - }, {}); - }, - // Internal method to build all trigger handlers for a given behavior - _getTriggers: function _getTriggers() { - if (!this.triggers) { - return; - } // Normalize behavior triggers hash to allow - // a user to use the @ui. syntax. - - - var behaviorTriggers = this.normalizeUIKeys(_.result(this, 'triggers')); - return this._getViewTriggers(this.view, behaviorTriggers); } }); diff --git a/lib/backbone.marionette.js b/lib/backbone.marionette.js index 33db50b658..ee2d69cc3b 100644 --- a/lib/backbone.marionette.js +++ b/lib/backbone.marionette.js @@ -4,7 +4,7 @@ * ---------------------------------- * v4.1.2 * -* Copyright (c)2019 Derick Bailey, Muted Solutions, LLC. +* Copyright (c)2020 Derick Bailey, Muted Solutions, LLC. * Distributed under MIT license * * http://marionettejs.com @@ -12,18 +12,18 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('backbone'), require('underscore'), require('backbone.radio')) : - typeof define === 'function' && define.amd ? define(['exports', 'backbone', 'underscore', 'backbone.radio'], factory) : + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('underscore'), require('backbone'), require('backbone.radio')) : + typeof define === 'function' && define.amd ? define(['exports', 'underscore', 'backbone', 'backbone.radio'], factory) : (global = global || self, (function () { var current = global.Marionette; var exports = global.Marionette = {}; - factory(exports, global.Backbone, global._, global.Backbone.Radio); + factory(exports, global._, global.Backbone, global.Backbone.Radio); exports.noConflict = function () { global.Marionette = current; return exports; }; }())); -}(this, function (exports, Backbone, _, Radio) { 'use strict'; +}(this, function (exports, _, Backbone, Radio) { 'use strict'; + var ___default = 'default' in _ ? _['default'] : _; Backbone = Backbone && Backbone.hasOwnProperty('default') ? Backbone['default'] : Backbone; - _ = _ && _.hasOwnProperty('default') ? _['default'] : _; Radio = Radio && Radio.hasOwnProperty('default') ? Radio['default'] : Radio; var version = "4.1.2"; @@ -41,7 +41,31 @@ // Marionette.extend - var extend = Backbone.Model.extend; + function extend (protoProps, staticProps) { + var parent = this; + var child; // The constructor function for the new subclass is either defined by you + // (the "constructor" property in your `extend` definition), or defaulted + // by us to simply call the parent constructor. + + if (protoProps && _.has(protoProps, 'constructor')) { + child = protoProps.constructor; + } else { + child = function child() { + return parent.apply(this, arguments); + }; + } // Add static properties to the constructor function, if supplied. + + + _.extend(child, parent, staticProps); // Set the prototype chain to inherit from `parent`, without calling + // `parent`'s constructor function and add the prototype properties. + + child.prototype = _.create(parent.prototype, protoProps); + child.prototype.constructor = child; // Set a convenience property in case the parent's prototype is needed + // later. + + child.__super__ = parent.prototype; + return child; + } // ---------------------- // Pass in a mapping of events => functions or function names @@ -54,8 +78,8 @@ return; } - return _.reduce(hash, function (normalizedHash, method, name) { - if (!_.isFunction(method)) { + return ___default.reduce(hash, function (normalizedHash, method, name) { + if (!___default.isFunction(method)) { method = _this[method]; } @@ -75,7 +99,7 @@ constructor: function constructor(options) { var error = Error.call(this, options.message); - _.extend(this, _.pick(error, errorProps), _.pick(options, errorProps)); + ___default.extend(this, ___default.pick(error, errorProps), ___default.pick(options, errorProps)); if (Error.captureStackTrace) { this.captureStackTrace(); @@ -94,7 +118,7 @@ // Bind Entity Events & Unbind Entity Events function normalizeBindings(context, bindings) { - if (!_.isObject(bindings)) { + if (!___default.isObject(bindings)) { throw new MarionetteError({ message: 'Bindings must be an object.', url: 'common.html#bindevents' @@ -130,7 +154,7 @@ // Bind/Unbind Radio Requests function normalizeBindings$1(context, bindings) { - if (!_.isObject(bindings)) { + if (!___default.isObject(bindings)) { throw new MarionetteError({ message: 'Bindings must be an object.', url: 'common.html#bindrequests' @@ -186,7 +210,7 @@ return; } - _.each(keys, function (key) { + ___default.each(keys, function (key) { var option = options[key]; if (option !== undefined) { @@ -202,7 +226,7 @@ return; } - _.each(view._getImmediateChildren(), function (child) { + ___default.each(view._getImmediateChildren(), function (child) { if (!shouldTrigger(child)) { return; } @@ -321,9 +345,9 @@ var method = getOption.call(this, methodName); var result; // call the onMethodName if it exists - if (_.isFunction(method)) { + if (___default.isFunction(method)) { // pass all args, except the event name - result = method.apply(this, _.drop(arguments)); + result = method.apply(this, ___default.drop(arguments)); } // trigger the event @@ -331,7 +355,454 @@ return result; } + function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); + } + + var eventSplitter = /\s+/; // Iterates over the standard `event, callback` (as well as the fancy multiple + // space-separated events `"change blur", callback` and jQuery-style event + // maps `{event: callback}`). + + function buildEventArgs(name, callback, context, listener) { + if (name && _typeof(name) === 'object') { + return _.reduce(_.keys(name), function (eventArgs, key) { + return eventArgs.concat(buildEventArgs(key, name[key], context || callback, listener)); + }, []); + } + + if (name && eventSplitter.test(name)) { + return _.reduce(name.split(eventSplitter), function (eventArgs, n) { + eventArgs.push({ + name: n, + callback: callback, + context: context, + listener: listener + }); + return eventArgs; + }, []); + } + + return [{ + name: name, + callback: callback, + context: context, + listener: listener + }]; + } + + // An optimized way to execute callbacks. + function callHandler(callback, context) { + var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; + + switch (args.length) { + case 0: + return callback.call(context); + + case 1: + return callback.call(context, args[0]); + + case 2: + return callback.call(context, args[0], args[1]); + + case 3: + return callback.call(context, args[0], args[1], args[2]); + + default: + return callback.apply(context, args); + } + } + + // `offCallback` unbinds the `onceWrapper` after it has been called. + + function onceWrap(callback, offCallback) { + var onceCallback = _.once(function () { + offCallback(onceCallback); + return callback.apply(this, arguments); + }); + onceCallback._callback = callback; + return onceCallback; + } + + // a custom event channel. You may bind a callback to an event with `on` or + // remove with `off`; `trigger`-ing an event fires all callbacks in + // succession. + // + // var object = {}; + // _.extend(object, Events); + // object.on('expand', function(){ alert('expanded'); }); + // object.trigger('expand'); + // + // The reducing API that adds a callback to the `events` object. + + var onApi = function onApi(_ref) { + var events = _ref.events, + name = _ref.name, + callback = _ref.callback, + context = _ref.context, + ctx = _ref.ctx, + listener = _ref.listener; + var handlers = events[name] || (events[name] = []); + handlers.push({ + callback: callback, + context: context, + ctx: context || ctx, + listener: listener + }); + return events; + }; + + var onReducer = function onReducer(events, _ref2) { + var name = _ref2.name, + callback = _ref2.callback, + context = _ref2.context; + + if (!callback) { + return events; + } + + return onApi({ + events: events, + name: name, + callback: callback, + context: context, + ctx: this + }); + }; + + var onceReducer = function onceReducer(events, _ref3) { + var name = _ref3.name, + callback = _ref3.callback, + context = _ref3.context; + + if (!callback) { + return events; + } + + var onceCallback = onceWrap(callback, this.off.bind(this, name)); + return onApi({ + events: events, + name: name, + callback: onceCallback, + context: context, + ctx: this + }); + }; + + var cleanupListener = function cleanupListener(_ref4) { + var obj = _ref4.obj, + listeneeId = _ref4.listeneeId, + listenerId = _ref4.listenerId, + listeningTo = _ref4.listeningTo; + delete listeningTo[listeneeId]; + delete obj._rdListeners[listenerId]; + }; // The reducing API that removes a callback from the `events` object. + + + var offReducer = function offReducer(events, _ref5) { + var name = _ref5.name, + callback = _ref5.callback, + context = _ref5.context; + var names = name ? [name] : _.keys(events); + _.each(names, function (key) { + var handlers = events[key]; // Bail out if there are no events stored. + + if (!handlers) { + return; + } // Find any remaining events. + + + events[key] = _.reduce(handlers, function (remaining, handler) { + if (callback && callback !== handler.callback && callback !== handler.callback._callback || context && context !== handler.context) { + remaining.push(handler); + return remaining; + } // If not including event, clean up any related listener + + + if (handler.listener) { + var listener = handler.listener; + listener.count--; + + if (!listener.count) { + cleanupListener(listener); + } + } + + return remaining; + }, []); + + if (!events[key].length) { + delete events[key]; + } + }); + return events; + }; + + var getListener = function getListener(obj, listenerObj) { + var listeneeId = obj._rdListenId || (obj._rdListenId = _.uniqueId('l')); + obj._rdEvents = obj._rdEvents || {}; + var listeningTo = listenerObj._rdListeningTo || (listenerObj._rdListeningTo = {}); + var listener = listeningTo[listeneeId]; // This listenerObj is not listening to any other events on `obj` yet. + // Setup the necessary references to track the listening callbacks. + + if (!listener) { + var listenerId = listenerObj._rdListenId || (listenerObj._rdListenId = _.uniqueId('l')); + listeningTo[listeneeId] = { + obj: obj, + listeneeId: listeneeId, + listenerId: listenerId, + listeningTo: listeningTo, + count: 0 + }; + return listeningTo[listeneeId]; + } + + return listener; + }; + + var listenToApi = function listenToApi(_ref6) { + var name = _ref6.name, + callback = _ref6.callback, + context = _ref6.context, + listener = _ref6.listener; + + if (!callback) { + return; + } + + var obj = listener.obj, + listenerId = listener.listenerId; + var listeners = obj._rdListeners || (obj._rdListeners = {}); + obj._rdEvents = onApi({ + events: obj._rdEvents, + name: name, + callback: callback, + context: context, + listener: listener + }); + listeners[listenerId] = listener; + listener.count++; // Call `on` for interop + + obj.on(name, callback, context, { + _rdInternal: true + }); + }; + + var listenToOnceApi = function listenToOnceApi(_ref7) { + var name = _ref7.name, + callback = _ref7.callback, + context = _ref7.context, + listener = _ref7.listener; + + if (!callback) { + return; + } + + var offCallback = this.stopListening.bind(this, listener.obj, name); + var onceCallback = onceWrap(callback, offCallback); + listenToApi({ + name: name, + callback: onceCallback, + context: context, + listener: listener + }); + }; // Handles triggering the appropriate event callbacks. + + + var triggerApi = function triggerApi(_ref8) { + var events = _ref8.events, + name = _ref8.name, + args = _ref8.args; + var objEvents = events[name]; + var allEvents = objEvents && events.all ? events.all.slice() : events.all; + + if (objEvents) { + triggerEvents(objEvents, args); + } + + if (allEvents) { + triggerEvents(allEvents, [name].concat(args)); + } + }; + + var triggerEvents = function triggerEvents(events, args) { + _.each(events, function (_ref9) { + var callback = _ref9.callback, + ctx = _ref9.ctx; + callHandler(callback, ctx, args); + }); + }; + var Events = { + // Bind an event to a `callback` function. Passing `"all"` will bind + // the callback to all events fired. + on: function on(name, callback, context, opts) { + if (opts && opts._rdInternal) { + return; + } + + var eventArgs = buildEventArgs(name, callback, context); + this._rdEvents = _.reduce(eventArgs, onReducer.bind(this), this._rdEvents || {}); + return this; + }, + // Remove one or many callbacks. If `context` is null, removes all + // callbacks with that function. If `callback` is null, removes all + // callbacks for the event. If `name` is null, removes all bound + // callbacks for all events. + off: function off(name, callback, context, opts) { + if (!this._rdEvents) { + return this; + } + + if (opts && opts._rdInternal) { + return; + } // Delete all event listeners and "drop" events. + + + if (!name && !context && !callback) { + this._rdEvents = void 0; + var listeners = this._rdListeners; + _.each(_.keys(listeners), function (listenerId) { + cleanupListener(listeners[listenerId]); + }); + return this; + } + + var eventArgs = buildEventArgs(name, callback, context); + this._rdEvents = _.reduce(eventArgs, offReducer, this._rdEvents); + return this; + }, + // Bind an event to only be triggered a single time. After the first time + // the callback is invoked, its listener will be removed. If multiple events + // are passed in using the space-separated syntax, the handler will fire + // once for each event, not once for a combination of all events. + once: function once(name, callback, context) { + var eventArgs = buildEventArgs(name, callback, context); + this._rdEvents = _.reduce(eventArgs, onceReducer.bind(this), this._rdEvents || {}); + return this; + }, + // Inversion-of-control versions of `on`. Tell *this* object to listen to + // an event in another object... keeping track of what it's listening to + // for easier unbinding later. + listenTo: function listenTo(obj, name, callback) { + if (!obj) { + return this; + } + + var listener = getListener(obj, this); + var eventArgs = buildEventArgs(name, callback, this, listener); + _.each(eventArgs, listenToApi); + return this; + }, + // Inversion-of-control versions of `once`. + listenToOnce: function listenToOnce(obj, name, callback) { + if (!obj) { + return this; + } + + var listener = getListener(obj, this); + var eventArgs = buildEventArgs(name, callback, this, listener); + _.each(eventArgs, listenToOnceApi.bind(this)); + return this; + }, + // Tell this object to stop listening to either specific events ... or + // to every object it's currently listening to. + stopListening: function stopListening(obj, name, callback) { + var _this = this; + + var listeningTo = this._rdListeningTo; + + if (!listeningTo) { + return this; + } + + var eventArgs = buildEventArgs(name, callback, this); + var listenerIds = obj ? [obj._rdListenId] : _.keys(listeningTo); + + var _loop = function _loop(i) { + var listener = listeningTo[listenerIds[i]]; // If listening doesn't exist, this object is not currently + // listening to obj. Break out early. + + if (!listener) { + return "break"; + } + + _.each(eventArgs, function (args) { + var listenToObj = listener.obj; + var events = listenToObj._rdEvents; + + if (!events) { + return; + } + + listenToObj._rdEvents = offReducer(events, args); // Call `off` for interop + + listenToObj.off(args.name, args.callback, _this, { + _reInternal: true + }); + }); + }; + + for (var i = 0; i < listenerIds.length; i++) { + var _ret = _loop(i); + + if (_ret === "break") break; + } + + return this; + }, + // Trigger one or many events, firing all bound callbacks. Callbacks are + // passed the same arguments as `trigger` is, apart from the event name + // (unless you're listening on `"all"`, which will cause your callback to + // receive the true name of the event as the first argument). + trigger: function trigger(name) { + var _this2 = this; + + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + if (!this._rdEvents) { + return this; + } + + if (name && _typeof(name) === 'object') { + _.each(_.keys(name), function (key) { + triggerApi({ + events: _this2._rdEvents, + name: key, + args: [name[key]] + }); + }); + } + + if (name && eventSplitter.test(name)) { + _.each(name.split(eventSplitter), function (n) { + triggerApi({ + events: _this2._rdEvents, + name: n, + args: args + }); + }); + return this; + } + + triggerApi({ + events: this._rdEvents, + name: name, + args: args + }); + return this; + }, triggerMethod: triggerMethod }; @@ -340,7 +811,7 @@ // events=>function references/names to a hash of events=>function references normalizeMethods: normalizeMethods, _setOptions: function _setOptions(options, classOptions) { - this.options = _.extend({}, _.result(this, 'options'), options); + this.options = ___default.extend({}, ___default.result(this, 'options'), options); this.mergeOptions(options, classOptions); }, // A handy way to merge passed-in options onto the instance @@ -358,7 +829,7 @@ triggerMethod: triggerMethod }; - _.extend(CommonMixin, Backbone.Events); + ___default.extend(CommonMixin, Backbone.Events); var DestroyMixin = { _isDestroyed: false, @@ -384,7 +855,7 @@ var RadioMixin = { _initRadio: function _initRadio() { - var channelName = _.result(this, 'channelName'); + var channelName = ___default.result(this, 'channelName'); if (!channelName) { return; @@ -401,11 +872,11 @@ var channel = this._channel = Radio.channel(channelName); - var radioEvents = _.result(this, 'radioEvents'); + var radioEvents = ___default.result(this, 'radioEvents'); this.bindEvents(channel, radioEvents); - var radioRequests = _.result(this, 'radioRequests'); + var radioRequests = ___default.result(this, 'radioRequests'); this.bindRequests(channel, radioRequests); this.on('destroy', this._destroyRadio); @@ -424,7 +895,7 @@ var MarionetteObject = function MarionetteObject(options) { this._setOptions(options, ClassOptions); - this.cid = _.uniqueId(this.cidPrefix); + this.cid = ___default.uniqueId(this.cidPrefix); this._initRadio(); @@ -434,14 +905,14 @@ MarionetteObject.extend = extend; // Object Methods // -------------- - _.extend(MarionetteObject.prototype, CommonMixin, DestroyMixin, RadioMixin, { + ___default.extend(MarionetteObject.prototype, CommonMixin, DestroyMixin, RadioMixin, { cidPrefix: 'mno', // This is a noop method intended to be overridden initialize: function initialize() {} }); // Implementation of the invoke method (http://underscorejs.org/#invoke) with support for - var _invoke = _.invokeMap || _.invoke; + var _invoke = ___default.invokeMap || ___default.invoke; // - behaviors // Takes care of getting the behavior class @@ -460,7 +931,7 @@ } //treat functions as a Behavior constructor - if (_.isFunction(options)) { + if (___default.isFunction(options)) { return { BehaviorClass: options, options: {} @@ -477,33 +948,33 @@ function parseBehaviors(view, behaviors, allBehaviors) { - return _.reduce(behaviors, function (reducedBehaviors, behaviorDefiniton) { + return ___default.reduce(behaviors, function (reducedBehaviors, behaviorDefiniton) { var _getBehaviorClass = getBehaviorClass(behaviorDefiniton), BehaviorClass = _getBehaviorClass.BehaviorClass, options = _getBehaviorClass.options; var behavior = new BehaviorClass(options, view); reducedBehaviors.push(behavior); - return parseBehaviors(view, _.result(behavior, 'behaviors'), reducedBehaviors); + return parseBehaviors(view, ___default.result(behavior, 'behaviors'), reducedBehaviors); }, allBehaviors); } var BehaviorsMixin = { _initBehaviors: function _initBehaviors() { - this._behaviors = parseBehaviors(this, _.result(this, 'behaviors'), []); + this._behaviors = parseBehaviors(this, ___default.result(this, 'behaviors'), []); }, _getBehaviorTriggers: function _getBehaviorTriggers() { var triggers = _invoke(this._behaviors, '_getTriggers'); - return _.reduce(triggers, function (memo, _triggers) { - return _.extend(memo, _triggers); + return ___default.reduce(triggers, function (memo, _triggers) { + return ___default.extend(memo, _triggers); }, {}); }, _getBehaviorEvents: function _getBehaviorEvents() { var events = _invoke(this._behaviors, '_getEvents'); - return _.reduce(events, function (memo, _events) { - return _.extend(memo, _events); + return ___default.reduce(events, function (memo, _events) { + return ___default.extend(memo, _events); }, {}); }, // proxy behavior $el to the view's $el. @@ -534,7 +1005,7 @@ this.undelegate(".trig".concat(behavior.cid, " .").concat(behavior.cid)); - this._behaviors = _.without(this._behaviors, behavior); + this._behaviors = ___default.without(this._behaviors, behavior); }, _bindBehaviorUIElements: function _bindBehaviorUIElements() { _invoke(this._behaviors, 'bindUIElements'); @@ -554,12 +1025,12 @@ // Handle `modelEvents`, and `collectionEvents` configuration _delegateEntityEvents: function _delegateEntityEvents(model, collection) { if (model) { - this._modelEvents = _.result(this, 'modelEvents'); + this._modelEvents = ___default.result(this, 'modelEvents'); this.bindEvents(model, this._modelEvents); } if (collection) { - this._collectionEvents = _.result(this, 'collectionEvents'); + this._collectionEvents = ___default.result(this, 'collectionEvents'); this.bindEvents(collection, this._collectionEvents); } }, @@ -611,7 +1082,7 @@ // literal. All methods and attributes from this object // are copies to the object passed in. mixinTemplateContext: function mixinTemplateContext(serializedData) { - var templateContext = _.result(this, 'templateContext'); + var templateContext = ___default.result(this, 'templateContext'); if (!templateContext) { return serializedData; @@ -621,7 +1092,7 @@ return templateContext; } - return _.extend({}, serializedData, templateContext); + return ___default.extend({}, serializedData, templateContext); }, // Serialize the view's model *or* collection, if // it exists, for the template @@ -647,7 +1118,7 @@ }, // Serialize a collection serializeCollection: function serializeCollection() { - return _.map(this.collection.models, function (model) { + return ___default.map(this.collection.models, function (model) { return model.attributes; }); }, @@ -671,94 +1142,12 @@ } }; - // Borrow event splitter from Backbone - var delegateEventSplitter = /^(\S+)\s*(.*)$/; // Set event name to be namespaced using a unique index - // to generate a non colliding event namespace - // http://api.jquery.com/event.namespace/ - - var getNamespacedEventName = function getNamespacedEventName(eventName, namespace) { - var match = eventName.match(delegateEventSplitter); - return "".concat(match[1], ".").concat(namespace, " ").concat(match[2]); - }; - - // Add Feature flags here - // e.g. 'class' => false - var FEATURES = { - childViewEventPrefix: false, - triggersStopPropagation: true, - triggersPreventDefault: true, - DEV_MODE: false - }; - - function isEnabled(name) { - return !!FEATURES[name]; - } - - function setEnabled(name, state) { - return FEATURES[name] = state; - } - - // 'click:foo' - - function buildViewTrigger(view, triggerDef) { - if (_.isString(triggerDef)) { - triggerDef = { - event: triggerDef - }; - } - - var eventName = triggerDef.event; - var shouldPreventDefault = !!triggerDef.preventDefault; - - if (isEnabled('triggersPreventDefault')) { - shouldPreventDefault = triggerDef.preventDefault !== false; - } - - var shouldStopPropagation = !!triggerDef.stopPropagation; - - if (isEnabled('triggersStopPropagation')) { - shouldStopPropagation = triggerDef.stopPropagation !== false; - } - - return function (event) { - if (shouldPreventDefault) { - event.preventDefault(); - } - - if (shouldStopPropagation) { - event.stopPropagation(); - } - - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - view.triggerMethod.apply(view, [eventName, view, event].concat(args)); - }; - } - - var TriggersMixin = { - // Configure `triggers` to forward DOM events to view - // events. `triggers: {"click .foo": "do:foo"}` - _getViewTriggers: function _getViewTriggers(view, triggers) { - var _this = this; - - // Configure the triggers, prevent default - // action and stop propagation of DOM events - return _.reduce(triggers, function (events, value, key) { - key = getNamespacedEventName(key, "trig".concat(_this.cid)); - events[key] = buildViewTrigger(view, value); - return events; - }, {}); - } - }; - // a given key for triggers and events // swaps the @ui with the associated selector. // Returns a new, non-mutated, parsed events hash. var _normalizeUIKeys = function normalizeUIKeys(hash, ui) { - return _.reduce(hash, function (memo, val, key) { + return ___default.reduce(hash, function (memo, val, key) { var normalizedKey = _normalizeUIString(key, ui); memo[normalizedKey] = val; @@ -779,13 +1168,13 @@ var _normalizeUIValues = function normalizeUIValues(hash, ui, property) { - _.each(hash, function (val, key) { - if (_.isString(val)) { + ___default.each(hash, function (val, key) { + if (___default.isString(val)) { hash[key] = _normalizeUIString(val, ui); } else if (val) { var propertyVal = val[property]; - if (_.isString(propertyVal)) { + if (___default.isString(propertyVal)) { val[property] = _normalizeUIString(propertyVal, ui); } } @@ -817,9 +1206,9 @@ return _normalizeUIValues(hash, uiBindings, property); }, _getUIBindings: function _getUIBindings() { - var uiBindings = _.result(this, '_uiBindings'); + var uiBindings = ___default.result(this, '_uiBindings'); - return uiBindings || _.result(this, 'ui'); + return uiBindings || ___default.result(this, 'ui'); }, // This method binds the elements specified in the "ui" hash inside the view's code with // the associated jQuery selectors. @@ -837,12 +1226,12 @@ } // get the bindings result, as a function or otherwise - var bindings = _.result(this, '_uiBindings'); // empty the ui so we don't have anything to start with + var bindings = ___default.result(this, '_uiBindings'); // empty the ui so we don't have anything to start with this._ui = {}; // bind each of the selectors - _.each(bindings, function (selector, key) { + ___default.each(bindings, function (selector, key) { _this._ui[key] = _this.$(selector); }); @@ -856,7 +1245,7 @@ } // delete all of the existing ui bindings - _.each(this.ui, function ($el, name) { + ___default.each(this.ui, function ($el, name) { delete _this2.ui[name]; }); // reset the ui element to the original bindings configuration @@ -870,18 +1259,204 @@ } }; - // DomApi + // Add Feature flags here + // e.g. 'class' => false + var FEATURES = { + childViewEventPrefix: false, + triggersStopPropagation: true, + triggersPreventDefault: true, + DEV_MODE: false + }; + + function isEnabled(name) { + return !!FEATURES[name]; + } + + function setEnabled(name, state) { + return FEATURES[name] = state; + } + + // Event Delegator + + function setEventDelegator(mixin) { + this.prototype.EventDelegator = _.extend({}, this.prototype.EventDelegator, mixin); + return this; + } + var EventDelegator = { + shouldCapture: function shouldCapture(eventName) { + return ['focus', 'blur'].indexOf(eventName) !== -1; + }, + // this.$el.on(eventName + '.delegateEvents' + this.cid, selector, handler); + delegate: function delegate(_ref) { + var eventName = _ref.eventName, + selector = _ref.selector, + handler = _ref.handler, + events = _ref.events, + rootEl = _ref.rootEl; + var shouldCapture = this.shouldCapture(eventName); + + if (selector) { + var delegateHandler = function delegateHandler(evt) { + var node = evt.target; + + for (; node && node !== rootEl; node = node.parentNode) { + if (Element.prototype.matches.call(node, selector)) { + evt.delegateTarget = node; + handler(evt); + } + } + }; + + events.push({ + eventName: eventName, + handler: delegateHandler + }); + Element.prototype.addEventListener.call(rootEl, eventName, delegateHandler, shouldCapture); + return; + } + + events.push({ + eventName: eventName, + handler: handler + }); + Element.prototype.addEventListener.call(rootEl, eventName, handler, shouldCapture); + }, + // this.$el.off('.delegateEvents' + this.cid); + undelegateAll: function undelegateAll(_ref2) { + var _this = this; + + var events = _ref2.events, + rootEl = _ref2.rootEl; + + if (!rootEl) { + return; + } + + _.each(events, function (_ref3) { + var eventName = _ref3.eventName, + handler = _ref3.handler; + + var shouldCapture = _this.shouldCapture(eventName); + + Element.prototype.removeEventListener.call(rootEl, eventName, handler, shouldCapture); + }); + events.length = 0; + } + }; + + var delegateEventSplitter = /^(\S+)\s*(.*)$/; // Internal method to create an event handler for a given `triggerDef` like + // 'click:foo' + + function buildViewTrigger(view, triggerDef) { + if (_.isString(triggerDef)) { + triggerDef = { + event: triggerDef + }; + } + + var eventName = triggerDef.event; + var shouldPreventDefault = !!triggerDef.preventDefault; + + if (isEnabled('triggersPreventDefault')) { + shouldPreventDefault = triggerDef.preventDefault !== false; + } + + var shouldStopPropagation = !!triggerDef.stopPropagation; + + if (isEnabled('triggersStopPropagation')) { + shouldStopPropagation = triggerDef.stopPropagation !== false; + } + + return function (event) { + if (shouldPreventDefault) { + event.preventDefault(); + } + + if (shouldStopPropagation) { + event.stopPropagation(); + } + + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + view.triggerMethod.apply(view, [eventName, view, event].concat(args)); + }; + } + + var ViewEventsMixin = { + EventDelegator: EventDelegator, + _initViewEvents: function _initViewEvents() { + this._domEvents = []; + }, + _undelegateViewEvents: function _undelegateViewEvents() { + this.EventDelegator.undelegateAll({ + events: this._domEvents, + rootEl: this.el + }); + }, + _delegateViewEvents: function _delegateViewEvents() { + var view = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this; + + var uiBindings = this._getUIBindings(); + + this._delegateEvents(uiBindings); + + this._delegateTriggers(uiBindings, view); + }, + _delegateEvents: function _delegateEvents(uiBindings) { + var _this = this; + + if (!this.events) { + return; + } + + _.each(_.result(this, 'events'), function (handler, key) { + if (!_.isFunction(handler)) { + handler = _this[handler]; + } + + if (!handler) { + return; + } + + _this._delegate(handler.bind(_this), _this.normalizeUIString(key, uiBindings)); + }); + }, + _delegateTriggers: function _delegateTriggers(uiBindings, view) { + var _this2 = this; - function _getEl(el) { - return el instanceof Backbone.$ ? el : Backbone.$(el); - } // Static setter + if (!this.triggers) { + return; + } + _.each(_.result(this, 'triggers'), function (value, key) { + _this2._delegate(buildViewTrigger(view, value), _this2.normalizeUIString(key, uiBindings)); + }); + }, + _delegate: function _delegate(handler, key) { + var match = key.match(delegateEventSplitter); + this.EventDelegator.delegate({ + eventName: match[1], + selector: match[2], + handler: handler, + events: this._domEvents, + rootEl: this.el + }); + } + }; + + // DomApi function setDomApi(mixin) { this.prototype.Dom = _.extend({}, this.prototype.Dom, mixin); return this; } var DomApi = { + // Returns a new HTML DOM node of tagName + createElement: function createElement(tagName) { + return document.createElement(tagName); + }, // Returns a new HTML DOM node instance createBuffer: function createBuffer() { return document.createDocumentFragment(); @@ -890,16 +1465,10 @@ getDocumentEl: function getDocumentEl(el) { return el.ownerDocument.documentElement; }, - // Lookup the `selector` string - // Selector may also be a DOM element - // Returns an array-like object of nodes - getEl: function getEl(selector) { - return _getEl(selector); - }, // Finds the `selector` string with the el // Returns an array-like object of nodes findEl: function findEl(el, selector) { - return _getEl(el).find(selector); + return el.querySelectorAll(selector); }, // Returns true if the el contains the node childEl hasEl: function hasEl(el, childEl) { @@ -907,9 +1476,9 @@ }, // Detach `el` from the DOM without removing listeners detachEl: function detachEl(el) { - var _$el = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _getEl(el); - - _$el.detach(); + if (el.parentNode) { + el.parentNode.removeChild(el); + } }, // Remove `oldEl` from the DOM and put `newEl` in its place replaceEl: function replaceEl(newEl, oldEl) { @@ -943,22 +1512,20 @@ parent1.insertBefore(el2, next1); parent2.insertBefore(el1, next2); }, - // Replace the contents of `el` with the HTML string of `html` + // Replace the contents of `el` with the `html` setContents: function setContents(el, html) { - var _$el = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _getEl(el); - - _$el.html(html); + el.innerHTML = html; + }, + // Sets attributes on a DOM node + setAttributes: function setAttributes(el, attrs) { + _.each(_.keys(attrs), function (attr) { + attr in el ? el[attr] = attrs[attr] : el.setAttribute(attr, attrs[attr]); + }); }, // Takes the DOM node `el` and appends the DOM node `contents` // to the end of the element's contents. appendContents: function appendContents(el, contents) { - var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, - _ref$_$el = _ref._$el, - _$el = _ref$_$el === void 0 ? _getEl(el) : _ref$_$el, - _ref$_$contents = _ref._$contents, - _$contents = _ref$_$contents === void 0 ? _getEl(contents) : _ref$_$contents; - - _$el.append(_$contents); + el.appendChild(contents); }, // Does the el have child nodes hasContents: function hasContents(el) { @@ -967,24 +1534,56 @@ // Remove the inner contents of `el` from the DOM while leaving // `el` itself in the DOM. detachContents: function detachContents(el) { - var _$el = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _getEl(el); - - _$el.contents().detach(); + el.textContent = ''; } }; // ViewMixin + // - attributes // - behaviors // - childViewEventPrefix // - childViewEvents // - childViewTriggers + // - className + // - collection // - collectionEvents + // - el + // - events + // - id + // - model // - modelEvents + // - tagName // - triggers // - ui var ViewMixin = { + tagName: 'div', + // This is a noop method intended to be overridden + preinitialize: function preinitialize() {}, Dom: DomApi, + // Create an element from the `id`, `className` and `tagName` properties. + _getEl: function _getEl() { + if (!this.el) { + var el = this.Dom.createElement(_.result(this, 'tagName')); + var attrs = _.extend({}, _.result(this, 'attributes')); + + if (this.id) { + attrs.id = _.result(this, 'id'); + } + + if (this.className) { + attrs.class = _.result(this, 'className'); + } + + this.Dom.setAttributes(el, attrs); + return el; + } + + return _.result(this, 'el'); + }, + $: function $(selector) { + return this.Dom.findEl(this.el, selector); + }, _isElAttached: function _isElAttached() { return !!this.el && this.Dom.hasEl(this.Dom.getDocumentEl(this.el), this.el); }, @@ -1002,43 +1601,6 @@ isAttached: function isAttached() { return !!this._isAttached; }, - // Overriding Backbone.View's `delegateEvents` to handle - // `events` and `triggers` - delegateEvents: function delegateEvents(events) { - this._proxyBehaviorViewProperties(); - - this._buildEventProxies(); - - var combinedEvents = _.extend({}, this._getBehaviorEvents(), this._getEvents(events), this._getBehaviorTriggers(), this._getTriggers()); - - Backbone.View.prototype.delegateEvents.call(this, combinedEvents); - return this; - }, - // Allows Backbone.View events to utilize `@ui.` selectors - _getEvents: function _getEvents(events) { - if (events) { - return this.normalizeUIKeys(events); - } - - if (!this.events) { - return; - } - - return this.normalizeUIKeys(_.result(this, 'events')); - }, - // Configure `triggers` to forward DOM events to view - // events. `triggers: {"click .foo": "do:foo"}` - _getTriggers: function _getTriggers() { - if (!this.triggers) { - return; - } // Allow `triggers` to be configured as a function - - - var triggers = this.normalizeUIKeys(_.result(this, 'triggers')); // Configure the triggers, prevent default - // action and stop propagation of DOM events - - return this._getViewTriggers(this, triggers); - }, // Handle `modelEvents`, and `collectionEvents` configuration delegateEntityEvents: function delegateEntityEvents() { this._delegateEntityEvents(this.model, this.collection); // bind each behaviors model and collection events @@ -1072,9 +1634,12 @@ } // unbind UI elements - this.unbindUIElements(); // remove the view from the DOM + this.unbindUIElements(); - this._removeElement(); + this._undelegateViewEvents(); // remove the view from the DOM + + + this.Dom.detachEl(this.el); if (shouldTriggerDetach) { this._isAttached = false; @@ -1098,11 +1663,6 @@ this.stopListening(); return this; }, - // Equates to this.$el.remove - _removeElement: function _removeElement() { - this.$el.off().removeData(); - this.Dom.detachEl(this.el, this.$el); - }, // This method binds the elements specified in the "ui" hash bindUIElements: function bindUIElements() { this._bindUIElements(); @@ -1130,9 +1690,7 @@ }, _getEventPrefix: function _getEventPrefix() { var defaultPrefix = isEnabled('childViewEventPrefix') ? 'childview' : false; - var prefix = _.result(this, 'childViewEventPrefix', defaultPrefix); - return prefix === false ? prefix : prefix + ':'; }, _proxyChildViewEvents: function _proxyChildViewEvents(view) { @@ -1163,9 +1721,14 @@ } } }; + _.extend(ViewMixin, BehaviorsMixin, CommonMixin, DelegateEntityEventsMixin, TemplateRenderMixin, UIMixin, ViewEventsMixin); - _.extend(ViewMixin, BehaviorsMixin, CommonMixin, DelegateEntityEventsMixin, TemplateRenderMixin, TriggersMixin, UIMixin); - + function isView(view) { + return view.render && (view.destroy || view.remove); + } + function isViewClass(ViewClass) { + return ViewClass.prototype.render && (ViewClass.prototype.destroy || ViewClass.prototype.remove); + } function renderView(view) { if (view._isRendered) { return; @@ -1224,10 +1787,7 @@ this.cid = _.uniqueId(this.cidPrefix); // getOption necessary because options.el may be passed as undefined - this._initEl = this.el = this.getOption('el'); // Handle when this.el is passed in as a $ wrapped element. - - this.el = this.el instanceof Backbone.$ ? this.el[0] : this.el; - this.$el = this._getEl(this.el); + this._initEl = this.el = this.getOption('el'); this.initialize.apply(this, arguments); }; @@ -1241,8 +1801,6 @@ replaceElement: false, _isReplaced: false, _isSwappingView: false, - // This is a noop method intended to be overridden - initialize: function initialize() {}, // Displays a view instance inside of the region. If necessary handles calling the `render` // method for you. Reads content directly from the `el` attribute. show: function show(view, options) { @@ -1282,7 +1840,12 @@ this._isSwappingView = false; return this; }, - _getEl: function _getEl(el) { + _setEl: function _setEl(el) { + if (_.isObject(el)) { + this.el = el; + return; + } + if (!el) { throw new MarionetteError({ name: classErrorName, @@ -1291,19 +1854,7 @@ }); } - return this.getEl(el); - }, - _setEl: function _setEl() { - this.$el = this._getEl(this.el); - - if (this.$el.length) { - this.el = this.$el[0]; - } // Make sure the $el contains only the el - - - if (this.$el.length > 1) { - this.$el = this.Dom.getEl(this.el); - } + this.el = this.getEl(el); }, // Set the `el` of the region and move any current view to the new `el`. _setElement: function _setElement(el) { @@ -1315,9 +1866,7 @@ this._restoreEl(); - this.el = el; - - this._setEl(); + this._setEl(el); if (this.currentView) { var view = this.currentView; @@ -1385,11 +1934,9 @@ _ensureElement: function _ensureElement() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - if (!_.isObject(this.el)) { - this._setEl(); - } + this._setEl(this.el); - if (!this.$el || this.$el.length === 0) { + if (!this.el) { var allowMissingEl = typeof options.allowMissingEl === 'undefined' ? !!_.result(this, 'allowMissingEl') : !!options.allowMissingEl; if (allowMissingEl) { @@ -1422,7 +1969,7 @@ }); } - if (view instanceof Backbone.View) { + if (isView(view)) { return view; } @@ -1455,12 +2002,7 @@ // a jQuery selector object scoped to a provided parent el or the document if none exists. getEl: function getEl(el) { var context = _.result(this, 'parentEl'); - - if (context && _.isString(el)) { - return this.Dom.findEl(context, el); - } - - return this.Dom.getEl(el); + return this.Dom.findEl(context || document, el)[0]; }, _replaceEl: function _replaceEl(view) { // Always restore the el to ensure the regions el is present before replacing @@ -1498,10 +2040,7 @@ // Override this method to change how the new view is appended to the `$el` that the // region is managing attachHtml: function attachHtml(view) { - this.Dom.appendContents(this.el, view.el, { - _$el: this.$el, - _$contents: view.$el - }); + this.Dom.appendContents(this.el, view.el); }, // Destroy the current view, if there is one. If there is no current view, // it will detach any html inside the region's `el`. @@ -1603,7 +2142,7 @@ }, // Override this method to change how the region detaches current content detachHtml: function detachHtml() { - this.Dom.detachContents(this.el, this.$el); + this.Dom.detachContents(this.el); }, // Checks whether a view is currently present within the region. Returns `true` if there is // and `false` if no view is present. @@ -1651,19 +2190,19 @@ return definition; } - if (_.isString(definition)) { + if (___default.isString(definition)) { return buildRegionFromObject(defaults, { el: definition }); } - if (_.isFunction(definition)) { + if (___default.isFunction(definition)) { return buildRegionFromObject(defaults, { regionClass: definition }); } - if (_.isObject(definition)) { + if (___default.isObject(definition)) { return buildRegionFromObject(defaults, definition); } @@ -1674,7 +2213,7 @@ } function buildRegionFromObject(defaults, definition) { - var options = _.extend({}, defaults, definition); + var options = ___default.extend({}, defaults, definition); var RegionClass = options.regionClass; delete options.regionClass; @@ -1692,7 +2231,7 @@ // init regions hash this.regions = this.regions || {}; this._regions = {}; - this.addRegions(_.result(this, 'regions')); + this.addRegions(___default.result(this, 'regions')); }, // Internal method to re-initialize all of the regions by updating // the `el` that they point to @@ -1708,7 +2247,7 @@ // Add multiple regions as a {name: definition, name2: def2} object literal addRegions: function addRegions(regions) { // If there's nothing to add, stop here. - if (_.isEmpty(regions)) { + if (___default.isEmpty(regions)) { return; } // Normalize region selectors hash to allow // a user to use the @ui. syntax. @@ -1716,7 +2255,7 @@ regions = this.normalizeUIValues(regions, 'el'); // Add the regions definitions to the regions property - this.regions = _.extend({}, this.regions, regions); + this.regions = ___default.extend({}, this.regions, regions); return this._addRegions(regions); }, // internal method to build and add regions @@ -1725,9 +2264,9 @@ var defaults = { regionClass: this.regionClass, - parentEl: _.partial(_.result, this, 'el') + parentEl: ___default.partial(___default.result, this, 'el') }; - return _.reduce(regionDefinitions, function (regions, definition, name) { + return ___default.reduce(regionDefinitions, function (regions, definition, name) { regions[name] = buildRegion(definition, defaults); _this._addRegion(regions[name], name); @@ -1754,7 +2293,7 @@ removeRegions: function removeRegions() { var regions = this._getRegions(); - _.each(this._regions, this._removeRegion.bind(this)); + ___default.each(this._regions, this._removeRegion.bind(this)); return regions; }, @@ -1794,7 +2333,7 @@ return this._regions[name]; }, _getRegions: function _getRegions() { - return _.clone(this._regions); + return ___default.clone(this._regions); }, // Get all regions getRegions: function getRegions() { @@ -1824,7 +2363,7 @@ } // View - var ClassOptions$2 = ['behaviors', 'childViewEventPrefix', 'childViewEvents', 'childViewTriggers', 'collectionEvents', 'events', 'modelEvents', 'regionClass', 'regions', 'template', 'templateContext', 'triggers', 'ui']; // Used by _getImmediateChildren + var ClassOptions$2 = ['attributes', 'behaviors', 'childViewEventPrefix', 'childViewEvents', 'childViewTriggers', 'className', 'collection', 'collectionEvents', 'el', 'events', 'id', 'model', 'modelEvents', 'regionClass', 'regions', 'tagName', 'template', 'templateContext', 'triggers', 'ui']; // Used by _getImmediateChildren function childReducer(children, region) { if (region.currentView) { @@ -1836,26 +2375,46 @@ // templates, nested views, and more. - var View = Backbone.View.extend({ - constructor: function constructor(options) { - this._setOptions(options, ClassOptions$2); + var View = function View(options) { + this.cid = _.uniqueId(this.cidPrefix); - monitorViewEvents(this); + this._setOptions(options, ClassOptions$2); - this._initBehaviors(); + this.preinitialize.apply(this, arguments); - this._initRegions(); + this._initViewEvents(); - Backbone.View.prototype.constructor.apply(this, arguments); - this.delegateEntityEvents(); + this.setElement(this._getEl()); + monitorViewEvents(this); + + this._initBehaviors(); + + this._initRegions(); + + this._buildEventProxies(); + + this.initialize.apply(this, arguments); + this.delegateEntityEvents(); + + this._triggerEventOnBehaviors('initialize', this, options); + }; + + _.extend(View, { + extend: extend, + setRenderer: setRenderer, + setDomApi: setDomApi, + setEventDelegator: setEventDelegator + }); + + _.extend(View.prototype, ViewMixin, RegionsMixin, { + cidPrefix: 'mnv', + setElement: function setElement(element) { + this._undelegateViewEvents(); + + this.el = element; + + this._setBehaviorElements(); - this._triggerEventOnBehaviors('initialize', this, options); - }, - // Overriding Backbone.View's `setElement` to handle - // if an el was previously defined. If so, the view might be - // rendered or attached on setElement. - setElement: function setElement() { - Backbone.View.prototype.setElement.apply(this, arguments); this._isRendered = this.Dom.hasContents(this.el); this._isAttached = this._isElAttached(); @@ -1863,6 +2422,8 @@ this.bindUIElements(); } + this._delegateViewEvents(); + return this; }, // If a template is available, renders it into the view's `el` @@ -1895,13 +2456,8 @@ _getImmediateChildren: function _getImmediateChildren() { return _.reduce(this._regions, childReducer, []); } - }, { - setRenderer: setRenderer, - setDomApi: setDomApi }); - _.extend(View.prototype, ViewMixin, RegionsMixin); - // shut down child views. var Container = function Container() { @@ -1914,13 +2470,13 @@ var methods = ['forEach', 'each', 'map', 'find', 'detect', 'filter', 'select', 'reject', 'every', 'all', 'some', 'any', 'include', 'contains', 'invoke', 'toArray', 'first', 'initial', 'rest', 'last', 'without', 'isEmpty', 'pluck', 'reduce', 'partition']; - _.each(methods, function (method) { + ___default.each(methods, function (method) { Container.prototype[method] = function () { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _[method].apply(_, [this._views].concat(args)); + return ___default[method].apply(___default, [this._views].concat(args)); }; }); @@ -1930,7 +2486,7 @@ // ----------------- - _.extend(Container.prototype, { + ___default.extend(Container.prototype, { // Initializes an empty container _init: function _init() { this._views = []; @@ -1964,7 +2520,7 @@ // Sort (mutate) and return the array of the child views. _sort: function _sort(comparator, context) { if (typeof comparator === 'string') { - comparator = _.partial(stringComparator, comparator); + comparator = ___default.partial(stringComparator, comparator); return this._sortBy(comparator); } @@ -1976,7 +2532,7 @@ }, // Makes `_.sortBy` mutate the array to match `this._views.sort` _sortBy: function _sortBy(comparator) { - var sortedViews = _.sortBy(this._views, comparator); + var sortedViews = ___default.sortBy(this._views, comparator); this._set(sortedViews); @@ -1993,7 +2549,7 @@ this._viewsByCid = {}; this._indexByModel = {}; - _.each(views, this._addViewIndexes.bind(this)); + ___default.each(views, this._addViewIndexes.bind(this)); this._updateLength(); } @@ -2062,29 +2618,46 @@ // Collection View var classErrorName$1 = 'CollectionViewError'; - var ClassOptions$3 = ['behaviors', 'childView', 'childViewContainer', 'childViewEventPrefix', 'childViewEvents', 'childViewOptions', 'childViewTriggers', 'collectionEvents', 'emptyView', 'emptyViewOptions', 'events', 'modelEvents', 'sortWithCollection', 'template', 'templateContext', 'triggers', 'ui', 'viewComparator', 'viewFilter']; // A view that iterates over a Backbone.Collection + var ClassOptions$3 = ['attributes', 'behaviors', 'childView', 'childViewContainer', 'childViewEventPrefix', 'childViewEvents', 'childViewOptions', 'childViewTriggers', 'className', 'collection', 'collectionEvents', 'el', 'emptyView', 'emptyViewOptions', 'events', 'id', 'model', 'modelEvents', 'sortWithCollection', 'tagName', 'template', 'templateContext', 'triggers', 'ui', 'viewComparator', 'viewFilter']; // A view that iterates over a Backbone.Collection // and renders an individual child view for each model. - var CollectionView = Backbone.View.extend({ - // flag for maintaining the sorted order of the collection - sortWithCollection: true, - // constructor - constructor: function constructor(options) { - this._setOptions(options, ClassOptions$3); + var CollectionView = function CollectionView(options) { + this.cid = _.uniqueId(this.cidPrefix); - monitorViewEvents(this); + this._setOptions(options, ClassOptions$3); - this._initChildViewStorage(); + this.preinitialize.apply(this, arguments); - this._initBehaviors(); + this._initViewEvents(); - Backbone.View.prototype.constructor.apply(this, arguments); // Init empty region + this.setElement(this._getEl()); + monitorViewEvents(this); - this.getEmptyRegion(); - this.delegateEntityEvents(); + this._initChildViewStorage(); - this._triggerEventOnBehaviors('initialize', this, options); - }, + this._initBehaviors(); + + this._buildEventProxies(); // Init empty region + + + this.getEmptyRegion(); + this.initialize.apply(this, arguments); + this.delegateEntityEvents(); + + this._triggerEventOnBehaviors('initialize', this, options); + }; + + _.extend(CollectionView, { + extend: extend, + setRenderer: setRenderer, + setDomApi: setDomApi, + setEventDelegator: setEventDelegator + }); + + _.extend(CollectionView.prototype, ViewMixin, { + cidPrefix: 'mncv', + // flag for maintaining the sorted order of the collection + sortWithCollection: true, // Internal method to set up the `children` object for storing all of the child views // `_children` represents all child views // `children` represents only views filtered to be shown @@ -2094,16 +2667,16 @@ }, // Create an region to show the emptyView getEmptyRegion: function getEmptyRegion() { - var $emptyEl = this.$container || this.$el; + var emptyEl = this.container || this.el; if (this._emptyRegion && !this._emptyRegion.isDestroyed()) { - this._emptyRegion._setElement($emptyEl[0]); + this._emptyRegion._setElement(emptyEl); return this._emptyRegion; } this._emptyRegion = new Region({ - el: $emptyEl[0], + el: emptyEl, replaceElement: false }); this._emptyRegion._parentView = this; @@ -2252,7 +2825,7 @@ // First check if the `view` is a view class (the common case) // Then check if it's a function (which we assume that returns a view class) _getView: function _getView(view, child) { - if (view.prototype instanceof Backbone.View || view === Backbone.View) { + if (isViewClass(view)) { return view; } else if (_.isFunction(view)) { return view.call(this, child); @@ -2291,9 +2864,17 @@ // Overriding Backbone.View's `setElement` to handle // if an el was previously defined. If so, the view might be // attached on setElement. - setElement: function setElement() { - Backbone.View.prototype.setElement.apply(this, arguments); + setElement: function setElement(element) { + this._undelegateViewEvents(); + + this.el = element; + + this._setBehaviorElements(); + this._isAttached = this._isElAttached(); + + this._delegateViewEvents(); + return this; }, // Render children views. @@ -2330,10 +2911,9 @@ // Get a container within the template to add the children within _getChildViewContainer: function _getChildViewContainer() { var childViewContainer = _.result(this, 'childViewContainer'); + this.container = childViewContainer ? this.$(childViewContainer)[0] : this.el; - this.$container = childViewContainer ? this.$(childViewContainer) : this.$el; - - if (!this.$container.length) { + if (!this.container) { throw new MarionetteError({ name: classErrorName$1, message: "The specified \"childViewContainer\" was not found: ".concat(childViewContainer), @@ -2388,7 +2968,7 @@ removeComparator: function removeComparator(options) { return this.setComparator(null, options); }, - // If viewComparator is overriden it will be returned here. + // If viewComparator is overridden it will be returned here. // Additionally override this function to provide custom // viewComparator logic getComparator: function getComparator() { @@ -2441,7 +3021,6 @@ this.triggerMethod('before:filter', this); var attachViews = []; var detachViews = []; - _.each(this._children._views, function (view, key, children) { (viewFilter.call(_this2, view, key, children) ? attachViews : detachViews).push(view); }); @@ -2468,7 +3047,6 @@ if (_.isObject(viewFilter)) { var matcher = _.matches(viewFilter); - return function (view) { return matcher(view.model && view.model.attributes); }; @@ -2533,7 +3111,7 @@ }, // Override this method to change how the collectionView detaches a child view detachHtml: function detachHtml(view) { - this.Dom.detachEl(view.el, view.$el); + this.Dom.detachEl(view.el); }, _renderChildren: function _renderChildren() { // If there are unrendered views prevent add to end perf @@ -2563,23 +3141,18 @@ var _this3 = this; var elBuffer = this.Dom.createBuffer(); - _.each(views, function (view) { renderView(view); // corresponds that view is shown in a Region or CollectionView view._isShown = true; - _this3.Dom.appendContents(elBuffer, view.el, { - _$contents: view.$el - }); + _this3.Dom.appendContents(elBuffer, view.el); }); - return elBuffer; }, _attachChildren: function _attachChildren(els, views) { var shouldTriggerAttach = this._isAttached && this.monitorViewEvents !== false; views = shouldTriggerAttach ? views : []; - _.each(views, function (view) { if (view._isAttached) { return; @@ -2587,9 +3160,7 @@ view.triggerMethod('before:attach', view); }); - - this.attachHtml(els, this.$container); - + this.attachHtml(els, this.container); _.each(views, function (view) { if (view._isAttached) { return; @@ -2601,10 +3172,8 @@ }, // Override this method to do something other than `.append`. // You can attach any HTML at this point including the els. - attachHtml: function attachHtml(els, $container) { - this.Dom.appendContents($container[0], els, { - _$el: $container - }); + attachHtml: function attachHtml(els, container) { + this.Dom.appendContents(container, els); }, isEmpty: function isEmpty() { return !this.children.length; @@ -2790,7 +3359,7 @@ this.triggerMethod('before:destroy:children', this); if (this.monitorViewEvents === false) { - this.Dom.detachContents(this.el, this.$el); + this.Dom.detachContents(this.el); } this._removeChildViews(this._children._views); // After all children have been destroyed re-init the container @@ -2802,13 +3371,8 @@ this.triggerMethod('destroy:children', this); } - }, { - setDomApi: setDomApi, - setRenderer: setRenderer }); - _.extend(CollectionView.prototype, ViewMixin); - // Behavior var ClassOptions$4 = ['collectionEvents', 'events', 'modelEvents', 'triggers', 'ui']; @@ -2821,7 +3385,11 @@ this._setOptions(options, ClassOptions$4); - this.cid = _.uniqueId(this.cidPrefix); // Construct an internal UI hash using the behaviors UI + this.cid = _.uniqueId(this.cidPrefix); + + this._initViewEvents(); + + this.setElement(); // Construct an internal UI hash using the behaviors UI // hash combined and overridden by the view UI hash. // This allows the user to use UI hash elements defined // in the parent view as well as those defined in the behavior. @@ -2838,10 +3406,8 @@ Behavior.extend = extend; // Behavior Methods // -------------- - _.extend(Behavior.prototype, CommonMixin, DelegateEntityEventsMixin, TriggersMixin, UIMixin, { + _.extend(Behavior.prototype, CommonMixin, DelegateEntityEventsMixin, UIMixin, ViewEventsMixin, { cidPrefix: 'mnb', - // This is a noop method intended to be overridden - initialize: function initialize() {}, // proxy behavior $ method to the view // this is useful for doing jquery DOM lookups // scoped to behaviors view. @@ -2850,6 +3416,8 @@ }, // Stops the behavior from listening to events. destroy: function destroy() { + this._undelegateViewEvents(); + this.stopListening(); this.view._removeBehavior(this); @@ -2858,9 +3426,13 @@ return this; }, - proxyViewProperties: function proxyViewProperties() { - this.$el = this.view.$el; + setElement: function setElement() { + this._undelegateViewEvents(); + this.el = this.view.el; + + this._delegateViewEvents(this.view); + return this; }, bindUIElements: function bindUIElements() { @@ -2886,42 +3458,6 @@ this._undelegateEntityEvents(this.view.model, this.view.collection); return this; - }, - _getEvents: function _getEvents() { - var _this = this; - - if (!this.events) { - return; - } // Normalize behavior events hash to allow - // a user to use the @ui. syntax. - - - var behaviorEvents = this.normalizeUIKeys(_.result(this, 'events')); // binds the handler to the behavior and builds a unique eventName - - return _.reduce(behaviorEvents, function (events, behaviorHandler, key) { - if (!_.isFunction(behaviorHandler)) { - behaviorHandler = _this[behaviorHandler]; - } - - if (!behaviorHandler) { - return events; - } - - key = getNamespacedEventName(key, _this.cid); - events[key] = behaviorHandler.bind(_this); - return events; - }, {}); - }, - // Internal method to build all trigger handlers for a given behavior - _getTriggers: function _getTriggers() { - if (!this.triggers) { - return; - } // Normalize behavior triggers hash to allow - // a user to use the @ui. syntax. - - - var behaviorTriggers = this.normalizeUIKeys(_.result(this, 'triggers')); - return this._getViewTriggers(this.view, behaviorTriggers); } }); @@ -2931,7 +3467,7 @@ var Application = function Application(options) { this._setOptions(options, ClassOptions$5); - this.cid = _.uniqueId(this.cidPrefix); + this.cid = ___default.uniqueId(this.cidPrefix); this._initRegion(); @@ -2943,7 +3479,7 @@ Application.extend = extend; // Application Methods // -------------- - _.extend(Application.prototype, CommonMixin, DestroyMixin, RadioMixin, { + ___default.extend(Application.prototype, CommonMixin, DestroyMixin, RadioMixin, { cidPrefix: 'mna', // This is a noop method intended to be overridden initialize: function initialize() {}, diff --git a/lib/backbone.marionette.js.map b/lib/backbone.marionette.js.map index 55b959e9d9..be3857c056 100644 --- a/lib/backbone.marionette.js.map +++ b/lib/backbone.marionette.js.map @@ -1 +1 @@ -{"version":3,"file":"backbone.marionette.js","sources":["../src/utils/proxy.js","../src/utils/extend.js","../src/common/normalize-methods.js","../src/utils/error.js","../src/common/bind-events.js","../src/common/bind-requests.js","../src/common/get-option.js","../src/common/merge-options.js","../src/common/monitor-view-events.js","../src/common/trigger-method.js","../src/mixins/events.js","../src/mixins/common.js","../src/mixins/destroy.js","../src/mixins/radio.js","../src/object.js","../src/utils/invoke.js","../src/mixins/behaviors.js","../src/mixins/delegate-entity-events.js","../src/mixins/template-render.js","../src/utils/get-namespaced-event-name.js","../src/config/features.js","../src/mixins/triggers.js","../src/mixins/ui.js","../src/config/dom.js","../src/mixins/view.js","../src/common/view.js","../src/region.js","../src/common/build-region.js","../src/mixins/regions.js","../src/config/renderer.js","../src/view.js","../src/child-view-container.js","../src/collection-view.js","../src/behavior.js","../src/application.js","../src/backbone.marionette.js"],"sourcesContent":["//Internal utility for creating context style global utils\nconst proxy = function(method) {\n return function(context, ...args) {\n return method.apply(context, args);\n };\n};\n\nexport default proxy;\n","// Marionette.extend\n// -----------------\n\nimport Backbone from 'backbone';\n\n// Borrow the Backbone `extend` method so we can use it as needed\nconst extend = Backbone.Model.extend;\n\nexport default extend;\n","import _ from 'underscore';\n\n// Marionette.normalizeMethods\n// ----------------------\n\n// Pass in a mapping of events => functions or function names\n// and return a mapping of events => functions\nconst normalizeMethods = function(hash) {\n if (!hash) { return }\n\n return _.reduce(hash, (normalizedHash, method, name) => {\n if (!_.isFunction(method)) {\n method = this[method];\n }\n if (method) {\n normalizedHash[name] = method;\n }\n return normalizedHash;\n }, {});\n};\n\nexport default normalizeMethods;\n","// Error\n// -----\n\nimport _ from 'underscore';\nimport extend from './extend';\nimport {version} from '../../package.json';\n\nconst errorProps = ['description', 'fileName', 'lineNumber', 'name', 'message', 'number', 'url'];\n\nconst MarionetteError = extend.call(Error, {\n urlRoot: `http://marionettejs.com/docs/v${version}/`,\n\n url: '',\n\n constructor(options) {\n const error = Error.call(this, options.message);\n _.extend(this, _.pick(error, errorProps), _.pick(options, errorProps));\n\n if (Error.captureStackTrace) {\n this.captureStackTrace();\n }\n\n this.url = this.urlRoot + this.url;\n },\n\n captureStackTrace() {\n Error.captureStackTrace(this, MarionetteError);\n },\n\n toString() {\n return `${ this.name }: ${ this.message } See: ${ this.url }`;\n }\n});\n\nexport default MarionetteError;\n","// Bind Entity Events & Unbind Entity Events\n// -----------------------------------------\n//\n// These methods are used to bind/unbind a backbone \"entity\" (e.g. collection/model)\n// to methods on a target object.\n//\n// The first parameter, `target`, must have the Backbone.Events module mixed in.\n//\n// The second parameter is the `entity` (Backbone.Model, Backbone.Collection or\n// any object that has Backbone.Events mixed in) to bind the events from.\n//\n// The third parameter is a hash of { \"event:name\": \"eventHandler\" }\n// configuration. Multiple handlers can be separated by a space. A\n// function can be supplied instead of a string handler name.\n\nimport _ from 'underscore';\nimport normalizeMethods from './normalize-methods';\nimport MarionetteError from '../utils/error';\n\nfunction normalizeBindings(context, bindings) {\n if (!_.isObject(bindings)) {\n throw new MarionetteError({\n message: 'Bindings must be an object.',\n url: 'common.html#bindevents'\n });\n }\n\n return normalizeMethods.call(context, bindings);\n}\n\nfunction bindEvents(entity, bindings) {\n if (!entity || !bindings) { return this; }\n\n this.listenTo(entity, normalizeBindings(this, bindings));\n\n return this;\n}\n\nfunction unbindEvents(entity, bindings) {\n if (!entity) { return this; }\n\n if (!bindings) {\n this.stopListening(entity);\n return this;\n }\n\n this.stopListening(entity, normalizeBindings(this, bindings));\n\n return this;\n}\n\n// Export Public API\nexport {\n bindEvents,\n unbindEvents\n};\n","// Bind/Unbind Radio Requests\n// -----------------------------------------\n//\n// These methods are used to bind/unbind a backbone.radio request\n// to methods on a target object.\n//\n// The first parameter, `target`, will set the context of the reply method\n//\n// The second parameter is the `Radio.channel` to bind the reply to.\n//\n// The third parameter is a hash of { \"request:name\": \"replyHandler\" }\n// configuration. A function can be supplied instead of a string handler name.\n\nimport _ from 'underscore';\nimport normalizeMethods from './normalize-methods';\nimport MarionetteError from '../utils/error';\n\nfunction normalizeBindings(context, bindings) {\n if (!_.isObject(bindings)) {\n throw new MarionetteError({\n message: 'Bindings must be an object.',\n url: 'common.html#bindrequests'\n });\n }\n\n return normalizeMethods.call(context, bindings);\n}\n\nfunction bindRequests(channel, bindings) {\n if (!channel || !bindings) { return this; }\n\n channel.reply(normalizeBindings(this, bindings), this);\n\n return this;\n}\n\nfunction unbindRequests(channel, bindings) {\n if (!channel) { return this; }\n\n if (!bindings) {\n channel.stopReplying(null, null, this);\n return this;\n }\n\n channel.stopReplying(normalizeBindings(this, bindings));\n\n return this;\n}\n\nexport {\n bindRequests,\n unbindRequests\n};\n","// Marionette.getOption\n// --------------------\n\n// Retrieve an object, function or other value from the\n// object or its `options`, with `options` taking precedence.\nconst getOption = function(optionName) {\n if (!optionName) { return; }\n if (this.options && (this.options[optionName] !== undefined)) {\n return this.options[optionName];\n } else {\n return this[optionName];\n }\n};\n\nexport default getOption;\n","import _ from 'underscore';\n\n// Merge `keys` from `options` onto `this`\nconst mergeOptions = function(options, keys) {\n if (!options) { return; }\n\n _.each(keys, (key) => {\n const option = options[key];\n if (option !== undefined) {\n this[key] = option;\n }\n });\n};\n\nexport default mergeOptions;\n","// DOM Refresh\n// -----------\n\nimport _ from 'underscore';\n\n// Trigger method on children unless a pure Backbone.View\nfunction triggerMethodChildren(view, event, shouldTrigger) {\n if (!view._getImmediateChildren) { return; }\n _.each(view._getImmediateChildren(), child => {\n if (!shouldTrigger(child)) { return; }\n child.triggerMethod(event, child);\n });\n}\n\nfunction shouldTriggerAttach(view) {\n return !view._isAttached;\n}\n\nfunction shouldAttach(view) {\n if (!shouldTriggerAttach(view)) { return false; }\n view._isAttached = true;\n return true;\n}\n\nfunction shouldTriggerDetach(view) {\n return view._isAttached;\n}\n\nfunction shouldDetach(view) {\n view._isAttached = false;\n return true;\n}\n\nfunction triggerDOMRefresh(view) {\n if (view._isAttached && view._isRendered) {\n view.triggerMethod('dom:refresh', view);\n }\n}\n\nfunction triggerDOMRemove(view) {\n if (view._isAttached && view._isRendered) {\n view.triggerMethod('dom:remove', view);\n }\n}\n\nfunction handleBeforeAttach() {\n triggerMethodChildren(this, 'before:attach', shouldTriggerAttach);\n}\n\nfunction handleAttach() {\n triggerMethodChildren(this, 'attach', shouldAttach);\n triggerDOMRefresh(this);\n}\n\nfunction handleBeforeDetach() {\n triggerMethodChildren(this, 'before:detach', shouldTriggerDetach);\n triggerDOMRemove(this);\n}\n\nfunction handleDetach() {\n triggerMethodChildren(this, 'detach', shouldDetach);\n}\n\nfunction handleBeforeRender() {\n triggerDOMRemove(this);\n}\n\nfunction handleRender() {\n triggerDOMRefresh(this);\n}\n\n// Monitor a view's state, propagating attach/detach events to children and firing dom:refresh\n// whenever a rendered view is attached or an attached view is rendered.\nfunction monitorViewEvents(view) {\n if (view._areViewEventsMonitored || view.monitorViewEvents === false) { return; }\n\n view._areViewEventsMonitored = true;\n\n view.on({\n 'before:attach': handleBeforeAttach,\n 'attach': handleAttach,\n 'before:detach': handleBeforeDetach,\n 'detach': handleDetach,\n 'before:render': handleBeforeRender,\n 'render': handleRender\n });\n}\n\nexport default monitorViewEvents;\n","// Trigger Method\n// --------------\n\nimport _ from 'underscore';\nimport getOption from './get-option';\n\n// split the event name on the \":\"\nconst splitter = /(^|:)(\\w)/gi;\n\n// Only calc getOnMethodName once\nconst methodCache = {};\n\n// take the event section (\"section1:section2:section3\")\n// and turn it in to uppercase name onSection1Section2Section3\nfunction getEventName(match, prefix, eventName) {\n return eventName.toUpperCase();\n}\n\nconst getOnMethodName = function(event) {\n if (!methodCache[event]) {\n methodCache[event] = 'on' + event.replace(splitter, getEventName);\n }\n\n return methodCache[event];\n};\n\n// Trigger an event and/or a corresponding method name. Examples:\n//\n// `this.triggerMethod(\"foo\")` will trigger the \"foo\" event and\n// call the \"onFoo\" method.\n//\n// `this.triggerMethod(\"foo:bar\")` will trigger the \"foo:bar\" event and\n// call the \"onFooBar\" method.\nexport default function triggerMethod(event) {\n // get the method name from the event name\n const methodName = getOnMethodName(event);\n const method = getOption.call(this, methodName);\n let result;\n\n // call the onMethodName if it exists\n if (_.isFunction(method)) {\n // pass all args, except the event name\n result = method.apply(this, _.drop(arguments));\n }\n\n // trigger the event\n this.trigger.apply(this, arguments);\n\n return result;\n}\n","import triggerMethod from '../common/trigger-method';\n\nexport default {\n triggerMethod\n}\n","import _ from 'underscore';\nimport Backbone from 'backbone';\n\nimport getOption from '../common/get-option';\nimport mergeOptions from '../common/merge-options';\nimport normalizeMethods from '../common/normalize-methods';\nimport triggerMethod from '../common/trigger-method';\nimport {\n bindEvents,\n unbindEvents\n} from '../common/bind-events';\nimport {\n bindRequests,\n unbindRequests\n} from '../common/bind-requests';\n\nconst CommonMixin = {\n\n // Imports the \"normalizeMethods\" to transform hashes of\n // events=>function references/names to a hash of events=>function references\n normalizeMethods,\n\n _setOptions(options, classOptions) {\n this.options = _.extend({}, _.result(this, 'options'), options);\n this.mergeOptions(options, classOptions);\n },\n\n // A handy way to merge passed-in options onto the instance\n mergeOptions,\n\n // Enable getting options from this or this.options by name.\n getOption,\n\n // Enable binding view's events from another entity.\n bindEvents,\n\n // Enable unbinding view's events from another entity.\n unbindEvents,\n\n // Enable binding view's requests.\n bindRequests,\n\n // Enable unbinding view's requests.\n unbindRequests,\n\n triggerMethod\n};\n\n_.extend(CommonMixin, Backbone.Events);\n\nexport default CommonMixin;\n","export default {\n _isDestroyed: false,\n\n isDestroyed() {\n return this._isDestroyed;\n },\n\n destroy(options) {\n if (this._isDestroyed) { return this; }\n\n this.triggerMethod('before:destroy', this, options);\n this._isDestroyed = true;\n this.triggerMethod('destroy', this, options);\n this.stopListening();\n\n return this;\n }\n};\n","import _ from 'underscore';\nimport Radio from 'backbone.radio';\nimport MarionetteError from '../utils/error';\n\n// MixinOptions\n// - channelName\n// - radioEvents\n// - radioRequests\n\nexport default {\n\n _initRadio() {\n const channelName = _.result(this, 'channelName');\n\n if (!channelName) {\n return;\n }\n\n /* istanbul ignore next */\n if (!Radio) {\n throw new MarionetteError({\n message: 'The dependency \"backbone.radio\" is missing.',\n url: 'backbone.radio.html#marionette-integration'\n });\n }\n\n const channel = this._channel = Radio.channel(channelName);\n\n const radioEvents = _.result(this, 'radioEvents');\n this.bindEvents(channel, radioEvents);\n\n const radioRequests = _.result(this, 'radioRequests');\n this.bindRequests(channel, radioRequests);\n\n this.on('destroy', this._destroyRadio);\n },\n\n _destroyRadio() {\n this._channel.stopReplying(null, null, this);\n },\n\n getChannel() {\n return this._channel;\n }\n};\n","// Object\n// ------\n\nimport _ from 'underscore';\nimport extend from './utils/extend';\nimport CommonMixin from './mixins/common';\nimport DestroyMixin from './mixins/destroy';\nimport RadioMixin from './mixins/radio';\n\nconst ClassOptions = [\n 'channelName',\n 'radioEvents',\n 'radioRequests'\n];\n\n// Object borrows many conventions and utilities from Backbone.\nconst MarionetteObject = function(options) {\n this._setOptions(options, ClassOptions);\n this.cid = _.uniqueId(this.cidPrefix);\n this._initRadio();\n this.initialize.apply(this, arguments);\n};\n\nMarionetteObject.extend = extend;\n\n// Object Methods\n// --------------\n\n_.extend(MarionetteObject.prototype, CommonMixin, DestroyMixin, RadioMixin, {\n cidPrefix: 'mno',\n\n // This is a noop method intended to be overridden\n initialize() {}\n});\n\nexport default MarionetteObject;\n","// Implementation of the invoke method (http://underscorejs.org/#invoke) with support for\n// lodash v3, v4, and underscore.js\nimport _ from 'underscore';\n\nexport default _.invokeMap || _.invoke;\n","import _ from 'underscore';\nimport MarionetteError from '../utils/error';\nimport _invoke from '../utils/invoke';\n\n// MixinOptions\n// - behaviors\n\n// Takes care of getting the behavior class\n// given options and a key.\n// If a user passes in options.behaviorClass\n// default to using that.\n// If a user passes in a Behavior Class directly, use that\n// Otherwise an error is thrown\nfunction getBehaviorClass(options) {\n if (options.behaviorClass) {\n return { BehaviorClass: options.behaviorClass, options };\n }\n\n //treat functions as a Behavior constructor\n if (_.isFunction(options)) {\n return { BehaviorClass: options, options: {} };\n }\n\n throw new MarionetteError({\n message: 'Unable to get behavior class. A Behavior constructor should be passed directly or as behaviorClass property of options',\n url: 'marionette.behavior.html#defining-and-attaching-behaviors'\n });\n}\n\n// Iterate over the behaviors object, for each behavior\n// instantiate it and get its grouped behaviors.\n// This accepts a list of behaviors in either an object or array form\nfunction parseBehaviors(view, behaviors, allBehaviors) {\n return _.reduce(behaviors, (reducedBehaviors, behaviorDefiniton) => {\n const { BehaviorClass, options } = getBehaviorClass(behaviorDefiniton);\n const behavior = new BehaviorClass(options, view);\n reducedBehaviors.push(behavior);\n\n return parseBehaviors(view, _.result(behavior, 'behaviors'), reducedBehaviors);\n }, allBehaviors);\n}\n\nexport default {\n _initBehaviors() {\n this._behaviors = parseBehaviors(this, _.result(this, 'behaviors'), []);\n },\n\n _getBehaviorTriggers() {\n const triggers = _invoke(this._behaviors, '_getTriggers');\n return _.reduce(triggers, function(memo, _triggers) {\n return _.extend(memo, _triggers);\n }, {});\n },\n\n _getBehaviorEvents() {\n const events = _invoke(this._behaviors, '_getEvents');\n return _.reduce(events, function(memo, _events) {\n return _.extend(memo, _events);\n }, {});\n },\n\n // proxy behavior $el to the view's $el.\n _proxyBehaviorViewProperties() {\n _invoke(this._behaviors, 'proxyViewProperties');\n },\n\n // delegate modelEvents and collectionEvents\n _delegateBehaviorEntityEvents() {\n _invoke(this._behaviors, 'delegateEntityEvents');\n },\n\n // undelegate modelEvents and collectionEvents\n _undelegateBehaviorEntityEvents() {\n _invoke(this._behaviors, 'undelegateEntityEvents');\n },\n\n _destroyBehaviors(options) {\n // Call destroy on each behavior after\n // destroying the view.\n // This unbinds event listeners\n // that behaviors have registered for.\n _invoke(this._behaviors, 'destroy', options);\n },\n\n // Remove a behavior\n _removeBehavior(behavior) {\n // Don't worry about the clean up if the view is destroyed\n if (this._isDestroyed) { return; }\n\n // Remove behavior-only triggers and events\n this.undelegate(`.trig${ behavior.cid } .${ behavior.cid }`);\n\n this._behaviors = _.without(this._behaviors, behavior);\n },\n\n _bindBehaviorUIElements() {\n _invoke(this._behaviors, 'bindUIElements');\n },\n\n _unbindBehaviorUIElements() {\n _invoke(this._behaviors, 'unbindUIElements');\n },\n\n _triggerEventOnBehaviors(eventName, view, options) {\n _invoke(this._behaviors, 'triggerMethod', eventName, view, options);\n }\n};\n","import _ from 'underscore';\n\n// MixinOptions\n// - collectionEvents\n// - modelEvents\n\nexport default {\n // Handle `modelEvents`, and `collectionEvents` configuration\n _delegateEntityEvents(model, collection) {\n if (model) {\n this._modelEvents = _.result(this, 'modelEvents');\n this.bindEvents(model, this._modelEvents);\n }\n\n if (collection) {\n this._collectionEvents = _.result(this, 'collectionEvents');\n this.bindEvents(collection, this._collectionEvents);\n }\n },\n\n // Remove any previously delegate entity events\n _undelegateEntityEvents(model, collection) {\n if (this._modelEvents) {\n this.unbindEvents(model, this._modelEvents);\n delete this._modelEvents;\n }\n\n if (this._collectionEvents) {\n this.unbindEvents(collection, this._collectionEvents);\n delete this._collectionEvents;\n }\n },\n\n // Remove cached event handlers\n _deleteEntityEventHandlers() {\n delete this._modelEvents;\n delete this._collectionEvents;\n }\n};\n","import _ from 'underscore';\n\n// MixinOptions\n// - template\n// - templateContext\n\nexport default {\n\n // Internal method to render the template with the serialized data\n // and template context\n _renderTemplate(template) {\n // Add in entity data and template context\n const data = this.mixinTemplateContext(this.serializeData()) || {};\n\n // Render and add to el\n const html = this._renderHtml(template, data);\n if (typeof html !== 'undefined') {\n this.attachElContent(html);\n }\n },\n\n // Get the template for this view instance.\n // You can set a `template` attribute in the view definition\n // or pass a `template: TemplateFunction` parameter in\n // to the constructor options.\n getTemplate() {\n return this.template;\n },\n\n // Mix in template context methods. Looks for a\n // `templateContext` attribute, which can either be an\n // object literal, or a function that returns an object\n // literal. All methods and attributes from this object\n // are copies to the object passed in.\n mixinTemplateContext(serializedData) {\n const templateContext = _.result(this, 'templateContext');\n if (!templateContext) { return serializedData; }\n if (!serializedData) { return templateContext; }\n return _.extend({}, serializedData, templateContext);\n },\n\n // Serialize the view's model *or* collection, if\n // it exists, for the template\n serializeData() {\n // If we have a model, we serialize that\n if (this.model) {\n return this.serializeModel();\n }\n\n // Otherwise, we serialize the collection,\n // making it available under the `items` property\n if (this.collection) {\n return {\n items: this.serializeCollection()\n };\n }\n },\n\n // Prepares the special `model` property of a view\n // for being displayed in the template. Override this if\n // you need a custom transformation for your view's model\n serializeModel() {\n return this.model.attributes;\n },\n\n // Serialize a collection\n serializeCollection() {\n return _.map(this.collection.models, model => model.attributes);\n },\n\n // Renders the data into the template\n _renderHtml(template, data) {\n return template(data);\n },\n\n // Attaches the content of a given view.\n // This method can be overridden to optimize rendering,\n // or to render in a non standard way.\n //\n // For example, using `innerHTML` instead of `$el.html`\n //\n // ```js\n // attachElContent(html) {\n // this.el.innerHTML = html;\n // }\n // ```\n attachElContent(html) {\n this.Dom.setContents(this.el, html, this.$el);\n }\n};\n","// Borrow event splitter from Backbone\nconst delegateEventSplitter = /^(\\S+)\\s*(.*)$/;\n\n// Set event name to be namespaced using a unique index\n// to generate a non colliding event namespace\n// http://api.jquery.com/event.namespace/\nconst getNamespacedEventName = function(eventName, namespace) {\n const match = eventName.match(delegateEventSplitter);\n return `${ match[1] }.${ namespace } ${ match[2] }`;\n};\n\nexport default getNamespacedEventName;\n","// Add Feature flags here\n// e.g. 'class' => false\nconst FEATURES = {\n childViewEventPrefix: false,\n triggersStopPropagation: true,\n triggersPreventDefault: true,\n DEV_MODE: false\n};\n\nfunction isEnabled(name) {\n return !!FEATURES[name];\n}\n\nfunction setEnabled(name, state) {\n return FEATURES[name] = state;\n}\n\nexport {\n FEATURES,\n setEnabled,\n isEnabled\n};\n","import _ from 'underscore';\nimport getNamespacedEventName from '../utils/get-namespaced-event-name';\nimport { isEnabled } from '../config/features';\n\n// Internal method to create an event handler for a given `triggerDef` like\n// 'click:foo'\nfunction buildViewTrigger(view, triggerDef) {\n if (_.isString(triggerDef)) {\n triggerDef = {event: triggerDef};\n }\n\n const eventName = triggerDef.event;\n\n let shouldPreventDefault = !!triggerDef.preventDefault;\n\n if (isEnabled('triggersPreventDefault')) {\n shouldPreventDefault = triggerDef.preventDefault !== false;\n }\n\n let shouldStopPropagation = !!triggerDef.stopPropagation;\n\n if (isEnabled('triggersStopPropagation')) {\n shouldStopPropagation = triggerDef.stopPropagation !== false;\n }\n\n return function(event, ...args) {\n if (shouldPreventDefault) {\n event.preventDefault();\n }\n\n if (shouldStopPropagation) {\n event.stopPropagation();\n }\n\n view.triggerMethod(eventName, view, event, ...args);\n };\n}\n\nexport default {\n\n // Configure `triggers` to forward DOM events to view\n // events. `triggers: {\"click .foo\": \"do:foo\"}`\n _getViewTriggers(view, triggers) {\n // Configure the triggers, prevent default\n // action and stop propagation of DOM events\n return _.reduce(triggers, (events, value, key) => {\n key = getNamespacedEventName(key, `trig${ this.cid }`);\n events[key] = buildViewTrigger(view, value);\n return events;\n }, {});\n }\n\n};\n","import _ from 'underscore';\n// allows for the use of the @ui. syntax within\n// a given key for triggers and events\n// swaps the @ui with the associated selector.\n// Returns a new, non-mutated, parsed events hash.\nconst normalizeUIKeys = function(hash, ui) {\n return _.reduce(hash, (memo, val, key) => {\n const normalizedKey = normalizeUIString(key, ui);\n memo[normalizedKey] = val;\n return memo;\n }, {});\n};\n\nconst uiRegEx = /@ui\\.[a-zA-Z-_$0-9]*/g;\n\n// utility method for parsing @ui. syntax strings\n// into associated selector\nconst normalizeUIString = function(uiString, ui) {\n return uiString.replace(uiRegEx, (r) => {\n return ui[r.slice(4)];\n });\n};\n\n// allows for the use of the @ui. syntax within\n// a given value for regions\n// swaps the @ui with the associated selector\nconst normalizeUIValues = function(hash, ui, property) {\n _.each(hash, (val, key) => {\n if (_.isString(val)) {\n hash[key] = normalizeUIString(val, ui);\n } else if (val) {\n const propertyVal = val[property];\n if (_.isString(propertyVal)) {\n val[property] = normalizeUIString(propertyVal, ui);\n }\n }\n });\n return hash;\n};\n\nexport default {\n\n // normalize the keys of passed hash with the views `ui` selectors.\n // `{\"@ui.foo\": \"bar\"}`\n normalizeUIKeys(hash) {\n const uiBindings = this._getUIBindings();\n return normalizeUIKeys(hash, uiBindings);\n },\n\n // normalize the passed string with the views `ui` selectors.\n // `\"@ui.bar\"`\n normalizeUIString(uiString) {\n const uiBindings = this._getUIBindings();\n return normalizeUIString(uiString, uiBindings);\n },\n\n // normalize the values of passed hash with the views `ui` selectors.\n // `{foo: \"@ui.bar\"}`\n normalizeUIValues(hash, property) {\n const uiBindings = this._getUIBindings();\n return normalizeUIValues(hash, uiBindings, property);\n },\n\n _getUIBindings() {\n const uiBindings = _.result(this, '_uiBindings');\n return uiBindings || _.result(this, 'ui');\n },\n\n // This method binds the elements specified in the \"ui\" hash inside the view's code with\n // the associated jQuery selectors.\n _bindUIElements() {\n if (!this.ui) { return; }\n\n // store the ui hash in _uiBindings so they can be reset later\n // and so re-rendering the view will be able to find the bindings\n if (!this._uiBindings) {\n this._uiBindings = this.ui;\n }\n\n // get the bindings result, as a function or otherwise\n const bindings = _.result(this, '_uiBindings');\n\n // empty the ui so we don't have anything to start with\n this._ui = {};\n\n // bind each of the selectors\n _.each(bindings, (selector, key) => {\n this._ui[key] = this.$(selector);\n });\n\n this.ui = this._ui;\n },\n\n _unbindUIElements() {\n if (!this.ui || !this._uiBindings) { return; }\n\n // delete all of the existing ui bindings\n _.each(this.ui, ($el, name) => {\n delete this.ui[name];\n });\n\n // reset the ui element to the original bindings configuration\n this.ui = this._uiBindings;\n delete this._uiBindings;\n delete this._ui;\n },\n\n _getUI(name) {\n return this._ui[name];\n }\n};\n","// DomApi\n// ---------\nimport _ from 'underscore';\nimport Backbone from 'backbone';\n\n// Performant method for returning the jQuery instance\nfunction getEl(el) {\n return el instanceof Backbone.$ ? el : Backbone.$(el);\n}\n\n// Static setter\nexport function setDomApi(mixin) {\n this.prototype.Dom = _.extend({}, this.prototype.Dom, mixin);\n return this;\n}\n\nexport default {\n\n // Returns a new HTML DOM node instance\n createBuffer() {\n return document.createDocumentFragment();\n },\n\n // Returns the document element for a given DOM element\n getDocumentEl(el) {\n return el.ownerDocument.documentElement;\n },\n\n // Lookup the `selector` string\n // Selector may also be a DOM element\n // Returns an array-like object of nodes\n getEl(selector) {\n return getEl(selector);\n },\n\n // Finds the `selector` string with the el\n // Returns an array-like object of nodes\n findEl(el, selector) {\n return getEl(el).find(selector);\n },\n\n // Returns true if the el contains the node childEl\n hasEl(el, childEl) {\n return el.contains(childEl && childEl.parentNode);\n },\n\n // Detach `el` from the DOM without removing listeners\n detachEl(el, _$el = getEl(el)) {\n _$el.detach();\n },\n\n // Remove `oldEl` from the DOM and put `newEl` in its place\n replaceEl(newEl, oldEl) {\n if (newEl === oldEl) {\n return;\n }\n\n const parent = oldEl.parentNode;\n\n if (!parent) {\n return;\n }\n\n parent.replaceChild(newEl, oldEl);\n },\n\n // Swaps the location of `el1` and `el2` in the DOM\n swapEl(el1, el2) {\n if (el1 === el2) {\n return;\n }\n\n const parent1 = el1.parentNode;\n const parent2 = el2.parentNode;\n\n if (!parent1 || !parent2) {\n return;\n }\n\n const next1 = el1.nextSibling;\n const next2 = el2.nextSibling;\n\n parent1.insertBefore(el2, next1);\n parent2.insertBefore(el1, next2);\n },\n\n // Replace the contents of `el` with the HTML string of `html`\n setContents(el, html, _$el = getEl(el)) {\n _$el.html(html);\n },\n\n // Takes the DOM node `el` and appends the DOM node `contents`\n // to the end of the element's contents.\n appendContents(el, contents, {_$el = getEl(el), _$contents = getEl(contents)} = {}) {\n _$el.append(_$contents);\n },\n\n // Does the el have child nodes\n hasContents(el) {\n return !!el && el.hasChildNodes();\n },\n\n // Remove the inner contents of `el` from the DOM while leaving\n // `el` itself in the DOM.\n detachContents(el, _$el = getEl(el)) {\n _$el.contents().detach();\n }\n};\n","// ViewMixin\n// ---------\n\nimport Backbone from 'backbone';\nimport _ from 'underscore';\nimport BehaviorsMixin from './behaviors';\nimport CommonMixin from './common';\nimport DelegateEntityEventsMixin from './delegate-entity-events';\nimport TemplateRenderMixin from './template-render';\nimport TriggersMixin from './triggers';\nimport UIMixin from './ui';\nimport { isEnabled } from '../config/features';\nimport DomApi from '../config/dom';\n\n// MixinOptions\n// - behaviors\n// - childViewEventPrefix\n// - childViewEvents\n// - childViewTriggers\n// - collectionEvents\n// - modelEvents\n// - triggers\n// - ui\n\n\nconst ViewMixin = {\n Dom: DomApi,\n\n _isElAttached() {\n return !!this.el && this.Dom.hasEl(this.Dom.getDocumentEl(this.el), this.el);\n },\n\n supportsRenderLifecycle: true,\n supportsDestroyLifecycle: true,\n\n _isDestroyed: false,\n\n isDestroyed() {\n return !!this._isDestroyed;\n },\n\n _isRendered: false,\n\n isRendered() {\n return !!this._isRendered;\n },\n\n _isAttached: false,\n\n isAttached() {\n return !!this._isAttached;\n },\n\n // Overriding Backbone.View's `delegateEvents` to handle\n // `events` and `triggers`\n delegateEvents(events) {\n this._proxyBehaviorViewProperties();\n this._buildEventProxies();\n\n const combinedEvents = _.extend({},\n this._getBehaviorEvents(),\n this._getEvents(events),\n this._getBehaviorTriggers(),\n this._getTriggers()\n );\n\n Backbone.View.prototype.delegateEvents.call(this, combinedEvents);\n\n return this;\n },\n\n // Allows Backbone.View events to utilize `@ui.` selectors\n _getEvents(events) {\n if (events) {\n return this.normalizeUIKeys(events);\n }\n\n if (!this.events) { return; }\n\n return this.normalizeUIKeys(_.result(this, 'events'));\n },\n\n // Configure `triggers` to forward DOM events to view\n // events. `triggers: {\"click .foo\": \"do:foo\"}`\n _getTriggers() {\n if (!this.triggers) { return; }\n\n // Allow `triggers` to be configured as a function\n const triggers = this.normalizeUIKeys(_.result(this, 'triggers'));\n\n // Configure the triggers, prevent default\n // action and stop propagation of DOM events\n return this._getViewTriggers(this, triggers);\n },\n\n // Handle `modelEvents`, and `collectionEvents` configuration\n delegateEntityEvents() {\n this._delegateEntityEvents(this.model, this.collection);\n\n // bind each behaviors model and collection events\n this._delegateBehaviorEntityEvents();\n\n return this;\n },\n\n // Handle unbinding `modelEvents`, and `collectionEvents` configuration\n undelegateEntityEvents() {\n this._undelegateEntityEvents(this.model, this.collection);\n\n // unbind each behaviors model and collection events\n this._undelegateBehaviorEntityEvents();\n\n return this;\n },\n\n // Handle destroying the view and its children.\n destroy(options) {\n if (this._isDestroyed || this._isDestroying) { return this; }\n this._isDestroying = true;\n const shouldTriggerDetach = this._isAttached && !this._disableDetachEvents;\n\n this.triggerMethod('before:destroy', this, options);\n if (shouldTriggerDetach) {\n this.triggerMethod('before:detach', this);\n }\n\n // unbind UI elements\n this.unbindUIElements();\n\n // remove the view from the DOM\n this._removeElement();\n\n if (shouldTriggerDetach) {\n this._isAttached = false;\n this.triggerMethod('detach', this);\n }\n\n // remove children after the remove to prevent extra paints\n this._removeChildren();\n\n this._isDestroyed = true;\n this._isRendered = false;\n\n // Destroy behaviors after _isDestroyed flag\n this._destroyBehaviors(options);\n\n this._deleteEntityEventHandlers();\n\n this.triggerMethod('destroy', this, options);\n this._triggerEventOnBehaviors('destroy', this, options);\n\n this.stopListening();\n\n return this;\n },\n\n // Equates to this.$el.remove\n _removeElement() {\n this.$el.off().removeData();\n this.Dom.detachEl(this.el, this.$el);\n },\n\n // This method binds the elements specified in the \"ui\" hash\n bindUIElements() {\n this._bindUIElements();\n this._bindBehaviorUIElements();\n\n return this;\n },\n\n // This method unbinds the elements specified in the \"ui\" hash\n unbindUIElements() {\n this._unbindUIElements();\n this._unbindBehaviorUIElements();\n\n return this;\n },\n\n getUI(name) {\n return this._getUI(name);\n },\n\n // Cache `childViewEvents` and `childViewTriggers`\n _buildEventProxies() {\n this._childViewEvents = this.normalizeMethods(_.result(this, 'childViewEvents'));\n this._childViewTriggers = _.result(this, 'childViewTriggers');\n this._eventPrefix = this._getEventPrefix();\n },\n\n _getEventPrefix() {\n const defaultPrefix = isEnabled('childViewEventPrefix') ? 'childview' : false;\n const prefix = _.result(this, 'childViewEventPrefix', defaultPrefix);\n\n return (prefix === false) ? prefix : prefix + ':';\n },\n\n _proxyChildViewEvents(view) {\n if (this._childViewEvents || this._childViewTriggers || this._eventPrefix) {\n this.listenTo(view, 'all', this._childViewEventHandler);\n }\n },\n\n _childViewEventHandler(eventName, ...args) {\n const childViewEvents = this._childViewEvents;\n\n // call collectionView childViewEvent if defined\n if (childViewEvents && childViewEvents[eventName]) {\n childViewEvents[eventName].apply(this, args);\n }\n\n // use the parent view's proxyEvent handlers\n const childViewTriggers = this._childViewTriggers;\n\n // Call the event with the proxy name on the parent layout\n if (childViewTriggers && childViewTriggers[eventName]) {\n this.triggerMethod(childViewTriggers[eventName], ...args);\n }\n\n if (this._eventPrefix) {\n this.triggerMethod(this._eventPrefix + eventName, ...args);\n }\n }\n};\n\n_.extend(ViewMixin, BehaviorsMixin, CommonMixin, DelegateEntityEventsMixin, TemplateRenderMixin, TriggersMixin, UIMixin);\n\nexport default ViewMixin;\n","export function renderView(view) {\n if (view._isRendered) {\n return;\n }\n\n if (!view.supportsRenderLifecycle) {\n view.triggerMethod('before:render', view);\n }\n\n view.render();\n view._isRendered = true;\n\n if (!view.supportsRenderLifecycle) {\n view.triggerMethod('render', view);\n }\n}\n\nexport function destroyView(view, disableDetachEvents) {\n if (view.destroy) {\n // Attach flag for public destroy function internal check\n view._disableDetachEvents = disableDetachEvents;\n view.destroy();\n return;\n }\n\n // Destroy for non-Marionette Views\n if (!view.supportsDestroyLifecycle) {\n view.triggerMethod('before:destroy', view);\n }\n\n const shouldTriggerDetach = view._isAttached && !disableDetachEvents;\n\n if (shouldTriggerDetach) {\n view.triggerMethod('before:detach', view);\n }\n\n view.remove();\n\n if (shouldTriggerDetach) {\n view._isAttached = false;\n view.triggerMethod('detach', view);\n }\n\n view._isDestroyed = true;\n\n if (!view.supportsDestroyLifecycle) {\n view.triggerMethod('destroy', view);\n }\n}\n","// Region\n// ------\n\nimport _ from 'underscore';\nimport Backbone from 'backbone';\nimport MarionetteError from './utils/error';\nimport extend from './utils/extend';\nimport monitorViewEvents from './common/monitor-view-events';\nimport { renderView, destroyView } from './common/view';\nimport CommonMixin from './mixins/common';\nimport View from './view';\nimport DomApi, { setDomApi } from './config/dom';\n\nconst classErrorName = 'RegionError';\n\nconst ClassOptions = [\n 'allowMissingEl',\n 'parentEl',\n 'replaceElement'\n];\n\nconst Region = function(options) {\n this._setOptions(options, ClassOptions);\n\n this.cid = _.uniqueId(this.cidPrefix);\n\n // getOption necessary because options.el may be passed as undefined\n this._initEl = this.el = this.getOption('el');\n\n // Handle when this.el is passed in as a $ wrapped element.\n this.el = this.el instanceof Backbone.$ ? this.el[0] : this.el;\n\n this.$el = this._getEl(this.el);\n\n this.initialize.apply(this, arguments);\n};\n\nRegion.extend = extend;\nRegion.setDomApi = setDomApi;\n\n// Region Methods\n// --------------\n\n_.extend(Region.prototype, CommonMixin, {\n Dom: DomApi,\n\n cidPrefix: 'mnr',\n replaceElement: false,\n _isReplaced: false,\n _isSwappingView: false,\n\n // This is a noop method intended to be overridden\n initialize() {},\n\n // Displays a view instance inside of the region. If necessary handles calling the `render`\n // method for you. Reads content directly from the `el` attribute.\n show(view, options) {\n if (!this._ensureElement(options)) {\n return;\n }\n\n view = this._getView(view, options);\n\n if (view === this.currentView) { return this; }\n\n if (view._isShown) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'View is already shown in a Region or CollectionView',\n url: 'marionette.region.html#showing-a-view'\n });\n }\n\n this._isSwappingView = !!this.currentView;\n\n this.triggerMethod('before:show', this, view, options);\n\n // Assume an attached view is already in the region for pre-existing DOM\n if (this.currentView || !view._isAttached) {\n this.empty(options);\n }\n\n this._setupChildView(view);\n\n this.currentView = view;\n\n renderView(view);\n\n this._attachView(view, options);\n\n this.triggerMethod('show', this, view, options);\n\n this._isSwappingView = false;\n\n return this;\n },\n\n _getEl(el) {\n if (!el) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'An \"el\" must be specified for a region.',\n url: 'marionette.region.html#additional-options'\n });\n }\n\n return this.getEl(el);\n },\n\n _setEl() {\n this.$el = this._getEl(this.el);\n\n if (this.$el.length) {\n this.el = this.$el[0];\n }\n\n // Make sure the $el contains only the el\n if (this.$el.length > 1) {\n this.$el = this.Dom.getEl(this.el);\n }\n },\n\n // Set the `el` of the region and move any current view to the new `el`.\n _setElement(el) {\n if (el === this.el) { return this; }\n\n const shouldReplace = this._isReplaced;\n\n this._restoreEl();\n\n this.el = el;\n\n this._setEl();\n\n if (this.currentView) {\n const view = this.currentView;\n\n if (shouldReplace) {\n this._replaceEl(view);\n } else {\n this.attachHtml(view);\n }\n }\n\n return this;\n },\n\n _setupChildView(view) {\n monitorViewEvents(view);\n\n this._proxyChildViewEvents(view);\n\n // We need to listen for if a view is destroyed in a way other than through the region.\n // If this happens we need to remove the reference to the currentView since once a view\n // has been destroyed we can not reuse it.\n view.on('destroy', this._empty, this);\n },\n\n _proxyChildViewEvents(view) {\n const parentView = this._parentView;\n\n if (!parentView) { return; }\n\n parentView._proxyChildViewEvents(view);\n },\n\n // If the regions parent view is not monitoring its attach/detach events\n _shouldDisableMonitoring() {\n return this._parentView && this._parentView.monitorViewEvents === false;\n },\n\n _isElAttached() {\n return this.Dom.hasEl(this.Dom.getDocumentEl(this.el), this.el);\n },\n\n _attachView(view, { replaceElement } = {}) {\n const shouldTriggerAttach = !view._isAttached && this._isElAttached() && !this._shouldDisableMonitoring();\n const shouldReplaceEl = typeof replaceElement === 'undefined' ? !!_.result(this, 'replaceElement') : !!replaceElement;\n\n if (shouldTriggerAttach) {\n view.triggerMethod('before:attach', view);\n }\n\n if (shouldReplaceEl) {\n this._replaceEl(view);\n } else {\n this.attachHtml(view);\n }\n\n if (shouldTriggerAttach) {\n view._isAttached = true;\n view.triggerMethod('attach', view);\n }\n\n // Corresponds that view is shown in a marionette Region or CollectionView\n view._isShown = true;\n },\n\n _ensureElement(options = {}) {\n if (!_.isObject(this.el)) {\n this._setEl();\n }\n\n if (!this.$el || this.$el.length === 0) {\n const allowMissingEl = typeof options.allowMissingEl === 'undefined' ? !!_.result(this, 'allowMissingEl') : !!options.allowMissingEl;\n\n if (allowMissingEl) {\n return false;\n } else {\n throw new MarionetteError({\n name: classErrorName,\n message: `An \"el\" must exist in DOM for this region ${this.cid}`,\n url: 'marionette.region.html#additional-options'\n });\n }\n }\n return true;\n },\n\n _getView(view) {\n if (!view) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'The view passed is undefined and therefore invalid. You must pass a view instance to show.',\n url: 'marionette.region.html#showing-a-view'\n });\n }\n\n if (view._isDestroyed) {\n throw new MarionetteError({\n name: classErrorName,\n message: `View (cid: \"${view.cid}\") has already been destroyed and cannot be used.`,\n url: 'marionette.region.html#showing-a-view'\n });\n }\n\n if (view instanceof Backbone.View) {\n return view;\n }\n\n const viewOptions = this._getViewOptions(view);\n\n return new View(viewOptions);\n },\n\n // This allows for a template or a static string to be\n // used as a template\n _getViewOptions(viewOptions) {\n if (_.isFunction(viewOptions)) {\n return { template: viewOptions };\n }\n\n if (_.isObject(viewOptions)) {\n return viewOptions;\n }\n\n const template = function() { return viewOptions; };\n\n return { template };\n },\n\n // Override this method to change how the region finds the DOM element that it manages. Return\n // a jQuery selector object scoped to a provided parent el or the document if none exists.\n getEl(el) {\n const context = _.result(this, 'parentEl');\n\n if (context && _.isString(el)) {\n return this.Dom.findEl(context, el);\n }\n\n return this.Dom.getEl(el);\n },\n\n _replaceEl(view) {\n // Always restore the el to ensure the regions el is present before replacing\n this._restoreEl();\n\n view.on('before:destroy', this._restoreEl, this);\n\n this.Dom.replaceEl(view.el, this.el);\n\n this._isReplaced = true;\n },\n\n // Restore the region's element in the DOM.\n _restoreEl() {\n // There is nothing to replace\n if (!this._isReplaced) {\n return;\n }\n\n const view = this.currentView;\n\n if (!view) {\n return;\n }\n\n this._detachView(view);\n\n this._isReplaced = false;\n },\n\n // Check to see if the region's el was replaced.\n isReplaced() {\n return !!this._isReplaced;\n },\n\n // Check to see if a view is being swapped by another\n isSwappingView() {\n return !!this._isSwappingView;\n },\n\n // Override this method to change how the new view is appended to the `$el` that the\n // region is managing\n attachHtml(view) {\n this.Dom.appendContents(this.el, view.el, {_$el: this.$el, _$contents: view.$el});\n },\n\n // Destroy the current view, if there is one. If there is no current view,\n // it will detach any html inside the region's `el`.\n empty(options = { allowMissingEl: true }) {\n const view = this.currentView;\n\n // If there is no view in the region we should only detach current html\n if (!view) {\n if (this._ensureElement(options)) {\n this.detachHtml();\n }\n return this;\n }\n\n this._empty(view, true);\n return this;\n },\n\n _empty(view, shouldDestroy) {\n view.off('destroy', this._empty, this);\n this.triggerMethod('before:empty', this, view);\n\n this._restoreEl();\n\n delete this.currentView;\n\n if (!view._isDestroyed) {\n if (shouldDestroy) {\n this.removeView(view);\n } else {\n this._detachView(view);\n }\n view._isShown = false;\n this._stopChildViewEvents(view);\n }\n\n this.triggerMethod('empty', this, view);\n },\n\n _stopChildViewEvents(view) {\n const parentView = this._parentView;\n\n if (!parentView) { return; }\n\n this._parentView.stopListening(view);\n },\n\n // Non-Marionette safe view.destroy\n destroyView(view) {\n if (view._isDestroyed) {\n return view;\n }\n\n destroyView(view, this._shouldDisableMonitoring());\n return view;\n },\n\n // Override this method to determine what happens when the view\n // is removed from the region when the view is not being detached\n removeView(view) {\n this.destroyView(view);\n },\n\n // Empties the Region without destroying the view\n // Returns the detached view\n detachView() {\n const view = this.currentView;\n\n if (!view) {\n return;\n }\n\n this._empty(view);\n\n return view;\n },\n\n _detachView(view) {\n const shouldTriggerDetach = view._isAttached && !this._shouldDisableMonitoring();\n const shouldRestoreEl = this._isReplaced;\n if (shouldTriggerDetach) {\n view.triggerMethod('before:detach', view);\n }\n\n if (shouldRestoreEl) {\n this.Dom.replaceEl(this.el, view.el);\n } else {\n this.detachHtml();\n }\n\n if (shouldTriggerDetach) {\n view._isAttached = false;\n view.triggerMethod('detach', view);\n }\n },\n\n // Override this method to change how the region detaches current content\n detachHtml() {\n this.Dom.detachContents(this.el, this.$el);\n },\n\n // Checks whether a view is currently present within the region. Returns `true` if there is\n // and `false` if no view is present.\n hasView() {\n return !!this.currentView;\n },\n\n // Reset the region by destroying any existing view and clearing out the cached `$el`.\n // The next time a view is shown via this region, the region will re-query the DOM for\n // the region's `el`.\n reset(options) {\n this.empty(options);\n\n this.el = this._initEl;\n\n delete this.$el;\n return this;\n },\n\n _isDestroyed: false,\n\n isDestroyed() {\n return this._isDestroyed;\n },\n\n // Destroy the region, remove any child view\n // and remove the region from any associated view\n destroy(options) {\n if (this._isDestroyed) { return this; }\n\n this.triggerMethod('before:destroy', this, options);\n this._isDestroyed = true;\n\n this.reset(options);\n\n if (this._name) {\n this._parentView._removeReferences(this._name);\n }\n delete this._parentView;\n delete this._name;\n\n this.triggerMethod('destroy', this, options);\n this.stopListening();\n\n return this;\n }\n});\n\nexport default Region;\n","import _ from 'underscore';\nimport MarionetteError from '../utils/error';\nimport Region from '../region';\n\n// return the region instance from the definition\nexport default function(definition, defaults) {\n if (definition instanceof Region) {\n return definition;\n }\n\n if (_.isString(definition)) {\n return buildRegionFromObject(defaults, { el: definition });\n }\n\n if (_.isFunction(definition)) {\n return buildRegionFromObject(defaults, { regionClass: definition });\n }\n\n if (_.isObject(definition)) {\n return buildRegionFromObject(defaults, definition);\n }\n\n throw new MarionetteError({\n message: 'Improper region configuration type.',\n url: 'marionette.region.html#defining-regions'\n });\n}\n\nfunction buildRegionFromObject(defaults, definition) {\n const options = _.extend({}, defaults, definition);\n\n const RegionClass = options.regionClass\n\n delete options.regionClass;\n\n return new RegionClass(options);\n}\n","import _ from 'underscore';\nimport _invoke from '../utils/invoke';\nimport buildRegion from '../common/build-region';\nimport Region from '../region';\n\n// MixinOptions\n// - regions\n// - regionClass\n\nexport default {\n regionClass: Region,\n\n // Internal method to initialize the regions that have been defined in a\n // `regions` attribute on this View.\n _initRegions() {\n\n // init regions hash\n this.regions = this.regions || {};\n this._regions = {};\n\n this.addRegions(_.result(this, 'regions'));\n },\n\n // Internal method to re-initialize all of the regions by updating\n // the `el` that they point to\n _reInitRegions() {\n _invoke(this._regions, 'reset');\n },\n\n // Add a single region, by name, to the View\n addRegion(name, definition) {\n const regions = {};\n regions[name] = definition;\n return this.addRegions(regions)[name];\n },\n\n // Add multiple regions as a {name: definition, name2: def2} object literal\n addRegions(regions) {\n // If there's nothing to add, stop here.\n if (_.isEmpty(regions)) {\n return;\n }\n\n // Normalize region selectors hash to allow\n // a user to use the @ui. syntax.\n regions = this.normalizeUIValues(regions, 'el');\n\n // Add the regions definitions to the regions property\n this.regions = _.extend({}, this.regions, regions);\n\n return this._addRegions(regions);\n },\n\n // internal method to build and add regions\n _addRegions(regionDefinitions) {\n const defaults = {\n regionClass: this.regionClass,\n parentEl: _.partial(_.result, this, 'el')\n };\n\n return _.reduce(regionDefinitions, (regions, definition, name) => {\n regions[name] = buildRegion(definition, defaults);\n this._addRegion(regions[name], name);\n return regions;\n }, {});\n },\n\n _addRegion(region, name) {\n this.triggerMethod('before:add:region', this, name, region);\n\n region._parentView = this;\n region._name = name;\n\n this._regions[name] = region;\n\n this.triggerMethod('add:region', this, name, region);\n },\n\n // Remove a single region from the View, by name\n removeRegion(name) {\n const region = this._regions[name];\n\n this._removeRegion(region, name);\n\n return region;\n },\n\n // Remove all regions from the View\n removeRegions() {\n const regions = this._getRegions();\n\n _.each(this._regions, this._removeRegion.bind(this));\n\n return regions;\n },\n\n _removeRegion(region, name) {\n this.triggerMethod('before:remove:region', this, name, region);\n\n region.destroy();\n\n this.triggerMethod('remove:region', this, name, region);\n },\n\n // Called in a region's destroy\n _removeReferences(name) {\n delete this.regions[name];\n delete this._regions[name];\n },\n\n // Empty all regions in the region manager, but\n // leave them attached\n emptyRegions() {\n const regions = this.getRegions();\n _invoke(regions, 'empty');\n return regions;\n },\n\n // Checks to see if view contains region\n // Accepts the region name\n // hasRegion('main')\n hasRegion(name) {\n return !!this.getRegion(name);\n },\n\n // Provides access to regions\n // Accepts the region name\n // getRegion('main')\n getRegion(name) {\n if (!this._isRendered) {\n this.render();\n }\n return this._regions[name];\n },\n\n _getRegions() {\n return _.clone(this._regions);\n },\n\n // Get all regions\n getRegions() {\n if (!this._isRendered) {\n this.render();\n }\n return this._getRegions();\n },\n\n showChildView(name, view, options) {\n const region = this.getRegion(name);\n region.show(view, options);\n return view;\n },\n\n detachChildView(name) {\n return this.getRegion(name).detachView();\n },\n\n getChildView(name) {\n return this.getRegion(name).currentView;\n }\n\n};\n","// Static setter for the renderer\nexport function setRenderer(renderer) {\n this.prototype._renderHtml = renderer;\n return this;\n}\n","// View\n// ---------\n\nimport _ from 'underscore';\nimport Backbone from 'backbone';\nimport monitorViewEvents from './common/monitor-view-events';\nimport ViewMixin from './mixins/view';\nimport RegionsMixin from './mixins/regions';\nimport { setDomApi } from './config/dom';\nimport { setRenderer } from './config/renderer';\n\nconst ClassOptions = [\n 'behaviors',\n 'childViewEventPrefix',\n 'childViewEvents',\n 'childViewTriggers',\n 'collectionEvents',\n 'events',\n 'modelEvents',\n 'regionClass',\n 'regions',\n 'template',\n 'templateContext',\n 'triggers',\n 'ui'\n];\n\n// Used by _getImmediateChildren\nfunction childReducer(children, region) {\n if (region.currentView) {\n children.push(region.currentView);\n }\n\n return children;\n}\n\n// The standard view. Includes view events, automatic rendering\n// templates, nested views, and more.\nconst View = Backbone.View.extend({\n\n constructor(options) {\n this._setOptions(options, ClassOptions);\n\n monitorViewEvents(this);\n\n this._initBehaviors();\n this._initRegions();\n\n Backbone.View.prototype.constructor.apply(this, arguments);\n\n this.delegateEntityEvents();\n\n this._triggerEventOnBehaviors('initialize', this, options);\n },\n\n // Overriding Backbone.View's `setElement` to handle\n // if an el was previously defined. If so, the view might be\n // rendered or attached on setElement.\n setElement() {\n Backbone.View.prototype.setElement.apply(this, arguments);\n\n this._isRendered = this.Dom.hasContents(this.el);\n this._isAttached = this._isElAttached();\n\n if (this._isRendered) {\n this.bindUIElements();\n }\n\n return this;\n },\n\n // If a template is available, renders it into the view's `el`\n // Re-inits regions and binds UI.\n render() {\n const template = this.getTemplate();\n\n if (template === false || this._isDestroyed) { return this; }\n\n this.triggerMethod('before:render', this);\n\n // If this is not the first render call, then we need to\n // re-initialize the `el` for each region\n if (this._isRendered) {\n this._reInitRegions();\n }\n\n this._renderTemplate(template);\n this.bindUIElements();\n\n this._isRendered = true;\n this.triggerMethod('render', this);\n\n return this;\n },\n\n // called by ViewMixin destroy\n _removeChildren() {\n this.removeRegions();\n },\n\n _getImmediateChildren() {\n return _.reduce(this._regions, childReducer, []);\n }\n}, {\n setRenderer,\n setDomApi\n});\n\n_.extend(View.prototype, ViewMixin, RegionsMixin);\n\nexport default View;\n","import _ from 'underscore';\n\n// Provide a container to store, retrieve and\n// shut down child views.\nconst Container = function() {\n this._init();\n};\n\n// Mix in methods from Underscore, for iteration, and other\n// collection related features.\n// Borrowing this code from Backbone.Collection:\n// https://github.com/jashkenas/backbone/blob/1.1.2/backbone.js#L962\nconst methods = ['forEach', 'each', 'map', 'find', 'detect', 'filter',\n 'select', 'reject', 'every', 'all', 'some', 'any', 'include',\n 'contains', 'invoke', 'toArray', 'first', 'initial', 'rest',\n 'last', 'without', 'isEmpty', 'pluck', 'reduce', 'partition'];\n\n_.each(methods, function(method) {\n Container.prototype[method] = function(...args) {\n return _[method].apply(_, [this._views].concat(args));\n };\n});\n\nfunction stringComparator(comparator, view) {\n return view.model && view.model.get(comparator);\n}\n\n// Container Methods\n// -----------------\n\n_.extend(Container.prototype, {\n\n // Initializes an empty container\n _init() {\n this._views = [];\n this._viewsByCid = {};\n this._indexByModel = {};\n this._updateLength();\n },\n\n // Add a view to this container. Stores the view\n // by `cid` and makes it searchable by the model\n // cid (and model itself). Additionally it stores\n // the view by index in the _views array\n _add(view, index = this._views.length) {\n this._addViewIndexes(view);\n\n // add to end by default\n this._views.splice(index, 0, view);\n\n this._updateLength();\n },\n\n _addViewIndexes(view) {\n // store the view\n this._viewsByCid[view.cid] = view;\n\n // index it by model\n if (view.model) {\n this._indexByModel[view.model.cid] = view;\n }\n },\n\n // Sort (mutate) and return the array of the child views.\n _sort(comparator, context) {\n if (typeof comparator === 'string') {\n comparator = _.partial(stringComparator, comparator);\n return this._sortBy(comparator);\n }\n\n if (comparator.length === 1) {\n return this._sortBy(comparator.bind(context));\n }\n\n return this._views.sort(comparator.bind(context));\n },\n\n // Makes `_.sortBy` mutate the array to match `this._views.sort`\n _sortBy(comparator) {\n const sortedViews = _.sortBy(this._views, comparator);\n\n this._set(sortedViews);\n\n return sortedViews;\n },\n\n // Replace array contents without overwriting the reference.\n // Should not add/remove views\n _set(views, shouldReset) {\n this._views.length = 0;\n\n this._views.push.apply(this._views, views.slice(0));\n\n if (shouldReset) {\n this._viewsByCid = {};\n this._indexByModel = {};\n\n _.each(views, this._addViewIndexes.bind(this));\n\n this._updateLength();\n }\n },\n\n // Swap views by index\n _swap(view1, view2) {\n const view1Index = this.findIndexByView(view1);\n const view2Index = this.findIndexByView(view2);\n\n if (view1Index === -1 || view2Index === -1) {\n return;\n }\n\n const swapView = this._views[view1Index];\n this._views[view1Index] = this._views[view2Index];\n this._views[view2Index] = swapView;\n },\n\n // Find a view by the model that was attached to it.\n // Uses the model's `cid` to find it.\n findByModel(model) {\n return this.findByModelCid(model.cid);\n },\n\n // Find a view by the `cid` of the model that was attached to it.\n findByModelCid(modelCid) {\n return this._indexByModel[modelCid];\n },\n\n // Find a view by index.\n findByIndex(index) {\n return this._views[index];\n },\n\n // Find the index of a view instance\n findIndexByView(view) {\n return this._views.indexOf(view);\n },\n\n // Retrieve a view by its `cid` directly\n findByCid(cid) {\n return this._viewsByCid[cid];\n },\n\n hasView(view) {\n return !!this.findByCid(view.cid);\n },\n\n // Remove a view and clean up index references.\n _remove(view) {\n if (!this._viewsByCid[view.cid]) {\n return;\n }\n\n // delete model index\n if (view.model) {\n delete this._indexByModel[view.model.cid];\n }\n\n // remove the view from the container\n delete this._viewsByCid[view.cid];\n\n const index = this.findIndexByView(view);\n this._views.splice(index, 1);\n\n this._updateLength();\n },\n\n // Update the `.length` attribute on this container\n _updateLength() {\n this.length = this._views.length;\n }\n});\n\nexport default Container;\n","// Collection View\n// ---------------\n\nimport _ from 'underscore';\nimport Backbone from 'backbone';\nimport MarionetteError from './utils/error';\nimport { renderView, destroyView } from './common/view';\nimport monitorViewEvents from './common/monitor-view-events';\nimport ChildViewContainer from './child-view-container';\nimport Region from './region';\nimport ViewMixin from './mixins/view';\nimport { setDomApi } from './config/dom';\nimport { setRenderer } from './config/renderer';\n\nconst classErrorName = 'CollectionViewError';\n\nconst ClassOptions = [\n 'behaviors',\n 'childView',\n 'childViewContainer',\n 'childViewEventPrefix',\n 'childViewEvents',\n 'childViewOptions',\n 'childViewTriggers',\n 'collectionEvents',\n 'emptyView',\n 'emptyViewOptions',\n 'events',\n 'modelEvents',\n 'sortWithCollection',\n 'template',\n 'templateContext',\n 'triggers',\n 'ui',\n 'viewComparator',\n 'viewFilter'\n];\n\n// A view that iterates over a Backbone.Collection\n// and renders an individual child view for each model.\nconst CollectionView = Backbone.View.extend({\n // flag for maintaining the sorted order of the collection\n sortWithCollection: true,\n\n // constructor\n constructor(options) {\n this._setOptions(options, ClassOptions);\n\n monitorViewEvents(this);\n\n this._initChildViewStorage();\n this._initBehaviors();\n\n Backbone.View.prototype.constructor.apply(this, arguments);\n\n // Init empty region\n this.getEmptyRegion();\n\n this.delegateEntityEvents();\n\n this._triggerEventOnBehaviors('initialize', this, options);\n },\n\n // Internal method to set up the `children` object for storing all of the child views\n // `_children` represents all child views\n // `children` represents only views filtered to be shown\n _initChildViewStorage() {\n this._children = new ChildViewContainer();\n this.children = new ChildViewContainer();\n },\n\n // Create an region to show the emptyView\n getEmptyRegion() {\n const $emptyEl = this.$container || this.$el;\n\n if (this._emptyRegion && !this._emptyRegion.isDestroyed()) {\n this._emptyRegion._setElement($emptyEl[0]);\n return this._emptyRegion;\n }\n\n this._emptyRegion = new Region({ el: $emptyEl[0], replaceElement: false });\n\n this._emptyRegion._parentView = this;\n\n return this._emptyRegion;\n },\n\n // Configured the initial events that the collection view binds to.\n _initialEvents() {\n if (this._isRendered) { return; }\n\n this.listenTo(this.collection, {\n 'sort': this._onCollectionSort,\n 'reset': this._onCollectionReset,\n 'update': this._onCollectionUpdate\n });\n },\n\n // Internal method. This checks for any changes in the order of the collection.\n // If the index of any view doesn't match, it will re-sort.\n _onCollectionSort(collection, { add, merge, remove }) {\n if (!this.sortWithCollection || this.viewComparator === false) {\n return;\n }\n\n // If the data is changing we will handle the sort later in `_onCollectionUpdate`\n if (add || remove || merge) {\n return;\n }\n\n // If the only thing happening here is sorting, sort.\n this.sort();\n },\n\n _onCollectionReset() {\n this._destroyChildren();\n\n this._addChildModels(this.collection.models);\n\n this.sort();\n },\n\n // Handle collection update model additions and removals\n _onCollectionUpdate(collection, options) {\n const changes = options.changes;\n\n // Remove first since it'll be a shorter array lookup.\n const removedViews = changes.removed.length && this._removeChildModels(changes.removed);\n\n this._addedViews = changes.added.length && this._addChildModels(changes.added);\n\n this._detachChildren(removedViews);\n\n this.sort();\n\n // Destroy removed child views after all of the render is complete\n this._removeChildViews(removedViews);\n },\n\n _removeChildModels(models) {\n return _.reduce(models, (views, model) => {\n const removeView = this._removeChildModel(model);\n\n if (removeView) { views.push(removeView); }\n\n return views;\n }, []);\n },\n\n _removeChildModel(model) {\n const view = this._children.findByModel(model);\n\n if (view) { this._removeChild(view); }\n\n return view;\n },\n\n _removeChild(view) {\n this.triggerMethod('before:remove:child', this, view);\n\n this.children._remove(view);\n this._children._remove(view);\n\n this.triggerMethod('remove:child', this, view);\n },\n\n // Added views are returned for consistency with _removeChildModels\n _addChildModels(models) {\n return _.map(models, this._addChildModel.bind(this));\n },\n\n _addChildModel(model) {\n const view = this._createChildView(model);\n\n this._addChild(view);\n\n return view;\n },\n\n _createChildView(model) {\n const ChildView = this._getChildView(model);\n const childViewOptions = this._getChildViewOptions(model);\n const view = this.buildChildView(model, ChildView, childViewOptions);\n\n return view;\n },\n\n _addChild(view, index) {\n this.triggerMethod('before:add:child', this, view);\n\n this._setupChildView(view);\n this._children._add(view, index);\n this.children._add(view, index);\n\n this.triggerMethod('add:child', this, view);\n },\n\n // Retrieve the `childView` class\n // The `childView` property can be either a view class or a function that\n // returns a view class. If it is a function, it will receive the model that\n // will be passed to the view instance (created from the returned view class)\n _getChildView(child) {\n let childView = this.childView;\n\n if (!childView) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'A \"childView\" must be specified',\n url: 'marionette.collectionview.html#collectionviews-childview'\n });\n }\n\n childView = this._getView(childView, child);\n\n if (!childView) {\n throw new MarionetteError({\n name: classErrorName,\n message: '\"childView\" must be a view class or a function that returns a view class',\n url: 'marionette.collectionview.html#collectionviews-childview'\n });\n }\n\n return childView;\n },\n\n // First check if the `view` is a view class (the common case)\n // Then check if it's a function (which we assume that returns a view class)\n _getView(view, child) {\n if (view.prototype instanceof Backbone.View || view === Backbone.View) {\n return view;\n } else if (_.isFunction(view)) {\n return view.call(this, child);\n }\n },\n\n _getChildViewOptions(child) {\n if (_.isFunction(this.childViewOptions)) {\n return this.childViewOptions(child);\n }\n\n return this.childViewOptions;\n },\n\n // Build a `childView` for a model in the collection.\n // Override to customize the build\n buildChildView(child, ChildViewClass, childViewOptions) {\n const options = _.extend({model: child}, childViewOptions);\n return new ChildViewClass(options);\n },\n\n _setupChildView(view) {\n monitorViewEvents(view);\n\n // We need to listen for if a view is destroyed in a way other\n // than through the CollectionView.\n // If this happens we need to remove the reference to the view\n // since once a view has been destroyed we can not reuse it.\n view.on('destroy', this.removeChildView, this);\n\n // set up the child view event forwarding\n this._proxyChildViewEvents(view);\n },\n\n // used by ViewMixin's `_childViewEventHandler`\n _getImmediateChildren() {\n return this.children._views;\n },\n\n // Overriding Backbone.View's `setElement` to handle\n // if an el was previously defined. If so, the view might be\n // attached on setElement.\n setElement() {\n Backbone.View.prototype.setElement.apply(this, arguments);\n\n this._isAttached = this._isElAttached();\n\n return this;\n },\n\n // Render children views.\n render() {\n if (this._isDestroyed) { return this; }\n this.triggerMethod('before:render', this);\n\n this._destroyChildren();\n\n if (this.collection) {\n this._addChildModels(this.collection.models);\n this._initialEvents();\n }\n\n const template = this.getTemplate();\n\n if (template) {\n this._renderTemplate(template);\n this.bindUIElements();\n }\n this._getChildViewContainer();\n this.sort();\n\n this._isRendered = true;\n\n this.triggerMethod('render', this);\n return this;\n },\n\n // Get a container within the template to add the children within\n _getChildViewContainer() {\n const childViewContainer = _.result(this, 'childViewContainer');\n this.$container = childViewContainer ? this.$(childViewContainer) : this.$el;\n\n if (!this.$container.length) {\n throw new MarionetteError({\n name: classErrorName,\n message: `The specified \"childViewContainer\" was not found: ${childViewContainer}`,\n url: 'marionette.collectionview.html#defining-the-childviewcontainer'\n });\n }\n },\n\n // Sorts the children then filters and renders the results.\n sort() {\n this._sortChildren();\n\n this.filter();\n\n return this;\n },\n\n // Sorts views by viewComparator and sets the children to the new order\n _sortChildren() {\n if (!this._children.length) { return; }\n\n let viewComparator = this.getComparator();\n\n if (!viewComparator) { return; }\n\n // If children are sorted prevent added to end perf\n delete this._addedViews;\n\n this.triggerMethod('before:sort', this);\n\n this._children._sort(viewComparator, this);\n\n this.triggerMethod('sort', this);\n },\n\n // Sets the view's `viewComparator` and applies the sort if the view is ready.\n // To prevent the render pass `{ preventRender: true }` as the 2nd argument.\n setComparator(comparator, {preventRender} = {}) {\n const comparatorChanged = this.viewComparator !== comparator;\n const shouldSort = comparatorChanged && !preventRender;\n\n this.viewComparator = comparator;\n\n if (shouldSort) {\n this.sort();\n }\n\n return this;\n },\n\n // Clears the `viewComparator` and follows the same rules for rendering as `setComparator`.\n removeComparator(options) {\n return this.setComparator(null, options);\n },\n\n // If viewComparator is overriden it will be returned here.\n // Additionally override this function to provide custom\n // viewComparator logic\n getComparator() {\n if (this.viewComparator) { return this.viewComparator }\n\n if (!this.sortWithCollection || this.viewComparator === false || !this.collection) {\n return false;\n }\n\n return this._viewComparator;\n },\n\n // Default internal view comparator that order the views by\n // the order of the collection\n _viewComparator(view) {\n return this.collection.indexOf(view.model);\n },\n\n // This method filters the children views and renders the results\n filter() {\n if (this._isDestroyed) { return this; }\n\n this._filterChildren();\n\n this._renderChildren();\n\n return this;\n },\n\n _filterChildren() {\n if (!this._children.length) { return; }\n\n const viewFilter = this._getFilter();\n\n if (!viewFilter) {\n const shouldReset = this.children.length !== this._children.length;\n\n this.children._set(this._children._views, shouldReset);\n\n return;\n }\n\n // If children are filtered prevent added to end perf\n delete this._addedViews;\n\n this.triggerMethod('before:filter', this);\n\n const attachViews = [];\n const detachViews = [];\n\n _.each(this._children._views, (view, key, children) => {\n (viewFilter.call(this, view, key, children) ? attachViews : detachViews).push(view);\n });\n\n this._detachChildren(detachViews);\n\n // reset children\n this.children._set(attachViews, true);\n\n this.triggerMethod('filter', this, attachViews, detachViews);\n },\n\n // This method returns a function for the viewFilter\n _getFilter() {\n const viewFilter = this.getFilter();\n\n if (!viewFilter) { return false; }\n\n if (_.isFunction(viewFilter)) {\n return viewFilter;\n }\n\n // Support filter predicates `{ fooFlag: true }`\n if (_.isObject(viewFilter)) {\n const matcher = _.matches(viewFilter);\n return function(view) {\n return matcher(view.model && view.model.attributes);\n };\n }\n\n // Filter by model attribute\n if (_.isString(viewFilter)) {\n return function(view) {\n return view.model && view.model.get(viewFilter);\n };\n }\n\n throw new MarionetteError({\n name: classErrorName,\n message: '\"viewFilter\" must be a function, predicate object literal, a string indicating a model attribute, or falsy',\n url: 'marionette.collectionview.html#defining-the-viewfilter'\n });\n },\n\n // Override this function to provide custom\n // viewFilter logic\n getFilter() {\n return this.viewFilter;\n },\n\n // Sets the view's `viewFilter` and applies the filter if the view is ready.\n // To prevent the render pass `{ preventRender: true }` as the 2nd argument.\n setFilter(filter, {preventRender} = {}) {\n const filterChanged = this.viewFilter !== filter;\n const shouldRender = filterChanged && !preventRender;\n\n this.viewFilter = filter;\n\n if (shouldRender) {\n this.filter();\n }\n\n return this;\n },\n\n // Clears the `viewFilter` and follows the same rules for rendering as `setFilter`.\n removeFilter(options) {\n return this.setFilter(null, options);\n },\n\n _detachChildren(detachingViews) {\n _.each(detachingViews, this._detachChildView.bind(this));\n },\n\n _detachChildView(view) {\n const shouldTriggerDetach = view._isAttached && this.monitorViewEvents !== false;\n if (shouldTriggerDetach) {\n view.triggerMethod('before:detach', view);\n }\n\n this.detachHtml(view);\n\n if (shouldTriggerDetach) {\n view._isAttached = false;\n view.triggerMethod('detach', view);\n }\n\n view._isShown = false;\n },\n\n // Override this method to change how the collectionView detaches a child view\n detachHtml(view) {\n this.Dom.detachEl(view.el, view.$el);\n },\n\n _renderChildren() {\n // If there are unrendered views prevent add to end perf\n if (this._hasUnrenderedViews) {\n delete this._addedViews;\n delete this._hasUnrenderedViews;\n }\n\n const views = this._addedViews || this.children._views;\n\n this.triggerMethod('before:render:children', this, views);\n\n if (this.isEmpty()) {\n this._showEmptyView();\n } else {\n this._destroyEmptyView();\n\n const els = this._getBuffer(views);\n\n this._attachChildren(els, views);\n }\n\n delete this._addedViews;\n\n this.triggerMethod('render:children', this, views);\n },\n\n // Renders each view and creates a fragment buffer from them\n _getBuffer(views) {\n const elBuffer = this.Dom.createBuffer();\n\n _.each(views, view => {\n renderView(view);\n // corresponds that view is shown in a Region or CollectionView\n view._isShown = true;\n this.Dom.appendContents(elBuffer, view.el, {_$contents: view.$el});\n });\n\n return elBuffer;\n },\n\n _attachChildren(els, views) {\n const shouldTriggerAttach = this._isAttached && this.monitorViewEvents !== false;\n\n views = shouldTriggerAttach ? views : [];\n\n _.each(views, view => {\n if (view._isAttached) { return; }\n view.triggerMethod('before:attach', view);\n });\n\n this.attachHtml(els, this.$container);\n\n _.each(views, view => {\n if (view._isAttached) { return; }\n view._isAttached = true;\n view.triggerMethod('attach', view);\n });\n },\n\n // Override this method to do something other than `.append`.\n // You can attach any HTML at this point including the els.\n attachHtml(els, $container) {\n this.Dom.appendContents($container[0], els, {_$el: $container});\n },\n\n isEmpty() {\n return !this.children.length;\n },\n\n _showEmptyView() {\n const EmptyView = this._getEmptyView();\n\n if (!EmptyView) {\n return;\n }\n\n const options = this._getEmptyViewOptions();\n\n const emptyRegion = this.getEmptyRegion();\n\n emptyRegion.show(new EmptyView(options));\n },\n\n // Retrieve the empty view class\n _getEmptyView() {\n const emptyView = this.emptyView;\n\n if (!emptyView) { return; }\n\n return this._getView(emptyView);\n },\n\n // Remove the emptyView\n _destroyEmptyView() {\n const emptyRegion = this.getEmptyRegion();\n // Only empty if a view is show so the region\n // doesn't detach any other unrelated HTML\n if (emptyRegion.hasView()) {\n emptyRegion.empty();\n }\n },\n\n //\n _getEmptyViewOptions() {\n const emptyViewOptions = this.emptyViewOptions || this.childViewOptions;\n\n if (_.isFunction(emptyViewOptions)) {\n return emptyViewOptions.call(this);\n }\n\n return emptyViewOptions;\n },\n\n swapChildViews(view1, view2) {\n if (!this._children.hasView(view1) || !this._children.hasView(view2)) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'Both views must be children of the collection view to swap.',\n url: 'marionette.collectionview.html#swapping-child-views'\n });\n }\n\n this._children._swap(view1, view2);\n this.Dom.swapEl(view1.el, view2.el);\n\n // If the views are not filtered the same, refilter\n if (this.children.hasView(view1) !== this.children.hasView(view2)) {\n this.filter();\n } else {\n this.children._swap(view1, view2);\n }\n\n return this;\n },\n\n // Render the child's view and add it to the HTML for the collection view at a given index, based on the current sort\n addChildView(view, index, options = {}) {\n if (!view || view._isDestroyed) {\n return view;\n }\n\n if (view._isShown) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'View is already shown in a Region or CollectionView',\n url: 'marionette.region.html#showing-a-view'\n });\n }\n\n if (_.isObject(index)) {\n options = index;\n }\n\n // If options has defined index we should use it\n if (options.index != null) {\n index = options.index;\n }\n\n if (!this._isRendered) {\n this.render();\n }\n\n this._addChild(view, index);\n\n if (options.preventRender) {\n this._hasUnrenderedViews = true;\n return view;\n }\n\n const hasIndex = (typeof index !== 'undefined');\n const isAddedToEnd = !hasIndex || index >= this._children.length;\n\n // Only cache views if added to the end and there is no unrendered views\n if (isAddedToEnd && !this._hasUnrenderedViews) {\n this._addedViews = [view];\n }\n\n if (hasIndex) {\n this._renderChildren();\n } else {\n this.sort();\n }\n\n return view;\n },\n\n // Detach a view from the children. Best used when adding a\n // childView from `addChildView`\n detachChildView(view) {\n this.removeChildView(view, { shouldDetach: true });\n\n return view;\n },\n\n // Remove the child view and destroy it. Best used when adding a\n // childView from `addChildView`\n // The options argument is for internal use only\n removeChildView(view, options) {\n if (!view) {\n return view;\n }\n\n this._removeChildView(view, options);\n\n this._removeChild(view);\n\n if (this.isEmpty()) {\n this._showEmptyView();\n }\n\n return view;\n },\n\n _removeChildViews(views) {\n _.each(views, this._removeChildView.bind(this));\n },\n\n _removeChildView(view, {shouldDetach} = {}) {\n view.off('destroy', this.removeChildView, this);\n\n if (shouldDetach) {\n this._detachChildView(view);\n } else {\n this._destroyChildView(view);\n }\n\n this.stopListening(view);\n },\n\n _destroyChildView(view) {\n if (view._isDestroyed) {\n return;\n }\n\n const shouldDisableEvents = this.monitorViewEvents === false;\n destroyView(view, shouldDisableEvents);\n },\n\n // called by ViewMixin destroy\n _removeChildren() {\n this._destroyChildren();\n const emptyRegion = this.getEmptyRegion();\n emptyRegion.destroy();\n delete this._addedViews;\n },\n\n // Destroy the child views that this collection view is holding on to, if any\n _destroyChildren() {\n if (!this._children.length) {\n return;\n }\n\n this.triggerMethod('before:destroy:children', this);\n if (this.monitorViewEvents === false) {\n this.Dom.detachContents(this.el, this.$el);\n }\n\n this._removeChildViews(this._children._views);\n\n // After all children have been destroyed re-init the container\n this._children._init();\n this.children._init();\n\n this.triggerMethod('destroy:children', this);\n }\n}, {\n setDomApi,\n setRenderer\n});\n\n_.extend(CollectionView.prototype, ViewMixin);\n\nexport default CollectionView;\n","// Behavior\n// --------\n\n// A Behavior is an isolated set of DOM /\n// user interactions that can be mixed into any View.\n// Behaviors allow you to blackbox View specific interactions\n// into portable logical chunks, keeping your views simple and your code DRY.\n\nimport _ from 'underscore';\nimport extend from './utils/extend';\nimport getNamespacedEventName from './utils/get-namespaced-event-name';\nimport CommonMixin from './mixins/common';\nimport DelegateEntityEventsMixin from './mixins/delegate-entity-events';\nimport TriggersMixin from './mixins/triggers';\nimport UIMixin from './mixins/ui';\n\nconst ClassOptions = [\n 'collectionEvents',\n 'events',\n 'modelEvents',\n 'triggers',\n 'ui'\n];\n\nconst Behavior = function(options, view) {\n // Setup reference to the view.\n // this comes in handle when a behavior\n // wants to directly talk up the chain\n // to the view.\n this.view = view;\n\n this._setOptions(options, ClassOptions);\n this.cid = _.uniqueId(this.cidPrefix);\n\n // Construct an internal UI hash using the behaviors UI\n // hash combined and overridden by the view UI hash.\n // This allows the user to use UI hash elements defined\n // in the parent view as well as those defined in the behavior.\n // This order will help the reuse and share of a behavior\n // between multiple views, while letting a view override\n // a selector under an UI key.\n this.ui = _.extend({}, _.result(this, 'ui'), _.result(view, 'ui'));\n\n // Proxy view triggers\n this.listenTo(view, 'all', this.triggerMethod);\n\n this.initialize.apply(this, arguments);\n};\n\nBehavior.extend = extend;\n\n// Behavior Methods\n// --------------\n\n_.extend(Behavior.prototype, CommonMixin, DelegateEntityEventsMixin, TriggersMixin, UIMixin, {\n cidPrefix: 'mnb',\n\n // This is a noop method intended to be overridden\n initialize() {},\n\n // proxy behavior $ method to the view\n // this is useful for doing jquery DOM lookups\n // scoped to behaviors view.\n $() {\n return this.view.$.apply(this.view, arguments);\n },\n\n // Stops the behavior from listening to events.\n destroy() {\n this.stopListening();\n\n this.view._removeBehavior(this);\n\n this._deleteEntityEventHandlers();\n\n return this;\n },\n\n proxyViewProperties() {\n this.$el = this.view.$el;\n this.el = this.view.el;\n\n return this;\n },\n\n bindUIElements() {\n this._bindUIElements();\n\n return this;\n },\n\n unbindUIElements() {\n this._unbindUIElements();\n\n return this;\n },\n\n getUI(name) {\n return this._getUI(name);\n },\n\n // Handle `modelEvents`, and `collectionEvents` configuration\n delegateEntityEvents() {\n this._delegateEntityEvents(this.view.model, this.view.collection);\n\n return this;\n },\n\n undelegateEntityEvents() {\n this._undelegateEntityEvents(this.view.model, this.view.collection);\n\n return this;\n },\n\n _getEvents() {\n if (!this.events) { return; }\n\n // Normalize behavior events hash to allow\n // a user to use the @ui. syntax.\n const behaviorEvents = this.normalizeUIKeys(_.result(this, 'events'));\n\n // binds the handler to the behavior and builds a unique eventName\n return _.reduce(behaviorEvents, (events, behaviorHandler, key) => {\n if (!_.isFunction(behaviorHandler)) {\n behaviorHandler = this[behaviorHandler];\n }\n if (!behaviorHandler) { return events; }\n key = getNamespacedEventName(key, this.cid);\n events[key] = behaviorHandler.bind(this);\n return events;\n }, {});\n },\n\n // Internal method to build all trigger handlers for a given behavior\n _getTriggers() {\n if (!this.triggers) { return; }\n\n // Normalize behavior triggers hash to allow\n // a user to use the @ui. syntax.\n const behaviorTriggers = this.normalizeUIKeys(_.result(this, 'triggers'));\n\n return this._getViewTriggers(this.view, behaviorTriggers);\n }\n});\n\nexport default Behavior;\n","// Application\n// -----------\n\nimport _ from 'underscore';\nimport extend from './utils/extend';\nimport buildRegion from './common/build-region';\nimport CommonMixin from './mixins/common';\nimport DestroyMixin from './mixins/destroy';\nimport RadioMixin from './mixins/radio';\nimport Region from './region';\n\nconst ClassOptions = [\n 'channelName',\n 'radioEvents',\n 'radioRequests',\n 'region',\n 'regionClass'\n];\n\nconst Application = function(options) {\n this._setOptions(options, ClassOptions);\n this.cid = _.uniqueId(this.cidPrefix);\n this._initRegion();\n this._initRadio();\n this.initialize.apply(this, arguments);\n};\n\nApplication.extend = extend;\n\n// Application Methods\n// --------------\n\n_.extend(Application.prototype, CommonMixin, DestroyMixin, RadioMixin, {\n cidPrefix: 'mna',\n\n // This is a noop method intended to be overridden\n initialize() {},\n\n // Kick off all of the application's processes.\n start(options) {\n this.triggerMethod('before:start', this, options);\n this.triggerMethod('start', this, options);\n return this;\n },\n\n regionClass: Region,\n\n _initRegion() {\n const region = this.region;\n\n if (!region) { return; }\n\n const defaults = {\n regionClass: this.regionClass\n };\n\n this._region = buildRegion(region, defaults);\n },\n\n getRegion() {\n return this._region;\n },\n\n showView(view, ...args) {\n const region = this.getRegion();\n region.show(view, ...args);\n return view;\n },\n\n getView() {\n return this.getRegion().currentView;\n }\n});\n\nexport default Application;\n","import {version as VERSION} from '../package.json';\n\nimport proxy from './utils/proxy';\nimport extend from './utils/extend';\n\nimport {\n bindEvents as _bindEvents,\n unbindEvents as _unbindEvents\n} from './common/bind-events';\nimport {\n bindRequests as _bindRequests,\n unbindRequests as _unbindRequests\n} from './common/bind-requests';\nimport _getOption from './common/get-option';\nimport _mergeOptions from './common/merge-options';\nimport monitorViewEvents from './common/monitor-view-events';\nimport _normalizeMethods from './common/normalize-methods';\nimport _triggerMethod from './common/trigger-method';\n\nimport Events from './mixins/events';\n\nimport MnObject from './object';\nimport View from './view';\nimport CollectionView from './collection-view';\nimport Behavior from './behavior';\nimport Region from './region';\nimport Application from './application';\n\nimport DomApi from './config/dom';\n\nimport {\n isEnabled,\n setEnabled\n} from './config/features';\n\n// Utilities\n\nexport const bindEvents = proxy(_bindEvents);\nexport const unbindEvents = proxy(_unbindEvents);\nexport const bindRequests = proxy(_bindRequests);\nexport const unbindRequests = proxy(_unbindRequests);\nexport const mergeOptions = proxy(_mergeOptions);\nexport const getOption = proxy(_getOption);\nexport const normalizeMethods = proxy(_normalizeMethods);\nexport const triggerMethod = proxy(_triggerMethod);\n\n\n// Configuration\n\nexport const setDomApi = function(mixin) {\n CollectionView.setDomApi(mixin);\n Region.setDomApi(mixin);\n View.setDomApi(mixin);\n};\nexport const setRenderer = function(renderer) {\n CollectionView.setRenderer(renderer);\n View.setRenderer(renderer);\n};\n\nexport {\n View,\n CollectionView,\n MnObject,\n Region,\n Behavior,\n Application,\n isEnabled,\n setEnabled,\n monitorViewEvents,\n Events,\n extend,\n DomApi,\n VERSION\n};\n\nexport default {\n View,\n CollectionView,\n MnObject,\n Object: MnObject,\n Region,\n Behavior,\n Application,\n isEnabled,\n setEnabled,\n monitorViewEvents,\n Events,\n extend,\n DomApi,\n VERSION\n};\n"],"names":["proxy","method","context","args","apply","extend","Backbone","Model","normalizeMethods","hash","_","reduce","normalizedHash","name","isFunction","errorProps","MarionetteError","call","Error","urlRoot","version","url","constructor","options","error","message","pick","captureStackTrace","toString","normalizeBindings","bindings","isObject","bindEvents","entity","listenTo","unbindEvents","stopListening","bindRequests","channel","reply","unbindRequests","stopReplying","getOption","optionName","undefined","mergeOptions","keys","each","key","option","triggerMethodChildren","view","event","shouldTrigger","_getImmediateChildren","child","triggerMethod","shouldTriggerAttach","_isAttached","shouldAttach","shouldTriggerDetach","shouldDetach","triggerDOMRefresh","_isRendered","triggerDOMRemove","handleBeforeAttach","handleAttach","handleBeforeDetach","handleDetach","handleBeforeRender","handleRender","monitorViewEvents","_areViewEventsMonitored","on","splitter","methodCache","getEventName","match","prefix","eventName","toUpperCase","getOnMethodName","replace","methodName","result","drop","arguments","trigger","CommonMixin","_setOptions","classOptions","Events","_isDestroyed","isDestroyed","destroy","_initRadio","channelName","Radio","_channel","radioEvents","radioRequests","_destroyRadio","getChannel","ClassOptions","MarionetteObject","cid","uniqueId","cidPrefix","initialize","prototype","DestroyMixin","RadioMixin","invokeMap","invoke","getBehaviorClass","behaviorClass","BehaviorClass","parseBehaviors","behaviors","allBehaviors","reducedBehaviors","behaviorDefiniton","behavior","push","_initBehaviors","_behaviors","_getBehaviorTriggers","triggers","_invoke","memo","_triggers","_getBehaviorEvents","events","_events","_proxyBehaviorViewProperties","_delegateBehaviorEntityEvents","_undelegateBehaviorEntityEvents","_destroyBehaviors","_removeBehavior","undelegate","without","_bindBehaviorUIElements","_unbindBehaviorUIElements","_triggerEventOnBehaviors","_delegateEntityEvents","model","collection","_modelEvents","_collectionEvents","_undelegateEntityEvents","_deleteEntityEventHandlers","_renderTemplate","template","data","mixinTemplateContext","serializeData","html","_renderHtml","attachElContent","getTemplate","serializedData","templateContext","serializeModel","items","serializeCollection","attributes","map","models","Dom","setContents","el","$el","delegateEventSplitter","getNamespacedEventName","namespace","FEATURES","childViewEventPrefix","triggersStopPropagation","triggersPreventDefault","DEV_MODE","isEnabled","setEnabled","state","buildViewTrigger","triggerDef","isString","shouldPreventDefault","preventDefault","shouldStopPropagation","stopPropagation","_getViewTriggers","value","normalizeUIKeys","ui","val","normalizedKey","normalizeUIString","uiRegEx","uiString","r","slice","normalizeUIValues","property","propertyVal","uiBindings","_getUIBindings","_bindUIElements","_uiBindings","_ui","selector","$","_unbindUIElements","_getUI","getEl","setDomApi","mixin","createBuffer","document","createDocumentFragment","getDocumentEl","ownerDocument","documentElement","findEl","find","hasEl","childEl","contains","parentNode","detachEl","_$el","detach","replaceEl","newEl","oldEl","parent","replaceChild","swapEl","el1","el2","parent1","parent2","next1","nextSibling","next2","insertBefore","appendContents","contents","_$contents","append","hasContents","hasChildNodes","detachContents","ViewMixin","DomApi","_isElAttached","supportsRenderLifecycle","supportsDestroyLifecycle","isRendered","isAttached","delegateEvents","_buildEventProxies","combinedEvents","_getEvents","_getTriggers","View","delegateEntityEvents","undelegateEntityEvents","_isDestroying","_disableDetachEvents","unbindUIElements","_removeElement","_removeChildren","off","removeData","bindUIElements","getUI","_childViewEvents","_childViewTriggers","_eventPrefix","_getEventPrefix","defaultPrefix","_proxyChildViewEvents","_childViewEventHandler","childViewEvents","childViewTriggers","BehaviorsMixin","DelegateEntityEventsMixin","TemplateRenderMixin","TriggersMixin","UIMixin","renderView","render","destroyView","disableDetachEvents","remove","classErrorName","Region","_initEl","_getEl","replaceElement","_isReplaced","_isSwappingView","show","_ensureElement","_getView","currentView","_isShown","empty","_setupChildView","_attachView","_setEl","length","_setElement","shouldReplace","_restoreEl","_replaceEl","attachHtml","_empty","parentView","_parentView","_shouldDisableMonitoring","shouldReplaceEl","allowMissingEl","viewOptions","_getViewOptions","_detachView","isReplaced","isSwappingView","detachHtml","shouldDestroy","removeView","_stopChildViewEvents","detachView","shouldRestoreEl","hasView","reset","_name","_removeReferences","definition","defaults","buildRegionFromObject","regionClass","RegionClass","_initRegions","regions","_regions","addRegions","_reInitRegions","addRegion","isEmpty","_addRegions","regionDefinitions","parentEl","partial","buildRegion","_addRegion","region","removeRegion","_removeRegion","removeRegions","_getRegions","bind","emptyRegions","getRegions","hasRegion","getRegion","clone","showChildView","detachChildView","getChildView","setRenderer","renderer","childReducer","children","setElement","RegionsMixin","Container","_init","methods","_views","concat","stringComparator","comparator","get","_viewsByCid","_indexByModel","_updateLength","_add","index","_addViewIndexes","splice","_sort","_sortBy","sort","sortedViews","sortBy","_set","views","shouldReset","_swap","view1","view2","view1Index","findIndexByView","view2Index","swapView","findByModel","findByModelCid","modelCid","findByIndex","indexOf","findByCid","_remove","CollectionView","sortWithCollection","_initChildViewStorage","getEmptyRegion","_children","ChildViewContainer","$emptyEl","$container","_emptyRegion","_initialEvents","_onCollectionSort","_onCollectionReset","_onCollectionUpdate","add","merge","viewComparator","_destroyChildren","_addChildModels","changes","removedViews","removed","_removeChildModels","_addedViews","added","_detachChildren","_removeChildViews","_removeChildModel","_removeChild","_addChildModel","_createChildView","_addChild","ChildView","_getChildView","childViewOptions","_getChildViewOptions","buildChildView","childView","ChildViewClass","removeChildView","_getChildViewContainer","childViewContainer","_sortChildren","filter","getComparator","setComparator","preventRender","comparatorChanged","shouldSort","removeComparator","_viewComparator","_filterChildren","_renderChildren","viewFilter","_getFilter","attachViews","detachViews","getFilter","matcher","matches","setFilter","filterChanged","shouldRender","removeFilter","detachingViews","_detachChildView","_hasUnrenderedViews","_showEmptyView","_destroyEmptyView","els","_getBuffer","_attachChildren","elBuffer","EmptyView","_getEmptyView","_getEmptyViewOptions","emptyRegion","emptyView","emptyViewOptions","swapChildViews","addChildView","hasIndex","isAddedToEnd","_removeChildView","_destroyChildView","shouldDisableEvents","Behavior","proxyViewProperties","behaviorEvents","behaviorHandler","behaviorTriggers","Application","_initRegion","start","_region","showView","getView","_bindEvents","_unbindEvents","_bindRequests","_unbindRequests","_mergeOptions","_getOption","_normalizeMethods","_triggerMethod","MnObject","Object","VERSION"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;EACA,IAAMA,KAAK,GAAG,SAARA,KAAQ,CAASC,MAAT,EAAiB;EAC7B,SAAO,UAASC,OAAT,EAA2B;EAAA,sCAANC,IAAM;EAANA,MAAA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AiBC,KAAjB;EACAiD,EAAAA,IAAI,CAAClD,SAAL,CAAeC,KAAf;EACD,CAJM;AAKP,MAAa2J,aAAW,GAAG,SAAdA,WAAc,CAASC,QAAT,EAAmB;EAC5C0C,EAAAA,cAAc,CAAC3C,WAAf,CAA2BC,QAA3B;EACA3G,EAAAA,IAAI,CAAC0G,WAAL,CAAiBC,QAAjB;EACD,CAHM;AAKP,AAgBA,4BAAe;EACb3G,EAAAA,IAAI,EAAJA,IADa;EAEbqJ,EAAAA,cAAc,EAAdA,cAFa;EAGbwG,EAAAA,QAAQ,EAARA,gBAHa;EAIbC,EAAAA,MAAM,EAAED,gBAJK;EAKb7N,EAAAA,MAAM,EAANA,MALa;EAMb0M,EAAAA,QAAQ,EAARA,QANa;EAObK,EAAAA,WAAW,EAAXA,WAPa;EAQbnU,EAAAA,SAAS,EAATA,SARa;EASbC,EAAAA,UAAU,EAAVA,UATa;EAUb9G,EAAAA,iBAAiB,EAAjBA,iBAVa;EAWboB,EAAAA,MAAM,EAANA,MAXa;EAYbtF,EAAAA,MAAM,EAANA,MAZa;EAabwP,EAAAA,MAAM,EAANA,MAba;EAcb0Q,EAAAA,OAAO,EAAPA;EAda,CAAf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"backbone.marionette.js","sources":["../src/utils/proxy.js","../src/utils/extend.js","../src/common/normalize-methods.js","../src/utils/error.js","../src/common/bind-events.js","../src/common/bind-requests.js","../src/common/get-option.js","../src/common/merge-options.js","../src/common/monitor-view-events.js","../src/common/trigger-method.js","../src/utils/build-event-args.js","../src/utils/call-handler.js","../src/utils/once-wrap.js","../src/mixins/events.js","../src/mixins/common.js","../src/mixins/destroy.js","../src/mixins/radio.js","../src/object.js","../src/utils/invoke.js","../src/mixins/behaviors.js","../src/mixins/delegate-entity-events.js","../src/mixins/template-render.js","../src/mixins/ui.js","../src/config/features.js","../src/config/event-delegator.js","../src/mixins/view-events.js","../src/config/dom.js","../src/mixins/view.js","../src/common/view.js","../src/region.js","../src/common/build-region.js","../src/mixins/regions.js","../src/config/renderer.js","../src/view.js","../src/child-view-container.js","../src/collection-view.js","../src/behavior.js","../src/application.js","../src/backbone.marionette.js"],"sourcesContent":["//Internal utility for creating context style global utils\nconst proxy = function(method) {\n return function(context, ...args) {\n return method.apply(context, args);\n };\n};\n\nexport default proxy;\n","// Marionette.extend\n// -----------------\n\nimport { has, extend, create } from 'underscore';\n\n// Borrowed from backbone.js\nexport default function(protoProps, staticProps) {\n const parent = this;\n let child;\n\n // The constructor function for the new subclass is either defined by you\n // (the \"constructor\" property in your `extend` definition), or defaulted\n // by us to simply call the parent constructor.\n if (protoProps && has(protoProps, 'constructor')) {\n child = protoProps.constructor;\n } else {\n child = function() { return parent.apply(this, arguments); };\n }\n\n // Add static properties to the constructor function, if supplied.\n extend(child, parent, staticProps);\n\n // Set the prototype chain to inherit from `parent`, without calling\n // `parent`'s constructor function and add the prototype properties.\n child.prototype = create(parent.prototype, protoProps);\n child.prototype.constructor = child;\n\n // Set a convenience property in case the parent's prototype is needed\n // later.\n child.__super__ = parent.prototype;\n\n return child;\n}\n","import _ from 'underscore';\n\n// Marionette.normalizeMethods\n// ----------------------\n\n// Pass in a mapping of events => functions or function names\n// and return a mapping of events => functions\nconst normalizeMethods = function(hash) {\n if (!hash) { return }\n\n return _.reduce(hash, (normalizedHash, method, name) => {\n if (!_.isFunction(method)) {\n method = this[method];\n }\n if (method) {\n normalizedHash[name] = method;\n }\n return normalizedHash;\n }, {});\n};\n\nexport default normalizeMethods;\n","// Error\n// -----\n\nimport _ from 'underscore';\nimport extend from './extend';\nimport {version} from '../../package.json';\n\nconst errorProps = ['description', 'fileName', 'lineNumber', 'name', 'message', 'number', 'url'];\n\nconst MarionetteError = extend.call(Error, {\n urlRoot: `http://marionettejs.com/docs/v${version}/`,\n\n url: '',\n\n constructor(options) {\n const error = Error.call(this, options.message);\n _.extend(this, _.pick(error, errorProps), _.pick(options, errorProps));\n\n if (Error.captureStackTrace) {\n this.captureStackTrace();\n }\n\n this.url = this.urlRoot + this.url;\n },\n\n captureStackTrace() {\n Error.captureStackTrace(this, MarionetteError);\n },\n\n toString() {\n return `${ this.name }: ${ this.message } See: ${ this.url }`;\n }\n});\n\nexport default MarionetteError;\n","// Bind Entity Events & Unbind Entity Events\n// -----------------------------------------\n//\n// These methods are used to bind/unbind a backbone \"entity\" (e.g. collection/model)\n// to methods on a target object.\n//\n// The first parameter, `target`, must have the Backbone.Events module mixed in.\n//\n// The second parameter is the `entity` (Backbone.Model, Backbone.Collection or\n// any object that has Backbone.Events mixed in) to bind the events from.\n//\n// The third parameter is a hash of { \"event:name\": \"eventHandler\" }\n// configuration. Multiple handlers can be separated by a space. A\n// function can be supplied instead of a string handler name.\n\nimport _ from 'underscore';\nimport normalizeMethods from './normalize-methods';\nimport MarionetteError from '../utils/error';\n\nfunction normalizeBindings(context, bindings) {\n if (!_.isObject(bindings)) {\n throw new MarionetteError({\n message: 'Bindings must be an object.',\n url: 'common.html#bindevents'\n });\n }\n\n return normalizeMethods.call(context, bindings);\n}\n\nfunction bindEvents(entity, bindings) {\n if (!entity || !bindings) { return this; }\n\n this.listenTo(entity, normalizeBindings(this, bindings));\n\n return this;\n}\n\nfunction unbindEvents(entity, bindings) {\n if (!entity) { return this; }\n\n if (!bindings) {\n this.stopListening(entity);\n return this;\n }\n\n this.stopListening(entity, normalizeBindings(this, bindings));\n\n return this;\n}\n\n// Export Public API\nexport {\n bindEvents,\n unbindEvents\n};\n","// Bind/Unbind Radio Requests\n// -----------------------------------------\n//\n// These methods are used to bind/unbind a backbone.radio request\n// to methods on a target object.\n//\n// The first parameter, `target`, will set the context of the reply method\n//\n// The second parameter is the `Radio.channel` to bind the reply to.\n//\n// The third parameter is a hash of { \"request:name\": \"replyHandler\" }\n// configuration. A function can be supplied instead of a string handler name.\n\nimport _ from 'underscore';\nimport normalizeMethods from './normalize-methods';\nimport MarionetteError from '../utils/error';\n\nfunction normalizeBindings(context, bindings) {\n if (!_.isObject(bindings)) {\n throw new MarionetteError({\n message: 'Bindings must be an object.',\n url: 'common.html#bindrequests'\n });\n }\n\n return normalizeMethods.call(context, bindings);\n}\n\nfunction bindRequests(channel, bindings) {\n if (!channel || !bindings) { return this; }\n\n channel.reply(normalizeBindings(this, bindings), this);\n\n return this;\n}\n\nfunction unbindRequests(channel, bindings) {\n if (!channel) { return this; }\n\n if (!bindings) {\n channel.stopReplying(null, null, this);\n return this;\n }\n\n channel.stopReplying(normalizeBindings(this, bindings));\n\n return this;\n}\n\nexport {\n bindRequests,\n unbindRequests\n};\n","// Marionette.getOption\n// --------------------\n\n// Retrieve an object, function or other value from the\n// object or its `options`, with `options` taking precedence.\nconst getOption = function(optionName) {\n if (!optionName) { return; }\n if (this.options && (this.options[optionName] !== undefined)) {\n return this.options[optionName];\n } else {\n return this[optionName];\n }\n};\n\nexport default getOption;\n","import _ from 'underscore';\n\n// Merge `keys` from `options` onto `this`\nconst mergeOptions = function(options, keys) {\n if (!options) { return; }\n\n _.each(keys, (key) => {\n const option = options[key];\n if (option !== undefined) {\n this[key] = option;\n }\n });\n};\n\nexport default mergeOptions;\n","// DOM Refresh\n// -----------\n\nimport _ from 'underscore';\n\n// Trigger method on children unless a pure Backbone.View\nfunction triggerMethodChildren(view, event, shouldTrigger) {\n if (!view._getImmediateChildren) { return; }\n _.each(view._getImmediateChildren(), child => {\n if (!shouldTrigger(child)) { return; }\n child.triggerMethod(event, child);\n });\n}\n\nfunction shouldTriggerAttach(view) {\n return !view._isAttached;\n}\n\nfunction shouldAttach(view) {\n if (!shouldTriggerAttach(view)) { return false; }\n view._isAttached = true;\n return true;\n}\n\nfunction shouldTriggerDetach(view) {\n return view._isAttached;\n}\n\nfunction shouldDetach(view) {\n view._isAttached = false;\n return true;\n}\n\nfunction triggerDOMRefresh(view) {\n if (view._isAttached && view._isRendered) {\n view.triggerMethod('dom:refresh', view);\n }\n}\n\nfunction triggerDOMRemove(view) {\n if (view._isAttached && view._isRendered) {\n view.triggerMethod('dom:remove', view);\n }\n}\n\nfunction handleBeforeAttach() {\n triggerMethodChildren(this, 'before:attach', shouldTriggerAttach);\n}\n\nfunction handleAttach() {\n triggerMethodChildren(this, 'attach', shouldAttach);\n triggerDOMRefresh(this);\n}\n\nfunction handleBeforeDetach() {\n triggerMethodChildren(this, 'before:detach', shouldTriggerDetach);\n triggerDOMRemove(this);\n}\n\nfunction handleDetach() {\n triggerMethodChildren(this, 'detach', shouldDetach);\n}\n\nfunction handleBeforeRender() {\n triggerDOMRemove(this);\n}\n\nfunction handleRender() {\n triggerDOMRefresh(this);\n}\n\n// Monitor a view's state, propagating attach/detach events to children and firing dom:refresh\n// whenever a rendered view is attached or an attached view is rendered.\nfunction monitorViewEvents(view) {\n if (view._areViewEventsMonitored || view.monitorViewEvents === false) { return; }\n\n view._areViewEventsMonitored = true;\n\n view.on({\n 'before:attach': handleBeforeAttach,\n 'attach': handleAttach,\n 'before:detach': handleBeforeDetach,\n 'detach': handleDetach,\n 'before:render': handleBeforeRender,\n 'render': handleRender\n });\n}\n\nexport default monitorViewEvents;\n","// Trigger Method\n// --------------\n\nimport _ from 'underscore';\nimport getOption from './get-option';\n\n// split the event name on the \":\"\nconst splitter = /(^|:)(\\w)/gi;\n\n// Only calc getOnMethodName once\nconst methodCache = {};\n\n// take the event section (\"section1:section2:section3\")\n// and turn it in to uppercase name onSection1Section2Section3\nfunction getEventName(match, prefix, eventName) {\n return eventName.toUpperCase();\n}\n\nconst getOnMethodName = function(event) {\n if (!methodCache[event]) {\n methodCache[event] = 'on' + event.replace(splitter, getEventName);\n }\n\n return methodCache[event];\n};\n\n// Trigger an event and/or a corresponding method name. Examples:\n//\n// `this.triggerMethod(\"foo\")` will trigger the \"foo\" event and\n// call the \"onFoo\" method.\n//\n// `this.triggerMethod(\"foo:bar\")` will trigger the \"foo:bar\" event and\n// call the \"onFooBar\" method.\nexport default function triggerMethod(event) {\n // get the method name from the event name\n const methodName = getOnMethodName(event);\n const method = getOption.call(this, methodName);\n let result;\n\n // call the onMethodName if it exists\n if (_.isFunction(method)) {\n // pass all args, except the event name\n result = method.apply(this, _.drop(arguments));\n }\n\n // trigger the event\n this.trigger.apply(this, arguments);\n\n return result;\n}\n","import { reduce, keys } from 'underscore';\n\n// Regular expression used to split event strings.\nexport const eventSplitter = /\\s+/;\n\n// Iterates over the standard `event, callback` (as well as the fancy multiple\n// space-separated events `\"change blur\", callback` and jQuery-style event\n// maps `{event: callback}`).\nexport default function buildEventArgs(name, callback, context, listener) {\n if (name && typeof name === 'object') {\n return reduce(keys(name), (eventArgs, key) => {\n return eventArgs.concat(buildEventArgs(key, name[key], context || callback, listener));\n }, []);\n }\n\n if (name && eventSplitter.test(name)) {\n return reduce(name.split(eventSplitter), (eventArgs, n) => {\n eventArgs.push({ name: n, callback, context, listener });\n return eventArgs;\n }, []);\n }\n\n return [{ name, callback, context, listener }];\n}\n","// An optimized way to execute callbacks.\nexport default function callHandler(callback, context, args = []) {\n switch (args.length) {\n case 0: return callback.call(context);\n case 1: return callback.call(context, args[0]);\n case 2: return callback.call(context, args[0], args[1]);\n case 3: return callback.call(context, args[0], args[1], args[2]);\n default: return callback.apply(context, args);\n }\n}\n","import { once } from 'underscore';\n\n// Wrap callback in a once. Returns for requests\n// `offCallback` unbinds the `onceWrapper` after it has been called.\nexport default function onceWrap(callback, offCallback) {\n const onceCallback = once(function() {\n offCallback(onceCallback);\n return callback.apply(this, arguments);\n });\n\n onceCallback._callback = callback;\n\n return onceCallback;\n}\n","import { reduce, each, keys, uniqueId } from 'underscore';\n\nimport buildEventArgs, { eventSplitter } from '../utils/build-event-args';\nimport callHandler from '../utils/call-handler';\nimport onceWrap from '../utils/once-wrap';\n\nimport triggerMethod from '../common/trigger-method';\n\n// A module that can be mixed in to *any object* in order to provide it with\n// a custom event channel. You may bind a callback to an event with `on` or\n// remove with `off`; `trigger`-ing an event fires all callbacks in\n// succession.\n//\n// var object = {};\n// _.extend(object, Events);\n// object.on('expand', function(){ alert('expanded'); });\n// object.trigger('expand');\n//\n\n// The reducing API that adds a callback to the `events` object.\nconst onApi = function({ events, name, callback, context, ctx, listener }) {\n const handlers = events[name] || (events[name] = []);\n handlers.push({ callback, context, ctx: context || ctx, listener });\n return events;\n};\n\nconst onReducer = function(events, { name, callback, context }) {\n if (!callback) {return events;}\n return onApi({ events, name, callback, context, ctx: this });\n}\n\nconst onceReducer = function(events, { name, callback, context }) {\n if (!callback) {return events;}\n const onceCallback = onceWrap(callback, this.off.bind(this, name));\n return onApi({ events, name, callback: onceCallback, context, ctx: this });\n}\n\nconst cleanupListener = function({ obj, listeneeId, listenerId, listeningTo }) {\n delete listeningTo[listeneeId];\n delete obj._rdListeners[listenerId];\n};\n\n// The reducing API that removes a callback from the `events` object.\nconst offReducer = function(events , { name, callback, context }) {\n const names = name ? [name] : keys(events);\n\n each(names, key => {\n const handlers = events[key];\n\n // Bail out if there are no events stored.\n if (!handlers) {return;}\n\n // Find any remaining events.\n events[key] = reduce(handlers, (remaining, handler) => {\n if (\n callback && callback !== handler.callback &&\n callback !== handler.callback._callback ||\n context && context !== handler.context\n ) {\n remaining.push(handler);\n return remaining;\n }\n\n // If not including event, clean up any related listener\n if (handler.listener) {\n const listener = handler.listener;\n listener.count--;\n if (!listener.count) {cleanupListener(listener);}\n }\n\n return remaining;\n }, []);\n\n if (!events[key].length) {delete events[key];}\n });\n\n return events;\n};\n\nconst getListener = function(obj, listenerObj) {\n const listeneeId = obj._rdListenId || (obj._rdListenId = uniqueId('l'));\n obj._rdEvents = obj._rdEvents || {};\n const listeningTo = listenerObj._rdListeningTo || (listenerObj._rdListeningTo = {});\n const listener = listeningTo[listeneeId];\n\n // This listenerObj is not listening to any other events on `obj` yet.\n // Setup the necessary references to track the listening callbacks.\n if (!listener) {\n const listenerId = listenerObj._rdListenId || (listenerObj._rdListenId = uniqueId('l'));\n listeningTo[listeneeId] = {obj, listeneeId, listenerId, listeningTo, count: 0};\n\n return listeningTo[listeneeId];\n }\n\n return listener;\n}\n\nconst listenToApi = function({ name, callback, context, listener }) {\n if (!callback) {return;}\n\n const { obj, listenerId } = listener;\n const listeners = obj._rdListeners || (obj._rdListeners = {});\n obj._rdEvents = onApi({ events: obj._rdEvents, name, callback, context, listener });\n listeners[listenerId] = listener;\n listener.count++;\n\n // Call `on` for interop\n obj.on(name, callback, context, { _rdInternal: true });\n};\n\nconst listenToOnceApi = function({ name, callback, context, listener }) {\n if (!callback) {return;}\n const offCallback = this.stopListening.bind(this, listener.obj, name);\n const onceCallback = onceWrap(callback, offCallback);\n listenToApi({ name, callback: onceCallback, context, listener });\n};\n\n// Handles triggering the appropriate event callbacks.\nconst triggerApi = function({ events, name, args }) {\n const objEvents = events[name];\n const allEvents = (objEvents && events.all) ? events.all.slice() : events.all;\n if (objEvents) {triggerEvents(objEvents, args);}\n if (allEvents) {triggerEvents(allEvents, [name].concat(args));}\n};\n\nconst triggerEvents = function(events, args) {\n each(events, ({ callback, ctx }) => {\n callHandler(callback, ctx, args);\n });\n};\n\nexport default {\n\n // Bind an event to a `callback` function. Passing `\"all\"` will bind\n // the callback to all events fired.\n on(name, callback, context, opts) {\n if (opts && opts._rdInternal) {return;}\n\n const eventArgs = buildEventArgs(name, callback, context);\n this._rdEvents = reduce(eventArgs, onReducer.bind(this), this._rdEvents || {});\n\n return this;\n },\n\n // Remove one or many callbacks. If `context` is null, removes all\n // callbacks with that function. If `callback` is null, removes all\n // callbacks for the event. If `name` is null, removes all bound\n // callbacks for all events.\n off(name, callback, context, opts) {\n if (!this._rdEvents) {return this;}\n if (opts && opts._rdInternal) {return;}\n\n // Delete all event listeners and \"drop\" events.\n if (!name && !context && !callback) {\n this._rdEvents = void 0;\n const listeners = this._rdListeners;\n each(keys(listeners), listenerId => {\n cleanupListener(listeners[listenerId]);\n });\n return this;\n }\n\n const eventArgs = buildEventArgs(name, callback, context);\n\n this._rdEvents = reduce(eventArgs, offReducer, this._rdEvents);\n\n return this;\n },\n\n // Bind an event to only be triggered a single time. After the first time\n // the callback is invoked, its listener will be removed. If multiple events\n // are passed in using the space-separated syntax, the handler will fire\n // once for each event, not once for a combination of all events.\n once(name, callback, context) {\n const eventArgs = buildEventArgs(name, callback, context);\n\n this._rdEvents = reduce(eventArgs, onceReducer.bind(this), this._rdEvents || {})\n\n return this;\n },\n\n // Inversion-of-control versions of `on`. Tell *this* object to listen to\n // an event in another object... keeping track of what it's listening to\n // for easier unbinding later.\n listenTo(obj, name, callback) {\n if (!obj) {return this;}\n\n const listener = getListener(obj, this);\n const eventArgs = buildEventArgs(name, callback, this, listener);\n each(eventArgs, listenToApi);\n\n return this;\n },\n\n // Inversion-of-control versions of `once`.\n listenToOnce(obj, name, callback) {\n if (!obj) {return this;}\n\n const listener = getListener(obj, this);\n const eventArgs = buildEventArgs(name, callback, this, listener);\n each(eventArgs, listenToOnceApi.bind(this));\n\n return this;\n },\n\n // Tell this object to stop listening to either specific events ... or\n // to every object it's currently listening to.\n stopListening(obj, name, callback) {\n const listeningTo = this._rdListeningTo;\n if (!listeningTo) {return this;}\n\n const eventArgs = buildEventArgs(name, callback, this);\n\n const listenerIds = obj ? [obj._rdListenId] : keys(listeningTo);\n for (let i = 0; i < listenerIds.length; i++) {\n const listener = listeningTo[listenerIds[i]];\n\n // If listening doesn't exist, this object is not currently\n // listening to obj. Break out early.\n if (!listener) {break;}\n\n each(eventArgs, args => {\n const listenToObj = listener.obj;\n const events = listenToObj._rdEvents;\n\n if (!events) {return;}\n\n listenToObj._rdEvents = offReducer(events, args);\n\n // Call `off` for interop\n listenToObj.off(args.name, args.callback, this, { _reInternal: true });\n });\n }\n\n return this;\n },\n\n // Trigger one or many events, firing all bound callbacks. Callbacks are\n // passed the same arguments as `trigger` is, apart from the event name\n // (unless you're listening on `\"all\"`, which will cause your callback to\n // receive the true name of the event as the first argument).\n trigger(name, ...args) {\n if (!this._rdEvents) {return this;}\n\n if (name && typeof name === 'object') {\n each(keys(name), key => {\n triggerApi({\n events: this._rdEvents,\n name: key,\n args: [name[key]],\n });\n });\n }\n\n if (name && eventSplitter.test(name)) {\n each(name.split(eventSplitter), n => {\n triggerApi({\n events: this._rdEvents,\n name: n,\n args,\n });\n });\n return this;\n }\n\n triggerApi({\n events: this._rdEvents,\n name,\n args,\n });\n\n return this;\n },\n\n triggerMethod,\n};\n","import _ from 'underscore';\nimport Backbone from 'backbone';\n\nimport getOption from '../common/get-option';\nimport mergeOptions from '../common/merge-options';\nimport normalizeMethods from '../common/normalize-methods';\nimport triggerMethod from '../common/trigger-method';\nimport {\n bindEvents,\n unbindEvents\n} from '../common/bind-events';\nimport {\n bindRequests,\n unbindRequests\n} from '../common/bind-requests';\n\nconst CommonMixin = {\n\n // Imports the \"normalizeMethods\" to transform hashes of\n // events=>function references/names to a hash of events=>function references\n normalizeMethods,\n\n _setOptions(options, classOptions) {\n this.options = _.extend({}, _.result(this, 'options'), options);\n this.mergeOptions(options, classOptions);\n },\n\n // A handy way to merge passed-in options onto the instance\n mergeOptions,\n\n // Enable getting options from this or this.options by name.\n getOption,\n\n // Enable binding view's events from another entity.\n bindEvents,\n\n // Enable unbinding view's events from another entity.\n unbindEvents,\n\n // Enable binding view's requests.\n bindRequests,\n\n // Enable unbinding view's requests.\n unbindRequests,\n\n triggerMethod\n};\n\n_.extend(CommonMixin, Backbone.Events);\n\nexport default CommonMixin;\n","export default {\n _isDestroyed: false,\n\n isDestroyed() {\n return this._isDestroyed;\n },\n\n destroy(options) {\n if (this._isDestroyed) { return this; }\n\n this.triggerMethod('before:destroy', this, options);\n this._isDestroyed = true;\n this.triggerMethod('destroy', this, options);\n this.stopListening();\n\n return this;\n }\n};\n","import _ from 'underscore';\nimport Radio from 'backbone.radio';\nimport MarionetteError from '../utils/error';\n\n// MixinOptions\n// - channelName\n// - radioEvents\n// - radioRequests\n\nexport default {\n\n _initRadio() {\n const channelName = _.result(this, 'channelName');\n\n if (!channelName) {\n return;\n }\n\n /* istanbul ignore next */\n if (!Radio) {\n throw new MarionetteError({\n message: 'The dependency \"backbone.radio\" is missing.',\n url: 'backbone.radio.html#marionette-integration'\n });\n }\n\n const channel = this._channel = Radio.channel(channelName);\n\n const radioEvents = _.result(this, 'radioEvents');\n this.bindEvents(channel, radioEvents);\n\n const radioRequests = _.result(this, 'radioRequests');\n this.bindRequests(channel, radioRequests);\n\n this.on('destroy', this._destroyRadio);\n },\n\n _destroyRadio() {\n this._channel.stopReplying(null, null, this);\n },\n\n getChannel() {\n return this._channel;\n }\n};\n","// Object\n// ------\n\nimport _ from 'underscore';\nimport extend from './utils/extend';\nimport CommonMixin from './mixins/common';\nimport DestroyMixin from './mixins/destroy';\nimport RadioMixin from './mixins/radio';\n\nconst ClassOptions = [\n 'channelName',\n 'radioEvents',\n 'radioRequests'\n];\n\n// Object borrows many conventions and utilities from Backbone.\nconst MarionetteObject = function(options) {\n this._setOptions(options, ClassOptions);\n this.cid = _.uniqueId(this.cidPrefix);\n this._initRadio();\n this.initialize.apply(this, arguments);\n};\n\nMarionetteObject.extend = extend;\n\n// Object Methods\n// --------------\n\n_.extend(MarionetteObject.prototype, CommonMixin, DestroyMixin, RadioMixin, {\n cidPrefix: 'mno',\n\n // This is a noop method intended to be overridden\n initialize() {}\n});\n\nexport default MarionetteObject;\n","// Implementation of the invoke method (http://underscorejs.org/#invoke) with support for\n// lodash v3, v4, and underscore.js\nimport _ from 'underscore';\n\nexport default _.invokeMap || _.invoke;\n","import _ from 'underscore';\nimport MarionetteError from '../utils/error';\nimport _invoke from '../utils/invoke';\n\n// MixinOptions\n// - behaviors\n\n// Takes care of getting the behavior class\n// given options and a key.\n// If a user passes in options.behaviorClass\n// default to using that.\n// If a user passes in a Behavior Class directly, use that\n// Otherwise an error is thrown\nfunction getBehaviorClass(options) {\n if (options.behaviorClass) {\n return { BehaviorClass: options.behaviorClass, options };\n }\n\n //treat functions as a Behavior constructor\n if (_.isFunction(options)) {\n return { BehaviorClass: options, options: {} };\n }\n\n throw new MarionetteError({\n message: 'Unable to get behavior class. A Behavior constructor should be passed directly or as behaviorClass property of options',\n url: 'marionette.behavior.html#defining-and-attaching-behaviors'\n });\n}\n\n// Iterate over the behaviors object, for each behavior\n// instantiate it and get its grouped behaviors.\n// This accepts a list of behaviors in either an object or array form\nfunction parseBehaviors(view, behaviors, allBehaviors) {\n return _.reduce(behaviors, (reducedBehaviors, behaviorDefiniton) => {\n const { BehaviorClass, options } = getBehaviorClass(behaviorDefiniton);\n const behavior = new BehaviorClass(options, view);\n reducedBehaviors.push(behavior);\n\n return parseBehaviors(view, _.result(behavior, 'behaviors'), reducedBehaviors);\n }, allBehaviors);\n}\n\nexport default {\n _initBehaviors() {\n this._behaviors = parseBehaviors(this, _.result(this, 'behaviors'), []);\n },\n\n _getBehaviorTriggers() {\n const triggers = _invoke(this._behaviors, '_getTriggers');\n return _.reduce(triggers, function(memo, _triggers) {\n return _.extend(memo, _triggers);\n }, {});\n },\n\n _getBehaviorEvents() {\n const events = _invoke(this._behaviors, '_getEvents');\n return _.reduce(events, function(memo, _events) {\n return _.extend(memo, _events);\n }, {});\n },\n\n // proxy behavior $el to the view's $el.\n _proxyBehaviorViewProperties() {\n _invoke(this._behaviors, 'proxyViewProperties');\n },\n\n // delegate modelEvents and collectionEvents\n _delegateBehaviorEntityEvents() {\n _invoke(this._behaviors, 'delegateEntityEvents');\n },\n\n // undelegate modelEvents and collectionEvents\n _undelegateBehaviorEntityEvents() {\n _invoke(this._behaviors, 'undelegateEntityEvents');\n },\n\n _destroyBehaviors(options) {\n // Call destroy on each behavior after\n // destroying the view.\n // This unbinds event listeners\n // that behaviors have registered for.\n _invoke(this._behaviors, 'destroy', options);\n },\n\n // Remove a behavior\n _removeBehavior(behavior) {\n // Don't worry about the clean up if the view is destroyed\n if (this._isDestroyed) { return; }\n\n // Remove behavior-only triggers and events\n this.undelegate(`.trig${ behavior.cid } .${ behavior.cid }`);\n\n this._behaviors = _.without(this._behaviors, behavior);\n },\n\n _bindBehaviorUIElements() {\n _invoke(this._behaviors, 'bindUIElements');\n },\n\n _unbindBehaviorUIElements() {\n _invoke(this._behaviors, 'unbindUIElements');\n },\n\n _triggerEventOnBehaviors(eventName, view, options) {\n _invoke(this._behaviors, 'triggerMethod', eventName, view, options);\n }\n};\n","import _ from 'underscore';\n\n// MixinOptions\n// - collectionEvents\n// - modelEvents\n\nexport default {\n // Handle `modelEvents`, and `collectionEvents` configuration\n _delegateEntityEvents(model, collection) {\n if (model) {\n this._modelEvents = _.result(this, 'modelEvents');\n this.bindEvents(model, this._modelEvents);\n }\n\n if (collection) {\n this._collectionEvents = _.result(this, 'collectionEvents');\n this.bindEvents(collection, this._collectionEvents);\n }\n },\n\n // Remove any previously delegate entity events\n _undelegateEntityEvents(model, collection) {\n if (this._modelEvents) {\n this.unbindEvents(model, this._modelEvents);\n delete this._modelEvents;\n }\n\n if (this._collectionEvents) {\n this.unbindEvents(collection, this._collectionEvents);\n delete this._collectionEvents;\n }\n },\n\n // Remove cached event handlers\n _deleteEntityEventHandlers() {\n delete this._modelEvents;\n delete this._collectionEvents;\n }\n};\n","import _ from 'underscore';\n\n// MixinOptions\n// - template\n// - templateContext\n\nexport default {\n\n // Internal method to render the template with the serialized data\n // and template context\n _renderTemplate(template) {\n // Add in entity data and template context\n const data = this.mixinTemplateContext(this.serializeData()) || {};\n\n // Render and add to el\n const html = this._renderHtml(template, data);\n if (typeof html !== 'undefined') {\n this.attachElContent(html);\n }\n },\n\n // Get the template for this view instance.\n // You can set a `template` attribute in the view definition\n // or pass a `template: TemplateFunction` parameter in\n // to the constructor options.\n getTemplate() {\n return this.template;\n },\n\n // Mix in template context methods. Looks for a\n // `templateContext` attribute, which can either be an\n // object literal, or a function that returns an object\n // literal. All methods and attributes from this object\n // are copies to the object passed in.\n mixinTemplateContext(serializedData) {\n const templateContext = _.result(this, 'templateContext');\n if (!templateContext) { return serializedData; }\n if (!serializedData) { return templateContext; }\n return _.extend({}, serializedData, templateContext);\n },\n\n // Serialize the view's model *or* collection, if\n // it exists, for the template\n serializeData() {\n // If we have a model, we serialize that\n if (this.model) {\n return this.serializeModel();\n }\n\n // Otherwise, we serialize the collection,\n // making it available under the `items` property\n if (this.collection) {\n return {\n items: this.serializeCollection()\n };\n }\n },\n\n // Prepares the special `model` property of a view\n // for being displayed in the template. Override this if\n // you need a custom transformation for your view's model\n serializeModel() {\n return this.model.attributes;\n },\n\n // Serialize a collection\n serializeCollection() {\n return _.map(this.collection.models, model => model.attributes);\n },\n\n // Renders the data into the template\n _renderHtml(template, data) {\n return template(data);\n },\n\n // Attaches the content of a given view.\n // This method can be overridden to optimize rendering,\n // or to render in a non standard way.\n //\n // For example, using `innerHTML` instead of `$el.html`\n //\n // ```js\n // attachElContent(html) {\n // this.el.innerHTML = html;\n // }\n // ```\n attachElContent(html) {\n this.Dom.setContents(this.el, html, this.$el);\n }\n};\n","import _ from 'underscore';\n// allows for the use of the @ui. syntax within\n// a given key for triggers and events\n// swaps the @ui with the associated selector.\n// Returns a new, non-mutated, parsed events hash.\nconst normalizeUIKeys = function(hash, ui) {\n return _.reduce(hash, (memo, val, key) => {\n const normalizedKey = normalizeUIString(key, ui);\n memo[normalizedKey] = val;\n return memo;\n }, {});\n};\n\nconst uiRegEx = /@ui\\.[a-zA-Z-_$0-9]*/g;\n\n// utility method for parsing @ui. syntax strings\n// into associated selector\nconst normalizeUIString = function(uiString, ui) {\n return uiString.replace(uiRegEx, (r) => {\n return ui[r.slice(4)];\n });\n};\n\n// allows for the use of the @ui. syntax within\n// a given value for regions\n// swaps the @ui with the associated selector\nconst normalizeUIValues = function(hash, ui, property) {\n _.each(hash, (val, key) => {\n if (_.isString(val)) {\n hash[key] = normalizeUIString(val, ui);\n } else if (val) {\n const propertyVal = val[property];\n if (_.isString(propertyVal)) {\n val[property] = normalizeUIString(propertyVal, ui);\n }\n }\n });\n return hash;\n};\n\nexport default {\n\n // normalize the keys of passed hash with the views `ui` selectors.\n // `{\"@ui.foo\": \"bar\"}`\n normalizeUIKeys(hash) {\n const uiBindings = this._getUIBindings();\n return normalizeUIKeys(hash, uiBindings);\n },\n\n // normalize the passed string with the views `ui` selectors.\n // `\"@ui.bar\"`\n normalizeUIString(uiString) {\n const uiBindings = this._getUIBindings();\n return normalizeUIString(uiString, uiBindings);\n },\n\n // normalize the values of passed hash with the views `ui` selectors.\n // `{foo: \"@ui.bar\"}`\n normalizeUIValues(hash, property) {\n const uiBindings = this._getUIBindings();\n return normalizeUIValues(hash, uiBindings, property);\n },\n\n _getUIBindings() {\n const uiBindings = _.result(this, '_uiBindings');\n return uiBindings || _.result(this, 'ui');\n },\n\n // This method binds the elements specified in the \"ui\" hash inside the view's code with\n // the associated jQuery selectors.\n _bindUIElements() {\n if (!this.ui) { return; }\n\n // store the ui hash in _uiBindings so they can be reset later\n // and so re-rendering the view will be able to find the bindings\n if (!this._uiBindings) {\n this._uiBindings = this.ui;\n }\n\n // get the bindings result, as a function or otherwise\n const bindings = _.result(this, '_uiBindings');\n\n // empty the ui so we don't have anything to start with\n this._ui = {};\n\n // bind each of the selectors\n _.each(bindings, (selector, key) => {\n this._ui[key] = this.$(selector);\n });\n\n this.ui = this._ui;\n },\n\n _unbindUIElements() {\n if (!this.ui || !this._uiBindings) { return; }\n\n // delete all of the existing ui bindings\n _.each(this.ui, ($el, name) => {\n delete this.ui[name];\n });\n\n // reset the ui element to the original bindings configuration\n this.ui = this._uiBindings;\n delete this._uiBindings;\n delete this._ui;\n },\n\n _getUI(name) {\n return this._ui[name];\n }\n};\n","// Add Feature flags here\n// e.g. 'class' => false\nconst FEATURES = {\n childViewEventPrefix: false,\n triggersStopPropagation: true,\n triggersPreventDefault: true,\n DEV_MODE: false\n};\n\nfunction isEnabled(name) {\n return !!FEATURES[name];\n}\n\nfunction setEnabled(name, state) {\n return FEATURES[name] = state;\n}\n\nexport {\n FEATURES,\n setEnabled,\n isEnabled\n};\n","// Event Delegator\n// ---------\nimport { each, extend } from 'underscore';\n\n// Static setter\nexport function setEventDelegator(mixin) {\n this.prototype.EventDelegator = extend({}, this.prototype.EventDelegator, mixin);\n return this;\n}\n\nexport default {\n\n shouldCapture(eventName) {\n return ['focus', 'blur'].indexOf(eventName) !== -1;\n },\n\n // this.$el.on(eventName + '.delegateEvents' + this.cid, selector, handler);\n delegate({ eventName, selector, handler, events, rootEl }) {\n const shouldCapture = this.shouldCapture(eventName);\n\n if (selector) {\n const delegateHandler = function(evt) {\n let node = evt.target;\n for (; node && node !== rootEl; node = node.parentNode) {\n if (Element.prototype.matches.call(node, selector)) {\n evt.delegateTarget = node;\n handler(evt);\n }\n }\n };\n\n events.push({ eventName, handler: delegateHandler });\n Element.prototype.addEventListener.call(rootEl, eventName, delegateHandler, shouldCapture);\n\n return;\n }\n\n events.push({ eventName, handler });\n Element.prototype.addEventListener.call(rootEl, eventName, handler, shouldCapture);\n },\n\n // this.$el.off('.delegateEvents' + this.cid);\n undelegateAll({ events, rootEl }) {\n if (!rootEl) { return; }\n\n each(events, ({ eventName, handler }) => {\n const shouldCapture = this.shouldCapture(eventName);\n Element.prototype.removeEventListener.call(rootEl, eventName, handler, shouldCapture);\n });\n\n events.length = 0;\n }\n};\n","import { isString, isFunction, result, each } from 'underscore';\nimport { isEnabled } from '../config/features';\nimport EventDelegator from '../config/event-delegator';\n\nconst delegateEventSplitter = /^(\\S+)\\s*(.*)$/;\n\n// Internal method to create an event handler for a given `triggerDef` like\n// 'click:foo'\nfunction buildViewTrigger(view, triggerDef) {\n if (isString(triggerDef)) {\n triggerDef = {event: triggerDef};\n }\n\n const eventName = triggerDef.event;\n\n let shouldPreventDefault = !!triggerDef.preventDefault;\n\n if (isEnabled('triggersPreventDefault')) {\n shouldPreventDefault = triggerDef.preventDefault !== false;\n }\n\n let shouldStopPropagation = !!triggerDef.stopPropagation;\n\n if (isEnabled('triggersStopPropagation')) {\n shouldStopPropagation = triggerDef.stopPropagation !== false;\n }\n\n return function(event, ...args) {\n if (shouldPreventDefault) {\n event.preventDefault();\n }\n\n if (shouldStopPropagation) {\n event.stopPropagation();\n }\n\n view.triggerMethod(eventName, view, event, ...args);\n };\n}\n\nexport default {\n\n EventDelegator,\n\n _initViewEvents() {\n this._domEvents = [];\n },\n\n _undelegateViewEvents() {\n this.EventDelegator.undelegateAll({\n events: this._domEvents,\n rootEl: this.el\n });\n },\n\n _delegateViewEvents(view = this) {\n const uiBindings = this._getUIBindings();\n this._delegateEvents(uiBindings);\n this._delegateTriggers(uiBindings, view);\n },\n\n _delegateEvents(uiBindings) {\n if (!this.events) { return; }\n\n each(result(this, 'events'), (handler, key) => {\n if (!isFunction(handler)) {\n handler = this[handler];\n }\n if (!handler) { return; }\n this._delegate(handler.bind(this), this.normalizeUIString(key, uiBindings));\n });\n },\n\n _delegateTriggers(uiBindings, view) {\n if (!this.triggers) { return; }\n\n each(result(this, 'triggers'), (value, key) => {\n this._delegate(buildViewTrigger(view, value), this.normalizeUIString(key, uiBindings));\n });\n },\n\n _delegate(handler, key) {\n const match = key.match(delegateEventSplitter);\n this.EventDelegator.delegate({\n eventName: match[1],\n selector: match[2],\n handler,\n events: this._domEvents,\n rootEl: this.el\n });\n }\n};\n","// DomApi\n// ---------\nimport { extend, each, keys } from 'underscore';\n\n// Static setter\nexport function setDomApi(mixin) {\n this.prototype.Dom = extend({}, this.prototype.Dom, mixin);\n return this;\n}\n\nexport default {\n // Returns a new HTML DOM node of tagName\n createElement(tagName) {\n return document.createElement(tagName);\n },\n\n // Returns a new HTML DOM node instance\n createBuffer() {\n return document.createDocumentFragment();\n },\n\n // Returns the document element for a given DOM element\n getDocumentEl(el) {\n return el.ownerDocument.documentElement;\n },\n\n // Finds the `selector` string with the el\n // Returns an array-like object of nodes\n findEl(el, selector) {\n return el.querySelectorAll(selector);\n },\n\n // Returns true if the el contains the node childEl\n hasEl(el, childEl) {\n return el.contains(childEl && childEl.parentNode);\n },\n\n // Detach `el` from the DOM without removing listeners\n detachEl(el) {\n if (el.parentNode) {el.parentNode.removeChild(el);}\n },\n\n // Remove `oldEl` from the DOM and put `newEl` in its place\n replaceEl(newEl, oldEl) {\n if (newEl === oldEl) {\n return;\n }\n\n const parent = oldEl.parentNode;\n\n if (!parent) {\n return;\n }\n\n parent.replaceChild(newEl, oldEl);\n },\n\n // Swaps the location of `el1` and `el2` in the DOM\n swapEl(el1, el2) {\n if (el1 === el2) {\n return;\n }\n\n const parent1 = el1.parentNode;\n const parent2 = el2.parentNode;\n\n if (!parent1 || !parent2) {\n return;\n }\n\n const next1 = el1.nextSibling;\n const next2 = el2.nextSibling;\n\n parent1.insertBefore(el2, next1);\n parent2.insertBefore(el1, next2);\n },\n\n // Replace the contents of `el` with the `html`\n setContents(el, html) {\n el.innerHTML = html\n },\n\n // Sets attributes on a DOM node\n setAttributes(el, attrs) {\n each(keys(attrs), attr => {\n attr in el ? el[attr] = attrs[attr] : el.setAttribute(attr, attrs[attr]);\n });\n },\n\n // Takes the DOM node `el` and appends the DOM node `contents`\n // to the end of the element's contents.\n appendContents(el, contents) {\n el.appendChild(contents);\n },\n\n // Does the el have child nodes\n hasContents(el) {\n return !!el && el.hasChildNodes();\n },\n\n // Remove the inner contents of `el` from the DOM while leaving\n // `el` itself in the DOM.\n detachContents(el) {\n el.textContent = '';\n }\n};\n","// ViewMixin\n// ---------\n\nimport { extend, result } from 'underscore';\nimport BehaviorsMixin from './behaviors';\nimport CommonMixin from './common';\nimport DelegateEntityEventsMixin from './delegate-entity-events';\nimport TemplateRenderMixin from './template-render';\nimport UIMixin from './ui';\nimport ViewEvents from './view-events';\nimport { isEnabled } from '../config/features';\nimport DomApi from '../config/dom';\n\n\n// MixinOptions\n// - attributes\n// - behaviors\n// - childViewEventPrefix\n// - childViewEvents\n// - childViewTriggers\n// - className\n// - collection\n// - collectionEvents\n// - el\n// - events\n// - id\n// - model\n// - modelEvents\n// - tagName\n// - triggers\n// - ui\n\n\nconst ViewMixin = {\n tagName: 'div',\n\n // This is a noop method intended to be overridden\n preinitialize() {},\n\n Dom: DomApi,\n\n // Create an element from the `id`, `className` and `tagName` properties.\n _getEl() {\n if (!this.el) {\n const el = this.Dom.createElement(result(this, 'tagName'));\n const attrs = extend({}, result(this, 'attributes'));\n if (this.id) {attrs.id = result(this, 'id');}\n if (this.className) {attrs.class = result(this, 'className');}\n this.Dom.setAttributes(el, attrs);\n return el;\n }\n\n return result(this, 'el');\n },\n\n $(selector) {\n return this.Dom.findEl(this.el, selector)\n },\n\n _isElAttached() {\n return !!this.el && this.Dom.hasEl(this.Dom.getDocumentEl(this.el), this.el);\n },\n\n supportsRenderLifecycle: true,\n supportsDestroyLifecycle: true,\n\n _isDestroyed: false,\n\n isDestroyed() {\n return !!this._isDestroyed;\n },\n\n _isRendered: false,\n\n isRendered() {\n return !!this._isRendered;\n },\n\n _isAttached: false,\n\n isAttached() {\n return !!this._isAttached;\n },\n\n // Handle `modelEvents`, and `collectionEvents` configuration\n delegateEntityEvents() {\n this._delegateEntityEvents(this.model, this.collection);\n\n // bind each behaviors model and collection events\n this._delegateBehaviorEntityEvents();\n\n return this;\n },\n\n // Handle unbinding `modelEvents`, and `collectionEvents` configuration\n undelegateEntityEvents() {\n this._undelegateEntityEvents(this.model, this.collection);\n\n // unbind each behaviors model and collection events\n this._undelegateBehaviorEntityEvents();\n\n return this;\n },\n\n // Handle destroying the view and its children.\n destroy(options) {\n if (this._isDestroyed || this._isDestroying) { return this; }\n this._isDestroying = true;\n const shouldTriggerDetach = this._isAttached && !this._disableDetachEvents;\n\n this.triggerMethod('before:destroy', this, options);\n if (shouldTriggerDetach) {\n this.triggerMethod('before:detach', this);\n }\n\n // unbind UI elements\n this.unbindUIElements();\n this._undelegateViewEvents();\n\n // remove the view from the DOM\n this.Dom.detachEl(this.el);\n\n if (shouldTriggerDetach) {\n this._isAttached = false;\n this.triggerMethod('detach', this);\n }\n\n // remove children after the remove to prevent extra paints\n this._removeChildren();\n\n this._isDestroyed = true;\n this._isRendered = false;\n\n // Destroy behaviors after _isDestroyed flag\n this._destroyBehaviors(options);\n\n this._deleteEntityEventHandlers();\n\n this.triggerMethod('destroy', this, options);\n this._triggerEventOnBehaviors('destroy', this, options);\n\n this.stopListening();\n\n return this;\n },\n\n // This method binds the elements specified in the \"ui\" hash\n bindUIElements() {\n this._bindUIElements();\n this._bindBehaviorUIElements();\n\n return this;\n },\n\n // This method unbinds the elements specified in the \"ui\" hash\n unbindUIElements() {\n this._unbindUIElements();\n this._unbindBehaviorUIElements();\n\n return this;\n },\n\n getUI(name) {\n return this._getUI(name);\n },\n\n // Cache `childViewEvents` and `childViewTriggers`\n _buildEventProxies() {\n this._childViewEvents = this.normalizeMethods(result(this, 'childViewEvents'));\n this._childViewTriggers = result(this, 'childViewTriggers');\n this._eventPrefix = this._getEventPrefix();\n },\n\n _getEventPrefix() {\n const defaultPrefix = isEnabled('childViewEventPrefix') ? 'childview' : false;\n const prefix = result(this, 'childViewEventPrefix', defaultPrefix);\n\n return (prefix === false) ? prefix : prefix + ':';\n },\n\n _proxyChildViewEvents(view) {\n if (this._childViewEvents || this._childViewTriggers || this._eventPrefix) {\n this.listenTo(view, 'all', this._childViewEventHandler);\n }\n },\n\n _childViewEventHandler(eventName, ...args) {\n const childViewEvents = this._childViewEvents;\n\n // call collectionView childViewEvent if defined\n if (childViewEvents && childViewEvents[eventName]) {\n childViewEvents[eventName].apply(this, args);\n }\n\n // use the parent view's proxyEvent handlers\n const childViewTriggers = this._childViewTriggers;\n\n // Call the event with the proxy name on the parent layout\n if (childViewTriggers && childViewTriggers[eventName]) {\n this.triggerMethod(childViewTriggers[eventName], ...args);\n }\n\n if (this._eventPrefix) {\n this.triggerMethod(this._eventPrefix + eventName, ...args);\n }\n }\n};\n\nextend(ViewMixin, BehaviorsMixin, CommonMixin, DelegateEntityEventsMixin, TemplateRenderMixin, UIMixin, ViewEvents);\n\nexport default ViewMixin;\n","export function isView(view) {\n return view.render && (view.destroy || view.remove);\n}\n\nexport function isViewClass(ViewClass) {\n return ViewClass.prototype.render && (ViewClass.prototype.destroy || ViewClass.prototype.remove);\n}\n\nexport function renderView(view) {\n if (view._isRendered) {\n return;\n }\n\n if (!view.supportsRenderLifecycle) {\n view.triggerMethod('before:render', view);\n }\n\n view.render();\n view._isRendered = true;\n\n if (!view.supportsRenderLifecycle) {\n view.triggerMethod('render', view);\n }\n}\n\nexport function destroyView(view, disableDetachEvents) {\n if (view.destroy) {\n // Attach flag for public destroy function internal check\n view._disableDetachEvents = disableDetachEvents;\n view.destroy();\n return;\n }\n\n // Destroy for non-Marionette Views\n if (!view.supportsDestroyLifecycle) {\n view.triggerMethod('before:destroy', view);\n }\n\n const shouldTriggerDetach = view._isAttached && !disableDetachEvents;\n\n if (shouldTriggerDetach) {\n view.triggerMethod('before:detach', view);\n }\n\n view.remove();\n\n if (shouldTriggerDetach) {\n view._isAttached = false;\n view.triggerMethod('detach', view);\n }\n\n view._isDestroyed = true;\n\n if (!view.supportsDestroyLifecycle) {\n view.triggerMethod('destroy', view);\n }\n}\n","// Region\n// ------\n\nimport { extend as _extend, uniqueId, isObject, isFunction, result } from 'underscore';\nimport MarionetteError from './utils/error';\nimport extend from './utils/extend';\nimport monitorViewEvents from './common/monitor-view-events';\nimport { renderView, destroyView, isView } from './common/view';\nimport CommonMixin from './mixins/common';\nimport View from './view';\nimport DomApi, { setDomApi } from './config/dom';\n\nconst classErrorName = 'RegionError';\n\nconst ClassOptions = [\n 'allowMissingEl',\n 'parentEl',\n 'replaceElement'\n];\n\nconst Region = function(options) {\n this._setOptions(options, ClassOptions);\n\n this.cid = uniqueId(this.cidPrefix);\n\n // getOption necessary because options.el may be passed as undefined\n this._initEl = this.el = this.getOption('el');\n\n this.initialize.apply(this, arguments);\n};\n\nRegion.extend = extend;\nRegion.setDomApi = setDomApi;\n\n// Region Methods\n// --------------\n\n_extend(Region.prototype, CommonMixin, {\n Dom: DomApi,\n\n cidPrefix: 'mnr',\n replaceElement: false,\n _isReplaced: false,\n _isSwappingView: false,\n\n // Displays a view instance inside of the region. If necessary handles calling the `render`\n // method for you. Reads content directly from the `el` attribute.\n show(view, options) {\n if (!this._ensureElement(options)) {\n return;\n }\n\n view = this._getView(view, options);\n\n if (view === this.currentView) { return this; }\n\n if (view._isShown) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'View is already shown in a Region or CollectionView',\n url: 'marionette.region.html#showing-a-view'\n });\n }\n\n this._isSwappingView = !!this.currentView;\n\n this.triggerMethod('before:show', this, view, options);\n\n // Assume an attached view is already in the region for pre-existing DOM\n if (this.currentView || !view._isAttached) {\n this.empty(options);\n }\n\n this._setupChildView(view);\n\n this.currentView = view;\n\n renderView(view);\n\n this._attachView(view, options);\n\n this.triggerMethod('show', this, view, options);\n\n this._isSwappingView = false;\n\n return this;\n },\n\n _setEl(el) {\n if (isObject(el)) {\n this.el = el;\n return;\n }\n\n if (!el) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'An \"el\" must be specified for a region.',\n url: 'marionette.region.html#additional-options'\n });\n }\n\n this.el = this.getEl(el);\n },\n\n // Set the `el` of the region and move any current view to the new `el`.\n _setElement(el) {\n if (el === this.el) { return this; }\n\n const shouldReplace = this._isReplaced;\n\n this._restoreEl();\n\n this._setEl(el);\n\n if (this.currentView) {\n const view = this.currentView;\n\n if (shouldReplace) {\n this._replaceEl(view);\n } else {\n this.attachHtml(view);\n }\n }\n\n return this;\n },\n\n _setupChildView(view) {\n monitorViewEvents(view);\n\n this._proxyChildViewEvents(view);\n\n // We need to listen for if a view is destroyed in a way other than through the region.\n // If this happens we need to remove the reference to the currentView since once a view\n // has been destroyed we can not reuse it.\n view.on('destroy', this._empty, this);\n },\n\n _proxyChildViewEvents(view) {\n const parentView = this._parentView;\n\n if (!parentView) { return; }\n\n parentView._proxyChildViewEvents(view);\n },\n\n // If the regions parent view is not monitoring its attach/detach events\n _shouldDisableMonitoring() {\n return this._parentView && this._parentView.monitorViewEvents === false;\n },\n\n _isElAttached() {\n return this.Dom.hasEl(this.Dom.getDocumentEl(this.el), this.el);\n },\n\n _attachView(view, { replaceElement } = {}) {\n const shouldTriggerAttach = !view._isAttached && this._isElAttached() && !this._shouldDisableMonitoring();\n const shouldReplaceEl = typeof replaceElement === 'undefined' ? !!result(this, 'replaceElement') : !!replaceElement;\n\n if (shouldTriggerAttach) {\n view.triggerMethod('before:attach', view);\n }\n\n if (shouldReplaceEl) {\n this._replaceEl(view);\n } else {\n this.attachHtml(view);\n }\n\n if (shouldTriggerAttach) {\n view._isAttached = true;\n view.triggerMethod('attach', view);\n }\n\n // Corresponds that view is shown in a marionette Region or CollectionView\n view._isShown = true;\n },\n\n _ensureElement(options = {}) {\n this._setEl(this.el);\n\n if (!this.el) {\n const allowMissingEl = typeof options.allowMissingEl === 'undefined' ? !!result(this, 'allowMissingEl') : !!options.allowMissingEl;\n\n if (allowMissingEl) {\n return false;\n } else {\n throw new MarionetteError({\n name: classErrorName,\n message: `An \"el\" must exist in DOM for this region ${this.cid}`,\n url: 'marionette.region.html#additional-options'\n });\n }\n }\n return true;\n },\n\n _getView(view) {\n if (!view) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'The view passed is undefined and therefore invalid. You must pass a view instance to show.',\n url: 'marionette.region.html#showing-a-view'\n });\n }\n\n if (view._isDestroyed) {\n throw new MarionetteError({\n name: classErrorName,\n message: `View (cid: \"${view.cid}\") has already been destroyed and cannot be used.`,\n url: 'marionette.region.html#showing-a-view'\n });\n }\n\n if (isView(view)) {\n return view;\n }\n\n const viewOptions = this._getViewOptions(view);\n\n return new View(viewOptions);\n },\n\n // This allows for a template or a static string to be\n // used as a template\n _getViewOptions(viewOptions) {\n if (isFunction(viewOptions)) {\n return { template: viewOptions };\n }\n\n if (isObject(viewOptions)) {\n return viewOptions;\n }\n\n const template = function() { return viewOptions; };\n\n return { template };\n },\n\n // Override this method to change how the region finds the DOM element that it manages. Return\n // a jQuery selector object scoped to a provided parent el or the document if none exists.\n getEl(el) {\n const context = result(this, 'parentEl');\n\n return this.Dom.findEl(context || document, el)[0];\n },\n\n _replaceEl(view) {\n // Always restore the el to ensure the regions el is present before replacing\n this._restoreEl();\n\n view.on('before:destroy', this._restoreEl, this);\n\n this.Dom.replaceEl(view.el, this.el);\n\n this._isReplaced = true;\n },\n\n // Restore the region's element in the DOM.\n _restoreEl() {\n // There is nothing to replace\n if (!this._isReplaced) {\n return;\n }\n\n const view = this.currentView;\n\n if (!view) {\n return;\n }\n\n this._detachView(view);\n\n this._isReplaced = false;\n },\n\n // Check to see if the region's el was replaced.\n isReplaced() {\n return !!this._isReplaced;\n },\n\n // Check to see if a view is being swapped by another\n isSwappingView() {\n return !!this._isSwappingView;\n },\n\n // Override this method to change how the new view is appended to the `$el` that the\n // region is managing\n attachHtml(view) {\n this.Dom.appendContents(this.el, view.el);\n },\n\n // Destroy the current view, if there is one. If there is no current view,\n // it will detach any html inside the region's `el`.\n empty(options = { allowMissingEl: true }) {\n const view = this.currentView;\n\n // If there is no view in the region we should only detach current html\n if (!view) {\n if (this._ensureElement(options)) {\n this.detachHtml();\n }\n return this;\n }\n\n this._empty(view, true);\n return this;\n },\n\n _empty(view, shouldDestroy) {\n view.off('destroy', this._empty, this);\n this.triggerMethod('before:empty', this, view);\n\n this._restoreEl();\n\n delete this.currentView;\n\n if (!view._isDestroyed) {\n if (shouldDestroy) {\n this.removeView(view);\n } else {\n this._detachView(view);\n }\n view._isShown = false;\n this._stopChildViewEvents(view);\n }\n\n this.triggerMethod('empty', this, view);\n },\n\n _stopChildViewEvents(view) {\n const parentView = this._parentView;\n\n if (!parentView) { return; }\n\n this._parentView.stopListening(view);\n },\n\n // Non-Marionette safe view.destroy\n destroyView(view) {\n if (view._isDestroyed) {\n return view;\n }\n\n destroyView(view, this._shouldDisableMonitoring());\n return view;\n },\n\n // Override this method to determine what happens when the view\n // is removed from the region when the view is not being detached\n removeView(view) {\n this.destroyView(view);\n },\n\n // Empties the Region without destroying the view\n // Returns the detached view\n detachView() {\n const view = this.currentView;\n\n if (!view) {\n return;\n }\n\n this._empty(view);\n\n return view;\n },\n\n _detachView(view) {\n const shouldTriggerDetach = view._isAttached && !this._shouldDisableMonitoring();\n const shouldRestoreEl = this._isReplaced;\n if (shouldTriggerDetach) {\n view.triggerMethod('before:detach', view);\n }\n\n if (shouldRestoreEl) {\n this.Dom.replaceEl(this.el, view.el);\n } else {\n this.detachHtml();\n }\n\n if (shouldTriggerDetach) {\n view._isAttached = false;\n view.triggerMethod('detach', view);\n }\n },\n\n // Override this method to change how the region detaches current content\n detachHtml() {\n this.Dom.detachContents(this.el);\n },\n\n // Checks whether a view is currently present within the region. Returns `true` if there is\n // and `false` if no view is present.\n hasView() {\n return !!this.currentView;\n },\n\n // Reset the region by destroying any existing view and clearing out the cached `$el`.\n // The next time a view is shown via this region, the region will re-query the DOM for\n // the region's `el`.\n reset(options) {\n this.empty(options);\n\n this.el = this._initEl;\n\n delete this.$el;\n return this;\n },\n\n _isDestroyed: false,\n\n isDestroyed() {\n return this._isDestroyed;\n },\n\n // Destroy the region, remove any child view\n // and remove the region from any associated view\n destroy(options) {\n if (this._isDestroyed) { return this; }\n\n this.triggerMethod('before:destroy', this, options);\n this._isDestroyed = true;\n\n this.reset(options);\n\n if (this._name) {\n this._parentView._removeReferences(this._name);\n }\n delete this._parentView;\n delete this._name;\n\n this.triggerMethod('destroy', this, options);\n this.stopListening();\n\n return this;\n }\n});\n\nexport default Region;\n","import _ from 'underscore';\nimport MarionetteError from '../utils/error';\nimport Region from '../region';\n\n// return the region instance from the definition\nexport default function(definition, defaults) {\n if (definition instanceof Region) {\n return definition;\n }\n\n if (_.isString(definition)) {\n return buildRegionFromObject(defaults, { el: definition });\n }\n\n if (_.isFunction(definition)) {\n return buildRegionFromObject(defaults, { regionClass: definition });\n }\n\n if (_.isObject(definition)) {\n return buildRegionFromObject(defaults, definition);\n }\n\n throw new MarionetteError({\n message: 'Improper region configuration type.',\n url: 'marionette.region.html#defining-regions'\n });\n}\n\nfunction buildRegionFromObject(defaults, definition) {\n const options = _.extend({}, defaults, definition);\n\n const RegionClass = options.regionClass\n\n delete options.regionClass;\n\n return new RegionClass(options);\n}\n","import _ from 'underscore';\nimport _invoke from '../utils/invoke';\nimport buildRegion from '../common/build-region';\nimport Region from '../region';\n\n// MixinOptions\n// - regions\n// - regionClass\n\nexport default {\n regionClass: Region,\n\n // Internal method to initialize the regions that have been defined in a\n // `regions` attribute on this View.\n _initRegions() {\n\n // init regions hash\n this.regions = this.regions || {};\n this._regions = {};\n\n this.addRegions(_.result(this, 'regions'));\n },\n\n // Internal method to re-initialize all of the regions by updating\n // the `el` that they point to\n _reInitRegions() {\n _invoke(this._regions, 'reset');\n },\n\n // Add a single region, by name, to the View\n addRegion(name, definition) {\n const regions = {};\n regions[name] = definition;\n return this.addRegions(regions)[name];\n },\n\n // Add multiple regions as a {name: definition, name2: def2} object literal\n addRegions(regions) {\n // If there's nothing to add, stop here.\n if (_.isEmpty(regions)) {\n return;\n }\n\n // Normalize region selectors hash to allow\n // a user to use the @ui. syntax.\n regions = this.normalizeUIValues(regions, 'el');\n\n // Add the regions definitions to the regions property\n this.regions = _.extend({}, this.regions, regions);\n\n return this._addRegions(regions);\n },\n\n // internal method to build and add regions\n _addRegions(regionDefinitions) {\n const defaults = {\n regionClass: this.regionClass,\n parentEl: _.partial(_.result, this, 'el')\n };\n\n return _.reduce(regionDefinitions, (regions, definition, name) => {\n regions[name] = buildRegion(definition, defaults);\n this._addRegion(regions[name], name);\n return regions;\n }, {});\n },\n\n _addRegion(region, name) {\n this.triggerMethod('before:add:region', this, name, region);\n\n region._parentView = this;\n region._name = name;\n\n this._regions[name] = region;\n\n this.triggerMethod('add:region', this, name, region);\n },\n\n // Remove a single region from the View, by name\n removeRegion(name) {\n const region = this._regions[name];\n\n this._removeRegion(region, name);\n\n return region;\n },\n\n // Remove all regions from the View\n removeRegions() {\n const regions = this._getRegions();\n\n _.each(this._regions, this._removeRegion.bind(this));\n\n return regions;\n },\n\n _removeRegion(region, name) {\n this.triggerMethod('before:remove:region', this, name, region);\n\n region.destroy();\n\n this.triggerMethod('remove:region', this, name, region);\n },\n\n // Called in a region's destroy\n _removeReferences(name) {\n delete this.regions[name];\n delete this._regions[name];\n },\n\n // Empty all regions in the region manager, but\n // leave them attached\n emptyRegions() {\n const regions = this.getRegions();\n _invoke(regions, 'empty');\n return regions;\n },\n\n // Checks to see if view contains region\n // Accepts the region name\n // hasRegion('main')\n hasRegion(name) {\n return !!this.getRegion(name);\n },\n\n // Provides access to regions\n // Accepts the region name\n // getRegion('main')\n getRegion(name) {\n if (!this._isRendered) {\n this.render();\n }\n return this._regions[name];\n },\n\n _getRegions() {\n return _.clone(this._regions);\n },\n\n // Get all regions\n getRegions() {\n if (!this._isRendered) {\n this.render();\n }\n return this._getRegions();\n },\n\n showChildView(name, view, options) {\n const region = this.getRegion(name);\n region.show(view, options);\n return view;\n },\n\n detachChildView(name) {\n return this.getRegion(name).detachView();\n },\n\n getChildView(name) {\n return this.getRegion(name).currentView;\n }\n\n};\n","// Static setter for the renderer\nexport function setRenderer(renderer) {\n this.prototype._renderHtml = renderer;\n return this;\n}\n","// View\n// ---------\n\nimport { extend as _extend, uniqueId, reduce } from 'underscore';\nimport extend from './utils/extend';\nimport monitorViewEvents from './common/monitor-view-events';\nimport ViewMixin from './mixins/view';\nimport RegionsMixin from './mixins/regions';\nimport { setDomApi } from './config/dom';\nimport { setEventDelegator } from './config/event-delegator';\nimport { setRenderer } from './config/renderer';\n\nconst ClassOptions = [\n 'attributes',\n 'behaviors',\n 'childViewEventPrefix',\n 'childViewEvents',\n 'childViewTriggers',\n 'className',\n 'collection',\n 'collectionEvents',\n 'el',\n 'events',\n 'id',\n 'model',\n 'modelEvents',\n 'regionClass',\n 'regions',\n 'tagName',\n 'template',\n 'templateContext',\n 'triggers',\n 'ui'\n];\n\n// Used by _getImmediateChildren\nfunction childReducer(children, region) {\n if (region.currentView) {\n children.push(region.currentView);\n }\n\n return children;\n}\n\n// The standard view. Includes view events, automatic rendering\n// templates, nested views, and more.\nconst View = function(options) {\n this.cid = uniqueId(this.cidPrefix);\n this._setOptions(options, ClassOptions);\n\n this.preinitialize.apply(this, arguments);\n\n this._initViewEvents();\n this.setElement(this._getEl());\n\n monitorViewEvents(this);\n\n this._initBehaviors();\n this._initRegions();\n this._buildEventProxies();\n\n this.initialize.apply(this, arguments);\n\n this.delegateEntityEvents();\n\n this._triggerEventOnBehaviors('initialize', this, options);\n};\n\n_extend(View, { extend, setRenderer, setDomApi, setEventDelegator });\n\n_extend(View.prototype, ViewMixin, RegionsMixin, {\n cidPrefix: 'mnv',\n\n setElement(element) {\n this._undelegateViewEvents();\n this.el = element;\n this._setBehaviorElements();\n\n this._isRendered = this.Dom.hasContents(this.el);\n this._isAttached = this._isElAttached();\n\n if (this._isRendered) {\n this.bindUIElements();\n }\n\n this._delegateViewEvents();\n\n return this;\n },\n\n // If a template is available, renders it into the view's `el`\n // Re-inits regions and binds UI.\n render() {\n const template = this.getTemplate();\n\n if (template === false || this._isDestroyed) { return this; }\n\n this.triggerMethod('before:render', this);\n\n // If this is not the first render call, then we need to\n // re-initialize the `el` for each region\n if (this._isRendered) {\n this._reInitRegions();\n }\n\n this._renderTemplate(template);\n this.bindUIElements();\n\n this._isRendered = true;\n this.triggerMethod('render', this);\n\n return this;\n },\n\n // called by ViewMixin destroy\n _removeChildren() {\n this.removeRegions();\n },\n\n _getImmediateChildren() {\n return reduce(this._regions, childReducer, []);\n }\n});\n\nexport default View;\n","import _ from 'underscore';\n\n// Provide a container to store, retrieve and\n// shut down child views.\nconst Container = function() {\n this._init();\n};\n\n// Mix in methods from Underscore, for iteration, and other\n// collection related features.\n// Borrowing this code from Backbone.Collection:\n// https://github.com/jashkenas/backbone/blob/1.1.2/backbone.js#L962\nconst methods = ['forEach', 'each', 'map', 'find', 'detect', 'filter',\n 'select', 'reject', 'every', 'all', 'some', 'any', 'include',\n 'contains', 'invoke', 'toArray', 'first', 'initial', 'rest',\n 'last', 'without', 'isEmpty', 'pluck', 'reduce', 'partition'];\n\n_.each(methods, function(method) {\n Container.prototype[method] = function(...args) {\n return _[method].apply(_, [this._views].concat(args));\n };\n});\n\nfunction stringComparator(comparator, view) {\n return view.model && view.model.get(comparator);\n}\n\n// Container Methods\n// -----------------\n\n_.extend(Container.prototype, {\n\n // Initializes an empty container\n _init() {\n this._views = [];\n this._viewsByCid = {};\n this._indexByModel = {};\n this._updateLength();\n },\n\n // Add a view to this container. Stores the view\n // by `cid` and makes it searchable by the model\n // cid (and model itself). Additionally it stores\n // the view by index in the _views array\n _add(view, index = this._views.length) {\n this._addViewIndexes(view);\n\n // add to end by default\n this._views.splice(index, 0, view);\n\n this._updateLength();\n },\n\n _addViewIndexes(view) {\n // store the view\n this._viewsByCid[view.cid] = view;\n\n // index it by model\n if (view.model) {\n this._indexByModel[view.model.cid] = view;\n }\n },\n\n // Sort (mutate) and return the array of the child views.\n _sort(comparator, context) {\n if (typeof comparator === 'string') {\n comparator = _.partial(stringComparator, comparator);\n return this._sortBy(comparator);\n }\n\n if (comparator.length === 1) {\n return this._sortBy(comparator.bind(context));\n }\n\n return this._views.sort(comparator.bind(context));\n },\n\n // Makes `_.sortBy` mutate the array to match `this._views.sort`\n _sortBy(comparator) {\n const sortedViews = _.sortBy(this._views, comparator);\n\n this._set(sortedViews);\n\n return sortedViews;\n },\n\n // Replace array contents without overwriting the reference.\n // Should not add/remove views\n _set(views, shouldReset) {\n this._views.length = 0;\n\n this._views.push.apply(this._views, views.slice(0));\n\n if (shouldReset) {\n this._viewsByCid = {};\n this._indexByModel = {};\n\n _.each(views, this._addViewIndexes.bind(this));\n\n this._updateLength();\n }\n },\n\n // Swap views by index\n _swap(view1, view2) {\n const view1Index = this.findIndexByView(view1);\n const view2Index = this.findIndexByView(view2);\n\n if (view1Index === -1 || view2Index === -1) {\n return;\n }\n\n const swapView = this._views[view1Index];\n this._views[view1Index] = this._views[view2Index];\n this._views[view2Index] = swapView;\n },\n\n // Find a view by the model that was attached to it.\n // Uses the model's `cid` to find it.\n findByModel(model) {\n return this.findByModelCid(model.cid);\n },\n\n // Find a view by the `cid` of the model that was attached to it.\n findByModelCid(modelCid) {\n return this._indexByModel[modelCid];\n },\n\n // Find a view by index.\n findByIndex(index) {\n return this._views[index];\n },\n\n // Find the index of a view instance\n findIndexByView(view) {\n return this._views.indexOf(view);\n },\n\n // Retrieve a view by its `cid` directly\n findByCid(cid) {\n return this._viewsByCid[cid];\n },\n\n hasView(view) {\n return !!this.findByCid(view.cid);\n },\n\n // Remove a view and clean up index references.\n _remove(view) {\n if (!this._viewsByCid[view.cid]) {\n return;\n }\n\n // delete model index\n if (view.model) {\n delete this._indexByModel[view.model.cid];\n }\n\n // remove the view from the container\n delete this._viewsByCid[view.cid];\n\n const index = this.findIndexByView(view);\n this._views.splice(index, 1);\n\n this._updateLength();\n },\n\n // Update the `.length` attribute on this container\n _updateLength() {\n this.length = this._views.length;\n }\n});\n\nexport default Container;\n","// Collection View\n// ---------------\n\nimport { extend as _extend, uniqueId, result, map, isFunction, isObject, isString, matches, each, reduce } from 'underscore';\nimport extend from './utils/extend';\nimport MarionetteError from './utils/error';\nimport { renderView, destroyView, isViewClass } from './common/view';\nimport monitorViewEvents from './common/monitor-view-events';\nimport ChildViewContainer from './child-view-container';\nimport Region from './region';\nimport ViewMixin from './mixins/view';\nimport { setDomApi } from './config/dom';\nimport { setEventDelegator } from './config/event-delegator';\nimport { setRenderer } from './config/renderer';\n\nconst classErrorName = 'CollectionViewError';\n\nconst ClassOptions = [\n 'attributes',\n 'behaviors',\n 'childView',\n 'childViewContainer',\n 'childViewEventPrefix',\n 'childViewEvents',\n 'childViewOptions',\n 'childViewTriggers',\n 'className',\n 'collection',\n 'collectionEvents',\n 'el',\n 'emptyView',\n 'emptyViewOptions',\n 'events',\n 'id',\n 'model',\n 'modelEvents',\n 'sortWithCollection',\n 'tagName',\n 'template',\n 'templateContext',\n 'triggers',\n 'ui',\n 'viewComparator',\n 'viewFilter'\n];\n\n// A view that iterates over a Backbone.Collection\n// and renders an individual child view for each model.\nconst CollectionView = function(options) {\n this.cid = uniqueId(this.cidPrefix);\n this._setOptions(options, ClassOptions);\n\n this.preinitialize.apply(this, arguments);\n\n this._initViewEvents();\n this.setElement(this._getEl());\n\n monitorViewEvents(this);\n\n this._initChildViewStorage();\n this._initBehaviors();\n this._buildEventProxies();\n\n // Init empty region\n this.getEmptyRegion();\n\n this.initialize.apply(this, arguments);\n\n this.delegateEntityEvents();\n\n this._triggerEventOnBehaviors('initialize', this, options);\n};\n\n_extend(CollectionView, { extend, setRenderer, setDomApi, setEventDelegator });\n\n_extend(CollectionView.prototype, ViewMixin, {\n cidPrefix: 'mncv',\n\n // flag for maintaining the sorted order of the collection\n sortWithCollection: true,\n\n // Internal method to set up the `children` object for storing all of the child views\n // `_children` represents all child views\n // `children` represents only views filtered to be shown\n _initChildViewStorage() {\n this._children = new ChildViewContainer();\n this.children = new ChildViewContainer();\n },\n\n // Create an region to show the emptyView\n getEmptyRegion() {\n const emptyEl = this.container || this.el;\n\n if (this._emptyRegion && !this._emptyRegion.isDestroyed()) {\n this._emptyRegion._setElement(emptyEl);\n return this._emptyRegion;\n }\n\n this._emptyRegion = new Region({ el: emptyEl, replaceElement: false });\n\n this._emptyRegion._parentView = this;\n\n return this._emptyRegion;\n },\n\n // Configured the initial events that the collection view binds to.\n _initialEvents() {\n if (this._isRendered) { return; }\n\n this.listenTo(this.collection, {\n 'sort': this._onCollectionSort,\n 'reset': this._onCollectionReset,\n 'update': this._onCollectionUpdate\n });\n },\n\n // Internal method. This checks for any changes in the order of the collection.\n // If the index of any view doesn't match, it will re-sort.\n _onCollectionSort(collection, { add, merge, remove }) {\n if (!this.sortWithCollection || this.viewComparator === false) {\n return;\n }\n\n // If the data is changing we will handle the sort later in `_onCollectionUpdate`\n if (add || remove || merge) {\n return;\n }\n\n // If the only thing happening here is sorting, sort.\n this.sort();\n },\n\n _onCollectionReset() {\n this._destroyChildren();\n\n this._addChildModels(this.collection.models);\n\n this.sort();\n },\n\n // Handle collection update model additions and removals\n _onCollectionUpdate(collection, options) {\n const changes = options.changes;\n\n // Remove first since it'll be a shorter array lookup.\n const removedViews = changes.removed.length && this._removeChildModels(changes.removed);\n\n this._addedViews = changes.added.length && this._addChildModels(changes.added);\n\n this._detachChildren(removedViews);\n\n this.sort();\n\n // Destroy removed child views after all of the render is complete\n this._removeChildViews(removedViews);\n },\n\n _removeChildModels(models) {\n return reduce(models, (views, model) => {\n const removeView = this._removeChildModel(model);\n\n if (removeView) { views.push(removeView); }\n\n return views;\n }, []);\n },\n\n _removeChildModel(model) {\n const view = this._children.findByModel(model);\n\n if (view) { this._removeChild(view); }\n\n return view;\n },\n\n _removeChild(view) {\n this.triggerMethod('before:remove:child', this, view);\n\n this.children._remove(view);\n this._children._remove(view);\n\n this.triggerMethod('remove:child', this, view);\n },\n\n // Added views are returned for consistency with _removeChildModels\n _addChildModels(models) {\n return map(models, this._addChildModel.bind(this));\n },\n\n _addChildModel(model) {\n const view = this._createChildView(model);\n\n this._addChild(view);\n\n return view;\n },\n\n _createChildView(model) {\n const ChildView = this._getChildView(model);\n const childViewOptions = this._getChildViewOptions(model);\n const view = this.buildChildView(model, ChildView, childViewOptions);\n\n return view;\n },\n\n _addChild(view, index) {\n this.triggerMethod('before:add:child', this, view);\n\n this._setupChildView(view);\n this._children._add(view, index);\n this.children._add(view, index);\n\n this.triggerMethod('add:child', this, view);\n },\n\n // Retrieve the `childView` class\n // The `childView` property can be either a view class or a function that\n // returns a view class. If it is a function, it will receive the model that\n // will be passed to the view instance (created from the returned view class)\n _getChildView(child) {\n let childView = this.childView;\n\n if (!childView) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'A \"childView\" must be specified',\n url: 'marionette.collectionview.html#collectionviews-childview'\n });\n }\n\n childView = this._getView(childView, child);\n\n if (!childView) {\n throw new MarionetteError({\n name: classErrorName,\n message: '\"childView\" must be a view class or a function that returns a view class',\n url: 'marionette.collectionview.html#collectionviews-childview'\n });\n }\n\n return childView;\n },\n\n // First check if the `view` is a view class (the common case)\n // Then check if it's a function (which we assume that returns a view class)\n _getView(view, child) {\n if (isViewClass(view)) {\n return view;\n } else if (isFunction(view)) {\n return view.call(this, child);\n }\n },\n\n _getChildViewOptions(child) {\n if (isFunction(this.childViewOptions)) {\n return this.childViewOptions(child);\n }\n\n return this.childViewOptions;\n },\n\n // Build a `childView` for a model in the collection.\n // Override to customize the build\n buildChildView(child, ChildViewClass, childViewOptions) {\n const options = _extend({model: child}, childViewOptions);\n return new ChildViewClass(options);\n },\n\n _setupChildView(view) {\n monitorViewEvents(view);\n\n // We need to listen for if a view is destroyed in a way other\n // than through the CollectionView.\n // If this happens we need to remove the reference to the view\n // since once a view has been destroyed we can not reuse it.\n view.on('destroy', this.removeChildView, this);\n\n // set up the child view event forwarding\n this._proxyChildViewEvents(view);\n },\n\n // used by ViewMixin's `_childViewEventHandler`\n _getImmediateChildren() {\n return this.children._views;\n },\n\n // Overriding Backbone.View's `setElement` to handle\n // if an el was previously defined. If so, the view might be\n // attached on setElement.\n setElement(element) {\n this._undelegateViewEvents();\n this.el = element;\n this._setBehaviorElements();\n\n this._isAttached = this._isElAttached();\n\n this._delegateViewEvents();\n\n return this;\n },\n\n // Render children views.\n render() {\n if (this._isDestroyed) { return this; }\n this.triggerMethod('before:render', this);\n\n this._destroyChildren();\n\n if (this.collection) {\n this._addChildModels(this.collection.models);\n this._initialEvents();\n }\n\n const template = this.getTemplate();\n\n if (template) {\n this._renderTemplate(template);\n this.bindUIElements();\n }\n this._getChildViewContainer();\n this.sort();\n\n this._isRendered = true;\n\n this.triggerMethod('render', this);\n return this;\n },\n\n // Get a container within the template to add the children within\n _getChildViewContainer() {\n const childViewContainer = result(this, 'childViewContainer');\n this.container = childViewContainer ? this.$(childViewContainer)[0] : this.el;\n\n if (!this.container) {\n throw new MarionetteError({\n name: classErrorName,\n message: `The specified \"childViewContainer\" was not found: ${childViewContainer}`,\n url: 'marionette.collectionview.html#defining-the-childviewcontainer'\n });\n }\n },\n\n // Sorts the children then filters and renders the results.\n sort() {\n this._sortChildren();\n\n this.filter();\n\n return this;\n },\n\n // Sorts views by viewComparator and sets the children to the new order\n _sortChildren() {\n if (!this._children.length) { return; }\n\n let viewComparator = this.getComparator();\n\n if (!viewComparator) { return; }\n\n // If children are sorted prevent added to end perf\n delete this._addedViews;\n\n this.triggerMethod('before:sort', this);\n\n this._children._sort(viewComparator, this);\n\n this.triggerMethod('sort', this);\n },\n\n // Sets the view's `viewComparator` and applies the sort if the view is ready.\n // To prevent the render pass `{ preventRender: true }` as the 2nd argument.\n setComparator(comparator, {preventRender} = {}) {\n const comparatorChanged = this.viewComparator !== comparator;\n const shouldSort = comparatorChanged && !preventRender;\n\n this.viewComparator = comparator;\n\n if (shouldSort) {\n this.sort();\n }\n\n return this;\n },\n\n // Clears the `viewComparator` and follows the same rules for rendering as `setComparator`.\n removeComparator(options) {\n return this.setComparator(null, options);\n },\n\n // If viewComparator is overridden it will be returned here.\n // Additionally override this function to provide custom\n // viewComparator logic\n getComparator() {\n if (this.viewComparator) { return this.viewComparator }\n\n if (!this.sortWithCollection || this.viewComparator === false || !this.collection) {\n return false;\n }\n\n return this._viewComparator;\n },\n\n // Default internal view comparator that order the views by\n // the order of the collection\n _viewComparator(view) {\n return this.collection.indexOf(view.model);\n },\n\n // This method filters the children views and renders the results\n filter() {\n if (this._isDestroyed) { return this; }\n\n this._filterChildren();\n\n this._renderChildren();\n\n return this;\n },\n\n _filterChildren() {\n if (!this._children.length) { return; }\n\n const viewFilter = this._getFilter();\n\n if (!viewFilter) {\n const shouldReset = this.children.length !== this._children.length;\n\n this.children._set(this._children._views, shouldReset);\n\n return;\n }\n\n // If children are filtered prevent added to end perf\n delete this._addedViews;\n\n this.triggerMethod('before:filter', this);\n\n const attachViews = [];\n const detachViews = [];\n\n each(this._children._views, (view, key, children) => {\n (viewFilter.call(this, view, key, children) ? attachViews : detachViews).push(view);\n });\n\n this._detachChildren(detachViews);\n\n // reset children\n this.children._set(attachViews, true);\n\n this.triggerMethod('filter', this, attachViews, detachViews);\n },\n\n // This method returns a function for the viewFilter\n _getFilter() {\n const viewFilter = this.getFilter();\n\n if (!viewFilter) { return false; }\n\n if (isFunction(viewFilter)) {\n return viewFilter;\n }\n\n // Support filter predicates `{ fooFlag: true }`\n if (isObject(viewFilter)) {\n const matcher = matches(viewFilter);\n return function(view) {\n return matcher(view.model && view.model.attributes);\n };\n }\n\n // Filter by model attribute\n if (isString(viewFilter)) {\n return function(view) {\n return view.model && view.model.get(viewFilter);\n };\n }\n\n throw new MarionetteError({\n name: classErrorName,\n message: '\"viewFilter\" must be a function, predicate object literal, a string indicating a model attribute, or falsy',\n url: 'marionette.collectionview.html#defining-the-viewfilter'\n });\n },\n\n // Override this function to provide custom\n // viewFilter logic\n getFilter() {\n return this.viewFilter;\n },\n\n // Sets the view's `viewFilter` and applies the filter if the view is ready.\n // To prevent the render pass `{ preventRender: true }` as the 2nd argument.\n setFilter(filter, {preventRender} = {}) {\n const filterChanged = this.viewFilter !== filter;\n const shouldRender = filterChanged && !preventRender;\n\n this.viewFilter = filter;\n\n if (shouldRender) {\n this.filter();\n }\n\n return this;\n },\n\n // Clears the `viewFilter` and follows the same rules for rendering as `setFilter`.\n removeFilter(options) {\n return this.setFilter(null, options);\n },\n\n _detachChildren(detachingViews) {\n each(detachingViews, this._detachChildView.bind(this));\n },\n\n _detachChildView(view) {\n const shouldTriggerDetach = view._isAttached && this.monitorViewEvents !== false;\n if (shouldTriggerDetach) {\n view.triggerMethod('before:detach', view);\n }\n\n this.detachHtml(view);\n\n if (shouldTriggerDetach) {\n view._isAttached = false;\n view.triggerMethod('detach', view);\n }\n\n view._isShown = false;\n },\n\n // Override this method to change how the collectionView detaches a child view\n detachHtml(view) {\n this.Dom.detachEl(view.el);\n },\n\n _renderChildren() {\n // If there are unrendered views prevent add to end perf\n if (this._hasUnrenderedViews) {\n delete this._addedViews;\n delete this._hasUnrenderedViews;\n }\n\n const views = this._addedViews || this.children._views;\n\n this.triggerMethod('before:render:children', this, views);\n\n if (this.isEmpty()) {\n this._showEmptyView();\n } else {\n this._destroyEmptyView();\n\n const els = this._getBuffer(views);\n\n this._attachChildren(els, views);\n }\n\n delete this._addedViews;\n\n this.triggerMethod('render:children', this, views);\n },\n\n // Renders each view and creates a fragment buffer from them\n _getBuffer(views) {\n const elBuffer = this.Dom.createBuffer();\n\n each(views, view => {\n renderView(view);\n // corresponds that view is shown in a Region or CollectionView\n view._isShown = true;\n this.Dom.appendContents(elBuffer, view.el);\n });\n\n return elBuffer;\n },\n\n _attachChildren(els, views) {\n const shouldTriggerAttach = this._isAttached && this.monitorViewEvents !== false;\n\n views = shouldTriggerAttach ? views : [];\n\n each(views, view => {\n if (view._isAttached) { return; }\n view.triggerMethod('before:attach', view);\n });\n\n this.attachHtml(els, this.container);\n\n each(views, view => {\n if (view._isAttached) { return; }\n view._isAttached = true;\n view.triggerMethod('attach', view);\n });\n },\n\n // Override this method to do something other than `.append`.\n // You can attach any HTML at this point including the els.\n attachHtml(els, container) {\n this.Dom.appendContents(container, els);\n },\n\n isEmpty() {\n return !this.children.length;\n },\n\n _showEmptyView() {\n const EmptyView = this._getEmptyView();\n\n if (!EmptyView) {\n return;\n }\n\n const options = this._getEmptyViewOptions();\n\n const emptyRegion = this.getEmptyRegion();\n\n emptyRegion.show(new EmptyView(options));\n },\n\n // Retrieve the empty view class\n _getEmptyView() {\n const emptyView = this.emptyView;\n\n if (!emptyView) { return; }\n\n return this._getView(emptyView);\n },\n\n // Remove the emptyView\n _destroyEmptyView() {\n const emptyRegion = this.getEmptyRegion();\n // Only empty if a view is show so the region\n // doesn't detach any other unrelated HTML\n if (emptyRegion.hasView()) {\n emptyRegion.empty();\n }\n },\n\n //\n _getEmptyViewOptions() {\n const emptyViewOptions = this.emptyViewOptions || this.childViewOptions;\n\n if (isFunction(emptyViewOptions)) {\n return emptyViewOptions.call(this);\n }\n\n return emptyViewOptions;\n },\n\n swapChildViews(view1, view2) {\n if (!this._children.hasView(view1) || !this._children.hasView(view2)) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'Both views must be children of the collection view to swap.',\n url: 'marionette.collectionview.html#swapping-child-views'\n });\n }\n\n this._children._swap(view1, view2);\n this.Dom.swapEl(view1.el, view2.el);\n\n // If the views are not filtered the same, refilter\n if (this.children.hasView(view1) !== this.children.hasView(view2)) {\n this.filter();\n } else {\n this.children._swap(view1, view2);\n }\n\n return this;\n },\n\n // Render the child's view and add it to the HTML for the collection view at a given index, based on the current sort\n addChildView(view, index, options = {}) {\n if (!view || view._isDestroyed) {\n return view;\n }\n\n if (view._isShown) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'View is already shown in a Region or CollectionView',\n url: 'marionette.region.html#showing-a-view'\n });\n }\n\n if (isObject(index)) {\n options = index;\n }\n\n // If options has defined index we should use it\n if (options.index != null) {\n index = options.index;\n }\n\n if (!this._isRendered) {\n this.render();\n }\n\n this._addChild(view, index);\n\n if (options.preventRender) {\n this._hasUnrenderedViews = true;\n return view;\n }\n\n const hasIndex = (typeof index !== 'undefined');\n const isAddedToEnd = !hasIndex || index >= this._children.length;\n\n // Only cache views if added to the end and there is no unrendered views\n if (isAddedToEnd && !this._hasUnrenderedViews) {\n this._addedViews = [view];\n }\n\n if (hasIndex) {\n this._renderChildren();\n } else {\n this.sort();\n }\n\n return view;\n },\n\n // Detach a view from the children. Best used when adding a\n // childView from `addChildView`\n detachChildView(view) {\n this.removeChildView(view, { shouldDetach: true });\n\n return view;\n },\n\n // Remove the child view and destroy it. Best used when adding a\n // childView from `addChildView`\n // The options argument is for internal use only\n removeChildView(view, options) {\n if (!view) {\n return view;\n }\n\n this._removeChildView(view, options);\n\n this._removeChild(view);\n\n if (this.isEmpty()) {\n this._showEmptyView();\n }\n\n return view;\n },\n\n _removeChildViews(views) {\n each(views, this._removeChildView.bind(this));\n },\n\n _removeChildView(view, {shouldDetach} = {}) {\n view.off('destroy', this.removeChildView, this);\n\n if (shouldDetach) {\n this._detachChildView(view);\n } else {\n this._destroyChildView(view);\n }\n\n this.stopListening(view);\n },\n\n _destroyChildView(view) {\n if (view._isDestroyed) {\n return;\n }\n\n const shouldDisableEvents = this.monitorViewEvents === false;\n destroyView(view, shouldDisableEvents);\n },\n\n // called by ViewMixin destroy\n _removeChildren() {\n this._destroyChildren();\n const emptyRegion = this.getEmptyRegion();\n emptyRegion.destroy();\n delete this._addedViews;\n },\n\n // Destroy the child views that this collection view is holding on to, if any\n _destroyChildren() {\n if (!this._children.length) {\n return;\n }\n\n this.triggerMethod('before:destroy:children', this);\n if (this.monitorViewEvents === false) {\n this.Dom.detachContents(this.el);\n }\n\n this._removeChildViews(this._children._views);\n\n // After all children have been destroyed re-init the container\n this._children._init();\n this.children._init();\n\n this.triggerMethod('destroy:children', this);\n }\n});\n\n\nexport default CollectionView;\n","// Behavior\n// --------\n\n// A Behavior is an isolated set of DOM /\n// user interactions that can be mixed into any View.\n// Behaviors allow you to blackbox View specific interactions\n// into portable logical chunks, keeping your views simple and your code DRY.\n\nimport { extend as _extend, uniqueId, result } from 'underscore';\nimport extend from './utils/extend';\nimport CommonMixin from './mixins/common';\nimport DelegateEntityEventsMixin from './mixins/delegate-entity-events';\nimport UIMixin from './mixins/ui';\nimport ViewEventsMixin from './mixins/view-events';\n\nconst ClassOptions = [\n 'collectionEvents',\n 'events',\n 'modelEvents',\n 'triggers',\n 'ui'\n];\n\nconst Behavior = function(options, view) {\n // Setup reference to the view.\n // this comes in handle when a behavior\n // wants to directly talk up the chain\n // to the view.\n this.view = view;\n\n\n this._setOptions(options, ClassOptions);\n this.cid = uniqueId(this.cidPrefix);\n\n this._initViewEvents();\n this.setElement();\n\n // Construct an internal UI hash using the behaviors UI\n // hash combined and overridden by the view UI hash.\n // This allows the user to use UI hash elements defined\n // in the parent view as well as those defined in the behavior.\n // This order will help the reuse and share of a behavior\n // between multiple views, while letting a view override\n // a selector under an UI key.\n this.ui = _extend({}, result(this, 'ui'), result(view, 'ui'));\n\n // Proxy view triggers\n this.listenTo(view, 'all', this.triggerMethod);\n\n this.initialize.apply(this, arguments);\n};\n\nBehavior.extend = extend;\n\n// Behavior Methods\n// --------------\n\n_extend(Behavior.prototype, CommonMixin, DelegateEntityEventsMixin, UIMixin, ViewEventsMixin, {\n cidPrefix: 'mnb',\n\n // proxy behavior $ method to the view\n // this is useful for doing jquery DOM lookups\n // scoped to behaviors view.\n $() {\n return this.view.$.apply(this.view, arguments);\n },\n\n // Stops the behavior from listening to events.\n destroy() {\n this._undelegateViewEvents();\n\n this.stopListening();\n\n this.view._removeBehavior(this);\n\n this._deleteEntityEventHandlers();\n\n return this;\n },\n\n setElement() {\n this._undelegateViewEvents();\n\n this.el = this.view.el;\n\n this._delegateViewEvents(this.view);\n\n return this;\n },\n\n bindUIElements() {\n this._bindUIElements();\n\n return this;\n },\n\n unbindUIElements() {\n this._unbindUIElements();\n\n return this;\n },\n\n getUI(name) {\n return this._getUI(name);\n },\n\n // Handle `modelEvents`, and `collectionEvents` configuration\n delegateEntityEvents() {\n this._delegateEntityEvents(this.view.model, this.view.collection);\n\n return this;\n },\n\n undelegateEntityEvents() {\n this._undelegateEntityEvents(this.view.model, this.view.collection);\n\n return this;\n }\n});\n\nexport default Behavior;\n","// Application\n// -----------\n\nimport _ from 'underscore';\nimport extend from './utils/extend';\nimport buildRegion from './common/build-region';\nimport CommonMixin from './mixins/common';\nimport DestroyMixin from './mixins/destroy';\nimport RadioMixin from './mixins/radio';\nimport Region from './region';\n\nconst ClassOptions = [\n 'channelName',\n 'radioEvents',\n 'radioRequests',\n 'region',\n 'regionClass'\n];\n\nconst Application = function(options) {\n this._setOptions(options, ClassOptions);\n this.cid = _.uniqueId(this.cidPrefix);\n this._initRegion();\n this._initRadio();\n this.initialize.apply(this, arguments);\n};\n\nApplication.extend = extend;\n\n// Application Methods\n// --------------\n\n_.extend(Application.prototype, CommonMixin, DestroyMixin, RadioMixin, {\n cidPrefix: 'mna',\n\n // This is a noop method intended to be overridden\n initialize() {},\n\n // Kick off all of the application's processes.\n start(options) {\n this.triggerMethod('before:start', this, options);\n this.triggerMethod('start', this, options);\n return this;\n },\n\n regionClass: Region,\n\n _initRegion() {\n const region = this.region;\n\n if (!region) { return; }\n\n const defaults = {\n regionClass: this.regionClass\n };\n\n this._region = buildRegion(region, defaults);\n },\n\n getRegion() {\n return this._region;\n },\n\n showView(view, ...args) {\n const region = this.getRegion();\n region.show(view, ...args);\n return view;\n },\n\n getView() {\n return this.getRegion().currentView;\n }\n});\n\nexport default Application;\n","import {version as VERSION} from '../package.json';\n\nimport proxy from './utils/proxy';\nimport extend from './utils/extend';\n\nimport {\n bindEvents as _bindEvents,\n unbindEvents as _unbindEvents\n} from './common/bind-events';\nimport {\n bindRequests as _bindRequests,\n unbindRequests as _unbindRequests\n} from './common/bind-requests';\nimport _getOption from './common/get-option';\nimport _mergeOptions from './common/merge-options';\nimport monitorViewEvents from './common/monitor-view-events';\nimport _normalizeMethods from './common/normalize-methods';\nimport _triggerMethod from './common/trigger-method';\n\nimport Events from './mixins/events';\n\nimport MnObject from './object';\nimport View from './view';\nimport CollectionView from './collection-view';\nimport Behavior from './behavior';\nimport Region from './region';\nimport Application from './application';\n\nimport DomApi from './config/dom';\n\nimport {\n isEnabled,\n setEnabled\n} from './config/features';\n\n// Utilities\n\nexport const bindEvents = proxy(_bindEvents);\nexport const unbindEvents = proxy(_unbindEvents);\nexport const bindRequests = proxy(_bindRequests);\nexport const unbindRequests = proxy(_unbindRequests);\nexport const mergeOptions = proxy(_mergeOptions);\nexport const getOption = proxy(_getOption);\nexport const normalizeMethods = proxy(_normalizeMethods);\nexport const triggerMethod = proxy(_triggerMethod);\n\n\n// Configuration\n\nexport const setDomApi = function(mixin) {\n CollectionView.setDomApi(mixin);\n Region.setDomApi(mixin);\n View.setDomApi(mixin);\n};\nexport const setRenderer = function(renderer) {\n CollectionView.setRenderer(renderer);\n View.setRenderer(renderer);\n};\n\nexport {\n View,\n CollectionView,\n MnObject,\n Region,\n Behavior,\n Application,\n isEnabled,\n setEnabled,\n monitorViewEvents,\n Events,\n extend,\n DomApi,\n VERSION\n};\n\nexport default {\n View,\n CollectionView,\n MnObject,\n Object: MnObject,\n Region,\n Behavior,\n Application,\n isEnabled,\n setEnabled,\n monitorViewEvents,\n Events,\n extend,\n DomApi,\n VERSION\n};\n"],"names":["proxy","method","context","args","apply","protoProps","staticProps","parent","child","has","constructor","arguments","extend","prototype","create","__super__","normalizeMethods","hash","_","reduce","normalizedHash","name","isFunction","errorProps","MarionetteError","call","Error","urlRoot","version","url","options","error","message","pick","captureStackTrace","toString","normalizeBindings","bindings","isObject","bindEvents","entity","listenTo","unbindEvents","stopListening","bindRequests","channel","reply","unbindRequests","stopReplying","getOption","optionName","undefined","mergeOptions","keys","each","key","option","triggerMethodChildren","view","event","shouldTrigger","_getImmediateChildren","triggerMethod","shouldTriggerAttach","_isAttached","shouldAttach","shouldTriggerDetach","shouldDetach","triggerDOMRefresh","_isRendered","triggerDOMRemove","handleBeforeAttach","handleAttach","handleBeforeDetach","handleDetach","handleBeforeRender","handleRender","monitorViewEvents","_areViewEventsMonitored","on","splitter","methodCache","getEventName","match","prefix","eventName","toUpperCase","getOnMethodName","replace","methodName","result","drop","trigger","eventSplitter","buildEventArgs","callback","listener","eventArgs","concat","test","split","n","push","callHandler","length","onceWrap","offCallback","onceCallback","once","_callback","onApi","events","ctx","handlers","onReducer","onceReducer","off","bind","cleanupListener","obj","listeneeId","listenerId","listeningTo","_rdListeners","offReducer","names","remaining","handler","count","getListener","listenerObj","_rdListenId","uniqueId","_rdEvents","_rdListeningTo","listenToApi","listeners","_rdInternal","listenToOnceApi","triggerApi","objEvents","allEvents","all","slice","triggerEvents","opts","listenToOnce","listenerIds","i","listenToObj","_reInternal","CommonMixin","_setOptions","classOptions","Backbone","Events","_isDestroyed","isDestroyed","destroy","_initRadio","channelName","Radio","_channel","radioEvents","radioRequests","_destroyRadio","getChannel","ClassOptions","MarionetteObject","cid","cidPrefix","initialize","DestroyMixin","RadioMixin","invokeMap","invoke","getBehaviorClass","behaviorClass","BehaviorClass","parseBehaviors","behaviors","allBehaviors","reducedBehaviors","behaviorDefiniton","behavior","_initBehaviors","_behaviors","_getBehaviorTriggers","triggers","_invoke","memo","_triggers","_getBehaviorEvents","_events","_proxyBehaviorViewProperties","_delegateBehaviorEntityEvents","_undelegateBehaviorEntityEvents","_destroyBehaviors","_removeBehavior","undelegate","without","_bindBehaviorUIElements","_unbindBehaviorUIElements","_triggerEventOnBehaviors","_delegateEntityEvents","model","collection","_modelEvents","_collectionEvents","_undelegateEntityEvents","_deleteEntityEventHandlers","_renderTemplate","template","data","mixinTemplateContext","serializeData","html","_renderHtml","attachElContent","getTemplate","serializedData","templateContext","serializeModel","items","serializeCollection","attributes","map","models","Dom","setContents","el","$el","normalizeUIKeys","ui","val","normalizedKey","normalizeUIString","uiRegEx","uiString","r","normalizeUIValues","property","isString","propertyVal","uiBindings","_getUIBindings","_bindUIElements","_uiBindings","_ui","selector","$","_unbindUIElements","_getUI","FEATURES","childViewEventPrefix","triggersStopPropagation","triggersPreventDefault","DEV_MODE","isEnabled","setEnabled","state","setEventDelegator","mixin","EventDelegator","shouldCapture","indexOf","delegate","rootEl","delegateHandler","evt","node","target","parentNode","Element","matches","delegateTarget","addEventListener","undelegateAll","removeEventListener","delegateEventSplitter","buildViewTrigger","triggerDef","shouldPreventDefault","preventDefault","shouldStopPropagation","stopPropagation","_initViewEvents","_domEvents","_undelegateViewEvents","_delegateViewEvents","_delegateEvents","_delegateTriggers","_delegate","value","setDomApi","createElement","tagName","document","createBuffer","createDocumentFragment","getDocumentEl","ownerDocument","documentElement","findEl","querySelectorAll","hasEl","childEl","contains","detachEl","removeChild","replaceEl","newEl","oldEl","replaceChild","swapEl","el1","el2","parent1","parent2","next1","nextSibling","next2","insertBefore","innerHTML","setAttributes","attrs","attr","setAttribute","appendContents","contents","appendChild","hasContents","hasChildNodes","detachContents","textContent","ViewMixin","preinitialize","DomApi","_getEl","id","className","class","_isElAttached","supportsRenderLifecycle","supportsDestroyLifecycle","isRendered","isAttached","delegateEntityEvents","undelegateEntityEvents","_isDestroying","_disableDetachEvents","unbindUIElements","_removeChildren","bindUIElements","getUI","_buildEventProxies","_childViewEvents","_childViewTriggers","_eventPrefix","_getEventPrefix","defaultPrefix","_proxyChildViewEvents","_childViewEventHandler","childViewEvents","childViewTriggers","BehaviorsMixin","DelegateEntityEventsMixin","TemplateRenderMixin","UIMixin","ViewEvents","isView","render","remove","isViewClass","ViewClass","renderView","destroyView","disableDetachEvents","classErrorName","Region","_initEl","_extend","replaceElement","_isReplaced","_isSwappingView","show","_ensureElement","_getView","currentView","_isShown","empty","_setupChildView","_attachView","_setEl","getEl","_setElement","shouldReplace","_restoreEl","_replaceEl","attachHtml","_empty","parentView","_parentView","_shouldDisableMonitoring","shouldReplaceEl","allowMissingEl","viewOptions","_getViewOptions","View","_detachView","isReplaced","isSwappingView","detachHtml","shouldDestroy","removeView","_stopChildViewEvents","detachView","shouldRestoreEl","hasView","reset","_name","_removeReferences","definition","defaults","buildRegionFromObject","regionClass","RegionClass","_initRegions","regions","_regions","addRegions","_reInitRegions","addRegion","isEmpty","_addRegions","regionDefinitions","parentEl","partial","buildRegion","_addRegion","region","removeRegion","_removeRegion","removeRegions","_getRegions","emptyRegions","getRegions","hasRegion","getRegion","clone","showChildView","detachChildView","getChildView","setRenderer","renderer","childReducer","children","setElement","RegionsMixin","element","_setBehaviorElements","Container","_init","methods","_views","stringComparator","comparator","get","_viewsByCid","_indexByModel","_updateLength","_add","index","_addViewIndexes","splice","_sort","_sortBy","sort","sortedViews","sortBy","_set","views","shouldReset","_swap","view1","view2","view1Index","findIndexByView","view2Index","swapView","findByModel","findByModelCid","modelCid","findByIndex","findByCid","_remove","CollectionView","_initChildViewStorage","getEmptyRegion","sortWithCollection","_children","ChildViewContainer","emptyEl","container","_emptyRegion","_initialEvents","_onCollectionSort","_onCollectionReset","_onCollectionUpdate","add","merge","viewComparator","_destroyChildren","_addChildModels","changes","removedViews","removed","_removeChildModels","_addedViews","added","_detachChildren","_removeChildViews","_removeChildModel","_removeChild","_addChildModel","_createChildView","_addChild","ChildView","_getChildView","childViewOptions","_getChildViewOptions","buildChildView","childView","ChildViewClass","removeChildView","_getChildViewContainer","childViewContainer","_sortChildren","filter","getComparator","setComparator","preventRender","comparatorChanged","shouldSort","removeComparator","_viewComparator","_filterChildren","_renderChildren","viewFilter","_getFilter","attachViews","detachViews","getFilter","matcher","setFilter","filterChanged","shouldRender","removeFilter","detachingViews","_detachChildView","_hasUnrenderedViews","_showEmptyView","_destroyEmptyView","els","_getBuffer","_attachChildren","elBuffer","EmptyView","_getEmptyView","_getEmptyViewOptions","emptyRegion","emptyView","emptyViewOptions","swapChildViews","addChildView","hasIndex","isAddedToEnd","_removeChildView","_destroyChildView","shouldDisableEvents","Behavior","ViewEventsMixin","Application","_initRegion","start","_region","showView","getView","_bindEvents","_unbindEvents","_bindRequests","_unbindRequests","_mergeOptions","_getOption","_normalizeMethods","_triggerMethod","MnObject","Object","VERSION"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;EACA,IAAMA,KAAK,GAAG,SAARA,KAAQ,CAASC,MAAT,EAAiB;EAC7B,SAAO,UAASC,OAAT,EAA2B;EAAA,sCAANC,IAAM;EAANA,MAAAA,IAAM;EAAA;;EAChC,WAAOF,MAAM,CAACG,KAAP,CAAaF,OAAb,EAAsBC,IAAtB,CAAP;EACD,GAFD;EAGD,CAJD;;ECDA;AACA;AAKA,EAAe,iBAASE,UAAT,EAAqBC,WAArB,EAAkC;EAC/C,MAAMC,MAAM,GAAG,IAAf;EACA,MAAIC,KAAJ,CAF+C;EAK/C;EACA;;EACA,MAAIH,UAAU,IAAII,KAAG,CAACJ,UAAD,EAAa,aAAb,CAArB,EAAkD;EAChDG,IAAAA,KAAK,GAAGH,UAAU,CAACK,WAAnB;EACD,GAFD,MAEO;EACLF,IAAAA,KAAK,GAAG,iBAAW;EAAE,aAAOD,MAAM,CAACH,KAAP,CAAa,IAAb,EAAmBO,SAAnB,CAAP;EAAuC,KAA5D;EACD,GAX8C;;;EAc/CC,EAAAA,QAAM,CAACJ,KAAD,EAAQD,MAAR,EAAgBD,WAAhB,CAAN,CAd+C;EAiB/C;;EACAE,EAAAA,KAAK,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backbone.marionette.min.js index 29b593cdd0..47ef52ca2d 100644 --- a/lib/backbone.marionette.min.js +++ b/lib/backbone.marionette.min.js @@ -4,10 +4,10 @@ * ---------------------------------- * v4.1.2 * -* Copyright (c)2019 Derick Bailey, Muted Solutions, LLC. +* Copyright (c)2020 Derick Bailey, Muted Solutions, LLC. * Distributed under MIT license * * http://marionettejs.com */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("backbone"),require("underscore"),require("backbone.radio")):"function"==typeof define&&define.amd?define(["exports","backbone","underscore","backbone.radio"],t):(e=e||self,function(){var i=e.Marionette,n=e.Marionette={};t(n,e.Backbone,e._,e.Backbone.Radio),n.noConflict=function(){return e.Marionette=i,n}}())}(this,function(e,t,i,n){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t,i=i&&i.hasOwnProperty("default")?i.default:i,n=n&&n.hasOwnProperty("default")?n.default:n;var s=function(e){return function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),s=1;s1?i-1:0),h=1;h1&&void 0!==arguments[1]?arguments[1]:ie(e)).detach()},replaceEl:function(e,t){if(e!==t){var i=t.parentNode;i&&i.replaceChild(e,t)}},swapEl:function(e,t){if(e!==t){var i=e.parentNode,n=t.parentNode;if(i&&n){var s=e.nextSibling,r=t.nextSibling;i.insertBefore(t,s),n.insertBefore(e,r)}}},setContents:function(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:ie(e)).html(t)},appendContents:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i._$el,s=void 0===n?ie(e):n,r=i._$contents,o=void 0===r?ie(t):r;s.append(o)},hasContents:function(e){return!!e&&e.hasChildNodes()},detachContents:function(e){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:ie(e)).contents().detach()}},re={Dom:se,_isElAttached:function(){return!!this.el&&this.Dom.hasEl(this.Dom.getDocumentEl(this.el),this.el)},supportsRenderLifecycle:!0,supportsDestroyLifecycle:!0,_isDestroyed:!1,isDestroyed:function(){return!!this._isDestroyed},_isRendered:!1,isRendered:function(){return!!this._isRendered},_isAttached:!1,isAttached:function(){return!!this._isAttached},delegateEvents:function(e){this._proxyBehaviorViewProperties(),this._buildEventProxies();var n=i.extend({},this._getBehaviorEvents(),this._getEvents(e),this._getBehaviorTriggers(),this._getTriggers());return t.View.prototype.delegateEvents.call(this,n),this},_getEvents:function(e){return e?this.normalizeUIKeys(e):this.events?this.normalizeUIKeys(i.result(this,"events")):void 0},_getTriggers:function(){if(this.triggers){var e=this.normalizeUIKeys(i.result(this,"triggers"));return this._getViewTriggers(this,e)}},delegateEntityEvents:function(){return this._delegateEntityEvents(this.model,this.collection),this._delegateBehaviorEntityEvents(),this},undelegateEntityEvents:function(){return this._undelegateEntityEvents(this.model,this.collection),this._undelegateBehaviorEntityEvents(),this},destroy:function(e){if(this._isDestroyed||this._isDestroying)return this;this._isDestroying=!0;var t=this._isAttached&&!this._disableDetachEvents;return this.triggerMethod("before:destroy",this,e),t&&this.triggerMethod("before:detach",this),this.unbindUIElements(),this._removeElement(),t&&(this._isAttached=!1,this.triggerMethod("detach",this)),this._removeChildren(),this._isDestroyed=!0,this._isRendered=!1,this._destroyBehaviors(e),this._deleteEntityEventHandlers(),this.triggerMethod("destroy",this,e),this._triggerEventOnBehaviors("destroy",this,e),this.stopListening(),this},_removeElement:function(){this.$el.off().removeData(),this.Dom.detachEl(this.el,this.$el)},bindUIElements:function(){return this._bindUIElements(),this._bindBehaviorUIElements(),this},unbindUIElements:function(){return this._unbindUIElements(),this._unbindBehaviorUIElements(),this},getUI:function(e){return this._getUI(e)},_buildEventProxies:function(){this._childViewEvents=this.normalizeMethods(i.result(this,"childViewEvents")),this._childViewTriggers=i.result(this,"childViewTriggers"),this._eventPrefix=this._getEventPrefix()},_getEventPrefix:function(){var e=!!G("childViewEventPrefix")&&"childview",t=i.result(this,"childViewEventPrefix",e);return!1===t?t:t+":"},_proxyChildViewEvents:function(e){(this._childViewEvents||this._childViewTriggers||this._eventPrefix)&&this.listenTo(e,"all",this._childViewEventHandler)},_childViewEventHandler:function(e){for(var t=this._childViewEvents,i=arguments.length,n=new Array(i>1?i-1:0),s=1;s1&&(this.$el=this.Dom.getEl(this.el))},_setElement:function(e){if(e===this.el)return this;var t=this._isReplaced;if(this._restoreEl(),this.el=e,this._setEl(),this.currentView){var i=this.currentView;t?this._replaceEl(i):this.attachHtml(i)}return this},_setupChildView:function(e){I(e),this._proxyChildViewEvents(e),e.on("destroy",this._empty,this)},_proxyChildViewEvents:function(e){var t=this._parentView;t&&t._proxyChildViewEvents(e)},_shouldDisableMonitoring:function(){return this._parentView&&!1===this._parentView.monitorViewEvents},_isElAttached:function(){return this.Dom.hasEl(this.Dom.getDocumentEl(this.el),this.el)},_attachView:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).replaceElement,n=!e._isAttached&&this._isElAttached()&&!this._shouldDisableMonitoring(),s=void 0===t?!!i.result(this,"replaceElement"):!!t;n&&e.triggerMethod("before:attach",e),s?this._replaceEl(e):this.attachHtml(e),n&&(e._isAttached=!0,e.triggerMethod("attach",e)),e._isShown=!0},_ensureElement:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(i.isObject(this.el)||this._setEl(),!this.$el||0===this.$el.length){if(void 0===e.allowMissingEl?!!i.result(this,"allowMissingEl"):!!e.allowMissingEl)return!1;throw new d({name:"RegionError",message:'An "el" must exist in DOM for this region '.concat(this.cid),url:"marionette.region.html#additional-options"})}return!0},_getView:function(e){if(!e)throw new d({name:"RegionError",message:"The view passed is undefined and therefore invalid. You must pass a view instance to show.",url:"marionette.region.html#showing-a-view"});if(e._isDestroyed)throw new d({name:"RegionError",message:'View (cid: "'.concat(e.cid,'") has already been destroyed and cannot be used.'),url:"marionette.region.html#showing-a-view"});if(e instanceof t.View)return e;var i=this._getViewOptions(e);return new ve(i)},_getViewOptions:function(e){if(i.isFunction(e))return{template:e};if(i.isObject(e))return e;return{template:function(){return e}}},getEl:function(e){var t=i.result(this,"parentEl");return t&&i.isString(e)?this.Dom.findEl(t,e):this.Dom.getEl(e)},_replaceEl:function(e){this._restoreEl(),e.on("before:destroy",this._restoreEl,this),this.Dom.replaceEl(e.el,this.el),this._isReplaced=!0},_restoreEl:function(){if(this._isReplaced){var e=this.currentView;e&&(this._detachView(e),this._isReplaced=!1)}},isReplaced:function(){return!!this._isReplaced},isSwappingView:function(){return!!this._isSwappingView},attachHtml:function(e){this.Dom.appendContents(this.el,e.el,{_$el:this.$el,_$contents:e.$el})},empty:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{allowMissingEl:!0},t=this.currentView;return t?(this._empty(t,!0),this):(this._ensureElement(e)&&this.detachHtml(),this)},_empty:function(e,t){e.off("destroy",this._empty,this),this.triggerMethod("before:empty",this,e),this._restoreEl(),delete this.currentView,e._isDestroyed||(t?this.removeView(e):this._detachView(e),e._isShown=!1,this._stopChildViewEvents(e)),this.triggerMethod("empty",this,e)},_stopChildViewEvents:function(e){this._parentView&&this._parentView.stopListening(e)},destroyView:function(e){return e._isDestroyed?e:(he(e,this._shouldDisableMonitoring()),e)},removeView:function(e){this.destroyView(e)},detachView:function(){var e=this.currentView;if(e)return this._empty(e),e},_detachView:function(e){var t=e._isAttached&&!this._shouldDisableMonitoring(),i=this._isReplaced;t&&e.triggerMethod("before:detach",e),i?this.Dom.replaceEl(this.el,e.el):this.detachHtml(),t&&(e._isAttached=!1,e.triggerMethod("detach",e))},detachHtml:function(){this.Dom.detachContents(this.el,this.$el)},hasView:function(){return!!this.currentView},reset:function(e){return this.empty(e),this.el=this._initEl,delete this.$el,this},_isDestroyed:!1,isDestroyed:function(){return this._isDestroyed},destroy:function(e){return this._isDestroyed?this:(this.triggerMethod("before:destroy",this,e),this._isDestroyed=!0,this.reset(e),this._name&&this._parentView._removeReferences(this._name),delete this._parentView,delete this._name,this.triggerMethod("destroy",this,e),this.stopListening(),this)}});var ue={regionClass:le,_initRegions:function(){this.regions=this.regions||{},this._regions={},this.addRegions(i.result(this,"regions"))},_reInitRegions:function(){H(this._regions,"reset")},addRegion:function(e,t){var i={};return i[e]=t,this.addRegions(i)[e]},addRegions:function(e){if(!i.isEmpty(e))return e=this.normalizeUIValues(e,"el"),this.regions=i.extend({},this.regions,e),this._addRegions(e)},_addRegions:function(e){var t=this,n={regionClass:this.regionClass,parentEl:i.partial(i.result,this,"el")};return i.reduce(e,function(e,i,s){return e[s]=ae(i,n),t._addRegion(e[s],s),e},{})},_addRegion:function(e,t){this.triggerMethod("before:add:region",this,t,e),e._parentView=this,e._name=t,this._regions[t]=e,this.triggerMethod("add:region",this,t,e)},removeRegion:function(e){var t=this._regions[e];return this._removeRegion(t,e),t},removeRegions:function(){var e=this._getRegions();return i.each(this._regions,this._removeRegion.bind(this)),e},_removeRegion:function(e,t){this.triggerMethod("before:remove:region",this,t,e),e.destroy(),this.triggerMethod("remove:region",this,t,e)},_removeReferences:function(e){delete this.regions[e],delete this._regions[e]},emptyRegions:function(){var e=this.getRegions();return H(e,"empty"),e},hasRegion:function(e){return!!this.getRegion(e)},getRegion:function(e){return this._isRendered||this.render(),this._regions[e]},_getRegions:function(){return i.clone(this._regions)},getRegions:function(){return this._isRendered||this.render(),this._getRegions()},showChildView:function(e,t,i){return this.getRegion(e).show(t,i),t},detachChildView:function(e){return this.getRegion(e).detachView()},getChildView:function(e){return this.getRegion(e).currentView}};function ge(e){return this.prototype._renderHtml=e,this}var _e=["behaviors","childViewEventPrefix","childViewEvents","childViewTriggers","collectionEvents","events","modelEvents","regionClass","regions","template","templateContext","triggers","ui"];function fe(e,t){return t.currentView&&e.push(t.currentView),e}var ve=t.View.extend({constructor:function(e){this._setOptions(e,_e),I(this),this._initBehaviors(),this._initRegions(),t.View.prototype.constructor.apply(this,arguments),this.delegateEntityEvents(),this._triggerEventOnBehaviors("initialize",this,e)},setElement:function(){return t.View.prototype.setElement.apply(this,arguments),this._isRendered=this.Dom.hasContents(this.el),this._isAttached=this._isElAttached(),this._isRendered&&this.bindUIElements(),this},render:function(){var e=this.getTemplate();return!1===e||this._isDestroyed?this:(this.triggerMethod("before:render",this),this._isRendered&&this._reInitRegions(),this._renderTemplate(e),this.bindUIElements(),this._isRendered=!0,this.triggerMethod("render",this),this)},_removeChildren:function(){this.removeRegions()},_getImmediateChildren:function(){return i.reduce(this._regions,fe,[])}},{setRenderer:ge,setDomApi:ne});i.extend(ve.prototype,re,ue);var me=function(){this._init()};function pe(e,t){return t.model&&t.model.get(e)}i.each(["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck","reduce","partition"],function(e){me.prototype[e]=function(){for(var t=arguments.length,n=new Array(t),s=0;s1&&void 0!==arguments[1]?arguments[1]:this._views.length;this._addViewIndexes(e),this._views.splice(t,0,e),this._updateLength()},_addViewIndexes:function(e){this._viewsByCid[e.cid]=e,e.model&&(this._indexByModel[e.model.cid]=e)},_sort:function(e,t){return"string"==typeof e?(e=i.partial(pe,e),this._sortBy(e)):1===e.length?this._sortBy(e.bind(t)):this._views.sort(e.bind(t))},_sortBy:function(e){var t=i.sortBy(this._views,e);return this._set(t),t},_set:function(e,t){this._views.length=0,this._views.push.apply(this._views,e.slice(0)),t&&(this._viewsByCid={},this._indexByModel={},i.each(e,this._addViewIndexes.bind(this)),this._updateLength())},_swap:function(e,t){var i=this.findIndexByView(e),n=this.findIndexByView(t);if(-1!==i&&-1!==n){var s=this._views[i];this._views[i]=this._views[n],this._views[n]=s}},findByModel:function(e){return this.findByModelCid(e.cid)},findByModelCid:function(e){return this._indexByModel[e]},findByIndex:function(e){return this._views[e]},findIndexByView:function(e){return this._views.indexOf(e)},findByCid:function(e){return this._viewsByCid[e]},hasView:function(e){return!!this.findByCid(e.cid)},_remove:function(e){if(this._viewsByCid[e.cid]){e.model&&delete this._indexByModel[e.model.cid],delete this._viewsByCid[e.cid];var t=this.findIndexByView(e);this._views.splice(t,1),this._updateLength()}},_updateLength:function(){this.length=this._views.length}});var we=["behaviors","childView","childViewContainer","childViewEventPrefix","childViewEvents","childViewOptions","childViewTriggers","collectionEvents","emptyView","emptyViewOptions","events","modelEvents","sortWithCollection","template","templateContext","triggers","ui","viewComparator","viewFilter"],Ee=t.View.extend({sortWithCollection:!0,constructor:function(e){this._setOptions(e,we),I(this),this._initChildViewStorage(),this._initBehaviors(),t.View.prototype.constructor.apply(this,arguments),this.getEmptyRegion(),this.delegateEntityEvents(),this._triggerEventOnBehaviors("initialize",this,e)},_initChildViewStorage:function(){this._children=new me,this.children=new me},getEmptyRegion:function(){var e=this.$container||this.$el;return this._emptyRegion&&!this._emptyRegion.isDestroyed()?(this._emptyRegion._setElement(e[0]),this._emptyRegion):(this._emptyRegion=new le({el:e[0],replaceElement:!1}),this._emptyRegion._parentView=this,this._emptyRegion)},_initialEvents:function(){this._isRendered||this.listenTo(this.collection,{sort:this._onCollectionSort,reset:this._onCollectionReset,update:this._onCollectionUpdate})},_onCollectionSort:function(e,t){var i=t.add,n=t.merge,s=t.remove;this.sortWithCollection&&!1!==this.viewComparator&&(i||s||n||this.sort())},_onCollectionReset:function(){this._destroyChildren(),this._addChildModels(this.collection.models),this.sort()},_onCollectionUpdate:function(e,t){var i=t.changes,n=i.removed.length&&this._removeChildModels(i.removed);this._addedViews=i.added.length&&this._addChildModels(i.added),this._detachChildren(n),this.sort(),this._removeChildViews(n)},_removeChildModels:function(e){var t=this;return i.reduce(e,function(e,i){var n=t._removeChildModel(i);return n&&e.push(n),e},[])},_removeChildModel:function(e){var t=this._children.findByModel(e);return t&&this._removeChild(t),t},_removeChild:function(e){this.triggerMethod("before:remove:child",this,e),this.children._remove(e),this._children._remove(e),this.triggerMethod("remove:child",this,e)},_addChildModels:function(e){return i.map(e,this._addChildModel.bind(this))},_addChildModel:function(e){var t=this._createChildView(e);return this._addChild(t),t},_createChildView:function(e){var t=this._getChildView(e),i=this._getChildViewOptions(e);return this.buildChildView(e,t,i)},_addChild:function(e,t){this.triggerMethod("before:add:child",this,e),this._setupChildView(e),this._children._add(e,t),this.children._add(e,t),this.triggerMethod("add:child",this,e)},_getChildView:function(e){var t=this.childView;if(!t)throw new d({name:"CollectionViewError",message:'A "childView" must be specified',url:"marionette.collectionview.html#collectionviews-childview"});if(!(t=this._getView(t,e)))throw new d({name:"CollectionViewError",message:'"childView" must be a view class or a function that returns a view class',url:"marionette.collectionview.html#collectionviews-childview"});return t},_getView:function(e,n){return e.prototype instanceof t.View||e===t.View?e:i.isFunction(e)?e.call(this,n):void 0},_getChildViewOptions:function(e){return i.isFunction(this.childViewOptions)?this.childViewOptions(e):this.childViewOptions},buildChildView:function(e,t,n){return new t(i.extend({model:e},n))},_setupChildView:function(e){I(e),e.on("destroy",this.removeChildView,this),this._proxyChildViewEvents(e)},_getImmediateChildren:function(){return this.children._views},setElement:function(){return t.View.prototype.setElement.apply(this,arguments),this._isAttached=this._isElAttached(),this},render:function(){if(this._isDestroyed)return this;this.triggerMethod("before:render",this),this._destroyChildren(),this.collection&&(this._addChildModels(this.collection.models),this._initialEvents());var e=this.getTemplate();return e&&(this._renderTemplate(e),this.bindUIElements()),this._getChildViewContainer(),this.sort(),this._isRendered=!0,this.triggerMethod("render",this),this},_getChildViewContainer:function(){var e=i.result(this,"childViewContainer");if(this.$container=e?this.$(e):this.$el,!this.$container.length)throw new d({name:"CollectionViewError",message:'The specified "childViewContainer" was not found: '.concat(e),url:"marionette.collectionview.html#defining-the-childviewcontainer"})},sort:function(){return this._sortChildren(),this.filter(),this},_sortChildren:function(){if(this._children.length){var e=this.getComparator();e&&(delete this._addedViews,this.triggerMethod("before:sort",this),this._children._sort(e,this),this.triggerMethod("sort",this))}},setComparator:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).preventRender,i=this.viewComparator!==e&&!t;return this.viewComparator=e,i&&this.sort(),this},removeComparator:function(e){return this.setComparator(null,e)},getComparator:function(){return this.viewComparator?this.viewComparator:!(!this.sortWithCollection||!1===this.viewComparator||!this.collection)&&this._viewComparator},_viewComparator:function(e){return this.collection.indexOf(e.model)},filter:function(){return this._isDestroyed?this:(this._filterChildren(),this._renderChildren(),this)},_filterChildren:function(){var e=this;if(this._children.length){var t=this._getFilter();if(t){delete this._addedViews,this.triggerMethod("before:filter",this);var n=[],s=[];i.each(this._children._views,function(i,r,o){(t.call(e,i,r,o)?n:s).push(i)}),this._detachChildren(s),this.children._set(n,!0),this.triggerMethod("filter",this,n,s)}else{var r=this.children.length!==this._children.length;this.children._set(this._children._views,r)}}},_getFilter:function(){var e=this.getFilter();if(!e)return!1;if(i.isFunction(e))return e;if(i.isObject(e)){var t=i.matches(e);return function(e){return t(e.model&&e.model.attributes)}}if(i.isString(e))return function(t){return t.model&&t.model.get(e)};throw new d({name:"CollectionViewError",message:'"viewFilter" must be a function, predicate object literal, a string indicating a model attribute, or falsy',url:"marionette.collectionview.html#defining-the-viewfilter"})},getFilter:function(){return this.viewFilter},setFilter:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).preventRender,i=this.viewFilter!==e&&!t;return this.viewFilter=e,i&&this.filter(),this},removeFilter:function(e){return this.setFilter(null,e)},_detachChildren:function(e){i.each(e,this._detachChildView.bind(this))},_detachChildView:function(e){var t=e._isAttached&&!1!==this.monitorViewEvents;t&&e.triggerMethod("before:detach",e),this.detachHtml(e),t&&(e._isAttached=!1,e.triggerMethod("detach",e)),e._isShown=!1},detachHtml:function(e){this.Dom.detachEl(e.el,e.$el)},_renderChildren:function(){this._hasUnrenderedViews&&(delete this._addedViews,delete this._hasUnrenderedViews);var e=this._addedViews||this.children._views;if(this.triggerMethod("before:render:children",this,e),this.isEmpty())this._showEmptyView();else{this._destroyEmptyView();var t=this._getBuffer(e);this._attachChildren(t,e)}delete this._addedViews,this.triggerMethod("render:children",this,e)},_getBuffer:function(e){var t=this,n=this.Dom.createBuffer();return i.each(e,function(e){oe(e),e._isShown=!0,t.Dom.appendContents(n,e.el,{_$contents:e.$el})}),n},_attachChildren:function(e,t){t=this._isAttached&&!1!==this.monitorViewEvents?t:[],i.each(t,function(e){e._isAttached||e.triggerMethod("before:attach",e)}),this.attachHtml(e,this.$container),i.each(t,function(e){e._isAttached||(e._isAttached=!0,e.triggerMethod("attach",e))})},attachHtml:function(e,t){this.Dom.appendContents(t[0],e,{_$el:t})},isEmpty:function(){return!this.children.length},_showEmptyView:function(){var e=this._getEmptyView();if(e){var t=this._getEmptyViewOptions();this.getEmptyRegion().show(new e(t))}},_getEmptyView:function(){var e=this.emptyView;if(e)return this._getView(e)},_destroyEmptyView:function(){var e=this.getEmptyRegion();e.hasView()&&e.empty()},_getEmptyViewOptions:function(){var e=this.emptyViewOptions||this.childViewOptions;return i.isFunction(e)?e.call(this):e},swapChildViews:function(e,t){if(!this._children.hasView(e)||!this._children.hasView(t))throw new d({name:"CollectionViewError",message:"Both views must be children of the collection view to swap.",url:"marionette.collectionview.html#swapping-child-views"});return this._children._swap(e,t),this.Dom.swapEl(e.el,t.el),this.children.hasView(e)!==this.children.hasView(t)?this.filter():this.children._swap(e,t),this},addChildView:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||e._isDestroyed)return e;if(e._isShown)throw new d({name:"CollectionViewError",message:"View is already shown in a Region or CollectionView",url:"marionette.region.html#showing-a-view"});if(i.isObject(t)&&(n=t),null!=n.index&&(t=n.index),this._isRendered||this.render(),this._addChild(e,t),n.preventRender)return this._hasUnrenderedViews=!0,e;var s=void 0!==t;return(!s||t>=this._children.length)&&!this._hasUnrenderedViews&&(this._addedViews=[e]),s?this._renderChildren():this.sort(),e},detachChildView:function(e){return this.removeChildView(e,{shouldDetach:!0}),e},removeChildView:function(e,t){return e?(this._removeChildView(e,t),this._removeChild(e),this.isEmpty()&&this._showEmptyView(),e):e},_removeChildViews:function(e){i.each(e,this._removeChildView.bind(this))},_removeChildView:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).shouldDetach;e.off("destroy",this.removeChildView,this),t?this._detachChildView(e):this._destroyChildView(e),this.stopListening(e)},_destroyChildView:function(e){e._isDestroyed||he(e,!1===this.monitorViewEvents)},_removeChildren:function(){this._destroyChildren(),this.getEmptyRegion().destroy(),delete this._addedViews},_destroyChildren:function(){this._children.length&&(this.triggerMethod("before:destroy:children",this),!1===this.monitorViewEvents&&this.Dom.detachContents(this.el,this.$el),this._removeChildViews(this._children._views),this._children._init(),this.children._init(),this.triggerMethod("destroy:children",this))}},{setDomApi:ne,setRenderer:ge});i.extend(Ee.prototype,re);var ye=["collectionEvents","events","modelEvents","triggers","ui"],Ve=function(e,t){this.view=t,this._setOptions(e,ye),this.cid=i.uniqueId(this.cidPrefix),this.ui=i.extend({},i.result(this,"ui"),i.result(t,"ui")),this.listenTo(t,"all",this.triggerMethod),this.initialize.apply(this,arguments)};Ve.extend=r,i.extend(Ve.prototype,T,N,Q,te,{cidPrefix:"mnb",initialize:function(){},$:function(){return this.view.$.apply(this.view,arguments)},destroy:function(){return this.stopListening(),this.view._removeBehavior(this),this._deleteEntityEventHandlers(),this},proxyViewProperties:function(){return this.$el=this.view.$el,this.el=this.view.el,this},bindUIElements:function(){return this._bindUIElements(),this},unbindUIElements:function(){return this._unbindUIElements(),this},getUI:function(e){return this._getUI(e)},delegateEntityEvents:function(){return this._delegateEntityEvents(this.view.model,this.view.collection),this},undelegateEntityEvents:function(){return this._undelegateEntityEvents(this.view.model,this.view.collection),this},_getEvents:function(){var e=this;if(this.events){var t=this.normalizeUIKeys(i.result(this,"events"));return i.reduce(t,function(t,n,s){return i.isFunction(n)||(n=e[n]),n?(t[s=Y(s,e.cid)]=n.bind(e),t):t},{})}},_getTriggers:function(){if(this.triggers){var e=this.normalizeUIKeys(i.result(this,"triggers"));return this._getViewTriggers(this.view,e)}}});var Ce=["channelName","radioEvents","radioRequests","region","regionClass"],be=function(e){this._setOptions(e,Ce),this.cid=i.uniqueId(this.cidPrefix),this._initRegion(),this._initRadio(),this.initialize.apply(this,arguments)};be.extend=r,i.extend(be.prototype,T,z,F,{cidPrefix:"mna",initialize:function(){},start:function(e){return this.triggerMethod("before:start",this,e),this.triggerMethod("start",this,e),this},regionClass:le,_initRegion:function(){var e=this.region;if(e){var t={regionClass:this.regionClass};this._region=ae(e,t)}},getRegion:function(){return this._region},showView:function(e){for(var t=this.getRegion(),i=arguments.length,n=new Array(i>1?i-1:0),s=1;s1?i-1:0),s=1;s2&&void 0!==arguments[2]?arguments[2]:[];switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2]);default:e.apply(t,i)}}(e.callback,e.ctx,i)})},Y={on:function(e,i,n,s){if(!s||!s._rdInternal){var r=z(e,i,n);return this._rdEvents=t.reduce(r,function(e,t){var i=t.name,n=t.callback,s=t.context;return n?j({events:e,name:i,callback:n,context:s,ctx:this}):e}.bind(this),this._rdEvents||{}),this}},off:function(e,i,n,s){if(!this._rdEvents)return this;if(!s||!s._rdInternal){if(!e&&!n&&!i){this._rdEvents=void 0;var r=this._rdListeners;return t.each(t.keys(r),function(e){F(r[e])}),this}var o=z(e,i,n);return this._rdEvents=t.reduce(o,q,this._rdEvents),this}},once:function(e,i,n){var s=z(e,i,n);return this._rdEvents=t.reduce(s,function(e,t){var i=t.name,n=t.callback,s=t.context;if(!n)return e;var r=N(n,this.off.bind(this,i));return j({events:e,name:i,callback:r,context:s,ctx:this})}.bind(this),this._rdEvents||{}),this},listenTo:function(e,i,n){if(!e)return this;var s=z(i,n,this,H(e,this));return t.each(s,$),this},listenToOnce:function(e,i,n){if(!e)return this;var s=z(i,n,this,H(e,this));return t.each(s,function(e){var t=e.name,i=e.callback,n=e.context,s=e.listener;if(i){var r=N(i,this.stopListening.bind(this,s.obj,t));$({name:t,callback:r,context:n,listener:s})}}.bind(this)),this},stopListening:function(e,i,n){var s=this,r=this._rdListeningTo;if(!r)return this;for(var o=z(i,n,this),h=e?[e._rdListenId]:t.keys(r),d=function(e){var i=r[h[e]];if(!i)return"break";t.each(o,function(e){var t=i.obj,n=t._rdEvents;n&&(t._rdEvents=q(n,e),t.off(e.name,e.callback,s,{_reInternal:!0}))})},l=0;l1?n-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:this,t=this._getUIBindings();this._delegateEvents(t),this._delegateTriggers(t,e)},_delegateEvents:function(e){var i=this;this.events&&t.each(t.result(this,"events"),function(n,s){t.isFunction(n)||(n=i[n]),n&&i._delegate(n.bind(i),i.normalizeUIString(s,e))})},_delegateTriggers:function(e,i){var n=this;this.triggers&&t.each(t.result(this,"triggers"),function(s,r){n._delegate(function(e,i){t.isString(i)&&(i={event:i});var n=i.event,s=!!i.preventDefault;le("triggersPreventDefault")&&(s=!1!==i.preventDefault);var r=!!i.stopPropagation;return le("triggersStopPropagation")&&(r=!1!==i.stopPropagation),function(t){s&&t.preventDefault(),r&&t.stopPropagation();for(var i=arguments.length,o=new Array(i>1?i-1:0),h=1;h1?i-1:0),s=1;s1&&void 0!==arguments[1]?arguments[1]:{}).replaceElement,n=!e._isAttached&&this._isElAttached()&&!this._shouldDisableMonitoring(),s=void 0===i?!!t.result(this,"replaceElement"):!!i;n&&e.triggerMethod("before:attach",e),s?this._replaceEl(e):this.attachHtml(e),n&&(e._isAttached=!0,e.triggerMethod("attach",e)),e._isShown=!0},_ensureElement:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._setEl(this.el),!this.el){if(void 0===e.allowMissingEl?!!t.result(this,"allowMissingEl"):!!e.allowMissingEl)return!1;throw new l({name:"RegionError",message:'An "el" must exist in DOM for this region '.concat(this.cid),url:"marionette.region.html#additional-options"})}return!0},_getView:function(e){if(!e)throw new l({name:"RegionError",message:"The view passed is undefined and therefore invalid. You must pass a view instance to show.",url:"marionette.region.html#showing-a-view"});if(e._isDestroyed)throw new l({name:"RegionError",message:'View (cid: "'.concat(e.cid,'") has already been destroyed and cannot be used.'),url:"marionette.region.html#showing-a-view"});if(function(e){return e.render&&(e.destroy||e.remove)}(e))return e;var t=this._getViewOptions(e);return new Me(t)},_getViewOptions:function(e){if(t.isFunction(e))return{template:e};if(t.isObject(e))return e;return{template:function(){return e}}},getEl:function(e){var i=t.result(this,"parentEl");return this.Dom.findEl(i||document,e)[0]},_replaceEl:function(e){this._restoreEl(),e.on("before:destroy",this._restoreEl,this),this.Dom.replaceEl(e.el,this.el),this._isReplaced=!0},_restoreEl:function(){if(this._isReplaced){var e=this.currentView;e&&(this._detachView(e),this._isReplaced=!1)}},isReplaced:function(){return!!this._isReplaced},isSwappingView:function(){return!!this._isSwappingView},attachHtml:function(e){this.Dom.appendContents(this.el,e.el)},empty:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{allowMissingEl:!0},t=this.currentView;return t?(this._empty(t,!0),this):(this._ensureElement(e)&&this.detachHtml(),this)},_empty:function(e,t){e.off("destroy",this._empty,this),this.triggerMethod("before:empty",this,e),this._restoreEl(),delete this.currentView,e._isDestroyed||(t?this.removeView(e):this._detachView(e),e._isShown=!1,this._stopChildViewEvents(e)),this.triggerMethod("empty",this,e)},_stopChildViewEvents:function(e){this._parentView&&this._parentView.stopListening(e)},destroyView:function(e){return e._isDestroyed?e:(pe(e,this._shouldDisableMonitoring()),e)},removeView:function(e){this.destroyView(e)},detachView:function(){var e=this.currentView;if(e)return this._empty(e),e},_detachView:function(e){var t=e._isAttached&&!this._shouldDisableMonitoring(),i=this._isReplaced;t&&e.triggerMethod("before:detach",e),i?this.Dom.replaceEl(this.el,e.el):this.detachHtml(),t&&(e._isAttached=!1,e.triggerMethod("detach",e))},detachHtml:function(){this.Dom.detachContents(this.el)},hasView:function(){return!!this.currentView},reset:function(e){return this.empty(e),this.el=this._initEl,delete this.$el,this},_isDestroyed:!1,isDestroyed:function(){return this._isDestroyed},destroy:function(e){return this._isDestroyed?this:(this.triggerMethod("before:destroy",this,e),this._isDestroyed=!0,this.reset(e),this._name&&this._parentView._removeReferences(this._name),delete this._parentView,delete this._name,this.triggerMethod("destroy",this,e),this.stopListening(),this)}});var be={regionClass:Ee,_initRegions:function(){this.regions=this.regions||{},this._regions={},this.addRegions(s.result(this,"regions"))},_reInitRegions:function(){ee(this._regions,"reset")},addRegion:function(e,t){var i={};return i[e]=t,this.addRegions(i)[e]},addRegions:function(e){if(!s.isEmpty(e))return e=this.normalizeUIValues(e,"el"),this.regions=s.extend({},this.regions,e),this._addRegions(e)},_addRegions:function(e){var t=this,i={regionClass:this.regionClass,parentEl:s.partial(s.result,this,"el")};return s.reduce(e,function(e,n,s){return e[s]=ye(n,i),t._addRegion(e[s],s),e},{})},_addRegion:function(e,t){this.triggerMethod("before:add:region",this,t,e),e._parentView=this,e._name=t,this._regions[t]=e,this.triggerMethod("add:region",this,t,e)},removeRegion:function(e){var t=this._regions[e];return this._removeRegion(t,e),t},removeRegions:function(){var e=this._getRegions();return s.each(this._regions,this._removeRegion.bind(this)),e},_removeRegion:function(e,t){this.triggerMethod("before:remove:region",this,t,e),e.destroy(),this.triggerMethod("remove:region",this,t,e)},_removeReferences:function(e){delete this.regions[e],delete this._regions[e]},emptyRegions:function(){var e=this.getRegions();return ee(e,"empty"),e},hasRegion:function(e){return!!this.getRegion(e)},getRegion:function(e){return this._isRendered||this.render(),this._regions[e]},_getRegions:function(){return s.clone(this._regions)},getRegions:function(){return this._isRendered||this.render(),this._getRegions()},showChildView:function(e,t,i){return this.getRegion(e).show(t,i),t},detachChildView:function(e){return this.getRegion(e).detachView()},getChildView:function(e){return this.getRegion(e).currentView}};function Ce(e){return this.prototype._renderHtml=e,this}var Re=["attributes","behaviors","childViewEventPrefix","childViewEvents","childViewTriggers","className","collection","collectionEvents","el","events","id","model","modelEvents","regionClass","regions","tagName","template","templateContext","triggers","ui"];function xe(e,t){return t.currentView&&e.push(t.currentView),e}var Me=function(e){this.cid=t.uniqueId(this.cidPrefix),this._setOptions(e,Re),this.preinitialize.apply(this,arguments),this._initViewEvents(),this.setElement(this._getEl()),A(this),this._initBehaviors(),this._initRegions(),this._buildEventProxies(),this.initialize.apply(this,arguments),this.delegateEntityEvents(),this._triggerEventOnBehaviors("initialize",this,e)};t.extend(Me,{extend:o,setRenderer:Ce,setDomApi:ge,setEventDelegator:ce}),t.extend(Me.prototype,ve,be,{cidPrefix:"mnv",setElement:function(e){return this._undelegateViewEvents(),this.el=e,this._setBehaviorElements(),this._isRendered=this.Dom.hasContents(this.el),this._isAttached=this._isElAttached(),this._isRendered&&this.bindUIElements(),this._delegateViewEvents(),this},render:function(){var e=this.getTemplate();return!1===e||this._isDestroyed?this:(this.triggerMethod("before:render",this),this._isRendered&&this._reInitRegions(),this._renderTemplate(e),this.bindUIElements(),this._isRendered=!0,this.triggerMethod("render",this),this)},_removeChildren:function(){this.removeRegions()},_getImmediateChildren:function(){return t.reduce(this._regions,xe,[])}});var De=function(){this._init()};function Be(e,t){return t.model&&t.model.get(e)}s.each(["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck","reduce","partition"],function(e){De.prototype[e]=function(){for(var t=arguments.length,i=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:this._views.length;this._addViewIndexes(e),this._views.splice(t,0,e),this._updateLength()},_addViewIndexes:function(e){this._viewsByCid[e.cid]=e,e.model&&(this._indexByModel[e.model.cid]=e)},_sort:function(e,t){return"string"==typeof e?(e=s.partial(Be,e),this._sortBy(e)):1===e.length?this._sortBy(e.bind(t)):this._views.sort(e.bind(t))},_sortBy:function(e){var t=s.sortBy(this._views,e);return this._set(t),t},_set:function(e,t){this._views.length=0,this._views.push.apply(this._views,e.slice(0)),t&&(this._viewsByCid={},this._indexByModel={},s.each(e,this._addViewIndexes.bind(this)),this._updateLength())},_swap:function(e,t){var i=this.findIndexByView(e),n=this.findIndexByView(t);if(-1!==i&&-1!==n){var s=this._views[i];this._views[i]=this._views[n],this._views[n]=s}},findByModel:function(e){return this.findByModelCid(e.cid)},findByModelCid:function(e){return this._indexByModel[e]},findByIndex:function(e){return this._views[e]},findIndexByView:function(e){return this._views.indexOf(e)},findByCid:function(e){return this._viewsByCid[e]},hasView:function(e){return!!this.findByCid(e.cid)},_remove:function(e){if(this._viewsByCid[e.cid]){e.model&&delete this._indexByModel[e.model.cid],delete this._viewsByCid[e.cid];var t=this.findIndexByView(e);this._views.splice(t,1),this._updateLength()}},_updateLength:function(){this.length=this._views.length}});var Ie=["attributes","behaviors","childView","childViewContainer","childViewEventPrefix","childViewEvents","childViewOptions","childViewTriggers","className","collection","collectionEvents","el","emptyView","emptyViewOptions","events","id","model","modelEvents","sortWithCollection","tagName","template","templateContext","triggers","ui","viewComparator","viewFilter"],Ae=function(e){this.cid=t.uniqueId(this.cidPrefix),this._setOptions(e,Ie),this.preinitialize.apply(this,arguments),this._initViewEvents(),this.setElement(this._getEl()),A(this),this._initChildViewStorage(),this._initBehaviors(),this._buildEventProxies(),this.getEmptyRegion(),this.initialize.apply(this,arguments),this.delegateEntityEvents(),this._triggerEventOnBehaviors("initialize",this,e)};t.extend(Ae,{extend:o,setRenderer:Ce,setDomApi:ge,setEventDelegator:ce}),t.extend(Ae.prototype,ve,{cidPrefix:"mncv",sortWithCollection:!0,_initChildViewStorage:function(){this._children=new De,this.children=new De},getEmptyRegion:function(){var e=this.container||this.el;return this._emptyRegion&&!this._emptyRegion.isDestroyed()?(this._emptyRegion._setElement(e),this._emptyRegion):(this._emptyRegion=new Ee({el:e,replaceElement:!1}),this._emptyRegion._parentView=this,this._emptyRegion)},_initialEvents:function(){this._isRendered||this.listenTo(this.collection,{sort:this._onCollectionSort,reset:this._onCollectionReset,update:this._onCollectionUpdate})},_onCollectionSort:function(e,t){var i=t.add,n=t.merge,s=t.remove;this.sortWithCollection&&!1!==this.viewComparator&&(i||s||n||this.sort())},_onCollectionReset:function(){this._destroyChildren(),this._addChildModels(this.collection.models),this.sort()},_onCollectionUpdate:function(e,t){var i=t.changes,n=i.removed.length&&this._removeChildModels(i.removed);this._addedViews=i.added.length&&this._addChildModels(i.added),this._detachChildren(n),this.sort(),this._removeChildViews(n)},_removeChildModels:function(e){var i=this;return t.reduce(e,function(e,t){var n=i._removeChildModel(t);return n&&e.push(n),e},[])},_removeChildModel:function(e){var t=this._children.findByModel(e);return t&&this._removeChild(t),t},_removeChild:function(e){this.triggerMethod("before:remove:child",this,e),this.children._remove(e),this._children._remove(e),this.triggerMethod("remove:child",this,e)},_addChildModels:function(e){return t.map(e,this._addChildModel.bind(this))},_addChildModel:function(e){var t=this._createChildView(e);return this._addChild(t),t},_createChildView:function(e){var t=this._getChildView(e),i=this._getChildViewOptions(e);return this.buildChildView(e,t,i)},_addChild:function(e,t){this.triggerMethod("before:add:child",this,e),this._setupChildView(e),this._children._add(e,t),this.children._add(e,t),this.triggerMethod("add:child",this,e)},_getChildView:function(e){var t=this.childView;if(!t)throw new l({name:"CollectionViewError",message:'A "childView" must be specified',url:"marionette.collectionview.html#collectionviews-childview"});if(!(t=this._getView(t,e)))throw new l({name:"CollectionViewError",message:'"childView" must be a view class or a function that returns a view class',url:"marionette.collectionview.html#collectionviews-childview"});return t},_getView:function(e,i){return(n=e).prototype.render&&(n.prototype.destroy||n.prototype.remove)?e:t.isFunction(e)?e.call(this,i):void 0;var n},_getChildViewOptions:function(e){return t.isFunction(this.childViewOptions)?this.childViewOptions(e):this.childViewOptions},buildChildView:function(e,i,n){return new i(t.extend({model:e},n))},_setupChildView:function(e){A(e),e.on("destroy",this.removeChildView,this),this._proxyChildViewEvents(e)},_getImmediateChildren:function(){return this.children._views},setElement:function(e){return this._undelegateViewEvents(),this.el=e,this._setBehaviorElements(),this._isAttached=this._isElAttached(),this._delegateViewEvents(),this},render:function(){if(this._isDestroyed)return this;this.triggerMethod("before:render",this),this._destroyChildren(),this.collection&&(this._addChildModels(this.collection.models),this._initialEvents());var e=this.getTemplate();return e&&(this._renderTemplate(e),this.bindUIElements()),this._getChildViewContainer(),this.sort(),this._isRendered=!0,this.triggerMethod("render",this),this},_getChildViewContainer:function(){var e=t.result(this,"childViewContainer");if(this.container=e?this.$(e)[0]:this.el,!this.container)throw new l({name:"CollectionViewError",message:'The specified "childViewContainer" was not found: '.concat(e),url:"marionette.collectionview.html#defining-the-childviewcontainer"})},sort:function(){return this._sortChildren(),this.filter(),this},_sortChildren:function(){if(this._children.length){var e=this.getComparator();e&&(delete this._addedViews,this.triggerMethod("before:sort",this),this._children._sort(e,this),this.triggerMethod("sort",this))}},setComparator:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).preventRender,i=this.viewComparator!==e&&!t;return this.viewComparator=e,i&&this.sort(),this},removeComparator:function(e){return this.setComparator(null,e)},getComparator:function(){return this.viewComparator?this.viewComparator:!(!this.sortWithCollection||!1===this.viewComparator||!this.collection)&&this._viewComparator},_viewComparator:function(e){return this.collection.indexOf(e.model)},filter:function(){return this._isDestroyed?this:(this._filterChildren(),this._renderChildren(),this)},_filterChildren:function(){var e=this;if(this._children.length){var i=this._getFilter();if(i){delete this._addedViews,this.triggerMethod("before:filter",this);var n=[],s=[];t.each(this._children._views,function(t,r,o){(i.call(e,t,r,o)?n:s).push(t)}),this._detachChildren(s),this.children._set(n,!0),this.triggerMethod("filter",this,n,s)}else{var r=this.children.length!==this._children.length;this.children._set(this._children._views,r)}}},_getFilter:function(){var e=this.getFilter();if(!e)return!1;if(t.isFunction(e))return e;if(t.isObject(e)){var i=t.matches(e);return function(e){return i(e.model&&e.model.attributes)}}if(t.isString(e))return function(t){return t.model&&t.model.get(e)};throw new l({name:"CollectionViewError",message:'"viewFilter" must be a function, predicate object literal, a string indicating a model attribute, or falsy',url:"marionette.collectionview.html#defining-the-viewfilter"})},getFilter:function(){return this.viewFilter},setFilter:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).preventRender,i=this.viewFilter!==e&&!t;return this.viewFilter=e,i&&this.filter(),this},removeFilter:function(e){return this.setFilter(null,e)},_detachChildren:function(e){t.each(e,this._detachChildView.bind(this))},_detachChildView:function(e){var t=e._isAttached&&!1!==this.monitorViewEvents;t&&e.triggerMethod("before:detach",e),this.detachHtml(e),t&&(e._isAttached=!1,e.triggerMethod("detach",e)),e._isShown=!1},detachHtml:function(e){this.Dom.detachEl(e.el)},_renderChildren:function(){this._hasUnrenderedViews&&(delete this._addedViews,delete this._hasUnrenderedViews);var e=this._addedViews||this.children._views;if(this.triggerMethod("before:render:children",this,e),this.isEmpty())this._showEmptyView();else{this._destroyEmptyView();var t=this._getBuffer(e);this._attachChildren(t,e)}delete this._addedViews,this.triggerMethod("render:children",this,e)},_getBuffer:function(e){var i=this,n=this.Dom.createBuffer();return t.each(e,function(e){me(e),e._isShown=!0,i.Dom.appendContents(n,e.el)}),n},_attachChildren:function(e,i){i=this._isAttached&&!1!==this.monitorViewEvents?i:[],t.each(i,function(e){e._isAttached||e.triggerMethod("before:attach",e)}),this.attachHtml(e,this.container),t.each(i,function(e){e._isAttached||(e._isAttached=!0,e.triggerMethod("attach",e))})},attachHtml:function(e,t){this.Dom.appendContents(t,e)},isEmpty:function(){return!this.children.length},_showEmptyView:function(){var e=this._getEmptyView();if(e){var t=this._getEmptyViewOptions();this.getEmptyRegion().show(new e(t))}},_getEmptyView:function(){var e=this.emptyView;if(e)return this._getView(e)},_destroyEmptyView:function(){var e=this.getEmptyRegion();e.hasView()&&e.empty()},_getEmptyViewOptions:function(){var e=this.emptyViewOptions||this.childViewOptions;return t.isFunction(e)?e.call(this):e},swapChildViews:function(e,t){if(!this._children.hasView(e)||!this._children.hasView(t))throw new l({name:"CollectionViewError",message:"Both views must be children of the collection view to swap.",url:"marionette.collectionview.html#swapping-child-views"});return this._children._swap(e,t),this.Dom.swapEl(e.el,t.el),this.children.hasView(e)!==this.children.hasView(t)?this.filter():this.children._swap(e,t),this},addChildView:function(e,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||e._isDestroyed)return e;if(e._isShown)throw new l({name:"CollectionViewError",message:"View is already shown in a Region or CollectionView",url:"marionette.region.html#showing-a-view"});if(t.isObject(i)&&(n=i),null!=n.index&&(i=n.index),this._isRendered||this.render(),this._addChild(e,i),n.preventRender)return this._hasUnrenderedViews=!0,e;var s=void 0!==i;return(!s||i>=this._children.length)&&!this._hasUnrenderedViews&&(this._addedViews=[e]),s?this._renderChildren():this.sort(),e},detachChildView:function(e){return this.removeChildView(e,{shouldDetach:!0}),e},removeChildView:function(e,t){return e?(this._removeChildView(e,t),this._removeChild(e),this.isEmpty()&&this._showEmptyView(),e):e},_removeChildViews:function(e){t.each(e,this._removeChildView.bind(this))},_removeChildView:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).shouldDetach;e.off("destroy",this.removeChildView,this),t?this._detachChildView(e):this._destroyChildView(e),this.stopListening(e)},_destroyChildView:function(e){e._isDestroyed||pe(e,!1===this.monitorViewEvents)},_removeChildren:function(){this._destroyChildren(),this.getEmptyRegion().destroy(),delete this._addedViews},_destroyChildren:function(){this._children.length&&(this.triggerMethod("before:destroy:children",this),!1===this.monitorViewEvents&&this.Dom.detachContents(this.el),this._removeChildViews(this._children._views),this._children._init(),this.children._init(),this.triggerMethod("destroy:children",this))}});var Oe=["collectionEvents","events","modelEvents","triggers","ui"],ke=function(e,i){this.view=i,this._setOptions(e,Oe),this.cid=t.uniqueId(this.cidPrefix),this._initViewEvents(),this.setElement(),this.ui=t.extend({},t.result(this,"ui"),t.result(i,"ui")),this.listenTo(i,"all",this.triggerMethod),this.initialize.apply(this,arguments)};ke.extend=o,t.extend(ke.prototype,Z,ne,he,fe,{cidPrefix:"mnb",$:function(){return this.view.$.apply(this.view,arguments)},destroy:function(){return this._undelegateViewEvents(),this.stopListening(),this.view._removeBehavior(this),this._deleteEntityEventHandlers(),this},setElement:function(){return this._undelegateViewEvents(),this.el=this.view.el,this._delegateViewEvents(this.view),this},bindUIElements:function(){return this._bindUIElements(),this},unbindUIElements:function(){return this._unbindUIElements(),this},getUI:function(e){return this._getUI(e)},delegateEntityEvents:function(){return this._delegateEntityEvents(this.view.model,this.view.collection),this},undelegateEntityEvents:function(){return this._undelegateEntityEvents(this.view.model,this.view.collection),this}});var Ue=["channelName","radioEvents","radioRequests","region","regionClass"],Se=function(e){this._setOptions(e,Ue),this.cid=s.uniqueId(this.cidPrefix),this._initRegion(),this._initRadio(),this.initialize.apply(this,arguments)};Se.extend=o,s.extend(Se.prototype,Z,G,J,{cidPrefix:"mna",initialize:function(){},start:function(e){return this.triggerMethod("before:start",this,e),this.triggerMethod("start",this,e),this},regionClass:Ee,_initRegion:function(){var e=this.region;if(e){var t={regionClass:this.regionClass};this._region=ye(e,t)}},getRegion:function(){return this._region},showView:function(e){for(var t=this.getRegion(),i=arguments.length,n=new Array(i>1?i-1:0),s=1;s functions or function names\n// and return a mapping of events => functions\nconst normalizeMethods = function(hash) {\n if (!hash) { return }\n\n return _.reduce(hash, (normalizedHash, method, name) => {\n if (!_.isFunction(method)) {\n method = this[method];\n }\n if (method) {\n normalizedHash[name] = method;\n }\n return normalizedHash;\n }, {});\n};\n\nexport default normalizeMethods;\n","// Error\n// -----\n\nimport _ from 'underscore';\nimport extend from './extend';\nimport {version} from '../../package.json';\n\nconst errorProps = ['description', 'fileName', 'lineNumber', 'name', 'message', 'number', 'url'];\n\nconst MarionetteError = extend.call(Error, {\n urlRoot: `http://marionettejs.com/docs/v${version}/`,\n\n url: '',\n\n constructor(options) {\n const error = Error.call(this, options.message);\n _.extend(this, _.pick(error, errorProps), _.pick(options, errorProps));\n\n if (Error.captureStackTrace) {\n this.captureStackTrace();\n }\n\n this.url = this.urlRoot + this.url;\n },\n\n captureStackTrace() {\n Error.captureStackTrace(this, MarionetteError);\n },\n\n toString() {\n return `${ this.name }: ${ this.message } See: ${ this.url }`;\n }\n});\n\nexport default MarionetteError;\n","// Bind Entity Events & Unbind Entity Events\n// -----------------------------------------\n//\n// These methods are used to bind/unbind a backbone \"entity\" (e.g. collection/model)\n// to methods on a target object.\n//\n// The first parameter, `target`, must have the Backbone.Events module mixed in.\n//\n// The second parameter is the `entity` (Backbone.Model, Backbone.Collection or\n// any object that has Backbone.Events mixed in) to bind the events from.\n//\n// The third parameter is a hash of { \"event:name\": \"eventHandler\" }\n// configuration. Multiple handlers can be separated by a space. A\n// function can be supplied instead of a string handler name.\n\nimport _ from 'underscore';\nimport normalizeMethods from './normalize-methods';\nimport MarionetteError from '../utils/error';\n\nfunction normalizeBindings(context, bindings) {\n if (!_.isObject(bindings)) {\n throw new MarionetteError({\n message: 'Bindings must be an object.',\n url: 'common.html#bindevents'\n });\n }\n\n return normalizeMethods.call(context, bindings);\n}\n\nfunction bindEvents(entity, bindings) {\n if (!entity || !bindings) { return this; }\n\n this.listenTo(entity, normalizeBindings(this, bindings));\n\n return this;\n}\n\nfunction unbindEvents(entity, bindings) {\n if (!entity) { return this; }\n\n if (!bindings) {\n this.stopListening(entity);\n return this;\n }\n\n this.stopListening(entity, normalizeBindings(this, bindings));\n\n return this;\n}\n\n// Export Public API\nexport {\n bindEvents,\n unbindEvents\n};\n","// Bind/Unbind Radio Requests\n// -----------------------------------------\n//\n// These methods are used to bind/unbind a backbone.radio request\n// to methods on a target object.\n//\n// The first parameter, `target`, will set the context of the reply method\n//\n// The second parameter is the `Radio.channel` to bind the reply to.\n//\n// The third parameter is a hash of { \"request:name\": \"replyHandler\" }\n// configuration. A function can be supplied instead of a string handler name.\n\nimport _ from 'underscore';\nimport normalizeMethods from './normalize-methods';\nimport MarionetteError from '../utils/error';\n\nfunction normalizeBindings(context, bindings) {\n if (!_.isObject(bindings)) {\n throw new MarionetteError({\n message: 'Bindings must be an object.',\n url: 'common.html#bindrequests'\n });\n }\n\n return normalizeMethods.call(context, bindings);\n}\n\nfunction bindRequests(channel, bindings) {\n if (!channel || !bindings) { return this; }\n\n channel.reply(normalizeBindings(this, bindings), this);\n\n return this;\n}\n\nfunction unbindRequests(channel, bindings) {\n if (!channel) { return this; }\n\n if (!bindings) {\n channel.stopReplying(null, null, this);\n return this;\n }\n\n channel.stopReplying(normalizeBindings(this, bindings));\n\n return this;\n}\n\nexport {\n bindRequests,\n unbindRequests\n};\n","// Marionette.getOption\n// --------------------\n\n// Retrieve an object, function or other value from the\n// object or its `options`, with `options` taking precedence.\nconst getOption = function(optionName) {\n if (!optionName) { return; }\n if (this.options && (this.options[optionName] !== undefined)) {\n return this.options[optionName];\n } else {\n return this[optionName];\n }\n};\n\nexport default getOption;\n","import _ from 'underscore';\n\n// Merge `keys` from `options` onto `this`\nconst mergeOptions = function(options, keys) {\n if (!options) { return; }\n\n _.each(keys, (key) => {\n const option = options[key];\n if (option !== undefined) {\n this[key] = option;\n }\n });\n};\n\nexport default mergeOptions;\n","// DOM Refresh\n// -----------\n\nimport _ from 'underscore';\n\n// Trigger method on children unless a pure Backbone.View\nfunction triggerMethodChildren(view, event, shouldTrigger) {\n if (!view._getImmediateChildren) { return; }\n _.each(view._getImmediateChildren(), child => {\n if (!shouldTrigger(child)) { return; }\n child.triggerMethod(event, child);\n });\n}\n\nfunction shouldTriggerAttach(view) {\n return !view._isAttached;\n}\n\nfunction shouldAttach(view) {\n if (!shouldTriggerAttach(view)) { return false; }\n view._isAttached = true;\n return true;\n}\n\nfunction shouldTriggerDetach(view) {\n return view._isAttached;\n}\n\nfunction shouldDetach(view) {\n view._isAttached = false;\n return true;\n}\n\nfunction triggerDOMRefresh(view) {\n if (view._isAttached && view._isRendered) {\n view.triggerMethod('dom:refresh', view);\n }\n}\n\nfunction triggerDOMRemove(view) {\n if (view._isAttached && view._isRendered) {\n view.triggerMethod('dom:remove', view);\n }\n}\n\nfunction handleBeforeAttach() {\n triggerMethodChildren(this, 'before:attach', shouldTriggerAttach);\n}\n\nfunction handleAttach() {\n triggerMethodChildren(this, 'attach', shouldAttach);\n triggerDOMRefresh(this);\n}\n\nfunction handleBeforeDetach() {\n triggerMethodChildren(this, 'before:detach', shouldTriggerDetach);\n triggerDOMRemove(this);\n}\n\nfunction handleDetach() {\n triggerMethodChildren(this, 'detach', shouldDetach);\n}\n\nfunction handleBeforeRender() {\n triggerDOMRemove(this);\n}\n\nfunction handleRender() {\n triggerDOMRefresh(this);\n}\n\n// Monitor a view's state, propagating attach/detach events to children and firing dom:refresh\n// whenever a rendered view is attached or an attached view is rendered.\nfunction monitorViewEvents(view) {\n if (view._areViewEventsMonitored || view.monitorViewEvents === false) { return; }\n\n view._areViewEventsMonitored = true;\n\n view.on({\n 'before:attach': handleBeforeAttach,\n 'attach': handleAttach,\n 'before:detach': handleBeforeDetach,\n 'detach': handleDetach,\n 'before:render': handleBeforeRender,\n 'render': handleRender\n });\n}\n\nexport default monitorViewEvents;\n","// Trigger Method\n// --------------\n\nimport _ from 'underscore';\nimport getOption from './get-option';\n\n// split the event name on the \":\"\nconst splitter = /(^|:)(\\w)/gi;\n\n// Only calc getOnMethodName once\nconst methodCache = {};\n\n// take the event section (\"section1:section2:section3\")\n// and turn it in to uppercase name onSection1Section2Section3\nfunction getEventName(match, prefix, eventName) {\n return eventName.toUpperCase();\n}\n\nconst getOnMethodName = function(event) {\n if (!methodCache[event]) {\n methodCache[event] = 'on' + event.replace(splitter, getEventName);\n }\n\n return methodCache[event];\n};\n\n// Trigger an event and/or a corresponding method name. Examples:\n//\n// `this.triggerMethod(\"foo\")` will trigger the \"foo\" event and\n// call the \"onFoo\" method.\n//\n// `this.triggerMethod(\"foo:bar\")` will trigger the \"foo:bar\" event and\n// call the \"onFooBar\" method.\nexport default function triggerMethod(event) {\n // get the method name from the event name\n const methodName = getOnMethodName(event);\n const method = getOption.call(this, methodName);\n let result;\n\n // call the onMethodName if it exists\n if (_.isFunction(method)) {\n // pass all args, except the event name\n result = method.apply(this, _.drop(arguments));\n }\n\n // trigger the event\n this.trigger.apply(this, arguments);\n\n return result;\n}\n","import triggerMethod from '../common/trigger-method';\n\nexport default {\n triggerMethod\n}\n","import _ from 'underscore';\nimport Backbone from 'backbone';\n\nimport getOption from '../common/get-option';\nimport mergeOptions from '../common/merge-options';\nimport normalizeMethods from '../common/normalize-methods';\nimport triggerMethod from '../common/trigger-method';\nimport {\n bindEvents,\n unbindEvents\n} from '../common/bind-events';\nimport {\n bindRequests,\n unbindRequests\n} from '../common/bind-requests';\n\nconst CommonMixin = {\n\n // Imports the \"normalizeMethods\" to transform hashes of\n // events=>function references/names to a hash of events=>function references\n normalizeMethods,\n\n _setOptions(options, classOptions) {\n this.options = _.extend({}, _.result(this, 'options'), options);\n this.mergeOptions(options, classOptions);\n },\n\n // A handy way to merge passed-in options onto the instance\n mergeOptions,\n\n // Enable getting options from this or this.options by name.\n getOption,\n\n // Enable binding view's events from another entity.\n bindEvents,\n\n // Enable unbinding view's events from another entity.\n unbindEvents,\n\n // Enable binding view's requests.\n bindRequests,\n\n // Enable unbinding view's requests.\n unbindRequests,\n\n triggerMethod\n};\n\n_.extend(CommonMixin, Backbone.Events);\n\nexport default CommonMixin;\n","export default {\n _isDestroyed: false,\n\n isDestroyed() {\n return this._isDestroyed;\n },\n\n destroy(options) {\n if (this._isDestroyed) { return this; }\n\n this.triggerMethod('before:destroy', this, options);\n this._isDestroyed = true;\n this.triggerMethod('destroy', this, options);\n this.stopListening();\n\n return this;\n }\n};\n","import _ from 'underscore';\nimport Radio from 'backbone.radio';\nimport MarionetteError from '../utils/error';\n\n// MixinOptions\n// - channelName\n// - radioEvents\n// - radioRequests\n\nexport default {\n\n _initRadio() {\n const channelName = _.result(this, 'channelName');\n\n if (!channelName) {\n return;\n }\n\n /* istanbul ignore next */\n if (!Radio) {\n throw new MarionetteError({\n message: 'The dependency \"backbone.radio\" is missing.',\n url: 'backbone.radio.html#marionette-integration'\n });\n }\n\n const channel = this._channel = Radio.channel(channelName);\n\n const radioEvents = _.result(this, 'radioEvents');\n this.bindEvents(channel, radioEvents);\n\n const radioRequests = _.result(this, 'radioRequests');\n this.bindRequests(channel, radioRequests);\n\n this.on('destroy', this._destroyRadio);\n },\n\n _destroyRadio() {\n this._channel.stopReplying(null, null, this);\n },\n\n getChannel() {\n return this._channel;\n }\n};\n","// Object\n// ------\n\nimport _ from 'underscore';\nimport extend from './utils/extend';\nimport CommonMixin from './mixins/common';\nimport DestroyMixin from './mixins/destroy';\nimport RadioMixin from './mixins/radio';\n\nconst ClassOptions = [\n 'channelName',\n 'radioEvents',\n 'radioRequests'\n];\n\n// Object borrows many conventions and utilities from Backbone.\nconst MarionetteObject = function(options) {\n this._setOptions(options, ClassOptions);\n this.cid = _.uniqueId(this.cidPrefix);\n this._initRadio();\n this.initialize.apply(this, arguments);\n};\n\nMarionetteObject.extend = extend;\n\n// Object Methods\n// --------------\n\n_.extend(MarionetteObject.prototype, CommonMixin, DestroyMixin, RadioMixin, {\n cidPrefix: 'mno',\n\n // This is a noop method intended to be overridden\n initialize() {}\n});\n\nexport default MarionetteObject;\n","// Implementation of the invoke method (http://underscorejs.org/#invoke) with support for\n// lodash v3, v4, and underscore.js\nimport _ from 'underscore';\n\nexport default _.invokeMap || _.invoke;\n","import _ from 'underscore';\nimport MarionetteError from '../utils/error';\nimport _invoke from '../utils/invoke';\n\n// MixinOptions\n// - behaviors\n\n// Takes care of getting the behavior class\n// given options and a key.\n// If a user passes in options.behaviorClass\n// default to using that.\n// If a user passes in a Behavior Class directly, use that\n// Otherwise an error is thrown\nfunction getBehaviorClass(options) {\n if (options.behaviorClass) {\n return { BehaviorClass: options.behaviorClass, options };\n }\n\n //treat functions as a Behavior constructor\n if (_.isFunction(options)) {\n return { BehaviorClass: options, options: {} };\n }\n\n throw new MarionetteError({\n message: 'Unable to get behavior class. A Behavior constructor should be passed directly or as behaviorClass property of options',\n url: 'marionette.behavior.html#defining-and-attaching-behaviors'\n });\n}\n\n// Iterate over the behaviors object, for each behavior\n// instantiate it and get its grouped behaviors.\n// This accepts a list of behaviors in either an object or array form\nfunction parseBehaviors(view, behaviors, allBehaviors) {\n return _.reduce(behaviors, (reducedBehaviors, behaviorDefiniton) => {\n const { BehaviorClass, options } = getBehaviorClass(behaviorDefiniton);\n const behavior = new BehaviorClass(options, view);\n reducedBehaviors.push(behavior);\n\n return parseBehaviors(view, _.result(behavior, 'behaviors'), reducedBehaviors);\n }, allBehaviors);\n}\n\nexport default {\n _initBehaviors() {\n this._behaviors = parseBehaviors(this, _.result(this, 'behaviors'), []);\n },\n\n _getBehaviorTriggers() {\n const triggers = _invoke(this._behaviors, '_getTriggers');\n return _.reduce(triggers, function(memo, _triggers) {\n return _.extend(memo, _triggers);\n }, {});\n },\n\n _getBehaviorEvents() {\n const events = _invoke(this._behaviors, '_getEvents');\n return _.reduce(events, function(memo, _events) {\n return _.extend(memo, _events);\n }, {});\n },\n\n // proxy behavior $el to the view's $el.\n _proxyBehaviorViewProperties() {\n _invoke(this._behaviors, 'proxyViewProperties');\n },\n\n // delegate modelEvents and collectionEvents\n _delegateBehaviorEntityEvents() {\n _invoke(this._behaviors, 'delegateEntityEvents');\n },\n\n // undelegate modelEvents and collectionEvents\n _undelegateBehaviorEntityEvents() {\n _invoke(this._behaviors, 'undelegateEntityEvents');\n },\n\n _destroyBehaviors(options) {\n // Call destroy on each behavior after\n // destroying the view.\n // This unbinds event listeners\n // that behaviors have registered for.\n _invoke(this._behaviors, 'destroy', options);\n },\n\n // Remove a behavior\n _removeBehavior(behavior) {\n // Don't worry about the clean up if the view is destroyed\n if (this._isDestroyed) { return; }\n\n // Remove behavior-only triggers and events\n this.undelegate(`.trig${ behavior.cid } .${ behavior.cid }`);\n\n this._behaviors = _.without(this._behaviors, behavior);\n },\n\n _bindBehaviorUIElements() {\n _invoke(this._behaviors, 'bindUIElements');\n },\n\n _unbindBehaviorUIElements() {\n _invoke(this._behaviors, 'unbindUIElements');\n },\n\n _triggerEventOnBehaviors(eventName, view, options) {\n _invoke(this._behaviors, 'triggerMethod', eventName, view, options);\n }\n};\n","import _ from 'underscore';\n\n// MixinOptions\n// - collectionEvents\n// - modelEvents\n\nexport default {\n // Handle `modelEvents`, and `collectionEvents` configuration\n _delegateEntityEvents(model, collection) {\n if (model) {\n this._modelEvents = _.result(this, 'modelEvents');\n this.bindEvents(model, this._modelEvents);\n }\n\n if (collection) {\n this._collectionEvents = _.result(this, 'collectionEvents');\n this.bindEvents(collection, this._collectionEvents);\n }\n },\n\n // Remove any previously delegate entity events\n _undelegateEntityEvents(model, collection) {\n if (this._modelEvents) {\n this.unbindEvents(model, this._modelEvents);\n delete this._modelEvents;\n }\n\n if (this._collectionEvents) {\n this.unbindEvents(collection, this._collectionEvents);\n delete this._collectionEvents;\n }\n },\n\n // Remove cached event handlers\n _deleteEntityEventHandlers() {\n delete this._modelEvents;\n delete this._collectionEvents;\n }\n};\n","import _ from 'underscore';\n\n// MixinOptions\n// - template\n// - templateContext\n\nexport default {\n\n // Internal method to render the template with the serialized data\n // and template context\n _renderTemplate(template) {\n // Add in entity data and template context\n const data = this.mixinTemplateContext(this.serializeData()) || {};\n\n // Render and add to el\n const html = this._renderHtml(template, data);\n if (typeof html !== 'undefined') {\n this.attachElContent(html);\n }\n },\n\n // Get the template for this view instance.\n // You can set a `template` attribute in the view definition\n // or pass a `template: TemplateFunction` parameter in\n // to the constructor options.\n getTemplate() {\n return this.template;\n },\n\n // Mix in template context methods. Looks for a\n // `templateContext` attribute, which can either be an\n // object literal, or a function that returns an object\n // literal. All methods and attributes from this object\n // are copies to the object passed in.\n mixinTemplateContext(serializedData) {\n const templateContext = _.result(this, 'templateContext');\n if (!templateContext) { return serializedData; }\n if (!serializedData) { return templateContext; }\n return _.extend({}, serializedData, templateContext);\n },\n\n // Serialize the view's model *or* collection, if\n // it exists, for the template\n serializeData() {\n // If we have a model, we serialize that\n if (this.model) {\n return this.serializeModel();\n }\n\n // Otherwise, we serialize the collection,\n // making it available under the `items` property\n if (this.collection) {\n return {\n items: this.serializeCollection()\n };\n }\n },\n\n // Prepares the special `model` property of a view\n // for being displayed in the template. Override this if\n // you need a custom transformation for your view's model\n serializeModel() {\n return this.model.attributes;\n },\n\n // Serialize a collection\n serializeCollection() {\n return _.map(this.collection.models, model => model.attributes);\n },\n\n // Renders the data into the template\n _renderHtml(template, data) {\n return template(data);\n },\n\n // Attaches the content of a given view.\n // This method can be overridden to optimize rendering,\n // or to render in a non standard way.\n //\n // For example, using `innerHTML` instead of `$el.html`\n //\n // ```js\n // attachElContent(html) {\n // this.el.innerHTML = html;\n // }\n // ```\n attachElContent(html) {\n this.Dom.setContents(this.el, html, this.$el);\n }\n};\n","// Borrow event splitter from Backbone\nconst delegateEventSplitter = /^(\\S+)\\s*(.*)$/;\n\n// Set event name to be namespaced using a unique index\n// to generate a non colliding event namespace\n// http://api.jquery.com/event.namespace/\nconst getNamespacedEventName = function(eventName, namespace) {\n const match = eventName.match(delegateEventSplitter);\n return `${ match[1] }.${ namespace } ${ match[2] }`;\n};\n\nexport default getNamespacedEventName;\n","// Add Feature flags here\n// e.g. 'class' => false\nconst FEATURES = {\n childViewEventPrefix: false,\n triggersStopPropagation: true,\n triggersPreventDefault: true,\n DEV_MODE: false\n};\n\nfunction isEnabled(name) {\n return !!FEATURES[name];\n}\n\nfunction setEnabled(name, state) {\n return FEATURES[name] = state;\n}\n\nexport {\n FEATURES,\n setEnabled,\n isEnabled\n};\n","import _ from 'underscore';\nimport getNamespacedEventName from '../utils/get-namespaced-event-name';\nimport { isEnabled } from '../config/features';\n\n// Internal method to create an event handler for a given `triggerDef` like\n// 'click:foo'\nfunction buildViewTrigger(view, triggerDef) {\n if (_.isString(triggerDef)) {\n triggerDef = {event: triggerDef};\n }\n\n const eventName = triggerDef.event;\n\n let shouldPreventDefault = !!triggerDef.preventDefault;\n\n if (isEnabled('triggersPreventDefault')) {\n shouldPreventDefault = triggerDef.preventDefault !== false;\n }\n\n let shouldStopPropagation = !!triggerDef.stopPropagation;\n\n if (isEnabled('triggersStopPropagation')) {\n shouldStopPropagation = triggerDef.stopPropagation !== false;\n }\n\n return function(event, ...args) {\n if (shouldPreventDefault) {\n event.preventDefault();\n }\n\n if (shouldStopPropagation) {\n event.stopPropagation();\n }\n\n view.triggerMethod(eventName, view, event, ...args);\n };\n}\n\nexport default {\n\n // Configure `triggers` to forward DOM events to view\n // events. `triggers: {\"click .foo\": \"do:foo\"}`\n _getViewTriggers(view, triggers) {\n // Configure the triggers, prevent default\n // action and stop propagation of DOM events\n return _.reduce(triggers, (events, value, key) => {\n key = getNamespacedEventName(key, `trig${ this.cid }`);\n events[key] = buildViewTrigger(view, value);\n return events;\n }, {});\n }\n\n};\n","import _ from 'underscore';\n// allows for the use of the @ui. syntax within\n// a given key for triggers and events\n// swaps the @ui with the associated selector.\n// Returns a new, non-mutated, parsed events hash.\nconst normalizeUIKeys = function(hash, ui) {\n return _.reduce(hash, (memo, val, key) => {\n const normalizedKey = normalizeUIString(key, ui);\n memo[normalizedKey] = val;\n return memo;\n }, {});\n};\n\nconst uiRegEx = /@ui\\.[a-zA-Z-_$0-9]*/g;\n\n// utility method for parsing @ui. syntax strings\n// into associated selector\nconst normalizeUIString = function(uiString, ui) {\n return uiString.replace(uiRegEx, (r) => {\n return ui[r.slice(4)];\n });\n};\n\n// allows for the use of the @ui. syntax within\n// a given value for regions\n// swaps the @ui with the associated selector\nconst normalizeUIValues = function(hash, ui, property) {\n _.each(hash, (val, key) => {\n if (_.isString(val)) {\n hash[key] = normalizeUIString(val, ui);\n } else if (val) {\n const propertyVal = val[property];\n if (_.isString(propertyVal)) {\n val[property] = normalizeUIString(propertyVal, ui);\n }\n }\n });\n return hash;\n};\n\nexport default {\n\n // normalize the keys of passed hash with the views `ui` selectors.\n // `{\"@ui.foo\": \"bar\"}`\n normalizeUIKeys(hash) {\n const uiBindings = this._getUIBindings();\n return normalizeUIKeys(hash, uiBindings);\n },\n\n // normalize the passed string with the views `ui` selectors.\n // `\"@ui.bar\"`\n normalizeUIString(uiString) {\n const uiBindings = this._getUIBindings();\n return normalizeUIString(uiString, uiBindings);\n },\n\n // normalize the values of passed hash with the views `ui` selectors.\n // `{foo: \"@ui.bar\"}`\n normalizeUIValues(hash, property) {\n const uiBindings = this._getUIBindings();\n return normalizeUIValues(hash, uiBindings, property);\n },\n\n _getUIBindings() {\n const uiBindings = _.result(this, '_uiBindings');\n return uiBindings || _.result(this, 'ui');\n },\n\n // This method binds the elements specified in the \"ui\" hash inside the view's code with\n // the associated jQuery selectors.\n _bindUIElements() {\n if (!this.ui) { return; }\n\n // store the ui hash in _uiBindings so they can be reset later\n // and so re-rendering the view will be able to find the bindings\n if (!this._uiBindings) {\n this._uiBindings = this.ui;\n }\n\n // get the bindings result, as a function or otherwise\n const bindings = _.result(this, '_uiBindings');\n\n // empty the ui so we don't have anything to start with\n this._ui = {};\n\n // bind each of the selectors\n _.each(bindings, (selector, key) => {\n this._ui[key] = this.$(selector);\n });\n\n this.ui = this._ui;\n },\n\n _unbindUIElements() {\n if (!this.ui || !this._uiBindings) { return; }\n\n // delete all of the existing ui bindings\n _.each(this.ui, ($el, name) => {\n delete this.ui[name];\n });\n\n // reset the ui element to the original bindings configuration\n this.ui = this._uiBindings;\n delete this._uiBindings;\n delete this._ui;\n },\n\n _getUI(name) {\n return this._ui[name];\n }\n};\n","// DomApi\n// ---------\nimport _ from 'underscore';\nimport Backbone from 'backbone';\n\n// Performant method for returning the jQuery instance\nfunction getEl(el) {\n return el instanceof Backbone.$ ? el : Backbone.$(el);\n}\n\n// Static setter\nexport function setDomApi(mixin) {\n this.prototype.Dom = _.extend({}, this.prototype.Dom, mixin);\n return this;\n}\n\nexport default {\n\n // Returns a new HTML DOM node instance\n createBuffer() {\n return document.createDocumentFragment();\n },\n\n // Returns the document element for a given DOM element\n getDocumentEl(el) {\n return el.ownerDocument.documentElement;\n },\n\n // Lookup the `selector` string\n // Selector may also be a DOM element\n // Returns an array-like object of nodes\n getEl(selector) {\n return getEl(selector);\n },\n\n // Finds the `selector` string with the el\n // Returns an array-like object of nodes\n findEl(el, selector) {\n return getEl(el).find(selector);\n },\n\n // Returns true if the el contains the node childEl\n hasEl(el, childEl) {\n return el.contains(childEl && childEl.parentNode);\n },\n\n // Detach `el` from the DOM without removing listeners\n detachEl(el, _$el = getEl(el)) {\n _$el.detach();\n },\n\n // Remove `oldEl` from the DOM and put `newEl` in its place\n replaceEl(newEl, oldEl) {\n if (newEl === oldEl) {\n return;\n }\n\n const parent = oldEl.parentNode;\n\n if (!parent) {\n return;\n }\n\n parent.replaceChild(newEl, oldEl);\n },\n\n // Swaps the location of `el1` and `el2` in the DOM\n swapEl(el1, el2) {\n if (el1 === el2) {\n return;\n }\n\n const parent1 = el1.parentNode;\n const parent2 = el2.parentNode;\n\n if (!parent1 || !parent2) {\n return;\n }\n\n const next1 = el1.nextSibling;\n const next2 = el2.nextSibling;\n\n parent1.insertBefore(el2, next1);\n parent2.insertBefore(el1, next2);\n },\n\n // Replace the contents of `el` with the HTML string of `html`\n setContents(el, html, _$el = getEl(el)) {\n _$el.html(html);\n },\n\n // Takes the DOM node `el` and appends the DOM node `contents`\n // to the end of the element's contents.\n appendContents(el, contents, {_$el = getEl(el), _$contents = getEl(contents)} = {}) {\n _$el.append(_$contents);\n },\n\n // Does the el have child nodes\n hasContents(el) {\n return !!el && el.hasChildNodes();\n },\n\n // Remove the inner contents of `el` from the DOM while leaving\n // `el` itself in the DOM.\n detachContents(el, _$el = getEl(el)) {\n _$el.contents().detach();\n }\n};\n","// ViewMixin\n// ---------\n\nimport Backbone from 'backbone';\nimport _ from 'underscore';\nimport BehaviorsMixin from './behaviors';\nimport CommonMixin from './common';\nimport DelegateEntityEventsMixin from './delegate-entity-events';\nimport TemplateRenderMixin from './template-render';\nimport TriggersMixin from './triggers';\nimport UIMixin from './ui';\nimport { isEnabled } from '../config/features';\nimport DomApi from '../config/dom';\n\n// MixinOptions\n// - behaviors\n// - childViewEventPrefix\n// - childViewEvents\n// - childViewTriggers\n// - collectionEvents\n// - modelEvents\n// - triggers\n// - ui\n\n\nconst ViewMixin = {\n Dom: DomApi,\n\n _isElAttached() {\n return !!this.el && this.Dom.hasEl(this.Dom.getDocumentEl(this.el), this.el);\n },\n\n supportsRenderLifecycle: true,\n supportsDestroyLifecycle: true,\n\n _isDestroyed: false,\n\n isDestroyed() {\n return !!this._isDestroyed;\n },\n\n _isRendered: false,\n\n isRendered() {\n return !!this._isRendered;\n },\n\n _isAttached: false,\n\n isAttached() {\n return !!this._isAttached;\n },\n\n // Overriding Backbone.View's `delegateEvents` to handle\n // `events` and `triggers`\n delegateEvents(events) {\n this._proxyBehaviorViewProperties();\n this._buildEventProxies();\n\n const combinedEvents = _.extend({},\n this._getBehaviorEvents(),\n this._getEvents(events),\n this._getBehaviorTriggers(),\n this._getTriggers()\n );\n\n Backbone.View.prototype.delegateEvents.call(this, combinedEvents);\n\n return this;\n },\n\n // Allows Backbone.View events to utilize `@ui.` selectors\n _getEvents(events) {\n if (events) {\n return this.normalizeUIKeys(events);\n }\n\n if (!this.events) { return; }\n\n return this.normalizeUIKeys(_.result(this, 'events'));\n },\n\n // Configure `triggers` to forward DOM events to view\n // events. `triggers: {\"click .foo\": \"do:foo\"}`\n _getTriggers() {\n if (!this.triggers) { return; }\n\n // Allow `triggers` to be configured as a function\n const triggers = this.normalizeUIKeys(_.result(this, 'triggers'));\n\n // Configure the triggers, prevent default\n // action and stop propagation of DOM events\n return this._getViewTriggers(this, triggers);\n },\n\n // Handle `modelEvents`, and `collectionEvents` configuration\n delegateEntityEvents() {\n this._delegateEntityEvents(this.model, this.collection);\n\n // bind each behaviors model and collection events\n this._delegateBehaviorEntityEvents();\n\n return this;\n },\n\n // Handle unbinding `modelEvents`, and `collectionEvents` configuration\n undelegateEntityEvents() {\n this._undelegateEntityEvents(this.model, this.collection);\n\n // unbind each behaviors model and collection events\n this._undelegateBehaviorEntityEvents();\n\n return this;\n },\n\n // Handle destroying the view and its children.\n destroy(options) {\n if (this._isDestroyed || this._isDestroying) { return this; }\n this._isDestroying = true;\n const shouldTriggerDetach = this._isAttached && !this._disableDetachEvents;\n\n this.triggerMethod('before:destroy', this, options);\n if (shouldTriggerDetach) {\n this.triggerMethod('before:detach', this);\n }\n\n // unbind UI elements\n this.unbindUIElements();\n\n // remove the view from the DOM\n this._removeElement();\n\n if (shouldTriggerDetach) {\n this._isAttached = false;\n this.triggerMethod('detach', this);\n }\n\n // remove children after the remove to prevent extra paints\n this._removeChildren();\n\n this._isDestroyed = true;\n this._isRendered = false;\n\n // Destroy behaviors after _isDestroyed flag\n this._destroyBehaviors(options);\n\n this._deleteEntityEventHandlers();\n\n this.triggerMethod('destroy', this, options);\n this._triggerEventOnBehaviors('destroy', this, options);\n\n this.stopListening();\n\n return this;\n },\n\n // Equates to this.$el.remove\n _removeElement() {\n this.$el.off().removeData();\n this.Dom.detachEl(this.el, this.$el);\n },\n\n // This method binds the elements specified in the \"ui\" hash\n bindUIElements() {\n this._bindUIElements();\n this._bindBehaviorUIElements();\n\n return this;\n },\n\n // This method unbinds the elements specified in the \"ui\" hash\n unbindUIElements() {\n this._unbindUIElements();\n this._unbindBehaviorUIElements();\n\n return this;\n },\n\n getUI(name) {\n return this._getUI(name);\n },\n\n // Cache `childViewEvents` and `childViewTriggers`\n _buildEventProxies() {\n this._childViewEvents = this.normalizeMethods(_.result(this, 'childViewEvents'));\n this._childViewTriggers = _.result(this, 'childViewTriggers');\n this._eventPrefix = this._getEventPrefix();\n },\n\n _getEventPrefix() {\n const defaultPrefix = isEnabled('childViewEventPrefix') ? 'childview' : false;\n const prefix = _.result(this, 'childViewEventPrefix', defaultPrefix);\n\n return (prefix === false) ? prefix : prefix + ':';\n },\n\n _proxyChildViewEvents(view) {\n if (this._childViewEvents || this._childViewTriggers || this._eventPrefix) {\n this.listenTo(view, 'all', this._childViewEventHandler);\n }\n },\n\n _childViewEventHandler(eventName, ...args) {\n const childViewEvents = this._childViewEvents;\n\n // call collectionView childViewEvent if defined\n if (childViewEvents && childViewEvents[eventName]) {\n childViewEvents[eventName].apply(this, args);\n }\n\n // use the parent view's proxyEvent handlers\n const childViewTriggers = this._childViewTriggers;\n\n // Call the event with the proxy name on the parent layout\n if (childViewTriggers && childViewTriggers[eventName]) {\n this.triggerMethod(childViewTriggers[eventName], ...args);\n }\n\n if (this._eventPrefix) {\n this.triggerMethod(this._eventPrefix + eventName, ...args);\n }\n }\n};\n\n_.extend(ViewMixin, BehaviorsMixin, CommonMixin, DelegateEntityEventsMixin, TemplateRenderMixin, TriggersMixin, UIMixin);\n\nexport default ViewMixin;\n","export function renderView(view) {\n if (view._isRendered) {\n return;\n }\n\n if (!view.supportsRenderLifecycle) {\n view.triggerMethod('before:render', view);\n }\n\n view.render();\n view._isRendered = true;\n\n if (!view.supportsRenderLifecycle) {\n view.triggerMethod('render', view);\n }\n}\n\nexport function destroyView(view, disableDetachEvents) {\n if (view.destroy) {\n // Attach flag for public destroy function internal check\n view._disableDetachEvents = disableDetachEvents;\n view.destroy();\n return;\n }\n\n // Destroy for non-Marionette Views\n if (!view.supportsDestroyLifecycle) {\n view.triggerMethod('before:destroy', view);\n }\n\n const shouldTriggerDetach = view._isAttached && !disableDetachEvents;\n\n if (shouldTriggerDetach) {\n view.triggerMethod('before:detach', view);\n }\n\n view.remove();\n\n if (shouldTriggerDetach) {\n view._isAttached = false;\n view.triggerMethod('detach', view);\n }\n\n view._isDestroyed = true;\n\n if (!view.supportsDestroyLifecycle) {\n view.triggerMethod('destroy', view);\n }\n}\n","// Region\n// ------\n\nimport _ from 'underscore';\nimport Backbone from 'backbone';\nimport MarionetteError from './utils/error';\nimport extend from './utils/extend';\nimport monitorViewEvents from './common/monitor-view-events';\nimport { renderView, destroyView } from './common/view';\nimport CommonMixin from './mixins/common';\nimport View from './view';\nimport DomApi, { setDomApi } from './config/dom';\n\nconst classErrorName = 'RegionError';\n\nconst ClassOptions = [\n 'allowMissingEl',\n 'parentEl',\n 'replaceElement'\n];\n\nconst Region = function(options) {\n this._setOptions(options, ClassOptions);\n\n this.cid = _.uniqueId(this.cidPrefix);\n\n // getOption necessary because options.el may be passed as undefined\n this._initEl = this.el = this.getOption('el');\n\n // Handle when this.el is passed in as a $ wrapped element.\n this.el = this.el instanceof Backbone.$ ? this.el[0] : this.el;\n\n this.$el = this._getEl(this.el);\n\n this.initialize.apply(this, arguments);\n};\n\nRegion.extend = extend;\nRegion.setDomApi = setDomApi;\n\n// Region Methods\n// --------------\n\n_.extend(Region.prototype, CommonMixin, {\n Dom: DomApi,\n\n cidPrefix: 'mnr',\n replaceElement: false,\n _isReplaced: false,\n _isSwappingView: false,\n\n // This is a noop method intended to be overridden\n initialize() {},\n\n // Displays a view instance inside of the region. If necessary handles calling the `render`\n // method for you. Reads content directly from the `el` attribute.\n show(view, options) {\n if (!this._ensureElement(options)) {\n return;\n }\n\n view = this._getView(view, options);\n\n if (view === this.currentView) { return this; }\n\n if (view._isShown) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'View is already shown in a Region or CollectionView',\n url: 'marionette.region.html#showing-a-view'\n });\n }\n\n this._isSwappingView = !!this.currentView;\n\n this.triggerMethod('before:show', this, view, options);\n\n // Assume an attached view is already in the region for pre-existing DOM\n if (this.currentView || !view._isAttached) {\n this.empty(options);\n }\n\n this._setupChildView(view);\n\n this.currentView = view;\n\n renderView(view);\n\n this._attachView(view, options);\n\n this.triggerMethod('show', this, view, options);\n\n this._isSwappingView = false;\n\n return this;\n },\n\n _getEl(el) {\n if (!el) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'An \"el\" must be specified for a region.',\n url: 'marionette.region.html#additional-options'\n });\n }\n\n return this.getEl(el);\n },\n\n _setEl() {\n this.$el = this._getEl(this.el);\n\n if (this.$el.length) {\n this.el = this.$el[0];\n }\n\n // Make sure the $el contains only the el\n if (this.$el.length > 1) {\n this.$el = this.Dom.getEl(this.el);\n }\n },\n\n // Set the `el` of the region and move any current view to the new `el`.\n _setElement(el) {\n if (el === this.el) { return this; }\n\n const shouldReplace = this._isReplaced;\n\n this._restoreEl();\n\n this.el = el;\n\n this._setEl();\n\n if (this.currentView) {\n const view = this.currentView;\n\n if (shouldReplace) {\n this._replaceEl(view);\n } else {\n this.attachHtml(view);\n }\n }\n\n return this;\n },\n\n _setupChildView(view) {\n monitorViewEvents(view);\n\n this._proxyChildViewEvents(view);\n\n // We need to listen for if a view is destroyed in a way other than through the region.\n // If this happens we need to remove the reference to the currentView since once a view\n // has been destroyed we can not reuse it.\n view.on('destroy', this._empty, this);\n },\n\n _proxyChildViewEvents(view) {\n const parentView = this._parentView;\n\n if (!parentView) { return; }\n\n parentView._proxyChildViewEvents(view);\n },\n\n // If the regions parent view is not monitoring its attach/detach events\n _shouldDisableMonitoring() {\n return this._parentView && this._parentView.monitorViewEvents === false;\n },\n\n _isElAttached() {\n return this.Dom.hasEl(this.Dom.getDocumentEl(this.el), this.el);\n },\n\n _attachView(view, { replaceElement } = {}) {\n const shouldTriggerAttach = !view._isAttached && this._isElAttached() && !this._shouldDisableMonitoring();\n const shouldReplaceEl = typeof replaceElement === 'undefined' ? !!_.result(this, 'replaceElement') : !!replaceElement;\n\n if (shouldTriggerAttach) {\n view.triggerMethod('before:attach', view);\n }\n\n if (shouldReplaceEl) {\n this._replaceEl(view);\n } else {\n this.attachHtml(view);\n }\n\n if (shouldTriggerAttach) {\n view._isAttached = true;\n view.triggerMethod('attach', view);\n }\n\n // Corresponds that view is shown in a marionette Region or CollectionView\n view._isShown = true;\n },\n\n _ensureElement(options = {}) {\n if (!_.isObject(this.el)) {\n this._setEl();\n }\n\n if (!this.$el || this.$el.length === 0) {\n const allowMissingEl = typeof options.allowMissingEl === 'undefined' ? !!_.result(this, 'allowMissingEl') : !!options.allowMissingEl;\n\n if (allowMissingEl) {\n return false;\n } else {\n throw new MarionetteError({\n name: classErrorName,\n message: `An \"el\" must exist in DOM for this region ${this.cid}`,\n url: 'marionette.region.html#additional-options'\n });\n }\n }\n return true;\n },\n\n _getView(view) {\n if (!view) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'The view passed is undefined and therefore invalid. You must pass a view instance to show.',\n url: 'marionette.region.html#showing-a-view'\n });\n }\n\n if (view._isDestroyed) {\n throw new MarionetteError({\n name: classErrorName,\n message: `View (cid: \"${view.cid}\") has already been destroyed and cannot be used.`,\n url: 'marionette.region.html#showing-a-view'\n });\n }\n\n if (view instanceof Backbone.View) {\n return view;\n }\n\n const viewOptions = this._getViewOptions(view);\n\n return new View(viewOptions);\n },\n\n // This allows for a template or a static string to be\n // used as a template\n _getViewOptions(viewOptions) {\n if (_.isFunction(viewOptions)) {\n return { template: viewOptions };\n }\n\n if (_.isObject(viewOptions)) {\n return viewOptions;\n }\n\n const template = function() { return viewOptions; };\n\n return { template };\n },\n\n // Override this method to change how the region finds the DOM element that it manages. Return\n // a jQuery selector object scoped to a provided parent el or the document if none exists.\n getEl(el) {\n const context = _.result(this, 'parentEl');\n\n if (context && _.isString(el)) {\n return this.Dom.findEl(context, el);\n }\n\n return this.Dom.getEl(el);\n },\n\n _replaceEl(view) {\n // Always restore the el to ensure the regions el is present before replacing\n this._restoreEl();\n\n view.on('before:destroy', this._restoreEl, this);\n\n this.Dom.replaceEl(view.el, this.el);\n\n this._isReplaced = true;\n },\n\n // Restore the region's element in the DOM.\n _restoreEl() {\n // There is nothing to replace\n if (!this._isReplaced) {\n return;\n }\n\n const view = this.currentView;\n\n if (!view) {\n return;\n }\n\n this._detachView(view);\n\n this._isReplaced = false;\n },\n\n // Check to see if the region's el was replaced.\n isReplaced() {\n return !!this._isReplaced;\n },\n\n // Check to see if a view is being swapped by another\n isSwappingView() {\n return !!this._isSwappingView;\n },\n\n // Override this method to change how the new view is appended to the `$el` that the\n // region is managing\n attachHtml(view) {\n this.Dom.appendContents(this.el, view.el, {_$el: this.$el, _$contents: view.$el});\n },\n\n // Destroy the current view, if there is one. If there is no current view,\n // it will detach any html inside the region's `el`.\n empty(options = { allowMissingEl: true }) {\n const view = this.currentView;\n\n // If there is no view in the region we should only detach current html\n if (!view) {\n if (this._ensureElement(options)) {\n this.detachHtml();\n }\n return this;\n }\n\n this._empty(view, true);\n return this;\n },\n\n _empty(view, shouldDestroy) {\n view.off('destroy', this._empty, this);\n this.triggerMethod('before:empty', this, view);\n\n this._restoreEl();\n\n delete this.currentView;\n\n if (!view._isDestroyed) {\n if (shouldDestroy) {\n this.removeView(view);\n } else {\n this._detachView(view);\n }\n view._isShown = false;\n this._stopChildViewEvents(view);\n }\n\n this.triggerMethod('empty', this, view);\n },\n\n _stopChildViewEvents(view) {\n const parentView = this._parentView;\n\n if (!parentView) { return; }\n\n this._parentView.stopListening(view);\n },\n\n // Non-Marionette safe view.destroy\n destroyView(view) {\n if (view._isDestroyed) {\n return view;\n }\n\n destroyView(view, this._shouldDisableMonitoring());\n return view;\n },\n\n // Override this method to determine what happens when the view\n // is removed from the region when the view is not being detached\n removeView(view) {\n this.destroyView(view);\n },\n\n // Empties the Region without destroying the view\n // Returns the detached view\n detachView() {\n const view = this.currentView;\n\n if (!view) {\n return;\n }\n\n this._empty(view);\n\n return view;\n },\n\n _detachView(view) {\n const shouldTriggerDetach = view._isAttached && !this._shouldDisableMonitoring();\n const shouldRestoreEl = this._isReplaced;\n if (shouldTriggerDetach) {\n view.triggerMethod('before:detach', view);\n }\n\n if (shouldRestoreEl) {\n this.Dom.replaceEl(this.el, view.el);\n } else {\n this.detachHtml();\n }\n\n if (shouldTriggerDetach) {\n view._isAttached = false;\n view.triggerMethod('detach', view);\n }\n },\n\n // Override this method to change how the region detaches current content\n detachHtml() {\n this.Dom.detachContents(this.el, this.$el);\n },\n\n // Checks whether a view is currently present within the region. Returns `true` if there is\n // and `false` if no view is present.\n hasView() {\n return !!this.currentView;\n },\n\n // Reset the region by destroying any existing view and clearing out the cached `$el`.\n // The next time a view is shown via this region, the region will re-query the DOM for\n // the region's `el`.\n reset(options) {\n this.empty(options);\n\n this.el = this._initEl;\n\n delete this.$el;\n return this;\n },\n\n _isDestroyed: false,\n\n isDestroyed() {\n return this._isDestroyed;\n },\n\n // Destroy the region, remove any child view\n // and remove the region from any associated view\n destroy(options) {\n if (this._isDestroyed) { return this; }\n\n this.triggerMethod('before:destroy', this, options);\n this._isDestroyed = true;\n\n this.reset(options);\n\n if (this._name) {\n this._parentView._removeReferences(this._name);\n }\n delete this._parentView;\n delete this._name;\n\n this.triggerMethod('destroy', this, options);\n this.stopListening();\n\n return this;\n }\n});\n\nexport default Region;\n","import _ from 'underscore';\nimport MarionetteError from '../utils/error';\nimport Region from '../region';\n\n// return the region instance from the definition\nexport default function(definition, defaults) {\n if (definition instanceof Region) {\n return definition;\n }\n\n if (_.isString(definition)) {\n return buildRegionFromObject(defaults, { el: definition });\n }\n\n if (_.isFunction(definition)) {\n return buildRegionFromObject(defaults, { regionClass: definition });\n }\n\n if (_.isObject(definition)) {\n return buildRegionFromObject(defaults, definition);\n }\n\n throw new MarionetteError({\n message: 'Improper region configuration type.',\n url: 'marionette.region.html#defining-regions'\n });\n}\n\nfunction buildRegionFromObject(defaults, definition) {\n const options = _.extend({}, defaults, definition);\n\n const RegionClass = options.regionClass\n\n delete options.regionClass;\n\n return new RegionClass(options);\n}\n","import _ from 'underscore';\nimport _invoke from '../utils/invoke';\nimport buildRegion from '../common/build-region';\nimport Region from '../region';\n\n// MixinOptions\n// - regions\n// - regionClass\n\nexport default {\n regionClass: Region,\n\n // Internal method to initialize the regions that have been defined in a\n // `regions` attribute on this View.\n _initRegions() {\n\n // init regions hash\n this.regions = this.regions || {};\n this._regions = {};\n\n this.addRegions(_.result(this, 'regions'));\n },\n\n // Internal method to re-initialize all of the regions by updating\n // the `el` that they point to\n _reInitRegions() {\n _invoke(this._regions, 'reset');\n },\n\n // Add a single region, by name, to the View\n addRegion(name, definition) {\n const regions = {};\n regions[name] = definition;\n return this.addRegions(regions)[name];\n },\n\n // Add multiple regions as a {name: definition, name2: def2} object literal\n addRegions(regions) {\n // If there's nothing to add, stop here.\n if (_.isEmpty(regions)) {\n return;\n }\n\n // Normalize region selectors hash to allow\n // a user to use the @ui. syntax.\n regions = this.normalizeUIValues(regions, 'el');\n\n // Add the regions definitions to the regions property\n this.regions = _.extend({}, this.regions, regions);\n\n return this._addRegions(regions);\n },\n\n // internal method to build and add regions\n _addRegions(regionDefinitions) {\n const defaults = {\n regionClass: this.regionClass,\n parentEl: _.partial(_.result, this, 'el')\n };\n\n return _.reduce(regionDefinitions, (regions, definition, name) => {\n regions[name] = buildRegion(definition, defaults);\n this._addRegion(regions[name], name);\n return regions;\n }, {});\n },\n\n _addRegion(region, name) {\n this.triggerMethod('before:add:region', this, name, region);\n\n region._parentView = this;\n region._name = name;\n\n this._regions[name] = region;\n\n this.triggerMethod('add:region', this, name, region);\n },\n\n // Remove a single region from the View, by name\n removeRegion(name) {\n const region = this._regions[name];\n\n this._removeRegion(region, name);\n\n return region;\n },\n\n // Remove all regions from the View\n removeRegions() {\n const regions = this._getRegions();\n\n _.each(this._regions, this._removeRegion.bind(this));\n\n return regions;\n },\n\n _removeRegion(region, name) {\n this.triggerMethod('before:remove:region', this, name, region);\n\n region.destroy();\n\n this.triggerMethod('remove:region', this, name, region);\n },\n\n // Called in a region's destroy\n _removeReferences(name) {\n delete this.regions[name];\n delete this._regions[name];\n },\n\n // Empty all regions in the region manager, but\n // leave them attached\n emptyRegions() {\n const regions = this.getRegions();\n _invoke(regions, 'empty');\n return regions;\n },\n\n // Checks to see if view contains region\n // Accepts the region name\n // hasRegion('main')\n hasRegion(name) {\n return !!this.getRegion(name);\n },\n\n // Provides access to regions\n // Accepts the region name\n // getRegion('main')\n getRegion(name) {\n if (!this._isRendered) {\n this.render();\n }\n return this._regions[name];\n },\n\n _getRegions() {\n return _.clone(this._regions);\n },\n\n // Get all regions\n getRegions() {\n if (!this._isRendered) {\n this.render();\n }\n return this._getRegions();\n },\n\n showChildView(name, view, options) {\n const region = this.getRegion(name);\n region.show(view, options);\n return view;\n },\n\n detachChildView(name) {\n return this.getRegion(name).detachView();\n },\n\n getChildView(name) {\n return this.getRegion(name).currentView;\n }\n\n};\n","// Static setter for the renderer\nexport function setRenderer(renderer) {\n this.prototype._renderHtml = renderer;\n return this;\n}\n","// View\n// ---------\n\nimport _ from 'underscore';\nimport Backbone from 'backbone';\nimport monitorViewEvents from './common/monitor-view-events';\nimport ViewMixin from './mixins/view';\nimport RegionsMixin from './mixins/regions';\nimport { setDomApi } from './config/dom';\nimport { setRenderer } from './config/renderer';\n\nconst ClassOptions = [\n 'behaviors',\n 'childViewEventPrefix',\n 'childViewEvents',\n 'childViewTriggers',\n 'collectionEvents',\n 'events',\n 'modelEvents',\n 'regionClass',\n 'regions',\n 'template',\n 'templateContext',\n 'triggers',\n 'ui'\n];\n\n// Used by _getImmediateChildren\nfunction childReducer(children, region) {\n if (region.currentView) {\n children.push(region.currentView);\n }\n\n return children;\n}\n\n// The standard view. Includes view events, automatic rendering\n// templates, nested views, and more.\nconst View = Backbone.View.extend({\n\n constructor(options) {\n this._setOptions(options, ClassOptions);\n\n monitorViewEvents(this);\n\n this._initBehaviors();\n this._initRegions();\n\n Backbone.View.prototype.constructor.apply(this, arguments);\n\n this.delegateEntityEvents();\n\n this._triggerEventOnBehaviors('initialize', this, options);\n },\n\n // Overriding Backbone.View's `setElement` to handle\n // if an el was previously defined. If so, the view might be\n // rendered or attached on setElement.\n setElement() {\n Backbone.View.prototype.setElement.apply(this, arguments);\n\n this._isRendered = this.Dom.hasContents(this.el);\n this._isAttached = this._isElAttached();\n\n if (this._isRendered) {\n this.bindUIElements();\n }\n\n return this;\n },\n\n // If a template is available, renders it into the view's `el`\n // Re-inits regions and binds UI.\n render() {\n const template = this.getTemplate();\n\n if (template === false || this._isDestroyed) { return this; }\n\n this.triggerMethod('before:render', this);\n\n // If this is not the first render call, then we need to\n // re-initialize the `el` for each region\n if (this._isRendered) {\n this._reInitRegions();\n }\n\n this._renderTemplate(template);\n this.bindUIElements();\n\n this._isRendered = true;\n this.triggerMethod('render', this);\n\n return this;\n },\n\n // called by ViewMixin destroy\n _removeChildren() {\n this.removeRegions();\n },\n\n _getImmediateChildren() {\n return _.reduce(this._regions, childReducer, []);\n }\n}, {\n setRenderer,\n setDomApi\n});\n\n_.extend(View.prototype, ViewMixin, RegionsMixin);\n\nexport default View;\n","import _ from 'underscore';\n\n// Provide a container to store, retrieve and\n// shut down child views.\nconst Container = function() {\n this._init();\n};\n\n// Mix in methods from Underscore, for iteration, and other\n// collection related features.\n// Borrowing this code from Backbone.Collection:\n// https://github.com/jashkenas/backbone/blob/1.1.2/backbone.js#L962\nconst methods = ['forEach', 'each', 'map', 'find', 'detect', 'filter',\n 'select', 'reject', 'every', 'all', 'some', 'any', 'include',\n 'contains', 'invoke', 'toArray', 'first', 'initial', 'rest',\n 'last', 'without', 'isEmpty', 'pluck', 'reduce', 'partition'];\n\n_.each(methods, function(method) {\n Container.prototype[method] = function(...args) {\n return _[method].apply(_, [this._views].concat(args));\n };\n});\n\nfunction stringComparator(comparator, view) {\n return view.model && view.model.get(comparator);\n}\n\n// Container Methods\n// -----------------\n\n_.extend(Container.prototype, {\n\n // Initializes an empty container\n _init() {\n this._views = [];\n this._viewsByCid = {};\n this._indexByModel = {};\n this._updateLength();\n },\n\n // Add a view to this container. Stores the view\n // by `cid` and makes it searchable by the model\n // cid (and model itself). Additionally it stores\n // the view by index in the _views array\n _add(view, index = this._views.length) {\n this._addViewIndexes(view);\n\n // add to end by default\n this._views.splice(index, 0, view);\n\n this._updateLength();\n },\n\n _addViewIndexes(view) {\n // store the view\n this._viewsByCid[view.cid] = view;\n\n // index it by model\n if (view.model) {\n this._indexByModel[view.model.cid] = view;\n }\n },\n\n // Sort (mutate) and return the array of the child views.\n _sort(comparator, context) {\n if (typeof comparator === 'string') {\n comparator = _.partial(stringComparator, comparator);\n return this._sortBy(comparator);\n }\n\n if (comparator.length === 1) {\n return this._sortBy(comparator.bind(context));\n }\n\n return this._views.sort(comparator.bind(context));\n },\n\n // Makes `_.sortBy` mutate the array to match `this._views.sort`\n _sortBy(comparator) {\n const sortedViews = _.sortBy(this._views, comparator);\n\n this._set(sortedViews);\n\n return sortedViews;\n },\n\n // Replace array contents without overwriting the reference.\n // Should not add/remove views\n _set(views, shouldReset) {\n this._views.length = 0;\n\n this._views.push.apply(this._views, views.slice(0));\n\n if (shouldReset) {\n this._viewsByCid = {};\n this._indexByModel = {};\n\n _.each(views, this._addViewIndexes.bind(this));\n\n this._updateLength();\n }\n },\n\n // Swap views by index\n _swap(view1, view2) {\n const view1Index = this.findIndexByView(view1);\n const view2Index = this.findIndexByView(view2);\n\n if (view1Index === -1 || view2Index === -1) {\n return;\n }\n\n const swapView = this._views[view1Index];\n this._views[view1Index] = this._views[view2Index];\n this._views[view2Index] = swapView;\n },\n\n // Find a view by the model that was attached to it.\n // Uses the model's `cid` to find it.\n findByModel(model) {\n return this.findByModelCid(model.cid);\n },\n\n // Find a view by the `cid` of the model that was attached to it.\n findByModelCid(modelCid) {\n return this._indexByModel[modelCid];\n },\n\n // Find a view by index.\n findByIndex(index) {\n return this._views[index];\n },\n\n // Find the index of a view instance\n findIndexByView(view) {\n return this._views.indexOf(view);\n },\n\n // Retrieve a view by its `cid` directly\n findByCid(cid) {\n return this._viewsByCid[cid];\n },\n\n hasView(view) {\n return !!this.findByCid(view.cid);\n },\n\n // Remove a view and clean up index references.\n _remove(view) {\n if (!this._viewsByCid[view.cid]) {\n return;\n }\n\n // delete model index\n if (view.model) {\n delete this._indexByModel[view.model.cid];\n }\n\n // remove the view from the container\n delete this._viewsByCid[view.cid];\n\n const index = this.findIndexByView(view);\n this._views.splice(index, 1);\n\n this._updateLength();\n },\n\n // Update the `.length` attribute on this container\n _updateLength() {\n this.length = this._views.length;\n }\n});\n\nexport default Container;\n","// Collection View\n// ---------------\n\nimport _ from 'underscore';\nimport Backbone from 'backbone';\nimport MarionetteError from './utils/error';\nimport { renderView, destroyView } from './common/view';\nimport monitorViewEvents from './common/monitor-view-events';\nimport ChildViewContainer from './child-view-container';\nimport Region from './region';\nimport ViewMixin from './mixins/view';\nimport { setDomApi } from './config/dom';\nimport { setRenderer } from './config/renderer';\n\nconst classErrorName = 'CollectionViewError';\n\nconst ClassOptions = [\n 'behaviors',\n 'childView',\n 'childViewContainer',\n 'childViewEventPrefix',\n 'childViewEvents',\n 'childViewOptions',\n 'childViewTriggers',\n 'collectionEvents',\n 'emptyView',\n 'emptyViewOptions',\n 'events',\n 'modelEvents',\n 'sortWithCollection',\n 'template',\n 'templateContext',\n 'triggers',\n 'ui',\n 'viewComparator',\n 'viewFilter'\n];\n\n// A view that iterates over a Backbone.Collection\n// and renders an individual child view for each model.\nconst CollectionView = Backbone.View.extend({\n // flag for maintaining the sorted order of the collection\n sortWithCollection: true,\n\n // constructor\n constructor(options) {\n this._setOptions(options, ClassOptions);\n\n monitorViewEvents(this);\n\n this._initChildViewStorage();\n this._initBehaviors();\n\n Backbone.View.prototype.constructor.apply(this, arguments);\n\n // Init empty region\n this.getEmptyRegion();\n\n this.delegateEntityEvents();\n\n this._triggerEventOnBehaviors('initialize', this, options);\n },\n\n // Internal method to set up the `children` object for storing all of the child views\n // `_children` represents all child views\n // `children` represents only views filtered to be shown\n _initChildViewStorage() {\n this._children = new ChildViewContainer();\n this.children = new ChildViewContainer();\n },\n\n // Create an region to show the emptyView\n getEmptyRegion() {\n const $emptyEl = this.$container || this.$el;\n\n if (this._emptyRegion && !this._emptyRegion.isDestroyed()) {\n this._emptyRegion._setElement($emptyEl[0]);\n return this._emptyRegion;\n }\n\n this._emptyRegion = new Region({ el: $emptyEl[0], replaceElement: false });\n\n this._emptyRegion._parentView = this;\n\n return this._emptyRegion;\n },\n\n // Configured the initial events that the collection view binds to.\n _initialEvents() {\n if (this._isRendered) { return; }\n\n this.listenTo(this.collection, {\n 'sort': this._onCollectionSort,\n 'reset': this._onCollectionReset,\n 'update': this._onCollectionUpdate\n });\n },\n\n // Internal method. This checks for any changes in the order of the collection.\n // If the index of any view doesn't match, it will re-sort.\n _onCollectionSort(collection, { add, merge, remove }) {\n if (!this.sortWithCollection || this.viewComparator === false) {\n return;\n }\n\n // If the data is changing we will handle the sort later in `_onCollectionUpdate`\n if (add || remove || merge) {\n return;\n }\n\n // If the only thing happening here is sorting, sort.\n this.sort();\n },\n\n _onCollectionReset() {\n this._destroyChildren();\n\n this._addChildModels(this.collection.models);\n\n this.sort();\n },\n\n // Handle collection update model additions and removals\n _onCollectionUpdate(collection, options) {\n const changes = options.changes;\n\n // Remove first since it'll be a shorter array lookup.\n const removedViews = changes.removed.length && this._removeChildModels(changes.removed);\n\n this._addedViews = changes.added.length && this._addChildModels(changes.added);\n\n this._detachChildren(removedViews);\n\n this.sort();\n\n // Destroy removed child views after all of the render is complete\n this._removeChildViews(removedViews);\n },\n\n _removeChildModels(models) {\n return _.reduce(models, (views, model) => {\n const removeView = this._removeChildModel(model);\n\n if (removeView) { views.push(removeView); }\n\n return views;\n }, []);\n },\n\n _removeChildModel(model) {\n const view = this._children.findByModel(model);\n\n if (view) { this._removeChild(view); }\n\n return view;\n },\n\n _removeChild(view) {\n this.triggerMethod('before:remove:child', this, view);\n\n this.children._remove(view);\n this._children._remove(view);\n\n this.triggerMethod('remove:child', this, view);\n },\n\n // Added views are returned for consistency with _removeChildModels\n _addChildModels(models) {\n return _.map(models, this._addChildModel.bind(this));\n },\n\n _addChildModel(model) {\n const view = this._createChildView(model);\n\n this._addChild(view);\n\n return view;\n },\n\n _createChildView(model) {\n const ChildView = this._getChildView(model);\n const childViewOptions = this._getChildViewOptions(model);\n const view = this.buildChildView(model, ChildView, childViewOptions);\n\n return view;\n },\n\n _addChild(view, index) {\n this.triggerMethod('before:add:child', this, view);\n\n this._setupChildView(view);\n this._children._add(view, index);\n this.children._add(view, index);\n\n this.triggerMethod('add:child', this, view);\n },\n\n // Retrieve the `childView` class\n // The `childView` property can be either a view class or a function that\n // returns a view class. If it is a function, it will receive the model that\n // will be passed to the view instance (created from the returned view class)\n _getChildView(child) {\n let childView = this.childView;\n\n if (!childView) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'A \"childView\" must be specified',\n url: 'marionette.collectionview.html#collectionviews-childview'\n });\n }\n\n childView = this._getView(childView, child);\n\n if (!childView) {\n throw new MarionetteError({\n name: classErrorName,\n message: '\"childView\" must be a view class or a function that returns a view class',\n url: 'marionette.collectionview.html#collectionviews-childview'\n });\n }\n\n return childView;\n },\n\n // First check if the `view` is a view class (the common case)\n // Then check if it's a function (which we assume that returns a view class)\n _getView(view, child) {\n if (view.prototype instanceof Backbone.View || view === Backbone.View) {\n return view;\n } else if (_.isFunction(view)) {\n return view.call(this, child);\n }\n },\n\n _getChildViewOptions(child) {\n if (_.isFunction(this.childViewOptions)) {\n return this.childViewOptions(child);\n }\n\n return this.childViewOptions;\n },\n\n // Build a `childView` for a model in the collection.\n // Override to customize the build\n buildChildView(child, ChildViewClass, childViewOptions) {\n const options = _.extend({model: child}, childViewOptions);\n return new ChildViewClass(options);\n },\n\n _setupChildView(view) {\n monitorViewEvents(view);\n\n // We need to listen for if a view is destroyed in a way other\n // than through the CollectionView.\n // If this happens we need to remove the reference to the view\n // since once a view has been destroyed we can not reuse it.\n view.on('destroy', this.removeChildView, this);\n\n // set up the child view event forwarding\n this._proxyChildViewEvents(view);\n },\n\n // used by ViewMixin's `_childViewEventHandler`\n _getImmediateChildren() {\n return this.children._views;\n },\n\n // Overriding Backbone.View's `setElement` to handle\n // if an el was previously defined. If so, the view might be\n // attached on setElement.\n setElement() {\n Backbone.View.prototype.setElement.apply(this, arguments);\n\n this._isAttached = this._isElAttached();\n\n return this;\n },\n\n // Render children views.\n render() {\n if (this._isDestroyed) { return this; }\n this.triggerMethod('before:render', this);\n\n this._destroyChildren();\n\n if (this.collection) {\n this._addChildModels(this.collection.models);\n this._initialEvents();\n }\n\n const template = this.getTemplate();\n\n if (template) {\n this._renderTemplate(template);\n this.bindUIElements();\n }\n this._getChildViewContainer();\n this.sort();\n\n this._isRendered = true;\n\n this.triggerMethod('render', this);\n return this;\n },\n\n // Get a container within the template to add the children within\n _getChildViewContainer() {\n const childViewContainer = _.result(this, 'childViewContainer');\n this.$container = childViewContainer ? this.$(childViewContainer) : this.$el;\n\n if (!this.$container.length) {\n throw new MarionetteError({\n name: classErrorName,\n message: `The specified \"childViewContainer\" was not found: ${childViewContainer}`,\n url: 'marionette.collectionview.html#defining-the-childviewcontainer'\n });\n }\n },\n\n // Sorts the children then filters and renders the results.\n sort() {\n this._sortChildren();\n\n this.filter();\n\n return this;\n },\n\n // Sorts views by viewComparator and sets the children to the new order\n _sortChildren() {\n if (!this._children.length) { return; }\n\n let viewComparator = this.getComparator();\n\n if (!viewComparator) { return; }\n\n // If children are sorted prevent added to end perf\n delete this._addedViews;\n\n this.triggerMethod('before:sort', this);\n\n this._children._sort(viewComparator, this);\n\n this.triggerMethod('sort', this);\n },\n\n // Sets the view's `viewComparator` and applies the sort if the view is ready.\n // To prevent the render pass `{ preventRender: true }` as the 2nd argument.\n setComparator(comparator, {preventRender} = {}) {\n const comparatorChanged = this.viewComparator !== comparator;\n const shouldSort = comparatorChanged && !preventRender;\n\n this.viewComparator = comparator;\n\n if (shouldSort) {\n this.sort();\n }\n\n return this;\n },\n\n // Clears the `viewComparator` and follows the same rules for rendering as `setComparator`.\n removeComparator(options) {\n return this.setComparator(null, options);\n },\n\n // If viewComparator is overriden it will be returned here.\n // Additionally override this function to provide custom\n // viewComparator logic\n getComparator() {\n if (this.viewComparator) { return this.viewComparator }\n\n if (!this.sortWithCollection || this.viewComparator === false || !this.collection) {\n return false;\n }\n\n return this._viewComparator;\n },\n\n // Default internal view comparator that order the views by\n // the order of the collection\n _viewComparator(view) {\n return this.collection.indexOf(view.model);\n },\n\n // This method filters the children views and renders the results\n filter() {\n if (this._isDestroyed) { return this; }\n\n this._filterChildren();\n\n this._renderChildren();\n\n return this;\n },\n\n _filterChildren() {\n if (!this._children.length) { return; }\n\n const viewFilter = this._getFilter();\n\n if (!viewFilter) {\n const shouldReset = this.children.length !== this._children.length;\n\n this.children._set(this._children._views, shouldReset);\n\n return;\n }\n\n // If children are filtered prevent added to end perf\n delete this._addedViews;\n\n this.triggerMethod('before:filter', this);\n\n const attachViews = [];\n const detachViews = [];\n\n _.each(this._children._views, (view, key, children) => {\n (viewFilter.call(this, view, key, children) ? attachViews : detachViews).push(view);\n });\n\n this._detachChildren(detachViews);\n\n // reset children\n this.children._set(attachViews, true);\n\n this.triggerMethod('filter', this, attachViews, detachViews);\n },\n\n // This method returns a function for the viewFilter\n _getFilter() {\n const viewFilter = this.getFilter();\n\n if (!viewFilter) { return false; }\n\n if (_.isFunction(viewFilter)) {\n return viewFilter;\n }\n\n // Support filter predicates `{ fooFlag: true }`\n if (_.isObject(viewFilter)) {\n const matcher = _.matches(viewFilter);\n return function(view) {\n return matcher(view.model && view.model.attributes);\n };\n }\n\n // Filter by model attribute\n if (_.isString(viewFilter)) {\n return function(view) {\n return view.model && view.model.get(viewFilter);\n };\n }\n\n throw new MarionetteError({\n name: classErrorName,\n message: '\"viewFilter\" must be a function, predicate object literal, a string indicating a model attribute, or falsy',\n url: 'marionette.collectionview.html#defining-the-viewfilter'\n });\n },\n\n // Override this function to provide custom\n // viewFilter logic\n getFilter() {\n return this.viewFilter;\n },\n\n // Sets the view's `viewFilter` and applies the filter if the view is ready.\n // To prevent the render pass `{ preventRender: true }` as the 2nd argument.\n setFilter(filter, {preventRender} = {}) {\n const filterChanged = this.viewFilter !== filter;\n const shouldRender = filterChanged && !preventRender;\n\n this.viewFilter = filter;\n\n if (shouldRender) {\n this.filter();\n }\n\n return this;\n },\n\n // Clears the `viewFilter` and follows the same rules for rendering as `setFilter`.\n removeFilter(options) {\n return this.setFilter(null, options);\n },\n\n _detachChildren(detachingViews) {\n _.each(detachingViews, this._detachChildView.bind(this));\n },\n\n _detachChildView(view) {\n const shouldTriggerDetach = view._isAttached && this.monitorViewEvents !== false;\n if (shouldTriggerDetach) {\n view.triggerMethod('before:detach', view);\n }\n\n this.detachHtml(view);\n\n if (shouldTriggerDetach) {\n view._isAttached = false;\n view.triggerMethod('detach', view);\n }\n\n view._isShown = false;\n },\n\n // Override this method to change how the collectionView detaches a child view\n detachHtml(view) {\n this.Dom.detachEl(view.el, view.$el);\n },\n\n _renderChildren() {\n // If there are unrendered views prevent add to end perf\n if (this._hasUnrenderedViews) {\n delete this._addedViews;\n delete this._hasUnrenderedViews;\n }\n\n const views = this._addedViews || this.children._views;\n\n this.triggerMethod('before:render:children', this, views);\n\n if (this.isEmpty()) {\n this._showEmptyView();\n } else {\n this._destroyEmptyView();\n\n const els = this._getBuffer(views);\n\n this._attachChildren(els, views);\n }\n\n delete this._addedViews;\n\n this.triggerMethod('render:children', this, views);\n },\n\n // Renders each view and creates a fragment buffer from them\n _getBuffer(views) {\n const elBuffer = this.Dom.createBuffer();\n\n _.each(views, view => {\n renderView(view);\n // corresponds that view is shown in a Region or CollectionView\n view._isShown = true;\n this.Dom.appendContents(elBuffer, view.el, {_$contents: view.$el});\n });\n\n return elBuffer;\n },\n\n _attachChildren(els, views) {\n const shouldTriggerAttach = this._isAttached && this.monitorViewEvents !== false;\n\n views = shouldTriggerAttach ? views : [];\n\n _.each(views, view => {\n if (view._isAttached) { return; }\n view.triggerMethod('before:attach', view);\n });\n\n this.attachHtml(els, this.$container);\n\n _.each(views, view => {\n if (view._isAttached) { return; }\n view._isAttached = true;\n view.triggerMethod('attach', view);\n });\n },\n\n // Override this method to do something other than `.append`.\n // You can attach any HTML at this point including the els.\n attachHtml(els, $container) {\n this.Dom.appendContents($container[0], els, {_$el: $container});\n },\n\n isEmpty() {\n return !this.children.length;\n },\n\n _showEmptyView() {\n const EmptyView = this._getEmptyView();\n\n if (!EmptyView) {\n return;\n }\n\n const options = this._getEmptyViewOptions();\n\n const emptyRegion = this.getEmptyRegion();\n\n emptyRegion.show(new EmptyView(options));\n },\n\n // Retrieve the empty view class\n _getEmptyView() {\n const emptyView = this.emptyView;\n\n if (!emptyView) { return; }\n\n return this._getView(emptyView);\n },\n\n // Remove the emptyView\n _destroyEmptyView() {\n const emptyRegion = this.getEmptyRegion();\n // Only empty if a view is show so the region\n // doesn't detach any other unrelated HTML\n if (emptyRegion.hasView()) {\n emptyRegion.empty();\n }\n },\n\n //\n _getEmptyViewOptions() {\n const emptyViewOptions = this.emptyViewOptions || this.childViewOptions;\n\n if (_.isFunction(emptyViewOptions)) {\n return emptyViewOptions.call(this);\n }\n\n return emptyViewOptions;\n },\n\n swapChildViews(view1, view2) {\n if (!this._children.hasView(view1) || !this._children.hasView(view2)) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'Both views must be children of the collection view to swap.',\n url: 'marionette.collectionview.html#swapping-child-views'\n });\n }\n\n this._children._swap(view1, view2);\n this.Dom.swapEl(view1.el, view2.el);\n\n // If the views are not filtered the same, refilter\n if (this.children.hasView(view1) !== this.children.hasView(view2)) {\n this.filter();\n } else {\n this.children._swap(view1, view2);\n }\n\n return this;\n },\n\n // Render the child's view and add it to the HTML for the collection view at a given index, based on the current sort\n addChildView(view, index, options = {}) {\n if (!view || view._isDestroyed) {\n return view;\n }\n\n if (view._isShown) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'View is already shown in a Region or CollectionView',\n url: 'marionette.region.html#showing-a-view'\n });\n }\n\n if (_.isObject(index)) {\n options = index;\n }\n\n // If options has defined index we should use it\n if (options.index != null) {\n index = options.index;\n }\n\n if (!this._isRendered) {\n this.render();\n }\n\n this._addChild(view, index);\n\n if (options.preventRender) {\n this._hasUnrenderedViews = true;\n return view;\n }\n\n const hasIndex = (typeof index !== 'undefined');\n const isAddedToEnd = !hasIndex || index >= this._children.length;\n\n // Only cache views if added to the end and there is no unrendered views\n if (isAddedToEnd && !this._hasUnrenderedViews) {\n this._addedViews = [view];\n }\n\n if (hasIndex) {\n this._renderChildren();\n } else {\n this.sort();\n }\n\n return view;\n },\n\n // Detach a view from the children. Best used when adding a\n // childView from `addChildView`\n detachChildView(view) {\n this.removeChildView(view, { shouldDetach: true });\n\n return view;\n },\n\n // Remove the child view and destroy it. Best used when adding a\n // childView from `addChildView`\n // The options argument is for internal use only\n removeChildView(view, options) {\n if (!view) {\n return view;\n }\n\n this._removeChildView(view, options);\n\n this._removeChild(view);\n\n if (this.isEmpty()) {\n this._showEmptyView();\n }\n\n return view;\n },\n\n _removeChildViews(views) {\n _.each(views, this._removeChildView.bind(this));\n },\n\n _removeChildView(view, {shouldDetach} = {}) {\n view.off('destroy', this.removeChildView, this);\n\n if (shouldDetach) {\n this._detachChildView(view);\n } else {\n this._destroyChildView(view);\n }\n\n this.stopListening(view);\n },\n\n _destroyChildView(view) {\n if (view._isDestroyed) {\n return;\n }\n\n const shouldDisableEvents = this.monitorViewEvents === false;\n destroyView(view, shouldDisableEvents);\n },\n\n // called by ViewMixin destroy\n _removeChildren() {\n this._destroyChildren();\n const emptyRegion = this.getEmptyRegion();\n emptyRegion.destroy();\n delete this._addedViews;\n },\n\n // Destroy the child views that this collection view is holding on to, if any\n _destroyChildren() {\n if (!this._children.length) {\n return;\n }\n\n this.triggerMethod('before:destroy:children', this);\n if (this.monitorViewEvents === false) {\n this.Dom.detachContents(this.el, this.$el);\n }\n\n this._removeChildViews(this._children._views);\n\n // After all children have been destroyed re-init the container\n this._children._init();\n this.children._init();\n\n this.triggerMethod('destroy:children', this);\n }\n}, {\n setDomApi,\n setRenderer\n});\n\n_.extend(CollectionView.prototype, ViewMixin);\n\nexport default CollectionView;\n","// Behavior\n// --------\n\n// A Behavior is an isolated set of DOM /\n// user interactions that can be mixed into any View.\n// Behaviors allow you to blackbox View specific interactions\n// into portable logical chunks, keeping your views simple and your code DRY.\n\nimport _ from 'underscore';\nimport extend from './utils/extend';\nimport getNamespacedEventName from './utils/get-namespaced-event-name';\nimport CommonMixin from './mixins/common';\nimport DelegateEntityEventsMixin from './mixins/delegate-entity-events';\nimport TriggersMixin from './mixins/triggers';\nimport UIMixin from './mixins/ui';\n\nconst ClassOptions = [\n 'collectionEvents',\n 'events',\n 'modelEvents',\n 'triggers',\n 'ui'\n];\n\nconst Behavior = function(options, view) {\n // Setup reference to the view.\n // this comes in handle when a behavior\n // wants to directly talk up the chain\n // to the view.\n this.view = view;\n\n this._setOptions(options, ClassOptions);\n this.cid = _.uniqueId(this.cidPrefix);\n\n // Construct an internal UI hash using the behaviors UI\n // hash combined and overridden by the view UI hash.\n // This allows the user to use UI hash elements defined\n // in the parent view as well as those defined in the behavior.\n // This order will help the reuse and share of a behavior\n // between multiple views, while letting a view override\n // a selector under an UI key.\n this.ui = _.extend({}, _.result(this, 'ui'), _.result(view, 'ui'));\n\n // Proxy view triggers\n this.listenTo(view, 'all', this.triggerMethod);\n\n this.initialize.apply(this, arguments);\n};\n\nBehavior.extend = extend;\n\n// Behavior Methods\n// --------------\n\n_.extend(Behavior.prototype, CommonMixin, DelegateEntityEventsMixin, TriggersMixin, UIMixin, {\n cidPrefix: 'mnb',\n\n // This is a noop method intended to be overridden\n initialize() {},\n\n // proxy behavior $ method to the view\n // this is useful for doing jquery DOM lookups\n // scoped to behaviors view.\n $() {\n return this.view.$.apply(this.view, arguments);\n },\n\n // Stops the behavior from listening to events.\n destroy() {\n this.stopListening();\n\n this.view._removeBehavior(this);\n\n this._deleteEntityEventHandlers();\n\n return this;\n },\n\n proxyViewProperties() {\n this.$el = this.view.$el;\n this.el = this.view.el;\n\n return this;\n },\n\n bindUIElements() {\n this._bindUIElements();\n\n return this;\n },\n\n unbindUIElements() {\n this._unbindUIElements();\n\n return this;\n },\n\n getUI(name) {\n return this._getUI(name);\n },\n\n // Handle `modelEvents`, and `collectionEvents` configuration\n delegateEntityEvents() {\n this._delegateEntityEvents(this.view.model, this.view.collection);\n\n return this;\n },\n\n undelegateEntityEvents() {\n this._undelegateEntityEvents(this.view.model, this.view.collection);\n\n return this;\n },\n\n _getEvents() {\n if (!this.events) { return; }\n\n // Normalize behavior events hash to allow\n // a user to use the @ui. syntax.\n const behaviorEvents = this.normalizeUIKeys(_.result(this, 'events'));\n\n // binds the handler to the behavior and builds a unique eventName\n return _.reduce(behaviorEvents, (events, behaviorHandler, key) => {\n if (!_.isFunction(behaviorHandler)) {\n behaviorHandler = this[behaviorHandler];\n }\n if (!behaviorHandler) { return events; }\n key = getNamespacedEventName(key, this.cid);\n events[key] = behaviorHandler.bind(this);\n return events;\n }, {});\n },\n\n // Internal method to build all trigger handlers for a given behavior\n _getTriggers() {\n if (!this.triggers) { return; }\n\n // Normalize behavior triggers hash to allow\n // a user to use the @ui. syntax.\n const behaviorTriggers = this.normalizeUIKeys(_.result(this, 'triggers'));\n\n return this._getViewTriggers(this.view, behaviorTriggers);\n }\n});\n\nexport default Behavior;\n","// Application\n// -----------\n\nimport _ from 'underscore';\nimport extend from './utils/extend';\nimport buildRegion from './common/build-region';\nimport CommonMixin from './mixins/common';\nimport DestroyMixin from './mixins/destroy';\nimport RadioMixin from './mixins/radio';\nimport Region from './region';\n\nconst ClassOptions = [\n 'channelName',\n 'radioEvents',\n 'radioRequests',\n 'region',\n 'regionClass'\n];\n\nconst Application = function(options) {\n this._setOptions(options, ClassOptions);\n this.cid = _.uniqueId(this.cidPrefix);\n this._initRegion();\n this._initRadio();\n this.initialize.apply(this, arguments);\n};\n\nApplication.extend = extend;\n\n// Application Methods\n// --------------\n\n_.extend(Application.prototype, CommonMixin, DestroyMixin, RadioMixin, {\n cidPrefix: 'mna',\n\n // This is a noop method intended to be overridden\n initialize() {},\n\n // Kick off all of the application's processes.\n start(options) {\n this.triggerMethod('before:start', this, options);\n this.triggerMethod('start', this, options);\n return this;\n },\n\n regionClass: Region,\n\n _initRegion() {\n const region = this.region;\n\n if (!region) { return; }\n\n const defaults = {\n regionClass: this.regionClass\n };\n\n this._region = buildRegion(region, defaults);\n },\n\n getRegion() {\n return this._region;\n },\n\n showView(view, ...args) {\n const region = this.getRegion();\n region.show(view, ...args);\n return view;\n },\n\n getView() {\n return this.getRegion().currentView;\n }\n});\n\nexport default Application;\n","import {version as VERSION} from '../package.json';\n\nimport proxy from './utils/proxy';\nimport extend from './utils/extend';\n\nimport {\n bindEvents as _bindEvents,\n unbindEvents as _unbindEvents\n} from './common/bind-events';\nimport {\n bindRequests as _bindRequests,\n unbindRequests as _unbindRequests\n} from './common/bind-requests';\nimport _getOption from './common/get-option';\nimport _mergeOptions from './common/merge-options';\nimport monitorViewEvents from './common/monitor-view-events';\nimport _normalizeMethods from './common/normalize-methods';\nimport _triggerMethod from './common/trigger-method';\n\nimport Events from './mixins/events';\n\nimport MnObject from './object';\nimport View from './view';\nimport CollectionView from './collection-view';\nimport Behavior from './behavior';\nimport Region from './region';\nimport Application from './application';\n\nimport DomApi from './config/dom';\n\nimport {\n isEnabled,\n setEnabled\n} from './config/features';\n\n// Utilities\n\nexport const bindEvents = proxy(_bindEvents);\nexport const unbindEvents = proxy(_unbindEvents);\nexport const bindRequests = proxy(_bindRequests);\nexport const unbindRequests = proxy(_unbindRequests);\nexport const mergeOptions = proxy(_mergeOptions);\nexport const getOption = proxy(_getOption);\nexport const normalizeMethods = proxy(_normalizeMethods);\nexport const triggerMethod = proxy(_triggerMethod);\n\n\n// Configuration\n\nexport const setDomApi = function(mixin) {\n CollectionView.setDomApi(mixin);\n Region.setDomApi(mixin);\n View.setDomApi(mixin);\n};\nexport const setRenderer = function(renderer) {\n CollectionView.setRenderer(renderer);\n View.setRenderer(renderer);\n};\n\nexport {\n View,\n CollectionView,\n MnObject,\n Region,\n Behavior,\n Application,\n isEnabled,\n setEnabled,\n monitorViewEvents,\n Events,\n extend,\n DomApi,\n VERSION\n};\n\nexport default {\n View,\n CollectionView,\n MnObject,\n Object: MnObject,\n Region,\n Behavior,\n Application,\n isEnabled,\n setEnabled,\n monitorViewEvents,\n Events,\n extend,\n DomApi,\n VERSION\n};\n"],"names":["proxy","method","context","args","apply","extend","Backbone","Model","normalizeMethods","hash","_","reduce","normalizedHash","name","isFunction","_this","errorProps","MarionetteError","call","Error","urlRoot","url","constructor","options","error","this","message","pick","captureStackTrace","toString","normalizeBindings","bindings","isObject","bindEvents","entity","listenTo","unbindEvents","stopListening","bindRequests","channel","reply","unbindRequests","stopReplying","getOption","optionName","undefined","mergeOptions","keys","each","key","option","triggerMethodChildren","view","event","shouldTrigger","_getImmediateChildren","child","triggerMethod","shouldTriggerAttach","_isAttached","shouldAttach","shouldTriggerDetach","shouldDetach","triggerDOMRefresh","_isRendered","triggerDOMRemove","handleBeforeAttach","handleAttach","handleBeforeDetach","handleDetach","handleBeforeRender","handleRender","monitorViewEvents","_areViewEventsMonitored","on","splitter","methodCache","getEventName","match","prefix","eventName","toUpperCase","getOnMethodName","replace","result","methodName","drop","arguments","trigger","CommonMixin","_setOptions","classOptions","Events","_isDestroyed","isDestroyed","destroy","_initRadio","channelName","Radio","_channel","radioEvents","radioRequests","_destroyRadio","getChannel","ClassOptions","MarionetteObject","cid","uniqueId","cidPrefix","initialize","prototype","DestroyMixin","RadioMixin","invokeMap","invoke","parseBehaviors","behaviors","allBehaviors","reducedBehaviors","behaviorDefiniton","behaviorClass","BehaviorClass","getBehaviorClass","behavior","push","_initBehaviors","_behaviors","_getBehaviorTriggers","triggers","_invoke","memo","_triggers","_getBehaviorEvents","events","_events","_proxyBehaviorViewProperties","_delegateBehaviorEntityEvents","_undelegateBehaviorEntityEvents","_destroyBehaviors","_removeBehavior","undelegate","without","_bindBehaviorUIElements","_unbindBehaviorUIElements","_triggerEventOnBehaviors","_delegateEntityEvents","model","collection","_modelEvents","_collectionEvents","_undelegateEntityEvents","_deleteEntityEventHandlers","_renderTemplate","template","data","mixinTemplateContext","serializeData","html","_renderHtml","attachElContent","getTemplate","serializedData","templateContext","serializeModel","items","serializeCollection","attributes","map","models","Dom","setContents","el","$el","delegateEventSplitter","getNamespacedEventName","namespace","FEATURES","childViewEventPrefix","triggersStopPropagation","triggersPreventDefault","DEV_MODE","isEnabled","setEnabled","state","_getViewTriggers","value","triggerDef","isString","shouldPreventDefault","preventDefault","shouldStopPropagation","stopPropagation","buildViewTrigger","uiRegEx","normalizeUIString","uiString","ui","r","slice","normalizeUIKeys","val","_getUIBindings","uiBindings","normalizeUIValues","property","propertyVal","_bindUIElements","_uiBindings","_ui","selector","$","_unbindUIElements","_this2","_getUI","getEl","setDomApi","mixin","createBuffer","document","createDocumentFragment","getDocumentEl","ownerDocument","documentElement","findEl","find","hasEl","childEl","contains","parentNode","detachEl","detach","replaceEl","newEl","oldEl","parent","replaceChild","swapEl","el1","el2","parent1","parent2","next1","nextSibling","next2","insertBefore","appendContents","contents","_$el","_$contents","append","hasContents","hasChildNodes","detachContents","ViewMixin","DomApi","_isElAttached","supportsRenderLifecycle","supportsDestroyLifecycle","isRendered","isAttached","delegateEvents","_buildEventProxies","combinedEvents","_getEvents","_getTriggers","View","delegateEntityEvents","undelegateEntityEvents","_isDestroying","_disableDetachEvents","unbindUIElements","_removeElement","_removeChildren","off","removeData","bindUIElements","getUI","_childViewEvents","_childViewTriggers","_eventPrefix","_getEventPrefix","defaultPrefix","_proxyChildViewEvents","_childViewEventHandler","childViewEvents","childViewTriggers","renderView","render","destroyView","disableDetachEvents","remove","BehaviorsMixin","DelegateEntityEventsMixin","TemplateRenderMixin","TriggersMixin","UIMixin","Region","_initEl","_getEl","definition","defaults","buildRegionFromObject","regionClass","RegionClass","replaceElement","_isReplaced","_isSwappingView","show","_ensureElement","_getView","currentView","_isShown","empty","_setupChildView","_attachView","_setEl","length","_setElement","shouldReplace","_restoreEl","_replaceEl","attachHtml","_empty","parentView","_parentView","_shouldDisableMonitoring","shouldReplaceEl","allowMissingEl","viewOptions","_getViewOptions","_detachView","isReplaced","isSwappingView","detachHtml","shouldDestroy","removeView","_stopChildViewEvents","detachView","shouldRestoreEl","hasView","reset","_name","_removeReferences","_initRegions","regions","_regions","addRegions","_reInitRegions","addRegion","isEmpty","_addRegions","regionDefinitions","parentEl","partial","buildRegion","_addRegion","region","removeRegion","_removeRegion","removeRegions","_getRegions","bind","emptyRegions","getRegions","hasRegion","getRegion","clone","showChildView","detachChildView","getChildView","setRenderer","renderer","childReducer","children","setElement","RegionsMixin","Container","_init","stringComparator","comparator","get","_views","concat","_viewsByCid","_indexByModel","_updateLength","_add","index","_addViewIndexes","splice","_sort","_sortBy","sort","sortedViews","sortBy","_set","views","shouldReset","_swap","view1","view2","view1Index","findIndexByView","view2Index","swapView","findByModel","findByModelCid","modelCid","findByIndex","indexOf","findByCid","_remove","CollectionView","sortWithCollection","_initChildViewStorage","getEmptyRegion","_children","ChildViewContainer","$emptyEl","$container","_emptyRegion","_initialEvents","_onCollectionSort","_onCollectionReset","_onCollectionUpdate","add","merge","viewComparator","_destroyChildren","_addChildModels","changes","removedViews","removed","_removeChildModels","_addedViews","added","_detachChildren","_removeChildViews","_removeChildModel","_removeChild","_addChildModel","_createChildView","_addChild","ChildView","_getChildView","childViewOptions","_getChildViewOptions","buildChildView","childView","ChildViewClass","removeChildView","_getChildViewContainer","childViewContainer","_sortChildren","filter","getComparator","setComparator","preventRender","shouldSort","removeComparator","_viewComparator","_filterChildren","_renderChildren","viewFilter","_getFilter","attachViews","detachViews","getFilter","matcher","matches","setFilter","shouldRender","removeFilter","detachingViews","_detachChildView","_hasUnrenderedViews","_showEmptyView","_destroyEmptyView","els","_getBuffer","_attachChildren","elBuffer","_this3","EmptyView","_getEmptyView","_getEmptyViewOptions","emptyView","emptyRegion","emptyViewOptions","swapChildViews","addChildView","hasIndex","_removeChildView","_destroyChildView","Behavior","proxyViewProperties","behaviorEvents","behaviorHandler","behaviorTriggers","Application","_initRegion","start","_region","showView","getView","_bindEvents","_unbindEvents","_bindRequests","_unbindRequests","_mergeOptions","_getOption","_normalizeMethods","_triggerMethod","MnObject","Object","VERSION"],"mappings":";;;;;;;;;;;6jBACMA,EAAQ,SAASC,UACd,SAASC,8BAAYC,mCAAAA,2BACnBF,EAAOG,MAAMF,EAASC,KCG3BE,EAASC,EAASC,MAAMF,OCCxBG,EAAmB,SAASC,iBAC3BA,SAEEC,EAAEC,OAAOF,EAAM,SAACG,EAAgBX,EAAQY,UACxCH,EAAEI,WAAWb,KAChBA,EAASc,EAAKd,IAEZA,IACFW,EAAeC,GAAQZ,GAElBW,GACN,KCXCI,EAAa,CAAC,cAAe,WAAY,aAAc,OAAQ,UAAW,SAAU,OAEpFC,EAAkBZ,EAAOa,KAAKC,MAAO,CACzCC,6DAEAC,IAAK,GAELC,qBAAYC,OACJC,EAAQL,MAAMD,KAAKO,KAAMF,EAAQG,SACvChB,EAAEL,OAAOoB,KAAMf,EAAEiB,KAAKH,EAAOR,GAAaN,EAAEiB,KAAKJ,EAASP,IAEtDG,MAAMS,wBACHA,yBAGFP,IAAMI,KAAKL,QAAUK,KAAKJ,KAGjCO,6BACET,MAAMS,kBAAkBH,KAAMR,IAGhCY,oCACaJ,KAAKZ,kBAAWY,KAAKC,yBAA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BiW,EAAOjD,WAAPiD,GAAYhT,UAASjD,IACdiD,GAGToc,0BACS/d,KAAKoV,YAAYvD,mBCjCfrR,GAAajC,EAAMyf,GACnBrd,GAAepC,EAAM0f,GACrBpd,GAAetC,EAAM2f,GACrBld,GAAiBzC,EAAM4f,GACvB9c,GAAe9C,EAAM6f,GACrBld,GAAY3C,EAAM8f,GAClBtf,GAAmBR,EAAM+f,GACzBtc,GAAgBzD,EAAMggB,MA+BpB,CACbvP,KAAAA,GACAmJ,eAAAA,GACAqG,SAAAA,EACAC,OAAQD,EACRzN,OAAAA,GACAsM,SAAAA,GACAK,YAAAA,GACA9T,UAAAA,EACAC,WAAAA,EACA9G,kBAAAA,EACAoB,OAAAA,EACAvF,OAAAA,EACAyP,OAAAA,GACAqQ,iTAxCuB,SAAS3S,GAChCoM,GAAerM,UAAUC,GACzBgF,GAAOjF,UAAUC,GACjBiD,GAAKlD,UAAUC,iCAEU,SAAS2J,GAClCyC,GAAe1C,YAAYC,GAC3B1G,GAAKyG,YAAYC"} \ No newline at end of file +{"version":3,"file":"backbone.marionette.min.js","sources":["../src/utils/proxy.js","../src/utils/extend.js","../src/common/normalize-methods.js","../src/utils/error.js","../src/common/bind-events.js","../src/common/bind-requests.js","../src/common/get-option.js","../src/common/merge-options.js","../src/common/monitor-view-events.js","../src/common/trigger-method.js","../src/utils/build-event-args.js","../src/utils/once-wrap.js","../src/mixins/events.js","../src/utils/call-handler.js","../src/mixins/common.js","../src/mixins/destroy.js","../src/mixins/radio.js","../src/object.js","../src/utils/invoke.js","../src/mixins/behaviors.js","../src/mixins/delegate-entity-events.js","../src/mixins/template-render.js","../src/mixins/ui.js","../src/config/features.js","../src/config/event-delegator.js","../src/mixins/view-events.js","../src/config/dom.js","../src/mixins/view.js","../src/common/view.js","../src/region.js","../src/common/build-region.js","../src/mixins/regions.js","../src/config/renderer.js","../src/view.js","../src/child-view-container.js","../src/collection-view.js","../src/behavior.js","../src/application.js","../src/backbone.marionette.js"],"sourcesContent":["//Internal utility for creating context style global utils\nconst proxy = function(method) {\n return function(context, ...args) {\n return method.apply(context, args);\n };\n};\n\nexport default proxy;\n","// Marionette.extend\n// -----------------\n\nimport { has, extend, create } from 'underscore';\n\n// Borrowed from backbone.js\nexport default function(protoProps, staticProps) {\n const parent = this;\n let child;\n\n // The constructor function for the new subclass is either defined by you\n // (the \"constructor\" property in your `extend` definition), or defaulted\n // by us to simply call the parent constructor.\n if (protoProps && has(protoProps, 'constructor')) {\n child = protoProps.constructor;\n } else {\n child = function() { return parent.apply(this, arguments); };\n }\n\n // Add static properties to the constructor function, if supplied.\n extend(child, parent, staticProps);\n\n // Set the prototype chain to inherit from `parent`, without calling\n // `parent`'s constructor function and add the prototype properties.\n child.prototype = create(parent.prototype, protoProps);\n child.prototype.constructor = child;\n\n // Set a convenience property in case the parent's prototype is needed\n // later.\n child.__super__ = parent.prototype;\n\n return child;\n}\n","import _ from 'underscore';\n\n// Marionette.normalizeMethods\n// ----------------------\n\n// Pass in a mapping of events => functions or function names\n// and return a mapping of events => functions\nconst normalizeMethods = function(hash) {\n if (!hash) { return }\n\n return _.reduce(hash, (normalizedHash, method, name) => {\n if (!_.isFunction(method)) {\n method = this[method];\n }\n if (method) {\n normalizedHash[name] = method;\n }\n return normalizedHash;\n }, {});\n};\n\nexport default normalizeMethods;\n","// Error\n// -----\n\nimport _ from 'underscore';\nimport extend from './extend';\nimport {version} from '../../package.json';\n\nconst errorProps = ['description', 'fileName', 'lineNumber', 'name', 'message', 'number', 'url'];\n\nconst MarionetteError = extend.call(Error, {\n urlRoot: `http://marionettejs.com/docs/v${version}/`,\n\n url: '',\n\n constructor(options) {\n const error = Error.call(this, options.message);\n _.extend(this, _.pick(error, errorProps), _.pick(options, errorProps));\n\n if (Error.captureStackTrace) {\n this.captureStackTrace();\n }\n\n this.url = this.urlRoot + this.url;\n },\n\n captureStackTrace() {\n Error.captureStackTrace(this, MarionetteError);\n },\n\n toString() {\n return `${ this.name }: ${ this.message } See: ${ this.url }`;\n }\n});\n\nexport default MarionetteError;\n","// Bind Entity Events & Unbind Entity Events\n// -----------------------------------------\n//\n// These methods are used to bind/unbind a backbone \"entity\" (e.g. collection/model)\n// to methods on a target object.\n//\n// The first parameter, `target`, must have the Backbone.Events module mixed in.\n//\n// The second parameter is the `entity` (Backbone.Model, Backbone.Collection or\n// any object that has Backbone.Events mixed in) to bind the events from.\n//\n// The third parameter is a hash of { \"event:name\": \"eventHandler\" }\n// configuration. Multiple handlers can be separated by a space. A\n// function can be supplied instead of a string handler name.\n\nimport _ from 'underscore';\nimport normalizeMethods from './normalize-methods';\nimport MarionetteError from '../utils/error';\n\nfunction normalizeBindings(context, bindings) {\n if (!_.isObject(bindings)) {\n throw new MarionetteError({\n message: 'Bindings must be an object.',\n url: 'common.html#bindevents'\n });\n }\n\n return normalizeMethods.call(context, bindings);\n}\n\nfunction bindEvents(entity, bindings) {\n if (!entity || !bindings) { return this; }\n\n this.listenTo(entity, normalizeBindings(this, bindings));\n\n return this;\n}\n\nfunction unbindEvents(entity, bindings) {\n if (!entity) { return this; }\n\n if (!bindings) {\n this.stopListening(entity);\n return this;\n }\n\n this.stopListening(entity, normalizeBindings(this, bindings));\n\n return this;\n}\n\n// Export Public API\nexport {\n bindEvents,\n unbindEvents\n};\n","// Bind/Unbind Radio Requests\n// -----------------------------------------\n//\n// These methods are used to bind/unbind a backbone.radio request\n// to methods on a target object.\n//\n// The first parameter, `target`, will set the context of the reply method\n//\n// The second parameter is the `Radio.channel` to bind the reply to.\n//\n// The third parameter is a hash of { \"request:name\": \"replyHandler\" }\n// configuration. A function can be supplied instead of a string handler name.\n\nimport _ from 'underscore';\nimport normalizeMethods from './normalize-methods';\nimport MarionetteError from '../utils/error';\n\nfunction normalizeBindings(context, bindings) {\n if (!_.isObject(bindings)) {\n throw new MarionetteError({\n message: 'Bindings must be an object.',\n url: 'common.html#bindrequests'\n });\n }\n\n return normalizeMethods.call(context, bindings);\n}\n\nfunction bindRequests(channel, bindings) {\n if (!channel || !bindings) { return this; }\n\n channel.reply(normalizeBindings(this, bindings), this);\n\n return this;\n}\n\nfunction unbindRequests(channel, bindings) {\n if (!channel) { return this; }\n\n if (!bindings) {\n channel.stopReplying(null, null, this);\n return this;\n }\n\n channel.stopReplying(normalizeBindings(this, bindings));\n\n return this;\n}\n\nexport {\n bindRequests,\n unbindRequests\n};\n","// Marionette.getOption\n// --------------------\n\n// Retrieve an object, function or other value from the\n// object or its `options`, with `options` taking precedence.\nconst getOption = function(optionName) {\n if (!optionName) { return; }\n if (this.options && (this.options[optionName] !== undefined)) {\n return this.options[optionName];\n } else {\n return this[optionName];\n }\n};\n\nexport default getOption;\n","import _ from 'underscore';\n\n// Merge `keys` from `options` onto `this`\nconst mergeOptions = function(options, keys) {\n if (!options) { return; }\n\n _.each(keys, (key) => {\n const option = options[key];\n if (option !== undefined) {\n this[key] = option;\n }\n });\n};\n\nexport default mergeOptions;\n","// DOM Refresh\n// -----------\n\nimport _ from 'underscore';\n\n// Trigger method on children unless a pure Backbone.View\nfunction triggerMethodChildren(view, event, shouldTrigger) {\n if (!view._getImmediateChildren) { return; }\n _.each(view._getImmediateChildren(), child => {\n if (!shouldTrigger(child)) { return; }\n child.triggerMethod(event, child);\n });\n}\n\nfunction shouldTriggerAttach(view) {\n return !view._isAttached;\n}\n\nfunction shouldAttach(view) {\n if (!shouldTriggerAttach(view)) { return false; }\n view._isAttached = true;\n return true;\n}\n\nfunction shouldTriggerDetach(view) {\n return view._isAttached;\n}\n\nfunction shouldDetach(view) {\n view._isAttached = false;\n return true;\n}\n\nfunction triggerDOMRefresh(view) {\n if (view._isAttached && view._isRendered) {\n view.triggerMethod('dom:refresh', view);\n }\n}\n\nfunction triggerDOMRemove(view) {\n if (view._isAttached && view._isRendered) {\n view.triggerMethod('dom:remove', view);\n }\n}\n\nfunction handleBeforeAttach() {\n triggerMethodChildren(this, 'before:attach', shouldTriggerAttach);\n}\n\nfunction handleAttach() {\n triggerMethodChildren(this, 'attach', shouldAttach);\n triggerDOMRefresh(this);\n}\n\nfunction handleBeforeDetach() {\n triggerMethodChildren(this, 'before:detach', shouldTriggerDetach);\n triggerDOMRemove(this);\n}\n\nfunction handleDetach() {\n triggerMethodChildren(this, 'detach', shouldDetach);\n}\n\nfunction handleBeforeRender() {\n triggerDOMRemove(this);\n}\n\nfunction handleRender() {\n triggerDOMRefresh(this);\n}\n\n// Monitor a view's state, propagating attach/detach events to children and firing dom:refresh\n// whenever a rendered view is attached or an attached view is rendered.\nfunction monitorViewEvents(view) {\n if (view._areViewEventsMonitored || view.monitorViewEvents === false) { return; }\n\n view._areViewEventsMonitored = true;\n\n view.on({\n 'before:attach': handleBeforeAttach,\n 'attach': handleAttach,\n 'before:detach': handleBeforeDetach,\n 'detach': handleDetach,\n 'before:render': handleBeforeRender,\n 'render': handleRender\n });\n}\n\nexport default monitorViewEvents;\n","// Trigger Method\n// --------------\n\nimport _ from 'underscore';\nimport getOption from './get-option';\n\n// split the event name on the \":\"\nconst splitter = /(^|:)(\\w)/gi;\n\n// Only calc getOnMethodName once\nconst methodCache = {};\n\n// take the event section (\"section1:section2:section3\")\n// and turn it in to uppercase name onSection1Section2Section3\nfunction getEventName(match, prefix, eventName) {\n return eventName.toUpperCase();\n}\n\nconst getOnMethodName = function(event) {\n if (!methodCache[event]) {\n methodCache[event] = 'on' + event.replace(splitter, getEventName);\n }\n\n return methodCache[event];\n};\n\n// Trigger an event and/or a corresponding method name. Examples:\n//\n// `this.triggerMethod(\"foo\")` will trigger the \"foo\" event and\n// call the \"onFoo\" method.\n//\n// `this.triggerMethod(\"foo:bar\")` will trigger the \"foo:bar\" event and\n// call the \"onFooBar\" method.\nexport default function triggerMethod(event) {\n // get the method name from the event name\n const methodName = getOnMethodName(event);\n const method = getOption.call(this, methodName);\n let result;\n\n // call the onMethodName if it exists\n if (_.isFunction(method)) {\n // pass all args, except the event name\n result = method.apply(this, _.drop(arguments));\n }\n\n // trigger the event\n this.trigger.apply(this, arguments);\n\n return result;\n}\n","import { reduce, keys } from 'underscore';\n\n// Regular expression used to split event strings.\nexport const eventSplitter = /\\s+/;\n\n// Iterates over the standard `event, callback` (as well as the fancy multiple\n// space-separated events `\"change blur\", callback` and jQuery-style event\n// maps `{event: callback}`).\nexport default function buildEventArgs(name, callback, context, listener) {\n if (name && typeof name === 'object') {\n return reduce(keys(name), (eventArgs, key) => {\n return eventArgs.concat(buildEventArgs(key, name[key], context || callback, listener));\n }, []);\n }\n\n if (name && eventSplitter.test(name)) {\n return reduce(name.split(eventSplitter), (eventArgs, n) => {\n eventArgs.push({ name: n, callback, context, listener });\n return eventArgs;\n }, []);\n }\n\n return [{ name, callback, context, listener }];\n}\n","import { once } from 'underscore';\n\n// Wrap callback in a once. Returns for requests\n// `offCallback` unbinds the `onceWrapper` after it has been called.\nexport default function onceWrap(callback, offCallback) {\n const onceCallback = once(function() {\n offCallback(onceCallback);\n return callback.apply(this, arguments);\n });\n\n onceCallback._callback = callback;\n\n return onceCallback;\n}\n","import { reduce, each, keys, uniqueId } from 'underscore';\n\nimport buildEventArgs, { eventSplitter } from '../utils/build-event-args';\nimport callHandler from '../utils/call-handler';\nimport onceWrap from '../utils/once-wrap';\n\nimport triggerMethod from '../common/trigger-method';\n\n// A module that can be mixed in to *any object* in order to provide it with\n// a custom event channel. You may bind a callback to an event with `on` or\n// remove with `off`; `trigger`-ing an event fires all callbacks in\n// succession.\n//\n// var object = {};\n// _.extend(object, Events);\n// object.on('expand', function(){ alert('expanded'); });\n// object.trigger('expand');\n//\n\n// The reducing API that adds a callback to the `events` object.\nconst onApi = function({ events, name, callback, context, ctx, listener }) {\n const handlers = events[name] || (events[name] = []);\n handlers.push({ callback, context, ctx: context || ctx, listener });\n return events;\n};\n\nconst onReducer = function(events, { name, callback, context }) {\n if (!callback) {return events;}\n return onApi({ events, name, callback, context, ctx: this });\n}\n\nconst onceReducer = function(events, { name, callback, context }) {\n if (!callback) {return events;}\n const onceCallback = onceWrap(callback, this.off.bind(this, name));\n return onApi({ events, name, callback: onceCallback, context, ctx: this });\n}\n\nconst cleanupListener = function({ obj, listeneeId, listenerId, listeningTo }) {\n delete listeningTo[listeneeId];\n delete obj._rdListeners[listenerId];\n};\n\n// The reducing API that removes a callback from the `events` object.\nconst offReducer = function(events , { name, callback, context }) {\n const names = name ? [name] : keys(events);\n\n each(names, key => {\n const handlers = events[key];\n\n // Bail out if there are no events stored.\n if (!handlers) {return;}\n\n // Find any remaining events.\n events[key] = reduce(handlers, (remaining, handler) => {\n if (\n callback && callback !== handler.callback &&\n callback !== handler.callback._callback ||\n context && context !== handler.context\n ) {\n remaining.push(handler);\n return remaining;\n }\n\n // If not including event, clean up any related listener\n if (handler.listener) {\n const listener = handler.listener;\n listener.count--;\n if (!listener.count) {cleanupListener(listener);}\n }\n\n return remaining;\n }, []);\n\n if (!events[key].length) {delete events[key];}\n });\n\n return events;\n};\n\nconst getListener = function(obj, listenerObj) {\n const listeneeId = obj._rdListenId || (obj._rdListenId = uniqueId('l'));\n obj._rdEvents = obj._rdEvents || {};\n const listeningTo = listenerObj._rdListeningTo || (listenerObj._rdListeningTo = {});\n const listener = listeningTo[listeneeId];\n\n // This listenerObj is not listening to any other events on `obj` yet.\n // Setup the necessary references to track the listening callbacks.\n if (!listener) {\n const listenerId = listenerObj._rdListenId || (listenerObj._rdListenId = uniqueId('l'));\n listeningTo[listeneeId] = {obj, listeneeId, listenerId, listeningTo, count: 0};\n\n return listeningTo[listeneeId];\n }\n\n return listener;\n}\n\nconst listenToApi = function({ name, callback, context, listener }) {\n if (!callback) {return;}\n\n const { obj, listenerId } = listener;\n const listeners = obj._rdListeners || (obj._rdListeners = {});\n obj._rdEvents = onApi({ events: obj._rdEvents, name, callback, context, listener });\n listeners[listenerId] = listener;\n listener.count++;\n\n // Call `on` for interop\n obj.on(name, callback, context, { _rdInternal: true });\n};\n\nconst listenToOnceApi = function({ name, callback, context, listener }) {\n if (!callback) {return;}\n const offCallback = this.stopListening.bind(this, listener.obj, name);\n const onceCallback = onceWrap(callback, offCallback);\n listenToApi({ name, callback: onceCallback, context, listener });\n};\n\n// Handles triggering the appropriate event callbacks.\nconst triggerApi = function({ events, name, args }) {\n const objEvents = events[name];\n const allEvents = (objEvents && events.all) ? events.all.slice() : events.all;\n if (objEvents) {triggerEvents(objEvents, args);}\n if (allEvents) {triggerEvents(allEvents, [name].concat(args));}\n};\n\nconst triggerEvents = function(events, args) {\n each(events, ({ callback, ctx }) => {\n callHandler(callback, ctx, args);\n });\n};\n\nexport default {\n\n // Bind an event to a `callback` function. Passing `\"all\"` will bind\n // the callback to all events fired.\n on(name, callback, context, opts) {\n if (opts && opts._rdInternal) {return;}\n\n const eventArgs = buildEventArgs(name, callback, context);\n this._rdEvents = reduce(eventArgs, onReducer.bind(this), this._rdEvents || {});\n\n return this;\n },\n\n // Remove one or many callbacks. If `context` is null, removes all\n // callbacks with that function. If `callback` is null, removes all\n // callbacks for the event. If `name` is null, removes all bound\n // callbacks for all events.\n off(name, callback, context, opts) {\n if (!this._rdEvents) {return this;}\n if (opts && opts._rdInternal) {return;}\n\n // Delete all event listeners and \"drop\" events.\n if (!name && !context && !callback) {\n this._rdEvents = void 0;\n const listeners = this._rdListeners;\n each(keys(listeners), listenerId => {\n cleanupListener(listeners[listenerId]);\n });\n return this;\n }\n\n const eventArgs = buildEventArgs(name, callback, context);\n\n this._rdEvents = reduce(eventArgs, offReducer, this._rdEvents);\n\n return this;\n },\n\n // Bind an event to only be triggered a single time. After the first time\n // the callback is invoked, its listener will be removed. If multiple events\n // are passed in using the space-separated syntax, the handler will fire\n // once for each event, not once for a combination of all events.\n once(name, callback, context) {\n const eventArgs = buildEventArgs(name, callback, context);\n\n this._rdEvents = reduce(eventArgs, onceReducer.bind(this), this._rdEvents || {})\n\n return this;\n },\n\n // Inversion-of-control versions of `on`. Tell *this* object to listen to\n // an event in another object... keeping track of what it's listening to\n // for easier unbinding later.\n listenTo(obj, name, callback) {\n if (!obj) {return this;}\n\n const listener = getListener(obj, this);\n const eventArgs = buildEventArgs(name, callback, this, listener);\n each(eventArgs, listenToApi);\n\n return this;\n },\n\n // Inversion-of-control versions of `once`.\n listenToOnce(obj, name, callback) {\n if (!obj) {return this;}\n\n const listener = getListener(obj, this);\n const eventArgs = buildEventArgs(name, callback, this, listener);\n each(eventArgs, listenToOnceApi.bind(this));\n\n return this;\n },\n\n // Tell this object to stop listening to either specific events ... or\n // to every object it's currently listening to.\n stopListening(obj, name, callback) {\n const listeningTo = this._rdListeningTo;\n if (!listeningTo) {return this;}\n\n const eventArgs = buildEventArgs(name, callback, this);\n\n const listenerIds = obj ? [obj._rdListenId] : keys(listeningTo);\n for (let i = 0; i < listenerIds.length; i++) {\n const listener = listeningTo[listenerIds[i]];\n\n // If listening doesn't exist, this object is not currently\n // listening to obj. Break out early.\n if (!listener) {break;}\n\n each(eventArgs, args => {\n const listenToObj = listener.obj;\n const events = listenToObj._rdEvents;\n\n if (!events) {return;}\n\n listenToObj._rdEvents = offReducer(events, args);\n\n // Call `off` for interop\n listenToObj.off(args.name, args.callback, this, { _reInternal: true });\n });\n }\n\n return this;\n },\n\n // Trigger one or many events, firing all bound callbacks. Callbacks are\n // passed the same arguments as `trigger` is, apart from the event name\n // (unless you're listening on `\"all\"`, which will cause your callback to\n // receive the true name of the event as the first argument).\n trigger(name, ...args) {\n if (!this._rdEvents) {return this;}\n\n if (name && typeof name === 'object') {\n each(keys(name), key => {\n triggerApi({\n events: this._rdEvents,\n name: key,\n args: [name[key]],\n });\n });\n }\n\n if (name && eventSplitter.test(name)) {\n each(name.split(eventSplitter), n => {\n triggerApi({\n events: this._rdEvents,\n name: n,\n args,\n });\n });\n return this;\n }\n\n triggerApi({\n events: this._rdEvents,\n name,\n args,\n });\n\n return this;\n },\n\n triggerMethod,\n};\n","// An optimized way to execute callbacks.\nexport default function callHandler(callback, context, args = []) {\n switch (args.length) {\n case 0: return callback.call(context);\n case 1: return callback.call(context, args[0]);\n case 2: return callback.call(context, args[0], args[1]);\n case 3: return callback.call(context, args[0], args[1], args[2]);\n default: return callback.apply(context, args);\n }\n}\n","import _ from 'underscore';\nimport Backbone from 'backbone';\n\nimport getOption from '../common/get-option';\nimport mergeOptions from '../common/merge-options';\nimport normalizeMethods from '../common/normalize-methods';\nimport triggerMethod from '../common/trigger-method';\nimport {\n bindEvents,\n unbindEvents\n} from '../common/bind-events';\nimport {\n bindRequests,\n unbindRequests\n} from '../common/bind-requests';\n\nconst CommonMixin = {\n\n // Imports the \"normalizeMethods\" to transform hashes of\n // events=>function references/names to a hash of events=>function references\n normalizeMethods,\n\n _setOptions(options, classOptions) {\n this.options = _.extend({}, _.result(this, 'options'), options);\n this.mergeOptions(options, classOptions);\n },\n\n // A handy way to merge passed-in options onto the instance\n mergeOptions,\n\n // Enable getting options from this or this.options by name.\n getOption,\n\n // Enable binding view's events from another entity.\n bindEvents,\n\n // Enable unbinding view's events from another entity.\n unbindEvents,\n\n // Enable binding view's requests.\n bindRequests,\n\n // Enable unbinding view's requests.\n unbindRequests,\n\n triggerMethod\n};\n\n_.extend(CommonMixin, Backbone.Events);\n\nexport default CommonMixin;\n","export default {\n _isDestroyed: false,\n\n isDestroyed() {\n return this._isDestroyed;\n },\n\n destroy(options) {\n if (this._isDestroyed) { return this; }\n\n this.triggerMethod('before:destroy', this, options);\n this._isDestroyed = true;\n this.triggerMethod('destroy', this, options);\n this.stopListening();\n\n return this;\n }\n};\n","import _ from 'underscore';\nimport Radio from 'backbone.radio';\nimport MarionetteError from '../utils/error';\n\n// MixinOptions\n// - channelName\n// - radioEvents\n// - radioRequests\n\nexport default {\n\n _initRadio() {\n const channelName = _.result(this, 'channelName');\n\n if (!channelName) {\n return;\n }\n\n /* istanbul ignore next */\n if (!Radio) {\n throw new MarionetteError({\n message: 'The dependency \"backbone.radio\" is missing.',\n url: 'backbone.radio.html#marionette-integration'\n });\n }\n\n const channel = this._channel = Radio.channel(channelName);\n\n const radioEvents = _.result(this, 'radioEvents');\n this.bindEvents(channel, radioEvents);\n\n const radioRequests = _.result(this, 'radioRequests');\n this.bindRequests(channel, radioRequests);\n\n this.on('destroy', this._destroyRadio);\n },\n\n _destroyRadio() {\n this._channel.stopReplying(null, null, this);\n },\n\n getChannel() {\n return this._channel;\n }\n};\n","// Object\n// ------\n\nimport _ from 'underscore';\nimport extend from './utils/extend';\nimport CommonMixin from './mixins/common';\nimport DestroyMixin from './mixins/destroy';\nimport RadioMixin from './mixins/radio';\n\nconst ClassOptions = [\n 'channelName',\n 'radioEvents',\n 'radioRequests'\n];\n\n// Object borrows many conventions and utilities from Backbone.\nconst MarionetteObject = function(options) {\n this._setOptions(options, ClassOptions);\n this.cid = _.uniqueId(this.cidPrefix);\n this._initRadio();\n this.initialize.apply(this, arguments);\n};\n\nMarionetteObject.extend = extend;\n\n// Object Methods\n// --------------\n\n_.extend(MarionetteObject.prototype, CommonMixin, DestroyMixin, RadioMixin, {\n cidPrefix: 'mno',\n\n // This is a noop method intended to be overridden\n initialize() {}\n});\n\nexport default MarionetteObject;\n","// Implementation of the invoke method (http://underscorejs.org/#invoke) with support for\n// lodash v3, v4, and underscore.js\nimport _ from 'underscore';\n\nexport default _.invokeMap || _.invoke;\n","import _ from 'underscore';\nimport MarionetteError from '../utils/error';\nimport _invoke from '../utils/invoke';\n\n// MixinOptions\n// - behaviors\n\n// Takes care of getting the behavior class\n// given options and a key.\n// If a user passes in options.behaviorClass\n// default to using that.\n// If a user passes in a Behavior Class directly, use that\n// Otherwise an error is thrown\nfunction getBehaviorClass(options) {\n if (options.behaviorClass) {\n return { BehaviorClass: options.behaviorClass, options };\n }\n\n //treat functions as a Behavior constructor\n if (_.isFunction(options)) {\n return { BehaviorClass: options, options: {} };\n }\n\n throw new MarionetteError({\n message: 'Unable to get behavior class. A Behavior constructor should be passed directly or as behaviorClass property of options',\n url: 'marionette.behavior.html#defining-and-attaching-behaviors'\n });\n}\n\n// Iterate over the behaviors object, for each behavior\n// instantiate it and get its grouped behaviors.\n// This accepts a list of behaviors in either an object or array form\nfunction parseBehaviors(view, behaviors, allBehaviors) {\n return _.reduce(behaviors, (reducedBehaviors, behaviorDefiniton) => {\n const { BehaviorClass, options } = getBehaviorClass(behaviorDefiniton);\n const behavior = new BehaviorClass(options, view);\n reducedBehaviors.push(behavior);\n\n return parseBehaviors(view, _.result(behavior, 'behaviors'), reducedBehaviors);\n }, allBehaviors);\n}\n\nexport default {\n _initBehaviors() {\n this._behaviors = parseBehaviors(this, _.result(this, 'behaviors'), []);\n },\n\n _getBehaviorTriggers() {\n const triggers = _invoke(this._behaviors, '_getTriggers');\n return _.reduce(triggers, function(memo, _triggers) {\n return _.extend(memo, _triggers);\n }, {});\n },\n\n _getBehaviorEvents() {\n const events = _invoke(this._behaviors, '_getEvents');\n return _.reduce(events, function(memo, _events) {\n return _.extend(memo, _events);\n }, {});\n },\n\n // proxy behavior $el to the view's $el.\n _proxyBehaviorViewProperties() {\n _invoke(this._behaviors, 'proxyViewProperties');\n },\n\n // delegate modelEvents and collectionEvents\n _delegateBehaviorEntityEvents() {\n _invoke(this._behaviors, 'delegateEntityEvents');\n },\n\n // undelegate modelEvents and collectionEvents\n _undelegateBehaviorEntityEvents() {\n _invoke(this._behaviors, 'undelegateEntityEvents');\n },\n\n _destroyBehaviors(options) {\n // Call destroy on each behavior after\n // destroying the view.\n // This unbinds event listeners\n // that behaviors have registered for.\n _invoke(this._behaviors, 'destroy', options);\n },\n\n // Remove a behavior\n _removeBehavior(behavior) {\n // Don't worry about the clean up if the view is destroyed\n if (this._isDestroyed) { return; }\n\n // Remove behavior-only triggers and events\n this.undelegate(`.trig${ behavior.cid } .${ behavior.cid }`);\n\n this._behaviors = _.without(this._behaviors, behavior);\n },\n\n _bindBehaviorUIElements() {\n _invoke(this._behaviors, 'bindUIElements');\n },\n\n _unbindBehaviorUIElements() {\n _invoke(this._behaviors, 'unbindUIElements');\n },\n\n _triggerEventOnBehaviors(eventName, view, options) {\n _invoke(this._behaviors, 'triggerMethod', eventName, view, options);\n }\n};\n","import _ from 'underscore';\n\n// MixinOptions\n// - collectionEvents\n// - modelEvents\n\nexport default {\n // Handle `modelEvents`, and `collectionEvents` configuration\n _delegateEntityEvents(model, collection) {\n if (model) {\n this._modelEvents = _.result(this, 'modelEvents');\n this.bindEvents(model, this._modelEvents);\n }\n\n if (collection) {\n this._collectionEvents = _.result(this, 'collectionEvents');\n this.bindEvents(collection, this._collectionEvents);\n }\n },\n\n // Remove any previously delegate entity events\n _undelegateEntityEvents(model, collection) {\n if (this._modelEvents) {\n this.unbindEvents(model, this._modelEvents);\n delete this._modelEvents;\n }\n\n if (this._collectionEvents) {\n this.unbindEvents(collection, this._collectionEvents);\n delete this._collectionEvents;\n }\n },\n\n // Remove cached event handlers\n _deleteEntityEventHandlers() {\n delete this._modelEvents;\n delete this._collectionEvents;\n }\n};\n","import _ from 'underscore';\n\n// MixinOptions\n// - template\n// - templateContext\n\nexport default {\n\n // Internal method to render the template with the serialized data\n // and template context\n _renderTemplate(template) {\n // Add in entity data and template context\n const data = this.mixinTemplateContext(this.serializeData()) || {};\n\n // Render and add to el\n const html = this._renderHtml(template, data);\n if (typeof html !== 'undefined') {\n this.attachElContent(html);\n }\n },\n\n // Get the template for this view instance.\n // You can set a `template` attribute in the view definition\n // or pass a `template: TemplateFunction` parameter in\n // to the constructor options.\n getTemplate() {\n return this.template;\n },\n\n // Mix in template context methods. Looks for a\n // `templateContext` attribute, which can either be an\n // object literal, or a function that returns an object\n // literal. All methods and attributes from this object\n // are copies to the object passed in.\n mixinTemplateContext(serializedData) {\n const templateContext = _.result(this, 'templateContext');\n if (!templateContext) { return serializedData; }\n if (!serializedData) { return templateContext; }\n return _.extend({}, serializedData, templateContext);\n },\n\n // Serialize the view's model *or* collection, if\n // it exists, for the template\n serializeData() {\n // If we have a model, we serialize that\n if (this.model) {\n return this.serializeModel();\n }\n\n // Otherwise, we serialize the collection,\n // making it available under the `items` property\n if (this.collection) {\n return {\n items: this.serializeCollection()\n };\n }\n },\n\n // Prepares the special `model` property of a view\n // for being displayed in the template. Override this if\n // you need a custom transformation for your view's model\n serializeModel() {\n return this.model.attributes;\n },\n\n // Serialize a collection\n serializeCollection() {\n return _.map(this.collection.models, model => model.attributes);\n },\n\n // Renders the data into the template\n _renderHtml(template, data) {\n return template(data);\n },\n\n // Attaches the content of a given view.\n // This method can be overridden to optimize rendering,\n // or to render in a non standard way.\n //\n // For example, using `innerHTML` instead of `$el.html`\n //\n // ```js\n // attachElContent(html) {\n // this.el.innerHTML = html;\n // }\n // ```\n attachElContent(html) {\n this.Dom.setContents(this.el, html, this.$el);\n }\n};\n","import _ from 'underscore';\n// allows for the use of the @ui. syntax within\n// a given key for triggers and events\n// swaps the @ui with the associated selector.\n// Returns a new, non-mutated, parsed events hash.\nconst normalizeUIKeys = function(hash, ui) {\n return _.reduce(hash, (memo, val, key) => {\n const normalizedKey = normalizeUIString(key, ui);\n memo[normalizedKey] = val;\n return memo;\n }, {});\n};\n\nconst uiRegEx = /@ui\\.[a-zA-Z-_$0-9]*/g;\n\n// utility method for parsing @ui. syntax strings\n// into associated selector\nconst normalizeUIString = function(uiString, ui) {\n return uiString.replace(uiRegEx, (r) => {\n return ui[r.slice(4)];\n });\n};\n\n// allows for the use of the @ui. syntax within\n// a given value for regions\n// swaps the @ui with the associated selector\nconst normalizeUIValues = function(hash, ui, property) {\n _.each(hash, (val, key) => {\n if (_.isString(val)) {\n hash[key] = normalizeUIString(val, ui);\n } else if (val) {\n const propertyVal = val[property];\n if (_.isString(propertyVal)) {\n val[property] = normalizeUIString(propertyVal, ui);\n }\n }\n });\n return hash;\n};\n\nexport default {\n\n // normalize the keys of passed hash with the views `ui` selectors.\n // `{\"@ui.foo\": \"bar\"}`\n normalizeUIKeys(hash) {\n const uiBindings = this._getUIBindings();\n return normalizeUIKeys(hash, uiBindings);\n },\n\n // normalize the passed string with the views `ui` selectors.\n // `\"@ui.bar\"`\n normalizeUIString(uiString) {\n const uiBindings = this._getUIBindings();\n return normalizeUIString(uiString, uiBindings);\n },\n\n // normalize the values of passed hash with the views `ui` selectors.\n // `{foo: \"@ui.bar\"}`\n normalizeUIValues(hash, property) {\n const uiBindings = this._getUIBindings();\n return normalizeUIValues(hash, uiBindings, property);\n },\n\n _getUIBindings() {\n const uiBindings = _.result(this, '_uiBindings');\n return uiBindings || _.result(this, 'ui');\n },\n\n // This method binds the elements specified in the \"ui\" hash inside the view's code with\n // the associated jQuery selectors.\n _bindUIElements() {\n if (!this.ui) { return; }\n\n // store the ui hash in _uiBindings so they can be reset later\n // and so re-rendering the view will be able to find the bindings\n if (!this._uiBindings) {\n this._uiBindings = this.ui;\n }\n\n // get the bindings result, as a function or otherwise\n const bindings = _.result(this, '_uiBindings');\n\n // empty the ui so we don't have anything to start with\n this._ui = {};\n\n // bind each of the selectors\n _.each(bindings, (selector, key) => {\n this._ui[key] = this.$(selector);\n });\n\n this.ui = this._ui;\n },\n\n _unbindUIElements() {\n if (!this.ui || !this._uiBindings) { return; }\n\n // delete all of the existing ui bindings\n _.each(this.ui, ($el, name) => {\n delete this.ui[name];\n });\n\n // reset the ui element to the original bindings configuration\n this.ui = this._uiBindings;\n delete this._uiBindings;\n delete this._ui;\n },\n\n _getUI(name) {\n return this._ui[name];\n }\n};\n","// Add Feature flags here\n// e.g. 'class' => false\nconst FEATURES = {\n childViewEventPrefix: false,\n triggersStopPropagation: true,\n triggersPreventDefault: true,\n DEV_MODE: false\n};\n\nfunction isEnabled(name) {\n return !!FEATURES[name];\n}\n\nfunction setEnabled(name, state) {\n return FEATURES[name] = state;\n}\n\nexport {\n FEATURES,\n setEnabled,\n isEnabled\n};\n","// Event Delegator\n// ---------\nimport { each, extend } from 'underscore';\n\n// Static setter\nexport function setEventDelegator(mixin) {\n this.prototype.EventDelegator = extend({}, this.prototype.EventDelegator, mixin);\n return this;\n}\n\nexport default {\n\n shouldCapture(eventName) {\n return ['focus', 'blur'].indexOf(eventName) !== -1;\n },\n\n // this.$el.on(eventName + '.delegateEvents' + this.cid, selector, handler);\n delegate({ eventName, selector, handler, events, rootEl }) {\n const shouldCapture = this.shouldCapture(eventName);\n\n if (selector) {\n const delegateHandler = function(evt) {\n let node = evt.target;\n for (; node && node !== rootEl; node = node.parentNode) {\n if (Element.prototype.matches.call(node, selector)) {\n evt.delegateTarget = node;\n handler(evt);\n }\n }\n };\n\n events.push({ eventName, handler: delegateHandler });\n Element.prototype.addEventListener.call(rootEl, eventName, delegateHandler, shouldCapture);\n\n return;\n }\n\n events.push({ eventName, handler });\n Element.prototype.addEventListener.call(rootEl, eventName, handler, shouldCapture);\n },\n\n // this.$el.off('.delegateEvents' + this.cid);\n undelegateAll({ events, rootEl }) {\n if (!rootEl) { return; }\n\n each(events, ({ eventName, handler }) => {\n const shouldCapture = this.shouldCapture(eventName);\n Element.prototype.removeEventListener.call(rootEl, eventName, handler, shouldCapture);\n });\n\n events.length = 0;\n }\n};\n","import { isString, isFunction, result, each } from 'underscore';\nimport { isEnabled } from '../config/features';\nimport EventDelegator from '../config/event-delegator';\n\nconst delegateEventSplitter = /^(\\S+)\\s*(.*)$/;\n\n// Internal method to create an event handler for a given `triggerDef` like\n// 'click:foo'\nfunction buildViewTrigger(view, triggerDef) {\n if (isString(triggerDef)) {\n triggerDef = {event: triggerDef};\n }\n\n const eventName = triggerDef.event;\n\n let shouldPreventDefault = !!triggerDef.preventDefault;\n\n if (isEnabled('triggersPreventDefault')) {\n shouldPreventDefault = triggerDef.preventDefault !== false;\n }\n\n let shouldStopPropagation = !!triggerDef.stopPropagation;\n\n if (isEnabled('triggersStopPropagation')) {\n shouldStopPropagation = triggerDef.stopPropagation !== false;\n }\n\n return function(event, ...args) {\n if (shouldPreventDefault) {\n event.preventDefault();\n }\n\n if (shouldStopPropagation) {\n event.stopPropagation();\n }\n\n view.triggerMethod(eventName, view, event, ...args);\n };\n}\n\nexport default {\n\n EventDelegator,\n\n _initViewEvents() {\n this._domEvents = [];\n },\n\n _undelegateViewEvents() {\n this.EventDelegator.undelegateAll({\n events: this._domEvents,\n rootEl: this.el\n });\n },\n\n _delegateViewEvents(view = this) {\n const uiBindings = this._getUIBindings();\n this._delegateEvents(uiBindings);\n this._delegateTriggers(uiBindings, view);\n },\n\n _delegateEvents(uiBindings) {\n if (!this.events) { return; }\n\n each(result(this, 'events'), (handler, key) => {\n if (!isFunction(handler)) {\n handler = this[handler];\n }\n if (!handler) { return; }\n this._delegate(handler.bind(this), this.normalizeUIString(key, uiBindings));\n });\n },\n\n _delegateTriggers(uiBindings, view) {\n if (!this.triggers) { return; }\n\n each(result(this, 'triggers'), (value, key) => {\n this._delegate(buildViewTrigger(view, value), this.normalizeUIString(key, uiBindings));\n });\n },\n\n _delegate(handler, key) {\n const match = key.match(delegateEventSplitter);\n this.EventDelegator.delegate({\n eventName: match[1],\n selector: match[2],\n handler,\n events: this._domEvents,\n rootEl: this.el\n });\n }\n};\n","// DomApi\n// ---------\nimport { extend, each, keys } from 'underscore';\n\n// Static setter\nexport function setDomApi(mixin) {\n this.prototype.Dom = extend({}, this.prototype.Dom, mixin);\n return this;\n}\n\nexport default {\n // Returns a new HTML DOM node of tagName\n createElement(tagName) {\n return document.createElement(tagName);\n },\n\n // Returns a new HTML DOM node instance\n createBuffer() {\n return document.createDocumentFragment();\n },\n\n // Returns the document element for a given DOM element\n getDocumentEl(el) {\n return el.ownerDocument.documentElement;\n },\n\n // Finds the `selector` string with the el\n // Returns an array-like object of nodes\n findEl(el, selector) {\n return el.querySelectorAll(selector);\n },\n\n // Returns true if the el contains the node childEl\n hasEl(el, childEl) {\n return el.contains(childEl && childEl.parentNode);\n },\n\n // Detach `el` from the DOM without removing listeners\n detachEl(el) {\n if (el.parentNode) {el.parentNode.removeChild(el);}\n },\n\n // Remove `oldEl` from the DOM and put `newEl` in its place\n replaceEl(newEl, oldEl) {\n if (newEl === oldEl) {\n return;\n }\n\n const parent = oldEl.parentNode;\n\n if (!parent) {\n return;\n }\n\n parent.replaceChild(newEl, oldEl);\n },\n\n // Swaps the location of `el1` and `el2` in the DOM\n swapEl(el1, el2) {\n if (el1 === el2) {\n return;\n }\n\n const parent1 = el1.parentNode;\n const parent2 = el2.parentNode;\n\n if (!parent1 || !parent2) {\n return;\n }\n\n const next1 = el1.nextSibling;\n const next2 = el2.nextSibling;\n\n parent1.insertBefore(el2, next1);\n parent2.insertBefore(el1, next2);\n },\n\n // Replace the contents of `el` with the `html`\n setContents(el, html) {\n el.innerHTML = html\n },\n\n // Sets attributes on a DOM node\n setAttributes(el, attrs) {\n each(keys(attrs), attr => {\n attr in el ? el[attr] = attrs[attr] : el.setAttribute(attr, attrs[attr]);\n });\n },\n\n // Takes the DOM node `el` and appends the DOM node `contents`\n // to the end of the element's contents.\n appendContents(el, contents) {\n el.appendChild(contents);\n },\n\n // Does the el have child nodes\n hasContents(el) {\n return !!el && el.hasChildNodes();\n },\n\n // Remove the inner contents of `el` from the DOM while leaving\n // `el` itself in the DOM.\n detachContents(el) {\n el.textContent = '';\n }\n};\n","// ViewMixin\n// ---------\n\nimport { extend, result } from 'underscore';\nimport BehaviorsMixin from './behaviors';\nimport CommonMixin from './common';\nimport DelegateEntityEventsMixin from './delegate-entity-events';\nimport TemplateRenderMixin from './template-render';\nimport UIMixin from './ui';\nimport ViewEvents from './view-events';\nimport { isEnabled } from '../config/features';\nimport DomApi from '../config/dom';\n\n\n// MixinOptions\n// - attributes\n// - behaviors\n// - childViewEventPrefix\n// - childViewEvents\n// - childViewTriggers\n// - className\n// - collection\n// - collectionEvents\n// - el\n// - events\n// - id\n// - model\n// - modelEvents\n// - tagName\n// - triggers\n// - ui\n\n\nconst ViewMixin = {\n tagName: 'div',\n\n // This is a noop method intended to be overridden\n preinitialize() {},\n\n Dom: DomApi,\n\n // Create an element from the `id`, `className` and `tagName` properties.\n _getEl() {\n if (!this.el) {\n const el = this.Dom.createElement(result(this, 'tagName'));\n const attrs = extend({}, result(this, 'attributes'));\n if (this.id) {attrs.id = result(this, 'id');}\n if (this.className) {attrs.class = result(this, 'className');}\n this.Dom.setAttributes(el, attrs);\n return el;\n }\n\n return result(this, 'el');\n },\n\n $(selector) {\n return this.Dom.findEl(this.el, selector)\n },\n\n _isElAttached() {\n return !!this.el && this.Dom.hasEl(this.Dom.getDocumentEl(this.el), this.el);\n },\n\n supportsRenderLifecycle: true,\n supportsDestroyLifecycle: true,\n\n _isDestroyed: false,\n\n isDestroyed() {\n return !!this._isDestroyed;\n },\n\n _isRendered: false,\n\n isRendered() {\n return !!this._isRendered;\n },\n\n _isAttached: false,\n\n isAttached() {\n return !!this._isAttached;\n },\n\n // Handle `modelEvents`, and `collectionEvents` configuration\n delegateEntityEvents() {\n this._delegateEntityEvents(this.model, this.collection);\n\n // bind each behaviors model and collection events\n this._delegateBehaviorEntityEvents();\n\n return this;\n },\n\n // Handle unbinding `modelEvents`, and `collectionEvents` configuration\n undelegateEntityEvents() {\n this._undelegateEntityEvents(this.model, this.collection);\n\n // unbind each behaviors model and collection events\n this._undelegateBehaviorEntityEvents();\n\n return this;\n },\n\n // Handle destroying the view and its children.\n destroy(options) {\n if (this._isDestroyed || this._isDestroying) { return this; }\n this._isDestroying = true;\n const shouldTriggerDetach = this._isAttached && !this._disableDetachEvents;\n\n this.triggerMethod('before:destroy', this, options);\n if (shouldTriggerDetach) {\n this.triggerMethod('before:detach', this);\n }\n\n // unbind UI elements\n this.unbindUIElements();\n this._undelegateViewEvents();\n\n // remove the view from the DOM\n this.Dom.detachEl(this.el);\n\n if (shouldTriggerDetach) {\n this._isAttached = false;\n this.triggerMethod('detach', this);\n }\n\n // remove children after the remove to prevent extra paints\n this._removeChildren();\n\n this._isDestroyed = true;\n this._isRendered = false;\n\n // Destroy behaviors after _isDestroyed flag\n this._destroyBehaviors(options);\n\n this._deleteEntityEventHandlers();\n\n this.triggerMethod('destroy', this, options);\n this._triggerEventOnBehaviors('destroy', this, options);\n\n this.stopListening();\n\n return this;\n },\n\n // This method binds the elements specified in the \"ui\" hash\n bindUIElements() {\n this._bindUIElements();\n this._bindBehaviorUIElements();\n\n return this;\n },\n\n // This method unbinds the elements specified in the \"ui\" hash\n unbindUIElements() {\n this._unbindUIElements();\n this._unbindBehaviorUIElements();\n\n return this;\n },\n\n getUI(name) {\n return this._getUI(name);\n },\n\n // Cache `childViewEvents` and `childViewTriggers`\n _buildEventProxies() {\n this._childViewEvents = this.normalizeMethods(result(this, 'childViewEvents'));\n this._childViewTriggers = result(this, 'childViewTriggers');\n this._eventPrefix = this._getEventPrefix();\n },\n\n _getEventPrefix() {\n const defaultPrefix = isEnabled('childViewEventPrefix') ? 'childview' : false;\n const prefix = result(this, 'childViewEventPrefix', defaultPrefix);\n\n return (prefix === false) ? prefix : prefix + ':';\n },\n\n _proxyChildViewEvents(view) {\n if (this._childViewEvents || this._childViewTriggers || this._eventPrefix) {\n this.listenTo(view, 'all', this._childViewEventHandler);\n }\n },\n\n _childViewEventHandler(eventName, ...args) {\n const childViewEvents = this._childViewEvents;\n\n // call collectionView childViewEvent if defined\n if (childViewEvents && childViewEvents[eventName]) {\n childViewEvents[eventName].apply(this, args);\n }\n\n // use the parent view's proxyEvent handlers\n const childViewTriggers = this._childViewTriggers;\n\n // Call the event with the proxy name on the parent layout\n if (childViewTriggers && childViewTriggers[eventName]) {\n this.triggerMethod(childViewTriggers[eventName], ...args);\n }\n\n if (this._eventPrefix) {\n this.triggerMethod(this._eventPrefix + eventName, ...args);\n }\n }\n};\n\nextend(ViewMixin, BehaviorsMixin, CommonMixin, DelegateEntityEventsMixin, TemplateRenderMixin, UIMixin, ViewEvents);\n\nexport default ViewMixin;\n","export function isView(view) {\n return view.render && (view.destroy || view.remove);\n}\n\nexport function isViewClass(ViewClass) {\n return ViewClass.prototype.render && (ViewClass.prototype.destroy || ViewClass.prototype.remove);\n}\n\nexport function renderView(view) {\n if (view._isRendered) {\n return;\n }\n\n if (!view.supportsRenderLifecycle) {\n view.triggerMethod('before:render', view);\n }\n\n view.render();\n view._isRendered = true;\n\n if (!view.supportsRenderLifecycle) {\n view.triggerMethod('render', view);\n }\n}\n\nexport function destroyView(view, disableDetachEvents) {\n if (view.destroy) {\n // Attach flag for public destroy function internal check\n view._disableDetachEvents = disableDetachEvents;\n view.destroy();\n return;\n }\n\n // Destroy for non-Marionette Views\n if (!view.supportsDestroyLifecycle) {\n view.triggerMethod('before:destroy', view);\n }\n\n const shouldTriggerDetach = view._isAttached && !disableDetachEvents;\n\n if (shouldTriggerDetach) {\n view.triggerMethod('before:detach', view);\n }\n\n view.remove();\n\n if (shouldTriggerDetach) {\n view._isAttached = false;\n view.triggerMethod('detach', view);\n }\n\n view._isDestroyed = true;\n\n if (!view.supportsDestroyLifecycle) {\n view.triggerMethod('destroy', view);\n }\n}\n","// Region\n// ------\n\nimport { extend as _extend, uniqueId, isObject, isFunction, result } from 'underscore';\nimport MarionetteError from './utils/error';\nimport extend from './utils/extend';\nimport monitorViewEvents from './common/monitor-view-events';\nimport { renderView, destroyView, isView } from './common/view';\nimport CommonMixin from './mixins/common';\nimport View from './view';\nimport DomApi, { setDomApi } from './config/dom';\n\nconst classErrorName = 'RegionError';\n\nconst ClassOptions = [\n 'allowMissingEl',\n 'parentEl',\n 'replaceElement'\n];\n\nconst Region = function(options) {\n this._setOptions(options, ClassOptions);\n\n this.cid = uniqueId(this.cidPrefix);\n\n // getOption necessary because options.el may be passed as undefined\n this._initEl = this.el = this.getOption('el');\n\n this.initialize.apply(this, arguments);\n};\n\nRegion.extend = extend;\nRegion.setDomApi = setDomApi;\n\n// Region Methods\n// --------------\n\n_extend(Region.prototype, CommonMixin, {\n Dom: DomApi,\n\n cidPrefix: 'mnr',\n replaceElement: false,\n _isReplaced: false,\n _isSwappingView: false,\n\n // Displays a view instance inside of the region. If necessary handles calling the `render`\n // method for you. Reads content directly from the `el` attribute.\n show(view, options) {\n if (!this._ensureElement(options)) {\n return;\n }\n\n view = this._getView(view, options);\n\n if (view === this.currentView) { return this; }\n\n if (view._isShown) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'View is already shown in a Region or CollectionView',\n url: 'marionette.region.html#showing-a-view'\n });\n }\n\n this._isSwappingView = !!this.currentView;\n\n this.triggerMethod('before:show', this, view, options);\n\n // Assume an attached view is already in the region for pre-existing DOM\n if (this.currentView || !view._isAttached) {\n this.empty(options);\n }\n\n this._setupChildView(view);\n\n this.currentView = view;\n\n renderView(view);\n\n this._attachView(view, options);\n\n this.triggerMethod('show', this, view, options);\n\n this._isSwappingView = false;\n\n return this;\n },\n\n _setEl(el) {\n if (isObject(el)) {\n this.el = el;\n return;\n }\n\n if (!el) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'An \"el\" must be specified for a region.',\n url: 'marionette.region.html#additional-options'\n });\n }\n\n this.el = this.getEl(el);\n },\n\n // Set the `el` of the region and move any current view to the new `el`.\n _setElement(el) {\n if (el === this.el) { return this; }\n\n const shouldReplace = this._isReplaced;\n\n this._restoreEl();\n\n this._setEl(el);\n\n if (this.currentView) {\n const view = this.currentView;\n\n if (shouldReplace) {\n this._replaceEl(view);\n } else {\n this.attachHtml(view);\n }\n }\n\n return this;\n },\n\n _setupChildView(view) {\n monitorViewEvents(view);\n\n this._proxyChildViewEvents(view);\n\n // We need to listen for if a view is destroyed in a way other than through the region.\n // If this happens we need to remove the reference to the currentView since once a view\n // has been destroyed we can not reuse it.\n view.on('destroy', this._empty, this);\n },\n\n _proxyChildViewEvents(view) {\n const parentView = this._parentView;\n\n if (!parentView) { return; }\n\n parentView._proxyChildViewEvents(view);\n },\n\n // If the regions parent view is not monitoring its attach/detach events\n _shouldDisableMonitoring() {\n return this._parentView && this._parentView.monitorViewEvents === false;\n },\n\n _isElAttached() {\n return this.Dom.hasEl(this.Dom.getDocumentEl(this.el), this.el);\n },\n\n _attachView(view, { replaceElement } = {}) {\n const shouldTriggerAttach = !view._isAttached && this._isElAttached() && !this._shouldDisableMonitoring();\n const shouldReplaceEl = typeof replaceElement === 'undefined' ? !!result(this, 'replaceElement') : !!replaceElement;\n\n if (shouldTriggerAttach) {\n view.triggerMethod('before:attach', view);\n }\n\n if (shouldReplaceEl) {\n this._replaceEl(view);\n } else {\n this.attachHtml(view);\n }\n\n if (shouldTriggerAttach) {\n view._isAttached = true;\n view.triggerMethod('attach', view);\n }\n\n // Corresponds that view is shown in a marionette Region or CollectionView\n view._isShown = true;\n },\n\n _ensureElement(options = {}) {\n this._setEl(this.el);\n\n if (!this.el) {\n const allowMissingEl = typeof options.allowMissingEl === 'undefined' ? !!result(this, 'allowMissingEl') : !!options.allowMissingEl;\n\n if (allowMissingEl) {\n return false;\n } else {\n throw new MarionetteError({\n name: classErrorName,\n message: `An \"el\" must exist in DOM for this region ${this.cid}`,\n url: 'marionette.region.html#additional-options'\n });\n }\n }\n return true;\n },\n\n _getView(view) {\n if (!view) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'The view passed is undefined and therefore invalid. You must pass a view instance to show.',\n url: 'marionette.region.html#showing-a-view'\n });\n }\n\n if (view._isDestroyed) {\n throw new MarionetteError({\n name: classErrorName,\n message: `View (cid: \"${view.cid}\") has already been destroyed and cannot be used.`,\n url: 'marionette.region.html#showing-a-view'\n });\n }\n\n if (isView(view)) {\n return view;\n }\n\n const viewOptions = this._getViewOptions(view);\n\n return new View(viewOptions);\n },\n\n // This allows for a template or a static string to be\n // used as a template\n _getViewOptions(viewOptions) {\n if (isFunction(viewOptions)) {\n return { template: viewOptions };\n }\n\n if (isObject(viewOptions)) {\n return viewOptions;\n }\n\n const template = function() { return viewOptions; };\n\n return { template };\n },\n\n // Override this method to change how the region finds the DOM element that it manages. Return\n // a jQuery selector object scoped to a provided parent el or the document if none exists.\n getEl(el) {\n const context = result(this, 'parentEl');\n\n return this.Dom.findEl(context || document, el)[0];\n },\n\n _replaceEl(view) {\n // Always restore the el to ensure the regions el is present before replacing\n this._restoreEl();\n\n view.on('before:destroy', this._restoreEl, this);\n\n this.Dom.replaceEl(view.el, this.el);\n\n this._isReplaced = true;\n },\n\n // Restore the region's element in the DOM.\n _restoreEl() {\n // There is nothing to replace\n if (!this._isReplaced) {\n return;\n }\n\n const view = this.currentView;\n\n if (!view) {\n return;\n }\n\n this._detachView(view);\n\n this._isReplaced = false;\n },\n\n // Check to see if the region's el was replaced.\n isReplaced() {\n return !!this._isReplaced;\n },\n\n // Check to see if a view is being swapped by another\n isSwappingView() {\n return !!this._isSwappingView;\n },\n\n // Override this method to change how the new view is appended to the `$el` that the\n // region is managing\n attachHtml(view) {\n this.Dom.appendContents(this.el, view.el);\n },\n\n // Destroy the current view, if there is one. If there is no current view,\n // it will detach any html inside the region's `el`.\n empty(options = { allowMissingEl: true }) {\n const view = this.currentView;\n\n // If there is no view in the region we should only detach current html\n if (!view) {\n if (this._ensureElement(options)) {\n this.detachHtml();\n }\n return this;\n }\n\n this._empty(view, true);\n return this;\n },\n\n _empty(view, shouldDestroy) {\n view.off('destroy', this._empty, this);\n this.triggerMethod('before:empty', this, view);\n\n this._restoreEl();\n\n delete this.currentView;\n\n if (!view._isDestroyed) {\n if (shouldDestroy) {\n this.removeView(view);\n } else {\n this._detachView(view);\n }\n view._isShown = false;\n this._stopChildViewEvents(view);\n }\n\n this.triggerMethod('empty', this, view);\n },\n\n _stopChildViewEvents(view) {\n const parentView = this._parentView;\n\n if (!parentView) { return; }\n\n this._parentView.stopListening(view);\n },\n\n // Non-Marionette safe view.destroy\n destroyView(view) {\n if (view._isDestroyed) {\n return view;\n }\n\n destroyView(view, this._shouldDisableMonitoring());\n return view;\n },\n\n // Override this method to determine what happens when the view\n // is removed from the region when the view is not being detached\n removeView(view) {\n this.destroyView(view);\n },\n\n // Empties the Region without destroying the view\n // Returns the detached view\n detachView() {\n const view = this.currentView;\n\n if (!view) {\n return;\n }\n\n this._empty(view);\n\n return view;\n },\n\n _detachView(view) {\n const shouldTriggerDetach = view._isAttached && !this._shouldDisableMonitoring();\n const shouldRestoreEl = this._isReplaced;\n if (shouldTriggerDetach) {\n view.triggerMethod('before:detach', view);\n }\n\n if (shouldRestoreEl) {\n this.Dom.replaceEl(this.el, view.el);\n } else {\n this.detachHtml();\n }\n\n if (shouldTriggerDetach) {\n view._isAttached = false;\n view.triggerMethod('detach', view);\n }\n },\n\n // Override this method to change how the region detaches current content\n detachHtml() {\n this.Dom.detachContents(this.el);\n },\n\n // Checks whether a view is currently present within the region. Returns `true` if there is\n // and `false` if no view is present.\n hasView() {\n return !!this.currentView;\n },\n\n // Reset the region by destroying any existing view and clearing out the cached `$el`.\n // The next time a view is shown via this region, the region will re-query the DOM for\n // the region's `el`.\n reset(options) {\n this.empty(options);\n\n this.el = this._initEl;\n\n delete this.$el;\n return this;\n },\n\n _isDestroyed: false,\n\n isDestroyed() {\n return this._isDestroyed;\n },\n\n // Destroy the region, remove any child view\n // and remove the region from any associated view\n destroy(options) {\n if (this._isDestroyed) { return this; }\n\n this.triggerMethod('before:destroy', this, options);\n this._isDestroyed = true;\n\n this.reset(options);\n\n if (this._name) {\n this._parentView._removeReferences(this._name);\n }\n delete this._parentView;\n delete this._name;\n\n this.triggerMethod('destroy', this, options);\n this.stopListening();\n\n return this;\n }\n});\n\nexport default Region;\n","import _ from 'underscore';\nimport MarionetteError from '../utils/error';\nimport Region from '../region';\n\n// return the region instance from the definition\nexport default function(definition, defaults) {\n if (definition instanceof Region) {\n return definition;\n }\n\n if (_.isString(definition)) {\n return buildRegionFromObject(defaults, { el: definition });\n }\n\n if (_.isFunction(definition)) {\n return buildRegionFromObject(defaults, { regionClass: definition });\n }\n\n if (_.isObject(definition)) {\n return buildRegionFromObject(defaults, definition);\n }\n\n throw new MarionetteError({\n message: 'Improper region configuration type.',\n url: 'marionette.region.html#defining-regions'\n });\n}\n\nfunction buildRegionFromObject(defaults, definition) {\n const options = _.extend({}, defaults, definition);\n\n const RegionClass = options.regionClass\n\n delete options.regionClass;\n\n return new RegionClass(options);\n}\n","import _ from 'underscore';\nimport _invoke from '../utils/invoke';\nimport buildRegion from '../common/build-region';\nimport Region from '../region';\n\n// MixinOptions\n// - regions\n// - regionClass\n\nexport default {\n regionClass: Region,\n\n // Internal method to initialize the regions that have been defined in a\n // `regions` attribute on this View.\n _initRegions() {\n\n // init regions hash\n this.regions = this.regions || {};\n this._regions = {};\n\n this.addRegions(_.result(this, 'regions'));\n },\n\n // Internal method to re-initialize all of the regions by updating\n // the `el` that they point to\n _reInitRegions() {\n _invoke(this._regions, 'reset');\n },\n\n // Add a single region, by name, to the View\n addRegion(name, definition) {\n const regions = {};\n regions[name] = definition;\n return this.addRegions(regions)[name];\n },\n\n // Add multiple regions as a {name: definition, name2: def2} object literal\n addRegions(regions) {\n // If there's nothing to add, stop here.\n if (_.isEmpty(regions)) {\n return;\n }\n\n // Normalize region selectors hash to allow\n // a user to use the @ui. syntax.\n regions = this.normalizeUIValues(regions, 'el');\n\n // Add the regions definitions to the regions property\n this.regions = _.extend({}, this.regions, regions);\n\n return this._addRegions(regions);\n },\n\n // internal method to build and add regions\n _addRegions(regionDefinitions) {\n const defaults = {\n regionClass: this.regionClass,\n parentEl: _.partial(_.result, this, 'el')\n };\n\n return _.reduce(regionDefinitions, (regions, definition, name) => {\n regions[name] = buildRegion(definition, defaults);\n this._addRegion(regions[name], name);\n return regions;\n }, {});\n },\n\n _addRegion(region, name) {\n this.triggerMethod('before:add:region', this, name, region);\n\n region._parentView = this;\n region._name = name;\n\n this._regions[name] = region;\n\n this.triggerMethod('add:region', this, name, region);\n },\n\n // Remove a single region from the View, by name\n removeRegion(name) {\n const region = this._regions[name];\n\n this._removeRegion(region, name);\n\n return region;\n },\n\n // Remove all regions from the View\n removeRegions() {\n const regions = this._getRegions();\n\n _.each(this._regions, this._removeRegion.bind(this));\n\n return regions;\n },\n\n _removeRegion(region, name) {\n this.triggerMethod('before:remove:region', this, name, region);\n\n region.destroy();\n\n this.triggerMethod('remove:region', this, name, region);\n },\n\n // Called in a region's destroy\n _removeReferences(name) {\n delete this.regions[name];\n delete this._regions[name];\n },\n\n // Empty all regions in the region manager, but\n // leave them attached\n emptyRegions() {\n const regions = this.getRegions();\n _invoke(regions, 'empty');\n return regions;\n },\n\n // Checks to see if view contains region\n // Accepts the region name\n // hasRegion('main')\n hasRegion(name) {\n return !!this.getRegion(name);\n },\n\n // Provides access to regions\n // Accepts the region name\n // getRegion('main')\n getRegion(name) {\n if (!this._isRendered) {\n this.render();\n }\n return this._regions[name];\n },\n\n _getRegions() {\n return _.clone(this._regions);\n },\n\n // Get all regions\n getRegions() {\n if (!this._isRendered) {\n this.render();\n }\n return this._getRegions();\n },\n\n showChildView(name, view, options) {\n const region = this.getRegion(name);\n region.show(view, options);\n return view;\n },\n\n detachChildView(name) {\n return this.getRegion(name).detachView();\n },\n\n getChildView(name) {\n return this.getRegion(name).currentView;\n }\n\n};\n","// Static setter for the renderer\nexport function setRenderer(renderer) {\n this.prototype._renderHtml = renderer;\n return this;\n}\n","// View\n// ---------\n\nimport { extend as _extend, uniqueId, reduce } from 'underscore';\nimport extend from './utils/extend';\nimport monitorViewEvents from './common/monitor-view-events';\nimport ViewMixin from './mixins/view';\nimport RegionsMixin from './mixins/regions';\nimport { setDomApi } from './config/dom';\nimport { setEventDelegator } from './config/event-delegator';\nimport { setRenderer } from './config/renderer';\n\nconst ClassOptions = [\n 'attributes',\n 'behaviors',\n 'childViewEventPrefix',\n 'childViewEvents',\n 'childViewTriggers',\n 'className',\n 'collection',\n 'collectionEvents',\n 'el',\n 'events',\n 'id',\n 'model',\n 'modelEvents',\n 'regionClass',\n 'regions',\n 'tagName',\n 'template',\n 'templateContext',\n 'triggers',\n 'ui'\n];\n\n// Used by _getImmediateChildren\nfunction childReducer(children, region) {\n if (region.currentView) {\n children.push(region.currentView);\n }\n\n return children;\n}\n\n// The standard view. Includes view events, automatic rendering\n// templates, nested views, and more.\nconst View = function(options) {\n this.cid = uniqueId(this.cidPrefix);\n this._setOptions(options, ClassOptions);\n\n this.preinitialize.apply(this, arguments);\n\n this._initViewEvents();\n this.setElement(this._getEl());\n\n monitorViewEvents(this);\n\n this._initBehaviors();\n this._initRegions();\n this._buildEventProxies();\n\n this.initialize.apply(this, arguments);\n\n this.delegateEntityEvents();\n\n this._triggerEventOnBehaviors('initialize', this, options);\n};\n\n_extend(View, { extend, setRenderer, setDomApi, setEventDelegator });\n\n_extend(View.prototype, ViewMixin, RegionsMixin, {\n cidPrefix: 'mnv',\n\n setElement(element) {\n this._undelegateViewEvents();\n this.el = element;\n this._setBehaviorElements();\n\n this._isRendered = this.Dom.hasContents(this.el);\n this._isAttached = this._isElAttached();\n\n if (this._isRendered) {\n this.bindUIElements();\n }\n\n this._delegateViewEvents();\n\n return this;\n },\n\n // If a template is available, renders it into the view's `el`\n // Re-inits regions and binds UI.\n render() {\n const template = this.getTemplate();\n\n if (template === false || this._isDestroyed) { return this; }\n\n this.triggerMethod('before:render', this);\n\n // If this is not the first render call, then we need to\n // re-initialize the `el` for each region\n if (this._isRendered) {\n this._reInitRegions();\n }\n\n this._renderTemplate(template);\n this.bindUIElements();\n\n this._isRendered = true;\n this.triggerMethod('render', this);\n\n return this;\n },\n\n // called by ViewMixin destroy\n _removeChildren() {\n this.removeRegions();\n },\n\n _getImmediateChildren() {\n return reduce(this._regions, childReducer, []);\n }\n});\n\nexport default View;\n","import _ from 'underscore';\n\n// Provide a container to store, retrieve and\n// shut down child views.\nconst Container = function() {\n this._init();\n};\n\n// Mix in methods from Underscore, for iteration, and other\n// collection related features.\n// Borrowing this code from Backbone.Collection:\n// https://github.com/jashkenas/backbone/blob/1.1.2/backbone.js#L962\nconst methods = ['forEach', 'each', 'map', 'find', 'detect', 'filter',\n 'select', 'reject', 'every', 'all', 'some', 'any', 'include',\n 'contains', 'invoke', 'toArray', 'first', 'initial', 'rest',\n 'last', 'without', 'isEmpty', 'pluck', 'reduce', 'partition'];\n\n_.each(methods, function(method) {\n Container.prototype[method] = function(...args) {\n return _[method].apply(_, [this._views].concat(args));\n };\n});\n\nfunction stringComparator(comparator, view) {\n return view.model && view.model.get(comparator);\n}\n\n// Container Methods\n// -----------------\n\n_.extend(Container.prototype, {\n\n // Initializes an empty container\n _init() {\n this._views = [];\n this._viewsByCid = {};\n this._indexByModel = {};\n this._updateLength();\n },\n\n // Add a view to this container. Stores the view\n // by `cid` and makes it searchable by the model\n // cid (and model itself). Additionally it stores\n // the view by index in the _views array\n _add(view, index = this._views.length) {\n this._addViewIndexes(view);\n\n // add to end by default\n this._views.splice(index, 0, view);\n\n this._updateLength();\n },\n\n _addViewIndexes(view) {\n // store the view\n this._viewsByCid[view.cid] = view;\n\n // index it by model\n if (view.model) {\n this._indexByModel[view.model.cid] = view;\n }\n },\n\n // Sort (mutate) and return the array of the child views.\n _sort(comparator, context) {\n if (typeof comparator === 'string') {\n comparator = _.partial(stringComparator, comparator);\n return this._sortBy(comparator);\n }\n\n if (comparator.length === 1) {\n return this._sortBy(comparator.bind(context));\n }\n\n return this._views.sort(comparator.bind(context));\n },\n\n // Makes `_.sortBy` mutate the array to match `this._views.sort`\n _sortBy(comparator) {\n const sortedViews = _.sortBy(this._views, comparator);\n\n this._set(sortedViews);\n\n return sortedViews;\n },\n\n // Replace array contents without overwriting the reference.\n // Should not add/remove views\n _set(views, shouldReset) {\n this._views.length = 0;\n\n this._views.push.apply(this._views, views.slice(0));\n\n if (shouldReset) {\n this._viewsByCid = {};\n this._indexByModel = {};\n\n _.each(views, this._addViewIndexes.bind(this));\n\n this._updateLength();\n }\n },\n\n // Swap views by index\n _swap(view1, view2) {\n const view1Index = this.findIndexByView(view1);\n const view2Index = this.findIndexByView(view2);\n\n if (view1Index === -1 || view2Index === -1) {\n return;\n }\n\n const swapView = this._views[view1Index];\n this._views[view1Index] = this._views[view2Index];\n this._views[view2Index] = swapView;\n },\n\n // Find a view by the model that was attached to it.\n // Uses the model's `cid` to find it.\n findByModel(model) {\n return this.findByModelCid(model.cid);\n },\n\n // Find a view by the `cid` of the model that was attached to it.\n findByModelCid(modelCid) {\n return this._indexByModel[modelCid];\n },\n\n // Find a view by index.\n findByIndex(index) {\n return this._views[index];\n },\n\n // Find the index of a view instance\n findIndexByView(view) {\n return this._views.indexOf(view);\n },\n\n // Retrieve a view by its `cid` directly\n findByCid(cid) {\n return this._viewsByCid[cid];\n },\n\n hasView(view) {\n return !!this.findByCid(view.cid);\n },\n\n // Remove a view and clean up index references.\n _remove(view) {\n if (!this._viewsByCid[view.cid]) {\n return;\n }\n\n // delete model index\n if (view.model) {\n delete this._indexByModel[view.model.cid];\n }\n\n // remove the view from the container\n delete this._viewsByCid[view.cid];\n\n const index = this.findIndexByView(view);\n this._views.splice(index, 1);\n\n this._updateLength();\n },\n\n // Update the `.length` attribute on this container\n _updateLength() {\n this.length = this._views.length;\n }\n});\n\nexport default Container;\n","// Collection View\n// ---------------\n\nimport { extend as _extend, uniqueId, result, map, isFunction, isObject, isString, matches, each, reduce } from 'underscore';\nimport extend from './utils/extend';\nimport MarionetteError from './utils/error';\nimport { renderView, destroyView, isViewClass } from './common/view';\nimport monitorViewEvents from './common/monitor-view-events';\nimport ChildViewContainer from './child-view-container';\nimport Region from './region';\nimport ViewMixin from './mixins/view';\nimport { setDomApi } from './config/dom';\nimport { setEventDelegator } from './config/event-delegator';\nimport { setRenderer } from './config/renderer';\n\nconst classErrorName = 'CollectionViewError';\n\nconst ClassOptions = [\n 'attributes',\n 'behaviors',\n 'childView',\n 'childViewContainer',\n 'childViewEventPrefix',\n 'childViewEvents',\n 'childViewOptions',\n 'childViewTriggers',\n 'className',\n 'collection',\n 'collectionEvents',\n 'el',\n 'emptyView',\n 'emptyViewOptions',\n 'events',\n 'id',\n 'model',\n 'modelEvents',\n 'sortWithCollection',\n 'tagName',\n 'template',\n 'templateContext',\n 'triggers',\n 'ui',\n 'viewComparator',\n 'viewFilter'\n];\n\n// A view that iterates over a Backbone.Collection\n// and renders an individual child view for each model.\nconst CollectionView = function(options) {\n this.cid = uniqueId(this.cidPrefix);\n this._setOptions(options, ClassOptions);\n\n this.preinitialize.apply(this, arguments);\n\n this._initViewEvents();\n this.setElement(this._getEl());\n\n monitorViewEvents(this);\n\n this._initChildViewStorage();\n this._initBehaviors();\n this._buildEventProxies();\n\n // Init empty region\n this.getEmptyRegion();\n\n this.initialize.apply(this, arguments);\n\n this.delegateEntityEvents();\n\n this._triggerEventOnBehaviors('initialize', this, options);\n};\n\n_extend(CollectionView, { extend, setRenderer, setDomApi, setEventDelegator });\n\n_extend(CollectionView.prototype, ViewMixin, {\n cidPrefix: 'mncv',\n\n // flag for maintaining the sorted order of the collection\n sortWithCollection: true,\n\n // Internal method to set up the `children` object for storing all of the child views\n // `_children` represents all child views\n // `children` represents only views filtered to be shown\n _initChildViewStorage() {\n this._children = new ChildViewContainer();\n this.children = new ChildViewContainer();\n },\n\n // Create an region to show the emptyView\n getEmptyRegion() {\n const emptyEl = this.container || this.el;\n\n if (this._emptyRegion && !this._emptyRegion.isDestroyed()) {\n this._emptyRegion._setElement(emptyEl);\n return this._emptyRegion;\n }\n\n this._emptyRegion = new Region({ el: emptyEl, replaceElement: false });\n\n this._emptyRegion._parentView = this;\n\n return this._emptyRegion;\n },\n\n // Configured the initial events that the collection view binds to.\n _initialEvents() {\n if (this._isRendered) { return; }\n\n this.listenTo(this.collection, {\n 'sort': this._onCollectionSort,\n 'reset': this._onCollectionReset,\n 'update': this._onCollectionUpdate\n });\n },\n\n // Internal method. This checks for any changes in the order of the collection.\n // If the index of any view doesn't match, it will re-sort.\n _onCollectionSort(collection, { add, merge, remove }) {\n if (!this.sortWithCollection || this.viewComparator === false) {\n return;\n }\n\n // If the data is changing we will handle the sort later in `_onCollectionUpdate`\n if (add || remove || merge) {\n return;\n }\n\n // If the only thing happening here is sorting, sort.\n this.sort();\n },\n\n _onCollectionReset() {\n this._destroyChildren();\n\n this._addChildModels(this.collection.models);\n\n this.sort();\n },\n\n // Handle collection update model additions and removals\n _onCollectionUpdate(collection, options) {\n const changes = options.changes;\n\n // Remove first since it'll be a shorter array lookup.\n const removedViews = changes.removed.length && this._removeChildModels(changes.removed);\n\n this._addedViews = changes.added.length && this._addChildModels(changes.added);\n\n this._detachChildren(removedViews);\n\n this.sort();\n\n // Destroy removed child views after all of the render is complete\n this._removeChildViews(removedViews);\n },\n\n _removeChildModels(models) {\n return reduce(models, (views, model) => {\n const removeView = this._removeChildModel(model);\n\n if (removeView) { views.push(removeView); }\n\n return views;\n }, []);\n },\n\n _removeChildModel(model) {\n const view = this._children.findByModel(model);\n\n if (view) { this._removeChild(view); }\n\n return view;\n },\n\n _removeChild(view) {\n this.triggerMethod('before:remove:child', this, view);\n\n this.children._remove(view);\n this._children._remove(view);\n\n this.triggerMethod('remove:child', this, view);\n },\n\n // Added views are returned for consistency with _removeChildModels\n _addChildModels(models) {\n return map(models, this._addChildModel.bind(this));\n },\n\n _addChildModel(model) {\n const view = this._createChildView(model);\n\n this._addChild(view);\n\n return view;\n },\n\n _createChildView(model) {\n const ChildView = this._getChildView(model);\n const childViewOptions = this._getChildViewOptions(model);\n const view = this.buildChildView(model, ChildView, childViewOptions);\n\n return view;\n },\n\n _addChild(view, index) {\n this.triggerMethod('before:add:child', this, view);\n\n this._setupChildView(view);\n this._children._add(view, index);\n this.children._add(view, index);\n\n this.triggerMethod('add:child', this, view);\n },\n\n // Retrieve the `childView` class\n // The `childView` property can be either a view class or a function that\n // returns a view class. If it is a function, it will receive the model that\n // will be passed to the view instance (created from the returned view class)\n _getChildView(child) {\n let childView = this.childView;\n\n if (!childView) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'A \"childView\" must be specified',\n url: 'marionette.collectionview.html#collectionviews-childview'\n });\n }\n\n childView = this._getView(childView, child);\n\n if (!childView) {\n throw new MarionetteError({\n name: classErrorName,\n message: '\"childView\" must be a view class or a function that returns a view class',\n url: 'marionette.collectionview.html#collectionviews-childview'\n });\n }\n\n return childView;\n },\n\n // First check if the `view` is a view class (the common case)\n // Then check if it's a function (which we assume that returns a view class)\n _getView(view, child) {\n if (isViewClass(view)) {\n return view;\n } else if (isFunction(view)) {\n return view.call(this, child);\n }\n },\n\n _getChildViewOptions(child) {\n if (isFunction(this.childViewOptions)) {\n return this.childViewOptions(child);\n }\n\n return this.childViewOptions;\n },\n\n // Build a `childView` for a model in the collection.\n // Override to customize the build\n buildChildView(child, ChildViewClass, childViewOptions) {\n const options = _extend({model: child}, childViewOptions);\n return new ChildViewClass(options);\n },\n\n _setupChildView(view) {\n monitorViewEvents(view);\n\n // We need to listen for if a view is destroyed in a way other\n // than through the CollectionView.\n // If this happens we need to remove the reference to the view\n // since once a view has been destroyed we can not reuse it.\n view.on('destroy', this.removeChildView, this);\n\n // set up the child view event forwarding\n this._proxyChildViewEvents(view);\n },\n\n // used by ViewMixin's `_childViewEventHandler`\n _getImmediateChildren() {\n return this.children._views;\n },\n\n // Overriding Backbone.View's `setElement` to handle\n // if an el was previously defined. If so, the view might be\n // attached on setElement.\n setElement(element) {\n this._undelegateViewEvents();\n this.el = element;\n this._setBehaviorElements();\n\n this._isAttached = this._isElAttached();\n\n this._delegateViewEvents();\n\n return this;\n },\n\n // Render children views.\n render() {\n if (this._isDestroyed) { return this; }\n this.triggerMethod('before:render', this);\n\n this._destroyChildren();\n\n if (this.collection) {\n this._addChildModels(this.collection.models);\n this._initialEvents();\n }\n\n const template = this.getTemplate();\n\n if (template) {\n this._renderTemplate(template);\n this.bindUIElements();\n }\n this._getChildViewContainer();\n this.sort();\n\n this._isRendered = true;\n\n this.triggerMethod('render', this);\n return this;\n },\n\n // Get a container within the template to add the children within\n _getChildViewContainer() {\n const childViewContainer = result(this, 'childViewContainer');\n this.container = childViewContainer ? this.$(childViewContainer)[0] : this.el;\n\n if (!this.container) {\n throw new MarionetteError({\n name: classErrorName,\n message: `The specified \"childViewContainer\" was not found: ${childViewContainer}`,\n url: 'marionette.collectionview.html#defining-the-childviewcontainer'\n });\n }\n },\n\n // Sorts the children then filters and renders the results.\n sort() {\n this._sortChildren();\n\n this.filter();\n\n return this;\n },\n\n // Sorts views by viewComparator and sets the children to the new order\n _sortChildren() {\n if (!this._children.length) { return; }\n\n let viewComparator = this.getComparator();\n\n if (!viewComparator) { return; }\n\n // If children are sorted prevent added to end perf\n delete this._addedViews;\n\n this.triggerMethod('before:sort', this);\n\n this._children._sort(viewComparator, this);\n\n this.triggerMethod('sort', this);\n },\n\n // Sets the view's `viewComparator` and applies the sort if the view is ready.\n // To prevent the render pass `{ preventRender: true }` as the 2nd argument.\n setComparator(comparator, {preventRender} = {}) {\n const comparatorChanged = this.viewComparator !== comparator;\n const shouldSort = comparatorChanged && !preventRender;\n\n this.viewComparator = comparator;\n\n if (shouldSort) {\n this.sort();\n }\n\n return this;\n },\n\n // Clears the `viewComparator` and follows the same rules for rendering as `setComparator`.\n removeComparator(options) {\n return this.setComparator(null, options);\n },\n\n // If viewComparator is overridden it will be returned here.\n // Additionally override this function to provide custom\n // viewComparator logic\n getComparator() {\n if (this.viewComparator) { return this.viewComparator }\n\n if (!this.sortWithCollection || this.viewComparator === false || !this.collection) {\n return false;\n }\n\n return this._viewComparator;\n },\n\n // Default internal view comparator that order the views by\n // the order of the collection\n _viewComparator(view) {\n return this.collection.indexOf(view.model);\n },\n\n // This method filters the children views and renders the results\n filter() {\n if (this._isDestroyed) { return this; }\n\n this._filterChildren();\n\n this._renderChildren();\n\n return this;\n },\n\n _filterChildren() {\n if (!this._children.length) { return; }\n\n const viewFilter = this._getFilter();\n\n if (!viewFilter) {\n const shouldReset = this.children.length !== this._children.length;\n\n this.children._set(this._children._views, shouldReset);\n\n return;\n }\n\n // If children are filtered prevent added to end perf\n delete this._addedViews;\n\n this.triggerMethod('before:filter', this);\n\n const attachViews = [];\n const detachViews = [];\n\n each(this._children._views, (view, key, children) => {\n (viewFilter.call(this, view, key, children) ? attachViews : detachViews).push(view);\n });\n\n this._detachChildren(detachViews);\n\n // reset children\n this.children._set(attachViews, true);\n\n this.triggerMethod('filter', this, attachViews, detachViews);\n },\n\n // This method returns a function for the viewFilter\n _getFilter() {\n const viewFilter = this.getFilter();\n\n if (!viewFilter) { return false; }\n\n if (isFunction(viewFilter)) {\n return viewFilter;\n }\n\n // Support filter predicates `{ fooFlag: true }`\n if (isObject(viewFilter)) {\n const matcher = matches(viewFilter);\n return function(view) {\n return matcher(view.model && view.model.attributes);\n };\n }\n\n // Filter by model attribute\n if (isString(viewFilter)) {\n return function(view) {\n return view.model && view.model.get(viewFilter);\n };\n }\n\n throw new MarionetteError({\n name: classErrorName,\n message: '\"viewFilter\" must be a function, predicate object literal, a string indicating a model attribute, or falsy',\n url: 'marionette.collectionview.html#defining-the-viewfilter'\n });\n },\n\n // Override this function to provide custom\n // viewFilter logic\n getFilter() {\n return this.viewFilter;\n },\n\n // Sets the view's `viewFilter` and applies the filter if the view is ready.\n // To prevent the render pass `{ preventRender: true }` as the 2nd argument.\n setFilter(filter, {preventRender} = {}) {\n const filterChanged = this.viewFilter !== filter;\n const shouldRender = filterChanged && !preventRender;\n\n this.viewFilter = filter;\n\n if (shouldRender) {\n this.filter();\n }\n\n return this;\n },\n\n // Clears the `viewFilter` and follows the same rules for rendering as `setFilter`.\n removeFilter(options) {\n return this.setFilter(null, options);\n },\n\n _detachChildren(detachingViews) {\n each(detachingViews, this._detachChildView.bind(this));\n },\n\n _detachChildView(view) {\n const shouldTriggerDetach = view._isAttached && this.monitorViewEvents !== false;\n if (shouldTriggerDetach) {\n view.triggerMethod('before:detach', view);\n }\n\n this.detachHtml(view);\n\n if (shouldTriggerDetach) {\n view._isAttached = false;\n view.triggerMethod('detach', view);\n }\n\n view._isShown = false;\n },\n\n // Override this method to change how the collectionView detaches a child view\n detachHtml(view) {\n this.Dom.detachEl(view.el);\n },\n\n _renderChildren() {\n // If there are unrendered views prevent add to end perf\n if (this._hasUnrenderedViews) {\n delete this._addedViews;\n delete this._hasUnrenderedViews;\n }\n\n const views = this._addedViews || this.children._views;\n\n this.triggerMethod('before:render:children', this, views);\n\n if (this.isEmpty()) {\n this._showEmptyView();\n } else {\n this._destroyEmptyView();\n\n const els = this._getBuffer(views);\n\n this._attachChildren(els, views);\n }\n\n delete this._addedViews;\n\n this.triggerMethod('render:children', this, views);\n },\n\n // Renders each view and creates a fragment buffer from them\n _getBuffer(views) {\n const elBuffer = this.Dom.createBuffer();\n\n each(views, view => {\n renderView(view);\n // corresponds that view is shown in a Region or CollectionView\n view._isShown = true;\n this.Dom.appendContents(elBuffer, view.el);\n });\n\n return elBuffer;\n },\n\n _attachChildren(els, views) {\n const shouldTriggerAttach = this._isAttached && this.monitorViewEvents !== false;\n\n views = shouldTriggerAttach ? views : [];\n\n each(views, view => {\n if (view._isAttached) { return; }\n view.triggerMethod('before:attach', view);\n });\n\n this.attachHtml(els, this.container);\n\n each(views, view => {\n if (view._isAttached) { return; }\n view._isAttached = true;\n view.triggerMethod('attach', view);\n });\n },\n\n // Override this method to do something other than `.append`.\n // You can attach any HTML at this point including the els.\n attachHtml(els, container) {\n this.Dom.appendContents(container, els);\n },\n\n isEmpty() {\n return !this.children.length;\n },\n\n _showEmptyView() {\n const EmptyView = this._getEmptyView();\n\n if (!EmptyView) {\n return;\n }\n\n const options = this._getEmptyViewOptions();\n\n const emptyRegion = this.getEmptyRegion();\n\n emptyRegion.show(new EmptyView(options));\n },\n\n // Retrieve the empty view class\n _getEmptyView() {\n const emptyView = this.emptyView;\n\n if (!emptyView) { return; }\n\n return this._getView(emptyView);\n },\n\n // Remove the emptyView\n _destroyEmptyView() {\n const emptyRegion = this.getEmptyRegion();\n // Only empty if a view is show so the region\n // doesn't detach any other unrelated HTML\n if (emptyRegion.hasView()) {\n emptyRegion.empty();\n }\n },\n\n //\n _getEmptyViewOptions() {\n const emptyViewOptions = this.emptyViewOptions || this.childViewOptions;\n\n if (isFunction(emptyViewOptions)) {\n return emptyViewOptions.call(this);\n }\n\n return emptyViewOptions;\n },\n\n swapChildViews(view1, view2) {\n if (!this._children.hasView(view1) || !this._children.hasView(view2)) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'Both views must be children of the collection view to swap.',\n url: 'marionette.collectionview.html#swapping-child-views'\n });\n }\n\n this._children._swap(view1, view2);\n this.Dom.swapEl(view1.el, view2.el);\n\n // If the views are not filtered the same, refilter\n if (this.children.hasView(view1) !== this.children.hasView(view2)) {\n this.filter();\n } else {\n this.children._swap(view1, view2);\n }\n\n return this;\n },\n\n // Render the child's view and add it to the HTML for the collection view at a given index, based on the current sort\n addChildView(view, index, options = {}) {\n if (!view || view._isDestroyed) {\n return view;\n }\n\n if (view._isShown) {\n throw new MarionetteError({\n name: classErrorName,\n message: 'View is already shown in a Region or CollectionView',\n url: 'marionette.region.html#showing-a-view'\n });\n }\n\n if (isObject(index)) {\n options = index;\n }\n\n // If options has defined index we should use it\n if (options.index != null) {\n index = options.index;\n }\n\n if (!this._isRendered) {\n this.render();\n }\n\n this._addChild(view, index);\n\n if (options.preventRender) {\n this._hasUnrenderedViews = true;\n return view;\n }\n\n const hasIndex = (typeof index !== 'undefined');\n const isAddedToEnd = !hasIndex || index >= this._children.length;\n\n // Only cache views if added to the end and there is no unrendered views\n if (isAddedToEnd && !this._hasUnrenderedViews) {\n this._addedViews = [view];\n }\n\n if (hasIndex) {\n this._renderChildren();\n } else {\n this.sort();\n }\n\n return view;\n },\n\n // Detach a view from the children. Best used when adding a\n // childView from `addChildView`\n detachChildView(view) {\n this.removeChildView(view, { shouldDetach: true });\n\n return view;\n },\n\n // Remove the child view and destroy it. Best used when adding a\n // childView from `addChildView`\n // The options argument is for internal use only\n removeChildView(view, options) {\n if (!view) {\n return view;\n }\n\n this._removeChildView(view, options);\n\n this._removeChild(view);\n\n if (this.isEmpty()) {\n this._showEmptyView();\n }\n\n return view;\n },\n\n _removeChildViews(views) {\n each(views, this._removeChildView.bind(this));\n },\n\n _removeChildView(view, {shouldDetach} = {}) {\n view.off('destroy', this.removeChildView, this);\n\n if (shouldDetach) {\n this._detachChildView(view);\n } else {\n this._destroyChildView(view);\n }\n\n this.stopListening(view);\n },\n\n _destroyChildView(view) {\n if (view._isDestroyed) {\n return;\n }\n\n const shouldDisableEvents = this.monitorViewEvents === false;\n destroyView(view, shouldDisableEvents);\n },\n\n // called by ViewMixin destroy\n _removeChildren() {\n this._destroyChildren();\n const emptyRegion = this.getEmptyRegion();\n emptyRegion.destroy();\n delete this._addedViews;\n },\n\n // Destroy the child views that this collection view is holding on to, if any\n _destroyChildren() {\n if (!this._children.length) {\n return;\n }\n\n this.triggerMethod('before:destroy:children', this);\n if (this.monitorViewEvents === false) {\n this.Dom.detachContents(this.el);\n }\n\n this._removeChildViews(this._children._views);\n\n // After all children have been destroyed re-init the container\n this._children._init();\n this.children._init();\n\n this.triggerMethod('destroy:children', this);\n }\n});\n\n\nexport default CollectionView;\n","// Behavior\n// --------\n\n// A Behavior is an isolated set of DOM /\n// user interactions that can be mixed into any View.\n// Behaviors allow you to blackbox View specific interactions\n// into portable logical chunks, keeping your views simple and your code DRY.\n\nimport { extend as _extend, uniqueId, result } from 'underscore';\nimport extend from './utils/extend';\nimport CommonMixin from './mixins/common';\nimport DelegateEntityEventsMixin from './mixins/delegate-entity-events';\nimport UIMixin from './mixins/ui';\nimport ViewEventsMixin from './mixins/view-events';\n\nconst ClassOptions = [\n 'collectionEvents',\n 'events',\n 'modelEvents',\n 'triggers',\n 'ui'\n];\n\nconst Behavior = function(options, view) {\n // Setup reference to the view.\n // this comes in handle when a behavior\n // wants to directly talk up the chain\n // to the view.\n this.view = view;\n\n\n this._setOptions(options, ClassOptions);\n this.cid = uniqueId(this.cidPrefix);\n\n this._initViewEvents();\n this.setElement();\n\n // Construct an internal UI hash using the behaviors UI\n // hash combined and overridden by the view UI hash.\n // This allows the user to use UI hash elements defined\n // in the parent view as well as those defined in the behavior.\n // This order will help the reuse and share of a behavior\n // between multiple views, while letting a view override\n // a selector under an UI key.\n this.ui = _extend({}, result(this, 'ui'), result(view, 'ui'));\n\n // Proxy view triggers\n this.listenTo(view, 'all', this.triggerMethod);\n\n this.initialize.apply(this, arguments);\n};\n\nBehavior.extend = extend;\n\n// Behavior Methods\n// --------------\n\n_extend(Behavior.prototype, CommonMixin, DelegateEntityEventsMixin, UIMixin, ViewEventsMixin, {\n cidPrefix: 'mnb',\n\n // proxy behavior $ method to the view\n // this is useful for doing jquery DOM lookups\n // scoped to behaviors view.\n $() {\n return this.view.$.apply(this.view, arguments);\n },\n\n // Stops the behavior from listening to events.\n destroy() {\n this._undelegateViewEvents();\n\n this.stopListening();\n\n this.view._removeBehavior(this);\n\n this._deleteEntityEventHandlers();\n\n return this;\n },\n\n setElement() {\n this._undelegateViewEvents();\n\n this.el = this.view.el;\n\n this._delegateViewEvents(this.view);\n\n return this;\n },\n\n bindUIElements() {\n this._bindUIElements();\n\n return this;\n },\n\n unbindUIElements() {\n this._unbindUIElements();\n\n return this;\n },\n\n getUI(name) {\n return this._getUI(name);\n },\n\n // Handle `modelEvents`, and `collectionEvents` configuration\n delegateEntityEvents() {\n this._delegateEntityEvents(this.view.model, this.view.collection);\n\n return this;\n },\n\n undelegateEntityEvents() {\n this._undelegateEntityEvents(this.view.model, this.view.collection);\n\n return this;\n }\n});\n\nexport default Behavior;\n","// Application\n// -----------\n\nimport _ from 'underscore';\nimport extend from './utils/extend';\nimport buildRegion from './common/build-region';\nimport CommonMixin from './mixins/common';\nimport DestroyMixin from './mixins/destroy';\nimport RadioMixin from './mixins/radio';\nimport Region from './region';\n\nconst ClassOptions = [\n 'channelName',\n 'radioEvents',\n 'radioRequests',\n 'region',\n 'regionClass'\n];\n\nconst Application = function(options) {\n this._setOptions(options, ClassOptions);\n this.cid = _.uniqueId(this.cidPrefix);\n this._initRegion();\n this._initRadio();\n this.initialize.apply(this, arguments);\n};\n\nApplication.extend = extend;\n\n// Application Methods\n// --------------\n\n_.extend(Application.prototype, CommonMixin, DestroyMixin, RadioMixin, {\n cidPrefix: 'mna',\n\n // This is a noop method intended to be overridden\n initialize() {},\n\n // Kick off all of the application's processes.\n start(options) {\n this.triggerMethod('before:start', this, options);\n this.triggerMethod('start', this, options);\n return this;\n },\n\n regionClass: Region,\n\n _initRegion() {\n const region = this.region;\n\n if (!region) { return; }\n\n const defaults = {\n regionClass: this.regionClass\n };\n\n this._region = buildRegion(region, defaults);\n },\n\n getRegion() {\n return this._region;\n },\n\n showView(view, ...args) {\n const region = this.getRegion();\n region.show(view, ...args);\n return view;\n },\n\n getView() {\n return this.getRegion().currentView;\n }\n});\n\nexport default Application;\n","import {version as VERSION} from '../package.json';\n\nimport proxy from './utils/proxy';\nimport extend from './utils/extend';\n\nimport {\n bindEvents as _bindEvents,\n unbindEvents as _unbindEvents\n} from './common/bind-events';\nimport {\n bindRequests as _bindRequests,\n unbindRequests as _unbindRequests\n} from './common/bind-requests';\nimport _getOption from './common/get-option';\nimport _mergeOptions from './common/merge-options';\nimport monitorViewEvents from './common/monitor-view-events';\nimport _normalizeMethods from './common/normalize-methods';\nimport _triggerMethod from './common/trigger-method';\n\nimport Events from './mixins/events';\n\nimport MnObject from './object';\nimport View from './view';\nimport CollectionView from './collection-view';\nimport Behavior from './behavior';\nimport Region from './region';\nimport Application from './application';\n\nimport DomApi from './config/dom';\n\nimport {\n isEnabled,\n setEnabled\n} from './config/features';\n\n// Utilities\n\nexport const bindEvents = proxy(_bindEvents);\nexport const unbindEvents = proxy(_unbindEvents);\nexport const bindRequests = proxy(_bindRequests);\nexport const unbindRequests = proxy(_unbindRequests);\nexport const mergeOptions = proxy(_mergeOptions);\nexport const getOption = proxy(_getOption);\nexport const normalizeMethods = proxy(_normalizeMethods);\nexport const triggerMethod = proxy(_triggerMethod);\n\n\n// Configuration\n\nexport const setDomApi = function(mixin) {\n CollectionView.setDomApi(mixin);\n Region.setDomApi(mixin);\n View.setDomApi(mixin);\n};\nexport const setRenderer = function(renderer) {\n CollectionView.setRenderer(renderer);\n View.setRenderer(renderer);\n};\n\nexport {\n View,\n CollectionView,\n MnObject,\n Region,\n Behavior,\n Application,\n isEnabled,\n setEnabled,\n monitorViewEvents,\n Events,\n extend,\n DomApi,\n VERSION\n};\n\nexport default {\n View,\n CollectionView,\n MnObject,\n Object: MnObject,\n Region,\n Behavior,\n Application,\n isEnabled,\n setEnabled,\n monitorViewEvents,\n Events,\n extend,\n DomApi,\n VERSION\n};\n"],"names":["proxy","method","context","args","apply","protoProps","staticProps","child","parent","this","has","constructor","arguments","extend","prototype","create","__super__","normalizeMethods","hash","_","reduce","normalizedHash","name","isFunction","_this","errorProps","MarionetteError","call","Error","urlRoot","url","options","error","message","pick","captureStackTrace","toString","normalizeBindings","bindings","isObject","bindEvents","entity","listenTo","unbindEvents","stopListening","bindRequests","channel","reply","unbindRequests","stopReplying","getOption","optionName","undefined","mergeOptions","keys","each","key","option","triggerMethodChildren","view","event","shouldTrigger","_getImmediateChildren","triggerMethod","shouldTriggerAttach","_isAttached","shouldAttach","shouldTriggerDetach","shouldDetach","triggerDOMRefresh","_isRendered","triggerDOMRemove","handleBeforeAttach","handleAttach","handleBeforeDetach","handleDetach","handleBeforeRender","handleRender","monitorViewEvents","_areViewEventsMonitored","on","splitter","methodCache","getEventName","match","prefix","eventName","toUpperCase","getOnMethodName","replace","result","methodName","drop","trigger","eventSplitter","buildEventArgs","callback","listener","_typeof","eventArgs","concat","test","split","n","push","onceWrap","offCallback","onceCallback","once","_callback","onApi","events","ctx","cleanupListener","obj","listeneeId","listenerId","listeningTo","_rdListeners","offReducer","names","handlers","remaining","handler","count","length","getListener","listenerObj","_rdListenId","uniqueId","_rdEvents","_rdListeningTo","listenToApi","listeners","_rdInternal","triggerApi","objEvents","allEvents","all","slice","triggerEvents","callHandler","opts","bind","off","listenToOnce","listenerIds","i","listenToObj","_reInternal","_this2","CommonMixin","_setOptions","classOptions","Backbone","Events","_isDestroyed","isDestroyed","destroy","_initRadio","channelName","Radio","_channel","radioEvents","radioRequests","_destroyRadio","getChannel","ClassOptions","MarionetteObject","cid","cidPrefix","initialize","DestroyMixin","RadioMixin","invokeMap","invoke","parseBehaviors","behaviors","allBehaviors","reducedBehaviors","behaviorDefiniton","behaviorClass","BehaviorClass","getBehaviorClass","behavior","_initBehaviors","_behaviors","_getBehaviorTriggers","triggers","_invoke","memo","_triggers","_getBehaviorEvents","_events","_proxyBehaviorViewProperties","_delegateBehaviorEntityEvents","_undelegateBehaviorEntityEvents","_destroyBehaviors","_removeBehavior","undelegate","without","_bindBehaviorUIElements","_unbindBehaviorUIElements","_triggerEventOnBehaviors","_delegateEntityEvents","model","collection","_modelEvents","_collectionEvents","_undelegateEntityEvents","_deleteEntityEventHandlers","_renderTemplate","template","data","mixinTemplateContext","serializeData","html","_renderHtml","attachElContent","getTemplate","serializedData","templateContext","serializeModel","items","serializeCollection","attributes","map","models","Dom","setContents","el","$el","uiRegEx","normalizeUIString","uiString","ui","r","normalizeUIKeys","val","_getUIBindings","uiBindings","normalizeUIValues","property","isString","propertyVal","_bindUIElements","_uiBindings","_ui","selector","$","_unbindUIElements","_getUI","FEATURES","childViewEventPrefix","triggersStopPropagation","triggersPreventDefault","DEV_MODE","isEnabled","setEnabled","state","setEventDelegator","mixin","EventDelegator","delegateEventSplitter","shouldCapture","indexOf","delegate","rootEl","delegateHandler","evt","node","target","parentNode","Element","matches","delegateTarget","addEventListener","undelegateAll","removeEventListener","_initViewEvents","_domEvents","_undelegateViewEvents","_delegateViewEvents","_delegateEvents","_delegateTriggers","_delegate","value","triggerDef","shouldPreventDefault","preventDefault","shouldStopPropagation","stopPropagation","buildViewTrigger","setDomApi","createElement","tagName","document","createBuffer","createDocumentFragment","getDocumentEl","ownerDocument","documentElement","findEl","querySelectorAll","hasEl","childEl","contains","detachEl","removeChild","replaceEl","newEl","oldEl","replaceChild","swapEl","el1","el2","parent1","parent2","next1","nextSibling","next2","insertBefore","innerHTML","setAttributes","attrs","attr","setAttribute","appendContents","contents","appendChild","hasContents","hasChildNodes","detachContents","textContent","ViewMixin","preinitialize","DomApi","_getEl","id","className","class","_isElAttached","supportsRenderLifecycle","supportsDestroyLifecycle","isRendered","isAttached","delegateEntityEvents","undelegateEntityEvents","_isDestroying","_disableDetachEvents","unbindUIElements","_removeChildren","bindUIElements","getUI","_buildEventProxies","_childViewEvents","_childViewTriggers","_eventPrefix","_getEventPrefix","defaultPrefix","_proxyChildViewEvents","_childViewEventHandler","childViewEvents","childViewTriggers","renderView","render","destroyView","disableDetachEvents","remove","BehaviorsMixin","DelegateEntityEventsMixin","TemplateRenderMixin","UIMixin","ViewEvents","Region","_initEl","definition","defaults","buildRegionFromObject","regionClass","RegionClass","replaceElement","_isReplaced","_isSwappingView","show","_ensureElement","_getView","currentView","_isShown","empty","_setupChildView","_attachView","_setEl","getEl","_setElement","shouldReplace","_restoreEl","_replaceEl","attachHtml","_empty","parentView","_parentView","_shouldDisableMonitoring","shouldReplaceEl","allowMissingEl","isView","viewOptions","_getViewOptions","View","_detachView","isReplaced","isSwappingView","detachHtml","shouldDestroy","removeView","_stopChildViewEvents","detachView","shouldRestoreEl","hasView","reset","_name","_removeReferences","_initRegions","regions","_regions","addRegions","_reInitRegions","addRegion","isEmpty","_addRegions","regionDefinitions","parentEl","partial","buildRegion","_addRegion","region","removeRegion","_removeRegion","removeRegions","_getRegions","emptyRegions","getRegions","hasRegion","getRegion","clone","showChildView","detachChildView","getChildView","setRenderer","renderer","childReducer","children","setElement","RegionsMixin","element","_setBehaviorElements","Container","_init","stringComparator","comparator","get","_views","_viewsByCid","_indexByModel","_updateLength","_add","index","_addViewIndexes","splice","_sort","_sortBy","sort","sortedViews","sortBy","_set","views","shouldReset","_swap","view1","view2","view1Index","findIndexByView","view2Index","swapView","findByModel","findByModelCid","modelCid","findByIndex","findByCid","_remove","CollectionView","_initChildViewStorage","getEmptyRegion","sortWithCollection","_children","ChildViewContainer","emptyEl","container","_emptyRegion","_initialEvents","_onCollectionSort","_onCollectionReset","_onCollectionUpdate","add","merge","viewComparator","_destroyChildren","_addChildModels","changes","removedViews","removed","_removeChildModels","_addedViews","added","_detachChildren","_removeChildViews","_removeChildModel","_removeChild","_addChildModel","_createChildView","_addChild","ChildView","_getChildView","childViewOptions","_getChildViewOptions","buildChildView","childView","ViewClass","ChildViewClass","_extend","removeChildView","_getChildViewContainer","childViewContainer","_sortChildren","filter","getComparator","setComparator","preventRender","shouldSort","removeComparator","_viewComparator","_filterChildren","_renderChildren","viewFilter","_getFilter","attachViews","detachViews","getFilter","matcher","setFilter","shouldRender","removeFilter","detachingViews","_detachChildView","_hasUnrenderedViews","_showEmptyView","_destroyEmptyView","els","_getBuffer","_attachChildren","elBuffer","_this3","EmptyView","_getEmptyView","_getEmptyViewOptions","emptyView","emptyRegion","emptyViewOptions","swapChildViews","addChildView","hasIndex","_removeChildView","_destroyChildView","Behavior","ViewEventsMixin","Application","_initRegion","start","_region","showView","getView","_bindEvents","_unbindEvents","_bindRequests","_unbindRequests","_mergeOptions","_getOption","_normalizeMethods","_triggerMethod","MnObject","Object","VERSION"],"mappings":";;;;;;;;;;;gjBACMA,EAAQ,SAASC,UACd,SAASC,8BAAYC,mCAAAA,2BACnBF,EAAOG,MAAMF,EAASC,KCGlB,WAASE,EAAYC,OAE9BC,EADEC,EAASC,YAObF,EADEF,GAAcK,MAAIL,EAAY,eACxBA,EAAWM,YAEX,kBAAoBH,EAAOJ,MAAMK,KAAMG,YAIjDC,SAAON,EAAOC,EAAQF,GAItBC,EAAMO,UAAYC,SAAOP,EAAOM,UAAWT,GAC3CE,EAAMO,UAAUH,YAAcJ,EAI9BA,EAAMS,UAAYR,EAAOM,UAElBP,ECxBT,IAAMU,EAAmB,SAASC,iBAC3BA,SAEEC,EAAEC,OAAOF,EAAM,SAACG,EAAgBpB,EAAQqB,UACxCH,EAAEI,WAAWtB,KAChBA,EAASuB,EAAKvB,IAEZA,IACFoB,EAAeC,GAAQrB,GAElBoB,GACN,KCXCI,EAAa,CAAC,cAAe,WAAY,aAAc,OAAQ,UAAW,SAAU,OAEpFC,EAAkBb,EAAOc,KAAKC,MAAO,CACzCC,6DAEAC,IAAK,GAELnB,qBAAYoB,OACJC,EAAQJ,MAAMD,KAAKlB,KAAMsB,EAAQE,SACvCd,EAAEN,OAAOJ,KAAMU,EAAEe,KAAKF,EAAOP,GAAaN,EAAEe,KAAKH,EAASN,IAEtDG,MAAMO,wBACHA,yBAGFL,IAAMrB,KAAKoB,QAAUpB,KAAKqB,KAGjCK,6BACEP,MAAMO,kBAAkB1B,KAAMiB,IAGhCU,oCACa3B,KAAKa,kBAAWb,KAAKwB,yBAAkBxB,KAAKqB,QCX3D,SAASO,EAAkBnC,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B5gB,GAAgB/D,EAAM4kB,MA+BpB,CACbpL,KAAAA,GACAkF,eAAAA,GACAmG,SAAAA,EACAC,OAAQD,EACRvN,OAAAA,GACAuM,SAAAA,GACAE,YAAAA,GACA9T,UAAAA,GACAC,WAAAA,GACApL,kBAAAA,EACA6E,OAAAA,EACA9I,OAAAA,EACAmU,OAAAA,GACA+P,kTAxCuB,SAAS1U,GAChCqO,GAAerM,UAAUhC,GACzBiH,GAAOjF,UAAUhC,GACjBmJ,GAAKnH,UAAUhC,kCAEU,SAAS4L,GAClCyC,GAAe1C,YAAYC,GAC3BzC,GAAKwC,YAAYC"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000000..6be6ea10b8 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,9508 @@ +{ + "name": "backbone.marionette", + "version": "4.1.2", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/core": { + "version": "7.4.3", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.4.0", + "@babel/helpers": "^7.4.3", + "@babel/parser": "^7.4.3", + "@babel/template": "^7.4.0", + "@babel/traverse": "^7.4.3", + "@babel/types": "^7.4.0", + "convert-source-map": "^1.1.0", + "debug": "^4.1.0", + "json5": "^2.1.0", + "lodash": "^4.17.11", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.0.tgz", + "integrity": "sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==", + "dev": true, + "requires": { + "@babel/types": "^7.4.0", + "jsesc": "^2.5.1", + "lodash": "^4.17.11", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz", + "integrity": "sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + }, + "dependencies": { + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz", + "integrity": "sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg==", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.10.4", + "@babel/types": "^7.10.4" + }, + "dependencies": { + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "@babel/helper-call-delegate": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.12.1.tgz", + "integrity": "sha512-GeAkqxDhZPlbpr7ajtyS97reL9YlGZ1OQtuOZgPADO67yqN58vS8o0Vuu4ImILgvfksUbDonztD9loGV8qNhow==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.10.4", + "@babel/types": "^7.12.1" + }, + "dependencies": { + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "@babel/helper-define-map": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz", + "integrity": "sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.10.4", + "@babel/types": "^7.10.5", + "lodash": "^4.17.19" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/helper-function-name": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/parser": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz", + "integrity": "sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==", + "dev": true + }, + "@babel/template": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.12.1.tgz", + "integrity": "sha512-dmUwH8XmlrUpVqgtZ737tK88v07l840z9j3OEhCLwKTkjlvKpfqXVIZ0wpK3aeOxspwGrf/5AP5qLx4rO3w5rA==", + "dev": true, + "requires": { + "@babel/types": "^7.12.1" + }, + "dependencies": { + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "@babel/helper-function-name": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", + "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/template": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", + "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz", + "integrity": "sha512-wljroF5PgCk2juF69kanHVs6vrLwIPNp6DLD+Lrl3hoQ3PpPPikaDRNFA+0t81NOoMt2DL6WW/mdU8k4k6ZzuA==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + }, + "dependencies": { + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz", + "integrity": "sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ==", + "dev": true, + "requires": { + "@babel/types": "^7.12.1" + }, + "dependencies": { + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "@babel/helper-module-imports": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz", + "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-module-transforms": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz", + "integrity": "sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-replace-supers": "^7.12.1", + "@babel/helper-simple-access": "^7.12.1", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/helper-validator-identifier": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1", + "lodash": "^4.17.19" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/generator": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz", + "integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==", + "dev": true, + "requires": { + "@babel/types": "^7.12.5", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/helper-function-name": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-module-imports": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz", + "integrity": "sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA==", + "dev": true, + "requires": { + "@babel/types": "^7.12.5" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", + "dev": true, + "requires": { + "@babel/types": "^7.11.0" + } + }, + "@babel/parser": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz", + "integrity": "sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==", + "dev": true + }, + "@babel/template": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/traverse": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz", + "integrity": "sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.12.5", + "@babel/types": "^7.12.5", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + } + }, + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz", + "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + }, + "dependencies": { + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "@babel/helper-plugin-utils": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz", + "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==", + "dev": true + }, + "@babel/helper-regex": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.5.tgz", + "integrity": "sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg==", + "dev": true, + "requires": { + "lodash": "^4.17.19" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.12.1.tgz", + "integrity": "sha512-9d0KQCRM8clMPcDwo8SevNs+/9a8yWVVmaE80FGJcEP8N1qToREmWEGnBn8BUlJhYRFz6fqxeRL1sl5Ogsed7A==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-wrap-function": "^7.10.4", + "@babel/types": "^7.12.1" + }, + "dependencies": { + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "@babel/helper-replace-supers": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.5.tgz", + "integrity": "sha512-5YILoed0ZyIpF4gKcpZitEnXEJ9UoDRki1Ey6xz46rxOzfNMAhVIJMoune1hmPVxh40LRv1+oafz7UsWX+vyWA==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.12.1", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/traverse": "^7.12.5", + "@babel/types": "^7.12.5" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/generator": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz", + "integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==", + "dev": true, + "requires": { + "@babel/types": "^7.12.5", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/helper-function-name": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", + "dev": true, + "requires": { + "@babel/types": "^7.11.0" + } + }, + "@babel/parser": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz", + "integrity": "sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==", + "dev": true + }, + "@babel/template": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/traverse": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz", + "integrity": "sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.12.5", + "@babel/types": "^7.12.5", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + } + }, + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/helper-simple-access": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz", + "integrity": "sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA==", + "dev": true, + "requires": { + "@babel/types": "^7.12.1" + }, + "dependencies": { + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz", + "integrity": "sha512-7Cuc6JZiYShaZnybDmfwhY4UYHzI6rlqhWjaIqbsJGsIqPimEYy5uh3akSRLMg65LSdSEnJ8a8/bWQN6u2oMGw==", + "dev": true, + "requires": { + "@babel/types": "^7.4.0" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", + "dev": true + }, + "@babel/helper-wrap-function": { + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.12.3.tgz", + "integrity": "sha512-Cvb8IuJDln3rs6tzjW3Y8UeelAOdnpB8xtQ4sme2MSZ9wOxrbThporC0y/EtE16VAtoyEfLM404Xr1e0OOp+ow==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/generator": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz", + "integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==", + "dev": true, + "requires": { + "@babel/types": "^7.12.5", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/helper-function-name": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", + "dev": true, + "requires": { + "@babel/types": "^7.11.0" + } + }, + "@babel/parser": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz", + "integrity": "sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==", + "dev": true + }, + "@babel/template": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/traverse": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz", + "integrity": "sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.12.5", + "@babel/types": "^7.12.5", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + } + }, + "@babel/types": { + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/helpers": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.3.tgz", + "integrity": "sha512-BMh7X0oZqb36CfyhvtbSmcWc3GXocfxv3yNsAEuM0l+fAqSO22rQrUpijr3oE/10jCTrB6/0b9kzmG4VetCj8Q==", + "dev": true, + "requires": { + "@babel/template": "^7.4.0", + "@babel/traverse": "^7.4.3", + "@babel/types": "^7.4.0" + } + }, + "@babel/highlight": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.3.tgz", + "integrity": "sha512-gxpEUhTS1sGA63EGQGuA+WESPR/6tz6ng7tSHFCmaTJK/cGK8y37cBTspX+U2xCAue2IQVvF6Z0oigmjwD8YGQ==", + "dev": true + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz", + "integrity": "sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-remap-async-to-generator": "^7.1.0", + "@babel/plugin-syntax-async-generators": "^7.2.0" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz", + "integrity": "sha512-MAFV1CA/YVmYwZG0fBQyXhmj0BHCB5egZHCKWIFVv/XCxAeVGIHfos3SwDck4LvCllENIAg7xMKOG5kH0dzyUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-json-strings": "^7.2.0" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.3.tgz", + "integrity": "sha512-xC//6DNSSHVjq8O2ge0dyYlhshsH4T7XdCVoxbi5HzLYWfsC5ooFlJjrXk8RcAT+hjHAK9UjBXdylzSoDK3t4g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-object-rest-spread": "^7.2.0" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz", + "integrity": "sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.2.0" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.0.tgz", + "integrity": "sha512-h/KjEZ3nK9wv1P1FSNb9G079jXrNYR0Ko+7XkOx85+gM24iZbPn0rh4vCftk+5QKY7y1uByFataBTmX7irEF1w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-regex": "^7.0.0", + "regexpu-core": "^4.5.4" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true + } + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true + } + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true + } + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true + } + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz", + "integrity": "sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.0.tgz", + "integrity": "sha512-EeaFdCeUULM+GPFEsf7pFcNSxM7hYjoj5fiYbyuiXobW4JhFnjAv9OWzNwHyHcKoPNpAfeRDuW6VyaXEDUBa7g==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-remap-async-to-generator": "^7.1.0" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz", + "integrity": "sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.0.tgz", + "integrity": "sha512-AWyt3k+fBXQqt2qb9r97tn3iBwFpiv9xdAiG+Gr2HpAZpuayvbL55yWrsV3MyHvXk/4vmSiedhDRl1YI2Iy5nQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "lodash": "^4.17.11" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.3.tgz", + "integrity": "sha512-PUaIKyFUDtG6jF5DUJOfkBdwAS/kFFV3XFk7Nn0a6vR7ZT8jYw5cGtIlat77wcnd0C6ViGqo/wyNf4ZHytF/nQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.0.0", + "@babel/helper-define-map": "^7.4.0", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-optimise-call-expression": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-replace-supers": "^7.4.0", + "@babel/helper-split-export-declaration": "^7.4.0", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz", + "integrity": "sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.3.tgz", + "integrity": "sha512-rVTLLZpydDFDyN4qnXdzwoVpk1oaXHIvPEOkOLyr88o7oHxVc/LyrnDx+amuBWGOwUb7D1s/uLsKBNTx08htZg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.3.tgz", + "integrity": "sha512-9Arc2I0AGynzXRR/oPdSALv3k0rM38IMFyto7kOCwb5F9sLUt2Ykdo3V9yUPR+Bgr4kb6bVEyLkPEiBhzcTeoA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-regex": "^7.4.3", + "regexpu-core": "^4.5.4" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz", + "integrity": "sha512-q+yuxW4DsTjNceUiTzK0L+AfQ0zD9rWaTLiUqHA8p0gxx7lu1EylenfzjeIWNkPy6e/0VG/Wjw9uf9LueQwLOw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz", + "integrity": "sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.1.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.3.tgz", + "integrity": "sha512-UselcZPwVWNSURnqcfpnxtMehrb8wjXYOimlYQPBnup/Zld426YzIhNEvuRsEWVHfESIECGrxoI6L5QqzuLH5Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.3.tgz", + "integrity": "sha512-uT5J/3qI/8vACBR9I1GlAuU/JqBtWdfCrynuOkrWG6nCDieZd5przB1vfP59FRHBZQ9DC2IUfqr/xKqzOD5x0A==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz", + "integrity": "sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.2.0.tgz", + "integrity": "sha512-HiU3zKkSU6scTidmnFJ0bMX8hz5ixC93b4MHMiYebmk2lUVNGOboPsqQvx5LzooihijUoLR/v7Nc1rbBtnc7FA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz", + "integrity": "sha512-mK2A8ucqz1qhrdqjS9VMIDfIvvT2thrEsIQzbaTdc5QFzhDjQv2CkJJ5f6BXIkgbmaoax3zBr2RyvV/8zeoUZw==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.1.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.3.tgz", + "integrity": "sha512-sMP4JqOTbMJMimqsSZwYWsMjppD+KRyDIUVW91pd7td0dZKAvPmhCaxhOzkzLParKwgQc7bdL9UNv+rpJB0HfA==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.4.3", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-simple-access": "^7.1.0" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.4.0.tgz", + "integrity": "sha512-gjPdHmqiNhVoBqus5qK60mWPp1CmYWp/tkh11mvb0rrys01HycEGD7NvvSoKXlWEfSM9TcL36CpsK8ElsADptQ==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.4.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz", + "integrity": "sha512-BV3bw6MyUH1iIsGhXlOK6sXhmSarZjtJ/vMiD9dNmpY8QXFFQTj+6v92pcfy1iqa8DeAfJFwoxcrS/TUZda6sw==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.1.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.2.tgz", + "integrity": "sha512-NsAuliSwkL3WO2dzWTOL1oZJHm0TM8ZY8ZSxk2ANyKkt5SQlToGA4pzctmq1BEjoacurdwZ3xp2dCQWJkME0gQ==", + "dev": true, + "requires": { + "regexp-tree": "^0.1.0" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.0.tgz", + "integrity": "sha512-6ZKNgMQmQmrEX/ncuCwnnw1yVGoaOW5KpxNhoWI7pCQdA0uZ0HqHGqenCUIENAnxRjy2WwNQ30gfGdIgqJXXqw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz", + "integrity": "sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-replace-supers": "^7.1.0" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.3.tgz", + "integrity": "sha512-ULJYC2Vnw96/zdotCZkMGr2QVfKpIT/4/K+xWWY0MbOJyMZuk660BGkr3bEKWQrrciwz6xpmft39nA4BF7hJuA==", + "dev": true, + "requires": { + "@babel/helper-call-delegate": "^7.4.0", + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.2.0.tgz", + "integrity": "sha512-9q7Dbk4RhgcLp8ebduOpCbtjh7C0itoLYHXd9ueASKAG/is5PQtMR5VJGka9NKqGhYEGn5ITahd4h9QeBMylWQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.3.tgz", + "integrity": "sha512-kEzotPuOpv6/iSlHroCDydPkKYw7tiJGKlmYp6iJn4a6C/+b2FdttlJsLKYxolYHgotTJ5G5UY5h0qey5ka3+A==", + "dev": true, + "requires": { + "regenerator-transform": "^0.13.4" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.2.0.tgz", + "integrity": "sha512-fz43fqW8E1tAB3DKF19/vxbpib1fuyCwSPE418ge5ZxILnBhWyhtPgz8eh1RCGGJlwvksHkyxMxh0eenFi+kFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz", + "integrity": "sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz", + "integrity": "sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz", + "integrity": "sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-regex": "^7.0.0" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz", + "integrity": "sha512-FkPix00J9A/XWXv4VoKJBMeSkyY9x/TqIh76wzcdfl57RJJcf8CehQ08uwfhCDNtRQYtHQKBTwKZDEyjE13Lwg==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz", + "integrity": "sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.3.tgz", + "integrity": "sha512-lnSNgkVjL8EMtnE8eSS7t2ku8qvKH3eqNf/IwIfnSPUqzgqYmRwzdsQWv4mNQAN9Nuo6Gz1Y0a4CSmdpu1Pp6g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-regex": "^7.4.3", + "regexpu-core": "^4.5.4" + } + }, + "@babel/preset-env": { + "version": "7.4.3", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-async-generator-functions": "^7.2.0", + "@babel/plugin-proposal-json-strings": "^7.2.0", + "@babel/plugin-proposal-object-rest-spread": "^7.4.3", + "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.0", + "@babel/plugin-syntax-async-generators": "^7.2.0", + "@babel/plugin-syntax-json-strings": "^7.2.0", + "@babel/plugin-syntax-object-rest-spread": "^7.2.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", + "@babel/plugin-transform-arrow-functions": "^7.2.0", + "@babel/plugin-transform-async-to-generator": "^7.4.0", + "@babel/plugin-transform-block-scoped-functions": "^7.2.0", + "@babel/plugin-transform-block-scoping": "^7.4.0", + "@babel/plugin-transform-classes": "^7.4.3", + "@babel/plugin-transform-computed-properties": "^7.2.0", + "@babel/plugin-transform-destructuring": "^7.4.3", + "@babel/plugin-transform-dotall-regex": "^7.4.3", + "@babel/plugin-transform-duplicate-keys": "^7.2.0", + "@babel/plugin-transform-exponentiation-operator": "^7.2.0", + "@babel/plugin-transform-for-of": "^7.4.3", + "@babel/plugin-transform-function-name": "^7.4.3", + "@babel/plugin-transform-literals": "^7.2.0", + "@babel/plugin-transform-member-expression-literals": "^7.2.0", + "@babel/plugin-transform-modules-amd": "^7.2.0", + "@babel/plugin-transform-modules-commonjs": "^7.4.3", + "@babel/plugin-transform-modules-systemjs": "^7.4.0", + "@babel/plugin-transform-modules-umd": "^7.2.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.4.2", + "@babel/plugin-transform-new-target": "^7.4.0", + "@babel/plugin-transform-object-super": "^7.2.0", + "@babel/plugin-transform-parameters": "^7.4.3", + "@babel/plugin-transform-property-literals": "^7.2.0", + "@babel/plugin-transform-regenerator": "^7.4.3", + "@babel/plugin-transform-reserved-words": "^7.2.0", + "@babel/plugin-transform-shorthand-properties": "^7.2.0", + "@babel/plugin-transform-spread": "^7.2.0", + "@babel/plugin-transform-sticky-regex": "^7.2.0", + "@babel/plugin-transform-template-literals": "^7.2.0", + "@babel/plugin-transform-typeof-symbol": "^7.2.0", + "@babel/plugin-transform-unicode-regex": "^7.4.3", + "@babel/types": "^7.4.0", + "browserslist": "^4.5.2", + "core-js-compat": "^3.0.0", + "invariant": "^2.2.2", + "js-levenshtein": "^1.1.3", + "semver": "^5.5.0" + } + }, + "@babel/register": { + "version": "7.4.0", + "dev": true, + "requires": { + "core-js": "^3.0.0", + "find-cache-dir": "^2.0.0", + "lodash": "^4.17.11", + "mkdirp": "^0.5.1", + "pirates": "^4.0.0", + "source-map-support": "^0.5.9" + } + }, + "@babel/template": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.0.tgz", + "integrity": "sha512-SOWwxxClTTh5NdbbYZ0BmaBVzxzTh2tO/TeLTbF6MO6EzVhHTnff8CdBXx3mEtazFBoysmEM6GU/wF+SuSx4Fw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.4.0", + "@babel/types": "^7.4.0" + } + }, + "@babel/traverse": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.3.tgz", + "integrity": "sha512-HmA01qrtaCwwJWpSKpA948cBvU5BrmviAief/b3AVw936DtcdsTexlbyzNuDnthwhOQ37xshn7hvQaEQk7ISYQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.4.0", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.4.0", + "@babel/parser": "^7.4.3", + "@babel/types": "^7.4.0", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.11" + }, + "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", + "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.11", + "to-fast-properties": "^2.0.0" + } + }, + "@sinonjs/commons": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.1.tgz", + "integrity": "sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/formatio": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.2.1.tgz", + "integrity": "sha512-tsHvOB24rvyvV2+zKMmPkZ7dXX6LSLKZ7aOtXY6Edklp0uRcgGpOsQTTGTcWViFyx4uhWc6GV8QdnALbIbIdeQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1", + "@sinonjs/samsam": "^3.1.0" + } + }, + "@sinonjs/samsam": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.3.tgz", + "integrity": "sha512-bKCMKZvWIjYD0BLGnNrxVuw4dkWCYsLqFOUWw8VgKF/+5Y+mE7LfHWPIYoDXowH+3a9LsWDMo0uAP8YDosPvHQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.3.0", + "array-from": "^2.1.1", + "lodash": "^4.17.15" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, + "@types/node": { + "version": "11.13.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.4.tgz", + "integrity": "sha512-+rabAZZ3Yn7tF/XPGHupKIL5EcAbrLxnTr/hgQICxbeuAfWtT0UZSfULE+ndusckBItcv4o6ZeOJplQikVcLvQ==", + "dev": true + }, + "@types/resolve": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", + "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "abab": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz", + "integrity": "sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w==", + "dev": true + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "dev": true, + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, + "acorn-globals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.1.tgz", + "integrity": "sha512-gJSiKY8dBIjV/0jagZIFBdVMtfQyA5QHCvAT48H2q8REQoW8Fs5AOjqBql1LgSXgrMWdevcE+8cdZ33NtVbIBA==", + "dev": true, + "requires": { + "acorn": "^6.0.1", + "acorn-walk": "^6.0.1" + } + }, + "acorn-jsx": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "dev": true + }, + "acorn-walk": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.2.0.tgz", + "integrity": "sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==", + "dev": true + }, + "adm-zip": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", + "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==", + "dev": true + }, + "after": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", + "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", + "dev": true + }, + "agent-base": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", + "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", + "dev": true, + "requires": { + "es6-promisify": "^5.0.0" + } + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true + }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", + "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", + "dev": true + }, + "array-from": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", + "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "arraybuffer.slice": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", + "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "async-array-reduce": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/async-array-reduce/-/async-array-reduce-0.2.1.tgz", + "integrity": "sha1-yL4BCitc0A3qlsgRFgNGk9/dgtE=", + "dev": true + }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "dev": true + }, + "async-each-series": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/async-each-series/-/async-each-series-0.1.1.tgz", + "integrity": "sha1-dhfBkXQB/Yykooqtzj266Yr+tDI=", + "dev": true + }, + "async-limiter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", + "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "axios": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.17.1.tgz", + "integrity": "sha1-LY4+XQvb1zJ/kbyBT1xXZg+Bgk0=", + "dev": true, + "requires": { + "follow-redirects": "^1.2.5", + "is-buffer": "^1.1.5" + } + }, + "babel-plugin-istanbul": { + "version": "5.1.1", + "dev": true, + "requires": { + "find-up": "^3.0.0", + "istanbul-lib-instrument": "^3.0.0", + "test-exclude": "^5.0.0" + } + }, + "backbone": { + "version": "1.4.0", + "dev": true, + "requires": { + "underscore": ">=1.8.3" + } + }, + "backbone.radio": { + "version": "2.0.0" + }, + "backo2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", + "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "base64-arraybuffer": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz", + "integrity": "sha1-mBjHngWbE1X5fgQooBfIOOkLqBI=", + "dev": true + }, + "base64id": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", + "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=", + "dev": true + }, + "batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "better-assert": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", + "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", + "dev": true, + "requires": { + "callsite": "1.0.0" + } + }, + "binary": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", + "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=", + "dev": true, + "requires": { + "buffers": "~0.1.1", + "chainsaw": "~0.1.0" + } + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "blob": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", + "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "browser-process-hrtime": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz", + "integrity": "sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw==", + "dev": true + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "browser-sync": { + "version": "2.26.3", + "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.26.3.tgz", + "integrity": "sha512-VLzpjCA4uXqfzkwqWtMM6hvPm2PNHp2RcmzBXcbi6C9WpkUhhFb8SVAr4CFrCsFxDg+oY6HalOjn8F+egyvhag==", + "dev": true, + "requires": { + "browser-sync-client": "^2.26.2", + "browser-sync-ui": "^2.26.2", + "bs-recipes": "1.3.4", + "bs-snippet-injector": "^2.0.1", + "chokidar": "^2.0.4", + "connect": "3.6.6", + "connect-history-api-fallback": "^1", + "dev-ip": "^1.0.1", + "easy-extender": "^2.3.4", + "eazy-logger": "^3", + "etag": "^1.8.1", + "fresh": "^0.5.2", + "fs-extra": "3.0.1", + "http-proxy": "1.15.2", + "immutable": "^3", + "localtunnel": "1.9.1", + "micromatch": "2.3.11", + "opn": "5.3.0", + "portscanner": "2.1.1", + "qs": "6.2.3", + "raw-body": "^2.3.2", + "resp-modifier": "6.0.2", + "rx": "4.1.0", + "send": "0.16.2", + "serve-index": "1.9.1", + "serve-static": "1.13.2", + "server-destroy": "1.0.1", + "socket.io": "2.1.1", + "ua-parser-js": "0.7.17", + "yargs": "6.4.0" + }, + "dependencies": { + "fs-extra": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz", + "integrity": "sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^3.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz", + "integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "yargs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.4.0.tgz", + "integrity": "sha1-gW4ahm1VmMzzTlWW3c4i2S2kkNQ=", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "window-size": "^0.2.0", + "y18n": "^3.2.1", + "yargs-parser": "^4.1.0" + } + }, + "yargs-parser": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", + "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", + "dev": true, + "requires": { + "camelcase": "^3.0.0" + } + } + } + }, + "browser-sync-client": { + "version": "2.26.13", + "resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.26.13.tgz", + "integrity": "sha512-p2VbZoYrpuDhkreq+/Sv1MkToHklh7T1OaIntDwpG6Iy2q/XkBcgwPcWjX+WwRNiZjN8MEehxIjEUh12LweLmQ==", + "dev": true, + "requires": { + "etag": "1.8.1", + "fresh": "0.5.2", + "mitt": "^1.1.3", + "rxjs": "^5.5.6" + }, + "dependencies": { + "rxjs": { + "version": "5.5.12", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", + "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", + "dev": true, + "requires": { + "symbol-observable": "1.0.1" + } + } + } + }, + "browser-sync-ui": { + "version": "2.26.13", + "resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.26.13.tgz", + "integrity": "sha512-6NJ/pCnhCnBMzaty1opWo7ipDmFAIk8U71JMQGKJxblCUaGfdsbF2shf6XNZSkXYia1yS0vwKu9LIOzpXqQZCA==", + "dev": true, + "requires": { + "async-each-series": "0.1.1", + "connect-history-api-fallback": "^1", + "immutable": "^3", + "server-destroy": "1.0.1", + "socket.io-client": "^2.0.4", + "stream-throttle": "^0.1.3" + } + }, + "browserslist": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.4.tgz", + "integrity": "sha512-rAjx494LMjqKnMPhFkuLmLp8JWEX0o8ADTGeAbOqaF+XCvYLreZrG5uVjnPBlAQ8REZK4pzXGvp0bWgrFtKaag==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000955", + "electron-to-chromium": "^1.3.122", + "node-releases": "^1.1.13" + } + }, + "bs-recipes": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/bs-recipes/-/bs-recipes-1.3.4.tgz", + "integrity": "sha1-DS1NSKcYyMBEdp/cT4lZLci2lYU=", + "dev": true + }, + "bs-snippet-injector": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/bs-snippet-injector/-/bs-snippet-injector-2.0.1.tgz", + "integrity": "sha1-YbU5PxH1JVntEgaTEANDtu2wTdU=", + "dev": true + }, + "buffer-es6": { + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/buffer-es6/-/buffer-es6-4.9.3.tgz", + "integrity": "sha1-8mNHuC33b9N+GLy1KIxJcM/VxAQ=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffers": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", + "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s=", + "dev": true + }, + "builtin-modules": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", + "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", + "dev": true + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "call-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz", + "integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.0" + } + }, + "callsite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", + "dev": true + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001157", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001157.tgz", + "integrity": "sha512-gOerH9Wz2IRZ2ZPdMfBvyOi3cjaz4O4dgNwPGzx8EhqAs4+2IL/O+fJsbt+znSigujoZG8bVcIAUM/I/E5K3MA==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "chai": { + "version": "4.2.0", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.0", + "type-detect": "^4.0.5" + } + }, + "chai-jq": { + "version": "0.0.9", + "dev": true + }, + "chainsaw": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", + "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=", + "dev": true, + "requires": { + "traverse": ">=0.3.0 <0.4" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", + "dev": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "component-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", + "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=", + "dev": true + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "component-inherit": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", + "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "connect": { + "version": "3.6.6", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", + "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", + "dev": true, + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.0", + "parseurl": "~1.3.2", + "utils-merge": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "connect-history-api-fallback": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", + "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==", + "dev": true + }, + "convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", + "dev": true + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.0.1.tgz", + "integrity": "sha512-sco40rF+2KlE0ROMvydjkrVMMG1vYilP2ALoRXcYR4obqbYIuV3Bg+51GEDW+HF8n7NRA+iaA4qD0nD9lo9mew==", + "dev": true + }, + "core-js-compat": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.0.1.tgz", + "integrity": "sha512-2pC3e+Ht/1/gD7Sim/sqzvRplMiRnFQVlPpDVaHtY9l7zZP7knamr3VRD6NyGfHd84MrDC0tAM9ulNxYMW0T3g==", + "dev": true, + "requires": { + "browserslist": "^4.5.4", + "core-js": "3.0.1", + "core-js-pure": "3.0.1", + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "core-js-pure": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.0.1.tgz", + "integrity": "sha512-mSxeQ6IghKW3MoyF4cz19GJ1cMm7761ON+WObSyLfTu/Jn3x7w4NwNFnrZxgl4MTSvYYepVLNuRtlB4loMwJ5g==", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "coveralls": { + "version": "3.0.3", + "dev": true, + "requires": { + "growl": "~> 1.10.0", + "js-yaml": "^3.11.0", + "lcov-parse": "^0.0.10", + "log-driver": "^1.2.7", + "minimist": "^1.2.0", + "request": "^2.86.0" + } + }, + "cross-env": { + "version": "5.2.0", + "dev": true, + "requires": { + "cross-spawn": "^6.0.5", + "is-windows": "^1.0.0" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "cssom": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.6.tgz", + "integrity": "sha512-DtUeseGk9/GBW0hl0vVPpU22iHL6YB5BUX7ml1hB+GMpo0NX5G4voX3kdWiMSEguFtcW3Vh3djqNF4aIe6ne0A==", + "dev": true + }, + "cssstyle": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.2.2.tgz", + "integrity": "sha512-43wY3kl1CVQSvL7wUY1qXkxVGkStjpkDmVjiIKX8R97uhajy8Bybay78uOtqvh7Q5GK75dNPfW0geWjE6qQQow==", + "dev": true, + "requires": { + "cssom": "0.3.x" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "data-urls": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.1.0.tgz", + "integrity": "sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==", + "dev": true, + "requires": { + "abab": "^2.0.0", + "whatwg-mimetype": "^2.2.0", + "whatwg-url": "^7.0.0" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "decompress-zip": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/decompress-zip/-/decompress-zip-0.3.2.tgz", + "integrity": "sha512-Ab1QY4LrWMrUuo53lLnmGOby7v8ryqxJ+bKibKSiPisx+25mhut1dScVBXAYx14i/PqSrFZvR2FRRazhLbvL+g==", + "dev": true, + "requires": { + "binary": "^0.3.0", + "graceful-fs": "^4.1.3", + "mkpath": "^0.1.0", + "nopt": "^3.0.1", + "q": "^1.1.2", + "readable-stream": "^1.1.8", + "touch": "0.0.3" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "dev-ip": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dev-ip/-/dev-ip-1.0.1.tgz", + "integrity": "sha1-p2o+0YVb56ASu4rBbLgPPADcKPA=", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "dev": true + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "domexception": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz", + "integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==", + "dev": true, + "requires": { + "webidl-conversions": "^4.0.2" + } + }, + "easy-extender": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/easy-extender/-/easy-extender-2.3.4.tgz", + "integrity": "sha512-8cAwm6md1YTiPpOvDULYJL4ZS6WfM5/cTeVVh4JsvyYZAoqlRVUpHL9Gr5Fy7HA6xcSZicUia3DeAgO3Us8E+Q==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, + "easy-sauce": { + "version": "0.4.2", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "connect": "^3.6.6", + "fs-extra": "^7.0.0", + "localtunnel": "^1.9.0", + "minimist": "^1.2.0", + "ngrok": "^3.0.1", + "request": "^2.88.0", + "sauce-connect-launcher": "^1.2.4", + "serve-static": "^1.13.2" + } + }, + "eazy-logger": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eazy-logger/-/eazy-logger-3.1.0.tgz", + "integrity": "sha512-/snsn2JqBtUSSstEl4R0RKjkisGHAhvYj89i7r3ytNUKW12y178KDZwXLXIgwDqLW6E/VRMT9qfld7wvFae8bQ==", + "dev": true, + "requires": { + "tfunk": "^4.0.0" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.593", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.593.tgz", + "integrity": "sha512-GvO7G1ZxvffnMvPCr4A7+iQPVuvpyqMrx2VWSERAjG+pHK6tmO9XqYdBfMIq9corRyi4bNImSDEiDvIoDb8HrA==", + "dev": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "engine.io": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.2.1.tgz", + "integrity": "sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w==", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "base64id": "1.0.0", + "cookie": "0.3.1", + "debug": "~3.1.0", + "engine.io-parser": "~2.1.0", + "ws": "~3.3.1" + }, + "dependencies": { + "base64-arraybuffer": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", + "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", + "dev": true + }, + "engine.io-parser": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.3.tgz", + "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==", + "dev": true, + "requires": { + "after": "0.8.2", + "arraybuffer.slice": "~0.0.7", + "base64-arraybuffer": "0.1.5", + "blob": "0.0.5", + "has-binary2": "~1.0.2" + } + }, + "ws": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + } + } + } + }, + "engine.io-client": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.4.4.tgz", + "integrity": "sha512-iU4CRr38Fecj8HoZEnFtm2EiKGbYZcPn3cHxqNGl/tmdWRf60KhK+9vE0JeSjgnlS/0oynEfLgKbT9ALpim0sQ==", + "dev": true, + "requires": { + "component-emitter": "~1.3.0", + "component-inherit": "0.0.3", + "debug": "~3.1.0", + "engine.io-parser": "~2.2.0", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parseqs": "0.0.6", + "parseuri": "0.0.6", + "ws": "~6.1.0", + "xmlhttprequest-ssl": "~1.5.4", + "yeast": "0.1.2" + } + }, + "engine.io-parser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.1.tgz", + "integrity": "sha512-x+dN/fBH8Ro8TFwJ+rkB2AmuVw9Yu2mockR/p3W8f8YtExwFgDvBDi0GWyb4ZLkpahtDGZgtr3zLovanJghPqg==", + "dev": true, + "requires": { + "after": "0.8.2", + "arraybuffer.slice": "~0.0.7", + "base64-arraybuffer": "0.1.4", + "blob": "0.0.5", + "has-binary2": "~1.0.2" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", + "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + }, + "dependencies": { + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + } + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "dev": true + }, + "es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "dev": true, + "requires": { + "es6-promise": "^4.0.3" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escodegen": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.1.tgz", + "integrity": "sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw==", + "dev": true, + "requires": { + "esprima": "^3.1.3", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "dev": true + } + } + }, + "eslint": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.9.1", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^4.0.3", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^5.0.1", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^6.2.2", + "js-yaml": "^3.13.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.11", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^5.5.1", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "estree-walker": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.0.tgz", + "integrity": "sha512-peq1RfVAVzr3PU/jL31RaOjUKLoZJpObQWJJ+LgfcxDUifyLZ1RjPQZTl0pzj2uJ45b7A7XpyppXvxdEqzo4rw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true + }, + "eventemitter3": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz", + "integrity": "sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg=", + "dev": true + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "^2.1.0" + }, + "dependencies": { + "fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "finalhandler": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", + "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.3.1", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "flat": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", + "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", + "dev": true, + "requires": { + "is-buffer": "~2.0.3" + }, + "dependencies": { + "is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "dev": true + } + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true + }, + "follow-redirects": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", + "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "dev": true, + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, + "get-intrinsic": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.1.tgz", + "integrity": "sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + }, + "dependencies": { + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "globals": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", + "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==", + "dev": true + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "dev": true, + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + } + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-binary2": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", + "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", + "dev": true, + "requires": { + "isarray": "2.0.1" + } + }, + "has-cors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", + "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-glob/-/has-glob-1.0.0.tgz", + "integrity": "sha1-mqqe7b/7G6OZCnsAEPtnjuAIEgc=", + "dev": true, + "requires": { + "is-glob": "^3.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hosted-git-info": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "dev": true + }, + "html-encoding-sniffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz", + "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==", + "dev": true, + "requires": { + "whatwg-encoding": "^1.0.1" + } + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "dependencies": { + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + } + } + }, + "http-proxy": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.15.2.tgz", + "integrity": "sha1-ZC/cr/5S00SNK9o7AHnpQJBk2jE=", + "dev": true, + "requires": { + "eventemitter3": "1.x.x", + "requires-port": "1.x.x" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "https-proxy-agent": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", + "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", + "dev": true, + "requires": { + "agent-base": "^4.3.0", + "debug": "^3.1.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "immutable": { + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", + "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=", + "dev": true + }, + "import-fresh": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.2.tgz", + "integrity": "sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "inquirer": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", + "dev": true, + "requires": { + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^2.0.0", + "lodash": "^4.17.12", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + } + } + } + } + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-callable": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", + "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "^2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "dev": true + }, + "is-negative-zero": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz", + "integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-number-like": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/is-number-like/-/is-number-like-1.0.8.tgz", + "integrity": "sha512-6rZi3ezCyFcn5L71ywzz2bS5b2Igl1En3eTlZlvKjpz1n3IZLAYMbKYAIQgFmEu0GENg92ziU/faEOA/aixjbA==", + "dev": true, + "requires": { + "lodash.isfinite": "^3.3.2" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-regex": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", + "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-valid-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", + "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true + }, + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.1.0.tgz", + "integrity": "sha512-ooVllVGT38HIk8MxDj/OIHXSYvH+1tq/Vb38s8ixt9GoJadXska4WkGY+0wkmtYCZNYtaARniH/DixUGGLZ0uA==", + "dev": true, + "requires": { + "@babel/generator": "^7.0.0", + "@babel/parser": "^7.0.0", + "@babel/template": "^7.0.0", + "@babel/traverse": "^7.0.0", + "@babel/types": "^7.0.0", + "istanbul-lib-coverage": "^2.0.3", + "semver": "^5.5.0" + } + }, + "jest-worker": { + "version": "24.6.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.6.0.tgz", + "integrity": "sha512-jDwgW5W9qGNvpI1tNnvajh0a5IE/PuGLFmHk6aR/BZFz8tSgGw17GsDPXAJ6p91IvYDjOw8GpFbvvZGAK+DPQQ==", + "dev": true, + "requires": { + "merge-stream": "^1.0.1", + "supports-color": "^6.1.0" + }, + "dependencies": { + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "jquery": { + "version": "3.4.0", + "dev": true + }, + "js-levenshtein": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", + "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "jsdom": { + "version": "14.0.0", + "dev": true, + "requires": { + "abab": "^2.0.0", + "acorn": "^6.0.4", + "acorn-globals": "^4.3.0", + "array-equal": "^1.0.0", + "cssom": "^0.3.4", + "cssstyle": "^1.1.1", + "data-urls": "^1.1.0", + "domexception": "^1.0.1", + "escodegen": "^1.11.0", + "html-encoding-sniffer": "^1.0.2", + "nwsapi": "^2.0.9", + "parse5": "5.1.0", + "pn": "^1.1.0", + "request": "^2.88.0", + "request-promise-native": "^1.0.5", + "saxes": "^3.1.5", + "symbol-tree": "^3.2.2", + "tough-cookie": "^2.5.0", + "w3c-hr-time": "^1.0.1", + "w3c-xmlserializer": "^1.0.1", + "webidl-conversions": "^4.0.2", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^7.0.0", + "ws": "^6.1.2", + "xml-name-validator": "^3.0.0" + }, + "dependencies": { + "ws": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", + "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0" + } + } + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json5": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", + "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "just-extend": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.1.tgz", + "integrity": "sha512-aWgeGFW67BP3e5181Ep1Fv2v8z//iBJfrvyTnq8wG86vEESwmonn1zPBJ0VfmT9CJq2FIT0VsETtrNFm2a+SHA==", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "lcov-parse": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", + "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "limiter": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.5.tgz", + "integrity": "sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA==", + "dev": true + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, + "localtunnel": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-1.9.1.tgz", + "integrity": "sha512-HWrhOslklDvxgOGFLxi6fQVnvpl6XdX4sPscfqMZkzi3gtt9V7LKBWYvNUcpHSVvjwCQ6xzXacVvICNbNcyPnQ==", + "dev": true, + "requires": { + "axios": "0.17.1", + "debug": "2.6.9", + "openurl": "1.1.1", + "yargs": "6.6.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "yargs": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", + "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^4.2.0" + } + }, + "yargs-parser": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", + "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", + "dev": true, + "requires": { + "camelcase": "^3.0.0" + } + } + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "lodash.isfinite": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz", + "integrity": "sha1-+4m2WpqAKBgz8LdHizpRBPiY67M=", + "dev": true + }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", + "dev": true + }, + "log-driver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", + "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", + "dev": true + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "requires": { + "chalk": "^2.0.1" + } + }, + "lolex": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-3.1.0.tgz", + "integrity": "sha512-zFo5MgCJ0rZ7gQg69S4pqBsLURbFw11X68C18OcJjJQbqaXm2NoTrGl1IMM3TIz0/BnN1tIs2tzmmqvCsOMMjw==", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "magic-string": { + "version": "0.22.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", + "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", + "dev": true, + "requires": { + "vlq": "^0.2.2" + } + }, + "map-age-cleaner": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "dev": true, + "requires": { + "p-defer": "^1.0.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "matched": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/matched/-/matched-1.0.2.tgz", + "integrity": "sha512-7ivM1jFZVTOOS77QsR+TtYHH0ecdLclMkqbf5qiJdX2RorqfhsL65QHySPZgDE0ZjHoh+mQUNHTanNXIlzXd0Q==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "async-array-reduce": "^0.2.1", + "glob": "^7.1.2", + "has-glob": "^1.0.0", + "is-valid-glob": "^1.0.0", + "resolve-dir": "^1.0.0" + } + }, + "math-random": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", + "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", + "dev": true + }, + "mem": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", + "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" + } + }, + "merge-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", + "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + }, + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", + "dev": true + }, + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", + "dev": true + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "dev": true, + "requires": { + "mime-db": "1.44.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mitt": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-1.2.0.tgz", + "integrity": "sha512-r6lj77KlwqLhIUku9UWYes7KJtsczvolZkzp8hbaDPPaE24OmWl5s539Mytlj22siEQKosZ26qCBgda2PKwoJw==", + "dev": true + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "mkpath": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/mkpath/-/mkpath-0.1.0.tgz", + "integrity": "sha1-dVSm+Nhxg0zJe1RisSLEwSTW3pE=", + "dev": true + }, + "mocha": { + "version": "6.1.3", + "dev": true, + "requires": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.0", + "log-symbols": "2.2.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "ms": "2.1.1", + "node-environment-flags": "1.0.5", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.2.2", + "yargs-parser": "13.0.0", + "yargs-unparser": "1.5.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "js-yaml": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz", + "integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "dev": true + }, + "ngrok": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/ngrok/-/ngrok-3.1.1.tgz", + "integrity": "sha512-dCW/Ni12GRBL7XIyiFmilKOfCW7UVFf65I/HpE8FC5rXGJwdhIYLc9Qr05GRb6hNs6fZGwyLpcDLnDhUSgZasQ==", + "dev": true, + "requires": { + "@types/node": "^8.10.30", + "decompress-zip": "^0.3.2", + "request": "^2.88.0", + "request-promise-native": "^1.0.5", + "uuid": "^3.3.2" + }, + "dependencies": { + "@types/node": { + "version": "8.10.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", + "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==", + "dev": true + } + } + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "nise": { + "version": "1.4.10", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.10.tgz", + "integrity": "sha512-sa0RRbj53dovjc7wombHmVli9ZihXbXCQ2uH3TNm03DyvOSIQbxg+pbqDKrk2oxMK1rtLGVlKxcB9rrc6X5YjA==", + "dev": true, + "requires": { + "@sinonjs/formatio": "^3.1.0", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "lolex": "^2.3.2", + "path-to-regexp": "^1.7.0" + }, + "dependencies": { + "lolex": { + "version": "2.7.5", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.5.tgz", + "integrity": "sha512-l9x0+1offnKKIzYVjyXU2SiwhXDLekRzKyhnbyldPHvC7BvLPVpdNUNR2KeMAiCN2D/kLNttZgQD5WjSxuBx3Q==", + "dev": true + } + } + }, + "node-environment-flags": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", + "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", + "dev": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + } + }, + "node-modules-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", + "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", + "dev": true + }, + "node-releases": { + "version": "1.1.66", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.66.tgz", + "integrity": "sha512-JHEQ1iWPGK+38VLB2H9ef2otU4l8s3yAMt9Xf934r6+ojCYDMHPMqvCc9TnzfeFSP1QEOeU6YZEd3+De0LTCgg==", + "dev": true + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "nwsapi": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.3.tgz", + "integrity": "sha512-RowAaJGEgYXEZfQ7tvvdtAQUKPyTR6T6wNu0fwlNsGQYr/h3yQc6oI8WnVZh3Y/Sylwc+dtAlvPqfFZjhTyk3A==", + "dev": true + }, + "nyc": { + "version": "13.3.0", + "dev": true, + "requires": { + "archy": "^1.0.0", + "arrify": "^1.0.1", + "caching-transform": "^3.0.1", + "convert-source-map": "^1.6.0", + "find-cache-dir": "^2.0.0", + "find-up": "^3.0.0", + "foreground-child": "^1.5.6", + "glob": "^7.1.3", + "istanbul-lib-coverage": "^2.0.3", + "istanbul-lib-hook": "^2.0.3", + "istanbul-lib-instrument": "^3.1.0", + "istanbul-lib-report": "^2.0.4", + "istanbul-lib-source-maps": "^3.0.2", + "istanbul-reports": "^2.1.1", + "make-dir": "^1.3.0", + "merge-source-map": "^1.1.0", + "resolve-from": "^4.0.0", + "rimraf": "^2.6.3", + "signal-exit": "^3.0.2", + "spawn-wrap": "^1.4.2", + "test-exclude": "^5.1.0", + "uuid": "^3.3.2", + "yargs": "^12.0.5", + "yargs-parser": "^11.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "append-transform": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", + "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", + "dev": true, + "requires": { + "default-require-extensions": "^2.0.0" + } + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", + "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", + "dev": true, + "requires": { + "lodash": "^4.17.11" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "caching-transform": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.1.tgz", + "integrity": "sha512-Y1KTLNwSPd4ljsDrFOtyXVmm7Gnk42yQitNq43AhE+cwUR/e4T+rmOHs1IPtzBg8066GBJfTOj1rQYFSWSsH2g==", + "dev": true, + "requires": { + "hasha": "^3.0.0", + "make-dir": "^1.3.0", + "package-hash": "^3.0.0", + "write-file-atomic": "^2.3.0" + } + }, + "camelcase": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", + "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==", + "dev": true + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "dev": true, + "optional": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "cross-spawn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "default-require-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", + "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", + "dev": true, + "requires": { + "strip-bom": "^3.0.0" + } + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + } + } + }, + "find-cache-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.0.0.tgz", + "integrity": "sha512-LDUY6V1Xs5eFskUVYtIwatojt6+9xC9Chnlk/jYOOvn3FAFfSaWddxahDGyNHh0b2dMXa6YW2m0tk8TdVaXHlA==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^3.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "foreground-child": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", + "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", + "dev": true, + "requires": { + "cross-spawn": "^4", + "signal-exit": "^3.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, + "handlebars": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.0.tgz", + "integrity": "sha512-l2jRuU1NAWK6AW5qqcTATWQJvNPEwkM7NEKSiv/gqOsoSQbVoWyqVEY5GS+XPQ88zLNmqASRpzfdm8d79hJS+w==", + "dev": true, + "requires": { + "async": "^2.5.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "hasha": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-3.0.0.tgz", + "integrity": "sha1-UqMvq4Vp1BymmmH/GiFPjrfIvTk=", + "dev": true, + "requires": { + "is-stream": "^1.0.1" + } + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-dKWuzRGCs4G+67VfW9pBFFz2Jpi4vSp/k7zBcJ888ofV5Mi1g5CUML5GvMvV6u9Cjybftu+E8Cgp+k0dI1E5lw==", + "dev": true + }, + "istanbul-lib-hook": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.3.tgz", + "integrity": "sha512-CLmEqwEhuCYtGcpNVJjLV1DQyVnIqavMLFHV/DP+np/g3qvdxu3gsPqYoJMXm15sN84xOlckFB3VNvRbf5yEgA==", + "dev": true, + "requires": { + "append-transform": "^1.0.0" + } + }, + "istanbul-lib-report": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.4.tgz", + "integrity": "sha512-sOiLZLAWpA0+3b5w5/dq0cjm2rrNdAfHWaGhmn7XEFW6X++IV9Ohn+pnELAl9K3rfpaeBfbmH9JU5sejacdLeA==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^2.0.3", + "make-dir": "^1.3.0", + "supports-color": "^6.0.0" + }, + "dependencies": { + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.2.tgz", + "integrity": "sha512-JX4v0CiKTGp9fZPmoxpu9YEkPbEqCqBbO3403VabKjH+NRXo72HafD5UgnjTEqHL2SAjaZK1XDuDOkn6I5QVfQ==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.3", + "make-dir": "^1.3.0", + "rimraf": "^2.6.2", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "istanbul-reports": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.1.1.tgz", + "integrity": "sha512-FzNahnidyEPBCI0HcufJoSEoKykesRlFcSzQqjH9x0+LC8tnnE/p/90PBLu8iZTxr8yYZNyTtiAujUqyN+CIxw==", + "dev": true, + "requires": { + "handlebars": "^4.1.0" + } + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "dev": true + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "map-age-cleaner": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "dev": true, + "requires": { + "p-defer": "^1.0.0" + } + }, + "mem": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.1.0.tgz", + "integrity": "sha512-I5u6Q1x7wxO0kdOpYBB28xueHADYps5uty/zg936CiG8NTe5sJL8EjrCuLneuDW3PlMdZBGDIn8BirEVdovZvg==", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^1.0.0", + "p-is-promise": "^2.0.0" + } + }, + "merge-source-map": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", + "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-is-promise": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz", + "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==", + "dev": true + }, + "p-limit": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", + "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + }, + "package-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-3.0.0.tgz", + "integrity": "sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.15", + "hasha": "^3.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", + "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", + "dev": true, + "requires": { + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" + } + }, + "release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "dev": true, + "requires": { + "es6-error": "^4.0.1" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "resolve": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "spawn-wrap": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.2.tgz", + "integrity": "sha512-vMwR3OmmDhnxCVxM8M+xO/FtIp6Ju/mNaDfCMMW7FDcLRTPFWUswec4LXJHTJE2hwTI9O0YBfygu4DalFl7Ylg==", + "dev": true, + "requires": { + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "which": "^1.3.0" + } + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", + "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "test-exclude": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.1.0.tgz", + "integrity": "sha512-gwf0S2fFsANC55fSeSqpb8BYk6w3FDvwZxfNjeF6FRgvFa43r+7wRiA/Q0IxoRU37wB/LE8IQ4221BsNucTaCA==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^1.0.1" + } + }, + "uglify-js": { + "version": "3.4.9", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", + "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", + "dev": true, + "optional": true, + "requires": { + "commander": "~2.17.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + } + } + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write-file-atomic": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.2.tgz", + "integrity": "sha512-s0b6vB3xIVRLWywa6X9TOMA7k9zio0TMOsl9ZnDkliA/cfJlpHXAscj0gbHVJiTdIuAYpIyqS5GW91fqm6gG5g==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + }, + "yargs-parser": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "object-component": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", + "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-inspect": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", + "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + }, + "dependencies": { + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + } + } + }, + "openurl": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/openurl/-/openurl-1.1.1.tgz", + "integrity": "sha1-OHW0sO96UsFW8NtB1GCduw+Us4c=", + "dev": true + }, + "opn": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", + "integrity": "sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==", + "dev": true, + "requires": { + "is-wsl": "^1.1.0" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "^1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", + "dev": true + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "parse5": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz", + "integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==", + "dev": true + }, + "parseqs": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz", + "integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==", + "dev": true + }, + "parseuri": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.6.tgz", + "integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==", + "dev": true + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pirates": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", + "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", + "dev": true, + "requires": { + "node-modules-regexp": "^1.0.0" + } + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "pn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", + "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", + "dev": true + }, + "portscanner": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/portscanner/-/portscanner-2.1.1.tgz", + "integrity": "sha1-6rtAnk3iSVD1oqUW01rnaTQ/u5Y=", + "dev": true, + "requires": { + "async": "1.5.2", + "is-number-like": "^1.0.3" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + } + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, + "process-es6": { + "version": "0.11.6", + "resolved": "https://registry.npmjs.org/process-es6/-/process-es6-0.11.6.tgz", + "integrity": "sha1-xrs4n5qVH4K9TrFpYAEFvS/5x3g=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "psl": { + "version": "1.1.31", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", + "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", + "dev": true + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, + "qs": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.2.3.tgz", + "integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=", + "dev": true + }, + "randomatic": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", + "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", + "dev": true, + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true + }, + "raw-body": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.1.tgz", + "integrity": "sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA==", + "dev": true, + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.3", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "dependencies": { + "http-errors": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", + "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", + "dev": true + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + } + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + } + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + } + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "dependencies": { + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + } + } + }, + "regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", + "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", + "dev": true, + "requires": { + "regenerate": "^1.4.0" + } + }, + "regenerator-transform": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.13.4.tgz", + "integrity": "sha512-T0QMBjK3J0MtxjPmdIMXm72Wvj2Abb0Bd4HADdfijwMdoIsyQZ6fWC7kDFhk2YinBBEMZDL7Y7wh0J1sGx3S4A==", + "dev": true, + "requires": { + "private": "^0.1.6" + } + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "^0.1.3" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexp-tree": { + "version": "0.1.21", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.21.tgz", + "integrity": "sha512-kUUXjX4AnqnR8KRTCrayAo9PzYMRKmVoGgaz2tBuz0MF3g1ZbGebmtW0yFHfFK9CmBjQKeYIgoL22pFLBJY7sw==", + "dev": true + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "regexpu-core": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", + "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", + "dev": true, + "requires": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.2.0", + "regjsgen": "^0.5.1", + "regjsparser": "^0.6.4", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.2.0" + } + }, + "regjsgen": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", + "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", + "dev": true + }, + "regjsparser": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz", + "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "dev": true, + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + } + } + } + }, + "request-promise-core": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz", + "integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==", + "dev": true, + "requires": { + "lodash": "^4.17.11" + } + }, + "request-promise-native": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.7.tgz", + "integrity": "sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w==", + "dev": true, + "requires": { + "request-promise-core": "1.1.2", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true + }, + "resolve": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "resp-modifier": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/resp-modifier/-/resp-modifier-6.0.2.tgz", + "integrity": "sha1-sSTeXE+6/LpUH0j/pzlw9KpFa08=", + "dev": true, + "requires": { + "debug": "^2.2.0", + "minimatch": "^3.0.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "rollup": { + "version": "1.10.0", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "@types/node": "^11.13.4", + "acorn": "^6.1.1" + } + }, + "rollup-plugin-babel": { + "version": "4.3.2", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "rollup-pluginutils": "^2.3.0" + } + }, + "rollup-plugin-browsersync": { + "version": "1.0.0", + "dev": true, + "requires": { + "browser-sync": "^2.18.13" + } + }, + "rollup-plugin-commonjs": { + "version": "9.3.4", + "dev": true, + "requires": { + "estree-walker": "^0.6.0", + "magic-string": "^0.25.2", + "resolve": "^1.10.0", + "rollup-pluginutils": "^2.6.0" + }, + "dependencies": { + "magic-string": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.2.tgz", + "integrity": "sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg==", + "dev": true, + "requires": { + "sourcemap-codec": "^1.4.4" + }, + "dependencies": { + "sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "dev": true + } + } + } + } + }, + "rollup-plugin-eslint": { + "version": "5.1.0", + "dev": true, + "requires": { + "eslint": "^5.1.0", + "rollup-pluginutils": "^2.3.0" + } + }, + "rollup-plugin-json": { + "version": "4.0.0", + "dev": true, + "requires": { + "rollup-pluginutils": "^2.5.0" + } + }, + "rollup-plugin-multi-entry": { + "version": "2.1.0", + "dev": true, + "requires": { + "matched": "^1.0.2" + } + }, + "rollup-plugin-node-globals": { + "version": "1.4.0", + "dev": true, + "requires": { + "acorn": "^5.7.3", + "buffer-es6": "^4.9.3", + "estree-walker": "^0.5.2", + "magic-string": "^0.22.5", + "process-es6": "^0.11.6", + "rollup-pluginutils": "^2.3.1" + }, + "dependencies": { + "acorn": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "dev": true + }, + "estree-walker": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.5.2.tgz", + "integrity": "sha512-XpCnW/AE10ws/kDAs37cngSkvgIR8aN3G0MS85m7dUpuK2EREo9VJ00uvw6Dg/hXEpfsE1I1TvJOJr+Z+TL+ig==", + "dev": true + } + } + }, + "rollup-plugin-node-resolve": { + "version": "4.2.3", + "dev": true, + "requires": { + "@types/resolve": "0.0.8", + "builtin-modules": "^3.1.0", + "is-module": "^1.0.0", + "resolve": "^1.10.0" + } + }, + "rollup-plugin-terser": { + "version": "4.0.4", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "jest-worker": "^24.0.0", + "serialize-javascript": "^1.6.1", + "terser": "^3.14.1" + } + }, + "rollup-pluginutils": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.6.0.tgz", + "integrity": "sha512-aGQwspEF8oPKvg37u3p7h0cYNwmJR1sCBMZGZ5b9qy8HGtETknqjzcxrDRrcAnJNXN18lBH4Q9vZYth/p4n8jQ==", + "dev": true, + "requires": { + "estree-walker": "^0.6.0", + "micromatch": "^3.1.10" + }, + "dependencies": { + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + } + } + }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true + }, + "rx": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", + "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=", + "dev": true + }, + "rxjs": { + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", + "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sauce-connect-launcher": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/sauce-connect-launcher/-/sauce-connect-launcher-1.2.6.tgz", + "integrity": "sha512-yBTYfzI6AWRwoXJoIqmVgz+eCpWX6CsJ4Ap8fowjsGlN+27OKbnQxv6POd4Rzh57BH9WeA9K8orIzNxO8mMBQA==", + "dev": true, + "requires": { + "adm-zip": "~0.4.3", + "async": "^2.1.2", + "https-proxy-agent": "^2.2.1", + "lodash": "^4.16.6", + "rimraf": "^2.5.4" + } + }, + "saxes": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-3.1.9.tgz", + "integrity": "sha512-FZeKhJglhJHk7eWG5YM0z46VHmI3KJpMBAQm3xa9meDvd+wevB5GuBB0wc0exPInZiBBHqi00DbS8AcvCGCFMw==", + "dev": true, + "requires": { + "xmlchars": "^1.3.1" + } + }, + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true + }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", + "dev": true + } + } + }, + "serialize-javascript": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.6.1.tgz", + "integrity": "sha512-A5MOagrPFga4YaKQSWHryl7AXvbQkEqpw4NNYMTNYUNV51bA8ABHgYFpqKx+YFFrw59xMV1qGH1R4AgoNIVgCw==", + "dev": true + }, + "serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "dev": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + } + }, + "server-destroy": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", + "integrity": "sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0=", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "sinon": { + "version": "7.3.1", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.4.0", + "@sinonjs/formatio": "^3.2.1", + "@sinonjs/samsam": "^3.3.1", + "diff": "^3.5.0", + "lolex": "^3.1.0", + "nise": "^1.4.10", + "supports-color": "^5.5.0" + } + }, + "sinon-chai": { + "version": "3.3.0", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "socket.io": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.1.1.tgz", + "integrity": "sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA==", + "dev": true, + "requires": { + "debug": "~3.1.0", + "engine.io": "~3.2.0", + "has-binary2": "~1.0.2", + "socket.io-adapter": "~1.1.0", + "socket.io-client": "2.1.1", + "socket.io-parser": "~3.2.0" + }, + "dependencies": { + "base64-arraybuffer": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", + "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "engine.io-client": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.2.1.tgz", + "integrity": "sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw==", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "component-inherit": "0.0.3", + "debug": "~3.1.0", + "engine.io-parser": "~2.1.1", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "ws": "~3.3.1", + "xmlhttprequest-ssl": "~1.5.4", + "yeast": "0.1.2" + } + }, + "engine.io-parser": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.3.tgz", + "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==", + "dev": true, + "requires": { + "after": "0.8.2", + "arraybuffer.slice": "~0.0.7", + "base64-arraybuffer": "0.1.5", + "blob": "0.0.5", + "has-binary2": "~1.0.2" + } + }, + "parseqs": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", + "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", + "dev": true, + "requires": { + "better-assert": "~1.0.0" + } + }, + "parseuri": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", + "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", + "dev": true, + "requires": { + "better-assert": "~1.0.0" + } + }, + "socket.io-client": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.1.1.tgz", + "integrity": "sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ==", + "dev": true, + "requires": { + "backo2": "1.0.2", + "base64-arraybuffer": "0.1.5", + "component-bind": "1.0.0", + "component-emitter": "1.2.1", + "debug": "~3.1.0", + "engine.io-client": "~3.2.0", + "has-binary2": "~1.0.2", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "object-component": "0.0.3", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "socket.io-parser": "~3.2.0", + "to-array": "0.1.4" + } + }, + "socket.io-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.2.0.tgz", + "integrity": "sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA==", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "debug": "~3.1.0", + "isarray": "2.0.1" + } + }, + "ws": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + } + } + } + }, + "socket.io-adapter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz", + "integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==", + "dev": true + }, + "socket.io-client": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.3.1.tgz", + "integrity": "sha512-YXmXn3pA8abPOY//JtYxou95Ihvzmg8U6kQyolArkIyLd0pgVhrfor/iMsox8cn07WCOOvvuJ6XKegzIucPutQ==", + "dev": true, + "requires": { + "backo2": "1.0.2", + "component-bind": "1.0.0", + "component-emitter": "~1.3.0", + "debug": "~3.1.0", + "engine.io-client": "~3.4.0", + "has-binary2": "~1.0.2", + "indexof": "0.0.1", + "parseqs": "0.0.6", + "parseuri": "0.0.6", + "socket.io-parser": "~3.3.0", + "to-array": "0.1.4" + } + }, + "socket.io-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.1.tgz", + "integrity": "sha512-1QLvVAe8dTz+mKmZ07Swxt+LAo4Y1ff50rlyoEx00TQmDFVQYPfcqGvIDJLGaBdhdNCecXtyKpD+EgKGcmmbuQ==", + "dev": true, + "requires": { + "component-emitter": "~1.3.0", + "debug": "~3.1.0", + "isarray": "2.0.1" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.12", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", + "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.6.tgz", + "integrity": "sha512-+orQK83kyMva3WyPf59k1+Y525csj5JejicWut55zeTWANuN17qSiSLUXWtzHeNWORSvT7GLDJ/E/XiIWoXBTw==", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", + "dev": true + }, + "stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", + "dev": true + }, + "stream-throttle": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/stream-throttle/-/stream-throttle-0.1.3.tgz", + "integrity": "sha1-rdV8jXzHOoFjDTHNVdOWHPr7qcM=", + "dev": true, + "requires": { + "commander": "^2.2.0", + "limiter": "^1.0.5" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + } + } + }, + "string.prototype.trimend": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.2.tgz", + "integrity": "sha512-8oAG/hi14Z4nOVP0z6mdiVZ/wqjDtWSLygMigTzAb+7aPEDTleeFf+WrF+alzecxIRkckkJVn+dTlwzJXORATw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1" + }, + "dependencies": { + "es-abstract": { + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + } + } + }, + "string.prototype.trimstart": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.2.tgz", + "integrity": "sha512-7F6CdBTl5zyu30BJFdzSTlSlLPwODC23Od+iLoVH8X6+3fvDPPuBVVj9iaB1GOsSTSIgVfsfm27R2FGrAPznWg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1" + }, + "dependencies": { + "es-abstract": { + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + } + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true + }, + "symbol-tree": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz", + "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=", + "dev": true + }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "terser": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz", + "integrity": "sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==", + "dev": true, + "requires": { + "commander": "^2.19.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.10" + } + }, + "test-exclude": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.1.0.tgz", + "integrity": "sha512-gwf0S2fFsANC55fSeSqpb8BYk6w3FDvwZxfNjeF6FRgvFa43r+7wRiA/Q0IxoRU37wB/LE8IQ4221BsNucTaCA==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^1.0.1" + }, + "dependencies": { + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", + "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", + "dev": true, + "requires": { + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "tfunk": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tfunk/-/tfunk-4.0.0.tgz", + "integrity": "sha512-eJQ0dGfDIzWNiFNYFVjJ+Ezl/GmwHaFTBTjrtqNPW0S7cuVDBrZrmzUz6VkMeCR4DZFqhd4YtLwsw3i2wYHswQ==", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "dlv": "^1.1.3" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-array": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", + "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "dev": true + }, + "touch": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/touch/-/touch-0.0.3.tgz", + "integrity": "sha1-Ua7z1ElXHU8oel2Hyci0kYGg2x0=", + "dev": true, + "requires": { + "nopt": "~1.0.10" + }, + "dependencies": { + "nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "dev": true, + "requires": { + "abbrev": "1" + } + } + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "traverse": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", + "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "ua-parser-js": { + "version": "0.7.17", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.17.tgz", + "integrity": "sha512-uRdSdu1oA1rncCQL7sCj8vSyZkgtL7faaw9Tc9rZ3mGgraQ7+Pdx7w5mnOSF3gw9ZNG6oc+KXfkon3bKuROm0g==", + "dev": true + }, + "ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", + "dev": true + }, + "underscore": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==", + "dev": true + }, + "unicode-canonical-property-names-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", + "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", + "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^1.0.4", + "unicode-property-aliases-ecmascript": "^1.0.4" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", + "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", + "dev": true + }, + "unicode-property-aliases-ecmascript": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", + "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", + "dev": true + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + } + } + }, + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vlq": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", + "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==", + "dev": true + }, + "w3c-hr-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz", + "integrity": "sha1-gqwr/2PZUOqeMYmlimViX+3xkEU=", + "dev": true, + "requires": { + "browser-process-hrtime": "^0.1.2" + } + }, + "w3c-xmlserializer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-1.1.2.tgz", + "integrity": "sha512-p10l/ayESzrBMYWRID6xbuCKh2Fp77+sA0doRuGn4tTIMrrZVeqfpKjXHY+oDh3K4nLdPgNwMTVP6Vp4pvqbNg==", + "dev": true, + "requires": { + "domexception": "^1.0.1", + "webidl-conversions": "^4.0.2", + "xml-name-validator": "^3.0.0" + } + }, + "webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, + "whatwg-encoding": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", + "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "dev": true, + "requires": { + "iconv-lite": "0.4.24" + } + }, + "whatwg-mimetype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", + "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", + "dev": true + }, + "whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "window-size": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", + "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", + "dev": true + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, + "ws": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.4.tgz", + "integrity": "sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0" + } + }, + "xml-name-validator": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", + "dev": true + }, + "xmlchars": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-1.3.1.tgz", + "integrity": "sha512-tGkGJkN8XqCod7OT+EvGYK5Z4SfDQGD30zAa58OcnAa0RRWgzUEK72tkXhsX1FZd+rgnhRxFtmO+ihkp8LHSkw==", + "dev": true + }, + "xmlhttprequest-ssl": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", + "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yargs": { + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz", + "integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "os-locale": "^3.1.0", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + } + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + } + } + }, + "yargs-parser": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz", + "integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + } + } + }, + "yargs-unparser": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.5.0.tgz", + "integrity": "sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw==", + "dev": true, + "requires": { + "flat": "^4.1.0", + "lodash": "^4.17.11", + "yargs": "^12.0.5" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "yargs": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + }, + "yargs-parser": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "yarn": { + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/yarn/-/yarn-1.22.10.tgz", + "integrity": "sha512-IanQGI9RRPAN87VGTF7zs2uxkSyQSrSPsju0COgbsKQOOXr5LtcVPeyXWgwVa0ywG3d8dg6kSYKGBuYK021qeA==" + }, + "yeast": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", + "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", + "dev": true + } + } +} diff --git a/package.json b/package.json index 9e60ff4ba3..edf1f0b4ed 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,8 @@ }, "github": "https://github.com/marionettejs/backbone.marionette", "dependencies": { - "backbone.radio": "^2.0.0" + "backbone.radio": "^2.0.0", + "yarn": "^1.22.10" }, "peerDependencies": { "backbone": "^1.3.3", diff --git a/src/behavior.js b/src/behavior.js index 5102a19237..436d7212b2 100644 --- a/src/behavior.js +++ b/src/behavior.js @@ -6,13 +6,12 @@ // Behaviors allow you to blackbox View specific interactions // into portable logical chunks, keeping your views simple and your code DRY. -import _ from 'underscore'; +import { extend as _extend, uniqueId, result } from 'underscore'; import extend from './utils/extend'; -import getNamespacedEventName from './utils/get-namespaced-event-name'; import CommonMixin from './mixins/common'; import DelegateEntityEventsMixin from './mixins/delegate-entity-events'; -import TriggersMixin from './mixins/triggers'; import UIMixin from './mixins/ui'; +import ViewEventsMixin from './mixins/view-events'; const ClassOptions = [ 'collectionEvents', @@ -29,8 +28,12 @@ const Behavior = function(options, view) { // to the view. this.view = view; + this._setOptions(options, ClassOptions); - this.cid = _.uniqueId(this.cidPrefix); + this.cid = uniqueId(this.cidPrefix); + + this._initViewEvents(); + this.setElement(); // Construct an internal UI hash using the behaviors UI // hash combined and overridden by the view UI hash. @@ -39,7 +42,7 @@ const Behavior = function(options, view) { // This order will help the reuse and share of a behavior // between multiple views, while letting a view override // a selector under an UI key. - this.ui = _.extend({}, _.result(this, 'ui'), _.result(view, 'ui')); + this.ui = _extend({}, result(this, 'ui'), result(view, 'ui')); // Proxy view triggers this.listenTo(view, 'all', this.triggerMethod); @@ -52,12 +55,9 @@ Behavior.extend = extend; // Behavior Methods // -------------- -_.extend(Behavior.prototype, CommonMixin, DelegateEntityEventsMixin, TriggersMixin, UIMixin, { +_extend(Behavior.prototype, CommonMixin, DelegateEntityEventsMixin, UIMixin, ViewEventsMixin, { cidPrefix: 'mnb', - // This is a noop method intended to be overridden - initialize() {}, - // proxy behavior $ method to the view // this is useful for doing jquery DOM lookups // scoped to behaviors view. @@ -67,6 +67,8 @@ _.extend(Behavior.prototype, CommonMixin, DelegateEntityEventsMixin, TriggersMix // Stops the behavior from listening to events. destroy() { + this._undelegateViewEvents(); + this.stopListening(); this.view._removeBehavior(this); @@ -76,10 +78,13 @@ _.extend(Behavior.prototype, CommonMixin, DelegateEntityEventsMixin, TriggersMix return this; }, - proxyViewProperties() { - this.$el = this.view.$el; + setElement() { + this._undelegateViewEvents(); + this.el = this.view.el; + this._delegateViewEvents(this.view); + return this; }, @@ -110,36 +115,6 @@ _.extend(Behavior.prototype, CommonMixin, DelegateEntityEventsMixin, TriggersMix this._undelegateEntityEvents(this.view.model, this.view.collection); return this; - }, - - _getEvents() { - if (!this.events) { return; } - - // Normalize behavior events hash to allow - // a user to use the @ui. syntax. - const behaviorEvents = this.normalizeUIKeys(_.result(this, 'events')); - - // binds the handler to the behavior and builds a unique eventName - return _.reduce(behaviorEvents, (events, behaviorHandler, key) => { - if (!_.isFunction(behaviorHandler)) { - behaviorHandler = this[behaviorHandler]; - } - if (!behaviorHandler) { return events; } - key = getNamespacedEventName(key, this.cid); - events[key] = behaviorHandler.bind(this); - return events; - }, {}); - }, - - // Internal method to build all trigger handlers for a given behavior - _getTriggers() { - if (!this.triggers) { return; } - - // Normalize behavior triggers hash to allow - // a user to use the @ui. syntax. - const behaviorTriggers = this.normalizeUIKeys(_.result(this, 'triggers')); - - return this._getViewTriggers(this.view, behaviorTriggers); } }); diff --git a/src/collection-view.js b/src/collection-view.js index 1bd64c15f8..1cef07c333 100644 --- a/src/collection-view.js +++ b/src/collection-view.js @@ -1,20 +1,22 @@ // Collection View // --------------- -import _ from 'underscore'; -import Backbone from 'backbone'; +import { extend as _extend, uniqueId, result, map, isFunction, isObject, isString, matches, each, reduce } from 'underscore'; +import extend from './utils/extend'; import MarionetteError from './utils/error'; -import { renderView, destroyView } from './common/view'; +import { renderView, destroyView, isViewClass } from './common/view'; import monitorViewEvents from './common/monitor-view-events'; import ChildViewContainer from './child-view-container'; import Region from './region'; import ViewMixin from './mixins/view'; import { setDomApi } from './config/dom'; +import { setEventDelegator } from './config/event-delegator'; import { setRenderer } from './config/renderer'; const classErrorName = 'CollectionViewError'; const ClassOptions = [ + 'attributes', 'behaviors', 'childView', 'childViewContainer', @@ -22,12 +24,18 @@ const ClassOptions = [ 'childViewEvents', 'childViewOptions', 'childViewTriggers', + 'className', + 'collection', 'collectionEvents', + 'el', 'emptyView', 'emptyViewOptions', 'events', + 'id', + 'model', 'modelEvents', 'sortWithCollection', + 'tagName', 'template', 'templateContext', 'triggers', @@ -38,28 +46,38 @@ const ClassOptions = [ // A view that iterates over a Backbone.Collection // and renders an individual child view for each model. -const CollectionView = Backbone.View.extend({ - // flag for maintaining the sorted order of the collection - sortWithCollection: true, +const CollectionView = function(options) { + this.cid = uniqueId(this.cidPrefix); + this._setOptions(options, ClassOptions); - // constructor - constructor(options) { - this._setOptions(options, ClassOptions); + this.preinitialize.apply(this, arguments); - monitorViewEvents(this); + this._initViewEvents(); + this.setElement(this._getEl()); - this._initChildViewStorage(); - this._initBehaviors(); + monitorViewEvents(this); - Backbone.View.prototype.constructor.apply(this, arguments); + this._initChildViewStorage(); + this._initBehaviors(); + this._buildEventProxies(); - // Init empty region - this.getEmptyRegion(); + // Init empty region + this.getEmptyRegion(); - this.delegateEntityEvents(); + this.initialize.apply(this, arguments); - this._triggerEventOnBehaviors('initialize', this, options); - }, + this.delegateEntityEvents(); + + this._triggerEventOnBehaviors('initialize', this, options); +}; + +_extend(CollectionView, { extend, setRenderer, setDomApi, setEventDelegator }); + +_extend(CollectionView.prototype, ViewMixin, { + cidPrefix: 'mncv', + + // flag for maintaining the sorted order of the collection + sortWithCollection: true, // Internal method to set up the `children` object for storing all of the child views // `_children` represents all child views @@ -71,14 +89,14 @@ const CollectionView = Backbone.View.extend({ // Create an region to show the emptyView getEmptyRegion() { - const $emptyEl = this.$container || this.$el; + const emptyEl = this.container || this.el; if (this._emptyRegion && !this._emptyRegion.isDestroyed()) { - this._emptyRegion._setElement($emptyEl[0]); + this._emptyRegion._setElement(emptyEl); return this._emptyRegion; } - this._emptyRegion = new Region({ el: $emptyEl[0], replaceElement: false }); + this._emptyRegion = new Region({ el: emptyEl, replaceElement: false }); this._emptyRegion._parentView = this; @@ -138,7 +156,7 @@ const CollectionView = Backbone.View.extend({ }, _removeChildModels(models) { - return _.reduce(models, (views, model) => { + return reduce(models, (views, model) => { const removeView = this._removeChildModel(model); if (removeView) { views.push(removeView); } @@ -166,7 +184,7 @@ const CollectionView = Backbone.View.extend({ // Added views are returned for consistency with _removeChildModels _addChildModels(models) { - return _.map(models, this._addChildModel.bind(this)); + return map(models, this._addChildModel.bind(this)); }, _addChildModel(model) { @@ -226,15 +244,15 @@ const CollectionView = Backbone.View.extend({ // First check if the `view` is a view class (the common case) // Then check if it's a function (which we assume that returns a view class) _getView(view, child) { - if (view.prototype instanceof Backbone.View || view === Backbone.View) { + if (isViewClass(view)) { return view; - } else if (_.isFunction(view)) { + } else if (isFunction(view)) { return view.call(this, child); } }, _getChildViewOptions(child) { - if (_.isFunction(this.childViewOptions)) { + if (isFunction(this.childViewOptions)) { return this.childViewOptions(child); } @@ -244,7 +262,7 @@ const CollectionView = Backbone.View.extend({ // Build a `childView` for a model in the collection. // Override to customize the build buildChildView(child, ChildViewClass, childViewOptions) { - const options = _.extend({model: child}, childViewOptions); + const options = _extend({model: child}, childViewOptions); return new ChildViewClass(options); }, @@ -269,11 +287,15 @@ const CollectionView = Backbone.View.extend({ // Overriding Backbone.View's `setElement` to handle // if an el was previously defined. If so, the view might be // attached on setElement. - setElement() { - Backbone.View.prototype.setElement.apply(this, arguments); + setElement(element) { + this._undelegateViewEvents(); + this.el = element; + this._setBehaviorElements(); this._isAttached = this._isElAttached(); + this._delegateViewEvents(); + return this; }, @@ -306,10 +328,10 @@ const CollectionView = Backbone.View.extend({ // Get a container within the template to add the children within _getChildViewContainer() { - const childViewContainer = _.result(this, 'childViewContainer'); - this.$container = childViewContainer ? this.$(childViewContainer) : this.$el; + const childViewContainer = result(this, 'childViewContainer'); + this.container = childViewContainer ? this.$(childViewContainer)[0] : this.el; - if (!this.$container.length) { + if (!this.container) { throw new MarionetteError({ name: classErrorName, message: `The specified "childViewContainer" was not found: ${childViewContainer}`, @@ -416,7 +438,7 @@ const CollectionView = Backbone.View.extend({ const attachViews = []; const detachViews = []; - _.each(this._children._views, (view, key, children) => { + each(this._children._views, (view, key, children) => { (viewFilter.call(this, view, key, children) ? attachViews : detachViews).push(view); }); @@ -434,20 +456,20 @@ const CollectionView = Backbone.View.extend({ if (!viewFilter) { return false; } - if (_.isFunction(viewFilter)) { + if (isFunction(viewFilter)) { return viewFilter; } // Support filter predicates `{ fooFlag: true }` - if (_.isObject(viewFilter)) { - const matcher = _.matches(viewFilter); + if (isObject(viewFilter)) { + const matcher = matches(viewFilter); return function(view) { return matcher(view.model && view.model.attributes); }; } // Filter by model attribute - if (_.isString(viewFilter)) { + if (isString(viewFilter)) { return function(view) { return view.model && view.model.get(viewFilter); }; @@ -487,7 +509,7 @@ const CollectionView = Backbone.View.extend({ }, _detachChildren(detachingViews) { - _.each(detachingViews, this._detachChildView.bind(this)); + each(detachingViews, this._detachChildView.bind(this)); }, _detachChildView(view) { @@ -508,7 +530,7 @@ const CollectionView = Backbone.View.extend({ // Override this method to change how the collectionView detaches a child view detachHtml(view) { - this.Dom.detachEl(view.el, view.$el); + this.Dom.detachEl(view.el); }, _renderChildren() { @@ -541,11 +563,11 @@ const CollectionView = Backbone.View.extend({ _getBuffer(views) { const elBuffer = this.Dom.createBuffer(); - _.each(views, view => { + each(views, view => { renderView(view); // corresponds that view is shown in a Region or CollectionView view._isShown = true; - this.Dom.appendContents(elBuffer, view.el, {_$contents: view.$el}); + this.Dom.appendContents(elBuffer, view.el); }); return elBuffer; @@ -556,14 +578,14 @@ const CollectionView = Backbone.View.extend({ views = shouldTriggerAttach ? views : []; - _.each(views, view => { + each(views, view => { if (view._isAttached) { return; } view.triggerMethod('before:attach', view); }); - this.attachHtml(els, this.$container); + this.attachHtml(els, this.container); - _.each(views, view => { + each(views, view => { if (view._isAttached) { return; } view._isAttached = true; view.triggerMethod('attach', view); @@ -572,8 +594,8 @@ const CollectionView = Backbone.View.extend({ // Override this method to do something other than `.append`. // You can attach any HTML at this point including the els. - attachHtml(els, $container) { - this.Dom.appendContents($container[0], els, {_$el: $container}); + attachHtml(els, container) { + this.Dom.appendContents(container, els); }, isEmpty() { @@ -617,7 +639,7 @@ const CollectionView = Backbone.View.extend({ _getEmptyViewOptions() { const emptyViewOptions = this.emptyViewOptions || this.childViewOptions; - if (_.isFunction(emptyViewOptions)) { + if (isFunction(emptyViewOptions)) { return emptyViewOptions.call(this); } @@ -660,7 +682,7 @@ const CollectionView = Backbone.View.extend({ }); } - if (_.isObject(index)) { + if (isObject(index)) { options = index; } @@ -725,7 +747,7 @@ const CollectionView = Backbone.View.extend({ }, _removeChildViews(views) { - _.each(views, this._removeChildView.bind(this)); + each(views, this._removeChildView.bind(this)); }, _removeChildView(view, {shouldDetach} = {}) { @@ -765,7 +787,7 @@ const CollectionView = Backbone.View.extend({ this.triggerMethod('before:destroy:children', this); if (this.monitorViewEvents === false) { - this.Dom.detachContents(this.el, this.$el); + this.Dom.detachContents(this.el); } this._removeChildViews(this._children._views); @@ -776,11 +798,7 @@ const CollectionView = Backbone.View.extend({ this.triggerMethod('destroy:children', this); } -}, { - setDomApi, - setRenderer }); -_.extend(CollectionView.prototype, ViewMixin); export default CollectionView; diff --git a/src/common/view.js b/src/common/view.js index 60fa33d541..ce9ddeffa7 100644 --- a/src/common/view.js +++ b/src/common/view.js @@ -1,3 +1,11 @@ +export function isView(view) { + return view.render && (view.destroy || view.remove); +} + +export function isViewClass(ViewClass) { + return ViewClass.prototype.render && (ViewClass.prototype.destroy || ViewClass.prototype.remove); +} + export function renderView(view) { if (view._isRendered) { return; diff --git a/src/config/dom.js b/src/config/dom.js index 503e25a7e4..d90ffb7dbc 100644 --- a/src/config/dom.js +++ b/src/config/dom.js @@ -1,20 +1,18 @@ // DomApi // --------- -import _ from 'underscore'; -import Backbone from 'backbone'; - -// Performant method for returning the jQuery instance -function getEl(el) { - return el instanceof Backbone.$ ? el : Backbone.$(el); -} +import { extend, each, keys } from 'underscore'; // Static setter export function setDomApi(mixin) { - this.prototype.Dom = _.extend({}, this.prototype.Dom, mixin); + this.prototype.Dom = extend({}, this.prototype.Dom, mixin); return this; } export default { + // Returns a new HTML DOM node of tagName + createElement(tagName) { + return document.createElement(tagName); + }, // Returns a new HTML DOM node instance createBuffer() { @@ -26,17 +24,10 @@ export default { return el.ownerDocument.documentElement; }, - // Lookup the `selector` string - // Selector may also be a DOM element - // Returns an array-like object of nodes - getEl(selector) { - return getEl(selector); - }, - // Finds the `selector` string with the el // Returns an array-like object of nodes findEl(el, selector) { - return getEl(el).find(selector); + return el.querySelectorAll(selector); }, // Returns true if the el contains the node childEl @@ -45,8 +36,8 @@ export default { }, // Detach `el` from the DOM without removing listeners - detachEl(el, _$el = getEl(el)) { - _$el.detach(); + detachEl(el) { + if (el.parentNode) {el.parentNode.removeChild(el);} }, // Remove `oldEl` from the DOM and put `newEl` in its place @@ -84,15 +75,22 @@ export default { parent2.insertBefore(el1, next2); }, - // Replace the contents of `el` with the HTML string of `html` - setContents(el, html, _$el = getEl(el)) { - _$el.html(html); + // Replace the contents of `el` with the `html` + setContents(el, html) { + el.innerHTML = html + }, + + // Sets attributes on a DOM node + setAttributes(el, attrs) { + each(keys(attrs), attr => { + attr in el ? el[attr] = attrs[attr] : el.setAttribute(attr, attrs[attr]); + }); }, // Takes the DOM node `el` and appends the DOM node `contents` // to the end of the element's contents. - appendContents(el, contents, {_$el = getEl(el), _$contents = getEl(contents)} = {}) { - _$el.append(_$contents); + appendContents(el, contents) { + el.appendChild(contents); }, // Does the el have child nodes @@ -102,7 +100,7 @@ export default { // Remove the inner contents of `el` from the DOM while leaving // `el` itself in the DOM. - detachContents(el, _$el = getEl(el)) { - _$el.contents().detach(); + detachContents(el) { + el.textContent = ''; } }; diff --git a/src/config/event-delegator.js b/src/config/event-delegator.js new file mode 100644 index 0000000000..c52e70f2d2 --- /dev/null +++ b/src/config/event-delegator.js @@ -0,0 +1,53 @@ +// Event Delegator +// --------- +import { each, extend } from 'underscore'; + +// Static setter +export function setEventDelegator(mixin) { + this.prototype.EventDelegator = extend({}, this.prototype.EventDelegator, mixin); + return this; +} + +export default { + + shouldCapture(eventName) { + return ['focus', 'blur'].indexOf(eventName) !== -1; + }, + + // this.$el.on(eventName + '.delegateEvents' + this.cid, selector, handler); + delegate({ eventName, selector, handler, events, rootEl }) { + const shouldCapture = this.shouldCapture(eventName); + + if (selector) { + const delegateHandler = function(evt) { + let node = evt.target; + for (; node && node !== rootEl; node = node.parentNode) { + if (Element.prototype.matches.call(node, selector)) { + evt.delegateTarget = node; + handler(evt); + } + } + }; + + events.push({ eventName, handler: delegateHandler }); + Element.prototype.addEventListener.call(rootEl, eventName, delegateHandler, shouldCapture); + + return; + } + + events.push({ eventName, handler }); + Element.prototype.addEventListener.call(rootEl, eventName, handler, shouldCapture); + }, + + // this.$el.off('.delegateEvents' + this.cid); + undelegateAll({ events, rootEl }) { + if (!rootEl) { return; } + + each(events, ({ eventName, handler }) => { + const shouldCapture = this.shouldCapture(eventName); + Element.prototype.removeEventListener.call(rootEl, eventName, handler, shouldCapture); + }); + + events.length = 0; + } +}; diff --git a/src/mixins/events.js b/src/mixins/events.js index 03daff20ed..57e322d12d 100644 --- a/src/mixins/events.js +++ b/src/mixins/events.js @@ -1,5 +1,276 @@ +import { reduce, each, keys, uniqueId } from 'underscore'; + +import buildEventArgs, { eventSplitter } from '../utils/build-event-args'; +import callHandler from '../utils/call-handler'; +import onceWrap from '../utils/once-wrap'; + import triggerMethod from '../common/trigger-method'; -export default { - triggerMethod +// A module that can be mixed in to *any object* in order to provide it with +// a custom event channel. You may bind a callback to an event with `on` or +// remove with `off`; `trigger`-ing an event fires all callbacks in +// succession. +// +// var object = {}; +// _.extend(object, Events); +// object.on('expand', function(){ alert('expanded'); }); +// object.trigger('expand'); +// + +// The reducing API that adds a callback to the `events` object. +const onApi = function({ events, name, callback, context, ctx, listener }) { + const handlers = events[name] || (events[name] = []); + handlers.push({ callback, context, ctx: context || ctx, listener }); + return events; +}; + +const onReducer = function(events, { name, callback, context }) { + if (!callback) {return events;} + return onApi({ events, name, callback, context, ctx: this }); +} + +const onceReducer = function(events, { name, callback, context }) { + if (!callback) {return events;} + const onceCallback = onceWrap(callback, this.off.bind(this, name)); + return onApi({ events, name, callback: onceCallback, context, ctx: this }); } + +const cleanupListener = function({ obj, listeneeId, listenerId, listeningTo }) { + delete listeningTo[listeneeId]; + delete obj._rdListeners[listenerId]; +}; + +// The reducing API that removes a callback from the `events` object. +const offReducer = function(events , { name, callback, context }) { + const names = name ? [name] : keys(events); + + each(names, key => { + const handlers = events[key]; + + // Bail out if there are no events stored. + if (!handlers) {return;} + + // Find any remaining events. + events[key] = reduce(handlers, (remaining, handler) => { + if ( + callback && callback !== handler.callback && + callback !== handler.callback._callback || + context && context !== handler.context + ) { + remaining.push(handler); + return remaining; + } + + // If not including event, clean up any related listener + if (handler.listener) { + const listener = handler.listener; + listener.count--; + if (!listener.count) {cleanupListener(listener);} + } + + return remaining; + }, []); + + if (!events[key].length) {delete events[key];} + }); + + return events; +}; + +const getListener = function(obj, listenerObj) { + const listeneeId = obj._rdListenId || (obj._rdListenId = uniqueId('l')); + obj._rdEvents = obj._rdEvents || {}; + const listeningTo = listenerObj._rdListeningTo || (listenerObj._rdListeningTo = {}); + const listener = listeningTo[listeneeId]; + + // This listenerObj is not listening to any other events on `obj` yet. + // Setup the necessary references to track the listening callbacks. + if (!listener) { + const listenerId = listenerObj._rdListenId || (listenerObj._rdListenId = uniqueId('l')); + listeningTo[listeneeId] = {obj, listeneeId, listenerId, listeningTo, count: 0}; + + return listeningTo[listeneeId]; + } + + return listener; +} + +const listenToApi = function({ name, callback, context, listener }) { + if (!callback) {return;} + + const { obj, listenerId } = listener; + const listeners = obj._rdListeners || (obj._rdListeners = {}); + obj._rdEvents = onApi({ events: obj._rdEvents, name, callback, context, listener }); + listeners[listenerId] = listener; + listener.count++; + + // Call `on` for interop + obj.on(name, callback, context, { _rdInternal: true }); +}; + +const listenToOnceApi = function({ name, callback, context, listener }) { + if (!callback) {return;} + const offCallback = this.stopListening.bind(this, listener.obj, name); + const onceCallback = onceWrap(callback, offCallback); + listenToApi({ name, callback: onceCallback, context, listener }); +}; + +// Handles triggering the appropriate event callbacks. +const triggerApi = function({ events, name, args }) { + const objEvents = events[name]; + const allEvents = (objEvents && events.all) ? events.all.slice() : events.all; + if (objEvents) {triggerEvents(objEvents, args);} + if (allEvents) {triggerEvents(allEvents, [name].concat(args));} +}; + +const triggerEvents = function(events, args) { + each(events, ({ callback, ctx }) => { + callHandler(callback, ctx, args); + }); +}; + +export default { + + // Bind an event to a `callback` function. Passing `"all"` will bind + // the callback to all events fired. + on(name, callback, context, opts) { + if (opts && opts._rdInternal) {return;} + + const eventArgs = buildEventArgs(name, callback, context); + this._rdEvents = reduce(eventArgs, onReducer.bind(this), this._rdEvents || {}); + + return this; + }, + + // Remove one or many callbacks. If `context` is null, removes all + // callbacks with that function. If `callback` is null, removes all + // callbacks for the event. If `name` is null, removes all bound + // callbacks for all events. + off(name, callback, context, opts) { + if (!this._rdEvents) {return this;} + if (opts && opts._rdInternal) {return;} + + // Delete all event listeners and "drop" events. + if (!name && !context && !callback) { + this._rdEvents = void 0; + const listeners = this._rdListeners; + each(keys(listeners), listenerId => { + cleanupListener(listeners[listenerId]); + }); + return this; + } + + const eventArgs = buildEventArgs(name, callback, context); + + this._rdEvents = reduce(eventArgs, offReducer, this._rdEvents); + + return this; + }, + + // Bind an event to only be triggered a single time. After the first time + // the callback is invoked, its listener will be removed. If multiple events + // are passed in using the space-separated syntax, the handler will fire + // once for each event, not once for a combination of all events. + once(name, callback, context) { + const eventArgs = buildEventArgs(name, callback, context); + + this._rdEvents = reduce(eventArgs, onceReducer.bind(this), this._rdEvents || {}) + + return this; + }, + + // Inversion-of-control versions of `on`. Tell *this* object to listen to + // an event in another object... keeping track of what it's listening to + // for easier unbinding later. + listenTo(obj, name, callback) { + if (!obj) {return this;} + + const listener = getListener(obj, this); + const eventArgs = buildEventArgs(name, callback, this, listener); + each(eventArgs, listenToApi); + + return this; + }, + + // Inversion-of-control versions of `once`. + listenToOnce(obj, name, callback) { + if (!obj) {return this;} + + const listener = getListener(obj, this); + const eventArgs = buildEventArgs(name, callback, this, listener); + each(eventArgs, listenToOnceApi.bind(this)); + + return this; + }, + + // Tell this object to stop listening to either specific events ... or + // to every object it's currently listening to. + stopListening(obj, name, callback) { + const listeningTo = this._rdListeningTo; + if (!listeningTo) {return this;} + + const eventArgs = buildEventArgs(name, callback, this); + + const listenerIds = obj ? [obj._rdListenId] : keys(listeningTo); + for (let i = 0; i < listenerIds.length; i++) { + const listener = listeningTo[listenerIds[i]]; + + // If listening doesn't exist, this object is not currently + // listening to obj. Break out early. + if (!listener) {break;} + + each(eventArgs, args => { + const listenToObj = listener.obj; + const events = listenToObj._rdEvents; + + if (!events) {return;} + + listenToObj._rdEvents = offReducer(events, args); + + // Call `off` for interop + listenToObj.off(args.name, args.callback, this, { _reInternal: true }); + }); + } + + return this; + }, + + // Trigger one or many events, firing all bound callbacks. Callbacks are + // passed the same arguments as `trigger` is, apart from the event name + // (unless you're listening on `"all"`, which will cause your callback to + // receive the true name of the event as the first argument). + trigger(name, ...args) { + if (!this._rdEvents) {return this;} + + if (name && typeof name === 'object') { + each(keys(name), key => { + triggerApi({ + events: this._rdEvents, + name: key, + args: [name[key]], + }); + }); + } + + if (name && eventSplitter.test(name)) { + each(name.split(eventSplitter), n => { + triggerApi({ + events: this._rdEvents, + name: n, + args, + }); + }); + return this; + } + + triggerApi({ + events: this._rdEvents, + name, + args, + }); + + return this; + }, + + triggerMethod, +}; diff --git a/src/mixins/view-events.js b/src/mixins/view-events.js new file mode 100644 index 0000000000..9472bcd138 --- /dev/null +++ b/src/mixins/view-events.js @@ -0,0 +1,92 @@ +import { isString, isFunction, result, each } from 'underscore'; +import { isEnabled } from '../config/features'; +import EventDelegator from '../config/event-delegator'; + +const delegateEventSplitter = /^(\S+)\s*(.*)$/; + +// Internal method to create an event handler for a given `triggerDef` like +// 'click:foo' +function buildViewTrigger(view, triggerDef) { + if (isString(triggerDef)) { + triggerDef = {event: triggerDef}; + } + + const eventName = triggerDef.event; + + let shouldPreventDefault = !!triggerDef.preventDefault; + + if (isEnabled('triggersPreventDefault')) { + shouldPreventDefault = triggerDef.preventDefault !== false; + } + + let shouldStopPropagation = !!triggerDef.stopPropagation; + + if (isEnabled('triggersStopPropagation')) { + shouldStopPropagation = triggerDef.stopPropagation !== false; + } + + return function(event, ...args) { + if (shouldPreventDefault) { + event.preventDefault(); + } + + if (shouldStopPropagation) { + event.stopPropagation(); + } + + view.triggerMethod(eventName, view, event, ...args); + }; +} + +export default { + + EventDelegator, + + _initViewEvents() { + this._domEvents = []; + }, + + _undelegateViewEvents() { + this.EventDelegator.undelegateAll({ + events: this._domEvents, + rootEl: this.el + }); + }, + + _delegateViewEvents(view = this) { + const uiBindings = this._getUIBindings(); + this._delegateEvents(uiBindings); + this._delegateTriggers(uiBindings, view); + }, + + _delegateEvents(uiBindings) { + if (!this.events) { return; } + + each(result(this, 'events'), (handler, key) => { + if (!isFunction(handler)) { + handler = this[handler]; + } + if (!handler) { return; } + this._delegate(handler.bind(this), this.normalizeUIString(key, uiBindings)); + }); + }, + + _delegateTriggers(uiBindings, view) { + if (!this.triggers) { return; } + + each(result(this, 'triggers'), (value, key) => { + this._delegate(buildViewTrigger(view, value), this.normalizeUIString(key, uiBindings)); + }); + }, + + _delegate(handler, key) { + const match = key.match(delegateEventSplitter); + this.EventDelegator.delegate({ + eventName: match[1], + selector: match[2], + handler, + events: this._domEvents, + rootEl: this.el + }); + } +}; diff --git a/src/mixins/view.js b/src/mixins/view.js index 5120d9050d..28c9b10074 100644 --- a/src/mixins/view.js +++ b/src/mixins/view.js @@ -1,31 +1,62 @@ // ViewMixin // --------- -import Backbone from 'backbone'; -import _ from 'underscore'; +import { extend, result } from 'underscore'; import BehaviorsMixin from './behaviors'; import CommonMixin from './common'; import DelegateEntityEventsMixin from './delegate-entity-events'; import TemplateRenderMixin from './template-render'; -import TriggersMixin from './triggers'; import UIMixin from './ui'; +import ViewEvents from './view-events'; import { isEnabled } from '../config/features'; import DomApi from '../config/dom'; + // MixinOptions +// - attributes // - behaviors // - childViewEventPrefix // - childViewEvents // - childViewTriggers +// - className +// - collection // - collectionEvents +// - el +// - events +// - id +// - model // - modelEvents +// - tagName // - triggers // - ui const ViewMixin = { + tagName: 'div', + + // This is a noop method intended to be overridden + preinitialize() {}, + Dom: DomApi, + // Create an element from the `id`, `className` and `tagName` properties. + _getEl() { + if (!this.el) { + const el = this.Dom.createElement(result(this, 'tagName')); + const attrs = extend({}, result(this, 'attributes')); + if (this.id) {attrs.id = result(this, 'id');} + if (this.className) {attrs.class = result(this, 'className');} + this.Dom.setAttributes(el, attrs); + return el; + } + + return result(this, 'el'); + }, + + $(selector) { + return this.Dom.findEl(this.el, selector) + }, + _isElAttached() { return !!this.el && this.Dom.hasEl(this.Dom.getDocumentEl(this.el), this.el); }, @@ -51,48 +82,6 @@ const ViewMixin = { return !!this._isAttached; }, - // Overriding Backbone.View's `delegateEvents` to handle - // `events` and `triggers` - delegateEvents(events) { - this._proxyBehaviorViewProperties(); - this._buildEventProxies(); - - const combinedEvents = _.extend({}, - this._getBehaviorEvents(), - this._getEvents(events), - this._getBehaviorTriggers(), - this._getTriggers() - ); - - Backbone.View.prototype.delegateEvents.call(this, combinedEvents); - - return this; - }, - - // Allows Backbone.View events to utilize `@ui.` selectors - _getEvents(events) { - if (events) { - return this.normalizeUIKeys(events); - } - - if (!this.events) { return; } - - return this.normalizeUIKeys(_.result(this, 'events')); - }, - - // Configure `triggers` to forward DOM events to view - // events. `triggers: {"click .foo": "do:foo"}` - _getTriggers() { - if (!this.triggers) { return; } - - // Allow `triggers` to be configured as a function - const triggers = this.normalizeUIKeys(_.result(this, 'triggers')); - - // Configure the triggers, prevent default - // action and stop propagation of DOM events - return this._getViewTriggers(this, triggers); - }, - // Handle `modelEvents`, and `collectionEvents` configuration delegateEntityEvents() { this._delegateEntityEvents(this.model, this.collection); @@ -126,9 +115,10 @@ const ViewMixin = { // unbind UI elements this.unbindUIElements(); + this._undelegateViewEvents(); // remove the view from the DOM - this._removeElement(); + this.Dom.detachEl(this.el); if (shouldTriggerDetach) { this._isAttached = false; @@ -154,12 +144,6 @@ const ViewMixin = { return this; }, - // Equates to this.$el.remove - _removeElement() { - this.$el.off().removeData(); - this.Dom.detachEl(this.el, this.$el); - }, - // This method binds the elements specified in the "ui" hash bindUIElements() { this._bindUIElements(); @@ -182,14 +166,14 @@ const ViewMixin = { // Cache `childViewEvents` and `childViewTriggers` _buildEventProxies() { - this._childViewEvents = this.normalizeMethods(_.result(this, 'childViewEvents')); - this._childViewTriggers = _.result(this, 'childViewTriggers'); + this._childViewEvents = this.normalizeMethods(result(this, 'childViewEvents')); + this._childViewTriggers = result(this, 'childViewTriggers'); this._eventPrefix = this._getEventPrefix(); }, _getEventPrefix() { const defaultPrefix = isEnabled('childViewEventPrefix') ? 'childview' : false; - const prefix = _.result(this, 'childViewEventPrefix', defaultPrefix); + const prefix = result(this, 'childViewEventPrefix', defaultPrefix); return (prefix === false) ? prefix : prefix + ':'; }, @@ -222,6 +206,6 @@ const ViewMixin = { } }; -_.extend(ViewMixin, BehaviorsMixin, CommonMixin, DelegateEntityEventsMixin, TemplateRenderMixin, TriggersMixin, UIMixin); +extend(ViewMixin, BehaviorsMixin, CommonMixin, DelegateEntityEventsMixin, TemplateRenderMixin, UIMixin, ViewEvents); export default ViewMixin; diff --git a/src/region.js b/src/region.js index 131199ef3a..54d75dc8dd 100644 --- a/src/region.js +++ b/src/region.js @@ -1,12 +1,11 @@ // Region // ------ -import _ from 'underscore'; -import Backbone from 'backbone'; +import { extend as _extend, uniqueId, isObject, isFunction, result } from 'underscore'; import MarionetteError from './utils/error'; import extend from './utils/extend'; import monitorViewEvents from './common/monitor-view-events'; -import { renderView, destroyView } from './common/view'; +import { renderView, destroyView, isView } from './common/view'; import CommonMixin from './mixins/common'; import View from './view'; import DomApi, { setDomApi } from './config/dom'; @@ -22,16 +21,11 @@ const ClassOptions = [ const Region = function(options) { this._setOptions(options, ClassOptions); - this.cid = _.uniqueId(this.cidPrefix); + this.cid = uniqueId(this.cidPrefix); // getOption necessary because options.el may be passed as undefined this._initEl = this.el = this.getOption('el'); - // Handle when this.el is passed in as a $ wrapped element. - this.el = this.el instanceof Backbone.$ ? this.el[0] : this.el; - - this.$el = this._getEl(this.el); - this.initialize.apply(this, arguments); }; @@ -41,7 +35,7 @@ Region.setDomApi = setDomApi; // Region Methods // -------------- -_.extend(Region.prototype, CommonMixin, { +_extend(Region.prototype, CommonMixin, { Dom: DomApi, cidPrefix: 'mnr', @@ -49,9 +43,6 @@ _.extend(Region.prototype, CommonMixin, { _isReplaced: false, _isSwappingView: false, - // This is a noop method intended to be overridden - initialize() {}, - // Displays a view instance inside of the region. If necessary handles calling the `render` // method for you. Reads content directly from the `el` attribute. show(view, options) { @@ -95,7 +86,12 @@ _.extend(Region.prototype, CommonMixin, { return this; }, - _getEl(el) { + _setEl(el) { + if (isObject(el)) { + this.el = el; + return; + } + if (!el) { throw new MarionetteError({ name: classErrorName, @@ -104,20 +100,7 @@ _.extend(Region.prototype, CommonMixin, { }); } - return this.getEl(el); - }, - - _setEl() { - this.$el = this._getEl(this.el); - - if (this.$el.length) { - this.el = this.$el[0]; - } - - // Make sure the $el contains only the el - if (this.$el.length > 1) { - this.$el = this.Dom.getEl(this.el); - } + this.el = this.getEl(el); }, // Set the `el` of the region and move any current view to the new `el`. @@ -128,9 +111,7 @@ _.extend(Region.prototype, CommonMixin, { this._restoreEl(); - this.el = el; - - this._setEl(); + this._setEl(el); if (this.currentView) { const view = this.currentView; @@ -175,7 +156,7 @@ _.extend(Region.prototype, CommonMixin, { _attachView(view, { replaceElement } = {}) { const shouldTriggerAttach = !view._isAttached && this._isElAttached() && !this._shouldDisableMonitoring(); - const shouldReplaceEl = typeof replaceElement === 'undefined' ? !!_.result(this, 'replaceElement') : !!replaceElement; + const shouldReplaceEl = typeof replaceElement === 'undefined' ? !!result(this, 'replaceElement') : !!replaceElement; if (shouldTriggerAttach) { view.triggerMethod('before:attach', view); @@ -197,12 +178,10 @@ _.extend(Region.prototype, CommonMixin, { }, _ensureElement(options = {}) { - if (!_.isObject(this.el)) { - this._setEl(); - } + this._setEl(this.el); - if (!this.$el || this.$el.length === 0) { - const allowMissingEl = typeof options.allowMissingEl === 'undefined' ? !!_.result(this, 'allowMissingEl') : !!options.allowMissingEl; + if (!this.el) { + const allowMissingEl = typeof options.allowMissingEl === 'undefined' ? !!result(this, 'allowMissingEl') : !!options.allowMissingEl; if (allowMissingEl) { return false; @@ -234,7 +213,7 @@ _.extend(Region.prototype, CommonMixin, { }); } - if (view instanceof Backbone.View) { + if (isView(view)) { return view; } @@ -246,11 +225,11 @@ _.extend(Region.prototype, CommonMixin, { // This allows for a template or a static string to be // used as a template _getViewOptions(viewOptions) { - if (_.isFunction(viewOptions)) { + if (isFunction(viewOptions)) { return { template: viewOptions }; } - if (_.isObject(viewOptions)) { + if (isObject(viewOptions)) { return viewOptions; } @@ -262,13 +241,9 @@ _.extend(Region.prototype, CommonMixin, { // Override this method to change how the region finds the DOM element that it manages. Return // a jQuery selector object scoped to a provided parent el or the document if none exists. getEl(el) { - const context = _.result(this, 'parentEl'); - - if (context && _.isString(el)) { - return this.Dom.findEl(context, el); - } + const context = result(this, 'parentEl'); - return this.Dom.getEl(el); + return this.Dom.findEl(context || document, el)[0]; }, _replaceEl(view) { @@ -313,7 +288,7 @@ _.extend(Region.prototype, CommonMixin, { // Override this method to change how the new view is appended to the `$el` that the // region is managing attachHtml(view) { - this.Dom.appendContents(this.el, view.el, {_$el: this.$el, _$contents: view.$el}); + this.Dom.appendContents(this.el, view.el); }, // Destroy the current view, if there is one. If there is no current view, @@ -413,7 +388,7 @@ _.extend(Region.prototype, CommonMixin, { // Override this method to change how the region detaches current content detachHtml() { - this.Dom.detachContents(this.el, this.$el); + this.Dom.detachContents(this.el); }, // Checks whether a view is currently present within the region. Returns `true` if there is diff --git a/src/utils/build-event-args.js b/src/utils/build-event-args.js new file mode 100644 index 0000000000..054009be3f --- /dev/null +++ b/src/utils/build-event-args.js @@ -0,0 +1,24 @@ +import { reduce, keys } from 'underscore'; + +// Regular expression used to split event strings. +export const eventSplitter = /\s+/; + +// Iterates over the standard `event, callback` (as well as the fancy multiple +// space-separated events `"change blur", callback` and jQuery-style event +// maps `{event: callback}`). +export default function buildEventArgs(name, callback, context, listener) { + if (name && typeof name === 'object') { + return reduce(keys(name), (eventArgs, key) => { + return eventArgs.concat(buildEventArgs(key, name[key], context || callback, listener)); + }, []); + } + + if (name && eventSplitter.test(name)) { + return reduce(name.split(eventSplitter), (eventArgs, n) => { + eventArgs.push({ name: n, callback, context, listener }); + return eventArgs; + }, []); + } + + return [{ name, callback, context, listener }]; +} diff --git a/src/utils/call-handler.js b/src/utils/call-handler.js new file mode 100644 index 0000000000..390887a4c2 --- /dev/null +++ b/src/utils/call-handler.js @@ -0,0 +1,10 @@ +// An optimized way to execute callbacks. +export default function callHandler(callback, context, args = []) { + switch (args.length) { + case 0: return callback.call(context); + case 1: return callback.call(context, args[0]); + case 2: return callback.call(context, args[0], args[1]); + case 3: return callback.call(context, args[0], args[1], args[2]); + default: return callback.apply(context, args); + } +} diff --git a/src/utils/extend.js b/src/utils/extend.js index d5b73d473b..ce41ea35f3 100644 --- a/src/utils/extend.js +++ b/src/utils/extend.js @@ -1,9 +1,33 @@ // Marionette.extend // ----------------- -import Backbone from 'backbone'; +import { has, extend, create } from 'underscore'; -// Borrow the Backbone `extend` method so we can use it as needed -const extend = Backbone.Model.extend; +// Borrowed from backbone.js +export default function(protoProps, staticProps) { + const parent = this; + let child; -export default extend; + // The constructor function for the new subclass is either defined by you + // (the "constructor" property in your `extend` definition), or defaulted + // by us to simply call the parent constructor. + if (protoProps && has(protoProps, 'constructor')) { + child = protoProps.constructor; + } else { + child = function() { return parent.apply(this, arguments); }; + } + + // Add static properties to the constructor function, if supplied. + extend(child, parent, staticProps); + + // Set the prototype chain to inherit from `parent`, without calling + // `parent`'s constructor function and add the prototype properties. + child.prototype = create(parent.prototype, protoProps); + child.prototype.constructor = child; + + // Set a convenience property in case the parent's prototype is needed + // later. + child.__super__ = parent.prototype; + + return child; +} diff --git a/src/utils/make-callback.js b/src/utils/make-callback.js new file mode 100644 index 0000000000..d2d971dd7a --- /dev/null +++ b/src/utils/make-callback.js @@ -0,0 +1,9 @@ +// If callback is not a function return the callback and flag it for removal +export default function makeCallback(callback) { + if (typeof callback === 'function') { + return callback; + } + const result = function() { return callback; }; + result._callback = callback; + return result; +} diff --git a/src/utils/once-wrap.js b/src/utils/once-wrap.js new file mode 100644 index 0000000000..d47ea31376 --- /dev/null +++ b/src/utils/once-wrap.js @@ -0,0 +1,14 @@ +import { once } from 'underscore'; + +// Wrap callback in a once. Returns for requests +// `offCallback` unbinds the `onceWrapper` after it has been called. +export default function onceWrap(callback, offCallback) { + const onceCallback = once(function() { + offCallback(onceCallback); + return callback.apply(this, arguments); + }); + + onceCallback._callback = callback; + + return onceCallback; +} diff --git a/src/view.js b/src/view.js index 7cb1c3c546..a8acd207a3 100644 --- a/src/view.js +++ b/src/view.js @@ -1,24 +1,32 @@ // View // --------- -import _ from 'underscore'; -import Backbone from 'backbone'; +import { extend as _extend, uniqueId, reduce } from 'underscore'; +import extend from './utils/extend'; import monitorViewEvents from './common/monitor-view-events'; import ViewMixin from './mixins/view'; import RegionsMixin from './mixins/regions'; import { setDomApi } from './config/dom'; +import { setEventDelegator } from './config/event-delegator'; import { setRenderer } from './config/renderer'; const ClassOptions = [ + 'attributes', 'behaviors', 'childViewEventPrefix', 'childViewEvents', 'childViewTriggers', + 'className', + 'collection', 'collectionEvents', + 'el', 'events', + 'id', + 'model', 'modelEvents', 'regionClass', 'regions', + 'tagName', 'template', 'templateContext', 'triggers', @@ -36,28 +44,37 @@ function childReducer(children, region) { // The standard view. Includes view events, automatic rendering // templates, nested views, and more. -const View = Backbone.View.extend({ +const View = function(options) { + this.cid = uniqueId(this.cidPrefix); + this._setOptions(options, ClassOptions); - constructor(options) { - this._setOptions(options, ClassOptions); + this.preinitialize.apply(this, arguments); - monitorViewEvents(this); + this._initViewEvents(); + this.setElement(this._getEl()); - this._initBehaviors(); - this._initRegions(); + monitorViewEvents(this); - Backbone.View.prototype.constructor.apply(this, arguments); + this._initBehaviors(); + this._initRegions(); + this._buildEventProxies(); - this.delegateEntityEvents(); + this.initialize.apply(this, arguments); - this._triggerEventOnBehaviors('initialize', this, options); - }, + this.delegateEntityEvents(); + + this._triggerEventOnBehaviors('initialize', this, options); +}; + +_extend(View, { extend, setRenderer, setDomApi, setEventDelegator }); - // Overriding Backbone.View's `setElement` to handle - // if an el was previously defined. If so, the view might be - // rendered or attached on setElement. - setElement() { - Backbone.View.prototype.setElement.apply(this, arguments); +_extend(View.prototype, ViewMixin, RegionsMixin, { + cidPrefix: 'mnv', + + setElement(element) { + this._undelegateViewEvents(); + this.el = element; + this._setBehaviorElements(); this._isRendered = this.Dom.hasContents(this.el); this._isAttached = this._isElAttached(); @@ -66,6 +83,8 @@ const View = Backbone.View.extend({ this.bindUIElements(); } + this._delegateViewEvents(); + return this; }, @@ -99,13 +118,8 @@ const View = Backbone.View.extend({ }, _getImmediateChildren() { - return _.reduce(this._regions, childReducer, []); + return reduce(this._regions, childReducer, []); } -}, { - setRenderer, - setDomApi }); -_.extend(View.prototype, ViewMixin, RegionsMixin); - export default View;