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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: ff13e40f6a8e2537054b740bdd89d6909db8862432145a27331555df41e43a9e
4
- data.tar.gz: 794790c78faa257465729be2f9f427b7e51a9cea1b08ee18144a2fbd9331b6f0
2
+ SHA1:
3
+ metadata.gz: c3ced36784ffb932cea00fb55298db42494772d2
4
+ data.tar.gz: 4897f81d2d6f0b336a2c58abde17fe595df5d64c
5
5
  SHA512:
6
- metadata.gz: 0653dc862118f647d5fd2b15e1a1a7152dfd8554502a8cb6307eae313b7fdf6307a8377471d440a1bf641a2ecf727f56f5cda57439d44a831199c9b4d64cfbe3
7
- data.tar.gz: 3bf01d0baf14fd1ec82a2a117e4558c9ad3aca2c19a6524ce77810afaf2060b825fa7c6841bf4c6150f79c5aa105f9127723e500599c814605376176554c5db5
6
+ metadata.gz: 7ebf8e643ac64bf05f8bcc2505c462de576150bf42674e8332f1a647ef90b275b32c6095f1e6e34b0c2e242b4ed98ac191763c7192d271cf588b2837582de623
7
+ data.tar.gz: 5435dade5b64307db24e9b86fb04e59caaaf59d8827fccd3cffa65510a24eb9821f734c2549fc79066c65f7c61e4f2fda56eb87ca8ef29727935a7a0b83317ff
@@ -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;
@@ -160,10 +160,10 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
160
160
  this.isDestroyed = true;
161
161
  },
162
162
  reset: function (fullName) {
163
- if (fullName !== undefined) {
164
- resetMember(this, this.registry.normalize(fullName));
165
- } else {
163
+ if (fullName === undefined) {
166
164
  resetCache(this);
165
+ } else {
166
+ resetMember(this, this.registry.normalize(fullName));
167
167
  }
168
168
  },
169
169
  ownerInjection: function () {
@@ -285,10 +285,12 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
285
285
  }
286
286
  }
287
287
 
288
- var cacheKey = container._resolverCacheKey(fullName, options);
289
- var cached = container.cache[cacheKey];
290
- if (cached !== undefined && options.singleton !== false) {
291
- return cached;
288
+ if (options.singleton !== false) {
289
+ var cacheKey = container._resolverCacheKey(fullName, options);
290
+ var cached = container.cache[cacheKey];
291
+ if (cached !== undefined) {
292
+ return cached;
293
+ }
292
294
  }
293
295
 
294
296
  return instantiateFactory(container, fullName, options);
@@ -329,11 +331,10 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
329
331
  return;
330
332
  }
331
333
 
332
- var cacheKey = container._resolverCacheKey(fullName, options);
333
-
334
334
  // SomeClass { singleton: true, instantiate: true } | { singleton: true } | { instantiate: true } | {}
335
335
  // By default majority of objects fall into this case
336
336
  if (isSingletonInstance(container, fullName, options)) {
337
+ var cacheKey = container._resolverCacheKey(fullName, options);
337
338
  return container.cache[cacheKey] = factoryManager.create();
338
339
  }
339
340
 
@@ -350,16 +351,9 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
350
351
  throw new Error('Could not create factory');
351
352
  }
352
353
 
353
- function markInjectionsAsDynamic(injections) {
354
- injections._dynamic = true;
355
- }
356
-
357
- function areInjectionsNotDynamic(injections) {
358
- return injections._dynamic !== true;
359
- }
360
-
361
354
  function buildInjections() /* container, ...injections */{
362
355
  var hash = {};
356
+ var isDynamic = false;
363
357
 
364
358
  if (arguments.length > 1) {
365
359
  var container = arguments[0];
@@ -376,21 +370,16 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
376
370
  container.registry.validateInjections(injections);
377
371
  }
378
372
 
379
- var markAsDynamic = false;
380
373
  for (var _i = 0; _i < injections.length; _i++) {
381
374
  injection = injections[_i];
382
375
  hash[injection.property] = lookup(container, injection.fullName);
383
- if (!markAsDynamic) {
384
- markAsDynamic = !isSingleton(container, injection.fullName);
376
+ if (!isDynamic) {
377
+ isDynamic = !isSingleton(container, injection.fullName);
385
378
  }
386
379
  }
387
-
388
- if (markAsDynamic) {
389
- markInjectionsAsDynamic(hash);
390
- }
391
380
  }
392
381
 
393
- return hash;
382
+ return { injections: hash, isDynamic: isDynamic };
394
383
  }
395
384
 
396
385
  function injectionsFor(container, fullName) {
@@ -398,9 +387,7 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
398
387
  var splitName = fullName.split(':');
399
388
  var type = splitName[0];
400
389
 
401
- var injections = buildInjections(container, registry.getTypeInjections(type), registry.getInjections(fullName));
402
-
403
- return injections;
390
+ return buildInjections(container, registry.getTypeInjections(type), registry.getInjections(fullName));
404
391
  }
405
392
 
