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;
@@ -5307,15 +5307,14 @@ enifed('@glimmer/runtime', ['exports', '@glimmer/util', '@glimmer/reference', '@
5307
5307
  value;
5308
5308
  var partialSymbols = partial.symbolTable.symbols;
5309
5309
  var outerScope = vm.scope();
5310
- var evalScope = outerScope.getEvalScope();
5311
5310
  var partialScope = vm.pushRootScope(partialSymbols.length, false);
5312
5311
  partialScope.bindCallerScope(outerScope.getCallerScope());
5313
- partialScope.bindEvalScope(evalScope);
5312
+ partialScope.bindEvalScope(outerScope.getEvalScope());
5314
5313
  partialScope.bindSelf(outerScope.getSelf());
5315
5314
  var evalInfo = this.evalInfo,
5316
5315
  outerSymbols = this.outerSymbols;
5317
5316
 
5318
- var locals = Object.create(outerScope.getPartialMap());
5317
+ var locals = (0, _util.dict)();
5319
5318
  for (i = 0; i < evalInfo.length; i++) {
5320
5319
  slot = evalInfo[i];
5321
5320
  name = outerSymbols[slot - 1];
@@ -5323,14 +5322,13 @@ enifed('@glimmer/runtime', ['exports', '@glimmer/util', '@glimmer/reference', '@
5323
5322
 
5324
5323
  locals[name] = ref;
5325
5324
  }
5326
- if (evalScope) {
5327
- for (_i2 = 0; _i2 < partialSymbols.length; _i2++) {
5328
- _name = partialSymbols[_i2];
5329
- symbol = _i2 + 1;
5330
- value = evalScope[_name];
5325
+ var evalScope = outerScope.getEvalScope();
5326
+ for (_i2 = 0; _i2 < partialSymbols.length; _i2++) {
5327
+ _name = partialSymbols[_i2];
5328
+ symbol = _i2 + 1;
5329
+ value = evalScope[_name];
5331
5330
 
5332
- if (value !== undefined) partialScope.bind(symbol, value);
5333
- }
5331
+ if (value !== undefined) partialScope.bind(symbol, value);
5334
5332
  }
5335
5333
  partialScope.bindPartialMap(locals);
5336
5334
  vm.pushFrame();
@@ -10451,10 +10449,10 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug'], function (exports
10451
10449
  this.isDestroyed = true;
10452
10450
  },
10453
10451
  reset: function (fullName) {
10454
- if (fullName !== undefined) {
10455
- resetMember(this, this.registry.normalize(fullName));
10456
- } else {
10452
+ if (fullName === undefined) {
10457
10453
  resetCache(this);
10454
+ } else {
10455
+ resetMember(this, this.registry.normalize(fullName));
10458
10456
  }
10459
10457
  },
10460
10458
  ownerInjection: function () {
@@ -10520,7 +10518,9 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug'], function (exports
10520
10518
 
10521
10519
  function lookup(container, fullName) {
10522
10520
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
10523
- expandedFullName;
10521
+ expandedFullName,
10522
+ cacheKey,
10523
+ cached;
10524
10524
 
10525
10525
  if (options.source) {
10526
10526
  expandedFullName = container.registry.expandLocalLookup(fullName, options);
@@ -10533,10 +10533,13 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug'], function (exports
10533
10533
  fullName = expandedFullName;
10534
10534
  }
10535
10535
 
10536
- var cacheKey = container._resolverCacheKey(fullName, options);
10537
- var cached = container.cache[cacheKey];
10538
- if (cached !== undefined && options.singleton !== false) {
10539
- return cached;
10536
+ if (options.singleton !== false) {
10537
+ cacheKey = container._resolverCacheKey(fullName, options);
10538
+ cached = container.cache[cacheKey];
10539
+
10540
+ if (cached !== undefined) {
10541
+ return cached;
10542
+ }
10540
10543
  }
10541
10544
 
10542
10545
  return instantiateFactory(container, fullName, options);
@@ -10571,17 +10574,18 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug'], function (exports
10571
10574
  }
10572
10575
 
10573
10576
  function instantiateFactory(container, fullName, options) {
10574
- var factoryManager = container.factoryFor(fullName);
10577
+ var factoryManager = container.factoryFor(fullName),
10578
+ cacheKey;
10575
10579
 
10576
10580
  if (factoryManager === undefined) {
10577
10581
  return;
10578
10582
  }
10579
10583
 
10580
- var cacheKey = container._resolverCacheKey(fullName, options);
10581
-
10582
10584
  // SomeClass { singleton: true, instantiate: true } | { singleton: true } | { instantiate: true } | {}
10583
10585
  // By default majority of objects fall into this case
10584
10586
  if (isSingletonInstance(container, fullName, options)) {
10587
+ cacheKey = container._resolverCacheKey(fullName, options);
10588
+
10585
10589
  return container.cache[cacheKey] = factoryManager.create();
10586
10590
  }
10587
10591
 
@@ -10598,22 +10602,14 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug'], function (exports
10598
10602
  throw new Error('Could not create factory');
10599
10603
  }
10600
10604
 
10601
- function markInjectionsAsDynamic(injections) {
10602
- injections._dynamic = true;
10603
- }
10604
-
10605
- function areInjectionsNotDynamic(injections) {
10606
- return injections._dynamic !== true;
10607
- }
10608
-
10609
10605
  function buildInjections() /* container, ...injections */{
10610
10606
  var hash = {},
10611
10607
  container,
10612
10608
  injections,
10613
10609
  injection,
10614
10610
  i,
10615
- markAsDynamic,
10616
10611
  _i;
10612
+ var isDynamic = false;
10617
10613
 
10618
10614
  if (arguments.length > 1) {
10619
10615
  container = arguments[0];
@@ -10627,22 +10623,16 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug'], function (exports
10627
10623
  }
10628
10624
  }
10629
10625
 
10630
- markAsDynamic = false;
10631
-
10632
10626
  for (_i = 0; _i < injections.length; _i++) {
10633
10627
  injection = injections[_i];
10634
10628
  hash[injection.property] = lookup(container, injection.fullName);
10635
- if (!markAsDynamic) {
10636
- markAsDynamic = !isSingleton(container, injection.fullName);
10629
+ if (!isDynamic) {
10630
+ isDynamic = !isSingleton(container, injection.fullName);
10637
10631
  }
10638
10632
  }
10639
-
10640
- if (markAsDynamic) {
10641
- markInjectionsAsDynamic(hash);
10642
- }
10643
10633
  }
10644
10634
 
10645
- return hash;
10635
+ return { injections: hash, isDynamic: isDynamic };
10646
10636
  }
10647
10637
 
10648
10638
  function injectionsFor(container, fullName) {
@@ -10650,9 +10640,7 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug'], function (exports
10650
10640
  var splitName = fullName.split(':');
10651
10641
  var type = splitName[0];
10652
10642
 
10653
- var injections = buildInjections(container, registry.getTypeInjections(type), registry.getInjections(fullName));
10654
-
10655
- return injections;
10643
+ return buildInjections(container, registry.getTypeInjections(type), registry.getInjections(fullName));
10656
10644
  }
10657
10645
 
10658
10646
  function destroyDestroyables(container) {
@@ -10667,7 +10655,7 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug'], function (exports
10667
10655
  value = cache[key];
10668
10656
 
10669
10657
 
10670
- if (isInstantiatable(container, key) && value.destroy) {
10658
+ if (value.destroy) {
10671
10659
  value.destroy();
10672
10660
  }
10673
10661
  }
@@ -10675,7 +10663,8 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug'], function (exports
10675
10663
 
10676
10664
  function resetCache(container) {
10677
10665
  destroyDestroyables(container);
10678
- container.cache.dict = (0, _emberUtils.dictionary)(null);
10666
+ container.cache = (0, _emberUtils.dictionary)(null);
10667
+ container.factoryManagerCache = (0, _emberUtils.dictionary)(null);
10679
10668
  }
10680
10669
 
10681
10670
  function resetMember(container, fullName) {
@@ -10705,7 +10694,7 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug'], function (exports
10705
10694
  }
10706
10695
 
10707
10696
  FactoryManager.prototype.toString = function () {
10708
- if (!this.madeToString) {
10697
+ if (this.madeToString === undefined) {
10709
10698
  this.madeToString = this.container.registry.makeToString(this.class, this.fullName);
10710
10699
  }
10711
10700
 
@@ -10713,16 +10702,23 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug'], function (exports
10713
10702
  };
10714
10703
 
10715
10704
  FactoryManager.prototype.create = function () {
10716
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10705
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
10706
+ _injectionsFor,
10707
+ injections,
10708
+ isDynamic;
10709
+
10710
+ var injectionsCache = this.injections;
10711
+ if (injectionsCache === undefined) {
10712
+ _injectionsFor = injectionsFor(this.container, this.normalizedName), injections = _injectionsFor.injections, isDynamic = _injectionsFor.isDynamic;
10717
10713
 
10718
- var injections = this.injections;
10719
- if (injections === undefined) {
10720
- injections = injectionsFor(this.container, this.normalizedName);
10721
- if (areInjectionsNotDynamic(injections)) {
10714
+
10715
+ injectionsCache = injections;
10716
+ if (!isDynamic) {
10722
10717
  this.injections = injections;
10723
10718
  }
10724
10719
  }
10725
- var props = (0, _emberUtils.assign)({}, injections, options);
10720
+
10721
+ var props = (0, _emberUtils.assign)({}, injectionsCache, options);
10726
10722
 
10727
10723
  if (!this.class.create) {
10728
10724
  throw new Error('Failed to create an instance of \'' + this.normalizedName + '\'. Most likely an improperly defined class or' + ' an invalid module export.');
@@ -10990,10 +10986,7 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug'], function (exports
10990
10986
 
10991
10987
  var injections = this._typeInjections[type] || (this._typeInjections[type] = []);
10992
10988
 
10993
- injections.push({
10994
- property: property,
10995
- fullName: fullName
10996
- });
10989
+ injections.push({ property: property, fullName: fullName });
10997
10990
  },
10998
10991
  injection: function (fullName, property, injectionName) {
10999
10992
  this.validateFullName(injectionName);
@@ -11009,10 +11002,7 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug'], function (exports
11009
11002
 
11010
11003
  var injections = this._injections[normalizedName] || (this._injections[normalizedName] = []);
11011
11004
 
11012
- injections.push({
11013
- property: property,
11014
- fullName: normalizedInjectionName
11015
- });
11005
+ injections.push({ property: property, fullName: normalizedInjectionName });
11016
11006
  },
11017
11007
  knownForType: function (type) {
11018
11008
  var fallbackKnown = void 0,
@@ -11053,22 +11043,6 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug'], function (exports
11053
11043
  isValidFullName: function (fullName) {
11054
11044
  return VALID_FULL_NAME_REGEXP.test(fullName);
11055
11045
  },
11056
- normalizeInjectionsHash: function (hash) {
11057
- var injections = [];
11058
-
11059
- for (var key in hash) {
11060
- if (hash.hasOwnProperty(key)) {
11061
- false && !this.validateFullName(hash[key]) && (0, _emberDebug.assert)('Expected a proper full name, given \'' + hash[key] + '\'', this.validateFullName(hash[key]));
11062
-
11063
- injections.push({
11064
- property: key,
11065
- fullName: hash[key]
11066
- });
11067
- }
11068
- }
11069
-
11070
- return injections;
11071
- },
11072
11046
  getInjections: function (fullName) {
11073
11047
  var injections = this._injections[fullName] || [];
11074
11048
  if (this.fallback) {
@@ -11085,6 +11059,25 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug'], function (exports
11085
11059
  },
11086
11060
  resolverCacheKey: function (name, options) {
11087
11061
  return name;
11062
+ },
11063
+ expandLocalLookup: function (fullName, options) {
11064
+ var normalizedFullName, normalizedSource;
11065
+
11066
+ if (this.resolver && this.resolver.expandLocalLookup) {
11067
+ false && !this.validateFullName(fullName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName));
11068
+ false && !(options && options.source) && (0, _emberDebug.assert)('options.source must be provided to expandLocalLookup', options && options.source);
11069
+ false && !this.validateFullName(options.source) && (0, _emberDebug.assert)('options.source must be a proper full name', this.validateFullName(options.source));
11070
+
11071
+ normalizedFullName = this.normalize(fullName);
11072
+ normalizedSource = this.normalize(options.source);
11073
+
11074
+
11075
+ return expandLocalLookup(this, normalizedFullName, normalizedSource);
11076
+ } else if (this.fallback) {
11077
+ return this.fallback.expandLocalLookup(fullName, options);
11078
+ } else {
11079
+ return null;
11080
+ }
11088
11081
  }
11089
11082
  };
11090
11083
 
@@ -11096,44 +11089,6 @@ enifed('container', ['exports', 'ember-utils', 'ember-debug'], function (exports
11096
11089
  };
11097
11090
  }
11098
11091
 
11099
- /**
11100
- Given a fullName and a source fullName returns the fully resolved
11101
- fullName. Used to allow for local lookup.
11102
-
11103
- ```javascript
11104
- let registry = new Registry();
11105
-
11106
- // the twitter factory is added to the module system
11107
- registry.expandLocalLookup('component:post-title', { source: 'template:post' }) // => component:post/post-title
11108
- ```
11109
-
11110
- @private
11111
- @method expandLocalLookup
11112
- @param {String} fullName
11113
- @param {Object} [options]
11114
- @param {String} [options.source] the fullname of the request source (used for local lookups)
11115
- @return {String} fullName
11116
- */
11117
- Registry.prototype.expandLocalLookup = function (fullName, options) {
11118
- var normalizedFullName, normalizedSource;
11119
-
11120
- if (this.resolver && this.resolver.expandLocalLookup) {
11121
- false && !this.validateFullName(fullName) && (0, _emberDebug.assert)('fullName must be a proper full name', this.validateFullName(fullName));
11122
- false && !(options && options.source) && (0, _emberDebug.assert)('options.source must be provided to expandLocalLookup', options && options.source);
11123
- false && !this.validateFullName(options.source) && (0, _emberDebug.assert)('options.source must be a proper full name', this.validateFullName(options.source));
11124
-
11125
- normalizedFullName = this.normalize(fullName);
11126
- normalizedSource = this.normalize(options.source);
11127
-
11128
-
11129
- return expandLocalLookup(this, normalizedFullName, normalizedSource);
11130
- } else if (this.fallback) {
11131
- return this.fallback.expandLocalLookup(fullName, options);
11132
- } else {
11133
- return null;
11134
- }
11135
- };
11136
-
11137
11092
  function expandLocalLookup(registry, normalizedName, normalizedSource) {
11138
11093
  var cache = registry._localLookupCache;
11139
11094
  var normalizedNameCache = cache[normalizedName];
@@ -11523,11 +11478,9 @@ enifed('ember-application/initializers/dom-templates', ['require', 'ember-glimme
11523
11478
  }
11524
11479
  });
11525
11480
  });
11526
- 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) {
11481
+ 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) {
11527
11482
  'use strict';
11528
11483
 
11529
- var BootOptions = void 0;
11530
-
11531
11484
  /**
11532
11485
  The `ApplicationInstance` encapsulates all of the stateful aspects of a
11533
11486
  running `Application`.
@@ -11672,8 +11625,7 @@ enifed('ember-application/system/application-instance', ['exports', 'ember-utils
11672
11625
  return dispatcher;
11673
11626
  },
11674
11627
  getURL: function () {
11675
- var router = (0, _emberMetal.get)(this, 'router');
11676
- return (0, _emberMetal.get)(router, 'url');
11628
+ return (0, _emberMetal.get)(this, 'router.url');
11677
11629
  },
11678
11630
  visit: function (url) {
11679
11631
  var _this = this;
@@ -11759,7 +11711,7 @@ enifed('ember-application/system/application-instance', ['exports', 'ember-utils
11759
11711
  @namespace ApplicationInstance
11760
11712
  @public
11761
11713
  */
11762
- BootOptions = function () {
11714
+ function BootOptions() {
11763
11715
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
11764
11716
 
11765
11717
  /**
@@ -11901,7 +11853,7 @@ enifed('ember-application/system/application-instance', ['exports', 'ember-utils
11901
11853
  if (options.isInteractive !== undefined) {
11902
11854
  this.isInteractive = !!options.isInteractive;
11903
11855
  }
11904
- };
11856
+ }
11905
11857
 
11906
11858
  BootOptions.prototype.toEnvironment = function () {
11907
11859
  var env = (0, _emberUtils.assign)({}, _emberEnvironment.environment);
@@ -12303,7 +12255,7 @@ enifed('ember-application/system/application', ['exports', 'ember-babel', 'ember
12303
12255
  // boot promise exists for book-keeping purposes: if anything went wrong in
12304
12256
  // the boot process, we need to store the error as a rejection on the boot
12305
12257
  // promise so that a future caller of `boot()` can tell what failed.
12306
- var defer = this._bootResolver = new _emberRuntime.RSVP.defer();
12258
+ var defer = this._bootResolver = _emberRuntime.RSVP.defer();
12307
12259
  this._bootPromise = defer.promise;
12308
12260
 
12309
12261
  try {
@@ -16384,7 +16336,7 @@ enifed('ember-glimmer/components/link-to', ['exports', 'ember-console', 'ember-d
16384
16336
  }
16385
16337
  }),
16386
16338
 
16387
- _computeActive: function (routerState) {
16339
+ _isActive: function (routerState) {
16388
16340
  if ((0, _emberMetal.get)(this, 'loading')) {
16389
16341
  return false;
16390
16342
  }
@@ -16405,7 +16357,7 @@ enifed('ember-glimmer/components/link-to', ['exports', 'ember-console', 'ember-d
16405
16357
 
16406
16358
  for (i = 0; i < currentWhen.length; i++) {
16407
16359
  if (routing.isActiveForRoute(models, resolvedQueryParams, currentWhen[i], routerState, isCurrentWhenSpecified)) {
16408
- return (0, _emberMetal.get)(this, 'activeClass');
16360
+ return true;
16409
16361
  }
16410
16362
  }
16411
16363
 
@@ -16423,13 +16375,21 @@ enifed('ember-glimmer/components/link-to', ['exports', 'ember-console', 'ember-d
16423
16375
  @property active
16424
16376
  @private
16425
16377
  */
16426
- active: (0, _emberMetal.computed)('attrs.params', '_routing.currentState', function () {
16378
+ active: (0, _emberMetal.computed)('attrs.params', '_active', function () {
16427
16379
  var currentState = (0, _emberMetal.get)(this, '_routing.currentState');
16428
16380
  if (!currentState) {
16429
16381
  return false;
16430
16382
  }
16431
16383
 
16432
- return this._computeActive(currentState);
16384
+ return this.get('_active') ? (0, _emberMetal.get)(this, 'activeClass') : false;
16385
+ }),
16386
+
16387
+ _active: (0, _emberMetal.computed)('_routing.currentState', function () {
16388
+ var currentState = (0, _emberMetal.get)(this, '_routing.currentState');
16389
+ if (!currentState) {
16390
+ return false;
16391
+ }
16392
+ return this._isActive(currentState);
16433
16393
  }),
16434
16394
 
16435
16395
  willBeActive: (0, _emberMetal.computed)('_routing.targetState', function () {
@@ -16439,11 +16399,11 @@ enifed('ember-glimmer/components/link-to', ['exports', 'ember-console', 'ember-d
16439
16399
  return;
16440
16400
  }
16441
16401
 
16442
- return !!this._computeActive(targetState);
16402
+ return this._isActive(targetState);
16443
16403
  }),
16444
16404
 
16445
16405
  transitioningIn: (0, _emberMetal.computed)('active', 'willBeActive', function () {
16446
- if ((0, _emberMetal.get)(this, 'willBeActive') === true && !(0, _emberMetal.get)(this, 'active')) {
16406
+ if ((0, _emberMetal.get)(this, 'willBeActive') === true && !(0, _emberMetal.get)(this, '_active')) {
16447
16407
  return 'ember-transitioning-in';
16448
16408
  } else {
16449
16409
  return false;
@@ -16451,7 +16411,7 @@ enifed('ember-glimmer/components/link-to', ['exports', 'ember-console', 'ember-d
16451
16411
  }),
16452
16412
 
16453
16413
  transitioningOut: (0, _emberMetal.computed)('active', 'willBeActive', function () {
16454
- if ((0, _emberMetal.get)(this, 'willBeActive') === false && (0, _emberMetal.get)(this, 'active')) {
16414
+ if ((0, _emberMetal.get)(this, 'willBeActive') === false && (0, _emberMetal.get)(this, '_active')) {
16455
16415
  return 'ember-transitioning-out';
16456
16416
  } else {
16457
16417
  return false;
@@ -18314,7 +18274,7 @@ enifed('ember-glimmer/helpers/each-in', ['exports', 'ember-utils'], function (ex
18314
18274
  */
18315
18275
  var EACH_IN_REFERENCE = (0, _emberUtils.symbol)('EACH_IN');
18316
18276
  });
18317
- enifed('ember-glimmer/helpers/get', ['exports', 'ember-babel', 'ember-metal', 'ember-glimmer/utils/references', '@glimmer/reference'], function (exports, _emberBabel, _emberMetal, _references, _reference) {
18277
+ 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) {
18318
18278
  'use strict';
18319
18279
 
18320
18280
  exports.default = function (vm, args) {
@@ -18344,7 +18304,7 @@ enifed('ember-glimmer/helpers/get', ['exports', 'ember-babel', 'ember-metal', 'e
18344
18304
  _this.pathReference = pathReference;
18345
18305
 
18346
18306
  _this.lastPath = null;
18347
- _this.innerReference = null;
18307
+ _this.innerReference = _runtime.NULL_REFERENCE;
18348
18308
 
18349
18309
  var innerTag = _this.innerTag = new _reference.UpdatableTag(_reference.CONSTANT_TAG);
18350
18310
 
@@ -18366,19 +18326,21 @@ enifed('ember-glimmer/helpers/get', ['exports', 'ember-babel', 'ember-metal', 'e
18366
18326
 
18367
18327
 
18368
18328
  if (pathType === 'string') {
18369
- innerReference = this.innerReference = (0, _reference.referenceFromParts)(this.sourceReference, path.split('.'));
18329
+ innerReference = (0, _reference.referenceFromParts)(this.sourceReference, path.split('.'));
18370
18330
  } else if (pathType === 'number') {
18371
- innerReference = this.innerReference = this.sourceReference.get('' + path);
18331
+ innerReference = this.sourceReference.get('' + path);
18372
18332
  }
18373
18333
 
18374
18334
  innerTag.update(innerReference.tag);
18375
18335
  } else {
18376
- innerReference = this.innerReference = null;
18336
+ innerReference = _runtime.NULL_REFERENCE;
18377
18337
  innerTag.update(_reference.CONSTANT_TAG);
18378
18338
  }
18339
+
18340
+ this.innerReference = innerReference;
18379
18341
  }
18380
18342
 
18381
- return innerReference ? innerReference.value() : null;
18343
+ return innerReference.value();
18382
18344
  };
18383
18345
 
18384
18346
  GetHelperReference.prototype[_references.UPDATE] = function (value) {
@@ -19677,9 +19639,6 @@ enifed('ember-glimmer/renderer', ['exports', 'ember-babel', 'ember-glimmer/utils
19677
19639
  } finally {
19678
19640
  if (!completedWithoutError) {
19679
19641
  this._lastRevision = _reference.CURRENT_TAG.value();
19680
- if (this._env.inTransaction === true) {
19681
- this._env.commit();
19682
- }
19683
19642
  }
19684
19643
  this._isRenderingRoots = false;
19685
19644
  }
@@ -20130,8 +20089,7 @@ enifed('ember-glimmer/syntax/input', ['exports', 'ember-debug', 'ember-glimmer/u
20130
20089
 
20131
20090
  function (name, params, hash, builder) {
20132
20091
  var keys = void 0,
20133
- typeArg,
20134
- definition;
20092
+ typeArg;
20135
20093
  var values = void 0;
20136
20094
  var typeIndex = -1;
20137
20095
  var valueIndex = -1;
@@ -20150,31 +20108,23 @@ enifed('ember-glimmer/syntax/input', ['exports', 'ember-debug', 'ember-glimmer/u
20150
20108
  if (typeIndex > -1) {
20151
20109
  typeArg = values[typeIndex];
20152
20110
 
20153
- if (!Array.isArray(typeArg)) {
20154
- if (typeArg === 'checkbox') {
20155
- false && !(valueIndex === -1) && (0, _emberDebug.assert)('{{input type=\'checkbox\'}} does not support setting `value=someBooleanValue`; ' + 'you must use `checked=someBooleanValue` instead.', valueIndex === -1);
20156
-
20157
- (0, _bindings.wrapComponentClassAttribute)(hash);
20111
+ if (Array.isArray(typeArg)) {
20112
+ return (0, _dynamicComponent.dynamicComponentMacro)(params, hash, null, null, builder);
20113
+ } else if (typeArg === 'checkbox') {
20114
+ false && !(valueIndex === -1) && (0, _emberDebug.assert)('{{input type=\'checkbox\'}} does not support setting `value=someBooleanValue`; ' + 'you must use `checked=someBooleanValue` instead.', valueIndex === -1);
20158
20115
 
20159
- definition = builder.env.getComponentDefinition('-checkbox', builder.meta.templateMeta);
20160
-
20161
- builder.component.static(definition, [params, (0, _utils.hashToArgs)(hash), null, null]);
20162
- return true;
20163
- } else {
20164
- return buildTextFieldSyntax(params, hash, builder);
20165
- }
20116
+ (0, _bindings.wrapComponentClassAttribute)(hash);
20117
+ return buildSyntax('-checkbox', params, hash, builder);
20166
20118
  }
20167
- } else {
20168
- return buildTextFieldSyntax(params, hash, builder);
20169
20119
  }
20170
20120
 
20171
- return (0, _dynamicComponent.dynamicComponentMacro)(params, hash, null, null, builder);
20121
+ return buildSyntax('-text-field', params, hash, builder);
20172
20122
  };
20173
20123
  /**
20174
20124
  @module ember
20175
20125
  */
20176
- function buildTextFieldSyntax(params, hash, builder) {
20177
- var definition = builder.env.getComponentDefinition('-text-field', builder.meta.templateMeta);
20126
+ function buildSyntax(type, params, hash, builder) {
20127
+ var definition = builder.env.getComponentDefinition(type, builder.meta.templateMeta);
20178
20128
  builder.component.static(definition, [params, (0, _utils.hashToArgs)(hash), null, null]);
20179
20129
  return true;
20180
20130
  }
@@ -21060,7 +21010,6 @@ enifed('ember-glimmer/utils/iterable', ['exports', 'ember-babel', 'ember-utils',
21060
21010
  var _this2 = (0, _emberBabel.possibleConstructorReturn)(this, _ArrayIterator2.call(this, values, keyFor));
21061
21011
 
21062
21012
  _this2.keys = keys;
21063
- _this2.length = keys.length;
21064
21013
  return _this2;
21065
21014
  }
21066
21015
 
@@ -21068,10 +21017,6 @@ enifed('ember-glimmer/utils/iterable', ['exports', 'ember-babel', 'ember-utils',
21068
21017
  return this.keys[position];
21069
21018
  };
21070
21019
 
21071
- ObjectKeysIterator.prototype.getValue = function (position) {
21072
- return this.array[position];
21073
- };
21074
-
21075
21020
  return ObjectKeysIterator;
21076
21021
  }(ArrayIterator);
21077
21022
 
@@ -21119,7 +21064,7 @@ enifed('ember-glimmer/utils/iterable', ['exports', 'ember-babel', 'ember-utils',
21119
21064
 
21120
21065
  var typeofIterable = typeof iterable;
21121
21066
 
21122
- if (iterable && (typeofIterable === 'object' || typeofIterable === 'function')) {
21067
+ if (iterable !== null && (typeofIterable === 'object' || typeofIterable === 'function')) {
21123
21068
  keys = Object.keys(iterable);
21124
21069
  values = keys.map(function (key) {
21125
21070
  return iterable[key];
@@ -21171,7 +21116,7 @@ enifed('ember-glimmer/utils/iterable', ['exports', 'ember-babel', 'ember-utils',
21171
21116
 
21172
21117
  valueTag.update((0, _emberMetal.tagForProperty)(iterable, '[]'));
21173
21118
 
21174
- if (!iterable || typeof iterable !== 'object') {
21119
+ if (iterable === null || typeof iterable !== 'object') {
21175
21120
  return EMPTY_ITERATOR;
21176
21121
  }
21177
21122
 
@@ -21531,19 +21476,19 @@ enifed('ember-glimmer/utils/references', ['exports', 'ember-babel', 'ember-utils
21531
21476
  (0, _emberBabel.inherits)(SimpleHelperReference, _CachedReference2);
21532
21477
 
21533
21478
  SimpleHelperReference.create = function (helper, args) {
21534
- var positional, named, positionalValue, namedValue, _result;
21479
+ var positional, named, positionalValue, namedValue, result;
21535
21480
 
21536
21481
  if ((0, _reference.isConst)(args)) {
21537
21482
  positional = args.positional, named = args.named;
21538
21483
  positionalValue = positional.value();
21539
21484
  namedValue = named.value();
21540
- _result = helper(positionalValue, namedValue);
21485
+ result = helper(positionalValue, namedValue);
21541
21486
 
21542
21487
 
21543
- if (typeof _result === 'object' && _result !== null || typeof _result === 'function') {
21544
- return new RootReference(_result);
21488
+ if (typeof result === 'object' && result !== null || typeof result === 'function') {
21489
+ return new RootReference(result);
21545
21490
  } else {
21546
- return _runtime.PrimitiveReference.create(_result);
21491
+ return _runtime.PrimitiveReference.create(result);
21547
21492
  }
21548
21493
  } else {
21549
21494
  return new SimpleHelperReference(helper, args);
@@ -21640,7 +21585,7 @@ enifed('ember-glimmer/utils/references', ['exports', 'ember-babel', 'ember-utils
21640
21585
  }
21641
21586
 
21642
21587
  UnboundReference.create = function (value) {
21643
- if (typeof value === 'object' && value !== null || typeof result === 'function') {
21588
+ if (typeof value === 'object' && value !== null) {
21644
21589
  return new UnboundReference(value);
21645
21590
  } else {
21646
21591
  return _runtime.PrimitiveReference.create(value);
@@ -22338,7 +22283,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
22338
22283
  var meta$$1, i, target, method, flags;
22339
22284
 
22340
22285
  if (actions === undefined) {
22341
- meta$$1 = _meta || exports.peekMeta(obj);
22286
+ meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;
22342
22287
 
22343
22288
  actions = typeof meta$$1 === 'object' && meta$$1 !== null && meta$$1.matchingListeners(eventName);
22344
22289
  }
@@ -22407,9 +22352,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
22407
22352
  target,
22408
22353
  method;
22409
22354
  var meta$$1 = exports.peekMeta(obj);
22410
- var actions = meta$$1 && meta$$1.matchingListeners(eventName);
22355
+ var actions = meta$$1 !== undefined ? meta$$1.matchingListeners(eventName) : undefined;
22411
22356
 
22412
- if (!actions) {
22357
+ if (actions === undefined) {
22413
22358
  return ret;
22414
22359
  }
22415
22360
 
@@ -22466,7 +22411,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
22466
22411
  var meta$$1;
22467
22412
 
22468
22413
  if (typeof object === 'object' && object !== null) {
22469
- meta$$1 = _meta || meta(object);
22414
+ meta$$1 = _meta === undefined ? meta(object) : _meta;
22470
22415
 
22471
22416
  return meta$$1.writableTag(makeTag);
22472
22417
  } else {
@@ -22625,12 +22570,12 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
22625
22570
  @private
22626
22571
  */
22627
22572
  function propertyWillChange(obj, keyName, _meta) {
22628
- var meta$$1 = _meta || exports.peekMeta(obj);
22629
- if (meta$$1 && !meta$$1.isInitialized(obj)) {
22573
+ var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;
22574
+ if (meta$$1 !== undefined && !meta$$1.isInitialized(obj)) {
22630
22575
  return;
22631
22576
  }
22632
22577
 
22633
- var watching = meta$$1 && meta$$1.peekWatching(keyName) > 0;
22578
+ var watching = meta$$1 !== undefined && meta$$1.peekWatching(keyName) > 0;
22634
22579
  var possibleDesc = obj[keyName];
22635
22580
  var isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;
22636
22581
 
@@ -22663,8 +22608,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
22663
22608
  @private
22664
22609
  */
22665
22610
  function propertyDidChange(obj, keyName, _meta) {
22666
- var meta$$1 = _meta || exports.peekMeta(obj);
22667
- var hasMeta = !!meta$$1;
22611
+ var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta;
22612
+ var hasMeta = meta$$1 !== undefined;
22668
22613
 
22669
22614
  if (hasMeta && !meta$$1.isInitialized(obj)) {
22670
22615
  return;
@@ -23065,16 +23010,16 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
23065
23010
  }
23066
23011
  }
23067
23012
 
23068
- function watchKey(obj, keyName, meta$$1) {
23013
+ function watchKey(obj, keyName, _meta) {
23069
23014
  if (typeof obj !== 'object' || obj === null) {
23070
23015
  return;
23071
23016
  }
23072
23017
 
23073
- var m = meta$$1 || meta(obj),
23018
+ var meta$$1 = _meta === undefined ? meta(obj) : _meta,
23074
23019
  possibleDesc,
23075
23020
  isDescriptor;
23076
- var count = m.peekWatching(keyName) || 0;
23077
- m.writeWatching(keyName, count + 1);
23021
+ var count = meta$$1.peekWatching(keyName) || 0;
23022
+ meta$$1.writeWatching(keyName, count + 1);
23078
23023
 
23079
23024
  if (count === 0) {
23080
23025
  // activate watching first time
@@ -23082,10 +23027,10 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
23082
23027
  isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor;
23083
23028
 
23084
23029
  if (isDescriptor && possibleDesc.willWatch) {
23085
- possibleDesc.willWatch(obj, keyName);
23030
+ possibleDesc.willWatch(obj, keyName, meta$$1);
23086
23031
  }
23087
23032
 
23088
- if ('function' === typeof obj.willWatchProperty) {
23033
+ if (typeof obj.willWatchProperty === 'function') {
23089
23034
  obj.willWatchProperty(keyName);
23090
23035
  }
23091
23036
  }
@@ -23095,7 +23040,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
23095
23040
  if (typeof obj !== 'object' || obj === null) {
23096
23041
  return;
23097
23042
  }
23098
- var meta$$1 = _meta || exports.peekMeta(obj),
23043
+ var meta$$1 = _meta === undefined ? exports.peekMeta(obj) : _meta,
23099
23044
  possibleDesc,
23100
23045
  isDescriptor;
23101
23046
 
@@ -23113,10 +23058,10 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
23113
23058
 
23114
23059
 
23115
23060
  if (isDescriptor && possibleDesc.didUnwatch) {
23116
- possibleDesc.didUnwatch(obj, keyName);
23061
+ possibleDesc.didUnwatch(obj, keyName, meta$$1);
23117
23062
  }
23118
23063
 
23119
- if ('function' === typeof obj.didUnwatchProperty) {
23064
+ if (typeof obj.didUnwatchProperty === 'function') {
23120
23065
  obj.didUnwatchProperty(keyName);
23121
23066
  }
23122
23067
  } else if (count > 1) {
@@ -23132,7 +23077,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
23132
23077
  if (typeof obj !== 'object' || obj === null) {
23133
23078
  return;
23134
23079
  }
23135
- var m = meta$$1 || meta(obj);
23080
+ var m = meta$$1 === undefined ? meta(obj) : meta$$1;
23136
23081
  var counter = m.peekWatching(keyPath) || 0;
23137
23082
 
23138
23083
  m.writeWatching(keyPath, counter + 1);
@@ -23146,7 +23091,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
23146
23091
  if (typeof obj !== 'object' || obj === null) {
23147
23092
  return;
23148
23093
  }
23149
- var m = meta$$1 || exports.peekMeta(obj);
23094
+ var m = meta$$1 === undefined ? exports.peekMeta(obj) : meta$$1;
23095
+
23150
23096
  if (m === undefined) {
23151
23097
  return;
23152
23098
  }
@@ -24031,6 +23977,18 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
24031
23977
  };
24032
23978
  }
24033
23979
 
23980
+ /**
23981
+ Tears down the meta on an object so that it can be garbage collected.
23982
+ Multiple calls will have no effect.
23983
+
23984
+ @method deleteMeta
23985
+ @for Ember
23986
+ @param {Object} obj the object to destroy
23987
+ @return {void}
23988
+ @private
23989
+ */
23990
+
23991
+
24034
23992
  /**
24035
23993
  Retrieves the meta hash for an object. If `writable` is true ensures the
24036
23994
  hash is writable for this object as well.
@@ -24481,7 +24439,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
24481
24439
 
24482
24440
  function watcherCount(obj, key) {
24483
24441
  var meta$$1 = exports.peekMeta(obj);
24484
- return meta$$1 && meta$$1.peekWatching(key) || 0;
24442
+ return meta$$1 !== undefined && meta$$1.peekWatching(key) || 0;
24485
24443
  }
24486
24444
 
24487
24445
  function unwatch(obj, _keyPath, m) {
@@ -25082,8 +25040,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25082
25040
  */
25083
25041
  function cacheFor(obj, key) {
25084
25042
  var meta$$1 = exports.peekMeta(obj);
25085
- var cache = meta$$1 && meta$$1.source === obj && meta$$1.readableCache();
25086
- var ret = cache && cache[key];
25043
+ var cache = meta$$1 !== undefined ? meta$$1.source === obj && meta$$1.readableCache() : undefined;
25044
+ var ret = cache !== undefined ? cache[key] : undefined;
25087
25045
 
25088
25046
  if (ret === UNDEFINED) {
25089
25047
  return undefined;
@@ -25136,17 +25094,17 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
25136
25094
  };
25137
25095
 
25138
25096
  AliasedProperty.prototype.teardown = function (obj, keyName, meta$$1) {
25139
- if (meta$$1 && meta$$1.peekWatching(keyName)) {
25097
+ if (meta$$1.peekWatching(keyName)) {
25140
25098
  removeDependentKeys(this, obj, keyName, meta$$1);
25141
25099
  }
25142
25100
  };
25143
25101
 
25144
- AliasedProperty.prototype.willWatch = function (obj, keyName) {
25145
- addDependentKeys(this, obj, keyName, meta(obj));
25102
+ AliasedProperty.prototype.willWatch = function (obj, keyName, meta$$1) {
25103
+ addDependentKeys(this, obj, keyName, meta$$1);
25146
25104
  };
25147
25105
 
25148
- AliasedProperty.prototype.didUnwatch = function (obj, keyName) {
25149
- removeDependentKeys(this, obj, keyName, meta(obj));
25106
+ AliasedProperty.prototype.didUnwatch = function (obj, keyName, meta$$1) {
25107
+ removeDependentKeys(this, obj, keyName, meta$$1);
25150
25108
  };
25151
25109
 
25152
25110
  AliasedProperty.prototype.get = function (obj, keyName) {
@@ -26604,13 +26562,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26604
26562
  Map is mocked out to look like an Ember object, so you can do
26605
26563
  `EmberMap.create()` for symmetry with other Ember classes.
26606
26564
  */
26607
- function missingFunction(fn) {
26608
- throw new TypeError(Object.prototype.toString.call(fn) + ' is not a function');
26609
- }
26610
-
26611
- function missingNew(name) {
26612
- throw new TypeError('Constructor ' + name + ' requires \'new\'');
26613
- }
26614
26565
 
26615
26566
  function copyNull(obj) {
26616
26567
  var output = Object.create(null);
@@ -26644,37 +26595,35 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26644
26595
  @constructor
26645
26596
  @private
26646
26597
  */
26647
- function OrderedSet() {
26648
- if (this instanceof OrderedSet) {
26598
+
26599
+ var OrderedSet = function () {
26600
+ function OrderedSet() {
26601
+
26649
26602
  this.clear();
26650
- } else {
26651
- missingNew('OrderedSet');
26652
26603
  }
26653
- }
26654
26604
 
26655
- /**
26656
- @method create
26657
- @static
26658
- @return {Ember.OrderedSet}
26659
- @private
26660
- */
26661
- OrderedSet.create = function () {
26662
- var Constructor = this;
26605
+ /**
26606
+ @method create
26607
+ @static
26608
+ @return {Ember.OrderedSet}
26609
+ @private
26610
+ */
26663
26611
 
26664
- return new Constructor();
26665
- };
26612
+ OrderedSet.create = function () {
26613
+ var Constructor = this;
26614
+ return new Constructor();
26615
+ };
26666
26616
 
26667
- OrderedSet.prototype = {
26668
- constructor: OrderedSet,
26669
26617
  /**
26670
26618
  @method clear
26671
26619
  @private
26672
26620
  */
26673
- clear: function () {
26621
+
26622
+ OrderedSet.prototype.clear = function () {
26674
26623
  this.presenceSet = Object.create(null);
26675
26624
  this.list = [];
26676
26625
  this.size = 0;
26677
- },
26626
+ };
26678
26627
 
26679
26628
  /**
26680
26629
  @method add
@@ -26683,7 +26632,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26683
26632
  @return {Ember.OrderedSet}
26684
26633
  @private
26685
26634
  */
26686
- add: function (obj, _guid) {
26635
+
26636
+ OrderedSet.prototype.add = function (obj, _guid) {
26687
26637
  var guid = _guid || emberUtils.guidFor(obj);
26688
26638
  var presenceSet = this.presenceSet;
26689
26639
  var list = this.list;
@@ -26694,7 +26644,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26694
26644
  }
26695
26645
 
26696
26646
  return this;
26697
- },
26647
+ };
26698
26648
 
26699
26649
  /**
26700
26650
  @since 1.8.0
@@ -26704,7 +26654,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26704
26654
  @return {Boolean}
26705
26655
  @private
26706
26656
  */
26707
- delete: function (obj, _guid) {
26657
+
26658
+ OrderedSet.prototype.delete = function (obj, _guid) {
26708
26659
  var guid = _guid || emberUtils.guidFor(obj),
26709
26660
  index;
26710
26661
  var presenceSet = this.presenceSet;
@@ -26722,16 +26673,17 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26722
26673
  } else {
26723
26674
  return false;
26724
26675
  }
26725
- },
26676
+ };
26726
26677
 
26727
26678
  /**
26728
26679
  @method isEmpty
26729
26680
  @return {Boolean}
26730
26681
  @private
26731
26682
  */
26732
- isEmpty: function () {
26683
+
26684
+ OrderedSet.prototype.isEmpty = function () {
26733
26685
  return this.size === 0;
26734
- },
26686
+ };
26735
26687
 
26736
26688
  /**
26737
26689
  @method has
@@ -26739,7 +26691,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26739
26691
  @return {Boolean}
26740
26692
  @private
26741
26693
  */
26742
- has: function (obj) {
26694
+
26695
+ OrderedSet.prototype.has = function (obj) {
26743
26696
  if (this.size === 0) {
26744
26697
  return false;
26745
26698
  }
@@ -26748,7 +26701,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26748
26701
  var presenceSet = this.presenceSet;
26749
26702
 
26750
26703
  return presenceSet[guid] === true;
26751
- },
26704
+ };
26752
26705
 
26753
26706
  /**
26754
26707
  @method forEach
@@ -26756,10 +26709,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26756
26709
  @param self
26757
26710
  @private
26758
26711
  */
26759
- forEach: function (fn /*, ...thisArg*/) {
26760
- if (typeof fn !== 'function') {
26761
- missingFunction(fn);
26762
- }
26712
+
26713
+ OrderedSet.prototype.forEach = function (fn /*, ...thisArg*/) {
26714
+ false && !(typeof fn === 'function') && emberDebug.assert(Object.prototype.toString.call(fn) + ' is not a function', typeof fn === 'function');
26763
26715
 
26764
26716
  if (this.size === 0) {
26765
26717
  return;
@@ -26778,23 +26730,25 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26778
26730
  fn(list[_i]);
26779
26731
  }
26780
26732
  }
26781
- },
26733
+ };
26782
26734
 
26783
26735
  /**
26784
26736
  @method toArray
26785
26737
  @return {Array}
26786
26738
  @private
26787
26739
  */
26788
- toArray: function () {
26740
+
26741
+ OrderedSet.prototype.toArray = function () {
26789
26742
  return this.list.slice();
26790
- },
26743
+ };
26791
26744
 
26792
26745
  /**
26793
26746
  @method copy
26794
26747
  @return {Ember.OrderedSet}
26795
26748
  @private
26796
26749
  */
26797
- copy: function () {
26750
+
26751
+ OrderedSet.prototype.copy = function () {
26798
26752
  var Constructor = this.constructor;
26799
26753
  var set = new Constructor();
26800
26754
 
@@ -26803,8 +26757,10 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26803
26757
  set.size = this.size;
26804
26758
 
26805
26759
  return set;
26806
- }
26807
- };
26760
+ };
26761
+
26762
+ return OrderedSet;
26763
+ }();
26808
26764
 
26809
26765
  /**
26810
26766
  A Map stores values indexed by keys. Unlike JavaScript's
@@ -26826,38 +26782,25 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26826
26782
  @private
26827
26783
  @constructor
26828
26784
  */
26829
- function Map() {
26830
- if (this instanceof Map) {
26831
- this._keys = OrderedSet.create();
26785
+
26786
+ var Map = function () {
26787
+ function Map() {
26788
+
26789
+ this._keys = new OrderedSet();
26832
26790
  this._values = Object.create(null);
26833
26791
  this.size = 0;
26834
- } else {
26835
- missingNew('Map');
26836
26792
  }
26837
- }
26838
-
26839
- /**
26840
- @method create
26841
- @static
26842
- @private
26843
- */
26844
- Map.create = function () {
26845
- var Constructor = this;
26846
- return new Constructor();
26847
- };
26848
-
26849
- Map.prototype = {
26850
- constructor: Map,
26851
26793
 
26852
26794
  /**
26853
- This property will change as the number of objects in the map changes.
26854
- @since 1.8.0
26855
- @property size
26856
- @type number
26857
- @default 0
26795
+ @method create
26796
+ @static
26858
26797
  @private
26859
26798
  */
26860
- size: 0,
26799
+
26800
+ Map.create = function () {
26801
+ var Constructor = this;
26802
+ return new Constructor();
26803
+ };
26861
26804
 
26862
26805
  /**
26863
26806
  Retrieve the value associated with a given key.
@@ -26866,7 +26809,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26866
26809
  @return {*} the value associated with the key, or `undefined`
26867
26810
  @private
26868
26811
  */
26869
- get: function (key) {
26812
+
26813
+ Map.prototype.get = function (key) {
26870
26814
  if (this.size === 0) {
26871
26815
  return;
26872
26816
  }
@@ -26875,7 +26819,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26875
26819
  var guid = emberUtils.guidFor(key);
26876
26820
 
26877
26821
  return values[guid];
26878
- },
26822
+ };
26879
26823
 
26880
26824
  /**
26881
26825
  Adds a value to the map. If a value for the given key has already been
@@ -26886,7 +26830,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26886
26830
  @return {Ember.Map}
26887
26831
  @private
26888
26832
  */
26889
- set: function (key, value) {
26833
+
26834
+ Map.prototype.set = function (key, value) {
26890
26835
  var keys = this._keys;
26891
26836
  var values = this._values;
26892
26837
  var guid = emberUtils.guidFor(key);
@@ -26901,7 +26846,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26901
26846
  this.size = keys.size;
26902
26847
 
26903
26848
  return this;
26904
- },
26849
+ };
26905
26850
 
26906
26851
  /**
26907
26852
  Removes a value from the map for an associated key.
@@ -26911,7 +26856,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26911
26856
  @return {Boolean} true if an item was removed, false otherwise
26912
26857
  @private
26913
26858
  */
26914
- delete: function (key) {
26859
+
26860
+ Map.prototype.delete = function (key) {
26915
26861
  if (this.size === 0) {
26916
26862
  return false;
26917
26863
  }
@@ -26928,7 +26874,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26928
26874
  } else {
26929
26875
  return false;
26930
26876
  }
26931
- },
26877
+ };
26932
26878
 
26933
26879
  /**
26934
26880
  Check whether a key is present.
@@ -26937,9 +26883,10 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26937
26883
  @return {Boolean} true if the item was present, false otherwise
26938
26884
  @private
26939
26885
  */
26940
- has: function (key) {
26886
+
26887
+ Map.prototype.has = function (key) {
26941
26888
  return this._keys.has(key);
26942
- },
26889
+ };
26943
26890
 
26944
26891
  /**
26945
26892
  Iterate over all the keys and values. Calls the function once
@@ -26952,10 +26899,9 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26952
26899
  callback. By default, `this` is the map.
26953
26900
  @private
26954
26901
  */
26955
- forEach: function (callback /*, ...thisArg*/) {
26956
- if (typeof callback !== 'function') {
26957
- missingFunction(callback);
26958
- }
26902
+
26903
+ Map.prototype.forEach = function (callback /*, ...thisArg*/) {
26904
+ false && !(typeof callback === 'function') && emberDebug.assert(Object.prototype.toString.call(callback) + ' is not a function', typeof callback === 'function');
26959
26905
 
26960
26906
  if (this.size === 0) {
26961
26907
  return;
@@ -26977,27 +26923,31 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
26977
26923
  }
26978
26924
 
26979
26925
  this._keys.forEach(cb);
26980
- },
26926
+ };
26981
26927
 
26982
26928
  /**
26983
26929
  @method clear
26984
26930
  @private
26985
26931
  */
26986
- clear: function () {
26932
+
26933
+ Map.prototype.clear = function () {
26987
26934
  this._keys.clear();
26988
26935
  this._values = Object.create(null);
26989
26936
  this.size = 0;
26990
- },
26937
+ };
26991
26938
 
26992
26939
  /**
26993
26940
  @method copy
26994
26941
  @return {Ember.Map}
26995
26942
  @private
26996
26943
  */
26997
- copy: function () {
26944
+
26945
+ Map.prototype.copy = function () {
26998
26946
  return copyMap(this, new Map());
26999
- }
27000
- };
26947
+ };
26948
+
26949
+ return Map;
26950
+ }();
27001
26951
 
27002
26952
  /**
27003
26953
  @class MapWithDefault
@@ -27008,66 +26958,73 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
27008
26958
  @param [options]
27009
26959
  @param {*} [options.defaultValue]
27010
26960
  */
27011
- function MapWithDefault(options) {
27012
- this._super$constructor();
27013
- this.defaultValue = options.defaultValue;
27014
- }
27015
26961
 
27016
- /**
27017
- @method create
27018
- @static
27019
- @param [options]
27020
- @param {*} [options.defaultValue]
27021
- @return {Ember.MapWithDefault|Ember.Map} If options are passed, returns
27022
- `MapWithDefault` otherwise returns `EmberMap`
27023
- @private
27024
- */
27025
- MapWithDefault.create = function (options) {
27026
- if (options) {
27027
- return new MapWithDefault(options);
27028
- } else {
27029
- return new Map();
26962
+ var MapWithDefault = function (_Map) {
26963
+ emberBabel.inherits(MapWithDefault, _Map);
26964
+
26965
+ function MapWithDefault(options) {
26966
+
26967
+ var _this = emberBabel.possibleConstructorReturn(this, _Map.call(this));
26968
+
26969
+ _this.defaultValue = options.defaultValue;
26970
+ return _this;
27030
26971
  }
27031
- };
27032
26972
 
27033
- MapWithDefault.prototype = Object.create(Map.prototype);
27034
- MapWithDefault.prototype.constructor = MapWithDefault;
27035
- MapWithDefault.prototype._super$constructor = Map;
27036
- MapWithDefault.prototype._super$get = Map.prototype.get;
26973
+ /**
26974
+ @method create
26975
+ @static
26976
+ @param [options]
26977
+ @param {*} [options.defaultValue]
26978
+ @return {Ember.MapWithDefault|Ember.Map} If options are passed, returns
26979
+ `MapWithDefault` otherwise returns `EmberMap`
26980
+ @private
26981
+ */
27037
26982
 
27038
- /**
27039
- Retrieve the value associated with a given key.
27040
-
27041
- @method get
27042
- @param {*} key
27043
- @return {*} the value associated with the key, or the default value
27044
- @private
27045
- */
27046
- MapWithDefault.prototype.get = function (key) {
27047
- var hasValue = this.has(key),
27048
- defaultValue;
26983
+ MapWithDefault.create = function (options) {
26984
+ if (options) {
26985
+ return new MapWithDefault(options);
26986
+ } else {
26987
+ return new Map();
26988
+ }
26989
+ };
27049
26990
 
27050
- if (hasValue) {
27051
- return this._super$get(key);
27052
- } else {
27053
- defaultValue = this.defaultValue(key);
26991
+ /**
26992
+ Retrieve the value associated with a given key.
26993
+ @method get
26994
+ @param {*} key
26995
+ @return {*} the value associated with the key, or the default value
26996
+ @private
26997
+ */
27054
26998
 
27055
- this.set(key, defaultValue);
27056
- return defaultValue;
27057
- }
27058
- };
26999
+ MapWithDefault.prototype.get = function (key) {
27000
+ var hasValue = this.has(key),
27001
+ defaultValue;
27059
27002
 
27060
- /**
27061
- @method copy
27062
- @return {Ember.MapWithDefault}
27063
- @private
27064
- */
27065
- MapWithDefault.prototype.copy = function () {
27066
- var Constructor = this.constructor;
27067
- return copyMap(this, new Constructor({
27068
- defaultValue: this.defaultValue
27069
- }));
27070
- };
27003
+ if (hasValue) {
27004
+ return _Map.prototype.get.call(this, key);
27005
+ } else {
27006
+ defaultValue = this.defaultValue(key);
27007
+
27008
+ this.set(key, defaultValue);
27009
+ return defaultValue;
27010
+ }
27011
+ };
27012
+
27013
+ /**
27014
+ @method copy
27015
+ @return {Ember.MapWithDefault}
27016
+ @private
27017
+ */
27018
+
27019
+ MapWithDefault.prototype.copy = function () {
27020
+ var Constructor = this.constructor;
27021
+ return copyMap(this, new Constructor({
27022
+ defaultValue: this.defaultValue
27023
+ }));
27024
+ };
27025
+
27026
+ return MapWithDefault;
27027
+ }(Map);
27071
27028
 
27072
27029
  /**
27073
27030
  @module @ember/object
@@ -27821,6 +27778,8 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
27821
27778
  var baseValue = values[key] || obj[key],
27822
27779
  propValue;
27823
27780
 
27781
+ false && !!isArray(value) && emberDebug.assert('You passed in `' + JSON.stringify(value) + '` as the value for `' + key + '` but `' + key + '` cannot be an Array', !isArray(value));
27782
+
27824
27783
  if (!baseValue) {
27825
27784
  return value;
27826
27785
  }
@@ -27962,7 +27921,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
27962
27921
  }
27963
27922
 
27964
27923
  function finishPartial(obj, meta$$1) {
27965
- connectBindings(obj, meta$$1 || meta(obj));
27924
+ connectBindings(obj, meta$$1 === undefined ? meta(obj) : meta$$1);
27966
27925
  return obj;
27967
27926
  }
27968
27927
 
@@ -28254,66 +28213,112 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28254
28213
  return ret;
28255
28214
  };
28256
28215
 
28257
- return Mixin;
28258
- }();
28216
+ /**
28217
+ @method reopen
28218
+ @param arguments*
28219
+ @private
28220
+ */
28259
28221
 
28260
- Mixin._apply = applyMixin;
28222
+ Mixin.prototype.reopen = function () {
28223
+ var currentMixin = void 0;
28261
28224
 
28262
- Mixin.finishPartial = finishPartial;
28225
+ if (this.properties) {
28226
+ currentMixin = new Mixin(undefined, this.properties);
28227
+ this.properties = undefined;
28228
+ this.mixins = [currentMixin];
28229
+ } else if (!this.mixins) {
28230
+ this.mixins = [];
28231
+ }
28263
28232
 
28264
- var unprocessedFlag = false;
28233
+ var mixins = this.mixins;
28234
+ var idx = void 0;
28265
28235
 
28266
- var MixinPrototype = Mixin.prototype;
28236
+ for (idx = 0; idx < arguments.length; idx++) {
28237
+ currentMixin = arguments[idx];
28238
+ false && !(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]');
28267
28239
 
28268
- /**
28269
- @method reopen
28270
- @param arguments*
28271
- @private
28272
- */
28273
- MixinPrototype.reopen = function () {
28274
- var currentMixin = void 0;
28240
+ if (currentMixin instanceof Mixin) {
28241
+ mixins.push(currentMixin);
28242
+ } else {
28243
+ mixins.push(new Mixin(undefined, currentMixin));
28244
+ }
28245
+ }
28275
28246
 
28276
- if (this.properties) {
28277
- currentMixin = new Mixin(undefined, this.properties);
28278
- this.properties = undefined;
28279
- this.mixins = [currentMixin];
28280
- } else if (!this.mixins) {
28281
- this.mixins = [];
28282
- }
28247
+ return this;
28248
+ };
28283
28249
 
28284
- var mixins = this.mixins;
28285
- var idx = void 0;
28250
+ /**
28251
+ @method apply
28252
+ @param obj
28253
+ @return applied object
28254
+ @private
28255
+ */
28286
28256
 
28287
- for (idx = 0; idx < arguments.length; idx++) {
28288
- currentMixin = arguments[idx];
28289
- false && !(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]');
28257
+ Mixin.prototype.apply = function (obj) {
28258
+ return applyMixin(obj, [this], false);
28259
+ };
28290
28260
 
28291
- if (currentMixin instanceof Mixin) {
28292
- mixins.push(currentMixin);
28293
- } else {
28294
- mixins.push(new Mixin(undefined, currentMixin));
28261
+ Mixin.prototype.applyPartial = function (obj) {
28262
+ return applyMixin(obj, [this], true);
28263
+ };
28264
+
28265
+ /**
28266
+ @method detect
28267
+ @param obj
28268
+ @return {Boolean}
28269
+ @private
28270
+ */
28271
+
28272
+ Mixin.prototype.detect = function (obj) {
28273
+ if (typeof obj !== 'object' || obj === null) {
28274
+ return false;
28295
28275
  }
28296
- }
28276
+ if (obj instanceof Mixin) {
28277
+ return _detect(obj, this, {});
28278
+ }
28279
+ var meta$$1 = exports.peekMeta(obj);
28280
+ if (meta$$1 === undefined) {
28281
+ return false;
28282
+ }
28283
+ return !!meta$$1.peekMixins(emberUtils.guidFor(this));
28284
+ };
28297
28285
 
28298
- return this;
28299
- };
28286
+ Mixin.prototype.without = function () {
28287
+ var ret = new Mixin([this]),
28288
+ _len4,
28289
+ args,
28290
+ _key4;
28300
28291
 
28301
- /**
28302
- @method apply
28303
- @param obj
28304
- @return applied object
28305
- @private
28306
- */
28307
- MixinPrototype.apply = function (obj) {
28308
- return applyMixin(obj, [this], false);
28309
- };
28292
+ for (_len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
28293
+ args[_key4] = arguments[_key4];
28294
+ }
28310
28295
 
28311
- MixinPrototype.applyPartial = function (obj) {
28312
- return applyMixin(obj, [this], true);
28313
- };
28296
+ ret._without = args;
28297
+ return ret;
28298
+ };
28314
28299
 
28300
+ Mixin.prototype.keys = function () {
28301
+ var keys = {};
28302
+
28303
+
28304
+ _keys(keys, this, {});
28305
+ var ret = Object.keys(keys);
28306
+ return ret;
28307
+ };
28308
+
28309
+ return Mixin;
28310
+ }();
28311
+
28312
+ Mixin._apply = applyMixin;
28313
+ Mixin.finishPartial = finishPartial;
28314
+
28315
+ var MixinPrototype = Mixin.prototype;
28315
28316
  MixinPrototype.toString = Object.toString;
28316
28317
 
28318
+ emberDebug.debugSeal(MixinPrototype);
28319
+
28320
+ var unprocessedFlag = false;
28321
+
28317
28322
  function _detect(curMixin, targetMixin, seen) {
28318
28323
  var guid = emberUtils.guidFor(curMixin);
28319
28324
 
@@ -28335,40 +28340,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28335
28340
  return false;
28336
28341
  }
28337
28342
 
28338
- /**
28339
- @method detect
28340
- @param obj
28341
- @return {Boolean}
28342
- @private
28343
- */
28344
- MixinPrototype.detect = function (obj) {
28345
- if (typeof obj !== 'object' || obj === null) {
28346
- return false;
28347
- }
28348
- if (obj instanceof Mixin) {
28349
- return _detect(obj, this, {});
28350
- }
28351
- var meta$$1 = exports.peekMeta(obj);
28352
- if (meta$$1 === undefined) {
28353
- return false;
28354
- }
28355
- return !!meta$$1.peekMixins(emberUtils.guidFor(this));
28356
- };
28357
-
28358
- MixinPrototype.without = function () {
28359
- var ret = new Mixin([this]),
28360
- _len4,
28361
- args,
28362
- _key4;
28363
-
28364
- for (_len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
28365
- args[_key4] = arguments[_key4];
28366
- }
28367
-
28368
- ret._without = args;
28369
- return ret;
28370
- };
28371
-
28372
28343
  function _keys(ret, mixin, seen) {
28373
28344
  var props, i, key;
28374
28345
 
@@ -28392,17 +28363,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28392
28363
  }
28393
28364
  }
28394
28365
 
28395
- MixinPrototype.keys = function () {
28396
- var keys = {};
28397
-
28398
-
28399
- _keys(keys, this, {});
28400
- var ret = Object.keys(keys);
28401
- return ret;
28402
- };
28403
-
28404
- emberDebug.debugSeal(MixinPrototype);
28405
-
28406
28366
  var REQUIRED = new Descriptor();
28407
28367
  REQUIRED.toString = function () {
28408
28368
  return '(Required Property)';
@@ -28676,7 +28636,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28676
28636
  return new AliasedProperty(altKey);
28677
28637
  };
28678
28638
  exports.merge = function (original, updates) {
28679
- if (!updates || typeof updates !== 'object') {
28639
+ if (updates === null || typeof updates !== 'object') {
28680
28640
  return original;
28681
28641
  }
28682
28642
 
@@ -28797,6 +28757,12 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28797
28757
  };
28798
28758
  exports.META_DESC = META_DESC;
28799
28759
  exports.meta = meta;
28760
+ exports.deleteMeta = function (obj) {
28761
+ var meta = exports.peekMeta(obj);
28762
+ if (meta !== undefined) {
28763
+ meta.destroy();
28764
+ }
28765
+ };
28800
28766
  exports.Cache = Cache;
28801
28767
  exports._getPath = _getPath;
28802
28768
  exports.get = get;
@@ -28849,7 +28815,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28849
28815
  exports.suspendListeners = suspendListeners;
28850
28816
  exports.watchedEvents = function (obj) {
28851
28817
  var meta$$1 = exports.peekMeta(obj);
28852
- return meta$$1 && meta$$1.watchedEvents() || [];
28818
+ return meta$$1 !== undefined ? meta$$1.watchedEvents() : [];
28853
28819
  };
28854
28820
  exports.isNone = isNone;
28855
28821
  exports.isEmpty = isEmpty;
@@ -28889,12 +28855,6 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28889
28855
  exports.removeChainWatcher = removeChainWatcher;
28890
28856
  exports.watchPath = watchPath;
28891
28857
  exports.unwatchPath = unwatchPath;
28892
- exports.destroy = function (obj) {
28893
- var meta = exports.peekMeta(obj);
28894
- if (meta !== undefined) {
28895
- meta.destroy();
28896
- }
28897
- };
28898
28858
  exports.isWatching = function (obj, key) {
28899
28859
  return watcherCount(obj, key) > 0;
28900
28860
  };
@@ -28921,7 +28881,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
28921
28881
  return ret;
28922
28882
  };
28923
28883
  exports.setProperties = function (obj, properties) {
28924
- if (!properties || typeof properties !== 'object') {
28884
+ if (properties === null || typeof properties !== 'object') {
28925
28885
  return properties;
28926
28886
  }
28927
28887
  changeProperties(function () {
@@ -29043,7 +29003,7 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
29043
29003
  return _glimmer_reference.CONSTANT_TAG;
29044
29004
  }
29045
29005
 
29046
- var meta$$1 = _meta || meta(object);
29006
+ var meta$$1 = _meta === undefined ? meta(object) : _meta;
29047
29007
  if (meta$$1.isProxy()) {
29048
29008
  return tagFor(object, meta$$1);
29049
29009
  }
@@ -31621,9 +31581,9 @@ enifed('ember-routing/system/route', ['exports', 'ember-utils', 'ember-metal', '
31621
31581
  setup: function (context, transition) {
31622
31582
  var controller = void 0,
31623
31583
  propNames,
31584
+ cache,
31624
31585
  params,
31625
31586
  allParams,
31626
- cache,
31627
31587
  qpValues;
31628
31588
 
31629
31589
  var controllerName = this.controllerName || this.routeName;
@@ -31654,23 +31614,18 @@ enifed('ember-routing/system/route', ['exports', 'ember-utils', 'ember-metal', '
31654
31614
  // Update the model dep values used to calculate cache keys.
31655
31615
  (0, _utils.stashParamNames)(this.router, transition.state.handlerInfos);
31656
31616
 
31617
+ cache = this._bucketCache;
31657
31618
  params = transition.params;
31658
31619
  allParams = queryParams.propertyNames;
31659
- cache = this._bucketCache;
31660
31620
 
31661
31621
 
31662
31622
  allParams.forEach(function (prop) {
31663
- var aQp = queryParams.map[prop],
31664
- value;
31665
-
31623
+ var aQp = queryParams.map[prop];
31666
31624
  aQp.values = params;
31667
- var cacheKey = (0, _utils.calculateCacheKey)(aQp.route.fullRouteName, aQp.parts, aQp.values);
31668
-
31669
- if (cache) {
31670
- value = cache.lookup(cacheKey, prop, aQp.undecoratedDefaultValue);
31671
31625
 
31672
- (0, _emberMetal.set)(controller, prop, value);
31673
- }
31626
+ var cacheKey = (0, _utils.calculateCacheKey)(aQp.route.fullRouteName, aQp.parts, aQp.values);
31627
+ var value = cache.lookup(cacheKey, prop, aQp.undecoratedDefaultValue);
31628
+ (0, _emberMetal.set)(controller, prop, value);
31674
31629
  });
31675
31630
 
31676
31631
  qpValues = getQueryParamsFor(this, transition.state);
@@ -31689,13 +31644,10 @@ enifed('ember-routing/system/route', ['exports', 'ember-utils', 'ember-metal', '
31689
31644
  return;
31690
31645
  }
31691
31646
 
31692
- var cacheKey = (0, _utils.calculateCacheKey)(qp.route.fullRouteName, qp.parts, qp.values);
31693
-
31694
31647
  // Update model-dep cache
31695
31648
  var cache = this._bucketCache;
31696
- if (cache) {
31697
- cache.stash(cacheKey, prop, value);
31698
- }
31649
+ var cacheKey = (0, _utils.calculateCacheKey)(qp.route.fullRouteName, qp.parts, qp.values);
31650
+ cache.stash(cacheKey, prop, value);
31699
31651
  },
31700
31652
 
31701
31653
  /**
@@ -32317,7 +32269,7 @@ enifed('ember-routing/system/router', ['exports', 'ember-utils', 'ember-console'
32317
32269
 
32318
32270
  _initRouterJs: function () {
32319
32271
  var routerMicrolib = this._routerMicrolib = new _router.default();
32320
- routerMicrolib.triggerEvent = triggerEvent;
32272
+ routerMicrolib.triggerEvent = triggerEvent.bind(this);
32321
32273
 
32322
32274
  routerMicrolib._triggerWillChangeContext = K;
32323
32275
  routerMicrolib._triggerWillLeave = K;
@@ -33108,26 +33060,27 @@ enifed('ember-routing/system/router', ['exports', 'ember-utils', 'ember-console'
33108
33060
  @param {Function} callback
33109
33061
  @return {Void}
33110
33062
  */
33111
- function forEachRouteAbove(originRoute, handlerInfos, callback) {
33112
- var originRouteFound = false,
33113
- i,
33114
- handlerInfo,
33115
- route;
33063
+ function forEachRouteAbove(handlerInfos, callback) {
33064
+ var i, handlerInfo, route;
33065
+
33116
33066
 
33117
33067
  for (i = handlerInfos.length - 1; i >= 0; --i) {
33118
33068
  handlerInfo = handlerInfos[i];
33119
33069
  route = handlerInfo.handler;
33120
33070
 
33071
+ // handlerInfo.handler being `undefined` generally means either:
33072
+ //
33073
+ // 1. an error occurred during creation of the route in question
33074
+ // 2. the route is across an async boundary (e.g. within an engine)
33075
+ //
33076
+ // In both of these cases, we cannot invoke the callback on that specific
33077
+ // route, because it just doesn't exist...
33121
33078
 
33122
- if (originRoute === route) {
33123
- originRouteFound = true;
33124
- }
33125
-
33126
- if (!originRouteFound) {
33079
+ if (route === undefined) {
33127
33080
  continue;
33128
33081
  }
33129
33082
 
33130
- if (callback(route) !== true) {
33083
+ if (callback(route, handlerInfo) !== true) {
33131
33084
  return;
33132
33085
  }
33133
33086
  }
@@ -33136,18 +33089,19 @@ enifed('ember-routing/system/router', ['exports', 'ember-utils', 'ember-console'
33136
33089
  // These get invoked when an action bubbles above ApplicationRoute
33137
33090
  // and are not meant to be overridable.
33138
33091
  var defaultActionHandlers = {
33139
- willResolveModel: function (transition, originRoute) {
33140
- originRoute.router._scheduleLoadingEvent(transition, originRoute);
33092
+ willResolveModel: function (handlerInfos, transition, originRoute) {
33093
+ this._scheduleLoadingEvent(transition, originRoute);
33141
33094
  },
33142
- error: function (error, transition, originRoute) {
33143
- var handlerInfos = transition.state.handlerInfos;
33144
- var router = originRoute.router;
33095
+ error: function (handlerInfos, error, transition) {
33096
+ var router = this;
33097
+
33098
+ var handlerInfoWithError = handlerInfos[handlerInfos.length - 1];
33145
33099
 
33146
- forEachRouteAbove(originRoute, handlerInfos, function (route) {
33147
- // Check for the existence of an 'error' route.
33148
- // We don't check for an 'error' route on the originRoute, since that would
33100
+ forEachRouteAbove(handlerInfos, function (route, handlerInfo) {
33101
+ // We don't check the leaf most handlerInfo since that would
33149
33102
  // technically be below where we're at in the route hierarchy.
33150
- if (originRoute !== route) {
33103
+ if (handlerInfo !== handlerInfoWithError) {
33104
+ // Check for the existence of an 'error' route.
33151
33105
  errorRouteName = findRouteStateName(route, 'error');
33152
33106
 
33153
33107
  if (errorRouteName) {
@@ -33177,15 +33131,16 @@ enifed('ember-routing/system/router', ['exports', 'ember-utils', 'ember-console'
33177
33131
 
33178
33132
  logError(error, 'Error while processing route: ' + transition.targetName);
33179
33133
  },
33180
- loading: function (transition, originRoute) {
33181
- var handlerInfos = transition.state.handlerInfos;
33182
- var router = originRoute.router;
33134
+ loading: function (handlerInfos, transition) {
33135
+ var router = this;
33136
+
33137
+ var handlerInfoWithSlowLoading = handlerInfos[handlerInfos.length - 1];
33183
33138
 
33184
- forEachRouteAbove(originRoute, handlerInfos, function (route) {
33185
- // Check for the existence of a 'loading' route.
33186
- // We don't check for a 'loading' route on the originRoute, since that would
33139
+ forEachRouteAbove(handlerInfos, function (route, handlerInfo) {
33140
+ // We don't check the leaf most handlerInfo since that would
33187
33141
  // technically be below where we're at in the route hierarchy.
33188
- if (originRoute !== route) {
33142
+ if (handlerInfo !== handlerInfoWithSlowLoading) {
33143
+ // Check for the existence of a 'loading' route.
33189
33144
  loadingRouteName = findRouteStateName(route, 'loading');
33190
33145
 
33191
33146
  if (loadingRouteName) {
@@ -33334,7 +33289,7 @@ enifed('ember-routing/system/router', ['exports', 'ember-utils', 'ember-console'
33334
33289
 
33335
33290
  var defaultHandler = defaultActionHandlers[name];
33336
33291
  if (defaultHandler) {
33337
- defaultHandler.apply(null, args);
33292
+ defaultHandler.apply(this, [handlerInfos].concat(args));
33338
33293
  return;
33339
33294
  }
33340
33295
 
@@ -34055,8 +34010,10 @@ enifed('ember-runtime/computed/computed_macros', ['exports', 'ember-metal', 'emb
34055
34010
  @static
34056
34011
  @for @ember/object/computed
34057
34012
  @param {String} dependentKey
34058
- @return {ComputedProperty} computed property which negate
34059
- the original value for property
34013
+ @return {ComputedProperty} computed property which returns true if
34014
+ the value of the dependent property is null, an empty string, empty array,
34015
+ or empty function and false if the underlying value is not empty.
34016
+
34060
34017
  @public
34061
34018
  */
34062
34019
  function (dependentKey) {
@@ -37235,9 +37192,8 @@ enifed('ember-runtime/mixins/array', ['exports', 'ember-utils', 'ember-metal', '
37235
37192
  arrayWillChange: function (content, idx, removedCnt) {
37236
37193
  var keys = this._keys;
37237
37194
  var lim = removedCnt > 0 ? idx + removedCnt : -1;
37238
- var meta = void 0;
37195
+ var meta = (0, _emberMetal.peekMeta)(this);
37239
37196
  for (var key in keys) {
37240
- meta = meta || (0, _emberMetal.peekMeta)(this);
37241
37197
  if (lim > 0) {
37242
37198
  removeObserverForContentKey(content, key, this, idx, lim);
37243
37199
  }
@@ -37247,9 +37203,8 @@ enifed('ember-runtime/mixins/array', ['exports', 'ember-utils', 'ember-metal', '
37247
37203
  arrayDidChange: function (content, idx, removedCnt, addedCnt) {
37248
37204
  var keys = this._keys;
37249
37205
  var lim = addedCnt > 0 ? idx + addedCnt : -1;
37250
- var meta = void 0;
37206
+ var meta = (0, _emberMetal.peekMeta)(this);
37251
37207
  for (var key in keys) {
37252
- meta = meta || (0, _emberMetal.peekMeta)(this);
37253
37208
  if (lim > 0) {
37254
37209
  addObserverForContentKey(content, key, this, idx, lim);
37255
37210
  }
@@ -40282,7 +40237,7 @@ enifed('ember-runtime/system/core_object', ['exports', 'ember-utils', 'ember-met
40282
40237
  if (m.isSourceDestroyed()) {
40283
40238
  return;
40284
40239
  }
40285
- (0, _emberMetal.destroy)(this);
40240
+ (0, _emberMetal.deleteMeta)(this);
40286
40241
  m.setSourceDestroyed();
40287
40242
  }, _Mixin$create.bind = function (to, from) {
40288
40243
  if (!(from instanceof _emberMetal.Binding)) {
@@ -40405,30 +40360,6 @@ enifed('ember-runtime/system/core_object', ['exports', 'ember-utils', 'ember-met
40405
40360
  }
40406
40361
  }, _ClassMixinProps);
40407
40362
 
40408
- /**
40409
- Returns a hash of property names and container names that injected
40410
- properties will lookup on the container lazily.
40411
-
40412
- @method _lazyInjections
40413
- @return {Object} Hash of all lazy injected property keys to container names
40414
- @private
40415
- */
40416
- ClassMixinProps._lazyInjections = function () {
40417
- var injections = {};
40418
- var proto = this.proto();
40419
- var key = void 0;
40420
- var desc = void 0;
40421
-
40422
- for (key in proto) {
40423
- desc = proto[key];
40424
- if (desc instanceof _emberMetal.InjectedProperty) {
40425
- injections[key] = desc.type + ':' + (desc.name || key);
40426
- }
40427
- }
40428
-
40429
- return injections;
40430
- };
40431
-
40432
40363
  var ClassMixin = _emberMetal.Mixin.create(ClassMixinProps);
40433
40364
 
40434
40365
  ClassMixin.ownerConstructor = CoreObject;
@@ -40754,7 +40685,7 @@ enifed('ember-runtime/system/namespace', ['exports', 'ember-utils', 'ember-metal
40754
40685
 
40755
40686
  exports.default = Namespace;
40756
40687
  });
40757
- 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) {
40688
+ 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) {
40758
40689
  'use strict';
40759
40690
 
40760
40691
  exports.NativeArray = exports.A = undefined;
@@ -40790,9 +40721,7 @@ enifed('ember-runtime/system/native_array', ['exports', 'ember-metal', 'ember-en
40790
40721
  return this[idx];
40791
40722
  },
40792
40723
  replace: function (idx, amt, objects) {
40793
- if (this.isFrozen) {
40794
- throw _freezable.FROZEN_ERROR;
40795
- }
40724
+ false && !!this.isFrozen && (0, _emberDebug.assert)(_freezable.FROZEN_ERROR, !this.isFrozen);
40796
40725
 
40797
40726
  // if we replaced exactly the same number of items, then pass only the
40798
40727
  // replaced range. Otherwise, pass the full remaining array length
@@ -41899,7 +41828,7 @@ enifed('ember-utils', ['exports'], function (exports) {
41899
41828
  @private
41900
41829
  */
41901
41830
  function canInvoke(obj, methodName) {
41902
- return !!(obj && typeof obj[methodName] === 'function');
41831
+ return obj !== null && obj !== undefined && typeof obj[methodName] === 'function';
41903
41832
  }
41904
41833
 
41905
41834
  /**
@@ -44137,7 +44066,7 @@ enifed('ember/index', ['exports', 'require', 'ember-environment', 'node-module',
44137
44066
  _emberMetal.default.watch = _emberMetal.watch;
44138
44067
  _emberMetal.default.isWatching = _emberMetal.isWatching;
44139
44068
  _emberMetal.default.unwatch = _emberMetal.unwatch;
44140
- _emberMetal.default.destroy = _emberMetal.destroy;
44069
+ _emberMetal.default.destroy = _emberMetal.deleteMeta;
44141
44070
  _emberMetal.default.libraries = _emberMetal.libraries;
44142
44071
  _emberMetal.default.OrderedSet = _emberMetal.OrderedSet;
44143
44072
  _emberMetal.default.Map = _emberMetal.Map;
@@ -44551,7 +44480,7 @@ enifed('ember/index', ['exports', 'require', 'ember-environment', 'node-module',
44551
44480
  enifed("ember/version", ["exports"], function (exports) {
44552
44481
  "use strict";
44553
44482
 
44554
- exports.default = "2.16.3";
44483
+ exports.default = "2.17.0-beta.4";
44555
44484
  });
44556
44485
  enifed('node-module', ['exports'], function(_exports) {
44557
44486
  var IS_NODE = typeof module === 'object' && typeof module.require === 'function';
@@ -45307,23 +45236,13 @@ enifed("route-recognizer", ["exports"], function (exports) {
45307
45236
 
45308
45237
  exports.default = RouteRecognizer;
45309
45238
  });
45310
- enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _routeRecognizer, _rsvp) {
45239
+ enifed('router', ['exports', 'ember-babel', 'route-recognizer', 'rsvp'], function (exports, _emberBabel, _routeRecognizer, _rsvp) {
45311
45240
  'use strict';
45312
45241
 
45313
45242
  exports.Transition = undefined;
45314
45243
 
45315
45244
  var slice = Array.prototype.slice;
45316
-
45317
- var _isArray;
45318
- if (!Array.isArray) {
45319
- _isArray = function (x) {
45320
- return Object.prototype.toString.call(x) === "[object Array]";
45321
- };
45322
- } else {
45323
- _isArray = Array.isArray;
45324
- }
45325
-
45326
- var isArray = _isArray;
45245
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
45327
45246
 
45328
45247
  /**
45329
45248
  Determines if an object is Promise by checking if it is "thenable".
@@ -45334,18 +45253,12 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
45334
45253
 
45335
45254
  function merge(hash, other) {
45336
45255
  for (var prop in other) {
45337
- if (other.hasOwnProperty(prop)) {
45256
+ if (hasOwnProperty.call(other, prop)) {
45338
45257
  hash[prop] = other[prop];
45339
45258
  }
45340
45259
  }
45341
45260
  }
45342
45261
 
45343
- var oCreate = Object.create || function (proto) {
45344
- function F() {}
45345
- F.prototype = proto;
45346
- return new F();
45347
- };
45348
-
45349
45262
  /**
45350
45263
  @private
45351
45264
 
@@ -45353,8 +45266,8 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
45353
45266
  **/
45354
45267
  function extractQueryParams(array) {
45355
45268
  var len = array && array.length,
45356
- head,
45357
- queryParams;
45269
+ head = void 0,
45270
+ queryParams = void 0;
45358
45271
 
45359
45272
  if (len && len > 0 && array[len - 1] && array[len - 1].hasOwnProperty('queryParams')) {
45360
45273
  queryParams = array[len - 1].queryParams;
@@ -45376,7 +45289,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
45376
45289
  for (var key in queryParams) {
45377
45290
  if (typeof queryParams[key] === 'number') {
45378
45291
  queryParams[key] = '' + queryParams[key];
45379
- } else if (isArray(queryParams[key])) {
45292
+ } else if (Array.isArray(queryParams[key])) {
45380
45293
  for (i = 0, l = queryParams[key].length; i < l; i++) {
45381
45294
  queryParams[key][i] = '' + queryParams[key][i];
45382
45295
  }
@@ -45386,39 +45299,32 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
45386
45299
  /**
45387
45300
  @private
45388
45301
  */
45389
- function log(router, sequence, msg) {
45302
+ function _log(router, sequence, msg) {
45390
45303
  if (!router.log) {
45391
45304
  return;
45392
45305
  }
45393
45306
 
45394
45307
  if (arguments.length === 3) {
45395
- router.log("Transition #" + sequence + ": " + msg);
45308
+ router.log('Transition #' + sequence + ': ' + msg);
45396
45309
  } else {
45397
45310
  msg = sequence;
45398
45311
  router.log(msg);
45399
45312
  }
45400
45313
  }
45401
45314
 
45402
- function bind(context, fn) {
45403
- var boundArgs = arguments;
45404
- return function (value) {
45405
- var args = slice.call(boundArgs, 2);
45406
- args.push(value);
45407
- return fn.apply(context, args);
45408
- };
45409
- }
45410
-
45411
45315
  function isParam(object) {
45412
- return typeof object === "string" || object instanceof String || typeof object === "number" || object instanceof Number;
45316
+ return typeof object === 'string' || object instanceof String || typeof object === 'number' || object instanceof Number;
45413
45317
  }
45414
45318
 
45415
45319
  function forEach(array, callback) {
45416
45320
  var i, l;
45417
45321
 
45418
- for (i = 0, l = array.length; i < l && false !== callback(array[i]); i++) {}
45322
+ for (i = 0, l = array.length; i < l && false !== callback(array[i]); i++) {
45323
+ // empty intentionally
45324
+ }
45419
45325
  }
45420
45326
 
45421
- function trigger(router, handlerInfos, ignoreFailure, args) {
45327
+ function _trigger(router, handlerInfos, ignoreFailure, args) {
45422
45328
  if (router.triggerEvent) {
45423
45329
  router.triggerEvent(handlerInfos, ignoreFailure, args);
45424
45330
  return;
@@ -45449,7 +45355,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
45449
45355
  // means that we should trigger the event later when the handler is available
45450
45356
 
45451
45357
  if (!handler) {
45452
- handlerInfo.handlerPromise.then(bind(null, delayedEvent, name, args));
45358
+ handlerInfo.handlerPromise.then(delayedEvent.bind(null, name, args));
45453
45359
  continue;
45454
45360
  }
45455
45361
 
@@ -45472,13 +45378,14 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
45472
45378
  }
45473
45379
 
45474
45380
  function getChangelist(oldObject, newObject) {
45381
+ var key = void 0,
45382
+ i,
45383
+ l;
45475
45384
  var results = {
45476
45385
  all: {},
45477
45386
  changed: {},
45478
45387
  removed: {}
45479
- },
45480
- i,
45481
- l;
45388
+ };
45482
45389
 
45483
45390
  merge(results.all, newObject);
45484
45391
 
@@ -45487,9 +45394,9 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
45487
45394
  coerceQueryParamsToString(newObject);
45488
45395
 
45489
45396
  // Calculate removals
45490
- for (var key in oldObject) {
45491
- if (oldObject.hasOwnProperty(key)) {
45492
- if (!newObject.hasOwnProperty(key)) {
45397
+ for (key in oldObject) {
45398
+ if (hasOwnProperty.call(oldObject, key)) {
45399
+ if (!hasOwnProperty.call(newObject, key)) {
45493
45400
  didChange = true;
45494
45401
  results.removed[key] = oldObject[key];
45495
45402
  }
@@ -45498,8 +45405,8 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
45498
45405
 
45499
45406
  // Calculate changes
45500
45407
  for (key in newObject) {
45501
- if (newObject.hasOwnProperty(key)) {
45502
- if (isArray(oldObject[key]) && isArray(newObject[key])) {
45408
+ if (hasOwnProperty.call(newObject, key)) {
45409
+ if (Array.isArray(oldObject[key]) && Array.isArray(newObject[key])) {
45503
45410
  if (oldObject[key].length !== newObject[key].length) {
45504
45411
  results.changed[key] = newObject[key];
45505
45412
  didChange = true;
@@ -45523,24 +45430,15 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
45523
45430
  return didChange && results;
45524
45431
  }
45525
45432
 
45526
- function promiseLabel(label) {
45433
+ function _promiseLabel(label) {
45527
45434
  return 'Router: ' + label;
45528
45435
  }
45529
45436
 
45530
- function subclass(parentConstructor, proto) {
45531
- function C(props) {
45532
- parentConstructor.call(this, props || {});
45533
- }
45534
- C.prototype = oCreate(parentConstructor.prototype);
45535
- merge(C.prototype, proto);
45536
- return C;
45537
- }
45538
-
45539
45437
  function resolveHook(obj, hookName) {
45540
45438
  if (!obj) {
45541
45439
  return;
45542
45440
  }
45543
- var underscored = "_" + hookName;
45441
+ var underscored = '_' + hookName;
45544
45442
  return obj[underscored] && underscored || obj[hookName] && hookName;
45545
45443
  }
45546
45444
 
@@ -45579,7 +45477,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
45579
45477
  }
45580
45478
  targetName += handlerInfo.name;
45581
45479
  });
45582
- return promiseLabel("'" + targetName + "': " + label);
45480
+ return _promiseLabel("'" + targetName + "': " + label);
45583
45481
  },
45584
45482
 
45585
45483
  resolve: function (shouldContinue, payload) {
@@ -45597,7 +45495,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
45597
45495
  var wasAborted = false;
45598
45496
 
45599
45497
  // The prelude RSVP.resolve() asyncs us into the promise land.
45600
- return _rsvp.Promise.resolve(null, this.promiseLabel("Start transition")).then(resolveOneHandlerInfo, null, this.promiseLabel('Resolve handler'))['catch'](function (error) {
45498
+ return _rsvp.Promise.resolve(null, this.promiseLabel('Start transition')).then(resolveOneHandlerInfo, null, this.promiseLabel('Resolve handler')).catch(function (error) {
45601
45499
  // This is the only possible
45602
45500
  // reject value of TransitionState#resolve
45603
45501
  var handlerInfos = currentState.handlerInfos;
@@ -45611,13 +45509,13 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
45611
45509
  }, this.promiseLabel('Handle error'));
45612
45510
 
45613
45511
  function innerShouldContinue() {
45614
- return _rsvp.Promise.resolve(shouldContinue(), currentState.promiseLabel("Check if should continue"))['catch'](function (reason) {
45512
+ return _rsvp.Promise.resolve(shouldContinue(), currentState.promiseLabel('Check if should continue')).catch(function (reason) {
45615
45513
  // We distinguish between errors that occurred
45616
- // during resolution (e.g. beforeModel/model/afterModel),
45514
+ // during resolution (e.g. before"Model/model/afterModel),
45617
45515
  // and aborts due to a rejecting promise from shouldContinue().
45618
45516
  wasAborted = true;
45619
45517
  return _rsvp.Promise.reject(reason);
45620
- }, currentState.promiseLabel("Handle abort"));
45518
+ }, currentState.promiseLabel('Handle abort'));
45621
45519
  }
45622
45520
 
45623
45521
  function proceed(resolvedHandlerInfo) {
@@ -45682,7 +45580,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
45682
45580
  this.code = error.code;
45683
45581
  }
45684
45582
 
45685
- TransitionAbortedError.prototype = oCreate(Error.prototype);
45583
+ TransitionAbortedError.prototype = Object.create(Error.prototype);
45686
45584
 
45687
45585
  /**
45688
45586
  A Transition is a thennable (a promise-like object) that represents
@@ -45699,101 +45597,90 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
45699
45597
  @param {Object} error
45700
45598
  @private
45701
45599
  */
45702
- function Transition(router, intent, state, error, previousTransition) {
45703
- var transition = this,
45704
- len,
45705
- i,
45706
- handlerInfo;
45707
- this.state = state || router.state;
45708
- this.intent = intent;
45709
- this.router = router;
45710
- this.data = this.intent && this.intent.data || {};
45711
- this.resolvedModels = {};
45712
- this.queryParams = {};
45713
- this.promise = undefined;
45714
- this.error = undefined;
45715
- this.params = undefined;
45716
- this.handlerInfos = undefined;
45717
- this.targetName = undefined;
45718
- this.pivotHandler = undefined;
45719
- this.sequence = undefined;
45720
- this.isAborted = false;
45721
- this.isActive = true;
45722
-
45723
- if (error) {
45724
- this.promise = _rsvp.Promise.reject(error);
45725
- this.error = error;
45726
- return;
45727
- }
45728
-
45729
- // if you're doing multiple redirects, need the new transition to know if it
45730
- // is actually part of the first transition or not. Any further redirects
45731
- // in the initial transition also need to know if they are part of the
45732
- // initial transition
45733
- this.isCausedByAbortingTransition = !!previousTransition;
45734
- this.isCausedByInitialTransition = previousTransition && (previousTransition.isCausedByInitialTransition || previousTransition.sequence === 0);
45735
-
45736
- if (state) {
45737
- this.params = state.params;
45738
- this.queryParams = state.queryParams;
45739
- this.handlerInfos = state.handlerInfos;
45740
45600
 
45741
- len = state.handlerInfos.length;
45601
+ var Transition = function () {
45602
+ function Transition(router, intent, state, error, previousTransition) {
45603
+ var _this = this,
45604
+ len,
45605
+ i,
45606
+ handlerInfo;
45742
45607
 
45743
- if (len) {
45744
- this.targetName = state.handlerInfos[len - 1].name;
45608
+ this.state = state || router.state;
45609
+ this.intent = intent;
45610
+ this.router = router;
45611
+ this.data = this.intent && this.intent.data || {};
45612
+ this.resolvedModels = {};
45613
+ this.queryParams = {};
45614
+ this.promise = undefined;
45615
+ this.error = undefined;
45616
+ this.params = undefined;
45617
+ this.handlerInfos = undefined;
45618
+ this.targetName = undefined;
45619
+ this.pivotHandler = undefined;
45620
+ this.sequence = undefined;
45621
+ this.isAborted = false;
45622
+ this.isActive = true;
45623
+ this.urlMethod = 'update';
45624
+ this.resolveIndex = 0;
45625
+ this.queryParamsOnly = false;
45626
+ this.isTransition = true;
45627
+
45628
+ if (error) {
45629
+ this.promise = _rsvp.Promise.reject(error);
45630
+ this.error = error;
45631
+ return;
45745
45632
  }
45746
45633
 
45747
- for (i = 0; i < len; ++i) {
45748
- handlerInfo = state.handlerInfos[i];
45634
+ // if you're doing multiple redirects, need the new transition to know if it
45635
+ // is actually part of the first transition or not. Any further redirects
45636
+ // in the initial transition also need to know if they are part of the
45637
+ // initial transition
45638
+ this.isCausedByAbortingTransition = !!previousTransition;
45639
+ this.isCausedByInitialTransition = previousTransition && (previousTransition.isCausedByInitialTransition || previousTransition.sequence === 0);
45749
45640
 
45750
- // TODO: this all seems hacky
45641
+ if (state) {
45642
+ this.params = state.params;
45643
+ this.queryParams = state.queryParams;
45644
+ this.handlerInfos = state.handlerInfos;
45751
45645
 
45752
- if (!handlerInfo.isResolved) {
45753
- break;
45646
+ len = state.handlerInfos.length;
45647
+
45648
+ if (len) {
45649
+ this.targetName = state.handlerInfos[len - 1].name;
45754
45650
  }
45755
- this.pivotHandler = handlerInfo.handler;
45756
- }
45757
45651
 
45758
- this.sequence = router.currentSequence++;
45759
- this.promise = state.resolve(checkForAbort, this)['catch'](catchHandlerForTransition(transition), promiseLabel('Handle Abort'));
45760
- } else {
45761
- this.promise = _rsvp.Promise.resolve(this.state);
45762
- this.params = {};
45763
- }
45652
+ for (i = 0; i < len; ++i) {
45653
+ handlerInfo = state.handlerInfos[i];
45764
45654
 
45765
- function checkForAbort() {
45766
- if (transition.isAborted) {
45767
- return _rsvp.Promise.reject(undefined, promiseLabel("Transition aborted - reject"));
45768
- }
45769
- }
45770
- }
45655
+ // TODO: this all seems hacky
45771
45656
 
45772
- function catchHandlerForTransition(transition) {
45773
- return function (result) {
45774
- if (result.wasAborted || transition.isAborted) {
45775
- return _rsvp.Promise.reject(logAbort(transition));
45657
+ if (!handlerInfo.isResolved) {
45658
+ break;
45659
+ }
45660
+ this.pivotHandler = handlerInfo.handler;
45661
+ }
45662
+
45663
+ this.sequence = router.currentSequence++;
45664
+ this.promise = state.resolve(function () {
45665
+ if (_this.isAborted) {
45666
+ return _rsvp.Promise.reject(undefined, _promiseLabel('Transition aborted - reject'));
45667
+ }
45668
+ }, this).catch(function (result) {
45669
+ if (result.wasAborted || _this.isAborted) {
45670
+ return _rsvp.Promise.reject(logAbort(_this));
45671
+ } else {
45672
+ _this.trigger('error', result.error, _this, result.handlerWithError);
45673
+ _this.abort();
45674
+ return _rsvp.Promise.reject(result.error);
45675
+ }
45676
+ }, _promiseLabel('Handle Abort'));
45776
45677
  } else {
45777
- transition.trigger('error', result.error, transition, result.handlerWithError);
45778
- transition.abort();
45779
- return _rsvp.Promise.reject(result.error);
45678
+ this.promise = _rsvp.Promise.resolve(this.state);
45679
+ this.params = {};
45780
45680
  }
45781
- };
45782
- }
45783
-
45784
- Transition.prototype = {
45785
- targetName: null,
45786
- urlMethod: 'update',
45787
- intent: null,
45788
- pivotHandler: null,
45789
- resolveIndex: 0,
45790
- resolvedModels: null,
45791
- state: null,
45792
- queryParamsOnly: false,
45793
-
45794
- isTransition: true,
45681
+ }
45795
45682
 
45796
- isExiting: function (handler) {
45683
+ Transition.prototype.isExiting = function (handler) {
45797
45684
  var handlerInfos = this.handlerInfos,
45798
45685
  i,
45799
45686
  len,
@@ -45806,109 +45693,33 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
45806
45693
  }
45807
45694
  }
45808
45695
  return true;
45809
- },
45810
-
45811
- /**
45812
- The Transition's internal promise. Calling `.then` on this property
45813
- is that same as calling `.then` on the Transition object itself, but
45814
- this property is exposed for when you want to pass around a
45815
- Transition's promise, but not the Transition object itself, since
45816
- Transition object can be externally `abort`ed, while the promise
45817
- cannot.
45818
- @property promise
45819
- @type {Object}
45820
- @public
45821
- */
45822
- promise: null,
45823
-
45824
- /**
45825
- Custom state can be stored on a Transition's `data` object.
45826
- This can be useful for decorating a Transition within an earlier
45827
- hook and shared with a later hook. Properties set on `data` will
45828
- be copied to new transitions generated by calling `retry` on this
45829
- transition.
45830
- @property data
45831
- @type {Object}
45832
- @public
45833
- */
45834
- data: null,
45696
+ };
45835
45697
 
45836
- /**
45837
- A standard promise hook that resolves if the transition
45838
- succeeds and rejects if it fails/redirects/aborts.
45839
- Forwards to the internal `promise` property which you can
45840
- use in situations where you want to pass around a thennable,
45841
- but not the Transition itself.
45842
- @method then
45843
- @param {Function} onFulfilled
45844
- @param {Function} onRejected
45845
- @param {String} label optional string for labeling the promise.
45846
- Useful for tooling.
45847
- @return {Promise}
45848
- @public
45849
- */
45850
- then: function (onFulfilled, onRejected, label) {
45698
+ Transition.prototype.then = function (onFulfilled, onRejected, label) {
45851
45699
  return this.promise.then(onFulfilled, onRejected, label);
45852
- },
45700
+ };
45853
45701
 
45854
- /**
45855
- Forwards to the internal `promise` property which you can
45856
- use in situations where you want to pass around a thennable,
45857
- but not the Transition itself.
45858
- @method catch
45859
- @param {Function} onRejection
45860
- @param {String} label optional string for labeling the promise.
45861
- Useful for tooling.
45862
- @return {Promise}
45863
- @public
45864
- */
45865
- catch: function (onRejection, label) {
45702
+ Transition.prototype.catch = function (onRejection, label) {
45866
45703
  return this.promise.catch(onRejection, label);
45867
- },
45704
+ };
45868
45705
 
45869
- /**
45870
- Forwards to the internal `promise` property which you can
45871
- use in situations where you want to pass around a thennable,
45872
- but not the Transition itself.
45873
- @method finally
45874
- @param {Function} callback
45875
- @param {String} label optional string for labeling the promise.
45876
- Useful for tooling.
45877
- @return {Promise}
45878
- @public
45879
- */
45880
- finally: function (callback, label) {
45706
+ Transition.prototype.finally = function (callback, label) {
45881
45707
  return this.promise.finally(callback, label);
45882
- },
45708
+ };
45883
45709
 
45884
- /**
45885
- Aborts the Transition. Note you can also implicitly abort a transition
45886
- by initiating another transition while a previous one is underway.
45887
- @method abort
45888
- @return {Transition} this transition
45889
- @public
45890
- */
45891
- abort: function () {
45710
+ Transition.prototype.abort = function () {
45892
45711
  if (this.isAborted) {
45893
45712
  return this;
45894
45713
  }
45895
- log(this.router, this.sequence, this.targetName + ": transition was aborted");
45714
+ _log(this.router, this.sequence, this.targetName + ': transition was aborted');
45896
45715
  this.intent.preTransitionState = this.router.state;
45897
45716
  this.isAborted = true;
45898
45717
  this.isActive = false;
45899
45718
  this.router.activeTransition = null;
45900
45719
  return this;
45901
- },
45720
+ };
45902
45721
 
45903
- /**
45904
- Retries a previously-aborted transition (making sure to abort the
45905
- transition if it's still active). Returns a new transition that
45906
- represents the new attempt to transition.
45907
- @method retry
45908
- @return {Transition} new transition
45909
- @public
45910
- */
45911
- retry: function () {
45722
+ Transition.prototype.retry = function () {
45912
45723
  // TODO: add tests for merged state retry()s
45913
45724
  this.abort();
45914
45725
  var newTransition = this.router.transitionByIntent(this.intent, false);
@@ -45925,41 +45736,14 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
45925
45736
  newTransition.method(this.urlMethod);
45926
45737
  }
45927
45738
  return newTransition;
45928
- },
45739
+ };
45929
45740
 
45930
- /**
45931
- Sets the URL-changing method to be employed at the end of a
45932
- successful transition. By default, a new Transition will just
45933
- use `updateURL`, but passing 'replace' to this method will
45934
- cause the URL to update using 'replaceWith' instead. Omitting
45935
- a parameter will disable the URL change, allowing for transitions
45936
- that don't update the URL at completion (this is also used for
45937
- handleURL, since the URL has already changed before the
45938
- transition took place).
45939
- @method method
45940
- @param {String} method the type of URL-changing method to use
45941
- at the end of a transition. Accepted values are 'replace',
45942
- falsy values, or any other non-falsy value (which is
45943
- interpreted as an updateURL transition).
45944
- @return {Transition} this transition
45945
- @public
45946
- */
45947
- method: function (method) {
45948
- this.urlMethod = method;
45741
+ Transition.prototype.method = function (_method) {
45742
+ this.urlMethod = _method;
45949
45743
  return this;
45950
- },
45744
+ };
45951
45745
 
45952
- /**
45953
- Fires an event on the current list of resolved/resolving
45954
- handlers within this transition. Useful for firing events
45955
- on route hierarchies that haven't fully been entered yet.
45956
- Note: This method is also aliased as `send`
45957
- @method trigger
45958
- @param {Boolean} [ignoreFailure=false] a boolean specifying whether unhandled events throw an error
45959
- @param {String} name the name of the event to fire
45960
- @public
45961
- */
45962
- trigger: function (ignoreFailure) {
45746
+ Transition.prototype.trigger = function (ignoreFailure) {
45963
45747
  var args = slice.call(arguments);
45964
45748
  if (typeof ignoreFailure === 'boolean') {
45965
45749
  args.shift();
@@ -45967,41 +45751,29 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
45967
45751
  // Throw errors on unhandled trigger events by default
45968
45752
  ignoreFailure = false;
45969
45753
  }
45970
- trigger(this.router, this.state.handlerInfos.slice(0, this.resolveIndex + 1), ignoreFailure, args);
45971
- },
45754
+ _trigger(this.router, this.state.handlerInfos.slice(0, this.resolveIndex + 1), ignoreFailure, args);
45755
+ };
45972
45756
 
45973
- /**
45974
- Transitions are aborted and their promises rejected
45975
- when redirects occur; this method returns a promise
45976
- that will follow any redirects that occur and fulfill
45977
- with the value fulfilled by any redirecting transitions
45978
- that occur.
45979
- @method followRedirects
45980
- @return {Promise} a promise that fulfills with the same
45981
- value that the final redirecting transition fulfills with
45982
- @public
45983
- */
45984
- followRedirects: function () {
45757
+ Transition.prototype.followRedirects = function () {
45985
45758
  var router = this.router;
45986
- return this.promise['catch'](function (reason) {
45759
+ return this.promise.catch(function (reason) {
45987
45760
  if (router.activeTransition) {
45988
45761
  return router.activeTransition.followRedirects();
45989
45762
  }
45990
45763
  return _rsvp.Promise.reject(reason);
45991
45764
  });
45992
- },
45765
+ };
45993
45766
 
45994
- toString: function () {
45995
- return "Transition (sequence " + this.sequence + ")";
45996
- },
45767
+ Transition.prototype.toString = function () {
45768
+ return 'Transition (sequence ' + this.sequence + ')';
45769
+ };
45997
45770
 
45998
- /**
45999
- @private
46000
- */
46001
- log: function (message) {
46002
- log(this.router, this.sequence, message);
46003
- }
46004
- };
45771
+ Transition.prototype.log = function (message) {
45772
+ _log(this.router, this.sequence, message);
45773
+ };
45774
+
45775
+ return Transition;
45776
+ }();
46005
45777
 
46006
45778
  // Alias 'trigger' as 'send'
46007
45779
  Transition.prototype.send = Transition.prototype.trigger;
@@ -46009,63 +45781,50 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46009
45781
  /**
46010
45782
  @private
46011
45783
 
46012
- Logs and returns an instance of TransitionAbortedError.
45784
+ Logs and returns an instance of TransitionAborted.
46013
45785
  */
46014
45786
  function logAbort(transition) {
46015
- log(transition.router, transition.sequence, "detected abort.");
45787
+ _log(transition.router, transition.sequence, 'detected abort.');
46016
45788
  return new TransitionAbortedError();
46017
45789
  }
46018
45790
 
46019
- function TransitionIntent(props) {
46020
- this.initialize(props);
45791
+ var TransitionIntent = function () {
46021
45792
 
46022
- // TODO: wat
46023
45793
  this.data = this.data || {};
46024
- }
46025
-
46026
- TransitionIntent.prototype = {
46027
- initialize: null,
46028
- applyToState: null
46029
45794
  };
46030
45795
 
46031
45796
  var DEFAULT_HANDLER = Object.freeze({});
46032
45797
 
46033
- function HandlerInfo(_props) {
46034
- var props = _props || {},
46035
- name;
46036
-
46037
- // Set a default handler to ensure consistent object shape
46038
- this._handler = DEFAULT_HANDLER;
45798
+ var HandlerInfo = function () {
45799
+ function HandlerInfo(_props) {
46039
45800
 
46040
- if (props.handler) {
46041
- name = props.name;
45801
+ var props = _props || {};
46042
45802
 
46043
- // Setup a handlerPromise so that we can wait for asynchronously loaded handlers
46044
-
46045
- this.handlerPromise = _rsvp.Promise.resolve(props.handler);
45803
+ // initialize local properties to ensure consistent object shape
45804
+ this._handler = DEFAULT_HANDLER;
45805
+ this._handlerPromise = null;
45806
+ this.factory = null; // Injected by the handler info factory
45807
+ this.name = props.name;
46046
45808
 
46047
- // Wait until the 'handler' property has been updated when chaining to a handler
46048
- // that is a promise
46049
- if (isPromise(props.handler)) {
46050
- this.handlerPromise = this.handlerPromise.then(bind(this, this.updateHandler));
46051
- props.handler = undefined;
46052
- } else if (props.handler) {
46053
- // Store the name of the handler on the handler for easy checks later
46054
- props.handler._handlerName = name;
45809
+ for (var prop in props) {
45810
+ if (prop === 'handler') {
45811
+ this._processHandler(props.handler);
45812
+ } else {
45813
+ this[prop] = props[prop];
45814
+ }
46055
45815
  }
46056
45816
  }
46057
45817
 
46058
- merge(this, props);
46059
- this.initialize(props);
46060
- }
45818
+ HandlerInfo.prototype.getHandler = function () {};
46061
45819
 
46062
- HandlerInfo.prototype = {
46063
- name: null,
45820
+ HandlerInfo.prototype.fetchHandler = function () {
45821
+ var handler = this.getHandler(this.name);
46064
45822
 
46065
- getHandler: function () {},
45823
+ return this._processHandler(handler);
45824
+ };
46066
45825
 
46067
- fetchHandler: function () {
46068
- var handler = this.getHandler(this.name);
45826
+ HandlerInfo.prototype._processHandler = function (handler) {
45827
+ var _this2 = this;
46069
45828
 
46070
45829
  // Setup a handlerPromise so that we can wait for asynchronously loaded handlers
46071
45830
  this.handlerPromise = _rsvp.Promise.resolve(handler);
@@ -46073,75 +45832,65 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46073
45832
  // Wait until the 'handler' property has been updated when chaining to a handler
46074
45833
  // that is a promise
46075
45834
  if (isPromise(handler)) {
46076
- this.handlerPromise = this.handlerPromise.then(bind(this, this.updateHandler));
45835
+ this.handlerPromise = this.handlerPromise.then(function (h) {
45836
+ return _this2.updateHandler(h);
45837
+ });
45838
+ // set to undefined to avoid recursive loop in the handler getter
45839
+ return this.handler = undefined;
46077
45840
  } else if (handler) {
46078
- // Store the name of the handler on the handler for easy checks later
46079
- handler._handlerName = this.name;
46080
- return this.handler = handler;
45841
+ return this.updateHandler(handler);
46081
45842
  }
45843
+ };
46082
45844
 
46083
- return this.handler = undefined;
46084
- },
46085
-
46086
- _handlerPromise: undefined,
46087
-
46088
- params: null,
46089
- context: null,
46090
-
46091
- // Injected by the handler info factory.
46092
- factory: null,
46093
-
46094
- initialize: function () {},
46095
-
46096
- log: function (payload, message) {
45845
+ HandlerInfo.prototype.log = function (payload, message) {
46097
45846
  if (payload.log) {
46098
45847
  payload.log(this.name + ': ' + message);
46099
45848
  }
46100
- },
45849
+ };
46101
45850
 
46102
- promiseLabel: function (label) {
46103
- return promiseLabel("'" + this.name + "' " + label);
46104
- },
45851
+ HandlerInfo.prototype.promiseLabel = function (label) {
45852
+ return _promiseLabel("'" + this.name + "' " + label);
45853
+ };
46105
45854
 
46106
- getUnresolved: function () {
45855
+ HandlerInfo.prototype.getUnresolved = function () {
46107
45856
  return this;
46108
- },
45857
+ };
46109
45858
 
46110
- serialize: function () {
45859
+ HandlerInfo.prototype.serialize = function () {
46111
45860
  return this.params || {};
46112
- },
45861
+ };
46113
45862
 
46114
- updateHandler: function (handler) {
45863
+ HandlerInfo.prototype.updateHandler = function (handler) {
46115
45864
  // Store the name of the handler on the handler for easy checks later
46116
45865
  handler._handlerName = this.name;
46117
45866
  return this.handler = handler;
46118
- },
45867
+ };
46119
45868
 
46120
- resolve: function (shouldContinue, payload) {
46121
- var checkForAbort = bind(this, this.checkForAbort, shouldContinue),
46122
- beforeModel = bind(this, this.runBeforeModelHook, payload),
46123
- model = bind(this, this.getModel, payload),
46124
- afterModel = bind(this, this.runAfterModelHook, payload),
46125
- becomeResolved = bind(this, this.becomeResolved, payload),
45869
+ HandlerInfo.prototype.resolve = function (shouldContinue, payload) {
45870
+ var checkForAbort = this.checkForAbort.bind(this, shouldContinue),
45871
+ beforeModel = this.runBeforeModelHook.bind(this, payload),
45872
+ model = this.getModel.bind(this, payload),
45873
+ afterModel = this.runAfterModelHook.bind(this, payload),
45874
+ becomeResolved = this.becomeResolved.bind(this, payload),
46126
45875
  self = this;
46127
45876
 
46128
- return _rsvp.Promise.resolve(this.handlerPromise, this.promiseLabel("Start handler")).then(function (handler) {
45877
+ return _rsvp.Promise.resolve(this.handlerPromise, this.promiseLabel('Start handler')).then(function (handler) {
46129
45878
  // We nest this chain in case the handlerPromise has an error so that
46130
45879
  // we don't have to bubble it through every step
46131
- 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"));
45880
+ 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'));
46132
45881
  }, function (error) {
46133
45882
  throw error;
46134
45883
  });
46135
- },
45884
+ };
46136
45885
 
46137
- runBeforeModelHook: function (payload) {
45886
+ HandlerInfo.prototype.runBeforeModelHook = function (payload) {
46138
45887
  if (payload.trigger) {
46139
45888
  payload.trigger(true, 'willResolveModel', payload, this.handler);
46140
45889
  }
46141
45890
  return this.runSharedModelHook(payload, 'beforeModel', []);
46142
- },
45891
+ };
46143
45892
 
46144
- runAfterModelHook: function (payload, resolvedModel) {
45893
+ HandlerInfo.prototype.runAfterModelHook = function (payload, resolvedModel) {
46145
45894
  // Stash the resolved model on the payload.
46146
45895
  // This makes it possible for users to swap out
46147
45896
  // the resolved model in afterModel.
@@ -46153,11 +45902,11 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46153
45902
  // Return the value stashed in resolvedModels, which
46154
45903
  // might have been swapped out in afterModel.
46155
45904
  return payload.resolvedModels[name];
46156
- }, null, this.promiseLabel("Ignore fulfillment value and return model value"));
46157
- },
45905
+ }, null, this.promiseLabel('Ignore fulfillment value and return model value'));
45906
+ };
46158
45907
 
46159
- runSharedModelHook: function (payload, hookName, args) {
46160
- this.log(payload, "calling " + hookName + " hook");
45908
+ HandlerInfo.prototype.runSharedModelHook = function (payload, hookName, args) {
45909
+ this.log(payload, 'calling ' + hookName + ' hook');
46161
45910
 
46162
45911
  if (this.queryParams) {
46163
45912
  args.push(this.queryParams);
@@ -46170,26 +45919,25 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46170
45919
  result = null;
46171
45920
  }
46172
45921
 
46173
- return _rsvp.Promise.resolve(result, this.promiseLabel("Resolve value returned from one of the model hooks"));
46174
- },
45922
+ return _rsvp.Promise.resolve(result, this.promiseLabel('Resolve value returned from one of the model hooks'));
45923
+ };
46175
45924
 
46176
- // overridden by subclasses
46177
- getModel: null,
45925
+ HandlerInfo.prototype.getModel = function () {};
46178
45926
 
46179
- checkForAbort: function (shouldContinue, promiseValue) {
46180
- return _rsvp.Promise.resolve(shouldContinue(), this.promiseLabel("Check for abort")).then(function () {
45927
+ HandlerInfo.prototype.checkForAbort = function (shouldContinue, promiseValue) {
45928
+ return _rsvp.Promise.resolve(shouldContinue(), this.promiseLabel('Check for abort')).then(function () {
46181
45929
  // We don't care about shouldContinue's resolve value;
46182
45930
  // pass along the original value passed to this fn.
46183
45931
  return promiseValue;
46184
- }, null, this.promiseLabel("Ignore fulfillment value and continue"));
46185
- },
45932
+ }, null, this.promiseLabel('Ignore fulfillment value and continue'));
45933
+ };
46186
45934
 
46187
- stashResolvedModel: function (payload, resolvedModel) {
45935
+ HandlerInfo.prototype.stashResolvedModel = function (payload, resolvedModel) {
46188
45936
  payload.resolvedModels = payload.resolvedModels || {};
46189
45937
  payload.resolvedModels[this.name] = resolvedModel;
46190
- },
45938
+ };
46191
45939
 
46192
- becomeResolved: function (payload, resolvedContext) {
45940
+ HandlerInfo.prototype.becomeResolved = function (payload, resolvedContext) {
46193
45941
  var params = this.serialize(resolvedContext);
46194
45942
 
46195
45943
  if (payload) {
@@ -46204,9 +45952,9 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46204
45952
  handler: this.handler,
46205
45953
  params: params
46206
45954
  });
46207
- },
45955
+ };
46208
45956
 
46209
- shouldSupercede: function (other) {
45957
+ HandlerInfo.prototype.shouldSupercede = function (other) {
46210
45958
  // Prefer this newer handlerInfo over `other` if:
46211
45959
  // 1) The other one doesn't exist
46212
45960
  // 2) The names don't match
@@ -46219,40 +45967,57 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46219
45967
 
46220
45968
  var contextsMatch = other.context === this.context;
46221
45969
  return other.name !== this.name || this.hasOwnProperty('context') && !contextsMatch || this.hasOwnProperty('params') && !paramsMatch(this.params, other.params);
46222
- }
46223
- };
45970
+ };
46224
45971
 
46225
- Object.defineProperty(HandlerInfo.prototype, 'handler', {
46226
- get: function () {
46227
- // _handler could be set to either a handler object or undefined, so we
46228
- // compare against a default reference to know when it's been set
46229
- if (this._handler !== DEFAULT_HANDLER) {
46230
- return this._handler;
46231
- }
45972
+ (0, _emberBabel.createClass)(HandlerInfo, [{
45973
+ key: 'handler',
45974
+ get: function () {
45975
+ // _handler could be set to either a handler object or undefined, so we
45976
+ // compare against a default reference to know when it's been set
45977
+ if (this._handler !== DEFAULT_HANDLER) {
45978
+ return this._handler;
45979
+ }
46232
45980
 
46233
- return this.fetchHandler();
46234
- },
45981
+ return this.fetchHandler();
45982
+ },
45983
+ set: function (handler) {
45984
+ return this._handler = handler;
45985
+ }
45986
+ }, {
45987
+ key: 'handlerPromise',
45988
+ get: function () {
45989
+ if (this._handlerPromise !== null) {
45990
+ return this._handlerPromise;
45991
+ }
46235
45992
 
46236
- set: function (handler) {
46237
- return this._handler = handler;
46238
- }
46239
- });
45993
+ this.fetchHandler();
46240
45994
 
46241
- Object.defineProperty(HandlerInfo.prototype, 'handlerPromise', {
46242
- get: function () {
46243
- if (this._handlerPromise) {
46244
45995
  return this._handlerPromise;
46245
- }
46246
-
46247
- this.fetchHandler();
45996
+ },
45997
+ set: function (handlerPromise) {
45998
+ this._handlerPromise = handlerPromise;
46248
45999
 
46249
- return this._handlerPromise;
46250
- },
46000
+ return handlerPromise;
46001
+ }
46002
+ }]);
46003
+ return HandlerInfo;
46004
+ }();
46251
46005
 
46252
- set: function (handlerPromise) {
46253
- return this._handlerPromise = handlerPromise;
46254
- }
46255
- });
46006
+ // this is bonkers, we require that `context` be set on on the
46007
+ // HandlerInfo prototype to null because the checks in
46008
+ // `NamedTransitionIntent.prototype.applyToHandlers` here
46009
+ // https://github.com/tildeio/router.js/blob/v1.2.8/lib/router/transition-intent/named-transition-intent.js#L76-L81
46010
+ // check of `oldHandlerInfo.context === newHandlerInfo.context` and assumes
46011
+ // that the params _must_ match also in that case.
46012
+ //
46013
+ // The only reason `oldHandlerInfo.context` and `newHandlerInfo.context` did not
46014
+ // match in prior versions is because if the context isn't set yet (on newHandlerInfo)
46015
+ // is because it inherits the `null` from the prototype vs `undefined` (on
46016
+ // the oldHandlerInfo).
46017
+ //
46018
+ // A future refactoring should remove that conditional, and fix the hand full of
46019
+ // failing tests.
46020
+ HandlerInfo.prototype.context = null;
46256
46021
 
46257
46022
  function paramsMatch(a, b) {
46258
46023
  if (!a ^ !b) {
@@ -46276,48 +46041,55 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46276
46041
  return true;
46277
46042
  }
46278
46043
 
46279
- var ResolvedHandlerInfo = subclass(HandlerInfo, {
46280
- resolve: function (shouldContinue, payload) {
46044
+ var ResolvedHandlerInfo = function (_HandlerInfo) {
46045
+ (0, _emberBabel.inherits)(ResolvedHandlerInfo, _HandlerInfo);
46046
+
46047
+ function ResolvedHandlerInfo(props) {
46048
+
46049
+ var _this3 = (0, _emberBabel.possibleConstructorReturn)(this, _HandlerInfo.call(this, props));
46050
+
46051
+ _this3.isResolved = true;
46052
+ return _this3;
46053
+ }
46054
+
46055
+ ResolvedHandlerInfo.prototype.resolve = function (shouldContinue, payload) {
46281
46056
  // A ResolvedHandlerInfo just resolved with itself.
46282
46057
  if (payload && payload.resolvedModels) {
46283
46058
  payload.resolvedModels[this.name] = this.context;
46284
46059
  }
46285
- return _rsvp.Promise.resolve(this, this.promiseLabel("Resolve"));
46286
- },
46060
+ return _rsvp.Promise.resolve(this, this.promiseLabel('Resolve'));
46061
+ };
46287
46062
 
46288
- getUnresolved: function () {
46063
+ ResolvedHandlerInfo.prototype.getUnresolved = function () {
46289
46064
  return this.factory('param', {
46290
46065
  name: this.name,
46291
46066
  handler: this.handler,
46292
46067
  params: this.params
46293
46068
  });
46294
- },
46069
+ };
46295
46070
 
46296
- isResolved: true
46297
- });
46071
+ return ResolvedHandlerInfo;
46072
+ }(HandlerInfo);
46298
46073
 
46299
- var UnresolvedHandlerInfoByObject = subclass(HandlerInfo, {
46300
- getModel: function (payload) {
46301
- this.log(payload, this.name + ": resolving provided model");
46302
- return _rsvp.Promise.resolve(this.context);
46303
- },
46074
+ var UnresolvedHandlerInfoByObject = function (_HandlerInfo2) {
46075
+ (0, _emberBabel.inherits)(UnresolvedHandlerInfoByObject, _HandlerInfo2);
46304
46076
 
46305
- initialize: function (props) {
46306
- this.names = props.names || [];
46307
- this.context = props.context;
46308
- },
46077
+ function UnresolvedHandlerInfoByObject(props) {
46309
46078
 
46310
- /**
46311
- @private
46312
- Serializes a handler using its custom `serialize` method or
46313
- by a default that looks up the expected property name from
46314
- the dynamic segment.
46315
- @param {Object} model the model to be serialized for this handler
46316
- */
46317
- serialize: function (_model) {
46079
+ var _this4 = (0, _emberBabel.possibleConstructorReturn)(this, _HandlerInfo2.call(this, props));
46080
+
46081
+ _this4.names = _this4.names || [];
46082
+ return _this4;
46083
+ }
46084
+
46085
+ UnresolvedHandlerInfoByObject.prototype.getModel = function (payload) {
46086
+ this.log(payload, this.name + ': resolving provided model');
46087
+ return _rsvp.Promise.resolve(this.context);
46088
+ };
46089
+
46090
+ UnresolvedHandlerInfoByObject.prototype.serialize = function (_model) {
46318
46091
  var model = _model || this.context,
46319
- names = this.names,
46320
- serializer = this.serializer || this.handler && this.handler.serialize;
46092
+ names = this.names;
46321
46093
 
46322
46094
  var object = {};
46323
46095
  if (isParam(model)) {
@@ -46326,8 +46098,11 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46326
46098
  }
46327
46099
 
46328
46100
  // Use custom serialize if it exists.
46329
- if (serializer) {
46330
- return serializer(model, names);
46101
+ if (this.serializer) {
46102
+ // invoke this.serializer unbound (getSerializer returns a stateless function)
46103
+ return this.serializer.call(null, model, names);
46104
+ } else if (this.handler && this.handler.serialize) {
46105
+ return this.handler.serialize(model, names);
46331
46106
  }
46332
46107
 
46333
46108
  if (names.length !== 1) {
@@ -46342,16 +46117,23 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46342
46117
  object[name] = model;
46343
46118
  }
46344
46119
  return object;
46345
- }
46346
- });
46120
+ };
46347
46121
 
46348
- // Generated by URL transitions and non-dynamic route segments in named Transitions.
46349
- var UnresolvedHandlerInfoByParam = subclass(HandlerInfo, {
46350
- initialize: function (props) {
46351
- this.params = props.params || {};
46352
- },
46122
+ return UnresolvedHandlerInfoByObject;
46123
+ }(HandlerInfo);
46124
+
46125
+ var UnresolvedHandlerInfoByParam = function (_HandlerInfo3) {
46126
+ (0, _emberBabel.inherits)(UnresolvedHandlerInfoByParam, _HandlerInfo3);
46127
+
46128
+ function UnresolvedHandlerInfoByParam(props) {
46129
+
46130
+ var _this5 = (0, _emberBabel.possibleConstructorReturn)(this, _HandlerInfo3.call(this, props));
46131
+
46132
+ _this5.params = _this5.params || {};
46133
+ return _this5;
46134
+ }
46353
46135
 
46354
- getModel: function (payload) {
46136
+ UnresolvedHandlerInfoByParam.prototype.getModel = function (payload) {
46355
46137
  var fullParams = this.params;
46356
46138
  if (payload && payload.queryParams) {
46357
46139
  fullParams = {};
@@ -46363,8 +46145,10 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46363
46145
  var hookName = resolveHook(handler, 'deserialize') || resolveHook(handler, 'model');
46364
46146
 
46365
46147
  return this.runSharedModelHook(payload, hookName, [fullParams]);
46366
- }
46367
- });
46148
+ };
46149
+
46150
+ return UnresolvedHandlerInfoByParam;
46151
+ }(HandlerInfo);
46368
46152
 
46369
46153
  handlerInfoFactory.klasses = {
46370
46154
  resolved: ResolvedHandlerInfo,
@@ -46373,27 +46157,27 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46373
46157
  };
46374
46158
 
46375
46159
  function handlerInfoFactory(name, props) {
46376
- var Ctor = handlerInfoFactory.klasses[name],
46377
- handlerInfo = new Ctor(props || {});
46160
+ var klass = handlerInfoFactory.klasses[name];
46161
+ var handlerInfo = new klass(props || {});
46378
46162
  handlerInfo.factory = handlerInfoFactory;
46379
46163
  return handlerInfo;
46380
46164
  }
46381
46165
 
46382
- var NamedTransitionIntent = subclass(TransitionIntent, {
46383
- name: null,
46384
- pivotHandler: null,
46385
- contexts: null,
46386
- queryParams: null,
46166
+ var NamedTransitionIntent = function (_TransitionIntent) {
46167
+ (0, _emberBabel.inherits)(NamedTransitionIntent, _TransitionIntent);
46387
46168
 
46388
- initialize: function (props) {
46389
- this.name = props.name;
46390
- this.pivotHandler = props.pivotHandler;
46391
- this.contexts = props.contexts || [];
46392
- this.queryParams = props.queryParams;
46393
- },
46169
+ function NamedTransitionIntent(props) {
46394
46170
 
46395
- applyToState: function (oldState, recognizer, getHandler, isIntermediate, getSerializer) {
46171
+ var _this6 = (0, _emberBabel.possibleConstructorReturn)(this, _TransitionIntent.call(this, props));
46396
46172
 
46173
+ _this6.name = props.name;
46174
+ _this6.pivotHandler = props.pivotHandler;
46175
+ _this6.contexts = props.contexts || [];
46176
+ _this6.queryParams = props.queryParams;
46177
+ return _this6;
46178
+ }
46179
+
46180
+ NamedTransitionIntent.prototype.applyToState = function (oldState, recognizer, getHandler, isIntermediate, getSerializer) {
46397
46181
  var partitionedArgs = extractQueryParams([this.name].concat(this.contexts)),
46398
46182
  pureArgs = partitionedArgs[0],
46399
46183
  handlers = recognizer.handlersFor(pureArgs[0]);
@@ -46401,10 +46185,9 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46401
46185
  var targetRouteName = handlers[handlers.length - 1].handler;
46402
46186
 
46403
46187
  return this.applyToHandlers(oldState, handlers, getHandler, targetRouteName, isIntermediate, null, getSerializer);
46404
- },
46405
-
46406
- applyToHandlers: function (oldState, handlers, getHandler, targetRouteName, isIntermediate, checkingIfActive, getSerializer) {
46188
+ };
46407
46189
 
46190
+ NamedTransitionIntent.prototype.applyToHandlers = function (oldState, handlers, getHandler, targetRouteName, isIntermediate, checkingIfActive, getSerializer) {
46408
46191
  var i, len, result, name, oldHandlerInfo, newHandlerInfo, serializer, oldContext, handlerToUse;
46409
46192
  var newState = new TransitionState();
46410
46193
  var objects = this.contexts.slice(0);
@@ -46475,7 +46258,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46475
46258
  }
46476
46259
 
46477
46260
  if (objects.length > 0) {
46478
- throw new Error("More context objects were passed than there are dynamic segments for the route: " + targetRouteName);
46261
+ throw new Error('More context objects were passed than there are dynamic segments for the route: ' + targetRouteName);
46479
46262
  }
46480
46263
 
46481
46264
  if (!isIntermediate) {
@@ -46485,9 +46268,9 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46485
46268
  merge(newState.queryParams, this.queryParams || {});
46486
46269
 
46487
46270
  return newState;
46488
- },
46271
+ };
46489
46272
 
46490
- invalidateChildren: function (handlerInfos, invalidateIndex) {
46273
+ NamedTransitionIntent.prototype.invalidateChildren = function (handlerInfos, invalidateIndex) {
46491
46274
  var i, l, handlerInfo;
46492
46275
 
46493
46276
  for (i = invalidateIndex, l = handlerInfos.length; i < l; ++i) {
@@ -46495,12 +46278,11 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46495
46278
 
46496
46279
  handlerInfos[i] = handlerInfo.getUnresolved();
46497
46280
  }
46498
- },
46281
+ };
46499
46282
 
46500
- getHandlerInfoForDynamicSegment: function (name, getHandler, names, objects, oldHandlerInfo, targetRouteName, i, serializer) {
46283
+ NamedTransitionIntent.prototype.getHandlerInfoForDynamicSegment = function (name, getHandler, names, objects, oldHandlerInfo, targetRouteName, i, serializer) {
46501
46284
  var objectToUse, preTransitionHandlerInfo;
46502
46285
  if (objects.length > 0) {
46503
-
46504
46286
  // Use the objects provided for this transition.
46505
46287
  objectToUse = objects[objects.length - 1];
46506
46288
  if (isParam(objectToUse)) {
@@ -46535,9 +46317,9 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46535
46317
  context: objectToUse,
46536
46318
  names: names
46537
46319
  });
46538
- },
46320
+ };
46539
46321
 
46540
- createParamHandlerInfo: function (name, getHandler, names, objects, oldHandlerInfo) {
46322
+ NamedTransitionIntent.prototype.createParamHandlerInfo = function (name, getHandler, names, objects, oldHandlerInfo) {
46541
46323
  var params = {},
46542
46324
  oldParams,
46543
46325
  peek,
@@ -46546,14 +46328,13 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46546
46328
  // Soak up all the provided string/numbers
46547
46329
  var numNames = names.length;
46548
46330
  while (numNames--) {
46549
-
46550
46331
  // Only use old params if the names match with the new handler
46551
46332
  oldParams = oldHandlerInfo && name === oldHandlerInfo.name && oldHandlerInfo.params || {};
46552
46333
  peek = objects[objects.length - 1];
46553
46334
  paramName = names[numNames];
46554
46335
 
46555
46336
  if (isParam(peek)) {
46556
- params[paramName] = "" + objects.pop();
46337
+ params[paramName] = '' + objects.pop();
46557
46338
  } else {
46558
46339
  // If we're here, this means only some of the params
46559
46340
  // were string/number params, so try and use a param
@@ -46571,8 +46352,10 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46571
46352
  getHandler: getHandler,
46572
46353
  params: params
46573
46354
  });
46574
- }
46575
- });
46355
+ };
46356
+
46357
+ return NamedTransitionIntent;
46358
+ }(TransitionIntent);
46576
46359
 
46577
46360
  function UnrecognizedURLError(message) {
46578
46361
  if (!(this instanceof UnrecognizedURLError)) {
@@ -46596,16 +46379,20 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46596
46379
  this.code = error.code;
46597
46380
  }
46598
46381
 
46599
- UnrecognizedURLError.prototype = oCreate(Error.prototype);
46382
+ UnrecognizedURLError.prototype = Object.create(Error.prototype);
46600
46383
 
46601
- var URLTransitionIntent = subclass(TransitionIntent, {
46602
- url: null,
46384
+ var URLTransitionIntent = function (_TransitionIntent2) {
46385
+ (0, _emberBabel.inherits)(URLTransitionIntent, _TransitionIntent2);
46603
46386
 
46604
- initialize: function (props) {
46605
- this.url = props.url;
46606
- },
46387
+ function URLTransitionIntent(props) {
46388
+
46389
+ var _this7 = (0, _emberBabel.possibleConstructorReturn)(this, _TransitionIntent2.call(this, props));
46390
+
46391
+ _this7.url = props.url;
46392
+ return _this7;
46393
+ }
46607
46394
 
46608
- applyToState: function (oldState, recognizer, getHandler) {
46395
+ URLTransitionIntent.prototype.applyToState = function (oldState, recognizer, getHandler) {
46609
46396
  var newState = new TransitionState(),
46610
46397
  result,
46611
46398
  name,
@@ -46667,12 +46454,14 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46667
46454
  merge(newState.queryParams, results.queryParams);
46668
46455
 
46669
46456
  return newState;
46670
- }
46671
- });
46457
+ };
46458
+
46459
+ return URLTransitionIntent;
46460
+ }(TransitionIntent);
46672
46461
 
46673
46462
  var pop = Array.prototype.pop;
46674
46463
 
46675
- function Router$1(_options) {
46464
+ function Router(_options) {
46676
46465
  var options = _options || {};
46677
46466
  this.getHandler = options.getHandler || this.getHandler;
46678
46467
  this.getSerializer = options.getSerializer || this.getSerializer;
@@ -46689,7 +46478,6 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46689
46478
  this._changedQueryParams = undefined;
46690
46479
  this.oldState = undefined;
46691
46480
  this.currentHandlerInfos = undefined;
46692
- this.state = undefined;
46693
46481
  this.currentSequence = 0;
46694
46482
 
46695
46483
  this.recognizer = new _routeRecognizer.default();
@@ -46705,7 +46493,6 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46705
46493
  var queryParamChangelist = getChangelist(oldState.queryParams, newState.queryParams);
46706
46494
 
46707
46495
  if (handlerInfosEqual(newState.handlerInfos, oldState.handlerInfos)) {
46708
-
46709
46496
  // This is a no-op transition. See if query params changed.
46710
46497
  if (queryParamChangelist) {
46711
46498
  newTransition = this.queryParamsTransition(queryParamChangelist, wasTransitioning, oldState, newState);
@@ -46744,7 +46531,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46744
46531
  // after the transition has been finalized.
46745
46532
  newTransition.promise = newTransition.promise.then(function (result) {
46746
46533
  return finalizeTransition(newTransition, result.state);
46747
- }, null, promiseLabel("Settle transition promise when transition is finalized"));
46534
+ }, null, _promiseLabel('Settle transition promise when transition is finalized'));
46748
46535
 
46749
46536
  if (!wasTransitioning) {
46750
46537
  notifyExistingHandlers(this, newState, newTransition);
@@ -46755,8 +46542,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46755
46542
  return newTransition;
46756
46543
  }
46757
46544
 
46758
- Router$1.prototype = {
46759
-
46545
+ Router.prototype = {
46760
46546
  /**
46761
46547
  The main entry point into the router. The API is essentially
46762
46548
  the same as the `map` method in `route-recognizer`.
@@ -46817,7 +46603,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46817
46603
  router.didTransition(router.currentHandlerInfos);
46818
46604
  }
46819
46605
  return result;
46820
- }, null, promiseLabel("Transition complete"));
46606
+ }, null, _promiseLabel('Transition complete'));
46821
46607
  return newTransition;
46822
46608
  }
46823
46609
  },
@@ -46878,7 +46664,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46878
46664
  @param {String} url a URL to update to
46879
46665
  */
46880
46666
  updateURL: function () {
46881
- throw new Error("updateURL is not implemented");
46667
+ throw new Error('updateURL is not implemented');
46882
46668
  },
46883
46669
 
46884
46670
  /**
@@ -46905,20 +46691,11 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46905
46691
  },
46906
46692
 
46907
46693
  refresh: function (pivotHandler) {
46908
- var previousTransition = this.activeTransition,
46909
- i,
46910
- len,
46911
- handlerInfo;
46694
+ var previousTransition = this.activeTransition;
46912
46695
  var state = previousTransition ? previousTransition.state : this.state;
46913
46696
  var handlerInfos = state.handlerInfos;
46914
- var params = {};
46915
- for (i = 0, len = handlerInfos.length; i < len; ++i) {
46916
- handlerInfo = handlerInfos[i];
46917
46697
 
46918
- params[handlerInfo.name] = handlerInfo.params || {};
46919
- }
46920
-
46921
- log(this, "Starting a refresh transition");
46698
+ _log(this, 'Starting a refresh transition');
46922
46699
  var intent = new NamedTransitionIntent({
46923
46700
  name: handlerInfos[handlerInfos.length - 1].name,
46924
46701
  pivotHandler: pivotHandler || handlerInfos[0].handler,
@@ -46955,7 +46732,6 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46955
46732
  @return {String} a URL
46956
46733
  */
46957
46734
  generate: function (handlerName) {
46958
-
46959
46735
  var partitionedArgs = extractQueryParams(slice.call(arguments, 1)),
46960
46736
  suppliedParams = partitionedArgs[0],
46961
46737
  queryParams = partitionedArgs[1],
@@ -46966,7 +46742,10 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
46966
46742
 
46967
46743
  // Construct a TransitionIntent with the provided params
46968
46744
  // and apply it to the present state of the router.
46969
- var intent = new NamedTransitionIntent({ name: handlerName, contexts: suppliedParams });
46745
+ var intent = new NamedTransitionIntent({
46746
+ name: handlerName,
46747
+ contexts: suppliedParams
46748
+ });
46970
46749
  var state = intent.applyToState(this.state, this.recognizer, this.getHandler, null, this.getSerializer);
46971
46750
  var params = {};
46972
46751
 
@@ -47054,7 +46833,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
47054
46833
 
47055
46834
  trigger: function () /*name*/{
47056
46835
  var args = slice.call(arguments);
47057
- trigger(this, this.currentHandlerInfos, false, args);
46836
+ _trigger(this, this.currentHandlerInfos, false, args);
47058
46837
  },
47059
46838
 
47060
46839
  /**
@@ -47072,12 +46851,11 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
47072
46851
  function fireQueryParamDidChange(router, newState, queryParamChangelist) {
47073
46852
  // If queryParams changed trigger event
47074
46853
  if (queryParamChangelist) {
47075
-
47076
46854
  // This is a little hacky but we need some way of storing
47077
46855
  // changed query params given that no activeTransition
47078
46856
  // is guaranteed to have occurred.
47079
46857
  router._changedQueryParams = queryParamChangelist.all;
47080
- trigger(router, newState.handlerInfos, true, ['queryParamsDidChange', queryParamChangelist.changed, queryParamChangelist.all, queryParamChangelist.removed]);
46858
+ _trigger(router, newState.handlerInfos, true, ['queryParamsDidChange', queryParamChangelist.changed, queryParamChangelist.all, queryParamChangelist.removed]);
47081
46859
  router._changedQueryParams = null;
47082
46860
  }
47083
46861
  }
@@ -47366,9 +47144,8 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
47366
47144
  function finalizeTransition(transition, newState) {
47367
47145
  var router, handlerInfos, infos;
47368
47146
 
47369
-
47370
47147
  try {
47371
- log(transition.router, transition.sequence, "Resolved all models on destination route; finalizing transition.");
47148
+ _log(transition.router, transition.sequence, 'Resolved all models on destination route; finalizing transition.');
47372
47149
 
47373
47150
  router = transition.router, handlerInfos = newState.handlerInfos;
47374
47151
 
@@ -47388,13 +47165,13 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
47388
47165
  transition.isActive = false;
47389
47166
  router.activeTransition = null;
47390
47167
 
47391
- trigger(router, router.currentHandlerInfos, true, ['didTransition']);
47168
+ _trigger(router, router.currentHandlerInfos, true, ['didTransition']);
47392
47169
 
47393
47170
  if (router.didTransition) {
47394
47171
  router.didTransition(router.currentHandlerInfos);
47395
47172
  }
47396
47173
 
47397
- log(router, transition.sequence, "TRANSITION COMPLETE.");
47174
+ _log(router, transition.sequence, 'TRANSITION COMPLETE.');
47398
47175
 
47399
47176
  // Resolve with the final handler.
47400
47177
  return handlerInfos[handlerInfos.length - 1].handler;
@@ -47435,8 +47212,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
47435
47212
 
47436
47213
  var intent;
47437
47214
  if (args.length === 0) {
47438
-
47439
- log(router, "Updating query params");
47215
+ _log(router, 'Updating query params');
47440
47216
 
47441
47217
  // A query param update is really just a transition
47442
47218
  // into the route you're already on.
@@ -47448,12 +47224,10 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
47448
47224
  queryParams: queryParams
47449
47225
  });
47450
47226
  } else if (name.charAt(0) === '/') {
47451
-
47452
- log(router, "Attempting URL transition to " + name);
47227
+ _log(router, 'Attempting URL transition to ' + name);
47453
47228
  intent = new URLTransitionIntent({ url: name });
47454
47229
  } else {
47455
-
47456
- log(router, "Attempting transition to " + name);
47230
+ _log(router, 'Attempting transition to ' + name);
47457
47231
  intent = new NamedTransitionIntent({
47458
47232
  name: args[0],
47459
47233
  contexts: slice.call(args, 1),
@@ -47546,7 +47320,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
47546
47320
  i,
47547
47321
  len,
47548
47322
  qp;
47549
- trigger(router, resolvedHandlers, true, ['finalizeQueryParamChange', newQueryParams, finalQueryParamsArray, transition]);
47323
+ _trigger(router, resolvedHandlers, true, ['finalizeQueryParamChange', newQueryParams, finalQueryParamsArray, transition]);
47550
47324
 
47551
47325
  if (transition) {
47552
47326
  transition._visibleQueryParams = {};
@@ -47567,8 +47341,6 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
47567
47341
  function notifyExistingHandlers(router, newState, newTransition) {
47568
47342
  var oldHandlers = router.state.handlerInfos,
47569
47343
  changing = [],
47570
- leavingIndex = null,
47571
- leaving,
47572
47344
  i,
47573
47345
  oldHandlerLen,
47574
47346
  oldHandler,
@@ -47580,7 +47352,6 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
47580
47352
  newHandler = newState.handlerInfos[i];
47581
47353
 
47582
47354
  if (!newHandler || oldHandler.name !== newHandler.name) {
47583
- leavingIndex = i;
47584
47355
  break;
47585
47356
  }
47586
47357
 
@@ -47589,11 +47360,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
47589
47360
  }
47590
47361
  }
47591
47362
 
47592
- if (leavingIndex !== null) {
47593
- leaving = oldHandlers.slice(leavingIndex, oldHandlerLen);
47594
- }
47595
-
47596
- trigger(router, oldHandlers, true, ['willTransition', newTransition]);
47363
+ _trigger(router, oldHandlers, true, ['willTransition', newTransition]);
47597
47364
 
47598
47365
  if (router.willTransition) {
47599
47366
  router.willTransition(oldHandlers, newState.handlerInfos, newTransition);
@@ -47601,7 +47368,7 @@ enifed('router', ['exports', 'route-recognizer', 'rsvp'], function (exports, _ro
47601
47368
  }
47602
47369
 
47603
47370
  exports.Transition = Transition;
47604
- exports.default = Router$1;
47371
+ exports.default = Router;
47605
47372
  });
47606
47373
  enifed('rsvp', ['exports', 'ember-babel', 'node-module'], function (exports, _emberBabel, _nodeModule) {
47607
47374
  'use strict';