dist/ember-template-compiler.js in ember-source-2.14.0.beta.2 vs dist/ember-template-compiler.js in ember-source-2.14.0.beta.3
- old
+ new
@@ -4,11 +4,11 @@
* @copyright Copyright 2011-2017 Tilde Inc. and contributors
* Portions Copyright 2006-2011 Strobe Inc.
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
* @license Licensed under MIT license
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
- * @version 2.14.0-beta.2
+ * @version 2.14.0-beta.3
*/
var enifed, requireModule, Ember;
var mainContext = this; // Used in ember-environment/lib/global.js
@@ -4768,16 +4768,16 @@
this.isDestroyed = false;
}
Container.prototype = {
lookup: function (fullName, options) {
- true && (0, _emberDebug.assert)('fullName must be a proper full name', this.registry.validateFullName(fullName));
+ true && !this.registry.validateFullName(fullName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.registry.validateFullName(fullName));
return lookup(this, this.registry.normalize(fullName), options);
},
lookupFactory: function (fullName, options) {
- true && (0, _emberDebug.assert)('fullName must be a proper full name', this.registry.validateFullName(fullName));
+ true && !this.registry.validateFullName(fullName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.registry.validateFullName(fullName));
true && !false && (0, _emberDebug.deprecate)('Using "_lookupFactory" is deprecated. Please use container.factoryFor instead.', false, { id: 'container-lookupFactory', until: '2.13.0', url: 'http://emberjs.com/deprecations/v2.x/#toc_migrating-from-_lookupfactory-to-factoryfor' });
return deprecatedFactoryFor(this, this.registry.normalize(fullName), options);
},
destroy: function () {
@@ -4799,11 +4799,11 @@
factoryFor: function (fullName) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var normalizedName = this.registry.normalize(fullName);
- true && (0, _emberDebug.assert)('fullName must be a proper full name', this.registry.validateFullName(normalizedName));
+ true && !this.registry.validateFullName(normalizedName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.registry.validateFullName(normalizedName));
if (options.source) {
normalizedName = this.registry.expandLocalLookup(fullName, options);
// if expandLocalLookup returns falsey, we do not support local lookup
if (!normalizedName) {
@@ -5380,11 +5380,11 @@
container: function (options) {
return new Container(this, options);
},
register: function (fullName, factory) {
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
- true && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName));
+ true && !this.validateFullName(fullName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName));
if (factory === undefined) {
throw new TypeError('Attempting to register an unknown factory: \'' + fullName + '\'');
}
@@ -5397,11 +5397,11 @@
delete this._failCache[normalizedName];
this.registrations[normalizedName] = factory;
this._options[normalizedName] = options;
},
unregister: function (fullName) {
- true && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName));
+ true && !this.validateFullName(fullName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName));
var normalizedName = this.normalize(fullName);
this._localLookupCache = Object.create(null);
@@ -5409,11 +5409,11 @@
delete this._resolveCache[normalizedName];
delete this._failCache[normalizedName];
delete this._options[normalizedName];
},
resolve: function (fullName, options) {
- true && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName));
+ true && !this.validateFullName(fullName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName));
var factory = resolve(this, this.normalize(fullName), options),
_fallback;
if (factory === undefined && this.fallback) {
@@ -5500,11 +5500,11 @@
} else if (this.fallback) {
return this.fallback.getOption(fullName, optionName);
}
},
typeInjection: function (type, property, fullName) {
- true && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName));
+ true && !this.validateFullName(fullName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName));
var fullNameType = fullName.split(':')[0];
if (fullNameType === type) {
throw new Error('Cannot inject a \'' + fullName + '\' on other ' + type + '(s).');
}
@@ -5522,11 +5522,11 @@
if (fullName.indexOf(':') === -1) {
return this.typeInjection(fullName, property, normalizedInjectionName);
}
- true && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName));
+ true && !this.validateFullName(fullName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName));
var normalizedName = this.normalize(fullName);
var injections = this._injections[normalizedName] || (this._injections[normalizedName] = []);
@@ -5608,19 +5608,19 @@
i;
for (i = 0; i < injections.length; i++) {
fullName = injections[i].fullName;
- true && (0, _emberDebug.assert)('Attempting to inject an unknown injection: \'' + fullName + '\'', this.has(fullName));
+ true && !this.has(fullName) && (0, _emberDebug.assert)('Attempting to inject an unknown injection: \'' + fullName + '\'', this.has(fullName));
}
},
normalizeInjectionsHash: function (hash) {
var injections = [];
for (var key in hash) {
if (hash.hasOwnProperty(key)) {
- true && (0, _emberDebug.assert)('Expected a proper full name, given \'' + hash[key] + '\'', this.validateFullName(hash[key]));
+ true && !this.validateFullName(hash[key]) && (0, _emberDebug.assert)('Expected a proper full name, given \'' + hash[key] + '\'', this.validateFullName(hash[key]));
injections.push({
property: key,
fullName: hash[key]
});
@@ -5687,13 +5687,13 @@
*/
Registry.prototype.expandLocalLookup = function (fullName, options) {
var normalizedFullName, normalizedSource;
if (this.resolver && this.resolver.expandLocalLookup) {
- true && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName));
- true && (0, _emberDebug.assert)('options.source must be provided to expandLocalLookup', options && options.source);
- true && (0, _emberDebug.assert)('options.source must be a proper full name', this.validateFullName(options.source));
+ true && !this.validateFullName(fullName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName));
+ true && !(options && options.source) && (0, _emberDebug.assert)('options.source must be provided to expandLocalLookup', options && options.source);
+ true && !this.validateFullName(options.source) && (0, _emberDebug.assert)('options.source must be a proper full name', this.validateFullName(options.source));
normalizedFullName = this.normalize(fullName);
normalizedSource = this.normalize(options.source);
@@ -5998,15 +5998,18 @@
exports.default = index;
});
enifed('ember-debug/deprecate', ['exports', 'ember-debug/error', 'ember-console', 'ember-environment', 'ember-debug/handlers'], function (exports, _error, _emberConsole, _emberEnvironment, _handlers) {
'use strict';
- exports.missingOptionsUntilDeprecation = exports.missingOptionsIdDeprecation = exports.missingOptionsDeprecation = undefined;
- exports.registerHandler = registerHandler;
- exports.default = deprecate;
+ exports.missingOptionsUntilDeprecation = exports.missingOptionsIdDeprecation = exports.missingOptionsDeprecation = exports.registerHandler = undefined;
/**
+ @module ember
+ @submodule ember-debug
+ */
+
+ /**
Allows for runtime registration of handler functions that override the default deprecation behavior.
Deprecations are invoked by calls to [Ember.deprecate](http://emberjs.com/api/classes/Ember.html#method_deprecate).
The following example demonstrates its usage by registering a handler that throws an error if the
message contains the word "should", otherwise defers to the default handler.
@@ -6037,17 +6040,22 @@
@static
@method registerDeprecationHandler
@param handler {Function} A function to handle deprecation calls.
@since 2.1.0
*/
- /*global __fail__*/
+ var registerHandler = function () {}; /*global __fail__*/
- function registerHandler(handler) {
+ var missingOptionsDeprecation = void 0,
+ missingOptionsIdDeprecation = void 0,
+ missingOptionsUntilDeprecation = void 0,
+ deprecate = void 0;
+
+ exports.registerHandler = registerHandler = function (handler) {
(0, _handlers.registerHandler)('deprecate', handler);
- }
+ };
- function formatMessage(_message, options) {
+ var formatMessage = function (_message, options) {
var message = _message;
if (options && options.id) {
message = message + (' [deprecation id: ' + options.id + ']');
}
@@ -6055,11 +6063,11 @@
if (options && options.url) {
message += ' See ' + options.url + ' for more details.';
}
return message;
- }
+ };
registerHandler(function (message, options) {
var updatedMessage = formatMessage(message, options);
_emberConsole.default.warn('DEPRECATION: ' + updatedMessage);
@@ -6123,27 +6131,20 @@
} else {
next.apply(undefined, arguments);
}
});
- var missingOptionsDeprecation = exports.missingOptionsDeprecation = 'When calling `Ember.deprecate` you ' + 'must provide an `options` hash as the third parameter. ' + '`options` should include `id` and `until` properties.';
- var missingOptionsIdDeprecation = exports.missingOptionsIdDeprecation = 'When calling `Ember.deprecate` you must provide `id` in options.';
- var missingOptionsUntilDeprecation = exports.missingOptionsUntilDeprecation = 'When calling `Ember.deprecate` you must provide `until` in options.';
+ exports.missingOptionsDeprecation = missingOptionsDeprecation = 'When calling `Ember.deprecate` you ' + 'must provide an `options` hash as the third parameter. ' + '`options` should include `id` and `until` properties.';
+ exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation = 'When calling `Ember.deprecate` you must provide `id` in options.';
+ exports.missingOptionsUntilDeprecation = missingOptionsUntilDeprecation = 'When calling `Ember.deprecate` you must provide `until` in options.';
/**
- @module ember
- @submodule ember-debug
- */
-
- /**
Display a deprecation warning with the provided message and a stack trace
(Chrome and Firefox only).
-
- * In a production build, this method is defined as an empty function (NOP).
+ * In a production build, this method is defined as an empty function (NOP).
Uses of this method in Ember itself are stripped from the ember.prod.js build.
-
- @method deprecate
+ @method deprecate
@param {String} message A description of the deprecation.
@param {Boolean} test A boolean. If falsy, the deprecation will be displayed.
@param {Object} options
@param {String} options.id A unique id for this deprecation. The id can be
used by Ember debugging tools to change the behavior (raise, log or silence)
@@ -6155,11 +6156,11 @@
emberjs.com website.
@for Ember
@public
@since 1.0.0
*/
- function deprecate(message, test, options) {
+ deprecate = function deprecate(message, test, options) {
if (!options || !options.id && !options.until) {
deprecate(missingOptionsDeprecation, false, {
id: 'ember-debug.deprecate-options-missing',
until: '3.0.0',
url: 'http://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options'
@@ -6181,11 +6182,18 @@
url: 'http://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options'
});
}
_handlers.invoke.apply(undefined, ['deprecate'].concat(Array.prototype.slice.call(arguments)));
- }
+ };
+
+
+ exports.default = deprecate;
+ exports.registerHandler = registerHandler;
+ exports.missingOptionsDeprecation = missingOptionsDeprecation;
+ exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation;
+ exports.missingOptionsUntilDeprecation = missingOptionsUntilDeprecation;
});
enifed("ember-debug/error", ["exports", "ember-babel"], function (exports, _emberBabel) {
"use strict";
/**
@@ -6290,37 +6298,46 @@
return false;
}
};
var FEATURES = _features.FEATURES;
});
-enifed("ember-debug/handlers", ["exports"], function (exports) {
- "use strict";
+enifed('ember-debug/handlers', ['exports'], function (exports) {
+ 'use strict';
- exports.registerHandler = function (type, callback) {
+ var HANDLERS = exports.HANDLERS = {};
+
+ var registerHandler = function () {};
+ var invoke = function () {};
+
+ exports.registerHandler = registerHandler = function (type, callback) {
var nextHandler = HANDLERS[type] || function () {};
HANDLERS[type] = function (message, options) {
callback(message, options, nextHandler);
};
};
- exports.invoke = function (type, message, test, options) {
+
+ exports.invoke = invoke = function (type, message, test, options) {
if (test) {
return;
}
var handlerForType = HANDLERS[type];
if (handlerForType) {
handlerForType(message, options);
}
};
- var HANDLERS = exports.HANDLERS = {};
+
+
+ exports.registerHandler = registerHandler;
+ exports.invoke = invoke;
});
enifed('ember-debug/index', ['exports', 'ember-debug/warn', 'ember-debug/deprecate', 'ember-debug/features', 'ember-debug/error', 'ember-debug/testing', 'ember-environment', 'ember-console', 'ember/features'], function (exports, _warn2, _deprecate2, _features, _error, _testing, _emberEnvironment, _emberConsole, _features2) {
'use strict';
- exports.runningNonEmberDebugJS = exports.debugFunctions = exports.setTesting = exports.isTesting = exports.Error = exports.isFeatureEnabled = exports.registerDeprecationHandler = exports.registerWarnHandler = undefined;
+ exports._warnIfUsingStrippedFeatureFlags = exports.getDebugFunction = exports.setDebugFunction = exports.deprecateFunc = exports.runInDebug = exports.debugFreeze = exports.debugSeal = exports.deprecate = exports.debug = exports.warn = exports.info = exports.assert = exports.setTesting = exports.isTesting = exports.Error = exports.isFeatureEnabled = exports.registerDeprecationHandler = exports.registerWarnHandler = undefined;
Object.defineProperty(exports, 'registerWarnHandler', {
enumerable: true,
get: function () {
return _warn2.registerHandler;
}
@@ -6353,56 +6370,79 @@
enumerable: true,
get: function () {
return _testing.setTesting;
}
});
- exports._warnIfUsingStrippedFeatureFlags = _warnIfUsingStrippedFeatureFlags;
- exports.getDebugFunction = function (name) {
- return debugFunctions[name];
- };
- exports.setDebugFunction = setDebugFunction;
- exports.assert = function () {
- return debugFunctions.assert.apply(undefined, arguments);
- };
- exports.info = function () {
- return debugFunctions.info.apply(undefined, arguments);
- };
- exports.warn = warn;
- exports.debug = debug;
- exports.deprecate = deprecate;
- exports.deprecateFunc = function () {
- return debugFunctions.deprecateFunc.apply(undefined, arguments);
- };
- exports.runInDebug = function () {
- return debugFunctions.runInDebug.apply(undefined, arguments);
- };
- exports.debugSeal = function () {
- return debugFunctions.debugSeal.apply(undefined, arguments);
- };
- exports.debugFreeze = function () {
- return debugFunctions.debugFreeze.apply(undefined, arguments);
- };
var DEFAULT_FEATURES = _features2.DEFAULT_FEATURES,
FEATURES = _features2.FEATURES,
featuresWereStripped,
isFirefox,
isChrome;
- var debugFunctions = exports.debugFunctions = {
- assert: function () {},
- info: function () {},
- warn: function () {},
- debug: function () {},
- deprecate: function () {},
- deprecateFunc: function () {
- var _ref;
- return _ref = arguments.length - 1, arguments.length <= _ref ? undefined : arguments[_ref];
- },
- debugSeal: function () {},
- debugFreeze: function () {}
+ // These are the default production build versions:
+ var assert = function () {};
+ var info = function () {};
+ var warn = function () {};
+ var debug = function () {};
+ var deprecate = function () {};
+ var debugSeal = function () {};
+ var debugFreeze = function () {};
+ var runInDebug = function () {};
+
+ var deprecateFunc = function () {
+ return arguments[arguments.length - 1];
};
+ var setDebugFunction = function () {};
+ var getDebugFunction = function () {};
+
+ exports.setDebugFunction = setDebugFunction = function (type, callback) {
+ switch (type) {
+ case 'assert':
+ return exports.assert = assert = callback;
+ case 'info':
+ return exports.info = info = callback;
+ case 'warn':
+ return exports.warn = warn = callback;
+ case 'debug':
+ return exports.debug = debug = callback;
+ case 'deprecate':
+ return exports.deprecate = deprecate = callback;
+ case 'debugSeal':
+ return exports.debugSeal = debugSeal = callback;
+ case 'debugFreeze':
+ return exports.debugFreeze = debugFreeze = callback;
+ case 'runInDebug':
+ return exports.runInDebug = runInDebug = callback;
+ case 'deprecateFunc':
+ return exports.deprecateFunc = deprecateFunc = callback;
+ }
+ };
+
+ exports.getDebugFunction = getDebugFunction = function (type) {
+ switch (type) {
+ case 'assert':
+ return assert;
+ case 'info':
+ return info;
+ case 'warn':
+ return warn;
+ case 'debug':
+ return debug;
+ case 'deprecate':
+ return deprecate;
+ case 'debugSeal':
+ return debugSeal;
+ case 'debugFreeze':
+ return debugFreeze;
+ case 'runInDebug':
+ return runInDebug;
+ case 'deprecateFunc':
+ return deprecateFunc;
+ }
+ };
+
/**
@module ember
@submodule ember-debug
*/
@@ -6411,23 +6451,19 @@
@public
*/
/**
Define an assertion that will throw an exception if the condition is not met.
-
- * In a production build, this method is defined as an empty function (NOP).
+ * In a production build, this method is defined as an empty function (NOP).
Uses of this method in Ember itself are stripped from the ember.prod.js build.
-
- ```javascript
+ ```javascript
// Test for truthiness
Ember.assert('Must pass a valid object', obj);
-
- // Fail unconditionally
+ // Fail unconditionally
Ember.assert('This code path should never be run');
```
-
- @method assert
+ @method assert
@param {String} desc A description of the assertion. This will become
the text of the Error thrown if the assertion fails.
@param {Boolean} test Must be truthy for the assertion to pass. If
falsy, an exception will be thrown.
@public
@@ -6439,52 +6475,43 @@
}
});
/**
Display a debug notice.
-
- * In a production build, this method is defined as an empty function (NOP).
+ * In a production build, this method is defined as an empty function (NOP).
Uses of this method in Ember itself are stripped from the ember.prod.js build.
-
- ```javascript
+ ```javascript
Ember.debug('I\'m a debug notice!');
```
-
- @method debug
+ @method debug
@param {String} message A debug message to display.
@public
*/
setDebugFunction('debug', function (message) {
_emberConsole.default.debug('DEBUG: ' + message);
});
/**
Display an info notice.
-
- * In a production build, this method is defined as an empty function (NOP).
+ * In a production build, this method is defined as an empty function (NOP).
Uses of this method in Ember itself are stripped from the ember.prod.js build.
-
- @method info
+ @method info
@private
*/
setDebugFunction('info', function () {
_emberConsole.default.info.apply(undefined, arguments);
});
/**
Alias an old, deprecated method with its new counterpart.
-
- Display a deprecation warning with the provided message and a stack trace
+ Display a deprecation warning with the provided message and a stack trace
(Chrome and Firefox only) when the assigned method is called.
-
- * In a production build, this method is defined as an empty function (NOP).
-
- ```javascript
+ * In a production build, this method is defined as an empty function (NOP).
+ ```javascript
Ember.oldMethod = Ember.deprecateFunc('Please use the new, updated method', Ember.newMethod);
```
-
- @method deprecateFunc
+ @method deprecateFunc
@param {String} message A description of the deprecation.
@param {Object} [options] The options object for Ember.deprecate.
@param {Function} func The new function called to replace its deprecated counterpart.
@return {Function} A new function that wraps the original function with a deprecation warning
@private
@@ -6515,25 +6542,22 @@
}
});
/**
Run a function meant for debugging.
-
- * In a production build, this method is defined as an empty function (NOP).
+ * In a production build, this method is defined as an empty function (NOP).
Uses of this method in Ember itself are stripped from the ember.prod.js build.
-
- ```javascript
+ ```javascript
Ember.runInDebug(() => {
Ember.Component.reopen({
didInsertElement() {
console.log("I'm happy");
}
});
});
```
-
- @method runInDebug
+ @method runInDebug
@param {Function} func The function to be executed.
@since 1.5.0
@public
*/
setDebugFunction('runInDebug', function (func) {
@@ -6550,41 +6574,42 @@
setDebugFunction('deprecate', _deprecate2.default);
setDebugFunction('warn', _warn2.default);
- /**
- Will call `Ember.warn()` if ENABLE_OPTIONAL_FEATURES or
- any specific FEATURES flag is truthy.
-
- This method is called automatically in debug canary builds.
-
- @private
- @method _warnIfUsingStrippedFeatureFlags
- @return {void}
- */
- function _warnIfUsingStrippedFeatureFlags(FEATURES, knownFeatures, featuresWereStripped) {
- var keys, i, key;
- if (featuresWereStripped) {
- warn('Ember.ENV.ENABLE_OPTIONAL_FEATURES is only available in canary builds.', !_emberEnvironment.ENV.ENABLE_OPTIONAL_FEATURES, { id: 'ember-debug.feature-flag-with-features-stripped' });
+ var _warnIfUsingStrippedFeatureFlags = void 0;
- keys = Object.keys(FEATURES || {});
+ if (true && !(0, _testing.isTesting)()) {
+ /**
+ Will call `Ember.warn()` if ENABLE_OPTIONAL_FEATURES or
+ any specific FEATURES flag is truthy.
+ This method is called automatically in debug canary builds.
+ @private
+ @method _warnIfUsingStrippedFeatureFlags
+ @return {void}
+ */
+ exports._warnIfUsingStrippedFeatureFlags = _warnIfUsingStrippedFeatureFlags = function (FEATURES, knownFeatures, featuresWereStripped) {
+ var keys, i, key;
- for (i = 0; i < keys.length; i++) {
- key = keys[i];
+ if (featuresWereStripped) {
+ warn('Ember.ENV.ENABLE_OPTIONAL_FEATURES is only available in canary builds.', !_emberEnvironment.ENV.ENABLE_OPTIONAL_FEATURES, { id: 'ember-debug.feature-flag-with-features-stripped' });
- if (key === 'isEnabled' || !(key in knownFeatures)) {
- continue;
- }
+ keys = Object.keys(FEATURES || {});
- warn('FEATURE["' + key + '"] is set as enabled, but FEATURE flags are only available in canary builds.', !FEATURES[key], { id: 'ember-debug.feature-flag-with-features-stripped' });
+ for (i = 0; i < keys.length; i++) {
+ key = keys[i];
+
+ if (key === 'isEnabled' || !(key in knownFeatures)) {
+ continue;
+ }
+
+ warn('FEATURE["' + key + '"] is set as enabled, but FEATURE flags are only available in canary builds.', !FEATURES[key], { id: 'ember-debug.feature-flag-with-features-stripped' });
+ }
}
- }
- }
+ };
- if (!(0, _testing.isTesting)()) {
// Complain if they're using FEATURE flags in builds other than canary
FEATURES['features-stripped-test'] = true;
featuresWereStripped = true;
@@ -6618,42 +6643,23 @@
}
}, false);
}
}
- /*
- We are transitioning away from `ember.js` to `ember.debug.js` to make
- it much clearer that it is only for local development purposes.
-
- This flag value is changed by the tooling (by a simple string replacement)
- so that if `ember.js` (which must be output for backwards compat reasons) is
- used a nice helpful warning message will be printed out.
- */
- var runningNonEmberDebugJS = exports.runningNonEmberDebugJS = false;
- if (runningNonEmberDebugJS) {
- warn('Please use `ember.debug.js` instead of `ember.js` for development and debugging.');
- }
-
- function setDebugFunction(name, fn) {
- debugFunctions[name] = fn;
- }
-
- function warn() {
- return debugFunctions.warn.apply(undefined, arguments);
- }
-
- function debug() {
- return debugFunctions.debug.apply(undefined, arguments);
- }
-
- function deprecate() {
- return debugFunctions.deprecate.apply(undefined, arguments);
- }
+ exports.assert = assert;
+ exports.info = info;
+ exports.warn = warn;
+ exports.debug = debug;
+ exports.deprecate = deprecate;
+ exports.debugSeal = debugSeal;
+ exports.debugFreeze = debugFreeze;
+ exports.runInDebug = runInDebug;
+ exports.deprecateFunc = deprecateFunc;
+ exports.setDebugFunction = setDebugFunction;
+ exports.getDebugFunction = getDebugFunction;
+ exports._warnIfUsingStrippedFeatureFlags = _warnIfUsingStrippedFeatureFlags;
});
-enifed("ember-debug/run-in-debug", [], function () {
- "use strict";
-});
enifed("ember-debug/testing", ["exports"], function (exports) {
"use strict";
exports.isTesting = function () {
return testing;
@@ -6664,26 +6670,65 @@
var testing = false;
});
enifed('ember-debug/warn', ['exports', 'ember-console', 'ember-debug/deprecate', 'ember-debug/handlers'], function (exports, _emberConsole, _deprecate, _handlers) {
'use strict';
- exports.missingOptionsIdDeprecation = exports.missingOptionsDeprecation = undefined;
- exports.registerHandler = registerHandler;
- exports.default =
+ exports.missingOptionsDeprecation = exports.missingOptionsIdDeprecation = exports.registerHandler = undefined;
+ var registerHandler = function () {};
+ var warn = function () {};
+ var missingOptionsDeprecation = void 0,
+ missingOptionsIdDeprecation = void 0;
+
/**
@module ember
@submodule ember-debug
*/
/**
+ Allows for runtime registration of handler functions that override the default warning behavior.
+ Warnings are invoked by calls made to [Ember.warn](http://emberjs.com/api/classes/Ember.html#method_warn).
+ The following example demonstrates its usage by registering a handler that does nothing overriding Ember's
+ default warning behavior.
+ ```javascript
+ // next is not called, so no warnings get the default behavior
+ Ember.Debug.registerWarnHandler(() => {});
+ ```
+ The handler function takes the following arguments:
+ <ul>
+ <li> <code>message</code> - The message received from the warn call. </li>
+ <li> <code>options</code> - An object passed in with the warn call containing additional information including:</li>
+ <ul>
+ <li> <code>id</code> - An id of the warning in the form of <code>package-name.specific-warning</code>.</li>
+ </ul>
+ <li> <code>next</code> - A function that calls into the previously registered handler.</li>
+ </ul>
+ @public
+ @static
+ @method registerWarnHandler
+ @param handler {Function} A function to handle warnings.
+ @since 2.1.0
+ */
+ exports.registerHandler = registerHandler = function (handler) {
+ (0, _handlers.registerHandler)('warn', handler);
+ };
+
+ registerHandler(function (message) {
+ _emberConsole.default.warn('WARNING: ' + message);
+ if ('trace' in _emberConsole.default) {
+ _emberConsole.default.trace();
+ }
+ });
+
+ exports.missingOptionsDeprecation = missingOptionsDeprecation = 'When calling `Ember.warn` you ' + 'must provide an `options` hash as the third parameter. ' + '`options` should include an `id` property.';
+ exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation = 'When calling `Ember.warn` you must provide `id` in options.';
+
+ /**
Display a warning with the provided message.
-
- * In a production build, this method is defined as an empty function (NOP).
+ * In a production build, this method is defined as an empty function (NOP).
Uses of this method in Ember itself are stripped from the ember.prod.js build.
-
- @method warn
+ @method warn
@param {String} message A warning to display.
@param {Boolean} test An optional boolean. If falsy, the warning
will be displayed.
@param {Object} options An object that can be used to pass a unique
`id` for this warning. The `id` can be used by Ember debugging tools
@@ -6691,11 +6736,11 @@
The `id` should be namespaced by dots, e.g. "ember-debug.feature-flag-with-features-stripped"
@for Ember
@public
@since 1.0.0
*/
- function (message, test, options) {
+ warn = function (message, test, options) {
if (arguments.length === 2 && typeof test === 'object') {
options = test;
test = false;
}
if (!options) {
@@ -6715,51 +6760,15 @@
}
(0, _handlers.invoke)('warn', message, test, options);
};
- /**
- Allows for runtime registration of handler functions that override the default warning behavior.
- Warnings are invoked by calls made to [Ember.warn](http://emberjs.com/api/classes/Ember.html#method_warn).
- The following example demonstrates its usage by registering a handler that does nothing overriding Ember's
- default warning behavior.
-
- ```javascript
- // next is not called, so no warnings get the default behavior
- Ember.Debug.registerWarnHandler(() => {});
- ```
-
- The handler function takes the following arguments:
-
- <ul>
- <li> <code>message</code> - The message received from the warn call. </li>
- <li> <code>options</code> - An object passed in with the warn call containing additional information including:</li>
- <ul>
- <li> <code>id</code> - An id of the warning in the form of <code>package-name.specific-warning</code>.</li>
- </ul>
- <li> <code>next</code> - A function that calls into the previously registered handler.</li>
- </ul>
-
- @public
- @static
- @method registerWarnHandler
- @param handler {Function} A function to handle warnings.
- @since 2.1.0
- */
- function registerHandler(handler) {
- (0, _handlers.registerHandler)('warn', handler);
- }
- registerHandler(function (message) {
- _emberConsole.default.warn('WARNING: ' + message);
- if ('trace' in _emberConsole.default) {
- _emberConsole.default.trace();
- }
- });
-
- var missingOptionsDeprecation = exports.missingOptionsDeprecation = 'When calling `Ember.warn` you ' + 'must provide an `options` hash as the third parameter. ' + '`options` should include an `id` property.';
- var missingOptionsIdDeprecation = exports.missingOptionsIdDeprecation = 'When calling `Ember.warn` you must provide `id` in options.';
+ exports.default = warn;
+ exports.registerHandler = registerHandler;
+ exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation;
+ exports.missingOptionsDeprecation = missingOptionsDeprecation;
});
enifed('ember-environment', ['exports'], function (exports) {
'use strict';
/* globals global, window, self, mainContext */
@@ -6861,13 +6870,10 @@
@for EmberENV
@public
*/
ENV.LOG_VERSION = defaultTrue(ENV.LOG_VERSION);
- // default false
- ENV.MODEL_FACTORY_INJECTIONS = defaultFalse(ENV.MODEL_FACTORY_INJECTIONS);
-
/**
Debug parameter you can turn on. This will log all bindings that fire to
the console. This should be disabled in production code. Note that you
can also enable this from the console or temporarily.
@@ -7223,11 +7229,11 @@
@param {Function|String} method A function or the name of a function to be called on `target`
@param {Boolean} once A flag whether a function should only be called once
@public
*/
function addListener(obj, eventName, target, method, once) {
- true && emberDebug.assert('You must pass at least an object and event name to Ember.addListener', !!obj && !!eventName);
+ true && !(!!obj && !!eventName) && emberDebug.assert('You must pass at least an object and event name to Ember.addListener', !!obj && !!eventName);
true && !(eventName !== 'didInitAttrs') && emberDebug.deprecate('didInitAttrs called in ' + (obj && obj.toString && obj.toString()) + '.', eventName !== 'didInitAttrs', {
id: 'ember-views.did-init-attrs',
until: '3.0.0',
url: 'http://emberjs.com/deprecations/v2.x#toc_ember-component-didinitattrs'
});
@@ -7261,11 +7267,11 @@
@param {Object|Function} target A target object or a function
@param {Function|String} method A function or the name of a function to be called on `target`
@public
*/
function removeListener(obj, eventName, target, method) {
- true && emberDebug.assert('You must pass at least an object and event name to Ember.removeListener', !!obj && !!eventName);
+ true && !(!!obj && !!eventName) && emberDebug.assert('You must pass at least an object and event name to Ember.removeListener', !!obj && !!eventName);
if (!method && 'function' === typeof target) {
method = target;
target = null;
}
@@ -7674,11 +7680,11 @@
if (ember_features.EMBER_GLIMMER_ALLOW_BACKTRACKING_RERENDER) {
true && !false && emberDebug.deprecate(message + ' will be removed in Ember 3.0.', false, { id: 'ember-views.render-double-modify', until: '3.0.0' });
} else {
- true && emberDebug.assert(message + ' is no longer supported. See https://github.com/emberjs/ember.js/issues/13948 for more details.', false);
+ true && !false && emberDebug.assert(message + ' is no longer supported. See https://github.com/emberjs/ember.js/issues/13948 for more details.', false);
}
}
shouldReflush = true;
}
@@ -8013,11 +8019,11 @@
function SETTER_FUNCTION(value) {
var m = exports.peekMeta(this);
if (!m.isInitialized(this)) {
m.writeValues(name, value);
} else {
- true && emberDebug.assert('You must use Ember.set() to set the `' + name + '` property (of ' + this + ') to `' + value + '`.', false);
+ true && !false && emberDebug.assert('You must use Ember.set() to set the `' + name + '` property (of ' + this + ') to `' + value + '`.', false);
}
}
SETTER_FUNCTION.isMandatorySetter = true;
return SETTER_FUNCTION;
@@ -8824,11 +8830,11 @@
// their parents by calling your object's `copy()` method.
function (name, Meta) {
var key = memberProperty(name);
var capitalized = capitalize(name);
Meta.prototype['writable' + capitalized] = function (create) {
- true && emberDebug.assert('Cannot call writable' + capitalized + ' after the object is destroyed.', !this.isMetaDestroyed());
+ true && !!this.isMetaDestroyed() && emberDebug.assert('Cannot call writable' + capitalized + ' after the object is destroyed.', !this.isMetaDestroyed());
var ret = this[key];
if (ret === undefined) {
if (this.parent) {
ret = this[key] = this.parent['writable' + capitalized](create).copy(this.source);
@@ -9042,11 +9048,11 @@
// Implements a member that provides a lazily created map of maps,
// with inheritance at both levels.
Meta.prototype.writeDeps = function (subkey, itemkey, value) {
- true && emberDebug.assert('Cannot call writeDeps after the object is destroyed.', !this.isMetaDestroyed());
+ true && !!this.isMetaDestroyed() && emberDebug.assert('Cannot call writeDeps after the object is destroyed.', !this.isMetaDestroyed());
var outerMap = this._getOrCreateOwnMap('_deps');
var innerMap = outerMap[subkey];
if (innerMap === undefined) {
innerMap = outerMap[subkey] = Object.create(null);
@@ -9207,11 +9213,11 @@
function inheritedMap(name, Meta) {
var key = memberProperty(name);
var capitalized = capitalize(name);
Meta.prototype['write' + capitalized] = function (subkey, value) {
- true && emberDebug.assert('Cannot call write' + capitalized + ' after the object is destroyed.', !this.isMetaDestroyed());
+ true && !!this.isMetaDestroyed() && emberDebug.assert('Cannot call write' + capitalized + ' after the object is destroyed.', !this.isMetaDestroyed());
var map = this._getOrCreateOwnMap(key);
map[subkey] = value;
};
@@ -9238,11 +9244,11 @@
pointer = pointer.parent;
}
};
Meta.prototype['clear' + capitalized] = function () {
- true && emberDebug.assert('Cannot call clear' + capitalized + ' after the object is destroyed.', !this.isMetaDestroyed());
+ true && !!this.isMetaDestroyed() && emberDebug.assert('Cannot call clear' + capitalized + ' after the object is destroyed.', !this.isMetaDestroyed());
this[key] = undefined;
};
Meta.prototype['deleteFrom' + capitalized] = function (subkey) {
@@ -9260,11 +9266,11 @@
// object using the method you provide.
function ownCustomObject(name, Meta) {
var key = memberProperty(name);
var capitalized = capitalize(name);
Meta.prototype['writable' + capitalized] = function (create) {
- true && emberDebug.assert('Cannot call writable' + capitalized + ' after the object is destroyed.', !this.isMetaDestroyed());
+ true && !!this.isMetaDestroyed() && emberDebug.assert('Cannot call writable' + capitalized + ' after the object is destroyed.', !this.isMetaDestroyed());
var ret = this[key];
if (ret === undefined) {
ret = this[key] = create(this.source);
}
@@ -9625,15 +9631,15 @@
@param {String} keyName The property key to retrieve
@return {Object} the property value or `null`.
@public
*/
function get(obj, keyName) {
- true && emberDebug.assert('Get must be called with two arguments; an object and a property key', arguments.length === 2);
- true && emberDebug.assert('Cannot call get with \'' + keyName + '\' on an undefined object.', obj !== undefined && obj !== null);
- true && emberDebug.assert('The key provided to get must be a string, you passed ' + keyName, typeof keyName === 'string');
- true && emberDebug.assert('\'this\' in paths is not supported', !hasThis(keyName));
- true && emberDebug.assert('Cannot call `Ember.get` with an empty string', keyName !== '');
+ true && !(arguments.length === 2) && emberDebug.assert('Get must be called with two arguments; an object and a property key', arguments.length === 2);
+ true && !(obj !== undefined && obj !== null) && emberDebug.assert('Cannot call get with \'' + keyName + '\' on an undefined object.', obj !== undefined && obj !== null);
+ true && !(typeof keyName === 'string') && emberDebug.assert('The key provided to get must be a string, you passed ' + keyName, typeof keyName === 'string');
+ true && !!hasThis(keyName) && emberDebug.assert('\'this\' in paths is not supported', !hasThis(keyName));
+ true && !(keyName !== '') && emberDebug.assert('Cannot call `Ember.get` with an empty string', keyName !== '');
var value = obj[keyName];
var desc = value !== null && typeof value === 'object' && value.isDescriptor ? value : undefined;
var ret = void 0;
@@ -9717,15 +9723,15 @@
@param {Object} value The value to set
@return {Object} the passed value.
@public
*/
function set(obj, keyName, value, tolerant) {
- true && emberDebug.assert('Set must be called with three or four arguments; an object, a property key, a value and tolerant true/false', arguments.length === 3 || arguments.length === 4);
- true && emberDebug.assert('Cannot call set with \'' + keyName + '\' on an undefined object.', obj && typeof obj === 'object' || typeof obj === 'function');
- true && emberDebug.assert('The key provided to set must be a string, you passed ' + keyName, typeof keyName === 'string');
- true && emberDebug.assert('\'this\' in paths is not supported', !hasThis(keyName));
- true && emberDebug.assert('calling set on destroyed object: ' + emberUtils.toString(obj) + '.' + keyName + ' = ' + emberUtils.toString(value), !obj.isDestroyed);
+ true && !(arguments.length === 3 || arguments.length === 4) && emberDebug.assert('Set must be called with three or four arguments; an object, a property key, a value and tolerant true/false', arguments.length === 3 || arguments.length === 4);
+ true && !(obj && typeof obj === 'object' || typeof obj === 'function') && emberDebug.assert('Cannot call set with \'' + keyName + '\' on an undefined object.', obj && typeof obj === 'object' || typeof obj === 'function');
+ true && !(typeof keyName === 'string') && emberDebug.assert('The key provided to set must be a string, you passed ' + keyName, typeof keyName === 'string');
+ true && !!hasThis(keyName) && emberDebug.assert('\'this\' in paths is not supported', !hasThis(keyName));
+ true && !!obj.isDestroyed && emberDebug.assert('calling set on destroyed object: ' + emberUtils.toString(obj) + '.' + keyName + ' = ' + emberUtils.toString(value), !obj.isDestroyed);
if (isPath(keyName)) {
return setPath(obj, keyName, value, tolerant);
}
@@ -9743,11 +9749,11 @@
if (desc) {
/* computed property */
desc.set(obj, keyName, value);
} else if (obj.setUnknownProperty && currentValue === undefined && !(keyName in obj)) {
/* unknown property */
- true && emberDebug.assert('setUnknownProperty must be a function', typeof obj.setUnknownProperty === 'function');
+ true && !(typeof obj.setUnknownProperty === 'function') && emberDebug.assert('setUnknownProperty must be a function', typeof obj.setUnknownProperty === 'function');
obj.setUnknownProperty(keyName, value);
} else if (currentValue === value) {
/* no change */
return value;
@@ -9864,71 +9870,42 @@
@param {String} pattern The property pattern to expand.
@param {Function} callback The callback to invoke. It is invoked once per
expansion, and is passed the expansion.
*/
function expandProperties(pattern, callback) {
- true && emberDebug.assert('A computed property key must be a string, you passed ' + typeof pattern + ' ' + pattern, typeof pattern === 'string');
- true && emberDebug.assert('Brace expanded properties cannot contain spaces, e.g. "user.{firstName, lastName}" should be "user.{firstName,lastName}"', pattern.indexOf(' ') === -1);
+ true && !(typeof pattern === 'string') && emberDebug.assert('A computed property key must be a string, you passed ' + typeof pattern + ' ' + pattern, typeof pattern === 'string');
+ true && !(pattern.indexOf(' ') === -1) && emberDebug.assert('Brace expanded properties cannot contain spaces, e.g. "user.{firstName, lastName}" should be "user.{firstName,lastName}"', pattern.indexOf(' ') === -1);
+ // regex to look for double open, double close, or unclosed braces
- var unbalancedNestedError = 'Brace expanded properties have to be balanced and cannot be nested, pattern: ' + pattern,
- i,
- current,
- expansion,
- j,
- property,
- k,
- _i;
- var properties = [pattern];
+ true && !(pattern.match(/\{[^}{]*\{|\}[^}{]*\}|\{[^}]*$/g) === null) && emberDebug.assert('Brace expanded properties have to be balanced and cannot be nested, pattern: ' + pattern, pattern.match(/\{[^}{]*\{|\}[^}{]*\}|\{[^}]*$/g) === null);
- // Iterating backward over the pattern makes dealing with indices easier.
- var bookmark = void 0;
- var inside = false;
- for (i = pattern.length; i > 0; --i) {
- current = pattern[i - 1];
+ var start = pattern.indexOf('{');
+ if (start < 0) {
+ callback(pattern.replace(END_WITH_EACH_REGEX, '.[]'));
+ } else {
+ dive('', pattern, start, callback);
+ }
+ }
+ function dive(prefix, pattern, start, callback) {
+ var end = pattern.indexOf('}'),
+ i = 0,
+ newStart = void 0,
+ arrayLength = void 0;
+ var tempArr = pattern.substring(start + 1, end).split(',');
+ var after = pattern.substring(end + 1);
+ prefix = prefix + pattern.substring(0, start);
- switch (current) {
- // Closing curly brace will be the first character of the brace expansion we encounter.
- // Bookmark its index so long as we're not already inside a brace expansion.
- case '}':
- if (!inside) {
- bookmark = i - 1;
- inside = true;
- } else {
- true && emberDebug.assert(unbalancedNestedError, false);
- }
- break;
- // Opening curly brace will be the last character of the brace expansion we encounter.
- // Apply the brace expansion so long as we've already seen a closing curly brace.
- case '{':
- if (inside) {
- expansion = pattern.slice(i, bookmark).split(',');
- // Iterating backward allows us to push new properties w/out affecting our "cursor".
-
- for (j = properties.length; j > 0; --j) {
- // Extract the unexpanded property from the array.
- property = properties.splice(j - 1, 1)[0];
- // Iterate over the expansion, pushing the newly formed properties onto the array.
-
- for (k = 0; k < expansion.length; ++k) {
- properties.push(property.slice(0, i - 1) + expansion[k] + property.slice(bookmark + 1));
- }
- }
- inside = false;
- } else {
- true && emberDebug.assert(unbalancedNestedError, false);
- }
- break;
+ arrayLength = tempArr.length;
+ while (i < arrayLength) {
+ newStart = after.indexOf('{');
+ if (newStart < 0) {
+ callback((prefix + tempArr[i++] + after).replace(END_WITH_EACH_REGEX, '.[]'));
+ } else {
+ dive(prefix + tempArr[i++], after, newStart, callback);
}
}
- if (inside) {
- true && emberDebug.assert(unbalancedNestedError, false);
- }
-
- for (_i = 0; _i < properties.length; _i++) {
- callback(properties[_i].replace(END_WITH_EACH_REGEX, '.[]'));
- }
}
/**
@module ember-metal
*/
@@ -10136,26 +10113,33 @@
function ComputedProperty(config, opts) {
this.isDescriptor = true;
if (typeof config === 'function') {
this._getter = config;
} else {
- true && emberDebug.assert('Ember.computed expects a function or an object as last argument.', typeof config === 'object' && !Array.isArray(config));
- true && emberDebug.assert('Config object passed to an Ember.computed can only contain `get` or `set` keys.', function () {
+ true && !(typeof config === 'object' && !Array.isArray(config)) && emberDebug.assert('Ember.computed expects a function or an object as last argument.', typeof config === 'object' && !Array.isArray(config));
+ true && !function () {
var keys = Object.keys(config),
i;
for (i = 0; i < keys.length; i++) {
if (keys[i] !== 'get' && keys[i] !== 'set') {
return false;
}
}
return true;
+ }() && emberDebug.assert('Config object passed to an Ember.computed can only contain `get` or `set` keys.', function () {
+ var keys = Object.keys(config),
+ i;for (i = 0; i < keys.length; i++) {
+ if (keys[i] !== 'get' && keys[i] !== 'set') {
+ return false;
+ }
+ }return true;
}());
this._getter = config.get;
this._setter = config.set;
}
- true && emberDebug.assert('Computed properties must receive a getter or a setter, you passed none.', !!this._getter || !!this._setter);
+ true && !(!!this._getter || !!this._setter) && emberDebug.assert('Computed properties must receive a getter or a setter, you passed none.', !!this._getter || !!this._setter);
this._dependentKeys = undefined;
this._suspended = undefined;
this._meta = undefined;
this._volatile = false;
@@ -10217,11 +10201,11 @@
@chainable
@public
*/
ComputedPropertyPrototype.readOnly = function () {
this._readOnly = true;
- true && emberDebug.assert('Computed properties that define a setter using the new syntax cannot be read-only', !(this._readOnly && this._setter && this._setter !== this._getter));
+ true && !!(this._readOnly && this._setter && this._setter !== this._getter) && emberDebug.assert('Computed properties that define a setter using the new syntax cannot be read-only', !(this._readOnly && this._setter && this._setter !== this._getter));
return this;
};
/**
@@ -10598,11 +10582,11 @@
_this._dependentKeys = [altKey];
return _this;
}
AliasedProperty.prototype.setup = function (obj, keyName) {
- true && emberDebug.assert('Setting alias \'' + keyName + '\' on self', this.altKey !== keyName);
+ true && !(this.altKey !== keyName) && emberDebug.assert('Setting alias \'' + keyName + '\' on self', this.altKey !== keyName);
var meta$$1 = meta(obj);
if (meta$$1.peekWatching(keyName)) {
addDependentKeys(this, obj, keyName, meta$$1);
}
@@ -11504,11 +11488,11 @@
@param {Object} [arguments*] Optional arguments to be passed to the queued method.
@return {*} Timer information for use in cancelling, see `run.cancel`.
@public
*/
run$1.schedule = function () /* queue, target, method */{
- true && emberDebug.assert('You have turned on testing mode, which disabled the run-loop\'s autorun. ' + 'You will need to wrap any code with asynchronous side-effects in a run', run$1.currentRunLoop || !emberDebug.isTesting());
+ true && !(run$1.currentRunLoop || !emberDebug.isTesting()) && emberDebug.assert('You have turned on testing mode, which disabled the run-loop\'s autorun. ' + 'You will need to wrap any code with asynchronous side-effects in a run', run$1.currentRunLoop || !emberDebug.isTesting());
return backburner.schedule.apply(backburner, arguments);
};
// Used by global test teardown
@@ -11588,11 +11572,11 @@
@public
*/
run$1.once = function () {
var _len3, args, _key3;
- true && emberDebug.assert('You have turned on testing mode, which disabled the run-loop\'s autorun. ' + 'You will need to wrap any code with asynchronous side-effects in a run', run$1.currentRunLoop || !emberDebug.isTesting());
+ true && !(run$1.currentRunLoop || !emberDebug.isTesting()) && emberDebug.assert('You have turned on testing mode, which disabled the run-loop\'s autorun. ' + 'You will need to wrap any code with asynchronous side-effects in a run', run$1.currentRunLoop || !emberDebug.isTesting());
for (_len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
@@ -11651,11 +11635,11 @@
@param {Object} [args*] Optional arguments to pass to the timeout.
@return {Object} Timer information for use in cancelling, see `run.cancel`.
@public
*/
run$1.scheduleOnce = function () /*queue, target, method*/{
- true && emberDebug.assert('You have turned on testing mode, which disabled the run-loop\'s autorun. ' + 'You will need to wrap any code with asynchronous side-effects in a run', run$1.currentRunLoop || !emberDebug.isTesting());
+ true && !(run$1.currentRunLoop || !emberDebug.isTesting()) && emberDebug.assert('You have turned on testing mode, which disabled the run-loop\'s autorun. ' + 'You will need to wrap any code with asynchronous side-effects in a run', run$1.currentRunLoop || !emberDebug.isTesting());
return backburner.scheduleOnce.apply(backburner, arguments);
};
/**
@@ -12741,11 +12725,11 @@
@return {Ember.Binding} `this`
@public
*/
Binding.prototype.connect = function (obj) {
- true && emberDebug.assert('Must pass a valid object to Ember.Binding.connect()', !!obj);
+ true && !!!obj && emberDebug.assert('Must pass a valid object to Ember.Binding.connect()', !!obj);
var fromObj = void 0,
fromPath = void 0,
possibleGlobal = void 0,
name;
@@ -12797,11 +12781,11 @@
@return {Ember.Binding} `this`
@public
*/
Binding.prototype.disconnect = function () {
- true && emberDebug.assert('Must pass a valid object to Ember.Binding.disconnect()', !!this._toObj);
+ true && !!!this._toObj && emberDebug.assert('Must pass a valid object to Ember.Binding.disconnect()', !!this._toObj);
// Remove an observer on the object so we're no longer notified of
// changes that should update bindings.
removeObserver(this._fromObj, this._fromPath, this, 'fromDidChange');
@@ -13229,11 +13213,11 @@
propValue;
{
if (isArray(value)) {
// use conditional to avoid stringifying every time
- true && emberDebug.assert('You passed in `' + JSON.stringify(value) + '` as the value for `' + key + '` but `' + key + '` cannot be an Array', false);
+ true && !false && emberDebug.assert('You passed in `' + JSON.stringify(value) + '` as the value for `' + key + '` but `' + key + '` cannot be an Array', false);
}
}
if (!baseValue) {
return value;
@@ -13306,11 +13290,11 @@
delete values[keyName];
}
for (i = 0; i < mixins.length; i++) {
currentMixin = mixins[i];
- true && emberDebug.assert('Expected hash or Mixin instance, got ' + Object.prototype.toString.call(currentMixin), typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]');
+ true && !(typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]') && emberDebug.assert('Expected hash or Mixin instance, got ' + Object.prototype.toString.call(currentMixin), typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]');
props = mixinProperties(meta$$1, currentMixin);
if (props === CONTINUE) {
continue;
}
@@ -13677,11 +13661,11 @@
var mixins = this.mixins;
var idx = void 0;
for (idx = 0; idx < arguments.length; idx++) {
currentMixin = arguments[idx];
- true && emberDebug.assert('Expected hash or Mixin instance, got ' + Object.prototype.toString.call(currentMixin), typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]');
+ true && !(typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]') && emberDebug.assert('Expected hash or Mixin instance, got ' + Object.prototype.toString.call(currentMixin), typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]');
if (currentMixin instanceof Mixin) {
mixins.push(currentMixin);
} else {
mixins.push(new Mixin(undefined, currentMixin));
@@ -13971,12 +13955,12 @@
function injectedPropertyGet(keyName) {
var desc = this[keyName];
var owner = emberUtils.getOwner(this) || this.container; // fallback to `container` for backwards compat
- true && emberDebug.assert('InjectedProperties should be defined with the Ember.inject computed property macros.', desc && desc.isDescriptor && desc.type);
- true && emberDebug.assert('Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.', owner);
+ true && !(desc && desc.isDescriptor && desc.type) && emberDebug.assert('InjectedProperties should be defined with the Ember.inject computed property macros.', desc && desc.isDescriptor && desc.type);
+ true && !owner && emberDebug.assert('Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.', owner);
return owner.lookup(desc.type + ':' + (desc.name || keyName));
}
InjectedProperty.prototype = Object.create(Descriptor.prototype);
@@ -14302,11 +14286,11 @@
true && !false && emberDebug.deprecate('Usage of `Ember.immediateObserver` is deprecated, use `Ember.observer` instead.', false, { id: 'ember-metal.immediate-observer', until: '3.0.0' });
for (i = 0; i < arguments.length; i++) {
arg = arguments[i];
- true && emberDebug.assert('Immediate observers must observe internal properties only, not properties on other objects.', typeof arg !== 'string' || arg.indexOf('.') === -1);
+ true && !(typeof arg !== 'string' || arg.indexOf('.') === -1) && emberDebug.assert('Immediate observers must observe internal properties only, not properties on other objects.', typeof arg !== 'string' || arg.indexOf('.') === -1);
}
return observer.apply(this, arguments);
};
exports._beforeObserver = function () {
@@ -14515,11 +14499,11 @@
var moduleName = this.options.meta.moduleName;
this.syntax.traverse(ast, {
PathExpression: function (node) {
if (node.original[0] === '@') {
- true && (0, _emberDebug.assert)(assertMessage(moduleName, node));
+ true && !false && (0, _emberDebug.assert)(assertMessage(moduleName, node));
}
}
});
return ast;
@@ -15408,11 +15392,11 @@
if (key === 'classBinding') {
return;
}
- true && (0, _emberDebug.assert)('Setting \'attributeBindings\' via template helpers is not allowed ' + sourceInformation, key !== 'attributeBindings');
+ true && !(key !== 'attributeBindings') && (0, _emberDebug.assert)('Setting \'attributeBindings\' via template helpers is not allowed ' + sourceInformation, key !== 'attributeBindings');
if (key.substr(-7) === 'Binding') {
newKey = key.slice(0, -7);
@@ -16660,10 +16644,10 @@
exports.EMBER_GLIMMER_DETECT_BACKTRACKING_RERENDER = FEATURES["ember-glimmer-detect-backtracking-rerender"];
});
enifed("ember/version", ["exports"], function (exports) {
"use strict";
- exports.default = "2.14.0-beta.2";
+ exports.default = "2.14.0-beta.3";
});
enifed("handlebars", ["exports"], function (exports) {
"use strict";
/* istanbul ignore next */