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;
@@ -5109,28 +5109,26 @@ enifed('@glimmer/runtime', ['exports', '@glimmer/util', '@glimmer/reference', '@
5109
5109
  var partial = _partial;
5110
5110
  var partialSymbols = partial.symbolTable.symbols;
5111
5111
  var outerScope = vm.scope();
5112
- var evalScope = outerScope.getEvalScope();
5113
5112
  var partialScope = vm.pushRootScope(partialSymbols.length, false);
5114
5113
  partialScope.bindCallerScope(outerScope.getCallerScope());
5115
- partialScope.bindEvalScope(evalScope);
5114
+ partialScope.bindEvalScope(outerScope.getEvalScope());
5116
5115
  partialScope.bindSelf(outerScope.getSelf());
5117
5116
  var evalInfo = this.evalInfo,
5118
5117
  outerSymbols = this.outerSymbols;
5119
5118
 
5120
- var locals = Object.create(outerScope.getPartialMap());
5119
+ var locals = (0, _util.dict)();
5121
5120
  for (var i = 0; i < evalInfo.length; i++) {
5122
5121
  var slot = evalInfo[i];
5123
5122
  var name = outerSymbols[slot - 1];
5124
5123
  var ref = outerScope.getSymbol(slot);
5125
5124
  locals[name] = ref;
5126
5125
  }
5127
- if (evalScope) {
5128
- for (var _i2 = 0; _i2 < partialSymbols.length; _i2++) {
5129
- var _name = partialSymbols[_i2];
5130
- var symbol = _i2 + 1;
5131
- var value = evalScope[_name];
5132
- if (value !== undefined) partialScope.bind(symbol, value);
5133
- }
5126
+ var evalScope = outerScope.getEvalScope();
5127
+ for (var _i2 = 0; _i2 < partialSymbols.length; _i2++) {
5128
+ var _name = partialSymbols[_i2];
5129
+ var symbol = _i2 + 1;
5130
+ var value = evalScope[_name];
5131
+ if (value !== undefined) partialScope.bind(symbol, value);
5134
5132
  }
5135
5133
  partialScope.bindPartialMap(locals);
5136
5134
  vm.pushFrame();
@@ -10085,10 +10083,10 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
10085
10083
  this.isDestroyed = true;
10086
10084
  },
10087
10085
  reset: function (fullName) {
10088
- if (fullName !== undefined) {
10089
- resetMember(this, this.registry.normalize(fullName));
10090
- } else {
10086
+ if (fullName === undefined) {
10091
10087
  resetCache(this);
10088
+ } else {
10089
+ resetMember(this, this.registry.normalize(fullName));
10092
10090
  }
10093
10091
  },
10094
10092
  ownerInjection: function () {
@@ -10210,10 +10208,12 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
10210
10208
  }
10211
10209
  }
10212
10210
 
10213
- var cacheKey = container._resolverCacheKey(fullName, options);
10214
- var cached = container.cache[cacheKey];
10215
- if (cached !== undefined && options.singleton !== false) {
10216
- return cached;
10211
+ if (options.singleton !== false) {
10212
+ var cacheKey = container._resolverCacheKey(fullName, options);
10213
+ var cached = container.cache[cacheKey];
10214
+ if (cached !== undefined) {
10215
+ return cached;
10216
+ }
10217
10217
  }
10218
10218
 
10219
10219
  return instantiateFactory(container, fullName, options);
@@ -10254,11 +10254,10 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
10254
10254
  return;
10255
10255
  }
10256
10256
 
10257
- var cacheKey = container._resolverCacheKey(fullName, options);
10258
-
10259
10257
  // SomeClass { singleton: true, instantiate: true } | { singleton: true } | { instantiate: true } | {}
10260
10258
  // By default majority of objects fall into this case
10261
10259
  if (isSingletonInstance(container, fullName, options)) {
10260
+ var cacheKey = container._resolverCacheKey(fullName, options);
10262
10261
  return container.cache[cacheKey] = factoryManager.create();
10263
10262
  }
10264
10263
 
@@ -10275,16 +10274,9 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
10275
10274
  throw new Error('Could not create factory');
10276
10275
  }
10277
10276
 
10278
- function markInjectionsAsDynamic(injections) {
10279
- injections._dynamic = true;
10280
- }
10281
-
10282
- function areInjectionsNotDynamic(injections) {
10283
- return injections._dynamic !== true;
10284
- }
10285
-
10286
10277
  function buildInjections() /* container, ...injections */{
10287
10278
  var hash = {};
10279
+ var isDynamic = false;
10288
10280
 
10289
10281
  if (arguments.length > 1) {
10290
10282
  var container = arguments[0];
@@ -10301,21 +10293,16 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
10301
10293
  container.registry.validateInjections(injections);
10302
10294
  }
10303
10295
 
10304
- var markAsDynamic = false;
10305
10296
  for (var _i = 0; _i < injections.length; _i++) {
10306
10297
  injection = injections[_i];
10307
10298
  hash[injection.property] = lookup(container, injection.fullName);
10308
- if (!markAsDynamic) {
10309
- markAsDynamic = !isSingleton(container, injection.fullName);
10299
+ if (!isDynamic) {
10300
+ isDynamic = !isSingleton(container, injection.fullName);
10310
10301
  }
10311
10302
  }
10312
-
10313
- if (markAsDynamic) {
10314
- markInjectionsAsDynamic(hash);
10315
- }
10316
10303
  }
10317
10304
 
10318
- return hash;
10305
+ return { injections: hash, isDynamic: isDynamic };
10319
10306
  }
10320
10307
 
10321
10308
  function injectionsFor(container, fullName) {
@@ -10323,9 +10310,7 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
10323
10310
  var splitName = fullName.split(':');
10324
10311
  var type = splitName[0];
10325
10312
 
10326
- var injections = buildInjections(container, registry.getTypeInjections(type), registry.getInjections(fullName));
10327
-
10328
- return injections;
10313
+ return buildInjections(container, registry.getTypeInjections(type), registry.getInjections(fullName));
10329
10314
  }
10330
10315
 
10331
10316
  function destroyDestroyables(container) {
@@ -10336,7 +10321,7 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
10336
10321
  var key = keys[i];
10337
10322
  var value = cache[key];
10338
10323
 
10339
- if (isInstantiatable(container, key) && value.destroy) {
10324
+ if (value.destroy) {
10340
10325
  value.destroy();
10341
10326
  }
10342
10327
  }
@@ -10344,7 +10329,8 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
10344
10329
 
10345
10330
  function resetCache(container) {
10346
10331
  destroyDestroyables(container);
10347
- container.cache.dict = (0, _emberUtils.dictionary)(null);
10332
+ container.cache = (0, _emberUtils.dictionary)(null);
10333
+ container.factoryManagerCache = (0, _emberUtils.dictionary)(null);
10348
10334
  }
10349
10335
 
10350
10336
  function resetMember(container, fullName) {
@@ -10375,7 +10361,7 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
10375
10361
  }
10376
10362
 
10377
10363
  FactoryManager.prototype.toString = function toString() {
10378
- if (!this.madeToString) {
10364
+ if (this.madeToString === undefined) {
10379
10365
  this.madeToString = this.container.registry.makeToString(this.class, this.fullName);
10380
10366
  }
10381
10367
 
@@ -10385,14 +10371,19 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
10385
10371
  FactoryManager.prototype.create = function create() {
10386
10372
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10387
10373
 
10388
- var injections = this.injections;
10389
- if (injections === undefined) {
10390
- injections = injectionsFor(this.container, this.normalizedName);
10391
- if (areInjectionsNotDynamic(injections)) {
10374
+ var injectionsCache = this.injections;
10375
+ if (injectionsCache === undefined) {
10376
+ var _injectionsFor = injectionsFor(this.container, this.normalizedName),
10377
+ injections = _injectionsFor.injections,
10378
+ isDynamic = _injectionsFor.isDynamic;
10379
+
10380
+ injectionsCache = injections;
10381
+ if (!isDynamic) {
10392
10382
  this.injections = injections;
10393
10383
  }
10394
10384
  }
10395
- var props = (0, _emberUtils.assign)({}, injections, options);
10385
+
10386
+ var props = (0, _emberUtils.assign)({}, injectionsCache, options);
10396
10387
 
10397
10388
  if (true) {
10398
10389
  var lazyInjections = void 0;
@@ -10677,10 +10668,7 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
10677
10668
 
10678
10669
  var injections = this._typeInjections[type] || (this._typeInjections[type] = []);
10679
10670
 
10680
- injections.push({
10681
- property: property,
10682
- fullName: fullName
10683
- });
10671
+ injections.push({ property: property, fullName: fullName });
10684
10672
  },
10685
10673
  injection: function (fullName, property, injectionName) {
10686
10674
  this.validateFullName(injectionName);
@@ -10696,10 +10684,7 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
10696
10684
 
10697
10685
  var injections = this._injections[normalizedName] || (this._injections[normalizedName] = []);
10698
10686
 
10699
- injections.push({
10700
- property: property,
10701
- fullName: normalizedInjectionName
10702
- });
10687
+ injections.push({ property: property, fullName: normalizedInjectionName });
10703
10688
  },
10704
10689
  knownForType: function (type) {
10705
10690
  var fallbackKnown = void 0,
@@ -10736,23 +10721,6 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
10736
10721
  isValidFullName: function (fullName) {
10737
10722
  return VALID_FULL_NAME_REGEXP.test(fullName);
10738
10723
  },
10739
- normalizeInjectionsHash: function (hash) {
10740
- var injections = [];
10741
-
10742
- for (var key in hash) {
10743
- if (hash.hasOwnProperty(key)) {
10744
- (true && !(this.validateFullName(hash[key])) && (0, _emberDebug.assert)('Expected a proper full name, given \'' + hash[key] + '\'', this.validateFullName(hash[key])));
10745
-
10746
-
10747
- injections.push({
10748
- property: key,
10749
- fullName: hash[key]
10750
- });
10751
- }
10752
- }
10753
-
10754
- return injections;
10755
- },
10756
10724
  getInjections: function (fullName) {
10757
10725
  var injections = this._injections[fullName] || [];
10758
10726
  if (this.fallback) {
@@ -10773,6 +10741,23 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
10773
10741
  }
10774
10742
 
10775
10743
  return options && options.source ? options.source + ':' + name : name;
10744
+ },
10745
+ expandLocalLookup: function (fullName, options) {
10746
+ if (this.resolver && this.resolver.expandLocalLookup) {
10747
+ (true && !(this.validateFullName(fullName)) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName)));
10748
+ (true && !(options && options.source) && (0, _emberDebug.assert)('options.source must be provided to expandLocalLookup', options && options.source));
10749
+ (true && !(this.validateFullName(options.source)) && (0, _emberDebug.assert)('options.source must be a proper full name', this.validateFullName(options.source)));
10750
+
10751
+
10752
+ var normalizedFullName = this.normalize(fullName);
10753
+ var normalizedSource = this.normalize(options.source);
10754
+
10755
+ return expandLocalLookup(this, normalizedFullName, normalizedSource);
10756
+ } else if (this.fallback) {
10757
+ return this.fallback.expandLocalLookup(fullName, options);
10758
+ } else {
10759
+ return null;
10760
+ }
10776
10761
  }
10777
10762
  };
10778
10763
 
@@ -10785,6 +10770,24 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
10785
10770
  }
10786
10771
 
10787
10772
  if (true) {
10773
+ Registry.prototype.normalizeInjectionsHash = function (hash) {
10774
+ var injections = [];
10775
+
10776
+ for (var key in hash) {
10777
+ if (hash.hasOwnProperty(key)) {
10778
+ (true && !(this.validateFullName(hash[key])) && (0, _emberDebug.assert)('Expected a proper full name, given \'' + hash[key] + '\'', this.validateFullName(hash[key])));
10779
+
10780
+
10781
+ injections.push({
10782
+ property: key,
10783
+ fullName: hash[key]
10784
+ });
10785
+ }
10786
+ }
10787
+
10788
+ return injections;
10789
+ };
10790
+
10788
10791
  Registry.prototype.validateInjections = function (injections) {
10789
10792
  if (!injections) {
10790
10793
  return;
@@ -10800,42 +10803,6 @@ enifed('container', ['exports', 'ember-babel', 'ember-utils', 'ember-debug', 'em
10800
10803
  };
10801
10804
  }
10802
10805
 
10803
- /**
10804
- Given a fullName and a source fullName returns the fully resolved
10805
- fullName. Used to allow for local lookup.
10806
-
10807
- ```javascript
10808
- let registry = new Registry();
10809
-
10810
- // the twitter factory is added to the module system
10811
- registry.expandLocalLookup('component:post-title', { source: 'template:post' }) // => component:post/post-title
10812
- ```
10813
-
10814
- @private
10815
- @method expandLocalLookup
10816
- @param {String} fullName
10817
- @param {Object} [options]
10818
- @param {String} [options.source] the fullname of the request source (used for local lookups)
10819
- @return {String} fullName
10820
- */
10821
- Registry.prototype.expandLocalLookup = function Registry_expandLocalLookup(fullName, options) {
10822
- if (this.resolver && this.resolver.expandLocalLookup) {
10823
- (true && !(this.validateFullName(fullName)) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName)));
10824
- (true && !(options && options.source) && (0, _emberDebug.assert)('options.source must be provided to expandLocalLookup', options && options.source));
10825
- (true && !(this.validateFullName(options.source)) && (0, _emberDebug.assert)('options.source must be a proper full name', this.validateFullName(options.source)));
10826
-
10827
-
10828
- var normalizedFullName = this.normalize(fullName);
10829
- var normalizedSource = this.normalize(options.source);
10830
-
10831
- return expandLocalLookup(this, normalizedFullName, normalizedSource);
10832
- } else if (this.fallback) {
10833
- return this.fallback.expandLocalLookup(fullName, options);
10834
- } else {
10835
- return null;
10836
- }
10837
- };
10838
-
10839
10806
  function expandLocalLookup(registry, normalizedName, normalizedSource) {
10840
10807
  var cache = registry._localLookupCache;
10841
10808
  var normalizedNameCache = cache[normalizedName];
@@ -11209,11 +11176,9 @@ enifed('ember-application/initializers/dom-templates', ['require', 'ember-glimme
11209
11176
  }
11210
11177
  });
11211
11178
  });
11212
- enifed('ember-application/system/application-instance', ['exports', 'ember-utils', 'ember-debug', 'ember-metal', 'ember-runtime', 'ember-environment', 'ember-views', 'ember-application/system/engine-instance'], function (exports, _emberUtils, _emberDebug, _emberMetal, _emberRuntime, _emberEnvironment, _emberViews, _engineInstance) {
11179
+ enifed('ember-application/system/application-instance', ['exports', 'ember-utils', 'ember-metal', 'ember-runtime', 'ember-environment', 'ember-views', 'ember-application/system/engine-instance'], function (exports, _emberUtils, _emberMetal, _emberRuntime, _emberEnvironment, _emberViews, _engineInstance) {
11213
11180
  'use strict';
11214
11181
 
11215
- var BootOptions = void 0;
11216
-
11217
11182
  /**
11218
11183
  The `ApplicationInstance` encapsulates all of the stateful aspects of a
11219
11184
  running `Application`.
@@ -11356,8 +11321,7 @@ enifed('ember-application/system/application-instance', ['exports', 'ember-utils
11356
11321
  return dispatcher;
11357
11322
  },
11358
11323
  getURL: function () {
11359
- var router = (0, _emberMetal.get)(this, 'router');
11360
- return (0, _emberMetal.get)(router, 'url');
11324
+ return (0, _emberMetal.get)(this, 'router.url');
11361
11325
  },
11362
11326
  visit: function (url) {
11363
11327
  var _this = this;
@@ -11443,7 +11407,7 @@ enifed('ember-application/system/application-instance', ['exports', 'ember-utils
11443
11407
  @namespace ApplicationInstance
11444
11408
  @public
11445
11409
  */
11446
- BootOptions = function BootOptions() {
11410
+ function BootOptions() {
11447
11411
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
11448
11412
 
11449
11413
  /**
@@ -11585,7 +11549,7 @@ enifed('ember-application/system/application-instance', ['exports', 'ember-utils
11585
11549
  if (options.isInteractive !== undefined) {
11586
11550
  this.isInteractive = !!options.isInteractive;
11587
11551
  }
11588
- };
11552
+ }
11589
11553
 
11590
11554
  BootOptions.prototype.toEnvironment = function () {
11591
11555
  var env = (0, _emberUtils.assign)({}, _emberEnvironment.environment);
@@ -11991,7 +11955,7 @@ enifed('ember-application/system/application', ['exports', 'ember-babel', 'ember
11991
11955
  // boot promise exists for book-keeping purposes: if anything went wrong in
11992
11956
  // the boot process, we need to store the error as a rejection on the boot
11993
11957
  // promise so that a future caller of `boot()` can tell what failed.
11994
- var defer = this._bootResolver = new _emberRuntime.RSVP.defer();
11958
+ var defer = this._bootResolver = _emberRuntime.RSVP.defer();
11995
11959
  this._bootPromise = defer.promise;
11996
11960
 
11997
11961
  try {
@@ -16776,7 +16740,7 @@ enifed('ember-glimmer/components/link-to', ['exports', 'ember-console', 'ember-d
16776
16740
  }
16777
16741
  }),
16778
16742
 
16779
- _computeActive: function (routerState) {
16743
+ _isActive: function (routerState) {
16780
16744
  if ((0, _emberMetal.get)(this, 'loading')) {
16781
16745
  return false;
16782
16746
  }
@@ -16796,7 +16760,7 @@ enifed('ember-glimmer/components/link-to', ['exports', 'ember-console', 'ember-d
16796
16760
 
16797
16761
  for (var i = 0; i < currentWhen.length; i++) {
16798
16762
  if (routing.isActiveForRoute(models, resolvedQueryParams, currentWhen[i], routerState, isCurrentWhenSpecified)) {
16799
- return (0, _emberMetal.get)(this, 'activeClass');
16763
+ return true;
16800
16764
  }
16801
16765
  }
16802
16766
 
@@ -16815,13 +16779,21 @@ enifed('ember-glimmer/components/link-to', ['exports', 'ember-console', 'ember-d
16815
16779
  @property active
16816
16780
  @private
16817
16781
  */
16818
- active: (0, _emberMetal.computed)('attrs.params', '_routing.currentState', function computeLinkToComponentActive() {
16782
+ active: (0, _emberMetal.computed)('attrs.params', '_active', function computeLinkToComponentActiveClass() {
16819
16783
  var currentState = (0, _emberMetal.get)(this, '_routing.currentState');
16820
16784
  if (!currentState) {
16821
16785
  return false;
16822
16786
  }
16823
16787
 
16824
- return this._computeActive(currentState);
16788
+ return this.get('_active') ? (0, _emberMetal.get)(this, 'activeClass') : false;
16789
+ }),
16790
+
16791
+ _active: (0, _emberMetal.computed)('_routing.currentState', function computeLinkToComponentActive() {
16792
+ var currentState = (0, _emberMetal.get)(this, '_routing.currentState');
16793
+ if (!currentState) {
16794
+ return false;
16795
+ }
16796
+ return this._isActive(currentState);
16825
16797
  }),
16826
16798
 
16827
16799
  willBeActive: (0, _emberMetal.computed)('_routing.targetState', function computeLinkToComponentWillBeActive() {
@@ -16831,11 +16803,11 @@ enifed('ember-glimmer/components/link-to', ['exports', 'ember-console', 'ember-d
16831
16803
  return;
16832
16804
  }
16833
16805
 
16834
- return !!this._computeActive(targetState);
16806
+ return this._isActive(targetState);
16835
16807
  }),
16836
16808
 
16837
16809
  transitioningIn: (0, _emberMetal.computed)('active', 'willBeActive', function computeLinkToComponentTransitioningIn() {
16838
- if ((0, _emberMetal.get)(this, 'willBeActive') === true && !(0, _emberMetal.get)(this, 'active')) {
16810
+ if ((0, _emberMetal.get)(this, 'willBeActive') === true && !(0, _emberMetal.get)(this, '_active')) {
16839
16811
  return 'ember-transitioning-in';
16840
16812
  } else {
16841
16813
  return false;
@@ -16843,7 +16815,7 @@ enifed('ember-glimmer/components/link-to', ['exports', 'ember-console', 'ember-d
16843
16815
  }),
16844
16816
 
16845
16817
  transitioningOut: (0, _emberMetal.computed)('active', 'willBeActive', function computeLinkToComponentTransitioningOut() {
16846
- if ((0, _emberMetal.get)(this, 'willBeActive') === false && (0, _emberMetal.get)(this, 'active')) {
16818
+ if ((0, _emberMetal.get)(this, 'willBeActive') === false && (0, _emberMetal.get)(this, '_active')) {
16847
16819
  return 'ember-transitioning-out';
16848
16820
  } else {
16849
16821
  return false;
@@ -18573,15 +18545,6 @@ enifed('ember-glimmer/helpers/component', ['exports', 'ember-babel', 'ember-util
18573
18545
  return new _curly.CurlyComponentDefinition(definition.name, definition.ComponentClass, definition.template, curriedArgs);
18574
18546
  }
18575
18547
 
18576
- var EMPTY_BLOCKS = {
18577
- default: null,
18578
- inverse: null
18579
- };
18580
-
18581
- if (true) {
18582
- EMPTY_BLOCKS = Object.freeze(EMPTY_BLOCKS);
18583
- }
18584
-
18585
18548
  function curryArgs(definition, newArgs) {
18586
18549
  var args = definition.args,
18587
18550
  ComponentClass = definition.ComponentClass;
@@ -18794,7 +18757,7 @@ enifed('ember-glimmer/helpers/each-in', ['exports', 'ember-utils'], function (ex
18794
18757
  return ref && ref[EACH_IN_REFERENCE];
18795
18758
  }
18796
18759
  });
18797
- enifed('ember-glimmer/helpers/get', ['exports', 'ember-babel', 'ember-metal', 'ember-glimmer/utils/references', '@glimmer/reference'], function (exports, _emberBabel, _emberMetal, _references, _reference) {
18760
+ enifed('ember-glimmer/helpers/get', ['exports', 'ember-babel', 'ember-metal', 'ember-glimmer/utils/references', '@glimmer/reference', '@glimmer/runtime'], function (exports, _emberBabel, _emberMetal, _references, _reference, _runtime) {
18798
18761
  'use strict';
18799
18762
 
18800
18763
  exports.default = function (vm, args) {
@@ -18822,7 +18785,7 @@ enifed('ember-glimmer/helpers/get', ['exports', 'ember-babel', 'ember-metal', 'e
18822
18785
  _this.pathReference = pathReference;
18823
18786
 
18824
18787
  _this.lastPath = null;
18825
- _this.innerReference = null;
18788
+ _this.innerReference = _runtime.NULL_REFERENCE;
18826
18789
 
18827
18790
  var innerTag = _this.innerTag = new _reference.UpdatableTag(_reference.CONSTANT_TAG);
18828
18791
 
@@ -18843,19 +18806,21 @@ enifed('ember-glimmer/helpers/get', ['exports', 'ember-babel', 'ember-metal', 'e
18843
18806
  var pathType = typeof path;
18844
18807
 
18845
18808
  if (pathType === 'string') {
18846
- innerReference = this.innerReference = (0, _reference.referenceFromParts)(this.sourceReference, path.split('.'));
18809
+ innerReference = (0, _reference.referenceFromParts)(this.sourceReference, path.split('.'));
18847
18810
  } else if (pathType === 'number') {
18848
- innerReference = this.innerReference = this.sourceReference.get('' + path);
18811
+ innerReference = this.sourceReference.get('' + path);
18849
18812
  }
18850
18813
 
18851
18814
  innerTag.update(innerReference.tag);
18852
18815
  } else {
18853
- innerReference = this.innerReference = null;
18816
+ innerReference = _runtime.NULL_REFERENCE;
18854
18817
  innerTag.update(_reference.CONSTANT_TAG);
18855
18818
  }
18819
+
18820
+ this.innerReference = innerReference;
18856
18821
  }
18857
18822
 
18858
- return innerReference ? innerReference.value() : null;
18823
+ return innerReference.value();
18859
18824
  };
18860
18825
 
18861
18826
  GetHelperReference.prototype[_references.UPDATE] = function (value) {
@@ -20158,9 +20123,6 @@ enifed('ember-glimmer/renderer', ['exports', 'ember-babel', 'ember-glimmer/utils
20158
20123
  } finally {
20159
20124
  if (!completedWithoutError) {
20160
20125
  this._lastRevision = _reference.CURRENT_TAG.value();
20161
- if (this._env.inTransaction === true) {
20162
- this._env.commit();
20163
- }
20164
20126
  }
20165
20127
  this._isRenderingRoots = false;
20166
20128
  }
@@ -20487,8 +20449,8 @@ enifed('ember-glimmer/syntax/input', ['exports', 'ember-debug', 'ember-glimmer/u
20487
20449
  /**
20488
20450
  @module ember
20489
20451
  */
20490
- function buildTextFieldSyntax(params, hash, builder) {
20491
- var definition = builder.env.getComponentDefinition('-text-field', builder.meta.templateMeta);
20452
+ function buildSyntax(type, params, hash, builder) {
20453
+ var definition = builder.env.getComponentDefinition(type, builder.meta.templateMeta);
20492
20454
  builder.component.static(definition, [params, (0, _utils.hashToArgs)(hash), null, null]);
20493
20455
  return true;
20494
20456
  }
@@ -20648,25 +20610,17 @@ enifed('ember-glimmer/syntax/input', ['exports', 'ember-debug', 'ember-glimmer/u
20648
20610
 
20649
20611
  if (typeIndex > -1) {
20650
20612
  var typeArg = values[typeIndex];
20651
- if (!Array.isArray(typeArg)) {
20652
- if (typeArg === 'checkbox') {
20653
- (true && !(valueIndex === -1) && (0, _emberDebug.assert)('{{input type=\'checkbox\'}} does not support setting `value=someBooleanValue`; ' + 'you must use `checked=someBooleanValue` instead.', valueIndex === -1));
20654
-
20655
-
20656
- (0, _bindings.wrapComponentClassAttribute)(hash);
20613
+ if (Array.isArray(typeArg)) {
20614
+ return (0, _dynamicComponent.dynamicComponentMacro)(params, hash, null, null, builder);
20615
+ } else if (typeArg === 'checkbox') {
20616
+ (true && !(valueIndex === -1) && (0, _emberDebug.assert)('{{input type=\'checkbox\'}} does not support setting `value=someBooleanValue`; ' + 'you must use `checked=someBooleanValue` instead.', valueIndex === -1));
20657
20617
 
20658
- var definition = builder.env.getComponentDefinition('-checkbox', builder.meta.templateMeta);
20659
- builder.component.static(definition, [params, (0, _utils.hashToArgs)(hash), null, null]);
20660
- return true;
20661
- } else {
20662
- return buildTextFieldSyntax(params, hash, builder);
20663
- }
20618
+ (0, _bindings.wrapComponentClassAttribute)(hash);
20619
+ return buildSyntax('-checkbox', params, hash, builder);
20664
20620
  }
20665
- } else {
20666
- return buildTextFieldSyntax(params, hash, builder);
20667
20621
  }
20668
20622
 
20669
- return (0, _dynamicComponent.dynamicComponentMacro)(params, hash, null, null, builder);
20623
+ return buildSyntax('-text-field', params, hash, builder);
20670
20624
  }
20671
20625
  });
20672
20626
  enifed('ember-glimmer/syntax/mount', ['exports', 'ember-babel', 'ember-debug', 'ember/features', 'ember-glimmer/syntax/utils', 'ember-glimmer/component-managers/mount'], function (exports, _emberBabel, _emberDebug, _features, _utils, _mount) {
@@ -21657,7 +21611,6 @@ enifed('ember-glimmer/utils/iterable', ['exports', 'ember-babel', 'ember-utils',
21657
21611
  var _this2 = (0, _emberBabel.possibleConstructorReturn)(this, _ArrayIterator2.call(this, values, keyFor));
21658
21612
 
21659
21613
  _this2.keys = keys;
21660
- _this2.length = keys.length;
21661
21614
  return _this2;
21662
21615
  }
21663
21616
 
@@ -21665,10 +21618,6 @@ enifed('ember-glimmer/utils/iterable', ['exports', 'ember-babel', 'ember-utils',
21665
21618
  return this.keys[position];
21666
21619
  };
21667
21620
 
21668
- ObjectKeysIterator.prototype.getValue = function getValue(position) {
21669
- return this.array[position];
21670
- };
21671
-
21672
21621
  return ObjectKeysIterator;
21673
21622
  }(ArrayIterator);
21674
21623
 
@@ -21718,7 +21667,7 @@ enifed('ember-glimmer/utils/iterable', ['exports', 'ember-babel', 'ember-utils',
21718
21667
 
21719
21668
  var typeofIterable = typeof iterable;
21720
21669
 
21721
- if (iterable && (typeofIterable === 'object' || typeofIterable === 'function')) {
21670
+ if (iterable !== null && (typeofIterable === 'object' || typeofIterable === 'function')) {
21722
21671
  var keys = Object.keys(iterable);
21723
21672
  var values = keys.map(function (key) {
21724
21673
  return iterable[key];
@@ -21770,7 +21719,7 @@ enifed('ember-glimmer/utils/iterable', ['exports', 'ember-babel', 'ember-utils',
21770
21719
 
21771
21720
  valueTag.update((0, _emberMetal.tagForProperty)(iterable, '[]'));
21772
21721
 
21773
- if (!iterable || typeof iterable !== 'object') {
21722
+ if (iterable === null || typeof iterable !== 'object') {
21774
21723
  return EMPTY_ITERATOR;
21775
21724
  }
21776
21725
 
@@ -22228,12 +22177,12 @@ enifed('ember-glimmer/utils/references', ['exports', 'ember-babel', 'ember-utils
22228
22177
  maybeFreeze(namedValue);
22229
22178
  }
22230
22179
 
22231
- var _result = helper(positionalValue, namedValue);
22180
+ var result = helper(positionalValue, namedValue);
22232
22181
 
22233
- if (typeof _result === 'object' && _result !== null || typeof _result === 'function') {
22234
- return new RootReference(_result);
22182
+ if (typeof result === 'object' && result !== null || typeof result === 'function') {
22183
+ return new RootReference(result);
22235
22184
  } else {
22236
- return _runtime.PrimitiveReference.create(_result);
22185
+ return _runtime.PrimitiveReference.create(result);
22237
22186
  }
22238
22187
  } else {
22239
22188
  return new SimpleHelperReference(helper, args);
@@ -22346,7 +22295,7 @@ enifed('ember-glimmer/utils/references', ['exports', 'ember-babel', 'ember-utils
22346
22295
  }
22347
22296
 
22348
22297
  UnboundReference.create = function create(value) {
22349
- if (typeof value === 'object' && value !== null || typeof result === 'function') {
22298
+ if (typeof value === 'object' && value !== null) {
22350
22299
  return new UnboundReference(value);
22351
22300
  } else {
22352
22301
  return _runtime.PrimitiveReference.create(value);
@@ -23017,7 +22966,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
23017
22966
  */
23018
22967
  function watchedEvents(obj) {
23019
22968
  var meta$$1 = exports.peekMeta(obj);
23020
- return meta$$1 && meta$$1.watchedEvents() || [];
22969
+ return meta$$1 !== undefined ? meta$$1.watchedEvents() : [];
23021
22970
  }
23022
22971
 
23023
22972
  /**
@@ -23039,7 +22988,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
23039
22988
  */
23040
22989
  function sendEvent(obj, eventName, params, actions, _meta) {
23041
22990
  if (actions === undefined) {
23042
- var meta$$1 = _meta || exports.peekMeta(obj);
22991
+ var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;
23043
22992
  actions = typeof meta$$1 === 'object' && meta$$1 !== null && meta$$1.matchingListeners(eventName);
23044
22993
  }
23045
22994
 
@@ -23110,9 +23059,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
23110
23059
  function listenersFor(obj, eventName) {
23111
23060
  var ret = [];
23112
23061
  var meta$$1 = exports.peekMeta(obj);
23113
- var actions = meta$$1 && meta$$1.matchingListeners(eventName);
23062
+ var actions = meta$$1 !== undefined ? meta$$1.matchingListeners(eventName) : undefined;
23114
23063
 
23115
- if (!actions) {
23064
+ if (actions === undefined) {
23116
23065
  return ret;
23117
23066
  }
23118
23067
 
@@ -23190,7 +23139,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
23190
23139
  return _glimmer_reference.CONSTANT_TAG;
23191
23140
  }
23192
23141
 
23193
- var meta$$1 = _meta || meta(object);
23142
+ var meta$$1 = _meta === undefined ? meta(object) : _meta;
23194
23143
  if (meta$$1.isProxy()) {
23195
23144
  return tagFor(object, meta$$1);
23196
23145
  }
@@ -23206,7 +23155,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
23206
23155
 
23207
23156
  function tagFor(object, _meta) {
23208
23157
  if (typeof object === 'object' && object !== null) {
23209
- var meta$$1 = _meta || meta(object);
23158
+ var meta$$1 = _meta === undefined ? meta(object) : _meta;
23210
23159
  return meta$$1.writableTag(makeTag);
23211
23160
  } else {
23212
23161
  return _glimmer_reference.CONSTANT_TAG;
@@ -23337,14 +23286,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
23337
23286
  {
23338
23287
  debugStack = context$$1.env.debugStack;
23339
23288
  }
23340
-
23341
- try {
23342
- context$$1[methodName]();
23343
- } finally {
23344
- inTransaction = false;
23345
- counter++;
23346
- }
23347
-
23289
+ context$$1[methodName]();
23290
+ inTransaction = false;
23291
+ counter++;
23348
23292
  return shouldReflush;
23349
23293
  };
23350
23294
 
@@ -23445,12 +23389,12 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
23445
23389
  @private
23446
23390
  */
23447
23391
  function propertyWillChange(obj, keyName, _meta) {
23448
- var meta$$1 = _meta || exports.peekMeta(obj);
23449
- if (meta$$1 && !meta$$1.isInitialized(obj)) {
23392
+ var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;
23393
+ if (meta$$1 !== undefined && !meta$$1.isInitialized(obj)) {
23450
23394
  return;
23451
23395
  }
23452
23396
 
23453
- var watching = meta$$1 && meta$$1.peekWatching(keyName) > 0;
23397
+ var watching = meta$$1 !== undefined && meta$$1.peekWatching(keyName) > 0;
23454
23398
  var possibleDesc = obj[keyName];
23455
23399
  var isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;
23456
23400
 
@@ -23483,8 +23427,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
23483
23427
  @private
23484
23428
  */
23485
23429
  function propertyDidChange(obj, keyName, _meta) {
23486
- var meta$$1 = _meta || exports.peekMeta(obj);
23487
- var hasMeta = !!meta$$1;
23430
+ var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;
23431
+ var hasMeta = meta$$1 !== undefined;
23488
23432
 
23489
23433
  if (hasMeta && !meta$$1.isInitialized(obj)) {
23490
23434
  return;
@@ -23962,30 +23906,30 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
23962
23906
 
23963
23907
  var handleMandatorySetter = void 0;
23964
23908
 
23965
- function watchKey(obj, keyName, meta$$1) {
23909
+ function watchKey(obj, keyName, _meta) {
23966
23910
  if (typeof obj !== 'object' || obj === null) {
23967
23911
  return;
23968
23912
  }
23969
23913
 
23970
- var m = meta$$1 || meta(obj);
23971
- var count = m.peekWatching(keyName) || 0;
23972
- m.writeWatching(keyName, count + 1);
23914
+ var meta$$1 = _meta === undefined ? meta(obj) : _meta;
23915
+ var count = meta$$1.peekWatching(keyName) || 0;
23916
+ meta$$1.writeWatching(keyName, count + 1);
23973
23917
 
23974
23918
  if (count === 0) {
23975
23919
  // activate watching first time
23976
23920
  var possibleDesc = obj[keyName];
23977
23921
  var isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;
23978
23922
  if (isDescriptor && possibleDesc.willWatch) {
23979
- possibleDesc.willWatch(obj, keyName);
23923
+ possibleDesc.willWatch(obj, keyName, meta$$1);
23980
23924
  }
23981
23925
 
23982
- if ('function' === typeof obj.willWatchProperty) {
23926
+ if (typeof obj.willWatchProperty === 'function') {
23983
23927
  obj.willWatchProperty(keyName);
23984
23928
  }
23985
23929
 
23986
23930
  if (ember_features.MANDATORY_SETTER) {
23987
23931
  // NOTE: this is dropped for prod + minified builds
23988
- handleMandatorySetter(m, obj, keyName);
23932
+ handleMandatorySetter(meta$$1, obj, keyName);
23989
23933
  }
23990
23934
  }
23991
23935
  }
@@ -23994,7 +23938,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
23994
23938
  var _hasOwnProperty = function (obj, key) {
23995
23939
  return Object.prototype.hasOwnProperty.call(obj, key);
23996
23940
  };
23997
-
23998
23941
  var _propertyIsEnumerable = function (obj, key) {
23999
23942
  return Object.prototype.propertyIsEnumerable.call(obj, key);
24000
23943
  };
@@ -24040,7 +23983,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
24040
23983
  if (typeof obj !== 'object' || obj === null) {
24041
23984
  return;
24042
23985
  }
24043
- var meta$$1 = _meta || exports.peekMeta(obj);
23986
+ var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;
24044
23987
 
24045
23988
  // do nothing of this object has already been destroyed
24046
23989
  if (meta$$1 === undefined || meta$$1.isSourceDestroyed()) {
@@ -24055,10 +23998,10 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
24055
23998
  var isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;
24056
23999
 
24057
24000
  if (isDescriptor && possibleDesc.didUnwatch) {
24058
- possibleDesc.didUnwatch(obj, keyName);
24001
+ possibleDesc.didUnwatch(obj, keyName, meta$$1);
24059
24002
  }
24060
24003
 
24061
- if ('function' === typeof obj.didUnwatchProperty) {
24004
+ if (typeof obj.didUnwatchProperty === 'function') {
24062
24005
  obj.didUnwatchProperty(keyName);
24063
24006
  }
24064
24007
 
@@ -24106,7 +24049,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
24106
24049
  if (typeof obj !== 'object' || obj === null) {
24107
24050
  return;
24108
24051
  }
24109
- var m = meta$$1 || meta(obj);
24052
+ var m = meta$$1 === undefined ? meta(obj) : meta$$1;
24110
24053
  var counter = m.peekWatching(keyPath) || 0;
24111
24054
 
24112
24055
  m.writeWatching(keyPath, counter + 1);
@@ -24120,7 +24063,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
24120
24063
  if (typeof obj !== 'object' || obj === null) {
24121
24064
  return;
24122
24065
  }
24123
- var m = meta$$1 || exports.peekMeta(obj);
24066
+ var m = meta$$1 === undefined ? exports.peekMeta(obj) : meta$$1;
24067
+
24124
24068
  if (m === undefined) {
24125
24069
  return;
24126
24070
  }
@@ -25061,6 +25005,16 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25061
25005
  };
25062
25006
  }
25063
25007
 
25008
+ /**
25009
+ Tears down the meta on an object so that it can be garbage collected.
25010
+ Multiple calls will have no effect.
25011
+
25012
+ @method deleteMeta
25013
+ @for Ember
25014
+ @param {Object} obj the object to destroy
25015
+ @return {void}
25016
+ @private
25017
+ */
25064
25018
  function deleteMeta(obj) {
25065
25019
  {
25066
25020
  counters.deleteCalls++;
@@ -25404,7 +25358,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25404
25358
 
25405
25359
  if (ember_features.MANDATORY_SETTER) {
25406
25360
  var setWithMandatorySetter = function (meta$$1, obj, keyName, value) {
25407
- if (meta$$1 && meta$$1.peekWatching(keyName) > 0) {
25361
+ if (meta$$1 !== undefined && meta$$1.peekWatching(keyName) > 0) {
25408
25362
  makeEnumerable(obj, keyName);
25409
25363
  meta$$1.writeValue(obj, keyName, value);
25410
25364
  } else {
@@ -25559,7 +25513,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25559
25513
 
25560
25514
  function watcherCount(obj, key) {
25561
25515
  var meta$$1 = exports.peekMeta(obj);
25562
- return meta$$1 && meta$$1.peekWatching(key) || 0;
25516
+ return meta$$1 !== undefined && meta$$1.peekWatching(key) || 0;
25563
25517
  }
25564
25518
 
25565
25519
  function unwatch(obj, _keyPath, m) {
@@ -26167,8 +26121,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26167
26121
  */
26168
26122
  function cacheFor(obj, key) {
26169
26123
  var meta$$1 = exports.peekMeta(obj);
26170
- var cache = meta$$1 && meta$$1.source === obj && meta$$1.readableCache();
26171
- var ret = cache && cache[key];
26124
+ var cache = meta$$1 !== undefined ? meta$$1.source === obj && meta$$1.readableCache() : undefined;
26125
+ var ret = cache !== undefined ? cache[key] : undefined;
26172
26126
 
26173
26127
  if (ret === UNDEFINED) {
26174
26128
  return undefined;
@@ -26226,17 +26180,17 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26226
26180
  };
26227
26181
 
26228
26182
  AliasedProperty.prototype.teardown = function teardown(obj, keyName, meta$$1) {
26229
- if (meta$$1 && meta$$1.peekWatching(keyName)) {
26183
+ if (meta$$1.peekWatching(keyName)) {
26230
26184
  removeDependentKeys(this, obj, keyName, meta$$1);
26231
26185
  }
26232
26186
  };
26233
26187
 
26234
- AliasedProperty.prototype.willWatch = function willWatch(obj, keyName) {
26235
- addDependentKeys(this, obj, keyName, meta(obj));
26188
+ AliasedProperty.prototype.willWatch = function willWatch(obj, keyName, meta$$1) {
26189
+ addDependentKeys(this, obj, keyName, meta$$1);
26236
26190
  };
26237
26191
 
26238
- AliasedProperty.prototype.didUnwatch = function didUnwatch(obj, keyName) {
26239
- removeDependentKeys(this, obj, keyName, meta(obj));
26192
+ AliasedProperty.prototype.didUnwatch = function didUnwatch(obj, keyName, meta$$1) {
26193
+ removeDependentKeys(this, obj, keyName, meta$$1);
26240
26194
  };
26241
26195
 
26242
26196
  AliasedProperty.prototype.get = function get$$1(obj, keyName) {
@@ -26304,7 +26258,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26304
26258
  @public
26305
26259
  */
26306
26260
  function merge(original, updates) {
26307
- if (!updates || typeof updates !== 'object') {
26261
+ if (updates === null || typeof updates !== 'object') {
26308
26262
  return original;
26309
26263
  }
26310
26264
 
@@ -27800,13 +27754,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
27800
27754
  Map is mocked out to look like an Ember object, so you can do
27801
27755
  `EmberMap.create()` for symmetry with other Ember classes.
27802
27756
  */
27803
- function missingFunction(fn) {
27804
- throw new TypeError(Object.prototype.toString.call(fn) + ' is not a function');
27805
- }
27806
-
27807
- function missingNew(name) {
27808
- throw new TypeError('Constructor ' + name + ' requires \'new\'');
27809
- }
27810
27757
 
27811
27758
  function copyNull(obj) {
27812
27759
  var output = Object.create(null);
@@ -27840,37 +27787,36 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
27840
27787
  @constructor
27841
27788
  @private
27842
27789
  */
27843
- function OrderedSet() {
27844
- if (this instanceof OrderedSet) {
27790
+
27791
+ var OrderedSet = function () {
27792
+ function OrderedSet() {
27793
+ emberBabel.classCallCheck(this, OrderedSet);
27794
+
27845
27795
  this.clear();
27846
- } else {
27847
- missingNew('OrderedSet');
27848
27796
  }
27849
- }
27850
27797
 
27851
- /**
27852
- @method create
27853
- @static
27854
- @return {Ember.OrderedSet}
27855
- @private
27856
- */
27857
- OrderedSet.create = function () {
27858
- var Constructor = this;
27798
+ /**
27799
+ @method create
27800
+ @static
27801
+ @return {Ember.OrderedSet}
27802
+ @private
27803
+ */
27859
27804
 
27860
- return new Constructor();
27861
- };
27805
+ OrderedSet.create = function create() {
27806
+ var Constructor = this;
27807
+ return new Constructor();
27808
+ };
27862
27809
 
27863
- OrderedSet.prototype = {
27864
- constructor: OrderedSet,
27865
27810
  /**
27866
27811
  @method clear
27867
27812
  @private
27868
27813
  */
27869
- clear: function () {
27814
+
27815
+ OrderedSet.prototype.clear = function clear() {
27870
27816
  this.presenceSet = Object.create(null);
27871
27817
  this.list = [];
27872
27818
  this.size = 0;
27873
- },
27819
+ };
27874
27820
 
27875
27821
  /**
27876
27822
  @method add
@@ -27879,7 +27825,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
27879
27825
  @return {Ember.OrderedSet}
27880
27826
  @private
27881
27827
  */
27882
- add: function (obj, _guid) {
27828
+
27829
+ OrderedSet.prototype.add = function add(obj, _guid) {
27883
27830
  var guid = _guid || emberUtils.guidFor(obj);
27884
27831
  var presenceSet = this.presenceSet;
27885
27832
  var list = this.list;
@@ -27890,7 +27837,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
27890
27837
  }
27891
27838
 
27892
27839
  return this;
27893
- },
27840
+ };
27894
27841
 
27895
27842
  /**
27896
27843
  @since 1.8.0
@@ -27900,7 +27847,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
27900
27847
  @return {Boolean}
27901
27848
  @private
27902
27849
  */
27903
- delete: function (obj, _guid) {
27850
+
27851
+ OrderedSet.prototype.delete = function _delete(obj, _guid) {
27904
27852
  var guid = _guid || emberUtils.guidFor(obj);
27905
27853
  var presenceSet = this.presenceSet;
27906
27854
  var list = this.list;
@@ -27916,16 +27864,17 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
27916
27864
  } else {
27917
27865
  return false;
27918
27866
  }
27919
- },
27867
+ };
27920
27868
 
27921
27869
  /**
27922
27870
  @method isEmpty
27923
27871
  @return {Boolean}
27924
27872
  @private
27925
27873
  */
27926
- isEmpty: function () {
27874
+
27875
+ OrderedSet.prototype.isEmpty = function isEmpty() {
27927
27876
  return this.size === 0;
27928
- },
27877
+ };
27929
27878
 
27930
27879
  /**
27931
27880
  @method has
@@ -27933,7 +27882,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
27933
27882
  @return {Boolean}
27934
27883
  @private
27935
27884
  */
27936
- has: function (obj) {
27885
+
27886
+ OrderedSet.prototype.has = function has(obj) {
27937
27887
  if (this.size === 0) {
27938
27888
  return false;
27939
27889
  }
@@ -27942,7 +27892,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
27942
27892
  var presenceSet = this.presenceSet;
27943
27893
 
27944
27894
  return presenceSet[guid] === true;
27945
- },
27895
+ };
27946
27896
 
27947
27897
  /**
27948
27898
  @method forEach
@@ -27950,10 +27900,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
27950
27900
  @param self
27951
27901
  @private
27952
27902
  */
27953
- forEach: function (fn /*, ...thisArg*/) {
27954
- if (typeof fn !== 'function') {
27955
- missingFunction(fn);
27956
- }
27903
+
27904
+ OrderedSet.prototype.forEach = function forEach(fn /*, ...thisArg*/) {
27905
+ true && !(typeof fn === 'function') && emberDebug.assert(Object.prototype.toString.call(fn) + ' is not a function', typeof fn === 'function');
27957
27906
 
27958
27907
  if (this.size === 0) {
27959
27908
  return;
@@ -27970,23 +27919,25 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
27970
27919
  fn(list[_i]);
27971
27920
  }
27972
27921
  }
27973
- },
27922
+ };
27974
27923
 
27975
27924
  /**
27976
27925
  @method toArray
27977
27926
  @return {Array}
27978
27927
  @private
27979
27928
  */
27980
- toArray: function () {
27929
+
27930
+ OrderedSet.prototype.toArray = function toArray() {
27981
27931
  return this.list.slice();
27982
- },
27932
+ };
27983
27933
 
27984
27934
  /**
27985
27935
  @method copy
27986
27936
  @return {Ember.OrderedSet}
27987
27937
  @private
27988
27938
  */
27989
- copy: function () {
27939
+
27940
+ OrderedSet.prototype.copy = function copy() {
27990
27941
  var Constructor = this.constructor;
27991
27942
  var set = new Constructor();
27992
27943
 
@@ -27995,8 +27946,10 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
27995
27946
  set.size = this.size;
27996
27947
 
27997
27948
  return set;
27998
- }
27999
- };
27949
+ };
27950
+
27951
+ return OrderedSet;
27952
+ }();
28000
27953
 
28001
27954
  /**
28002
27955
  A Map stores values indexed by keys. Unlike JavaScript's
@@ -28018,38 +27971,26 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28018
27971
  @private
28019
27972
  @constructor
28020
27973
  */
28021
- function Map() {
28022
- if (this instanceof Map) {
28023
- this._keys = OrderedSet.create();
27974
+
27975
+ var Map = function () {
27976
+ function Map() {
27977
+ emberBabel.classCallCheck(this, Map);
27978
+
27979
+ this._keys = new OrderedSet();
28024
27980
  this._values = Object.create(null);
28025
27981
  this.size = 0;
28026
- } else {
28027
- missingNew('Map');
28028
27982
  }
28029
- }
28030
-
28031
- /**
28032
- @method create
28033
- @static
28034
- @private
28035
- */
28036
- Map.create = function () {
28037
- var Constructor = this;
28038
- return new Constructor();
28039
- };
28040
-
28041
- Map.prototype = {
28042
- constructor: Map,
28043
27983
 
28044
27984
  /**
28045
- This property will change as the number of objects in the map changes.
28046
- @since 1.8.0
28047
- @property size
28048
- @type number
28049
- @default 0
27985
+ @method create
27986
+ @static
28050
27987
  @private
28051
27988
  */
28052
- size: 0,
27989
+
27990
+ Map.create = function create() {
27991
+ var Constructor = this;
27992
+ return new Constructor();
27993
+ };
28053
27994
 
28054
27995
  /**
28055
27996
  Retrieve the value associated with a given key.
@@ -28058,7 +27999,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28058
27999
  @return {*} the value associated with the key, or `undefined`
28059
28000
  @private
28060
28001
  */
28061
- get: function (key) {
28002
+
28003
+ Map.prototype.get = function get(key) {
28062
28004
  if (this.size === 0) {
28063
28005
  return;
28064
28006
  }
@@ -28067,7 +28009,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28067
28009
  var guid = emberUtils.guidFor(key);
28068
28010
 
28069
28011
  return values[guid];
28070
- },
28012
+ };
28071
28013
 
28072
28014
  /**
28073
28015
  Adds a value to the map. If a value for the given key has already been
@@ -28078,7 +28020,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28078
28020
  @return {Ember.Map}
28079
28021
  @private
28080
28022
  */
28081
- set: function (key, value) {
28023
+
28024
+ Map.prototype.set = function set(key, value) {
28082
28025
  var keys = this._keys;
28083
28026
  var values = this._values;
28084
28027
  var guid = emberUtils.guidFor(key);
@@ -28093,7 +28036,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28093
28036
  this.size = keys.size;
28094
28037
 
28095
28038
  return this;
28096
- },
28039
+ };
28097
28040
 
28098
28041
  /**
28099
28042
  Removes a value from the map for an associated key.
@@ -28103,7 +28046,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28103
28046
  @return {Boolean} true if an item was removed, false otherwise
28104
28047
  @private
28105
28048
  */
28106
- delete: function (key) {
28049
+
28050
+ Map.prototype.delete = function _delete(key) {
28107
28051
  if (this.size === 0) {
28108
28052
  return false;
28109
28053
  }
@@ -28120,7 +28064,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28120
28064
  } else {
28121
28065
  return false;
28122
28066
  }
28123
- },
28067
+ };
28124
28068
 
28125
28069
  /**
28126
28070
  Check whether a key is present.
@@ -28129,9 +28073,10 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28129
28073
  @return {Boolean} true if the item was present, false otherwise
28130
28074
  @private
28131
28075
  */
28132
- has: function (key) {
28076
+
28077
+ Map.prototype.has = function has(key) {
28133
28078
  return this._keys.has(key);
28134
- },
28079
+ };
28135
28080
 
28136
28081
  /**
28137
28082
  Iterate over all the keys and values. Calls the function once
@@ -28144,10 +28089,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28144
28089
  callback. By default, `this` is the map.
28145
28090
  @private
28146
28091
  */
28147
- forEach: function (callback /*, ...thisArg*/) {
28148
- if (typeof callback !== 'function') {
28149
- missingFunction(callback);
28150
- }
28092
+
28093
+ Map.prototype.forEach = function forEach(callback /*, ...thisArg*/) {
28094
+ true && !(typeof callback === 'function') && emberDebug.assert(Object.prototype.toString.call(callback) + ' is not a function', typeof callback === 'function');
28151
28095
 
28152
28096
  if (this.size === 0) {
28153
28097
  return;
@@ -28169,27 +28113,31 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28169
28113
  }
28170
28114
 
28171
28115
  this._keys.forEach(cb);
28172
- },
28116
+ };
28173
28117
 
28174
28118
  /**
28175
28119
  @method clear
28176
28120
  @private
28177
28121
  */
28178
- clear: function () {
28122
+
28123
+ Map.prototype.clear = function clear() {
28179
28124
  this._keys.clear();
28180
28125
  this._values = Object.create(null);
28181
28126
  this.size = 0;
28182
- },
28127
+ };
28183
28128
 
28184
28129
  /**
28185
28130
  @method copy
28186
28131
  @return {Ember.Map}
28187
28132
  @private
28188
28133
  */
28189
- copy: function () {
28134
+
28135
+ Map.prototype.copy = function copy() {
28190
28136
  return copyMap(this, new Map());
28191
- }
28192
- };
28137
+ };
28138
+
28139
+ return Map;
28140
+ }();
28193
28141
 
28194
28142
  /**
28195
28143
  @class MapWithDefault
@@ -28200,64 +28148,72 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28200
28148
  @param [options]
28201
28149
  @param {*} [options.defaultValue]
28202
28150
  */
28203
- function MapWithDefault(options) {
28204
- this._super$constructor();
28205
- this.defaultValue = options.defaultValue;
28206
- }
28207
28151
 
28208
- /**
28209
- @method create
28210
- @static
28211
- @param [options]
28212
- @param {*} [options.defaultValue]
28213
- @return {Ember.MapWithDefault|Ember.Map} If options are passed, returns
28214
- `MapWithDefault` otherwise returns `EmberMap`
28215
- @private
28216
- */
28217
- MapWithDefault.create = function (options) {
28218
- if (options) {
28219
- return new MapWithDefault(options);
28220
- } else {
28221
- return new Map();
28222
- }
28223
- };
28152
+ var MapWithDefault = function (_Map) {
28153
+ emberBabel.inherits(MapWithDefault, _Map);
28224
28154
 
28225
- MapWithDefault.prototype = Object.create(Map.prototype);
28226
- MapWithDefault.prototype.constructor = MapWithDefault;
28227
- MapWithDefault.prototype._super$constructor = Map;
28228
- MapWithDefault.prototype._super$get = Map.prototype.get;
28155
+ function MapWithDefault(options) {
28156
+ emberBabel.classCallCheck(this, MapWithDefault);
28229
28157
 
28230
- /**
28231
- Retrieve the value associated with a given key.
28232
-
28233
- @method get
28234
- @param {*} key
28235
- @return {*} the value associated with the key, or the default value
28236
- @private
28237
- */
28238
- MapWithDefault.prototype.get = function (key) {
28239
- var hasValue = this.has(key);
28158
+ var _this = emberBabel.possibleConstructorReturn(this, _Map.call(this));
28240
28159
 
28241
- if (hasValue) {
28242
- return this._super$get(key);
28243
- } else {
28244
- var defaultValue = this.defaultValue(key);
28245
- this.set(key, defaultValue);
28246
- return defaultValue;
28160
+ _this.defaultValue = options.defaultValue;
28161
+ return _this;
28247
28162
  }
28248
- };
28249
28163
 
28250
- /**
28251
- @method copy
28252
- @return {Ember.MapWithDefault}
28253
- @private
28254
- */
28255
- MapWithDefault.prototype.copy = function () {
28256
- var Constructor = this.constructor;
28257
- return copyMap(this, new Constructor({
28258
- defaultValue: this.defaultValue
28259
- }));
28260
- };
28164
+ /**
28165
+ @method create
28166
+ @static
28167
+ @param [options]
28168
+ @param {*} [options.defaultValue]
28169
+ @return {Ember.MapWithDefault|Ember.Map} If options are passed, returns
28170
+ `MapWithDefault` otherwise returns `EmberMap`
28171
+ @private
28172
+ */
28173
+
28174
+ MapWithDefault.create = function create(options) {
28175
+ if (options) {
28176
+ return new MapWithDefault(options);
28177
+ } else {
28178
+ return new Map();
28179
+ }
28180
+ };
28181
+
28182
+ /**
28183
+ Retrieve the value associated with a given key.
28184
+ @method get
28185
+ @param {*} key
28186
+ @return {*} the value associated with the key, or the default value
28187
+ @private
28188
+ */
28189
+
28190
+ MapWithDefault.prototype.get = function get(key) {
28191
+ var hasValue = this.has(key);
28192
+
28193
+ if (hasValue) {
28194
+ return _Map.prototype.get.call(this, key);
28195
+ } else {
28196
+ var defaultValue = this.defaultValue(key);
28197
+ this.set(key, defaultValue);
28198
+ return defaultValue;
28199
+ }
28200
+ };
28201
+
28202
+ /**
28203
+ @method copy
28204
+ @return {Ember.MapWithDefault}
28205
+ @private
28206
+ */
28207
+
28208
+ MapWithDefault.prototype.copy = function copy() {
28209
+ var Constructor = this.constructor;
28210
+ return copyMap(this, new Constructor({
28211
+ defaultValue: this.defaultValue
28212
+ }));
28213
+ };
28214
+
28215
+ return MapWithDefault;
28216
+ }(Map);
28261
28217
 
28262
28218
  /**
28263
28219
  @module @ember/object
@@ -28333,7 +28289,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28333
28289
  @public
28334
28290
  */
28335
28291
  function setProperties(obj, properties) {
28336
- if (!properties || typeof properties !== 'object') {
28292
+ if (properties === null || typeof properties !== 'object') {
28337
28293
  return properties;
28338
28294
  }
28339
28295
  changeProperties(function () {
@@ -29058,12 +29014,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
29058
29014
  function applyMergedProperties(obj, key, value, values) {
29059
29015
  var baseValue = values[key] || obj[key];
29060
29016
 
29061
- {
29062
- if (isArray(value)) {
29063
- // use conditional to avoid stringifying every time
29064
- true && !false && emberDebug.assert('You passed in `' + JSON.stringify(value) + '` as the value for `' + key + '` but `' + key + '` cannot be an Array', false);
29065
- }
29066
- }
29017
+ true && !!isArray(value) && emberDebug.assert('You passed in `' + JSON.stringify(value) + '` as the value for `' + key + '` but `' + key + '` cannot be an Array', !isArray(value));
29067
29018
 
29068
29019
  if (!baseValue) {
29069
29020
  return value;
@@ -29201,7 +29152,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
29201
29152
  }
29202
29153
 
29203
29154
  function finishPartial(obj, meta$$1) {
29204
- connectBindings(obj, meta$$1 || meta(obj));
29155
+ connectBindings(obj, meta$$1 === undefined ? meta(obj) : meta$$1);
29205
29156
  return obj;
29206
29157
  }
29207
29158
 
@@ -29486,74 +29437,117 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
29486
29437
  return ret;
29487
29438
  };
29488
29439
 
29489
- return Mixin;
29490
- }();
29440
+ /**
29441
+ @method reopen
29442
+ @param arguments*
29443
+ @private
29444
+ */
29491
29445
 
29492
- Mixin._apply = applyMixin;
29446
+ Mixin.prototype.reopen = function reopen() {
29447
+ var currentMixin = void 0;
29493
29448
 
29494
- Mixin.finishPartial = finishPartial;
29449
+ if (this.properties) {
29450
+ currentMixin = new Mixin(undefined, this.properties);
29451
+ this.properties = undefined;
29452
+ this.mixins = [currentMixin];
29453
+ } else if (!this.mixins) {
29454
+ this.mixins = [];
29455
+ }
29495
29456
 
29496
- var unprocessedFlag = false;
29457
+ var mixins = this.mixins;
29458
+ var idx = void 0;
29497
29459
 
29498
- function hasUnprocessedMixins() {
29499
- return unprocessedFlag;
29500
- }
29460
+ for (idx = 0; idx < arguments.length; idx++) {
29461
+ currentMixin = arguments[idx];
29462
+ 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]');
29501
29463
 
29502
- function clearUnprocessedMixins() {
29503
- unprocessedFlag = false;
29504
- }
29464
+ if (currentMixin instanceof Mixin) {
29465
+ mixins.push(currentMixin);
29466
+ } else {
29467
+ mixins.push(new Mixin(undefined, currentMixin));
29468
+ }
29469
+ }
29505
29470
 
29506
- var MixinPrototype = Mixin.prototype;
29471
+ return this;
29472
+ };
29507
29473
 
29508
- /**
29509
- @method reopen
29510
- @param arguments*
29511
- @private
29512
- */
29513
- MixinPrototype.reopen = function () {
29514
- var currentMixin = void 0;
29474
+ /**
29475
+ @method apply
29476
+ @param obj
29477
+ @return applied object
29478
+ @private
29479
+ */
29515
29480
 
29516
- if (this.properties) {
29517
- currentMixin = new Mixin(undefined, this.properties);
29518
- this.properties = undefined;
29519
- this.mixins = [currentMixin];
29520
- } else if (!this.mixins) {
29521
- this.mixins = [];
29522
- }
29481
+ Mixin.prototype.apply = function apply(obj) {
29482
+ return applyMixin(obj, [this], false);
29483
+ };
29523
29484
 
29524
- var mixins = this.mixins;
29525
- var idx = void 0;
29485
+ Mixin.prototype.applyPartial = function applyPartial(obj) {
29486
+ return applyMixin(obj, [this], true);
29487
+ };
29526
29488
 
29527
- for (idx = 0; idx < arguments.length; idx++) {
29528
- currentMixin = arguments[idx];
29529
- 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]');
29489
+ /**
29490
+ @method detect
29491
+ @param obj
29492
+ @return {Boolean}
29493
+ @private
29494
+ */
29530
29495
 
29531
- if (currentMixin instanceof Mixin) {
29532
- mixins.push(currentMixin);
29533
- } else {
29534
- mixins.push(new Mixin(undefined, currentMixin));
29496
+ Mixin.prototype.detect = function detect(obj) {
29497
+ if (typeof obj !== 'object' || obj === null) {
29498
+ return false;
29535
29499
  }
29536
- }
29500
+ if (obj instanceof Mixin) {
29501
+ return _detect(obj, this, {});
29502
+ }
29503
+ var meta$$1 = exports.peekMeta(obj);
29504
+ if (meta$$1 === undefined) {
29505
+ return false;
29506
+ }
29507
+ return !!meta$$1.peekMixins(emberUtils.guidFor(this));
29508
+ };
29537
29509
 
29538
- return this;
29539
- };
29510
+ Mixin.prototype.without = function without() {
29511
+ var ret = new Mixin([this]);
29540
29512
 
29541
- /**
29542
- @method apply
29543
- @param obj
29544
- @return applied object
29545
- @private
29546
- */
29547
- MixinPrototype.apply = function (obj) {
29548
- return applyMixin(obj, [this], false);
29549
- };
29513
+ for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
29514
+ args[_key4] = arguments[_key4];
29515
+ }
29550
29516
 
29551
- MixinPrototype.applyPartial = function (obj) {
29552
- return applyMixin(obj, [this], true);
29553
- };
29517
+ ret._without = args;
29518
+ return ret;
29519
+ };
29520
+
29521
+ Mixin.prototype.keys = function keys() {
29522
+ var keys = {};
29523
+ var seen = {};
29524
+
29525
+ _keys(keys, this, seen);
29526
+ var ret = Object.keys(keys);
29527
+ return ret;
29528
+ };
29554
29529
 
29530
+ return Mixin;
29531
+ }();
29532
+
29533
+ Mixin._apply = applyMixin;
29534
+ Mixin.finishPartial = finishPartial;
29535
+
29536
+ var MixinPrototype = Mixin.prototype;
29555
29537
  MixinPrototype.toString = Object.toString;
29556
29538
 
29539
+ emberDebug.debugSeal(MixinPrototype);
29540
+
29541
+ var unprocessedFlag = false;
29542
+
29543
+ function hasUnprocessedMixins() {
29544
+ return unprocessedFlag;
29545
+ }
29546
+
29547
+ function clearUnprocessedMixins() {
29548
+ unprocessedFlag = false;
29549
+ }
29550
+
29557
29551
  function _detect(curMixin, targetMixin, seen) {
29558
29552
  var guid = emberUtils.guidFor(curMixin);
29559
29553
 
@@ -29575,37 +29569,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
29575
29569
  return false;
29576
29570
  }
29577
29571
 
29578
- /**
29579
- @method detect
29580
- @param obj
29581
- @return {Boolean}
29582
- @private
29583
- */
29584
- MixinPrototype.detect = function (obj) {
29585
- if (typeof obj !== 'object' || obj === null) {
29586
- return false;
29587
- }
29588
- if (obj instanceof Mixin) {
29589
- return _detect(obj, this, {});
29590
- }
29591
- var meta$$1 = exports.peekMeta(obj);
29592
- if (meta$$1 === undefined) {
29593
- return false;
29594
- }
29595
- return !!meta$$1.peekMixins(emberUtils.guidFor(this));
29596
- };
29597
-
29598
- MixinPrototype.without = function () {
29599
- var ret = new Mixin([this]);
29600
-
29601
- for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
29602
- args[_key4] = arguments[_key4];
29603
- }
29604
-
29605
- ret._without = args;
29606
- return ret;
29607
- };
29608
-
29609
29572
  function _keys(ret, mixin, seen) {
29610
29573
  if (seen[emberUtils.guidFor(mixin)]) {
29611
29574
  return;
@@ -29625,17 +29588,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
29625
29588
  }
29626
29589
  }
29627
29590
 
29628
- MixinPrototype.keys = function () {
29629
- var keys = {};
29630
- var seen = {};
29631
-
29632
- _keys(keys, this, seen);
29633
- var ret = Object.keys(keys);
29634
- return ret;
29635
- };
29636
-
29637
- emberDebug.debugSeal(MixinPrototype);
29638
-
29639
29591
  var REQUIRED = new Descriptor();
29640
29592
  REQUIRED.toString = function () {
29641
29593
  return '(Required Property)';
@@ -29988,6 +29940,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
29988
29940
  exports.getDispatchOverride = getDispatchOverride;
29989
29941
  exports.META_DESC = META_DESC;
29990
29942
  exports.meta = meta;
29943
+ exports.deleteMeta = deleteMeta;
29991
29944
  exports.Cache = Cache;
29992
29945
  exports._getPath = _getPath;
29993
29946
  exports.get = get;
@@ -30028,7 +29981,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
30028
29981
  exports.removeChainWatcher = removeChainWatcher;
30029
29982
  exports.watchPath = watchPath;
30030
29983
  exports.unwatchPath = unwatchPath;
30031
- exports.destroy = deleteMeta;
30032
29984
  exports.isWatching = isWatching;
30033
29985
  exports.unwatch = unwatch;
30034
29986
  exports.watch = watch;
@@ -32590,20 +32542,17 @@ enifed('ember-routing/system/route', ['exports', 'ember-utils', 'ember-metal', '
32590
32542
  // Update the model dep values used to calculate cache keys.
32591
32543
  (0, _utils.stashParamNames)(this.router, transition.state.handlerInfos);
32592
32544
 
32545
+ var cache = this._bucketCache;
32593
32546
  var params = transition.params;
32594
32547
  var allParams = queryParams.propertyNames;
32595
- var cache = this._bucketCache;
32596
32548
 
32597
32549
  allParams.forEach(function (prop) {
32598
32550
  var aQp = queryParams.map[prop];
32599
-
32600
32551
  aQp.values = params;
32601
- var cacheKey = (0, _utils.calculateCacheKey)(aQp.route.fullRouteName, aQp.parts, aQp.values);
32602
32552
 
32603
- if (cache) {
32604
- var value = cache.lookup(cacheKey, prop, aQp.undecoratedDefaultValue);
32605
- (0, _emberMetal.set)(controller, prop, value);
32606
- }
32553
+ var cacheKey = (0, _utils.calculateCacheKey)(aQp.route.fullRouteName, aQp.parts, aQp.values);
32554
+ var value = cache.lookup(cacheKey, prop, aQp.undecoratedDefaultValue);
32555
+ (0, _emberMetal.set)(controller, prop, value);
32607
32556
  });
32608
32557
 
32609
32558
  var qpValues = getQueryParamsFor(this, transition.state);
@@ -32621,13 +32570,10 @@ enifed('ember-routing/system/route', ['exports', 'ember-utils', 'ember-metal', '
32621
32570
  return;
32622
32571
  }
32623
32572
 
32624
- var cacheKey = (0, _utils.calculateCacheKey)(qp.route.fullRouteName, qp.parts, qp.values);
32625
-
32626
32573
  // Update model-dep cache
32627
32574
  var cache = this._bucketCache;
32628
- if (cache) {
32629
- cache.stash(cacheKey, prop, value);
32630
- }
32575
+ var cacheKey = (0, _utils.calculateCacheKey)(qp.route.fullRouteName, qp.parts, qp.values);
32576
+ cache.stash(cacheKey, prop, value);
32631
32577
  },
32632
32578
 
32633
32579
 
@@ -33244,7 +33190,7 @@ enifed('ember-routing/system/router', ['exports', 'ember-utils', 'ember-console'
33244
33190
 
33245
33191
  _initRouterJs: function () {
33246
33192
  var routerMicrolib = this._routerMicrolib = new _router.default();
33247
- routerMicrolib.triggerEvent = triggerEvent;
33193
+ routerMicrolib.triggerEvent = triggerEvent.bind(this);
33248
33194
 
33249
33195
  routerMicrolib._triggerWillChangeContext = K;
33250
33196
  routerMicrolib._triggerWillLeave = K;
@@ -34013,22 +33959,24 @@ enifed('ember-routing/system/router', ['exports', 'ember-utils', 'ember-console'
34013
33959
  @param {Function} callback
34014
33960
  @return {Void}
34015
33961
  */
34016
- function forEachRouteAbove(originRoute, handlerInfos, callback) {
34017
- var originRouteFound = false;
33962
+ function forEachRouteAbove(handlerInfos, callback) {
34018
33963
 
34019
33964
  for (var i = handlerInfos.length - 1; i >= 0; --i) {
34020
33965
  var handlerInfo = handlerInfos[i];
34021
33966
  var route = handlerInfo.handler;
34022
33967
 
34023
- if (originRoute === route) {
34024
- originRouteFound = true;
34025
- }
34026
-
34027
- if (!originRouteFound) {
33968
+ // handlerInfo.handler being `undefined` generally means either:
33969
+ //
33970
+ // 1. an error occurred during creation of the route in question
33971
+ // 2. the route is across an async boundary (e.g. within an engine)
33972
+ //
33973
+ // In both of these cases, we cannot invoke the callback on that specific
33974
+ // route, because it just doesn't exist...
33975
+ if (route === undefined) {
34028
33976
  continue;
34029
33977
  }
34030
33978
 
34031
- if (callback(route) !== true) {
33979
+ if (callback(route, handlerInfo) !== true) {
34032
33980
  return;
34033
33981
  }
34034
33982
  }
@@ -34037,18 +33985,19 @@ enifed('ember-routing/system/router', ['exports', 'ember-utils', 'ember-console'
34037
33985
  // These get invoked when an action bubbles above ApplicationRoute
34038
33986
  // and are not meant to be overridable.
34039
33987
  var defaultActionHandlers = {
34040
- willResolveModel: function (transition, originRoute) {
34041
- originRoute.router._scheduleLoadingEvent(transition, originRoute);
33988
+ willResolveModel: function (handlerInfos, transition, originRoute) {
33989
+ this._scheduleLoadingEvent(transition, originRoute);
34042
33990
  },
34043
- error: function (error, transition, originRoute) {
34044
- var handlerInfos = transition.state.handlerInfos;
34045
- var router = originRoute.router;
33991
+ error: function (handlerInfos, error, transition) {
33992
+ var router = this;
34046
33993
 
34047
- forEachRouteAbove(originRoute, handlerInfos, function (route) {
34048
- // Check for the existence of an 'error' route.
34049
- // We don't check for an 'error' route on the originRoute, since that would
33994
+ var handlerInfoWithError = handlerInfos[handlerInfos.length - 1];
33995
+
33996
+ forEachRouteAbove(handlerInfos, function (route, handlerInfo) {
33997
+ // We don't check the leaf most handlerInfo since that would
34050
33998
  // technically be below where we're at in the route hierarchy.
34051
- if (originRoute !== route) {
33999
+ if (handlerInfo !== handlerInfoWithError) {
34000
+ // Check for the existence of an 'error' route.
34052
34001
  var errorRouteName = findRouteStateName(route, 'error');
34053
34002
  if (errorRouteName) {
34054
34003
  var _errorId = (0, _emberUtils.guidFor)(error);
@@ -34072,15 +34021,16 @@ enifed('ember-routing/system/router', ['exports', 'ember-utils', 'ember-console'
34072
34021
 
34073
34022
  logError(error, 'Error while processing route: ' + transition.targetName);
34074
34023
  },
34075
- loading: function (transition, originRoute) {
34076
- var handlerInfos = transition.state.handlerInfos;
34077
- var router = originRoute.router;
34024
+ loading: function (handlerInfos, transition, originRoute) {
34025
+ var router = this;
34078
34026
 
34079
- forEachRouteAbove(originRoute, handlerInfos, function (route) {
34080
- // Check for the existence of a 'loading' route.
34081
- // We don't check for a 'loading' route on the originRoute, since that would
34027
+ var handlerInfoWithSlowLoading = handlerInfos[handlerInfos.length - 1];
34028
+
34029
+ forEachRouteAbove(handlerInfos, function (route, handlerInfo) {
34030
+ // We don't check the leaf most handlerInfo since that would
34082
34031
  // technically be below where we're at in the route hierarchy.
34083
- if (originRoute !== route) {
34032
+ if (handlerInfo !== handlerInfoWithSlowLoading) {
34033
+ // Check for the existence of a 'loading' route.
34084
34034
  var loadingRouteName = findRouteStateName(route, 'loading');
34085
34035
  if (loadingRouteName) {
34086
34036
  router.intermediateTransitionTo(loadingRouteName);
@@ -34227,7 +34177,7 @@ enifed('ember-routing/system/router', ['exports', 'ember-utils', 'ember-console'
34227
34177
 
34228
34178
  var defaultHandler = defaultActionHandlers[name];
34229
34179
  if (defaultHandler) {
34230
- defaultHandler.apply(null, args);
34180
+ defaultHandler.apply(this, [handlerInfos].concat(args));
34231
34181
  return;
34232
34182
  }
34233
34183
 
@@ -34980,8 +34930,10 @@ enifed('ember-runtime/computed/computed_macros', ['exports', 'ember-metal', 'emb
34980
34930
  @static
34981
34931
  @for @ember/object/computed
34982
34932
  @param {String} dependentKey
34983
- @return {ComputedProperty} computed property which negate
34984
- the original value for property
34933
+ @return {ComputedProperty} computed property which returns true if
34934
+ the value of the dependent property is null, an empty string, empty array,
34935
+ or empty function and false if the underlying value is not empty.
34936
+
34985
34937
  @public
34986
34938
  */
34987
34939
  function empty(dependentKey) {
@@ -38069,9 +38021,8 @@ enifed('ember-runtime/mixins/array', ['exports', 'ember-utils', 'ember-metal', '
38069
38021
  arrayWillChange: function (content, idx, removedCnt, addedCnt) {
38070
38022
  var keys = this._keys;
38071
38023
  var lim = removedCnt > 0 ? idx + removedCnt : -1;
38072
- var meta = void 0;
38024
+ var meta = (0, _emberMetal.peekMeta)(this);
38073
38025
  for (var key in keys) {
38074
- meta = meta || (0, _emberMetal.peekMeta)(this);
38075
38026
  if (lim > 0) {
38076
38027
  removeObserverForContentKey(content, key, this, idx, lim);
38077
38028
  }
@@ -38081,9 +38032,8 @@ enifed('ember-runtime/mixins/array', ['exports', 'ember-utils', 'ember-metal', '
38081
38032
  arrayDidChange: function (content, idx, removedCnt, addedCnt) {
38082
38033
  var keys = this._keys;
38083
38034
  var lim = addedCnt > 0 ? idx + addedCnt : -1;
38084
- var meta = void 0;
38035
+ var meta = (0, _emberMetal.peekMeta)(this);
38085
38036
  for (var key in keys) {
38086
- meta = meta || (0, _emberMetal.peekMeta)(this);
38087
38037
  if (lim > 0) {
38088
38038
  addObserverForContentKey(content, key, this, idx, lim);
38089
38039
  }
@@ -41133,7 +41083,7 @@ enifed('ember-runtime/system/core_object', ['exports', 'ember-babel', 'ember-uti
41133
41083
  if (m.isSourceDestroyed()) {
41134
41084
  return;
41135
41085
  }
41136
- (0, _emberMetal.destroy)(this);
41086
+ (0, _emberMetal.deleteMeta)(this);
41137
41087
  m.setSourceDestroyed();
41138
41088
  }, _Mixin$create.bind = function (to, from) {
41139
41089
  if (!(from instanceof _emberMetal.Binding)) {
@@ -41263,31 +41213,29 @@ enifed('ember-runtime/system/core_object', ['exports', 'ember-babel', 'ember-uti
41263
41213
  @method _onLookup
41264
41214
  */
41265
41215
  ClassMixinProps._onLookup = injectedPropertyAssertion;
41266
- }
41267
-
41268
- /**
41269
- Returns a hash of property names and container names that injected
41270
- properties will lookup on the container lazily.
41271
-
41272
- @method _lazyInjections
41273
- @return {Object} Hash of all lazy injected property keys to container names
41274
- @private
41275
- */
41276
- ClassMixinProps._lazyInjections = function () {
41277
- var injections = {};
41278
- var proto = this.proto();
41279
- var key = void 0;
41280
- var desc = void 0;
41216
+ /**
41217
+ Returns a hash of property names and container names that injected
41218
+ properties will lookup on the container lazily.
41219
+ @method _lazyInjections
41220
+ @return {Object} Hash of all lazy injected property keys to container names
41221
+ @private
41222
+ */
41223
+ ClassMixinProps._lazyInjections = function () {
41224
+ var injections = {};
41225
+ var proto = this.proto();
41226
+ var key = void 0;
41227
+ var desc = void 0;
41281
41228
 
41282
- for (key in proto) {
41283
- desc = proto[key];
41284
- if (desc instanceof _emberMetal.InjectedProperty) {
41285
- injections[key] = desc.type + ':' + (desc.name || key);
41229
+ for (key in proto) {
41230
+ desc = proto[key];
41231
+ if (desc instanceof _emberMetal.InjectedProperty) {
41232
+ injections[key] = desc.type + ':' + (desc.name || key);
41233
+ }
41286
41234
  }
41287
- }
41288
41235
 
41289
- return injections;
41290
- };
41236
+ return injections;
41237
+ };
41238
+ }
41291
41239
 
41292
41240
  var ClassMixin = _emberMetal.Mixin.create(ClassMixinProps);
41293
41241
 
@@ -41602,7 +41550,7 @@ enifed('ember-runtime/system/namespace', ['exports', 'ember-utils', 'ember-metal
41602
41550
 
41603
41551
  exports.default = Namespace;
41604
41552
  });
41605
- enifed('ember-runtime/system/native_array', ['exports', 'ember-metal', 'ember-environment', 'ember-runtime/mixins/array', 'ember-runtime/mixins/mutable_array', 'ember-runtime/mixins/observable', 'ember-runtime/mixins/copyable', 'ember-runtime/mixins/freezable', 'ember-runtime/copy'], function (exports, _emberMetal, _emberEnvironment, _array, _mutable_array, _observable, _copyable, _freezable, _copy) {
41553
+ enifed('ember-runtime/system/native_array', ['exports', 'ember-metal', 'ember-environment', 'ember-runtime/mixins/array', 'ember-runtime/mixins/mutable_array', 'ember-runtime/mixins/observable', 'ember-runtime/mixins/copyable', 'ember-debug', 'ember-runtime/mixins/freezable', 'ember-runtime/copy'], function (exports, _emberMetal, _emberEnvironment, _array, _mutable_array, _observable, _copyable, _emberDebug, _freezable, _copy) {
41606
41554
  'use strict';
41607
41555
 
41608
41556
  exports.NativeArray = exports.A = undefined;
@@ -41638,9 +41586,8 @@ enifed('ember-runtime/system/native_array', ['exports', 'ember-metal', 'ember-en
41638
41586
  return this[idx];
41639
41587
  },
41640
41588
  replace: function (idx, amt, objects) {
41641
- if (this.isFrozen) {
41642
- throw _freezable.FROZEN_ERROR;
41643
- }
41589
+ (true && !(!this.isFrozen) && (0, _emberDebug.assert)(_freezable.FROZEN_ERROR, !this.isFrozen));
41590
+
41644
41591
 
41645
41592
  // if we replaced exactly the same number of items, then pass only the
41646
41593
  // replaced range. Otherwise, pass the full remaining array length
@@ -43581,7 +43528,7 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
43581
43528
 
43582
43529
  exports.default = compileOptions;
43583
43530
  exports.registerPlugin = registerPlugin;
43584
- exports.unregisterPlugin = unregisterPlugin;
43531
+ exports.removePlugin = removePlugin;
43585
43532
 
43586
43533
 
43587
43534
  var USER_PLUGINS = [];
@@ -43599,73 +43546,51 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
43599
43546
  options.plugins = { ast: [].concat(USER_PLUGINS, _plugins.default) };
43600
43547
  } else {
43601
43548
  var potententialPugins = [].concat(USER_PLUGINS, _plugins.default);
43602
- var providedPlugins = options.plugins.ast.map(function (plugin) {
43603
- return wrapLegacyPluginIfNeeded(plugin);
43604
- });
43605
43549
  var pluginsToAdd = potententialPugins.filter(function (plugin) {
43606
43550
  return options.plugins.ast.indexOf(plugin) === -1;
43607
43551
  });
43608
- options.plugins.ast = providedPlugins.concat(pluginsToAdd);
43552
+ options.plugins.ast = options.plugins.ast.slice().concat(pluginsToAdd);
43609
43553
  }
43610
43554
 
43611
43555
  return options;
43612
43556
  }
43613
43557
 
43614
- function wrapLegacyPluginIfNeeded(_plugin) {
43615
- var plugin = _plugin;
43558
+ function registerPlugin(type, _plugin) {
43559
+ if (type !== 'ast') {
43560
+ throw new Error('Attempting to register ' + _plugin + ' as "' + type + '" which is not a valid Glimmer plugin type.');
43561
+ }
43562
+
43563
+ var plugin = void 0;
43616
43564
  if (_plugin.prototype && _plugin.prototype.transform) {
43617
43565
  plugin = function (env) {
43618
- var pluginInstantiated = false;
43619
-
43620
43566
  return {
43621
43567
  name: _plugin.constructor && _plugin.constructor.name,
43622
43568
 
43623
43569
  visitors: {
43624
43570
  Program: function (node) {
43625
- if (!pluginInstantiated) {
43626
-
43627
- pluginInstantiated = true;
43628
- var _plugin2 = new _plugin(env);
43571
+ var plugin = new _plugin(env);
43629
43572
 
43630
- _plugin2.syntax = env.syntax;
43573
+ plugin.syntax = env.syntax;
43631
43574
 
43632
- return _plugin2.transform(node);
43633
- }
43575
+ return plugin.transform(node);
43634
43576
  }
43635
43577
  }
43636
43578
  };
43637
43579
  };
43638
-
43639
- plugin.__raw = _plugin;
43640
- }
43641
-
43642
- return plugin;
43643
- }
43644
-
43645
- function registerPlugin(type, _plugin) {
43646
- if (type !== 'ast') {
43647
- throw new Error('Attempting to register ' + _plugin + ' as "' + type + '" which is not a valid Glimmer plugin type.');
43648
- }
43649
-
43650
- for (var i = 0; i < USER_PLUGINS.length; i++) {
43651
- var PLUGIN = USER_PLUGINS[i];
43652
- if (PLUGIN === _plugin || PLUGIN.__raw === _plugin) {
43653
- return;
43654
- }
43580
+ } else {
43581
+ plugin = _plugin;
43655
43582
  }
43656
43583
 
43657
- var plugin = wrapLegacyPluginIfNeeded(_plugin);
43658
-
43659
43584
  USER_PLUGINS = [plugin].concat(USER_PLUGINS);
43660
43585
  }
43661
43586
 
43662
- function unregisterPlugin(type, PluginClass) {
43587
+ function removePlugin(type, PluginClass) {
43663
43588
  if (type !== 'ast') {
43664
43589
  throw new Error('Attempting to unregister ' + PluginClass + ' as "' + type + '" which is not a valid Glimmer plugin type.');
43665
43590
  }
43666
43591
 
43667
43592
  USER_PLUGINS = USER_PLUGINS.filter(function (plugin) {
43668
- return plugin !== PluginClass && plugin.__raw !== PluginClass;
43593
+ return plugin !== PluginClass;
43669
43594
  });
43670
43595
  }
43671
43596
  });
@@ -45901,7 +45826,7 @@ enifed('ember-utils', ['exports'], function (exports) {
45901
45826
  @private
45902
45827
  */
45903
45828
  function canInvoke(obj, methodName) {
45904
- return !!(obj && typeof obj[methodName] === 'function');
45829
+ return obj !== null && obj !== undefined && typeof obj[methodName] === 'function';
45905
45830
  }
45906
45831
 
45907
45832
  /**
@@ -48032,7 +47957,7 @@ enifed('ember/index', ['exports', 'require', 'ember-environment', 'node-module',
48032
47957
  _emberMetal.default.watch = _emberMetal.watch;
48033
47958
  _emberMetal.default.isWatching = _emberMetal.isWatching;
48034
47959
  _emberMetal.default.unwatch = _emberMetal.unwatch;
48035
- _emberMetal.default.destroy = _emberMetal.destroy;
47960
+ _emberMetal.default.destroy = _emberMetal.deleteMeta;
48036
47961
  _emberMetal.default.libraries = _emberMetal.libraries;
48037
47962
  _emberMetal.default.OrderedSet = _emberMetal.OrderedSet;
48038
47963
  _emberMetal.default.Map = _emberMetal.Map;
@@ -48469,7 +48394,7 @@ enifed('ember/index', ['exports', 'require', 'ember-environment', 'node-module',
48469
48394
  enifed("ember/version", ["exports"], function (exports) {
48470
48395
  "use strict";
48471
48396
 
48472
- exports.default = "2.16.3";
48397
+ exports.default = "2.17.0-beta.4";
48473
48398
  });
48474
48399
  enifed("handlebars", ["exports"], function (exports) {
48475
48400
  "use strict";
@@ -50551,24 +50476,14 @@ enifed("route-recognizer", ["exports"], function (exports) {
50551
50476
 
50552
50477
  exports.default = RouteRecognizer;
50553
50478
  });
50554
- enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _routeRecognizer, _rsvp) {
50479
+ enifed('router', ['exports', 'ember-babel', 'route-recognizer', 'rsvp'], function (exports, _emberBabel, _routeRecognizer, _rsvp) {
50555
50480
  'use strict';
50556
50481
 
50557
50482
  exports.Transition = undefined;
50558
50483
 
50559
50484
 
50560
50485
  var slice = Array.prototype.slice;
50561
-
50562
- var _isArray;
50563
- if (!Array.isArray) {
50564
- _isArray = function (x) {
50565
- return Object.prototype.toString.call(x) === "[object Array]";
50566
- };
50567
- } else {
50568
- _isArray = Array.isArray;
50569
- }
50570
-
50571
- var isArray = _isArray;
50486
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
50572
50487
 
50573
50488
  /**
50574
50489
  Determines if an object is Promise by checking if it is "thenable".
@@ -50579,18 +50494,12 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
50579
50494
 
50580
50495
  function merge(hash, other) {
50581
50496
  for (var prop in other) {
50582
- if (other.hasOwnProperty(prop)) {
50497
+ if (hasOwnProperty.call(other, prop)) {
50583
50498
  hash[prop] = other[prop];
50584
50499
  }
50585
50500
  }
50586
50501
  }
50587
50502
 
50588
- var oCreate = Object.create || function (proto) {
50589
- function F() {}
50590
- F.prototype = proto;
50591
- return new F();
50592
- };
50593
-
50594
50503
  /**
50595
50504
  @private
50596
50505
 
@@ -50598,8 +50507,8 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
50598
50507
  **/
50599
50508
  function extractQueryParams(array) {
50600
50509
  var len = array && array.length,
50601
- head,
50602
- queryParams;
50510
+ head = void 0,
50511
+ queryParams = void 0;
50603
50512
 
50604
50513
  if (len && len > 0 && array[len - 1] && array[len - 1].hasOwnProperty('queryParams')) {
50605
50514
  queryParams = array[len - 1].queryParams;
@@ -50619,7 +50528,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
50619
50528
  for (var key in queryParams) {
50620
50529
  if (typeof queryParams[key] === 'number') {
50621
50530
  queryParams[key] = '' + queryParams[key];
50622
- } else if (isArray(queryParams[key])) {
50531
+ } else if (Array.isArray(queryParams[key])) {
50623
50532
  for (var i = 0, l = queryParams[key].length; i < l; i++) {
50624
50533
  queryParams[key][i] = '' + queryParams[key][i];
50625
50534
  }
@@ -50629,37 +50538,30 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
50629
50538
  /**
50630
50539
  @private
50631
50540
  */
50632
- function log(router, sequence, msg) {
50541
+ function _log(router, sequence, msg) {
50633
50542
  if (!router.log) {
50634
50543
  return;
50635
50544
  }
50636
50545
 
50637
50546
  if (arguments.length === 3) {
50638
- router.log("Transition #" + sequence + ": " + msg);
50547
+ router.log('Transition #' + sequence + ': ' + msg);
50639
50548
  } else {
50640
50549
  msg = sequence;
50641
50550
  router.log(msg);
50642
50551
  }
50643
50552
  }
50644
50553
 
50645
- function bind(context, fn) {
50646
- var boundArgs = arguments;
50647
- return function (value) {
50648
- var args = slice.call(boundArgs, 2);
50649
- args.push(value);
50650
- return fn.apply(context, args);
50651
- };
50652
- }
50653
-
50654
50554
  function isParam(object) {
50655
- return typeof object === "string" || object instanceof String || typeof object === "number" || object instanceof Number;
50555
+ return typeof object === 'string' || object instanceof String || typeof object === 'number' || object instanceof Number;
50656
50556
  }
50657
50557
 
50658
50558
  function forEach(array, callback) {
50659
- for (var i = 0, l = array.length; i < l && false !== callback(array[i]); i++) {}
50559
+ for (var i = 0, l = array.length; i < l && false !== callback(array[i]); i++) {
50560
+ // empty intentionally
50561
+ }
50660
50562
  }
50661
50563
 
50662
- function trigger(router, handlerInfos, ignoreFailure, args) {
50564
+ function _trigger(router, handlerInfos, ignoreFailure, args) {
50663
50565
  if (router.triggerEvent) {
50664
50566
  router.triggerEvent(handlerInfos, ignoreFailure, args);
50665
50567
  return;
@@ -50687,7 +50589,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
50687
50589
  // If there is no handler, it means the handler hasn't resolved yet which
50688
50590
  // means that we should trigger the event later when the handler is available
50689
50591
  if (!handler) {
50690
- handlerInfo.handlerPromise.then(bind(null, delayedEvent, name, args));
50592
+ handlerInfo.handlerPromise.then(delayedEvent.bind(null, name, args));
50691
50593
  continue;
50692
50594
  }
50693
50595
 
@@ -50710,7 +50612,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
50710
50612
  }
50711
50613
 
50712
50614
  function getChangelist(oldObject, newObject) {
50713
- var key;
50615
+ var key = void 0;
50714
50616
  var results = {
50715
50617
  all: {},
50716
50618
  changed: {},
@@ -50725,8 +50627,8 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
50725
50627
 
50726
50628
  // Calculate removals
50727
50629
  for (key in oldObject) {
50728
- if (oldObject.hasOwnProperty(key)) {
50729
- if (!newObject.hasOwnProperty(key)) {
50630
+ if (hasOwnProperty.call(oldObject, key)) {
50631
+ if (!hasOwnProperty.call(newObject, key)) {
50730
50632
  didChange = true;
50731
50633
  results.removed[key] = oldObject[key];
50732
50634
  }
@@ -50735,8 +50637,8 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
50735
50637
 
50736
50638
  // Calculate changes
50737
50639
  for (key in newObject) {
50738
- if (newObject.hasOwnProperty(key)) {
50739
- if (isArray(oldObject[key]) && isArray(newObject[key])) {
50640
+ if (hasOwnProperty.call(newObject, key)) {
50641
+ if (Array.isArray(oldObject[key]) && Array.isArray(newObject[key])) {
50740
50642
  if (oldObject[key].length !== newObject[key].length) {
50741
50643
  results.changed[key] = newObject[key];
50742
50644
  didChange = true;
@@ -50760,24 +50662,15 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
50760
50662
  return didChange && results;
50761
50663
  }
50762
50664
 
50763
- function promiseLabel(label) {
50665
+ function _promiseLabel(label) {
50764
50666
  return 'Router: ' + label;
50765
50667
  }
50766
50668
 
50767
- function subclass(parentConstructor, proto) {
50768
- function C(props) {
50769
- parentConstructor.call(this, props || {});
50770
- }
50771
- C.prototype = oCreate(parentConstructor.prototype);
50772
- merge(C.prototype, proto);
50773
- return C;
50774
- }
50775
-
50776
50669
  function resolveHook(obj, hookName) {
50777
50670
  if (!obj) {
50778
50671
  return;
50779
50672
  }
50780
- var underscored = "_" + hookName;
50673
+ var underscored = '_' + hookName;
50781
50674
  return obj[underscored] && underscored || obj[hookName] && hookName;
50782
50675
  }
50783
50676
 
@@ -50816,7 +50709,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
50816
50709
  }
50817
50710
  targetName += handlerInfo.name;
50818
50711
  });
50819
- return promiseLabel("'" + targetName + "': " + label);
50712
+ return _promiseLabel("'" + targetName + "': " + label);
50820
50713
  },
50821
50714
 
50822
50715
  resolve: function (shouldContinue, payload) {
@@ -50834,16 +50727,16 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
50834
50727
  var wasAborted = false;
50835
50728
 
50836
50729
  // The prelude RSVP.resolve() asyncs us into the promise land.
50837
- return _rsvp.Promise.resolve(null, this.promiseLabel("Start transition")).then(resolveOneHandlerInfo, null, this.promiseLabel('Resolve handler'))['catch'](handleError, this.promiseLabel('Handle error'));
50730
+ return _rsvp.Promise.resolve(null, this.promiseLabel('Start transition')).then(resolveOneHandlerInfo, null, this.promiseLabel('Resolve handler')).catch(handleError, this.promiseLabel('Handle error'));
50838
50731
 
50839
50732
  function innerShouldContinue() {
50840
- return _rsvp.Promise.resolve(shouldContinue(), currentState.promiseLabel("Check if should continue"))['catch'](function (reason) {
50733
+ return _rsvp.Promise.resolve(shouldContinue(), currentState.promiseLabel('Check if should continue')).catch(function (reason) {
50841
50734
  // We distinguish between errors that occurred
50842
- // during resolution (e.g. beforeModel/model/afterModel),
50735
+ // during resolution (e.g. before"Model/model/afterModel),
50843
50736
  // and aborts due to a rejecting promise from shouldContinue().
50844
50737
  wasAborted = true;
50845
50738
  return _rsvp.Promise.reject(reason);
50846
- }, currentState.promiseLabel("Handle abort"));
50739
+ }, currentState.promiseLabel('Handle abort'));
50847
50740
  }
50848
50741
 
50849
50742
  function handleError(error) {
@@ -50919,7 +50812,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
50919
50812
  this.code = error.code;
50920
50813
  }
50921
50814
 
50922
- TransitionAbortedError.prototype = oCreate(Error.prototype);
50815
+ TransitionAbortedError.prototype = Object.create(Error.prototype);
50923
50816
 
50924
50817
  /**
50925
50818
  A Transition is a thennable (a promise-like object) that represents
@@ -50936,96 +50829,87 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
50936
50829
  @param {Object} error
50937
50830
  @private
50938
50831
  */
50939
- function Transition(router, intent, state, error, previousTransition) {
50940
- var transition = this;
50941
- this.state = state || router.state;
50942
- this.intent = intent;
50943
- this.router = router;
50944
- this.data = this.intent && this.intent.data || {};
50945
- this.resolvedModels = {};
50946
- this.queryParams = {};
50947
- this.promise = undefined;
50948
- this.error = undefined;
50949
- this.params = undefined;
50950
- this.handlerInfos = undefined;
50951
- this.targetName = undefined;
50952
- this.pivotHandler = undefined;
50953
- this.sequence = undefined;
50954
- this.isAborted = false;
50955
- this.isActive = true;
50956
-
50957
- if (error) {
50958
- this.promise = _rsvp.Promise.reject(error);
50959
- this.error = error;
50960
- return;
50961
- }
50962
50832
 
50963
- // if you're doing multiple redirects, need the new transition to know if it
50964
- // is actually part of the first transition or not. Any further redirects
50965
- // in the initial transition also need to know if they are part of the
50966
- // initial transition
50967
- this.isCausedByAbortingTransition = !!previousTransition;
50968
- this.isCausedByInitialTransition = previousTransition && (previousTransition.isCausedByInitialTransition || previousTransition.sequence === 0);
50969
-
50970
- if (state) {
50971
- this.params = state.params;
50972
- this.queryParams = state.queryParams;
50973
- this.handlerInfos = state.handlerInfos;
50833
+ var Transition = function () {
50834
+ function Transition(router, intent, state, error, previousTransition) {
50835
+ var _this = this;
50974
50836
 
50975
- var len = state.handlerInfos.length;
50976
- if (len) {
50977
- this.targetName = state.handlerInfos[len - 1].name;
50837
+ (0, _emberBabel.classCallCheck)(this, Transition);
50838
+
50839
+ this.state = state || router.state;
50840
+ this.intent = intent;
50841
+ this.router = router;
50842
+ this.data = this.intent && this.intent.data || {};
50843
+ this.resolvedModels = {};
50844
+ this.queryParams = {};
50845
+ this.promise = undefined;
50846
+ this.error = undefined;
50847
+ this.params = undefined;
50848
+ this.handlerInfos = undefined;
50849
+ this.targetName = undefined;
50850
+ this.pivotHandler = undefined;
50851
+ this.sequence = undefined;
50852
+ this.isAborted = false;
50853
+ this.isActive = true;
50854
+ this.urlMethod = 'update';
50855
+ this.resolveIndex = 0;
50856
+ this.queryParamsOnly = false;
50857
+ this.isTransition = true;
50858
+
50859
+ if (error) {
50860
+ this.promise = _rsvp.Promise.reject(error);
50861
+ this.error = error;
50862
+ return;
50978
50863
  }
50979
50864
 
50980
- for (var i = 0; i < len; ++i) {
50981
- var handlerInfo = state.handlerInfos[i];
50865
+ // if you're doing multiple redirects, need the new transition to know if it
50866
+ // is actually part of the first transition or not. Any further redirects
50867
+ // in the initial transition also need to know if they are part of the
50868
+ // initial transition
50869
+ this.isCausedByAbortingTransition = !!previousTransition;
50870
+ this.isCausedByInitialTransition = previousTransition && (previousTransition.isCausedByInitialTransition || previousTransition.sequence === 0);
50982
50871
 
50983
- // TODO: this all seems hacky
50984
- if (!handlerInfo.isResolved) {
50985
- break;
50872
+ if (state) {
50873
+ this.params = state.params;
50874
+ this.queryParams = state.queryParams;
50875
+ this.handlerInfos = state.handlerInfos;
50876
+
50877
+ var len = state.handlerInfos.length;
50878
+ if (len) {
50879
+ this.targetName = state.handlerInfos[len - 1].name;
50986
50880
  }
50987
- this.pivotHandler = handlerInfo.handler;
50988
- }
50989
50881
 
50990
- this.sequence = router.currentSequence++;
50991
- this.promise = state.resolve(checkForAbort, this)['catch'](catchHandlerForTransition(transition), promiseLabel('Handle Abort'));
50992
- } else {
50993
- this.promise = _rsvp.Promise.resolve(this.state);
50994
- this.params = {};
50995
- }
50882
+ for (var i = 0; i < len; ++i) {
50883
+ var handlerInfo = state.handlerInfos[i];
50996
50884
 
50997
- function checkForAbort() {
50998
- if (transition.isAborted) {
50999
- return _rsvp.Promise.reject(undefined, promiseLabel("Transition aborted - reject"));
51000
- }
51001
- }
51002
- }
50885
+ // TODO: this all seems hacky
50886
+ if (!handlerInfo.isResolved) {
50887
+ break;
50888
+ }
50889
+ this.pivotHandler = handlerInfo.handler;
50890
+ }
51003
50891
 
51004
- function catchHandlerForTransition(transition) {
51005
- return function (result) {
51006
- if (result.wasAborted || transition.isAborted) {
51007
- return _rsvp.Promise.reject(logAbort(transition));
50892
+ this.sequence = router.currentSequence++;
50893
+ this.promise = state.resolve(function () {
50894
+ if (_this.isAborted) {
50895
+ return _rsvp.Promise.reject(undefined, _promiseLabel('Transition aborted - reject'));
50896
+ }
50897
+ }, this).catch(function (result) {
50898
+ if (result.wasAborted || _this.isAborted) {
50899
+ return _rsvp.Promise.reject(logAbort(_this));
50900
+ } else {
50901
+ _this.trigger('error', result.error, _this, result.handlerWithError);
50902
+ _this.abort();
50903
+ return _rsvp.Promise.reject(result.error);
50904
+ }
50905
+ }, _promiseLabel('Handle Abort'));
51008
50906
  } else {
51009
- transition.trigger('error', result.error, transition, result.handlerWithError);
51010
- transition.abort();
51011
- return _rsvp.Promise.reject(result.error);
50907
+ this.promise = _rsvp.Promise.resolve(this.state);
50908
+ this.params = {};
51012
50909
  }
51013
- };
51014
- }
51015
-
51016
- Transition.prototype = {
51017
- targetName: null,
51018
- urlMethod: 'update',
51019
- intent: null,
51020
- pivotHandler: null,
51021
- resolveIndex: 0,
51022
- resolvedModels: null,
51023
- state: null,
51024
- queryParamsOnly: false,
51025
-
51026
- isTransition: true,
50910
+ }
51027
50911
 
51028
- isExiting: function (handler) {
50912
+ Transition.prototype.isExiting = function isExiting(handler) {
51029
50913
  var handlerInfos = this.handlerInfos;
51030
50914
  for (var i = 0, len = handlerInfos.length; i < len; ++i) {
51031
50915
  var handlerInfo = handlerInfos[i];
@@ -51034,109 +50918,33 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51034
50918
  }
51035
50919
  }
51036
50920
  return true;
51037
- },
51038
-
51039
- /**
51040
- The Transition's internal promise. Calling `.then` on this property
51041
- is that same as calling `.then` on the Transition object itself, but
51042
- this property is exposed for when you want to pass around a
51043
- Transition's promise, but not the Transition object itself, since
51044
- Transition object can be externally `abort`ed, while the promise
51045
- cannot.
51046
- @property promise
51047
- @type {Object}
51048
- @public
51049
- */
51050
- promise: null,
51051
-
51052
- /**
51053
- Custom state can be stored on a Transition's `data` object.
51054
- This can be useful for decorating a Transition within an earlier
51055
- hook and shared with a later hook. Properties set on `data` will
51056
- be copied to new transitions generated by calling `retry` on this
51057
- transition.
51058
- @property data
51059
- @type {Object}
51060
- @public
51061
- */
51062
- data: null,
50921
+ };
51063
50922
 
51064
- /**
51065
- A standard promise hook that resolves if the transition
51066
- succeeds and rejects if it fails/redirects/aborts.
51067
- Forwards to the internal `promise` property which you can
51068
- use in situations where you want to pass around a thennable,
51069
- but not the Transition itself.
51070
- @method then
51071
- @param {Function} onFulfilled
51072
- @param {Function} onRejected
51073
- @param {String} label optional string for labeling the promise.
51074
- Useful for tooling.
51075
- @return {Promise}
51076
- @public
51077
- */
51078
- then: function (onFulfilled, onRejected, label) {
50923
+ Transition.prototype.then = function then(onFulfilled, onRejected, label) {
51079
50924
  return this.promise.then(onFulfilled, onRejected, label);
51080
- },
50925
+ };
51081
50926
 
51082
- /**
51083
- Forwards to the internal `promise` property which you can
51084
- use in situations where you want to pass around a thennable,
51085
- but not the Transition itself.
51086
- @method catch
51087
- @param {Function} onRejection
51088
- @param {String} label optional string for labeling the promise.
51089
- Useful for tooling.
51090
- @return {Promise}
51091
- @public
51092
- */
51093
- catch: function (onRejection, label) {
50927
+ Transition.prototype.catch = function _catch(onRejection, label) {
51094
50928
  return this.promise.catch(onRejection, label);
51095
- },
50929
+ };
51096
50930
 
51097
- /**
51098
- Forwards to the internal `promise` property which you can
51099
- use in situations where you want to pass around a thennable,
51100
- but not the Transition itself.
51101
- @method finally
51102
- @param {Function} callback
51103
- @param {String} label optional string for labeling the promise.
51104
- Useful for tooling.
51105
- @return {Promise}
51106
- @public
51107
- */
51108
- finally: function (callback, label) {
50931
+ Transition.prototype.finally = function _finally(callback, label) {
51109
50932
  return this.promise.finally(callback, label);
51110
- },
50933
+ };
51111
50934
 
51112
- /**
51113
- Aborts the Transition. Note you can also implicitly abort a transition
51114
- by initiating another transition while a previous one is underway.
51115
- @method abort
51116
- @return {Transition} this transition
51117
- @public
51118
- */
51119
- abort: function () {
50935
+ Transition.prototype.abort = function abort() {
51120
50936
  if (this.isAborted) {
51121
50937
  return this;
51122
50938
  }
51123
- log(this.router, this.sequence, this.targetName + ": transition was aborted");
50939
+ _log(this.router, this.sequence, this.targetName + ': transition was aborted');
51124
50940
  this.intent.preTransitionState = this.router.state;
51125
50941
  this.isAborted = true;
51126
50942
  this.isActive = false;
51127
50943
  this.router.activeTransition = null;
51128
50944
  return this;
51129
- },
50945
+ };
51130
50946
 
51131
- /**
51132
- Retries a previously-aborted transition (making sure to abort the
51133
- transition if it's still active). Returns a new transition that
51134
- represents the new attempt to transition.
51135
- @method retry
51136
- @return {Transition} new transition
51137
- @public
51138
- */
51139
- retry: function () {
50947
+ Transition.prototype.retry = function retry() {
51140
50948
  // TODO: add tests for merged state retry()s
51141
50949
  this.abort();
51142
50950
  var newTransition = this.router.transitionByIntent(this.intent, false);
@@ -51153,41 +50961,14 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51153
50961
  newTransition.method(this.urlMethod);
51154
50962
  }
51155
50963
  return newTransition;
51156
- },
50964
+ };
51157
50965
 
51158
- /**
51159
- Sets the URL-changing method to be employed at the end of a
51160
- successful transition. By default, a new Transition will just
51161
- use `updateURL`, but passing 'replace' to this method will
51162
- cause the URL to update using 'replaceWith' instead. Omitting
51163
- a parameter will disable the URL change, allowing for transitions
51164
- that don't update the URL at completion (this is also used for
51165
- handleURL, since the URL has already changed before the
51166
- transition took place).
51167
- @method method
51168
- @param {String} method the type of URL-changing method to use
51169
- at the end of a transition. Accepted values are 'replace',
51170
- falsy values, or any other non-falsy value (which is
51171
- interpreted as an updateURL transition).
51172
- @return {Transition} this transition
51173
- @public
51174
- */
51175
- method: function (method) {
51176
- this.urlMethod = method;
50966
+ Transition.prototype.method = function method(_method) {
50967
+ this.urlMethod = _method;
51177
50968
  return this;
51178
- },
50969
+ };
51179
50970
 
51180
- /**
51181
- Fires an event on the current list of resolved/resolving
51182
- handlers within this transition. Useful for firing events
51183
- on route hierarchies that haven't fully been entered yet.
51184
- Note: This method is also aliased as `send`
51185
- @method trigger
51186
- @param {Boolean} [ignoreFailure=false] a boolean specifying whether unhandled events throw an error
51187
- @param {String} name the name of the event to fire
51188
- @public
51189
- */
51190
- trigger: function (ignoreFailure) {
50971
+ Transition.prototype.trigger = function trigger(ignoreFailure) {
51191
50972
  var args = slice.call(arguments);
51192
50973
  if (typeof ignoreFailure === 'boolean') {
51193
50974
  args.shift();
@@ -51195,41 +50976,29 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51195
50976
  // Throw errors on unhandled trigger events by default
51196
50977
  ignoreFailure = false;
51197
50978
  }
51198
- trigger(this.router, this.state.handlerInfos.slice(0, this.resolveIndex + 1), ignoreFailure, args);
51199
- },
50979
+ _trigger(this.router, this.state.handlerInfos.slice(0, this.resolveIndex + 1), ignoreFailure, args);
50980
+ };
51200
50981
 
51201
- /**
51202
- Transitions are aborted and their promises rejected
51203
- when redirects occur; this method returns a promise
51204
- that will follow any redirects that occur and fulfill
51205
- with the value fulfilled by any redirecting transitions
51206
- that occur.
51207
- @method followRedirects
51208
- @return {Promise} a promise that fulfills with the same
51209
- value that the final redirecting transition fulfills with
51210
- @public
51211
- */
51212
- followRedirects: function () {
50982
+ Transition.prototype.followRedirects = function followRedirects() {
51213
50983
  var router = this.router;
51214
- return this.promise['catch'](function (reason) {
50984
+ return this.promise.catch(function (reason) {
51215
50985
  if (router.activeTransition) {
51216
50986
  return router.activeTransition.followRedirects();
51217
50987
  }
51218
50988
  return _rsvp.Promise.reject(reason);
51219
50989
  });
51220
- },
50990
+ };
51221
50991
 
51222
- toString: function () {
51223
- return "Transition (sequence " + this.sequence + ")";
51224
- },
50992
+ Transition.prototype.toString = function toString() {
50993
+ return 'Transition (sequence ' + this.sequence + ')';
50994
+ };
51225
50995
 
51226
- /**
51227
- @private
51228
- */
51229
- log: function (message) {
51230
- log(this.router, this.sequence, message);
51231
- }
51232
- };
50996
+ Transition.prototype.log = function log(message) {
50997
+ _log(this.router, this.sequence, message);
50998
+ };
50999
+
51000
+ return Transition;
51001
+ }();
51233
51002
 
51234
51003
  // Alias 'trigger' as 'send'
51235
51004
  Transition.prototype.send = Transition.prototype.trigger;
@@ -51237,61 +51006,52 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51237
51006
  /**
51238
51007
  @private
51239
51008
 
51240
- Logs and returns an instance of TransitionAbortedError.
51009
+ Logs and returns an instance of TransitionAborted.
51241
51010
  */
51242
51011
  function logAbort(transition) {
51243
- log(transition.router, transition.sequence, "detected abort.");
51012
+ _log(transition.router, transition.sequence, 'detected abort.');
51244
51013
  return new TransitionAbortedError();
51245
51014
  }
51246
51015
 
51247
- function TransitionIntent(props) {
51248
- this.initialize(props);
51016
+ var TransitionIntent = function TransitionIntent() {
51017
+ (0, _emberBabel.classCallCheck)(this, TransitionIntent);
51249
51018
 
51250
- // TODO: wat
51251
51019
  this.data = this.data || {};
51252
- }
51253
-
51254
- TransitionIntent.prototype = {
51255
- initialize: null,
51256
- applyToState: null
51257
51020
  };
51258
51021
 
51259
51022
  var DEFAULT_HANDLER = Object.freeze({});
51260
51023
 
51261
- function HandlerInfo(_props) {
51262
- var props = _props || {};
51024
+ var HandlerInfo = function () {
51025
+ function HandlerInfo(_props) {
51026
+ (0, _emberBabel.classCallCheck)(this, HandlerInfo);
51263
51027
 
51264
- // Set a default handler to ensure consistent object shape
51265
- this._handler = DEFAULT_HANDLER;
51028
+ var props = _props || {};
51266
51029
 
51267
- if (props.handler) {
51268
- var name = props.name;
51269
-
51270
- // Setup a handlerPromise so that we can wait for asynchronously loaded handlers
51271
- this.handlerPromise = _rsvp.Promise.resolve(props.handler);
51030
+ // initialize local properties to ensure consistent object shape
51031
+ this._handler = DEFAULT_HANDLER;
51032
+ this._handlerPromise = null;
51033
+ this.factory = null; // Injected by the handler info factory
51034
+ this.name = props.name;
51272
51035
 
51273
- // Wait until the 'handler' property has been updated when chaining to a handler
51274
- // that is a promise
51275
- if (isPromise(props.handler)) {
51276
- this.handlerPromise = this.handlerPromise.then(bind(this, this.updateHandler));
51277
- props.handler = undefined;
51278
- } else if (props.handler) {
51279
- // Store the name of the handler on the handler for easy checks later
51280
- props.handler._handlerName = name;
51036
+ for (var prop in props) {
51037
+ if (prop === 'handler') {
51038
+ this._processHandler(props.handler);
51039
+ } else {
51040
+ this[prop] = props[prop];
51041
+ }
51281
51042
  }
51282
51043
  }
51283
51044
 
51284
- merge(this, props);
51285
- this.initialize(props);
51286
- }
51045
+ HandlerInfo.prototype.getHandler = function getHandler() {};
51287
51046
 
51288
- HandlerInfo.prototype = {
51289
- name: null,
51047
+ HandlerInfo.prototype.fetchHandler = function fetchHandler() {
51048
+ var handler = this.getHandler(this.name);
51290
51049
 
51291
- getHandler: function () {},
51050
+ return this._processHandler(handler);
51051
+ };
51292
51052
 
51293
- fetchHandler: function () {
51294
- var handler = this.getHandler(this.name);
51053
+ HandlerInfo.prototype._processHandler = function _processHandler(handler) {
51054
+ var _this2 = this;
51295
51055
 
51296
51056
  // Setup a handlerPromise so that we can wait for asynchronously loaded handlers
51297
51057
  this.handlerPromise = _rsvp.Promise.resolve(handler);
@@ -51299,75 +51059,65 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51299
51059
  // Wait until the 'handler' property has been updated when chaining to a handler
51300
51060
  // that is a promise
51301
51061
  if (isPromise(handler)) {
51302
- this.handlerPromise = this.handlerPromise.then(bind(this, this.updateHandler));
51062
+ this.handlerPromise = this.handlerPromise.then(function (h) {
51063
+ return _this2.updateHandler(h);
51064
+ });
51065
+ // set to undefined to avoid recursive loop in the handler getter
51066
+ return this.handler = undefined;
51303
51067
  } else if (handler) {
51304
- // Store the name of the handler on the handler for easy checks later
51305
- handler._handlerName = this.name;
51306
- return this.handler = handler;
51068
+ return this.updateHandler(handler);
51307
51069
  }
51070
+ };
51308
51071
 
51309
- return this.handler = undefined;
51310
- },
51311
-
51312
- _handlerPromise: undefined,
51313
-
51314
- params: null,
51315
- context: null,
51316
-
51317
- // Injected by the handler info factory.
51318
- factory: null,
51319
-
51320
- initialize: function () {},
51321
-
51322
- log: function (payload, message) {
51072
+ HandlerInfo.prototype.log = function log(payload, message) {
51323
51073
  if (payload.log) {
51324
51074
  payload.log(this.name + ': ' + message);
51325
51075
  }
51326
- },
51076
+ };
51327
51077
 
51328
- promiseLabel: function (label) {
51329
- return promiseLabel("'" + this.name + "' " + label);
51330
- },
51078
+ HandlerInfo.prototype.promiseLabel = function promiseLabel(label) {
51079
+ return _promiseLabel("'" + this.name + "' " + label);
51080
+ };
51331
51081
 
51332
- getUnresolved: function () {
51082
+ HandlerInfo.prototype.getUnresolved = function getUnresolved() {
51333
51083
  return this;
51334
- },
51084
+ };
51335
51085
 
51336
- serialize: function () {
51086
+ HandlerInfo.prototype.serialize = function serialize() {
51337
51087
  return this.params || {};
51338
- },
51088
+ };
51339
51089
 
51340
- updateHandler: function (handler) {
51090
+ HandlerInfo.prototype.updateHandler = function updateHandler(handler) {
51341
51091
  // Store the name of the handler on the handler for easy checks later
51342
51092
  handler._handlerName = this.name;
51343
51093
  return this.handler = handler;
51344
- },
51094
+ };
51345
51095
 
51346
- resolve: function (shouldContinue, payload) {
51347
- var checkForAbort = bind(this, this.checkForAbort, shouldContinue),
51348
- beforeModel = bind(this, this.runBeforeModelHook, payload),
51349
- model = bind(this, this.getModel, payload),
51350
- afterModel = bind(this, this.runAfterModelHook, payload),
51351
- becomeResolved = bind(this, this.becomeResolved, payload),
51096
+ HandlerInfo.prototype.resolve = function resolve(shouldContinue, payload) {
51097
+ var checkForAbort = this.checkForAbort.bind(this, shouldContinue),
51098
+ beforeModel = this.runBeforeModelHook.bind(this, payload),
51099
+ model = this.getModel.bind(this, payload),
51100
+ afterModel = this.runAfterModelHook.bind(this, payload),
51101
+ becomeResolved = this.becomeResolved.bind(this, payload),
51352
51102
  self = this;
51353
51103
 
51354
- return _rsvp.Promise.resolve(this.handlerPromise, this.promiseLabel("Start handler")).then(function (handler) {
51104
+ return _rsvp.Promise.resolve(this.handlerPromise, this.promiseLabel('Start handler')).then(function (handler) {
51355
51105
  // We nest this chain in case the handlerPromise has an error so that
51356
51106
  // we don't have to bubble it through every step
51357
- return _rsvp.Promise.resolve(handler).then(checkForAbort, null, self.promiseLabel("Check for abort")).then(beforeModel, null, self.promiseLabel("Before model")).then(checkForAbort, null, self.promiseLabel("Check if aborted during 'beforeModel' hook")).then(model, null, self.promiseLabel("Model")).then(checkForAbort, null, self.promiseLabel("Check if aborted in 'model' hook")).then(afterModel, null, self.promiseLabel("After model")).then(checkForAbort, null, self.promiseLabel("Check if aborted in 'afterModel' hook")).then(becomeResolved, null, self.promiseLabel("Become resolved"));
51107
+ return _rsvp.Promise.resolve(handler).then(checkForAbort, null, self.promiseLabel('Check for abort')).then(beforeModel, null, self.promiseLabel('Before model')).then(checkForAbort, null, self.promiseLabel("Check if aborted during 'beforeModel' hook")).then(model, null, self.promiseLabel('Model')).then(checkForAbort, null, self.promiseLabel("Check if aborted in 'model' hook")).then(afterModel, null, self.promiseLabel('After model')).then(checkForAbort, null, self.promiseLabel("Check if aborted in 'afterModel' hook")).then(becomeResolved, null, self.promiseLabel('Become resolved'));
51358
51108
  }, function (error) {
51359
51109
  throw error;
51360
51110
  });
51361
- },
51111
+ };
51362
51112
 
51363
- runBeforeModelHook: function (payload) {
51113
+ HandlerInfo.prototype.runBeforeModelHook = function runBeforeModelHook(payload) {
51364
51114
  if (payload.trigger) {
51365
51115
  payload.trigger(true, 'willResolveModel', payload, this.handler);
51366
51116
  }
51367
51117
  return this.runSharedModelHook(payload, 'beforeModel', []);
51368
- },
51118
+ };
51369
51119
 
51370
- runAfterModelHook: function (payload, resolvedModel) {
51120
+ HandlerInfo.prototype.runAfterModelHook = function runAfterModelHook(payload, resolvedModel) {
51371
51121
  // Stash the resolved model on the payload.
51372
51122
  // This makes it possible for users to swap out
51373
51123
  // the resolved model in afterModel.
@@ -51379,11 +51129,11 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51379
51129
  // Return the value stashed in resolvedModels, which
51380
51130
  // might have been swapped out in afterModel.
51381
51131
  return payload.resolvedModels[name];
51382
- }, null, this.promiseLabel("Ignore fulfillment value and return model value"));
51383
- },
51132
+ }, null, this.promiseLabel('Ignore fulfillment value and return model value'));
51133
+ };
51384
51134
 
51385
- runSharedModelHook: function (payload, hookName, args) {
51386
- this.log(payload, "calling " + hookName + " hook");
51135
+ HandlerInfo.prototype.runSharedModelHook = function runSharedModelHook(payload, hookName, args) {
51136
+ this.log(payload, 'calling ' + hookName + ' hook');
51387
51137
 
51388
51138
  if (this.queryParams) {
51389
51139
  args.push(this.queryParams);
@@ -51396,26 +51146,25 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51396
51146
  result = null;
51397
51147
  }
51398
51148
 
51399
- return _rsvp.Promise.resolve(result, this.promiseLabel("Resolve value returned from one of the model hooks"));
51400
- },
51149
+ return _rsvp.Promise.resolve(result, this.promiseLabel('Resolve value returned from one of the model hooks'));
51150
+ };
51401
51151
 
51402
- // overridden by subclasses
51403
- getModel: null,
51152
+ HandlerInfo.prototype.getModel = function getModel() {};
51404
51153
 
51405
- checkForAbort: function (shouldContinue, promiseValue) {
51406
- return _rsvp.Promise.resolve(shouldContinue(), this.promiseLabel("Check for abort")).then(function () {
51154
+ HandlerInfo.prototype.checkForAbort = function checkForAbort(shouldContinue, promiseValue) {
51155
+ return _rsvp.Promise.resolve(shouldContinue(), this.promiseLabel('Check for abort')).then(function () {
51407
51156
  // We don't care about shouldContinue's resolve value;
51408
51157
  // pass along the original value passed to this fn.
51409
51158
  return promiseValue;
51410
- }, null, this.promiseLabel("Ignore fulfillment value and continue"));
51411
- },
51159
+ }, null, this.promiseLabel('Ignore fulfillment value and continue'));
51160
+ };
51412
51161
 
51413
- stashResolvedModel: function (payload, resolvedModel) {
51162
+ HandlerInfo.prototype.stashResolvedModel = function stashResolvedModel(payload, resolvedModel) {
51414
51163
  payload.resolvedModels = payload.resolvedModels || {};
51415
51164
  payload.resolvedModels[this.name] = resolvedModel;
51416
- },
51165
+ };
51417
51166
 
51418
- becomeResolved: function (payload, resolvedContext) {
51167
+ HandlerInfo.prototype.becomeResolved = function becomeResolved(payload, resolvedContext) {
51419
51168
  var params = this.serialize(resolvedContext);
51420
51169
 
51421
51170
  if (payload) {
@@ -51430,9 +51179,9 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51430
51179
  handler: this.handler,
51431
51180
  params: params
51432
51181
  });
51433
- },
51182
+ };
51434
51183
 
51435
- shouldSupercede: function (other) {
51184
+ HandlerInfo.prototype.shouldSupercede = function shouldSupercede(other) {
51436
51185
  // Prefer this newer handlerInfo over `other` if:
51437
51186
  // 1) The other one doesn't exist
51438
51187
  // 2) The names don't match
@@ -51445,40 +51194,57 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51445
51194
 
51446
51195
  var contextsMatch = other.context === this.context;
51447
51196
  return other.name !== this.name || this.hasOwnProperty('context') && !contextsMatch || this.hasOwnProperty('params') && !paramsMatch(this.params, other.params);
51448
- }
51449
- };
51197
+ };
51450
51198
 
51451
- Object.defineProperty(HandlerInfo.prototype, 'handler', {
51452
- get: function () {
51453
- // _handler could be set to either a handler object or undefined, so we
51454
- // compare against a default reference to know when it's been set
51455
- if (this._handler !== DEFAULT_HANDLER) {
51456
- return this._handler;
51457
- }
51199
+ (0, _emberBabel.createClass)(HandlerInfo, [{
51200
+ key: 'handler',
51201
+ get: function () {
51202
+ // _handler could be set to either a handler object or undefined, so we
51203
+ // compare against a default reference to know when it's been set
51204
+ if (this._handler !== DEFAULT_HANDLER) {
51205
+ return this._handler;
51206
+ }
51458
51207
 
51459
- return this.fetchHandler();
51460
- },
51208
+ return this.fetchHandler();
51209
+ },
51210
+ set: function (handler) {
51211
+ return this._handler = handler;
51212
+ }
51213
+ }, {
51214
+ key: 'handlerPromise',
51215
+ get: function () {
51216
+ if (this._handlerPromise !== null) {
51217
+ return this._handlerPromise;
51218
+ }
51461
51219
 
51462
- set: function (handler) {
51463
- return this._handler = handler;
51464
- }
51465
- });
51220
+ this.fetchHandler();
51466
51221
 
51467
- Object.defineProperty(HandlerInfo.prototype, 'handlerPromise', {
51468
- get: function () {
51469
- if (this._handlerPromise) {
51470
51222
  return this._handlerPromise;
51471
- }
51472
-
51473
- this.fetchHandler();
51223
+ },
51224
+ set: function (handlerPromise) {
51225
+ this._handlerPromise = handlerPromise;
51474
51226
 
51475
- return this._handlerPromise;
51476
- },
51227
+ return handlerPromise;
51228
+ }
51229
+ }]);
51230
+ return HandlerInfo;
51231
+ }();
51477
51232
 
51478
- set: function (handlerPromise) {
51479
- return this._handlerPromise = handlerPromise;
51480
- }
51481
- });
51233
+ // this is bonkers, we require that `context` be set on on the
51234
+ // HandlerInfo prototype to null because the checks in
51235
+ // `NamedTransitionIntent.prototype.applyToHandlers` here
51236
+ // https://github.com/tildeio/router.js/blob/v1.2.8/lib/router/transition-intent/named-transition-intent.js#L76-L81
51237
+ // check of `oldHandlerInfo.context === newHandlerInfo.context` and assumes
51238
+ // that the params _must_ match also in that case.
51239
+ //
51240
+ // The only reason `oldHandlerInfo.context` and `newHandlerInfo.context` did not
51241
+ // match in prior versions is because if the context isn't set yet (on newHandlerInfo)
51242
+ // is because it inherits the `null` from the prototype vs `undefined` (on
51243
+ // the oldHandlerInfo).
51244
+ //
51245
+ // A future refactoring should remove that conditional, and fix the hand full of
51246
+ // failing tests.
51247
+ HandlerInfo.prototype.context = null;
51482
51248
 
51483
51249
  function paramsMatch(a, b) {
51484
51250
  if (!a ^ !b) {
@@ -51502,48 +51268,57 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51502
51268
  return true;
51503
51269
  }
51504
51270
 
51505
- var ResolvedHandlerInfo = subclass(HandlerInfo, {
51506
- resolve: function (shouldContinue, payload) {
51271
+ var ResolvedHandlerInfo = function (_HandlerInfo) {
51272
+ (0, _emberBabel.inherits)(ResolvedHandlerInfo, _HandlerInfo);
51273
+
51274
+ function ResolvedHandlerInfo(props) {
51275
+ (0, _emberBabel.classCallCheck)(this, ResolvedHandlerInfo);
51276
+
51277
+ var _this3 = (0, _emberBabel.possibleConstructorReturn)(this, _HandlerInfo.call(this, props));
51278
+
51279
+ _this3.isResolved = true;
51280
+ return _this3;
51281
+ }
51282
+
51283
+ ResolvedHandlerInfo.prototype.resolve = function resolve(shouldContinue, payload) {
51507
51284
  // A ResolvedHandlerInfo just resolved with itself.
51508
51285
  if (payload && payload.resolvedModels) {
51509
51286
  payload.resolvedModels[this.name] = this.context;
51510
51287
  }
51511
- return _rsvp.Promise.resolve(this, this.promiseLabel("Resolve"));
51512
- },
51288
+ return _rsvp.Promise.resolve(this, this.promiseLabel('Resolve'));
51289
+ };
51513
51290
 
51514
- getUnresolved: function () {
51291
+ ResolvedHandlerInfo.prototype.getUnresolved = function getUnresolved() {
51515
51292
  return this.factory('param', {
51516
51293
  name: this.name,
51517
51294
  handler: this.handler,
51518
51295
  params: this.params
51519
51296
  });
51520
- },
51297
+ };
51521
51298
 
51522
- isResolved: true
51523
- });
51299
+ return ResolvedHandlerInfo;
51300
+ }(HandlerInfo);
51524
51301
 
51525
- var UnresolvedHandlerInfoByObject = subclass(HandlerInfo, {
51526
- getModel: function (payload) {
51527
- this.log(payload, this.name + ": resolving provided model");
51528
- return _rsvp.Promise.resolve(this.context);
51529
- },
51302
+ var UnresolvedHandlerInfoByObject = function (_HandlerInfo2) {
51303
+ (0, _emberBabel.inherits)(UnresolvedHandlerInfoByObject, _HandlerInfo2);
51530
51304
 
51531
- initialize: function (props) {
51532
- this.names = props.names || [];
51533
- this.context = props.context;
51534
- },
51305
+ function UnresolvedHandlerInfoByObject(props) {
51306
+ (0, _emberBabel.classCallCheck)(this, UnresolvedHandlerInfoByObject);
51535
51307
 
51536
- /**
51537
- @private
51538
- Serializes a handler using its custom `serialize` method or
51539
- by a default that looks up the expected property name from
51540
- the dynamic segment.
51541
- @param {Object} model the model to be serialized for this handler
51542
- */
51543
- serialize: function (_model) {
51308
+ var _this4 = (0, _emberBabel.possibleConstructorReturn)(this, _HandlerInfo2.call(this, props));
51309
+
51310
+ _this4.names = _this4.names || [];
51311
+ return _this4;
51312
+ }
51313
+
51314
+ UnresolvedHandlerInfoByObject.prototype.getModel = function getModel(payload) {
51315
+ this.log(payload, this.name + ': resolving provided model');
51316
+ return _rsvp.Promise.resolve(this.context);
51317
+ };
51318
+
51319
+ UnresolvedHandlerInfoByObject.prototype.serialize = function serialize(_model) {
51544
51320
  var model = _model || this.context,
51545
- names = this.names,
51546
- serializer = this.serializer || this.handler && this.handler.serialize;
51321
+ names = this.names;
51547
51322
 
51548
51323
  var object = {};
51549
51324
  if (isParam(model)) {
@@ -51552,8 +51327,11 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51552
51327
  }
51553
51328
 
51554
51329
  // Use custom serialize if it exists.
51555
- if (serializer) {
51556
- return serializer(model, names);
51330
+ if (this.serializer) {
51331
+ // invoke this.serializer unbound (getSerializer returns a stateless function)
51332
+ return this.serializer.call(null, model, names);
51333
+ } else if (this.handler && this.handler.serialize) {
51334
+ return this.handler.serialize(model, names);
51557
51335
  }
51558
51336
 
51559
51337
  if (names.length !== 1) {
@@ -51568,16 +51346,24 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51568
51346
  object[name] = model;
51569
51347
  }
51570
51348
  return object;
51571
- }
51572
- });
51349
+ };
51573
51350
 
51574
- // Generated by URL transitions and non-dynamic route segments in named Transitions.
51575
- var UnresolvedHandlerInfoByParam = subclass(HandlerInfo, {
51576
- initialize: function (props) {
51577
- this.params = props.params || {};
51578
- },
51351
+ return UnresolvedHandlerInfoByObject;
51352
+ }(HandlerInfo);
51353
+
51354
+ var UnresolvedHandlerInfoByParam = function (_HandlerInfo3) {
51355
+ (0, _emberBabel.inherits)(UnresolvedHandlerInfoByParam, _HandlerInfo3);
51356
+
51357
+ function UnresolvedHandlerInfoByParam(props) {
51358
+ (0, _emberBabel.classCallCheck)(this, UnresolvedHandlerInfoByParam);
51359
+
51360
+ var _this5 = (0, _emberBabel.possibleConstructorReturn)(this, _HandlerInfo3.call(this, props));
51361
+
51362
+ _this5.params = _this5.params || {};
51363
+ return _this5;
51364
+ }
51579
51365
 
51580
- getModel: function (payload) {
51366
+ UnresolvedHandlerInfoByParam.prototype.getModel = function getModel(payload) {
51581
51367
  var fullParams = this.params;
51582
51368
  if (payload && payload.queryParams) {
51583
51369
  fullParams = {};
@@ -51589,8 +51375,10 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51589
51375
  var hookName = resolveHook(handler, 'deserialize') || resolveHook(handler, 'model');
51590
51376
 
51591
51377
  return this.runSharedModelHook(payload, hookName, [fullParams]);
51592
- }
51593
- });
51378
+ };
51379
+
51380
+ return UnresolvedHandlerInfoByParam;
51381
+ }(HandlerInfo);
51594
51382
 
51595
51383
  handlerInfoFactory.klasses = {
51596
51384
  resolved: ResolvedHandlerInfo,
@@ -51599,27 +51387,28 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51599
51387
  };
51600
51388
 
51601
51389
  function handlerInfoFactory(name, props) {
51602
- var Ctor = handlerInfoFactory.klasses[name],
51603
- handlerInfo = new Ctor(props || {});
51390
+ var klass = handlerInfoFactory.klasses[name];
51391
+ var handlerInfo = new klass(props || {});
51604
51392
  handlerInfo.factory = handlerInfoFactory;
51605
51393
  return handlerInfo;
51606
51394
  }
51607
51395
 
51608
- var NamedTransitionIntent = subclass(TransitionIntent, {
51609
- name: null,
51610
- pivotHandler: null,
51611
- contexts: null,
51612
- queryParams: null,
51396
+ var NamedTransitionIntent = function (_TransitionIntent) {
51397
+ (0, _emberBabel.inherits)(NamedTransitionIntent, _TransitionIntent);
51613
51398
 
51614
- initialize: function (props) {
51615
- this.name = props.name;
51616
- this.pivotHandler = props.pivotHandler;
51617
- this.contexts = props.contexts || [];
51618
- this.queryParams = props.queryParams;
51619
- },
51399
+ function NamedTransitionIntent(props) {
51400
+ (0, _emberBabel.classCallCheck)(this, NamedTransitionIntent);
51620
51401
 
51621
- applyToState: function (oldState, recognizer, getHandler, isIntermediate, getSerializer) {
51402
+ var _this6 = (0, _emberBabel.possibleConstructorReturn)(this, _TransitionIntent.call(this, props));
51622
51403
 
51404
+ _this6.name = props.name;
51405
+ _this6.pivotHandler = props.pivotHandler;
51406
+ _this6.contexts = props.contexts || [];
51407
+ _this6.queryParams = props.queryParams;
51408
+ return _this6;
51409
+ }
51410
+
51411
+ NamedTransitionIntent.prototype.applyToState = function applyToState(oldState, recognizer, getHandler, isIntermediate, getSerializer) {
51623
51412
  var partitionedArgs = extractQueryParams([this.name].concat(this.contexts)),
51624
51413
  pureArgs = partitionedArgs[0],
51625
51414
  handlers = recognizer.handlersFor(pureArgs[0]);
@@ -51627,10 +51416,9 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51627
51416
  var targetRouteName = handlers[handlers.length - 1].handler;
51628
51417
 
51629
51418
  return this.applyToHandlers(oldState, handlers, getHandler, targetRouteName, isIntermediate, null, getSerializer);
51630
- },
51631
-
51632
- applyToHandlers: function (oldState, handlers, getHandler, targetRouteName, isIntermediate, checkingIfActive, getSerializer) {
51419
+ };
51633
51420
 
51421
+ NamedTransitionIntent.prototype.applyToHandlers = function applyToHandlers(oldState, handlers, getHandler, targetRouteName, isIntermediate, checkingIfActive, getSerializer) {
51634
51422
  var i, len;
51635
51423
  var newState = new TransitionState();
51636
51424
  var objects = this.contexts.slice(0);
@@ -51698,7 +51486,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51698
51486
  }
51699
51487
 
51700
51488
  if (objects.length > 0) {
51701
- throw new Error("More context objects were passed than there are dynamic segments for the route: " + targetRouteName);
51489
+ throw new Error('More context objects were passed than there are dynamic segments for the route: ' + targetRouteName);
51702
51490
  }
51703
51491
 
51704
51492
  if (!isIntermediate) {
@@ -51708,19 +51496,18 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51708
51496
  merge(newState.queryParams, this.queryParams || {});
51709
51497
 
51710
51498
  return newState;
51711
- },
51499
+ };
51712
51500
 
51713
- invalidateChildren: function (handlerInfos, invalidateIndex) {
51501
+ NamedTransitionIntent.prototype.invalidateChildren = function invalidateChildren(handlerInfos, invalidateIndex) {
51714
51502
  for (var i = invalidateIndex, l = handlerInfos.length; i < l; ++i) {
51715
51503
  var handlerInfo = handlerInfos[i];
51716
51504
  handlerInfos[i] = handlerInfo.getUnresolved();
51717
51505
  }
51718
- },
51506
+ };
51719
51507
 
51720
- getHandlerInfoForDynamicSegment: function (name, getHandler, names, objects, oldHandlerInfo, targetRouteName, i, serializer) {
51508
+ NamedTransitionIntent.prototype.getHandlerInfoForDynamicSegment = function getHandlerInfoForDynamicSegment(name, getHandler, names, objects, oldHandlerInfo, targetRouteName, i, serializer) {
51721
51509
  var objectToUse;
51722
51510
  if (objects.length > 0) {
51723
-
51724
51511
  // Use the objects provided for this transition.
51725
51512
  objectToUse = objects[objects.length - 1];
51726
51513
  if (isParam(objectToUse)) {
@@ -51754,22 +51541,21 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51754
51541
  context: objectToUse,
51755
51542
  names: names
51756
51543
  });
51757
- },
51544
+ };
51758
51545
 
51759
- createParamHandlerInfo: function (name, getHandler, names, objects, oldHandlerInfo) {
51546
+ NamedTransitionIntent.prototype.createParamHandlerInfo = function createParamHandlerInfo(name, getHandler, names, objects, oldHandlerInfo) {
51760
51547
  var params = {};
51761
51548
 
51762
51549
  // Soak up all the provided string/numbers
51763
51550
  var numNames = names.length;
51764
51551
  while (numNames--) {
51765
-
51766
51552
  // Only use old params if the names match with the new handler
51767
51553
  var oldParams = oldHandlerInfo && name === oldHandlerInfo.name && oldHandlerInfo.params || {};
51768
51554
 
51769
51555
  var peek = objects[objects.length - 1];
51770
51556
  var paramName = names[numNames];
51771
51557
  if (isParam(peek)) {
51772
- params[paramName] = "" + objects.pop();
51558
+ params[paramName] = '' + objects.pop();
51773
51559
  } else {
51774
51560
  // If we're here, this means only some of the params
51775
51561
  // were string/number params, so try and use a param
@@ -51787,8 +51573,10 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51787
51573
  getHandler: getHandler,
51788
51574
  params: params
51789
51575
  });
51790
- }
51791
- });
51576
+ };
51577
+
51578
+ return NamedTransitionIntent;
51579
+ }(TransitionIntent);
51792
51580
 
51793
51581
  function UnrecognizedURLError(message) {
51794
51582
  if (!(this instanceof UnrecognizedURLError)) {
@@ -51812,16 +51600,21 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51812
51600
  this.code = error.code;
51813
51601
  }
51814
51602
 
51815
- UnrecognizedURLError.prototype = oCreate(Error.prototype);
51603
+ UnrecognizedURLError.prototype = Object.create(Error.prototype);
51816
51604
 
51817
- var URLTransitionIntent = subclass(TransitionIntent, {
51818
- url: null,
51605
+ var URLTransitionIntent = function (_TransitionIntent2) {
51606
+ (0, _emberBabel.inherits)(URLTransitionIntent, _TransitionIntent2);
51819
51607
 
51820
- initialize: function (props) {
51821
- this.url = props.url;
51822
- },
51608
+ function URLTransitionIntent(props) {
51609
+ (0, _emberBabel.classCallCheck)(this, URLTransitionIntent);
51610
+
51611
+ var _this7 = (0, _emberBabel.possibleConstructorReturn)(this, _TransitionIntent2.call(this, props));
51612
+
51613
+ _this7.url = props.url;
51614
+ return _this7;
51615
+ }
51823
51616
 
51824
- applyToState: function (oldState, recognizer, getHandler) {
51617
+ URLTransitionIntent.prototype.applyToState = function applyToState(oldState, recognizer, getHandler) {
51825
51618
  var newState = new TransitionState();
51826
51619
 
51827
51620
  var results = recognizer.recognize(this.url),
@@ -51876,12 +51669,14 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51876
51669
  merge(newState.queryParams, results.queryParams);
51877
51670
 
51878
51671
  return newState;
51879
- }
51880
- });
51672
+ };
51673
+
51674
+ return URLTransitionIntent;
51675
+ }(TransitionIntent);
51881
51676
 
51882
51677
  var pop = Array.prototype.pop;
51883
51678
 
51884
- function Router$1(_options) {
51679
+ function Router(_options) {
51885
51680
  var options = _options || {};
51886
51681
  this.getHandler = options.getHandler || this.getHandler;
51887
51682
  this.getSerializer = options.getSerializer || this.getSerializer;
@@ -51898,7 +51693,6 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51898
51693
  this._changedQueryParams = undefined;
51899
51694
  this.oldState = undefined;
51900
51695
  this.currentHandlerInfos = undefined;
51901
- this.state = undefined;
51902
51696
  this.currentSequence = 0;
51903
51697
 
51904
51698
  this.recognizer = new _routeRecognizer.default();
@@ -51914,7 +51708,6 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51914
51708
  var queryParamChangelist = getChangelist(oldState.queryParams, newState.queryParams);
51915
51709
 
51916
51710
  if (handlerInfosEqual(newState.handlerInfos, oldState.handlerInfos)) {
51917
-
51918
51711
  // This is a no-op transition. See if query params changed.
51919
51712
  if (queryParamChangelist) {
51920
51713
  newTransition = this.queryParamsTransition(queryParamChangelist, wasTransitioning, oldState, newState);
@@ -51953,7 +51746,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51953
51746
  // after the transition has been finalized.
51954
51747
  newTransition.promise = newTransition.promise.then(function (result) {
51955
51748
  return finalizeTransition(newTransition, result.state);
51956
- }, null, promiseLabel("Settle transition promise when transition is finalized"));
51749
+ }, null, _promiseLabel('Settle transition promise when transition is finalized'));
51957
51750
 
51958
51751
  if (!wasTransitioning) {
51959
51752
  notifyExistingHandlers(this, newState, newTransition);
@@ -51964,8 +51757,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
51964
51757
  return newTransition;
51965
51758
  }
51966
51759
 
51967
- Router$1.prototype = {
51968
-
51760
+ Router.prototype = {
51969
51761
  /**
51970
51762
  The main entry point into the router. The API is essentially
51971
51763
  the same as the `map` method in `route-recognizer`.
@@ -52021,7 +51813,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
52021
51813
  router.didTransition(router.currentHandlerInfos);
52022
51814
  }
52023
51815
  return result;
52024
- }, null, promiseLabel("Transition complete"));
51816
+ }, null, _promiseLabel('Transition complete'));
52025
51817
  return newTransition;
52026
51818
  }
52027
51819
  },
@@ -52082,7 +51874,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
52082
51874
  @param {String} url a URL to update to
52083
51875
  */
52084
51876
  updateURL: function () {
52085
- throw new Error("updateURL is not implemented");
51877
+ throw new Error('updateURL is not implemented');
52086
51878
  },
52087
51879
 
52088
51880
  /**
@@ -52112,13 +51904,8 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
52112
51904
  var previousTransition = this.activeTransition;
52113
51905
  var state = previousTransition ? previousTransition.state : this.state;
52114
51906
  var handlerInfos = state.handlerInfos;
52115
- var params = {};
52116
- for (var i = 0, len = handlerInfos.length; i < len; ++i) {
52117
- var handlerInfo = handlerInfos[i];
52118
- params[handlerInfo.name] = handlerInfo.params || {};
52119
- }
52120
51907
 
52121
- log(this, "Starting a refresh transition");
51908
+ _log(this, 'Starting a refresh transition');
52122
51909
  var intent = new NamedTransitionIntent({
52123
51910
  name: handlerInfos[handlerInfos.length - 1].name,
52124
51911
  pivotHandler: pivotHandler || handlerInfos[0].handler,
@@ -52155,14 +51942,16 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
52155
51942
  @return {String} a URL
52156
51943
  */
52157
51944
  generate: function (handlerName) {
52158
-
52159
51945
  var partitionedArgs = extractQueryParams(slice.call(arguments, 1)),
52160
51946
  suppliedParams = partitionedArgs[0],
52161
51947
  queryParams = partitionedArgs[1];
52162
51948
 
52163
51949
  // Construct a TransitionIntent with the provided params
52164
51950
  // and apply it to the present state of the router.
52165
- var intent = new NamedTransitionIntent({ name: handlerName, contexts: suppliedParams });
51951
+ var intent = new NamedTransitionIntent({
51952
+ name: handlerName,
51953
+ contexts: suppliedParams
51954
+ });
52166
51955
  var state = intent.applyToState(this.state, this.recognizer, this.getHandler, null, this.getSerializer);
52167
51956
  var params = {};
52168
51957
 
@@ -52249,7 +52038,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
52249
52038
 
52250
52039
  trigger: function () /*name*/{
52251
52040
  var args = slice.call(arguments);
52252
- trigger(this, this.currentHandlerInfos, false, args);
52041
+ _trigger(this, this.currentHandlerInfos, false, args);
52253
52042
  },
52254
52043
 
52255
52044
  /**
@@ -52267,12 +52056,11 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
52267
52056
  function fireQueryParamDidChange(router, newState, queryParamChangelist) {
52268
52057
  // If queryParams changed trigger event
52269
52058
  if (queryParamChangelist) {
52270
-
52271
52059
  // This is a little hacky but we need some way of storing
52272
52060
  // changed query params given that no activeTransition
52273
52061
  // is guaranteed to have occurred.
52274
52062
  router._changedQueryParams = queryParamChangelist.all;
52275
- trigger(router, newState.handlerInfos, true, ['queryParamsDidChange', queryParamChangelist.changed, queryParamChangelist.all, queryParamChangelist.removed]);
52063
+ _trigger(router, newState.handlerInfos, true, ['queryParamsDidChange', queryParamChangelist.changed, queryParamChangelist.all, queryParamChangelist.removed]);
52276
52064
  router._changedQueryParams = null;
52277
52065
  }
52278
52066
  }
@@ -52546,9 +52334,8 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
52546
52334
  to update the router's array of `currentHandlerInfos`.
52547
52335
  */
52548
52336
  function finalizeTransition(transition, newState) {
52549
-
52550
52337
  try {
52551
- log(transition.router, transition.sequence, "Resolved all models on destination route; finalizing transition.");
52338
+ _log(transition.router, transition.sequence, 'Resolved all models on destination route; finalizing transition.');
52552
52339
 
52553
52340
  var router = transition.router,
52554
52341
  handlerInfos = newState.handlerInfos;
@@ -52568,13 +52355,13 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
52568
52355
  transition.isActive = false;
52569
52356
  router.activeTransition = null;
52570
52357
 
52571
- trigger(router, router.currentHandlerInfos, true, ['didTransition']);
52358
+ _trigger(router, router.currentHandlerInfos, true, ['didTransition']);
52572
52359
 
52573
52360
  if (router.didTransition) {
52574
52361
  router.didTransition(router.currentHandlerInfos);
52575
52362
  }
52576
52363
 
52577
- log(router, transition.sequence, "TRANSITION COMPLETE.");
52364
+ _log(router, transition.sequence, 'TRANSITION COMPLETE.');
52578
52365
 
52579
52366
  // Resolve with the final handler.
52580
52367
  return handlerInfos[handlerInfos.length - 1].handler;
@@ -52613,8 +52400,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
52613
52400
 
52614
52401
  var intent;
52615
52402
  if (args.length === 0) {
52616
-
52617
- log(router, "Updating query params");
52403
+ _log(router, 'Updating query params');
52618
52404
 
52619
52405
  // A query param update is really just a transition
52620
52406
  // into the route you're already on.
@@ -52625,12 +52411,10 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
52625
52411
  queryParams: queryParams
52626
52412
  });
52627
52413
  } else if (name.charAt(0) === '/') {
52628
-
52629
- log(router, "Attempting URL transition to " + name);
52414
+ _log(router, 'Attempting URL transition to ' + name);
52630
52415
  intent = new URLTransitionIntent({ url: name });
52631
52416
  } else {
52632
-
52633
- log(router, "Attempting transition to " + name);
52417
+ _log(router, 'Attempting transition to ' + name);
52634
52418
  intent = new NamedTransitionIntent({
52635
52419
  name: args[0],
52636
52420
  contexts: slice.call(args, 1),
@@ -52712,7 +52496,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
52712
52496
  }
52713
52497
 
52714
52498
  var finalQueryParamsArray = [];
52715
- trigger(router, resolvedHandlers, true, ['finalizeQueryParamChange', newQueryParams, finalQueryParamsArray, transition]);
52499
+ _trigger(router, resolvedHandlers, true, ['finalizeQueryParamChange', newQueryParams, finalQueryParamsArray, transition]);
52716
52500
 
52717
52501
  if (transition) {
52718
52502
  transition._visibleQueryParams = {};
@@ -52732,9 +52516,6 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
52732
52516
  function notifyExistingHandlers(router, newState, newTransition) {
52733
52517
  var oldHandlers = router.state.handlerInfos,
52734
52518
  changing = [],
52735
- leavingIndex = null,
52736
- leaving,
52737
- leavingChecker,
52738
52519
  i,
52739
52520
  oldHandlerLen,
52740
52521
  oldHandler,
@@ -52746,7 +52527,6 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
52746
52527
  newHandler = newState.handlerInfos[i];
52747
52528
 
52748
52529
  if (!newHandler || oldHandler.name !== newHandler.name) {
52749
- leavingIndex = i;
52750
52530
  break;
52751
52531
  }
52752
52532
 
@@ -52755,19 +52535,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
52755
52535
  }
52756
52536
  }
52757
52537
 
52758
- if (leavingIndex !== null) {
52759
- leaving = oldHandlers.slice(leavingIndex, oldHandlerLen);
52760
- leavingChecker = function (name) {
52761
- for (var h = 0, len = leaving.length; h < len; h++) {
52762
- if (leaving[h].name === name) {
52763
- return true;
52764
- }
52765
- }
52766
- return false;
52767
- };
52768
- }
52769
-
52770
- trigger(router, oldHandlers, true, ['willTransition', newTransition]);
52538
+ _trigger(router, oldHandlers, true, ['willTransition', newTransition]);
52771
52539
 
52772
52540
  if (router.willTransition) {
52773
52541
  router.willTransition(oldHandlers, newState.handlerInfos, newTransition);
@@ -52775,7 +52543,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
52775
52543
  }
52776
52544
 
52777
52545
  exports.Transition = Transition;
52778
- exports.default = Router$1;
52546
+ exports.default = Router;
52779
52547
  });
52780
52548
  enifed('rsvp', ['exports', 'ember-babel', 'node-module'], function (exports, _emberBabel, _nodeModule) {
52781
52549
  'use strict';