406
393
  function destroyDestroyables(container) {
@@ -411,7 +398,7 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
411
398
  var key = keys[i];
412
399
  var value = cache[key];
413
400
 
414
- if (isInstantiatable(container, key) && value.destroy) {
401
+ if (value.destroy) {
415
402
  value.destroy();
416
403
  }
417
404
  }
@@ -419,7 +406,8 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
419
406
 
420
407
  function resetCache(container) {
421
408
  destroyDestroyables(container);
422
- container.cache.dict = (0, _emberUtils.dictionary)(null);
409
+ container.cache = (0, _emberUtils.dictionary)(null);
410
+ container.factoryManagerCache = (0, _emberUtils.dictionary)(null);
423
411
  }
424
412
 
425
413
  function resetMember(container, fullName) {
@@ -450,7 +438,7 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
450
438
  }
451
439
 
452
440
  FactoryManager.prototype.toString = function toString() {
453
- if (!this.madeToString) {
441
+ if (this.madeToString === undefined) {
454
442
  this.madeToString = this.container.registry.makeToString(this.class, this.fullName);
455
443
  }
456
444
 
@@ -460,14 +448,19 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
460
448
  FactoryManager.prototype.create = function create() {
461
449
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
462
450
 
463
- var injections = this.injections;
464
- if (injections === undefined) {
465
- injections = injectionsFor(this.container, this.normalizedName);
466
- if (areInjectionsNotDynamic(injections)) {
451
+ var injectionsCache = this.injections;
452
+ if (injectionsCache === undefined) {
453
+ var _injectionsFor = injectionsFor(this.container, this.normalizedName),
454
+ injections = _injectionsFor.injections,
455
+ isDynamic = _injectionsFor.isDynamic;
456
+
457
+ injectionsCache = injections;
458
+ if (!isDynamic) {
467
459
  this.injections = injections;
468
460
  }
469
461
  }
470
- var props = (0, _emberUtils.assign)({}, injections, options);
462
+
463
+ var props = (0, _emberUtils.assign)({}, injectionsCache, options);
471
464
 
472
465
  if (true) {
473
466
  var lazyInjections = void 0;
@@ -752,10 +745,7 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
752
745
 
753
746
  var injections = this._typeInjections[type] || (this._typeInjections[type] = []);
754
747
 
755
- injections.push({
756
- property: property,
757
- fullName: fullName
758
- });
748
+ injections.push({ property: property, fullName: fullName });
759
749
  },
760
750
  injection: function (fullName, property, injectionName) {
761
751
  this.validateFullName(injectionName);
@@ -771,10 +761,7 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
771
761
 
772
762
  var injections = this._injections[normalizedName] || (this._injections[normalizedName] = []);
773
763
 
774
- injections.push({
775
- property: property,
776
- fullName: normalizedInjectionName
777
- });
764
+ injections.push({ property: property, fullName: normalizedInjectionName });
778
765
  },
779
766
  knownForType: function (type) {
780
767
  var fallbackKnown = void 0,
@@ -811,23 +798,6 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
811
798
  isValidFullName: function (fullName) {
812
799
  return VALID_FULL_NAME_REGEXP.test(fullName);
813
800
  },
814
- normalizeInjectionsHash: function (hash) {
815
- var injections = [];
816
-
817
- for (var key in hash) {
818
- if (hash.hasOwnProperty(key)) {
819
- (true && !(this.validateFullName(hash[key])) && (0, _emberDebug.assert)('Expected a proper full name, given \'' + hash[key] + '\'', this.validateFullName(hash[key])));
820
-
821
-
822
- injections.push({
823
- property: key,
824
- fullName: hash[key]
825
- });
826
- }
827
- }
828
-
829
- return injections;
830
- },
831
801
  getInjections: function (fullName) {
832
802
  var injections = this._injections[fullName] || [];
833
803
  if (this.fallback) {
@@ -848,6 +818,23 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
848
818
  }
849
819
 
850
820
  return options && options.source ? options.source + ':' + name : name;
821
+ },
822
+ expandLocalLookup: function (fullName, options) {
823
+ if (this.resolver && this.resolver.expandLocalLookup) {
824
+ (true && !(this.validateFullName(fullName)) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName)));
825
+ (true && !(options && options.source) && (0, _emberDebug.assert)('options.source must be provided to expandLocalLookup', options && options.source));
826
+ (true && !(this.validateFullName(options.source)) && (0, _emberDebug.assert)('options.source must be a proper full name', this.validateFullName(options.source)));
827
+
828
+
829
+ var normalizedFullName = this.normalize(fullName);
830
+ var normalizedSource = this.normalize(options.source);
831
+
832
+ return expandLocalLookup(this, normalizedFullName, normalizedSource);
833
+ } else if (this.fallback) {
834
+ return this.fallback.expandLocalLookup(fullName, options);
835
+ } else {
836
+ return null;
837
+ }
851
838
  }
852
839
  };
853
840
 
@@ -860,6 +847,24 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
860
847
  }
861
848
 
862
849
  if (true) {
850
+ Registry.prototype.normalizeInjectionsHash = function (hash) {
851
+ var injections = [];
852
+
853
+ for (var key in hash) {
854
+ if (hash.hasOwnProperty(key)) {
855
+ (true && !(this.validateFullName(hash[key])) && (0, _emberDebug.assert)('Expected a proper full name, given \'' + hash[key] + '\'', this.validateFullName(hash[key])));
856
+
857
+
858
+ injections.push({
859
+ property: key,
860
+ fullName: hash[key]
861
+ });
862
+ }
863
+ }
864
+
865
+ return injections;
866
+ };
867
+
863
868
  Registry.prototype.validateInjections = function (injections) {
864
869
  if (!injections) {
865
870
  return;
@@ -875,42 +880,6 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
875
880
  };
876
881
  }
877
882
 
878
- /**
879
- Given a fullName and a source fullName returns the fully resolved
880
- fullName. Used to allow for local lookup.
881
-
882
- ```javascript
883
- let registry = new Registry();
884
-
885
- // the twitter factory is added to the module system
886
- registry.expandLocalLookup('component:post-title', { source: 'template:post' }) // => component:post/post-title
887
- ```
888
-
889
- @private
890
- @method expandLocalLookup
891
- @param {String} fullName
892
- @param {Object} [options]
893
- @param {String} [options.source] the fullname of the request source (used for local lookups)
894
- @return {String} fullName
895
- */
896
- Registry.prototype.expandLocalLookup = function Registry_expandLocalLookup(fullName, options) {
897
- if (this.resolver && this.resolver.expandLocalLookup) {
898
- (true && !(this.validateFullName(fullName)) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName)));
899
- (true && !(options && options.source) && (0, _emberDebug.assert)('options.source must be provided to expandLocalLookup', options && options.source));
900
- (true && !(this.validateFullName(options.source)) && (0, _emberDebug.assert)('options.source must be a proper full name', this.validateFullName(options.source)));
901
-
902
-
903
- var normalizedFullName = this.normalize(fullName);
904
- var normalizedSource = this.normalize(options.source);
905
-
906
- return expandLocalLookup(this, normalizedFullName, normalizedSource);
907
- } else if (this.fallback) {
908
- return this.fallback.expandLocalLookup(fullName, options);
909
- } else {
910
- return null;
911
- }
912
- };
913
-
914
883
  function expandLocalLookup(registry, normalizedName, normalizedSource) {
915
884
  var cache = registry._localLookupCache;
916
885
  var normalizedNameCache = cache[normalizedName];
@@ -1718,7 +1687,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
1718
1687
  */
1719
1688
  function watchedEvents(obj) {
1720
1689
  var meta$$1 = exports.peekMeta(obj);
1721
- return meta$$1 && meta$$1.watchedEvents() || [];
1690
+ return meta$$1 !== undefined ? meta$$1.watchedEvents() : [];
1722
1691
  }
1723
1692
 
1724
1693
  /**
@@ -1740,7 +1709,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
1740
1709
  */
1741
1710
  function sendEvent(obj, eventName, params, actions, _meta) {
1742
1711
  if (actions === undefined) {
1743
- var meta$$1 = _meta || exports.peekMeta(obj);
1712
+ var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;
1744
1713
  actions = typeof meta$$1 === 'object' && meta$$1 !== null && meta$$1.matchingListeners(eventName);
1745
1714
  }
1746
1715
 
@@ -1811,9 +1780,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
1811
1780
  function listenersFor(obj, eventName) {
1812
1781
  var ret = [];
1813
1782
  var meta$$1 = exports.peekMeta(obj);
1814
- var actions = meta$$1 && meta$$1.matchingListeners(eventName);
1783
+ var actions = meta$$1 !== undefined ? meta$$1.matchingListeners(eventName) : undefined;
1815
1784
 
1816
- if (!actions) {
1785
+ if (actions === undefined) {
1817
1786
  return ret;
1818
1787
  }
1819
1788
 
@@ -1891,7 +1860,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
1891
1860
  return _glimmer_reference.CONSTANT_TAG;
1892
1861
  }
1893
1862
 
1894
- var meta$$1 = _meta || meta(object);
1863
+ var meta$$1 = _meta === undefined ? meta(object) : _meta;
1895
1864
  if (meta$$1.isProxy()) {
1896
1865
  return tagFor(object, meta$$1);
1897
1866
  }
@@ -1907,7 +1876,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
1907
1876
 
1908
1877
  function tagFor(object, _meta) {
1909
1878
  if (typeof object === 'object' && object !== null) {
1910
- var meta$$1 = _meta || meta(object);
1879
+ var meta$$1 = _meta === undefined ? meta(object) : _meta;
1911
1880
  return meta$$1.writableTag(makeTag);
1912
1881
  } else {
1913
1882
  return _glimmer_reference.CONSTANT_TAG;
@@ -2038,14 +2007,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
2038
2007
  {
2039
2008
  debugStack = context$$1.env.debugStack;
2040
2009
  }
2041
-
2042
- try {
2043
- context$$1[methodName]();
2044
- } finally {
2045
- inTransaction = false;
2046
- counter++;
2047
- }
2048
-
2010
+ context$$1[methodName]();
2011
+ inTransaction = false;
2012
+ counter++;
2049
2013
  return shouldReflush;
2050
2014
  };
2051
2015
 
@@ -2146,12 +2110,12 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
2146
2110
  @private
2147
2111
  */
2148
2112
  function propertyWillChange(obj, keyName, _meta) {
2149
- var meta$$1 = _meta || exports.peekMeta(obj);
2150
- if (meta$$1 && !meta$$1.isInitialized(obj)) {
2113
+ var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;
2114
+ if (meta$$1 !== undefined && !meta$$1.isInitialized(obj)) {
2151
2115
  return;
2152
2116
  }
2153
2117
 
2154
- var watching = meta$$1 && meta$$1.peekWatching(keyName) > 0;
2118
+ var watching = meta$$1 !== undefined && meta$$1.peekWatching(keyName) > 0;
2155
2119
  var possibleDesc = obj[keyName];
2156
2120
  var isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;
2157
2121
 
@@ -2184,8 +2148,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
2184
2148
  @private
2185
2149
  */
2186
2150
  function propertyDidChange(obj, keyName, _meta) {
2187
- var meta$$1 = _meta || exports.peekMeta(obj);
2188
- var hasMeta = !!meta$$1;
2151
+ var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;
2152
+ var hasMeta = meta$$1 !== undefined;
2189
2153
 
2190
2154
  if (hasMeta && !meta$$1.isInitialized(obj)) {
2191
2155
  return;
@@ -2663,30 +2627,30 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
2663
2627
 
2664
2628
  var handleMandatorySetter = void 0;
2665
2629
 
2666
- function watchKey(obj, keyName, meta$$1) {
2630
+ function watchKey(obj, keyName, _meta) {
2667
2631
  if (typeof obj !== 'object' || obj === null) {
2668
2632
  return;
2669
2633
  }
2670
2634
 
2671
- var m = meta$$1 || meta(obj);
2672
- var count = m.peekWatching(keyName) || 0;
2673
- m.writeWatching(keyName, count + 1);
2635
+ var meta$$1 = _meta === undefined ? meta(obj) : _meta;
2636
+ var count = meta$$1.peekWatching(keyName) || 0;
2637
+ meta$$1.writeWatching(keyName, count + 1);
2674
2638
 
2675
2639
  if (count === 0) {
2676
2640
  // activate watching first time
2677
2641
  var possibleDesc = obj[keyName];
2678
2642
  var isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;
2679
2643
  if (isDescriptor && possibleDesc.willWatch) {
2680
- possibleDesc.willWatch(obj, keyName);
2644
+ possibleDesc.willWatch(obj, keyName, meta$$1);
2681
2645
  }
2682
2646
 
2683
- if ('function' === typeof obj.willWatchProperty) {
2647
+ if (typeof obj.willWatchProperty === 'function') {
2684
2648
  obj.willWatchProperty(keyName);
2685
2649
  }
2686
2650
 
2687
2651
  if (ember_features.MANDATORY_SETTER) {
2688
2652
  // NOTE: this is dropped for prod + minified builds
2689
- handleMandatorySetter(m, obj, keyName);
2653
+ handleMandatorySetter(meta$$1, obj, keyName);
2690
2654
  }
2691
2655
  }
2692
2656
  }
@@ -2695,7 +2659,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
2695
2659
  var _hasOwnProperty = function (obj, key) {
2696
2660
  return Object.prototype.hasOwnProperty.call(obj, key);
2697
2661
  };
2698
-
2699
2662
  var _propertyIsEnumerable = function (obj, key) {
2700
2663
  return Object.prototype.propertyIsEnumerable.call(obj, key);
2701
2664
  };
@@ -2741,7 +2704,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
2741
2704
  if (typeof obj !== 'object' || obj === null) {
2742
2705
  return;
2743
2706
  }
2744
- var meta$$1 = _meta || exports.peekMeta(obj);
2707
+ var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;
2745
2708
 
2746
2709
  // do nothing of this object has already been destroyed
2747
2710
  if (meta$$1 === undefined || meta$$1.isSourceDestroyed()) {
@@ -2756,10 +2719,10 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
2756
2719
  var isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;
2757
2720
 
2758
2721
  if (isDescriptor && possibleDesc.didUnwatch) {
2759
- possibleDesc.didUnwatch(obj, keyName);
2722
+ possibleDesc.didUnwatch(obj, keyName, meta$$1);
2760
2723
  }
2761
2724
 
2762
- if ('function' === typeof obj.didUnwatchProperty) {
2725
+ if (typeof obj.didUnwatchProperty === 'function') {
2763
2726
  obj.didUnwatchProperty(keyName);
2764
2727
  }
2765
2728
 
@@ -2807,7 +2770,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
2807
2770
  if (typeof obj !== 'object' || obj === null) {
2808
2771
  return;
2809
2772
  }
2810
- var m = meta$$1 || meta(obj);
2773
+ var m = meta$$1 === undefined ? meta(obj) : meta$$1;
2811
2774
  var counter = m.peekWatching(keyPath) || 0;
2812
2775
 
2813
2776
  m.writeWatching(keyPath, counter + 1);
@@ -2821,7 +2784,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
2821
2784
  if (typeof obj !== 'object' || obj === null) {
2822
2785
  return;
2823
2786
  }
2824
- var m = meta$$1 || exports.peekMeta(obj);
2787
+ var m = meta$$1 === undefined ? exports.peekMeta(obj) : meta$$1;
2788
+
2825
2789
  if (m === undefined) {
2826
2790
  return;
2827
2791
  }
@@ -3762,6 +3726,16 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
3762
3726
  };
3763
3727
  }
3764
3728
 
3729
+ /**
3730
+ Tears down the meta on an object so that it can be garbage collected.
3731
+ Multiple calls will have no effect.
3732
+
3733
+ @method deleteMeta
3734
+ @for Ember
3735
+ @param {Object} obj the object to destroy
3736
+ @return {void}
3737
+ @private
3738
+ */
3765
3739
  function deleteMeta(obj) {
3766
3740
  {
3767
3741
  counters.deleteCalls++;
@@ -4105,7 +4079,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
4105
4079
 
4106
4080
  if (ember_features.MANDATORY_SETTER) {
4107
4081
  var setWithMandatorySetter = function (meta$$1, obj, keyName, value) {
4108
- if (meta$$1 && meta$$1.peekWatching(keyName) > 0) {
4082
+ if (meta$$1 !== undefined && meta$$1.peekWatching(keyName) > 0) {
4109
4083
  makeEnumerable(obj, keyName);
4110
4084
  meta$$1.writeValue(obj, keyName, value);
4111
4085
  } else {
@@ -4260,7 +4234,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
4260
4234
 
4261
4235
  function watcherCount(obj, key) {
4262
4236
  var meta$$1 = exports.peekMeta(obj);
4263
- return meta$$1 && meta$$1.peekWatching(key) || 0;
4237
+ return meta$$1 !== undefined && meta$$1.peekWatching(key) || 0;
4264
4238
  }
4265
4239
 
4266
4240
  function unwatch(obj, _keyPath, m) {
@@ -4868,8 +4842,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
4868
4842
  */
4869
4843
  function cacheFor(obj, key) {
4870
4844
  var meta$$1 = exports.peekMeta(obj);
4871
- var cache = meta$$1 && meta$$1.source === obj && meta$$1.readableCache();
4872
- var ret = cache && cache[key];
4845
+ var cache = meta$$1 !== undefined ? meta$$1.source === obj && meta$$1.readableCache() : undefined;
4846
+ var ret = cache !== undefined ? cache[key] : undefined;
4873
4847
 
4874
4848
  if (ret === UNDEFINED) {
4875
4849
  return undefined;
@@ -4927,17 +4901,17 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
4927
4901
  };
4928
4902
 
4929
4903
  AliasedProperty.prototype.teardown = function teardown(obj, keyName, meta$$1) {
4930
- if (meta$$1 && meta$$1.peekWatching(keyName)) {
4904
+ if (meta$$1.peekWatching(keyName)) {
4931
4905
  removeDependentKeys(this, obj, keyName, meta$$1);
4932
4906
  }
4933
4907
  };
4934
4908
 
4935
- AliasedProperty.prototype.willWatch = function willWatch(obj, keyName) {
4936
- addDependentKeys(this, obj, keyName, meta(obj));
4909
+ AliasedProperty.prototype.willWatch = function willWatch(obj, keyName, meta$$1) {
4910
+ addDependentKeys(this, obj, keyName, meta$$1);
4937
4911
  };
4938
4912
 
4939
- AliasedProperty.prototype.didUnwatch = function didUnwatch(obj, keyName) {
4940
- removeDependentKeys(this, obj, keyName, meta(obj));
4913
+ AliasedProperty.prototype.didUnwatch = function didUnwatch(obj, keyName, meta$$1) {
4914
+ removeDependentKeys(this, obj, keyName, meta$$1);
4941
4915
  };
4942
4916
 
4943
4917
  AliasedProperty.prototype.get = function get$$1(obj, keyName) {
@@ -5005,7 +4979,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
5005
4979
  @public
5006
4980
  */
5007
4981
  function merge(original, updates) {
5008
- if (!updates || typeof updates !== 'object') {
4982
+ if (updates === null || typeof updates !== 'object') {
5009
4983
  return original;
5010
4984
  }
5011
4985
 
@@ -6501,13 +6475,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6501
6475
  Map is mocked out to look like an Ember object, so you can do
6502
6476
  `EmberMap.create()` for symmetry with other Ember classes.
6503
6477
  */
6504
- function missingFunction(fn) {
6505
- throw new TypeError(Object.prototype.toString.call(fn) + ' is not a function');
6506
- }
6507
-
6508
- function missingNew(name) {
6509
- throw new TypeError('Constructor ' + name + ' requires \'new\'');
6510
- }
6511
6478
 
6512
6479
  function copyNull(obj) {
6513
6480
  var output = Object.create(null);
@@ -6541,37 +6508,36 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6541
6508
  @constructor
6542
6509
  @private
6543
6510
  */
6544
- function OrderedSet() {
6545
- if (this instanceof OrderedSet) {
6511
+
6512
+ var OrderedSet = function () {
6513
+ function OrderedSet() {
6514
+ emberBabel.classCallCheck(this, OrderedSet);
6515
+
6546
6516
  this.clear();
6547
- } else {
6548
- missingNew('OrderedSet');
6549
6517
  }
6550
- }
6551
6518
 
6552
- /**
6553
- @method create
6554
- @static
6555
- @return {Ember.OrderedSet}
6556
- @private
6557
- */
6558
- OrderedSet.create = function () {
6559
- var Constructor = this;
6519
+ /**
6520
+ @method create
6521
+ @static
6522
+ @return {Ember.OrderedSet}
6523
+ @private
6524
+ */
6560
6525
 
6561
- return new Constructor();
6562
- };
6526
+ OrderedSet.create = function create() {
6527
+ var Constructor = this;
6528
+ return new Constructor();
6529
+ };
6563
6530
 
6564
- OrderedSet.prototype = {
6565
- constructor: OrderedSet,
6566
6531
  /**
6567
6532
  @method clear
6568
6533
  @private
6569
6534
  */
6570
- clear: function () {
6535
+
6536
+ OrderedSet.prototype.clear = function clear() {
6571
6537
  this.presenceSet = Object.create(null);
6572
6538
  this.list = [];
6573
6539
  this.size = 0;
6574
- },
6540
+ };
6575
6541
 
6576
6542
  /**
6577
6543
  @method add
@@ -6580,7 +6546,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6580
6546
  @return {Ember.OrderedSet}
6581
6547
  @private
6582
6548
  */
6583
- add: function (obj, _guid) {
6549
+
6550
+ OrderedSet.prototype.add = function add(obj, _guid) {
6584
6551
  var guid = _guid || emberUtils.guidFor(obj);
6585
6552
  var presenceSet = this.presenceSet;
6586
6553
  var list = this.list;
@@ -6591,7 +6558,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6591
6558
  }
6592
6559
 
6593
6560
  return this;
6594
- },
6561
+ };
6595
6562
 
6596
6563
  /**
6597
6564
  @since 1.8.0
@@ -6601,7 +6568,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6601
6568
  @return {Boolean}
6602
6569
  @private
6603
6570
  */
6604
- delete: function (obj, _guid) {
6571
+
6572
+ OrderedSet.prototype.delete = function _delete(obj, _guid) {
6605
6573
  var guid = _guid || emberUtils.guidFor(obj);
6606
6574
  var presenceSet = this.presenceSet;
6607
6575
  var list = this.list;
@@ -6617,16 +6585,17 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6617
6585
  } else {
6618
6586
  return false;
6619
6587
  }
6620
- },
6588
+ };
6621
6589
 
6622
6590
  /**
6623
6591
  @method isEmpty
6624
6592
  @return {Boolean}
6625
6593
  @private
6626
6594
  */
6627
- isEmpty: function () {
6595
+
6596
+ OrderedSet.prototype.isEmpty = function isEmpty() {
6628
6597
  return this.size === 0;
6629
- },
6598
+ };
6630
6599
 
6631
6600
  /**
6632
6601
  @method has
@@ -6634,7 +6603,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6634
6603
  @return {Boolean}
6635
6604
  @private
6636
6605
  */
6637
- has: function (obj) {
6606
+
6607
+ OrderedSet.prototype.has = function has(obj) {
6638
6608
  if (this.size === 0) {
6639
6609
  return false;
6640
6610
  }
@@ -6643,7 +6613,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6643
6613
  var presenceSet = this.presenceSet;
6644
6614
 
6645
6615
  return presenceSet[guid] === true;
6646
- },
6616
+ };
6647
6617
 
6648
6618
  /**
6649
6619
  @method forEach
@@ -6651,10 +6621,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6651
6621
  @param self
6652
6622
  @private
6653
6623
  */
6654
- forEach: function (fn /*, ...thisArg*/) {
6655
- if (typeof fn !== 'function') {
6656
- missingFunction(fn);
6657
- }
6624
+
6625
+ OrderedSet.prototype.forEach = function forEach(fn /*, ...thisArg*/) {
6626
+ true && !(typeof fn === 'function') && emberDebug.assert(Object.prototype.toString.call(fn) + ' is not a function', typeof fn === 'function');
6658
6627
 
6659
6628
  if (this.size === 0) {
6660
6629
  return;
@@ -6671,23 +6640,25 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6671
6640
  fn(list[_i]);
6672
6641
  }
6673
6642
  }
6674
- },
6643
+ };
6675
6644
 
6676
6645
  /**
6677
6646
  @method toArray
6678
6647
  @return {Array}
6679
6648
  @private
6680
6649
  */
6681
- toArray: function () {
6650
+
6651
+ OrderedSet.prototype.toArray = function toArray() {
6682
6652
  return this.list.slice();
6683
- },
6653
+ };
6684
6654
 
6685
6655
  /**
6686
6656
  @method copy
6687
6657
  @return {Ember.OrderedSet}
6688
6658
  @private
6689
6659
  */
6690
- copy: function () {
6660
+
6661
+ OrderedSet.prototype.copy = function copy() {
6691
6662
  var Constructor = this.constructor;
6692
6663
  var set = new Constructor();
6693
6664
 
@@ -6696,8 +6667,10 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6696
6667
  set.size = this.size;
6697
6668
 
6698
6669
  return set;
6699
- }
6700
- };
6670
+ };
6671
+
6672
+ return OrderedSet;
6673
+ }();
6701
6674
 
6702
6675
  /**
6703
6676
  A Map stores values indexed by keys. Unlike JavaScript's
@@ -6719,38 +6692,26 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6719
6692
  @private
6720
6693
  @constructor
6721
6694
  */
6722
- function Map() {
6723
- if (this instanceof Map) {
6724
- this._keys = OrderedSet.create();
6695
+
6696
+ var Map = function () {
6697
+ function Map() {
6698
+ emberBabel.classCallCheck(this, Map);
6699
+
6700
+ this._keys = new OrderedSet();
6725
6701
  this._values = Object.create(null);
6726
6702
  this.size = 0;
6727
- } else {
6728
- missingNew('Map');
6729
6703
  }
6730
- }
6731
-
6732
- /**
6733
- @method create
6734
- @static
6735
- @private
6736
- */
6737
- Map.create = function () {
6738
- var Constructor = this;
6739
- return new Constructor();
6740
- };
6741
-
6742
- Map.prototype = {
6743
- constructor: Map,
6744
6704
 
6745
6705
  /**
6746
- This property will change as the number of objects in the map changes.
6747
- @since 1.8.0
6748
- @property size
6749
- @type number
6750
- @default 0
6706
+ @method create
6707
+ @static
6751
6708
  @private
6752
6709
  */
6753
- size: 0,
6710
+
6711
+ Map.create = function create() {
6712
+ var Constructor = this;
6713
+ return new Constructor();
6714
+ };
6754
6715
 
6755
6716
  /**
6756
6717
  Retrieve the value associated with a given key.
@@ -6759,7 +6720,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6759
6720
  @return {*} the value associated with the key, or `undefined`
6760
6721
  @private
6761
6722
  */
6762
- get: function (key) {
6723
+
6724
+ Map.prototype.get = function get(key) {
6763
6725
  if (this.size === 0) {
6764
6726
  return;
6765
6727
  }
@@ -6768,7 +6730,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6768
6730
  var guid = emberUtils.guidFor(key);
6769
6731
 
6770
6732
  return values[guid];
6771
- },
6733
+ };
6772
6734
 
6773
6735
  /**
6774
6736
  Adds a value to the map. If a value for the given key has already been
@@ -6779,7 +6741,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6779
6741
  @return {Ember.Map}
6780
6742
  @private
6781
6743
  */
6782
- set: function (key, value) {
6744
+
6745
+ Map.prototype.set = function set(key, value) {
6783
6746
  var keys = this._keys;
6784
6747
  var values = this._values;
6785
6748
  var guid = emberUtils.guidFor(key);
@@ -6794,7 +6757,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6794
6757
  this.size = keys.size;
6795
6758
 
6796
6759
  return this;
6797
- },
6760
+ };
6798
6761
 
6799
6762
  /**
6800
6763
  Removes a value from the map for an associated key.
@@ -6804,7 +6767,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6804
6767
  @return {Boolean} true if an item was removed, false otherwise
6805
6768
  @private
6806
6769
  */
6807
- delete: function (key) {
6770
+
6771
+ Map.prototype.delete = function _delete(key) {
6808
6772
  if (this.size === 0) {
6809
6773
  return false;
6810
6774
  }
@@ -6821,7 +6785,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6821
6785
  } else {
6822
6786
  return false;
6823
6787
  }
6824
- },
6788
+ };
6825
6789
 
6826
6790
  /**
6827
6791
  Check whether a key is present.
@@ -6830,9 +6794,10 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6830
6794
  @return {Boolean} true if the item was present, false otherwise
6831
6795
  @private
6832
6796
  */
6833
- has: function (key) {
6797
+
6798
+ Map.prototype.has = function has(key) {
6834
6799
  return this._keys.has(key);
6835
- },
6800
+ };
6836
6801
 
6837
6802
  /**
6838
6803
  Iterate over all the keys and values. Calls the function once
@@ -6845,10 +6810,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6845
6810
  callback. By default, `this` is the map.
6846
6811
  @private
6847
6812
  */
6848
- forEach: function (callback /*, ...thisArg*/) {
6849
- if (typeof callback !== 'function') {
6850
- missingFunction(callback);
6851
- }
6813
+
6814
+ Map.prototype.forEach = function forEach(callback /*, ...thisArg*/) {
6815
+ true && !(typeof callback === 'function') && emberDebug.assert(Object.prototype.toString.call(callback) + ' is not a function', typeof callback === 'function');
6852
6816
 
6853
6817
  if (this.size === 0) {
6854
6818
  return;
@@ -6870,27 +6834,31 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6870
6834
  }
6871
6835
 
6872
6836
  this._keys.forEach(cb);
6873
- },
6837
+ };
6874
6838
 
6875
6839
  /**
6876
6840
  @method clear
6877
6841
  @private
6878
6842
  */
6879
- clear: function () {
6843
+
6844
+ Map.prototype.clear = function clear() {
6880
6845
  this._keys.clear();
6881
6846
  this._values = Object.create(null);
6882
6847
  this.size = 0;
6883
- },
6848
+ };
6884
6849
 
6885
6850
  /**
6886
6851
  @method copy
6887
6852
  @return {Ember.Map}
6888
6853
  @private
6889
6854
  */
6890
- copy: function () {
6855
+
6856
+ Map.prototype.copy = function copy() {
6891
6857
  return copyMap(this, new Map());
6892
- }
6893
- };
6858
+ };
6859
+
6860
+ return Map;
6861
+ }();
6894
6862
 
6895
6863
  /**
6896
6864
  @class MapWithDefault
@@ -6901,64 +6869,72 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
6901
6869
  @param [options]
6902
6870
  @param {*} [options.defaultValue]
6903
6871
  */
6904
- function MapWithDefault(options) {
6905
- this._super$constructor();
6906
- this.defaultValue = options.defaultValue;
6907
- }
6908
6872
 
6909
- /**
6910
- @method create
6911
- @static
6912
- @param [options]
6913
- @param {*} [options.defaultValue]
6914
- @return {Ember.MapWithDefault|Ember.Map} If options are passed, returns
6915
- `MapWithDefault` otherwise returns `EmberMap`
6916
- @private
6917
- */
6918
- MapWithDefault.create = function (options) {
6919
- if (options) {
6920
- return new MapWithDefault(options);
6921
- } else {
6922
- return new Map();
6923
- }
6924
- };
6873
+ var MapWithDefault = function (_Map) {
6874
+ emberBabel.inherits(MapWithDefault, _Map);
6925
6875
 
6926
- MapWithDefault.prototype = Object.create(Map.prototype);
6927
- MapWithDefault.prototype.constructor = MapWithDefault;
6928
- MapWithDefault.prototype._super$constructor = Map;
6929
- MapWithDefault.prototype._super$get = Map.prototype.get;
6876
+ function MapWithDefault(options) {
6877
+ emberBabel.classCallCheck(this, MapWithDefault);
6930
6878
 
6931
- /**
6932
- Retrieve the value associated with a given key.
6933
-
6934
- @method get
6935
- @param {*} key
6936
- @return {*} the value associated with the key, or the default value
6937
- @private
6938
- */
6939
- MapWithDefault.prototype.get = function (key) {
6940
- var hasValue = this.has(key);
6879
+ var _this = emberBabel.possibleConstructorReturn(this, _Map.call(this));
6941
6880
 
6942
- if (hasValue) {
6943
- return this._super$get(key);
6944
- } else {
6945
- var defaultValue = this.defaultValue(key);
6946
- this.set(key, defaultValue);
6947
- return defaultValue;
6881
+ _this.defaultValue = options.defaultValue;
6882
+ return _this;
6948
6883
  }
6949
- };
6950
6884
 
6951
- /**
6952
- @method copy
6953
- @return {Ember.MapWithDefault}
6954
- @private
6955
- */
6956
- MapWithDefault.prototype.copy = function () {
6957
- var Constructor = this.constructor;
6958
- return copyMap(this, new Constructor({
6959
- defaultValue: this.defaultValue
6960
- }));
6961
- };
6885
+ /**
6886
+ @method create
6887
+ @static
6888
+ @param [options]
6889
+ @param {*} [options.defaultValue]
6890
+ @return {Ember.MapWithDefault|Ember.Map} If options are passed, returns
6891
+ `MapWithDefault` otherwise returns `EmberMap`
6892
+ @private
6893
+ */
6894
+
6895
+ MapWithDefault.create = function create(options) {
6896
+ if (options) {
6897
+ return new MapWithDefault(options);
6898
+ } else {
6899
+ return new Map();
6900
+ }
6901
+ };
6902
+
6903
+ /**
6904
+ Retrieve the value associated with a given key.
6905
+ @method get
6906
+ @param {*} key
6907
+ @return {*} the value associated with the key, or the default value
6908
+ @private
6909
+ */
6910
+
6911
+ MapWithDefault.prototype.get = function get(key) {
6912
+ var hasValue = this.has(key);
6913
+
6914
+ if (hasValue) {
6915
+ return _Map.prototype.get.call(this, key);
6916
+ } else {
6917
+ var defaultValue = this.defaultValue(key);
6918
+ this.set(key, defaultValue);
6919
+ return defaultValue;
6920
+ }
6921
+ };
6922
+
6923
+ /**
6924
+ @method copy
6925
+ @return {Ember.MapWithDefault}
6926
+ @private
6927
+ */
6928
+
6929
+ MapWithDefault.prototype.copy = function copy() {
6930
+ var Constructor = this.constructor;
6931
+ return copyMap(this, new Constructor({
6932
+ defaultValue: this.defaultValue
6933
+ }));
6934
+ };
6935
+
6936
+ return MapWithDefault;
6937
+ }(Map);
6962
6938
 
6963
6939
  /**
6964
6940
  @module @ember/object
@@ -7034,7 +7010,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
7034
7010
  @public
7035
7011
  */
7036
7012
  function setProperties(obj, properties) {
7037
- if (!properties || typeof properties !== 'object') {
7013
+ if (properties === null || typeof properties !== 'object') {
7038
7014
  return properties;
7039
7015
  }
7040
7016
  changeProperties(function () {
@@ -7759,12 +7735,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
7759
7735
  function applyMergedProperties(obj, key, value, values) {
7760
7736
  var baseValue = values[key] || obj[key];
7761
7737
 
7762
- {
7763
- if (isArray(value)) {
7764
- // use conditional to avoid stringifying every time
7765
- true && !false && emberDebug.assert('You passed in `' + JSON.stringify(value) + '` as the value for `' + key + '` but `' + key + '` cannot be an Array', false);
7766
- }
7767
- }
7738
+ true && !!isArray(value) && emberDebug.assert('You passed in `' + JSON.stringify(value) + '` as the value for `' + key + '` but `' + key + '` cannot be an Array', !isArray(value));
7768
7739
 
7769
7740
  if (!baseValue) {
7770
7741
  return value;
@@ -7902,7 +7873,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
7902
7873
  }
7903
7874
 
7904
7875
  function finishPartial(obj, meta$$1) {
7905
- connectBindings(obj, meta$$1 || meta(obj));
7876
+ connectBindings(obj, meta$$1 === undefined ? meta(obj) : meta$$1);
7906
7877
  return obj;
7907
7878
  }
7908
7879
 
@@ -8187,74 +8158,117 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8187
8158
  return ret;
8188
8159
  };
8189
8160
 
8190
- return Mixin;
8191
- }();
8161
+ /**
8162
+ @method reopen
8163
+ @param arguments*
8164
+ @private
8165
+ */
8192
8166
 
8193
- Mixin._apply = applyMixin;
8167
+ Mixin.prototype.reopen = function reopen() {
8168
+ var currentMixin = void 0;
8194
8169
 
8195
- Mixin.finishPartial = finishPartial;
8170
+ if (this.properties) {
8171
+ currentMixin = new Mixin(undefined, this.properties);
8172
+ this.properties = undefined;
8173
+ this.mixins = [currentMixin];
8174
+ } else if (!this.mixins) {
8175
+ this.mixins = [];
8176
+ }
8196
8177
 
8197
- var unprocessedFlag = false;
8178
+ var mixins = this.mixins;
8179
+ var idx = void 0;
8198
8180
 
8199
- function hasUnprocessedMixins() {
8200
- return unprocessedFlag;
8201
- }
8181
+ for (idx = 0; idx < arguments.length; idx++) {
8182
+ currentMixin = arguments[idx];
8183
+ 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]');
8202
8184
 
8203
- function clearUnprocessedMixins() {
8204
- unprocessedFlag = false;
8205
- }
8185
+ if (currentMixin instanceof Mixin) {
8186
+ mixins.push(currentMixin);
8187
+ } else {
8188
+ mixins.push(new Mixin(undefined, currentMixin));
8189
+ }
8190
+ }
8206
8191
 
8207
- var MixinPrototype = Mixin.prototype;
8192
+ return this;
8193
+ };
8208
8194
 
8209
- /**
8210
- @method reopen
8211
- @param arguments*
8212
- @private
8213
- */
8214
- MixinPrototype.reopen = function () {
8215
- var currentMixin = void 0;
8195
+ /**
8196
+ @method apply
8197
+ @param obj
8198
+ @return applied object
8199
+ @private
8200
+ */
8216
8201
 
8217
- if (this.properties) {
8218
- currentMixin = new Mixin(undefined, this.properties);
8219
- this.properties = undefined;
8220
- this.mixins = [currentMixin];
8221
- } else if (!this.mixins) {
8222
- this.mixins = [];
8223
- }
8202
+ Mixin.prototype.apply = function apply(obj) {
8203
+ return applyMixin(obj, [this], false);
8204
+ };
8224
8205
 
8225
- var mixins = this.mixins;
8226
- var idx = void 0;
8206
+ Mixin.prototype.applyPartial = function applyPartial(obj) {
8207
+ return applyMixin(obj, [this], true);
8208
+ };
8227
8209
 
8228
- for (idx = 0; idx < arguments.length; idx++) {
8229
- currentMixin = arguments[idx];
8230
- 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]');
8210
+ /**
8211
+ @method detect
8212
+ @param obj
8213
+ @return {Boolean}
8214
+ @private
8215
+ */
8231
8216
 
8232
- if (currentMixin instanceof Mixin) {
8233
- mixins.push(currentMixin);
8234
- } else {
8235
- mixins.push(new Mixin(undefined, currentMixin));
8217
+ Mixin.prototype.detect = function detect(obj) {
8218
+ if (typeof obj !== 'object' || obj === null) {
8219
+ return false;
8236
8220
  }
8237
- }
8221
+ if (obj instanceof Mixin) {
8222
+ return _detect(obj, this, {});
8223
+ }
8224
+ var meta$$1 = exports.peekMeta(obj);
8225
+ if (meta$$1 === undefined) {
8226
+ return false;
8227
+ }
8228
+ return !!meta$$1.peekMixins(emberUtils.guidFor(this));
8229
+ };
8238
8230
 
8239
- return this;
8240
- };
8231
+ Mixin.prototype.without = function without() {
8232
+ var ret = new Mixin([this]);
8241
8233
 
8242
- /**
8243
- @method apply
8244
- @param obj
8245
- @return applied object
8246
- @private
8247
- */
8248
- MixinPrototype.apply = function (obj) {
8249
- return applyMixin(obj, [this], false);
8250
- };
8234
+ for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
8235
+ args[_key4] = arguments[_key4];
8236
+ }
8251
8237
 
8252
- MixinPrototype.applyPartial = function (obj) {
8253
- return applyMixin(obj, [this], true);
8254
- };
8238
+ ret._without = args;
8239
+ return ret;
8240
+ };
8241
+
8242
+ Mixin.prototype.keys = function keys() {
8243
+ var keys = {};
8244
+ var seen = {};
8245
+
8246
+ _keys(keys, this, seen);
8247
+ var ret = Object.keys(keys);
8248
+ return ret;
8249
+ };
8255
8250
 
8251
+ return Mixin;
8252
+ }();
8253
+
8254
+ Mixin._apply = applyMixin;
8255
+ Mixin.finishPartial = finishPartial;
8256
+
8257
+ var MixinPrototype = Mixin.prototype;
8256
8258
  MixinPrototype.toString = Object.toString;
8257
8259
 
8260
+ emberDebug.debugSeal(MixinPrototype);
8261
+
8262
+ var unprocessedFlag = false;
8263
+
8264
+ function hasUnprocessedMixins() {
8265
+ return unprocessedFlag;
8266
+ }
8267
+
8268
+ function clearUnprocessedMixins() {
8269
+ unprocessedFlag = false;
8270
+ }
8271
+
8258
8272
  function _detect(curMixin, targetMixin, seen) {
8259
8273
  var guid = emberUtils.guidFor(curMixin);
8260
8274
 
@@ -8276,37 +8290,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8276
8290
  return false;
8277
8291
  }
8278
8292
 
8279
- /**
8280
- @method detect
8281
- @param obj
8282
- @return {Boolean}
8283
- @private
8284
- */
8285
- MixinPrototype.detect = function (obj) {
8286
- if (typeof obj !== 'object' || obj === null) {
8287
- return false;
8288
- }
8289
- if (obj instanceof Mixin) {
8290
- return _detect(obj, this, {});
8291
- }
8292
- var meta$$1 = exports.peekMeta(obj);
8293
- if (meta$$1 === undefined) {
8294
- return false;
8295
- }
8296
- return !!meta$$1.peekMixins(emberUtils.guidFor(this));
8297
- };
8298
-
8299
- MixinPrototype.without = function () {
8300
- var ret = new Mixin([this]);
8301
-
8302
- for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
8303
- args[_key4] = arguments[_key4];
8304
- }
8305
-
8306
- ret._without = args;
8307
- return ret;
8308
- };
8309
-
8310
8293
  function _keys(ret, mixin, seen) {
8311
8294
  if (seen[emberUtils.guidFor(mixin)]) {
8312
8295
  return;
@@ -8326,17 +8309,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8326
8309
  }
8327
8310
  }
8328
8311
 
8329
- MixinPrototype.keys = function () {
8330
- var keys = {};
8331
- var seen = {};
8332
-
8333
- _keys(keys, this, seen);
8334
- var ret = Object.keys(keys);
8335
- return ret;
8336
- };
8337
-
8338
- emberDebug.debugSeal(MixinPrototype);
8339
-
8340
8312
  var REQUIRED = new Descriptor();
8341
8313
  REQUIRED.toString = function () {
8342
8314
  return '(Required Property)';
@@ -8689,6 +8661,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8689
8661
  exports.getDispatchOverride = getDispatchOverride;
8690
8662
  exports.META_DESC = META_DESC;
8691
8663
  exports.meta = meta;
8664
+ exports.deleteMeta = deleteMeta;
8692
8665
  exports.Cache = Cache;
8693
8666
  exports._getPath = _getPath;
8694
8667
  exports.get = get;
@@ -8729,7 +8702,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8729
8702
  exports.removeChainWatcher = removeChainWatcher;
8730
8703
  exports.watchPath = watchPath;
8731
8704
  exports.unwatchPath = unwatchPath;
8732
- exports.destroy = deleteMeta;
8733
8705
  exports.isWatching = isWatching;
8734
8706
  exports.unwatch = unwatch;
8735
8707
  exports.watch = watch;