ember-source 2.16.3 → 2.17.0.beta.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,7 @@
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.16.3
9
+ * @version 2.17.0-beta.4
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -5604,10 +5604,10 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
5604
5604
  this.isDestroyed = true;
5605
5605
  },
5606
5606
  reset: function (fullName) {
5607
- if (fullName !== undefined) {
5608
- resetMember(this, this.registry.normalize(fullName));
5609
- } else {
5607
+ if (fullName === undefined) {
5610
5608
  resetCache(this);
5609
+ } else {
5610
+ resetMember(this, this.registry.normalize(fullName));
5611
5611
  }
5612
5612
  },
5613
5613
  ownerInjection: function () {
@@ -5714,7 +5714,9 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
5714
5714
 
5715
5715
  function lookup(container, fullName) {
5716
5716
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
5717
- expandedFullName;
5717
+ expandedFullName,
5718
+ cacheKey,
5719
+ cached;
5718
5720
 
5719
5721
  if (options.source) {
5720
5722
  expandedFullName = container.registry.expandLocalLookup(fullName, options);
@@ -5735,10 +5737,13 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
5735
5737
  }
5736
5738
  }
5737
5739
 
5738
- var cacheKey = container._resolverCacheKey(fullName, options);
5739
- var cached = container.cache[cacheKey];
5740
- if (cached !== undefined && options.singleton !== false) {
5741
- return cached;
5740
+ if (options.singleton !== false) {
5741
+ cacheKey = container._resolverCacheKey(fullName, options);
5742
+ cached = container.cache[cacheKey];
5743
+
5744
+ if (cached !== undefined) {
5745
+ return cached;
5746
+ }
5742
5747
  }
5743
5748
 
5744
5749
  return instantiateFactory(container, fullName, options);
@@ -5773,17 +5778,18 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
5773
5778
  }
5774
5779
 
5775
5780
  function instantiateFactory(container, fullName, options) {
5776
- var factoryManager = _features.EMBER_MODULE_UNIFICATION && options && options.source ? container.factoryFor(fullName, options) : container.factoryFor(fullName);
5781
+ var factoryManager = _features.EMBER_MODULE_UNIFICATION && options && options.source ? container.factoryFor(fullName, options) : container.factoryFor(fullName),
5782
+ cacheKey;
5777
5783
 
5778
5784
  if (factoryManager === undefined) {
5779
5785
  return;
5780
5786
  }
5781
5787
 
5782
- var cacheKey = container._resolverCacheKey(fullName, options);
5783
-
5784
5788
  // SomeClass { singleton: true, instantiate: true } | { singleton: true } | { instantiate: true } | {}
5785
5789
  // By default majority of objects fall into this case
5786
5790
  if (isSingletonInstance(container, fullName, options)) {
5791
+ cacheKey = container._resolverCacheKey(fullName, options);
5792
+
5787
5793
  return container.cache[cacheKey] = factoryManager.create();
5788
5794
  }
5789
5795
 
@@ -5800,22 +5806,14 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
5800
5806
  throw new Error('Could not create factory');
5801
5807
  }
5802
5808
 
5803
- function markInjectionsAsDynamic(injections) {
5804
- injections._dynamic = true;
5805
- }
5806
-
5807
- function areInjectionsNotDynamic(injections) {
5808
- return injections._dynamic !== true;
5809
- }
5810
-
5811
5809
  function buildInjections() /* container, ...injections */{
5812
5810
  var hash = {},
5813
5811
  container,
5814
5812
  injections,
5815
5813
  injection,
5816
5814
  i,
5817
- markAsDynamic,
5818
5815
  _i;
5816
+ var isDynamic = false;
5819
5817
 
5820
5818
  if (arguments.length > 1) {
5821
5819
  container = arguments[0];
@@ -5830,22 +5828,18 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
5830
5828
  }
5831
5829
 
5832
5830
  container.registry.validateInjections(injections);
5833
- markAsDynamic = false;
5831
+
5834
5832
 
5835
5833
  for (_i = 0; _i < injections.length; _i++) {
5836
5834
  injection = injections[_i];
5837
5835
  hash[injection.property] = lookup(container, injection.fullName);
5838
- if (!markAsDynamic) {
5839
- markAsDynamic = !isSingleton(container, injection.fullName);
5836
+ if (!isDynamic) {
5837
+ isDynamic = !isSingleton(container, injection.fullName);
5840
5838
  }
5841
5839
  }
5842
-
5843
- if (markAsDynamic) {
5844
- markInjectionsAsDynamic(hash);
5845
- }
5846
5840
  }
5847
5841
 
5848
- return hash;
5842
+ return { injections: hash, isDynamic: isDynamic };
5849
5843
  }
5850
5844
 
5851
5845
  function injectionsFor(container, fullName) {
@@ -5853,9 +5847,7 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
5853
5847
  var splitName = fullName.split(':');
5854
5848
  var type = splitName[0];
5855
5849
 
5856
- var injections = buildInjections(container, registry.getTypeInjections(type), registry.getInjections(fullName));
5857
-
5858
- return injections;
5850
+ return buildInjections(container, registry.getTypeInjections(type), registry.getInjections(fullName));
5859
5851
  }
5860
5852
 
5861
5853
  function destroyDestroyables(container) {
@@ -5870,7 +5862,7 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
5870
5862
  value = cache[key];
5871
5863
 
5872
5864
 
5873
- if (isInstantiatable(container, key) && value.destroy) {
5865
+ if (value.destroy) {
5874
5866
  value.destroy();
5875
5867
  }
5876
5868
  }
@@ -5878,7 +5870,8 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
5878
5870
 
5879
5871
  function resetCache(container) {
5880
5872
  destroyDestroyables(container);
5881
- container.cache.dict = (0, _emberUtils.dictionary)(null);
5873
+ container.cache = (0, _emberUtils.dictionary)(null);
5874
+ container.factoryManagerCache = (0, _emberUtils.dictionary)(null);
5882
5875
  }
5883
5876
 
5884
5877
  function resetMember(container, fullName) {
@@ -5908,7 +5901,7 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
5908
5901
  }
5909
5902
 
5910
5903
  FactoryManager.prototype.toString = function () {
5911
- if (!this.madeToString) {
5904
+ if (this.madeToString === undefined) {
5912
5905
  this.madeToString = this.container.registry.makeToString(this.class, this.fullName);
5913
5906
  }
5914
5907
 
@@ -5916,16 +5909,23 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
5916
5909
  };
5917
5910
 
5918
5911
  FactoryManager.prototype.create = function () {
5919
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5912
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
5913
+ _injectionsFor,
5914
+ injections,
5915
+ isDynamic;
5916
+
5917
+ var injectionsCache = this.injections;
5918
+ if (injectionsCache === undefined) {
5919
+ _injectionsFor = injectionsFor(this.container, this.normalizedName), injections = _injectionsFor.injections, isDynamic = _injectionsFor.isDynamic;
5920
+
5920
5921
 
5921
- var injections = this.injections;
5922
- if (injections === undefined) {
5923
- injections = injectionsFor(this.container, this.normalizedName);
5924
- if (areInjectionsNotDynamic(injections)) {
5922
+ injectionsCache = injections;
5923
+ if (!isDynamic) {
5925
5924
  this.injections = injections;
5926
5925
  }
5927
5926
  }
5928
- var props = (0, _emberUtils.assign)({}, injections, options);
5927
+
5928
+ var props = (0, _emberUtils.assign)({}, injectionsCache, options);
5929
5929
 
5930
5930
  var lazyInjections = void 0;
5931
5931
  var validationCache = this.container.validationCache;
@@ -6206,10 +6206,7 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
6206
6206
 
6207
6207
  var injections = this._typeInjections[type] || (this._typeInjections[type] = []);
6208
6208
 
6209
- injections.push({
6210
- property: property,
6211
- fullName: fullName
6212
- });
6209
+ injections.push({ property: property, fullName: fullName });
6213
6210
  },
6214
6211
  injection: function (fullName, property, injectionName) {
6215
6212
  this.validateFullName(injectionName);
@@ -6225,10 +6222,7 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
6225
6222
 
6226
6223
  var injections = this._injections[normalizedName] || (this._injections[normalizedName] = []);
6227
6224
 
6228
- injections.push({
6229
- property: property,
6230
- fullName: normalizedInjectionName
6231
- });
6225
+ injections.push({ property: property, fullName: normalizedInjectionName });
6232
6226
  },
6233
6227
  knownForType: function (type) {
6234
6228
  var fallbackKnown = void 0,
@@ -6269,22 +6263,6 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
6269
6263
  isValidFullName: function (fullName) {
6270
6264
  return VALID_FULL_NAME_REGEXP.test(fullName);
6271
6265
  },
6272
- normalizeInjectionsHash: function (hash) {
6273
- var injections = [];
6274
-
6275
- for (var key in hash) {
6276
- if (hash.hasOwnProperty(key)) {
6277
- true && !this.validateFullName(hash[key]) && (0, _emberDebug.assert)('Expected a proper full name, given \'' + hash[key] + '\'', this.validateFullName(hash[key]));
6278
-
6279
- injections.push({
6280
- property: key,
6281
- fullName: hash[key]
6282
- });
6283
- }
6284
- }
6285
-
6286
- return injections;
6287
- },
6288
6266
  getInjections: function (fullName) {
6289
6267
  var injections = this._injections[fullName] || [];
6290
6268
  if (this.fallback) {
@@ -6305,6 +6283,25 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
6305
6283
  }
6306
6284
 
6307
6285
  return options && options.source ? options.source + ':' + name : name;
6286
+ },
6287
+ expandLocalLookup: function (fullName, options) {
6288
+ var normalizedFullName, normalizedSource;
6289
+
6290
+ if (this.resolver && this.resolver.expandLocalLookup) {
6291
+ true && !this.validateFullName(fullName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName));
6292
+ true && !(options && options.source) && (0, _emberDebug.assert)('options.source must be provided to expandLocalLookup', options && options.source);
6293
+ true && !this.validateFullName(options.source) && (0, _emberDebug.assert)('options.source must be a proper full name', this.validateFullName(options.source));
6294
+
6295
+ normalizedFullName = this.normalize(fullName);
6296
+ normalizedSource = this.normalize(options.source);
6297
+
6298
+
6299
+ return expandLocalLookup(this, normalizedFullName, normalizedSource);
6300
+ } else if (this.fallback) {
6301
+ return this.fallback.expandLocalLookup(fullName, options);
6302
+ } else {
6303
+ return null;
6304
+ }
6308
6305
  }
6309
6306
  };
6310
6307
 
@@ -6316,6 +6313,23 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
6316
6313
  };
6317
6314
  }
6318
6315
 
6316
+ Registry.prototype.normalizeInjectionsHash = function (hash) {
6317
+ var injections = [];
6318
+
6319
+ for (var key in hash) {
6320
+ if (hash.hasOwnProperty(key)) {
6321
+ true && !this.validateFullName(hash[key]) && (0, _emberDebug.assert)('Expected a proper full name, given \'' + hash[key] + '\'', this.validateFullName(hash[key]));
6322
+
6323
+ injections.push({
6324
+ property: key,
6325
+ fullName: hash[key]
6326
+ });
6327
+ }
6328
+ }
6329
+
6330
+ return injections;
6331
+ };
6332
+
6319
6333
  Registry.prototype.validateInjections = function (injections) {
6320
6334
  if (!injections) {
6321
6335
  return;
@@ -6331,43 +6345,6 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug', 'ember/features'],
6331
6345
  }
6332
6346
  };
6333
6347
 
6334
- /**
6335
- Given a fullName and a source fullName returns the fully resolved
6336
- fullName. Used to allow for local lookup.
6337
-
6338
- ```javascript
6339
- let registry = new Registry();
6340
-
6341
- // the twitter factory is added to the module system
6342
- registry.expandLocalLookup('component:post-title', { source: 'template:post' }) // => component:post/post-title
6343
- ```
6344
-
6345
- @private
6346
- @method expandLocalLookup
6347
- @param {String} fullName
6348
- @param {Object} [options]
6349
- @param {String} [options.source] the fullname of the request source (used for local lookups)
6350
- @return {String} fullName
6351
- */
6352
- Registry.prototype.expandLocalLookup = function (fullName, options) {
6353
- var normalizedFullName, normalizedSource;
6354
-
6355
- if (this.resolver && this.resolver.expandLocalLookup) {
6356
- true && !this.validateFullName(fullName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName));
6357
- true && !(options && options.source) && (0, _emberDebug.assert)('options.source must be provided to expandLocalLookup', options && options.source);
6358
- true && !this.validateFullName(options.source) && (0, _emberDebug.assert)('options.source must be a proper full name', this.validateFullName(options.source));
6359
-
6360
- normalizedFullName = this.normalize(fullName);
6361
- normalizedSource = this.normalize(options.source);
6362
-
6363
-
6364
- return expandLocalLookup(this, normalizedFullName, normalizedSource);
6365
- } else if (this.fallback) {
6366
- return this.fallback.expandLocalLookup(fullName, options);
6367
- } else {
6368
- return null;
6369
- }
6370
- };
6371
6348
 
6372
6349
  function expandLocalLookup(registry, normalizedName, normalizedSource) {
6373
6350
  var cache = registry._localLookupCache;
@@ -8003,7 +7980,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8003
7980
  var meta$$1, i, target, method, flags;
8004
7981
 
8005
7982
  if (actions === undefined) {
8006
- meta$$1 = _meta || exports.peekMeta(obj);
7983
+ meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;
8007
7984
 
8008
7985
  actions = typeof meta$$1 === 'object' && meta$$1 !== null && meta$$1.matchingListeners(eventName);
8009
7986
  }
@@ -8072,9 +8049,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8072
8049
  target,
8073
8050
  method;
8074
8051
  var meta$$1 = exports.peekMeta(obj);
8075
- var actions = meta$$1 && meta$$1.matchingListeners(eventName);
8052
+ var actions = meta$$1 !== undefined ? meta$$1.matchingListeners(eventName) : undefined;
8076
8053
 
8077
- if (!actions) {
8054
+ if (actions === undefined) {
8078
8055
  return ret;
8079
8056
  }
8080
8057
 
@@ -8131,7 +8108,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8131
8108
  var meta$$1;
8132
8109
 
8133
8110
  if (typeof object === 'object' && object !== null) {
8134
- meta$$1 = _meta || meta(object);
8111
+ meta$$1 = _meta === undefined ? meta(object) : _meta;
8135
8112
 
8136
8113
  return meta$$1.writableTag(makeTag);
8137
8114
  } else {
@@ -8264,14 +8241,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8264
8241
  {
8265
8242
  debugStack = context$$1.env.debugStack;
8266
8243
  }
8267
-
8268
- try {
8269
- context$$1[methodName]();
8270
- } finally {
8271
- inTransaction = false;
8272
- counter++;
8273
- }
8274
-
8244
+ context$$1[methodName]();
8245
+ inTransaction = false;
8246
+ counter++;
8275
8247
  return shouldReflush;
8276
8248
  };
8277
8249
 
@@ -8385,12 +8357,12 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8385
8357
  @private
8386
8358
  */
8387
8359
  function propertyWillChange(obj, keyName, _meta) {
8388
- var meta$$1 = _meta || exports.peekMeta(obj);
8389
- if (meta$$1 && !meta$$1.isInitialized(obj)) {
8360
+ var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;
8361
+ if (meta$$1 !== undefined && !meta$$1.isInitialized(obj)) {
8390
8362
  return;
8391
8363
  }
8392
8364
 
8393
- var watching = meta$$1 && meta$$1.peekWatching(keyName) > 0;
8365
+ var watching = meta$$1 !== undefined && meta$$1.peekWatching(keyName) > 0;
8394
8366
  var possibleDesc = obj[keyName];
8395
8367
  var isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;
8396
8368
 
@@ -8423,8 +8395,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8423
8395
  @private
8424
8396
  */
8425
8397
  function propertyDidChange(obj, keyName, _meta) {
8426
- var meta$$1 = _meta || exports.peekMeta(obj);
8427
- var hasMeta = !!meta$$1;
8398
+ var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;
8399
+ var hasMeta = meta$$1 !== undefined;
8428
8400
 
8429
8401
  if (hasMeta && !meta$$1.isInitialized(obj)) {
8430
8402
  return;
@@ -8911,16 +8883,16 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8911
8883
 
8912
8884
  var handleMandatorySetter = void 0;
8913
8885
 
8914
- function watchKey(obj, keyName, meta$$1) {
8886
+ function watchKey(obj, keyName, _meta) {
8915
8887
  if (typeof obj !== 'object' || obj === null) {
8916
8888
  return;
8917
8889
  }
8918
8890
 
8919
- var m = meta$$1 || meta(obj),
8891
+ var meta$$1 = _meta === undefined ? meta(obj) : _meta,
8920
8892
  possibleDesc,
8921
8893
  isDescriptor;
8922
- var count = m.peekWatching(keyName) || 0;
8923
- m.writeWatching(keyName, count + 1);
8894
+ var count = meta$$1.peekWatching(keyName) || 0;
8895
+ meta$$1.writeWatching(keyName, count + 1);
8924
8896
 
8925
8897
  if (count === 0) {
8926
8898
  // activate watching first time
@@ -8928,16 +8900,16 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8928
8900
  isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;
8929
8901
 
8930
8902
  if (isDescriptor && possibleDesc.willWatch) {
8931
- possibleDesc.willWatch(obj, keyName);
8903
+ possibleDesc.willWatch(obj, keyName, meta$$1);
8932
8904
  }
8933
8905
 
8934
- if ('function' === typeof obj.willWatchProperty) {
8906
+ if (typeof obj.willWatchProperty === 'function') {
8935
8907
  obj.willWatchProperty(keyName);
8936
8908
  }
8937
8909
 
8938
8910
  if (ember_features.MANDATORY_SETTER) {
8939
8911
  // NOTE: this is dropped for prod + minified builds
8940
- handleMandatorySetter(m, obj, keyName);
8912
+ handleMandatorySetter(meta$$1, obj, keyName);
8941
8913
  }
8942
8914
  }
8943
8915
  }
@@ -8994,7 +8966,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8994
8966
  if (typeof obj !== 'object' || obj === null) {
8995
8967
  return;
8996
8968
  }
8997
- var meta$$1 = _meta || exports.peekMeta(obj),
8969
+ var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta,
8998
8970
  possibleDesc,
8999
8971
  isDescriptor,
9000
8972
  maybeMandatoryDescriptor,
@@ -9014,10 +8986,10 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9014
8986
 
9015
8987
 
9016
8988
  if (isDescriptor && possibleDesc.didUnwatch) {
9017
- possibleDesc.didUnwatch(obj, keyName);
8989
+ possibleDesc.didUnwatch(obj, keyName, meta$$1);
9018
8990
  }
9019
8991
 
9020
- if ('function' === typeof obj.didUnwatchProperty) {
8992
+ if (typeof obj.didUnwatchProperty === 'function') {
9021
8993
  obj.didUnwatchProperty(keyName);
9022
8994
  }
9023
8995
 
@@ -9067,7 +9039,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9067
9039
  if (typeof obj !== 'object' || obj === null) {
9068
9040
  return;
9069
9041
  }
9070
- var m = meta$$1 || meta(obj);
9042
+ var m = meta$$1 === undefined ? meta(obj) : meta$$1;
9071
9043
  var counter = m.peekWatching(keyPath) || 0;
9072
9044
 
9073
9045
  m.writeWatching(keyPath, counter + 1);
@@ -9081,7 +9053,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
9081
9053
  if (typeof obj !== 'object' || obj === null) {
9082
9054
  return;
9083
9055
  }
9084
- var m = meta$$1 || exports.peekMeta(obj);
9056
+ var m = meta$$1 === undefined ? exports.peekMeta(obj) : meta$$1;
9057
+
9085
9058
  if (m === undefined) {
9086
9059
  return;
9087
9060
  }
@@ -10058,6 +10031,18 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
10058
10031
  };
10059
10032
  }
10060
10033
 
10034
+ /**
10035
+ Tears down the meta on an object so that it can be garbage collected.
10036
+ Multiple calls will have no effect.
10037
+
10038
+ @method deleteMeta
10039
+ @for Ember
10040
+ @param {Object} obj the object to destroy
10041
+ @return {void}
10042
+ @private
10043
+ */
10044
+
10045
+
10061
10046
  /**
10062
10047
  Retrieves the meta hash for an object. If `writable` is true ensures the
10063
10048
  hash is writable for this object as well.
@@ -10383,7 +10368,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
10383
10368
 
10384
10369
  if (ember_features.MANDATORY_SETTER) {
10385
10370
  setWithMandatorySetter = function (meta$$1, obj, keyName, value) {
10386
- if (meta$$1 && meta$$1.peekWatching(keyName) > 0) {
10371
+ if (meta$$1 !== undefined && meta$$1.peekWatching(keyName) > 0) {
10387
10372
  makeEnumerable(obj, keyName);
10388
10373
  meta$$1.writeValue(obj, keyName, value);
10389
10374
  } else {
@@ -10533,7 +10518,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
10533
10518
 
10534
10519
  function watcherCount(obj, key) {
10535
10520
  var meta$$1 = exports.peekMeta(obj);
10536
- return meta$$1 && meta$$1.peekWatching(key) || 0;
10521
+ return meta$$1 !== undefined && meta$$1.peekWatching(key) || 0;
10537
10522
  }
10538
10523
 
10539
10524
  function unwatch(obj, _keyPath, m) {
@@ -11134,8 +11119,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
11134
11119
  */
11135
11120
  function cacheFor(obj, key) {
11136
11121
  var meta$$1 = exports.peekMeta(obj);
11137
- var cache = meta$$1 && meta$$1.source === obj && meta$$1.readableCache();
11138
- var ret = cache && cache[key];
11122
+ var cache = meta$$1 !== undefined ? meta$$1.source === obj && meta$$1.readableCache() : undefined;
11123
+ var ret = cache !== undefined ? cache[key] : undefined;
11139
11124
 
11140
11125
  if (ret === UNDEFINED) {
11141
11126
  return undefined;
@@ -11188,17 +11173,17 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
11188
11173
  };
11189
11174
 
11190
11175
  AliasedProperty.prototype.teardown = function (obj, keyName, meta$$1) {
11191
- if (meta$$1 && meta$$1.peekWatching(keyName)) {
11176
+ if (meta$$1.peekWatching(keyName)) {
11192
11177
  removeDependentKeys(this, obj, keyName, meta$$1);
11193
11178
  }
11194
11179
  };
11195
11180
 
11196
- AliasedProperty.prototype.willWatch = function (obj, keyName) {
11197
- addDependentKeys(this, obj, keyName, meta(obj));
11181
+ AliasedProperty.prototype.willWatch = function (obj, keyName, meta$$1) {
11182
+ addDependentKeys(this, obj, keyName, meta$$1);
11198
11183
  };
11199
11184
 
11200
- AliasedProperty.prototype.didUnwatch = function (obj, keyName) {
11201
- removeDependentKeys(this, obj, keyName, meta(obj));
11185
+ AliasedProperty.prototype.didUnwatch = function (obj, keyName, meta$$1) {
11186
+ removeDependentKeys(this, obj, keyName, meta$$1);
11202
11187
  };
11203
11188
 
11204
11189
  AliasedProperty.prototype.get = function (obj, keyName) {
@@ -12683,13 +12668,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
12683
12668
  Map is mocked out to look like an Ember object, so you can do
12684
12669
  `EmberMap.create()` for symmetry with other Ember classes.
12685
12670
  */
12686
- function missingFunction(fn) {
12687
- throw new TypeError(Object.prototype.toString.call(fn) + ' is not a function');
12688
- }
12689
-
12690
- function missingNew(name) {
12691
- throw new TypeError('Constructor ' + name + ' requires \'new\'');
12692
- }
12693
12671
 
12694
12672
  function copyNull(obj) {
12695
12673
  var output = Object.create(null);
@@ -12723,37 +12701,35 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
12723
12701
  @constructor
12724
12702
  @private
12725
12703
  */
12726
- function OrderedSet() {
12727
- if (this instanceof OrderedSet) {
12704
+
12705
+ var OrderedSet = function () {
12706
+ function OrderedSet() {
12707
+
12728
12708
  this.clear();
12729
- } else {
12730
- missingNew('OrderedSet');
12731
12709
  }
12732
- }
12733
12710
 
12734
- /**
12735
- @method create
12736
- @static
12737
- @return {Ember.OrderedSet}
12738
- @private
12739
- */
12740
- OrderedSet.create = function () {
12741
- var Constructor = this;
12711
+ /**
12712
+ @method create
12713
+ @static
12714
+ @return {Ember.OrderedSet}
12715
+ @private
12716
+ */
12742
12717
 
12743
- return new Constructor();
12744
- };
12718
+ OrderedSet.create = function () {
12719
+ var Constructor = this;
12720
+ return new Constructor();
12721
+ };
12745
12722
 
12746
- OrderedSet.prototype = {
12747
- constructor: OrderedSet,
12748
12723
  /**
12749
12724
  @method clear
12750
12725
  @private
12751
12726
  */
12752
- clear: function () {
12727
+
12728
+ OrderedSet.prototype.clear = function () {
12753
12729
  this.presenceSet = Object.create(null);
12754
12730
  this.list = [];
12755
12731
  this.size = 0;
12756
- },
12732
+ };
12757
12733
 
12758
12734
  /**
12759
12735
  @method add
@@ -12762,7 +12738,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
12762
12738
  @return {Ember.OrderedSet}
12763
12739
  @private
12764
12740
  */
12765
- add: function (obj, _guid) {
12741
+
12742
+ OrderedSet.prototype.add = function (obj, _guid) {
12766
12743
  var guid = _guid || emberUtils.guidFor(obj);
12767
12744
  var presenceSet = this.presenceSet;
12768
12745
  var list = this.list;
@@ -12773,7 +12750,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
12773
12750
  }
12774
12751
 
12775
12752
  return this;
12776
- },
12753
+ };
12777
12754
 
12778
12755
  /**
12779
12756
  @since 1.8.0
@@ -12783,7 +12760,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
12783
12760
  @return {Boolean}
12784
12761
  @private
12785
12762
  */
12786
- delete: function (obj, _guid) {
12763
+
12764
+ OrderedSet.prototype.delete = function (obj, _guid) {
12787
12765
  var guid = _guid || emberUtils.guidFor(obj),
12788
12766
  index;
12789
12767
  var presenceSet = this.presenceSet;
@@ -12801,16 +12779,17 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
12801
12779
  } else {
12802
12780
  return false;
12803
12781
  }
12804
- },
12782
+ };
12805
12783
 
12806
12784
  /**
12807
12785
  @method isEmpty
12808
12786
  @return {Boolean}
12809
12787
  @private
12810
12788
  */
12811
- isEmpty: function () {
12789
+
12790
+ OrderedSet.prototype.isEmpty = function () {
12812
12791
  return this.size === 0;
12813
- },
12792
+ };
12814
12793
 
12815
12794
  /**
12816
12795
  @method has
@@ -12818,7 +12797,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
12818
12797
  @return {Boolean}
12819
12798
  @private
12820
12799
  */
12821
- has: function (obj) {
12800
+
12801
+ OrderedSet.prototype.has = function (obj) {
12822
12802
  if (this.size === 0) {
12823
12803
  return false;
12824
12804
  }
@@ -12827,7 +12807,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
12827
12807
  var presenceSet = this.presenceSet;
12828
12808
 
12829
12809
  return presenceSet[guid] === true;
12830
- },
12810
+ };
12831
12811
 
12832
12812
  /**
12833
12813
  @method forEach
@@ -12835,10 +12815,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
12835
12815
  @param self
12836
12816
  @private
12837
12817
  */
12838
- forEach: function (fn /*, ...thisArg*/) {
12839
- if (typeof fn !== 'function') {
12840
- missingFunction(fn);
12841
- }
12818
+
12819
+ OrderedSet.prototype.forEach = function (fn /*, ...thisArg*/) {
12820
+ true && !(typeof fn === 'function') && emberDebug.assert(Object.prototype.toString.call(fn) + ' is not a function', typeof fn === 'function');
12842
12821
 
12843
12822
  if (this.size === 0) {
12844
12823
  return;
@@ -12857,23 +12836,25 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
12857
12836
  fn(list[_i]);
12858
12837
  }
12859
12838
  }
12860
- },
12839
+ };
12861
12840
 
12862
12841
  /**
12863
12842
  @method toArray
12864
12843
  @return {Array}
12865
12844
  @private
12866
12845
  */
12867
- toArray: function () {
12846
+
12847
+ OrderedSet.prototype.toArray = function () {
12868
12848
  return this.list.slice();
12869
- },
12849
+ };
12870
12850
 
12871
12851
  /**
12872
12852
  @method copy
12873
12853
  @return {Ember.OrderedSet}
12874
12854
  @private
12875
12855
  */
12876
- copy: function () {
12856
+
12857
+ OrderedSet.prototype.copy = function () {
12877
12858
  var Constructor = this.constructor;
12878
12859
  var set = new Constructor();
12879
12860
 
@@ -12882,8 +12863,10 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
12882
12863
  set.size = this.size;
12883
12864
 
12884
12865
  return set;
12885
- }
12886
- };
12866
+ };
12867
+
12868
+ return OrderedSet;
12869
+ }();
12887
12870
 
12888
12871
  /**
12889
12872
  A Map stores values indexed by keys. Unlike JavaScript's
@@ -12905,38 +12888,25 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
12905
12888
  @private
12906
12889
  @constructor
12907
12890
  */
12908
- function Map() {
12909
- if (this instanceof Map) {
12910
- this._keys = OrderedSet.create();
12891
+
12892
+ var Map = function () {
12893
+ function Map() {
12894
+
12895
+ this._keys = new OrderedSet();
12911
12896
  this._values = Object.create(null);
12912
12897
  this.size = 0;
12913
- } else {
12914
- missingNew('Map');
12915
12898
  }
12916
- }
12917
-
12918
- /**
12919
- @method create
12920
- @static
12921
- @private
12922
- */
12923
- Map.create = function () {
12924
- var Constructor = this;
12925
- return new Constructor();
12926
- };
12927
-
12928
- Map.prototype = {
12929
- constructor: Map,
12930
12899
 
12931
12900
  /**
12932
- This property will change as the number of objects in the map changes.
12933
- @since 1.8.0
12934
- @property size
12935
- @type number
12936
- @default 0
12901
+ @method create
12902
+ @static
12937
12903
  @private
12938
12904
  */
12939
- size: 0,
12905
+
12906
+ Map.create = function () {
12907
+ var Constructor = this;
12908
+ return new Constructor();
12909
+ };
12940
12910
 
12941
12911
  /**
12942
12912
  Retrieve the value associated with a given key.
@@ -12945,7 +12915,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
12945
12915
  @return {*} the value associated with the key, or `undefined`
12946
12916
  @private
12947
12917
  */
12948
- get: function (key) {
12918
+
12919
+ Map.prototype.get = function (key) {
12949
12920
  if (this.size === 0) {
12950
12921
  return;
12951
12922
  }
@@ -12954,7 +12925,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
12954
12925
  var guid = emberUtils.guidFor(key);
12955
12926
 
12956
12927
  return values[guid];
12957
- },
12928
+ };
12958
12929
 
12959
12930
  /**
12960
12931
  Adds a value to the map. If a value for the given key has already been
@@ -12965,7 +12936,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
12965
12936
  @return {Ember.Map}
12966
12937
  @private
12967
12938
  */
12968
- set: function (key, value) {
12939
+
12940
+ Map.prototype.set = function (key, value) {
12969
12941
  var keys = this._keys;
12970
12942
  var values = this._values;
12971
12943
  var guid = emberUtils.guidFor(key);
@@ -12980,7 +12952,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
12980
12952
  this.size = keys.size;
12981
12953
 
12982
12954
  return this;
12983
- },
12955
+ };
12984
12956
 
12985
12957
  /**
12986
12958
  Removes a value from the map for an associated key.
@@ -12990,7 +12962,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
12990
12962
  @return {Boolean} true if an item was removed, false otherwise
12991
12963
  @private
12992
12964
  */
12993
- delete: function (key) {
12965
+
12966
+ Map.prototype.delete = function (key) {
12994
12967
  if (this.size === 0) {
12995
12968
  return false;
12996
12969
  }
@@ -13007,7 +12980,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
13007
12980
  } else {
13008
12981
  return false;
13009
12982
  }
13010
- },
12983
+ };
13011
12984
 
13012
12985
  /**
13013
12986
  Check whether a key is present.
@@ -13016,9 +12989,10 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
13016
12989
  @return {Boolean} true if the item was present, false otherwise
13017
12990
  @private
13018
12991
  */
13019
- has: function (key) {
12992
+
12993
+ Map.prototype.has = function (key) {
13020
12994
  return this._keys.has(key);
13021
- },
12995
+ };
13022
12996
 
13023
12997
  /**
13024
12998
  Iterate over all the keys and values. Calls the function once
@@ -13031,10 +13005,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
13031
13005
  callback. By default, `this` is the map.
13032
13006
  @private
13033
13007
  */
13034
- forEach: function (callback /*, ...thisArg*/) {
13035
- if (typeof callback !== 'function') {
13036
- missingFunction(callback);
13037
- }
13008
+
13009
+ Map.prototype.forEach = function (callback /*, ...thisArg*/) {
13010
+ true && !(typeof callback === 'function') && emberDebug.assert(Object.prototype.toString.call(callback) + ' is not a function', typeof callback === 'function');
13038
13011
 
13039
13012
  if (this.size === 0) {
13040
13013
  return;
@@ -13056,27 +13029,31 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
13056
13029
  }
13057
13030
 
13058
13031
  this._keys.forEach(cb);
13059
- },
13032
+ };
13060
13033
 
13061
13034
  /**
13062
13035
  @method clear
13063
13036
  @private
13064
13037
  */
13065
- clear: function () {
13038
+
13039
+ Map.prototype.clear = function () {
13066
13040
  this._keys.clear();
13067
13041
  this._values = Object.create(null);
13068
13042
  this.size = 0;
13069
- },
13043
+ };
13070
13044
 
13071
13045
  /**
13072
13046
  @method copy
13073
13047
  @return {Ember.Map}
13074
13048
  @private
13075
13049
  */
13076
- copy: function () {
13050
+
13051
+ Map.prototype.copy = function () {
13077
13052
  return copyMap(this, new Map());
13078
- }
13079
- };
13053
+ };
13054
+
13055
+ return Map;
13056
+ }();
13080
13057
 
13081
13058
  /**
13082
13059
  @class MapWithDefault
@@ -13087,66 +13064,73 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
13087
13064
  @param [options]
13088
13065
  @param {*} [options.defaultValue]
13089
13066
  */
13090
- function MapWithDefault(options) {
13091
- this._super$constructor();
13092
- this.defaultValue = options.defaultValue;
13093
- }
13094
13067
 
13095
- /**
13096
- @method create
13097
- @static
13098
- @param [options]
13099
- @param {*} [options.defaultValue]
13100
- @return {Ember.MapWithDefault|Ember.Map} If options are passed, returns
13101
- `MapWithDefault` otherwise returns `EmberMap`
13102
- @private
13103
- */
13104
- MapWithDefault.create = function (options) {
13105
- if (options) {
13106
- return new MapWithDefault(options);
13107
- } else {
13108
- return new Map();
13068
+ var MapWithDefault = function (_Map) {
13069
+ emberBabel.inherits(MapWithDefault, _Map);
13070
+
13071
+ function MapWithDefault(options) {
13072
+
13073
+ var _this = emberBabel.possibleConstructorReturn(this, _Map.call(this));
13074
+
13075
+ _this.defaultValue = options.defaultValue;
13076
+ return _this;
13109
13077
  }
13110
- };
13111
13078
 
13112
- MapWithDefault.prototype = Object.create(Map.prototype);
13113
- MapWithDefault.prototype.constructor = MapWithDefault;
13114
- MapWithDefault.prototype._super$constructor = Map;
13115
- MapWithDefault.prototype._super$get = Map.prototype.get;
13079
+ /**
13080
+ @method create
13081
+ @static
13082
+ @param [options]
13083
+ @param {*} [options.defaultValue]
13084
+ @return {Ember.MapWithDefault|Ember.Map} If options are passed, returns
13085
+ `MapWithDefault` otherwise returns `EmberMap`
13086
+ @private
13087
+ */
13116
13088
 
13117
- /**
13118
- Retrieve the value associated with a given key.
13119
-
13120
- @method get
13121
- @param {*} key
13122
- @return {*} the value associated with the key, or the default value
13123
- @private
13124
- */
13125
- MapWithDefault.prototype.get = function (key) {
13126
- var hasValue = this.has(key),
13127
- defaultValue;
13089
+ MapWithDefault.create = function (options) {
13090
+ if (options) {
13091
+ return new MapWithDefault(options);
13092
+ } else {
13093
+ return new Map();
13094
+ }
13095
+ };
13128
13096
 
13129
- if (hasValue) {
13130
- return this._super$get(key);
13131
- } else {
13132
- defaultValue = this.defaultValue(key);
13097
+ /**
13098
+ Retrieve the value associated with a given key.
13099
+ @method get
13100
+ @param {*} key
13101
+ @return {*} the value associated with the key, or the default value
13102
+ @private
13103
+ */
13133
13104
 
13134
- this.set(key, defaultValue);
13135
- return defaultValue;
13136
- }
13137
- };
13105
+ MapWithDefault.prototype.get = function (key) {
13106
+ var hasValue = this.has(key),
13107
+ defaultValue;
13138
13108
 
13139
- /**
13140
- @method copy
13141
- @return {Ember.MapWithDefault}
13142
- @private
13143
- */
13144
- MapWithDefault.prototype.copy = function () {
13145
- var Constructor = this.constructor;
13146
- return copyMap(this, new Constructor({
13147
- defaultValue: this.defaultValue
13148
- }));
13149
- };
13109
+ if (hasValue) {
13110
+ return _Map.prototype.get.call(this, key);
13111
+ } else {
13112
+ defaultValue = this.defaultValue(key);
13113
+
13114
+ this.set(key, defaultValue);
13115
+ return defaultValue;
13116
+ }
13117
+ };
13118
+
13119
+ /**
13120
+ @method copy
13121
+ @return {Ember.MapWithDefault}
13122
+ @private
13123
+ */
13124
+
13125
+ MapWithDefault.prototype.copy = function () {
13126
+ var Constructor = this.constructor;
13127
+ return copyMap(this, new Constructor({
13128
+ defaultValue: this.defaultValue
13129
+ }));
13130
+ };
13131
+
13132
+ return MapWithDefault;
13133
+ }(Map);
13150
13134
 
13151
13135
  /**
13152
13136
  @module @ember/object
@@ -13909,12 +13893,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
13909
13893
  var baseValue = values[key] || obj[key],
13910
13894
  propValue;
13911
13895
 
13912
- {
13913
- if (isArray(value)) {
13914
- // use conditional to avoid stringifying every time
13915
- true && !false && emberDebug.assert('You passed in `' + JSON.stringify(value) + '` as the value for `' + key + '` but `' + key + '` cannot be an Array', false);
13916
- }
13917
- }
13896
+ true && !!isArray(value) && emberDebug.assert('You passed in `' + JSON.stringify(value) + '` as the value for `' + key + '` but `' + key + '` cannot be an Array', !isArray(value));
13918
13897
 
13919
13898
  if (!baseValue) {
13920
13899
  return value;
@@ -14057,7 +14036,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14057
14036
  }
14058
14037
 
14059
14038
  function finishPartial(obj, meta$$1) {
14060
- connectBindings(obj, meta$$1 || meta(obj));
14039
+ connectBindings(obj, meta$$1 === undefined ? meta(obj) : meta$$1);
14061
14040
  return obj;
14062
14041
  }
14063
14042
 
@@ -14349,66 +14328,112 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14349
14328
  return ret;
14350
14329
  };
14351
14330
 
14352
- return Mixin;
14353
- }();
14331
+ /**
14332
+ @method reopen
14333
+ @param arguments*
14334
+ @private
14335
+ */
14354
14336
 
14355
- Mixin._apply = applyMixin;
14337
+ Mixin.prototype.reopen = function () {
14338
+ var currentMixin = void 0;
14356
14339
 
14357
- Mixin.finishPartial = finishPartial;
14340
+ if (this.properties) {
14341
+ currentMixin = new Mixin(undefined, this.properties);
14342
+ this.properties = undefined;
14343
+ this.mixins = [currentMixin];
14344
+ } else if (!this.mixins) {
14345
+ this.mixins = [];
14346
+ }
14358
14347
 
14359
- var unprocessedFlag = false;
14348
+ var mixins = this.mixins;
14349
+ var idx = void 0;
14360
14350
 
14361
- var MixinPrototype = Mixin.prototype;
14351
+ for (idx = 0; idx < arguments.length; idx++) {
14352
+ currentMixin = arguments[idx];
14353
+ 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]');
14362
14354
 
14363
- /**
14364
- @method reopen
14365
- @param arguments*
14366
- @private
14367
- */
14368
- MixinPrototype.reopen = function () {
14369
- var currentMixin = void 0;
14355
+ if (currentMixin instanceof Mixin) {
14356
+ mixins.push(currentMixin);
14357
+ } else {
14358
+ mixins.push(new Mixin(undefined, currentMixin));
14359
+ }
14360
+ }
14370
14361
 
14371
- if (this.properties) {
14372
- currentMixin = new Mixin(undefined, this.properties);
14373
- this.properties = undefined;
14374
- this.mixins = [currentMixin];
14375
- } else if (!this.mixins) {
14376
- this.mixins = [];
14377
- }
14362
+ return this;
14363
+ };
14378
14364
 
14379
- var mixins = this.mixins;
14380
- var idx = void 0;
14365
+ /**
14366
+ @method apply
14367
+ @param obj
14368
+ @return applied object
14369
+ @private
14370
+ */
14381
14371
 
14382
- for (idx = 0; idx < arguments.length; idx++) {
14383
- currentMixin = arguments[idx];
14384
- 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]');
14372
+ Mixin.prototype.apply = function (obj) {
14373
+ return applyMixin(obj, [this], false);
14374
+ };
14385
14375
 
14386
- if (currentMixin instanceof Mixin) {
14387
- mixins.push(currentMixin);
14388
- } else {
14389
- mixins.push(new Mixin(undefined, currentMixin));
14376
+ Mixin.prototype.applyPartial = function (obj) {
14377
+ return applyMixin(obj, [this], true);
14378
+ };
14379
+
14380
+ /**
14381
+ @method detect
14382
+ @param obj
14383
+ @return {Boolean}
14384
+ @private
14385
+ */
14386
+
14387
+ Mixin.prototype.detect = function (obj) {
14388
+ if (typeof obj !== 'object' || obj === null) {
14389
+ return false;
14390
14390
  }
14391
- }
14391
+ if (obj instanceof Mixin) {
14392
+ return _detect(obj, this, {});
14393
+ }
14394
+ var meta$$1 = exports.peekMeta(obj);
14395
+ if (meta$$1 === undefined) {
14396
+ return false;
14397
+ }
14398
+ return !!meta$$1.peekMixins(emberUtils.guidFor(this));
14399
+ };
14392
14400
 
14393
- return this;
14394
- };
14401
+ Mixin.prototype.without = function () {
14402
+ var ret = new Mixin([this]),
14403
+ _len4,
14404
+ args,
14405
+ _key4;
14395
14406
 
14396
- /**
14397
- @method apply
14398
- @param obj
14399
- @return applied object
14400
- @private
14401
- */
14402
- MixinPrototype.apply = function (obj) {
14403
- return applyMixin(obj, [this], false);
14404
- };
14407
+ for (_len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
14408
+ args[_key4] = arguments[_key4];
14409
+ }
14405
14410
 
14406
- MixinPrototype.applyPartial = function (obj) {
14407
- return applyMixin(obj, [this], true);
14408
- };
14411
+ ret._without = args;
14412
+ return ret;
14413
+ };
14414
+
14415
+ Mixin.prototype.keys = function () {
14416
+ var keys = {};
14417
+
14418
+
14419
+ _keys(keys, this, {});
14420
+ var ret = Object.keys(keys);
14421
+ return ret;
14422
+ };
14409
14423
 
14424
+ return Mixin;
14425
+ }();
14426
+
14427
+ Mixin._apply = applyMixin;
14428
+ Mixin.finishPartial = finishPartial;
14429
+
14430
+ var MixinPrototype = Mixin.prototype;
14410
14431
  MixinPrototype.toString = Object.toString;
14411
14432
 
14433
+ emberDebug.debugSeal(MixinPrototype);
14434
+
14435
+ var unprocessedFlag = false;
14436
+
14412
14437
  function _detect(curMixin, targetMixin, seen) {
14413
14438
  var guid = emberUtils.guidFor(curMixin);
14414
14439
 
@@ -14430,40 +14455,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14430
14455
  return false;
14431
14456
  }
14432
14457
 
14433
- /**
14434
- @method detect
14435
- @param obj
14436
- @return {Boolean}
14437
- @private
14438
- */
14439
- MixinPrototype.detect = function (obj) {
14440
- if (typeof obj !== 'object' || obj === null) {
14441
- return false;
14442
- }
14443
- if (obj instanceof Mixin) {
14444
- return _detect(obj, this, {});
14445
- }
14446
- var meta$$1 = exports.peekMeta(obj);
14447
- if (meta$$1 === undefined) {
14448
- return false;
14449
- }
14450
- return !!meta$$1.peekMixins(emberUtils.guidFor(this));
14451
- };
14452
-
14453
- MixinPrototype.without = function () {
14454
- var ret = new Mixin([this]),
14455
- _len4,
14456
- args,
14457
- _key4;
14458
-
14459
- for (_len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
14460
- args[_key4] = arguments[_key4];
14461
- }
14462
-
14463
- ret._without = args;
14464
- return ret;
14465
- };
14466
-
14467
14458
  function _keys(ret, mixin, seen) {
14468
14459
  var props, i, key;
14469
14460
 
@@ -14487,17 +14478,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14487
14478
  }
14488
14479
  }
14489
14480
 
14490
- MixinPrototype.keys = function () {
14491
- var keys = {};
14492
-
14493
-
14494
- _keys(keys, this, {});
14495
- var ret = Object.keys(keys);
14496
- return ret;
14497
- };
14498
-
14499
- emberDebug.debugSeal(MixinPrototype);
14500
-
14501
14481
  var REQUIRED = new Descriptor();
14502
14482
  REQUIRED.toString = function () {
14503
14483
  return '(Required Property)';
@@ -14771,7 +14751,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14771
14751
  return new AliasedProperty(altKey);
14772
14752
  };
14773
14753
  exports.merge = function (original, updates) {
14774
- if (!updates || typeof updates !== 'object') {
14754
+ if (updates === null || typeof updates !== 'object') {
14775
14755
  return original;
14776
14756
  }
14777
14757
 
@@ -14873,6 +14853,16 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14873
14853
  };
14874
14854
  exports.META_DESC = META_DESC;
14875
14855
  exports.meta = meta;
14856
+ exports.deleteMeta = function (obj) {
14857
+ {
14858
+ counters.deleteCalls++;
14859
+ }
14860
+
14861
+ var meta = exports.peekMeta(obj);
14862
+ if (meta !== undefined) {
14863
+ meta.destroy();
14864
+ }
14865
+ };
14876
14866
  exports.Cache = Cache;
14877
14867
  exports._getPath = _getPath;
14878
14868
  exports.get = get;
@@ -14925,7 +14915,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14925
14915
  exports.suspendListeners = suspendListeners;
14926
14916
  exports.watchedEvents = function (obj) {
14927
14917
  var meta$$1 = exports.peekMeta(obj);
14928
- return meta$$1 && meta$$1.watchedEvents() || [];
14918
+ return meta$$1 !== undefined ? meta$$1.watchedEvents() : [];
14929
14919
  };
14930
14920
  exports.isNone = isNone;
14931
14921
  exports.isEmpty = isEmpty;
@@ -14965,16 +14955,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
14965
14955
  exports.removeChainWatcher = removeChainWatcher;
14966
14956
  exports.watchPath = watchPath;
14967
14957
  exports.unwatchPath = unwatchPath;
14968
- exports.destroy = function (obj) {
14969
- {
14970
- counters.deleteCalls++;
14971
- }
14972
-
14973
- var meta = exports.peekMeta(obj);
14974
- if (meta !== undefined) {
14975
- meta.destroy();
14976
- }
14977
- };
14978
14958
  exports.isWatching = function (obj, key) {
14979
14959
  return watcherCount(obj, key) > 0;
14980
14960
  };
@@ -15001,7 +14981,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
15001
14981
  return ret;
15002
14982
  };
15003
14983
  exports.setProperties = function (obj, properties) {
15004
- if (!properties || typeof properties !== 'object') {
14984
+ if (properties === null || typeof properties !== 'object') {
15005
14985
  return properties;
15006
14986
  }
15007
14987
  changeProperties(function () {
@@ -15123,7 +15103,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
15123
15103
  return _glimmer_reference.CONSTANT_TAG;
15124
15104
  }
15125
15105
 
15126
- var meta$$1 = _meta || meta(object);
15106
+ var meta$$1 = _meta === undefined ? meta(object) : _meta;
15127
15107
  if (meta$$1.isProxy()) {
15128
15108
  return tagFor(object, meta$$1);
15129
15109
  }
@@ -16412,7 +16392,6 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
16412
16392
  var options = (0, _emberUtils.assign)({ meta: {} }, _options),
16413
16393
  meta,
16414
16394
  potententialPugins,
16415
- providedPlugins,
16416
16395
  pluginsToAdd;
16417
16396
 
16418
16397
  // move `moduleName` into `meta` property
@@ -16426,14 +16405,11 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
16426
16405
  options.plugins = { ast: [].concat(USER_PLUGINS, _plugins.default) };
16427
16406
  } else {
16428
16407
  potententialPugins = [].concat(USER_PLUGINS, _plugins.default);
16429
- providedPlugins = options.plugins.ast.map(function (plugin) {
16430
- return wrapLegacyPluginIfNeeded(plugin);
16431
- });
16432
16408
  pluginsToAdd = potententialPugins.filter(function (plugin) {
16433
16409
  return options.plugins.ast.indexOf(plugin) === -1;
16434
16410
  });
16435
16411
 
16436
- options.plugins.ast = providedPlugins.concat(pluginsToAdd);
16412
+ options.plugins.ast = options.plugins.ast.slice().concat(pluginsToAdd);
16437
16413
  }
16438
16414
 
16439
16415
  return options;
@@ -16443,65 +16419,40 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
16443
16419
  throw new Error('Attempting to register ' + _plugin + ' as "' + type + '" which is not a valid Glimmer plugin type.');
16444
16420
  }
16445
16421
 
16446
- for (i = 0; i < USER_PLUGINS.length; i++) {
16447
- PLUGIN = USER_PLUGINS[i];
16448
-
16449
- if (PLUGIN === _plugin || PLUGIN.__raw === _plugin) {
16450
- return;
16451
- }
16452
- }
16453
-
16454
- var plugin = wrapLegacyPluginIfNeeded(_plugin),
16455
- i,
16456
- PLUGIN;
16457
-
16458
- USER_PLUGINS = [plugin].concat(USER_PLUGINS);
16459
- };
16460
- exports.unregisterPlugin = function (type, PluginClass) {
16461
- if (type !== 'ast') {
16462
- throw new Error('Attempting to unregister ' + PluginClass + ' as "' + type + '" which is not a valid Glimmer plugin type.');
16463
- }
16464
-
16465
- USER_PLUGINS = USER_PLUGINS.filter(function (plugin) {
16466
- return plugin !== PluginClass && plugin.__raw !== PluginClass;
16467
- });
16468
- };
16469
-
16470
- var USER_PLUGINS = [];
16471
-
16472
- function wrapLegacyPluginIfNeeded(_plugin) {
16473
- var plugin = _plugin;
16422
+ var plugin = void 0;
16474
16423
  if (_plugin.prototype && _plugin.prototype.transform) {
16475
16424
  plugin = function (env) {
16476
- var pluginInstantiated = false;
16477
-
16478
16425
  return {
16479
16426
  name: _plugin.constructor && _plugin.constructor.name,
16480
16427
 
16481
16428
  visitors: {
16482
16429
  Program: function (node) {
16483
- var _plugin2;
16484
-
16485
- if (!pluginInstantiated) {
16430
+ var plugin = new _plugin(env);
16486
16431
 
16487
- pluginInstantiated = true;
16488
- _plugin2 = new _plugin(env);
16432
+ plugin.syntax = env.syntax;
16489
16433
 
16490
-
16491
- _plugin2.syntax = env.syntax;
16492
-
16493
- return _plugin2.transform(node);
16494
- }
16434
+ return plugin.transform(node);
16495
16435
  }
16496
16436
  }
16497
16437
  };
16498
16438
  };
16439
+ } else {
16440
+ plugin = _plugin;
16441
+ }
16499
16442
 
16500
- plugin.__raw = _plugin;
16443
+ USER_PLUGINS = [plugin].concat(USER_PLUGINS);
16444
+ };
16445
+ exports.removePlugin = function (type, PluginClass) {
16446
+ if (type !== 'ast') {
16447
+ throw new Error('Attempting to unregister ' + PluginClass + ' as "' + type + '" which is not a valid Glimmer plugin type.');
16501
16448
  }
16502
16449
 
16503
- return plugin;
16504
- }
16450
+ USER_PLUGINS = USER_PLUGINS.filter(function (plugin) {
16451
+ return plugin !== PluginClass;
16452
+ });
16453
+ };
16454
+
16455
+ var USER_PLUGINS = [];
16505
16456
  });
16506
16457
  enifed('ember-template-compiler/system/compile', ['exports', 'require', 'ember-template-compiler/system/precompile'], function (exports, _require2, _precompile) {
16507
16458
  'use strict';
@@ -16983,7 +16934,7 @@ enifed('ember-utils', ['exports'], function (exports) {
16983
16934
  @private
16984
16935
  */
16985
16936
  function canInvoke(obj, methodName) {
16986
- return !!(obj && typeof obj[methodName] === 'function');
16937
+ return obj !== null && obj !== undefined && typeof obj[methodName] === 'function';
16987
16938
  }
16988
16939
 
16989
16940
  /**
@@ -17327,7 +17278,7 @@ enifed('ember/features', ['exports', 'ember-environment', 'ember-utils'], functi
17327
17278
  enifed("ember/version", ["exports"], function (exports) {
17328
17279
  "use strict";
17329
17280
 
17330
- exports.default = "2.16.3";
17281
+ exports.default = "2.17.0-beta.4";
17331
17282
  });
17332
17283
  enifed("handlebars", ["exports"], function (exports) {
17333
17284
  "use strict";