ember-source 2.11.0.beta.4 → 2.11.0.beta.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,12 @@
1
1
  ;(function() {
2
2
  /*!
3
3
  * @overview Ember - JavaScript Application Framework
4
- * @copyright Copyright 2011-2016 Tilde Inc. and contributors
4
+ * @copyright Copyright 2011-2017 Tilde Inc. and contributors
5
5
  * Portions Copyright 2006-2011 Strobe Inc.
6
6
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
7
7
  * @license Licensed under MIT license
8
8
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
9
- * @version 2.11.0-beta.4
9
+ * @version 2.11.0-beta.8
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -6840,16 +6840,15 @@ enifed('ember-glimmer/component', ['exports', 'ember-utils', 'ember-views', 'emb
6840
6840
 
6841
6841
  The easiest way to create an `Ember.Component` is via
6842
6842
  a template. If you name a template
6843
- `components/my-foo`, you will be able to use
6843
+ `app/components/my-foo.hbs`, you will be able to use
6844
6844
  `{{my-foo}}` in other templates, which will make
6845
6845
  an instance of the isolated component.
6846
6846
 
6847
- ```handlebars
6848
- {{app-profile person=currentUser}}
6847
+ ```app/components/my-foo.hbs
6848
+ {{person-profile person=currentUser}}
6849
6849
  ```
6850
6850
 
6851
- ```handlebars
6852
- <!-- app-profile template -->
6851
+ ```app/components/person-profile.hbs
6853
6852
  <h1>{{person.title}}</h1>
6854
6853
  <img src={{person.avatar}}>
6855
6854
  <p class='signature'>{{person.signature}}</p>
@@ -6861,14 +6860,13 @@ enifed('ember-glimmer/component', ['exports', 'ember-utils', 'ember-views', 'emb
6861
6860
  context of the surrounding context or outer controller:
6862
6861
 
6863
6862
  ```handlebars
6864
- {{#app-profile person=currentUser}}
6863
+ {{#person-profile person=currentUser}}
6865
6864
  <p>Admin mode</p>
6866
6865
  {{! Executed in the controller's context. }}
6867
- {{/app-profile}}
6866
+ {{/person-profile}}
6868
6867
  ```
6869
6868
 
6870
- ```handlebars
6871
- <!-- app-profile template -->
6869
+ ```app/components/person-profile.hbs
6872
6870
  <h1>{{person.title}}</h1>
6873
6871
  {{! Executed in the component's context. }}
6874
6872
  {{yield}} {{! block contents }}
@@ -6877,16 +6875,17 @@ enifed('ember-glimmer/component', ['exports', 'ember-utils', 'ember-views', 'emb
6877
6875
  If you want to customize the component, in order to
6878
6876
  handle events or actions, you implement a subclass
6879
6877
  of `Ember.Component` named after the name of the
6880
- component. Note that `Component` needs to be appended to the name of
6881
- your subclass like `AppProfileComponent`.
6878
+ component.
6882
6879
 
6883
6880
  For example, you could implement the action
6884
- `hello` for the `app-profile` component:
6881
+ `hello` for the `person-profile` component:
6885
6882
 
6886
- ```javascript
6887
- App.AppProfileComponent = Ember.Component.extend({
6883
+ ```app/components/person-profile.js
6884
+ import Ember from 'ember';
6885
+
6886
+ export default Ember.Component.extend({
6888
6887
  actions: {
6889
- hello: function(name) {
6888
+ hello(name) {
6890
6889
  console.log("Hello", name);
6891
6890
  }
6892
6891
  }
@@ -6895,19 +6894,423 @@ enifed('ember-glimmer/component', ['exports', 'ember-utils', 'ember-views', 'emb
6895
6894
 
6896
6895
  And then use it in the component's template:
6897
6896
 
6898
- ```handlebars
6899
- <!-- app-profile template -->
6897
+ ```app/templates/components/person-profile.hbs
6900
6898
  <h1>{{person.title}}</h1>
6901
6899
  {{yield}} <!-- block contents -->
6902
6900
  <button {{action 'hello' person.name}}>
6903
6901
  Say Hello to {{person.name}}
6904
6902
  </button>
6905
6903
  ```
6904
+
6906
6905
  Components must have a `-` in their name to avoid
6907
6906
  conflicts with built-in controls that wrap HTML
6908
6907
  elements. This is consistent with the same
6909
6908
  requirement in web components.
6910
6909
 
6910
+
6911
+ ## HTML Tag
6912
+
6913
+ The default HTML tag name used for a component's DOM representation is `div`.
6914
+ This can be customized by setting the `tagName` property.
6915
+ The following component class:
6916
+
6917
+ ```app/components/emphasized-paragraph.js
6918
+ import Ember from 'ember';
6919
+
6920
+ export default Ember.Component.extend({
6921
+ tagName: 'em'
6922
+ });
6923
+ ```
6924
+
6925
+ Would result in instances with the following HTML:
6926
+
6927
+ ```html
6928
+ <em id="ember1" class="ember-view"></em>
6929
+ ```
6930
+
6931
+
6932
+ ## HTML `class` Attribute
6933
+
6934
+ The HTML `class` attribute of a component's tag can be set by providing a
6935
+ `classNames` property that is set to an array of strings:
6936
+
6937
+ ```app/components/my-widget.js
6938
+ import Ember from 'ember';
6939
+
6940
+ export default Ember.Component.extend({
6941
+ classNames: ['my-class', 'my-other-class']
6942
+ });
6943
+ ```
6944
+
6945
+ Will result in component instances with an HTML representation of:
6946
+
6947
+ ```html
6948
+ <div id="ember1" class="ember-view my-class my-other-class"></div>
6949
+ ```
6950
+
6951
+ `class` attribute values can also be set by providing a `classNameBindings`
6952
+ property set to an array of properties names for the component. The return value
6953
+ of these properties will be added as part of the value for the components's `class`
6954
+ attribute. These properties can be computed properties:
6955
+
6956
+ ```app/components/my-widget.js
6957
+ import Ember from 'ember';
6958
+
6959
+ export default Ember.Component.extend({
6960
+ classNameBindings: ['propertyA', 'propertyB'],
6961
+ propertyA: 'from-a',
6962
+ propertyB: Ember.computed(function() {
6963
+ if (someLogic) { return 'from-b'; }
6964
+ })
6965
+ });
6966
+ ```
6967
+
6968
+ Will result in component instances with an HTML representation of:
6969
+
6970
+ ```html
6971
+ <div id="ember1" class="ember-view from-a from-b"></div>
6972
+ ```
6973
+
6974
+ If the value of a class name binding returns a boolean the property name
6975
+ itself will be used as the class name if the property is true.
6976
+ The class name will not be added if the value is `false` or `undefined`.
6977
+
6978
+ ```app/components/my-widget.js
6979
+ import Ember from 'ember';
6980
+
6981
+ export default Ember.Component.extend({
6982
+ classNameBindings: ['hovered'],
6983
+ hovered: true
6984
+ });
6985
+ ```
6986
+
6987
+ Will result in component instances with an HTML representation of:
6988
+
6989
+ ```html
6990
+ <div id="ember1" class="ember-view hovered"></div>
6991
+ ```
6992
+
6993
+ When using boolean class name bindings you can supply a string value other
6994
+ than the property name for use as the `class` HTML attribute by appending the
6995
+ preferred value after a ":" character when defining the binding:
6996
+
6997
+ ```app/components/my-widget.js
6998
+ import Ember from 'ember';
6999
+
7000
+ export default Ember.Component.extend({
7001
+ classNameBindings: ['awesome:so-very-cool'],
7002
+ awesome: true
7003
+ });
7004
+ ```
7005
+
7006
+ Will result in component instances with an HTML representation of:
7007
+
7008
+ ```html
7009
+ <div id="ember1" class="ember-view so-very-cool"></div>
7010
+ ```
7011
+
7012
+ Boolean value class name bindings whose property names are in a
7013
+ camelCase-style format will be converted to a dasherized format:
7014
+
7015
+ ```app/components/my-widget.js
7016
+ import Ember from 'ember';
7017
+
7018
+ export default Ember.Component.extend({
7019
+ classNameBindings: ['isUrgent'],
7020
+ isUrgent: true
7021
+ });
7022
+ ```
7023
+
7024
+ Will result in component instances with an HTML representation of:
7025
+
7026
+ ```html
7027
+ <div id="ember1" class="ember-view is-urgent"></div>
7028
+ ```
7029
+
7030
+ Class name bindings can also refer to object values that are found by
7031
+ traversing a path relative to the component itself:
7032
+
7033
+ ```app/components/my-widget.js
7034
+ import Ember from 'ember';
7035
+
7036
+ export default Ember.Component.extend({
7037
+ classNameBindings: ['messages.empty'],
7038
+ messages: Ember.Object.create({
7039
+ empty: true
7040
+ })
7041
+ });
7042
+ ```
7043
+
7044
+ Will result in component instances with an HTML representation of:
7045
+
7046
+ ```html
7047
+ <div id="ember1" class="ember-view empty"></div>
7048
+ ```
7049
+
7050
+ If you want to add a class name for a property which evaluates to true and
7051
+ and a different class name if it evaluates to false, you can pass a binding
7052
+ like this:
7053
+
7054
+ ```app/components/my-widget.js
7055
+ import Ember from 'ember';
7056
+
7057
+ export default Ember.Component.extend({
7058
+ classNameBindings: ['isEnabled:enabled:disabled'],
7059
+ isEnabled: true
7060
+ });
7061
+ ```
7062
+
7063
+ Will result in component instances with an HTML representation of:
7064
+
7065
+ ```html
7066
+ <div id="ember1" class="ember-view enabled"></div>
7067
+ ```
7068
+
7069
+ When isEnabled is `false`, the resulting HTML representation looks like
7070
+ this:
7071
+
7072
+ ```html
7073
+ <div id="ember1" class="ember-view disabled"></div>
7074
+ ```
7075
+
7076
+ This syntax offers the convenience to add a class if a property is `false`:
7077
+
7078
+ ```app/components/my-widget.js
7079
+ import Ember from 'ember';
7080
+
7081
+ // Applies no class when isEnabled is true and class 'disabled' when isEnabled is false
7082
+ export default Ember.Component.extend({
7083
+ classNameBindings: ['isEnabled::disabled'],
7084
+ isEnabled: true
7085
+ });
7086
+ ```
7087
+
7088
+ Will result in component instances with an HTML representation of:
7089
+
7090
+ ```html
7091
+ <div id="ember1" class="ember-view"></div>
7092
+ ```
7093
+
7094
+ When the `isEnabled` property on the component is set to `false`, it will result
7095
+ in component instances with an HTML representation of:
7096
+
7097
+ ```html
7098
+ <div id="ember1" class="ember-view disabled"></div>
7099
+ ```
7100
+
7101
+ Updates to the value of a class name binding will result in automatic
7102
+ update of the HTML `class` attribute in the component's rendered HTML
7103
+ representation. If the value becomes `false` or `undefined` the class name
7104
+ will be removed.
7105
+ Both `classNames` and `classNameBindings` are concatenated properties. See
7106
+ [Ember.Object](/api/classes/Ember.Object.html) documentation for more
7107
+ information about concatenated properties.
7108
+
7109
+
7110
+ ## HTML Attributes
7111
+
7112
+ The HTML attribute section of a component's tag can be set by providing an
7113
+ `attributeBindings` property set to an array of property names on the component.
7114
+ The return value of these properties will be used as the value of the component's
7115
+ HTML associated attribute:
7116
+
7117
+ ```app/components/my-anchor.js
7118
+ import Ember from 'ember';
7119
+
7120
+ export default Ember.Component.extend({
7121
+ tagName: 'a',
7122
+ attributeBindings: ['href'],
7123
+ href: 'http://google.com'
7124
+ });
7125
+ ```
7126
+
7127
+ Will result in component instances with an HTML representation of:
7128
+
7129
+ ```html
7130
+ <a id="ember1" class="ember-view" href="http://google.com"></a>
7131
+ ```
7132
+
7133
+ One property can be mapped on to another by placing a ":" between
7134
+ the source property and the destination property:
7135
+
7136
+ ```app/components/my-anchor.js
7137
+ import Ember from 'ember';
7138
+
7139
+ export default Ember.Component.extend({
7140
+ tagName: 'a',
7141
+ attributeBindings: ['url:href'],
7142
+ url: 'http://google.com'
7143
+ });
7144
+ ```
7145
+
7146
+ Will result in component instances with an HTML representation of:
7147
+
7148
+ ```html
7149
+ <a id="ember1" class="ember-view" href="http://google.com"></a>
7150
+ ```
7151
+
7152
+ Namespaced attributes (e.g. `xlink:href`) are supported, but have to be
7153
+ mapped, since `:` is not a valid character for properties in Javascript:
7154
+
7155
+ ```app/components/my-use.js
7156
+ import Ember from 'ember';
7157
+
7158
+ export default Ember.Component.extend({
7159
+ tagName: 'use',
7160
+ attributeBindings: ['xlinkHref:xlink:href'],
7161
+ xlinkHref: '#triangle'
7162
+ });
7163
+ ```
7164
+
7165
+ Will result in component instances with an HTML representation of:
7166
+
7167
+ ```html
7168
+ <use xlink:href="#triangle"></use>
7169
+ ```
7170
+
7171
+ If the return value of an `attributeBindings` monitored property is a boolean
7172
+ the attribute will be present or absent depending on the value:
7173
+
7174
+ ```app/components/my-text-input.js
7175
+ import Ember from 'ember';
7176
+
7177
+ export default Ember.Component.extend({
7178
+ tagName: 'input',
7179
+ attributeBindings: ['disabled'],
7180
+ disabled: false
7181
+ });
7182
+ ```
7183
+
7184
+ Will result in a component instance with an HTML representation of:
7185
+
7186
+ ```html
7187
+ <input id="ember1" class="ember-view" />
7188
+ ```
7189
+
7190
+ `attributeBindings` can refer to computed properties:
7191
+
7192
+ ```app/components/my-text-input.js
7193
+ import Ember from 'ember';
7194
+
7195
+ export default Ember.Component.extend({
7196
+ tagName: 'input',
7197
+ attributeBindings: ['disabled'],
7198
+ disabled: Ember.computed(function() {
7199
+ if (someLogic) {
7200
+ return true;
7201
+ } else {
7202
+ return false;
7203
+ }
7204
+ })
7205
+ });
7206
+ ```
7207
+
7208
+ To prevent setting an attribute altogether, use `null` or `undefined` as the
7209
+ return value of the `attributeBindings` monitored property:
7210
+
7211
+ ```app/components/my-text-input.js
7212
+ import Ember from 'ember';
7213
+
7214
+ export default Ember.Component.extend({
7215
+ tagName: 'form',
7216
+ attributeBindings: ['novalidate'],
7217
+ novalidate: null
7218
+ });
7219
+ ```
7220
+
7221
+ Updates to the property of an attribute binding will result in automatic
7222
+ update of the HTML attribute in the component's rendered HTML representation.
7223
+ `attributeBindings` is a concatenated property. See [Ember.Object](/api/classes/Ember.Object.html)
7224
+ documentation for more information about concatenated properties.
7225
+
7226
+
7227
+ ## Layouts
7228
+
7229
+ See [Ember.Templates.helpers.yield](/api/classes/Ember.Templates.helpers.html#method_yield)
7230
+ for more information.
7231
+
7232
+
7233
+ ## Responding to Browser Events
7234
+
7235
+ Components can respond to user-initiated events in one of three ways: method
7236
+ implementation, through an event manager, and through `{{action}}` helper use
7237
+ in their template or layout.
7238
+
7239
+
7240
+ ### Method Implementation
7241
+
7242
+ Components can respond to user-initiated events by implementing a method that
7243
+ matches the event name. A `jQuery.Event` object will be passed as the
7244
+ argument to this method.
7245
+
7246
+ ```app/components/my-widget.js
7247
+ import Ember from 'ember';
7248
+
7249
+ export default Ember.Component.extend({
7250
+ click(event) {
7251
+ // will be called when an instance's
7252
+ // rendered element is clicked
7253
+ }
7254
+ });
7255
+ ```
7256
+
7257
+
7258
+ ### `{{action}}` Helper
7259
+
7260
+ See [Ember.Templates.helpers.action](/api/classes/Ember.Templates.helpers.html#method_action).
7261
+
7262
+
7263
+ ### Event Names
7264
+
7265
+ All of the event handling approaches described above respond to the same set
7266
+ of events. The names of the built-in events are listed below. (The hash of
7267
+ built-in events exists in `Ember.EventDispatcher`.) Additional, custom events
7268
+ can be registered by using `Ember.Application.customEvents`.
7269
+
7270
+ Touch events:
7271
+
7272
+ * `touchStart`
7273
+ * `touchMove`
7274
+ * `touchEnd`
7275
+ * `touchCancel`
7276
+
7277
+ Keyboard events:
7278
+
7279
+ * `keyDown`
7280
+ * `keyUp`
7281
+ * `keyPress`
7282
+
7283
+ Mouse events:
7284
+
7285
+ * `mouseDown`
7286
+ * `mouseUp`
7287
+ * `contextMenu`
7288
+ * `click`
7289
+ * `doubleClick`
7290
+ * `mouseMove`
7291
+ * `focusIn`
7292
+ * `focusOut`
7293
+ * `mouseEnter`
7294
+ * `mouseLeave`
7295
+
7296
+ Form events:
7297
+
7298
+ * `submit`
7299
+ * `change`
7300
+ * `focusIn`
7301
+ * `focusOut`
7302
+ * `input`
7303
+
7304
+ HTML5 drag and drop events:
7305
+
7306
+ * `dragStart`
7307
+ * `drag`
7308
+ * `dragEnter`
7309
+ * `dragLeave`
7310
+ * `dragOver`
7311
+ * `dragEnd`
7312
+ * `drop`
7313
+
6911
7314
  @class Component
6912
7315
  @namespace Ember
6913
7316
  @extends Ember.CoreView
@@ -6915,6 +7318,7 @@ enifed('ember-glimmer/component', ['exports', 'ember-utils', 'ember-views', 'emb
6915
7318
  @uses Ember.ClassNamesSupport
6916
7319
  @uses Ember.ActionSupport
6917
7320
  @uses Ember.ViewMixin
7321
+ @uses Ember.ViewStateSupport
6918
7322
  @public
6919
7323
  */
6920
7324
  var Component = _emberViews.CoreView.extend(_emberViews.ChildViewsSupport, _emberViews.ViewStateSupport, _emberViews.ClassNamesSupport, _emberRuntime.TargetActionSupport, _emberViews.ActionSupport, _emberViews.ViewMixin, (_CoreView$extend = {
@@ -6955,6 +7359,8 @@ enifed('ember-glimmer/component', ['exports', 'ember-utils', 'ember-views', 'emb
6955
7359
  }
6956
7360
  }
6957
7361
  })());
7362
+
7363
+ _emberMetal.assert('You cannot use a computed property for the component\'s `tagName` (' + this + ').', !(this.tagName && this.tagName.isDescriptor));
6958
7364
  },
6959
7365
 
6960
7366
  rerender: function () {
@@ -7006,8 +7412,8 @@ enifed('ember-glimmer/component', ['exports', 'ember-utils', 'ember-views', 'emb
7006
7412
  `name` and `age`:
7007
7413
  ```javascript
7008
7414
  let MyComponent = Ember.Component.extend;
7009
- MyComponent.reopenClass({
7010
- positionalParams: ['name', 'age']
7415
+ MyComponent.reopenClass({
7416
+ positionalParams: ['name', 'age']
7011
7417
  });
7012
7418
  ```
7013
7419
  It can then be invoked like this:
@@ -7016,14 +7422,14 @@ enifed('ember-glimmer/component', ['exports', 'ember-utils', 'ember-views', 'emb
7016
7422
  ```
7017
7423
  The parameters can be referred to just like named parameters:
7018
7424
  ```hbs
7019
- Name: {{attrs.name}}, Age: {{attrs.age}}.
7425
+ Name: {{name}}, Age: {{age}}.
7020
7426
  ```
7021
7427
  Using a string instead of an array allows for an arbitrary number of
7022
7428
  parameters:
7023
7429
  ```javascript
7024
7430
  let MyComponent = Ember.Component.extend;
7025
- MyComponent.reopenClass({
7026
- positionalParams: 'names'
7431
+ MyComponent.reopenClass({
7432
+ positionalParams: 'names'
7027
7433
  });
7028
7434
  ```
7029
7435
  It can then be invoked like this:
@@ -7032,7 +7438,7 @@ enifed('ember-glimmer/component', ['exports', 'ember-utils', 'ember-views', 'emb
7032
7438
  ```
7033
7439
  The parameters can then be referred to by enumerating over the list:
7034
7440
  ```hbs
7035
- {{#each attrs.names as |name|}}{{name}}{{/each}}
7441
+ {{#each names as |name|}}{{name}}{{/each}}
7036
7442
  ```
7037
7443
  @static
7038
7444
  @public
@@ -7140,6 +7546,67 @@ enifed('ember-glimmer/component', ['exports', 'ember-utils', 'ember-views', 'emb
7140
7546
  @since 1.13.0
7141
7547
  */
7142
7548
 
7549
+ /**
7550
+ A component may contain a layout. A layout is a regular template but
7551
+ supersedes the `template` property during rendering. It is the
7552
+ responsibility of the layout template to retrieve the `template`
7553
+ property from the component (or alternatively, call `Handlebars.helpers.yield`,
7554
+ `{{yield}}`) to render it in the correct location.
7555
+ This is useful for a component that has a shared wrapper, but which delegates
7556
+ the rendering of the contents of the wrapper to the `template` property
7557
+ on a subclass.
7558
+ @property layout
7559
+ @type Function
7560
+ @public
7561
+ */
7562
+
7563
+ /**
7564
+ The name of the layout to lookup if no layout is provided.
7565
+ By default `Ember.Component` will lookup a template with this name in
7566
+ `Ember.TEMPLATES` (a shared global object).
7567
+ @property layoutName
7568
+ @type String
7569
+ @default null
7570
+ @private
7571
+ */
7572
+
7573
+ /**
7574
+ Returns a jQuery object for this component's element. If you pass in a selector
7575
+ string, this method will return a jQuery object, using the current element
7576
+ as its buffer.
7577
+ For example, calling `component.$('li')` will return a jQuery object containing
7578
+ all of the `li` elements inside the DOM element of this component.
7579
+ @method $
7580
+ @param {String} [selector] a jQuery-compatible selector string
7581
+ @return {jQuery} the jQuery object for the DOM node
7582
+ @public
7583
+ */
7584
+
7585
+ /**
7586
+ The HTML `id` of the component's element in the DOM. You can provide this
7587
+ value yourself but it must be unique (just as in HTML):
7588
+ ```handlebars
7589
+ {{my-component elementId="a-really-cool-id"}}
7590
+ ```
7591
+ If not manually set a default value will be provided by the framework.
7592
+ Once rendered an element's `elementId` is considered immutable and you
7593
+ should never change it. If you need to compute a dynamic value for the
7594
+ `elementId`, you should do this when the component or element is being
7595
+ instantiated:
7596
+ ```javascript
7597
+ export default Ember.Component.extend({
7598
+ init() {
7599
+ this._super(...arguments);
7600
+ var index = this.get('index');
7601
+ this.set('elementId', `component-id${index}`);
7602
+ }
7603
+ });
7604
+ ```
7605
+ @property elementId
7606
+ @type String
7607
+ @public
7608
+ */
7609
+
7143
7610
  /**
7144
7611
  If `false`, the view will appear hidden in DOM.
7145
7612
  @property isVisible
@@ -7563,7 +8030,7 @@ enifed('ember-glimmer/components/link-to', ['exports', 'ember-console', 'ember-m
7563
8030
  @namespace Ember
7564
8031
  @extends Ember.Component
7565
8032
  @see {Ember.Templates.helpers.link-to}
7566
- @private
8033
+ @public
7567
8034
  **/
7568
8035
  var LinkComponent = _emberGlimmerComponent.default.extend({
7569
8036
  layout: _emberGlimmerTemplatesLinkTo.default,
@@ -8423,7 +8890,7 @@ enifed('ember-glimmer/dom', ['exports', 'glimmer-runtime', 'glimmer-node'], func
8423
8890
  exports.DOMTreeConstruction = _glimmerRuntime.DOMTreeConstruction;
8424
8891
  exports.NodeDOMTreeConstruction = _glimmerNode.NodeDOMTreeConstruction;
8425
8892
  });
8426
- enifed('ember-glimmer/environment', ['exports', 'ember-utils', 'ember-metal', 'ember-views', 'glimmer-runtime', 'ember-glimmer/syntax/curly-component', 'ember-glimmer/syntax', 'ember-glimmer/syntax/dynamic-component', 'ember-glimmer/utils/iterable', 'ember-glimmer/utils/references', 'ember-glimmer/helpers/if-unless', 'ember-glimmer/utils/bindings', 'ember-glimmer/helpers/action', 'ember-glimmer/helpers/component', 'ember-glimmer/helpers/concat', 'ember-glimmer/helpers/debugger', 'ember-glimmer/helpers/get', 'ember-glimmer/helpers/hash', 'ember-glimmer/helpers/loc', 'ember-glimmer/helpers/log', 'ember-glimmer/helpers/mut', 'ember-glimmer/helpers/readonly', 'ember-glimmer/helpers/unbound', 'ember-glimmer/helpers/-class', 'ember-glimmer/helpers/-input-type', 'ember-glimmer/helpers/query-param', 'ember-glimmer/helpers/each-in', 'ember-glimmer/helpers/-normalize-class', 'ember-glimmer/helpers/-html-safe', 'ember-glimmer/protocol-for-url', 'ember-glimmer/modifiers/action'], function (exports, _emberUtils, _emberMetal, _emberViews, _glimmerRuntime, _emberGlimmerSyntaxCurlyComponent, _emberGlimmerSyntax, _emberGlimmerSyntaxDynamicComponent, _emberGlimmerUtilsIterable, _emberGlimmerUtilsReferences, _emberGlimmerHelpersIfUnless, _emberGlimmerUtilsBindings, _emberGlimmerHelpersAction, _emberGlimmerHelpersComponent, _emberGlimmerHelpersConcat, _emberGlimmerHelpersDebugger, _emberGlimmerHelpersGet, _emberGlimmerHelpersHash, _emberGlimmerHelpersLoc, _emberGlimmerHelpersLog, _emberGlimmerHelpersMut, _emberGlimmerHelpersReadonly, _emberGlimmerHelpersUnbound, _emberGlimmerHelpersClass, _emberGlimmerHelpersInputType, _emberGlimmerHelpersQueryParam, _emberGlimmerHelpersEachIn, _emberGlimmerHelpersNormalizeClass, _emberGlimmerHelpersHtmlSafe, _emberGlimmerProtocolForUrl, _emberGlimmerModifiersAction) {
8893
+ enifed('ember-glimmer/environment', ['exports', 'ember-utils', 'ember-metal', 'ember-views', 'glimmer-runtime', 'ember-glimmer/syntax/curly-component', 'ember-glimmer/syntax', 'ember-glimmer/syntax/dynamic-component', 'ember-glimmer/utils/iterable', 'ember-glimmer/utils/references', 'ember-glimmer/utils/debug-stack', 'ember-glimmer/helpers/if-unless', 'ember-glimmer/utils/bindings', 'ember-glimmer/helpers/action', 'ember-glimmer/helpers/component', 'ember-glimmer/helpers/concat', 'ember-glimmer/helpers/debugger', 'ember-glimmer/helpers/get', 'ember-glimmer/helpers/hash', 'ember-glimmer/helpers/loc', 'ember-glimmer/helpers/log', 'ember-glimmer/helpers/mut', 'ember-glimmer/helpers/readonly', 'ember-glimmer/helpers/unbound', 'ember-glimmer/helpers/-class', 'ember-glimmer/helpers/-input-type', 'ember-glimmer/helpers/query-param', 'ember-glimmer/helpers/each-in', 'ember-glimmer/helpers/-normalize-class', 'ember-glimmer/helpers/-html-safe', 'ember-glimmer/protocol-for-url', 'ember-glimmer/modifiers/action'], function (exports, _emberUtils, _emberMetal, _emberViews, _glimmerRuntime, _emberGlimmerSyntaxCurlyComponent, _emberGlimmerSyntax, _emberGlimmerSyntaxDynamicComponent, _emberGlimmerUtilsIterable, _emberGlimmerUtilsReferences, _emberGlimmerUtilsDebugStack, _emberGlimmerHelpersIfUnless, _emberGlimmerUtilsBindings, _emberGlimmerHelpersAction, _emberGlimmerHelpersComponent, _emberGlimmerHelpersConcat, _emberGlimmerHelpersDebugger, _emberGlimmerHelpersGet, _emberGlimmerHelpersHash, _emberGlimmerHelpersLoc, _emberGlimmerHelpersLog, _emberGlimmerHelpersMut, _emberGlimmerHelpersReadonly, _emberGlimmerHelpersUnbound, _emberGlimmerHelpersClass, _emberGlimmerHelpersInputType, _emberGlimmerHelpersQueryParam, _emberGlimmerHelpersEachIn, _emberGlimmerHelpersNormalizeClass, _emberGlimmerHelpersHtmlSafe, _emberGlimmerProtocolForUrl, _emberGlimmerModifiersAction) {
8427
8894
  'use strict';
8428
8895
 
8429
8896
  var builtInComponents = {
@@ -8533,6 +9000,10 @@ enifed('ember-glimmer/environment', ['exports', 'ember-utils', 'ember-metal', 'e
8533
9000
  '-html-safe': _emberGlimmerHelpersHtmlSafe.default,
8534
9001
  '-get-dynamic-var': _glimmerRuntime.getDynamicVar
8535
9002
  };
9003
+
9004
+ _emberMetal.runInDebug(function () {
9005
+ return _this.debugStack = new _emberGlimmerUtilsDebugStack.default();
9006
+ });
8536
9007
  }
8537
9008
 
8538
9009
  // Hello future traveler, welcome to the world of syntax refinement.
@@ -11891,7 +12362,28 @@ enifed('ember-glimmer/syntax', ['exports', 'ember-glimmer/syntax/render', 'ember
11891
12362
  return _class2;
11892
12363
  })());
11893
12364
  });
11894
- enifed('ember-glimmer/syntax/curly-component', ['exports', 'ember-utils', 'glimmer-runtime', 'ember-glimmer/utils/bindings', 'ember-glimmer/component', 'ember-metal', 'ember-views', 'ember-glimmer/utils/process-args', 'container'], function (exports, _emberUtils, _glimmerRuntime, _emberGlimmerUtilsBindings, _emberGlimmerComponent, _emberMetal, _emberViews, _emberGlimmerUtilsProcessArgs, _container) {
12365
+ enifed('ember-glimmer/syntax/abstract-manager', ['exports', 'ember-metal'], function (exports, _emberMetal) {
12366
+ 'use strict';
12367
+
12368
+ var AbstractManager = function AbstractManager() {
12369
+ babelHelpers.classCallCheck(this, AbstractManager);
12370
+ };
12371
+
12372
+ _emberMetal.runInDebug(function () {
12373
+ AbstractManager.prototype._pushToDebugStack = function (name, environment) {
12374
+ this.debugStack = environment.debugStack;
12375
+ this.debugStack.push(name);
12376
+ };
12377
+
12378
+ AbstractManager.prototype._pushEngineToDebugStack = function (name, environment) {
12379
+ this.debugStack = environment.debugStack;
12380
+ this.debugStack.pushEngine(name);
12381
+ };
12382
+ });
12383
+
12384
+ exports.default = AbstractManager;
12385
+ });
12386
+ enifed('ember-glimmer/syntax/curly-component', ['exports', 'ember-utils', 'glimmer-runtime', 'ember-glimmer/utils/bindings', 'ember-glimmer/component', 'ember-metal', 'ember-views', 'ember-glimmer/utils/process-args', 'container', 'ember-glimmer/syntax/abstract-manager'], function (exports, _emberUtils, _glimmerRuntime, _emberGlimmerUtilsBindings, _emberGlimmerComponent, _emberMetal, _emberViews, _emberGlimmerUtilsProcessArgs, _container, _emberGlimmerSyntaxAbstractManager) {
11895
12387
  'use strict';
11896
12388
 
11897
12389
  exports.validatePositionalParameters = validatePositionalParameters;
@@ -12061,9 +12553,13 @@ babelHelpers.classCallCheck(this, ComponentStateBucket);
12061
12553
  return component.instrumentDetails({ initialRender: false });
12062
12554
  }
12063
12555
 
12064
- var CurlyComponentManager = (function () {
12556
+ var CurlyComponentManager = (function (_AbstractManager) {
12557
+ babelHelpers.inherits(CurlyComponentManager, _AbstractManager);
12558
+
12065
12559
  function CurlyComponentManager() {
12066
12560
  babelHelpers.classCallCheck(this, CurlyComponentManager);
12561
+
12562
+ _AbstractManager.apply(this, arguments);
12067
12563
  }
12068
12564
 
12069
12565
  CurlyComponentManager.prototype.prepareArgs = function prepareArgs(definition, args) {
@@ -12073,6 +12569,12 @@ babelHelpers.classCallCheck(this, CurlyComponentManager);
12073
12569
  };
12074
12570
 
12075
12571
  CurlyComponentManager.prototype.create = function create(environment, definition, args, dynamicScope, callerSelfRef, hasBlock) {
12572
+ var _this = this;
12573
+
12574
+ _emberMetal.runInDebug(function () {
12575
+ return _this._pushToDebugStack('component:' + definition.name, environment);
12576
+ });
12577
+
12076
12578
  var parentView = dynamicScope.view;
12077
12579
 
12078
12580
  var klass = definition.ComponentClass;
@@ -12201,8 +12703,14 @@ babelHelpers.classCallCheck(this, CurlyComponentManager);
12201
12703
  };
12202
12704
 
12203
12705
  CurlyComponentManager.prototype.didRenderLayout = function didRenderLayout(bucket, bounds) {
12706
+ var _this2 = this;
12707
+
12204
12708
  bucket.component[_emberGlimmerComponent.BOUNDS] = bounds;
12205
12709
  bucket.finalize();
12710
+
12711
+ _emberMetal.runInDebug(function () {
12712
+ return _this2.debugStack.pop();
12713
+ });
12206
12714
  };
12207
12715
 
12208
12716
  CurlyComponentManager.prototype.getTag = function getTag(_ref3) {
@@ -12223,11 +12731,17 @@ babelHelpers.classCallCheck(this, CurlyComponentManager);
12223
12731
  };
12224
12732
 
12225
12733
  CurlyComponentManager.prototype.update = function update(bucket, _, dynamicScope) {
12734
+ var _this3 = this;
12735
+
12226
12736
  var component = bucket.component;
12227
12737
  var args = bucket.args;
12228
12738
  var argsRevision = bucket.argsRevision;
12229
12739
  var environment = bucket.environment;
12230
12740
 
12741
+ _emberMetal.runInDebug(function () {
12742
+ return _this3._pushToDebugStack(component._debugContainerKey, environment);
12743
+ });
12744
+
12231
12745
  bucket.finalizer = _emberMetal._instrumentStart('render.component', rerenderInstrumentDetails, component);
12232
12746
 
12233
12747
  if (!args.tag.validate(argsRevision)) {
@@ -12256,7 +12770,13 @@ babelHelpers.classCallCheck(this, CurlyComponentManager);
12256
12770
  };
12257
12771
 
12258
12772
  CurlyComponentManager.prototype.didUpdateLayout = function didUpdateLayout(bucket) {
12773
+ var _this4 = this;
12774
+
12259
12775
  bucket.finalize();
12776
+
12777
+ _emberMetal.runInDebug(function () {
12778
+ return _this4.debugStack.pop();
12779
+ });
12260
12780
  };
12261
12781
 
12262
12782
  CurlyComponentManager.prototype.didUpdate = function didUpdate(_ref5) {
@@ -12274,7 +12794,7 @@ babelHelpers.classCallCheck(this, CurlyComponentManager);
12274
12794
  };
12275
12795
 
12276
12796
  return CurlyComponentManager;
12277
- })();
12797
+ })(_emberGlimmerSyntaxAbstractManager.default);
12278
12798
 
12279
12799
  var MANAGER = new CurlyComponentManager();
12280
12800
 
@@ -12288,8 +12808,14 @@ babelHelpers.classCallCheck(this, TopComponentManager);
12288
12808
  }
12289
12809
 
12290
12810
  TopComponentManager.prototype.create = function create(environment, definition, args, dynamicScope, currentScope, hasBlock) {
12811
+ var _this5 = this;
12812
+
12291
12813
  var component = definition.ComponentClass;
12292
12814
 
12815
+ _emberMetal.runInDebug(function () {
12816
+ return _this5._pushToDebugStack(component._debugContainerKey, environment);
12817
+ });
12818
+
12293
12819
  var finalizer = _emberMetal._instrumentStart('render.component', initialRenderInstrumentDetails, component);
12294
12820
 
12295
12821
  dynamicScope.view = component;
@@ -12647,7 +13173,7 @@ enifed('ember-glimmer/syntax/input', ['exports', 'ember-metal', 'ember-glimmer/s
12647
13173
  };
12648
13174
  exports.InputSyntax = InputSyntax;
12649
13175
  });
12650
- enifed('ember-glimmer/syntax/mount', ['exports', 'glimmer-runtime', 'glimmer-reference', 'ember-metal', 'ember-glimmer/utils/references', 'ember-routing', 'ember-glimmer/syntax/outlet'], function (exports, _glimmerRuntime, _glimmerReference, _emberMetal, _emberGlimmerUtilsReferences, _emberRouting, _emberGlimmerSyntaxOutlet) {
13176
+ enifed('ember-glimmer/syntax/mount', ['exports', 'glimmer-runtime', 'glimmer-reference', 'ember-metal', 'ember-glimmer/utils/references', 'ember-routing', 'ember-glimmer/syntax/outlet', 'ember-glimmer/syntax/abstract-manager'], function (exports, _glimmerRuntime, _glimmerReference, _emberMetal, _emberGlimmerUtilsReferences, _emberRouting, _emberGlimmerSyntaxOutlet, _emberGlimmerSyntaxAbstractManager) {
12651
13177
  /**
12652
13178
  @module ember
12653
13179
  @submodule ember-glimmer
@@ -12709,9 +13235,13 @@ enifed('ember-glimmer/syntax/mount', ['exports', 'glimmer-runtime', 'glimmer-ref
12709
13235
 
12710
13236
  exports.MountSyntax = MountSyntax;
12711
13237
 
12712
- var MountManager = (function () {
13238
+ var MountManager = (function (_AbstractManager) {
13239
+ babelHelpers.inherits(MountManager, _AbstractManager);
13240
+
12713
13241
  function MountManager() {
12714
13242
  babelHelpers.classCallCheck(this, MountManager);
13243
+
13244
+ _AbstractManager.apply(this, arguments);
12715
13245
  }
12716
13246
 
12717
13247
  MountManager.prototype.prepareArgs = function prepareArgs(definition, args) {
@@ -12722,6 +13252,12 @@ enifed('ember-glimmer/syntax/mount', ['exports', 'glimmer-runtime', 'glimmer-ref
12722
13252
  var name = _ref.name;
12723
13253
  var env = _ref.env;
12724
13254
 
13255
+ var _this = this;
13256
+
13257
+ _emberMetal.runInDebug(function () {
13258
+ return _this._pushEngineToDebugStack('engine:' + name, env);
13259
+ });
13260
+
12725
13261
  dynamicScope.outletState = _glimmerReference.UNDEFINED_REFERENCE;
12726
13262
 
12727
13263
  var engine = env.owner.buildChildEngineInstance(name);
@@ -12757,7 +13293,13 @@ enifed('ember-glimmer/syntax/mount', ['exports', 'glimmer-runtime', 'glimmer-ref
12757
13293
 
12758
13294
  MountManager.prototype.didCreateElement = function didCreateElement() {};
12759
13295
 
12760
- MountManager.prototype.didRenderLayout = function didRenderLayout() {};
13296
+ MountManager.prototype.didRenderLayout = function didRenderLayout() {
13297
+ var _this2 = this;
13298
+
13299
+ _emberMetal.runInDebug(function () {
13300
+ return _this2.debugStack.pop();
13301
+ });
13302
+ };
12761
13303
 
12762
13304
  MountManager.prototype.didCreate = function didCreate(state) {};
12763
13305
 
@@ -12768,7 +13310,7 @@ enifed('ember-glimmer/syntax/mount', ['exports', 'glimmer-runtime', 'glimmer-ref
12768
13310
  MountManager.prototype.didUpdate = function didUpdate(state) {};
12769
13311
 
12770
13312
  return MountManager;
12771
- })();
13313
+ })(_emberGlimmerSyntaxAbstractManager.default);
12772
13314
 
12773
13315
  var MOUNT_MANAGER = new MountManager();
12774
13316
 
@@ -12785,7 +13327,7 @@ enifed('ember-glimmer/syntax/mount', ['exports', 'glimmer-runtime', 'glimmer-ref
12785
13327
  return MountDefinition;
12786
13328
  })(_glimmerRuntime.ComponentDefinition);
12787
13329
  });
12788
- enifed('ember-glimmer/syntax/outlet', ['exports', 'ember-utils', 'glimmer-runtime', 'ember-metal', 'ember-glimmer/utils/references', 'glimmer-reference'], function (exports, _emberUtils, _glimmerRuntime, _emberMetal, _emberGlimmerUtilsReferences, _glimmerReference) {
13330
+ enifed('ember-glimmer/syntax/outlet', ['exports', 'ember-utils', 'glimmer-runtime', 'ember-metal', 'ember-glimmer/utils/references', 'glimmer-reference', 'ember-glimmer/syntax/abstract-manager'], function (exports, _emberUtils, _glimmerRuntime, _emberMetal, _emberGlimmerUtilsReferences, _glimmerReference, _emberGlimmerSyntaxAbstractManager) {
12789
13331
  /**
12790
13332
  @module ember
12791
13333
  @submodule ember-glimmer
@@ -12974,9 +13516,13 @@ enifed('ember-glimmer/syntax/outlet', ['exports', 'ember-utils', 'glimmer-runtim
12974
13516
  return StateBucket;
12975
13517
  })();
12976
13518
 
12977
- var OutletComponentManager = (function () {
13519
+ var OutletComponentManager = (function (_AbstractManager) {
13520
+ babelHelpers.inherits(OutletComponentManager, _AbstractManager);
13521
+
12978
13522
  function OutletComponentManager() {
12979
13523
  babelHelpers.classCallCheck(this, OutletComponentManager);
13524
+
13525
+ _AbstractManager.apply(this, arguments);
12980
13526
  }
12981
13527
 
12982
13528
  OutletComponentManager.prototype.prepareArgs = function prepareArgs(definition, args) {
@@ -12984,6 +13530,12 @@ enifed('ember-glimmer/syntax/outlet', ['exports', 'ember-utils', 'glimmer-runtim
12984
13530
  };
12985
13531
 
12986
13532
  OutletComponentManager.prototype.create = function create(environment, definition, args, dynamicScope) {
13533
+ var _this = this;
13534
+
13535
+ _emberMetal.runInDebug(function () {
13536
+ return _this._pushToDebugStack('template:' + definition.template.meta.moduleName, environment);
13537
+ });
13538
+
12987
13539
  var outletStateReference = dynamicScope.outletState = dynamicScope.outletState.get('outlets').get(definition.outletName);
12988
13540
  var outletState = outletStateReference.value();
12989
13541
  return new StateBucket(outletState);
@@ -13008,7 +13560,13 @@ enifed('ember-glimmer/syntax/outlet', ['exports', 'ember-utils', 'glimmer-runtim
13008
13560
  };
13009
13561
 
13010
13562
  OutletComponentManager.prototype.didRenderLayout = function didRenderLayout(bucket) {
13563
+ var _this2 = this;
13564
+
13011
13565
  bucket.finalize();
13566
+
13567
+ _emberMetal.runInDebug(function () {
13568
+ return _this2.debugStack.pop();
13569
+ });
13012
13570
  };
13013
13571
 
13014
13572
  OutletComponentManager.prototype.didCreateElement = function didCreateElement() {};
@@ -13022,7 +13580,7 @@ enifed('ember-glimmer/syntax/outlet', ['exports', 'ember-utils', 'glimmer-runtim
13022
13580
  OutletComponentManager.prototype.didUpdate = function didUpdate(state) {};
13023
13581
 
13024
13582
  return OutletComponentManager;
13025
- })();
13583
+ })(_emberGlimmerSyntaxAbstractManager.default);
13026
13584
 
13027
13585
  var MANAGER = new OutletComponentManager();
13028
13586
 
@@ -13036,6 +13594,12 @@ enifed('ember-glimmer/syntax/outlet', ['exports', 'ember-utils', 'glimmer-runtim
13036
13594
  }
13037
13595
 
13038
13596
  TopLevelOutletComponentManager.prototype.create = function create(environment, definition, args, dynamicScope) {
13597
+ var _this3 = this;
13598
+
13599
+ _emberMetal.runInDebug(function () {
13600
+ return _this3._pushToDebugStack('template:' + definition.template.meta.moduleName, environment);
13601
+ });
13602
+
13039
13603
  return new StateBucket(dynamicScope.outletState.value());
13040
13604
  };
13041
13605
 
@@ -13116,7 +13680,7 @@ enifed('ember-glimmer/syntax/outlet', ['exports', 'ember-utils', 'glimmer-runtim
13116
13680
 
13117
13681
  OutletLayoutCompiler.id = 'outlet';
13118
13682
  });
13119
- enifed('ember-glimmer/syntax/render', ['exports', 'glimmer-runtime', 'glimmer-reference', 'ember-metal', 'ember-glimmer/utils/references', 'ember-routing', 'ember-glimmer/syntax/outlet'], function (exports, _glimmerRuntime, _glimmerReference, _emberMetal, _emberGlimmerUtilsReferences, _emberRouting, _emberGlimmerSyntaxOutlet) {
13683
+ enifed('ember-glimmer/syntax/render', ['exports', 'glimmer-runtime', 'glimmer-reference', 'ember-metal', 'ember-glimmer/utils/references', 'ember-routing', 'ember-glimmer/syntax/outlet', 'ember-glimmer/syntax/abstract-manager'], function (exports, _glimmerRuntime, _glimmerReference, _emberMetal, _emberGlimmerUtilsReferences, _emberRouting, _emberGlimmerSyntaxOutlet, _emberGlimmerSyntaxAbstractManager) {
13120
13684
  /**
13121
13685
  @module ember
13122
13686
  @submodule ember-glimmer
@@ -13255,9 +13819,13 @@ enifed('ember-glimmer/syntax/render', ['exports', 'glimmer-runtime', 'glimmer-re
13255
13819
 
13256
13820
  exports.RenderSyntax = RenderSyntax;
13257
13821
 
13258
- var AbstractRenderManager = (function () {
13822
+ var AbstractRenderManager = (function (_AbstractManager) {
13823
+ babelHelpers.inherits(AbstractRenderManager, _AbstractManager);
13824
+
13259
13825
  function AbstractRenderManager() {
13260
13826
  babelHelpers.classCallCheck(this, AbstractRenderManager);
13827
+
13828
+ _AbstractManager.apply(this, arguments);
13261
13829
  }
13262
13830
 
13263
13831
  AbstractRenderManager.prototype.prepareArgs = function prepareArgs(definition, args) {
@@ -13297,7 +13865,13 @@ enifed('ember-glimmer/syntax/render', ['exports', 'glimmer-runtime', 'glimmer-re
13297
13865
  AbstractRenderManager.prototype.didUpdate = function didUpdate() {};
13298
13866
 
13299
13867
  return AbstractRenderManager;
13300
- })();
13868
+ })(_emberGlimmerSyntaxAbstractManager.default);
13869
+
13870
+ _emberMetal.runInDebug(function () {
13871
+ AbstractRenderManager.prototype.didRenderLayout = function () {
13872
+ this.debugStack.pop();
13873
+ };
13874
+ });
13301
13875
 
13302
13876
  var SingletonRenderManager = (function (_AbstractRenderManager) {
13303
13877
  babelHelpers.inherits(SingletonRenderManager, _AbstractRenderManager);
@@ -13309,11 +13883,17 @@ enifed('ember-glimmer/syntax/render', ['exports', 'glimmer-runtime', 'glimmer-re
13309
13883
  }
13310
13884
 
13311
13885
  SingletonRenderManager.prototype.create = function create(environment, definition, args, dynamicScope) {
13886
+ var _this = this;
13887
+
13312
13888
  var name = definition.name;
13313
13889
  var env = definition.env;
13314
13890
 
13315
13891
  var controller = env.owner.lookup('controller:' + name) || _emberRouting.generateController(env.owner, name);
13316
13892
 
13893
+ _emberMetal.runInDebug(function () {
13894
+ return _this._pushToDebugStack('controller:' + name + ' (with the render helper)', environment);
13895
+ });
13896
+
13317
13897
  if (dynamicScope.rootOutletState) {
13318
13898
  dynamicScope.outletState = dynamicScope.rootOutletState.getOrphan(name);
13319
13899
  }
@@ -13336,6 +13916,8 @@ enifed('ember-glimmer/syntax/render', ['exports', 'glimmer-runtime', 'glimmer-re
13336
13916
  }
13337
13917
 
13338
13918
  NonSingletonRenderManager.prototype.create = function create(environment, definition, args, dynamicScope) {
13919
+ var _this2 = this;
13920
+
13339
13921
  var name = definition.name;
13340
13922
  var env = definition.env;
13341
13923
 
@@ -13344,6 +13926,10 @@ enifed('ember-glimmer/syntax/render', ['exports', 'glimmer-runtime', 'glimmer-re
13344
13926
  var factory = env.owner._lookupFactory('controller:' + name) || _emberRouting.generateControllerFactory(env.owner, name);
13345
13927
  var controller = factory.create({ model: modelRef.value() });
13346
13928
 
13929
+ _emberMetal.runInDebug(function () {
13930
+ return _this2._pushToDebugStack('controller:' + name + ' (with the render helper)', environment);
13931
+ });
13932
+
13347
13933
  if (dynamicScope.rootOutletState) {
13348
13934
  dynamicScope.outletState = dynamicScope.rootOutletState.getOrphan(name);
13349
13935
  }
@@ -13683,6 +14269,99 @@ enifed('ember-glimmer/utils/bindings', ['exports', 'glimmer-reference', 'glimmer
13683
14269
  return ColonClassNameBindingReference;
13684
14270
  })(_glimmerReference.CachedReference);
13685
14271
  });
14272
+ enifed('ember-glimmer/utils/debug-stack', ['exports', 'ember-metal'], function (exports, _emberMetal) {
14273
+ 'use strict';
14274
+
14275
+ var DebugStack = undefined;
14276
+
14277
+ _emberMetal.runInDebug(function () {
14278
+ var Element = function Element(name) {
14279
+ babelHelpers.classCallCheck(this, Element);
14280
+
14281
+ this.name = name;
14282
+ };
14283
+
14284
+ var TemplateElement = (function (_Element) {
14285
+ babelHelpers.inherits(TemplateElement, _Element);
14286
+
14287
+ function TemplateElement() {
14288
+ babelHelpers.classCallCheck(this, TemplateElement);
14289
+
14290
+ _Element.apply(this, arguments);
14291
+ }
14292
+
14293
+ return TemplateElement;
14294
+ })(Element);
14295
+
14296
+ var EngineElement = (function (_Element2) {
14297
+ babelHelpers.inherits(EngineElement, _Element2);
14298
+
14299
+ function EngineElement() {
14300
+ babelHelpers.classCallCheck(this, EngineElement);
14301
+
14302
+ _Element2.apply(this, arguments);
14303
+ }
14304
+
14305
+ return EngineElement;
14306
+ })(Element);
14307
+
14308
+ DebugStack = (function () {
14309
+ function DebugStack() {
14310
+ babelHelpers.classCallCheck(this, DebugStack);
14311
+
14312
+ this._stack = [];
14313
+ }
14314
+
14315
+ DebugStack.prototype.push = function push(name) {
14316
+ this._stack.push(new TemplateElement(name));
14317
+ };
14318
+
14319
+ DebugStack.prototype.pushEngine = function pushEngine(name) {
14320
+ this._stack.push(new EngineElement(name));
14321
+ };
14322
+
14323
+ DebugStack.prototype.pop = function pop() {
14324
+ var element = this._stack.pop();
14325
+
14326
+ if (element) {
14327
+ return element.name;
14328
+ }
14329
+ };
14330
+
14331
+ DebugStack.prototype.peek = function peek() {
14332
+ var template = this._currentTemplate();
14333
+ var engine = this._currentEngine();
14334
+
14335
+ if (engine) {
14336
+ return '"' + template + '" (in "' + engine + '")';
14337
+ } else if (template) {
14338
+ return '"' + template + '"';
14339
+ }
14340
+ };
14341
+
14342
+ DebugStack.prototype._currentTemplate = function _currentTemplate() {
14343
+ return this._getCurrentByType(TemplateElement);
14344
+ };
14345
+
14346
+ DebugStack.prototype._currentEngine = function _currentEngine() {
14347
+ return this._getCurrentByType(EngineElement);
14348
+ };
14349
+
14350
+ DebugStack.prototype._getCurrentByType = function _getCurrentByType(type) {
14351
+ for (var i = this._stack.length; i >= 0; i--) {
14352
+ var element = this._stack[i];
14353
+ if (element instanceof type) {
14354
+ return element.name;
14355
+ }
14356
+ }
14357
+ };
14358
+
14359
+ return DebugStack;
14360
+ })();
14361
+ });
14362
+
14363
+ exports.default = DebugStack;
14364
+ });
13686
14365
  enifed('ember-glimmer/utils/iterable', ['exports', 'ember-utils', 'ember-metal', 'ember-runtime', 'ember-glimmer/utils/references', 'ember-glimmer/helpers/each-in', 'glimmer-reference'], function (exports, _emberUtils, _emberMetal, _emberRuntime, _emberGlimmerUtilsReferences, _emberGlimmerHelpersEachIn, _glimmerReference) {
13687
14366
  'use strict';
13688
14367
 
@@ -14516,8 +15195,10 @@ enifed('ember-glimmer/utils/references', ['exports', 'ember-utils', 'ember-metal
14516
15195
  var namedValue = named.value();
14517
15196
 
14518
15197
  _emberMetal.runInDebug(function () {
14519
- Object.freeze(positionalValue);
14520
- Object.freeze(namedValue);
15198
+ if (_emberUtils.HAS_NATIVE_WEAKMAP) {
15199
+ Object.freeze(positionalValue);
15200
+ Object.freeze(namedValue);
15201
+ }
14521
15202
  });
14522
15203
 
14523
15204
  var result = helper(positionalValue, namedValue);
@@ -14567,8 +15248,10 @@ enifed('ember-glimmer/utils/references', ['exports', 'ember-utils', 'ember-metal
14567
15248
  var namedValue = named.value();
14568
15249
 
14569
15250
  _emberMetal.runInDebug(function () {
14570
- Object.freeze(positionalValue);
14571
- Object.freeze(namedValue);
15251
+ if (_emberUtils.HAS_NATIVE_WEAKMAP) {
15252
+ Object.freeze(positionalValue);
15253
+ Object.freeze(namedValue);
15254
+ }
14572
15255
  });
14573
15256
 
14574
15257
  return helper(positionalValue, namedValue);
@@ -14608,8 +15291,10 @@ enifed('ember-glimmer/utils/references', ['exports', 'ember-utils', 'ember-metal
14608
15291
  var namedValue = named.value();
14609
15292
 
14610
15293
  _emberMetal.runInDebug(function () {
14611
- Object.freeze(positionalValue);
14612
- Object.freeze(namedValue);
15294
+ if (_emberUtils.HAS_NATIVE_WEAKMAP) {
15295
+ Object.freeze(positionalValue);
15296
+ Object.freeze(namedValue);
15297
+ }
14613
15298
  });
14614
15299
 
14615
15300
  return instance.compute(positionalValue, namedValue);
@@ -15656,7 +16341,7 @@ enifed('ember-metal/cache', ['exports', 'ember-utils', 'ember-metal/meta'], func
15656
16341
  return DefaultStore;
15657
16342
  })();
15658
16343
  });
15659
- enifed('ember-metal/chains', ['exports', 'ember-utils', 'ember-metal/property_get', 'ember-metal/meta', 'ember-metal/watch_key', 'ember-metal/watch_path'], function (exports, _emberUtils, _emberMetalProperty_get, _emberMetalMeta, _emberMetalWatch_key, _emberMetalWatch_path) {
16344
+ enifed('ember-metal/chains', ['exports', 'ember-utils', 'ember-metal/property_get', 'ember-metal/meta', 'ember-metal/watch_key', 'ember-metal/computed', 'ember-metal/watch_path'], function (exports, _emberUtils, _emberMetalProperty_get, _emberMetalMeta, _emberMetalWatch_key, _emberMetalComputed, _emberMetalWatch_path) {
15660
16345
  'use strict';
15661
16346
 
15662
16347
  exports.finishChains = finishChains;
@@ -15841,8 +16526,8 @@ enifed('ember-metal/chains', ['exports', 'ember-utils', 'ember-metal/property_ge
15841
16526
  // Otherwise attempt to get the cached value of the computed property
15842
16527
  } else {
15843
16528
  var cache = meta.readableCache();
15844
- if (cache && key in cache) {
15845
- return cache[key];
16529
+ if (cache) {
16530
+ return _emberMetalComputed.cacheFor.get(cache, key);
15846
16531
  }
15847
16532
  }
15848
16533
  }
@@ -18719,7 +19404,7 @@ enifed('ember-metal/merge', ['exports'], function (exports) {
18719
19404
  return original;
18720
19405
  }
18721
19406
  });
18722
- enifed('ember-metal/meta', ['exports', 'ember-utils', 'ember-metal/features', 'ember-metal/meta_listeners', 'ember-metal/debug', 'ember-metal/chains'], function (exports, _emberUtils, _emberMetalFeatures, _emberMetalMeta_listeners, _emberMetalDebug, _emberMetalChains) {
19407
+ enifed('ember-metal/meta', ['exports', 'ember-utils', 'ember-metal/features', 'ember-metal/meta_listeners', 'ember-metal/debug', 'ember-metal/chains', 'require'], function (exports, _emberUtils, _emberMetalFeatures, _emberMetalMeta_listeners, _emberMetalDebug, _emberMetalChains, _require) {
18723
19408
  'no use strict';
18724
19409
  // Remove "use strict"; from transpiled module until
18725
19410
  // https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed
@@ -18784,13 +19469,19 @@ enifed('ember-metal/meta', ['exports', 'ember-utils', 'ember-metal/features', 'e
18784
19469
 
18785
19470
  if (true || false) {
18786
19471
  members.lastRendered = ownMap;
18787
- members.lastRenderedFrom = ownMap; // FIXME: not used in production, remove me from prod builds
19472
+ if (_require.has('ember-debug')) {
19473
+ //https://github.com/emberjs/ember.js/issues/14732
19474
+ members.lastRenderedReferenceMap = ownMap;
19475
+ members.lastRenderedTemplateMap = ownMap;
19476
+ }
18788
19477
  }
18789
19478
 
18790
19479
  var memberNames = Object.keys(members);
18791
19480
  var META_FIELD = '__ember_meta__';
18792
19481
 
18793
19482
  function Meta(obj, parentMeta) {
19483
+ var _this = this;
19484
+
18794
19485
  _emberMetalDebug.runInDebug(function () {
18795
19486
  return counters.metaInstantiated++;
18796
19487
  });
@@ -18826,7 +19517,10 @@ enifed('ember-metal/meta', ['exports', 'ember-utils', 'ember-metal/features', 'e
18826
19517
 
18827
19518
  if (true || false) {
18828
19519
  this._lastRendered = undefined;
18829
- this._lastRenderedFrom = undefined; // FIXME: not used in production, remove me from prod builds
19520
+ _emberMetalDebug.runInDebug(function () {
19521
+ _this._lastRenderedReferenceMap = undefined;
19522
+ _this._lastRenderedTemplateMap = undefined;
19523
+ });
18830
19524
  }
18831
19525
 
18832
19526
  this._initializeListeners();
@@ -19193,24 +19887,11 @@ enifed('ember-metal/meta', ['exports', 'ember-utils', 'ember-metal/features', 'e
19193
19887
  };
19194
19888
  }
19195
19889
 
19196
- var HAS_NATIVE_WEAKMAP = (function () {
19197
- // detect if `WeakMap` is even present
19198
- var hasWeakMap = typeof WeakMap === 'function';
19199
- if (!hasWeakMap) {
19200
- return false;
19201
- }
19202
-
19203
- var instance = new WeakMap();
19204
- // use `Object`'s `.toString` directly to prevent us from detecting
19205
- // polyfills as native weakmaps
19206
- return Object.prototype.toString.call(instance) === '[object WeakMap]';
19207
- })();
19208
-
19209
19890
  var setMeta = undefined,
19210
19891
  peekMeta = undefined;
19211
19892
 
19212
19893
  // choose the one appropriate for given platform
19213
- if (HAS_NATIVE_WEAKMAP) {
19894
+ if (_emberUtils.HAS_NATIVE_WEAKMAP) {
19214
19895
  (function () {
19215
19896
  var getPrototypeOf = Object.getPrototypeOf;
19216
19897
  var metaStore = new WeakMap();
@@ -22343,10 +23024,14 @@ enifed('ember-metal/transaction', ['exports', 'ember-metal/meta', 'ember-metal/d
22343
23024
  var counter = 0;
22344
23025
  var inTransaction = false;
22345
23026
  var shouldReflush = undefined;
23027
+ var debugStack = undefined;
22346
23028
 
22347
23029
  exports.default = runInTransaction = function (context, methodName) {
22348
23030
  shouldReflush = false;
22349
23031
  inTransaction = true;
23032
+ _emberMetalDebug.runInDebug(function () {
23033
+ debugStack = context.env.debugStack;
23034
+ });
22350
23035
  context[methodName]();
22351
23036
  inTransaction = false;
22352
23037
  counter++;
@@ -22362,8 +23047,13 @@ enifed('ember-metal/transaction', ['exports', 'ember-metal/meta', 'ember-metal/d
22362
23047
  lastRendered[key] = counter;
22363
23048
 
22364
23049
  _emberMetalDebug.runInDebug(function () {
22365
- var lastRenderedFrom = meta.writableLastRenderedFrom();
22366
- lastRenderedFrom[key] = reference;
23050
+ var referenceMap = meta.writableLastRenderedReferenceMap();
23051
+ referenceMap[key] = reference;
23052
+
23053
+ var templateMap = meta.writableLastRenderedTemplateMap();
23054
+ if (templateMap[key] === undefined) {
23055
+ templateMap[key] = debugStack.peek();
23056
+ }
22367
23057
  });
22368
23058
  };
22369
23059
 
@@ -22373,10 +23063,13 @@ enifed('ember-metal/transaction', ['exports', 'ember-metal/meta', 'ember-metal/d
22373
23063
 
22374
23064
  if (lastRendered && lastRendered[key] === counter) {
22375
23065
  raise((function () {
22376
- var ref = meta.readableLastRenderedFrom();
22377
- var parts = [];
22378
- var lastRef = ref[key];
23066
+ var templateMap = meta.readableLastRenderedTemplateMap();
23067
+ var lastRenderedIn = templateMap[key];
23068
+ var currentlyIn = debugStack.peek();
22379
23069
 
23070
+ var referenceMap = meta.readableLastRenderedReferenceMap();
23071
+ var lastRef = referenceMap[key];
23072
+ var parts = [];
22380
23073
  var label = undefined;
22381
23074
 
22382
23075
  if (lastRef) {
@@ -22385,12 +23078,12 @@ enifed('ember-metal/transaction', ['exports', 'ember-metal/meta', 'ember-metal/d
22385
23078
  lastRef = lastRef._parentReference;
22386
23079
  }
22387
23080
 
22388
- label = parts.join();
23081
+ label = parts.join('.');
22389
23082
  } else {
22390
23083
  label = 'the same value';
22391
23084
  }
22392
23085
 
22393
- return 'You modified ' + label + ' twice on ' + object + ' in a single render. This was unreliable and slow in Ember 1.x and ' + implication;
23086
+ return 'You modified "' + label + '" twice on ' + object + ' in a single render. It was rendered in ' + lastRenderedIn + ' and modified in ' + currentlyIn + '. This was unreliable and slow in Ember 1.x and ' + implication;
22394
23087
  })(), false);
22395
23088
 
22396
23089
  shouldReflush = true;
@@ -33458,9 +34151,9 @@ enifed('ember-runtime/mixins/mutable_array', ['exports', 'ember-metal', 'ember-r
33458
34151
  want to reuse an existing array without having to recreate it.
33459
34152
  ```javascript
33460
34153
  let colors = ['red', 'green', 'blue'];
33461
- color.length(); // 3
33462
- colors.clear(); // []
33463
- colors.length(); // 0
34154
+ colors.length; // 3
34155
+ colors.clear(); // []
34156
+ colors.length; // 0
33464
34157
  ```
33465
34158
  @method clear
33466
34159
  @return {Ember.Array} An empty Array.
@@ -34637,7 +35330,7 @@ enifed('ember-runtime/mixins/registry_proxy', ['exports', 'ember-metal'], functi
34637
35330
  let App = Ember.Application.create();
34638
35331
  let appInstance = App.buildInstance();
34639
35332
  // if all of type `connection` must not be singletons
34640
- appInstance.optionsForType('connection', { singleton: false });
35333
+ appInstance.registerOptionsForType('connection', { singleton: false });
34641
35334
  appInstance.register('connection:twitter', TwitterConnection);
34642
35335
  appInstance.register('connection:facebook', FacebookConnection);
34643
35336
  let twitter = appInstance.lookup('connection:twitter');
@@ -39319,7 +40012,7 @@ enifed('ember-utils/guid', ['exports', 'ember-utils/intern'], function (exports,
39319
40012
  }
39320
40013
  }
39321
40014
  });
39322
- enifed('ember-utils/index', ['exports', 'ember-utils/symbol', 'ember-utils/owner', 'ember-utils/assign', 'ember-utils/empty-object', 'ember-utils/dictionary', 'ember-utils/guid', 'ember-utils/intern', 'ember-utils/super', 'ember-utils/inspect', 'ember-utils/lookup-descriptor', 'ember-utils/invoke', 'ember-utils/make-array', 'ember-utils/apply-str', 'ember-utils/name', 'ember-utils/to-string'], function (exports, _emberUtilsSymbol, _emberUtilsOwner, _emberUtilsAssign, _emberUtilsEmptyObject, _emberUtilsDictionary, _emberUtilsGuid, _emberUtilsIntern, _emberUtilsSuper, _emberUtilsInspect, _emberUtilsLookupDescriptor, _emberUtilsInvoke, _emberUtilsMakeArray, _emberUtilsApplyStr, _emberUtilsName, _emberUtilsToString) {
40015
+ enifed('ember-utils/index', ['exports', 'ember-utils/symbol', 'ember-utils/owner', 'ember-utils/assign', 'ember-utils/empty-object', 'ember-utils/dictionary', 'ember-utils/guid', 'ember-utils/intern', 'ember-utils/super', 'ember-utils/inspect', 'ember-utils/lookup-descriptor', 'ember-utils/invoke', 'ember-utils/make-array', 'ember-utils/apply-str', 'ember-utils/name', 'ember-utils/to-string', 'ember-utils/weak-map-utils'], function (exports, _emberUtilsSymbol, _emberUtilsOwner, _emberUtilsAssign, _emberUtilsEmptyObject, _emberUtilsDictionary, _emberUtilsGuid, _emberUtilsIntern, _emberUtilsSuper, _emberUtilsInspect, _emberUtilsLookupDescriptor, _emberUtilsInvoke, _emberUtilsMakeArray, _emberUtilsApplyStr, _emberUtilsName, _emberUtilsToString, _emberUtilsWeakMapUtils) {
39323
40016
  /*
39324
40017
  This package will be eagerly parsed and should have no dependencies on external
39325
40018
  packages.
@@ -39357,6 +40050,7 @@ enifed('ember-utils/index', ['exports', 'ember-utils/symbol', 'ember-utils/owner
39357
40050
  exports.applyStr = _emberUtilsApplyStr.default;
39358
40051
  exports.NAME_KEY = _emberUtilsName.default;
39359
40052
  exports.toString = _emberUtilsToString.default;
40053
+ exports.HAS_NATIVE_WEAKMAP = _emberUtilsWeakMapUtils.HAS_NATIVE_WEAKMAP;
39360
40054
  });
39361
40055
  enifed('ember-utils/inspect', ['exports'], function (exports) {
39362
40056
  'use strict';
@@ -39657,8 +40351,8 @@ enifed('ember-utils/owner', ['exports', 'ember-utils/symbol'], function (exports
39657
40351
 
39658
40352
  @method setOwner
39659
40353
  @for Ember
39660
- @param {Object} object An object with an owner.
39661
- @return {Object} An owner object.
40354
+ @param {Object} object An object instance.
40355
+ @param {Object} object The new owner object of the object instance.
39662
40356
  @since 2.3.0
39663
40357
  @public
39664
40358
  */
@@ -39774,6 +40468,23 @@ enifed('ember-utils/to-string', ['exports'], function (exports) {
39774
40468
  }
39775
40469
  }
39776
40470
  });
40471
+ enifed('ember-utils/weak-map-utils', ['exports'], function (exports) {
40472
+ 'use strict';
40473
+
40474
+ var HAS_NATIVE_WEAKMAP = (function () {
40475
+ // detect if `WeakMap` is even present
40476
+ var hasWeakMap = typeof WeakMap === 'function';
40477
+ if (!hasWeakMap) {
40478
+ return false;
40479
+ }
40480
+
40481
+ var instance = new WeakMap();
40482
+ // use `Object`'s `.toString` directly to prevent us from detecting
40483
+ // polyfills as native weakmaps
40484
+ return Object.prototype.toString.call(instance) === '[object WeakMap]';
40485
+ })();
40486
+ exports.HAS_NATIVE_WEAKMAP = HAS_NATIVE_WEAKMAP;
40487
+ });
39777
40488
  enifed('ember-views/compat/attrs', ['exports', 'ember-utils'], function (exports, _emberUtils) {
39778
40489
  'use strict';
39779
40490
 
@@ -41736,481 +42447,6 @@ enifed("ember-views/views/view", ["exports"], function (exports) {
41736
42447
  */
41737
42448
 
41738
42449
  /**
41739
- `Ember.View` is the class in Ember responsible for encapsulating templates of
41740
- HTML content, combining templates with data to render as sections of a page's
41741
- DOM, and registering and responding to user-initiated events.
41742
-
41743
- ## HTML Tag
41744
-
41745
- The default HTML tag name used for a view's DOM representation is `div`. This
41746
- can be customized by setting the `tagName` property. The following view
41747
- class:
41748
-
41749
- ```javascript
41750
- ParagraphView = Ember.View.extend({
41751
- tagName: 'em'
41752
- });
41753
- ```
41754
-
41755
- Would result in instances with the following HTML:
41756
-
41757
- ```html
41758
- <em id="ember1" class="ember-view"></em>
41759
- ```
41760
-
41761
- ## HTML `class` Attribute
41762
-
41763
- The HTML `class` attribute of a view's tag can be set by providing a
41764
- `classNames` property that is set to an array of strings:
41765
-
41766
- ```javascript
41767
- MyView = Ember.View.extend({
41768
- classNames: ['my-class', 'my-other-class']
41769
- });
41770
- ```
41771
-
41772
- Will result in view instances with an HTML representation of:
41773
-
41774
- ```html
41775
- <div id="ember1" class="ember-view my-class my-other-class"></div>
41776
- ```
41777
-
41778
- `class` attribute values can also be set by providing a `classNameBindings`
41779
- property set to an array of properties names for the view. The return value
41780
- of these properties will be added as part of the value for the view's `class`
41781
- attribute. These properties can be computed properties:
41782
-
41783
- ```javascript
41784
- MyView = Ember.View.extend({
41785
- classNameBindings: ['propertyA', 'propertyB'],
41786
- propertyA: 'from-a',
41787
- propertyB: Ember.computed(function() {
41788
- if (someLogic) { return 'from-b'; }
41789
- })
41790
- });
41791
- ```
41792
-
41793
- Will result in view instances with an HTML representation of:
41794
-
41795
- ```html
41796
- <div id="ember1" class="ember-view from-a from-b"></div>
41797
- ```
41798
-
41799
- If the value of a class name binding returns a boolean the property name
41800
- itself will be used as the class name if the property is true. The class name
41801
- will not be added if the value is `false` or `undefined`.
41802
-
41803
- ```javascript
41804
- MyView = Ember.View.extend({
41805
- classNameBindings: ['hovered'],
41806
- hovered: true
41807
- });
41808
- ```
41809
-
41810
- Will result in view instances with an HTML representation of:
41811
-
41812
- ```html
41813
- <div id="ember1" class="ember-view hovered"></div>
41814
- ```
41815
-
41816
- When using boolean class name bindings you can supply a string value other
41817
- than the property name for use as the `class` HTML attribute by appending the
41818
- preferred value after a ":" character when defining the binding:
41819
-
41820
- ```javascript
41821
- MyView = Ember.View.extend({
41822
- classNameBindings: ['awesome:so-very-cool'],
41823
- awesome: true
41824
- });
41825
- ```
41826
-
41827
- Will result in view instances with an HTML representation of:
41828
-
41829
- ```html
41830
- <div id="ember1" class="ember-view so-very-cool"></div>
41831
- ```
41832
-
41833
- Boolean value class name bindings whose property names are in a
41834
- camelCase-style format will be converted to a dasherized format:
41835
-
41836
- ```javascript
41837
- MyView = Ember.View.extend({
41838
- classNameBindings: ['isUrgent'],
41839
- isUrgent: true
41840
- });
41841
- ```
41842
-
41843
- Will result in view instances with an HTML representation of:
41844
-
41845
- ```html
41846
- <div id="ember1" class="ember-view is-urgent"></div>
41847
- ```
41848
-
41849
- Class name bindings can also refer to object values that are found by
41850
- traversing a path relative to the view itself:
41851
-
41852
- ```javascript
41853
- MyView = Ember.View.extend({
41854
- classNameBindings: ['messages.empty']
41855
- messages: Ember.Object.create({
41856
- empty: true
41857
- })
41858
- });
41859
- ```
41860
-
41861
- Will result in view instances with an HTML representation of:
41862
-
41863
- ```html
41864
- <div id="ember1" class="ember-view empty"></div>
41865
- ```
41866
-
41867
- If you want to add a class name for a property which evaluates to true and
41868
- and a different class name if it evaluates to false, you can pass a binding
41869
- like this:
41870
-
41871
- ```javascript
41872
- // Applies 'enabled' class when isEnabled is true and 'disabled' when isEnabled is false
41873
- Ember.View.extend({
41874
- classNameBindings: ['isEnabled:enabled:disabled']
41875
- isEnabled: true
41876
- });
41877
- ```
41878
-
41879
- Will result in view instances with an HTML representation of:
41880
-
41881
- ```html
41882
- <div id="ember1" class="ember-view enabled"></div>
41883
- ```
41884
-
41885
- When isEnabled is `false`, the resulting HTML representation looks like
41886
- this:
41887
-
41888
- ```html
41889
- <div id="ember1" class="ember-view disabled"></div>
41890
- ```
41891
-
41892
- This syntax offers the convenience to add a class if a property is `false`:
41893
-
41894
- ```javascript
41895
- // Applies no class when isEnabled is true and class 'disabled' when isEnabled is false
41896
- Ember.View.extend({
41897
- classNameBindings: ['isEnabled::disabled']
41898
- isEnabled: true
41899
- });
41900
- ```
41901
-
41902
- Will result in view instances with an HTML representation of:
41903
-
41904
- ```html
41905
- <div id="ember1" class="ember-view"></div>
41906
- ```
41907
-
41908
- When the `isEnabled` property on the view is set to `false`, it will result
41909
- in view instances with an HTML representation of:
41910
-
41911
- ```html
41912
- <div id="ember1" class="ember-view disabled"></div>
41913
- ```
41914
-
41915
- Updates to the value of a class name binding will result in automatic
41916
- update of the HTML `class` attribute in the view's rendered HTML
41917
- representation. If the value becomes `false` or `undefined` the class name
41918
- will be removed.
41919
-
41920
- Both `classNames` and `classNameBindings` are concatenated properties. See
41921
- [Ember.Object](/api/classes/Ember.Object.html) documentation for more
41922
- information about concatenated properties.
41923
-
41924
- ## HTML Attributes
41925
-
41926
- The HTML attribute section of a view's tag can be set by providing an
41927
- `attributeBindings` property set to an array of property names on the view.
41928
- The return value of these properties will be used as the value of the view's
41929
- HTML associated attribute:
41930
-
41931
- ```javascript
41932
- AnchorView = Ember.View.extend({
41933
- tagName: 'a',
41934
- attributeBindings: ['href'],
41935
- href: 'http://google.com'
41936
- });
41937
- ```
41938
-
41939
- Will result in view instances with an HTML representation of:
41940
-
41941
- ```html
41942
- <a id="ember1" class="ember-view" href="http://google.com"></a>
41943
- ```
41944
-
41945
- One property can be mapped on to another by placing a ":" between
41946
- the source property and the destination property:
41947
-
41948
- ```javascript
41949
- AnchorView = Ember.View.extend({
41950
- tagName: 'a',
41951
- attributeBindings: ['url:href'],
41952
- url: 'http://google.com'
41953
- });
41954
- ```
41955
-
41956
- Will result in view instances with an HTML representation of:
41957
-
41958
- ```html
41959
- <a id="ember1" class="ember-view" href="http://google.com"></a>
41960
- ```
41961
-
41962
- Namespaced attributes (e.g. `xlink:href`) are supported, but have to be
41963
- mapped, since `:` is not a valid character for properties in Javascript:
41964
-
41965
- ```javascript
41966
- UseView = Ember.View.extend({
41967
- tagName: 'use',
41968
- attributeBindings: ['xlinkHref:xlink:href'],
41969
- xlinkHref: '#triangle'
41970
- });
41971
- ```
41972
- Will result in view instances with an HTML representation of:
41973
-
41974
- ```html
41975
- <use xlink:href="#triangle"></use>
41976
- ```
41977
-
41978
- If the return value of an `attributeBindings` monitored property is a boolean
41979
- the attribute will be present or absent depending on the value:
41980
-
41981
- ```javascript
41982
- MyTextInput = Ember.View.extend({
41983
- tagName: 'input',
41984
- attributeBindings: ['disabled'],
41985
- disabled: false
41986
- });
41987
- ```
41988
-
41989
- Will result in a view instance with an HTML representation of:
41990
-
41991
- ```html
41992
- <input id="ember1" class="ember-view" />
41993
- ```
41994
-
41995
- `attributeBindings` can refer to computed properties:
41996
-
41997
- ```javascript
41998
- MyTextInput = Ember.View.extend({
41999
- tagName: 'input',
42000
- attributeBindings: ['disabled'],
42001
- disabled: Ember.computed(function() {
42002
- if (someLogic) {
42003
- return true;
42004
- } else {
42005
- return false;
42006
- }
42007
- })
42008
- });
42009
- ```
42010
-
42011
- To prevent setting an attribute altogether, use `null` or `undefined` as the
42012
- return value of the `attributeBindings` monitored property:
42013
-
42014
- ```javascript
42015
- MyTextInput = Ember.View.extend({
42016
- tagName: 'form',
42017
- attributeBindings: ['novalidate'],
42018
- novalidate: null
42019
- });
42020
- ```
42021
-
42022
- Updates to the property of an attribute binding will result in automatic
42023
- update of the HTML attribute in the view's rendered HTML representation.
42024
-
42025
- `attributeBindings` is a concatenated property. See [Ember.Object](/api/classes/Ember.Object.html)
42026
- documentation for more information about concatenated properties.
42027
-
42028
- ## Layouts
42029
-
42030
- Views can have a secondary template that wraps their main template. Like
42031
- primary templates, layouts can be any function that accepts an optional
42032
- context parameter and returns a string of HTML that will be inserted inside
42033
- view's tag. Views whose HTML element is self closing (e.g. `<input />`)
42034
- cannot have a layout and this property will be ignored.
42035
-
42036
- Most typically in Ember a layout will be a compiled template.
42037
-
42038
- A view's layout can be set directly with the `layout` property or reference
42039
- an existing template by name with the `layoutName` property.
42040
-
42041
- A template used as a layout must contain a single use of the
42042
- `{{yield}}` helper. The HTML contents of a view's rendered `template` will be
42043
- inserted at this location:
42044
-
42045
- ```javascript
42046
- AViewWithLayout = Ember.View.extend({
42047
- layout: Ember.HTMLBars.compile("<div class='my-decorative-class'>{{yield}}</div>"),
42048
- template: Ember.HTMLBars.compile("I got wrapped")
42049
- });
42050
- ```
42051
-
42052
- Will result in view instances with an HTML representation of:
42053
-
42054
- ```html
42055
- <div id="ember1" class="ember-view">
42056
- <div class="my-decorative-class">
42057
- I got wrapped
42058
- </div>
42059
- </div>
42060
- ```
42061
-
42062
- See [Ember.Templates.helpers.yield](/api/classes/Ember.Templates.helpers.html#method_yield)
42063
- for more information.
42064
-
42065
- ## Responding to Browser Events
42066
-
42067
- Views can respond to user-initiated events in one of three ways: method
42068
- implementation, through an event manager, and through `{{action}}` helper use
42069
- in their template or layout.
42070
-
42071
- ### Method Implementation
42072
-
42073
- Views can respond to user-initiated events by implementing a method that
42074
- matches the event name. A `jQuery.Event` object will be passed as the
42075
- argument to this method.
42076
-
42077
- ```javascript
42078
- AView = Ember.View.extend({
42079
- click: function(event) {
42080
- // will be called when an instance's
42081
- // rendered element is clicked
42082
- }
42083
- });
42084
- ```
42085
-
42086
- ### Event Managers
42087
-
42088
- Views can define an object as their `eventManager` property. This object can
42089
- then implement methods that match the desired event names. Matching events
42090
- that occur on the view's rendered HTML or the rendered HTML of any of its DOM
42091
- descendants will trigger this method. A `jQuery.Event` object will be passed
42092
- as the first argument to the method and an `Ember.View` object as the
42093
- second. The `Ember.View` will be the view whose rendered HTML was interacted
42094
- with. This may be the view with the `eventManager` property or one of its
42095
- descendant views.
42096
-
42097
- ```javascript
42098
- AView = Ember.View.extend({
42099
- eventManager: Ember.Object.create({
42100
- doubleClick: function(event, view) {
42101
- // will be called when an instance's
42102
- // rendered element or any rendering
42103
- // of this view's descendant
42104
- // elements is clicked
42105
- }
42106
- })
42107
- });
42108
- ```
42109
-
42110
- An event defined for an event manager takes precedence over events of the
42111
- same name handled through methods on the view.
42112
-
42113
- ```javascript
42114
- AView = Ember.View.extend({
42115
- mouseEnter: function(event) {
42116
- // will never trigger.
42117
- },
42118
- eventManager: Ember.Object.create({
42119
- mouseEnter: function(event, view) {
42120
- // takes precedence over AView#mouseEnter
42121
- }
42122
- })
42123
- });
42124
- ```
42125
-
42126
- Similarly a view's event manager will take precedence for events of any views
42127
- rendered as a descendant. A method name that matches an event name will not
42128
- be called if the view instance was rendered inside the HTML representation of
42129
- a view that has an `eventManager` property defined that handles events of the
42130
- name. Events not handled by the event manager will still trigger method calls
42131
- on the descendant.
42132
-
42133
- ```javascript
42134
- var App = Ember.Application.create();
42135
- App.OuterView = Ember.View.extend({
42136
- template: Ember.HTMLBars.compile("outer {{#view 'inner'}}inner{{/view}} outer"),
42137
- eventManager: Ember.Object.create({
42138
- mouseEnter: function(event, view) {
42139
- // view might be instance of either
42140
- // OuterView or InnerView depending on
42141
- // where on the page the user interaction occurred
42142
- }
42143
- })
42144
- });
42145
-
42146
- App.InnerView = Ember.View.extend({
42147
- click: function(event) {
42148
- // will be called if rendered inside
42149
- // an OuterView because OuterView's
42150
- // eventManager doesn't handle click events
42151
- },
42152
- mouseEnter: function(event) {
42153
- // will never be called if rendered inside
42154
- // an OuterView.
42155
- }
42156
- });
42157
- ```
42158
-
42159
- ### `{{action}}` Helper
42160
-
42161
- See [Ember.Templates.helpers.action](/api/classes/Ember.Templates.helpers.html#method_action).
42162
-
42163
- ### Event Names
42164
-
42165
- All of the event handling approaches described above respond to the same set
42166
- of events. The names of the built-in events are listed below. (The hash of
42167
- built-in events exists in `Ember.EventDispatcher`.) Additional, custom events
42168
- can be registered by using `Ember.Application.customEvents`.
42169
-
42170
- Touch events:
42171
-
42172
- * `touchStart`
42173
- * `touchMove`
42174
- * `touchEnd`
42175
- * `touchCancel`
42176
-
42177
- Keyboard events
42178
-
42179
- * `keyDown`
42180
- * `keyUp`
42181
- * `keyPress`
42182
-
42183
- Mouse events
42184
-
42185
- * `mouseDown`
42186
- * `mouseUp`
42187
- * `contextMenu`
42188
- * `click`
42189
- * `doubleClick`
42190
- * `mouseMove`
42191
- * `focusIn`
42192
- * `focusOut`
42193
- * `mouseEnter`
42194
- * `mouseLeave`
42195
-
42196
- Form events:
42197
-
42198
- * `submit`
42199
- * `change`
42200
- * `focusIn`
42201
- * `focusOut`
42202
- * `input`
42203
-
42204
- HTML5 drag and drop events:
42205
-
42206
- * `dragStart`
42207
- * `drag`
42208
- * `dragEnter`
42209
- * `dragLeave`
42210
- * `dragOver`
42211
- * `dragEnd`
42212
- * `drop`
42213
-
42214
42450
  @class View
42215
42451
  @namespace Ember
42216
42452
  @extends Ember.CoreView
@@ -42759,7 +42995,7 @@ enifed('ember/index', ['exports', 'require', 'ember-environment', 'ember-utils',
42759
42995
  enifed("ember/version", ["exports"], function (exports) {
42760
42996
  "use strict";
42761
42997
 
42762
- exports.default = "2.11.0-beta.4";
42998
+ exports.default = "2.11.0-beta.8";
42763
42999
  });
42764
43000
  enifed('internal-test-helpers/apply-mixins', ['exports', 'ember-utils'], function (exports, _emberUtils) {
42765
43001
  'use strict';
@@ -52947,9 +53183,11 @@ enifed('glimmer-runtime/lib/syntax/core', ['exports', 'glimmer-runtime/lib/synta
52947
53183
  var keys = this.keys;
52948
53184
  var values = this.values;
52949
53185
 
52950
- return new _glimmerRuntimeLibCompiledExpressionsArgs.CompiledNamedArgs(keys, values.map(function (value) {
52951
- return value.compile(compiler, env, symbolTable);
52952
- }));
53186
+ var compiledValues = new Array(values.length);
53187
+ for (var i = 0; i < compiledValues.length; i++) {
53188
+ compiledValues[i] = values[i].compile(compiler, env, symbolTable);
53189
+ }
53190
+ return new _glimmerRuntimeLibCompiledExpressionsArgs.CompiledNamedArgs(keys, compiledValues);
52953
53191
  };
52954
53192
 
52955
53193
  return NamedArgs;
@@ -53284,9 +53522,20 @@ enifed('glimmer-runtime/lib/upsert', ['exports', 'glimmer-runtime/lib/bounds'],
53284
53522
  enifed('glimmer-runtime/lib/utils', ['exports', 'glimmer-util'], function (exports, _glimmerUtil) {
53285
53523
  'use strict';
53286
53524
 
53287
- var EMPTY_ARRAY = Object.freeze([]);
53525
+ var HAS_NATIVE_WEAKMAP = (function () {
53526
+ // detect if `WeakMap` is even present
53527
+ var hasWeakMap = typeof WeakMap === 'function';
53528
+ if (!hasWeakMap) {
53529
+ return false;
53530
+ }
53531
+ var instance = new WeakMap();
53532
+ // use `Object`'s `.toString` directly to prevent us from detecting
53533
+ // polyfills as native weakmaps
53534
+ return Object.prototype.toString.call(instance) === '[object WeakMap]';
53535
+ })();
53536
+ var EMPTY_ARRAY = HAS_NATIVE_WEAKMAP ? Object.freeze([]) : [];
53288
53537
  exports.EMPTY_ARRAY = EMPTY_ARRAY;
53289
- var EMPTY_DICT = Object.freeze(_glimmerUtil.dict());
53538
+ var EMPTY_DICT = HAS_NATIVE_WEAKMAP ? Object.freeze(_glimmerUtil.dict()) : _glimmerUtil.dict();
53290
53539
  exports.EMPTY_DICT = EMPTY_DICT;
53291
53540
 
53292
53541
  var ListRange = (function () {