ember-source 2.11.3 → 2.12.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,11 +6,10 @@
6
6
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
7
7
  * @license Licensed under MIT license
8
8
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
9
- * @version 2.11.3
9
+ * @version 2.12.0-beta.1
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
13
- var mainContext = this; // Used in ember-environment/lib/global.js
14
13
 
15
14
  (function() {
16
15
  var isNode = typeof window === 'undefined' &&
@@ -174,7 +173,7 @@ function defaults(obj, defaults) {
174
173
  return obj;
175
174
  }
176
175
 
177
- var babelHelpers = {
176
+ babelHelpers = {
178
177
  classCallCheck: classCallCheck,
179
178
  inherits: inherits,
180
179
  taggedTemplateLiteralLoose: taggedTemplateLiteralLoose,
@@ -1733,7 +1732,7 @@ enifed('ember-debug/index', ['exports', 'ember-metal', 'ember-environment', 'emb
1733
1732
  if (typeof window !== 'undefined' && (isFirefox || isChrome) && window.addEventListener) {
1734
1733
  window.addEventListener('load', function () {
1735
1734
  if (document.documentElement && document.documentElement.dataset && !document.documentElement.dataset.emberExtension) {
1736
- var downloadURL;
1735
+ var downloadURL = undefined;
1737
1736
 
1738
1737
  if (isChrome) {
1739
1738
  downloadURL = 'https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi';
@@ -2077,7 +2076,6 @@ enifed('ember-metal/alias', ['exports', 'ember-utils', 'ember-metal/debug', 'emb
2077
2076
  'use strict';
2078
2077
 
2079
2078
  exports.default = alias;
2080
- exports.AliasedProperty = AliasedProperty;
2081
2079
 
2082
2080
  var CONSUMED = {};
2083
2081
 
@@ -2085,66 +2083,75 @@ enifed('ember-metal/alias', ['exports', 'ember-utils', 'ember-metal/debug', 'emb
2085
2083
  return new AliasedProperty(altKey);
2086
2084
  }
2087
2085
 
2088
- function AliasedProperty(altKey) {
2089
- this.isDescriptor = true;
2090
- this.altKey = altKey;
2091
- this._dependentKeys = [altKey];
2092
- }
2086
+ var AliasedProperty = (function (_Descriptor) {
2087
+ babelHelpers.inherits(AliasedProperty, _Descriptor);
2093
2088
 
2094
- AliasedProperty.prototype = Object.create(_emberMetalProperties.Descriptor.prototype);
2089
+ function AliasedProperty(altKey) {
2090
+ babelHelpers.classCallCheck(this, AliasedProperty);
2095
2091
 
2096
- AliasedProperty.prototype.setup = function (obj, keyName) {
2097
- _emberMetalDebug.assert('Setting alias \'' + keyName + '\' on self', this.altKey !== keyName);
2098
- var meta = _emberMetalMeta.meta(obj);
2099
- if (meta.peekWatching(keyName)) {
2100
- _emberMetalDependent_keys.addDependentKeys(this, obj, keyName, meta);
2092
+ _Descriptor.call(this);
2093
+ this.isDescriptor = true;
2094
+ this.altKey = altKey;
2095
+ this._dependentKeys = [altKey];
2101
2096
  }
2102
- };
2103
2097
 
2104
- AliasedProperty.prototype.teardown = function (obj, keyName) {
2105
- var meta = _emberMetalMeta.meta(obj);
2106
- if (meta.peekWatching(keyName)) {
2107
- _emberMetalDependent_keys.removeDependentKeys(this, obj, keyName, meta);
2108
- }
2109
- };
2098
+ AliasedProperty.prototype.setup = function setup(obj, keyName) {
2099
+ _emberMetalDebug.assert('Setting alias \'' + keyName + '\' on self', this.altKey !== keyName);
2100
+ var meta = _emberMetalMeta.meta(obj);
2101
+ if (meta.peekWatching(keyName)) {
2102
+ _emberMetalDependent_keys.addDependentKeys(this, obj, keyName, meta);
2103
+ }
2104
+ };
2110
2105
 
2111
- AliasedProperty.prototype.willWatch = function (obj, keyName) {
2112
- _emberMetalDependent_keys.addDependentKeys(this, obj, keyName, _emberMetalMeta.meta(obj));
2113
- };
2106
+ AliasedProperty.prototype.teardown = function teardown(obj, keyName) {
2107
+ var meta = _emberMetalMeta.meta(obj);
2108
+ if (meta.peekWatching(keyName)) {
2109
+ _emberMetalDependent_keys.removeDependentKeys(this, obj, keyName, meta);
2110
+ }
2111
+ };
2114
2112
 
2115
- AliasedProperty.prototype.didUnwatch = function (obj, keyName) {
2116
- _emberMetalDependent_keys.removeDependentKeys(this, obj, keyName, _emberMetalMeta.meta(obj));
2117
- };
2113
+ AliasedProperty.prototype.willWatch = function willWatch(obj, keyName) {
2114
+ _emberMetalDependent_keys.addDependentKeys(this, obj, keyName, _emberMetalMeta.meta(obj));
2115
+ };
2118
2116
 
2119
- AliasedProperty.prototype.get = function AliasedProperty_get(obj, keyName) {
2120
- var ret = _emberMetalProperty_get.get(obj, this.altKey);
2121
- var meta = _emberMetalMeta.meta(obj);
2122
- var cache = meta.writableCache();
2123
- if (cache[keyName] !== CONSUMED) {
2124
- cache[keyName] = CONSUMED;
2125
- _emberMetalDependent_keys.addDependentKeys(this, obj, keyName, meta);
2126
- }
2127
- return ret;
2128
- };
2117
+ AliasedProperty.prototype.didUnwatch = function didUnwatch(obj, keyName) {
2118
+ _emberMetalDependent_keys.removeDependentKeys(this, obj, keyName, _emberMetalMeta.meta(obj));
2119
+ };
2129
2120
 
2130
- AliasedProperty.prototype.set = function AliasedProperty_set(obj, keyName, value) {
2131
- return _emberMetalProperty_set.set(obj, this.altKey, value);
2132
- };
2121
+ AliasedProperty.prototype.get = function get(obj, keyName) {
2122
+ var ret = _emberMetalProperty_get.get(obj, this.altKey);
2123
+ var meta = _emberMetalMeta.meta(obj);
2124
+ var cache = meta.writableCache();
2125
+ if (cache[keyName] !== CONSUMED) {
2126
+ cache[keyName] = CONSUMED;
2127
+ _emberMetalDependent_keys.addDependentKeys(this, obj, keyName, meta);
2128
+ }
2129
+ return ret;
2130
+ };
2133
2131
 
2134
- AliasedProperty.prototype.readOnly = function () {
2135
- this.set = AliasedProperty_readOnlySet;
2136
- return this;
2137
- };
2132
+ AliasedProperty.prototype.set = function set(obj, keyName, value) {
2133
+ return _emberMetalProperty_set.set(obj, this.altKey, value);
2134
+ };
2135
+
2136
+ AliasedProperty.prototype.readOnly = function readOnly() {
2137
+ this.set = AliasedProperty_readOnlySet;
2138
+ return this;
2139
+ };
2140
+
2141
+ AliasedProperty.prototype.oneWay = function oneWay() {
2142
+ this.set = AliasedProperty_oneWaySet;
2143
+ return this;
2144
+ };
2145
+
2146
+ return AliasedProperty;
2147
+ })(_emberMetalProperties.Descriptor);
2148
+
2149
+ exports.AliasedProperty = AliasedProperty;
2138
2150
 
2139
2151
  function AliasedProperty_readOnlySet(obj, keyName, value) {
2140
2152
  throw new _emberMetalError.default('Cannot set read-only property \'' + keyName + '\' on object: ' + _emberUtils.inspect(obj));
2141
2153
  }
2142
2154
 
2143
- AliasedProperty.prototype.oneWay = function () {
2144
- this.set = AliasedProperty_oneWaySet;
2145
- return this;
2146
- };
2147
-
2148
2155
  function AliasedProperty_oneWaySet(obj, keyName, value) {
2149
2156
  _emberMetalProperties.defineProperty(obj, keyName, null);
2150
2157
  return _emberMetalProperty_set.set(obj, keyName, value);
@@ -2168,41 +2175,44 @@ enifed('ember-metal/binding', ['exports', 'ember-utils', 'ember-console', 'ember
2168
2175
  // BINDING
2169
2176
  //
2170
2177
 
2171
- function Binding(toPath, fromPath) {
2172
- // Configuration
2173
- this._from = fromPath;
2174
- this._to = toPath;
2175
- this._oneWay = undefined;
2178
+ var Binding = (function () {
2179
+ function Binding(toPath, fromPath) {
2180
+ babelHelpers.classCallCheck(this, Binding);
2176
2181
 
2177
- // State
2178
- this._direction = undefined;
2179
- this._readyToSync = undefined;
2180
- this._fromObj = undefined;
2181
- this._fromPath = undefined;
2182
- this._toObj = undefined;
2183
- }
2182
+ // Configuration
2183
+ this._from = fromPath;
2184
+ this._to = toPath;
2185
+ this._oneWay = undefined;
2184
2186
 
2185
- /**
2186
- @class Binding
2187
- @namespace Ember
2188
- @deprecated See http://emberjs.com/deprecations/v2.x#toc_ember-binding
2189
- @public
2190
- */
2187
+ // State
2188
+ this._direction = undefined;
2189
+ this._readyToSync = undefined;
2190
+ this._fromObj = undefined;
2191
+ this._fromPath = undefined;
2192
+ this._toObj = undefined;
2193
+ }
2194
+
2195
+ /**
2196
+ @class Binding
2197
+ @namespace Ember
2198
+ @deprecated See http://emberjs.com/deprecations/v2.x#toc_ember-binding
2199
+ @public
2200
+ */
2191
2201
 
2192
- Binding.prototype = {
2193
2202
  /**
2194
2203
  This copies the Binding so it can be connected to another object.
2195
2204
  @method copy
2196
2205
  @return {Ember.Binding} `this`
2197
2206
  @public
2198
2207
  */
2199
- copy: function () {
2208
+
2209
+ Binding.prototype.copy = function copy() {
2200
2210
  var copy = new Binding(this._to, this._from);
2201
2211
  if (this._oneWay) {
2202
2212
  copy._oneWay = true;
2203
2213
  }
2204
2214
  return copy;
2205
- },
2215
+ };
2206
2216
 
2207
2217
  // ..........................................................
2208
2218
  // CONFIG
@@ -2220,10 +2230,11 @@ enifed('ember-metal/binding', ['exports', 'ember-utils', 'ember-console', 'ember
2220
2230
  @return {Ember.Binding} `this`
2221
2231
  @public
2222
2232
  */
2223
- from: function (path) {
2233
+
2234
+ Binding.prototype.from = function from(path) {
2224
2235
  this._from = path;
2225
2236
  return this;
2226
- },
2237
+ };
2227
2238
 
2228
2239
  /**
2229
2240
  This will set the `to` property path to the specified value. It will not
@@ -2237,10 +2248,11 @@ enifed('ember-metal/binding', ['exports', 'ember-utils', 'ember-console', 'ember
2237
2248
  @return {Ember.Binding} `this`
2238
2249
  @public
2239
2250
  */
2240
- to: function (path) {
2251
+
2252
+ Binding.prototype.to = function to(path) {
2241
2253
  this._to = path;
2242
2254
  return this;
2243
- },
2255
+ };
2244
2256
 
2245
2257
  /**
2246
2258
  Configures the binding as one way. A one-way binding will relay changes
@@ -2251,20 +2263,22 @@ enifed('ember-metal/binding', ['exports', 'ember-utils', 'ember-console', 'ember
2251
2263
  @return {Ember.Binding} `this`
2252
2264
  @public
2253
2265
  */
2254
- oneWay: function () {
2266
+
2267
+ Binding.prototype.oneWay = function oneWay() {
2255
2268
  this._oneWay = true;
2256
2269
  return this;
2257
- },
2270
+ };
2258
2271
 
2259
2272
  /**
2260
2273
  @method toString
2261
2274
  @return {String} string representation of binding
2262
2275
  @public
2263
2276
  */
2264
- toString: function () {
2277
+
2278
+ Binding.prototype.toString = function toString() {
2265
2279
  var oneWay = this._oneWay ? '[oneWay]' : '';
2266
2280
  return 'Ember.Binding<' + _emberUtils.guidFor(this) + '>(' + this._from + ' -> ' + this._to + ')' + oneWay;
2267
- },
2281
+ };
2268
2282
 
2269
2283
  // ..........................................................
2270
2284
  // CONNECT AND SYNC
@@ -2279,7 +2293,8 @@ enifed('ember-metal/binding', ['exports', 'ember-utils', 'ember-console', 'ember
2279
2293
  @return {Ember.Binding} `this`
2280
2294
  @public
2281
2295
  */
2282
- connect: function (obj) {
2296
+
2297
+ Binding.prototype.connect = function connect(obj) {
2283
2298
  _emberMetalDebug.assert('Must pass a valid object to Ember.Binding.connect()', !!obj);
2284
2299
 
2285
2300
  var fromObj = undefined,
@@ -2323,7 +2338,7 @@ enifed('ember-metal/binding', ['exports', 'ember-utils', 'ember-console', 'ember
2323
2338
  this._toObj = obj;
2324
2339
 
2325
2340
  return this;
2326
- },
2341
+ };
2327
2342
 
2328
2343
  /**
2329
2344
  Disconnects the binding instance. Changes will no longer be relayed. You
@@ -2332,7 +2347,8 @@ enifed('ember-metal/binding', ['exports', 'ember-utils', 'ember-console', 'ember
2332
2347
  @return {Ember.Binding} `this`
2333
2348
  @public
2334
2349
  */
2335
- disconnect: function () {
2350
+
2351
+ Binding.prototype.disconnect = function disconnect() {
2336
2352
  _emberMetalDebug.assert('Must pass a valid object to Ember.Binding.disconnect()', !!this._toObj);
2337
2353
 
2338
2354
  // Remove an observer on the object so we're no longer notified of
@@ -2346,23 +2362,25 @@ enifed('ember-metal/binding', ['exports', 'ember-utils', 'ember-console', 'ember
2346
2362
 
2347
2363
  this._readyToSync = false; // Disable scheduled syncs...
2348
2364
  return this;
2349
- },
2365
+ };
2350
2366
 
2351
2367
  // ..........................................................
2352
2368
  // PRIVATE
2353
2369
  //
2354
2370
 
2355
2371
  /* Called when the from side changes. */
2356
- fromDidChange: function (target) {
2372
+
2373
+ Binding.prototype.fromDidChange = function fromDidChange(target) {
2357
2374
  this._scheduleSync('fwd');
2358
- },
2375
+ };
2359
2376
 
2360
2377
  /* Called when the to side changes. */
2361
- toDidChange: function (target) {
2378
+
2379
+ Binding.prototype.toDidChange = function toDidChange(target) {
2362
2380
  this._scheduleSync('back');
2363
- },
2381
+ };
2364
2382
 
2365
- _scheduleSync: function (dir) {
2383
+ Binding.prototype._scheduleSync = function _scheduleSync(dir) {
2366
2384
  var existingDir = this._direction;
2367
2385
 
2368
2386
  // If we haven't scheduled the binding yet, schedule it.
@@ -2376,9 +2394,11 @@ enifed('ember-metal/binding', ['exports', 'ember-utils', 'ember-console', 'ember
2376
2394
  if (existingDir === 'back' && dir === 'fwd') {
2377
2395
  this._direction = 'fwd';
2378
2396
  }
2379
- },
2397
+ };
2398
+
2399
+ Binding.prototype._sync = function _sync() {
2400
+ var _this = this;
2380
2401
 
2381
- _sync: function () {
2382
2402
  var log = _emberEnvironment.ENV.LOG_BINDINGS;
2383
2403
 
2384
2404
  var toObj = this._toObj;
@@ -2399,30 +2419,35 @@ enifed('ember-metal/binding', ['exports', 'ember-utils', 'ember-console', 'ember
2399
2419
 
2400
2420
  // If we're synchronizing from the remote object...
2401
2421
  if (direction === 'fwd') {
2402
- var fromValue = _emberMetalProperty_get.get(fromObj, fromPath);
2403
- if (log) {
2404
- _emberConsole.default.log(' ', this.toString(), '->', fromValue, fromObj);
2405
- }
2406
- if (this._oneWay) {
2407
- _emberMetalProperty_set.trySet(toObj, this._to, fromValue);
2408
- } else {
2409
- _emberMetalObserver._suspendObserver(toObj, this._to, this, 'toDidChange', function () {
2410
- _emberMetalProperty_set.trySet(toObj, this._to, fromValue);
2411
- });
2412
- }
2413
- // If we're synchronizing *to* the remote object.
2414
- } else if (direction === 'back') {
2415
- var toValue = _emberMetalProperty_get.get(toObj, this._to);
2422
+ (function () {
2423
+ var fromValue = _emberMetalProperty_get.get(fromObj, fromPath);
2416
2424
  if (log) {
2417
- _emberConsole.default.log(' ', this.toString(), '<-', toValue, toObj);
2425
+ _emberConsole.default.log(' ', _this.toString(), '->', fromValue, fromObj);
2418
2426
  }
2419
- _emberMetalObserver._suspendObserver(fromObj, fromPath, this, 'fromDidChange', function () {
2420
- _emberMetalProperty_set.trySet(fromObj, fromPath, toValue);
2421
- });
2427
+ if (_this._oneWay) {
2428
+ _emberMetalProperty_set.trySet(toObj, _this._to, fromValue);
2429
+ } else {
2430
+ _emberMetalObserver._suspendObserver(toObj, _this._to, _this, 'toDidChange', function () {
2431
+ _emberMetalProperty_set.trySet(toObj, this._to, fromValue);
2432
+ });
2433
+ }
2434
+ // If we're synchronizing *to* the remote object.
2435
+ })();
2436
+ } else if (direction === 'back') {
2437
+ (function () {
2438
+ var toValue = _emberMetalProperty_get.get(toObj, _this._to);
2439
+ if (log) {
2440
+ _emberConsole.default.log(' ', _this.toString(), '<-', toValue, toObj);
2441
+ }
2442
+ _emberMetalObserver._suspendObserver(fromObj, fromPath, _this, 'fromDidChange', function () {
2443
+ _emberMetalProperty_set.trySet(fromObj, fromPath, toValue);
2444
+ });
2445
+ })();
2422
2446
  }
2423
- }
2447
+ };
2424
2448
 
2425
- };
2449
+ return Binding;
2450
+ })();
2426
2451
 
2427
2452
  function fireDeprecations(obj, toPath, fromPath, deprecateGlobal, deprecateOneWay, deprecateAlias) {
2428
2453
  var deprecateGlobalMessage = '`Ember.Binding` is deprecated. Since you' + ' are binding to a global consider using a service instead.';
@@ -2734,24 +2759,26 @@ enifed('ember-metal/chains', ['exports', 'ember-utils', 'ember-metal/property_ge
2734
2759
  return !(isObject(obj) && obj.isDescriptor && obj._volatile === false);
2735
2760
  }
2736
2761
 
2737
- function ChainWatchers() {
2738
- // chain nodes that reference a key in this obj by key
2739
- // we only create ChainWatchers when we are going to add them
2740
- // so create this upfront
2741
- this.chains = new _emberUtils.EmptyObject();
2742
- }
2762
+ var ChainWatchers = (function () {
2763
+ function ChainWatchers() {
2764
+ babelHelpers.classCallCheck(this, ChainWatchers);
2765
+
2766
+ // chain nodes that reference a key in this obj by key
2767
+ // we only create ChainWatchers when we are going to add them
2768
+ // so create this upfront
2769
+ this.chains = new _emberUtils.EmptyObject();
2770
+ }
2743
2771
 
2744
- ChainWatchers.prototype = {
2745
- add: function (key, node) {
2772
+ ChainWatchers.prototype.add = function add(key, node) {
2746
2773
  var nodes = this.chains[key];
2747
2774
  if (nodes === undefined) {
2748
2775
  this.chains[key] = [node];
2749
2776
  } else {
2750
2777
  nodes.push(node);
2751
2778
  }
2752
- },
2779
+ };
2753
2780
 
2754
- remove: function (key, node) {
2781
+ ChainWatchers.prototype.remove = function remove(key, node) {
2755
2782
  var nodes = this.chains[key];
2756
2783
  if (nodes) {
2757
2784
  for (var i = 0; i < nodes.length; i++) {
@@ -2761,9 +2788,9 @@ enifed('ember-metal/chains', ['exports', 'ember-utils', 'ember-metal/property_ge
2761
2788
  }
2762
2789
  }
2763
2790
  }
2764
- },
2791
+ };
2765
2792
 
2766
- has: function (key, node) {
2793
+ ChainWatchers.prototype.has = function has(key, node) {
2767
2794
  var nodes = this.chains[key];
2768
2795
  if (nodes) {
2769
2796
  for (var i = 0; i < nodes.length; i++) {
@@ -2773,24 +2800,25 @@ enifed('ember-metal/chains', ['exports', 'ember-utils', 'ember-metal/property_ge
2773
2800
  }
2774
2801
  }
2775
2802
  return false;
2776
- },
2803
+ };
2777
2804
 
2778
- revalidateAll: function () {
2805
+ ChainWatchers.prototype.revalidateAll = function revalidateAll() {
2779
2806
  for (var key in this.chains) {
2780
2807
  this.notify(key, true, undefined);
2781
2808
  }
2782
- },
2809
+ };
2783
2810
 
2784
- revalidate: function (key) {
2811
+ ChainWatchers.prototype.revalidate = function revalidate(key) {
2785
2812
  this.notify(key, true, undefined);
2786
- },
2813
+ };
2787
2814
 
2788
2815
  // key: the string key that is part of a path changed
2789
2816
  // revalidate: boolean; the chains that are watching this value should revalidate
2790
2817
  // callback: function that will be called with the object and path that
2791
2818
  // will be/are invalidated by this key change, depending on
2792
2819
  // whether the revalidate flag is passed
2793
- notify: function (key, revalidate, callback) {
2820
+
2821
+ ChainWatchers.prototype.notify = function notify(key, revalidate, callback) {
2794
2822
  var nodes = this.chains[key];
2795
2823
  if (nodes === undefined || nodes.length === 0) {
2796
2824
  return;
@@ -2816,8 +2844,10 @@ enifed('ember-metal/chains', ['exports', 'ember-utils', 'ember-metal/property_ge
2816
2844
  var path = affected[i + 1];
2817
2845
  callback(obj, path);
2818
2846
  }
2819
- }
2820
- };
2847
+ };
2848
+
2849
+ return ChainWatchers;
2850
+ })();
2821
2851
 
2822
2852
  function makeChainWatcher() {
2823
2853
  return new ChainWatchers();
@@ -2851,71 +2881,50 @@ enifed('ember-metal/chains', ['exports', 'ember-utils', 'ember-metal/property_ge
2851
2881
  // A ChainNode watches a single key on an object. If you provide a starting
2852
2882
  // value for the key then the node won't actually watch it. For a root node
2853
2883
  // pass null for parent and key and object for value.
2854
- function ChainNode(parent, key, value) {
2855
- this._parent = parent;
2856
- this._key = key;
2857
2884
 
2858
- // _watching is true when calling get(this._parent, this._key) will
2859
- // return the value of this node.
2860
- //
2861
- // It is false for the root of a chain (because we have no parent)
2862
- // and for global paths (because the parent node is the object with
2863
- // the observer on it)
2864
- this._watching = value === undefined;
2885
+ var ChainNode = (function () {
2886
+ function ChainNode(parent, key, value) {
2887
+ babelHelpers.classCallCheck(this, ChainNode);
2865
2888
 
2866
- this._chains = undefined;
2867
- this._object = undefined;
2868
- this.count = 0;
2889
+ this._parent = parent;
2890
+ this._key = key;
2869
2891
 
2870
- this._value = value;
2871
- this._paths = {};
2872
- if (this._watching) {
2873
- var obj = parent.value();
2892
+ // _watching is true when calling get(this._parent, this._key) will
2893
+ // return the value of this node.
2894
+ //
2895
+ // It is false for the root of a chain (because we have no parent)
2896
+ // and for global paths (because the parent node is the object with
2897
+ // the observer on it)
2898
+ this._watching = value === undefined;
2874
2899
 
2875
- if (!isObject(obj)) {
2876
- return;
2877
- }
2878
-
2879
- this._object = obj;
2880
-
2881
- addChainWatcher(this._object, this._key, this);
2882
- }
2883
- }
2900
+ this._chains = undefined;
2901
+ this._object = undefined;
2902
+ this.count = 0;
2884
2903
 
2885
- function lazyGet(obj, key) {
2886
- if (!isObject(obj)) {
2887
- return;
2888
- }
2904
+ this._value = value;
2905
+ this._paths = {};
2906
+ if (this._watching) {
2907
+ var obj = parent.value();
2889
2908
 
2890
- var meta = _emberMetalMeta.peekMeta(obj);
2909
+ if (!isObject(obj)) {
2910
+ return;
2911
+ }
2891
2912
 
2892
- // check if object meant only to be a prototype
2893
- if (meta && meta.proto === obj) {
2894
- return;
2895
- }
2913
+ this._object = obj;
2896
2914
 
2897
- // Use `get` if the return value is an EachProxy or an uncacheable value.
2898
- if (isVolatile(obj[key])) {
2899
- return _emberMetalProperty_get.get(obj, key);
2900
- // Otherwise attempt to get the cached value of the computed property
2901
- } else {
2902
- var cache = meta.readableCache();
2903
- if (cache) {
2904
- return _emberMetalComputed.cacheFor.get(cache, key);
2905
- }
2915
+ addChainWatcher(this._object, this._key, this);
2906
2916
  }
2907
- }
2917
+ }
2908
2918
 
2909
- ChainNode.prototype = {
2910
- value: function () {
2919
+ ChainNode.prototype.value = function value() {
2911
2920
  if (this._value === undefined && this._watching) {
2912
2921
  var obj = this._parent.value();
2913
2922
  this._value = lazyGet(obj, this._key);
2914
2923
  }
2915
2924
  return this._value;
2916
- },
2925
+ };
2917
2926
 
2918
- destroy: function () {
2927
+ ChainNode.prototype.destroy = function destroy() {
2919
2928
  if (this._watching) {
2920
2929
  var obj = this._object;
2921
2930
  if (obj) {
@@ -2923,10 +2932,11 @@ enifed('ember-metal/chains', ['exports', 'ember-utils', 'ember-metal/property_ge
2923
2932
  }
2924
2933
  this._watching = false; // so future calls do nothing
2925
2934
  }
2926
- },
2935
+ };
2927
2936
 
2928
2937
  // copies a top level object only
2929
- copy: function (obj) {
2938
+
2939
+ ChainNode.prototype.copy = function copy(obj) {
2930
2940
  var ret = new ChainNode(null, null, obj);
2931
2941
  var paths = this._paths;
2932
2942
  var path = undefined;
@@ -2939,11 +2949,12 @@ enifed('ember-metal/chains', ['exports', 'ember-utils', 'ember-metal/property_ge
2939
2949
  ret.add(path);
2940
2950
  }
2941
2951
  return ret;
2942
- },
2952
+ };
2943
2953
 
2944
2954
  // called on the root node of a chain to setup watchers on the specified
2945
2955
  // path.
2946
- add: function (path) {
2956
+
2957
+ ChainNode.prototype.add = function add(path) {
2947
2958
  var paths = this._paths;
2948
2959
  paths[path] = (paths[path] || 0) + 1;
2949
2960
 
@@ -2951,11 +2962,12 @@ enifed('ember-metal/chains', ['exports', 'ember-utils', 'ember-metal/property_ge
2951
2962
  var tail = path.slice(key.length + 1);
2952
2963
 
2953
2964
  this.chain(key, tail);
2954
- },
2965
+ };
2955
2966
 
2956
2967
  // called on the root node of a chain to teardown watcher on the specified
2957
2968
  // path
2958
- remove: function (path) {
2969
+
2970
+ ChainNode.prototype.remove = function remove(path) {
2959
2971
  var paths = this._paths;
2960
2972
  if (paths[path] > 0) {
2961
2973
  paths[path]--;
@@ -2965,9 +2977,9 @@ enifed('ember-metal/chains', ['exports', 'ember-utils', 'ember-metal/property_ge
2965
2977
  var tail = path.slice(key.length + 1);
2966
2978
 
2967
2979
  this.unchain(key, tail);
2968
- },
2980
+ };
2969
2981
 
2970
- chain: function (key, path) {
2982
+ ChainNode.prototype.chain = function chain(key, path) {
2971
2983
  var chains = this._chains;
2972
2984
  var node = undefined;
2973
2985
  if (chains === undefined) {
@@ -2988,9 +3000,9 @@ enifed('ember-metal/chains', ['exports', 'ember-utils', 'ember-metal/property_ge
2988
3000
  path = path.slice(key.length + 1);
2989
3001
  node.chain(key, path);
2990
3002
  }
2991
- },
3003
+ };
2992
3004
 
2993
- unchain: function (key, path) {
3005
+ ChainNode.prototype.unchain = function unchain(key, path) {
2994
3006
  var chains = this._chains;
2995
3007
  var node = chains[key];
2996
3008
 
@@ -3007,9 +3019,9 @@ enifed('ember-metal/chains', ['exports', 'ember-utils', 'ember-metal/property_ge
3007
3019
  chains[node._key] = undefined;
3008
3020
  node.destroy();
3009
3021
  }
3010
- },
3022
+ };
3011
3023
 
3012
- notify: function (revalidate, affected) {
3024
+ ChainNode.prototype.notify = function notify(revalidate, affected) {
3013
3025
  if (revalidate && this._watching) {
3014
3026
  var parentValue = this._parent.value();
3015
3027
 
@@ -3043,9 +3055,9 @@ enifed('ember-metal/chains', ['exports', 'ember-utils', 'ember-metal/property_ge
3043
3055
  if (affected && this._parent) {
3044
3056
  this._parent.populateAffected(this._key, 1, affected);
3045
3057
  }
3046
- },
3058
+ };
3047
3059
 
3048
- populateAffected: function (path, depth, affected) {
3060
+ ChainNode.prototype.populateAffected = function populateAffected(path, depth, affected) {
3049
3061
  if (this._key) {
3050
3062
  path = this._key + '.' + path;
3051
3063
  }
@@ -3057,8 +3069,34 @@ enifed('ember-metal/chains', ['exports', 'ember-utils', 'ember-metal/property_ge
3057
3069
  affected.push(this.value(), path);
3058
3070
  }
3059
3071
  }
3072
+ };
3073
+
3074
+ return ChainNode;
3075
+ })();
3076
+
3077
+ function lazyGet(obj, key) {
3078
+ if (!isObject(obj)) {
3079
+ return;
3060
3080
  }
3061
- };
3081
+
3082
+ var meta = _emberMetalMeta.peekMeta(obj);
3083
+
3084
+ // check if object meant only to be a prototype
3085
+ if (meta && meta.proto === obj) {
3086
+ return;
3087
+ }
3088
+
3089
+ // Use `get` if the return value is an EachProxy or an uncacheable value.
3090
+ if (isVolatile(obj[key])) {
3091
+ return _emberMetalProperty_get.get(obj, key);
3092
+ // Otherwise attempt to get the cached value of the computed property
3093
+ } else {
3094
+ var cache = meta.readableCache();
3095
+ if (cache) {
3096
+ return _emberMetalComputed.cacheFor.get(cache, key);
3097
+ }
3098
+ }
3099
+ }
3062
3100
 
3063
3101
  function finishChains(obj) {
3064
3102
  // We only create meta if we really have to
@@ -3562,8 +3600,8 @@ enifed('ember-metal/computed', ['exports', 'ember-utils', 'ember-metal/debug', '
3562
3600
  this.setProperties({ firstName, lastName });
3563
3601
  return value;
3564
3602
  }
3565
- });
3566
- })
3603
+ })
3604
+ });
3567
3605
 
3568
3606
  let client = Person.create();
3569
3607
  client.get('firstName'); // 'Betty'
@@ -3922,31 +3960,39 @@ enifed("ember-metal/error", ["exports"], function (exports) {
3922
3960
  */
3923
3961
  "use strict";
3924
3962
 
3925
- exports.default = EmberError;
3963
+ var EmberError = (function (_Error) {
3964
+ babelHelpers.inherits(EmberError, _Error);
3926
3965
 
3927
- function EmberError(message) {
3928
- if (!(this instanceof EmberError)) {
3929
- return new EmberError(message);
3930
- }
3966
+ function EmberError(message) {
3967
+ babelHelpers.classCallCheck(this, EmberError);
3931
3968
 
3932
- var error = Error.call(this, message);
3969
+ _Error.call(this);
3933
3970
 
3934
- if (Error.captureStackTrace) {
3935
- Error.captureStackTrace(this, EmberError);
3936
- } else {
3937
- this.stack = error.stack;
3971
+ if (!(this instanceof EmberError)) {
3972
+ return new EmberError(message);
3973
+ }
3974
+
3975
+ var error = Error.call(this, message);
3976
+
3977
+ if (Error.captureStackTrace) {
3978
+ Error.captureStackTrace(this, EmberError);
3979
+ } else {
3980
+ this.stack = error.stack;
3981
+ }
3982
+
3983
+ this.description = error.description;
3984
+ this.fileName = error.fileName;
3985
+ this.lineNumber = error.lineNumber;
3986
+ this.message = error.message;
3987
+ this.name = error.name;
3988
+ this.number = error.number;
3989
+ this.code = error.code;
3938
3990
  }
3939
3991
 
3940
- this.description = error.description;
3941
- this.fileName = error.fileName;
3942
- this.lineNumber = error.lineNumber;
3943
- this.message = error.message;
3944
- this.name = error.name;
3945
- this.number = error.number;
3946
- this.code = error.code;
3947
- }
3992
+ return EmberError;
3993
+ })(Error);
3948
3994
 
3949
- EmberError.prototype = Object.create(Error.prototype);
3995
+ exports.default = EmberError;
3950
3996
  });
3951
3997
  enifed('ember-metal/error_handler', ['exports', 'ember-console', 'ember-metal/testing'], function (exports, _emberConsole, _emberMetalTesting) {
3952
3998
  'use strict';
@@ -3954,7 +4000,6 @@ enifed('ember-metal/error_handler', ['exports', 'ember-console', 'ember-metal/te
3954
4000
  exports.getOnerror = getOnerror;
3955
4001
  exports.setOnerror = setOnerror;
3956
4002
  exports.dispatchError = dispatchError;
3957
- exports.getDispatchOverride = getDispatchOverride;
3958
4003
  exports.setDispatchOverride = setDispatchOverride;
3959
4004
 
3960
4005
  // To maintain stacktrace consistency across browsers
@@ -3962,7 +4007,7 @@ enifed('ember-metal/error_handler', ['exports', 'ember-console', 'ember-metal/te
3962
4007
  var stack = error.stack;
3963
4008
  var message = error.message;
3964
4009
 
3965
- if (stack && stack.indexOf(message) === -1) {
4010
+ if (stack && !stack.includes(message)) {
3966
4011
  stack = message + '\n' + stack;
3967
4012
  }
3968
4013
 
@@ -3995,10 +4040,6 @@ enifed('ember-metal/error_handler', ['exports', 'ember-console', 'ember-metal/te
3995
4040
 
3996
4041
  // allows testing adapter to override dispatch
3997
4042
 
3998
- function getDispatchOverride() {
3999
- return dispatchOverride;
4000
- }
4001
-
4002
4043
  function setDispatchOverride(handler) {
4003
4044
  dispatchOverride = handler;
4004
4045
  }
@@ -4729,6 +4770,9 @@ enifed('ember-metal/injected_property', ['exports', 'ember-utils', 'ember-metal/
4729
4770
  InjectedPropertyPrototype.teardown = ComputedPropertyPrototype.teardown;
4730
4771
  });
4731
4772
  enifed('ember-metal/instrumentation', ['exports', 'ember-environment', 'ember-metal/features'], function (exports, _emberEnvironment, _emberMetalFeatures) {
4773
+ /* eslint no-console:off */
4774
+ /* global console */
4775
+
4732
4776
  'use strict';
4733
4777
 
4734
4778
  exports.instrument = instrument;
@@ -4865,8 +4909,8 @@ enifed('ember-metal/instrumentation', ['exports', 'ember-environment', 'ember-me
4865
4909
  result = payload;
4866
4910
  } finally {
4867
4911
  finalizer();
4868
- return result;
4869
4912
  }
4913
+ return result;
4870
4914
  }
4871
4915
 
4872
4916
  function NOOP() {}
@@ -5186,8 +5230,6 @@ enifed('ember-metal/is_proxy', ['exports', 'ember-metal/meta'], function (export
5186
5230
  enifed('ember-metal/libraries', ['exports', 'ember-metal/debug', 'ember-metal/features'], function (exports, _emberMetalDebug, _emberMetalFeatures) {
5187
5231
  'use strict';
5188
5232
 
5189
- exports.Libraries = Libraries;
5190
-
5191
5233
  /**
5192
5234
  Helper class that allows you to register your library with Ember.
5193
5235
 
@@ -5198,10 +5240,22 @@ enifed('ember-metal/libraries', ['exports', 'ember-metal/debug', 'ember-metal/fe
5198
5240
  @private
5199
5241
  */
5200
5242
 
5201
- function Libraries() {
5202
- this._registry = [];
5203
- this._coreLibIndex = 0;
5204
- }
5243
+ var Libraries = (function () {
5244
+ function Libraries() {
5245
+ babelHelpers.classCallCheck(this, Libraries);
5246
+
5247
+ this._registry = [];
5248
+ this._coreLibIndex = 0;
5249
+ }
5250
+
5251
+ Libraries.prototype.isRegistered = function isRegistered(name) {
5252
+ return !!this._getLibraryByName(name);
5253
+ };
5254
+
5255
+ return Libraries;
5256
+ })();
5257
+
5258
+ exports.Libraries = Libraries;
5205
5259
 
5206
5260
  Libraries.prototype = {
5207
5261
  constructor: Libraries,
@@ -5788,7 +5842,6 @@ enifed('ember-metal/meta', ['exports', 'ember-utils', 'ember-metal/features', 'e
5788
5842
  // Remove "use strict"; from transpiled module until
5789
5843
  // https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed
5790
5844
 
5791
- exports.Meta = Meta;
5792
5845
  exports.deleteMeta = deleteMeta;
5793
5846
  exports.meta = meta;
5794
5847
 
@@ -5858,144 +5911,282 @@ enifed('ember-metal/meta', ['exports', 'ember-utils', 'ember-metal/features', 'e
5858
5911
  var memberNames = Object.keys(members);
5859
5912
  var META_FIELD = '__ember_meta__';
5860
5913
 
5861
- function Meta(obj, parentMeta) {
5862
- var _this = this;
5863
-
5864
- _emberMetalDebug.runInDebug(function () {
5865
- return counters.metaInstantiated++;
5866
- });
5914
+ var Meta = (function () {
5915
+ function Meta(obj, parentMeta) {
5916
+ var _this = this;
5867
5917
 
5868
- this._cache = undefined;
5869
- this._weak = undefined;
5870
- this._watching = undefined;
5871
- this._mixins = undefined;
5872
- this._bindings = undefined;
5873
- this._values = undefined;
5874
- this._deps = undefined;
5875
- this._chainWatchers = undefined;
5876
- this._chains = undefined;
5877
- this._tag = undefined;
5878
- this._tags = undefined;
5879
-
5880
- // initial value for all flags right now is false
5881
- // see FLAGS const for detailed list of flags used
5882
- this._flags = 0;
5883
-
5884
- // used only internally
5885
- this.source = obj;
5886
-
5887
- // when meta(obj).proto === obj, the object is intended to be only a
5888
- // prototype and doesn't need to actually be observable itself
5889
- this.proto = undefined;
5890
-
5891
- // The next meta in our inheritance chain. We (will) track this
5892
- // explicitly instead of using prototypical inheritance because we
5893
- // have detailed knowledge of how each property should really be
5894
- // inherited, and we can optimize it much better than JS runtimes.
5895
- this.parent = parentMeta;
5918
+ babelHelpers.classCallCheck(this, Meta);
5896
5919
 
5897
- if (true || false) {
5898
- this._lastRendered = undefined;
5899
5920
  _emberMetalDebug.runInDebug(function () {
5900
- _this._lastRenderedReferenceMap = undefined;
5901
- _this._lastRenderedTemplateMap = undefined;
5921
+ return counters.metaInstantiated++;
5902
5922
  });
5923
+
5924
+ this._cache = undefined;
5925
+ this._weak = undefined;
5926
+ this._watching = undefined;
5927
+ this._mixins = undefined;
5928
+ this._bindings = undefined;
5929
+ this._values = undefined;
5930
+ this._deps = undefined;
5931
+ this._chainWatchers = undefined;
5932
+ this._chains = undefined;
5933
+ this._tag = undefined;
5934
+ this._tags = undefined;
5935
+
5936
+ // initial value for all flags right now is false
5937
+ // see FLAGS const for detailed list of flags used
5938
+ this._flags = 0;
5939
+
5940
+ // used only internally
5941
+ this.source = obj;
5942
+
5943
+ // when meta(obj).proto === obj, the object is intended to be only a
5944
+ // prototype and doesn't need to actually be observable itself
5945
+ this.proto = undefined;
5946
+
5947
+ // The next meta in our inheritance chain. We (will) track this
5948
+ // explicitly instead of using prototypical inheritance because we
5949
+ // have detailed knowledge of how each property should really be
5950
+ // inherited, and we can optimize it much better than JS runtimes.
5951
+ this.parent = parentMeta;
5952
+
5953
+ if (true || false) {
5954
+ this._lastRendered = undefined;
5955
+ _emberMetalDebug.runInDebug(function () {
5956
+ _this._lastRenderedReferenceMap = undefined;
5957
+ _this._lastRenderedTemplateMap = undefined;
5958
+ });
5959
+ }
5960
+
5961
+ this._initializeListeners();
5903
5962
  }
5904
5963
 
5905
- this._initializeListeners();
5906
- }
5964
+ Meta.prototype.isInitialized = function isInitialized(obj) {
5965
+ return this.proto !== obj;
5966
+ };
5967
+
5968
+ Meta.prototype.destroy = function destroy() {
5969
+ if (this.isMetaDestroyed()) {
5970
+ return;
5971
+ }
5972
+
5973
+ // remove chainWatchers to remove circular references that would prevent GC
5974
+ var nodes = undefined,
5975
+ key = undefined,
5976
+ nodeObject = undefined;
5977
+ var node = this.readableChains();
5978
+ if (node) {
5979
+ NODE_STACK.push(node);
5980
+ // process tree
5981
+ while (NODE_STACK.length > 0) {
5982
+ node = NODE_STACK.pop();
5983
+ // push children
5984
+ nodes = node._chains;
5985
+ if (nodes) {
5986
+ for (key in nodes) {
5987
+ if (nodes[key] !== undefined) {
5988
+ NODE_STACK.push(nodes[key]);
5989
+ }
5990
+ }
5991
+ }
5992
+
5993
+ // remove chainWatcher in node object
5994
+ if (node._watching) {
5995
+ nodeObject = node._object;
5996
+ if (nodeObject) {
5997
+ var foreignMeta = peekMeta(nodeObject);
5998
+ // avoid cleaning up chain watchers when both current and
5999
+ // foreign objects are being destroyed
6000
+ // if both are being destroyed manual cleanup is not needed
6001
+ // as they will be GC'ed and no non-destroyed references will
6002
+ // be remaining
6003
+ if (foreignMeta && !foreignMeta.isSourceDestroying()) {
6004
+ _emberMetalChains.removeChainWatcher(nodeObject, node._key, node, foreignMeta);
6005
+ }
6006
+ }
6007
+ }
6008
+ }
6009
+ }
6010
+
6011
+ this.setMetaDestroyed();
6012
+ };
6013
+
6014
+ Meta.prototype.isSourceDestroying = function isSourceDestroying() {
6015
+ return (this._flags & SOURCE_DESTROYING) !== 0;
6016
+ };
6017
+
6018
+ Meta.prototype.setSourceDestroying = function setSourceDestroying() {
6019
+ this._flags |= SOURCE_DESTROYING;
6020
+ };
6021
+
6022
+ Meta.prototype.isSourceDestroyed = function isSourceDestroyed() {
6023
+ return (this._flags & SOURCE_DESTROYED) !== 0;
6024
+ };
6025
+
6026
+ Meta.prototype.setSourceDestroyed = function setSourceDestroyed() {
6027
+ this._flags |= SOURCE_DESTROYED;
6028
+ };
6029
+
6030
+ Meta.prototype.isMetaDestroyed = function isMetaDestroyed() {
6031
+ return (this._flags & META_DESTROYED) !== 0;
6032
+ };
6033
+
6034
+ Meta.prototype.setMetaDestroyed = function setMetaDestroyed() {
6035
+ this._flags |= META_DESTROYED;
6036
+ };
6037
+
6038
+ Meta.prototype.isProxy = function isProxy() {
6039
+ return (this._flags & IS_PROXY) !== 0;
6040
+ };
6041
+
6042
+ Meta.prototype.setProxy = function setProxy() {
6043
+ this._flags |= IS_PROXY;
6044
+ };
6045
+
6046
+ Meta.prototype._getOrCreateOwnMap = function _getOrCreateOwnMap(key) {
6047
+ return this[key] || (this[key] = new _emberUtils.EmptyObject());
6048
+ };
6049
+
6050
+ Meta.prototype._getInherited = function _getInherited(key) {
6051
+ var pointer = this;
6052
+ while (pointer !== undefined) {
6053
+ if (pointer[key]) {
6054
+ return pointer[key];
6055
+ }
6056
+ pointer = pointer.parent;
6057
+ }
6058
+ };
6059
+
6060
+ Meta.prototype._findInherited = function _findInherited(key, subkey) {
6061
+ var pointer = this;
6062
+ while (pointer !== undefined) {
6063
+ var map = pointer[key];
6064
+ if (map) {
6065
+ var value = map[subkey];
6066
+ if (value !== undefined) {
6067
+ return value;
6068
+ }
6069
+ }
6070
+ pointer = pointer.parent;
6071
+ }
6072
+ };
5907
6073
 
5908
- Meta.prototype.isInitialized = function (obj) {
5909
- return this.proto !== obj;
5910
- };
6074
+ // Implements a member that provides a lazily created map of maps,
6075
+ // with inheritance at both levels.
5911
6076
 
5912
- var NODE_STACK = [];
6077
+ Meta.prototype.writeDeps = function writeDeps(subkey, itemkey, value) {
6078
+ _emberMetalDebug.assert('Cannot call writeDeps after the object is destroyed.', !this.isMetaDestroyed());
5913
6079
 
5914
- Meta.prototype.destroy = function () {
5915
- if (this.isMetaDestroyed()) {
5916
- return;
5917
- }
6080
+ var outerMap = this._getOrCreateOwnMap('_deps');
6081
+ var innerMap = outerMap[subkey];
6082
+ if (!innerMap) {
6083
+ innerMap = outerMap[subkey] = new _emberUtils.EmptyObject();
6084
+ }
6085
+ innerMap[itemkey] = value;
6086
+ };
5918
6087
 
5919
- // remove chainWatchers to remove circular references that would prevent GC
5920
- var node = undefined,
5921
- nodes = undefined,
5922
- key = undefined,
5923
- nodeObject = undefined;
5924
- node = this.readableChains();
5925
- if (node) {
5926
- NODE_STACK.push(node);
5927
- // process tree
5928
- while (NODE_STACK.length > 0) {
5929
- node = NODE_STACK.pop();
5930
- // push children
5931
- nodes = node._chains;
5932
- if (nodes) {
5933
- for (key in nodes) {
5934
- if (nodes[key] !== undefined) {
5935
- NODE_STACK.push(nodes[key]);
6088
+ Meta.prototype.peekDeps = function peekDeps(subkey, itemkey) {
6089
+ var pointer = this;
6090
+ while (pointer !== undefined) {
6091
+ var map = pointer._deps;
6092
+ if (map) {
6093
+ var value = map[subkey];
6094
+ if (value) {
6095
+ if (value[itemkey] !== undefined) {
6096
+ return value[itemkey];
5936
6097
  }
5937
6098
  }
5938
6099
  }
6100
+ pointer = pointer.parent;
6101
+ }
6102
+ };
6103
+
6104
+ Meta.prototype.hasDeps = function hasDeps(subkey) {
6105
+ var pointer = this;
6106
+ while (pointer !== undefined) {
6107
+ if (pointer._deps && pointer._deps[subkey]) {
6108
+ return true;
6109
+ }
6110
+ pointer = pointer.parent;
6111
+ }
6112
+ return false;
6113
+ };
6114
+
6115
+ Meta.prototype.forEachInDeps = function forEachInDeps(subkey, fn) {
6116
+ return this._forEachIn('_deps', subkey, fn);
6117
+ };
5939
6118
 
5940
- // remove chainWatcher in node object
5941
- if (node._watching) {
5942
- nodeObject = node._object;
5943
- if (nodeObject) {
5944
- var foreignMeta = peekMeta(nodeObject);
5945
- // avoid cleaning up chain watchers when both current and
5946
- // foreign objects are being destroyed
5947
- // if both are being destroyed manual cleanup is not needed
5948
- // as they will be GC'ed and no non-destroyed references will
5949
- // be remaining
5950
- if (foreignMeta && !foreignMeta.isSourceDestroying()) {
5951
- _emberMetalChains.removeChainWatcher(nodeObject, node._key, node, foreignMeta);
6119
+ Meta.prototype._forEachIn = function _forEachIn(key, subkey, fn) {
6120
+ var pointer = this;
6121
+ var seen = new _emberUtils.EmptyObject();
6122
+ var calls = [];
6123
+ while (pointer !== undefined) {
6124
+ var map = pointer[key];
6125
+ if (map) {
6126
+ var innerMap = map[subkey];
6127
+ if (innerMap) {
6128
+ for (var innerKey in innerMap) {
6129
+ if (!seen[innerKey]) {
6130
+ seen[innerKey] = true;
6131
+ calls.push([innerKey, innerMap[innerKey]]);
6132
+ }
5952
6133
  }
5953
6134
  }
5954
6135
  }
6136
+ pointer = pointer.parent;
5955
6137
  }
5956
- }
6138
+ for (var i = 0; i < calls.length; i++) {
6139
+ var _calls$i = calls[i];
6140
+ var innerKey = _calls$i[0];
6141
+ var value = _calls$i[1];
5957
6142
 
5958
- this.setMetaDestroyed();
5959
- };
6143
+ fn(innerKey, value);
6144
+ }
6145
+ };
5960
6146
 
5961
- for (var _name in _emberMetalMeta_listeners.protoMethods) {
5962
- Meta.prototype[_name] = _emberMetalMeta_listeners.protoMethods[_name];
5963
- }
5964
- memberNames.forEach(function (name) {
5965
- return members[name](name, Meta);
5966
- });
6147
+ Meta.prototype.readInheritedValue = function readInheritedValue(key, subkey) {
6148
+ var internalKey = '_' + key;
5967
6149
 
5968
- Meta.prototype.isSourceDestroying = function isSourceDestroying() {
5969
- return (this._flags & SOURCE_DESTROYING) !== 0;
5970
- };
6150
+ var pointer = this;
5971
6151
 
5972
- Meta.prototype.setSourceDestroying = function setSourceDestroying() {
5973
- this._flags |= SOURCE_DESTROYING;
5974
- };
6152
+ while (pointer !== undefined) {
6153
+ var map = pointer[internalKey];
6154
+ if (map) {
6155
+ var value = map[subkey];
6156
+ if (value !== undefined || subkey in map) {
6157
+ return map[subkey];
6158
+ }
6159
+ }
6160
+ pointer = pointer.parent;
6161
+ }
5975
6162
 
5976
- Meta.prototype.isSourceDestroyed = function isSourceDestroyed() {
5977
- return (this._flags & SOURCE_DESTROYED) !== 0;
5978
- };
6163
+ return UNDEFINED;
6164
+ };
5979
6165
 
5980
- Meta.prototype.setSourceDestroyed = function setSourceDestroyed() {
5981
- this._flags |= SOURCE_DESTROYED;
5982
- };
6166
+ Meta.prototype.writeValue = function writeValue(obj, key, value) {
6167
+ var descriptor = _emberUtils.lookupDescriptor(obj, key);
6168
+ var isMandatorySetter = descriptor && descriptor.set && descriptor.set.isMandatorySetter;
5983
6169
 
5984
- Meta.prototype.isMetaDestroyed = function isMetaDestroyed() {
5985
- return (this._flags & META_DESTROYED) !== 0;
5986
- };
6170
+ if (isMandatorySetter) {
6171
+ this.writeValues(key, value);
6172
+ } else {
6173
+ obj[key] = value;
6174
+ }
6175
+ };
5987
6176
 
5988
- Meta.prototype.setMetaDestroyed = function setMetaDestroyed() {
5989
- this._flags |= META_DESTROYED;
5990
- };
6177
+ return Meta;
6178
+ })();
5991
6179
 
5992
- Meta.prototype.isProxy = function isProxy() {
5993
- return (this._flags & IS_PROXY) !== 0;
5994
- };
6180
+ exports.Meta = Meta;
5995
6181
 
5996
- Meta.prototype.setProxy = function setProxy() {
5997
- this._flags |= IS_PROXY;
5998
- };
6182
+ var NODE_STACK = [];
6183
+
6184
+ for (var _name in _emberMetalMeta_listeners.protoMethods) {
6185
+ Meta.prototype[_name] = _emberMetalMeta_listeners.protoMethods[_name];
6186
+ }
6187
+ memberNames.forEach(function (name) {
6188
+ return members[name](name, Meta);
6189
+ });
5999
6190
 
6000
6191
  // Implements a member that is a lazily created, non-inheritable
6001
6192
  // POJO.
@@ -6010,14 +6201,6 @@ enifed('ember-metal/meta', ['exports', 'ember-utils', 'ember-metal/features', 'e
6010
6201
  };
6011
6202
  }
6012
6203
 
6013
- Meta.prototype._getOrCreateOwnMap = function (key) {
6014
- var ret = this[key];
6015
- if (!ret) {
6016
- ret = this[key] = new _emberUtils.EmptyObject();
6017
- }
6018
- return ret;
6019
- };
6020
-
6021
6204
  // Implements a member that is a lazily created POJO with inheritable
6022
6205
  // values.
6023
6206
  function inheritedMap(name, Meta) {
@@ -6067,105 +6250,9 @@ enifed('ember-metal/meta', ['exports', 'ember-utils', 'ember-metal/features', 'e
6067
6250
  };
6068
6251
  }
6069
6252
 
6070
- Meta.prototype._getInherited = function (key) {
6071
- var pointer = this;
6072
- while (pointer !== undefined) {
6073
- if (pointer[key]) {
6074
- return pointer[key];
6075
- }
6076
- pointer = pointer.parent;
6077
- }
6078
- };
6079
-
6080
- Meta.prototype._findInherited = function (key, subkey) {
6081
- var pointer = this;
6082
- while (pointer !== undefined) {
6083
- var map = pointer[key];
6084
- if (map) {
6085
- var value = map[subkey];
6086
- if (value !== undefined) {
6087
- return value;
6088
- }
6089
- }
6090
- pointer = pointer.parent;
6091
- }
6092
- };
6093
-
6094
6253
  var UNDEFINED = _emberUtils.symbol('undefined');
6095
6254
 
6096
6255
  exports.UNDEFINED = UNDEFINED;
6097
- // Implements a member that provides a lazily created map of maps,
6098
- // with inheritance at both levels.
6099
- Meta.prototype.writeDeps = function writeDeps(subkey, itemkey, value) {
6100
- _emberMetalDebug.assert('Cannot call writeDeps after the object is destroyed.', !this.isMetaDestroyed());
6101
-
6102
- var outerMap = this._getOrCreateOwnMap('_deps');
6103
- var innerMap = outerMap[subkey];
6104
- if (!innerMap) {
6105
- innerMap = outerMap[subkey] = new _emberUtils.EmptyObject();
6106
- }
6107
- innerMap[itemkey] = value;
6108
- };
6109
-
6110
- Meta.prototype.peekDeps = function peekDeps(subkey, itemkey) {
6111
- var pointer = this;
6112
- while (pointer !== undefined) {
6113
- var map = pointer._deps;
6114
- if (map) {
6115
- var value = map[subkey];
6116
- if (value) {
6117
- if (value[itemkey] !== undefined) {
6118
- return value[itemkey];
6119
- }
6120
- }
6121
- }
6122
- pointer = pointer.parent;
6123
- }
6124
- };
6125
-
6126
- Meta.prototype.hasDeps = function hasDeps(subkey) {
6127
- var pointer = this;
6128
- while (pointer !== undefined) {
6129
- if (pointer._deps && pointer._deps[subkey]) {
6130
- return true;
6131
- }
6132
- pointer = pointer.parent;
6133
- }
6134
- return false;
6135
- };
6136
-
6137
- Meta.prototype.forEachInDeps = function forEachInDeps(subkey, fn) {
6138
- return this._forEachIn('_deps', subkey, fn);
6139
- };
6140
-
6141
- Meta.prototype._forEachIn = function (key, subkey, fn) {
6142
- var pointer = this;
6143
- var seen = new _emberUtils.EmptyObject();
6144
- var calls = [];
6145
- while (pointer !== undefined) {
6146
- var map = pointer[key];
6147
- if (map) {
6148
- var innerMap = map[subkey];
6149
- if (innerMap) {
6150
- for (var innerKey in innerMap) {
6151
- if (!seen[innerKey]) {
6152
- seen[innerKey] = true;
6153
- calls.push([innerKey, innerMap[innerKey]]);
6154
- }
6155
- }
6156
- }
6157
- }
6158
- pointer = pointer.parent;
6159
- }
6160
- for (var i = 0; i < calls.length; i++) {
6161
- var _calls$i = calls[i];
6162
- var innerKey = _calls$i[0];
6163
- var value = _calls$i[1];
6164
-
6165
- fn(innerKey, value);
6166
- }
6167
- };
6168
-
6169
6256
  // Implements a member that provides a non-heritable, lazily-created
6170
6257
  // object using the method you provide.
6171
6258
  function ownCustomObject(name, Meta) {
@@ -6572,7 +6659,6 @@ enifed('ember-metal/mixin', ['exports', 'ember-utils', 'ember-metal/error', 'emb
6572
6659
  */
6573
6660
  exports.detectBinding = detectBinding;
6574
6661
  exports.mixin = mixin;
6575
- exports.default = Mixin;
6576
6662
  exports.hasUnprocessedMixins = hasUnprocessedMixins;
6577
6663
  exports.clearUnprocessedMixins = clearUnprocessedMixins;
6578
6664
  exports.required = required;
@@ -6584,7 +6670,9 @@ enifed('ember-metal/mixin', ['exports', 'ember-utils', 'ember-metal/error', 'emb
6584
6670
  function ROOT() {}
6585
6671
  ROOT.__hasSuper = false;
6586
6672
 
6587
- var a_slice = [].slice;
6673
+ var a_slice = Array.prototype.slice;
6674
+ var a_concat = Array.prototype.concat;
6675
+ var isArray = Array.isArray;
6588
6676
 
6589
6677
  function isMethod(obj) {
6590
6678
  return 'function' === typeof obj && obj.isMethod !== false && obj !== Boolean && obj !== Object && obj !== Number && obj !== Array && obj !== Date && obj !== String;
@@ -6608,14 +6696,11 @@ enifed('ember-metal/mixin', ['exports', 'ember-utils', 'ember-metal/error', 'emb
6608
6696
  }
6609
6697
 
6610
6698
  function concatenatedMixinProperties(concatProp, props, values, base) {
6611
- var concats = undefined;
6612
-
6613
6699
  // reset before adding each new mixin to pickup concats from previous
6614
- concats = values[concatProp] || base[concatProp];
6700
+ var concats = values[concatProp] || base[concatProp];
6615
6701
  if (props[concatProp]) {
6616
- concats = concats ? concats.concat(props[concatProp]) : props[concatProp];
6702
+ concats = concats ? a_concat.call(concats, props[concatProp]) : props[concatProp];
6617
6703
  }
6618
-
6619
6704
  return concats;
6620
6705
  }
6621
6706
 
@@ -6682,18 +6767,18 @@ enifed('ember-metal/mixin', ['exports', 'ember-utils', 'ember-metal/error', 'emb
6682
6767
  var baseValue = values[key] || obj[key];
6683
6768
  var ret = undefined;
6684
6769
 
6685
- if (baseValue) {
6686
- if ('function' === typeof baseValue.concat) {
6770
+ if (baseValue === null || baseValue === undefined) {
6771
+ ret = _emberUtils.makeArray(value);
6772
+ } else {
6773
+ if (isArray(baseValue)) {
6687
6774
  if (value === null || value === undefined) {
6688
6775
  ret = baseValue;
6689
6776
  } else {
6690
- ret = baseValue.concat(value);
6777
+ ret = a_concat.call(baseValue, value);
6691
6778
  }
6692
6779
  } else {
6693
- ret = _emberUtils.makeArray(baseValue).concat(value);
6780
+ ret = a_concat.call(_emberUtils.makeArray(baseValue), value);
6694
6781
  }
6695
- } else {
6696
- ret = _emberUtils.makeArray(value);
6697
6782
  }
6698
6783
 
6699
6784
  _emberMetalDebug.runInDebug(function () {
@@ -6712,7 +6797,7 @@ enifed('ember-metal/mixin', ['exports', 'ember-utils', 'ember-metal/error', 'emb
6712
6797
  var baseValue = values[key] || obj[key];
6713
6798
 
6714
6799
  _emberMetalDebug.runInDebug(function () {
6715
- if (Array.isArray(value)) {
6800
+ if (isArray(value)) {
6716
6801
  // use conditional to avoid stringifying every time
6717
6802
  _emberMetalDebug.assert('You passed in `' + JSON.stringify(value) + '` as the value for `' + key + '` but `' + key + '` cannot be an Array', false);
6718
6803
  }
@@ -7039,40 +7124,87 @@ enifed('ember-metal/mixin', ['exports', 'ember-utils', 'ember-metal/error', 'emb
7039
7124
  @public
7040
7125
  */
7041
7126
 
7042
- function Mixin(args, properties) {
7043
- this.properties = properties;
7127
+ var Mixin = (function () {
7128
+ function Mixin(args, properties) {
7129
+ babelHelpers.classCallCheck(this, Mixin);
7044
7130
 
7045
- var length = args && args.length;
7131
+ this.properties = properties;
7046
7132
 
7047
- if (length > 0) {
7048
- var m = new Array(length);
7133
+ var length = args && args.length;
7049
7134
 
7050
- for (var i = 0; i < length; i++) {
7051
- var x = args[i];
7052
- if (x instanceof Mixin) {
7053
- m[i] = x;
7054
- } else {
7055
- m[i] = new Mixin(undefined, x);
7135
+ if (length > 0) {
7136
+ var m = new Array(length);
7137
+
7138
+ for (var i = 0; i < length; i++) {
7139
+ var x = args[i];
7140
+ if (x instanceof Mixin) {
7141
+ m[i] = x;
7142
+ } else {
7143
+ m[i] = new Mixin(undefined, x);
7144
+ }
7056
7145
  }
7057
- }
7058
7146
 
7059
- this.mixins = m;
7060
- } else {
7061
- this.mixins = undefined;
7147
+ this.mixins = m;
7148
+ } else {
7149
+ this.mixins = undefined;
7150
+ }
7151
+ this.ownerConstructor = undefined;
7152
+ this._without = undefined;
7153
+ this[_emberUtils.GUID_KEY] = null;
7154
+ this[_emberUtils.NAME_KEY] = null;
7155
+ _emberMetalDebug.debugSeal(this);
7062
7156
  }
7063
- this.ownerConstructor = undefined;
7064
- this._without = undefined;
7065
- this[_emberUtils.GUID_KEY] = null;
7066
- this[_emberUtils.NAME_KEY] = null;
7067
- _emberMetalDebug.debugSeal(this);
7068
- }
7069
7157
 
7070
- Mixin._apply = applyMixin;
7158
+ Mixin.applyPartial = function applyPartial(obj) {
7159
+ var args = a_slice.call(arguments, 1);
7160
+ return applyMixin(obj, args, true);
7161
+ };
7071
7162
 
7072
- Mixin.applyPartial = function (obj) {
7073
- var args = a_slice.call(arguments, 1);
7074
- return applyMixin(obj, args, true);
7075
- };
7163
+ /**
7164
+ @method create
7165
+ @static
7166
+ @param arguments*
7167
+ @public
7168
+ */
7169
+
7170
+ Mixin.create = function create() {
7171
+ // ES6TODO: this relies on a global state?
7172
+ unprocessedFlag = true;
7173
+ var M = this;
7174
+
7175
+ for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
7176
+ args[_key2] = arguments[_key2];
7177
+ }
7178
+
7179
+ return new M(args, undefined);
7180
+ };
7181
+
7182
+ // returns the mixins currently applied to the specified object
7183
+ // TODO: Make Ember.mixin
7184
+
7185
+ Mixin.mixins = function mixins(obj) {
7186
+ var m = _emberMetalMeta.peekMeta(obj);
7187
+ var ret = [];
7188
+ if (!m) {
7189
+ return ret;
7190
+ }
7191
+
7192
+ m.forEachMixins(function (key, currentMixin) {
7193
+ // skip primitive mixins since these are always anonymous
7194
+ if (!currentMixin.properties) {
7195
+ ret.push(currentMixin);
7196
+ }
7197
+ });
7198
+
7199
+ return ret;
7200
+ };
7201
+
7202
+ return Mixin;
7203
+ })();
7204
+
7205
+ exports.default = Mixin;
7206
+
7207
+ Mixin._apply = applyMixin;
7076
7208
 
7077
7209
  Mixin.finishPartial = finishPartial;
7078
7210
 
@@ -7086,24 +7218,6 @@ enifed('ember-metal/mixin', ['exports', 'ember-utils', 'ember-metal/error', 'emb
7086
7218
  unprocessedFlag = false;
7087
7219
  }
7088
7220
 
7089
- /**
7090
- @method create
7091
- @static
7092
- @param arguments*
7093
- @public
7094
- */
7095
- Mixin.create = function () {
7096
- // ES6TODO: this relies on a global state?
7097
- unprocessedFlag = true;
7098
- var M = this;
7099
-
7100
- for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
7101
- args[_key2] = arguments[_key2];
7102
- }
7103
-
7104
- return new M(args, undefined);
7105
- };
7106
-
7107
7221
  var MixinPrototype = Mixin.prototype;
7108
7222
 
7109
7223
  /**
@@ -7237,25 +7351,6 @@ enifed('ember-metal/mixin', ['exports', 'ember-utils', 'ember-metal/error', 'emb
7237
7351
 
7238
7352
  _emberMetalDebug.debugSeal(MixinPrototype);
7239
7353
 
7240
- // returns the mixins currently applied to the specified object
7241
- // TODO: Make Ember.mixin
7242
- Mixin.mixins = function (obj) {
7243
- var m = _emberMetalMeta.peekMeta(obj);
7244
- var ret = [];
7245
- if (!m) {
7246
- return ret;
7247
- }
7248
-
7249
- m.forEachMixins(function (key, currentMixin) {
7250
- // skip primitive mixins since these are always anonymous
7251
- if (!currentMixin.properties) {
7252
- ret.push(currentMixin);
7253
- }
7254
- });
7255
-
7256
- return ret;
7257
- };
7258
-
7259
7354
  var REQUIRED = new _emberMetalProperties.Descriptor();
7260
7355
  REQUIRED.toString = function () {
7261
7356
  return '(Required Property)';
@@ -7459,7 +7554,6 @@ enifed('ember-metal/mixin', ['exports', 'ember-utils', 'ember-metal/error', 'emb
7459
7554
  }
7460
7555
 
7461
7556
  exports.Mixin = Mixin;
7462
- exports.required = required;
7463
7557
  exports.REQUIRED = REQUIRED;
7464
7558
  });
7465
7559
  enifed('ember-metal/observer', ['exports', 'ember-metal/watching', 'ember-metal/events'], function (exports, _emberMetalWatching, _emberMetalEvents) {
@@ -7579,8 +7673,6 @@ enifed('ember-metal/observer', ['exports', 'ember-metal/watching', 'ember-metal/
7579
7673
  enifed('ember-metal/observer_set', ['exports', 'ember-utils', 'ember-metal/events'], function (exports, _emberUtils, _emberMetalEvents) {
7580
7674
  'use strict';
7581
7675
 
7582
- exports.default = ObserverSet;
7583
-
7584
7676
  /*
7585
7677
  this.observerSet = {
7586
7678
  [senderGuid]: { // variable name: `keySet`
@@ -7600,53 +7692,61 @@ enifed('ember-metal/observer_set', ['exports', 'ember-utils', 'ember-metal/event
7600
7692
  ]
7601
7693
  */
7602
7694
 
7603
- function ObserverSet() {
7604
- this.clear();
7605
- }
7606
-
7607
- ObserverSet.prototype.add = function (sender, keyName, eventName) {
7608
- var observerSet = this.observerSet;
7609
- var observers = this.observers;
7610
- var senderGuid = _emberUtils.guidFor(sender);
7611
- var keySet = observerSet[senderGuid];
7612
- var index = undefined;
7695
+ var ObserverSet = (function () {
7696
+ function ObserverSet() {
7697
+ babelHelpers.classCallCheck(this, ObserverSet);
7613
7698
 
7614
- if (!keySet) {
7615
- observerSet[senderGuid] = keySet = {};
7616
- }
7617
- index = keySet[keyName];
7618
- if (index === undefined) {
7619
- index = observers.push({
7620
- sender: sender,
7621
- keyName: keyName,
7622
- eventName: eventName,
7623
- listeners: []
7624
- }) - 1;
7625
- keySet[keyName] = index;
7699
+ this.clear();
7626
7700
  }
7627
- return observers[index].listeners;
7628
- };
7629
7701
 
7630
- ObserverSet.prototype.flush = function () {
7631
- var observers = this.observers;
7632
- var i = undefined,
7633
- observer = undefined,
7634
- sender = undefined;
7635
- this.clear();
7636
- for (i = 0; i < observers.length; ++i) {
7637
- observer = observers[i];
7638
- sender = observer.sender;
7639
- if (sender.isDestroying || sender.isDestroyed) {
7640
- continue;
7702
+ ObserverSet.prototype.add = function add(sender, keyName, eventName) {
7703
+ var observerSet = this.observerSet;
7704
+ var observers = this.observers;
7705
+ var senderGuid = _emberUtils.guidFor(sender);
7706
+ var keySet = observerSet[senderGuid];
7707
+ var index = undefined;
7708
+
7709
+ if (!keySet) {
7710
+ observerSet[senderGuid] = keySet = {};
7641
7711
  }
7642
- _emberMetalEvents.sendEvent(sender, observer.eventName, [sender, observer.keyName], observer.listeners);
7643
- }
7644
- };
7712
+ index = keySet[keyName];
7713
+ if (index === undefined) {
7714
+ index = observers.push({
7715
+ sender: sender,
7716
+ keyName: keyName,
7717
+ eventName: eventName,
7718
+ listeners: []
7719
+ }) - 1;
7720
+ keySet[keyName] = index;
7721
+ }
7722
+ return observers[index].listeners;
7723
+ };
7645
7724
 
7646
- ObserverSet.prototype.clear = function () {
7647
- this.observerSet = {};
7648
- this.observers = [];
7649
- };
7725
+ ObserverSet.prototype.flush = function flush() {
7726
+ var observers = this.observers;
7727
+ var i = undefined,
7728
+ observer = undefined,
7729
+ sender = undefined;
7730
+ this.clear();
7731
+ for (i = 0; i < observers.length; ++i) {
7732
+ observer = observers[i];
7733
+ sender = observer.sender;
7734
+ if (sender.isDestroying || sender.isDestroyed) {
7735
+ continue;
7736
+ }
7737
+ _emberMetalEvents.sendEvent(sender, observer.eventName, [sender, observer.keyName], observer.listeners);
7738
+ }
7739
+ };
7740
+
7741
+ ObserverSet.prototype.clear = function clear() {
7742
+ this.observerSet = {};
7743
+ this.observers = [];
7744
+ };
7745
+
7746
+ return ObserverSet;
7747
+ })();
7748
+
7749
+ exports.default = ObserverSet;
7650
7750
  });
7651
7751
  enifed('ember-metal/path_cache', ['exports', 'ember-metal/cache'], function (exports, _emberMetalCache) {
7652
7752
  'use strict';
@@ -8569,7 +8669,7 @@ enifed('ember-metal/run_loop', ['exports', 'ember-utils', 'ember-metal/debug', '
8569
8669
 
8570
8670
  var onErrorTarget = {
8571
8671
  get onerror() {
8572
- return _emberMetalError_handler.dispatchError;
8672
+ return _emberMetalError_handler.getOnerror();
8573
8673
  },
8574
8674
  set onerror(handler) {
8575
8675
  return _emberMetalError_handler.setOnerror(handler);
@@ -10628,7 +10728,7 @@ enifed('ember-template-compiler/plugins/transform-input-type-syntax', ['exports'
10628
10728
  }
10629
10729
  }
10630
10730
  if (pair && pair.value.type !== 'StringLiteral') {
10631
- node.params.unshift(builders.sexpr('-input-type', [pair.value], null, pair.loc));
10731
+ node.params.unshift(builders.sexpr('-input-type', [builders.path(pair.value.original, pair.loc)], null, pair.loc));
10632
10732
  }
10633
10733
  }
10634
10734
  });
@@ -11076,8 +11176,8 @@ enifed('ember-template-compiler/system/calculate-location-display', ['exports'],
11076
11176
 
11077
11177
  exports.default = calculateLocationDisplay;
11078
11178
 
11079
- function calculateLocationDisplay(moduleName, _loc) {
11080
- var loc = _loc || {};
11179
+ function calculateLocationDisplay(moduleName) {
11180
+ var loc = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
11081
11181
 
11082
11182
  var _ref = loc.start || {};
11083
11183
 
@@ -11548,7 +11648,7 @@ enifed('ember-utils/guid', ['exports', 'ember-utils/intern'], function (exports,
11548
11648
  }
11549
11649
  }
11550
11650
  });
11551
- enifed('ember-utils/index', ['exports', 'ember-utils/symbol', 'ember-utils/owner', 'ember-utils/assign', 'ember-utils/empty-object', 'ember-utils/dictionary', 'ember-utils/guid', 'ember-utils/intern', 'ember-utils/super', 'ember-utils/inspect', 'ember-utils/lookup-descriptor', 'ember-utils/invoke', 'ember-utils/make-array', 'ember-utils/apply-str', 'ember-utils/name', 'ember-utils/to-string', 'ember-utils/weak-map-utils'], function (exports, _emberUtilsSymbol, _emberUtilsOwner, _emberUtilsAssign, _emberUtilsEmptyObject, _emberUtilsDictionary, _emberUtilsGuid, _emberUtilsIntern, _emberUtilsSuper, _emberUtilsInspect, _emberUtilsLookupDescriptor, _emberUtilsInvoke, _emberUtilsMakeArray, _emberUtilsApplyStr, _emberUtilsName, _emberUtilsToString, _emberUtilsWeakMapUtils) {
11651
+ enifed('ember-utils/index', ['exports', 'ember-utils/symbol', 'ember-utils/owner', 'ember-utils/assign', 'ember-utils/empty-object', 'ember-utils/dictionary', 'ember-utils/guid', 'ember-utils/intern', 'ember-utils/super', 'ember-utils/inspect', 'ember-utils/lookup-descriptor', 'ember-utils/invoke', 'ember-utils/make-array', 'ember-utils/apply-str', 'ember-utils/name', 'ember-utils/to-string', 'ember-utils/weak-map-utils', 'ember-utils/proxy-utils'], function (exports, _emberUtilsSymbol, _emberUtilsOwner, _emberUtilsAssign, _emberUtilsEmptyObject, _emberUtilsDictionary, _emberUtilsGuid, _emberUtilsIntern, _emberUtilsSuper, _emberUtilsInspect, _emberUtilsLookupDescriptor, _emberUtilsInvoke, _emberUtilsMakeArray, _emberUtilsApplyStr, _emberUtilsName, _emberUtilsToString, _emberUtilsWeakMapUtils, _emberUtilsProxyUtils) {
11552
11652
  /*
11553
11653
  This package will be eagerly parsed and should have no dependencies on external
11554
11654
  packages.
@@ -11587,6 +11687,7 @@ enifed('ember-utils/index', ['exports', 'ember-utils/symbol', 'ember-utils/owner
11587
11687
  exports.NAME_KEY = _emberUtilsName.default;
11588
11688
  exports.toString = _emberUtilsToString.default;
11589
11689
  exports.HAS_NATIVE_WEAKMAP = _emberUtilsWeakMapUtils.HAS_NATIVE_WEAKMAP;
11690
+ exports.HAS_NATIVE_PROXY = _emberUtilsProxyUtils.HAS_NATIVE_PROXY;
11590
11691
  });
11591
11692
  enifed('ember-utils/inspect', ['exports'], function (exports) {
11592
11693
  'use strict';
@@ -11784,6 +11885,11 @@ enifed("ember-utils/lookup-descriptor", ["exports"], function (exports) {
11784
11885
  }
11785
11886
  });
11786
11887
  enifed("ember-utils/make-array", ["exports"], function (exports) {
11888
+ "use strict";
11889
+
11890
+ exports.default = makeArray;
11891
+ var isArray = Array.isArray;
11892
+
11787
11893
  /**
11788
11894
  Forces the passed object to be part of an array. If the object is already
11789
11895
  an array, it will return the object. Otherwise, it will add the object to
@@ -11807,15 +11913,12 @@ enifed("ember-utils/make-array", ["exports"], function (exports) {
11807
11913
  @return {Array}
11808
11914
  @private
11809
11915
  */
11810
- "use strict";
11811
-
11812
- exports.default = makeArray;
11813
11916
 
11814
11917
  function makeArray(obj) {
11815
11918
  if (obj === null || obj === undefined) {
11816
11919
  return [];
11817
11920
  }
11818
- return Array.isArray(obj) ? obj : [obj];
11921
+ return isArray(obj) ? obj : [obj];
11819
11922
  }
11820
11923
  });
11821
11924
  enifed('ember-utils/name', ['exports', 'ember-utils/symbol'], function (exports, _emberUtilsSymbol) {
@@ -11849,7 +11952,8 @@ enifed('ember-utils/owner', ['exports', 'ember-utils/symbol'], function (exports
11849
11952
  For example, this component dynamically looks up a service based on the
11850
11953
  `audioType` passed as an attribute:
11851
11954
 
11852
- ```app/components/play-audio.js
11955
+ ```
11956
+ // app/components/play-audio.js
11853
11957
  import Ember from 'ember';
11854
11958
 
11855
11959
  // Usage:
@@ -11896,6 +12000,12 @@ enifed('ember-utils/owner', ['exports', 'ember-utils/symbol'], function (exports
11896
12000
  object[OWNER] = owner;
11897
12001
  }
11898
12002
  });
12003
+ enifed('ember-utils/proxy-utils', ['exports'], function (exports) {
12004
+ 'use strict';
12005
+
12006
+ var HAS_NATIVE_PROXY = typeof Proxy === 'function';
12007
+ exports.HAS_NATIVE_PROXY = HAS_NATIVE_PROXY;
12008
+ });
11899
12009
  enifed('ember-utils/super', ['exports'], function (exports) {
11900
12010
  'use strict';
11901
12011
 
@@ -12023,12 +12133,12 @@ enifed('ember-utils/weak-map-utils', ['exports'], function (exports) {
12023
12133
  enifed("ember/features", ["exports"], function (exports) {
12024
12134
  "use strict";
12025
12135
 
12026
- exports.default = { "features-stripped-test": false, "ember-libraries-isregistered": false, "ember-runtime-computed-uniq-by": true, "ember-improved-instrumentation": false, "ember-runtime-enumerable-includes": true, "ember-string-ishtmlsafe": true, "ember-testing-check-waiters": true, "ember-metal-weakmap": false, "ember-glimmer-allow-backtracking-rerender": false, "ember-testing-resume-test": false, "mandatory-setter": true, "ember-glimmer-detect-backtracking-rerender": true };
12136
+ exports.default = { "features-stripped-test": false, "ember-libraries-isregistered": false, "ember-improved-instrumentation": false, "ember-metal-weakmap": false, "ember-glimmer-allow-backtracking-rerender": false, "ember-testing-resume-test": false, "ember-factory-for": true, "ember-no-double-extend": false, "mandatory-setter": true, "ember-glimmer-detect-backtracking-rerender": true };
12027
12137
  });
12028
12138
  enifed("ember/version", ["exports"], function (exports) {
12029
12139
  "use strict";
12030
12140
 
12031
- exports.default = "2.11.3";
12141
+ exports.default = "2.12.0-beta.1";
12032
12142
  });
12033
12143
  enifed("glimmer-compiler/index", ["exports", "glimmer-compiler/lib/compiler", "glimmer-compiler/lib/template-visitor"], function (exports, _glimmerCompilerLibCompiler, _glimmerCompilerLibTemplateVisitor) {
12034
12144
  "use strict";