ember-source 1.0.0.rc1.1 → 1.0.0.rc1.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ember-source might be problematic. Click here for more details.

@@ -1,5 +1,5 @@
1
- // Version: v1.0.0-pre.4-277-g2c0c237
2
- // Last commit: 2c0c237 (2013-02-21 12:03:23 -0500)
1
+ // Version: v1.0.0-pre.4-293-ge707ffa
2
+ // Last commit: e707ffa (2013-02-23 17:35:13 -0500)
3
3
 
4
4
 
5
5
  (function() {
@@ -150,8 +150,8 @@ Ember.deprecateFunc = function(message, func) {
150
150
 
151
151
  })();
152
152
 
153
- // Version: v1.0.0-pre.4-277-g2c0c237
154
- // Last commit: 2c0c237 (2013-02-21 12:03:23 -0500)
153
+ // Version: v1.0.0-pre.4-293-ge707ffa
154
+ // Last commit: e707ffa (2013-02-23 17:35:13 -0500)
155
155
 
156
156
 
157
157
  (function() {
@@ -6123,7 +6123,6 @@ define("container",
6123
6123
  register: function(type, name, factory, options) {
6124
6124
  var fullName;
6125
6125
 
6126
-
6127
6126
  if (type.indexOf(':') !== -1){
6128
6127
  options = factory;
6129
6128
  factory = name;
@@ -6133,15 +6132,23 @@ define("container",
6133
6132
  fullName = type + ":" + name;
6134
6133
  }
6135
6134
 
6136
- this.registry.set(fullName, factory);
6137
- this._options.set(fullName, options || {});
6135
+ var normalizedName = this.normalize(fullName);
6136
+
6137
+ this.registry.set(normalizedName, factory);
6138
+ this._options.set(normalizedName, options || {});
6138
6139
  },
6139
6140
 
6140
6141
  resolve: function(fullName) {
6141
6142
  return this.resolver(fullName) || this.registry.get(fullName);
6142
6143
  },
6143
6144
 
6145
+ normalize: function(fullName) {
6146
+ return fullName;
6147
+ },
6148
+
6144
6149
  lookup: function(fullName, options) {
6150
+ fullName = this.normalize(fullName);
6151
+
6145
6152
  options = options || {};
6146
6153
 
6147
6154
  if (this.cache.has(fullName) && options.singleton !== false) {
@@ -6270,7 +6277,8 @@ define("container",
6270
6277
  }
6271
6278
 
6272
6279
  function factoryFor(container, fullName) {
6273
- return container.resolve(fullName);
6280
+ var name = container.normalize(fullName);
6281
+ return container.resolve(name);
6274
6282
  }
6275
6283
 
6276
6284
  function instantiate(container, fullName) {
@@ -11125,40 +11133,8 @@ Ember.Mixin.prototype.toString = classToString;
11125
11133
 
11126
11134
 
11127
11135
  (function() {
11128
- /**
11129
- @module ember
11130
- @submodule ember-runtime
11131
- */
11132
-
11133
- /**
11134
- Defines a namespace that will contain an executable application. This is
11135
- very similar to a normal namespace except that it is expected to include at
11136
- least a 'ready' function which can be run to initialize the application.
11137
-
11138
- Currently `Ember.Application` is very similar to `Ember.Namespace.` However,
11139
- this class may be augmented by additional frameworks so it is important to
11140
- use this instance when building new applications.
11141
-
11142
- # Example Usage
11143
-
11144
- ```javascript
11145
- MyApp = Ember.Application.create({
11146
- VERSION: '1.0.0',
11147
- store: Ember.Store.create().from(Ember.fixtures)
11148
- });
11149
-
11150
- MyApp.ready = function() {
11151
- //..init code goes here...
11152
- }
11153
- ```
11154
-
11155
- @class Application
11156
- @namespace Ember
11157
- @extends Ember.Namespace
11158
- */
11159
11136
  Ember.Application = Ember.Namespace.extend();
11160
11137
 
11161
-
11162
11138
  })();
11163
11139
 
11164
11140
 
@@ -12440,7 +12416,8 @@ Ember.ArrayController = Ember.ArrayProxy.extend(Ember.ControllerMixin,
12440
12416
 
12441
12417
  objectAtContent: function(idx) {
12442
12418
  var length = get(this, 'length'),
12443
- object = get(this,'arrangedContent').objectAt(idx);
12419
+ arrangedContent = get(this,'arrangedContent'),
12420
+ object = arrangedContent && arrangedContent.objectAt(idx);
12444
12421
 
12445
12422
  if (idx >= 0 && idx < length) {
12446
12423
  var controllerClass = this.lookupItemController(object);
@@ -8,10 +8,10 @@
8
8
  // ==========================================================================
9
9
 
10
10
 
11
- // Version: v1.0.0-pre.4-277-g2c0c237
12
- // Last commit: 2c0c237 (2013-02-21 12:03:23 -0500)
11
+ // Version: v1.0.0-pre.4-293-ge707ffa
12
+ // Last commit: e707ffa (2013-02-23 17:35:13 -0500)
13
13
 
14
14
 
15
15
  (function(){var e,t;(function(){var n={},r={};e=function(e,t,r){n[e]={deps:t,callback:r}},t=function(e){if(r[e])return r[e];r[e]={};var i=n[e],s=i.deps,o=i.callback,u=[],a;for(var f=0,l=s.length;f<l;f++)s[f]==="exports"?u.push(a={}):u.push(t(s[f]));var c=o.apply(this,u);return r[e]=a||c}})(),function(){function r(t){if(e.console&&e.console[t])return e.console[t].apply?function(){e.console[t].apply(e.console,arguments)}:function(){var n=Array.prototype.join.call(arguments,", ");e.console[t](n)}}"undefined"==typeof Ember&&(Ember={});var e=Ember.imports=Ember.imports||this,t=Ember.exports=Ember.exports||this,n=Ember.lookup=Ember.lookup||this;t.Em=t.Ember=Em=Ember,Ember.isNamespace=!0,Ember.toString=function(){return"Ember"},Ember.VERSION="1.0.0-rc.1",Ember.ENV=Ember.ENV||("undefined"==typeof ENV?{}:ENV),Ember.config=Ember.config||{},Ember.EXTEND_PROTOTYPES=Ember.ENV.EXTEND_PROTOTYPES,typeof Ember.EXTEND_PROTOTYPES=="undefined"&&(Ember.EXTEND_PROTOTYPES=!0),Ember.LOG_STACKTRACE_ON_DEPRECATION=Ember.ENV.LOG_STACKTRACE_ON_DEPRECATION!==!1,Ember.SHIM_ES5=Ember.ENV.SHIM_ES5===!1?!1:Ember.EXTEND_PROTOTYPES,Ember.K=function(){return this},"undefined"==typeof Ember.assert&&(Ember.assert=Ember.K),"undefined"==typeof Ember.warn&&(Ember.warn=Ember.K),"undefined"==typeof Ember.debug&&(Ember.debug=Ember.K),"undefined"==typeof Ember.deprecate&&(Ember.deprecate=Ember.K),"undefined"==typeof Ember.deprecateFunc&&(Ember.deprecateFunc=function(e,t){return t}),Ember.uuid=0,Ember.Logger={log:r("log")||Ember.K,warn:r("warn")||Ember.K,error:r("error")||Ember.K,info:r("info")||Ember.K,debug:r("debug")||r("info")||Ember.K},Ember.onerror=null,Ember.handleErrors=function(e,t){if("function"!=typeof Ember.onerror)return e.apply(t||this);try{return e.apply(t||this)}catch(n){Ember.onerror(n)}},Ember.merge=function(e,t){for(var n in t){if(!t.hasOwnProperty(n))continue;e[n]=t[n]}}}(),function(){var e=Ember.platform={};Ember.create=Object.create;if(!Ember.create||Ember.ENV.STUB_OBJECT_CREATE){var t=function(){};Ember.create=function(e,n){t.prototype=e,e=new t;if(n){t.prototype=e;for(var r in n)t.prototype[r]=n[r].value;e=new t}return t.prototype=null,e},Ember.create.isSimulated=!0}var n=Object.defineProperty,r,i;if(n)try{n({},"a",{get:function(){}})}catch(s){n=null}n&&(r=function(){var e={};return n(e,"a",{configurable:!0,enumerable:!0,get:function(){},set:function(){}}),n(e,"a",{configurable:!0,enumerable:!0,writable:!0,value:!0}),e.a===!0}(),i=function(){try{return n(document.createElement("div"),"definePropertyOnDOM",{}),!0}catch(e){}return!1}(),r?i||(n=function(e,t,n){var r;return typeof Node=="object"?r=e instanceof Node:r=typeof e=="object"&&typeof e.nodeType=="number"&&typeof e.nodeName=="string",r?e[t]=n.value:Object.defineProperty(e,t,n)}):n=null),e.defineProperty=n,e.hasPropertyAccessors=!0,e.defineProperty||(e.hasPropertyAccessors=!1,e.defineProperty=function(e,t,n){n.get||(e[t]=n.value)},e.defineProperty.isSimulated=!0),Ember.ENV.MANDATORY_SETTER&&!e.hasPropertyAccessors&&(Ember.ENV.MANDATORY_SETTER=!1)}(),function(){function h(e){this.descs={},this.watching={},this.cache={},this.source=e}function p(e,t){return!!e&&typeof e[t]=="function"}var e=Ember.platform.defineProperty,t=Ember.create,n="__ember"+ +(new Date),r=0,i=[],s={},o=Ember.ENV.MANDATORY_SETTER;Ember.GUID_KEY=n;var u={writable:!1,configurable:!1,enumerable:!1,value:null};Ember.generateGuid=function(i,s){s||(s="ember");var o=s+r++;return i&&(u.value=o,e(i,n,u)),o},Ember.guidFor=function(o){if(o===undefined)return"(undefined)";if(o===null)return"(null)";var a,f,l=typeof o;switch(l){case"number":return f=i[o],f||(f=i[o]="nu"+o),f;case"string":return f=s[o],f||(f=s[o]="st"+r++),f;case"boolean":return o?"(true)":"(false)";default:if(o[n])return o[n];if(o===Object)return"(Object)";if(o===Array)return"(Array)";return f="ember"+r++,u.value=f,e(o,n,u),f}};var a={writable:!0,configurable:!1,enumerable:!1,value:null},f=Ember.GUID_KEY+"_meta";Ember.META_KEY=f;var l={descs:{},watching:{}};o&&(l.values={}),Ember.EMPTY_META=l,Object.freeze&&Object.freeze(l);var c=Ember.platform.defineProperty.isSimulated;c&&(h.prototype.__preventPlainObject__=!0,h.prototype.toJSON=function(){}),Ember.meta=function(r,i){var s=r[f];return i===!1?s||l:(s?s.source!==r&&(c||e(r,f,a),s=t(s),s.descs=t(s.descs),s.watching=t(s.watching),s.cache={},s.source=r,o&&(s.values=t(s.values)),r[f]=s):(c||e(r,f,a),s=new h(r),o&&(s.values={}),r[f]=s,s.descs.constructor=null),s)},Ember.getMeta=function(t,n){var r=Ember.meta(t,!1);return r[n]},Ember.setMeta=function(t,n,r){var i=Ember.meta(t,!0);return i[n]=r,r},Ember.metaPath=function(n,r,i){var s=Ember.meta(n,i),o,u;for(var a=0,f=r.length;a<f;a++){o=r[a],u=s[o];if(!u){if(!i)return undefined;u=s[o]={__ember_source__:n}}else if(u.__ember_source__!==n){if(!i)return undefined;u=s[o]=t(u),u.__ember_source__=n}s=u}return u},Ember.wrap=function(e,t){function n(){}function r(){var r,i=this._super;return this._super=t||n,r=e.apply(this,arguments),this._super=i,r}return r.wrappedFunction=e,r.__ember_observes__=e.__ember_observes__,r.__ember_observesBefore__=e.__ember_observesBefore__,r},Ember.isArray=function(e){return!e||e.setInterval?!1:Array.isArray&&Array.isArray(e)?!0:Ember.Array&&Ember.Array.detect(e)?!0:e.length!==undefined&&"object"==typeof e?!0:!1},Ember.makeArray=function(e){return e===null||e===undefined?[]:Ember.isArray(e)?e:[e]},Ember.canInvoke=p,Ember.tryInvoke=function(e,t,n){if(p(e,t))return e[t].apply(e,n||[])};var d=function(){var e=0;try{try{}finally{throw e++,new Error("needsFinallyFixTest")}}catch(t){}return e!==1}();d?Ember.tryFinally=function(e,t,n){var r,i,s;n=n||this;try{r=e.call(n)}finally{try{i=t.call(n)}catch(o){s=o}}if(s)throw s;return i===undefined?r:i}:Ember.tryFinally=function(e,t,n){var r,i;n=n||this;try{r=e.call(n)}finally{i=t.call(n)}return i===undefined?r:i},d?Ember.tryCatchFinally=function(e,t,n,r){var i,s,o,u;r=r||this;try{i=e.call(r)}catch(a){i=t.call(r,a)}finally{try{s=n.call(r)}catch(f){o=f}}if(o)throw o;return s===undefined?i:s}:Ember.tryCatchFinally=function(e,t,n,r){var i,s;r=r||this;try{i=e.call(r)}catch(o){i=t.call(r,o)}finally{s=n.call(r)}return s===undefined?i:s}}(),function(){Ember.Instrumentation={};var e=[],t={},n=function(n){var r=[],i;for(var s=0,o=e.length;s<o;s++)i=e[s],i.regex.test(n)&&r.push(i.object);return t[n]=r,r},r=function(){var e="undefined"!=typeof window?window.performance||{}:{},t=e.now||e.mozNow||e.webkitNow||e.msNow||e.oNow;return t?t.bind(e):function(){return+(new Date)}}();Ember.Instrumentation.instrument=function(e,i,s,o){function d(){for(h=0,p=u.length;h<p;h++)c=u[h],l[h]=c.before(e,r(),i);return s.call(o)}function v(e){i=i||{},i.exception=e}function m(){for(h=0,p=u.length;h<p;h++)c=u[h],c.after(e,r(),i,l[h]);Ember.STRUCTURED_PROFILE&&console.timeEnd(a)}var u=t[e],a,f;Ember.STRUCTURED_PROFILE&&(a=e+": "+i.object,console.time(a)),u||(u=n(e));if(u.length===0)return f=s.call(o),Ember.STRUCTURED_PROFILE&&console.timeEnd(a),f;var l=[],c,h,p;return Ember.tryCatchFinally(d,v,m)},Ember.Instrumentation.subscribe=function(n,r){var i=n.split("."),s,o=[];for(var u=0,a=i.length;u<a;u++)s=i[u],s==="*"?o.push("[^\\.]*"):o.push(s);o=o.join("\\."),o+="(\\..*)?";var f={pattern:n,regex:new RegExp("^"+o+"$"),object:r};return e.push(f),t={},f},Ember.Instrumentation.unsubscribe=function(n){var r;for(var i=0,s=e.length;i<s;i++)e[i]===n&&(r=i);e.splice(r,1),t={}},Ember.Instrumentation.reset=function(){e=[],t={}},Ember.instrument=Ember.Instrumentation.instrument,Ember.subscribe=Ember.Instrumentation.subscribe}(),function(){var e=Ember.EnumerableUtils={map:function(e,t,n){return e.map?e.map.call(e,t,n):Array.prototype.map.call(e,t,n)},forEach:function(e,t,n){return e.forEach?e.forEach.call(e,t,n):Array.prototype.forEach.call(e,t,n)},indexOf:function(e,t,n){return e.indexOf?e.indexOf.call(e,t,n):Array.prototype.indexOf.call(e,t,n)},indexesOf:function(t,n){return n===undefined?[]:e.map(n,function(n){return e.indexOf(t,n)})},addObject:function(t,n){var r=e.indexOf(t,n);r===-1&&t.push(n)},removeObject:function(t,n){var r=e.indexOf(t,n);r!==-1&&t.splice(r,1)},replace:function(e,t,n,r){if(e.replace)return e.replace(t,n,r);var i=Array.prototype.concat.apply([t,n],r);return e.splice.apply(e,i)},intersection:function(e,t){var n=[];return e.forEach(function(e){t.indexOf(e)>=0&&n.push(e)}),n}}}(),function(){var e=function(e){return e&&Function.prototype.toString.call(e).indexOf("[native code]")>-1},t=e(Array.prototype.map)?Array.prototype.map:function(e){if(this===void 0||this===null)throw new TypeError;var t=Object(this),n=t.length>>>0;if(typeof e!="function")throw new TypeError;var r=new Array(n),i=arguments[1];for(var s=0;s<n;s++)s in t&&(r[s]=e.call(i,t[s],s,t));return r},n=e(Array.prototype.forEach)?Array.prototype.forEach:function(e){if(this===void 0||this===null)throw new TypeError;var t=Object(this),n=t.length>>>0;if(typeof e!="function")throw new TypeError;var r=arguments[1];for(var i=0;i<n;i++)i in t&&e.call(r,t[i],i,t)},r=e(Array.prototype.indexOf)?Array.prototype.indexOf:function(e,t){t===null||t===undefined?t=0:t<0&&(t=Math.max(0,this.length+t));for(var n=t,r=this.length;n<r;n++)if(this[n]===e)return n;return-1};Ember.ArrayPolyfills={map:t,forEach:n,indexOf:r},Ember.SHIM_ES5&&(Array.prototype.map||(Array.prototype.map=t),Array.prototype.forEach||(Array.prototype.forEach=n),Array.prototype.indexOf||(Array.prototype.indexOf=r))}(),function(){var e=Ember.guidFor,t=Ember.ArrayPolyfills.indexOf,n=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},r=function(e,t){var r=e.keys.copy(),i=n(e.values);return t.keys=r,t.values=i,t},i=Ember.OrderedSet=function(){this.clear()};i.create=function(){return new i},i.prototype={clear:function(){this.presenceSet={},this.list=[]},add:function(t){var n=e(t),r=this.presenceSet,i=this.list;if(n in r)return;r[n]=!0,i.push(t)},remove:function(n){var r=e(n),i=this.presenceSet,s=this.list;delete i[r];var o=t.call(s,n);o>-1&&s.splice(o,1)},isEmpty:function(){return this.list.length===0},has:function(t){var n=e(t),r=this.presenceSet;return n in r},forEach:function(e,t){var n=this.list.slice();for(var r=0,i=n.length;r<i;r++)e.call(t,n[r])},toArray:function(){return this.list.slice()},copy:function(){var e=new i;return e.presenceSet=n(this.presenceSet),e.list=this.list.slice(),e}};var s=Ember.Map=function(){this.keys=Ember.OrderedSet.create(),this.values={}};s.create=function(){return new s},s.prototype={get:function(t){var n=this.values,r=e(t);return n[r]},set:function(t,n){var r=this.keys,i=this.values,s=e(t);r.add(t),i[s]=n},remove:function(t){var n=this.keys,r=this.values,i=e(t),s;return r.hasOwnProperty(i)?(n.remove(t),s=r[i],delete r[i],!0):!1},has:function(t){var n=this.values,r=e(t);return n.hasOwnProperty(r)},forEach:function(t,n){var r=this.keys,i=this.values;r.forEach(function(r){var s=e(r);t.call(n,r,i[s])})},copy:function(){return r(this,new s)}};var o=Ember.MapWithDefault=function(e){s.call(this),this.defaultValue=e.defaultValue};o.create=function(e){return e?new o(e):new s},o.prototype=Ember.create(s.prototype),o.prototype.get=function(e){var t=this.has(e);if(t)return s.prototype.get.call(this,e);var n=this.defaultValue(e);return this.set(e,n),n},o.prototype.copy=function(){return r(this,new o({defaultValue:this.defaultValue}))}}(),function(){function a(e){return e.match(u)[0]}function f(e,n){var r=o.test(n),i=!r&&s.test(n),u;if(!e||i)e=Ember.lookup;r&&(n=n.slice(5)),e===Ember.lookup&&(u=a(n),e=t(e,u),n=n.slice(u.length+1));if(!n||n.length===0)throw new Error("Invalid Path");return[e,n]}function l(e,n){var r,i,s,u,a;if(e===null&&n.indexOf(".")===-1)return t(Ember.lookup,n);r=o.test(n);if(!e||r)s=f(e,n),e=s[0],n=s[1],s.length=0;i=n.split("."),a=i.length;for(u=0;e&&u<a;u++){e=t(e,i[u],!0);if(e&&e.isDestroyed)return undefined}return e}function c(e,t,r,i){var s;s=t.slice(t.lastIndexOf(".")+1),t=t.slice(0,t.length-(s.length+1)),t!=="this"&&(e=l(e,t));if(!s||s.length===0)throw new Error("You passed an empty path");if(!e){if(i)return;throw new Error("Object in path "+t+" could not be found or was destroyed.")}return n(e,s,r)}var e=Ember.META_KEY,t,n,r=Ember.ENV.MANDATORY_SETTER,i=/^([A-Z$]|([0-9][A-Z$]))/,s=/^([A-Z$]|([0-9][A-Z$])).*[\.\*]/,o=/^this[\.\*]/,u=/^([^\.\*]+)/;t=function(n,i){if(i==="")return n;!i&&"string"==typeof n&&(i=n,n=null);if(!n||i.indexOf(".")!==-1)return l(n,i);var s=n[e],o=s&&s.descs[i],u;return o?o.get(n,i):(r&&s&&s.watching[i]>0?u=s.values[i]:u=n[i],u!==undefined||"object"!=typeof n||i in n||"function"!=typeof n.unknownProperty?u:n.unknownProperty(i))},n=function(n,i,s,o){typeof n=="string"&&(s=i,i=n,n=null);if(!n||i.indexOf(".")!==-1)return c(n,i,s,o);var u=n[e],a=u&&u.descs[i],f,l;return a?a.set(n,i,s):(f="object"==typeof n&&!(i in n),f&&"function"==typeof n.setUnknownProperty?n.setUnknownProperty(i,s):u&&u.watching[i]>0?(r?l=u.values[i]:l=n[i],s!==l&&(Ember.propertyWillChange(n,i),r?l!==undefined||i in n?u.values[i]=s:Ember.defineProperty(n,i,null,s):n[i]=s,Ember.propertyDidChange(n,i))):n[i]=s),s},Ember.config.overrideAccessors&&(Ember.get=t,Ember.set=n,Ember.config.overrideAccessors(),t=Ember.get,n=Ember.set),Ember.normalizeTuple=function(e,t){return f(e,t)},Ember.getWithDefault=function(e,n,r){var i=t(e,n);return i===undefined?r:i},Ember.get=t,Ember.getPath=Ember.deprecateFunc("getPath is deprecated since get now supports paths",Ember.get),Ember.set=n,Ember.setPath=Ember.deprecateFunc("setPath is deprecated since set now supports paths",Ember.set),Ember.trySet=function(e,t,r){return n(e,t,r,!0)},Ember.trySetPath=Ember.deprecateFunc("trySetPath has been renamed to trySet",Ember.trySet),Ember.isGlobalPath=function(e){return i.test(e)}}(),function(){var e=Ember.GUID_KEY,t=Ember.META_KEY,n=Ember.EMPTY_META,r=Ember.meta,i=Ember.create,s=Ember.platform.defineProperty,o=Ember.ENV.MANDATORY_SETTER,u=Ember.Descriptor=function(){},a=Ember.MANDATORY_SETTER_FUNCTION=function(e){},f=Ember.DEFAULT_GETTER_FUNCTION=function(e){return function(){var n=this[t];return n&&n.values[e]}};Ember.defineProperty=function(e,t,n,i,u){var l,c,h,p;return u||(u=r(e)),l=u.descs,c=u.descs[t],h=u.watching[t]>0,c instanceof Ember.Descriptor&&c.teardown(e,t),n instanceof Ember.Descriptor?(p=n,l[t]=n,o&&h?s(e,t,{configurable:!0,enumerable:!0,writable:!0,value:undefined}):e[t]=undefined,n.setup(e,t)):(l[t]=undefined,n==null?(p=i,o&&h?(u.values[t]=i,s(e,t,{configurable:!0,enumerable:!0,set:a,get:f(t)})):e[t]=i):(p=n,s(e,t,n))),h&&Ember.overrideChains(e,t,u),e.didDefineProperty&&e.didDefineProperty(e,t,p),this}}(),function(){function i(){this.clear()}function u(t){return t+e}function a(e){return e+t}var e=":change",t=":before",n=Ember.guidFor,r=0;i.prototype.add=function(e,t,n){var r=this.observerSet,i=this.observers,s=Ember.guidFor(e),o=r[s],u;return o||(r[s]=o={}),u=o[t],u===undefined&&(u=i.push({sender:e,keyName:t,eventName:n,listeners:[]})-1,o[t]=u),i[u].listeners},i.prototype.flush=function(){var e=this.observers,t,n,r,i;this.clear();for(t=0,n=e.length;t<n;++t){r=e[t],i=r.sender;if(i.isDestroying||i.isDestroyed)continue;Ember.sendEvent(i,r.eventName,[i,r.keyName],r.listeners)}},i.prototype.clear=function(){this.observerSet={},this.observers=[]};var s=new i,o=new i;Ember.beginPropertyChanges=function(){r++},Ember.endPropertyChanges=function(){r--,r<=0&&(s.clear(),o.flush())},Ember.changeProperties=function(e,t){Ember.beginPropertyChanges(),Ember.tryFinally(e,Ember.endPropertyChanges,t)},Ember.setProperties=function(e,t){return Ember.changeProperties(function(){for(var n in t)t.hasOwnProperty(n)&&Ember.set(e,n,t[n])}),e},Ember.addObserver=function(e,t,n,r){return Ember.addListener(e,u(t),n,r),Ember.watch(e,t),this},Ember.observersFor=function(e,t){return Ember.listenersFor(e,u(t))},Ember.removeObserver=function(e,t,n,r){return Ember.unwatch(e,t),Ember.removeListener(e,u(t),n,r),this},Ember.addBeforeObserver=function(e,t,n,r){return Ember.addListener(e,a(t),n,r),Ember.watch(e,t),this},Ember._suspendBeforeObserver=function(e,t,n,r,i){return Ember._suspendListener(e,a(t),n,r,i)},Ember._suspendObserver=function(e,t,n,r,i){return Ember._suspendListener(e,u(t),n,r,i)};var f=Ember.ArrayPolyfills.map;Ember._suspendBeforeObservers=function(e,t,n,r,i){var s=f.call(t,a);return Ember._suspendListeners(e,s,n,r,i)},Ember._suspendObservers=function(e,t,n,r,i){var s=f.call(t,u);return Ember._suspendListeners(e,s,n,r,i)},Ember.beforeObserversFor=function(e,t){return Ember.listenersFor(e,a(t))},Ember.removeBeforeObserver=function(e,t,n,r){return Ember.unwatch(e,t),Ember.removeListener(e,a(t),n,r),this},Ember.notifyBeforeObservers=function(e,t){if(e.isDestroying)return;var n=a(t),i,o;r?(i=s.add(e,t,n),o=Ember.listenersDiff(e,n,i),Ember.sendEvent(e,n,[e,t],o)):Ember.sendEvent(e,n,[e,t])},Ember.notifyObservers=function(e,t){if(e.isDestroying)return;var n=u(t),i;r?(i=o.add(e,t,n),Ember.listenersUnion(e,n,i)):Ember.sendEvent(e,n,[e,t])}}(),function(){function p(e){return e.match(f)[0]}function d(e){return e==="*"||!l.test(e)}function v(t,n,r,i,s){var o=e(n);i[o]||(i[o]={});if(i[o][r])return;i[o][r]=!0;var u=s.deps;u=u&&u[r];if(u)for(var a in u){var f=s.descs[a];if(f&&f._suspended===n)continue;t(n,a)}}function y(e,t,n){if(e.isDestroying)return;var r=m,i=!r;i&&(r=m={}),v(O,e,t,r,n),i&&(m=null)}function b(e,t,n){if(e.isDestroying)return;var r=g,i=!r;i&&(r=g={}),v(M,e,t,r,n),i&&(g=null)}function w(e,n,r){if(!e||"object"!=typeof e)return;var i=t(e),s=i.chainWatchers;i.hasOwnProperty("chainWatchers")||(s=i.chainWatchers={}),s[n]||(s[n]=[]),s[n].push(r),Ember.watch(e,n)}function E(e,n,r){if(!e||"object"!=typeof e)return;var i=t(e,!1);if(!i.hasOwnProperty("chainWatchers"))return;var s=i.chainWatchers;if(s[n]){s=s[n];for(var o=0,u=s.length;o<u;o++)s[o]===r&&s.splice(o,1)}Ember.unwatch(e,n)}function x(){if(S.length===0)return;var e=S;S=[],a.call(e,function(e){e[0].add(e[1])})}function T(e){return t(e,!1).proto===e}function k(e){var n=t(e),r=n.chains;return r?r.value()!==e&&(r=n.chains=r.copy(e)):r=n.chains=new N(null,null,e),r}function L(e,t,n,r){if(!n.hasOwnProperty("chainWatchers"))return;var i=n.chainWatchers;i=i[t];if(!i)return;for(var s=0,o=i.length;s<o;s++)i[s].willChange(r)}function A(e,t,n,r){if(!n.hasOwnProperty("chainWatchers"))return;var i=n.chainWatchers;i=i[t];if(!i)return;for(var s=i.length-1;s>=0;s--)i[s].didChange(r)}function O(e,n,r){var i=t(e,!1),s=i.watching[n]>0||n==="length",o=i.proto,u=i.descs[n];if(!s)return;if(o===e)return;u&&u.willChange&&u.willChange(e,n),y(e,n,i),L(e,n,i),Ember.notifyBeforeObservers(e,n)}function M(e,n){var r=t(e,!1),i=r.watching[n]>0||n==="length",s=r.proto,o=r.descs[n];if(s===e)return;o&&o.didChange&&o.didChange(e,n);if(!i&&n!=="length")return;b(e,n,r),A(e,n,r),Ember.notifyObservers(e,n)}var e=Ember.guidFor,t=Ember.meta,n=Ember.get,r=Ember.set,i=Ember.normalizeTuple,s=Ember.GUID_KEY,o=Ember.META_KEY,u=Ember.notifyObservers,a=Ember.ArrayPolyfills.forEach,f=/^([^\.\*]+)/,l=/[\.\*]/,c=Ember.ENV.MANDATORY_SETTER,h=Ember.platform.defineProperty,m,g,S=[],N=function(e,t,n){var r;this._parent=e,this._key=t,this._watching=n===undefined,this._value=n,this._paths={},this._watching&&(this._object=e.value(),this._object&&w(this._object,this._key,this)),this._parent&&this._parent._key==="@each"&&this.value()},C=N.prototype;C.value=function(){if(this._value===undefined&&this._watching){var e=this._parent.value();this._value=e&&!T(e)?n(e,this._key):undefined}return this._value},C.destroy=function(){if(this._watching){var e=this._object;e&&E(e,this._key,this),this._watching=!1}},C.copy=function(e){var t=new N(null,null,e),n=this._paths,r;for(r in n){if(n[r]<=0)continue;t.add(r)}return t},C.add=function(e){var t,n,r,s,o;o=this._paths,o[e]=(o[e]||0)+1,t=this.value(),n=i(t,e);if(n[0]&&n[0]===t)e=n[1],r=p(e),e=e.slice(r.length+1);else{if(!n[0]){S.push([this,e]),n.length=0;return}s=n[0],r=e.slice(0,0-(n[1].length+1)),e=n[1]}n.length=0,this.chain(r,e,s)},C.remove=function(e){var t,n,r,s,o;o=this._paths,o[e]>0&&o[e]--,t=this.value(),n=i(t,e),n[0]===t?(e=n[1],r=p(e),e=e.slice(r.length+1)):(s=n[0],r=e.slice(0,0-(n[1].length+1)),e=n[1]),n.length=0,this.unchain(r,e)},C.count=0,C.chain=function(e,t,n){var r=this._chains,i;r||(r=this._chains={}),i=r[e],i||(i=r[e]=new N(this,e,n)),i.count++,t&&t.length>0&&(e=p(t),t=t.slice(e.length+1),i.chain(e,t))},C.unchain=function(e,t){var n=this._chains,r=n[e];t&&t.length>1&&(e=p(t),t=t.slice(e.length+1),r.unchain(e,t)),r.count--,r.count<=0&&(delete n[r._key],r.destroy())},C.willChange=function(){var e=this._chains;if(e)for(var t in e){if(!e.hasOwnProperty(t))continue;e[t].willChange()}this._parent&&this._parent.chainWillChange(this,this._key,1)},C.chainWillChange=function(e,t,n){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainWillChange(this,t,n+1):(n>1&&Ember.propertyWillChange(this.value(),t),t="this."+t,this._paths[t]>0&&Ember.propertyWillChange(this.value(),t))},C.chainDidChange=function(e,t,n){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainDidChange(this,t,n+1):(n>1&&Ember.propertyDidChange(this.value(),t),t="this."+t,this._paths[t]>0&&Ember.propertyDidChange(this.value(),t))},C.didChange=function(e){if(this._watching){var t=this._parent.value();t!==this._object&&(E(this._object,this._key,this),this._object=t,w(t,this._key,this)),this._value=undefined,this._parent&&this._parent._key==="@each"&&this.value()}var n=this._chains;if(n)for(var r in n){if(!n.hasOwnProperty(r))continue;n[r].didChange(e)}if(e)return;this._parent&&this._parent.chainDidChange(this,this._key,1)},Ember.overrideChains=function(e,t,n){A(e,t,n,!0)},Ember.watch=function(e,n){if(n==="length"&&Ember.typeOf(e)==="array")return this;var r=t(e),i=r.watching,s;return i[n]?i[n]=(i[n]||0)+1:(i[n]=1,d(n)?(s=r.descs[n],s&&s.willWatch&&s.willWatch(e,n),"function"==typeof e.willWatchProperty&&e.willWatchProperty(n),c&&n in e&&(r.values[n]=e[n],h(e,n,{configurable:!0,enumerable:!0,set:Ember.MANDATORY_SETTER_FUNCTION,get:Ember.DEFAULT_GETTER_FUNCTION(n)}))):k(e).add(n)),this},Ember.isWatching=function(t,n){var r=t[o];return(r&&r.watching[n])>0},Ember.watch.flushPending=x,Ember.unwatch=function(e,n){if(n==="length"&&Ember.typeOf(e)==="array")return this;var r=t(e),i=r.watching,s;return i[n]===1?(i[n]=0,d(n)?(s=r.descs[n],s&&s.didUnwatch&&s.didUnwatch(e,n),"function"==typeof e.didUnwatchProperty&&e.didUnwatchProperty(n),c&&n in e&&(h(e,n,{configurable:!0,enumerable:!0,writable:!0,value:r.values[n]}),delete r.values[n])):k(e).remove(n)):i[n]>1&&i[n]--,this},Ember.rewatch=function(e){var n=t(e,!1),r=n.chains;return s in e&&!e.hasOwnProperty(s)&&Ember.generateGuid(e,"ember"),r&&r.value()!==e&&(n.chains=r.copy(e)),this},Ember.finishChains=function(e){var n=t(e,!1),r=n.chains;r&&(r.value()!==e&&(n.chains=r=r.copy(e)),r.didChange(!0))},Ember.propertyWillChange=O,Ember.propertyDidChange=M;var _=[];Ember.destroy=function(e){var t=e[o],n,r,i,s;if(t){e[o]=null,n=t.chains;if(n){_.push(n);while(_.length>0){n=_.pop(),r=n._chains;if(r)for(i in r)r.hasOwnProperty(i)&&_.push(r[i]);n._watching&&(s=n._object,s&&E(s,n._key,n))}}}}}(),function(){function f(e,t,n){var r=t[n];return r?t.hasOwnProperty(n)||(r=t[n]=s(r)):r=t[n]={},r}function l(e,t){var n=t.deps;return n?t.hasOwnProperty("deps")||(n=t.deps=s(n)):n=t.deps={},n}function c(e,t,n,r){var i=e._dependentKeys,s,o,a,c,h;if(!i)return;s=l(t,r);for(o=0,a=i.length;o<a;o++)c=i[o],h=f(t,s,c),h[n]=(h[n]||0)+1,u(t,c)}function h(e,t,n,r){var i=e._dependentKeys,s,o,u,c,h;if(!i)return;s=l(t,r);for(o=0,u=i.length;o<u;o++)c=i[o],h=f(t,s,c),h[n]=(h[n]||0)-1,a(t,c)}function p(e,t){this.func=e,this._cacheable=t&&t.cacheable!==undefined?t.cacheable:!0,this._dependentKeys=t&&t.dependentKeys}var e=Ember.get,t=Ember.set,n=Ember.meta,r=Ember.guidFor,i=[].slice,s=Ember.create,o=Ember.META_KEY,u=Ember.watch,a=Ember.unwatch;Ember.ComputedProperty=p,p.prototype=new Ember.Descriptor;var d=p.prototype;d.cacheable=function(e){return this._cacheable=e!==!1,this},d.volatile=function(){return this.cacheable(!1)},d.property=function(){var e=[];for(var t=0,n=arguments.length;t<n;t++)e.push(arguments[t]);return this._dependentKeys=e,this},d.meta=function(e){return arguments.length===0?this._meta||{}:(this._meta=e,this)},d.willWatch=function(e,t){var n=e[o];t in n.cache||c(this,e,t,n)},d.didUnwatch=function(e,t){var n=e[o];t in n.cache||h(this,e,t,n)},d.didChange=function(e,t){if(this._cacheable&&this._suspended!==e){var r=n(e);t in r.cache&&(delete r.cache[t],r.watching[t]||h(this,e,t,r))}},d.get=function(e,t){var r,i,s;if(this._cacheable){s=n(e),i=s.cache;if(t in i)return i[t];r=i[t]=this.func.call(e,t),s.watching[t]||c(this,e,t,s)}else r=this.func.call(e,t);return r},d.set=function(e,t,r){var i=this._cacheable,s=this.func,o=n(e,i),u=o.watching[t],a=this._suspended,f=!1,l=o.cache,h,p;this._suspended=e;try{i&&l.hasOwnProperty(t)&&(h=l[t],f=!0),s.wrappedFunction&&(s=s.wrappedFunction);if(s.length===3)p=s.call(e,t,r,h);else{if(s.length!==2){Ember.defineProperty(e,t,null,h),Ember.set(e,t,r);return}p=s.call(e,t,r)}if(f&&h===p)return;u&&Ember.propertyWillChange(e,t),f&&delete l[t],i&&(!u&&!f&&c(this,e,t,o),l[t]=p),u&&Ember.propertyDidChange(e,t)}finally{this._suspended=a}return p},d.setup=function(e,t){var r=e[o];r&&r.watching[t]&&c(this,e,t,n(e))},d.teardown=function(e,t){var r=n(e);return(r.watching[t]||t in r.cache)&&h(this,e,t,r),this._cacheable&&delete r.cache[t],null},Ember.computed=function(e){var t;arguments.length>1&&(t=i.call(arguments,0,-1),e=i.call(arguments,-1)[0]);var n=new p(e);return t&&n.property.apply(n,t),n},Ember.cacheFor=function(t,r){var i=n(t,!1).cache;if(i&&r in i)return i[r]},Ember.computed.not=function(t){return Ember.computed(t,function(n){return!e(this,t)})},Ember.computed.empty=function(t){return Ember.computed(t,function(n){var r=e(this,t);return r===undefined||r===null||r===""||Ember.isArray(r)&&e(r,"length")===0})},Ember.computed.bool=function(t){return Ember.computed(t,function(n){return!!e(this,t)})},Ember.computed.alias=function(n){return Ember.computed(n,function(r,i){return arguments.length===1?e(this,n):(t(this,n,i),i)})}}(),function(){function i(e,t,n){var r=-1;for(var i=0,s=e.length;i<s;i++)if(t===e[i][0]&&n===e[i][1]){r=i;break}return r}function s(n,r){var i=t(n,!0),s;return i.listeners||(i.listeners={}),i.hasOwnProperty("listeners")||(i.listeners=e(i.listeners)),s=i.listeners[r],s&&!i.listeners.hasOwnProperty(r)?s=i.listeners[r]=i.listeners[r].slice():s||(s=i.listeners[r]=[]),s}function o(e,t,n){var s=e[r],o=s&&s.listeners&&s.listeners[t];if(!o)return;for(var u=o.length-1;u>=0;u--){var a=o[u][0],f=o[u][1],l=o[u][2],c=o[u][3],h=i(n,a,f);h===-1&&n.push([a,f,l,c])}}function u(e,t,n){var s=e[r],o=s&&s.listeners&&s.listeners[t],u=[];if(!o)return;for(var a=o.length-1;a>=0;a--){var f=o[a][0],l=o[a][1],c=o[a][2],h=o[a][3],p=i(n,f,l);if(p!==-1)continue;n.push([f,l,c,h]),u.push([f,l,c,h])}return u}function a(e,t,n,r,o){!r&&"function"==typeof n&&(r=n,n=null);var u=s(e,t),a=i(u,n,r);if(a!==-1)return;u.push([n,r,o,undefined]),"function"==typeof e.didAddListener&&e.didAddListener(t,n,r)}function f(e,t,n,o){function u(n,r,o){var u=s(e,t),a=i(u,n,r);if(a===-1)return;u.splice(a,1),"function"==typeof e.didRemoveListener&&e.didRemoveListener(t,n,r)}!o&&"function"==typeof n&&(o=n,n=null);if(o)u(n,o);else{var a=e[r],f=a&&a.listeners&&a.listeners[t];if(!f)return;for(var l=f.length-1;l>=0;l--)u(f[l][0],f[l][1])}}function l(e,t,n,r,o){function l(){return o.call(n)}function c(){f&&(f[3]=undefined)}!r&&"function"==typeof n&&(r=n,n=null);var u=s(e,t),a=i(u,n,r),f;return a!==-1&&(f=u[a].slice(),f[3]=!0,u[a]=f),Ember.tryFinally(l,c)}function c(e,t,n,r,o){function d(){return o.call(n)}function v(){for(c=0,h=u.length;c<h;c++)u[c][3]=undefined}!r&&"function"==typeof n&&(r=n,n=null);var u=[],a,f,l,c,h;for(c=0,h=t.length;c<h;c++){a=t[c],f=s(e,a);var p=i(f,n,r);p!==-1&&(l=f[p].slice(),l[3]=!0,f[p]=l,u.push(l))}return Ember.tryFinally(d,v)}function h(e){var t=e[r].listeners,n=[];if(t)for(var i in t)t[i]&&n.push(i);return n}function p(e,t,n,i){e!==Ember&&"function"==typeof e.sendEvent&&e.sendEvent(t,n);if(!i){var s=e[r];i=s&&s.listeners&&s.listeners[t]}if(!i)return;for(var o=i.length-1;o>=0;o--){if(!i[o]||i[o][3]===!0)continue;var u=i[o][0],a=i[o][1],l=i[o][2];l&&f(e,t,u,a),u||(u=e),"string"==typeof a&&(a=u[a]),n?a.apply(u,n):a.apply(u)}return!0}function d(e,t){var n=e[r],i=n&&n.listeners&&n.listeners[t];return!!i&&!!i.length}function v(e,t){var n=[],i=e[r],s=i&&i.listeners&&i.listeners[t];if(!s)return n;for(var o=0,u=s.length;o<u;o++){var a=s[o][0],f=s[o][1];n.push([a,f])}return n}var e=Ember.create,t=Ember.meta,n=Ember.metaPath,r=Ember.META_KEY;Ember.addListener=a,Ember.removeListener=f,Ember._suspendListener=l,Ember._suspendListeners=c,Ember.sendEvent=p,Ember.hasListeners=d,Ember.watchedEvents=h,Ember.listenersFor=v,Ember.listenersDiff=u,Ember.listenersUnion=o}(),function(){function n(t,n,r,i){return n===undefined&&(n=t,t=undefined),"string"==typeof n&&(n=t[n]),r&&i>0&&(r=r.length>i?e.call(r,i):null),Ember.handleErrors(function(){return n.apply(t||this,r||[])},this)}function u(){o=null,s.currentRunLoop&&s.end()}function l(){f=null;var e=+(new Date),t=-1;for(var r in a){if(!a.hasOwnProperty(r))continue;var i=a[r];if(i&&i.expires)if(e>=i.expires)delete a[r],n(i.target,i.method,i.args,2);else if(t<0||i.expires<t)t=i.expires}t>0&&(f=setTimeout(l,t- +(new Date)))}function c(e,t){t[this.tguid]&&delete t[this.tguid][this.mguid],a[e]&&n(this.target,this.method,this.args),delete a[e]}function h(e,t,n,r){var i=Ember.guidFor(t),o=Ember.guidFor(n),u=s.autorun().onceTimers,f=u[i]&&u[i][o],l;return f&&a[f]?a[f].args=r:(l={target:t,method:n,args:r,tguid:i,mguid:o},f=Ember.guidFor(l),a[f]=l,u[i]||(u[i]={}),u[i][o]=f,s.schedule(e,l,c,f,u)),f}function d(){p=null;for(var e in a){if(!a.hasOwnProperty(e))continue;var t=a[e];t.next&&(delete a[e],n(t.target,t.method,t.args,2))}}var e=[].slice,t=Ember.ArrayPolyfills.forEach,r,i=function(e){this._prev=e||null,this.onceTimers={}};i.prototype={end:function(){this.flush()},prev:function(){return this._prev},schedule:function(t,n,r){var i=this._queues,s;i||(i=this._queues={}),s=i[t],s||(s=i[t]=[]);var o=arguments.length>3?e.call(arguments,3):null;return s.push({target:n,method:r,args:o}),this},flush:function(e){function f(e){n(e.target,e.method,e.args)}function l(){t.call(u,f)}var i,s,o,u,a;if(!this._queues)return this;Ember.watch.flushPending();if(e)while(this._queues&&(u=this._queues[e]))this._queues[e]=null,e==="sync"?(a=Ember.LOG_BINDINGS,a&&Ember.Logger.log("Begin: Flush Sync Queue"),Ember.beginPropertyChanges(),Ember.tryFinally(l,Ember.endPropertyChanges),a&&Ember.Logger.log("End: Flush Sync Queue")):t.call(u,f);else{i=Ember.run.queues,o=i.length,s=0;e:while(s<o){e=i[s],u=this._queues&&this._queues[e],delete this._queues[e],u&&(e==="sync"?(a=Ember.LOG_BINDINGS,a&&Ember.Logger.log("Begin: Flush Sync Queue"),Ember.beginPropertyChanges(),Ember.tryFinally(l,Ember.endPropertyChanges),a&&Ember.Logger.log("End: Flush Sync Queue")):t.call(u,f));for(var c=0;c<=s;c++)if(this._queues&&this._queues[i[c]]){s=c;continue e}s++}}return r=null,this}},Ember.RunLoop=i,Ember.run=function(e,t){function o(){if(e||t)return n(e,t,i,2)}var r,i=arguments;return s.begin(),Ember.tryFinally(o,s.end)};var s=Ember.run;Ember.run.begin=function(){s.currentRunLoop=new i(s.currentRunLoop)},Ember.run.end=function(){function e(){s.currentRunLoop.end()}function t(){s.currentRunLoop=s.currentRunLoop.prev()}Ember.tryFinally(e,t)},Ember.run.queues=["sync","actions","destroy","timers"],Ember.run.schedule=function(e,t,n){var r=s.autorun();r.schedule.apply(r,arguments)};var o;Ember.run.hasScheduledTimers=function(){return!!(o||f||p)},Ember.run.cancelTimers=function(){o&&(clearTimeout(o),o=null),f&&(clearTimeout(f),f=null),p&&(clearTimeout(p),p=null),a={}},Ember.run.autorun=function(){return s.currentRunLoop||(s.begin(),o||(o=setTimeout(u,1))),s.currentRunLoop},Ember.run.sync=function(){s.autorun(),s.currentRunLoop.flush("sync")};var a={},f;Ember.run.later=function(t,n){var r,i,o,u,f;return arguments.length===2&&"function"==typeof t?(f=n,n=t,t=undefined,r=[t,n]):(r=e.call(arguments),f=r.pop()),i=+(new Date)+f,o={target:t,method:n,expires:i,args:r},u=Ember.guidFor(o),a[u]=o,s.once(a,l),u},Ember.run.once=function(t,n){return h("actions",t,n,e.call(arguments,2))},Ember.run.scheduleOnce=function(t,n,r,i){return h(t,n,r,e.call(arguments,3))};var p;Ember.run.next=function(t,n){var r,i={target:t,method:n,args:e.call(arguments),next:!0};return r=Ember.guidFor(i),a[r]=i,p||(p=setTimeout(d,1)),r},Ember.run.cancel=function(e){delete a[e]}}(),function(){function i(t,n){return e(r(n)?Ember.lookup:t,n)}function o(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}Ember.LOG_BINDINGS=!!Ember.ENV.LOG_BINDINGS;var e=Ember.get,t=Ember.set,n=Ember.guidFor,r=Ember.isGlobalPath,s=function(e,t){this._direction="fwd",this._from=t,this._to=
16
- e,this._directionMap=Ember.Map.create()};s.prototype={copy:function(){var e=new s(this._to,this._from);return this._oneWay&&(e._oneWay=!0),e},from:function(e){return this._from=e,this},to:function(e){return this._to=e,this},oneWay:function(){return this._oneWay=!0,this},toString:function(){var e=this._oneWay?"[oneWay]":"";return"Ember.Binding<"+n(this)+">("+this._from+" -> "+this._to+")"+e},connect:function(e){var t=this._from,n=this._to;return Ember.trySet(e,n,i(e,t)),Ember.addObserver(e,t,this,this.fromDidChange),this._oneWay||Ember.addObserver(e,n,this,this.toDidChange),this._readyToSync=!0,this},disconnect:function(e){var t=!this._oneWay;return Ember.removeObserver(e,this._from,this,this.fromDidChange),t&&Ember.removeObserver(e,this._to,this,this.toDidChange),this._readyToSync=!1,this},fromDidChange:function(e){this._scheduleSync(e,"fwd")},toDidChange:function(e){this._scheduleSync(e,"back")},_scheduleSync:function(e,t){var n=this._directionMap,r=n.get(e);r||(Ember.run.schedule("sync",this,this._sync,e),n.set(e,t)),r==="back"&&t==="fwd"&&n.set(e,"fwd")},_sync:function(t){var n=Ember.LOG_BINDINGS;if(t.isDestroyed||!this._readyToSync)return;var r=this._directionMap,s=r.get(t),o=this._from,u=this._to;r.remove(t);if(s==="fwd"){var a=i(t,this._from);n&&Ember.Logger.log(" ",this.toString(),"->",a,t),this._oneWay?Ember.trySet(t,u,a):Ember._suspendObserver(t,u,this,this.toDidChange,function(){Ember.trySet(t,u,a)})}else if(s==="back"){var f=e(t,this._to);n&&Ember.Logger.log(" ",this.toString(),"<-",f,t),Ember._suspendObserver(t,o,this,this.fromDidChange,function(){Ember.trySet(Ember.isGlobalPath(o)?Ember.lookup:t,o,f)})}}},o(s,{from:function(){var e=this,t=new e;return t.from.apply(t,arguments)},to:function(){var e=this,t=new e;return t.to.apply(t,arguments)},oneWay:function(e,t){var n=this,r=new n(null,e);return r.oneWay(t)}}),Ember.Binding=s,Ember.bind=function(e,t,n){return(new Ember.Binding(t,n)).connect(e)},Ember.oneWay=function(e,t,n){return(new Ember.Binding(t,n)).oneWay().connect(e)}}(),function(){function c(e){var t=Ember.meta(e,!0),n=t.mixins;return n?t.hasOwnProperty("mixins")||(n=t.mixins=a(n)):n=t.mixins={},n}function h(t,n){return n&&n.length>0&&(t.mixins=r.call(n,function(t){if(t instanceof e)return t;var n=new e;return n.properties=t,n})),t}function p(e){return"function"==typeof e&&e.isMethod!==!1&&e!==Boolean&&e!==Object&&e!==Number&&e!==Array&&e!==Date&&e!==String}function v(t,n){var r;return n instanceof e?(r=l(n),t[r]?d:(t[r]=n,n.properties)):n}function m(e,t,n){var r;return r=t.concatenatedProperties||n.concatenatedProperties,e.concatenatedProperties&&(r=r?r.concat(e.concatenatedProperties):e.concatenatedProperties),r}function g(e,t,n,r,i){var s;return r[t]===undefined&&(s=i[t]),s=s||e.descs[t],!!s&&s instanceof Ember.ComputedProperty?(n=a(n),n.func=Ember.wrap(n.func,s.func),n):n}function y(e,t,n,r,i){var s;return i[t]===undefined&&(s=r[t]),s=s||e[t],"function"!=typeof s?n:Ember.wrap(n,s)}function b(e,t,n,r){var i=r[t]||e[t];return i?"function"==typeof i.concat?i.concat(n):Ember.makeArray(i).concat(n):Ember.makeArray(n)}function w(e,n,r,s,o,u,a){if(r instanceof Ember.Descriptor){if(r===t&&o[n])return d;r.func&&(r=g(s,n,r,u,o)),o[n]=r,u[n]=undefined}else{if(p(r))r=y(e,n,r,u,o);else if(a&&i.call(a,n)>=0||n==="concatenatedProperties")r=b(e,n,r,u);o[n]=undefined,u[n]=r}}function E(e,t,n,r,i){function c(e){delete n[e],delete r[e]}var o,u,a,f,l;for(var h=0,p=e.length;h<p;h++){o=e[h],u=v(t,o);if(u===d)continue;if(u){l=Ember.meta(i),f=m(u,r,i);for(a in u){if(!u.hasOwnProperty(a))continue;w(i,a,u[a],l,n,r,f)}u.hasOwnProperty("toString")&&(i.toString=u.toString)}else o.mixins&&(E(o.mixins,t,n,r,i),o._without&&s.call(o._without,c))}}function S(e){var t=Ember.meta(e),n=t.required;if(!n||!t.hasOwnProperty("required"))n=t.required=n?a(n):{};return n}function T(e,t,n,r){if(x.test(t)){var i=r.bindings;i?r.hasOwnProperty("bindings")||(i=r.bindings=a(r.bindings)):i=r.bindings={},i[t]=n}}function N(e,t){var n=t.bindings,r,i,s;if(n){for(r in n)i=n[r],i&&(s=r.slice(0,-7),i instanceof Ember.Binding?(i=i.copy(),i.to(s)):i=new Ember.Binding(s,i),i.connect(e),e[r]=i);t.bindings={}}}function C(e,t){return N(e,t||Ember.meta(e)),e}function k(e,t,n,r,i){var s=t.methodName,o;return r[s]||i[s]?(o=i[s],t=r[s]):n.descs[s]?(t=n.descs[s],o=undefined):(t=undefined,o=e[s]),{desc:t,value:o}}function L(e,t,n,r,i){if("function"!=typeof n)return;var s=n[r];if(s)for(var o=0,u=s.length;o<u;o++)Ember[i](e,s[o],null,t)}function A(e,t,n){var r=e[t];L(e,t,r,"__ember_observesBefore__","removeBeforeObserver"),L(e,t,r,"__ember_observes__","removeObserver"),L(e,t,n,"__ember_observesBefore__","addBeforeObserver"),L(e,t,n,"__ember_observes__","addObserver")}function O(e,r,i){var s={},o={},u=Ember.meta(e),a,l,h;E(r,c(e),s,o,e);for(a in o){if(a==="contructor"||!o.hasOwnProperty(a))continue;h=s[a],l=o[a];if(h===t)continue;while(h&&h instanceof n){var p=k(e,h,u,s,o);h=p.desc,l=p.value}if(h===undefined&&l===undefined)continue;A(e,a,l),T(e,a,l,u),f(e,a,h,l,u)}return i||C(e,u),e}function _(e,t,n){var r=l(e);if(n[r])return!1;n[r]=!0;if(e===t)return!0;var i=e.mixins,s=i?i.length:0;while(--s>=0)if(_(i[s],t,n))return!0;return!1}function D(e,t,n){if(n[l(t)])return;n[l(t)]=!0;if(t.properties){var r=t.properties;for(var i in r)r.hasOwnProperty(i)&&(e[i]=!0)}else t.mixins&&s.call(t.mixins,function(t){D(e,t,n)})}var e,t,n,r=Ember.ArrayPolyfills.map,i=Ember.ArrayPolyfills.indexOf,s=Ember.ArrayPolyfills.forEach,o=[].slice,u={},a=Ember.create,f=Ember.defineProperty,l=Ember.guidFor,d={},x=Ember.IS_BINDING=/^.+Binding$/;Ember.mixin=function(e){var t=o.call(arguments,1);return O(e,t,!1),e},Ember.Mixin=function(){return h(this,arguments)},e=Ember.Mixin,e._apply=O,e.applyPartial=function(e){var t=o.call(arguments,1);return O(e,t,!0)},e.finishPartial=C,Ember.anyUnprocessedMixins=!1,e.create=function(){Ember.anyUnprocessedMixins=!0;var e=this;return h(new e,arguments)};var M=e.prototype;M.reopen=function(){var t,n;this.properties?(t=e.create(),t.properties=this.properties,delete this.properties,this.mixins=[t]):this.mixins||(this.mixins=[]);var r=arguments.length,i=this.mixins,s;for(s=0;s<r;s++)t=arguments[s],t instanceof e?i.push(t):(n=e.create(),n.properties=t,i.push(n));return this},M.apply=function(e){return O(e,[this],!1)},M.applyPartial=function(e){return O(e,[this],!0)},M.detect=function(t){if(!t)return!1;if(t instanceof e)return _(t,this,{});var n=Ember.meta(t,!1).mixins;return n?!!n[l(this)]:!1},M.without=function(){var t=new e(this);return t._without=o.call(arguments),t},M.keys=function(){var e={},t={},n=[];D(e,this,t);for(var r in e)e.hasOwnProperty(r)&&n.push(r);return n},e.mixins=function(e){var t=Ember.meta(e,!1).mixins,n=[];if(!t)return n;for(var r in t){var i=t[r];i.properties||n.push(i)}return n},t=new Ember.Descriptor,t.toString=function(){return"(Required Property)"},Ember.required=function(){return t},n=function(e){this.methodName=e},n.prototype=new Ember.Descriptor,Ember.alias=function(e){return new n(e)},Ember.deprecateFunc("Ember.alias is deprecated. Please use Ember.aliasMethod or Ember.computed.alias instead.",Ember.alias),Ember.aliasMethod=function(e){return new n(e)},Ember.observer=function(e){var t=o.call(arguments,1);return e.__ember_observes__=t,e},Ember.immediateObserver=function(){for(var e=0,t=arguments.length;e<t;e++)var n=arguments[e];return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(e){var t=o.call(arguments,1);return e.__ember_observesBefore__=t,e}}(),function(){}(),function(){e("rsvp",[],function(){"use strict";function d(e,t){n.async(function(){e.trigger("promise:resolved",{detail:t}),e.isResolved=!0,e.resolvedValue=t})}function v(e,t){n.async(function(){e.trigger("promise:failed",{detail:t}),e.isRejected=!0,e.rejectedValue=t})}function m(e){var t,n=[],r=new c,i=e.length;i===0&&r.resolve([]);var s=function(e){return function(t){o(e,t)}},o=function(e,t){n[e]=t,--i===0&&r.resolve(n)},u=function(e){r.reject(e)};for(t=0;t<i;t++)e[t].then(s(t),u);return r}var e=typeof window!="undefined"?window:{},t=e.MutationObserver||e.WebKitMutationObserver,n,r;if(typeof process!="undefined"&&{}.toString.call(process)==="[object process]")r=function(e,t){process.nextTick(function(){e.call(t)})};else if(t){var i=[],s=new t(function(){var e=i.slice();i=[],e.forEach(function(e){var t=e[0],n=e[1];t.call(n)})}),o=document.createElement("div");s.observe(o,{attributes:!0}),window.addEventListener("unload",function(){s.disconnect(),s=null}),r=function(e,t){i.push([e,t]),o.setAttribute("drainQueue","drainQueue")}}else r=function(e,t){setTimeout(function(){e.call(t)},1)};var u=function(e,t){this.type=e;for(var n in t){if(!t.hasOwnProperty(n))continue;this[n]=t[n]}},a=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n][0]===t)return n;return-1},f=function(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t},l={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e},on:function(e,t,n){var r=f(this),i,s;e=e.split(/\s+/),n=n||this;while(s=e.shift())i=r[s],i||(i=r[s]=[]),a(i,t)===-1&&i.push([t,n])},off:function(e,t){var n=f(this),r,i,s;e=e.split(/\s+/);while(i=e.shift()){if(!t){n[i]=[];continue}r=n[i],s=a(r,t),s!==-1&&r.splice(s,1)}},trigger:function(e,t){var n=f(this),r,i,s,o,a;if(r=n[e])for(var l=0;l<r.length;l++)i=r[l],s=i[0],o=i[1],typeof t!="object"&&(t={detail:t}),a=new u(e,t),s.call(o,a)}},c=function(){this.on("promise:resolved",function(e){this.trigger("success",{detail:e.detail})},this),this.on("promise:failed",function(e){this.trigger("error",{detail:e.detail})},this)},h=function(){},p=function(e,t,n,r){var i=typeof n=="function",s,o,u,a;if(i)try{s=n(r.detail),u=!0}catch(f){a=!0,o=f}else s=r.detail,u=!0;s&&typeof s.then=="function"?s.then(function(e){t.resolve(e)},function(e){t.reject(e)}):i&&u?t.resolve(s):a?t.reject(o):t[e](s)};return c.prototype={then:function(e,t){var r=new c;return this.isResolved&&n.async(function(){p("resolve",r,e,{detail:this.resolvedValue})},this),this.isRejected&&n.async(function(){p("reject",r,t,{detail:this.rejectedValue})},this),this.on("promise:resolved",function(t){p("resolve",r,e,t)}),this.on("promise:failed",function(e){p("reject",r,t,e)}),r},resolve:function(e){d(this,e),this.resolve=h,this.reject=h},reject:function(e){v(this,e),this.resolve=h,this.reject=h}},l.mixin(c.prototype),n={async:r,Promise:c,Event:u,EventTarget:l,all:m,raiseOnUncaughtExceptions:!0},n})}(),function(){e("container",[],function(){function e(e){this.parent=e,this.dict={}}function t(t){this.parent=t,this.children=[],this.resolver=t&&t.resolver||function(){},this.registry=new e(t&&t.registry),this.cache=new e(t&&t.cache),this.typeInjections=new e(t&&t.typeInjections),this.injections={},this._options=new e(t&&t._options),this._typeOptions=new e(t&&t._typeOptions)}function n(e){throw new Error(e+" is not currently supported on child containers")}function r(e,t){var n=s(e,t,"singleton");return n!==!1}function i(e,t){var n={};if(!t)return n;var r,i;for(var s=0,o=t.length;s<o;s++)r=t[s],i=e.lookup(r.fullName),n[r.property]=i;return n}function s(e,t,n){var r=e._options.get(t);if(r&&r[n]!==undefined)return r[n];var i=t.split(":")[0];r=e._typeOptions.get(i);if(r)return r[n]}function o(e,t){return e.resolve(t)}function u(e,t){var n=o(e,t),r=t.split(":"),u=r[0],a=r[1],f;if(s(e,t,"instantiate")===!1)return n;if(n){var l=[];l=l.concat(e.typeInjections.get(u)||[]),l=l.concat(e.injections[t]||[]);var c=i(e,l);return c.container=e,c._debugContainerKey=t,f=n.create(c),f}}function a(e,t){e.cache.eachLocal(function(n,r){if(s(e,n,"instantiate")===!1)return;t(r)})}function f(e){e.cache.eachLocal(function(t,n){if(s(e,t,"instantiate")===!1)return;n.destroy()}),e.cache.dict={}}return e.prototype={get:function(e){var t=this.dict;if(t.hasOwnProperty(e))return t[e];if(this.parent)return this.parent.get(e)},set:function(e,t){this.dict[e]=t},has:function(e){var t=this.dict;return t.hasOwnProperty(e)?!0:this.parent?this.parent.has(e):!1},eachLocal:function(e,t){var n=this.dict;for(var r in n)n.hasOwnProperty(r)&&e.call(t,r,n[r])}},t.prototype={child:function(){var e=new t(this);return this.children.push(e),e},set:function(e,t,n){e[t]=n},register:function(e,t,n,r){var i;e.indexOf(":")!==-1?(r=n,n=t,i=e):i=e+":"+t,this.registry.set(i,n),this._options.set(i,r||{})},resolve:function(e){return this.resolver(e)||this.registry.get(e)},lookup:function(e,t){t=t||{};if(this.cache.has(e)&&t.singleton!==!1)return this.cache.get(e);var n=u(this,e);if(!n)return;return r(this,e)&&t.singleton!==!1&&this.cache.set(e,n),n},has:function(e){return this.cache.has(e)?!0:!!o(this,e)},optionsForType:function(e,t){this.parent&&n("optionsForType"),this._typeOptions.set(e,t)},options:function(e,t){this.optionsForType(e,t)},typeInjection:function(e,t,r){this.parent&&n("typeInjection");var i=this.typeInjections.get(e);i||(i=[],this.typeInjections.set(e,i)),i.push({property:t,fullName:r})},injection:function(e,t,r){this.parent&&n("injection");if(e.indexOf(":")===-1)return this.typeInjection(e,t,r);var i=this.injections[e]=this.injections[e]||[];i.push({property:t,fullName:r})},destroy:function(){this.isDestroyed=!0;for(var e=0,t=this.children.length;e<t;e++)this.children[e].destroy();this.children=[],a(this,function(e){e.isDestroying=!0}),a(this,function(e){e.destroy()}),delete this.parent,this.isDestroyed=!0},reset:function(){for(var e=0,t=this.children.length;e<t;e++)f(this.children[e]);f(this)}},t})}(),function(){function i(t,n,r,s){var o,u,a;if("object"!=typeof t||t===null)return t;if(n&&(u=e(r,t))>=0)return s[u];if(Ember.typeOf(t)==="array"){o=t.slice();if(n){u=o.length;while(--u>=0)o[u]=i(o[u],n,r,s)}}else if(Ember.Copyable&&Ember.Copyable.detect(t))o=t.copy(n,r,s);else{o={};for(a in t){if(!t.hasOwnProperty(a))continue;if(a.substring(0,2)==="__")continue;o[a]=n?i(t[a],n,r,s):t[a]}}return n&&(r.push(t),s.push(o)),o}var e=Ember.EnumerableUtils.indexOf,t={},n="Boolean Number String Function Array Date RegExp Object".split(" ");Ember.ArrayPolyfills.forEach.call(n,function(e){t["[object "+e+"]"]=e.toLowerCase()});var r=Object.prototype.toString;Ember.typeOf=function(e){var n;return n=e===null||e===undefined?String(e):t[r.call(e)]||"object",n==="function"?Ember.Object&&Ember.Object.detect(e)&&(n="class"):n==="object"&&(e instanceof Error?n="error":Ember.Object&&e instanceof Ember.Object?n="instance":n="object"),n},Ember.isNone=function(e){return e===null||e===undefined},Ember.none=Ember.deprecateFunc("Ember.none is deprecated. Please use Ember.isNone instead.",Ember.isNone),Ember.isEmpty=function(e){return e===null||e===undefined||e.length===0&&typeof e!="function"||typeof e=="object"&&Ember.get(e,"length")===0},Ember.empty=Ember.deprecateFunc("Ember.empty is deprecated. Please use Ember.isEmpty instead.",Ember.isEmpty),Ember.compare=function o(e,t){if(e===t)return 0;var n=Ember.typeOf(e),r=Ember.typeOf(t),i=Ember.Comparable;if(i){if(n==="instance"&&i.detect(e.constructor))return e.constructor.compare(e,t);if(r==="instance"&&i.detect(t.constructor))return 1-t.constructor.compare(t,e)}var s=Ember.ORDER_DEFINITION_MAPPING;if(!s){var u=Ember.ORDER_DEFINITION;s=Ember.ORDER_DEFINITION_MAPPING={};var a,f;for(a=0,f=u.length;a<f;++a)s[u[a]]=a;delete Ember.ORDER_DEFINITION}var l=s[n],c=s[r];if(l<c)return-1;if(l>c)return 1;switch(n){case"boolean":case"number":if(e<t)return-1;if(e>t)return 1;return 0;case"string":var h=e.localeCompare(t);if(h<0)return-1;if(h>0)return 1;return 0;case"array":var p=e.length,d=t.length,v=Math.min(p,d),m=0,g=0;while(m===0&&g<v)m=o(e[g],t[g]),g++;if(m!==0)return m;if(p<d)return-1;if(p>d)return 1;return 0;case"instance":if(Ember.Comparable&&Ember.Comparable.detect(e))return e.compare(e,t);return 0;case"date":var y=e.getTime(),b=t.getTime();if(y<b)return-1;if(y>b)return 1;return 0;default:return 0}},Ember.copy=function(e,t){return"object"!=typeof e||e===null?e:Ember.Copyable&&Ember.Copyable.detect(e)?e.copy(t):i(e,t,t?[]:null,t?[]:null)},Ember.inspect=function(e){if(typeof e!="object"||e===null)return e+"";var t,n=[];for(var r in e)if(e.hasOwnProperty(r)){t=e[r];if(t==="toString")continue;Ember.typeOf(t)==="function"&&(t="function() { ... }"),n.push(r+": "+t)}return"{"+n.join(", ")+"}"},Ember.isEqual=function(e,t){return e&&"function"==typeof e.isEqual?e.isEqual(t):e===t},Ember.ORDER_DEFINITION=Ember.ENV.ORDER_DEFINITION||["undefined","null","boolean","number","string","array","object","instance","function","class","date"],Ember.keys=Object.keys,Ember.keys||(Ember.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t});var s=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){var e=Error.prototype.constructor.apply(this,arguments);for(var t=0;t<s.length;t++)this[s[t]]=e[s[t]]},Ember.Error.prototype=Ember.create(Error.prototype)}(),function(){var e=/[ _]/g,t={},n=/([a-z])([A-Z])/g,r=/(\-|_|\.|\s)+(.)?/g,i=/([a-z\d])([A-Z]+)/g,s=/\-|\s+/g;Ember.STRINGS={},Ember.String={fmt:function(e,t){var n=0;return e.replace(/%@([0-9]+)?/g,function(e,r){return r=r?parseInt(r,0)-1:n++,e=t[r],(e===null?"(null)":e===undefined?"":e).toString()})},loc:function(e,t){return e=Ember.STRINGS[e]||e,Ember.String.fmt(e,t)},w:function(e){return e.split(/\s+/)},decamelize:function(e){return e.replace(n,"$1_$2").toLowerCase()},dasherize:function(n){var r=t,i=r[n];return i?i:(i=Ember.String.decamelize(n).replace(e,"-"),r[n]=i,i)},camelize:function(e){return e.replace(r,function(e,t,n){return n?n.toUpperCase():""}).replace(/^([A-Z])/,function(e,t,n){return e.toLowerCase()})},classify:function(e){var t=e.split("."),n=[];for(var r=0,i=t.length;r<i;r++){var s=Ember.String.camelize(t[r]);n.push(s.charAt(0).toUpperCase()+s.substr(1))}return n.join(".")},underscore:function(e){return e.replace(i,"$1_$2").replace(s,"_").toLowerCase()},capitalize:function(e){return e.charAt(0).toUpperCase()+e.substr(1)}}}(),function(){var e=Ember.String.fmt,t=Ember.String.w,n=Ember.String.loc,r=Ember.String.camelize,i=Ember.String.decamelize,s=Ember.String.dasherize,o=Ember.String.underscore,u=Ember.String.capitalize,a=Ember.String.classify;if(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)String.prototype.fmt=function(){return e(this,arguments)},String.prototype.w=function(){return t(this)},String.prototype.loc=function(){return n(this,arguments)},String.prototype.camelize=function(){return r(this)},String.prototype.decamelize=function(){return i(this)},String.prototype.dasherize=function(){return s(this)},String.prototype.underscore=function(){return o(this)},String.prototype.classify=function(){return a(this)},String.prototype.capitalize=function(){return u(this)}}(),function(){var e=Array.prototype.slice;if(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.Function)Function.prototype.property=function(){var e=Ember.computed(this);return e.property.apply(e,arguments)},Function.prototype.observes=function(){return this.__ember_observes__=e.call(arguments),this},Function.prototype.observesBefore=function(){return this.__ember_observesBefore__=e.call(arguments),this}}(),function(){}(),function(){function s(){return i.length===0?{}:i.pop()}function o(e){return i.push(e),null}function u(t,n){function i(i){var s=e(i,t);return r?n===s:!!s}var r=arguments.length===2;return i}var e=Ember.get,t=Ember.set,n=Array.prototype.slice,r=Ember.EnumerableUtils.indexOf,i=[];Ember.Enumerable=Ember.Mixin.create({isEnumerable:!0,nextObject:Ember.required(Function),firstObject:Ember.computed(function(){if(e(this,"length")===0)return undefined;var t=s(),n;return n=this.nextObject(0,null,t),o(t),n}).property("[]"),lastObject:Ember.computed(function(){var t=e(this,"length");if(t===0)return undefined;var n=s(),r=0,i,u=null;do u=i,i=this.nextObject(r++,u,n);while(i!==undefined);return o(n),u}).property("[]"),contains:function(e){return this.find(function(t){return t===e})!==undefined},forEach:function(t,n){if(typeof t!="function")throw new TypeError;var r=e(this,"length"),i=null,u=s();n===undefined&&(n=null);for(var a=0;a<r;a++){var f=this.nextObject(a,i,u);t.call(n,f,a,this),i=f}return i=null,u=o(u),this},getEach:function(e){return this.mapProperty(e)},setEach:function(e,n){return this.forEach(function(r){t(r,e,n)})},map:function(e,t){var n=[];return this.forEach(function(r,i,s){n[i]=e.call(t,r,i,s)}),n},mapProperty:function(t){return this.map(function(n){return e(n,t)})},filter:function(e,t){var n=[];return this.forEach(function(r,i,s){e.call(t,r,i,s)&&n.push(r)}),n},reject:function(e,t){return this.filter(function(){return!e.apply(t,arguments)})},filterProperty:function(e,t){return this.filter(u.apply(this,arguments))},rejectProperty:function(t,n){var r=function(r){return e(r,t)===n},i=function(n){return!!e(n,t)},s=arguments.length===2?r:i;return this.reject(s)},find:function(t,n){var r=e(this,"length");n===undefined&&(n=null);var i=null,u,a=!1,f,l=s();for(var c=0;c<r&&!a;c++){u=this.nextObject(c,i,l);if(a=t.call(n,u,c,this))f=u;i=u}return u=i=null,l=o(l),f},findProperty:function(e,t){return this.find(u.apply(this,arguments))},every:function(e,t){return!this.find(function(n,r,i){return!e.call(t,n,r,i)})},everyProperty:function(e,t){return this.every(u.apply(this,arguments))},some:function(e,t){return!!this.find(function(n,r,i){return!!e.call(t,n,r,i)})},someProperty:function(e,t){return this.some(u.apply(this,arguments))},reduce:function(e,t,n){if(typeof e!="function")throw new TypeError;var r=t;return this.forEach(function(t,i){r=e.call(null,r,t,i,this,n)},this),r},invoke:function(e){var t,r=[];return arguments.length>1&&(t=n.call(arguments,1)),this.forEach(function(n,i){var s=n&&n[e];"function"==typeof s&&(r[i]=t?s.apply(n,t):s.call(n))},this),r},toArray:function(){var e=[];return this.forEach(function(t,n){e[n]=t}),e},compact:function(){return this.without(null)},without:function(e){if(!this.contains(e))return this;var t=[];return this.forEach(function(n){n!==e&&(t[t.length]=n)}),t},uniq:function(){var e=[];return this.forEach(function(t){r(e,t)<0&&e.push(t)}),e},"[]":Ember.computed(function(e,t){return this}),addEnumerableObserver:function(t,n){var r=n&&n.willChange||"enumerableWillChange",i=n&&n.didChange||"enumerableDidChange",s=e(this,"hasEnumerableObservers");return s||Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.addListener(this,"@enumerable:before",t,r),Ember.addListener(this,"@enumerable:change",t,i),s||Ember.propertyDidChange(this,"hasEnumerableObservers"),this},removeEnumerableObserver:function(t,n){var r=n&&n.willChange||"enumerableWillChange",i=n&&n.didChange||"enumerableDidChange",s=e(this,"hasEnumerableObservers");return s&&Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.removeListener(this,"@enumerable:before",t,r),Ember.removeListener(this,"@enumerable:change",t,i),s&&Ember.propertyDidChange(this,"hasEnumerableObservers"),this},hasEnumerableObservers:Ember.computed(function(){return Ember.hasListeners(this,"@enumerable:change")||Ember.hasListeners(this,"@enumerable:before")}),enumerableContentWillChange:function(t,n){var r,i,s;return"number"==typeof t?r=t:t?r=e(t,"length"):r=t=-1,"number"==typeof n?i=n:n?i=e(n,"length"):i=n=-1,s=i<0||r<0||i-r!==0,t===-1&&(t=null),n===-1&&(n=null),Ember.propertyWillChange(this,"[]"),s&&Ember.propertyWillChange(this,"length"),Ember.sendEvent(this,"@enumerable:before",[this,t,n]),this},enumerableContentDidChange:function(t,n){var r=this.propertyDidChange,i,s,o;return"number"==typeof t?i=t:t?i=e(t,"length"):i=t=-1,"number"==typeof n?s=n:n?s=e(n,"length"):s=n=-1,o=s<0||i<0||s-i!==0,t===-1&&(t=null),n===-1&&(n=null),Ember.sendEvent(this,"@enumerable:change",[this,t,n]),o&&Ember.propertyDidChange(this,"length"),Ember.propertyDidChange(this,"[]"),this}})}(),function(){function s(e){return e===null||e===undefined}var e=Ember.get,t=Ember.set,n=Ember.meta,r=Ember.EnumerableUtils.map,i=Ember.cacheFor;Ember.Array=Ember.Mixin.create(Ember.Enumerable,{isSCArray:!0,length:Ember.required(),objectAt:function(t){return t<0||t>=e(this,"length")?undefined:e(this,t)},objectsAt:function(e){var t=this;return r(e,function(e){return t.objectAt(e)})},nextObject:function(e){return this.objectAt(e)},"[]":Ember.computed(function(t,n){return n!==undefined&&this.replace(0,e(this,"length"),n),this}),firstObject:Ember.computed(function(){return this.objectAt(0)}),lastObject:Ember.computed(function(){return this.objectAt(e(this,"length")-1)}),contains:function(e){return this.indexOf(e)>=0},slice:function(t,n){var r=[],i=e(this,"length");s(t)&&(t=0);if(s(n)||n>i)n=i;while(t<n)r[r.length]=this.objectAt(t++);return r},indexOf:function(t,n){var r,i=e(this,"length");n===undefined&&(n=0),n<0&&(n+=i);for(r=n;r<i;r++)if(this.objectAt(r,!0)===t)return r;return-1},lastIndexOf:function(t,n){var r,i=e(this,"length");if(n===undefined||n>=i)n=i-1;n<0&&(n+=i);for(r=n;r>=0;r--)if(this.objectAt(r)===t)return r;return-1},addArrayObserver:function(t,n){var r=n&&n.willChange||"arrayWillChange",i=n&&n.didChange||"arrayDidChange",s=e(this,"hasArrayObservers");return s||Ember.propertyWillChange(this,"hasArrayObservers"),Ember.addListener(this,"@array:before",t,r),Ember.addListener(this,"@array:change",t,i),s||Ember.propertyDidChange(this,"hasArrayObservers"),this},removeArrayObserver:function(t,n){var r=n&&n.willChange||"arrayWillChange",i=n&&n.didChange||"arrayDidChange",s=e(this,"hasArrayObservers");return s&&Ember.propertyWillChange(this,"hasArrayObservers"),Ember.removeListener(this,"@array:before",t,r),Ember.removeListener(this,"@array:change",t,i),s&&Ember.propertyDidChange(this,"hasArrayObservers"),this},hasArrayObservers:Ember.computed(function(){return Ember.hasListeners(this,"@array:change")||Ember.hasListeners(this,"@array:before")}),arrayContentWillChange:function(t,n,r){t===undefined?(t=0,n=r=-1):(n===undefined&&(n=-1),r===undefined&&(r=-1)),Ember.isWatching(this,"@each")&&e(this,"@each"),Ember.sendEvent(this,"@array:before",[this,t,n,r]);var i,s;if(t>=0&&n>=0&&e(this,"hasEnumerableObservers")){i=[],s=t+n;for(var o=t;o<s;o++)i.push(this.objectAt(o))}else i=n;return this.enumerableContentWillChange(i,r),this},arrayContentDidChange:function(t,n,r){t===undefined?(t=0,n=r=-1):(n===undefined&&(n=-1),r===undefined&&(r=-1));var s,o;if(t>=0&&r>=0&&e(this,"hasEnumerableObservers")){s=[],o=t+r;for(var u=t;u<o;u++)s.push(this.objectAt(u))}else s=r;this.enumerableContentDidChange(n,s),Ember.sendEvent(this,"@array:change",[this,t,n,r]);var a=e(this,"length"),f=i(this,"firstObject"),l=i(this,"lastObject");return this.objectAt(0)!==f&&(Ember.propertyWillChange(this,"firstObject"),Ember.propertyDidChange(this,"firstObject")),this.objectAt(a-1)!==l&&(Ember.propertyWillChange(this,"lastObject"),Ember.propertyDidChange(this,"lastObject")),this},"@each":Ember.computed(function(){return this.__each||(this.__each=new Ember.EachProxy(this)),this.__each})})}(),function(){Ember.Comparable=Ember.Mixin.create({isComparable:!0,compare:Ember.required(Function)})}(),function(){var e=Ember.get,t=Ember.set;Ember.Copyable=Ember.Mixin.create({copy:Ember.required(Function),frozenCopy:function(){if(Ember.Freezable&&Ember.Freezable.detect(this))return e(this,"isFrozen")?this:this.copy().freeze();throw new Error(Ember.String.fmt("%@ does not support freezing",[this]))}})}(),function(){var e=Ember.get,t=Ember.set;Ember.Freezable=Ember.Mixin.create({isFrozen:!1,freeze:function(){return e(this,"isFrozen")?this:(t(this,"isFrozen",!0),this)}}),Ember.FROZEN_ERROR="Frozen object cannot be modified."}(),function(){var e=Ember.EnumerableUtils.forEach;Ember.MutableEnumerable=Ember.Mixin.create(Ember.Enumerable,{addObject:Ember.required(Function),addObjects:function(t){return Ember.beginPropertyChanges(this),e(t,function(e){this.addObject(e)},this),Ember.endPropertyChanges(this),this},removeObject:Ember.required(Function),removeObjects:function(t){return Ember.beginPropertyChanges(this),e(t,function(e){this.removeObject(e)},this),Ember.endPropertyChanges(this),this}})}(),function(){var e="Index out of range",t=[],n=Ember.get,r=Ember.set,i=Ember.EnumerableUtils.forEach;Ember.MutableArray=Ember.Mixin.create(Ember.Array,Ember.MutableEnumerable,{replace:Ember.required(),clear:function(){var e=n(this,"length");return e===0?this:(this.replace(0,e,t),this)},insertAt:function(t,r){if(t>n(this,"length"))throw new Error(e);return this.replace(t,0,[r]),this},removeAt:function(r,i){if("number"==typeof r){if(r<0||r>=n(this,"length"))throw new Error(e);i===undefined&&(i=1),this.replace(r,i,t)}return this},pushObject:function(e){return this.insertAt(n(this,"length"),e),e},pushObjects:function(e){return this.replace(n(this,"length"),0,e),this},popObject:function(){var e=n(this,"length");if(e===0)return null;var t=this.objectAt(e-1);return this.removeAt(e-1,1),t},shiftObject:function(){if(n(this,"length")===0)return null;var e=this.objectAt(0);return this.removeAt(0),e},unshiftObject:function(e){return this.insertAt(0,e),e},unshiftObjects:function(e){return this.replace(0,0,e),this},reverseObjects:function(){var e=n(this,"length");if(e===0)return this;var t=this.toArray().reverse();return this.replace(0,e,t),this},setObjects:function(e){if(e.length===0)return this.clear();var t=n(this,"length");return this.replace(0,t,e),this},removeObject:function(e){var t=n(this,"length")||0;while(--t>=0){var r=this.objectAt(t);r===e&&this.removeAt(t)}return this},addObject:function(e){return this.contains(e)||this.pushObject(e),this}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.defineProperty;Ember.Observable=Ember.Mixin.create({get:function(t){return e(this,t)},getProperties:function(){var t={},n=arguments;arguments.length===1&&Ember.typeOf(arguments[0])==="array"&&(n=arguments[0]);for(var r=0;r<n.length;r++)t[n[r]]=e(this,n[r]);return t},set:function(e,n){return t(this,e,n),this},setProperties:function(e){return Ember.setProperties(this,e)},beginPropertyChanges:function(){return Ember.beginPropertyChanges(),this},endPropertyChanges:function(){return Ember.endPropertyChanges(),this},propertyWillChange:function(e){return Ember.propertyWillChange(this,e),this},propertyDidChange:function(e){return Ember.propertyDidChange(this,e),this},notifyPropertyChange:function(e){return this.propertyWillChange(e),this.propertyDidChange(e),this},addBeforeObserver:function(e,t,n){Ember.addBeforeObserver(this,e,t,n)},addObserver:function(e,t,n){Ember.addObserver(this,e,t,n)},removeObserver:function(e,t,n){Ember.removeObserver(this,e,t,n)},hasObserverFor:function(e){return Ember.hasListeners(this,e+":change")},getPath:function(e){return this.get(e)},setPath:function(e,t){return this.set(e,t)},getWithDefault:function(e,t){return Ember.getWithDefault(this,e,t)},incrementProperty:function(n,r){return r||(r=1),t(this,n,(e(this,n)||0)+r),e(this,n)},decrementProperty:function(n,r){return r||(r=1),t(this,n,(e(this,n)||0)-r),e(this,n)},toggleProperty:function(n){return t(this,n,!e(this,n)),e(this,n)},cacheFor:function(e){return Ember.cacheFor(this,e)},observersForKey:function(e){return Ember.observersFor(this,e)}})}(),function(){var e=Ember.get,t=Ember.set;Ember.TargetActionSupport=Ember.Mixin.create({target:null,action:null,targetObject:Ember.computed(function(){var t=e(this,"target");if(Ember.typeOf(t)==="string"){var n=e(this,t);return n===undefined&&(n=e(Ember.lookup,t)),n}return t}).property("target"),triggerAction:function(){var t=e(this,"action"),n=e(this,"targetObject");if(n&&t){var r;return typeof n.send=="function"?r=n.send(t,this):(typeof t=="string"&&(t=n[t]),r=t.call(n,this)),r!==!1&&(r=!0),r}return!1}})}(),function(){Ember.Evented=Ember.Mixin.create({on:function(e,t,n){Ember.addListener(this,e,t,n)},one:function(e,t,n){n||(n=t,t=null),Ember.addListener(this,e,t,n,!0)},trigger:function(e){var t=[],n,r;for(n=1,r=arguments.length;n<r;n++)t.push(arguments[n]);Ember.sendEvent(this,e,t)},fire:function(e){this.trigger.apply(this,arguments)},off:function(e,t,n){Ember.removeListener(this,e,t,n)},has:function(e){return Ember.hasListeners(this,e)}})}(),function(){var e=t("rsvp");e.async=function(e,t){Ember.run.schedule("actions",t,e)};var n=Ember.get,r=Array.prototype.slice;Ember.DeferredMixin=Ember.Mixin.create({then:function(e,t){var r=n(this,"promise");return r.then.apply(r,arguments)},resolve:function(e){n(this,"promise").resolve(e)},reject:function(e){n(this,"promise").reject(e)},promise:Ember.computed(function(){return new e.Promise})})}(),function(){}(),function(){Ember.Container=t("container"),Ember.Container.set=Ember.set}(),function(){function w(){var e=!1,t,i,o=function(){e||o.proto(),r(this,s,b),r(this,"_super",b);var u=a(this);u.proto=this;if(t){var f=t;t=null,this.reopen.apply(this,f)}if(i){var c=i;i=null;var h=this.concatenatedProperties;for(var p=0,d=c.length;p<d;p++){var m=c[p];for(var w in m){if(!m.hasOwnProperty(w))continue;var E=m[w],S=Ember.IS_BINDING;if(S.test(w)){var x=u.bindings
17
- ;x?u.hasOwnProperty("bindings")||(x=u.bindings=n(u.bindings)):x=u.bindings={},x[w]=E}var T=u.descs[w];if(h&&y(h,w)>=0){var N=this[w];N?"function"==typeof N.concat?E=N.concat(E):E=Ember.makeArray(N).concat(E):E=Ember.makeArray(E)}T?T.set(this,w,E):typeof this.setUnknownProperty!="function"||w in this?g?Ember.defineProperty(this,w,null,E):this[w]=E:this.setUnknownProperty(w,E)}}}v(this,u),delete u.proto,l(this),this.init.apply(this,arguments)};return o.toString=p.prototype.toString,o.willReopen=function(){e&&(o.PrototypeMixin=p.create(o.PrototypeMixin)),e=!1},o._initMixins=function(e){t=e},o._initProperties=function(e){i=e},o.proto=function(){var t=o.superclass;return t&&t.proto(),e||(e=!0,o.PrototypeMixin.applyPartial(o.prototype),f(o.prototype)),this.prototype},o}function S(e){return function(){return e}}var e=Ember.set,t=Ember.get,n=Ember.create,r=Ember.platform.defineProperty,i=Array.prototype.slice,s=Ember.GUID_KEY,o=Ember.guidFor,u=Ember.generateGuid,a=Ember.meta,f=Ember.rewatch,l=Ember.finishChains,c=Ember.destroy,h=Ember.run.schedule,p=Ember.Mixin,d=p._apply,v=p.finishPartial,m=p.prototype.reopen,g=Ember.ENV.MANDATORY_SETTER,y=Ember.EnumerableUtils.indexOf,b={configurable:!0,writable:!0,enumerable:!1,value:undefined},E=w();E.toString=function(){return"Ember.CoreObject"},E.PrototypeMixin=p.create({reopen:function(){return d(this,arguments,!0),this},isInstance:!0,init:function(){},concatenatedProperties:null,isDestroyed:!1,isDestroying:!1,destroy:function(){if(this._didCallDestroy)return;return this.isDestroying=!0,this._didCallDestroy=!0,this.willDestroy&&this.willDestroy(),h("destroy",this,this._scheduledDestroy),this},_scheduledDestroy:function(){c(this),e(this,"isDestroyed",!0),this.didDestroy&&this.didDestroy()},bind:function(e,t){return t instanceof Ember.Binding||(t=Ember.Binding.from(t)),t.to(e).connect(this),t},toString:function T(){var e=typeof this.toStringExtension=="function",t=e?":"+this.toStringExtension():"",n="<"+this.constructor.toString()+":"+o(this)+t+">";return this.toString=S(n),n}}),E.PrototypeMixin.ownerConstructor=E,Ember.config.overridePrototypeMixin&&Ember.config.overridePrototypeMixin(E.PrototypeMixin),E.__super__=null;var x=p.create({ClassMixin:Ember.required(),PrototypeMixin:Ember.required(),isClass:!0,isMethod:!1,extend:function(){var e=w(),t;return e.ClassMixin=p.create(this.ClassMixin),e.PrototypeMixin=p.create(this.PrototypeMixin),e.ClassMixin.ownerConstructor=e,e.PrototypeMixin.ownerConstructor=e,m.apply(e.PrototypeMixin,arguments),e.superclass=this,e.__super__=this.prototype,t=e.prototype=n(this.prototype),t.constructor=e,u(t,"ember"),a(t).proto=t,e.ClassMixin.apply(e),e},createWithMixins:function(){var e=this;return arguments.length>0&&this._initMixins(arguments),new e},create:function(){var e=this;return arguments.length>0&&this._initProperties(arguments),new e},reopen:function(){return this.willReopen(),m.apply(this.PrototypeMixin,arguments),this},reopenClass:function(){return m.apply(this.ClassMixin,arguments),d(this,arguments,!1),this},detect:function(e){if("function"!=typeof e)return!1;while(e){if(e===this)return!0;e=e.superclass}return!1},detectInstance:function(e){return e instanceof this},metaForProperty:function(e){var t=a(this.proto(),!1).descs[e];return t._meta||{}},eachComputedProperty:function(e,t){var n=this.proto(),r=a(n).descs,i={},s;for(var o in r)s=r[o],s instanceof Ember.ComputedProperty&&e.call(t||this,o,s._meta||i)}});x.ownerConstructor=E,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(x),E.ClassMixin=x,x.apply(E),Ember.CoreObject=E}(),function(){var e=Ember.get,t=Ember.set,n=Ember.guidFor,r=Ember.isNone;Ember.Set=Ember.CoreObject.extend(Ember.MutableEnumerable,Ember.Copyable,Ember.Freezable,{length:0,clear:function(){if(this.isFrozen)throw new Error(Ember.FROZEN_ERROR);var r=e(this,"length");if(r===0)return this;var i;this.enumerableContentWillChange(r,0),Ember.propertyWillChange(this,"firstObject"),Ember.propertyWillChange(this,"lastObject");for(var s=0;s<r;s++)i=n(this[s]),delete this[i],delete this[s];return t(this,"length",0),Ember.propertyDidChange(this,"firstObject"),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(r,0),this},isEqual:function(t){if(!Ember.Enumerable.detect(t))return!1;var n=e(this,"length");if(e(t,"length")!==n)return!1;while(--n>=0)if(!t.contains(this[n]))return!1;return!0},add:Ember.aliasMethod("addObject"),remove:Ember.aliasMethod("removeObject"),pop:function(){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);var t=this.length>0?this[this.length-1]:null;return this.remove(t),t},push:Ember.aliasMethod("addObject"),shift:Ember.aliasMethod("pop"),unshift:Ember.aliasMethod("push"),addEach:Ember.aliasMethod("addObjects"),removeEach:Ember.aliasMethod("removeObjects"),init:function(e){this._super(),e&&this.addObjects(e)},nextObject:function(e){return this[e]},firstObject:Ember.computed(function(){return this.length>0?this[0]:undefined}),lastObject:Ember.computed(function(){return this.length>0?this[this.length-1]:undefined}),addObject:function(i){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(r(i))return this;var s=n(i),o=this[s],u=e(this,"length"),a;return o>=0&&o<u&&this[o]===i?this:(a=[i],this.enumerableContentWillChange(null,a),Ember.propertyWillChange(this,"lastObject"),u=e(this,"length"),this[s]=u,this[u]=i,t(this,"length",u+1),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(null,a),this)},removeObject:function(i){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(r(i))return this;var s=n(i),o=this[s],u=e(this,"length"),a=o===0,f=o===u-1,l,c;return o>=0&&o<u&&this[o]===i&&(c=[i],this.enumerableContentWillChange(c,null),a&&Ember.propertyWillChange(this,"firstObject"),f&&Ember.propertyWillChange(this,"lastObject"),o<u-1&&(l=this[u-1],this[o]=l,this[n(l)]=o),delete this[s],delete this[u-1],t(this,"length",u-1),a&&Ember.propertyDidChange(this,"firstObject"),f&&Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(c,null)),this},contains:function(e){return this[n(e)]>=0},copy:function(){var r=this.constructor,i=new r,s=e(this,"length");t(i,"length",s);while(--s>=0)i[s]=this[s],i[n(this[s])]=s;return i},toString:function(){var e=this.length,t,n=[];for(t=0;t<e;t++)n[t]=this[t];return"Ember.Set<%@>".fmt(n.join(","))}})}(),function(){Ember.Object=Ember.CoreObject.extend(Ember.Observable),Ember.Object.toString=function(){return"Ember.Object"}}(),function(){function o(e,t,n){var u=e.length;r[e.join(".")]=t;for(var f in t){if(!i.call(t,f))continue;var c=t[f];e[u]=f;if(c&&c.toString===l)c.toString=h(e.join(".")),c[a]=e.join(".");else if(c&&c.isNamespace){if(n[s(c)])continue;n[s(c)]=!0,o(e,c,n)}}e.length=u}function u(){var e=Ember.Namespace,t=Ember.lookup,n,r;if(e.PROCESSED)return;for(var i in t){if(i==="parent"||i==="top"||i==="frameElement")continue;if(i==="globalStorage"&&t.StorageList&&t.globalStorage instanceof t.StorageList)continue;if(t.hasOwnProperty&&!t.hasOwnProperty(i))continue;try{n=Ember.lookup[i],r=n&&n.isNamespace}catch(s){continue}r&&(n[a]=i)}}function f(e){var t=e.superclass;if(t)return t[a]?t[a]:f(t);return}function l(){!Ember.BOOTED&&!this[a]&&c();var e;if(this[a])e=this[a];else{var t=f(this);t?e="(subclass of "+t+")":e="(unknown mixin)",this.toString=h(e)}return e}function c(){var e=!n.PROCESSED,t=Ember.anyUnprocessedMixins;e&&(u(),n.PROCESSED=!0);if(e||t){var r=n.NAMESPACES,i;for(var s=0,a=r.length;s<a;s++)i=r[s],o([i.toString()],i,{});Ember.anyUnprocessedMixins=!1}}function h(e){return function(){return e}}var e=Ember.get,t=Ember.ArrayPolyfills.indexOf,n=Ember.Namespace=Ember.Object.extend({isNamespace:!0,init:function(){Ember.Namespace.NAMESPACES.push(this),Ember.Namespace.PROCESSED=!1},toString:function(){var t=e(this,"name");return t?t:(u(),this[Ember.GUID_KEY+"_name"])},nameClasses:function(){o([this.toString()],this,{})},destroy:function(){var e=Ember.Namespace.NAMESPACES;Ember.lookup[this.toString()]=undefined,e.splice(t.call(e,this),1),this._super()}});n.reopenClass({NAMESPACES:[Ember],NAMESPACES_BY_ID:{},PROCESSED:!1,processAll:c,byName:function(e){return Ember.BOOTED||c(),r[e]}});var r=n.NAMESPACES_BY_ID,i={}.hasOwnProperty,s=Ember.guidFor,a=Ember.NAME_KEY=Ember.GUID_KEY+"_name";Ember.Mixin.prototype.toString=l}(),function(){Ember.Application=Ember.Namespace.extend()}(),function(){var e=Ember.get,t=Ember.set;Ember.ArrayProxy=Ember.Object.extend(Ember.MutableArray,{content:null,arrangedContent:Ember.computed.alias("content"),objectAtContent:function(t){return e(this,"arrangedContent").objectAt(t)},replaceContent:function(t,n,r){e(this,"content").replace(t,n,r)},_contentWillChange:Ember.beforeObserver(function(){this._teardownContent()},"content"),_teardownContent:function(){var t=e(this,"content");t&&t.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer(function(){var t=e(this,"content");this._setupContent()},"content"),_setupContent:function(){var t=e(this,"content");t&&t.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},_arrangedContentWillChange:Ember.beforeObserver(function(){var t=e(this,"arrangedContent"),n=t?e(t,"length"):0;this.arrangedContentArrayWillChange(this,0,n,undefined),this.arrangedContentWillChange(this),this._teardownArrangedContent(t)},"arrangedContent"),_arrangedContentDidChange:Ember.observer(function(){var t=e(this,"arrangedContent"),n=t?e(t,"length"):0;this._setupArrangedContent(),this.arrangedContentDidChange(this),this.arrangedContentArrayDidChange(this,0,undefined,n)},"arrangedContent"),_setupArrangedContent:function(){var t=e(this,"arrangedContent");t&&t.addArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},_teardownArrangedContent:function(){var t=e(this,"arrangedContent");t&&t.removeArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},arrangedContentWillChange:Ember.K,arrangedContentDidChange:Ember.K,objectAt:function(t){return e(this,"content")&&this.objectAtContent(t)},length:Ember.computed(function(){var t=e(this,"arrangedContent");return t?e(t,"length"):0}),replace:function(t,n,r){return e(this,"content")&&this.replaceContent(t,n,r),this},arrangedContentArrayWillChange:function(e,t,n,r){this.arrayContentWillChange(t,n,r)},arrangedContentArrayDidChange:function(e,t,n,r){this.arrayContentDidChange(t,n,r)},init:function(){this._super(),this._setupContent(),this._setupArrangedContent()},willDestroy:function(){this._teardownArrangedContent(),this._teardownContent()}})}(),function(){function f(e,t){var n=t.slice(8);if(n in this)return;u(this,n)}function l(e,t){var n=t.slice(8);if(n in this)return;a(this,n)}var e=Ember.get,t=Ember.set,n=Ember.String.fmt,r=Ember.addBeforeObserver,i=Ember.addObserver,s=Ember.removeBeforeObserver,o=Ember.removeObserver,u=Ember.propertyWillChange,a=Ember.propertyDidChange;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer(function(){},"content"),isTruthy:Ember.computed.bool("content"),_debugContainerKey:null,willWatchProperty:function(e){var t="content."+e;r(this,t,null,f),i(this,t,null,l)},didUnwatchProperty:function(e){var t="content."+e;s(this,t,null,f),o(this,t,null,l)},unknownProperty:function(t){var n=e(this,"content");if(n)return e(n,t)},setUnknownProperty:function(n,r){var i=e(this,"content");return t(i,n,r)}})}(),function(){function o(e,t,r,i,s){var o=r._objects,u;o||(o=r._objects={});while(--s>=i){var a=e.objectAt(s);a&&(Ember.addBeforeObserver(a,t,r,"contentKeyWillChange"),Ember.addObserver(a,t,r,"contentKeyDidChange"),u=n(a),o[u]||(o[u]=[]),o[u].push(s))}}function u(e,t,r,i,s){var o=r._objects;o||(o=r._objects={});var u,a;while(--s>=i){var f=e.objectAt(s);f&&(Ember.removeBeforeObserver(f,t,r,"contentKeyWillChange"),Ember.removeObserver(f,t,r,"contentKeyDidChange"),a=n(f),u=o[a],u[u.indexOf(s)]=null)}}var e=Ember.set,t=Ember.get,n=Ember.guidFor,r=Ember.EnumerableUtils.forEach,i=Ember.Object.extend(Ember.Array,{init:function(e,t,n){this._super(),this._keyName=t,this._owner=n,this._content=e},objectAt:function(e){var n=this._content.objectAt(e);return n&&t(n,this._keyName)},length:Ember.computed(function(){var e=this._content;return e?t(e,"length"):0})}),s=/^.+:(before|change)$/;Ember.EachProxy=Ember.Object.extend({init:function(e){this._super(),this._content=e,e.addArrayObserver(this),r(Ember.watchedEvents(this),function(e){this.didAddListener(e)},this)},unknownProperty:function(e,t){var n;return n=new i(this._content,e,this),Ember.defineProperty(this,e,null,n),this.beginObservingContentKey(e),n},arrayWillChange:function(e,t,n,r){var i=this._keys,s,o,a;a=n>0?t+n:-1,Ember.beginPropertyChanges(this);for(s in i){if(!i.hasOwnProperty(s))continue;a>0&&u(e,s,this,t,a),Ember.propertyWillChange(this,s)}Ember.propertyWillChange(this._content,"@each"),Ember.endPropertyChanges(this)},arrayDidChange:function(e,t,n,r){var i=this._keys,s,u,a;a=r>0?t+r:-1,Ember.beginPropertyChanges(this);for(s in i){if(!i.hasOwnProperty(s))continue;a>0&&o(e,s,this,t,a),Ember.propertyDidChange(this,s)}Ember.propertyDidChange(this._content,"@each"),Ember.endPropertyChanges(this)},didAddListener:function(e){s.test(e)&&this.beginObservingContentKey(e.slice(0,-7))},didRemoveListener:function(e){s.test(e)&&this.stopObservingContentKey(e.slice(0,-7))},beginObservingContentKey:function(e){var n=this._keys;n||(n=this._keys={});if(!n[e]){n[e]=1;var r=this._content,i=t(r,"length");o(r,e,this,0,i)}else n[e]++},stopObservingContentKey:function(e){var n=this._keys;if(n&&n[e]>0&&--n[e]<=0){var r=this._content,i=t(r,"length");u(r,e,this,0,i)}},contentKeyWillChange:function(e,t){Ember.propertyWillChange(this,t)},contentKeyDidChange:function(e,t){Ember.propertyDidChange(this,t)}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.Mixin.create(Ember.MutableArray,Ember.Observable,Ember.Copyable,{get:function(e){return e==="length"?this.length:"number"==typeof e?this[e]:this._super(e)},objectAt:function(e){return this[e]},replace:function(t,n,r){if(this.isFrozen)throw Ember.FROZEN_ERROR;var i=r?e(r,"length"):0;this.arrayContentWillChange(t,n,i);if(!r||r.length===0)this.splice(t,n);else{var s=[t,n].concat(r);this.splice.apply(this,s)}return this.arrayContentDidChange(t,n,i),this},unknownProperty:function(e,t){var n;return t!==undefined&&n===undefined&&(n=this[e]=t),n},indexOf:function(e,t){var n,r=this.length;t===undefined?t=0:t=t<0?Math.ceil(t):Math.floor(t),t<0&&(t+=r);for(n=t;n<r;n++)if(this[n]===e)return n;return-1},lastIndexOf:function(e,t){var n,r=this.length;t===undefined?t=r-1:t=t<0?Math.ceil(t):Math.floor(t),t<0&&(t+=r);for(n=t;n>=0;n--)if(this[n]===e)return n;return-1},copy:function(e){return e?this.map(function(e){return Ember.copy(e,!0)}):this.slice()}}),r=["length"];Ember.EnumerableUtils.forEach(n.keys(),function(e){Array.prototype[e]&&r.push(e)}),r.length>0&&(n=n.without.apply(n,r)),Ember.NativeArray=n,Ember.A=function(e){return e===undefined&&(e=[]),Ember.Array.detect(e)?e:Ember.NativeArray.apply(e)},Ember.NativeArray.activate=function(){n.apply(Array.prototype),Ember.A=function(e){return e||[]}},(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.Array)&&Ember.NativeArray.activate()}(),function(){var e=Ember.DeferredMixin,t=Ember.Object,n=Ember.get,r=Ember.Object.extend(e);r.reopenClass({promise:function(e,t){var i=r.create();return e.call(t,i),n(i,"promise")}}),Ember.Deferred=r}(),function(){var e=Ember.ENV.EMBER_LOAD_HOOKS||{},t={};Ember.onLoad=function(n,r){var i;e[n]=e[n]||Ember.A(),e[n].pushObject(r),(i=t[n])&&r(i)},Ember.runLoadHooks=function(n,r){var i;t[n]=r,(i=e[n])&&e[n].forEach(function(e){e(r)})}}(),function(){}(),function(){var e=Ember.get;Ember.ControllerMixin=Ember.Mixin.create({isController:!0,target:null,container:null,store:null,model:Ember.computed.alias("content"),send:function(t){var n=[].slice.call(arguments,1),r;this[t]?this[t].apply(this,n):(r=e(this,"target"))&&r.send.apply(r,arguments)}}),Ember.Controller=Ember.Object.extend(Ember.ControllerMixin)}(),function(){var e=Ember.get,t=Ember.set,n=Ember.EnumerableUtils.forEach;Ember.SortableMixin=Ember.Mixin.create(Ember.MutableEnumerable,{sortProperties:null,sortAscending:!0,orderBy:function(t,r){var i=0,s=e(this,"sortProperties"),o=e(this,"sortAscending");return n(s,function(n){i===0&&(i=Ember.compare(e(t,n),e(r,n)),i!==0&&!o&&(i=-1*i))}),i},destroy:function(){var t=e(this,"content"),r=e(this,"sortProperties");return t&&r&&n(t,function(e){n(r,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},isSorted:Ember.computed.bool("sortProperties"),arrangedContent:Ember.computed("content","sortProperties.@each",function(t,r){var i=e(this,"content"),s=e(this,"isSorted"),o=e(this,"sortProperties"),u=this;return i&&s?(i=i.slice(),i.sort(function(e,t){return u.orderBy(e,t)}),n(i,function(e){n(o,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),Ember.A(i)):i}),_contentWillChange:Ember.beforeObserver(function(){var t=e(this,"content"),r=e(this,"sortProperties");t&&r&&n(t,function(e){n(r,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},"content"),sortAscendingWillChange:Ember.beforeObserver(function(){this._lastSortAscending=e(this,"sortAscending")},"sortAscending"),sortAscendingDidChange:Ember.observer(function(){if(e(this,"sortAscending")!==this._lastSortAscending){var t=e(this,"arrangedContent");t.reverseObjects()}},"sortAscending"),contentArrayWillChange:function(t,r,i,s){var o=e(this,"isSorted");if(o){var u=e(this,"arrangedContent"),a=t.slice(r,r+i),f=e(this,"sortProperties");n(a,function(e){u.removeObject(e),n(f,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(t,r,i,s)},contentArrayDidChange:function(t,r,i,s){var o=e(this,"isSorted"),u=e(this,"sortProperties");if(o){var a=t.slice(r,r+s),f=e(this,"arrangedContent");n(a,function(e){this.insertItemSorted(e),n(u,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(t,r,i,s)},insertItemSorted:function(t){var n=e(this,"arrangedContent"),r=e(n,"length"),i=this._binarySearch(t,0,r);n.insertAt(i,t)},contentItemSortPropertyDidChange:function(t){var n=e(this,"arrangedContent"),r=n.indexOf(t),i=n.objectAt(r-1),s=n.objectAt(r+1),o=i&&this.orderBy(t,i),u=s&&this.orderBy(t,s);if(o<0||u>0)n.removeObject(t),this.insertItemSorted(t)},_binarySearch:function(t,n,r){var i,s,o,u;return n===r?n:(u=e(this,"arrangedContent"),i=n+Math.floor((r-n)/2),s=u.objectAt(i),o=this.orderBy(s,t),o<0?this._binarySearch(t,i+1,r):o>0?this._binarySearch(t,n,i):i)}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.isGlobalPath,r=Ember.EnumerableUtils.forEach,i=Ember.EnumerableUtils.replace;Ember.ArrayController=Ember.ArrayProxy.extend(Ember.ControllerMixin,Ember.SortableMixin,{itemController:null,lookupItemController:function(t){return e(this,"itemController")},objectAtContent:function(t){var n=e(this,"length"),r=e(this,"arrangedContent").objectAt(t);if(t>=0&&t<n){var i=this.lookupItemController(r);if(i)return this.controllerAt(t,r,i)}return r},arrangedContentDidChange:function(){this._super(),this._resetSubControllers()},arrayContentDidChange:function(t,n,s){var o=e(this,"_subControllers"),u=o.slice(t,t+n);r(u,function(e){e&&e.destroy()}),i(o,t,n,new Array(s)),this._super(t,n,s)},init:function(){this._super(),this.get("content")||Ember.defineProperty(this,"content",undefined,Ember.A()),this.set("_subControllers",Ember.A())},controllerAt:function(t,n,r){var i=e(this,"container"),s=e(this,"_subControllers"),o=s[t];o||(o=i.lookup("controller:"+r,{singleton:!1}),s[t]=o);if(!o)throw new Error('Could not resolve itemController: "'+r+'"');return o.set("target",this),o.set("content",n),o},_subControllers:null,_resetSubControllers:function(){var t=e(this,"_subControllers");r(t,function(e){e&&e.destroy()}),this.set("_subControllers",Ember.A())}})}(),function(){Ember.ObjectController=Ember.ObjectProxy.extend(Ember.ControllerMixin)}(),function(){}(),function(){}(),function(){var e=Ember.get,t=Ember.set;Ember.State=Ember.Object.extend(Ember.Evented,{isState:!0,parentState:null,start:null,name:null,path:Ember.computed(function(){var t=e(this,"parentState.path"),n=e(this,"name");return t&&(n=t+"."+n),n}),trigger:function(e){this[e]&&this[e].apply(this,[].slice.call(arguments,1)),this._super.apply(this,arguments)},init:function(){var n=e(this,"states"),r;t(this,"childStates",Ember.A()),t(this,"eventTransitions",e(this,"eventTransitions")||{});var i,s,o;if(!n){n={};for(i in this){if(i==="constructor")continue;if(s=this[i]){if(o=s.transitionTarget)this.eventTransitions[i]=o;this.setupChild(n,i,s)}}t(this,"states",n)}else for(i in n)this.setupChild(n,i,n[i]);t(this,"pathsCache",{}),t(this,"pathsCacheNoContext",{})},setupChild:function(n,r,i){if(!i)return!1;i.isState?t(i,"name",r):Ember.State.detect(i)&&(i=i.create({name:r}));if(i.isState)return t(i,"parentState",this),e(this,"childStates").pushObject(i),n[r]=i,i},lookupEventTransition:function(e){var t,n=this;while(n&&!t)t=n.eventTransitions[e],n=n.get("parentState");return t},isLeaf:Ember.computed(function(){return!e(this,"childStates").length}),hasContext:!0,setup:Ember.K,enter:Ember.K,exit:Ember.K}),Ember.State.reopenClass({transitionTo:function(e){var t=function(t,n){var r=[],i,s=Ember.$&&Ember.$.Event;n&&s&&n instanceof s?n.hasOwnProperty("contexts")&&(r=n.contexts.slice()):r=[].slice.call(arguments,1),r.unshift(e),t.transitionTo.apply(t,r)};return t.transitionTarget=e,t}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.String.fmt,r=Ember.ArrayPolyfills.forEach,i=function(e){this.enterStates=e.enterStates.slice(),this.exitStates=e.exitStates.slice(),this.resolveState=e.resolveState,this.finalState=e.enterStates[e.enterStates.length-1]||e.resolveState};i.prototype={normalize:function(e,t){return this.matchContextsToStates(t),this.addInitialStates(),this.removeUnchangedContexts(e),this},matchContextsToStates:function(t){var n=this.enterStates.length-1,r=[],i,s;while(t.length>0){if(n>=0)i=this.enterStates[n--];else{if(this.enterStates.length){i=e(this.enterStates[0],"parentState");if(!i)throw"Cannot match all contexts to states"}else i=this.resolveState;this.enterStates.unshift(i),this.exitStates.unshift(i)}e(i,"hasContext")?s=t.pop():s=null,r.unshift(s)}this.contexts=r},addInitialStates:function(){var t=this.finalState,n;for(;;){n=e(t,"initialState")||"start",t=e(t,"states."+n);if(!t)break;this.finalState=t,this.enterStates.push(t),this.contexts.push(undefined)}},removeUnchangedContexts:function(e){while(this.enterStates.length>0){if(this.enterStates[0]!==this.exitStates[0])break;if(this.enterStates.length===this.contexts.length){if(e.getStateMeta(this.enterStates[0],"context")!==this.contexts[0])break;this.contexts.shift()}this.resolveState=this.enterStates.shift(),this.exitStates.shift()}}};var s=function(t,r,i){var u=this.enableLogging,a=i?"unhandledEvent":t,f=r[a],l,c,h;l=[].slice.call(arguments,3);if(typeof f=="function")return u&&(i?Ember.Logger.log(n("STATEMANAGER: Unhandled event '%@' being sent to state %@.",[t,e(r,"path")])):Ember.Logger.log(n("STATEMANAGER: Sending event '%@' to state %@.",[t,e(r,"path")]))),h=l,i&&h.unshift(t),h.unshift(this),f.apply(r,h);var p=e(r,"parentState");if(p)return c=l,c.unshift(t,p,i),s.apply(this,c);if(!i)return o.call(this,t,l,!0)},o=function(t,n,r){return n.unshift(t,e(this,"currentState"),r),s.apply(this,n)};Ember.StateManager=Ember.State.extend({init:function(){this._super(),t(this,"stateMeta",Ember.Map.create());var n=e(this,"initialState");!n&&e(this,"states.start")&&(n="start"),n&&this.transitionTo(n)},stateMetaFor:function(t){var n=e(this,"stateMeta"),r=n.get(t);return r||(r={},n.set(t,r)),r},setStateMeta:function(e,n,r){return t(this.stateMetaFor(e),n,r)},getStateMeta:function(t,n){return e(this.stateMetaFor(t),n)},currentState:null,currentPath:Ember.computed.alias("currentState.path"),transitionEvent:"setup",errorOnUnhandledEvent:!0,send:function(e){var t=[].slice.call(arguments,1);return o.call(this,e,t,!1)},unhandledEvent:function(t,n){if(e(this,"errorOnUnhandledEvent"))throw new Ember.Error(this.toString()+" could not respond to event "+n+" in state "+e(this,"currentState.path")+".")},getStateByPath:function(t,n){var r=n.split("."),i=t;for(var s=0,o=r.length;s<o;s++){i=e(e(i,"states"),r[s]);if(!i)break}return i},findStateByPath:function(t,n){var r;while(!r&&t)r=this.getStateByPath(t,n),t=e(t,"parentState");return r},getStatesInPath:function(t,n){if(!n||n==="")return undefined;var r=n.split("."),i=[],s,o;for(var u=0,a=r.length;u<a;u++){s=e(t,"states");if(!s)return undefined;o=e(s,r[u]);if(!o)return undefined;t=o,i.push(o)}return i},goToState:function(){return this.transitionTo.apply(this,arguments)},transitionTo:function(t,n){if(Ember.isEmpty(t))return;var r=n?Array.prototype.slice.call(arguments,1):[],s=e(this,"currentState")||this,o=this.contextFreeTransition(s,t),u=(new i(o)).normalize(this,r);this.enterState(u),this.triggerSetupContext(u)},contextFreeTransition:function(t,n){var r=t.pathsCache[n];if(r)return r;var i=this.getStatesInPath(t,n),s=[],o=t;while(o&&!i){s.unshift(o),o=e(o,"parentState");if(!o){i=this.getStatesInPath(this,n);if(!i)return}i=this.getStatesInPath(o,n)}while(i.length>0&&i[0]===s[0])o=i.shift(),s.shift();var u=t.pathsCache[n]={exitStates:s,enterStates:i,resolveState:o};return u},triggerSetupContext:function(t){var n=t.contexts,i=t.enterStates.length-n.length,s=t.enterStates,o=e(this,"transitionEvent");r.call(s,function(e,t){e.trigger(o,this,n[t-i])},this)},getState:function(t){var n=e(this,t),r=e(this,"parentState");if(n)return n;if(r)return r.getState(t)},enterState:function(n){var i=this.enableLogging,s=n.exitStates.slice(0).reverse();r.call(s,function(e){e.trigger("exit",this)},this),r.call(n.enterStates,function(t){i&&Ember.Logger.log("STATEMANAGER: Entering "+e(t,"path")),t.trigger("enter",this)},this),t(this,"currentState",n.finalState)}})}(),function(){}()})(),typeof location!="undefined"&&(location.hostname==="localhost"||location.hostname==="127.0.0.1")&&console.warn("You are running a production build of Ember on localhost and won't receive detailed error messages. If you want full error messages please use the non-minified build provided on the Ember website.");
16
+ e,this._directionMap=Ember.Map.create()};s.prototype={copy:function(){var e=new s(this._to,this._from);return this._oneWay&&(e._oneWay=!0),e},from:function(e){return this._from=e,this},to:function(e){return this._to=e,this},oneWay:function(){return this._oneWay=!0,this},toString:function(){var e=this._oneWay?"[oneWay]":"";return"Ember.Binding<"+n(this)+">("+this._from+" -> "+this._to+")"+e},connect:function(e){var t=this._from,n=this._to;return Ember.trySet(e,n,i(e,t)),Ember.addObserver(e,t,this,this.fromDidChange),this._oneWay||Ember.addObserver(e,n,this,this.toDidChange),this._readyToSync=!0,this},disconnect:function(e){var t=!this._oneWay;return Ember.removeObserver(e,this._from,this,this.fromDidChange),t&&Ember.removeObserver(e,this._to,this,this.toDidChange),this._readyToSync=!1,this},fromDidChange:function(e){this._scheduleSync(e,"fwd")},toDidChange:function(e){this._scheduleSync(e,"back")},_scheduleSync:function(e,t){var n=this._directionMap,r=n.get(e);r||(Ember.run.schedule("sync",this,this._sync,e),n.set(e,t)),r==="back"&&t==="fwd"&&n.set(e,"fwd")},_sync:function(t){var n=Ember.LOG_BINDINGS;if(t.isDestroyed||!this._readyToSync)return;var r=this._directionMap,s=r.get(t),o=this._from,u=this._to;r.remove(t);if(s==="fwd"){var a=i(t,this._from);n&&Ember.Logger.log(" ",this.toString(),"->",a,t),this._oneWay?Ember.trySet(t,u,a):Ember._suspendObserver(t,u,this,this.toDidChange,function(){Ember.trySet(t,u,a)})}else if(s==="back"){var f=e(t,this._to);n&&Ember.Logger.log(" ",this.toString(),"<-",f,t),Ember._suspendObserver(t,o,this,this.fromDidChange,function(){Ember.trySet(Ember.isGlobalPath(o)?Ember.lookup:t,o,f)})}}},o(s,{from:function(){var e=this,t=new e;return t.from.apply(t,arguments)},to:function(){var e=this,t=new e;return t.to.apply(t,arguments)},oneWay:function(e,t){var n=this,r=new n(null,e);return r.oneWay(t)}}),Ember.Binding=s,Ember.bind=function(e,t,n){return(new Ember.Binding(t,n)).connect(e)},Ember.oneWay=function(e,t,n){return(new Ember.Binding(t,n)).oneWay().connect(e)}}(),function(){function c(e){var t=Ember.meta(e,!0),n=t.mixins;return n?t.hasOwnProperty("mixins")||(n=t.mixins=a(n)):n=t.mixins={},n}function h(t,n){return n&&n.length>0&&(t.mixins=r.call(n,function(t){if(t instanceof e)return t;var n=new e;return n.properties=t,n})),t}function p(e){return"function"==typeof e&&e.isMethod!==!1&&e!==Boolean&&e!==Object&&e!==Number&&e!==Array&&e!==Date&&e!==String}function v(t,n){var r;return n instanceof e?(r=l(n),t[r]?d:(t[r]=n,n.properties)):n}function m(e,t,n){var r;return r=t.concatenatedProperties||n.concatenatedProperties,e.concatenatedProperties&&(r=r?r.concat(e.concatenatedProperties):e.concatenatedProperties),r}function g(e,t,n,r,i){var s;return r[t]===undefined&&(s=i[t]),s=s||e.descs[t],!!s&&s instanceof Ember.ComputedProperty?(n=a(n),n.func=Ember.wrap(n.func,s.func),n):n}function y(e,t,n,r,i){var s;return i[t]===undefined&&(s=r[t]),s=s||e[t],"function"!=typeof s?n:Ember.wrap(n,s)}function b(e,t,n,r){var i=r[t]||e[t];return i?"function"==typeof i.concat?i.concat(n):Ember.makeArray(i).concat(n):Ember.makeArray(n)}function w(e,n,r,s,o,u,a){if(r instanceof Ember.Descriptor){if(r===t&&o[n])return d;r.func&&(r=g(s,n,r,u,o)),o[n]=r,u[n]=undefined}else{if(p(r))r=y(e,n,r,u,o);else if(a&&i.call(a,n)>=0||n==="concatenatedProperties")r=b(e,n,r,u);o[n]=undefined,u[n]=r}}function E(e,t,n,r,i){function c(e){delete n[e],delete r[e]}var o,u,a,f,l;for(var h=0,p=e.length;h<p;h++){o=e[h],u=v(t,o);if(u===d)continue;if(u){l=Ember.meta(i),f=m(u,r,i);for(a in u){if(!u.hasOwnProperty(a))continue;w(i,a,u[a],l,n,r,f)}u.hasOwnProperty("toString")&&(i.toString=u.toString)}else o.mixins&&(E(o.mixins,t,n,r,i),o._without&&s.call(o._without,c))}}function S(e){var t=Ember.meta(e),n=t.required;if(!n||!t.hasOwnProperty("required"))n=t.required=n?a(n):{};return n}function T(e,t,n,r){if(x.test(t)){var i=r.bindings;i?r.hasOwnProperty("bindings")||(i=r.bindings=a(r.bindings)):i=r.bindings={},i[t]=n}}function N(e,t){var n=t.bindings,r,i,s;if(n){for(r in n)i=n[r],i&&(s=r.slice(0,-7),i instanceof Ember.Binding?(i=i.copy(),i.to(s)):i=new Ember.Binding(s,i),i.connect(e),e[r]=i);t.bindings={}}}function C(e,t){return N(e,t||Ember.meta(e)),e}function k(e,t,n,r,i){var s=t.methodName,o;return r[s]||i[s]?(o=i[s],t=r[s]):n.descs[s]?(t=n.descs[s],o=undefined):(t=undefined,o=e[s]),{desc:t,value:o}}function L(e,t,n,r,i){if("function"!=typeof n)return;var s=n[r];if(s)for(var o=0,u=s.length;o<u;o++)Ember[i](e,s[o],null,t)}function A(e,t,n){var r=e[t];L(e,t,r,"__ember_observesBefore__","removeBeforeObserver"),L(e,t,r,"__ember_observes__","removeObserver"),L(e,t,n,"__ember_observesBefore__","addBeforeObserver"),L(e,t,n,"__ember_observes__","addObserver")}function O(e,r,i){var s={},o={},u=Ember.meta(e),a,l,h;E(r,c(e),s,o,e);for(a in o){if(a==="contructor"||!o.hasOwnProperty(a))continue;h=s[a],l=o[a];if(h===t)continue;while(h&&h instanceof n){var p=k(e,h,u,s,o);h=p.desc,l=p.value}if(h===undefined&&l===undefined)continue;A(e,a,l),T(e,a,l,u),f(e,a,h,l,u)}return i||C(e,u),e}function _(e,t,n){var r=l(e);if(n[r])return!1;n[r]=!0;if(e===t)return!0;var i=e.mixins,s=i?i.length:0;while(--s>=0)if(_(i[s],t,n))return!0;return!1}function D(e,t,n){if(n[l(t)])return;n[l(t)]=!0;if(t.properties){var r=t.properties;for(var i in r)r.hasOwnProperty(i)&&(e[i]=!0)}else t.mixins&&s.call(t.mixins,function(t){D(e,t,n)})}var e,t,n,r=Ember.ArrayPolyfills.map,i=Ember.ArrayPolyfills.indexOf,s=Ember.ArrayPolyfills.forEach,o=[].slice,u={},a=Ember.create,f=Ember.defineProperty,l=Ember.guidFor,d={},x=Ember.IS_BINDING=/^.+Binding$/;Ember.mixin=function(e){var t=o.call(arguments,1);return O(e,t,!1),e},Ember.Mixin=function(){return h(this,arguments)},e=Ember.Mixin,e._apply=O,e.applyPartial=function(e){var t=o.call(arguments,1);return O(e,t,!0)},e.finishPartial=C,Ember.anyUnprocessedMixins=!1,e.create=function(){Ember.anyUnprocessedMixins=!0;var e=this;return h(new e,arguments)};var M=e.prototype;M.reopen=function(){var t,n;this.properties?(t=e.create(),t.properties=this.properties,delete this.properties,this.mixins=[t]):this.mixins||(this.mixins=[]);var r=arguments.length,i=this.mixins,s;for(s=0;s<r;s++)t=arguments[s],t instanceof e?i.push(t):(n=e.create(),n.properties=t,i.push(n));return this},M.apply=function(e){return O(e,[this],!1)},M.applyPartial=function(e){return O(e,[this],!0)},M.detect=function(t){if(!t)return!1;if(t instanceof e)return _(t,this,{});var n=Ember.meta(t,!1).mixins;return n?!!n[l(this)]:!1},M.without=function(){var t=new e(this);return t._without=o.call(arguments),t},M.keys=function(){var e={},t={},n=[];D(e,this,t);for(var r in e)e.hasOwnProperty(r)&&n.push(r);return n},e.mixins=function(e){var t=Ember.meta(e,!1).mixins,n=[];if(!t)return n;for(var r in t){var i=t[r];i.properties||n.push(i)}return n},t=new Ember.Descriptor,t.toString=function(){return"(Required Property)"},Ember.required=function(){return t},n=function(e){this.methodName=e},n.prototype=new Ember.Descriptor,Ember.alias=function(e){return new n(e)},Ember.deprecateFunc("Ember.alias is deprecated. Please use Ember.aliasMethod or Ember.computed.alias instead.",Ember.alias),Ember.aliasMethod=function(e){return new n(e)},Ember.observer=function(e){var t=o.call(arguments,1);return e.__ember_observes__=t,e},Ember.immediateObserver=function(){for(var e=0,t=arguments.length;e<t;e++)var n=arguments[e];return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(e){var t=o.call(arguments,1);return e.__ember_observesBefore__=t,e}}(),function(){}(),function(){e("rsvp",[],function(){"use strict";function d(e,t){n.async(function(){e.trigger("promise:resolved",{detail:t}),e.isResolved=!0,e.resolvedValue=t})}function v(e,t){n.async(function(){e.trigger("promise:failed",{detail:t}),e.isRejected=!0,e.rejectedValue=t})}function m(e){var t,n=[],r=new c,i=e.length;i===0&&r.resolve([]);var s=function(e){return function(t){o(e,t)}},o=function(e,t){n[e]=t,--i===0&&r.resolve(n)},u=function(e){r.reject(e)};for(t=0;t<i;t++)e[t].then(s(t),u);return r}var e=typeof window!="undefined"?window:{},t=e.MutationObserver||e.WebKitMutationObserver,n,r;if(typeof process!="undefined"&&{}.toString.call(process)==="[object process]")r=function(e,t){process.nextTick(function(){e.call(t)})};else if(t){var i=[],s=new t(function(){var e=i.slice();i=[],e.forEach(function(e){var t=e[0],n=e[1];t.call(n)})}),o=document.createElement("div");s.observe(o,{attributes:!0}),window.addEventListener("unload",function(){s.disconnect(),s=null}),r=function(e,t){i.push([e,t]),o.setAttribute("drainQueue","drainQueue")}}else r=function(e,t){setTimeout(function(){e.call(t)},1)};var u=function(e,t){this.type=e;for(var n in t){if(!t.hasOwnProperty(n))continue;this[n]=t[n]}},a=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n][0]===t)return n;return-1},f=function(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t},l={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e},on:function(e,t,n){var r=f(this),i,s;e=e.split(/\s+/),n=n||this;while(s=e.shift())i=r[s],i||(i=r[s]=[]),a(i,t)===-1&&i.push([t,n])},off:function(e,t){var n=f(this),r,i,s;e=e.split(/\s+/);while(i=e.shift()){if(!t){n[i]=[];continue}r=n[i],s=a(r,t),s!==-1&&r.splice(s,1)}},trigger:function(e,t){var n=f(this),r,i,s,o,a;if(r=n[e])for(var l=0;l<r.length;l++)i=r[l],s=i[0],o=i[1],typeof t!="object"&&(t={detail:t}),a=new u(e,t),s.call(o,a)}},c=function(){this.on("promise:resolved",function(e){this.trigger("success",{detail:e.detail})},this),this.on("promise:failed",function(e){this.trigger("error",{detail:e.detail})},this)},h=function(){},p=function(e,t,n,r){var i=typeof n=="function",s,o,u,a;if(i)try{s=n(r.detail),u=!0}catch(f){a=!0,o=f}else s=r.detail,u=!0;s&&typeof s.then=="function"?s.then(function(e){t.resolve(e)},function(e){t.reject(e)}):i&&u?t.resolve(s):a?t.reject(o):t[e](s)};return c.prototype={then:function(e,t){var r=new c;return this.isResolved&&n.async(function(){p("resolve",r,e,{detail:this.resolvedValue})},this),this.isRejected&&n.async(function(){p("reject",r,t,{detail:this.rejectedValue})},this),this.on("promise:resolved",function(t){p("resolve",r,e,t)}),this.on("promise:failed",function(e){p("reject",r,t,e)}),r},resolve:function(e){d(this,e),this.resolve=h,this.reject=h},reject:function(e){v(this,e),this.resolve=h,this.reject=h}},l.mixin(c.prototype),n={async:r,Promise:c,Event:u,EventTarget:l,all:m,raiseOnUncaughtExceptions:!0},n})}(),function(){e("container",[],function(){function e(e){this.parent=e,this.dict={}}function t(t){this.parent=t,this.children=[],this.resolver=t&&t.resolver||function(){},this.registry=new e(t&&t.registry),this.cache=new e(t&&t.cache),this.typeInjections=new e(t&&t.typeInjections),this.injections={},this._options=new e(t&&t._options),this._typeOptions=new e(t&&t._typeOptions)}function n(e){throw new Error(e+" is not currently supported on child containers")}function r(e,t){var n=s(e,t,"singleton");return n!==!1}function i(e,t){var n={};if(!t)return n;var r,i;for(var s=0,o=t.length;s<o;s++)r=t[s],i=e.lookup(r.fullName),n[r.property]=i;return n}function s(e,t,n){var r=e._options.get(t);if(r&&r[n]!==undefined)return r[n];var i=t.split(":")[0];r=e._typeOptions.get(i);if(r)return r[n]}function o(e,t){var n=e.normalize(t);return e.resolve(n)}function u(e,t){var n=o(e,t),r=t.split(":"),u=r[0],a=r[1],f;if(s(e,t,"instantiate")===!1)return n;if(n){var l=[];l=l.concat(e.typeInjections.get(u)||[]),l=l.concat(e.injections[t]||[]);var c=i(e,l);return c.container=e,c._debugContainerKey=t,f=n.create(c),f}}function a(e,t){e.cache.eachLocal(function(n,r){if(s(e,n,"instantiate")===!1)return;t(r)})}function f(e){e.cache.eachLocal(function(t,n){if(s(e,t,"instantiate")===!1)return;n.destroy()}),e.cache.dict={}}return e.prototype={get:function(e){var t=this.dict;if(t.hasOwnProperty(e))return t[e];if(this.parent)return this.parent.get(e)},set:function(e,t){this.dict[e]=t},has:function(e){var t=this.dict;return t.hasOwnProperty(e)?!0:this.parent?this.parent.has(e):!1},eachLocal:function(e,t){var n=this.dict;for(var r in n)n.hasOwnProperty(r)&&e.call(t,r,n[r])}},t.prototype={child:function(){var e=new t(this);return this.children.push(e),e},set:function(e,t,n){e[t]=n},register:function(e,t,n,r){var i;e.indexOf(":")!==-1?(r=n,n=t,i=e):i=e+":"+t;var s=this.normalize(i);this.registry.set(s,n),this._options.set(s,r||{})},resolve:function(e){return this.resolver(e)||this.registry.get(e)},normalize:function(e){return e},lookup:function(e,t){e=this.normalize(e),t=t||{};if(this.cache.has(e)&&t.singleton!==!1)return this.cache.get(e);var n=u(this,e);if(!n)return;return r(this,e)&&t.singleton!==!1&&this.cache.set(e,n),n},has:function(e){return this.cache.has(e)?!0:!!o(this,e)},optionsForType:function(e,t){this.parent&&n("optionsForType"),this._typeOptions.set(e,t)},options:function(e,t){this.optionsForType(e,t)},typeInjection:function(e,t,r){this.parent&&n("typeInjection");var i=this.typeInjections.get(e);i||(i=[],this.typeInjections.set(e,i)),i.push({property:t,fullName:r})},injection:function(e,t,r){this.parent&&n("injection");if(e.indexOf(":")===-1)return this.typeInjection(e,t,r);var i=this.injections[e]=this.injections[e]||[];i.push({property:t,fullName:r})},destroy:function(){this.isDestroyed=!0;for(var e=0,t=this.children.length;e<t;e++)this.children[e].destroy();this.children=[],a(this,function(e){e.isDestroying=!0}),a(this,function(e){e.destroy()}),delete this.parent,this.isDestroyed=!0},reset:function(){for(var e=0,t=this.children.length;e<t;e++)f(this.children[e]);f(this)}},t})}(),function(){function i(t,n,r,s){var o,u,a;if("object"!=typeof t||t===null)return t;if(n&&(u=e(r,t))>=0)return s[u];if(Ember.typeOf(t)==="array"){o=t.slice();if(n){u=o.length;while(--u>=0)o[u]=i(o[u],n,r,s)}}else if(Ember.Copyable&&Ember.Copyable.detect(t))o=t.copy(n,r,s);else{o={};for(a in t){if(!t.hasOwnProperty(a))continue;if(a.substring(0,2)==="__")continue;o[a]=n?i(t[a],n,r,s):t[a]}}return n&&(r.push(t),s.push(o)),o}var e=Ember.EnumerableUtils.indexOf,t={},n="Boolean Number String Function Array Date RegExp Object".split(" ");Ember.ArrayPolyfills.forEach.call(n,function(e){t["[object "+e+"]"]=e.toLowerCase()});var r=Object.prototype.toString;Ember.typeOf=function(e){var n;return n=e===null||e===undefined?String(e):t[r.call(e)]||"object",n==="function"?Ember.Object&&Ember.Object.detect(e)&&(n="class"):n==="object"&&(e instanceof Error?n="error":Ember.Object&&e instanceof Ember.Object?n="instance":n="object"),n},Ember.isNone=function(e){return e===null||e===undefined},Ember.none=Ember.deprecateFunc("Ember.none is deprecated. Please use Ember.isNone instead.",Ember.isNone),Ember.isEmpty=function(e){return e===null||e===undefined||e.length===0&&typeof e!="function"||typeof e=="object"&&Ember.get(e,"length")===0},Ember.empty=Ember.deprecateFunc("Ember.empty is deprecated. Please use Ember.isEmpty instead.",Ember.isEmpty),Ember.compare=function o(e,t){if(e===t)return 0;var n=Ember.typeOf(e),r=Ember.typeOf(t),i=Ember.Comparable;if(i){if(n==="instance"&&i.detect(e.constructor))return e.constructor.compare(e,t);if(r==="instance"&&i.detect(t.constructor))return 1-t.constructor.compare(t,e)}var s=Ember.ORDER_DEFINITION_MAPPING;if(!s){var u=Ember.ORDER_DEFINITION;s=Ember.ORDER_DEFINITION_MAPPING={};var a,f;for(a=0,f=u.length;a<f;++a)s[u[a]]=a;delete Ember.ORDER_DEFINITION}var l=s[n],c=s[r];if(l<c)return-1;if(l>c)return 1;switch(n){case"boolean":case"number":if(e<t)return-1;if(e>t)return 1;return 0;case"string":var h=e.localeCompare(t);if(h<0)return-1;if(h>0)return 1;return 0;case"array":var p=e.length,d=t.length,v=Math.min(p,d),m=0,g=0;while(m===0&&g<v)m=o(e[g],t[g]),g++;if(m!==0)return m;if(p<d)return-1;if(p>d)return 1;return 0;case"instance":if(Ember.Comparable&&Ember.Comparable.detect(e))return e.compare(e,t);return 0;case"date":var y=e.getTime(),b=t.getTime();if(y<b)return-1;if(y>b)return 1;return 0;default:return 0}},Ember.copy=function(e,t){return"object"!=typeof e||e===null?e:Ember.Copyable&&Ember.Copyable.detect(e)?e.copy(t):i(e,t,t?[]:null,t?[]:null)},Ember.inspect=function(e){if(typeof e!="object"||e===null)return e+"";var t,n=[];for(var r in e)if(e.hasOwnProperty(r)){t=e[r];if(t==="toString")continue;Ember.typeOf(t)==="function"&&(t="function() { ... }"),n.push(r+": "+t)}return"{"+n.join(", ")+"}"},Ember.isEqual=function(e,t){return e&&"function"==typeof e.isEqual?e.isEqual(t):e===t},Ember.ORDER_DEFINITION=Ember.ENV.ORDER_DEFINITION||["undefined","null","boolean","number","string","array","object","instance","function","class","date"],Ember.keys=Object.keys,Ember.keys||(Ember.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t});var s=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){var e=Error.prototype.constructor.apply(this,arguments);for(var t=0;t<s.length;t++)this[s[t]]=e[s[t]]},Ember.Error.prototype=Ember.create(Error.prototype)}(),function(){var e=/[ _]/g,t={},n=/([a-z])([A-Z])/g,r=/(\-|_|\.|\s)+(.)?/g,i=/([a-z\d])([A-Z]+)/g,s=/\-|\s+/g;Ember.STRINGS={},Ember.String={fmt:function(e,t){var n=0;return e.replace(/%@([0-9]+)?/g,function(e,r){return r=r?parseInt(r,0)-1:n++,e=t[r],(e===null?"(null)":e===undefined?"":e).toString()})},loc:function(e,t){return e=Ember.STRINGS[e]||e,Ember.String.fmt(e,t)},w:function(e){return e.split(/\s+/)},decamelize:function(e){return e.replace(n,"$1_$2").toLowerCase()},dasherize:function(n){var r=t,i=r[n];return i?i:(i=Ember.String.decamelize(n).replace(e,"-"),r[n]=i,i)},camelize:function(e){return e.replace(r,function(e,t,n){return n?n.toUpperCase():""}).replace(/^([A-Z])/,function(e,t,n){return e.toLowerCase()})},classify:function(e){var t=e.split("."),n=[];for(var r=0,i=t.length;r<i;r++){var s=Ember.String.camelize(t[r]);n.push(s.charAt(0).toUpperCase()+s.substr(1))}return n.join(".")},underscore:function(e){return e.replace(i,"$1_$2").replace(s,"_").toLowerCase()},capitalize:function(e){return e.charAt(0).toUpperCase()+e.substr(1)}}}(),function(){var e=Ember.String.fmt,t=Ember.String.w,n=Ember.String.loc,r=Ember.String.camelize,i=Ember.String.decamelize,s=Ember.String.dasherize,o=Ember.String.underscore,u=Ember.String.capitalize,a=Ember.String.classify;if(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)String.prototype.fmt=function(){return e(this,arguments)},String.prototype.w=function(){return t(this)},String.prototype.loc=function(){return n(this,arguments)},String.prototype.camelize=function(){return r(this)},String.prototype.decamelize=function(){return i(this)},String.prototype.dasherize=function(){return s(this)},String.prototype.underscore=function(){return o(this)},String.prototype.classify=function(){return a(this)},String.prototype.capitalize=function(){return u(this)}}(),function(){var e=Array.prototype.slice;if(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.Function)Function.prototype.property=function(){var e=Ember.computed(this);return e.property.apply(e,arguments)},Function.prototype.observes=function(){return this.__ember_observes__=e.call(arguments),this},Function.prototype.observesBefore=function(){return this.__ember_observesBefore__=e.call(arguments),this}}(),function(){}(),function(){function s(){return i.length===0?{}:i.pop()}function o(e){return i.push(e),null}function u(t,n){function i(i){var s=e(i,t);return r?n===s:!!s}var r=arguments.length===2;return i}var e=Ember.get,t=Ember.set,n=Array.prototype.slice,r=Ember.EnumerableUtils.indexOf,i=[];Ember.Enumerable=Ember.Mixin.create({isEnumerable:!0,nextObject:Ember.required(Function),firstObject:Ember.computed(function(){if(e(this,"length")===0)return undefined;var t=s(),n;return n=this.nextObject(0,null,t),o(t),n}).property("[]"),lastObject:Ember.computed(function(){var t=e(this,"length");if(t===0)return undefined;var n=s(),r=0,i,u=null;do u=i,i=this.nextObject(r++,u,n);while(i!==undefined);return o(n),u}).property("[]"),contains:function(e){return this.find(function(t){return t===e})!==undefined},forEach:function(t,n){if(typeof t!="function")throw new TypeError;var r=e(this,"length"),i=null,u=s();n===undefined&&(n=null);for(var a=0;a<r;a++){var f=this.nextObject(a,i,u);t.call(n,f,a,this),i=f}return i=null,u=o(u),this},getEach:function(e){return this.mapProperty(e)},setEach:function(e,n){return this.forEach(function(r){t(r,e,n)})},map:function(e,t){var n=[];return this.forEach(function(r,i,s){n[i]=e.call(t,r,i,s)}),n},mapProperty:function(t){return this.map(function(n){return e(n,t)})},filter:function(e,t){var n=[];return this.forEach(function(r,i,s){e.call(t,r,i,s)&&n.push(r)}),n},reject:function(e,t){return this.filter(function(){return!e.apply(t,arguments)})},filterProperty:function(e,t){return this.filter(u.apply(this,arguments))},rejectProperty:function(t,n){var r=function(r){return e(r,t)===n},i=function(n){return!!e(n,t)},s=arguments.length===2?r:i;return this.reject(s)},find:function(t,n){var r=e(this,"length");n===undefined&&(n=null);var i=null,u,a=!1,f,l=s();for(var c=0;c<r&&!a;c++){u=this.nextObject(c,i,l);if(a=t.call(n,u,c,this))f=u;i=u}return u=i=null,l=o(l),f},findProperty:function(e,t){return this.find(u.apply(this,arguments))},every:function(e,t){return!this.find(function(n,r,i){return!e.call(t,n,r,i)})},everyProperty:function(e,t){return this.every(u.apply(this,arguments))},some:function(e,t){return!!this.find(function(n,r,i){return!!e.call(t,n,r,i)})},someProperty:function(e,t){return this.some(u.apply(this,arguments))},reduce:function(e,t,n){if(typeof e!="function")throw new TypeError;var r=t;return this.forEach(function(t,i){r=e.call(null,r,t,i,this,n)},this),r},invoke:function(e){var t,r=[];return arguments.length>1&&(t=n.call(arguments,1)),this.forEach(function(n,i){var s=n&&n[e];"function"==typeof s&&(r[i]=t?s.apply(n,t):s.call(n))},this),r},toArray:function(){var e=[];return this.forEach(function(t,n){e[n]=t}),e},compact:function(){return this.without(null)},without:function(e){if(!this.contains(e))return this;var t=[];return this.forEach(function(n){n!==e&&(t[t.length]=n)}),t},uniq:function(){var e=[];return this.forEach(function(t){r(e,t)<0&&e.push(t)}),e},"[]":Ember.computed(function(e,t){return this}),addEnumerableObserver:function(t,n){var r=n&&n.willChange||"enumerableWillChange",i=n&&n.didChange||"enumerableDidChange",s=e(this,"hasEnumerableObservers");return s||Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.addListener(this,"@enumerable:before",t,r),Ember.addListener(this,"@enumerable:change",t,i),s||Ember.propertyDidChange(this,"hasEnumerableObservers"),this},removeEnumerableObserver:function(t,n){var r=n&&n.willChange||"enumerableWillChange",i=n&&n.didChange||"enumerableDidChange",s=e(this,"hasEnumerableObservers");return s&&Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.removeListener(this,"@enumerable:before",t,r),Ember.removeListener(this,"@enumerable:change",t,i),s&&Ember.propertyDidChange(this,"hasEnumerableObservers"),this},hasEnumerableObservers:Ember.computed(function(){return Ember.hasListeners(this,"@enumerable:change")||Ember.hasListeners(this,"@enumerable:before")}),enumerableContentWillChange:function(t,n){var r,i,s;return"number"==typeof t?r=t:t?r=e(t,"length"):r=t=-1,"number"==typeof n?i=n:n?i=e(n,"length"):i=n=-1,s=i<0||r<0||i-r!==0,t===-1&&(t=null),n===-1&&(n=null),Ember.propertyWillChange(this,"[]"),s&&Ember.propertyWillChange(this,"length"),Ember.sendEvent(this,"@enumerable:before",[this,t,n]),this},enumerableContentDidChange:function(t,n){var r=this.propertyDidChange,i,s,o;return"number"==typeof t?i=t:t?i=e(t,"length"):i=t=-1,"number"==typeof n?s=n:n?s=e(n,"length"):s=n=-1,o=s<0||i<0||s-i!==0,t===-1&&(t=null),n===-1&&(n=null),Ember.sendEvent(this,"@enumerable:change",[this,t,n]),o&&Ember.propertyDidChange(this,"length"),Ember.propertyDidChange(this,"[]"),this}})}(),function(){function s(e){return e===null||e===undefined}var e=Ember.get,t=Ember.set,n=Ember.meta,r=Ember.EnumerableUtils.map,i=Ember.cacheFor;Ember.Array=Ember.Mixin.create(Ember.Enumerable,{isSCArray:!0,length:Ember.required(),objectAt:function(t){return t<0||t>=e(this,"length")?undefined:e(this,t)},objectsAt:function(e){var t=this;return r(e,function(e){return t.objectAt(e)})},nextObject:function(e){return this.objectAt(e)},"[]":Ember.computed(function(t,n){return n!==undefined&&this.replace(0,e(this,"length"),n),this}),firstObject:Ember.computed(function(){return this.objectAt(0)}),lastObject:Ember.computed(function(){return this.objectAt(e(this,"length")-1)}),contains:function(e){return this.indexOf(e)>=0},slice:function(t,n){var r=[],i=e(this,"length");s(t)&&(t=0);if(s(n)||n>i)n=i;while(t<n)r[r.length]=this.objectAt(t++);return r},indexOf:function(t,n){var r,i=e(this,"length");n===undefined&&(n=0),n<0&&(n+=i);for(r=n;r<i;r++)if(this.objectAt(r,!0)===t)return r;return-1},lastIndexOf:function(t,n){var r,i=e(this,"length");if(n===undefined||n>=i)n=i-1;n<0&&(n+=i);for(r=n;r>=0;r--)if(this.objectAt(r)===t)return r;return-1},addArrayObserver:function(t,n){var r=n&&n.willChange||"arrayWillChange",i=n&&n.didChange||"arrayDidChange",s=e(this,"hasArrayObservers");return s||Ember.propertyWillChange(this,"hasArrayObservers"),Ember.addListener(this,"@array:before",t,r),Ember.addListener(this,"@array:change",t,i),s||Ember.propertyDidChange(this,"hasArrayObservers"),this},removeArrayObserver:function(t,n){var r=n&&n.willChange||"arrayWillChange",i=n&&n.didChange||"arrayDidChange",s=e(this,"hasArrayObservers");return s&&Ember.propertyWillChange(this,"hasArrayObservers"),Ember.removeListener(this,"@array:before",t,r),Ember.removeListener(this,"@array:change",t,i),s&&Ember.propertyDidChange(this,"hasArrayObservers"),this},hasArrayObservers:Ember.computed(function(){return Ember.hasListeners(this,"@array:change")||Ember.hasListeners(this,"@array:before")}),arrayContentWillChange:function(t,n,r){t===undefined?(t=0,n=r=-1):(n===undefined&&(n=-1),r===undefined&&(r=-1)),Ember.isWatching(this,"@each")&&e(this,"@each"),Ember.sendEvent(this,"@array:before",[this,t,n,r]);var i,s;if(t>=0&&n>=0&&e(this,"hasEnumerableObservers")){i=[],s=t+n;for(var o=t;o<s;o++)i.push(this.objectAt(o))}else i=n;return this.enumerableContentWillChange(i,r),this},arrayContentDidChange:function(t,n,r){t===undefined?(t=0,n=r=-1):(n===undefined&&(n=-1),r===undefined&&(r=-1));var s,o;if(t>=0&&r>=0&&e(this,"hasEnumerableObservers")){s=[],o=t+r;for(var u=t;u<o;u++)s.push(this.objectAt(u))}else s=r;this.enumerableContentDidChange(n,s),Ember.sendEvent(this,"@array:change",[this,t,n,r]);var a=e(this,"length"),f=i(this,"firstObject"),l=i(this,"lastObject");return this.objectAt(0)!==f&&(Ember.propertyWillChange(this,"firstObject"),Ember.propertyDidChange(this,"firstObject")),this.objectAt(a-1)!==l&&(Ember.propertyWillChange(this,"lastObject"),Ember.propertyDidChange(this,"lastObject")),this},"@each":Ember.computed(function(){return this.__each||(this.__each=new Ember.EachProxy(this)),this.__each})})}(),function(){Ember.Comparable=Ember.Mixin.create({isComparable:!0,compare:Ember.required(Function)})}(),function(){var e=Ember.get,t=Ember.set;Ember.Copyable=Ember.Mixin.create({copy:Ember.required(Function),frozenCopy:function(){if(Ember.Freezable&&Ember.Freezable.detect(this))return e(this,"isFrozen")?this:this.copy().freeze();throw new Error(Ember.String.fmt("%@ does not support freezing",[this]))}})}(),function(){var e=Ember.get,t=Ember.set;Ember.Freezable=Ember.Mixin.create({isFrozen:!1,freeze:function(){return e(this,"isFrozen")?this:(t(this,"isFrozen",!0),this)}}),Ember.FROZEN_ERROR="Frozen object cannot be modified."}(),function(){var e=Ember.EnumerableUtils.forEach;Ember.MutableEnumerable=Ember.Mixin.create(Ember.Enumerable,{addObject:Ember.required(Function),addObjects:function(t){return Ember.beginPropertyChanges(this),e(t,function(e){this.addObject(e)},this),Ember.endPropertyChanges(this),this},removeObject:Ember.required(Function),removeObjects:function(t){return Ember.beginPropertyChanges(this),e(t,function(e){this.removeObject(e)},this),Ember.endPropertyChanges(this),this}})}(),function(){var e="Index out of range",t=[],n=Ember.get,r=Ember.set,i=Ember.EnumerableUtils.forEach;Ember.MutableArray=Ember.Mixin.create(Ember.Array,Ember.MutableEnumerable,{replace:Ember.required(),clear:function(){var e=n(this,"length");return e===0?this:(this.replace(0,e,t),this)},insertAt:function(t,r){if(t>n(this,"length"))throw new Error(e);return this.replace(t,0,[r]),this},removeAt:function(r,i){if("number"==typeof r){if(r<0||r>=n(this,"length"))throw new Error(e);i===undefined&&(i=1),this.replace(r,i,t)}return this},pushObject:function(e){return this.insertAt(n(this,"length"),e),e},pushObjects:function(e){return this.replace(n(this,"length"),0,e),this},popObject:function(){var e=n(this,"length");if(e===0)return null;var t=this.objectAt(e-1);return this.removeAt(e-1,1),t},shiftObject:function(){if(n(this,"length")===0)return null;var e=this.objectAt(0);return this.removeAt(0),e},unshiftObject:function(e){return this.insertAt(0,e),e},unshiftObjects:function(e){return this.replace(0,0,e),this},reverseObjects:function(){var e=n(this,"length");if(e===0)return this;var t=this.toArray().reverse();return this.replace(0,e,t),this},setObjects:function(e){if(e.length===0)return this.clear();var t=n(this,"length");return this.replace(0,t,e),this},removeObject:function(e){var t=n(this,"length")||0;while(--t>=0){var r=this.objectAt(t);r===e&&this.removeAt(t)}return this},addObject:function(e){return this.contains(e)||this.pushObject(e),this}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.defineProperty;Ember.Observable=Ember.Mixin.create({get:function(t){return e(this,t)},getProperties:function(){var t={},n=arguments;arguments.length===1&&Ember.typeOf(arguments[0])==="array"&&(n=arguments[0]);for(var r=0;r<n.length;r++)t[n[r]]=e(this,n[r]);return t},set:function(e,n){return t(this,e,n),this},setProperties:function(e){return Ember.setProperties(this,e)},beginPropertyChanges:function(){return Ember.beginPropertyChanges(),this},endPropertyChanges:function(){return Ember.endPropertyChanges(),this},propertyWillChange:function(e){return Ember.propertyWillChange(this,e),this},propertyDidChange:function(e){return Ember.propertyDidChange(this,e),this},notifyPropertyChange:function(e){return this.propertyWillChange(e),this.propertyDidChange(e),this},addBeforeObserver:function(e,t,n){Ember.addBeforeObserver(this,e,t,n)},addObserver:function(e,t,n){Ember.addObserver(this,e,t,n)},removeObserver:function(e,t,n){Ember.removeObserver(this,e,t,n)},hasObserverFor:function(e){return Ember.hasListeners(this,e+":change")},getPath:function(e){return this.get(e)},setPath:function(e,t){return this.set(e,t)},getWithDefault:function(e,t){return Ember.getWithDefault(this,e,t)},incrementProperty:function(n,r){return r||(r=1),t(this,n,(e(this,n)||0)+r),e(this,n)},decrementProperty:function(n,r){return r||(r=1),t(this,n,(e(this,n)||0)-r),e(this,n)},toggleProperty:function(n){return t(this,n,!e(this,n)),e(this,n)},cacheFor:function(e){return Ember.cacheFor(this,e)},observersForKey:function(e){return Ember.observersFor(this,e)}})}(),function(){var e=Ember.get,t=Ember.set;Ember.TargetActionSupport=Ember.Mixin.create({target:null,action:null,targetObject:Ember.computed(function(){var t=e(this,"target");if(Ember.typeOf(t)==="string"){var n=e(this,t);return n===undefined&&(n=e(Ember.lookup,t)),n}return t}).property("target"),triggerAction:function(){var t=e(this,"action"),n=e(this,"targetObject");if(n&&t){var r;return typeof n.send=="function"?r=n.send(t,this):(typeof t=="string"&&(t=n[t]),r=t.call(n,this)),r!==!1&&(r=!0),r}return!1}})}(),function(){Ember.Evented=Ember.Mixin.create({on:function(e,t,n){Ember.addListener(this,e,t,n)},one:function(e,t,n){n||(n=t,t=null),Ember.addListener(this,e,t,n,!0)},trigger:function(e){var t=[],n,r;for(n=1,r=arguments.length;n<r;n++)t.push(arguments[n]);Ember.sendEvent(this,e,t)},fire:function(e){this.trigger.apply(this,arguments)},off:function(e,t,n){Ember.removeListener(this,e,t,n)},has:function(e){return Ember.hasListeners(this,e)}})}(),function(){var e=t("rsvp");e.async=function(e,t){Ember.run.schedule("actions",t,e)};var n=Ember.get,r=Array.prototype.slice;Ember.DeferredMixin=Ember.Mixin.create({then:function(e,t){var r=n(this,"promise");return r.then.apply(r,arguments)},resolve:function(e){n(this,"promise").resolve(e)},reject:function(e){n(this,"promise").reject(e)},promise:Ember.computed(function(){return new e.Promise})})}(),function(){}(),function(){Ember.Container=t("container"),Ember.Container.set=Ember.set}(),function(){function w(){var e=!1,t,i,o=function(){e||o.proto(),r(this,s,b),r(this,"_super",b);var u=a(this);u.proto=this;if(t){var f=t;t=null,this.reopen.apply(this,f)}if(i){var c=i;i=null;var h=this.concatenatedProperties;for(var p=0,d=c.length;p<d;p++){var m=c[p];for(var w in
17
+ m){if(!m.hasOwnProperty(w))continue;var E=m[w],S=Ember.IS_BINDING;if(S.test(w)){var x=u.bindings;x?u.hasOwnProperty("bindings")||(x=u.bindings=n(u.bindings)):x=u.bindings={},x[w]=E}var T=u.descs[w];if(h&&y(h,w)>=0){var N=this[w];N?"function"==typeof N.concat?E=N.concat(E):E=Ember.makeArray(N).concat(E):E=Ember.makeArray(E)}T?T.set(this,w,E):typeof this.setUnknownProperty!="function"||w in this?g?Ember.defineProperty(this,w,null,E):this[w]=E:this.setUnknownProperty(w,E)}}}v(this,u),delete u.proto,l(this),this.init.apply(this,arguments)};return o.toString=p.prototype.toString,o.willReopen=function(){e&&(o.PrototypeMixin=p.create(o.PrototypeMixin)),e=!1},o._initMixins=function(e){t=e},o._initProperties=function(e){i=e},o.proto=function(){var t=o.superclass;return t&&t.proto(),e||(e=!0,o.PrototypeMixin.applyPartial(o.prototype),f(o.prototype)),this.prototype},o}function S(e){return function(){return e}}var e=Ember.set,t=Ember.get,n=Ember.create,r=Ember.platform.defineProperty,i=Array.prototype.slice,s=Ember.GUID_KEY,o=Ember.guidFor,u=Ember.generateGuid,a=Ember.meta,f=Ember.rewatch,l=Ember.finishChains,c=Ember.destroy,h=Ember.run.schedule,p=Ember.Mixin,d=p._apply,v=p.finishPartial,m=p.prototype.reopen,g=Ember.ENV.MANDATORY_SETTER,y=Ember.EnumerableUtils.indexOf,b={configurable:!0,writable:!0,enumerable:!1,value:undefined},E=w();E.toString=function(){return"Ember.CoreObject"},E.PrototypeMixin=p.create({reopen:function(){return d(this,arguments,!0),this},isInstance:!0,init:function(){},concatenatedProperties:null,isDestroyed:!1,isDestroying:!1,destroy:function(){if(this._didCallDestroy)return;return this.isDestroying=!0,this._didCallDestroy=!0,this.willDestroy&&this.willDestroy(),h("destroy",this,this._scheduledDestroy),this},_scheduledDestroy:function(){c(this),e(this,"isDestroyed",!0),this.didDestroy&&this.didDestroy()},bind:function(e,t){return t instanceof Ember.Binding||(t=Ember.Binding.from(t)),t.to(e).connect(this),t},toString:function T(){var e=typeof this.toStringExtension=="function",t=e?":"+this.toStringExtension():"",n="<"+this.constructor.toString()+":"+o(this)+t+">";return this.toString=S(n),n}}),E.PrototypeMixin.ownerConstructor=E,Ember.config.overridePrototypeMixin&&Ember.config.overridePrototypeMixin(E.PrototypeMixin),E.__super__=null;var x=p.create({ClassMixin:Ember.required(),PrototypeMixin:Ember.required(),isClass:!0,isMethod:!1,extend:function(){var e=w(),t;return e.ClassMixin=p.create(this.ClassMixin),e.PrototypeMixin=p.create(this.PrototypeMixin),e.ClassMixin.ownerConstructor=e,e.PrototypeMixin.ownerConstructor=e,m.apply(e.PrototypeMixin,arguments),e.superclass=this,e.__super__=this.prototype,t=e.prototype=n(this.prototype),t.constructor=e,u(t,"ember"),a(t).proto=t,e.ClassMixin.apply(e),e},createWithMixins:function(){var e=this;return arguments.length>0&&this._initMixins(arguments),new e},create:function(){var e=this;return arguments.length>0&&this._initProperties(arguments),new e},reopen:function(){return this.willReopen(),m.apply(this.PrototypeMixin,arguments),this},reopenClass:function(){return m.apply(this.ClassMixin,arguments),d(this,arguments,!1),this},detect:function(e){if("function"!=typeof e)return!1;while(e){if(e===this)return!0;e=e.superclass}return!1},detectInstance:function(e){return e instanceof this},metaForProperty:function(e){var t=a(this.proto(),!1).descs[e];return t._meta||{}},eachComputedProperty:function(e,t){var n=this.proto(),r=a(n).descs,i={},s;for(var o in r)s=r[o],s instanceof Ember.ComputedProperty&&e.call(t||this,o,s._meta||i)}});x.ownerConstructor=E,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(x),E.ClassMixin=x,x.apply(E),Ember.CoreObject=E}(),function(){var e=Ember.get,t=Ember.set,n=Ember.guidFor,r=Ember.isNone;Ember.Set=Ember.CoreObject.extend(Ember.MutableEnumerable,Ember.Copyable,Ember.Freezable,{length:0,clear:function(){if(this.isFrozen)throw new Error(Ember.FROZEN_ERROR);var r=e(this,"length");if(r===0)return this;var i;this.enumerableContentWillChange(r,0),Ember.propertyWillChange(this,"firstObject"),Ember.propertyWillChange(this,"lastObject");for(var s=0;s<r;s++)i=n(this[s]),delete this[i],delete this[s];return t(this,"length",0),Ember.propertyDidChange(this,"firstObject"),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(r,0),this},isEqual:function(t){if(!Ember.Enumerable.detect(t))return!1;var n=e(this,"length");if(e(t,"length")!==n)return!1;while(--n>=0)if(!t.contains(this[n]))return!1;return!0},add:Ember.aliasMethod("addObject"),remove:Ember.aliasMethod("removeObject"),pop:function(){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);var t=this.length>0?this[this.length-1]:null;return this.remove(t),t},push:Ember.aliasMethod("addObject"),shift:Ember.aliasMethod("pop"),unshift:Ember.aliasMethod("push"),addEach:Ember.aliasMethod("addObjects"),removeEach:Ember.aliasMethod("removeObjects"),init:function(e){this._super(),e&&this.addObjects(e)},nextObject:function(e){return this[e]},firstObject:Ember.computed(function(){return this.length>0?this[0]:undefined}),lastObject:Ember.computed(function(){return this.length>0?this[this.length-1]:undefined}),addObject:function(i){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(r(i))return this;var s=n(i),o=this[s],u=e(this,"length"),a;return o>=0&&o<u&&this[o]===i?this:(a=[i],this.enumerableContentWillChange(null,a),Ember.propertyWillChange(this,"lastObject"),u=e(this,"length"),this[s]=u,this[u]=i,t(this,"length",u+1),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(null,a),this)},removeObject:function(i){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(r(i))return this;var s=n(i),o=this[s],u=e(this,"length"),a=o===0,f=o===u-1,l,c;return o>=0&&o<u&&this[o]===i&&(c=[i],this.enumerableContentWillChange(c,null),a&&Ember.propertyWillChange(this,"firstObject"),f&&Ember.propertyWillChange(this,"lastObject"),o<u-1&&(l=this[u-1],this[o]=l,this[n(l)]=o),delete this[s],delete this[u-1],t(this,"length",u-1),a&&Ember.propertyDidChange(this,"firstObject"),f&&Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(c,null)),this},contains:function(e){return this[n(e)]>=0},copy:function(){var r=this.constructor,i=new r,s=e(this,"length");t(i,"length",s);while(--s>=0)i[s]=this[s],i[n(this[s])]=s;return i},toString:function(){var e=this.length,t,n=[];for(t=0;t<e;t++)n[t]=this[t];return"Ember.Set<%@>".fmt(n.join(","))}})}(),function(){Ember.Object=Ember.CoreObject.extend(Ember.Observable),Ember.Object.toString=function(){return"Ember.Object"}}(),function(){function o(e,t,n){var u=e.length;r[e.join(".")]=t;for(var f in t){if(!i.call(t,f))continue;var c=t[f];e[u]=f;if(c&&c.toString===l)c.toString=h(e.join(".")),c[a]=e.join(".");else if(c&&c.isNamespace){if(n[s(c)])continue;n[s(c)]=!0,o(e,c,n)}}e.length=u}function u(){var e=Ember.Namespace,t=Ember.lookup,n,r;if(e.PROCESSED)return;for(var i in t){if(i==="parent"||i==="top"||i==="frameElement")continue;if(i==="globalStorage"&&t.StorageList&&t.globalStorage instanceof t.StorageList)continue;if(t.hasOwnProperty&&!t.hasOwnProperty(i))continue;try{n=Ember.lookup[i],r=n&&n.isNamespace}catch(s){continue}r&&(n[a]=i)}}function f(e){var t=e.superclass;if(t)return t[a]?t[a]:f(t);return}function l(){!Ember.BOOTED&&!this[a]&&c();var e;if(this[a])e=this[a];else{var t=f(this);t?e="(subclass of "+t+")":e="(unknown mixin)",this.toString=h(e)}return e}function c(){var e=!n.PROCESSED,t=Ember.anyUnprocessedMixins;e&&(u(),n.PROCESSED=!0);if(e||t){var r=n.NAMESPACES,i;for(var s=0,a=r.length;s<a;s++)i=r[s],o([i.toString()],i,{});Ember.anyUnprocessedMixins=!1}}function h(e){return function(){return e}}var e=Ember.get,t=Ember.ArrayPolyfills.indexOf,n=Ember.Namespace=Ember.Object.extend({isNamespace:!0,init:function(){Ember.Namespace.NAMESPACES.push(this),Ember.Namespace.PROCESSED=!1},toString:function(){var t=e(this,"name");return t?t:(u(),this[Ember.GUID_KEY+"_name"])},nameClasses:function(){o([this.toString()],this,{})},destroy:function(){var e=Ember.Namespace.NAMESPACES;Ember.lookup[this.toString()]=undefined,e.splice(t.call(e,this),1),this._super()}});n.reopenClass({NAMESPACES:[Ember],NAMESPACES_BY_ID:{},PROCESSED:!1,processAll:c,byName:function(e){return Ember.BOOTED||c(),r[e]}});var r=n.NAMESPACES_BY_ID,i={}.hasOwnProperty,s=Ember.guidFor,a=Ember.NAME_KEY=Ember.GUID_KEY+"_name";Ember.Mixin.prototype.toString=l}(),function(){Ember.Application=Ember.Namespace.extend()}(),function(){var e=Ember.get,t=Ember.set;Ember.ArrayProxy=Ember.Object.extend(Ember.MutableArray,{content:null,arrangedContent:Ember.computed.alias("content"),objectAtContent:function(t){return e(this,"arrangedContent").objectAt(t)},replaceContent:function(t,n,r){e(this,"content").replace(t,n,r)},_contentWillChange:Ember.beforeObserver(function(){this._teardownContent()},"content"),_teardownContent:function(){var t=e(this,"content");t&&t.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer(function(){var t=e(this,"content");this._setupContent()},"content"),_setupContent:function(){var t=e(this,"content");t&&t.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},_arrangedContentWillChange:Ember.beforeObserver(function(){var t=e(this,"arrangedContent"),n=t?e(t,"length"):0;this.arrangedContentArrayWillChange(this,0,n,undefined),this.arrangedContentWillChange(this),this._teardownArrangedContent(t)},"arrangedContent"),_arrangedContentDidChange:Ember.observer(function(){var t=e(this,"arrangedContent"),n=t?e(t,"length"):0;this._setupArrangedContent(),this.arrangedContentDidChange(this),this.arrangedContentArrayDidChange(this,0,undefined,n)},"arrangedContent"),_setupArrangedContent:function(){var t=e(this,"arrangedContent");t&&t.addArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},_teardownArrangedContent:function(){var t=e(this,"arrangedContent");t&&t.removeArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},arrangedContentWillChange:Ember.K,arrangedContentDidChange:Ember.K,objectAt:function(t){return e(this,"content")&&this.objectAtContent(t)},length:Ember.computed(function(){var t=e(this,"arrangedContent");return t?e(t,"length"):0}),replace:function(t,n,r){return e(this,"content")&&this.replaceContent(t,n,r),this},arrangedContentArrayWillChange:function(e,t,n,r){this.arrayContentWillChange(t,n,r)},arrangedContentArrayDidChange:function(e,t,n,r){this.arrayContentDidChange(t,n,r)},init:function(){this._super(),this._setupContent(),this._setupArrangedContent()},willDestroy:function(){this._teardownArrangedContent(),this._teardownContent()}})}(),function(){function f(e,t){var n=t.slice(8);if(n in this)return;u(this,n)}function l(e,t){var n=t.slice(8);if(n in this)return;a(this,n)}var e=Ember.get,t=Ember.set,n=Ember.String.fmt,r=Ember.addBeforeObserver,i=Ember.addObserver,s=Ember.removeBeforeObserver,o=Ember.removeObserver,u=Ember.propertyWillChange,a=Ember.propertyDidChange;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer(function(){},"content"),isTruthy:Ember.computed.bool("content"),_debugContainerKey:null,willWatchProperty:function(e){var t="content."+e;r(this,t,null,f),i(this,t,null,l)},didUnwatchProperty:function(e){var t="content."+e;s(this,t,null,f),o(this,t,null,l)},unknownProperty:function(t){var n=e(this,"content");if(n)return e(n,t)},setUnknownProperty:function(n,r){var i=e(this,"content");return t(i,n,r)}})}(),function(){function o(e,t,r,i,s){var o=r._objects,u;o||(o=r._objects={});while(--s>=i){var a=e.objectAt(s);a&&(Ember.addBeforeObserver(a,t,r,"contentKeyWillChange"),Ember.addObserver(a,t,r,"contentKeyDidChange"),u=n(a),o[u]||(o[u]=[]),o[u].push(s))}}function u(e,t,r,i,s){var o=r._objects;o||(o=r._objects={});var u,a;while(--s>=i){var f=e.objectAt(s);f&&(Ember.removeBeforeObserver(f,t,r,"contentKeyWillChange"),Ember.removeObserver(f,t,r,"contentKeyDidChange"),a=n(f),u=o[a],u[u.indexOf(s)]=null)}}var e=Ember.set,t=Ember.get,n=Ember.guidFor,r=Ember.EnumerableUtils.forEach,i=Ember.Object.extend(Ember.Array,{init:function(e,t,n){this._super(),this._keyName=t,this._owner=n,this._content=e},objectAt:function(e){var n=this._content.objectAt(e);return n&&t(n,this._keyName)},length:Ember.computed(function(){var e=this._content;return e?t(e,"length"):0})}),s=/^.+:(before|change)$/;Ember.EachProxy=Ember.Object.extend({init:function(e){this._super(),this._content=e,e.addArrayObserver(this),r(Ember.watchedEvents(this),function(e){this.didAddListener(e)},this)},unknownProperty:function(e,t){var n;return n=new i(this._content,e,this),Ember.defineProperty(this,e,null,n),this.beginObservingContentKey(e),n},arrayWillChange:function(e,t,n,r){var i=this._keys,s,o,a;a=n>0?t+n:-1,Ember.beginPropertyChanges(this);for(s in i){if(!i.hasOwnProperty(s))continue;a>0&&u(e,s,this,t,a),Ember.propertyWillChange(this,s)}Ember.propertyWillChange(this._content,"@each"),Ember.endPropertyChanges(this)},arrayDidChange:function(e,t,n,r){var i=this._keys,s,u,a;a=r>0?t+r:-1,Ember.beginPropertyChanges(this);for(s in i){if(!i.hasOwnProperty(s))continue;a>0&&o(e,s,this,t,a),Ember.propertyDidChange(this,s)}Ember.propertyDidChange(this._content,"@each"),Ember.endPropertyChanges(this)},didAddListener:function(e){s.test(e)&&this.beginObservingContentKey(e.slice(0,-7))},didRemoveListener:function(e){s.test(e)&&this.stopObservingContentKey(e.slice(0,-7))},beginObservingContentKey:function(e){var n=this._keys;n||(n=this._keys={});if(!n[e]){n[e]=1;var r=this._content,i=t(r,"length");o(r,e,this,0,i)}else n[e]++},stopObservingContentKey:function(e){var n=this._keys;if(n&&n[e]>0&&--n[e]<=0){var r=this._content,i=t(r,"length");u(r,e,this,0,i)}},contentKeyWillChange:function(e,t){Ember.propertyWillChange(this,t)},contentKeyDidChange:function(e,t){Ember.propertyDidChange(this,t)}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.Mixin.create(Ember.MutableArray,Ember.Observable,Ember.Copyable,{get:function(e){return e==="length"?this.length:"number"==typeof e?this[e]:this._super(e)},objectAt:function(e){return this[e]},replace:function(t,n,r){if(this.isFrozen)throw Ember.FROZEN_ERROR;var i=r?e(r,"length"):0;this.arrayContentWillChange(t,n,i);if(!r||r.length===0)this.splice(t,n);else{var s=[t,n].concat(r);this.splice.apply(this,s)}return this.arrayContentDidChange(t,n,i),this},unknownProperty:function(e,t){var n;return t!==undefined&&n===undefined&&(n=this[e]=t),n},indexOf:function(e,t){var n,r=this.length;t===undefined?t=0:t=t<0?Math.ceil(t):Math.floor(t),t<0&&(t+=r);for(n=t;n<r;n++)if(this[n]===e)return n;return-1},lastIndexOf:function(e,t){var n,r=this.length;t===undefined?t=r-1:t=t<0?Math.ceil(t):Math.floor(t),t<0&&(t+=r);for(n=t;n>=0;n--)if(this[n]===e)return n;return-1},copy:function(e){return e?this.map(function(e){return Ember.copy(e,!0)}):this.slice()}}),r=["length"];Ember.EnumerableUtils.forEach(n.keys(),function(e){Array.prototype[e]&&r.push(e)}),r.length>0&&(n=n.without.apply(n,r)),Ember.NativeArray=n,Ember.A=function(e){return e===undefined&&(e=[]),Ember.Array.detect(e)?e:Ember.NativeArray.apply(e)},Ember.NativeArray.activate=function(){n.apply(Array.prototype),Ember.A=function(e){return e||[]}},(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.Array)&&Ember.NativeArray.activate()}(),function(){var e=Ember.DeferredMixin,t=Ember.Object,n=Ember.get,r=Ember.Object.extend(e);r.reopenClass({promise:function(e,t){var i=r.create();return e.call(t,i),n(i,"promise")}}),Ember.Deferred=r}(),function(){var e=Ember.ENV.EMBER_LOAD_HOOKS||{},t={};Ember.onLoad=function(n,r){var i;e[n]=e[n]||Ember.A(),e[n].pushObject(r),(i=t[n])&&r(i)},Ember.runLoadHooks=function(n,r){var i;t[n]=r,(i=e[n])&&e[n].forEach(function(e){e(r)})}}(),function(){}(),function(){var e=Ember.get;Ember.ControllerMixin=Ember.Mixin.create({isController:!0,target:null,container:null,store:null,model:Ember.computed.alias("content"),send:function(t){var n=[].slice.call(arguments,1),r;this[t]?this[t].apply(this,n):(r=e(this,"target"))&&r.send.apply(r,arguments)}}),Ember.Controller=Ember.Object.extend(Ember.ControllerMixin)}(),function(){var e=Ember.get,t=Ember.set,n=Ember.EnumerableUtils.forEach;Ember.SortableMixin=Ember.Mixin.create(Ember.MutableEnumerable,{sortProperties:null,sortAscending:!0,orderBy:function(t,r){var i=0,s=e(this,"sortProperties"),o=e(this,"sortAscending");return n(s,function(n){i===0&&(i=Ember.compare(e(t,n),e(r,n)),i!==0&&!o&&(i=-1*i))}),i},destroy:function(){var t=e(this,"content"),r=e(this,"sortProperties");return t&&r&&n(t,function(e){n(r,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},isSorted:Ember.computed.bool("sortProperties"),arrangedContent:Ember.computed("content","sortProperties.@each",function(t,r){var i=e(this,"content"),s=e(this,"isSorted"),o=e(this,"sortProperties"),u=this;return i&&s?(i=i.slice(),i.sort(function(e,t){return u.orderBy(e,t)}),n(i,function(e){n(o,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),Ember.A(i)):i}),_contentWillChange:Ember.beforeObserver(function(){var t=e(this,"content"),r=e(this,"sortProperties");t&&r&&n(t,function(e){n(r,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},"content"),sortAscendingWillChange:Ember.beforeObserver(function(){this._lastSortAscending=e(this,"sortAscending")},"sortAscending"),sortAscendingDidChange:Ember.observer(function(){if(e(this,"sortAscending")!==this._lastSortAscending){var t=e(this,"arrangedContent");t.reverseObjects()}},"sortAscending"),contentArrayWillChange:function(t,r,i,s){var o=e(this,"isSorted");if(o){var u=e(this,"arrangedContent"),a=t.slice(r,r+i),f=e(this,"sortProperties");n(a,function(e){u.removeObject(e),n(f,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(t,r,i,s)},contentArrayDidChange:function(t,r,i,s){var o=e(this,"isSorted"),u=e(this,"sortProperties");if(o){var a=t.slice(r,r+s),f=e(this,"arrangedContent");n(a,function(e){this.insertItemSorted(e),n(u,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(t,r,i,s)},insertItemSorted:function(t){var n=e(this,"arrangedContent"),r=e(n,"length"),i=this._binarySearch(t,0,r);n.insertAt(i,t)},contentItemSortPropertyDidChange:function(t){var n=e(this,"arrangedContent"),r=n.indexOf(t),i=n.objectAt(r-1),s=n.objectAt(r+1),o=i&&this.orderBy(t,i),u=s&&this.orderBy(t,s);if(o<0||u>0)n.removeObject(t),this.insertItemSorted(t)},_binarySearch:function(t,n,r){var i,s,o,u;return n===r?n:(u=e(this,"arrangedContent"),i=n+Math.floor((r-n)/2),s=u.objectAt(i),o=this.orderBy(s,t),o<0?this._binarySearch(t,i+1,r):o>0?this._binarySearch(t,n,i):i)}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.isGlobalPath,r=Ember.EnumerableUtils.forEach,i=Ember.EnumerableUtils.replace;Ember.ArrayController=Ember.ArrayProxy.extend(Ember.ControllerMixin,Ember.SortableMixin,{itemController:null,lookupItemController:function(t){return e(this,"itemController")},objectAtContent:function(t){var n=e(this,"length"),r=e(this,"arrangedContent"),i=r&&r.objectAt(t);if(t>=0&&t<n){var s=this.lookupItemController(i);if(s)return this.controllerAt(t,i,s)}return i},arrangedContentDidChange:function(){this._super(),this._resetSubControllers()},arrayContentDidChange:function(t,n,s){var o=e(this,"_subControllers"),u=o.slice(t,t+n);r(u,function(e){e&&e.destroy()}),i(o,t,n,new Array(s)),this._super(t,n,s)},init:function(){this._super(),this.get("content")||Ember.defineProperty(this,"content",undefined,Ember.A()),this.set("_subControllers",Ember.A())},controllerAt:function(t,n,r){var i=e(this,"container"),s=e(this,"_subControllers"),o=s[t];o||(o=i.lookup("controller:"+r,{singleton:!1}),s[t]=o);if(!o)throw new Error('Could not resolve itemController: "'+r+'"');return o.set("target",this),o.set("content",n),o},_subControllers:null,_resetSubControllers:function(){var t=e(this,"_subControllers");r(t,function(e){e&&e.destroy()}),this.set("_subControllers",Ember.A())}})}(),function(){Ember.ObjectController=Ember.ObjectProxy.extend(Ember.ControllerMixin)}(),function(){}(),function(){}(),function(){var e=Ember.get,t=Ember.set;Ember.State=Ember.Object.extend(Ember.Evented,{isState:!0,parentState:null,start:null,name:null,path:Ember.computed(function(){var t=e(this,"parentState.path"),n=e(this,"name");return t&&(n=t+"."+n),n}),trigger:function(e){this[e]&&this[e].apply(this,[].slice.call(arguments,1)),this._super.apply(this,arguments)},init:function(){var n=e(this,"states"),r;t(this,"childStates",Ember.A()),t(this,"eventTransitions",e(this,"eventTransitions")||{});var i,s,o;if(!n){n={};for(i in this){if(i==="constructor")continue;if(s=this[i]){if(o=s.transitionTarget)this.eventTransitions[i]=o;this.setupChild(n,i,s)}}t(this,"states",n)}else for(i in n)this.setupChild(n,i,n[i]);t(this,"pathsCache",{}),t(this,"pathsCacheNoContext",{})},setupChild:function(n,r,i){if(!i)return!1;i.isState?t(i,"name",r):Ember.State.detect(i)&&(i=i.create({name:r}));if(i.isState)return t(i,"parentState",this),e(this,"childStates").pushObject(i),n[r]=i,i},lookupEventTransition:function(e){var t,n=this;while(n&&!t)t=n.eventTransitions[e],n=n.get("parentState");return t},isLeaf:Ember.computed(function(){return!e(this,"childStates").length}),hasContext:!0,setup:Ember.K,enter:Ember.K,exit:Ember.K}),Ember.State.reopenClass({transitionTo:function(e){var t=function(t,n){var r=[],i,s=Ember.$&&Ember.$.Event;n&&s&&n instanceof s?n.hasOwnProperty("contexts")&&(r=n.contexts.slice()):r=[].slice.call(arguments,1),r.unshift(e),t.transitionTo.apply(t,r)};return t.transitionTarget=e,t}})}(),function(){var e=Ember.get,t=Ember.set,n=Ember.String.fmt,r=Ember.ArrayPolyfills.forEach,i=function(e){this.enterStates=e.enterStates.slice(),this.exitStates=e.exitStates.slice(),this.resolveState=e.resolveState,this.finalState=e.enterStates[e.enterStates.length-1]||e.resolveState};i.prototype={normalize:function(e,t){return this.matchContextsToStates(t),this.addInitialStates(),this.removeUnchangedContexts(e),this},matchContextsToStates:function(t){var n=this.enterStates.length-1,r=[],i,s;while(t.length>0){if(n>=0)i=this.enterStates[n--];else{if(this.enterStates.length){i=e(this.enterStates[0],"parentState");if(!i)throw"Cannot match all contexts to states"}else i=this.resolveState;this.enterStates.unshift(i),this.exitStates.unshift(i)}e(i,"hasContext")?s=t.pop():s=null,r.unshift(s)}this.contexts=r},addInitialStates:function(){var t=this.finalState,n;for(;;){n=e(t,"initialState")||"start",t=e(t,"states."+n);if(!t)break;this.finalState=t,this.enterStates.push(t),this.contexts.push(undefined)}},removeUnchangedContexts:function(e){while(this.enterStates.length>0){if(this.enterStates[0]!==this.exitStates[0])break;if(this.enterStates.length===this.contexts.length){if(e.getStateMeta(this.enterStates[0],"context")!==this.contexts[0])break;this.contexts.shift()}this.resolveState=this.enterStates.shift(),this.exitStates.shift()}}};var s=function(t,r,i){var u=this.enableLogging,a=i?"unhandledEvent":t,f=r[a],l,c,h;l=[].slice.call(arguments,3);if(typeof f=="function")return u&&(i?Ember.Logger.log(n("STATEMANAGER: Unhandled event '%@' being sent to state %@.",[t,e(r,"path")])):Ember.Logger.log(n("STATEMANAGER: Sending event '%@' to state %@.",[t,e(r,"path")]))),h=l,i&&h.unshift(t),h.unshift(this),f.apply(r,h);var p=e(r,"parentState");if(p)return c=l,c.unshift(t,p,i),s.apply(this,c);if(!i)return o.call(this,t,l,!0)},o=function(t,n,r){return n.unshift(t,e(this,"currentState"),r),s.apply(this,n)};Ember.StateManager=Ember.State.extend({init:function(){this._super(),t(this,"stateMeta",Ember.Map.create());var n=e(this,"initialState");!n&&e(this,"states.start")&&(n="start"),n&&this.transitionTo(n)},stateMetaFor:function(t){var n=e(this,"stateMeta"),r=n.get(t);return r||(r={},n.set(t,r)),r},setStateMeta:function(e,n,r){return t(this.stateMetaFor(e),n,r)},getStateMeta:function(t,n){return e(this.stateMetaFor(t),n)},currentState:null,currentPath:Ember.computed.alias("currentState.path"),transitionEvent:"setup",errorOnUnhandledEvent:!0,send:function(e){var t=[].slice.call(arguments,1);return o.call(this,e,t,!1)},unhandledEvent:function(t,n){if(e(this,"errorOnUnhandledEvent"))throw new Ember.Error(this.toString()+" could not respond to event "+n+" in state "+e(this,"currentState.path")+".")},getStateByPath:function(t,n){var r=n.split("."),i=t;for(var s=0,o=r.length;s<o;s++){i=e(e(i,"states"),r[s]);if(!i)break}return i},findStateByPath:function(t,n){var r;while(!r&&t)r=this.getStateByPath(t,n),t=e(t,"parentState");return r},getStatesInPath:function(t,n){if(!n||n==="")return undefined;var r=n.split("."),i=[],s,o;for(var u=0,a=r.length;u<a;u++){s=e(t,"states");if(!s)return undefined;o=e(s,r[u]);if(!o)return undefined;t=o,i.push(o)}return i},goToState:function(){return this.transitionTo.apply(this,arguments)},transitionTo:function(t,n){if(Ember.isEmpty(t))return;var r=n?Array.prototype.slice.call(arguments,1):[],s=e(this,"currentState")||this,o=this.contextFreeTransition(s,t),u=(new i(o)).normalize(this,r);this.enterState(u),this.triggerSetupContext(u)},contextFreeTransition:function(t,n){var r=t.pathsCache[n];if(r)return r;var i=this.getStatesInPath(t,n),s=[],o=t;while(o&&!i){s.unshift(o),o=e(o,"parentState");if(!o){i=this.getStatesInPath(this,n);if(!i)return}i=this.getStatesInPath(o,n)}while(i.length>0&&i[0]===s[0])o=i.shift(),s.shift();var u=t.pathsCache[n]={exitStates:s,enterStates:i,resolveState:o};return u},triggerSetupContext:function(t){var n=t.contexts,i=t.enterStates.length-n.length,s=t.enterStates,o=e(this,"transitionEvent");r.call(s,function(e,t){e.trigger(o,this,n[t-i])},this)},getState:function(t){var n=e(this,t),r=e(this,"parentState");if(n)return n;if(r)return r.getState(t)},enterState:function(n){var i=this.enableLogging,s=n.exitStates.slice(0).reverse();r.call(s,function(e){e.trigger("exit",this)},this),r.call(n.enterStates,function(t){i&&Ember.Logger.log("STATEMANAGER: Entering "+e(t,"path")),t.trigger("enter",this)},this),t(this,"currentState",n.finalState)}})}(),function(){}()})(),typeof location!="undefined"&&(location.hostname==="localhost"||location.hostname==="127.0.0.1")&&console.warn("You are running a production build of Ember on localhost and won't receive detailed error messages. If you want full error messages please use the non-minified build provided on the Ember website.");
@@ -5963,7 +5963,6 @@ define("container",
5963
5963
  register: function(type, name, factory, options) {
5964
5964
  var fullName;
5965
5965
 
5966
-
5967
5966
  if (type.indexOf(':') !== -1){
5968
5967
  options = factory;
5969
5968
  factory = name;
@@ -5973,15 +5972,23 @@ define("container",
5973
5972
  fullName = type + ":" + name;
5974
5973
  }
5975
5974
 
5976
- this.registry.set(fullName, factory);
5977
- this._options.set(fullName, options || {});
5975
+ var normalizedName = this.normalize(fullName);
5976
+
5977
+ this.registry.set(normalizedName, factory);
5978
+ this._options.set(normalizedName, options || {});
5978
5979
  },
5979
5980
 
5980
5981
  resolve: function(fullName) {
5981
5982
  return this.resolver(fullName) || this.registry.get(fullName);
5982
5983
  },
5983
5984
 
5985
+ normalize: function(fullName) {
5986
+ return fullName;
5987
+ },
5988
+
5984
5989
  lookup: function(fullName, options) {
5990
+ fullName = this.normalize(fullName);
5991
+
5985
5992
  options = options || {};
5986
5993
 
5987
5994
  if (this.cache.has(fullName) && options.singleton !== false) {
@@ -6110,7 +6117,8 @@ define("container",
6110
6117
  }
6111
6118
 
6112
6119
  function factoryFor(container, fullName) {
6113
- return container.resolve(fullName);
6120
+ var name = container.normalize(fullName);
6121
+ return container.resolve(name);
6114
6122
  }
6115
6123
 
6116
6124
  function instantiate(container, fullName) {
@@ -10962,40 +10970,8 @@ Ember.Mixin.prototype.toString = classToString;
10962
10970
 
10963
10971
 
10964
10972
  (function() {
10965
- /**
10966
- @module ember
10967
- @submodule ember-runtime
10968
- */
10969
-
10970
- /**
10971
- Defines a namespace that will contain an executable application. This is
10972
- very similar to a normal namespace except that it is expected to include at
10973
- least a 'ready' function which can be run to initialize the application.
10974
-
10975
- Currently `Ember.Application` is very similar to `Ember.Namespace.` However,
10976
- this class may be augmented by additional frameworks so it is important to
10977
- use this instance when building new applications.
10978
-
10979
- # Example Usage
10980
-
10981
- ```javascript
10982
- MyApp = Ember.Application.create({
10983
- VERSION: '1.0.0',
10984
- store: Ember.Store.create().from(Ember.fixtures)
10985
- });
10986
-
10987
- MyApp.ready = function() {
10988
- //..init code goes here...
10989
- }
10990
- ```
10991
-
10992
- @class Application
10993
- @namespace Ember
10994
- @extends Ember.Namespace
10995
- */
10996
10973
  Ember.Application = Ember.Namespace.extend();
10997
10974
 
10998
-
10999
10975
  })();
11000
10976
 
11001
10977
 
@@ -12274,7 +12250,8 @@ Ember.ArrayController = Ember.ArrayProxy.extend(Ember.ControllerMixin,
12274
12250
 
12275
12251
  objectAtContent: function(idx) {
12276
12252
  var length = get(this, 'length'),
12277
- object = get(this,'arrangedContent').objectAt(idx);
12253
+ arrangedContent = get(this,'arrangedContent'),
12254
+ object = arrangedContent && arrangedContent.objectAt(idx);
12278
12255
 
12279
12256
  if (idx >= 0 && idx < length) {
12280
12257
  var controllerClass = this.lookupItemController(object);
@@ -1,7 +1,7 @@
1
1
  (function() {
2
2
  var Ember = { assert: function() {} };
3
- // Version: v1.0.0-pre.4-277-g2c0c237
4
- // Last commit: 2c0c237 (2013-02-21 12:03:23 -0500)
3
+ // Version: v1.0.0-pre.4-293-ge707ffa
4
+ // Last commit: e707ffa (2013-02-23 17:35:13 -0500)
5
5
 
6
6
 
7
7
  (function() {
@@ -1,5 +1,5 @@
1
- // Version: v1.0.0-pre.4-277-g2c0c237
2
- // Last commit: 2c0c237 (2013-02-21 12:03:23 -0500)
1
+ // Version: v1.0.0-pre.4-293-ge707ffa
2
+ // Last commit: e707ffa (2013-02-23 17:35:13 -0500)
3
3
 
4
4
 
5
5
  (function() {
@@ -150,8 +150,8 @@ Ember.deprecateFunc = function(message, func) {
150
150
 
151
151
  })();
152
152
 
153
- // Version: v1.0.0-pre.4-277-g2c0c237
154
- // Last commit: 2c0c237 (2013-02-21 12:03:23 -0500)
153
+ // Version: v1.0.0-pre.4-293-ge707ffa
154
+ // Last commit: e707ffa (2013-02-23 17:35:13 -0500)
155
155
 
156
156
 
157
157
  (function() {
@@ -6123,7 +6123,6 @@ define("container",
6123
6123
  register: function(type, name, factory, options) {
6124
6124
  var fullName;
6125
6125
 
6126
-
6127
6126
  if (type.indexOf(':') !== -1){
6128
6127
  options = factory;
6129
6128
  factory = name;
@@ -6133,15 +6132,23 @@ define("container",
6133
6132
  fullName = type + ":" + name;
6134
6133
  }
6135
6134
 
6136
- this.registry.set(fullName, factory);
6137
- this._options.set(fullName, options || {});
6135
+ var normalizedName = this.normalize(fullName);
6136
+
6137
+ this.registry.set(normalizedName, factory);
6138
+ this._options.set(normalizedName, options || {});
6138
6139
  },
6139
6140
 
6140
6141
  resolve: function(fullName) {
6141
6142
  return this.resolver(fullName) || this.registry.get(fullName);
6142
6143
  },
6143
6144
 
6145
+ normalize: function(fullName) {
6146
+ return fullName;
6147
+ },
6148
+
6144
6149
  lookup: function(fullName, options) {
6150
+ fullName = this.normalize(fullName);
6151
+
6145
6152
  options = options || {};
6146
6153
 
6147
6154
  if (this.cache.has(fullName) && options.singleton !== false) {
@@ -6270,7 +6277,8 @@ define("container",
6270
6277
  }
6271
6278
 
6272
6279
  function factoryFor(container, fullName) {
6273
- return container.resolve(fullName);
6280
+ var name = container.normalize(fullName);
6281
+ return container.resolve(name);
6274
6282
  }
6275
6283
 
6276
6284
  function instantiate(container, fullName) {
@@ -11125,40 +11133,8 @@ Ember.Mixin.prototype.toString = classToString;
11125
11133
 
11126
11134
 
11127
11135
  (function() {
11128
- /**
11129
- @module ember
11130
- @submodule ember-runtime
11131
- */
11132
-
11133
- /**
11134
- Defines a namespace that will contain an executable application. This is
11135
- very similar to a normal namespace except that it is expected to include at
11136
- least a 'ready' function which can be run to initialize the application.
11137
-
11138
- Currently `Ember.Application` is very similar to `Ember.Namespace.` However,
11139
- this class may be augmented by additional frameworks so it is important to
11140
- use this instance when building new applications.
11141
-
11142
- # Example Usage
11143
-
11144
- ```javascript
11145
- MyApp = Ember.Application.create({
11146
- VERSION: '1.0.0',
11147
- store: Ember.Store.create().from(Ember.fixtures)
11148
- });
11149
-
11150
- MyApp.ready = function() {
11151
- //..init code goes here...
11152
- }
11153
- ```
11154
-
11155
- @class Application
11156
- @namespace Ember
11157
- @extends Ember.Namespace
11158
- */
11159
11136
  Ember.Application = Ember.Namespace.extend();
11160
11137
 
11161
-
11162
11138
  })();
11163
11139
 
11164
11140
 
@@ -12440,7 +12416,8 @@ Ember.ArrayController = Ember.ArrayProxy.extend(Ember.ControllerMixin,
12440
12416
 
12441
12417
  objectAtContent: function(idx) {
12442
12418
  var length = get(this, 'length'),
12443
- object = get(this,'arrangedContent').objectAt(idx);
12419
+ arrangedContent = get(this,'arrangedContent'),
12420
+ object = arrangedContent && arrangedContent.objectAt(idx);
12444
12421
 
12445
12422
  if (idx >= 0 && idx < length) {
12446
12423
  var controllerClass = this.lookupItemController(object);
@@ -18700,6 +18677,2211 @@ define("metamorph",
18700
18677
 
18701
18678
  })();
18702
18679
 
18680
+ (function() {
18681
+ /*
18682
+
18683
+ Copyright (C) 2011 by Yehuda Katz
18684
+
18685
+ Permission is hereby granted, free of charge, to any person obtaining a copy
18686
+ of this software and associated documentation files (the "Software"), to deal
18687
+ in the Software without restriction, including without limitation the rights
18688
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18689
+ copies of the Software, and to permit persons to whom the Software is
18690
+ furnished to do so, subject to the following conditions:
18691
+
18692
+ The above copyright notice and this permission notice shall be included in
18693
+ all copies or substantial portions of the Software.
18694
+
18695
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18696
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18697
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18698
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18699
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18700
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18701
+ THE SOFTWARE.
18702
+
18703
+ */
18704
+
18705
+ // lib/handlebars/base.js
18706
+
18707
+ /*jshint eqnull:true*/
18708
+ this.Handlebars = {};
18709
+
18710
+ (function(Handlebars) {
18711
+
18712
+ Handlebars.VERSION = "1.0.0-rc.3";
18713
+ Handlebars.COMPILER_REVISION = 2;
18714
+
18715
+ Handlebars.REVISION_CHANGES = {
18716
+ 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
18717
+ 2: '>= 1.0.0-rc.3'
18718
+ };
18719
+
18720
+ Handlebars.helpers = {};
18721
+ Handlebars.partials = {};
18722
+
18723
+ Handlebars.registerHelper = function(name, fn, inverse) {
18724
+ if(inverse) { fn.not = inverse; }
18725
+ this.helpers[name] = fn;
18726
+ };
18727
+
18728
+ Handlebars.registerPartial = function(name, str) {
18729
+ this.partials[name] = str;
18730
+ };
18731
+
18732
+ Handlebars.registerHelper('helperMissing', function(arg) {
18733
+ if(arguments.length === 2) {
18734
+ return undefined;
18735
+ } else {
18736
+ throw new Error("Could not find property '" + arg + "'");
18737
+ }
18738
+ });
18739
+
18740
+ var toString = Object.prototype.toString, functionType = "[object Function]";
18741
+
18742
+ Handlebars.registerHelper('blockHelperMissing', function(context, options) {
18743
+ var inverse = options.inverse || function() {}, fn = options.fn;
18744
+
18745
+
18746
+ var ret = "";
18747
+ var type = toString.call(context);
18748
+
18749
+ if(type === functionType) { context = context.call(this); }
18750
+
18751
+ if(context === true) {
18752
+ return fn(this);
18753
+ } else if(context === false || context == null) {
18754
+ return inverse(this);
18755
+ } else if(type === "[object Array]") {
18756
+ if(context.length > 0) {
18757
+ return Handlebars.helpers.each(context, options);
18758
+ } else {
18759
+ return inverse(this);
18760
+ }
18761
+ } else {
18762
+ return fn(context);
18763
+ }
18764
+ });
18765
+
18766
+ Handlebars.K = function() {};
18767
+
18768
+ Handlebars.createFrame = Object.create || function(object) {
18769
+ Handlebars.K.prototype = object;
18770
+ var obj = new Handlebars.K();
18771
+ Handlebars.K.prototype = null;
18772
+ return obj;
18773
+ };
18774
+
18775
+ Handlebars.logger = {
18776
+ DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, level: 3,
18777
+
18778
+ methodMap: {0: 'debug', 1: 'info', 2: 'warn', 3: 'error'},
18779
+
18780
+ // can be overridden in the host environment
18781
+ log: function(level, obj) {
18782
+ if (Handlebars.logger.level <= level) {
18783
+ var method = Handlebars.logger.methodMap[level];
18784
+ if (typeof console !== 'undefined' && console[method]) {
18785
+ console[method].call(console, obj);
18786
+ }
18787
+ }
18788
+ }
18789
+ };
18790
+
18791
+ Handlebars.log = function(level, obj) { Handlebars.logger.log(level, obj); };
18792
+
18793
+ Handlebars.registerHelper('each', function(context, options) {
18794
+ var fn = options.fn, inverse = options.inverse;
18795
+ var i = 0, ret = "", data;
18796
+
18797
+ if (options.data) {
18798
+ data = Handlebars.createFrame(options.data);
18799
+ }
18800
+
18801
+ if(context && typeof context === 'object') {
18802
+ if(context instanceof Array){
18803
+ for(var j = context.length; i<j; i++) {
18804
+ if (data) { data.index = i; }
18805
+ ret = ret + fn(context[i], { data: data });
18806
+ }
18807
+ } else {
18808
+ for(var key in context) {
18809
+ if(context.hasOwnProperty(key)) {
18810
+ if(data) { data.key = key; }
18811
+ ret = ret + fn(context[key], {data: data});
18812
+ i++;
18813
+ }
18814
+ }
18815
+ }
18816
+ }
18817
+
18818
+ if(i === 0){
18819
+ ret = inverse(this);
18820
+ }
18821
+
18822
+ return ret;
18823
+ });
18824
+
18825
+ Handlebars.registerHelper('if', function(context, options) {
18826
+ var type = toString.call(context);
18827
+ if(type === functionType) { context = context.call(this); }
18828
+
18829
+ if(!context || Handlebars.Utils.isEmpty(context)) {
18830
+ return options.inverse(this);
18831
+ } else {
18832
+ return options.fn(this);
18833
+ }
18834
+ });
18835
+
18836
+ Handlebars.registerHelper('unless', function(context, options) {
18837
+ var fn = options.fn, inverse = options.inverse;
18838
+ options.fn = inverse;
18839
+ options.inverse = fn;
18840
+
18841
+ return Handlebars.helpers['if'].call(this, context, options);
18842
+ });
18843
+
18844
+ Handlebars.registerHelper('with', function(context, options) {
18845
+ return options.fn(context);
18846
+ });
18847
+
18848
+ Handlebars.registerHelper('log', function(context, options) {
18849
+ var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1;
18850
+ Handlebars.log(level, context);
18851
+ });
18852
+
18853
+ }(this.Handlebars));
18854
+ ;
18855
+ // lib/handlebars/compiler/parser.js
18856
+ /* Jison generated parser */
18857
+ var handlebars = (function(){
18858
+ var parser = {trace: function trace() { },
18859
+ yy: {},
18860
+ symbols_: {"error":2,"root":3,"program":4,"EOF":5,"simpleInverse":6,"statements":7,"statement":8,"openInverse":9,"closeBlock":10,"openBlock":11,"mustache":12,"partial":13,"CONTENT":14,"COMMENT":15,"OPEN_BLOCK":16,"inMustache":17,"CLOSE":18,"OPEN_INVERSE":19,"OPEN_ENDBLOCK":20,"path":21,"OPEN":22,"OPEN_UNESCAPED":23,"OPEN_PARTIAL":24,"partialName":25,"params":26,"hash":27,"DATA":28,"param":29,"STRING":30,"INTEGER":31,"BOOLEAN":32,"hashSegments":33,"hashSegment":34,"ID":35,"EQUALS":36,"PARTIAL_NAME":37,"pathSegments":38,"SEP":39,"$accept":0,"$end":1},
18861
+ terminals_: {2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"OPEN_PARTIAL",28:"DATA",30:"STRING",31:"INTEGER",32:"BOOLEAN",35:"ID",36:"EQUALS",37:"PARTIAL_NAME",39:"SEP"},
18862
+ productions_: [0,[3,2],[4,2],[4,3],[4,2],[4,1],[4,1],[4,0],[7,1],[7,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[6,2],[17,3],[17,2],[17,2],[17,1],[17,1],[26,2],[26,1],[29,1],[29,1],[29,1],[29,1],[29,1],[27,1],[33,2],[33,1],[34,3],[34,3],[34,3],[34,3],[34,3],[25,1],[21,1],[38,3],[38,1]],
18863
+ performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
18864
+
18865
+ var $0 = $$.length - 1;
18866
+ switch (yystate) {
18867
+ case 1: return $$[$0-1];
18868
+ break;
18869
+ case 2: this.$ = new yy.ProgramNode([], $$[$0]);
18870
+ break;
18871
+ case 3: this.$ = new yy.ProgramNode($$[$0-2], $$[$0]);
18872
+ break;
18873
+ case 4: this.$ = new yy.ProgramNode($$[$0-1], []);
18874
+ break;
18875
+ case 5: this.$ = new yy.ProgramNode($$[$0]);
18876
+ break;
18877
+ case 6: this.$ = new yy.ProgramNode([], []);
18878
+ break;
18879
+ case 7: this.$ = new yy.ProgramNode([]);
18880
+ break;
18881
+ case 8: this.$ = [$$[$0]];
18882
+ break;
18883
+ case 9: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
18884
+ break;
18885
+ case 10: this.$ = new yy.BlockNode($$[$0-2], $$[$0-1].inverse, $$[$0-1], $$[$0]);
18886
+ break;
18887
+ case 11: this.$ = new yy.BlockNode($$[$0-2], $$[$0-1], $$[$0-1].inverse, $$[$0]);
18888
+ break;
18889
+ case 12: this.$ = $$[$0];
18890
+ break;
18891
+ case 13: this.$ = $$[$0];
18892
+ break;
18893
+ case 14: this.$ = new yy.ContentNode($$[$0]);
18894
+ break;
18895
+ case 15: this.$ = new yy.CommentNode($$[$0]);
18896
+ break;
18897
+ case 16: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]);
18898
+ break;
18899
+ case 17: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]);
18900
+ break;
18901
+ case 18: this.$ = $$[$0-1];
18902
+ break;
18903
+ case 19: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]);
18904
+ break;
18905
+ case 20: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1], true);
18906
+ break;
18907
+ case 21: this.$ = new yy.PartialNode($$[$0-1]);
18908
+ break;
18909
+ case 22: this.$ = new yy.PartialNode($$[$0-2], $$[$0-1]);
18910
+ break;
18911
+ case 23:
18912
+ break;
18913
+ case 24: this.$ = [[$$[$0-2]].concat($$[$0-1]), $$[$0]];
18914
+ break;
18915
+ case 25: this.$ = [[$$[$0-1]].concat($$[$0]), null];
18916
+ break;
18917
+ case 26: this.$ = [[$$[$0-1]], $$[$0]];
18918
+ break;
18919
+ case 27: this.$ = [[$$[$0]], null];
18920
+ break;
18921
+ case 28: this.$ = [[new yy.DataNode($$[$0])], null];
18922
+ break;
18923
+ case 29: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
18924
+ break;
18925
+ case 30: this.$ = [$$[$0]];
18926
+ break;
18927
+ case 31: this.$ = $$[$0];
18928
+ break;
18929
+ case 32: this.$ = new yy.StringNode($$[$0]);
18930
+ break;
18931
+ case 33: this.$ = new yy.IntegerNode($$[$0]);
18932
+ break;
18933
+ case 34: this.$ = new yy.BooleanNode($$[$0]);
18934
+ break;
18935
+ case 35: this.$ = new yy.DataNode($$[$0]);
18936
+ break;
18937
+ case 36: this.$ = new yy.HashNode($$[$0]);
18938
+ break;
18939
+ case 37: $$[$0-1].push($$[$0]); this.$ = $$[$0-1];
18940
+ break;
18941
+ case 38: this.$ = [$$[$0]];
18942
+ break;
18943
+ case 39: this.$ = [$$[$0-2], $$[$0]];
18944
+ break;
18945
+ case 40: this.$ = [$$[$0-2], new yy.StringNode($$[$0])];
18946
+ break;
18947
+ case 41: this.$ = [$$[$0-2], new yy.IntegerNode($$[$0])];
18948
+ break;
18949
+ case 42: this.$ = [$$[$0-2], new yy.BooleanNode($$[$0])];
18950
+ break;
18951
+ case 43: this.$ = [$$[$0-2], new yy.DataNode($$[$0])];
18952
+ break;
18953
+ case 44: this.$ = new yy.PartialNameNode($$[$0]);
18954
+ break;
18955
+ case 45: this.$ = new yy.IdNode($$[$0]);
18956
+ break;
18957
+ case 46: $$[$0-2].push($$[$0]); this.$ = $$[$0-2];
18958
+ break;
18959
+ case 47: this.$ = [$$[$0]];
18960
+ break;
18961
+ }
18962
+ },
18963
+ table: [{3:1,4:2,5:[2,7],6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],22:[1,14],23:[1,15],24:[1,16]},{1:[3]},{5:[1,17]},{5:[2,6],7:18,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,6],22:[1,14],23:[1,15],24:[1,16]},{5:[2,5],6:20,8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,5],22:[1,14],23:[1,15],24:[1,16]},{17:23,18:[1,22],21:24,28:[1,25],35:[1,27],38:26},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],24:[2,8]},{4:28,6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,7],22:[1,14],23:[1,15],24:[1,16]},{4:29,6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,7],22:[1,14],23:[1,15],24:[1,16]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],24:[2,12]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],24:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],24:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],24:[2,15]},{17:30,21:24,28:[1,25],35:[1,27],38:26},{17:31,21:24,28:[1,25],35:[1,27],38:26},{17:32,21:24,28:[1,25],35:[1,27],38:26},{25:33,37:[1,34]},{1:[2,1]},{5:[2,2],8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,2],22:[1,14],23:[1,15],24:[1,16]},{17:23,21:24,28:[1,25],35:[1,27],38:26},{5:[2,4],7:35,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,4],22:[1,14],23:[1,15],24:[1,16]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],24:[2,9]},{5:[2,23],14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],24:[2,23]},{18:[1,36]},{18:[2,27],21:41,26:37,27:38,28:[1,45],29:39,30:[1,42],31:[1,43],32:[1,44],33:40,34:46,35:[1,47],38:26},{18:[2,28]},{18:[2,45],28:[2,45],30:[2,45],31:[2,45],32:[2,45],35:[2,45],39:[1,48]},{18:[2,47],28:[2,47],30:[2,47],31:[2,47],32:[2,47],35:[2,47],39:[2,47]},{10:49,20:[1,50]},{10:51,20:[1,50]},{18:[1,52]},{18:[1,53]},{18:[1,54]},{18:[1,55],21:56,35:[1,27],38:26},{18:[2,44],35:[2,44]},{5:[2,3],8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,3],22:[1,14],23:[1,15],24:[1,16]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],24:[2,17]},{18:[2,25],21:41,27:57,28:[1,45],29:58,30:[1,42],31:[1,43],32:[1,44],33:40,34:46,35:[1,47],38:26},{18:[2,26]},{18:[2,30],28:[2,30],30:[2,30],31:[2,30],32:[2,30],35:[2,30]},{18:[2,36],34:59,35:[1,60]},{18:[2,31],28:[2,31],30:[2,31],31:[2,31],32:[2,31],35:[2,31]},{18:[2,32],28:[2,32],30:[2,32],31:[2,32],32:[2,32],35:[2,32]},{18:[2,33],28:[2,33],30:[2,33],31:[2,33],32:[2,33],35:[2,33]},{18:[2,34],28:[2,34],30:[2,34],31:[2,34],32:[2,34],35:[2,34]},{18:[2,35],28:[2,35],30:[2,35],31:[2,35],32:[2,35],35:[2,35]},{18:[2,38],35:[2,38]},{18:[2,47],28:[2,47],30:[2,47],31:[2,47],32:[2,47],35:[2,47],36:[1,61],39:[2,47]},{35:[1,62]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],24:[2,10]},{21:63,35:[1,27],38:26},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],24:[2,11]},{14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],24:[2,16]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],24:[2,19]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],24:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],24:[2,21]},{18:[1,64]},{18:[2,24]},{18:[2,29],28:[2,29],30:[2,29],31:[2,29],32:[2,29],35:[2,29]},{18:[2,37],35:[2,37]},{36:[1,61]},{21:65,28:[1,69],30:[1,66],31:[1,67],32:[1,68],35:[1,27],38:26},{18:[2,46],28:[2,46],30:[2,46],31:[2,46],32:[2,46],35:[2,46],39:[2,46]},{18:[1,70]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],24:[2,22]},{18:[2,39],35:[2,39]},{18:[2,40],35:[2,40]},{18:[2,41],35:[2,41]},{18:[2,42],35:[2,42]},{18:[2,43],35:[2,43]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],24:[2,18]}],
18964
+ defaultActions: {17:[2,1],25:[2,28],38:[2,26],57:[2,24]},
18965
+ parseError: function parseError(str, hash) {
18966
+ throw new Error(str);
18967
+ },
18968
+ parse: function parse(input) {
18969
+ var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
18970
+ this.lexer.setInput(input);
18971
+ this.lexer.yy = this.yy;
18972
+ this.yy.lexer = this.lexer;
18973
+ this.yy.parser = this;
18974
+ if (typeof this.lexer.yylloc == "undefined")
18975
+ this.lexer.yylloc = {};
18976
+ var yyloc = this.lexer.yylloc;
18977
+ lstack.push(yyloc);
18978
+ var ranges = this.lexer.options && this.lexer.options.ranges;
18979
+ if (typeof this.yy.parseError === "function")
18980
+ this.parseError = this.yy.parseError;
18981
+ function popStack(n) {
18982
+ stack.length = stack.length - 2 * n;
18983
+ vstack.length = vstack.length - n;
18984
+ lstack.length = lstack.length - n;
18985
+ }
18986
+ function lex() {
18987
+ var token;
18988
+ token = self.lexer.lex() || 1;
18989
+ if (typeof token !== "number") {
18990
+ token = self.symbols_[token] || token;
18991
+ }
18992
+ return token;
18993
+ }
18994
+ var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
18995
+ while (true) {
18996
+ state = stack[stack.length - 1];
18997
+ if (this.defaultActions[state]) {
18998
+ action = this.defaultActions[state];
18999
+ } else {
19000
+ if (symbol === null || typeof symbol == "undefined") {
19001
+ symbol = lex();
19002
+ }
19003
+ action = table[state] && table[state][symbol];
19004
+ }
19005
+ if (typeof action === "undefined" || !action.length || !action[0]) {
19006
+ var errStr = "";
19007
+ if (!recovering) {
19008
+ expected = [];
19009
+ for (p in table[state])
19010
+ if (this.terminals_[p] && p > 2) {
19011
+ expected.push("'" + this.terminals_[p] + "'");
19012
+ }
19013
+ if (this.lexer.showPosition) {
19014
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
19015
+ } else {
19016
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'");
19017
+ }
19018
+ this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
19019
+ }
19020
+ }
19021
+ if (action[0] instanceof Array && action.length > 1) {
19022
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
19023
+ }
19024
+ switch (action[0]) {
19025
+ case 1:
19026
+ stack.push(symbol);
19027
+ vstack.push(this.lexer.yytext);
19028
+ lstack.push(this.lexer.yylloc);
19029
+ stack.push(action[1]);
19030
+ symbol = null;
19031
+ if (!preErrorSymbol) {
19032
+ yyleng = this.lexer.yyleng;
19033
+ yytext = this.lexer.yytext;
19034
+ yylineno = this.lexer.yylineno;
19035
+ yyloc = this.lexer.yylloc;
19036
+ if (recovering > 0)
19037
+ recovering--;
19038
+ } else {
19039
+ symbol = preErrorSymbol;
19040
+ preErrorSymbol = null;
19041
+ }
19042
+ break;
19043
+ case 2:
19044
+ len = this.productions_[action[1]][1];
19045
+ yyval.$ = vstack[vstack.length - len];
19046
+ yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column};
19047
+ if (ranges) {
19048
+ yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
19049
+ }
19050
+ r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
19051
+ if (typeof r !== "undefined") {
19052
+ return r;
19053
+ }
19054
+ if (len) {
19055
+ stack = stack.slice(0, -1 * len * 2);
19056
+ vstack = vstack.slice(0, -1 * len);
19057
+ lstack = lstack.slice(0, -1 * len);
19058
+ }
19059
+ stack.push(this.productions_[action[1]][0]);
19060
+ vstack.push(yyval.$);
19061
+ lstack.push(yyval._$);
19062
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
19063
+ stack.push(newState);
19064
+ break;
19065
+ case 3:
19066
+ return true;
19067
+ }
19068
+ }
19069
+ return true;
19070
+ }
19071
+ };
19072
+ /* Jison generated lexer */
19073
+ var lexer = (function(){
19074
+ var lexer = ({EOF:1,
19075
+ parseError:function parseError(str, hash) {
19076
+ if (this.yy.parser) {
19077
+ this.yy.parser.parseError(str, hash);
19078
+ } else {
19079
+ throw new Error(str);
19080
+ }
19081
+ },
19082
+ setInput:function (input) {
19083
+ this._input = input;
19084
+ this._more = this._less = this.done = false;
19085
+ this.yylineno = this.yyleng = 0;
19086
+ this.yytext = this.matched = this.match = '';
19087
+ this.conditionStack = ['INITIAL'];
19088
+ this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
19089
+ if (this.options.ranges) this.yylloc.range = [0,0];
19090
+ this.offset = 0;
19091
+ return this;
19092
+ },
19093
+ input:function () {
19094
+ var ch = this._input[0];
19095
+ this.yytext += ch;
19096
+ this.yyleng++;
19097
+ this.offset++;
19098
+ this.match += ch;
19099
+ this.matched += ch;
19100
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
19101
+ if (lines) {
19102
+ this.yylineno++;
19103
+ this.yylloc.last_line++;
19104
+ } else {
19105
+ this.yylloc.last_column++;
19106
+ }
19107
+ if (this.options.ranges) this.yylloc.range[1]++;
19108
+
19109
+ this._input = this._input.slice(1);
19110
+ return ch;
19111
+ },
19112
+ unput:function (ch) {
19113
+ var len = ch.length;
19114
+ var lines = ch.split(/(?:\r\n?|\n)/g);
19115
+
19116
+ this._input = ch + this._input;
19117
+ this.yytext = this.yytext.substr(0, this.yytext.length-len-1);
19118
+ //this.yyleng -= len;
19119
+ this.offset -= len;
19120
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
19121
+ this.match = this.match.substr(0, this.match.length-1);
19122
+ this.matched = this.matched.substr(0, this.matched.length-1);
19123
+
19124
+ if (lines.length-1) this.yylineno -= lines.length-1;
19125
+ var r = this.yylloc.range;
19126
+
19127
+ this.yylloc = {first_line: this.yylloc.first_line,
19128
+ last_line: this.yylineno+1,
19129
+ first_column: this.yylloc.first_column,
19130
+ last_column: lines ?
19131
+ (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length:
19132
+ this.yylloc.first_column - len
19133
+ };
19134
+
19135
+ if (this.options.ranges) {
19136
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
19137
+ }
19138
+ return this;
19139
+ },
19140
+ more:function () {
19141
+ this._more = true;
19142
+ return this;
19143
+ },
19144
+ less:function (n) {
19145
+ this.unput(this.match.slice(n));
19146
+ },
19147
+ pastInput:function () {
19148
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
19149
+ return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
19150
+ },
19151
+ upcomingInput:function () {
19152
+ var next = this.match;
19153
+ if (next.length < 20) {
19154
+ next += this._input.substr(0, 20-next.length);
19155
+ }
19156
+ return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
19157
+ },
19158
+ showPosition:function () {
19159
+ var pre = this.pastInput();
19160
+ var c = new Array(pre.length + 1).join("-");
19161
+ return pre + this.upcomingInput() + "\n" + c+"^";
19162
+ },
19163
+ next:function () {
19164
+ if (this.done) {
19165
+ return this.EOF;
19166
+ }
19167
+ if (!this._input) this.done = true;
19168
+
19169
+ var token,
19170
+ match,
19171
+ tempMatch,
19172
+ index,
19173
+ col,
19174
+ lines;
19175
+ if (!this._more) {
19176
+ this.yytext = '';
19177
+ this.match = '';
19178
+ }
19179
+ var rules = this._currentRules();
19180
+ for (var i=0;i < rules.length; i++) {
19181
+ tempMatch = this._input.match(this.rules[rules[i]]);
19182
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
19183
+ match = tempMatch;
19184
+ index = i;
19185
+ if (!this.options.flex) break;
19186
+ }
19187
+ }
19188
+ if (match) {
19189
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
19190
+ if (lines) this.yylineno += lines.length;
19191
+ this.yylloc = {first_line: this.yylloc.last_line,
19192
+ last_line: this.yylineno+1,
19193
+ first_column: this.yylloc.last_column,
19194
+ last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length};
19195
+ this.yytext += match[0];
19196
+ this.match += match[0];
19197
+ this.matches = match;
19198
+ this.yyleng = this.yytext.length;
19199
+ if (this.options.ranges) {
19200
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
19201
+ }
19202
+ this._more = false;
19203
+ this._input = this._input.slice(match[0].length);
19204
+ this.matched += match[0];
19205
+ token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]);
19206
+ if (this.done && this._input) this.done = false;
19207
+ if (token) return token;
19208
+ else return;
19209
+ }
19210
+ if (this._input === "") {
19211
+ return this.EOF;
19212
+ } else {
19213
+ return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
19214
+ {text: "", token: null, line: this.yylineno});
19215
+ }
19216
+ },
19217
+ lex:function lex() {
19218
+ var r = this.next();
19219
+ if (typeof r !== 'undefined') {
19220
+ return r;
19221
+ } else {
19222
+ return this.lex();
19223
+ }
19224
+ },
19225
+ begin:function begin(condition) {
19226
+ this.conditionStack.push(condition);
19227
+ },
19228
+ popState:function popState() {
19229
+ return this.conditionStack.pop();
19230
+ },
19231
+ _currentRules:function _currentRules() {
19232
+ return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
19233
+ },
19234
+ topState:function () {
19235
+ return this.conditionStack[this.conditionStack.length-2];
19236
+ },
19237
+ pushState:function begin(condition) {
19238
+ this.begin(condition);
19239
+ }});
19240
+ lexer.options = {};
19241
+ lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
19242
+
19243
+ var YYSTATE=YY_START
19244
+ switch($avoiding_name_collisions) {
19245
+ case 0:
19246
+ if(yy_.yytext.slice(-1) !== "\\") this.begin("mu");
19247
+ if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1), this.begin("emu");
19248
+ if(yy_.yytext) return 14;
19249
+
19250
+ break;
19251
+ case 1: return 14;
19252
+ break;
19253
+ case 2:
19254
+ if(yy_.yytext.slice(-1) !== "\\") this.popState();
19255
+ if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1);
19256
+ return 14;
19257
+
19258
+ break;
19259
+ case 3: yy_.yytext = yy_.yytext.substr(0, yy_.yyleng-4); this.popState(); return 15;
19260
+ break;
19261
+ case 4: this.begin("par"); return 24;
19262
+ break;
19263
+ case 5: return 16;
19264
+ break;
19265
+ case 6: return 20;
19266
+ break;
19267
+ case 7: return 19;
19268
+ break;
19269
+ case 8: return 19;
19270
+ break;
19271
+ case 9: return 23;
19272
+ break;
19273
+ case 10: return 23;
19274
+ break;
19275
+ case 11: this.popState(); this.begin('com');
19276
+ break;
19277
+ case 12: yy_.yytext = yy_.yytext.substr(3,yy_.yyleng-5); this.popState(); return 15;
19278
+ break;
19279
+ case 13: return 22;
19280
+ break;
19281
+ case 14: return 36;
19282
+ break;
19283
+ case 15: return 35;
19284
+ break;
19285
+ case 16: return 35;
19286
+ break;
19287
+ case 17: return 39;
19288
+ break;
19289
+ case 18: /*ignore whitespace*/
19290
+ break;
19291
+ case 19: this.popState(); return 18;
19292
+ break;
19293
+ case 20: this.popState(); return 18;
19294
+ break;
19295
+ case 21: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\"/g,'"'); return 30;
19296
+ break;
19297
+ case 22: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\'/g,"'"); return 30;
19298
+ break;
19299
+ case 23: yy_.yytext = yy_.yytext.substr(1); return 28;
19300
+ break;
19301
+ case 24: return 32;
19302
+ break;
19303
+ case 25: return 32;
19304
+ break;
19305
+ case 26: return 31;
19306
+ break;
19307
+ case 27: return 35;
19308
+ break;
19309
+ case 28: yy_.yytext = yy_.yytext.substr(1, yy_.yyleng-2); return 35;
19310
+ break;
19311
+ case 29: return 'INVALID';
19312
+ break;
19313
+ case 30: /*ignore whitespace*/
19314
+ break;
19315
+ case 31: this.popState(); return 37;
19316
+ break;
19317
+ case 32: return 5;
19318
+ break;
19319
+ }
19320
+ };
19321
+ lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\{\{>)/,/^(?:\{\{#)/,/^(?:\{\{\/)/,/^(?:\{\{\^)/,/^(?:\{\{\s*else\b)/,/^(?:\{\{\{)/,/^(?:\{\{&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{)/,/^(?:=)/,/^(?:\.(?=[} ]))/,/^(?:\.\.)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}\}\})/,/^(?:\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@[a-zA-Z]+)/,/^(?:true(?=[}\s]))/,/^(?:false(?=[}\s]))/,/^(?:[0-9]+(?=[}\s]))/,/^(?:[a-zA-Z0-9_$-]+(?=[=}\s\/.]))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:\s+)/,/^(?:[a-zA-Z0-9_$-/]+)/,/^(?:$)/];
19322
+ lexer.conditions = {"mu":{"rules":[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,32],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"com":{"rules":[3],"inclusive":false},"par":{"rules":[30,31],"inclusive":false},"INITIAL":{"rules":[0,1,32],"inclusive":true}};
19323
+ return lexer;})()
19324
+ parser.lexer = lexer;
19325
+ function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser;
19326
+ return new Parser;
19327
+ })();;
19328
+ // lib/handlebars/compiler/base.js
19329
+ Handlebars.Parser = handlebars;
19330
+
19331
+ Handlebars.parse = function(input) {
19332
+
19333
+ // Just return if an already-compile AST was passed in.
19334
+ if(input.constructor === Handlebars.AST.ProgramNode) { return input; }
19335
+
19336
+ Handlebars.Parser.yy = Handlebars.AST;
19337
+ return Handlebars.Parser.parse(input);
19338
+ };
19339
+
19340
+ Handlebars.print = function(ast) {
19341
+ return new Handlebars.PrintVisitor().accept(ast);
19342
+ };;
19343
+ // lib/handlebars/compiler/ast.js
19344
+ (function() {
19345
+
19346
+ Handlebars.AST = {};
19347
+
19348
+ Handlebars.AST.ProgramNode = function(statements, inverse) {
19349
+ this.type = "program";
19350
+ this.statements = statements;
19351
+ if(inverse) { this.inverse = new Handlebars.AST.ProgramNode(inverse); }
19352
+ };
19353
+
19354
+ Handlebars.AST.MustacheNode = function(rawParams, hash, unescaped) {
19355
+ this.type = "mustache";
19356
+ this.escaped = !unescaped;
19357
+ this.hash = hash;
19358
+
19359
+ var id = this.id = rawParams[0];
19360
+ var params = this.params = rawParams.slice(1);
19361
+
19362
+ // a mustache is an eligible helper if:
19363
+ // * its id is simple (a single part, not `this` or `..`)
19364
+ var eligibleHelper = this.eligibleHelper = id.isSimple;
19365
+
19366
+ // a mustache is definitely a helper if:
19367
+ // * it is an eligible helper, and
19368
+ // * it has at least one parameter or hash segment
19369
+ this.isHelper = eligibleHelper && (params.length || hash);
19370
+
19371
+ // if a mustache is an eligible helper but not a definite
19372
+ // helper, it is ambiguous, and will be resolved in a later
19373
+ // pass or at runtime.
19374
+ };
19375
+
19376
+ Handlebars.AST.PartialNode = function(partialName, context) {
19377
+ this.type = "partial";
19378
+ this.partialName = partialName;
19379
+ this.context = context;
19380
+ };
19381
+
19382
+ var verifyMatch = function(open, close) {
19383
+ if(open.original !== close.original) {
19384
+ throw new Handlebars.Exception(open.original + " doesn't match " + close.original);
19385
+ }
19386
+ };
19387
+
19388
+ Handlebars.AST.BlockNode = function(mustache, program, inverse, close) {
19389
+ verifyMatch(mustache.id, close);
19390
+ this.type = "block";
19391
+ this.mustache = mustache;
19392
+ this.program = program;
19393
+ this.inverse = inverse;
19394
+
19395
+ if (this.inverse && !this.program) {
19396
+ this.isInverse = true;
19397
+ }
19398
+ };
19399
+
19400
+ Handlebars.AST.ContentNode = function(string) {
19401
+ this.type = "content";
19402
+ this.string = string;
19403
+ };
19404
+
19405
+ Handlebars.AST.HashNode = function(pairs) {
19406
+ this.type = "hash";
19407
+ this.pairs = pairs;
19408
+ };
19409
+
19410
+ Handlebars.AST.IdNode = function(parts) {
19411
+ this.type = "ID";
19412
+ this.original = parts.join(".");
19413
+
19414
+ var dig = [], depth = 0;
19415
+
19416
+ for(var i=0,l=parts.length; i<l; i++) {
19417
+ var part = parts[i];
19418
+
19419
+ if (part === ".." || part === "." || part === "this") {
19420
+ if (dig.length > 0) { throw new Handlebars.Exception("Invalid path: " + this.original); }
19421
+ else if (part === "..") { depth++; }
19422
+ else { this.isScoped = true; }
19423
+ }
19424
+ else { dig.push(part); }
19425
+ }
19426
+
19427
+ this.parts = dig;
19428
+ this.string = dig.join('.');
19429
+ this.depth = depth;
19430
+
19431
+ // an ID is simple if it only has one part, and that part is not
19432
+ // `..` or `this`.
19433
+ this.isSimple = parts.length === 1 && !this.isScoped && depth === 0;
19434
+
19435
+ this.stringModeValue = this.string;
19436
+ };
19437
+
19438
+ Handlebars.AST.PartialNameNode = function(name) {
19439
+ this.type = "PARTIAL_NAME";
19440
+ this.name = name;
19441
+ };
19442
+
19443
+ Handlebars.AST.DataNode = function(id) {
19444
+ this.type = "DATA";
19445
+ this.id = id;
19446
+ };
19447
+
19448
+ Handlebars.AST.StringNode = function(string) {
19449
+ this.type = "STRING";
19450
+ this.string = string;
19451
+ this.stringModeValue = string;
19452
+ };
19453
+
19454
+ Handlebars.AST.IntegerNode = function(integer) {
19455
+ this.type = "INTEGER";
19456
+ this.integer = integer;
19457
+ this.stringModeValue = Number(integer);
19458
+ };
19459
+
19460
+ Handlebars.AST.BooleanNode = function(bool) {
19461
+ this.type = "BOOLEAN";
19462
+ this.bool = bool;
19463
+ this.stringModeValue = bool === "true";
19464
+ };
19465
+
19466
+ Handlebars.AST.CommentNode = function(comment) {
19467
+ this.type = "comment";
19468
+ this.comment = comment;
19469
+ };
19470
+
19471
+ })();;
19472
+ // lib/handlebars/utils.js
19473
+
19474
+ var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
19475
+
19476
+ Handlebars.Exception = function(message) {
19477
+ var tmp = Error.prototype.constructor.apply(this, arguments);
19478
+
19479
+ // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
19480
+ for (var idx = 0; idx < errorProps.length; idx++) {
19481
+ this[errorProps[idx]] = tmp[errorProps[idx]];
19482
+ }
19483
+ };
19484
+ Handlebars.Exception.prototype = new Error();
19485
+
19486
+ // Build out our basic SafeString type
19487
+ Handlebars.SafeString = function(string) {
19488
+ this.string = string;
19489
+ };
19490
+ Handlebars.SafeString.prototype.toString = function() {
19491
+ return this.string.toString();
19492
+ };
19493
+
19494
+ (function() {
19495
+ var escape = {
19496
+ "&": "&amp;",
19497
+ "<": "&lt;",
19498
+ ">": "&gt;",
19499
+ '"': "&quot;",
19500
+ "'": "&#x27;",
19501
+ "`": "&#x60;"
19502
+ };
19503
+
19504
+ var badChars = /[&<>"'`]/g;
19505
+ var possible = /[&<>"'`]/;
19506
+
19507
+ var escapeChar = function(chr) {
19508
+ return escape[chr] || "&amp;";
19509
+ };
19510
+
19511
+ Handlebars.Utils = {
19512
+ escapeExpression: function(string) {
19513
+ // don't escape SafeStrings, since they're already safe
19514
+ if (string instanceof Handlebars.SafeString) {
19515
+ return string.toString();
19516
+ } else if (string == null || string === false) {
19517
+ return "";
19518
+ }
19519
+
19520
+ if(!possible.test(string)) { return string; }
19521
+ return string.replace(badChars, escapeChar);
19522
+ },
19523
+
19524
+ isEmpty: function(value) {
19525
+ if (!value && value !== 0) {
19526
+ return true;
19527
+ } else if(Object.prototype.toString.call(value) === "[object Array]" && value.length === 0) {
19528
+ return true;
19529
+ } else {
19530
+ return false;
19531
+ }
19532
+ }
19533
+ };
19534
+ })();;
19535
+ // lib/handlebars/compiler/compiler.js
19536
+
19537
+ /*jshint eqnull:true*/
19538
+ Handlebars.Compiler = function() {};
19539
+ Handlebars.JavaScriptCompiler = function() {};
19540
+
19541
+ (function(Compiler, JavaScriptCompiler) {
19542
+ // the foundHelper register will disambiguate helper lookup from finding a
19543
+ // function in a context. This is necessary for mustache compatibility, which
19544
+ // requires that context functions in blocks are evaluated by blockHelperMissing,
19545
+ // and then proceed as if the resulting value was provided to blockHelperMissing.
19546
+
19547
+ Compiler.prototype = {
19548
+ compiler: Compiler,
19549
+
19550
+ disassemble: function() {
19551
+ var opcodes = this.opcodes, opcode, out = [], params, param;
19552
+
19553
+ for (var i=0, l=opcodes.length; i<l; i++) {
19554
+ opcode = opcodes[i];
19555
+
19556
+ if (opcode.opcode === 'DECLARE') {
19557
+ out.push("DECLARE " + opcode.name + "=" + opcode.value);
19558
+ } else {
19559
+ params = [];
19560
+ for (var j=0; j<opcode.args.length; j++) {
19561
+ param = opcode.args[j];
19562
+ if (typeof param === "string") {
19563
+ param = "\"" + param.replace("\n", "\\n") + "\"";
19564
+ }
19565
+ params.push(param);
19566
+ }
19567
+ out.push(opcode.opcode + " " + params.join(" "));
19568
+ }
19569
+ }
19570
+
19571
+ return out.join("\n");
19572
+ },
19573
+ equals: function(other) {
19574
+ var len = this.opcodes.length;
19575
+ if (other.opcodes.length !== len) {
19576
+ return false;
19577
+ }
19578
+
19579
+ for (var i = 0; i < len; i++) {
19580
+ var opcode = this.opcodes[i],
19581
+ otherOpcode = other.opcodes[i];
19582
+ if (opcode.opcode !== otherOpcode.opcode || opcode.args.length !== otherOpcode.args.length) {
19583
+ return false;
19584
+ }
19585
+ for (var j = 0; j < opcode.args.length; j++) {
19586
+ if (opcode.args[j] !== otherOpcode.args[j]) {
19587
+ return false;
19588
+ }
19589
+ }
19590
+ }
19591
+ return true;
19592
+ },
19593
+
19594
+ guid: 0,
19595
+
19596
+ compile: function(program, options) {
19597
+ this.children = [];
19598
+ this.depths = {list: []};
19599
+ this.options = options;
19600
+
19601
+ // These changes will propagate to the other compiler components
19602
+ var knownHelpers = this.options.knownHelpers;
19603
+ this.options.knownHelpers = {
19604
+ 'helperMissing': true,
19605
+ 'blockHelperMissing': true,
19606
+ 'each': true,
19607
+ 'if': true,
19608
+ 'unless': true,
19609
+ 'with': true,
19610
+ 'log': true
19611
+ };
19612
+ if (knownHelpers) {
19613
+ for (var name in knownHelpers) {
19614
+ this.options.knownHelpers[name] = knownHelpers[name];
19615
+ }
19616
+ }
19617
+
19618
+ return this.program(program);
19619
+ },
19620
+
19621
+ accept: function(node) {
19622
+ return this[node.type](node);
19623
+ },
19624
+
19625
+ program: function(program) {
19626
+ var statements = program.statements, statement;
19627
+ this.opcodes = [];
19628
+
19629
+ for(var i=0, l=statements.length; i<l; i++) {
19630
+ statement = statements[i];
19631
+ this[statement.type](statement);
19632
+ }
19633
+ this.isSimple = l === 1;
19634
+
19635
+ this.depths.list = this.depths.list.sort(function(a, b) {
19636
+ return a - b;
19637
+ });
19638
+
19639
+ return this;
19640
+ },
19641
+
19642
+ compileProgram: function(program) {
19643
+ var result = new this.compiler().compile(program, this.options);
19644
+ var guid = this.guid++, depth;
19645
+
19646
+ this.usePartial = this.usePartial || result.usePartial;
19647
+
19648
+ this.children[guid] = result;
19649
+
19650
+ for(var i=0, l=result.depths.list.length; i<l; i++) {
19651
+ depth = result.depths.list[i];
19652
+
19653
+ if(depth < 2) { continue; }
19654
+ else { this.addDepth(depth - 1); }
19655
+ }
19656
+
19657
+ return guid;
19658
+ },
19659
+
19660
+ block: function(block) {
19661
+ var mustache = block.mustache,
19662
+ program = block.program,
19663
+ inverse = block.inverse;
19664
+
19665
+ if (program) {
19666
+ program = this.compileProgram(program);
19667
+ }
19668
+
19669
+ if (inverse) {
19670
+ inverse = this.compileProgram(inverse);
19671
+ }
19672
+
19673
+ var type = this.classifyMustache(mustache);
19674
+
19675
+ if (type === "helper") {
19676
+ this.helperMustache(mustache, program, inverse);
19677
+ } else if (type === "simple") {
19678
+ this.simpleMustache(mustache);
19679
+
19680
+ // now that the simple mustache is resolved, we need to
19681
+ // evaluate it by executing `blockHelperMissing`
19682
+ this.opcode('pushProgram', program);
19683
+ this.opcode('pushProgram', inverse);
19684
+ this.opcode('emptyHash');
19685
+ this.opcode('blockValue');
19686
+ } else {
19687
+ this.ambiguousMustache(mustache, program, inverse);
19688
+
19689
+ // now that the simple mustache is resolved, we need to
19690
+ // evaluate it by executing `blockHelperMissing`
19691
+ this.opcode('pushProgram', program);
19692
+ this.opcode('pushProgram', inverse);
19693
+ this.opcode('emptyHash');
19694
+ this.opcode('ambiguousBlockValue');
19695
+ }
19696
+
19697
+ this.opcode('append');
19698
+ },
19699
+
19700
+ hash: function(hash) {
19701
+ var pairs = hash.pairs, pair, val;
19702
+
19703
+ this.opcode('pushHash');
19704
+
19705
+ for(var i=0, l=pairs.length; i<l; i++) {
19706
+ pair = pairs[i];
19707
+ val = pair[1];
19708
+
19709
+ if (this.options.stringParams) {
19710
+ this.opcode('pushStringParam', val.stringModeValue, val.type);
19711
+ } else {
19712
+ this.accept(val);
19713
+ }
19714
+
19715
+ this.opcode('assignToHash', pair[0]);
19716
+ }
19717
+ this.opcode('popHash');
19718
+ },
19719
+
19720
+ partial: function(partial) {
19721
+ var partialName = partial.partialName;
19722
+ this.usePartial = true;
19723
+
19724
+ if(partial.context) {
19725
+ this.ID(partial.context);
19726
+ } else {
19727
+ this.opcode('push', 'depth0');
19728
+ }
19729
+
19730
+ this.opcode('invokePartial', partialName.name);
19731
+ this.opcode('append');
19732
+ },
19733
+
19734
+ content: function(content) {
19735
+ this.opcode('appendContent', content.string);
19736
+ },
19737
+
19738
+ mustache: function(mustache) {
19739
+ var options = this.options;
19740
+ var type = this.classifyMustache(mustache);
19741
+
19742
+ if (type === "simple") {
19743
+ this.simpleMustache(mustache);
19744
+ } else if (type === "helper") {
19745
+ this.helperMustache(mustache);
19746
+ } else {
19747
+ this.ambiguousMustache(mustache);
19748
+ }
19749
+
19750
+ if(mustache.escaped && !options.noEscape) {
19751
+ this.opcode('appendEscaped');
19752
+ } else {
19753
+ this.opcode('append');
19754
+ }
19755
+ },
19756
+
19757
+ ambiguousMustache: function(mustache, program, inverse) {
19758
+ var id = mustache.id,
19759
+ name = id.parts[0],
19760
+ isBlock = program != null || inverse != null;
19761
+
19762
+ this.opcode('getContext', id.depth);
19763
+
19764
+ this.opcode('pushProgram', program);
19765
+ this.opcode('pushProgram', inverse);
19766
+
19767
+ this.opcode('invokeAmbiguous', name, isBlock);
19768
+ },
19769
+
19770
+ simpleMustache: function(mustache) {
19771
+ var id = mustache.id;
19772
+
19773
+ if (id.type === 'DATA') {
19774
+ this.DATA(id);
19775
+ } else if (id.parts.length) {
19776
+ this.ID(id);
19777
+ } else {
19778
+ // Simplified ID for `this`
19779
+ this.addDepth(id.depth);
19780
+ this.opcode('getContext', id.depth);
19781
+ this.opcode('pushContext');
19782
+ }
19783
+
19784
+ this.opcode('resolvePossibleLambda');
19785
+ },
19786
+
19787
+ helperMustache: function(mustache, program, inverse) {
19788
+ var params = this.setupFullMustacheParams(mustache, program, inverse),
19789
+ name = mustache.id.parts[0];
19790
+
19791
+ if (this.options.knownHelpers[name]) {
19792
+ this.opcode('invokeKnownHelper', params.length, name);
19793
+ } else if (this.knownHelpersOnly) {
19794
+ throw new Error("You specified knownHelpersOnly, but used the unknown helper " + name);
19795
+ } else {
19796
+ this.opcode('invokeHelper', params.length, name);
19797
+ }
19798
+ },
19799
+
19800
+ ID: function(id) {
19801
+ this.addDepth(id.depth);
19802
+ this.opcode('getContext', id.depth);
19803
+
19804
+ var name = id.parts[0];
19805
+ if (!name) {
19806
+ this.opcode('pushContext');
19807
+ } else {
19808
+ this.opcode('lookupOnContext', id.parts[0]);
19809
+ }
19810
+
19811
+ for(var i=1, l=id.parts.length; i<l; i++) {
19812
+ this.opcode('lookup', id.parts[i]);
19813
+ }
19814
+ },
19815
+
19816
+ DATA: function(data) {
19817
+ this.options.data = true;
19818
+ this.opcode('lookupData', data.id);
19819
+ },
19820
+
19821
+ STRING: function(string) {
19822
+ this.opcode('pushString', string.string);
19823
+ },
19824
+
19825
+ INTEGER: function(integer) {
19826
+ this.opcode('pushLiteral', integer.integer);
19827
+ },
19828
+
19829
+ BOOLEAN: function(bool) {
19830
+ this.opcode('pushLiteral', bool.bool);
19831
+ },
19832
+
19833
+ comment: function() {},
19834
+
19835
+ // HELPERS
19836
+ opcode: function(name) {
19837
+ this.opcodes.push({ opcode: name, args: [].slice.call(arguments, 1) });
19838
+ },
19839
+
19840
+ declare: function(name, value) {
19841
+ this.opcodes.push({ opcode: 'DECLARE', name: name, value: value });
19842
+ },
19843
+
19844
+ addDepth: function(depth) {
19845
+ if(isNaN(depth)) { throw new Error("EWOT"); }
19846
+ if(depth === 0) { return; }
19847
+
19848
+ if(!this.depths[depth]) {
19849
+ this.depths[depth] = true;
19850
+ this.depths.list.push(depth);
19851
+ }
19852
+ },
19853
+
19854
+ classifyMustache: function(mustache) {
19855
+ var isHelper = mustache.isHelper;
19856
+ var isEligible = mustache.eligibleHelper;
19857
+ var options = this.options;
19858
+
19859
+ // if ambiguous, we can possibly resolve the ambiguity now
19860
+ if (isEligible && !isHelper) {
19861
+ var name = mustache.id.parts[0];
19862
+
19863
+ if (options.knownHelpers[name]) {
19864
+ isHelper = true;
19865
+ } else if (options.knownHelpersOnly) {
19866
+ isEligible = false;
19867
+ }
19868
+ }
19869
+
19870
+ if (isHelper) { return "helper"; }
19871
+ else if (isEligible) { return "ambiguous"; }
19872
+ else { return "simple"; }
19873
+ },
19874
+
19875
+ pushParams: function(params) {
19876
+ var i = params.length, param;
19877
+
19878
+ while(i--) {
19879
+ param = params[i];
19880
+
19881
+ if(this.options.stringParams) {
19882
+ if(param.depth) {
19883
+ this.addDepth(param.depth);
19884
+ }
19885
+
19886
+ this.opcode('getContext', param.depth || 0);
19887
+ this.opcode('pushStringParam', param.stringModeValue, param.type);
19888
+ } else {
19889
+ this[param.type](param);
19890
+ }
19891
+ }
19892
+ },
19893
+
19894
+ setupMustacheParams: function(mustache) {
19895
+ var params = mustache.params;
19896
+ this.pushParams(params);
19897
+
19898
+ if(mustache.hash) {
19899
+ this.hash(mustache.hash);
19900
+ } else {
19901
+ this.opcode('emptyHash');
19902
+ }
19903
+
19904
+ return params;
19905
+ },
19906
+
19907
+ // this will replace setupMustacheParams when we're done
19908
+ setupFullMustacheParams: function(mustache, program, inverse) {
19909
+ var params = mustache.params;
19910
+ this.pushParams(params);
19911
+
19912
+ this.opcode('pushProgram', program);
19913
+ this.opcode('pushProgram', inverse);
19914
+
19915
+ if(mustache.hash) {
19916
+ this.hash(mustache.hash);
19917
+ } else {
19918
+ this.opcode('emptyHash');
19919
+ }
19920
+
19921
+ return params;
19922
+ }
19923
+ };
19924
+
19925
+ var Literal = function(value) {
19926
+ this.value = value;
19927
+ };
19928
+
19929
+ JavaScriptCompiler.prototype = {
19930
+ // PUBLIC API: You can override these methods in a subclass to provide
19931
+ // alternative compiled forms for name lookup and buffering semantics
19932
+ nameLookup: function(parent, name /* , type*/) {
19933
+ if (/^[0-9]+$/.test(name)) {
19934
+ return parent + "[" + name + "]";
19935
+ } else if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {
19936
+ return parent + "." + name;
19937
+ }
19938
+ else {
19939
+ return parent + "['" + name + "']";
19940
+ }
19941
+ },
19942
+
19943
+ appendToBuffer: function(string) {
19944
+ if (this.environment.isSimple) {
19945
+ return "return " + string + ";";
19946
+ } else {
19947
+ return {
19948
+ appendToBuffer: true,
19949
+ content: string,
19950
+ toString: function() { return "buffer += " + string + ";"; }
19951
+ };
19952
+ }
19953
+ },
19954
+
19955
+ initializeBuffer: function() {
19956
+ return this.quotedString("");
19957
+ },
19958
+
19959
+ namespace: "Handlebars",
19960
+ // END PUBLIC API
19961
+
19962
+ compile: function(environment, options, context, asObject) {
19963
+ this.environment = environment;
19964
+ this.options = options || {};
19965
+
19966
+ Handlebars.log(Handlebars.logger.DEBUG, this.environment.disassemble() + "\n\n");
19967
+
19968
+ this.name = this.environment.name;
19969
+ this.isChild = !!context;
19970
+ this.context = context || {
19971
+ programs: [],
19972
+ environments: [],
19973
+ aliases: { }
19974
+ };
19975
+
19976
+ this.preamble();
19977
+
19978
+ this.stackSlot = 0;
19979
+ this.stackVars = [];
19980
+ this.registers = { list: [] };
19981
+ this.compileStack = [];
19982
+ this.inlineStack = [];
19983
+
19984
+ this.compileChildren(environment, options);
19985
+
19986
+ var opcodes = environment.opcodes, opcode;
19987
+
19988
+ this.i = 0;
19989
+
19990
+ for(l=opcodes.length; this.i<l; this.i++) {
19991
+ opcode = opcodes[this.i];
19992
+
19993
+ if(opcode.opcode === 'DECLARE') {
19994
+ this[opcode.name] = opcode.value;
19995
+ } else {
19996
+ this[opcode.opcode].apply(this, opcode.args);
19997
+ }
19998
+ }
19999
+
20000
+ return this.createFunctionContext(asObject);
20001
+ },
20002
+
20003
+ nextOpcode: function() {
20004
+ var opcodes = this.environment.opcodes;
20005
+ return opcodes[this.i + 1];
20006
+ },
20007
+
20008
+ eat: function() {
20009
+ this.i = this.i + 1;
20010
+ },
20011
+
20012
+ preamble: function() {
20013
+ var out = [];
20014
+
20015
+ if (!this.isChild) {
20016
+ var namespace = this.namespace;
20017
+ var copies = "helpers = helpers || " + namespace + ".helpers;";
20018
+ if (this.environment.usePartial) { copies = copies + " partials = partials || " + namespace + ".partials;"; }
20019
+ if (this.options.data) { copies = copies + " data = data || {};"; }
20020
+ out.push(copies);
20021
+ } else {
20022
+ out.push('');
20023
+ }
20024
+
20025
+ if (!this.environment.isSimple) {
20026
+ out.push(", buffer = " + this.initializeBuffer());
20027
+ } else {
20028
+ out.push("");
20029
+ }
20030
+
20031
+ // track the last context pushed into place to allow skipping the
20032
+ // getContext opcode when it would be a noop
20033
+ this.lastContext = 0;
20034
+ this.source = out;
20035
+ },
20036
+
20037
+ createFunctionContext: function(asObject) {
20038
+ var locals = this.stackVars.concat(this.registers.list);
20039
+
20040
+ if(locals.length > 0) {
20041
+ this.source[1] = this.source[1] + ", " + locals.join(", ");
20042
+ }
20043
+
20044
+ // Generate minimizer alias mappings
20045
+ if (!this.isChild) {
20046
+ for (var alias in this.context.aliases) {
20047
+ this.source[1] = this.source[1] + ', ' + alias + '=' + this.context.aliases[alias];
20048
+ }
20049
+ }
20050
+
20051
+ if (this.source[1]) {
20052
+ this.source[1] = "var " + this.source[1].substring(2) + ";";
20053
+ }
20054
+
20055
+ // Merge children
20056
+ if (!this.isChild) {
20057
+ this.source[1] += '\n' + this.context.programs.join('\n') + '\n';
20058
+ }
20059
+
20060
+ if (!this.environment.isSimple) {
20061
+ this.source.push("return buffer;");
20062
+ }
20063
+
20064
+ var params = this.isChild ? ["depth0", "data"] : ["Handlebars", "depth0", "helpers", "partials", "data"];
20065
+
20066
+ for(var i=0, l=this.environment.depths.list.length; i<l; i++) {
20067
+ params.push("depth" + this.environment.depths.list[i]);
20068
+ }
20069
+
20070
+ // Perform a second pass over the output to merge content when possible
20071
+ var source = this.mergeSource();
20072
+
20073
+ if (!this.isChild) {
20074
+ var revision = Handlebars.COMPILER_REVISION,
20075
+ versions = Handlebars.REVISION_CHANGES[revision];
20076
+ source = "this.compilerInfo = ["+revision+",'"+versions+"'];\n"+source;
20077
+ }
20078
+
20079
+ if (asObject) {
20080
+ params.push(source);
20081
+
20082
+ return Function.apply(this, params);
20083
+ } else {
20084
+ var functionSource = 'function ' + (this.name || '') + '(' + params.join(',') + ') {\n ' + source + '}';
20085
+ Handlebars.log(Handlebars.logger.DEBUG, functionSource + "\n\n");
20086
+ return functionSource;
20087
+ }
20088
+ },
20089
+ mergeSource: function() {
20090
+ // WARN: We are not handling the case where buffer is still populated as the source should
20091
+ // not have buffer append operations as their final action.
20092
+ var source = '',
20093
+ buffer;
20094
+ for (var i = 0, len = this.source.length; i < len; i++) {
20095
+ var line = this.source[i];
20096
+ if (line.appendToBuffer) {
20097
+ if (buffer) {
20098
+ buffer = buffer + '\n + ' + line.content;
20099
+ } else {
20100
+ buffer = line.content;
20101
+ }
20102
+ } else {
20103
+ if (buffer) {
20104
+ source += 'buffer += ' + buffer + ';\n ';
20105
+ buffer = undefined;
20106
+ }
20107
+ source += line + '\n ';
20108
+ }
20109
+ }
20110
+ return source;
20111
+ },
20112
+
20113
+ // [blockValue]
20114
+ //
20115
+ // On stack, before: hash, inverse, program, value
20116
+ // On stack, after: return value of blockHelperMissing
20117
+ //
20118
+ // The purpose of this opcode is to take a block of the form
20119
+ // `{{#foo}}...{{/foo}}`, resolve the value of `foo`, and
20120
+ // replace it on the stack with the result of properly
20121
+ // invoking blockHelperMissing.
20122
+ blockValue: function() {
20123
+ this.context.aliases.blockHelperMissing = 'helpers.blockHelperMissing';
20124
+
20125
+ var params = ["depth0"];
20126
+ this.setupParams(0, params);
20127
+
20128
+ this.replaceStack(function(current) {
20129
+ params.splice(1, 0, current);
20130
+ return "blockHelperMissing.call(" + params.join(", ") + ")";
20131
+ });
20132
+ },
20133
+
20134
+ // [ambiguousBlockValue]
20135
+ //
20136
+ // On stack, before: hash, inverse, program, value
20137
+ // Compiler value, before: lastHelper=value of last found helper, if any
20138
+ // On stack, after, if no lastHelper: same as [blockValue]
20139
+ // On stack, after, if lastHelper: value
20140
+ ambiguousBlockValue: function() {
20141
+ this.context.aliases.blockHelperMissing = 'helpers.blockHelperMissing';
20142
+
20143
+ var params = ["depth0"];
20144
+ this.setupParams(0, params);
20145
+
20146
+ var current = this.topStack();
20147
+ params.splice(1, 0, current);
20148
+
20149
+ // Use the options value generated from the invocation
20150
+ params[params.length-1] = 'options';
20151
+
20152
+ this.source.push("if (!" + this.lastHelper + ") { " + current + " = blockHelperMissing.call(" + params.join(", ") + "); }");
20153
+ },
20154
+
20155
+ // [appendContent]
20156
+ //
20157
+ // On stack, before: ...
20158
+ // On stack, after: ...
20159
+ //
20160
+ // Appends the string value of `content` to the current buffer
20161
+ appendContent: function(content) {
20162
+ this.source.push(this.appendToBuffer(this.quotedString(content)));
20163
+ },
20164
+
20165
+ // [append]
20166
+ //
20167
+ // On stack, before: value, ...
20168
+ // On stack, after: ...
20169
+ //
20170
+ // Coerces `value` to a String and appends it to the current buffer.
20171
+ //
20172
+ // If `value` is truthy, or 0, it is coerced into a string and appended
20173
+ // Otherwise, the empty string is appended
20174
+ append: function() {
20175
+ // Force anything that is inlined onto the stack so we don't have duplication
20176
+ // when we examine local
20177
+ this.flushInline();
20178
+ var local = this.popStack();
20179
+ this.source.push("if(" + local + " || " + local + " === 0) { " + this.appendToBuffer(local) + " }");
20180
+ if (this.environment.isSimple) {
20181
+ this.source.push("else { " + this.appendToBuffer("''") + " }");
20182
+ }
20183
+ },
20184
+
20185
+ // [appendEscaped]
20186
+ //
20187
+ // On stack, before: value, ...
20188
+ // On stack, after: ...
20189
+ //
20190
+ // Escape `value` and append it to the buffer
20191
+ appendEscaped: function() {
20192
+ this.context.aliases.escapeExpression = 'this.escapeExpression';
20193
+
20194
+ this.source.push(this.appendToBuffer("escapeExpression(" + this.popStack() + ")"));
20195
+ },
20196
+
20197
+ // [getContext]
20198
+ //
20199
+ // On stack, before: ...
20200
+ // On stack, after: ...
20201
+ // Compiler value, after: lastContext=depth
20202
+ //
20203
+ // Set the value of the `lastContext` compiler value to the depth
20204
+ getContext: function(depth) {
20205
+ if(this.lastContext !== depth) {
20206
+ this.lastContext = depth;
20207
+ }
20208
+ },
20209
+
20210
+ // [lookupOnContext]
20211
+ //
20212
+ // On stack, before: ...
20213
+ // On stack, after: currentContext[name], ...
20214
+ //
20215
+ // Looks up the value of `name` on the current context and pushes
20216
+ // it onto the stack.
20217
+ lookupOnContext: function(name) {
20218
+ this.push(this.nameLookup('depth' + this.lastContext, name, 'context'));
20219
+ },
20220
+
20221
+ // [pushContext]
20222
+ //
20223
+ // On stack, before: ...
20224
+ // On stack, after: currentContext, ...
20225
+ //
20226
+ // Pushes the value of the current context onto the stack.
20227
+ pushContext: function() {
20228
+ this.pushStackLiteral('depth' + this.lastContext);
20229
+ },
20230
+
20231
+ // [resolvePossibleLambda]
20232
+ //
20233
+ // On stack, before: value, ...
20234
+ // On stack, after: resolved value, ...
20235
+ //
20236
+ // If the `value` is a lambda, replace it on the stack by
20237
+ // the return value of the lambda
20238
+ resolvePossibleLambda: function() {
20239
+ this.context.aliases.functionType = '"function"';
20240
+
20241
+ this.replaceStack(function(current) {
20242
+ return "typeof " + current + " === functionType ? " + current + ".apply(depth0) : " + current;
20243
+ });
20244
+ },
20245
+
20246
+ // [lookup]
20247
+ //
20248
+ // On stack, before: value, ...
20249
+ // On stack, after: value[name], ...
20250
+ //
20251
+ // Replace the value on the stack with the result of looking
20252
+ // up `name` on `value`
20253
+ lookup: function(name) {
20254
+ this.replaceStack(function(current) {
20255
+ return current + " == null || " + current + " === false ? " + current + " : " + this.nameLookup(current, name, 'context');
20256
+ });
20257
+ },
20258
+
20259
+ // [lookupData]
20260
+ //
20261
+ // On stack, before: ...
20262
+ // On stack, after: data[id], ...
20263
+ //
20264
+ // Push the result of looking up `id` on the current data
20265
+ lookupData: function(id) {
20266
+ this.push(this.nameLookup('data', id, 'data'));
20267
+ },
20268
+
20269
+ // [pushStringParam]
20270
+ //
20271
+ // On stack, before: ...
20272
+ // On stack, after: string, currentContext, ...
20273
+ //
20274
+ // This opcode is designed for use in string mode, which
20275
+ // provides the string value of a parameter along with its
20276
+ // depth rather than resolving it immediately.
20277
+ pushStringParam: function(string, type) {
20278
+ this.pushStackLiteral('depth' + this.lastContext);
20279
+
20280
+ this.pushString(type);
20281
+
20282
+ if (typeof string === 'string') {
20283
+ this.pushString(string);
20284
+ } else {
20285
+ this.pushStackLiteral(string);
20286
+ }
20287
+ },
20288
+
20289
+ emptyHash: function() {
20290
+ this.pushStackLiteral('{}');
20291
+
20292
+ if (this.options.stringParams) {
20293
+ this.register('hashTypes', '{}');
20294
+ }
20295
+ },
20296
+ pushHash: function() {
20297
+ this.hash = {values: [], types: []};
20298
+ },
20299
+ popHash: function() {
20300
+ var hash = this.hash;
20301
+ this.hash = undefined;
20302
+
20303
+ if (this.options.stringParams) {
20304
+ this.register('hashTypes', '{' + hash.types.join(',') + '}');
20305
+ }
20306
+ this.push('{\n ' + hash.values.join(',\n ') + '\n }');
20307
+ },
20308
+
20309
+ // [pushString]
20310
+ //
20311
+ // On stack, before: ...
20312
+ // On stack, after: quotedString(string), ...
20313
+ //
20314
+ // Push a quoted version of `string` onto the stack
20315
+ pushString: function(string) {
20316
+ this.pushStackLiteral(this.quotedString(string));
20317
+ },
20318
+
20319
+ // [push]
20320
+ //
20321
+ // On stack, before: ...
20322
+ // On stack, after: expr, ...
20323
+ //
20324
+ // Push an expression onto the stack
20325
+ push: function(expr) {
20326
+ this.inlineStack.push(expr);
20327
+ return expr;
20328
+ },
20329
+
20330
+ // [pushLiteral]
20331
+ //
20332
+ // On stack, before: ...
20333
+ // On stack, after: value, ...
20334
+ //
20335
+ // Pushes a value onto the stack. This operation prevents
20336
+ // the compiler from creating a temporary variable to hold
20337
+ // it.
20338
+ pushLiteral: function(value) {
20339
+ this.pushStackLiteral(value);
20340
+ },
20341
+
20342
+ // [pushProgram]
20343
+ //
20344
+ // On stack, before: ...
20345
+ // On stack, after: program(guid), ...
20346
+ //
20347
+ // Push a program expression onto the stack. This takes
20348
+ // a compile-time guid and converts it into a runtime-accessible
20349
+ // expression.
20350
+ pushProgram: function(guid) {
20351
+ if (guid != null) {
20352
+ this.pushStackLiteral(this.programExpression(guid));
20353
+ } else {
20354
+ this.pushStackLiteral(null);
20355
+ }
20356
+ },
20357
+
20358
+ // [invokeHelper]
20359
+ //
20360
+ // On stack, before: hash, inverse, program, params..., ...
20361
+ // On stack, after: result of helper invocation
20362
+ //
20363
+ // Pops off the helper's parameters, invokes the helper,
20364
+ // and pushes the helper's return value onto the stack.
20365
+ //
20366
+ // If the helper is not found, `helperMissing` is called.
20367
+ invokeHelper: function(paramSize, name) {
20368
+ this.context.aliases.helperMissing = 'helpers.helperMissing';
20369
+
20370
+ var helper = this.lastHelper = this.setupHelper(paramSize, name, true);
20371
+
20372
+ this.push(helper.name);
20373
+ this.replaceStack(function(name) {
20374
+ return name + ' ? ' + name + '.call(' +
20375
+ helper.callParams + ") " + ": helperMissing.call(" +
20376
+ helper.helperMissingParams + ")";
20377
+ });
20378
+ },
20379
+
20380
+ // [invokeKnownHelper]
20381
+ //
20382
+ // On stack, before: hash, inverse, program, params..., ...
20383
+ // On stack, after: result of helper invocation
20384
+ //
20385
+ // This operation is used when the helper is known to exist,
20386
+ // so a `helperMissing` fallback is not required.
20387
+ invokeKnownHelper: function(paramSize, name) {
20388
+ var helper = this.setupHelper(paramSize, name);
20389
+ this.push(helper.name + ".call(" + helper.callParams + ")");
20390
+ },
20391
+
20392
+ // [invokeAmbiguous]
20393
+ //
20394
+ // On stack, before: hash, inverse, program, params..., ...
20395
+ // On stack, after: result of disambiguation
20396
+ //
20397
+ // This operation is used when an expression like `{{foo}}`
20398
+ // is provided, but we don't know at compile-time whether it
20399
+ // is a helper or a path.
20400
+ //
20401
+ // This operation emits more code than the other options,
20402
+ // and can be avoided by passing the `knownHelpers` and
20403
+ // `knownHelpersOnly` flags at compile-time.
20404
+ invokeAmbiguous: function(name, helperCall) {
20405
+ this.context.aliases.functionType = '"function"';
20406
+
20407
+ this.pushStackLiteral('{}'); // Hash value
20408
+ var helper = this.setupHelper(0, name, helperCall);
20409
+
20410
+ var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper');
20411
+
20412
+ var nonHelper = this.nameLookup('depth' + this.lastContext, name, 'context');
20413
+ var nextStack = this.nextStack();
20414
+
20415
+ this.source.push('if (' + nextStack + ' = ' + helperName + ') { ' + nextStack + ' = ' + nextStack + '.call(' + helper.callParams + '); }');
20416
+ this.source.push('else { ' + nextStack + ' = ' + nonHelper + '; ' + nextStack + ' = typeof ' + nextStack + ' === functionType ? ' + nextStack + '.apply(depth0) : ' + nextStack + '; }');
20417
+ },
20418
+
20419
+ // [invokePartial]
20420
+ //
20421
+ // On stack, before: context, ...
20422
+ // On stack after: result of partial invocation
20423
+ //
20424
+ // This operation pops off a context, invokes a partial with that context,
20425
+ // and pushes the result of the invocation back.
20426
+ invokePartial: function(name) {
20427
+ var params = [this.nameLookup('partials', name, 'partial'), "'" + name + "'", this.popStack(), "helpers", "partials"];
20428
+
20429
+ if (this.options.data) {
20430
+ params.push("data");
20431
+ }
20432
+
20433
+ this.context.aliases.self = "this";
20434
+ this.push("self.invokePartial(" + params.join(", ") + ")");
20435
+ },
20436
+
20437
+ // [assignToHash]
20438
+ //
20439
+ // On stack, before: value, hash, ...
20440
+ // On stack, after: hash, ...
20441
+ //
20442
+ // Pops a value and hash off the stack, assigns `hash[key] = value`
20443
+ // and pushes the hash back onto the stack.
20444
+ assignToHash: function(key) {
20445
+ var value = this.popStack(),
20446
+ type;
20447
+
20448
+ if (this.options.stringParams) {
20449
+ type = this.popStack();
20450
+ this.popStack();
20451
+ }
20452
+
20453
+ var hash = this.hash;
20454
+ if (type) {
20455
+ hash.types.push("'" + key + "': " + type);
20456
+ }
20457
+ hash.values.push("'" + key + "': (" + value + ")");
20458
+ },
20459
+
20460
+ // HELPERS
20461
+
20462
+ compiler: JavaScriptCompiler,
20463
+
20464
+ compileChildren: function(environment, options) {
20465
+ var children = environment.children, child, compiler;
20466
+
20467
+ for(var i=0, l=children.length; i<l; i++) {
20468
+ child = children[i];
20469
+ compiler = new this.compiler();
20470
+
20471
+ var index = this.matchExistingProgram(child);
20472
+
20473
+ if (index == null) {
20474
+ this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children
20475
+ index = this.context.programs.length;
20476
+ child.index = index;
20477
+ child.name = 'program' + index;
20478
+ this.context.programs[index] = compiler.compile(child, options, this.context);
20479
+ this.context.environments[index] = child;
20480
+ } else {
20481
+ child.index = index;
20482
+ child.name = 'program' + index;
20483
+ }
20484
+ }
20485
+ },
20486
+ matchExistingProgram: function(child) {
20487
+ for (var i = 0, len = this.context.environments.length; i < len; i++) {
20488
+ var environment = this.context.environments[i];
20489
+ if (environment && environment.equals(child)) {
20490
+ return i;
20491
+ }
20492
+ }
20493
+ },
20494
+
20495
+ programExpression: function(guid) {
20496
+ this.context.aliases.self = "this";
20497
+
20498
+ if(guid == null) {
20499
+ return "self.noop";
20500
+ }
20501
+
20502
+ var child = this.environment.children[guid],
20503
+ depths = child.depths.list, depth;
20504
+
20505
+ var programParams = [child.index, child.name, "data"];
20506
+
20507
+ for(var i=0, l = depths.length; i<l; i++) {
20508
+ depth = depths[i];
20509
+
20510
+ if(depth === 1) { programParams.push("depth0"); }
20511
+ else { programParams.push("depth" + (depth - 1)); }
20512
+ }
20513
+
20514
+ if(depths.length === 0) {
20515
+ return "self.program(" + programParams.join(", ") + ")";
20516
+ } else {
20517
+ programParams.shift();
20518
+ return "self.programWithDepth(" + programParams.join(", ") + ")";
20519
+ }
20520
+ },
20521
+
20522
+ register: function(name, val) {
20523
+ this.useRegister(name);
20524
+ this.source.push(name + " = " + val + ";");
20525
+ },
20526
+
20527
+ useRegister: function(name) {
20528
+ if(!this.registers[name]) {
20529
+ this.registers[name] = true;
20530
+ this.registers.list.push(name);
20531
+ }
20532
+ },
20533
+
20534
+ pushStackLiteral: function(item) {
20535
+ return this.push(new Literal(item));
20536
+ },
20537
+
20538
+ pushStack: function(item) {
20539
+ this.flushInline();
20540
+
20541
+ var stack = this.incrStack();
20542
+ if (item) {
20543
+ this.source.push(stack + " = " + item + ";");
20544
+ }
20545
+ this.compileStack.push(stack);
20546
+ return stack;
20547
+ },
20548
+
20549
+ replaceStack: function(callback) {
20550
+ var prefix = '',
20551
+ inline = this.isInline(),
20552
+ stack;
20553
+
20554
+ // If we are currently inline then we want to merge the inline statement into the
20555
+ // replacement statement via ','
20556
+ if (inline) {
20557
+ var top = this.popStack(true);
20558
+
20559
+ if (top instanceof Literal) {
20560
+ // Literals do not need to be inlined
20561
+ stack = top.value;
20562
+ } else {
20563
+ // Get or create the current stack name for use by the inline
20564
+ var name = this.stackSlot ? this.topStackName() : this.incrStack();
20565
+
20566
+ prefix = '(' + this.push(name) + ' = ' + top + '),';
20567
+ stack = this.topStack();
20568
+ }
20569
+ } else {
20570
+ stack = this.topStack();
20571
+ }
20572
+
20573
+ var item = callback.call(this, stack);
20574
+
20575
+ if (inline) {
20576
+ if (this.inlineStack.length || this.compileStack.length) {
20577
+ this.popStack();
20578
+ }
20579
+ this.push('(' + prefix + item + ')');
20580
+ } else {
20581
+ // Prevent modification of the context depth variable. Through replaceStack
20582
+ if (!/^stack/.test(stack)) {
20583
+ stack = this.nextStack();
20584
+ }
20585
+
20586
+ this.source.push(stack + " = (" + prefix + item + ");");
20587
+ }
20588
+ return stack;
20589
+ },
20590
+
20591
+ nextStack: function() {
20592
+ return this.pushStack();
20593
+ },
20594
+
20595
+ incrStack: function() {
20596
+ this.stackSlot++;
20597
+ if(this.stackSlot > this.stackVars.length) { this.stackVars.push("stack" + this.stackSlot); }
20598
+ return this.topStackName();
20599
+ },
20600
+ topStackName: function() {
20601
+ return "stack" + this.stackSlot;
20602
+ },
20603
+ flushInline: function() {
20604
+ var inlineStack = this.inlineStack;
20605
+ if (inlineStack.length) {
20606
+ this.inlineStack = [];
20607
+ for (var i = 0, len = inlineStack.length; i < len; i++) {
20608
+ var entry = inlineStack[i];
20609
+ if (entry instanceof Literal) {
20610
+ this.compileStack.push(entry);
20611
+ } else {
20612
+ this.pushStack(entry);
20613
+ }
20614
+ }
20615
+ }
20616
+ },
20617
+ isInline: function() {
20618
+ return this.inlineStack.length;
20619
+ },
20620
+
20621
+ popStack: function(wrapped) {
20622
+ var inline = this.isInline(),
20623
+ item = (inline ? this.inlineStack : this.compileStack).pop();
20624
+
20625
+ if (!wrapped && (item instanceof Literal)) {
20626
+ return item.value;
20627
+ } else {
20628
+ if (!inline) {
20629
+ this.stackSlot--;
20630
+ }
20631
+ return item;
20632
+ }
20633
+ },
20634
+
20635
+ topStack: function(wrapped) {
20636
+ var stack = (this.isInline() ? this.inlineStack : this.compileStack),
20637
+ item = stack[stack.length - 1];
20638
+
20639
+ if (!wrapped && (item instanceof Literal)) {
20640
+ return item.value;
20641
+ } else {
20642
+ return item;
20643
+ }
20644
+ },
20645
+
20646
+ quotedString: function(str) {
20647
+ return '"' + str
20648
+ .replace(/\\/g, '\\\\')
20649
+ .replace(/"/g, '\\"')
20650
+ .replace(/\n/g, '\\n')
20651
+ .replace(/\r/g, '\\r') + '"';
20652
+ },
20653
+
20654
+ setupHelper: function(paramSize, name, missingParams) {
20655
+ var params = [];
20656
+ this.setupParams(paramSize, params, missingParams);
20657
+ var foundHelper = this.nameLookup('helpers', name, 'helper');
20658
+
20659
+ return {
20660
+ params: params,
20661
+ name: foundHelper,
20662
+ callParams: ["depth0"].concat(params).join(", "),
20663
+ helperMissingParams: missingParams && ["depth0", this.quotedString(name)].concat(params).join(", ")
20664
+ };
20665
+ },
20666
+
20667
+ // the params and contexts arguments are passed in arrays
20668
+ // to fill in
20669
+ setupParams: function(paramSize, params, useRegister) {
20670
+ var options = [], contexts = [], types = [], param, inverse, program;
20671
+
20672
+ options.push("hash:" + this.popStack());
20673
+
20674
+ inverse = this.popStack();
20675
+ program = this.popStack();
20676
+
20677
+ // Avoid setting fn and inverse if neither are set. This allows
20678
+ // helpers to do a check for `if (options.fn)`
20679
+ if (program || inverse) {
20680
+ if (!program) {
20681
+ this.context.aliases.self = "this";
20682
+ program = "self.noop";
20683
+ }
20684
+
20685
+ if (!inverse) {
20686
+ this.context.aliases.self = "this";
20687
+ inverse = "self.noop";
20688
+ }
20689
+
20690
+ options.push("inverse:" + inverse);
20691
+ options.push("fn:" + program);
20692
+ }
20693
+
20694
+ for(var i=0; i<paramSize; i++) {
20695
+ param = this.popStack();
20696
+ params.push(param);
20697
+
20698
+ if(this.options.stringParams) {
20699
+ types.push(this.popStack());
20700
+ contexts.push(this.popStack());
20701
+ }
20702
+ }
20703
+
20704
+ if (this.options.stringParams) {
20705
+ options.push("contexts:[" + contexts.join(",") + "]");
20706
+ options.push("types:[" + types.join(",") + "]");
20707
+ options.push("hashTypes:hashTypes");
20708
+ }
20709
+
20710
+ if(this.options.data) {
20711
+ options.push("data:data");
20712
+ }
20713
+
20714
+ options = "{" + options.join(",") + "}";
20715
+ if (useRegister) {
20716
+ this.register('options', options);
20717
+ params.push('options');
20718
+ } else {
20719
+ params.push(options);
20720
+ }
20721
+ return params.join(", ");
20722
+ }
20723
+ };
20724
+
20725
+ var reservedWords = (
20726
+ "break else new var" +
20727
+ " case finally return void" +
20728
+ " catch for switch while" +
20729
+ " continue function this with" +
20730
+ " default if throw" +
20731
+ " delete in try" +
20732
+ " do instanceof typeof" +
20733
+ " abstract enum int short" +
20734
+ " boolean export interface static" +
20735
+ " byte extends long super" +
20736
+ " char final native synchronized" +
20737
+ " class float package throws" +
20738
+ " const goto private transient" +
20739
+ " debugger implements protected volatile" +
20740
+ " double import public let yield"
20741
+ ).split(" ");
20742
+
20743
+ var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
20744
+
20745
+ for(var i=0, l=reservedWords.length; i<l; i++) {
20746
+ compilerWords[reservedWords[i]] = true;
20747
+ }
20748
+
20749
+ JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {
20750
+ if(!JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(name)) {
20751
+ return true;
20752
+ }
20753
+ return false;
20754
+ };
20755
+
20756
+ })(Handlebars.Compiler, Handlebars.JavaScriptCompiler);
20757
+
20758
+ Handlebars.precompile = function(input, options) {
20759
+ if (!input || (typeof input !== 'string' && input.constructor !== Handlebars.AST.ProgramNode)) {
20760
+ throw new Handlebars.Exception("You must pass a string or Handlebars AST to Handlebars.compile. You passed " + input);
20761
+ }
20762
+
20763
+ options = options || {};
20764
+ if (!('data' in options)) {
20765
+ options.data = true;
20766
+ }
20767
+ var ast = Handlebars.parse(input);
20768
+ var environment = new Handlebars.Compiler().compile(ast, options);
20769
+ return new Handlebars.JavaScriptCompiler().compile(environment, options);
20770
+ };
20771
+
20772
+ Handlebars.compile = function(input, options) {
20773
+ if (!input || (typeof input !== 'string' && input.constructor !== Handlebars.AST.ProgramNode)) {
20774
+ throw new Handlebars.Exception("You must pass a string or Handlebars AST to Handlebars.compile. You passed " + input);
20775
+ }
20776
+
20777
+ options = options || {};
20778
+ if (!('data' in options)) {
20779
+ options.data = true;
20780
+ }
20781
+ var compiled;
20782
+ function compile() {
20783
+ var ast = Handlebars.parse(input);
20784
+ var environment = new Handlebars.Compiler().compile(ast, options);
20785
+ var templateSpec = new Handlebars.JavaScriptCompiler().compile(environment, options, undefined, true);
20786
+ return Handlebars.template(templateSpec);
20787
+ }
20788
+
20789
+ // Template is only compiled on first use and cached after that point.
20790
+ return function(context, options) {
20791
+ if (!compiled) {
20792
+ compiled = compile();
20793
+ }
20794
+ return compiled.call(this, context, options);
20795
+ };
20796
+ };
20797
+ ;
20798
+ // lib/handlebars/runtime.js
20799
+ Handlebars.VM = {
20800
+ template: function(templateSpec) {
20801
+ // Just add water
20802
+ var container = {
20803
+ escapeExpression: Handlebars.Utils.escapeExpression,
20804
+ invokePartial: Handlebars.VM.invokePartial,
20805
+ programs: [],
20806
+ program: function(i, fn, data) {
20807
+ var programWrapper = this.programs[i];
20808
+ if(data) {
20809
+ return Handlebars.VM.program(fn, data);
20810
+ } else if(programWrapper) {
20811
+ return programWrapper;
20812
+ } else {
20813
+ programWrapper = this.programs[i] = Handlebars.VM.program(fn);
20814
+ return programWrapper;
20815
+ }
20816
+ },
20817
+ programWithDepth: Handlebars.VM.programWithDepth,
20818
+ noop: Handlebars.VM.noop,
20819
+ compilerInfo: null
20820
+ };
20821
+
20822
+ return function(context, options) {
20823
+ options = options || {};
20824
+ var result = templateSpec.call(container, Handlebars, context, options.helpers, options.partials, options.data);
20825
+
20826
+ var compilerInfo = container.compilerInfo || [],
20827
+ compilerRevision = compilerInfo[0] || 1,
20828
+ currentRevision = Handlebars.COMPILER_REVISION;
20829
+
20830
+ if (compilerRevision !== currentRevision) {
20831
+ if (compilerRevision < currentRevision) {
20832
+ var runtimeVersions = Handlebars.REVISION_CHANGES[currentRevision],
20833
+ compilerVersions = Handlebars.REVISION_CHANGES[compilerRevision];
20834
+ throw "Template was precompiled with an older version of Handlebars than the current runtime. "+
20835
+ "Please update your precompiler to a newer version ("+runtimeVersions+") or downgrade your runtime to an older version ("+compilerVersions+").";
20836
+ } else {
20837
+ // Use the embedded version info since the runtime doesn't know about this revision yet
20838
+ throw "Template was precompiled with a newer version of Handlebars than the current runtime. "+
20839
+ "Please update your runtime to a newer version ("+compilerInfo[1]+").";
20840
+ }
20841
+ }
20842
+
20843
+ return result;
20844
+ };
20845
+ },
20846
+
20847
+ programWithDepth: function(fn, data, $depth) {
20848
+ var args = Array.prototype.slice.call(arguments, 2);
20849
+
20850
+ return function(context, options) {
20851
+ options = options || {};
20852
+
20853
+ return fn.apply(this, [context, options.data || data].concat(args));
20854
+ };
20855
+ },
20856
+ program: function(fn, data) {
20857
+ return function(context, options) {
20858
+ options = options || {};
20859
+
20860
+ return fn(context, options.data || data);
20861
+ };
20862
+ },
20863
+ noop: function() { return ""; },
20864
+ invokePartial: function(partial, name, context, helpers, partials, data) {
20865
+ var options = { helpers: helpers, partials: partials, data: data };
20866
+
20867
+ if(partial === undefined) {
20868
+ throw new Handlebars.Exception("The partial " + name + " could not be found");
20869
+ } else if(partial instanceof Function) {
20870
+ return partial(context, options);
20871
+ } else if (!Handlebars.compile) {
20872
+ throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in runtime-only mode");
20873
+ } else {
20874
+ partials[name] = Handlebars.compile(partial, {data: data !== undefined});
20875
+ return partials[name](context, options);
20876
+ }
20877
+ }
20878
+ };
20879
+
20880
+ Handlebars.template = Handlebars.VM.template;
20881
+ ;
20882
+
20883
+ })();
20884
+
18703
20885
  (function() {
18704
20886
  /**
18705
20887
  @module ember