ember-source 1.3.0.beta.3 → 1.3.0.beta.4

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,23 +1,17 @@
1
- // ==========================================================================
2
- // Project: Ember - JavaScript Application Framework
3
- // Copyright: Copyright 2011-2013 Tilde Inc. and contributors
4
- // Portions Copyright 2006-2011 Strobe Inc.
5
- // Portions Copyright 2008-2011 Apple Inc. All rights reserved.
6
- // License: Licensed under MIT license
7
- // See https://raw.github.com/emberjs/ember.js/master/LICENSE
8
- // ==========================================================================
9
-
10
-
11
- // Version: 1.3.0-beta.3
12
-
13
- // Copyright: Copyright 2011-2013 Tilde Inc. and contributors
14
- // Portions Copyright 2006-2011 Strobe Inc.
15
- // Portions Copyright 2008-2011 Apple Inc. All rights reserved.
16
- !function(){var e,t,r,n;!function(){var i={},o={};e=function(e,t,r){i[e]={deps:t,callback:r}},n=r=t=function(e){function r(t){if("."!==t.charAt(0))return t;for(var r=t.split("/"),n=e.split("/").slice(0,-1),i=0,o=r.length;o>i;i++){var a=r[i];if(".."===a)n.pop();else{if("."===a)continue;n.push(a)}}return n.join("/")}if(n._eak_seen=i,o[e])return o[e];if(o[e]={},!i[e])throw new Error("Could not find module "+e);for(var a,s=i[e],u=s.deps,c=s.callback,l=[],h=0,m=u.length;m>h;h++)"exports"===u[h]?l.push(a={}):l.push(t(r(u[h])));var f=c.apply(this,l);return o[e]=a||f}}(),function(){"undefined"==typeof Ember&&(Ember={});{var e=(Ember.imports=Ember.imports||this,Ember.exports=Ember.exports||this);Ember.lookup=Ember.lookup||this}e.Em=e.Ember=Em=Ember,Ember.isNamespace=!0,Ember.toString=function(){return"Ember"},Ember.VERSION="1.3.0-beta.3","undefined"==typeof ENV&&(e.ENV={}),"undefined"==typeof ENV.DISABLE_RANGE_API&&(ENV.DISABLE_RANGE_API=!0),Ember.ENV=Ember.ENV||ENV,Ember.config=Ember.config||{},Ember.FEATURES=Ember.ENV.FEATURES||{},Ember.FEATURES.isEnabled=function(e){var t=Ember.FEATURES[e];return Ember.ENV.ENABLE_ALL_FEATURES?!0:t===!0||t===!1||void 0===t?t:Ember.ENV.ENABLE_OPTIONAL_FEATURES?!0:!1},Ember.EXTEND_PROTOTYPES=Ember.ENV.EXTEND_PROTOTYPES,"undefined"==typeof Ember.EXTEND_PROTOTYPES&&(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.LOG_VERSION=Ember.ENV.LOG_VERSION===!1?!1:!0,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.merge=function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e},Ember.isNone=function(e){return null===e||void 0===e},Ember.none=Ember.deprecateFunc("Ember.none is deprecated. Please use Ember.isNone instead.",Ember.isNone),Ember.isEmpty=function(e){return Ember.isNone(e)||0===e.length&&"function"!=typeof e||"object"==typeof e&&0===Ember.get(e,"length")},Ember.empty=Ember.deprecateFunc("Ember.empty is deprecated. Please use Ember.isEmpty instead.",Ember.isEmpty)}(),function(){var e=Ember.platform={};if(Ember.create=Object.create,Ember.create&&2!==Ember.create({a:1},{a:{value:2}}).a&&(Ember.create=null),!Ember.create||Ember.ENV.STUB_OBJECT_CREATE){var t=function(){};Ember.create=function(e,r){if(t.prototype=e,e=new t,r){t.prototype=e;for(var n in r)t.prototype[n]=r[n].value;e=new t}return t.prototype=null,e},Ember.create.isSimulated=!0}var r,n,i=Object.defineProperty;if(i)try{i({},"a",{get:function(){}})}catch(o){i=null}i&&(r=function(){var e={};return i(e,"a",{configurable:!0,enumerable:!0,get:function(){},set:function(){}}),i(e,"a",{configurable:!0,enumerable:!0,writable:!0,value:!0}),e.a===!0}(),n=function(){try{return i(document.createElement("div"),"definePropertyOnDOM",{}),!0}catch(e){}return!1}(),r?n||(i=function(e,t,r){var n;return n="object"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName,n?e[t]=r.value:Object.defineProperty(e,t,r)}):i=null),e.defineProperty=i,e.hasPropertyAccessors=!0,e.defineProperty||(e.hasPropertyAccessors=!1,e.defineProperty=function(e,t,r){r.get||(e[t]=r.value)},e.defineProperty.isSimulated=!0),Ember.ENV.MANDATORY_SETTER&&!e.hasPropertyAccessors&&(Ember.ENV.MANDATORY_SETTER=!1)}(),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(void 0===this||null===this)throw new TypeError;var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var n=new Array(r),i=arguments[1],o=0;r>o;o++)o in t&&(n[o]=e.call(i,t[o],o,t));return n},r=e(Array.prototype.forEach)?Array.prototype.forEach:function(e){if(void 0===this||null===this)throw new TypeError;var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var n=arguments[1],i=0;r>i;i++)i in t&&e.call(n,t[i],i,t)},n=e(Array.prototype.indexOf)?Array.prototype.indexOf:function(e,t){null===t||void 0===t?t=0:0>t&&(t=Math.max(0,this.length+t));for(var r=t,n=this.length;n>r;r++)if(this[r]===e)return r;return-1};Ember.ArrayPolyfills={map:t,forEach:r,indexOf:n},Ember.SHIM_ES5&&(Array.prototype.map||(Array.prototype.map=t),Array.prototype.forEach||(Array.prototype.forEach=r),Array.prototype.indexOf||(Array.prototype.indexOf=n))}(),function(){var e=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){var t=Error.apply(this,arguments);Error.captureStackTrace&&Error.captureStackTrace(this,Ember.Error);for(var r=0;r<e.length;r++)this[e[r]]=t[e[r]]},Ember.Error.prototype=Ember.create(Error.prototype),Ember.onerror=null,Ember.handleErrors=function(e,t){if("function"!=typeof Ember.onerror)return e.call(t||this);try{return e.call(t||this)}catch(r){Ember.onerror(r)}}}(),function(){function e(e){this.descs={},this.watching={},this.cache={},this.source=e}function t(e,t){return!(!e||"function"!=typeof e[t])}Ember.GUID_PREFIX="ember";var r=Ember.platform.defineProperty,n=Ember.create,i="__ember"+ +new Date,o=0,a=[],s={},u=Ember.ENV.MANDATORY_SETTER;Ember.GUID_KEY=i;var c={writable:!1,configurable:!1,enumerable:!1,value:null};Ember.generateGuid=function(e,t){t||(t=Ember.GUID_PREFIX);var n=t+o++;return e&&(c.value=n,r(e,i,c)),n},Ember.guidFor=function(e){if(void 0===e)return"(undefined)";if(null===e)return"(null)";var t,n=typeof e;switch(n){case"number":return t=a[e],t||(t=a[e]="nu"+e),t;case"string":return t=s[e],t||(t=s[e]="st"+o++),t;case"boolean":return e?"(true)":"(false)";default:return e[i]?e[i]:e===Object?"(Object)":e===Array?"(Array)":(t="ember"+o++,c.value=t,r(e,i,c),t)}};var l={writable:!0,configurable:!1,enumerable:!1,value:null},h=Ember.GUID_KEY+"_meta";Ember.META_KEY=h;var m={descs:{},watching:{}};u&&(m.values={}),Ember.EMPTY_META=m,Object.freeze&&Object.freeze(m);var f=Ember.platform.defineProperty.isSimulated;f&&(e.prototype.__preventPlainObject__=!0,e.prototype.toJSON=function(){}),Ember.meta=function(t,i){var o=t[h];return i===!1?o||m:(o?o.source!==t&&(f||r(t,h,l),o=n(o),o.descs=n(o.descs),o.watching=n(o.watching),o.cache={},o.source=t,u&&(o.values=n(o.values)),t[h]=o):(f||r(t,h,l),o=new e(t),u&&(o.values={}),t[h]=o,o.descs.constructor=null),o)},Ember.getMeta=function(e,t){var r=Ember.meta(e,!1);return r[t]},Ember.setMeta=function(e,t,r){var n=Ember.meta(e,!0);return n[t]=r,r},Ember.metaPath=function(e,t,r){for(var i,o,a=Ember.meta(e,r),s=0,u=t.length;u>s;s++){if(i=t[s],o=a[i]){if(o.__ember_source__!==e){if(!r)return void 0;o=a[i]=n(o),o.__ember_source__=e}}else{if(!r)return void 0;o=a[i]={__ember_source__:e}}a=o}return o},Ember.wrap=function(e,t){function r(){}function n(){var n,i=this._super;return this._super=t||r,n=e.apply(this,arguments),this._super=i,n}return n.wrappedFunction=e,n.__ember_observes__=e.__ember_observes__,n.__ember_observesBefore__=e.__ember_observesBefore__,n.__ember_listens__=e.__ember_listens__,n},Ember.isArray=function(e){return!e||e.setInterval?!1:Array.isArray&&Array.isArray(e)?!0:Ember.Array&&Ember.Array.detect(e)?!0:void 0!==e.length&&"object"==typeof e?!0:!1},Ember.makeArray=function(e){return null===e||void 0===e?[]:Ember.isArray(e)?e:[e]},Ember.canInvoke=t,Ember.tryInvoke=function(e,r,n){return t(e,r)?e[r].apply(e,n||[]):void 0};var p=function(){var e=0;try{try{}finally{throw e++,new Error("needsFinallyFixTest")}}catch(t){}return 1!==e}();Ember.tryFinally=p?function(e,t,r){var n,i,o;r=r||this;try{n=e.call(r)}finally{try{i=t.call(r)}catch(a){o=a}}if(o)throw o;return void 0===i?n:i}:function(e,t,r){var n,i;r=r||this;try{n=e.call(r)}finally{i=t.call(r)}return void 0===i?n:i},Ember.tryCatchFinally=p?function(e,t,r,n){var i,o,a;n=n||this;try{i=e.call(n)}catch(s){i=t.call(n,s)}finally{try{o=r.call(n)}catch(u){a=u}}if(a)throw a;return void 0===o?i:o}:function(e,t,r,n){var i,o;n=n||this;try{i=e.call(n)}catch(a){i=t.call(n,a)}finally{o=r.call(n)}return void 0===o?i:o};var d={},b="Boolean Number String Function Array Date RegExp Object".split(" ");Ember.ArrayPolyfills.forEach.call(b,function(e){d["[object "+e+"]"]=e.toLowerCase()});var v=Object.prototype.toString;Ember.typeOf=function(e){var t;return t=null===e||void 0===e?String(e):d[v.call(e)]||"object","function"===t?Ember.Object&&Ember.Object.detect(e)&&(t="class"):"object"===t&&(t=e instanceof Error?"error":Ember.Object&&e instanceof Ember.Object?"instance":"object"),t}}(),function(){Ember.Instrumentation={};var e=[],t={},r=function(r){for(var n,i=[],o=0,a=e.length;a>o;o++)n=e[o],n.regex.test(r)&&i.push(n.object);return t[r]=i,i},n=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,o,a){function s(){for(p=0,d=m.length;d>p;p++)f=m[p],b[p]=f.before(e,n(),i);return o.call(a)}function u(e){i=i||{},i.exception=e}function c(){for(p=0,d=m.length;d>p;p++)f=m[p],f.after(e,n(),i,b[p]);Ember.STRUCTURED_PROFILE&&console.timeEnd(l)}var l,h,m=t[e];if(Ember.STRUCTURED_PROFILE&&(l=e+": "+i.object,console.time(l)),m||(m=r(e)),0===m.length)return h=o.call(a),Ember.STRUCTURED_PROFILE&&console.timeEnd(l),h;var f,p,d,b=[];return Ember.tryCatchFinally(s,u,c)},Ember.Instrumentation.subscribe=function(r,n){for(var i,o=r.split("."),a=[],s=0,u=o.length;u>s;s++)i=o[s],"*"===i?a.push("[^\\.]*"):a.push(i);a=a.join("\\."),a+="(\\..*)?";var c={pattern:r,regex:new RegExp("^"+a+"$"),object:n};return e.push(c),t={},c},Ember.Instrumentation.unsubscribe=function(r){for(var n,i=0,o=e.length;o>i;i++)e[i]===r&&(n=i);e.splice(n,1),t={}},Ember.Instrumentation.reset=function(){e=[],t={}},Ember.instrument=Ember.Instrumentation.instrument,Ember.subscribe=Ember.Instrumentation.subscribe}(),function(){var e,t,r,n;e=Array.prototype.map||Ember.ArrayPolyfills.map,t=Array.prototype.forEach||Ember.ArrayPolyfills.forEach,r=Array.prototype.indexOf||Ember.ArrayPolyfills.indexOf,n=Array.prototype.splice;var i=Ember.EnumerableUtils={map:function(t,r,n){return t.map?t.map.call(t,r,n):e.call(t,r,n)},forEach:function(e,r,n){return e.forEach?e.forEach.call(e,r,n):t.call(e,r,n)},indexOf:function(e,t,n){return e.indexOf?e.indexOf.call(e,t,n):r.call(e,t,n)},indexesOf:function(e,t){return void 0===t?[]:i.map(t,function(t){return i.indexOf(e,t)})},addObject:function(e,t){var r=i.indexOf(e,t);-1===r&&e.push(t)},removeObject:function(e,t){var r=i.indexOf(e,t);-1!==r&&e.splice(r,1)},_replace:function(e,t,r,i){for(var o,a,s=[].concat(i),u=[],c=6e4,l=t,h=r;s.length;)a=h>c?c:h,0>=a&&(a=0),o=s.splice(0,c),o=[l,a].concat(o),l+=c,h-=a,u=u.concat(n.apply(e,o));return u},replace:function(e,t,r,n){return e.replace?e.replace(t,r,n):i._replace(e,t,r,n)},intersection:function(e,t){var r=[];return i.forEach(e,function(e){i.indexOf(t,e)>=0&&r.push(e)}),r}}}(),function(){var e,t=Ember.META_KEY,r=Ember.ENV.MANDATORY_SETTER,n=/^([A-Z$]|([0-9][A-Z$])).*[\.\*]/,i=/^this[\.\*]/,o=/^([^\.\*]+)/;e=function(e,n){if(""===n)return e;if(n||"string"!=typeof e||(n=e,e=null),null===e||-1!==n.indexOf("."))return s(e,n);var i,o=e[t],a=o&&o.descs[n];return a?a.get(e,n):(i=r&&o&&o.watching[n]>0?o.values[n]:e[n],void 0!==i||"object"!=typeof e||n in e||"function"!=typeof e.unknownProperty?i:e.unknownProperty(n))},Ember.config.overrideAccessors&&(Ember.get=e,Ember.config.overrideAccessors(),e=Ember.get);var a=Ember.normalizeTuple=function(t,r){var a,s=i.test(r),u=!s&&n.test(r);if((!t||u)&&(t=Ember.lookup),s&&(r=r.slice(5)),t===Ember.lookup&&(a=r.match(o)[0],t=e(t,a),r=r.slice(a.length+1)),!r||0===r.length)throw new Ember.Error("Invalid Path");return[t,r]},s=Ember._getPath=function(t,r){var n,o,s,u,c;if(null===t&&-1===r.indexOf("."))return e(Ember.lookup,r);for(n=i.test(r),(!t||n)&&(s=a(t,r),t=s[0],r=s[1],s.length=0),o=r.split("."),c=o.length,u=0;null!=t&&c>u;u++)if(t=e(t,o[u],!0),t&&t.isDestroyed)return void 0;return t};Ember.getWithDefault=function(t,r,n){var i=e(t,r);return void 0===i?n:i},Ember.get=e}(),function(){function e(e,t,r){for(var n=-1,i=0,o=e.length;o>i;i+=3)if(t===e[i]&&r===e[i+1]){n=i;break}return n}function t(e,t){var r,n=f(e,!0);return n.listeners||(n.listeners={}),n.hasOwnProperty("listeners")||(n.listeners=m(n.listeners)),r=n.listeners[t],r&&!n.listeners.hasOwnProperty(t)?r=n.listeners[t]=n.listeners[t].slice():r||(r=n.listeners[t]=[]),r}function r(t,r,n){var i=t[p],o=i&&i.listeners&&i.listeners[r];if(o)for(var a=o.length-3;a>=0;a-=3){var s=o[a],u=o[a+1],c=o[a+2],l=e(n,s,u);-1===l&&n.push(s,u,c)}}function n(t,r,n){var i=t[p],o=i&&i.listeners&&i.listeners[r],a=[];if(o){for(var s=o.length-3;s>=0;s-=3){var u=o[s],c=o[s+1],l=o[s+2],h=e(n,u,c);-1===h&&(n.push(u,c,l),a.push(u,c,l))}return a}}function i(r,n,i,o,a){o||"function"!=typeof i||(o=i,i=null);var s=t(r,n),u=e(s,i,o),c=0;a&&(c|=b),-1===u&&(s.push(i,o,c),"function"==typeof r.didAddListener&&r.didAddListener(n,i,o))}function o(r,n,i,o){function a(i,o){var a=t(r,n),s=e(a,i,o);-1!==s&&(a.splice(s,3),"function"==typeof r.didRemoveListener&&r.didRemoveListener(n,i,o))}if(o||"function"!=typeof i||(o=i,i=null),o)a(i,o);else{var s=r[p],u=s&&s.listeners&&s.listeners[n];if(!u)return;for(var c=u.length-3;c>=0;c-=3)a(u[c],u[c+1])}}function a(r,n,i,o,a){function s(){return a.call(i)}function u(){-1!==l&&(c[l+2]&=~v)}o||"function"!=typeof i||(o=i,i=null);var c=t(r,n),l=e(c,i,o);return-1!==l&&(c[l+2]|=v),Ember.tryFinally(s,u)}function s(r,n,i,o,a){function s(){return a.call(i)}function u(){for(var e=0,t=f.length;t>e;e++){var r=f[e];p[e][r+2]&=~v}}o||"function"!=typeof i||(o=i,i=null);var c,l,h,m,f=[],p=[];for(h=0,m=n.length;m>h;h++){c=n[h],l=t(r,c);var d=e(l,i,o);-1!==d&&(l[d+2]|=v,f.push(d),p.push(l))}return Ember.tryFinally(s,u)}function u(e){var t=e[p].listeners,r=[];if(t)for(var n in t)t[n]&&r.push(n);return r}function c(e,t,r,n){if(e!==Ember&&"function"==typeof e.sendEvent&&e.sendEvent(t,r),!n){var i=e[p];n=i&&i.listeners&&i.listeners[t]}if(n){for(var a=n.length-3;a>=0;a-=3){var s=n[a],u=n[a+1],c=n[a+2];u&&(c&v||(c&b&&o(e,t,s,u),s||(s=e),"string"==typeof u&&(u=s[u]),r?u.apply(s,r):u.call(s)))}return!0}}function l(e,t){var r=e[p],n=r&&r.listeners&&r.listeners[t];return!(!n||!n.length)}function h(e,t){var r=[],n=e[p],i=n&&n.listeners&&n.listeners[t];if(!i)return r;for(var o=0,a=i.length;a>o;o+=3){var s=i[o],u=i[o+1];r.push([s,u])}return r}var m=Ember.create,f=Ember.meta,p=Ember.META_KEY,d=[].slice,b=1,v=2;Ember.on=function(){var e=d.call(arguments,-1)[0],t=d.call(arguments,0,-1);return e.__ember_listens__=t,e},Ember.addListener=i,Ember.removeListener=o,Ember._suspendListener=a,Ember._suspendListeners=s,Ember.sendEvent=c,Ember.hasListeners=l,Ember.watchedEvents=u,Ember.listenersFor=h,Ember.listenersDiff=n,Ember.listenersUnion=r}(),function(){var e=Ember.guidFor,t=Ember.sendEvent,r=Ember._ObserverSet=function(){this.clear()};r.prototype.add=function(t,r,n){var i,o=this.observerSet,a=this.observers,s=e(t),u=o[s];return u||(o[s]=u={}),i=u[r],void 0===i&&(i=a.push({sender:t,keyName:r,eventName:n,listeners:[]})-1,u[r]=i),a[i].listeners},r.prototype.flush=function(){var e,r,n,i,o=this.observers;for(this.clear(),e=0,r=o.length;r>e;++e)n=o[e],i=n.sender,i.isDestroying||i.isDestroyed||t(i,n.eventName,[i,n.keyName],n.listeners)},r.prototype.clear=function(){this.observerSet={},this.observers=[]}}(),function(){function e(e,t){var n=h(e,!1),i=n.watching[t]>0||"length"===t,a=n.proto,s=n.descs[t];i&&a!==e&&(s&&s.willChange&&s.willChange(e,t),r(e,t,n),o(e,t,n),c(e,t))}function t(e,t){var r=h(e,!1),i=r.watching[t]>0||"length"===t,o=r.proto,s=r.descs[t];o!==e&&(s&&s.didChange&&s.didChange(e,t),(i||"length"===t)&&(n(e,t,r),a(e,t,r,!1),l(e,t)))}function r(t,r,n){if(!t.isDestroying){var o=w,a=!o;a&&(o=w={}),i(e,t,r,o,n),a&&(w=null)}}function n(e,r,n){if(!e.isDestroying){var o=_,a=!o;a&&(o=_={}),i(t,e,r,o,n),a&&(_=null)}}function i(e,t,r,n,i){var o=m(t);if(n[o]||(n[o]={}),!n[o][r]){n[o][r]=!0;var a=i.deps;if(a=a&&a[r])for(var s in a){var u=i.descs[s];u&&u._suspended===t||e(t,s)}}}function o(t,r,n){if(n.hasOwnProperty("chainWatchers")&&n.chainWatchers[r]){var i,o,a=n.chainWatchers[r],s=[];for(i=0,o=a.length;o>i;i++)a[i].willChange(s);for(i=0,o=s.length;o>i;i+=2)e(s[i],s[i+1])}}function a(e,r,n,i){if(n.hasOwnProperty("chainWatchers")&&n.chainWatchers[r]){var o,a,s=n.chainWatchers[r],u=i?null:[];for(o=0,a=s.length;a>o;o++)s[o].didChange(u);if(!i)for(o=0,a=u.length;a>o;o+=2)t(u[o],u[o+1])}}function s(){y++}function u(){y--,0>=y&&(E.clear(),g.flush())}function c(e,t){if(!e.isDestroying){var r,n,i=t+":before";y?(r=E.add(e,t,i),n=b(e,i,r),p(e,i,[e,t],n)):p(e,i,[e,t])}}function l(e,t){if(!e.isDestroying){var r,n=t+":change";y?(r=g.add(e,t,n),d(e,n,r)):p(e,n,[e,t])}}var h=Ember.meta,m=Ember.guidFor,f=Ember.tryFinally,p=Ember.sendEvent,d=Ember.listenersUnion,b=Ember.listenersDiff,v=Ember._ObserverSet,E=new v,g=new v,y=0;Ember.propertyWillChange=e,Ember.propertyDidChange=t;var w,_;Ember.overrideChains=function(e,t,r){a(e,t,r,!0)},Ember.beginPropertyChanges=s,Ember.endPropertyChanges=u,Ember.changeProperties=function(e,t){s(),f(e,u,t)}}(),function(){function e(e,t,r,o){var a;if(a=t.slice(t.lastIndexOf(".")+1),t=t===a?a:t.slice(0,t.length-(a.length+1)),"this"!==t&&(e=n(e,t)),!a||0===a.length)throw new Ember.Error("Property set failed: You passed an empty path");if(!e){if(o)return;throw new Ember.Error('Property set failed: object in path "'+t+'" could not be found or was destroyed.')}return i(e,a,r)}var t=Ember.META_KEY,r=Ember.ENV.MANDATORY_SETTER,n=Ember._getPath,i=function(n,i,o,a){if("string"==typeof n&&(o=i,i=n,n=null),!n||-1!==i.indexOf("."))return e(n,i,o,a);var s,u,c=n[t],l=c&&c.descs[i];return l?l.set(n,i,o):(s="object"==typeof n&&!(i in n),s&&"function"==typeof n.setUnknownProperty?n.setUnknownProperty(i,o):c&&c.watching[i]>0?(u=r?c.values[i]:n[i],o!==u&&(Ember.propertyWillChange(n,i),r?void 0!==u||i in n?c.values[i]=o:Ember.defineProperty(n,i,null,o):n[i]=o,Ember.propertyDidChange(n,i))):n[i]=o),o};Ember.config.overrideAccessors&&(Ember.set=i,Ember.config.overrideAccessors(),i=Ember.set),Ember.set=i,Ember.trySet=function(e,t,r){return i(e,t,r,!0)}}(),function(){var e=Ember.set,t=Ember.guidFor,r=Ember.ArrayPolyfills.indexOf,n=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t},i=function(e,t){var r=e.keys.copy(),i=n(e.values);return t.keys=r,t.values=i,t.length=e.length,t},o=Ember.OrderedSet=function(){this.clear()};o.create=function(){return new o},o.prototype={clear:function(){this.presenceSet={},this.list=[]},add:function(e){var r=t(e),n=this.presenceSet,i=this.list;r in n||(n[r]=!0,i.push(e))},remove:function(e){var n=t(e),i=this.presenceSet,o=this.list;delete i[n];var a=r.call(o,e);a>-1&&o.splice(a,1)},isEmpty:function(){return 0===this.list.length},has:function(e){var r=t(e),n=this.presenceSet;return r in n},forEach:function(e,t){for(var r=this.toArray(),n=0,i=r.length;i>n;n++)e.call(t,r[n])},toArray:function(){return this.list.slice()},copy:function(){var e=new o;return e.presenceSet=n(this.presenceSet),e.list=this.toArray(),e}};var a=Ember.Map=function(){this.keys=Ember.OrderedSet.create(),this.values={}};a.create=function(){return new a},a.prototype={length:0,get:function(e){var r=this.values,n=t(e);return r[n]},set:function(r,n){var i=this.keys,o=this.values,a=t(r);i.add(r),o[a]=n,e(this,"length",i.list.length)},remove:function(r){var n=this.keys,i=this.values,o=t(r);return i.hasOwnProperty(o)?(n.remove(r),delete i[o],e(this,"length",n.list.length),!0):!1},has:function(e){var r=this.values,n=t(e);return r.hasOwnProperty(n)},forEach:function(e,r){var n=this.keys,i=this.values;n.forEach(function(n){var o=t(n);e.call(r,n,i[o])})},copy:function(){return i(this,new a)}};var s=Ember.MapWithDefault=function(e){a.call(this),this.defaultValue=e.defaultValue};s.create=function(e){return e?new s(e):new a},s.prototype=Ember.create(a.prototype),s.prototype.get=function(e){var t=this.has(e);if(t)return a.prototype.get.call(this,e);var r=this.defaultValue(e);return this.set(e,r),r},s.prototype.copy=function(){return i(this,new s({defaultValue:this.defaultValue}))}}(),function(){function e(e){var t,r;Ember.imports.console?t=Ember.imports.console:"undefined"!=typeof console&&(t=console);var n="object"==typeof t?t[e]:null;return n?n.apply?(r=function(){n.apply(t,arguments)},r.displayName="console."+e,r):function(){var e=Array.prototype.join.call(arguments,", ");n(e)}:void 0}function t(e,t){if(!e)try{throw new Ember.Error("assertion failed: "+t)}catch(r){setTimeout(function(){throw r},0)}}Ember.Logger={log:e("log")||Ember.K,warn:e("warn")||Ember.K,error:e("error")||Ember.K,info:e("info")||Ember.K,debug:e("debug")||e("info")||Ember.K,assert:e("assert")||t}}(),function(){var e=Ember.META_KEY,t=Ember.meta,r=Ember.platform.defineProperty,n=Ember.ENV.MANDATORY_SETTER;Ember.Descriptor=function(){};var i=Ember.MANDATORY_SETTER_FUNCTION=function(){},o=Ember.DEFAULT_GETTER_FUNCTION=function(t){return function(){var r=this[e];return r&&r.values[t]}};Ember.defineProperty=function(e,a,s,u,c){var l,h,m,f;return c||(c=t(e)),l=c.descs,h=c.descs[a],m=c.watching[a]>0,h instanceof Ember.Descriptor&&h.teardown(e,a),s instanceof Ember.Descriptor?(f=s,l[a]=s,n&&m?r(e,a,{configurable:!0,enumerable:!0,writable:!0,value:void 0}):e[a]=void 0):(l[a]=void 0,null==s?(f=u,n&&m?(c.values[a]=u,r(e,a,{configurable:!0,enumerable:!0,set:i,get:o(a)})):e[a]=u):(f=s,r(e,a,s))),m&&Ember.overrideChains(e,a,c),e.didDefineProperty&&e.didDefineProperty(e,a,f),this}}(),function(){var e=Ember.get;Ember.getProperties=function(t){var r={},n=arguments,i=1;2===arguments.length&&"array"===Ember.typeOf(arguments[1])&&(i=0,n=arguments[1]);for(var o=n.length;o>i;i++)r[n[i]]=e(t,n[i]);return r}}(),function(){var e=Ember.changeProperties,t=Ember.set;Ember.setProperties=function(r,n){return e(function(){for(var e in n)n.hasOwnProperty(e)&&t(r,e,n[e])}),r}}(),function(){var e=Ember.meta,t=Ember.typeOf,r=Ember.ENV.MANDATORY_SETTER,n=Ember.platform.defineProperty;Ember.watchKey=function(i,o){if("length"!==o||"array"!==t(i)){var a=e(i),s=a.watching;s[o]?s[o]=(s[o]||0)+1:(s[o]=1,"function"==typeof i.willWatchProperty&&i.willWatchProperty(o),r&&o in i&&(a.values[o]=i[o],n(i,o,{configurable:!0,enumerable:!0,set:Ember.MANDATORY_SETTER_FUNCTION,get:Ember.DEFAULT_GETTER_FUNCTION(o)})))}},Ember.unwatchKey=function(t,i){var o=e(t),a=o.watching;1===a[i]?(a[i]=0,"function"==typeof t.didUnwatchProperty&&t.didUnwatchProperty(i),r&&i in t&&(n(t,i,{configurable:!0,enumerable:!0,writable:!0,value:o.values[i]}),delete o.values[i])):a[i]>1&&a[i]--}}(),function(){function e(e){return e.match(l)[0]}function t(e,t,r){if(e&&"object"==typeof e){var i=n(e),o=i.chainWatchers;i.hasOwnProperty("chainWatchers")||(o=i.chainWatchers={}),o[t]||(o[t]=[]),o[t].push(r),u(e,t)}}function r(e,t){if(!e)return void 0;var r=n(e,!1);if(r.proto===e)return void 0;if("@each"===t)return i(e,t);var o=r.descs[t];return o&&o._cacheable?t in r.cache?r.cache[t]:void 0:i(e,t)}var n=Ember.meta,i=Ember.get,o=Ember.normalizeTuple,a=Ember.ArrayPolyfills.forEach,s=Ember.warn,u=Ember.watchKey,c=Ember.unwatchKey,l=/^([^\.\*]+)/,h=[];Ember.flushPendingChains=function(){if(0!==h.length){var e=h;h=[],a.call(e,function(e){e[0].add(e[1])}),s("Watching an undefined global, Ember expects watched globals to be setup by the time the run loop is flushed, check for typos",0===h.length)}};var m=Ember.removeChainWatcher=function(e,t,r){if(e&&"object"==typeof e){var i=n(e,!1);if(i.hasOwnProperty("chainWatchers")){var o=i.chainWatchers;if(o[t]){o=o[t];for(var a=0,s=o.length;s>a;a++)o[a]===r&&o.splice(a,1)}c(e,t)}}},f=Ember._ChainNode=function(e,r,n){this._parent=e,this._key=r,this._watching=void 0===n,this._value=n,this._paths={},this._watching&&(this._object=e.value(),this._object&&t(this._object,this._key,this)),this._parent&&"@each"===this._parent._key&&this.value()},p=f.prototype;p.value=function(){if(void 0===this._value&&this._watching){var e=this._parent.value();this._value=r(e,this._key)}return this._value},p.destroy=function(){if(this._watching){var e=this._object;e&&m(e,this._key,this),this._watching=!1}},p.copy=function(e){var t,r=new f(null,null,e),n=this._paths;for(t in n)n[t]<=0||r.add(t);return r},p.add=function(t){var r,n,i,a,s;if(s=this._paths,s[t]=(s[t]||0)+1,r=this.value(),n=o(r,t),n[0]&&n[0]===r)t=n[1],i=e(t),t=t.slice(i.length+1);else{if(!n[0])return h.push([this,t]),n.length=0,void 0;a=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]}n.length=0,this.chain(i,t,a)},p.remove=function(t){var r,n,i,a,s;s=this._paths,s[t]>0&&s[t]--,r=this.value(),n=o(r,t),n[0]===r?(t=n[1],i=e(t),t=t.slice(i.length+1)):(a=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]),n.length=0,this.unchain(i,t)},p.count=0,p.chain=function(t,r,n){var i,o=this._chains;o||(o=this._chains={}),i=o[t],i||(i=o[t]=new f(this,t,n)),i.count++,r&&r.length>0&&(t=e(r),r=r.slice(t.length+1),i.chain(t,r))},p.unchain=function(t,r){var n=this._chains,i=n[t];r&&r.length>1&&(t=e(r),r=r.slice(t.length+1),i.unchain(t,r)),i.count--,i.count<=0&&(delete n[i._key],i.destroy())},p.willChange=function(e){var t=this._chains;if(t)for(var r in t)t.hasOwnProperty(r)&&t[r].willChange(e);this._parent&&this._parent.chainWillChange(this,this._key,1,e)},p.chainWillChange=function(e,t,r,n){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainWillChange(this,t,r+1,n):(r>1&&n.push(this.value(),t),t="this."+t,this._paths[t]>0&&n.push(this.value(),t))},p.chainDidChange=function(e,t,r,n){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainDidChange(this,t,r+1,n):(r>1&&n.push(this.value(),t),t="this."+t,this._paths[t]>0&&n.push(this.value(),t))},p.didChange=function(e){if(this._watching){var r=this._parent.value();r!==this._object&&(m(this._object,this._key,this),this._object=r,t(r,this._key,this)),this._value=void 0,this._parent&&"@each"===this._parent._key&&this.value()}var n=this._chains;if(n)for(var i in n)n.hasOwnProperty(i)&&n[i].didChange(e);null!==e&&this._parent&&this._parent.chainDidChange(this,this._key,1,e)},Ember.finishChains=function(e){var t=n(e,!1),r=t.chains;r&&(r.value()!==e&&(t.chains=r=r.copy(e)),r.didChange(null))}}(),function(){function e(e){var r=t(e),i=r.chains;return i?i.value()!==e&&(i=r.chains=i.copy(e)):i=r.chains=new n(null,null,e),i}var t=Ember.meta,r=Ember.typeOf,n=Ember._ChainNode;Ember.watchPath=function(n,i){if("length"!==i||"array"!==r(n)){var o=t(n),a=o.watching;a[i]?a[i]=(a[i]||0)+1:(a[i]=1,e(n).add(i))}},Ember.unwatchPath=function(r,n){var i=t(r),o=i.watching;1===o[n]?(o[n]=0,e(r).remove(n)):o[n]>1&&o[n]--}}(),function(){function e(e){return"*"===e||!h.test(e)}var t=Ember.meta,r=Ember.GUID_KEY,n=Ember.META_KEY,i=Ember.removeChainWatcher,o=Ember.watchKey,a=Ember.unwatchKey,s=Ember.watchPath,u=Ember.unwatchPath,c=Ember.typeOf,l=Ember.generateGuid,h=/[\.\*]/;Ember.watch=function(t,r){("length"!==r||"array"!==c(t))&&(e(r)?o(t,r):s(t,r))},Ember.isWatching=function(e,t){var r=e[n];return(r&&r.watching[t])>0},Ember.watch.flushPending=Ember.flushPendingChains,Ember.unwatch=function(t,r){("length"!==r||"array"!==c(t))&&(e(r)?a(t,r):u(t,r))},Ember.rewatch=function(e){var n=t(e,!1),i=n.chains;r in e&&!e.hasOwnProperty(r)&&l(e),i&&i.value()!==e&&(n.chains=i.copy(e))};var m=[];Ember.destroy=function(e){var t,r,o,a,s=e[n];if(s&&(e[n]=null,t=s.chains))for(m.push(t);m.length>0;){if(t=m.pop(),r=t._chains)for(o in r)r.hasOwnProperty(o)&&m.push(r[o]);t._watching&&(a=t._object,a&&i(a,t._key,t))}}}(),function(){function e(e,t){var r=e[t];return r?e.hasOwnProperty(t)||(r=e[t]=f(r)):r=e[t]={},r}function t(t){return e(t,"deps")}function r(r,n,i,o){var a,s,u,c,l,h=r._dependentKeys;if(h)for(a=t(o),s=0,u=h.length;u>s;s++)c=h[s],l=e(a,c),l[i]=(l[i]||0)+1,p(n,c)}function n(r,n,i,o){var a,s,u,c,l,h=r._dependentKeys;if(h)for(a=t(o),s=0,u=h.length;u>s;s++)c=h[s],l=e(a,c),l[i]=(l[i]||0)-1,d(n,c)}function i(e,t){this.func=e,this._cacheable=t&&void 0!==t.cacheable?t.cacheable:!0,this._dependentKeys=t&&t.dependentKeys,this._readOnly=t&&(void 0!==t.readOnly||!!t.readOnly)}function o(e){for(var t=0,r=e.length;r>t;t++)e[t].didChange(null)}function a(e,t){for(var r={},n=0;n<t.length;n++)r[t[n]]=c(e,t[n]);return r}function s(e,t){Ember.computed[e]=function(e){var r=m.call(arguments);return Ember.computed(e,function(){return t.apply(this,r)})}}function u(e,t){Ember.computed[e]=function(){var e=m.call(arguments),r=Ember.computed(function(){return t.apply(this,[a(this,e)])});return r.property.apply(r,e)}}var c=Ember.get,l=Ember.set,h=Ember.meta,m=[].slice,f=Ember.create,p=(Ember.META_KEY,Ember.watch),d=Ember.unwatch;Ember.ComputedProperty=i,i.prototype=new Ember.Descriptor;var b=i.prototype;b.cacheable=function(e){return this._cacheable=e!==!1,this},b.volatile=function(){return this.cacheable(!1)},b.readOnly=function(e){return this._readOnly=void 0===e||!!e,this},b.property=function(){var e;return e=m.call(arguments),this._dependentKeys=e,this},b.meta=function(e){return 0===arguments.length?this._meta||{}:(this._meta=e,this)},b.didChange=function(e,t){if(this._cacheable&&this._suspended!==e){var r=h(e);t in r.cache&&(delete r.cache[t],n(this,e,t,r))}},b.get=function(e,t){var n,i,a,s;if(this._cacheable){if(a=h(e),i=a.cache,t in i)return i[t];n=i[t]=this.func.call(e,t),s=a.chainWatchers&&a.chainWatchers[t],s&&o(s),r(this,e,t,a)}else n=this.func.call(e,t);return n},b.set=function(e,t,n){var i,o,a,s=this._cacheable,u=this.func,c=h(e,s),l=c.watching[t],m=this._suspended,f=!1,p=c.cache;if(this._readOnly)throw new Ember.Error("Cannot Set: "+t+" on: "+e.toString());this._suspended=e;try{if(s&&p.hasOwnProperty(t)&&(o=p[t],f=!0),i=u.wrappedFunction?u.wrappedFunction.length:u.length,3===i)a=u.call(e,t,n,o);else{if(2!==i)return Ember.defineProperty(e,t,null,o),Ember.set(e,t,n),void 0;a=u.call(e,t,n)}if(f&&o===a)return;l&&Ember.propertyWillChange(e,t),f&&delete p[t],s&&(f||r(this,e,t,c),p[t]=a),l&&Ember.propertyDidChange(e,t)}finally{this._suspended=m}return a},b.teardown=function(e,t){var r=h(e);return t in r.cache&&n(this,e,t,r),this._cacheable&&delete r.cache[t],null},Ember.computed=function(e){var t;if(arguments.length>1&&(t=m.call(arguments,0,-1),e=m.call(arguments,-1)[0]),"function"!=typeof e)throw new Ember.Error("Computed Property declared without a property function");var r=new i(e);return t&&r.property.apply(r,t),r},Ember.cacheFor=function(e,t){var r=h(e,!1).cache;return r&&t in r?r[t]:void 0},s("empty",function(e){return Ember.isEmpty(c(this,e))}),s("notEmpty",function(e){return!Ember.isEmpty(c(this,e))}),s("none",function(e){return Ember.isNone(c(this,e))}),s("not",function(e){return!c(this,e)}),s("bool",function(e){return!!c(this,e)}),s("match",function(e,t){var r=c(this,e);return"string"==typeof r?t.test(r):!1}),s("equal",function(e,t){return c(this,e)===t}),s("gt",function(e,t){return c(this,e)>t}),s("gte",function(e,t){return c(this,e)>=t}),s("lt",function(e,t){return c(this,e)<t}),s("lte",function(e,t){return c(this,e)<=t}),u("and",function(e){for(var t in e)if(e.hasOwnProperty(t)&&!e[t])return!1;return!0}),u("or",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!0;return!1}),u("any",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return e[t];return null}),u("collect",function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&(Ember.isNone(e[r])?t.push(null):t.push(e[r]));return t}),Ember.computed.alias=function(e){return Ember.computed(e,function(t,r){return arguments.length>1?(l(this,e,r),r):c(this,e)})},Ember.computed.oneWay=function(e){return Ember.computed(e,function(){return c(this,e)})},Ember.computed.defaultTo=function(e){return Ember.computed(function(t,r,n){return 1===arguments.length?null!=n?n:c(this,e):null!=r?r:c(this,e)})}}(),function(){function e(e){return e+r}function t(e){return e+n}var r=":change",n=":before";Ember.addObserver=function(t,r,n,i){return Ember.addListener(t,e(r),n,i),Ember.watch(t,r),this},Ember.observersFor=function(t,r){return Ember.listenersFor(t,e(r))},Ember.removeObserver=function(t,r,n,i){return Ember.unwatch(t,r),Ember.removeListener(t,e(r),n,i),this},Ember.addBeforeObserver=function(e,r,n,i){return Ember.addListener(e,t(r),n,i),Ember.watch(e,r),this},Ember._suspendBeforeObserver=function(e,r,n,i,o){return Ember._suspendListener(e,t(r),n,i,o)},Ember._suspendObserver=function(t,r,n,i,o){return Ember._suspendListener(t,e(r),n,i,o)};var i=Ember.ArrayPolyfills.map;Ember._suspendBeforeObservers=function(e,r,n,o,a){var s=i.call(r,t);return Ember._suspendListeners(e,s,n,o,a)},Ember._suspendObservers=function(t,r,n,o,a){var s=i.call(r,e);return Ember._suspendListeners(t,s,n,o,a)},Ember.beforeObserversFor=function(e,r){return Ember.listenersFor(e,t(r))
17
- },Ember.removeBeforeObserver=function(e,r,n,i){return Ember.unwatch(e,r),Ember.removeListener(e,t(r),n,i),this}}(),function(){e("backburner/queue",["exports"],function(e){"use strict";function t(e,t,r){this.daq=e,this.name=t,this.options=r,this._queue=[]}t.prototype={daq:null,name:null,options:null,_queue:null,push:function(e,t,r,n){var i=this._queue;return i.push(e,t,r,n),{queue:this,target:e,method:t}},pushUnique:function(e,t,r,n){var i,o,a,s,u=this._queue;for(a=0,s=u.length;s>a;a+=4)if(i=u[a],o=u[a+1],i===e&&o===t)return u[a+2]=r,u[a+3]=n,{queue:this,target:e,method:t};return this._queue.push(e,t,r,n),{queue:this,target:e,method:t}},flush:function(){var e,t,r,n,i,o=this._queue,a=this.options,s=a&&a.before,u=a&&a.after,c=o.length;for(c&&s&&s(),i=0;c>i;i+=4)e=o[i],t=o[i+1],r=o[i+2],n=o[i+3],r&&r.length>0?t.apply(e,r):t.call(e);c&&u&&u(),o.length>c?(this._queue=o.slice(c),this.flush()):this._queue.length=0},cancel:function(e){var t,r,n,i,o=this._queue;for(n=0,i=o.length;i>n;n+=4)if(t=o[n],r=o[n+1],t===e.target&&r===e.method)return o.splice(n,4),!0;if(o=this._queueBeingFlushed)for(n=0,i=o.length;i>n;n+=4)if(t=o[n],r=o[n+1],t===e.target&&r===e.method)return o[n+1]=null,!0}},e.Queue=t}),e("backburner/deferred_action_queues",["backburner/queue","exports"],function(e,t){"use strict";function r(e,t){var r=this.queues={};this.queueNames=e=e||[];for(var n,o=0,a=e.length;a>o;o++)n=e[o],r[n]=new i(this,n,t[n])}function n(e,t){for(var r,n,i=0,o=t;o>=i;i++)if(r=e.queueNames[i],n=e.queues[r],n._queue.length)return i;return-1}var i=e.Queue;r.prototype={queueNames:null,queues:null,schedule:function(e,t,r,n,i,o){var a=this.queues,s=a[e];if(!s)throw new Error("You attempted to schedule an action in a queue ("+e+") that doesn't exist");return i?s.pushUnique(t,r,n,o):s.push(t,r,n,o)},flush:function(){for(var e,t,r,i,o=this.queues,a=this.queueNames,s=0,u=a.length;u>s;){e=a[s],t=o[e],r=t._queueBeingFlushed=t._queue.slice(),t._queue=[];var c,l,h,m,f=t.options,p=f&&f.before,d=f&&f.after,b=0,v=r.length;for(v&&p&&p();v>b;)c=r[b],l=r[b+1],h=r[b+2],m=r[b+3],"string"==typeof l&&(l=c[l]),l&&(h&&h.length>0?l.apply(c,h):l.call(c)),b+=4;t._queueBeingFlushed=null,v&&d&&d(),-1===(i=n(this,s))?s++:s=i}}},t.DeferredActionQueues=r}),e("backburner",["backburner/deferred_action_queues","exports"],function(e,t){"use strict";function r(e){return"number"==typeof e||g.test(e)}function n(e,t){this.queueNames=e,this.options=t||{},this.options.defaultQueue||(this.options.defaultQueue=e[0]),this.instanceStack=[]}function i(e){e.begin(),c=E.setTimeout(function(){c=null,e.end()})}function o(e,t,r){(!l||h>t)&&(l&&clearTimeout(l),l=E.setTimeout(function(){l=null,h=null,a(e)},r),h=t)}function a(e){var t,r,n,i,a=+new Date;e.run(function(){for(n=0,i=v.length;i>n&&(t=v[n],!(t>a));n+=2);for(r=v.splice(0,n),n=1,i=r.length;i>n;n+=2)e.schedule(e.options.defaultQueue,null,r[n])}),v.length&&o(e,v[0],v[0]-a)}function s(e,t){for(var r,n=-1,i=0,o=b.length;o>i;i++)if(r=b[i],r[0]===e&&r[1]===t){n=i;break}return n}function u(e,t){for(var r,n=-1,i=0,o=d.length;o>i;i++)if(r=d[i],r[0]===e&&r[1]===t){n=i;break}return n}var c,l,h,m=e.DeferredActionQueues,f=[].slice,p=[].pop,d=[],b=[],v=[],E=this,g=/\d+/;n.prototype={queueNames:null,options:null,currentInstance:null,instanceStack:null,begin:function(){var e=this.options&&this.options.onBegin,t=this.currentInstance;t&&this.instanceStack.push(t),this.currentInstance=new m(this.queueNames,this.options),e&&e(this.currentInstance,t)},end:function(){var e=this.options&&this.options.onEnd,t=this.currentInstance,r=null;try{t.flush()}finally{this.currentInstance=null,this.instanceStack.length&&(r=this.instanceStack.pop(),this.currentInstance=r),e&&e(t,r)}},run:function(e,t){var r;this.begin(),t||(t=e,e=null),"string"==typeof t&&(t=e[t]);var n=!1;try{r=arguments.length>2?t.apply(e,f.call(arguments,2)):t.call(e)}finally{n||(n=!0,this.end())}return r},defer:function(e,t,r){r||(r=t,t=null),"string"==typeof r&&(r=t[r]);var n=this.DEBUG?(new Error).stack:void 0,o=arguments.length>3?f.call(arguments,3):void 0;return this.currentInstance||i(this),this.currentInstance.schedule(e,t,r,o,!1,n)},deferOnce:function(e,t,r){r||(r=t,t=null),"string"==typeof r&&(r=t[r]);var n=this.DEBUG?(new Error).stack:void 0,o=arguments.length>3?f.call(arguments,3):void 0;return this.currentInstance||i(this),this.currentInstance.schedule(e,t,r,o,!0,n)},setTimeout:function(){function e(){t.apply(i,c)}var t,n,i,a,s,u,c=f.call(arguments),l=c.length,h=this;if(0!==l){if(1===l)t=c.shift(),n=0;else if(2===l)a=c[0],s=c[1],"function"==typeof s||"function"==typeof a[s]?(i=c.shift(),t=c.shift(),n=0):r(s)?(t=c.shift(),n=c.shift()):(t=c.shift(),n=0);else{var m=c[c.length-1];r(m)&&(n=c.pop()),a=c[0],u=c[1],"function"==typeof u||"string"==typeof u&&null!==a&&u in a?(i=c.shift(),t=c.shift()):t=c.shift()}var p=+new Date+parseInt(n,10);"string"==typeof t&&(t=i[t]);var d,b;for(d=0,b=v.length;b>d&&!(p<v[d]);d+=2);return v.splice(d,0,p,e),o(h,p,n),e}},throttle:function(e,t){var r,n,i,o=this,a=arguments,s=parseInt(p.call(a),10);return n=u(e,t),n>-1?d[n]:(i=E.setTimeout(function(){o.run.apply(o,a);var r=u(e,t);r>-1&&d.splice(r,1)},s),r=[e,t,i],d.push(r),r)},debounce:function(e,t){var r,n,i,o,a=this,u=arguments,c=p.call(u);return"number"==typeof c||"string"==typeof c?(r=c,c=!1):r=p.call(u),r=parseInt(r,10),n=s(e,t),n>-1&&(i=b[n],b.splice(n,1),clearTimeout(i[2])),o=E.setTimeout(function(){c||a.run.apply(a,u);var r=s(e,t);r>-1&&b.splice(r,1)},r),c&&-1===n&&a.run.apply(a,u),i=[e,t,o],b.push(i),i},cancelTimers:function(){var e,t;for(e=0,t=d.length;t>e;e++)clearTimeout(d[e][2]);for(d=[],e=0,t=b.length;t>e;e++)clearTimeout(b[e][2]);b=[],l&&(clearTimeout(l),l=null),v=[],c&&(clearTimeout(c),c=null)},hasTimers:function(){return!!v.length||c},cancel:function(e){var t=typeof e;if(e&&"object"===t&&e.queue&&e.method)return e.queue.cancel(e);if("function"!==t)return"[object Array]"===window.toString.call(e)?this._cancelItem(u,d,e)||this._cancelItem(s,b,e):void 0;for(var r=0,n=v.length;n>r;r+=2)if(v[r+1]===e)return v.splice(r,2),!0},_cancelItem:function(e,t,r){var n,i;return r.length<3?!1:(i=e(r[0],r[1]),i>-1&&(n=t[i],n[2]===r[2])?(t.splice(i,1),clearTimeout(r[2]),!0):!1)}},n.prototype.schedule=n.prototype.defer,n.prototype.scheduleOnce=n.prototype.deferOnce,n.prototype.later=n.prototype.setTimeout,t.Backburner=n})}(),function(){function e(){!Ember.run.currentRunLoop}var r=function(e){Ember.run.currentRunLoop=e},n=function(e,t){Ember.run.currentRunLoop=t},i=t("backburner").Backburner,o=new i(["sync","actions","destroy"],{sync:{before:Ember.beginPropertyChanges,after:Ember.endPropertyChanges},defaultQueue:"actions",onBegin:r,onEnd:n}),a=[].slice;Ember.run=function(){var e;if(Ember.onerror)try{e=o.run.apply(o,arguments)}catch(t){Ember.onerror(t)}else e=o.run.apply(o,arguments);return e},Ember.run.join=function(){if(!Ember.run.currentRunLoop)return Ember.run.apply(Ember.run,arguments);var e=a.call(arguments);e.unshift("actions"),Ember.run.schedule.apply(Ember.run,e)},Ember.run.backburner=o;Ember.run;Ember.run.currentRunLoop=null,Ember.run.queues=o.queueNames,Ember.run.begin=function(){o.begin()},Ember.run.end=function(){o.end()},Ember.run.schedule=function(){e(),o.schedule.apply(o,arguments)},Ember.run.hasScheduledTimers=function(){return o.hasTimers()},Ember.run.cancelTimers=function(){o.cancelTimers()},Ember.run.sync=function(){o.currentInstance&&o.currentInstance.queues.sync.flush()},Ember.run.later=function(){return o.later.apply(o,arguments)},Ember.run.once=function(){e();var t=a.call(arguments);return t.unshift("actions"),o.scheduleOnce.apply(o,t)},Ember.run.scheduleOnce=function(){return e(),o.scheduleOnce.apply(o,arguments)},Ember.run.next=function(){var e=a.call(arguments);return e.push(1),o.later.apply(o,e)},Ember.run.cancel=function(e){return o.cancel(e)},Ember.run.debounce=function(){return o.debounce.apply(o,arguments)},Ember.run.throttle=function(){return o.throttle.apply(o,arguments)}}(),function(){function e(e,t){return r(o(t)?Ember.lookup:e,t)}function t(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}Ember.LOG_BINDINGS=!1||!!Ember.ENV.LOG_BINDINGS;var r=Ember.get,n=(Ember.set,Ember.guidFor),i=/^([A-Z$]|([0-9][A-Z$]))/,o=Ember.isGlobalPath=function(e){return i.test(e)},a=function(e,t){this._direction="fwd",this._from=t,this._to=e,this._directionMap=Ember.Map.create()};a.prototype={copy:function(){var e=new a(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(t){var r=this._from,n=this._to;return Ember.trySet(t,n,e(t,r)),Ember.addObserver(t,r,this,this.fromDidChange),this._oneWay||Ember.addObserver(t,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 r=this._directionMap,n=r.get(e);n||(Ember.run.schedule("sync",this,this._sync,e),r.set(e,t)),"back"===n&&"fwd"===t&&r.set(e,"fwd")},_sync:function(t){var n=Ember.LOG_BINDINGS;if(!t.isDestroyed&&this._readyToSync){var i=this._directionMap,o=i.get(t),a=this._from,s=this._to;if(i.remove(t),"fwd"===o){var u=e(t,this._from);n&&Ember.Logger.log(" ",this.toString(),"->",u,t),this._oneWay?Ember.trySet(t,s,u):Ember._suspendObserver(t,s,this,this.toDidChange,function(){Ember.trySet(t,s,u)})}else if("back"===o){var c=r(t,this._to);n&&Ember.Logger.log(" ",this.toString(),"<-",c,t),Ember._suspendObserver(t,a,this,this.fromDidChange,function(){Ember.trySet(Ember.isGlobalPath(a)?Ember.lookup:t,a,c)})}}}},t(a,{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 r=this,n=new r(null,e);return n.oneWay(t)}}),Ember.Binding=a,Ember.bind=function(e,t,r){return new Ember.Binding(t,r).connect(e)},Ember.oneWay=function(e,t,r){return new Ember.Binding(t,r).oneWay().connect(e)}}(),function(){function e(e){var t=Ember.meta(e,!0),r=t.mixins;return r?t.hasOwnProperty("mixins")||(r=t.mixins=x(r)):r=t.mixins={},r}function t(e,t){return t&&t.length>0&&(e.mixins=C.call(t,function(e){if(e instanceof y)return e;var t=new y;return t.properties=e,t})),e}function r(e){return"function"==typeof e&&e.isMethod!==!1&&e!==Boolean&&e!==Object&&e!==Number&&e!==Array&&e!==Date&&e!==String}function n(e,t){var r;return t instanceof y?(r=T(t),e[r]?S:(e[r]=t,t.properties)):t}function i(e,t,r,n){var i;return i=r[e]||n[e],t[e]&&(i=i?i.concat(t[e]):t[e]),i}function o(e,t,r,n,i){var o;return void 0===n[t]&&(o=i[t]),o=o||e.descs[t],o&&o instanceof Ember.ComputedProperty?(r=x(r),r.func=Ember.wrap(r.func,o.func),r):r}function a(e,t,r,n,i){var o;return void 0===i[t]&&(o=n[t]),o=o||e[t],"function"!=typeof o?r:Ember.wrap(r,o)}function s(e,t,r,n){var i=n[t]||e[t];return i?"function"==typeof i.concat?i.concat(r):Ember.makeArray(i).concat(r):Ember.makeArray(r)}function u(e,t,n,i){var o=i[t]||e[t];if(!o)return n;var s=Ember.merge({},o);for(var u in n)if(n.hasOwnProperty(u)){var c=n[u];s[u]=r(c)?a(e,u,c,o,{}):c}return s}function c(e,t,n,i,c,l,h,m){if(n instanceof Ember.Descriptor){if(n===w&&c[t])return S;n.func&&(n=o(i,t,n,l,c)),c[t]=n,l[t]=void 0}else h&&O.call(h,t)>=0||"concatenatedProperties"===t||"mergedProperties"===t?n=s(e,t,n,l):m&&O.call(m,t)>=0?n=u(e,t,n,l):r(n)&&(n=a(e,t,n,l,c)),c[t]=void 0,l[t]=n}function l(e,t,r,o,a,s){function u(e){delete r[e],delete o[e]}for(var h,m,f,p,d,b,v=0,E=e.length;E>v;v++)if(h=e[v],m=n(t,h),m!==S)if(m){b=Ember.meta(a),a.willMergeMixin&&a.willMergeMixin(m),p=i("concatenatedProperties",m,o,a),d=i("mergedProperties",m,o,a);for(f in m)m.hasOwnProperty(f)&&(s.push(f),c(a,f,m[f],b,r,o,p,d));m.hasOwnProperty("toString")&&(a.toString=m.toString)}else h.mixins&&(l(h.mixins,t,r,o,a,s),h._without&&A.call(h._without,u))}function h(e,t,r,n){if(N.test(t)){var i=n.bindings;i?n.hasOwnProperty("bindings")||(i=n.bindings=x(n.bindings)):i=n.bindings={},i[t]=r}}function m(e,t){var r,n,i,o=t.bindings;if(o){for(r in o)n=o[r],n&&(i=r.slice(0,-7),n instanceof Ember.Binding?(n=n.copy(),n.to(i)):n=new Ember.Binding(i,n),n.connect(e),e[r]=n);t.bindings={}}}function f(e,t){return m(e,t||Ember.meta(e)),e}function p(e,t,r,n,i){var o,a=t.methodName;return n[a]||i[a]?(o=i[a],t=n[a]):r.descs[a]?(t=r.descs[a],o=void 0):(t=void 0,o=e[a]),{desc:t,value:o}}function d(e,t,r,n,i){var o=r[n];if(o)for(var a=0,s=o.length;s>a;a++)Ember[i](e,o[a],null,t)}function b(e,t,r){var n=e[t];"function"==typeof n&&(d(e,t,n,"__ember_observesBefore__","removeBeforeObserver"),d(e,t,n,"__ember_observes__","removeObserver"),d(e,t,n,"__ember_listens__","removeListener")),"function"==typeof r&&(d(e,t,r,"__ember_observesBefore__","addBeforeObserver"),d(e,t,r,"__ember_observes__","addObserver"),d(e,t,r,"__ember_listens__","addListener"))}function v(t,r,n){var i,o,a,s={},u={},c=Ember.meta(t),m=[];l(r,e(t),s,u,t,m);for(var d=0,v=m.length;v>d;d++)if(i=m[d],"constructor"!==i&&u.hasOwnProperty(i)&&(a=s[i],o=u[i],a!==w)){for(;a&&a instanceof _;){var E=p(t,a,c,s,u);a=E.desc,o=E.value}(void 0!==a||void 0!==o)&&(b(t,i,o),h(t,i,o,c),V(t,i,a,o,c))}return n||f(t,c),t}function E(e,t,r){var n=T(e);if(r[n])return!1;if(r[n]=!0,e===t)return!0;for(var i=e.mixins,o=i?i.length:0;--o>=0;)if(E(i[o],t,r))return!0;return!1}function g(e,t,r){if(!r[T(t)])if(r[T(t)]=!0,t.properties){var n=t.properties;for(var i in n)n.hasOwnProperty(i)&&(e[i]=!0)}else t.mixins&&A.call(t.mixins,function(t){g(e,t,r)})}var y,w,_,C=Ember.ArrayPolyfills.map,O=Ember.ArrayPolyfills.indexOf,A=Ember.ArrayPolyfills.forEach,P=[].slice,x=Ember.create,V=Ember.defineProperty,T=Ember.guidFor,S={},N=Ember.IS_BINDING=/^.+Binding$/;Ember.mixin=function(e){var t=P.call(arguments,1);return v(e,t,!1),e},Ember.Mixin=function(){return t(this,arguments)},y=Ember.Mixin,y.prototype={properties:null,mixins:null,ownerConstructor:null},y._apply=v,y.applyPartial=function(e){var t=P.call(arguments,1);return v(e,t,!0)},y.finishPartial=f,Ember.anyUnprocessedMixins=!1,y.create=function(){Ember.anyUnprocessedMixins=!0;var e=this;return t(new e,arguments)};var D=y.prototype;D.reopen=function(){var e,t;this.properties?(e=y.create(),e.properties=this.properties,delete this.properties,this.mixins=[e]):this.mixins||(this.mixins=[]);var r,n=arguments.length,i=this.mixins;for(r=0;n>r;r++)e=arguments[r],e instanceof y?i.push(e):(t=y.create(),t.properties=e,i.push(t));return this},D.apply=function(e){return v(e,[this],!1)},D.applyPartial=function(e){return v(e,[this],!0)},D.detect=function(e){if(!e)return!1;if(e instanceof y)return E(e,this,{});var t=Ember.meta(e,!1).mixins;return t?!!t[T(this)]:!1},D.without=function(){var e=new y(this);return e._without=P.call(arguments),e},D.keys=function(){var e={},t={},r=[];g(e,this,t);for(var n in e)e.hasOwnProperty(n)&&r.push(n);return r},y.mixins=function(e){var t=Ember.meta(e,!1).mixins,r=[];if(!t)return r;for(var n in t){var i=t[n];i.properties||r.push(i)}return r},w=new Ember.Descriptor,w.toString=function(){return"(Required Property)"},Ember.required=function(){return w},_=function(e){this.methodName=e},_.prototype=new Ember.Descriptor,Ember.alias=function(e){return new _(e)},Ember.aliasMethod=function(e){return new _(e)},Ember.observer=function(){var e,t=P.call(arguments,-1)[0];if(e=P.call(arguments,0,-1),"function"!=typeof t&&(t=arguments[0],e=P.call(arguments,1)),"function"!=typeof t)throw new Ember.Error("Ember.observer called without a function");return t.__ember_observes__=e,t},Ember.immediateObserver=function(){for(var e=0,t=arguments.length;t>e;e++){arguments[e]}return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(){var e,t=P.call(arguments,-1)[0];if(e=P.call(arguments,0,-1),"function"!=typeof t&&(t=arguments[0],e=P.call(arguments,1)),"function"!=typeof t)throw new Ember.Error("Ember.beforeObserver called without a function");return t.__ember_observesBefore__=e,t}}(),function(){var e=Ember.EnumerableUtils.forEach,t=Ember.EnumerableUtils.indexOf;Ember.libraries=function(){var r=[],n=0,i=function(e){for(var t=0;t<r.length;t++)if(r[t].name===e)return r[t]};return r.register=function(e,t){i(e)||r.push({name:e,version:t})},r.registerCoreLibrary=function(e,t){i(e)||r.splice(n++,0,{name:e,version:t})},r.deRegister=function(e){var n=i(e);n&&r.splice(t(r,n),1)},r.each=function(t){e(r,function(e){t(e.name,e.version)})},r}(),Ember.libraries.registerCoreLibrary("Ember",Ember.VERSION)}(),function(){e("rsvp/all",["./promise","./utils","exports"],function(e,t,r){"use strict";function n(e,t){if(!o(e))throw new TypeError("You must pass an array to all.");return new i(function(t,r){function n(e){return function(t){i(e,t)}}function i(e,r){s[e]=r,0===--u&&t(s)}var o,s=[],u=e.length;0===u&&t([]);for(var c=0;c<e.length;c++)o=e[c],o&&a(o.then)?o.then(n(c),r,"RSVP: RSVP#all"):i(c,o)},t)}var i=e.Promise,o=t.isArray,a=t.isFunction;r.all=n}),e("rsvp/cast",["exports"],function(e){"use strict";function t(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=this;return new t(function(t){t(e)})}e.cast=t}),e("rsvp/config",["./events","exports"],function(e,t){"use strict";function r(e,t){return"onerror"===e?(i.on("error",t),void 0):2!==arguments.length?i[e]:(i[e]=t,void 0)}var n=e.EventTarget,i={instrument:!1};n.mixin(i),t.config=i,t.configure=r}),e("rsvp/defer",["./promise","exports"],function(e,t){"use strict";function r(e){var t={resolve:void 0,reject:void 0,promise:void 0};return t.promise=new n(function(e,r){t.resolve=e,t.reject=r},e),t}var n=e.Promise;t.defer=r}),e("rsvp/events",["exports"],function(e){"use strict";var t=function(e,t){for(var r=0,n=e.length;n>r;r++)if(e[r]===t)return r;return-1},r=function(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t},n={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e._promiseCallbacks=void 0,e},on:function(e,n){var i,o=r(this);i=o[e],i||(i=o[e]=[]),-1===t(i,n)&&i.push(n)},off:function(e,n){var i,o,a=r(this);return n?(i=a[e],o=t(i,n),-1!==o&&i.splice(o,1),void 0):(a[e]=[],void 0)},trigger:function(e,t){var n,i,o=r(this);if(n=o[e])for(var a=0;a<n.length;a++)i=n[a],i(t)}};e.EventTarget=n}),e("rsvp/hash",["./promise","./utils","exports"],function(e,t,r){"use strict";function n(e){var t={},r=a(e),n=r.length;return new i(function(i,a){var s,u;if(0===n)return i({}),void 0;for(var c=function(e){return function(t){l(e,t)}},l=function(e,r){t[e]=r,0===--n&&i(t)},h=0,m=r.length;m>h;h++)u=r[h],s=e[u],s&&o(s.then)?s.then(c(u),a,"RSVP: RSVP#hash"):l(u,s)})}var i=e.Promise,o=t.isFunction,a=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};r.hash=n}),e("rsvp/instrument",["./config","./utils","exports"],function(e,t,r){"use strict";function n(e,t,r){try{i.trigger(e,{guid:t._guidKey+t._id,eventName:e,detail:t._detail,childGuid:r&&t._guidKey+r._id,label:t._label,timeStamp:o()})}catch(n){setTimeout(function(){throw n},0)}}var i=e.config,o=t.now;r.instrument=n}),e("rsvp/node",["./promise","./all","exports"],function(e,t,r){"use strict";function n(e,t){return function(r,n){r?t(r):arguments.length>2?e(s.call(arguments,1)):e(n)}}function i(e,t){return function(){var r=s.call(arguments),i=this||t;return new o(function(t,o){a(r).then(function(r){try{r.push(n(t,o)),e.apply(i,r)}catch(a){o(a)}})})}}var o=e.Promise,a=t.all,s=Array.prototype.slice;r.denodeify=i}),e("rsvp/promise",["./config","./events","./cast","./instrument","./utils","exports"],function(e,t,r,n,i,o){"use strict";function a(e,t){if(!w(e))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof a))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._id=O++,this._label=t,this._subscribers=[],v.instrument&&g("created",this),s(e,this)}function s(e,t){function r(e){m(t,e)}function n(e){p(t,e)}try{e(r,n)}catch(i){n(i)}}function u(e,t,r,n){var i,o,a,s,u=w(r);if(u)try{i=r(n),a=!0}catch(c){s=!0,o=c}else i=n,a=!0;h(t,i)||(u&&a?m(t,i):s?p(t,o):e===x?m(t,i):e===V&&p(t,i))}function c(e,t,r,n){var i=e._subscribers,o=i.length;i[o]=t,i[o+x]=r,i[o+V]=n}function l(e,t){var r,n,i=e._subscribers,o=e._detail;v.instrument&&g(t===x?"fulfilled":"rejected",e);for(var a=0;a<i.length;a+=3)r=i[a],n=i[a+t],u(t,r,n,o);e._subscribers=null}function h(e,t){var r,n=null;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(y(t)&&(n=t.then,w(n)))return n.call(t,function(n){return r?!0:(r=!0,t!==n?m(e,n):f(e,n),void 0)},function(t){return r?!0:(r=!0,p(e,t),void 0)},"Locked onto "+(e._label||" unknown promise")),!0}catch(i){return r?!0:(p(e,i),!0)}return!1}function m(e,t){e===t?f(e,t):h(e,t)||f(e,t)}function f(e,t){e._state===A&&(e._state=P,e._detail=t,v.async(d,e))}function p(e,t){e._state===A&&(e._state=P,e._detail=t,v.async(b,e))}function d(e){l(e,e._state=x)}function b(e){e._onerror&&e._onerror(e._detail),l(e,e._state=V)}var v=e.config,E=(t.EventTarget,r.cast),g=n.instrument,y=i.objectOrFunction,w=i.isFunction,_=i.now,C="rsvp_"+_()+"-",O=0,A=void 0,P=0,x=1,V=2;a.prototype={constructor:a,_id:void 0,_guidKey:C,_label:void 0,_state:void 0,_detail:void 0,_subscribers:void 0,_onerror:function(e){v.trigger("error",e)},then:function(e,t,r){var n=this;this._onerror=null;var i=new this.constructor(function(){},r);if(this._state){var o=arguments;v.async(function(){u(n._state,i,o[n._state-1],n._detail)})}else c(this,i,e,t);return v.instrument&&g("chained",n,i),i},"catch":function(e,t){return this.then(null,e,t)},"finally":function(e,t){var r=this.constructor;return this.then(function(t){return r.cast(e()).then(function(){return t})},function(t){return r.cast(e()).then(function(){throw t})},t)}},a.cast=E,o.Promise=a}),e("rsvp/race",["./promise","./utils","exports"],function(e,t,r){"use strict";function n(e,t){if(!o(e))throw new TypeError("You must pass an array to race.");return new i(function(t,r){for(var n,i=0;i<e.length;i++)n=e[i],n&&"function"==typeof n.then?n.then(t,r,"RSVP: RSVP#race"):t(n)},t)}var i=e.Promise,o=t.isArray;r.race=n}),e("rsvp/reject",["./promise","exports"],function(e,t){"use strict";function r(e,t){return new n(function(t,r){r(e)},t)}var n=e.Promise;t.reject=r}),e("rsvp/resolve",["./promise","exports"],function(e,t){"use strict";function r(e,t){return new n(function(t){t(e)},t)}var n=e.Promise;t.resolve=r}),e("rsvp/rethrow",["exports"],function(e){"use strict";function t(e){throw r.setTimeout(function(){throw e}),e}var r="undefined"==typeof global?this:global;e.rethrow=t}),e("rsvp/utils",["exports"],function(e){"use strict";function t(e){return r(e)||"object"==typeof e&&null!==e}function r(e){return"function"==typeof e}function n(e){return"[object Array]"===Object.prototype.toString.call(e)}var i=Date.now||function(){return(new Date).getTime()};e.objectOrFunction=t,e.isFunction=r,e.isArray=n,e.now=i}),e("rsvp",["./rsvp/events","./rsvp/promise","./rsvp/node","./rsvp/all","./rsvp/race","./rsvp/hash","./rsvp/rethrow","./rsvp/defer","./rsvp/config","./rsvp/resolve","./rsvp/reject","exports"],function(e,t,r,n,i,o,a,s,u,c,l,h){"use strict";function m(e,t){C.async(e,t)}function f(){C.on.apply(C,arguments)}function p(){C.off.apply(C,arguments)}var d=e.EventTarget,b=t.Promise,v=r.denodeify,E=n.all,g=i.race,y=o.hash,w=a.rethrow,_=s.defer,C=u.config,O=u.configure,A=c.resolve,P=l.reject;h.Promise=b,h.EventTarget=d,h.all=E,h.race=g,h.hash=y,h.rethrow=w,h.defer=_,h.denodeify=v,h.configure=O,h.on=f,h.off=p,h.resolve=A,h.reject=P,h.async=m})}(),function(){Ember.MODEL_FACTORY_INJECTIONS=!1||!!Ember.ENV.MODEL_FACTORY_INJECTIONS,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.factoryCache=new e(t&&t.cache),this.typeInjections=new e(t&&t.typeInjections),this.injections={},this.factoryTypeInjections=new e(t&&t.factoryTypeInjections),this.factoryInjections={},this._options=new e(t&&t._options),this._typeOptions=new e(t&&t._typeOptions)}function r(e){throw new Error(e+" is not currently supported on child containers")}function n(e,t){var r=o(e,t,"singleton");return r!==!1}function i(e,t){var r={};if(!t)return r;for(var n,i,o=0,a=t.length;a>o;o++){if(n=t[o],i=e.lookup(n.fullName),void 0===i)throw new Error("Attempting to inject an unknown injection: `"+n.fullName+"`");r[n.property]=i}return r}function o(e,t,r){var n=e._options.get(t);if(n&&void 0!==n[r])return n[r];var i=t.split(":")[0];return n=e._typeOptions.get(i),n?n[r]:void 0}function a(e,t){var r,n=e.normalize(t),i=e.resolve(n),o=e.factoryCache,a=t.split(":")[0];if(void 0!==i){if(o.has(t))return o.get(t);if(!i||"function"!=typeof i.extend||!Ember.MODEL_FACTORY_INJECTIONS&&"model"===a)return i;var c=s(e,t),l=u(e,t);return l._toString=e.makeToString(i,t),r=i.extend(c),r.reopenClass(l),o.set(t,r),r}}function s(e,t){var r=t.split(":"),n=r[0],o=[];return o=o.concat(e.typeInjections.get(n)||[]),o=o.concat(e.injections[t]||[]),o=i(e,o),o._debugContainerKey=t,o.container=e,o}function u(e,t){var r=t.split(":"),n=r[0],o=[];return o=o.concat(e.factoryTypeInjections.get(n)||[]),o=o.concat(e.factoryInjections[t]||[]),o=i(e,o),o._debugContainerKey=t,o}function c(e,t){var r=a(e,t);return o(e,t,"instantiate")===!1?r:r?"function"==typeof r.extend?r.create():r.create(s(e,t)):void 0}function l(e,t){e.cache.eachLocal(function(r,n){o(e,r,"instantiate")!==!1&&t(n)})}function h(e){e.cache.eachLocal(function(t,r){o(e,t,"instantiate")!==!1&&r.destroy()}),e.cache.dict={}}function m(e,t,r,n){var i=e.get(t);i||(i=[],e.set(t,i)),i.push({property:r,fullName:n})}function f(e,t,r,n){var i=e[t]=e[t]||[];i.push({property:r,fullName:n})}return e.prototype={parent:null,dict:null,get:function(e){var t=this.dict;return t.hasOwnProperty(e)?t[e]:this.parent?this.parent.get(e):void 0},set:function(e,t){this.dict[e]=t},remove:function(e){delete this.dict[e]},has:function(e){var t=this.dict;return t.hasOwnProperty(e)?!0:this.parent?this.parent.has(e):!1},eachLocal:function(e,t){var r=this.dict;for(var n in r)r.hasOwnProperty(n)&&e.call(t,n,r[n])}},t.prototype={parent:null,children:null,resolver:null,registry:null,cache:null,typeInjections:null,injections:null,_options:null,_typeOptions:null,child:function(){var e=new t(this);return this.children.push(e),e},set:function(e,t,r){e[t]=r},register:function(e,t,r){if(-1===e.indexOf(":"))throw new TypeError("malformed fullName, expected: `type:name` got: "+e);if(void 0===t)throw new TypeError("Attempting to register an unknown factory: `"+e+"`");var n=this.normalize(e);if(this.cache.has(n))throw new Error("Cannot re-register: `"+e+"`, as it has already been looked up.");this.registry.set(n,t),this._options.set(n,r||{})},unregister:function(e){var t=this.normalize(e);this.registry.remove(t),this.cache.remove(t),this.factoryCache.remove(t),this._options.remove(t)},resolve:function(e){return this.resolver(e)||this.registry.get(e)},describe:function(e){return e},normalize:function(e){return e},makeToString:function(e){return e.toString()},lookup:function(e,t){if(e=this.normalize(e),t=t||{},this.cache.has(e)&&t.singleton!==!1)return this.cache.get(e);var r=c(this,e);return void 0!==r?(n(this,e)&&t.singleton!==!1&&this.cache.set(e,r),r):void 0},lookupFactory:function(e){return a(this,e)},has:function(e){return this.cache.has(e)?!0:!!this.resolve(e)},optionsForType:function(e,t){this.parent&&r("optionsForType"),this._typeOptions.set(e,t)},options:function(e,t){this.optionsForType(e,t)},typeInjection:function(e,t,n){this.parent&&r("typeInjection"),m(this.typeInjections,e,t,n)},injection:function(e,t,n){return this.parent&&r("injection"),-1===e.indexOf(":")?this.typeInjection(e,t,n):(f(this.injections,e,t,n),void 0)},factoryTypeInjection:function(e,t,n){this.parent&&r("factoryTypeInjection"),m(this.factoryTypeInjections,e,t,n)},factoryInjection:function(e,t,n){return this.parent&&r("injection"),-1===e.indexOf(":")?this.factoryTypeInjection(e,t,n):(f(this.factoryInjections,e,t,n),void 0)},destroy:function(){for(var e=0,t=this.children.length;t>e;e++)this.children[e].destroy();this.children=[],l(this,function(e){e.destroy()}),this.parent=void 0,this.isDestroyed=!0},reset:function(){for(var e=0,t=this.children.length;t>e;e++)h(this.children[e]);h(this)}},t})}(),function(){function e(r,n,i,o){var a,s,u;if("object"!=typeof r||null===r)return r;if(n&&(s=t(i,r))>=0)return o[s];if("array"===Ember.typeOf(r)){if(a=r.slice(),n)for(s=a.length;--s>=0;)a[s]=e(a[s],n,i,o)}else if(Ember.Copyable&&Ember.Copyable.detect(r))a=r.copy(n,i,o);else{a={};for(u in r)r.hasOwnProperty(u)&&"__"!==u.substring(0,2)&&(a[u]=n?e(r[u],n,i,o):r[u])}return n&&(i.push(r),o.push(a)),a}var t=Ember.EnumerableUtils.indexOf;if(Ember.compare=function i(e,t){if(e===t)return 0;var r=Ember.typeOf(e),n=Ember.typeOf(t),o=Ember.Comparable;if(o){if("instance"===r&&o.detect(e.constructor))return e.constructor.compare(e,t);if("instance"===n&&o.detect(t.constructor))return 1-t.constructor.compare(t,e)}var a=Ember.ORDER_DEFINITION_MAPPING;if(!a){var s=Ember.ORDER_DEFINITION;a=Ember.ORDER_DEFINITION_MAPPING={};var u,c;for(u=0,c=s.length;c>u;++u)a[s[u]]=u;delete Ember.ORDER_DEFINITION}var l=a[r],h=a[n];if(h>l)return-1;if(l>h)return 1;switch(r){case"boolean":case"number":return t>e?-1:e>t?1:0;case"string":var m=e.localeCompare(t);return 0>m?-1:m>0?1:0;case"array":for(var f=e.length,p=t.length,d=Math.min(f,p),b=0,v=0;0===b&&d>v;)b=i(e[v],t[v]),v++;return 0!==b?b:p>f?-1:f>p?1:0;case"instance":return Ember.Comparable&&Ember.Comparable.detect(e)?e.compare(e,t):0;case"date":var E=e.getTime(),g=t.getTime();return g>E?-1:E>g?1:0;default:return 0}},Ember.copy=function(t,r){return"object"!=typeof t||null===t?t:Ember.Copyable&&Ember.Copyable.detect(t)?t.copy(r):e(t,r,r?[]:null,r?[]:null)},Ember.inspect=function(e){var t=Ember.typeOf(e);if("array"===t)return"["+e+"]";if("object"!==t)return e+"";var r,n=[];for(var i in e)if(e.hasOwnProperty(i)){if(r=e[i],"toString"===r)continue;"function"===Ember.typeOf(r)&&(r="function() { ... }"),n.push(i+": "+r)}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.create.isSimulated){var r=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","valueOf","toLocaleString","toString"],n=function(e,r,n){"__"!==n.substring(0,2)&&"_super"!==n&&(t(r,n)>=0||e.hasOwnProperty(n)&&r.push(n))};Ember.keys=function(e){var t,i=[];for(t in e)n(e,i,t);for(var o=0,a=r.length;a>o;o++)t=r[o],n(e,i,t);return i}}}(),function(){var e=/[ _]/g,t={},r=/([a-z\d])([A-Z])/g,n=/(\-|_|\.|\s)+(.)?/g,i=/([a-z\d])([A-Z]+)/g,o=/\-|\s+/g;Ember.STRINGS={},Ember.String={fmt:function(e,t){var r=0;return e.replace(/%@([0-9]+)?/g,function(e,n){return n=n?parseInt(n,10)-1:r++,e=t[n],null===e?"(null)":void 0===e?"":Ember.inspect(e)})},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(r,"$1_$2").toLowerCase()},dasherize:function(r){var n,i=t,o=i.hasOwnProperty(r);return o?i[r]:(n=Ember.String.decamelize(r).replace(e,"-"),i[r]=n,n)},camelize:function(e){return e.replace(n,function(e,t,r){return r?r.toUpperCase():""}).replace(/^([A-Z])/,function(e){return e.toLowerCase()})},classify:function(e){for(var t=e.split("."),r=[],n=0,i=t.length;i>n;n++){var o=Ember.String.camelize(t[n]);r.push(o.charAt(0).toUpperCase()+o.substr(1))}return r.join(".")},underscore:function(e){return e.replace(i,"$1_$2").replace(o,"_").toLowerCase()},capitalize:function(e){return e.charAt(0).toUpperCase()+e.substr(1)}}}(),function(){var e=Ember.String.fmt,t=Ember.String.w,r=Ember.String.loc,n=Ember.String.camelize,i=Ember.String.decamelize,o=Ember.String.dasherize,a=Ember.String.underscore,s=Ember.String.capitalize,u=Ember.String.classify;(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 r(this,arguments)},String.prototype.camelize=function(){return n(this)},String.prototype.decamelize=function(){return i(this)},String.prototype.dasherize=function(){return o(this)
18
- },String.prototype.underscore=function(){return a(this)},String.prototype.classify=function(){return u(this)},String.prototype.capitalize=function(){return s(this)})}(),function(){var e=Ember.get,t=Ember.set,r=Array.prototype.slice,n=Ember.getProperties;Ember.Observable=Ember.Mixin.create({get:function(t){return e(this,t)},getProperties:function(){return n.apply(null,[this].concat(r.call(arguments)))},set:function(e,r){return t(this,e,r),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,r){Ember.addBeforeObserver(this,e,t,r)},addObserver:function(e,t,r){Ember.addObserver(this,e,t,r)},removeObserver:function(e,t,r){Ember.removeObserver(this,e,t,r)},hasObserverFor:function(e){return Ember.hasListeners(this,e+":change")},getWithDefault:function(e,t){return Ember.getWithDefault(this,e,t)},incrementProperty:function(r,n){return Ember.isNone(n)&&(n=1),t(this,r,(e(this,r)||0)+n),e(this,r)},decrementProperty:function(r,n){return Ember.isNone(n)&&(n=1),t(this,r,(e(this,r)||0)-n),e(this,r)},toggleProperty:function(r){return t(this,r,!e(this,r)),e(this,r)},cacheFor:function(e){return Ember.cacheFor(this,e)},observersForKey:function(e){return Ember.observersFor(this,e)}})}(),function(){function e(){var e,t,o=!1,a=function(){o||a.proto(),n(this,i,g),n(this,"_super",g);var u=s(this),h=u.proto;if(u.proto=this,e){var m=e;e=null,this.reopen.apply(this,m)}if(t){var f=t;t=null;for(var p=this.concatenatedProperties,b=0,y=f.length;y>b;b++){var w=f[b];if("object"!=typeof w&&void 0!==w)throw new Ember.Error("Ember.Object.create only accepts objects.");if(w)for(var _=Ember.keys(w),C=0,O=_.length;O>C;C++){var A=_[C];if(w.hasOwnProperty(A)){var P=w[A],x=Ember.IS_BINDING;if(x.test(A)){var V=u.bindings;V?u.hasOwnProperty("bindings")||(V=u.bindings=r(u.bindings)):V=u.bindings={},V[A]=P}var T=u.descs[A];if(p&&E(p,A)>=0){var S=this[A];P=S?"function"==typeof S.concat?S.concat(P):Ember.makeArray(S).concat(P):Ember.makeArray(P)}T?T.set(this,A,P):"function"!=typeof this.setUnknownProperty||A in this?v?Ember.defineProperty(this,A,null,P):this[A]=P:this.setUnknownProperty(A,P)}}}}d(this,u),this.init.apply(this,arguments),u.proto=h,c(this),l(this,"init")};return a.toString=f.prototype.toString,a.willReopen=function(){o&&(a.PrototypeMixin=f.create(a.PrototypeMixin)),o=!1},a._initMixins=function(t){e=t},a._initProperties=function(e){t=e},a.proto=function(){var e=a.superclass;return e&&e.proto(),o||(o=!0,a.PrototypeMixin.applyPartial(a.prototype),u(a.prototype)),this.prototype},a}function t(e){return function(){return e}}var r=(Ember.set,Ember.get,Ember.create),n=Ember.platform.defineProperty,i=Ember.GUID_KEY,o=Ember.guidFor,a=Ember.generateGuid,s=Ember.meta,u=Ember.rewatch,c=Ember.finishChains,l=Ember.sendEvent,h=Ember.destroy,m=Ember.run.schedule,f=Ember.Mixin,p=f._apply,d=f.finishPartial,b=f.prototype.reopen,v=Ember.ENV.MANDATORY_SETTER,E=Ember.EnumerableUtils.indexOf,g={configurable:!0,writable:!0,enumerable:!1,value:void 0},y=e();y.toString=function(){return"Ember.CoreObject"},y.PrototypeMixin=f.create({reopen:function(){return p(this,arguments,!0),this},init:function(){},concatenatedProperties:null,isDestroyed:!1,isDestroying:!1,destroy:function(){return this.isDestroying?void 0:(this.isDestroying=!0,m("actions",this,this.willDestroy),m("destroy",this,this._scheduledDestroy),this)},willDestroy:Ember.K,_scheduledDestroy:function(){this.isDestroyed||(h(this),this.isDestroyed=!0)},bind:function(e,t){return t instanceof Ember.Binding||(t=Ember.Binding.from(t)),t.to(e).connect(this),t},toString:function(){var e="function"==typeof this.toStringExtension,r=e?":"+this.toStringExtension():"",n="<"+this.constructor.toString()+":"+o(this)+r+">";return this.toString=t(n),n}}),y.PrototypeMixin.ownerConstructor=y,Ember.config.overridePrototypeMixin&&Ember.config.overridePrototypeMixin(y.PrototypeMixin),y.__super__=null;var w=f.create({ClassMixin:Ember.required(),PrototypeMixin:Ember.required(),isClass:!0,isMethod:!1,extend:function(){var t,n=e();return n.ClassMixin=f.create(this.ClassMixin),n.PrototypeMixin=f.create(this.PrototypeMixin),n.ClassMixin.ownerConstructor=n,n.PrototypeMixin.ownerConstructor=n,b.apply(n.PrototypeMixin,arguments),n.superclass=this,n.__super__=this.prototype,t=n.prototype=r(this.prototype),t.constructor=n,a(t),s(t).proto=t,n.ClassMixin.apply(n),n},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(),b.apply(this.PrototypeMixin,arguments),this},reopenClass:function(){return b.apply(this.ClassMixin,arguments),p(this,arguments,!1),this},detect:function(e){if("function"!=typeof e)return!1;for(;e;){if(e===this)return!0;e=e.superclass}return!1},detectInstance:function(e){return e instanceof this},metaForProperty:function(e){var t=s(this.proto(),!1).descs[e];return t._meta||{}},eachComputedProperty:function(e,t){var r,n=this.proto(),i=s(n).descs,o={};for(var a in i)r=i[a],r instanceof Ember.ComputedProperty&&e.call(t||this,a,r._meta||o)}});w.ownerConstructor=y,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(w),y.ClassMixin=w,w.apply(y),Ember.CoreObject=y}(),function(){Ember.Object=Ember.CoreObject.extend(Ember.Observable),Ember.Object.toString=function(){return"Ember.Object"}}(),function(){function e(t,r,i){var a=t.length;c[t.join(".")]=r;for(var s in r)if(l.call(r,s)){var u=r[s];if(t[a]=s,u&&u.toString===n)u.toString=o(t.join(".")),u[m]=t.join(".");else if(u&&u.isNamespace){if(i[h(u)])continue;i[h(u)]=!0,e(t,u,i)}}t.length=a}function t(){var e,t,r=Ember.Namespace,n=Ember.lookup;if(!r.PROCESSED)for(var i in n)if("parent"!==i&&"top"!==i&&"frameElement"!==i&&"webkitStorageInfo"!==i&&!("globalStorage"===i&&n.StorageList&&n.globalStorage instanceof n.StorageList||n.hasOwnProperty&&!n.hasOwnProperty(i))){try{e=Ember.lookup[i],t=e&&e.isNamespace}catch(o){continue}t&&(e[m]=i)}}function r(e){var t=e.superclass;return t?t[m]?t[m]:r(t):void 0}function n(){Ember.BOOTED||this[m]||i();var e;if(this[m])e=this[m];else if(this._toString)e=this._toString;else{var t=r(this);e=t?"(subclass of "+t+")":"(unknown mixin)",this.toString=o(e)}return e}function i(){var r=!u.PROCESSED,n=Ember.anyUnprocessedMixins;if(r&&(t(),u.PROCESSED=!0),r||n){for(var i,o=u.NAMESPACES,a=0,s=o.length;s>a;a++)i=o[a],e([i.toString()],i,{});Ember.anyUnprocessedMixins=!1}}function o(e){return function(){return e}}var a=Ember.get,s=Ember.ArrayPolyfills.indexOf,u=Ember.Namespace=Ember.Object.extend({isNamespace:!0,init:function(){Ember.Namespace.NAMESPACES.push(this),Ember.Namespace.PROCESSED=!1},toString:function(){var e=a(this,"name");return e?e:(t(),this[Ember.GUID_KEY+"_name"])},nameClasses:function(){e([this.toString()],this,{})},destroy:function(){var e=Ember.Namespace.NAMESPACES;Ember.lookup[this.toString()]=void 0,e.splice(s.call(e,this),1),this._super()}});u.reopenClass({NAMESPACES:[Ember],NAMESPACES_BY_ID:{},PROCESSED:!1,processAll:i,byName:function(e){return Ember.BOOTED||i(),c[e]}});var c=u.NAMESPACES_BY_ID,l={}.hasOwnProperty,h=Ember.guidFor,m=Ember.NAME_KEY=Ember.GUID_KEY+"_name";Ember.Mixin.prototype.toString=n}(),function(){function e(e,t){var r=t.slice(8);r in this||u(this,r)}function t(e,t){var r=t.slice(8);r in this||c(this,r)}var r=Ember.get,n=Ember.set,i=(Ember.String.fmt,Ember.addBeforeObserver),o=Ember.addObserver,a=Ember.removeBeforeObserver,s=Ember.removeObserver,u=Ember.propertyWillChange,c=Ember.propertyDidChange,l=Ember.meta,h=Ember.defineProperty;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer("content",function(){}),isTruthy:Ember.computed.bool("content"),_debugContainerKey:null,willWatchProperty:function(r){var n="content."+r;i(this,n,null,e),o(this,n,null,t)},didUnwatchProperty:function(r){var n="content."+r;a(this,n,null,e),s(this,n,null,t)},unknownProperty:function(e){var t=r(this,"content");return t?r(t,e):void 0},setUnknownProperty:function(e,t){var i=l(this);if(i.proto===this)return h(this,e,null,t),t;var o=r(this,"content");return n(o,e,t)}})}(),function(){function e(){return 0===s.length?{}:s.pop()}function t(e){return s.push(e),null}function r(e,t){function r(r){var o=n(r,e);return i?t===o:!!o}var i=2===arguments.length;return r}var n=Ember.get,i=Ember.set,o=Array.prototype.slice,a=Ember.EnumerableUtils.indexOf,s=[];Ember.Enumerable=Ember.Mixin.create({nextObject:Ember.required(Function),firstObject:Ember.computed(function(){if(0===n(this,"length"))return void 0;var r,i=e();return r=this.nextObject(0,null,i),t(i),r}).property("[]"),lastObject:Ember.computed(function(){var r=n(this,"length");if(0===r)return void 0;var i,o=e(),a=0,s=null;do s=i,i=this.nextObject(a++,s,o);while(void 0!==i);return t(o),s}).property("[]"),contains:function(e){return void 0!==this.find(function(t){return t===e})},forEach:function(r,i){if("function"!=typeof r)throw new TypeError;var o=n(this,"length"),a=null,s=e();void 0===i&&(i=null);for(var u=0;o>u;u++){var c=this.nextObject(u,a,s);r.call(i,c,u,this),a=c}return a=null,s=t(s),this},getEach:function(e){return this.mapBy(e)},setEach:function(e,t){return this.forEach(function(r){i(r,e,t)})},map:function(e,t){var r=Ember.A();return this.forEach(function(n,i,o){r[i]=e.call(t,n,i,o)}),r},mapBy:function(e){return this.map(function(t){return n(t,e)})},mapProperty:Ember.aliasMethod("mapBy"),filter:function(e,t){var r=Ember.A();return this.forEach(function(n,i,o){e.call(t,n,i,o)&&r.push(n)}),r},reject:function(e,t){return this.filter(function(){return!e.apply(t,arguments)})},filterBy:function(){return this.filter(r.apply(this,arguments))},filterProperty:Ember.aliasMethod("filterBy"),rejectBy:function(e,t){var r=function(r){return n(r,e)===t},i=function(t){return!!n(t,e)},o=2===arguments.length?r:i;return this.reject(o)},rejectProperty:Ember.aliasMethod("rejectBy"),find:function(r,i){var o=n(this,"length");void 0===i&&(i=null);for(var a,s,u=null,c=!1,l=e(),h=0;o>h&&!c;h++)a=this.nextObject(h,u,l),(c=r.call(i,a,h,this))&&(s=a),u=a;return a=u=null,l=t(l),s},findBy:function(){return this.find(r.apply(this,arguments))},findProperty:Ember.aliasMethod("findBy"),every:function(e,t){return!this.find(function(r,n,i){return!e.call(t,r,n,i)})},everyBy:Ember.aliasMethod("isEvery"),everyProperty:Ember.aliasMethod("isEvery"),isEvery:function(){return this.every(r.apply(this,arguments))},any:function(e,t){var r=this.find(function(r,n,i){return!!e.call(t,r,n,i)});return"undefined"!=typeof r},some:Ember.aliasMethod("any"),isAny:function(){return this.any(r.apply(this,arguments))},anyBy:Ember.aliasMethod("isAny"),someProperty:Ember.aliasMethod("isAny"),reduce:function(e,t,r){if("function"!=typeof e)throw new TypeError;var n=t;return this.forEach(function(t,i){n=e.call(null,n,t,i,this,r)},this),n},invoke:function(e){var t,r=Ember.A();return arguments.length>1&&(t=o.call(arguments,1)),this.forEach(function(n,i){var o=n&&n[e];"function"==typeof o&&(r[i]=t?o.apply(n,t):o.call(n))},this),r},toArray:function(){var e=Ember.A();return this.forEach(function(t,r){e[r]=t}),e},compact:function(){return this.filter(function(e){return null!=e})},without:function(e){if(!this.contains(e))return this;var t=Ember.A();return this.forEach(function(r){r!==e&&(t[t.length]=r)}),t},uniq:function(){var e=Ember.A();return this.forEach(function(t){a(e,t)<0&&e.push(t)}),e},"[]":Ember.computed(function(){return this}),addEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",o=n(this,"hasEnumerableObservers");return o||Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.addListener(this,"@enumerable:before",e,r),Ember.addListener(this,"@enumerable:change",e,i),o||Ember.propertyDidChange(this,"hasEnumerableObservers"),this},removeEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",o=n(this,"hasEnumerableObservers");return o&&Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.removeListener(this,"@enumerable:before",e,r),Ember.removeListener(this,"@enumerable:change",e,i),o&&Ember.propertyDidChange(this,"hasEnumerableObservers"),this},hasEnumerableObservers:Ember.computed(function(){return Ember.hasListeners(this,"@enumerable:change")||Ember.hasListeners(this,"@enumerable:before")}),enumerableContentWillChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||i-r!==0,-1===e&&(e=null),-1===t&&(t=null),Ember.propertyWillChange(this,"[]"),o&&Ember.propertyWillChange(this,"length"),Ember.sendEvent(this,"@enumerable:before",[this,e,t]),this},enumerableContentDidChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||i-r!==0,-1===e&&(e=null),-1===t&&(t=null),Ember.sendEvent(this,"@enumerable:change",[this,e,t]),o&&Ember.propertyDidChange(this,"length"),Ember.propertyDidChange(this,"[]"),this},sortBy:function(){var e=arguments;return this.toArray().sort(function(t,r){for(var i=0;i<e.length;i++){var o=e[i],a=n(t,o),s=n(r,o),u=Ember.compare(a,s);if(u)return u}return 0})}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.isNone),r=Ember.EnumerableUtils.map,n=Ember.cacheFor;Ember.Array=Ember.Mixin.create(Ember.Enumerable,{length:Ember.required(),objectAt:function(t){return 0>t||t>=e(this,"length")?void 0: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,r){return void 0!==r&&this.replace(0,e(this,"length"),r),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(r,n){var i=Ember.A(),o=e(this,"length");for(t(r)&&(r=0),(t(n)||n>o)&&(n=o),0>r&&(r=o+r),0>n&&(n=o+n);n>r;)i[i.length]=this.objectAt(r++);return i},indexOf:function(t,r){var n,i=e(this,"length");for(void 0===r&&(r=0),0>r&&(r+=i),n=r;i>n;n++)if(this.objectAt(n)===t)return n;return-1},lastIndexOf:function(t,r){var n,i=e(this,"length");for((void 0===r||r>=i)&&(r=i-1),0>r&&(r+=i),n=r;n>=0;n--)if(this.objectAt(n)===t)return n;return-1},addArrayObserver:function(t,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",o=e(this,"hasArrayObservers");return o||Ember.propertyWillChange(this,"hasArrayObservers"),Ember.addListener(this,"@array:before",t,n),Ember.addListener(this,"@array:change",t,i),o||Ember.propertyDidChange(this,"hasArrayObservers"),this},removeArrayObserver:function(t,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",o=e(this,"hasArrayObservers");return o&&Ember.propertyWillChange(this,"hasArrayObservers"),Ember.removeListener(this,"@array:before",t,n),Ember.removeListener(this,"@array:change",t,i),o&&Ember.propertyDidChange(this,"hasArrayObservers"),this},hasArrayObservers:Ember.computed(function(){return Ember.hasListeners(this,"@array:change")||Ember.hasListeners(this,"@array:before")}),arrayContentWillChange:function(t,r,n){void 0===t?(t=0,r=n=-1):(void 0===r&&(r=-1),void 0===n&&(n=-1)),Ember.isWatching(this,"@each")&&e(this,"@each"),Ember.sendEvent(this,"@array:before",[this,t,r,n]);var i,o;if(t>=0&&r>=0&&e(this,"hasEnumerableObservers")){i=[],o=t+r;for(var a=t;o>a;a++)i.push(this.objectAt(a))}else i=r;return this.enumerableContentWillChange(i,n),this},arrayContentDidChange:function(t,r,i){void 0===t?(t=0,r=i=-1):(void 0===r&&(r=-1),void 0===i&&(i=-1));var o,a;if(t>=0&&i>=0&&e(this,"hasEnumerableObservers")){o=[],a=t+i;for(var s=t;a>s;s++)o.push(this.objectAt(s))}else o=i;this.enumerableContentDidChange(r,o),Ember.sendEvent(this,"@array:change",[this,t,r,i]);var u=e(this,"length"),c=n(this,"firstObject"),l=n(this,"lastObject");return this.objectAt(0)!==c&&(Ember.propertyWillChange(this,"firstObject"),Ember.propertyDidChange(this,"firstObject")),this.objectAt(u-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(){function e(e,t){return"@this"===t?e:m(e,t)}function t(e,t,r){this.callbacks=e,this.cp=t,this.instanceMeta=r,this.dependentKeysByGuid={},this.trackedArraysByGuid={},this.suspended=!1,this.changedItems={}}function r(e,t,r){this.dependentArray=e,this.index=t,this.item=e.objectAt(t),this.trackedArray=r,this.beforeObserver=null,this.observer=null,this.destroyed=!1}function n(e,t,r){return 0>e?Math.max(0,t+e):t>e?e:Math.min(t-r,e)}function i(e,t,r){return Math.min(r,t-e)}function o(e,t,r,n,i,o){var a={arrayChanged:e,index:r,item:t,propertyName:n,property:i};return o&&(a.previousValues=o),a}function a(e,t,r,n,i){O(e,function(a,s){i.setValue(t.addedItem.call(this,i.getValue(),a,o(e,a,s,n,r),i.sugarMeta))},this)}function s(e,t){{var r;e._callbacks()}e._hasInstanceMeta(this,t)?(r=e._instanceMeta(this,t),r.setValue(e.resetValue(r.getValue()))):r=e._instanceMeta(this,t),e.options.initialize&&e.options.initialize.call(this,r.getValue(),{property:e,propertyName:t},r.sugarMeta)}function u(t,r){if(x.test(r))return!1;var n=e(t,r);return Ember.Array.detect(n)}function c(e,t,r){this.context=e,this.propertyName=t,this.cache=p(e).cache,this.dependentArrays={},this.sugarMeta={},this.initialValue=r}function l(t){var r=this;this.options=t,this._instanceMetas={},this._dependentKeys=null,this._itemPropertyKeys={},this._previousItemPropertyKeys={},this.readOnly(),this.cacheable(),this.recomputeOnce=function(e){Ember.run.once(this,n,e)};var n=function(t){var n=(r._dependentKeys,r._instanceMeta(this,t)),i=r._callbacks();s.call(this,r,t),n.dependentArraysObserver.suspendArrayObservers(function(){O(r._dependentKeys,function(t){if(u(this,t)){var i=e(this,t),o=n.dependentArrays[t];i===o?r._previousItemPropertyKeys[t]&&(delete r._previousItemPropertyKeys[t],n.dependentArraysObserver.setupPropertyObservers(t,r._itemPropertyKeys[t])):(n.dependentArrays[t]=i,o&&n.dependentArraysObserver.teardownObservers(o,t),i&&n.dependentArraysObserver.setupObservers(i,t))}},this)},this),O(r._dependentKeys,function(o){if(u(this,o)){var s=e(this,o);s&&a.call(this,s,i,r,t,n)}},this)};this.func=function(e){return n.call(this,e),r._instanceMeta(this,e).getValue()}}function h(e){return e}var m=Ember.get,f=(Ember.set,Ember.guidFor),p=Ember.meta,d=Ember.propertyWillChange,b=Ember.propertyDidChange,v=Ember.addBeforeObserver,E=Ember.removeBeforeObserver,g=Ember.addObserver,y=Ember.removeObserver,w=Ember.ComputedProperty,_=[].slice,C=Ember.create,O=Ember.EnumerableUtils.forEach,A=/^(.*)\.@each\.(.*)/,P=/(.*\.@each){2,}/,x=/\.\[\]$/;t.prototype={setValue:function(e){this.instanceMeta.setValue(e,!0)},getValue:function(){return this.instanceMeta.getValue()},setupObservers:function(e,t){this.dependentKeysByGuid[f(e)]=t,e.addArrayObserver(this,{willChange:"dependentArrayWillChange",didChange:"dependentArrayDidChange"}),this.cp._itemPropertyKeys[t]&&this.setupPropertyObservers(t,this.cp._itemPropertyKeys[t])},teardownObservers:function(e,t){var r=this.cp._itemPropertyKeys[t]||[];delete this.dependentKeysByGuid[f(e)],this.teardownPropertyObservers(t,r),e.removeArrayObserver(this,{willChange:"dependentArrayWillChange",didChange:"dependentArrayDidChange"})},suspendArrayObservers:function(e,t){var r=this.suspended;this.suspended=!0,e.call(t),this.suspended=r},setupPropertyObservers:function(t,r){var n=e(this.instanceMeta.context,t),i=e(n,"length"),o=new Array(i);this.resetTransformations(t,o),O(n,function(e,i){var a=this.createPropertyObserverContext(n,i,this.trackedArraysByGuid[t]);o[i]=a,O(r,function(t){v(e,t,this,a.beforeObserver),g(e,t,this,a.observer)},this)},this)},teardownPropertyObservers:function(e,t){var r,n,i,o=this,a=this.trackedArraysByGuid[e];a&&a.apply(function(e,a,s){s!==Ember.TrackedArray.DELETE&&O(e,function(e){e.destroyed=!0,r=e.beforeObserver,n=e.observer,i=e.item,O(t,function(e){E(i,e,o,r),y(i,e,o,n)})})})},createPropertyObserverContext:function(e,t,n){var i=new r(e,t,n);return this.createPropertyObserver(i),i},createPropertyObserver:function(e){var t=this;e.beforeObserver=function(r,n){return t.itemPropertyWillChange(r,n,e.dependentArray,e)},e.observer=function(r,n){return t.itemPropertyDidChange(r,n,e.dependentArray,e)}},resetTransformations:function(e,t){this.trackedArraysByGuid[e]=new Ember.TrackedArray(t)},trackAdd:function(e,t,r){var n=this.trackedArraysByGuid[e];n&&n.addItems(t,r)},trackRemove:function(e,t,r){var n=this.trackedArraysByGuid[e];return n?n.removeItems(t,r):[]},updateIndexes:function(t,r){var n=e(r,"length");t.apply(function(e,t,r){r!==Ember.TrackedArray.DELETE&&(r!==Ember.TrackedArray.RETAIN||e.length!==n||0!==t)&&O(e,function(e,r){e.index=r+t})})},dependentArrayWillChange:function(t,r,a){function s(e){m[h].destroyed=!0,E(c,e,this,m[h].beforeObserver),y(c,e,this,m[h].observer)}if(!this.suspended){var u,c,l,h,m,p=this.callbacks.removedItem,d=f(t),b=this.dependentKeysByGuid[d],v=this.cp._itemPropertyKeys[b]||[],g=e(t,"length"),w=n(r,g,0),_=i(w,g,a);for(m=this.trackRemove(b,w,_),h=_-1;h>=0&&(l=w+h,!(l>=g));--h)c=t.objectAt(l),O(v,s,this),u=o(t,c,l,this.instanceMeta.propertyName,this.cp),this.setValue(p.call(this.instanceMeta.context,this.getValue(),c,u,this.instanceMeta.sugarMeta))}},dependentArrayDidChange:function(t,r,i,a){if(!this.suspended){var s,u,c=this.callbacks.addedItem,l=f(t),h=this.dependentKeysByGuid[l],m=new Array(a),p=this.cp._itemPropertyKeys[h],d=e(t,"length"),b=n(r,d,a);O(t.slice(b,b+a),function(e,r){p&&(u=m[r]=this.createPropertyObserverContext(t,b+r,this.trackedArraysByGuid[h]),O(p,function(t){v(e,t,this,u.beforeObserver),g(e,t,this,u.observer)},this)),s=o(t,e,b+r,this.instanceMeta.propertyName,this.cp),this.setValue(c.call(this.instanceMeta.context,this.getValue(),e,s,this.instanceMeta.sugarMeta))},this),this.trackAdd(h,b,m)}},itemPropertyWillChange:function(t,r,n,i){var o=f(t);this.changedItems[o]||(this.changedItems[o]={array:n,observerContext:i,obj:t,previousValues:{}}),this.changedItems[o].previousValues[r]=e(t,r)},itemPropertyDidChange:function(){this.flushChanges()},flushChanges:function(){var e,t,r,n=this.changedItems;for(e in n)t=n[e],t.observerContext.destroyed||(this.updateIndexes(t.observerContext.trackedArray,t.observerContext.dependentArray),r=o(t.array,t.obj,t.observerContext.index,this.instanceMeta.propertyName,this.cp,t.previousValues),this.setValue(this.callbacks.removedItem.call(this.instanceMeta.context,this.getValue(),t.obj,r,this.instanceMeta.sugarMeta)),this.setValue(this.callbacks.addedItem.call(this.instanceMeta.context,this.getValue(),t.obj,r,this.instanceMeta.sugarMeta)));this.changedItems={}}},c.prototype={getValue:function(){return this.propertyName in this.cache?this.cache[this.propertyName]:this.initialValue},setValue:function(e,t){if(void 0!==e){var r=t&&e!==this.cache[this.propertyName];r&&d(this.context,this.propertyName),this.cache[this.propertyName]=e,r&&b(this.context,this.propertyName)}else delete this.cache[this.propertyName]}},Ember.ReduceComputedProperty=l,l.prototype=C(w.prototype),l.prototype._callbacks=function(){if(!this.callbacks){var e=this.options;this.callbacks={removedItem:e.removedItem||h,addedItem:e.addedItem||h}}return this.callbacks},l.prototype._hasInstanceMeta=function(e,t){var r=f(e),n=r+":"+t;return!!this._instanceMetas[n]},l.prototype._instanceMeta=function(e,r){var n=f(e),i=n+":"+r,o=this._instanceMetas[i];return o||(o=this._instanceMetas[i]=new c(e,r,this.initialValue()),o.dependentArraysObserver=new t(this._callbacks(),this,o,e,r,o.sugarMeta)),o},l.prototype.initialValue=function(){return"function"==typeof this.options.initialValue?this.options.initialValue():this.options.initialValue},l.prototype.resetValue=function(){return this.initialValue()},l.prototype.itemPropertyKey=function(e,t){this._itemPropertyKeys[e]=this._itemPropertyKeys[e]||[],this._itemPropertyKeys[e].push(t)},l.prototype.clearItemPropertyKeys=function(e){this._itemPropertyKeys[e]&&(this._previousItemPropertyKeys[e]=this._itemPropertyKeys[e],this._itemPropertyKeys[e]=[])},l.prototype.property=function(){var e,t,r,n=this,i=(_.call(arguments),new Ember.Set);return O(_.call(arguments),function(o){if(P.test(o))throw new Ember.Error("Nested @each properties not supported: "+o);(e=A.exec(o))?(t=e[1],r=e[2],n.itemPropertyKey(t,r),i.add(t)):i.add(o)}),w.prototype.property.apply(this,i.toArray())},Ember.reduceComputed=function(e){var t;if(arguments.length>1&&(t=_.call(arguments,0,-1),e=_.call(arguments,-1)[0]),"object"!=typeof e)throw new Ember.Error("Reduce Computed Property declared without an options hash");if(!("initialValue"in e))throw new Ember.Error("Reduce Computed Property declared without an initial value");var r=new l(e);return t&&r.property.apply(r,t),r}}(),function(){function e(){var e=this;return t.apply(this,arguments),this.func=function(t){return function(r){return e._hasInstanceMeta(this,r)||i(e._dependentKeys,function(t){Ember.addObserver(this,t,function(){e.recomputeOnce.call(this,r)})},this),t.apply(this,arguments)}}(this.func),this}var t=Ember.ReduceComputedProperty,r=[].slice,n=Ember.create,i=Ember.EnumerableUtils.forEach;Ember.ArrayComputedProperty=e,e.prototype=n(t.prototype),e.prototype.initialValue=function(){return Ember.A()},e.prototype.resetValue=function(e){return e.clear(),e},Ember.arrayComputed=function(t){var n;if(arguments.length>1&&(n=r.call(arguments,0,-1),t=r.call(arguments,-1)[0]),"object"!=typeof t)throw new Ember.Error("Array Computed Property declared without an options hash");var i=new e(t);return n&&i.property.apply(i,n),i}}(),function(){function e(e,i,o,a){function s(e){return t.detectInstance(e)?n(r(e,"content")):n(e)}var u,c,l,h,m;return arguments.length<4&&(a=r(e,"length")),arguments.length<3&&(o=0),o===a?o:(u=o+Math.floor((a-o)/2),c=e.objectAt(u),h=s(c),m=s(i),h===m?u:(l=this.order(c,i),0===l&&(l=m>h?-1:1),0>l?this.binarySearch(e,i,u+1,a):l>0?this.binarySearch(e,i,o,u):u))}var t,r=Ember.get,n=(Ember.set,Ember.guidFor),i=Ember.merge,o=[].slice,a=Ember.EnumerableUtils.forEach,s=Ember.EnumerableUtils.map;Ember.computed.max=function(e){return Ember.reduceComputed.call(null,e,{initialValue:-1/0,addedItem:function(e,t){return Math.max(e,t)},removedItem:function(e,t){return e>t?e:void 0}})},Ember.computed.min=function(e){return Ember.reduceComputed.call(null,e,{initialValue:1/0,addedItem:function(e,t){return Math.min(e,t)},removedItem:function(e,t){return t>e?e:void 0}})},Ember.computed.map=function(e,t){var r={addedItem:function(e,r,n){var i=t.call(this,r);return e.insertAt(n.index,i),e},removedItem:function(e,t,r){return e.removeAt(r.index,1),e}};return Ember.arrayComputed(e,r)},Ember.computed.mapBy=function(e,t){var n=function(e){return r(e,t)};return Ember.computed.map(e+".@each."+t,n)},Ember.computed.mapProperty=Ember.computed.mapBy,Ember.computed.filter=function(e,t){var r={initialize:function(e,t,r){r.filteredArrayIndexes=new Ember.SubArray},addedItem:function(e,r,n,i){var o=!!t.call(this,r),a=i.filteredArrayIndexes.addItem(n.index,o);return o&&e.insertAt(a,r),e},removedItem:function(e,t,r,n){var i=n.filteredArrayIndexes.removeItem(r.index);return i>-1&&e.removeAt(i),e}};return Ember.arrayComputed(e,r)},Ember.computed.filterBy=function(e,t,n){var i;return i=2===arguments.length?function(e){return r(e,t)}:function(e){return r(e,t)===n},Ember.computed.filter(e+".@each."+t,i)},Ember.computed.filterProperty=Ember.computed.filterBy,Ember.computed.uniq=function(){var e=o.call(arguments);return e.push({initialize:function(e,t,r){r.itemCounts={}},addedItem:function(e,t,r,i){var o=n(t);return i.itemCounts[o]?++i.itemCounts[o]:i.itemCounts[o]=1,e.addObject(t),e},removedItem:function(e,t,r,i){var o=n(t),a=i.itemCounts;return 0===--a[o]&&e.removeObject(t),e}}),Ember.arrayComputed.apply(null,e)},Ember.computed.union=Ember.computed.uniq,Ember.computed.intersect=function(){var e=function(e){return s(e.property._dependentKeys,function(e){return n(e)})},t=o.call(arguments);return t.push({initialize:function(e,t,r){r.itemCounts={}},addedItem:function(t,r,i,o){var a=n(r),s=(e(i),n(i.arrayChanged)),u=i.property._dependentKeys.length,c=o.itemCounts;return c[a]||(c[a]={}),void 0===c[a][s]&&(c[a][s]=0),1===++c[a][s]&&u===Ember.keys(c[a]).length&&t.addObject(r),t},removedItem:function(t,r,i,o){var a,s=n(r),u=(e(i),n(i.arrayChanged)),c=(i.property._dependentKeys.length,o.itemCounts);return void 0===c[s][u]&&(c[s][u]=0),0===--c[s][u]&&(delete c[s][u],a=Ember.keys(c[s]).length,0===a&&delete c[s],t.removeObject(r)),t}}),Ember.arrayComputed.apply(null,t)},Ember.computed.setDiff=function(e,t){if(2!==arguments.length)throw new Ember.Error("setDiff requires exactly two dependent arrays.");return Ember.arrayComputed.call(null,e,t,{addedItem:function(n,i,o){var a=r(this,e),s=r(this,t);return o.arrayChanged===a?s.contains(i)||n.addObject(i):n.removeObject(i),n},removedItem:function(n,i,o){var a=r(this,e),s=r(this,t);return o.arrayChanged===s?a.contains(i)&&n.addObject(i):n.removeObject(i),n}})},t=Ember.ObjectProxy.extend(),Ember.computed.sort=function(n,o){var s,u;return"function"==typeof o?s=function(t,r,n){n.order=o,n.binarySearch=e}:(u=o,s=function(t,i,o){function s(){var e,t,s,l=r(this,u),h=o.sortProperties=[],m=o.sortPropertyAscending={};i.property.clearItemPropertyKeys(n),a(l,function(r){-1!==(t=r.indexOf(":"))?(e=r.substring(0,t),s="desc"!==r.substring(t+1).toLowerCase()):(e=r,s=!0),h.push(e),m[e]=s,i.property.itemPropertyKey(n,e)}),l.addObserver("@each",this,c)}function c(){Ember.run.once(this,l,i.propertyName)}function l(e){s.call(this),i.property.recomputeOnce.call(this,e)}Ember.addObserver(this,u,c),s.call(this),o.order=function(e,t){for(var n,i,o,a=0;a<this.sortProperties.length;++a)if(n=this.sortProperties[a],i=Ember.compare(r(e,n),r(t,n)),0!==i)return o=this.sortPropertyAscending[n],o?i:-1*i;return 0},o.binarySearch=e}),Ember.arrayComputed.call(null,n,{initialize:s,addedItem:function(e,t,r,n){var i=n.binarySearch(e,t);return e.insertAt(i,t),e},removedItem:function(e,r,n,o){var a,s,u;return n.previousValues?(a=i({content:r},n.previousValues),u=t.create(a)):u=r,s=o.binarySearch(e,u),e.removeAt(s),e}})}}(),function(){Ember.RSVP=t("rsvp"),Ember.RSVP.onerrorDefault=function(e){if(e instanceof Error)if(Ember.testing){if(!Ember.Test||!Ember.Test.adapter)throw e;Ember.Test.adapter.exception(e)}else Ember.Logger.error(e.stack)},Ember.RSVP.on("error",Ember.RSVP.onerrorDefault)}(),function(){var e=Array.prototype.slice;(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.observesImmediately=function(){for(var e=0,t=arguments.length;t>e;e++){arguments[e]}return this.observes.apply(this,arguments)},Function.prototype.observesBefore=function(){return this.__ember_observesBefore__=e.call(arguments),this},Function.prototype.on=function(){var t=e.call(arguments);return this.__ember_listens__=t,this})}(),function(){Ember.Comparable=Ember.Mixin.create({compare:Ember.required(Function)})}(),function(){{var e=Ember.get;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 Ember.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=[],r=Ember.get;
19
- Ember.set}Ember.MutableArray=Ember.Mixin.create(Ember.Array,Ember.MutableEnumerable,{replace:Ember.required(),clear:function(){var e=r(this,"length");return 0===e?this:(this.replace(0,e,t),this)},insertAt:function(t,n){if(t>r(this,"length"))throw new Ember.Error(e);return this.replace(t,0,[n]),this},removeAt:function(n,i){if("number"==typeof n){if(0>n||n>=r(this,"length"))throw new Ember.Error(e);void 0===i&&(i=1),this.replace(n,i,t)}return this},pushObject:function(e){return this.insertAt(r(this,"length"),e),e},pushObjects:function(e){if(!Ember.Enumerable.detect(e)&&!Ember.isArray(e))throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects");return this.replace(r(this,"length"),0,e),this},popObject:function(){var e=r(this,"length");if(0===e)return null;var t=this.objectAt(e-1);return this.removeAt(e-1,1),t},shiftObject:function(){if(0===r(this,"length"))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=r(this,"length");if(0===e)return this;var t=this.toArray().reverse();return this.replace(0,e,t),this},setObjects:function(e){if(0===e.length)return this.clear();var t=r(this,"length");return this.replace(0,t,e),this},removeObject:function(e){for(var t=r(this,"length")||0;--t>=0;){var n=this.objectAt(t);n===e&&this.removeAt(t)}return this},addObject:function(e){return this.contains(e)||this.pushObject(e),this}})}(),function(){{var e=Ember.get;Ember.set}Ember.TargetActionSupport=Ember.Mixin.create({target:null,action:null,actionContext:null,targetObject:Ember.computed(function(){var t=e(this,"target");if("string"===Ember.typeOf(t)){var r=e(this,t);return void 0===r&&(r=e(Ember.lookup,t)),r}return t}).property("target"),actionContextObject:Ember.computed(function(){var t=e(this,"actionContext");if("string"===Ember.typeOf(t)){var r=e(this,t);return void 0===r&&(r=e(Ember.lookup,t)),r}return t}).property("actionContext"),triggerAction:function(t){function r(e,t){var r=[];return t&&r.push(t),r.concat(e)}t=t||{};var n=t.action||e(this,"action"),i=t.target||e(this,"targetObject"),o=t.actionContext;if("undefined"==typeof o&&(o=e(this,"actionContextObject")||this),i&&n){var a;return a=i.send?i.send.apply(i,r(o,n)):i[n].apply(i,r(o)),a!==!1&&(a=!0),a}return!1}})}(),function(){Ember.Evented=Ember.Mixin.create({on:function(e,t,r){return Ember.addListener(this,e,t,r),this},one:function(e,t,r){return r||(r=t,t=null),Ember.addListener(this,e,t,r,!0),this},trigger:function(e){var t,r,n=[];for(t=1,r=arguments.length;r>t;t++)n.push(arguments[t]);Ember.sendEvent(this,e,n)},off:function(e,t,r){return Ember.removeListener(this,e,t,r),this},has:function(e){return Ember.hasListeners(this,e)}})}(),function(){var e=t("rsvp");e.configure("async",function(e,t){Ember.run.schedule("actions",t,e,t)});var r=Ember.get;Ember.DeferredMixin=Ember.Mixin.create({then:function(e,t){function n(t){return t===o?e(a):e(t)}var i,o,a;return a=this,i=r(this,"_deferred"),o=i.promise,o.then(e&&n,t)},resolve:function(e){var t,n;t=r(this,"_deferred"),n=t.promise,e===this?t.resolve(n):t.resolve(e)},reject:function(e){r(this,"_deferred").reject(e)},_deferred:Ember.computed(function(){return e.defer()})})}(),function(){var e=Ember.get,t=Ember.typeOf;Ember.ActionHandler=Ember.Mixin.create({mergedProperties:["_actions"],willMergeMixin:function(e){var r;e._actions||("object"===t(e.actions)?r="actions":"object"===t(e.events)&&(r="events"),r&&(e._actions=Ember.merge(e._actions||{},e[r])),delete e[r])},send:function(t){var r,n=[].slice.call(arguments,1);if(this._actions&&this._actions[t]){if(this._actions[t].apply(this,n)!==!0)return}else if(this.deprecatedSend&&this.deprecatedSendHandles&&this.deprecatedSendHandles(t)&&this.deprecatedSend.apply(this,[].slice.call(arguments))!==!0)return;(r=e(this,"target"))&&r.send.apply(r,arguments)}})}(),function(){function e(e,r){r.then(function(r){t(e,"isFulfilled",!0),t(e,"content",r)},function(r){t(e,"isRejected",!0),t(e,"reason",r)})}var t=Ember.set,r=Ember.get,n=Ember.RSVP.resolve,i=(Ember.RSVP.rethrow,Ember.computed.not),o=Ember.computed.or;Ember.PromiseProxyMixin=Ember.Mixin.create({reason:null,isPending:i("isSettled").readOnly(),isSettled:o("isRejected","isFulfilled").readOnly(),isRejected:!1,isFulfilled:!1,promise:Ember.computed(function(t,r){if(2===arguments.length)return r=n(r),e(this,r),r.then();throw new Ember.Error("PromiseProxy's promise must be set")}),then:function(e,t){return r(this,"promise").then(e,t)}})}(),function(){function e(e,t,r){this.type=e,this.count=t,this.items=r}function t(e,t,r,n){this.operation=e,this.index=t,this.split=r,this.rangeStart=n}var r=Ember.get,n=Ember.EnumerableUtils.forEach,i="r",o="i",a="d";Ember.TrackedArray=function(t){arguments.length<1&&(t=[]);var n=r(t,"length");this._operations=n?[new e(i,n,t)]:[]},Ember.TrackedArray.RETAIN=i,Ember.TrackedArray.INSERT=o,Ember.TrackedArray.DELETE=a,Ember.TrackedArray.prototype={addItems:function(t,n){var i=r(n,"length");if(!(1>i)){var a,s,u=this._findArrayOperation(t),c=u.operation,l=u.index,h=u.rangeStart;s=new e(o,i,n),c?u.split?(this._split(l,t-h,s),a=l+1):(this._operations.splice(l,0,s),a=l):(this._operations.push(s),a=l),this._composeInsert(a)}},removeItems:function(t,r){if(!(1>r)){var n,i,o=this._findArrayOperation(t),s=(o.operation,o.index),u=o.rangeStart;return n=new e(a,r),o.split?(this._split(s,t-u,n),i=s+1):(this._operations.splice(s,0,n),i=s),this._composeDelete(i)}},apply:function(t){var r=[],o=0;n(this._operations,function(e){t(e.items,o,e.type),e.type!==a&&(o+=e.count,r=r.concat(e.items))}),this._operations=[new e(i,r.length,r)]},_findArrayOperation:function(e){var r,n,i,o,s,u=!1;for(r=o=0,n=this._operations.length;n>r;++r)if(i=this._operations[r],i.type!==a){if(s=o+i.count-1,e===o)break;if(e>o&&s>=e){u=!0;break}o=s+1}return new t(i,r,u,o)},_split:function(t,r,n){var i=this._operations[t],o=i.items.slice(r),a=new e(i.type,o.length,o);i.count=r,i.items=i.items.slice(0,r),this._operations.splice(t+1,0,n,a)},_composeInsert:function(e){var t=this._operations[e],r=this._operations[e-1],n=this._operations[e+1],i=r&&r.type,a=n&&n.type;i===o?(r.count+=t.count,r.items=r.items.concat(t.items),a===o?(r.count+=n.count,r.items=r.items.concat(n.items),this._operations.splice(e,2)):this._operations.splice(e,1)):a===o&&(t.count+=n.count,t.items=t.items.concat(n.items),this._operations.splice(e+1,1))},_composeDelete:function(e){var t,r,n,i=this._operations[e],s=i.count,u=this._operations[e-1],c=u&&u.type,l=!1,h=[];c===a&&(i=u,e-=1);for(var m=e+1;s>0;++m)t=this._operations[m],r=t.type,n=t.count,r!==a?(n>s?(h=h.concat(t.items.splice(0,s)),t.count-=s,m-=1,n=s,s=0):(n===s&&(l=!0),h=h.concat(t.items),s-=n),r===o&&(i.count-=n)):i.count+=n;return i.count>0?this._operations.splice(e+1,m-1-e):this._operations.splice(e,l?2:1),h},toString:function(){var e="";return n(this._operations,function(t){e+=" "+t.type+":"+t.count}),e.substring(1)}}}(),function(){function e(e,t){this.type=e,this.count=t}var t=(Ember.get,Ember.EnumerableUtils.forEach),r="r",n="f";Ember.SubArray=function(t){arguments.length<1&&(t=0),this._operations=t>0?[new e(r,t)]:[]},Ember.SubArray.prototype={addItem:function(t,i){var o=-1,a=i?r:n,s=this;return this._findOperation(t,function(n,u,c,l,h){var m,f;a===n.type?++n.count:t===c?s._operations.splice(u,0,new e(a,1)):(m=new e(a,1),f=new e(n.type,l-t+1),n.count=t-c,s._operations.splice(u+1,0,m,f)),i&&(o=n.type===r?h+(t-c):h),s._composeAt(u)},function(t){s._operations.push(new e(a,1)),i&&(o=t),s._composeAt(s._operations.length-1)}),o},removeItem:function(e){var t=-1,n=this;return this._findOperation(e,function(i,o,a,s,u){i.type===r&&(t=u+(e-a)),i.count>1?--i.count:(n._operations.splice(o,1),n._composeAt(o))},function(){throw new Ember.Error("Can't remove an item that has never been added.")}),t},_findOperation:function(e,t,n){var i,o,a,s,u,c=0;for(i=s=0,o=this._operations.length;o>i;s=u+1,++i){if(a=this._operations[i],u=s+a.count-1,e>=s&&u>=e)return t(a,i,s,u,c),void 0;a.type===r&&(c+=a.count)}n(c)},_composeAt:function(e){var t,r=this._operations[e];r&&(e>0&&(t=this._operations[e-1],t.type===r.type&&(r.count+=t.count,this._operations.splice(e-1,1),--e)),e<this._operations.length-1&&(t=this._operations[e+1],t.type===r.type&&(r.count+=t.count,this._operations.splice(e+1,1))))},toString:function(){var e="";return t(this._operations,function(t){e+=" "+t.type+":"+t.count}),e.substring(1)}}}(),function(){Ember.Container=t("container"),Ember.Container.set=Ember.set}(),function(){Ember.Application=Ember.Namespace.extend()}(),function(){{var e="Index out of range",t=[],r=Ember.get;Ember.set}Ember.ArrayProxy=Ember.Object.extend(Ember.MutableArray,{content:null,arrangedContent:Ember.computed.alias("content"),objectAtContent:function(e){return r(this,"arrangedContent").objectAt(e)},replaceContent:function(e,t,n){r(this,"content").replace(e,t,n)},_contentWillChange:Ember.beforeObserver("content",function(){this._teardownContent()}),_teardownContent:function(){var e=r(this,"content");e&&e.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer("content",function(){r(this,"content");this._setupContent()}),_setupContent:function(){var e=r(this,"content");e&&e.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},_arrangedContentWillChange:Ember.beforeObserver("arrangedContent",function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this.arrangedContentArrayWillChange(this,0,t,void 0),this.arrangedContentWillChange(this),this._teardownArrangedContent(e)}),_arrangedContentDidChange:Ember.observer("arrangedContent",function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this._setupArrangedContent(),this.arrangedContentDidChange(this),this.arrangedContentArrayDidChange(this,0,void 0,t)}),_setupArrangedContent:function(){var e=r(this,"arrangedContent");e&&e.addArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},_teardownArrangedContent:function(){var e=r(this,"arrangedContent");e&&e.removeArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},arrangedContentWillChange:Ember.K,arrangedContentDidChange:Ember.K,objectAt:function(e){return r(this,"content")&&this.objectAtContent(e)},length:Ember.computed(function(){var e=r(this,"arrangedContent");return e?r(e,"length"):0}),_replace:function(e,t,n){var i=r(this,"content");return i&&this.replaceContent(e,t,n),this},replace:function(){if(r(this,"arrangedContent")!==r(this,"content"))throw new Ember.Error("Using replace on an arranged ArrayProxy is not allowed.");this._replace.apply(this,arguments)},_insertAt:function(t,n){if(t>r(this,"content.length"))throw new Ember.Error(e);return this._replace(t,0,[n]),this},insertAt:function(e,t){if(r(this,"arrangedContent")===r(this,"content"))return this._insertAt(e,t);throw new Ember.Error("Using insertAt on an arranged ArrayProxy is not allowed.")},removeAt:function(n,i){if("number"==typeof n){var o,a=r(this,"content"),s=r(this,"arrangedContent"),u=[];if(0>n||n>=r(this,"length"))throw new Ember.Error(e);for(void 0===i&&(i=1),o=n;n+i>o;o++)u.push(a.indexOf(s.objectAt(o)));for(u.sort(function(e,t){return t-e}),Ember.beginPropertyChanges(),o=0;o<u.length;o++)this._replace(u[o],1,t);Ember.endPropertyChanges()}return this},pushObject:function(e){return this._insertAt(r(this,"content.length"),e),e},pushObjects:function(e){if(!Ember.Enumerable.detect(e)&&!Ember.isArray(e))throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects");return this._replace(r(this,"length"),0,e),this},setObjects:function(e){if(0===e.length)return this.clear();var t=r(this,"length");return this._replace(0,t,e),this},unshiftObject:function(e){return this._insertAt(0,e),e},unshiftObjects:function(e){return this._replace(0,0,e),this},slice:function(){var e=this.toArray();return e.slice.apply(e,arguments)},arrangedContentArrayWillChange:function(e,t,r,n){this.arrayContentWillChange(t,r,n)},arrangedContentArrayDidChange:function(e,t,r,n){this.arrayContentDidChange(t,r,n)},init:function(){this._super(),this._setupContent(),this._setupArrangedContent()},willDestroy:function(){this._teardownArrangedContent(),this._teardownContent()}})}(),function(){function e(e,t,r,i,o){var a,s=r._objects;for(s||(s=r._objects={});--o>=i;){var u=e.objectAt(o);u&&(Ember.addBeforeObserver(u,t,r,"contentKeyWillChange"),Ember.addObserver(u,t,r,"contentKeyDidChange"),a=n(u),s[a]||(s[a]=[]),s[a].push(o))}}function t(e,t,r,i,a){var s=r._objects;s||(s=r._objects={});for(var u,c;--a>=i;){var l=e.objectAt(a);l&&(Ember.removeBeforeObserver(l,t,r,"contentKeyWillChange"),Ember.removeObserver(l,t,r,"contentKeyDidChange"),c=n(l),u=s[c],u[o.call(u,a)]=null)}}var r=(Ember.set,Ember.get),n=Ember.guidFor,i=Ember.EnumerableUtils.forEach,o=Ember.ArrayPolyfills.indexOf,a=Ember.Object.extend(Ember.Array,{init:function(e,t,r){this._super(),this._keyName=t,this._owner=r,this._content=e},objectAt:function(e){var t=this._content.objectAt(e);return t&&r(t,this._keyName)},length:Ember.computed(function(){var e=this._content;return e?r(e,"length"):0})}),s=/^.+:(before|change)$/;Ember.EachProxy=Ember.Object.extend({init:function(e){this._super(),this._content=e,e.addArrayObserver(this),i(Ember.watchedEvents(this),function(e){this.didAddListener(e)},this)},unknownProperty:function(e){var t;return t=new a(this._content,e,this),Ember.defineProperty(this,e,null,t),this.beginObservingContentKey(e),t},arrayWillChange:function(e,r,n){var i,o,a=this._keys;o=n>0?r+n:-1,Ember.beginPropertyChanges(this);for(i in a)a.hasOwnProperty(i)&&(o>0&&t(e,i,this,r,o),Ember.propertyWillChange(this,i));Ember.propertyWillChange(this._content,"@each"),Ember.endPropertyChanges(this)},arrayDidChange:function(t,r,n,i){var o,a=this._keys;o=i>0?r+i:-1,Ember.changeProperties(function(){for(var n in a)a.hasOwnProperty(n)&&(o>0&&e(t,n,this,r,o),Ember.propertyDidChange(this,n));Ember.propertyDidChange(this._content,"@each")},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(t){var n=this._keys;if(n||(n=this._keys={}),n[t])n[t]++;else{n[t]=1;var i=this._content,o=r(i,"length");e(i,t,this,0,o)}},stopObservingContentKey:function(e){var n=this._keys;if(n&&n[e]>0&&--n[e]<=0){var i=this._content,o=r(i,"length");t(i,e,this,0,o)}},contentKeyWillChange:function(e,t){Ember.propertyWillChange(this,t)},contentKeyDidChange:function(e,t){Ember.propertyDidChange(this,t)}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils._replace),r=Ember.Mixin.create(Ember.MutableArray,Ember.Observable,Ember.Copyable,{get:function(e){return"length"===e?this.length:"number"==typeof e?this[e]:this._super(e)},objectAt:function(e){return this[e]},replace:function(r,n,i){if(this.isFrozen)throw Ember.FROZEN_ERROR;var o=i?e(i,"length"):0;return this.arrayContentWillChange(r,n,o),0===o?this.splice(r,n):t(this,r,n,i),this.arrayContentDidChange(r,n,o),this},unknownProperty:function(e,t){var r;return void 0!==t&&void 0===r&&(r=this[e]=t),r},indexOf:function(e,t){var r,n=this.length;for(t=void 0===t?0:0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=n),r=t;n>r;r++)if(this[r]===e)return r;return-1},lastIndexOf:function(e,t){var r,n=this.length;for(t=void 0===t?n-1:0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=n),r=t;r>=0;r--)if(this[r]===e)return r;return-1},copy:function(e){return e?this.map(function(e){return Ember.copy(e,!0)}):this.slice()}}),n=["length"];Ember.EnumerableUtils.forEach(r.keys(),function(e){Array.prototype[e]&&n.push(e)}),n.length>0&&(r=r.without.apply(r,n)),Ember.NativeArray=r,Ember.A=function(e){return void 0===e&&(e=[]),Ember.Array.detect(e)?e:Ember.NativeArray.apply(e)},Ember.NativeArray.activate=function(){r.apply(Array.prototype),Ember.A=function(e){return e||[]}},(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.Array)&&Ember.NativeArray.activate()}(),function(){var e=Ember.get,t=Ember.set,r=Ember.guidFor,n=Ember.isNone,i=Ember.String.fmt;Ember.Set=Ember.CoreObject.extend(Ember.MutableEnumerable,Ember.Copyable,Ember.Freezable,{length:0,clear:function(){if(this.isFrozen)throw new Ember.Error(Ember.FROZEN_ERROR);var n=e(this,"length");if(0===n)return this;var i;this.enumerableContentWillChange(n,0),Ember.propertyWillChange(this,"firstObject"),Ember.propertyWillChange(this,"lastObject");for(var o=0;n>o;o++)i=r(this[o]),delete this[i],delete this[o];return t(this,"length",0),Ember.propertyDidChange(this,"firstObject"),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(n,0),this},isEqual:function(t){if(!Ember.Enumerable.detect(t))return!1;var r=e(this,"length");if(e(t,"length")!==r)return!1;for(;--r>=0;)if(!t.contains(this[r]))return!1;return!0},add:Ember.aliasMethod("addObject"),remove:Ember.aliasMethod("removeObject"),pop:function(){if(e(this,"isFrozen"))throw new Ember.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]:void 0}),lastObject:Ember.computed(function(){return this.length>0?this[this.length-1]:void 0}),addObject:function(i){if(e(this,"isFrozen"))throw new Ember.Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,a=r(i),s=this[a],u=e(this,"length");return s>=0&&u>s&&this[s]===i?this:(o=[i],this.enumerableContentWillChange(null,o),Ember.propertyWillChange(this,"lastObject"),u=e(this,"length"),this[a]=u,this[u]=i,t(this,"length",u+1),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(null,o),this)},removeObject:function(i){if(e(this,"isFrozen"))throw new Ember.Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,a,s=r(i),u=this[s],c=e(this,"length"),l=0===u,h=u===c-1;return u>=0&&c>u&&this[u]===i&&(a=[i],this.enumerableContentWillChange(a,null),l&&Ember.propertyWillChange(this,"firstObject"),h&&Ember.propertyWillChange(this,"lastObject"),c-1>u&&(o=this[c-1],this[u]=o,this[r(o)]=u),delete this[s],delete this[c-1],t(this,"length",c-1),l&&Ember.propertyDidChange(this,"firstObject"),h&&Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(a,null)),this},contains:function(e){return this[r(e)]>=0},copy:function(){var n=this.constructor,i=new n,o=e(this,"length");for(t(i,"length",o);--o>=0;)i[o]=this[o],i[r(this[o])]=o;return i},toString:function(){var e,t=this.length,r=[];for(e=0;t>e;e++)r[e]=this[e];return i("Ember.Set<%@>",[r.join(",")])}})}(),function(){var e=Ember.DeferredMixin,t=(Ember.get,Ember.Object.extend(e));t.reopenClass({promise:function(e,r){var n=t.create();return e.call(r,n),n}}),Ember.Deferred=t}(),function(){var e=Ember.ArrayPolyfills.forEach,t=Ember.ENV.EMBER_LOAD_HOOKS||{},r={};Ember.onLoad=function(e,n){var i;t[e]=t[e]||Ember.A(),t[e].pushObject(n),(i=r[e])&&n(i)},Ember.runLoadHooks=function(n,i){r[n]=i,t[n]&&e.call(t[n],function(e){e(i)})}}(),function(){Ember.get;Ember.ControllerMixin=Ember.Mixin.create(Ember.ActionHandler,{isController:!0,target:null,container:null,parentController:null,store:null,model:Ember.computed.alias("content"),deprecatedSendHandles:function(e){return!!this[e]},deprecatedSend:function(e){var t=[].slice.call(arguments,1);this[e].apply(this,t)}}),Ember.Controller=Ember.Object.extend(Ember.ControllerMixin)}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils.forEach);Ember.SortableMixin=Ember.Mixin.create(Ember.MutableEnumerable,{sortProperties:null,sortAscending:!0,sortFunction:Ember.compare,orderBy:function(r,n){var i=0,o=e(this,"sortProperties"),a=e(this,"sortAscending"),s=e(this,"sortFunction");return t(o,function(t){0===i&&(i=s(e(r,t),e(n,t)),0===i||a||(i=-1*i))}),i},destroy:function(){var r=e(this,"content"),n=e(this,"sortProperties");return r&&n&&t(r,function(e){t(n,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},isSorted:Ember.computed.bool("sortProperties"),arrangedContent:Ember.computed("content","sortProperties.@each",function(){var r=e(this,"content"),n=e(this,"isSorted"),i=e(this,"sortProperties"),o=this;return r&&n?(r=r.slice(),r.sort(function(e,t){return o.orderBy(e,t)}),t(r,function(e){t(i,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),Ember.A(r)):r}),_contentWillChange:Ember.beforeObserver("content",function(){var r=e(this,"content"),n=e(this,"sortProperties");r&&n&&t(r,function(e){t(n,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()}),sortAscendingWillChange:Ember.beforeObserver("sortAscending",function(){this._lastSortAscending=e(this,"sortAscending")}),sortAscendingDidChange:Ember.observer("sortAscending",function(){if(e(this,"sortAscending")!==this._lastSortAscending){var t=e(this,"arrangedContent");t.reverseObjects()}}),contentArrayWillChange:function(r,n,i,o){var a=e(this,"isSorted");if(a){var s=e(this,"arrangedContent"),u=r.slice(n,n+i),c=e(this,"sortProperties");t(u,function(e){s.removeObject(e),t(c,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},contentArrayDidChange:function(r,n,i,o){var a=e(this,"isSorted"),s=e(this,"sortProperties");if(a){var u=r.slice(n,n+o);t(u,function(e){this.insertItemSorted(e),t(s,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},insertItemSorted:function(t){var r=e(this,"arrangedContent"),n=e(r,"length"),i=this._binarySearch(t,0,n);r.insertAt(i,t)},contentItemSortPropertyDidChange:function(t){var r=e(this,"arrangedContent"),n=r.indexOf(t),i=r.objectAt(n-1),o=r.objectAt(n+1),a=i&&this.orderBy(t,i),s=o&&this.orderBy(t,o);(0>a||s>0)&&(r.removeObject(t),this.insertItemSorted(t))},_binarySearch:function(t,r,n){var i,o,a,s;return r===n?r:(s=e(this,"arrangedContent"),i=r+Math.floor((n-r)/2),o=s.objectAt(i),a=this.orderBy(o,t),0>a?this._binarySearch(t,i+1,n):a>0?this._binarySearch(t,r,i):i)}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils.forEach),r=Ember.EnumerableUtils.replace;Ember.ArrayController=Ember.ArrayProxy.extend(Ember.ControllerMixin,Ember.SortableMixin,{itemController:null,lookupItemController:function(){return e(this,"itemController")},objectAtContent:function(t){var r=e(this,"length"),n=e(this,"arrangedContent"),i=n&&n.objectAt(t);if(t>=0&&r>t){var o=this.lookupItemController(i);if(o)return this.controllerAt(t,i,o)}return i},arrangedContentDidChange:function(){this._super(),this._resetSubControllers()},arrayContentDidChange:function(n,i,o){var a=e(this,"_subControllers"),s=a.slice(n,n+i);t(s,function(e){e&&e.destroy()}),r(a,n,i,new Array(o)),this._super(n,i,o)},init:function(){this._super(),this.set("_subControllers",Ember.A())},content:Ember.computed(function(){return Ember.A()}),controllerAt:function(t,r,n){var i,o=e(this,"container"),a=e(this,"_subControllers"),s=a[t];if(s)return s;if(i="controller:"+n,!o.has(i))throw new Ember.Error('Could not resolve itemController: "'+n+'"');return s=o.lookupFactory(i).create({target:this,parentController:e(this,"parentController")||this,content:r}),a[t]=s,s},_subControllers:null,_resetSubControllers:function(){var r=e(this,"_subControllers");r&&t(r,function(e){e&&e.destroy()}),this.set("_subControllers",Ember.A())}})}(),function(){Ember.ObjectController=Ember.ObjectProxy.extend(Ember.ControllerMixin)}(),function(){var e=this.jQuery||Ember.imports&&Ember.imports.jQuery;e||"function"!=typeof r||(e=r("jquery")),Ember.$=e}(),function(){if(Ember.$){var e=Ember.String.w("dragstart drag dragenter dragleave dragover drop dragend");Ember.EnumerableUtils.forEach(e,function(e){Ember.$.event.fixHooks[e]={props:["dataTransfer"]}})}}(),function(){function e(e){var t=e.shiftKey||e.metaKey||e.altKey||e.ctrlKey,r=e.which>1;return!t&&!r}var t=this.document&&function(){var e=document.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML}(),r=this.document&&function(){var e=document.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value","Test:"===e.childNodes[0].nodeValue&&" Value"===e.childNodes[2].nodeValue}(),n=function(e,t){if(e.getAttribute("id")===t)return e;var r,i,o,a=e.childNodes.length;for(r=0;a>r;r++)if(i=e.childNodes[r],o=1===i.nodeType&&n(i,t))return o},i=function(e,i){t&&(i="&shy;"+i);var o=[];if(r&&(i=i.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,r,n){return o.push([n,t]),r})),e.innerHTML=i,o.length>0){var a,s=o.length;for(a=0;s>a;a++){var u=n(e,o[a][0]),c=document.createTextNode(o[a][1]);u.parentNode.insertBefore(c,u)}}if(t){for(var l=e.firstChild;1===l.nodeType&&!l.nodeName;)l=l.firstChild;3===l.nodeType&&"­"===l.nodeValue.charAt(0)&&(l.nodeValue=l.nodeValue.slice(1))}},o={},a=function(e){if(void 0!==o[e])return o[e];var t=!0;if("select"===e.toLowerCase()){var r=document.createElement("select");i(r,'<option value="test">Test</option>'),t=1===r.options.length}return o[e]=t,t},s=function(e,t){var r=e.tagName;if(a(r))i(e,t);else{var n=e.outerHTML||(new XMLSerializer).serializeToString(e),o=n.match(new RegExp("<"+r+"([^>]*)>","i"))[0],s="</"+r+">",u=document.createElement("div");for(i(u,o+t+s),e=u.firstChild;e.tagName!==r;)e=e.nextSibling}return e};Ember.ViewUtils={setInnerHTML:s,isSimpleClick:e}}(),function(){function e(e){return e?n.test(e)?e.replace(i,""):e:e}function t(e){var t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r=function(e){return t[e]||"&amp;"},n=e.toString();return a.test(n)?n.replace(o,r):n}var r=(Ember.get,Ember.set,function(){this.seen={},this.list=[]});r.prototype={add:function(e){e in this.seen||(this.seen[e]=!0,this.list.push(e))},toDOM:function(){return this.list.join(" ")}};var n=/[^a-zA-Z0-9\-]/,i=/[^a-zA-Z0-9\-]/g,o=/&(?!\w+;)|[<>"'`]/g,a=/[&<>"'`]/,s=function(){var e=document.createElement("div"),t=document.createElement("input");return t.setAttribute("name","foo"),e.appendChild(t),!!e.innerHTML.match("foo")}();Ember.RenderBuffer=function(e){return new Ember._RenderBuffer(e)},Ember._RenderBuffer=function(e){this.tagNames=[e||null],this.buffer=""},Ember._RenderBuffer.prototype={_element:null,_hasElement:!0,elementClasses:null,classes:null,elementId:null,elementAttributes:null,elementProperties:null,elementTag:null,elementStyle:null,parentBuffer:null,push:function(e){return this.buffer+=e,this},addClass:function(e){return this.elementClasses=this.elementClasses||new r,this.elementClasses.add(e),this.classes=this.elementClasses.list,this},setClasses:function(e){this.classes=e},id:function(e){return this.elementId=e,this},attr:function(e,t){var r=this.elementAttributes=this.elementAttributes||{};return 1===arguments.length?r[e]:(r[e]=t,this)},removeAttr:function(e){var t=this.elementAttributes;return t&&delete t[e],this},prop:function(e,t){var r=this.elementProperties=this.elementProperties||{};return 1===arguments.length?r[e]:(r[e]=t,this)},removeProp:function(e){var t=this.elementProperties;return t&&delete t[e],this},style:function(e,t){return this.elementStyle=this.elementStyle||{},this.elementStyle[e]=t,this},begin:function(e){return this.tagNames.push(e||null),this},pushOpeningTag:function(){var r=this.currentTagName();if(r){if(this._hasElement&&!this._element&&0===this.buffer.length)return this._element=this.generateElement(),void 0;var n,i,o=this.buffer,a=this.elementId,s=this.classes,u=this.elementAttributes,c=this.elementProperties,l=this.elementStyle;if(o+="<"+e(r),a&&(o+=' id="'+t(a)+'"',this.elementId=null),s&&(o+=' class="'+t(s.join(" "))+'"',this.classes=null),l){o+=' style="';for(i in l)l.hasOwnProperty(i)&&(o+=i+":"+t(l[i])+";");o+='"',this.elementStyle=null}if(u){for(n in u)u.hasOwnProperty(n)&&(o+=" "+n+'="'+t(u[n])+'"');this.elementAttributes=null}if(c){for(i in c)if(c.hasOwnProperty(i)){var h=c[i];(h||"number"==typeof h)&&(o+=h===!0?" "+i+'="'+i+'"':" "+i+'="'+t(c[i])+'"')}this.elementProperties=null}o+=">",this.buffer=o}},pushClosingTag:function(){var t=this.tagNames.pop();t&&(this.buffer+="</"+e(t)+">")},currentTagName:function(){return this.tagNames[this.tagNames.length-1]},generateElement:function(){var r,n,i,o=this.tagNames.pop(),a=this.elementId,u=this.classes,c=this.elementAttributes,l=this.elementProperties,h=this.elementStyle,m="";i=c&&c.name&&!s?"<"+e(o)+' name="'+t(c.name)+'">':o;var f=document.createElement(i),p=Ember.$(f);if(a&&(p.attr("id",a),this.elementId=null),u&&(p.attr("class",u.join(" ")),this.classes=null),h){for(n in h)h.hasOwnProperty(n)&&(m+=n+":"+h[n]+";");p.attr("style",m),this.elementStyle=null}if(c){for(r in c)c.hasOwnProperty(r)&&p.attr(r,c[r]);this.elementAttributes=null}if(l){for(n in l)l.hasOwnProperty(n)&&p.prop(n,l[n]);this.elementProperties=null}return f},element:function(){var e=this.innerString();return e&&(this._element=Ember.ViewUtils.setInnerHTML(this._element,e)),this._element},string:function(){if(this._hasElement&&this._element){var e=this.element(),t=e.outerHTML;return"undefined"==typeof t?Ember.$("<div/>").append(e).html():t}return this.innerString()},innerString:function(){return this.buffer}}}(),function(){{var e=Ember.get,t=Ember.set;Ember.String.fmt}Ember.EventDispatcher=Ember.Object.extend({events:{touchstart:"touchStart",touchmove:"touchMove",touchend:"touchEnd",touchcancel:"touchCancel",keydown:"keyDown",keyup:"keyUp",keypress:"keyPress",mousedown:"mouseDown",mouseup:"mouseUp",contextmenu:"contextMenu",click:"click",dblclick:"doubleClick",mousemove:"mouseMove",focusin:"focusIn",focusout:"focusOut",mouseenter:"mouseEnter",mouseleave:"mouseLeave",submit:"submit",input:"input",change:"change",dragstart:"dragStart",drag:"drag",dragenter:"dragEnter",dragleave:"dragLeave",dragover:"dragOver",drop:"drop",dragend:"dragEnd"},rootElement:"body",setup:function(r,n){var i,o=e(this,"events");Ember.$.extend(o,r||{}),Ember.isNone(n)||t(this,"rootElement",n),n=Ember.$(e(this,"rootElement")),n.addClass("ember-application");for(i in o)o.hasOwnProperty(i)&&this.setupHandler(n,i,o[i])},setupHandler:function(e,t,r){var n=this;e.on(t+".ember",".ember-view",function(e,t){return Ember.handleErrors(function(){var i=Ember.View.views[this.id],o=!0,a=null;return a=n._findNearestEventManager(i,r),a&&a!==t?o=n._dispatchEvent(a,e,r,i):i?o=n._bubbleEvent(i,e,r):e.stopPropagation(),o},this)}),e.on(t+".ember","[data-ember-action]",function(e){return Ember.handleErrors(function(){var t=Ember.$(e.currentTarget).attr("data-ember-action"),n=Ember.Handlebars.ActionHelper.registeredActions[t];return n&&n.eventName===r?n.handler(e):void 0},this)})},_findNearestEventManager:function(t,r){for(var n=null;t&&(n=e(t,"eventManager"),!n||!n[r]);)t=e(t,"parentView");return n},_dispatchEvent:function(e,t,r,n){var i=!0,o=e[r];return"function"===Ember.typeOf(o)?(i=Ember.run(function(){return o.call(e,t,n)}),t.stopPropagation()):i=this._bubbleEvent(n,t,r),i},_bubbleEvent:function(e,t,r){return Ember.run(function(){return e.handleEvent(r,t)})},destroy:function(){var t=e(this,"rootElement");return Ember.$(t).off(".ember","**").removeClass("ember-application"),this._super()}})}(),function(){var e=Ember.run.queues,t=Ember.ArrayPolyfills.indexOf;e.splice(t.call(e,"actions")+1,0,"render","afterRender")}(),function(){var e=Ember.get,t=Ember.set;Ember.ControllerMixin.reopen({target:null,namespace:null,view:null,container:null,_childContainers:null,init:function(){this._super(),t(this,"_childContainers",{})},_modelDidChange:Ember.observer("model",function(){var r=e(this,"_childContainers");for(var n in r)r.hasOwnProperty(n)&&r[n].destroy();t(this,"_childContainers",{})})})}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}var t={},r=Ember.get,n=Ember.set,i=Ember.guidFor,o=Ember.EnumerableUtils.forEach,a=Ember.EnumerableUtils.addObject,s=Ember.meta,u=Ember.computed(function(){var e=this._childViews,t=Ember.A(),n=this;return o(e,function(e){var n;e.isVirtual?(n=r(e,"childViews"))&&t.pushObjects(n):t.push(e)}),t.replace=function(e,t,r){if(n instanceof Ember.ContainerView)return n.replace(e,t,r);throw new Ember.Error("childViews is immutable")},t});Ember.TEMPLATES={},Ember.CoreView=Ember.Object.extend(Ember.Evented,Ember.ActionHandler,{isView:!0,states:t,init:function(){this._super(),this.transitionTo("preRender")
20
- },parentView:Ember.computed(function(){var e=this._parentView;return e&&e.isVirtual?r(e,"parentView"):e}).property("_parentView"),state:null,_parentView:null,concreteView:Ember.computed(function(){return this.isVirtual?r(this,"parentView"):this}).property("parentView"),instrumentName:"core_view",instrumentDetails:function(e){e.object=this.toString()},renderToBuffer:function(e,t){var r="render."+this.instrumentName,n={};return this.instrumentDetails(n),Ember.instrument(r,n,function(){return this._renderToBuffer(e,t)},this)},_renderToBuffer:function(e){var t=this.tagName;(null===t||void 0===t)&&(t="div");var r=this.buffer=e&&e.begin(t)||Ember.RenderBuffer(t);return this.transitionTo("inBuffer",!1),this.beforeRender(r),this.render(r),this.afterRender(r),r},trigger:function(e){this._super.apply(this,arguments);var t=this[e];if(t){var r,n,i=[];for(r=1,n=arguments.length;n>r;r++)i.push(arguments[r]);return t.apply(this,i)}},deprecatedSendHandles:function(e){return!!this[e]},deprecatedSend:function(e){var t=[].slice.call(arguments,1);this[e].apply(this,t)},has:function(e){return"function"===Ember.typeOf(this[e])||this._super(e)},destroy:function(){var e=this._parentView;if(this._super())return this.removedFromDOM||this.destroyElement(),e&&e.removeChild(this),this.transitionTo("destroying",!1),this},clearRenderedChildren:Ember.K,triggerRecursively:Ember.K,invokeRecursively:Ember.K,transitionTo:Ember.K,destroyElement:Ember.K});var c=Ember._ViewCollection=function(e){var t=this.views=e||[];this.length=t.length};c.prototype={length:0,trigger:function(e){for(var t,r=this.views,n=0,i=r.length;i>n;n++)t=r[n],t.trigger&&t.trigger(e)},triggerRecursively:function(e){for(var t=this.views,r=0,n=t.length;n>r;r++)t[r].triggerRecursively(e)},invokeRecursively:function(e){for(var t,r=this.views,n=0,i=r.length;i>n;n++)t=r[n],e(t)},transitionTo:function(e,t){for(var r=this.views,n=0,i=r.length;i>n;n++)r[n].transitionTo(e,t)},push:function(){this.length+=arguments.length;var e=this.views;return e.push.apply(e,arguments)},objectAt:function(e){return this.views[e]},forEach:function(e){var t=this.views;return o(t,e)},clear:function(){this.length=0,this.views.length=0}};var l=[];Ember.View=Ember.CoreView.extend({concatenatedProperties:["classNames","classNameBindings","attributeBindings"],isView:!0,templateName:null,layoutName:null,template:Ember.computed(function(e,t){if(void 0!==t)return t;var n=r(this,"templateName"),i=this.templateForName(n,"template");return i||r(this,"defaultTemplate")}).property("templateName"),controller:Ember.computed(function(){var e=r(this,"_parentView");return e?r(e,"controller"):null}).property("_parentView"),layout:Ember.computed(function(){var e=r(this,"layoutName"),t=this.templateForName(e,"layout");return t||r(this,"defaultLayout")}).property("layoutName"),_yield:function(e,t){var n=r(this,"template");n&&n(e,t)},templateForName:function(e){if(e){var t=this.container||Ember.Container&&Ember.Container.defaultContainer;return t&&t.lookup("template:"+e)}},context:Ember.computed(function(e,t){return 2===arguments.length?(n(this,"_context",t),t):r(this,"_context")}).volatile(),_context:Ember.computed(function(){var e,t;return(t=r(this,"controller"))?t:(e=this._parentView,e?r(e,"_context"):null)}),_contextDidChange:Ember.observer("context",function(){this.rerender()}),isVisible:!0,childViews:u,_childViews:l,_childViewsWillChange:Ember.beforeObserver("childViews",function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyWillChange(e,"childViews")}}),_childViewsDidChange:Ember.observer("childViews",function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyDidChange(e,"childViews")}}),nearestInstanceOf:function(e){for(var t=r(this,"parentView");t;){if(t instanceof e)return t;t=r(t,"parentView")}},nearestOfType:function(e){for(var t=r(this,"parentView"),n=e instanceof Ember.Mixin?function(t){return e.detect(t)}:function(t){return e.detect(t.constructor)};t;){if(n(t))return t;t=r(t,"parentView")}},nearestWithProperty:function(e){for(var t=r(this,"parentView");t;){if(e in t)return t;t=r(t,"parentView")}},nearestChildOf:function(e){for(var t=r(this,"parentView");t;){if(r(t,"parentView")instanceof e)return t;t=r(t,"parentView")}},_parentViewDidChange:Ember.observer("_parentView",function(){this.isDestroying||(this.trigger("parentViewDidChange"),r(this,"parentView.controller")&&!r(this,"controller")&&this.notifyPropertyChange("controller"))}),_controllerDidChange:Ember.observer("controller",function(){this.isDestroying||(this.rerender(),this.forEachChildView(function(e){e.propertyDidChange("controller")}))}),cloneKeywords:function(){var e=r(this,"templateData"),t=e?Ember.copy(e.keywords):{};return n(t,"view",r(this,"concreteView")),n(t,"_view",this),n(t,"controller",r(this,"controller")),t},render:function(e){var t=r(this,"layout")||r(this,"template");if(t){var n,i=r(this,"context"),o=this.cloneKeywords(),a={view:this,buffer:e,isRenderData:!0,keywords:o,insideGroup:r(this,"templateData.insideGroup")};n=t(i,{data:a}),void 0!==n&&e.push(n)}},rerender:function(){return this.currentState.rerender(this)},clearRenderedChildren:function(){for(var e=this.lengthBeforeRender,t=this.lengthAfterRender,r=this._childViews,n=t-1;n>=e;n--)r[n]&&r[n].destroy()},_applyClassNameBindings:function(e){var t,r,n,i=this.classNames;o(e,function(e){var o,s=Ember.View._parsePropertyPath(e),u=function(){r=this._classStringForProperty(e),t=this.$(),o&&(t.removeClass(o),i.removeObject(o)),r?(t.addClass(r),o=r):o=null};n=this._classStringForProperty(e),n&&(a(i,n),o=n),this.registerObserver(this,s.path,u),this.one("willClearRender",function(){o&&(i.removeObject(o),o=null)})},this)},_applyAttributeBindings:function(e,t){var n,i;o(t,function(t){var o=t.split(":"),a=o[0],s=o[1]||a,u=function(){i=this.$(),n=r(this,a),Ember.View.applyAttributeBindings(i,s,n)};this.registerObserver(this,a,u),n=r(this,a),Ember.View.applyAttributeBindings(e,s,n)},this)},_classStringForProperty:function(e){var t=Ember.View._parsePropertyPath(e),n=t.path,i=r(this,n);return void 0===i&&Ember.isGlobalPath(n)&&(i=r(Ember.lookup,n)),Ember.View._classStringForValue(n,i,t.className,t.falsyClassName)},element:Ember.computed(function(e,t){return void 0!==t?this.currentState.setElement(this,t):this.currentState.getElement(this)}).property("_parentView"),$:function(e){return this.currentState.$(this,e)},mutateChildViews:function(e){for(var t,r=this._childViews,n=r.length;--n>=0;)t=r[n],e(this,t,n);return this},forEachChildView:function(e){var t=this._childViews;if(!t)return this;var r,n,i=t.length;for(n=0;i>n;n++)r=t[n],e(r);return this},appendTo:function(e){return this._insertElementLater(function(){this.$().appendTo(e)}),this},replaceIn:function(e){return this._insertElementLater(function(){Ember.$(e).empty(),this.$().appendTo(e)}),this},_insertElementLater:function(e){this._scheduledInsert=Ember.run.scheduleOnce("render",this,"_insertElement",e)},_insertElement:function(e){this._scheduledInsert=null,this.currentState.insertElement(this,e)},append:function(){return this.appendTo(document.body)},remove:function(){this.removedFromDOM||this.destroyElement(),this.invokeRecursively(function(e){e.clearRenderedChildren&&e.clearRenderedChildren()})},elementId:null,findElementInParentElement:function(e){var t="#"+this.elementId;return Ember.$(t)[0]||Ember.$(t,e)[0]},createElement:function(){if(r(this,"element"))return this;var e=this.renderToBuffer();return n(this,"element",e.element()),this},willInsertElement:Ember.K,didInsertElement:Ember.K,willClearRender:Ember.K,invokeRecursively:function(e,t){for(var r,n,i,o=t===!1?this._childViews:[this];o.length;){r=o.slice(),o=[];for(var a=0,s=r.length;s>a;a++)n=r[a],i=n._childViews?n._childViews.slice(0):null,e(n),i&&o.push.apply(o,i)}},triggerRecursively:function(e){for(var t,r,n,i=[this];i.length;){t=i.slice(),i=[];for(var o=0,a=t.length;a>o;o++)r=t[o],n=r._childViews?r._childViews.slice(0):null,r.trigger&&r.trigger(e),n&&i.push.apply(i,n)}},viewHierarchyCollection:function(){for(var e,t=new c([this]),r=0;r<t.length;r++)e=t.objectAt(r),e._childViews&&t.push.apply(t,e._childViews);return t},destroyElement:function(){return this.currentState.destroyElement(this)},willDestroyElement:Ember.K,_notifyWillDestroyElement:function(){var e=this.viewHierarchyCollection();return e.trigger("willClearRender"),e.trigger("willDestroyElement"),e},_elementDidChange:Ember.observer("element",function(){this.forEachChildView(function(e){delete s(e).cache.element})}),parentViewDidChange:Ember.K,instrumentName:"view",instrumentDetails:function(e){e.template=r(this,"templateName"),this._super(e)},_renderToBuffer:function(e,t){this.lengthBeforeRender=this._childViews.length;var r=this._super(e,t);return this.lengthAfterRender=this._childViews.length,r},renderToBufferIfNeeded:function(e){return this.currentState.renderToBufferIfNeeded(this,e)},beforeRender:function(e){this.applyAttributesToBuffer(e),e.pushOpeningTag()},afterRender:function(e){e.pushClosingTag()},applyAttributesToBuffer:function(e){var t=r(this,"classNameBindings");t.length&&this._applyClassNameBindings(t);var n=r(this,"attributeBindings");n.length&&this._applyAttributeBindings(e,n),e.setClasses(this.classNames),e.id(this.elementId);var i=r(this,"ariaRole");i&&e.attr("role",i),r(this,"isVisible")===!1&&e.style("display","none")},tagName:null,ariaRole:null,classNames:["ember-view"],classNameBindings:l,attributeBindings:l,init:function(){this.elementId=this.elementId||i(this),this._super(),this._childViews=this._childViews.slice(),this.classNameBindings=Ember.A(this.classNameBindings.slice()),this.classNames=Ember.A(this.classNames.slice())},appendChild:function(e,t){return this.currentState.appendChild(this,e,t)},removeChild:function(e){if(!this.isDestroying){n(e,"_parentView",null);var t=this._childViews;return Ember.EnumerableUtils.removeObject(t,e),this.propertyDidChange("childViews"),this}},removeAllChildren:function(){return this.mutateChildViews(function(e,t){e.removeChild(t)})},destroyAllChildren:function(){return this.mutateChildViews(function(e,t){t.destroy()})},removeFromParent:function(){var e=this._parentView;return this.remove(),e&&e.removeChild(this),this},destroy:function(){var e,t,n=this._childViews,i=r(this,"parentView"),o=this.viewName;if(this._super()){for(e=n.length,t=e-1;t>=0;t--)n[t].removedFromDOM=!0;for(o&&i&&i.set(o,null),e=n.length,t=e-1;t>=0;t--)n[t].destroy();return this}},createChildView:function(e,t){if(!e)throw new TypeError("createChildViews first argument must exist");if(e.isView&&e._parentView===this&&e.container===this.container)return e;if(t=t||{},t._parentView=this,Ember.CoreView.detect(e))t.templateData=t.templateData||r(this,"templateData"),t.container=this.container,e=e.create(t),e.viewName&&n(r(this,"concreteView"),e.viewName,e);else if("string"==typeof e){var i="view:"+e,o=this.container.lookupFactory(i);t.templateData=r(this,"templateData"),e=o.create(t)}else t.container=this.container,r(e,"templateData")||(t.templateData=r(this,"templateData")),Ember.setProperties(e,t);return e},becameVisible:Ember.K,becameHidden:Ember.K,_isVisibleDidChange:Ember.observer("isVisible",function(){var e=this.$();if(e){var t=r(this,"isVisible");e.toggle(t),this._isAncestorHidden()||(t?this._notifyBecameVisible():this._notifyBecameHidden())}}),_notifyBecameVisible:function(){this.trigger("becameVisible"),this.forEachChildView(function(e){var t=r(e,"isVisible");(t||null===t)&&e._notifyBecameVisible()})},_notifyBecameHidden:function(){this.trigger("becameHidden"),this.forEachChildView(function(e){var t=r(e,"isVisible");(t||null===t)&&e._notifyBecameHidden()})},_isAncestorHidden:function(){for(var e=r(this,"parentView");e;){if(r(e,"isVisible")===!1)return!0;e=r(e,"parentView")}return!1},clearBuffer:function(){this.invokeRecursively(function(e){e.buffer=null})},transitionTo:function(e,t){var r=this.currentState,n=this.currentState=this.states[e];this.state=e,r&&r.exit&&r.exit(this),n.enter&&n.enter(this),"inDOM"===e&&delete Ember.meta(this).cache.element,t!==!1&&this.forEachChildView(function(t){t.transitionTo(e)})},handleEvent:function(e,t){return this.currentState.handleEvent(this,e,t)},registerObserver:function(e,t,r,n){if(n||"function"!=typeof r||(n=r,r=null),e&&"object"==typeof e){var i=this,o=function(){i.currentState.invokeObserver(this,n)},a=function(){Ember.run.scheduleOnce("render",this,o)};Ember.addObserver(e,t,r,a),this.one("willClearRender",function(){Ember.removeObserver(e,t,r,a)})}}});var h={prepend:function(t,r){t.$().prepend(r),e()},after:function(t,r){t.$().after(r),e()},html:function(t,r){t.$().html(r),e()},replace:function(t){var i=r(t,"element");n(t,"element",null),t._insertElementLater(function(){Ember.$(i).replaceWith(r(t,"element")),e()})},remove:function(t){t.$().remove(),e()},empty:function(t){t.$().empty(),e()}};Ember.View.reopen({domManager:h}),Ember.View.reopenClass({_parsePropertyPath:function(e){var t,r,n=e.split(":"),i=n[0],o="";return n.length>1&&(t=n[1],3===n.length&&(r=n[2]),o=":"+t,r&&(o+=":"+r)),{path:i,classNames:o,className:""===t?void 0:t,falsyClassName:r}},_classStringForValue:function(e,t,r,n){if(r||n)return r&&t?r:n&&!t?n:null;if(t===!0){var i=e.split(".");return Ember.String.dasherize(i[i.length-1])}return t!==!1&&null!=t?t:null}});var m=Ember.Object.extend(Ember.Evented).create();Ember.View.addMutationListener=function(e){m.on("change",e)},Ember.View.removeMutationListener=function(e){m.off("change",e)},Ember.View.notifyMutationListeners=function(){m.trigger("change")},Ember.View.views={},Ember.View.childViewsProperty=u,Ember.View.applyAttributeBindings=function(e,t,r){var n=Ember.typeOf(r);"value"===t||"string"!==n&&("number"!==n||isNaN(r))?"value"===t||"boolean"===n?(Ember.isNone(r)&&(r=""),r!==e.prop(t)&&e.prop(t,r)):r||e.removeAttr(t):r!==e.attr(t)&&e.attr(t,r)},Ember.View.states=t}(),function(){var e=(Ember.get,Ember.set);Ember.View.states._default={appendChild:function(){throw"You can't use appendChild outside of the rendering process"},$:function(){return void 0},getElement:function(){return null},handleEvent:function(){return!0},destroyElement:function(t){return e(t,"element",null),t._scheduledInsert&&(Ember.run.cancel(t._scheduledInsert),t._scheduledInsert=null),t},renderToBufferIfNeeded:function(){return!1},rerender:Ember.K,invokeObserver:Ember.K}}(),function(){var e=Ember.View.states.preRender=Ember.create(Ember.View.states._default);Ember.merge(e,{insertElement:function(e,t){e.createElement();var r=e.viewHierarchyCollection();r.trigger("willInsertElement"),t.call(e);for(var n=e.get("element");n=n.parentNode;)n===document&&(r.transitionTo("inDOM",!1),r.trigger("didInsertElement"))},renderToBufferIfNeeded:function(e,t){return e.renderToBuffer(t),!0},empty:Ember.K,setElement:function(e,t){return null!==t&&e.transitionTo("hasElement"),t}})}(),function(){var e=(Ember.get,Ember.set,Ember.View.states.inBuffer=Ember.create(Ember.View.states._default));Ember.merge(e,{$:function(e){return e.rerender(),Ember.$()},rerender:function(){throw new Ember.Error("Something you did caused a view to re-render after it rendered but before it was inserted into the DOM.")},appendChild:function(e,t,r){var n=e.buffer,i=e._childViews;return t=e.createChildView(t,r),i.length||(i=e._childViews=i.slice()),i.push(t),t.renderToBuffer(n),e.propertyDidChange("childViews"),t},destroyElement:function(e){e.clearBuffer();var t=e._notifyWillDestroyElement();return t.transitionTo("preRender",!1),e},empty:function(){},renderToBufferIfNeeded:function(){return!1},insertElement:function(){throw"You can't insert an element that has already been rendered"},setElement:function(e,t){return null===t?e.transitionTo("preRender"):(e.clearBuffer(),e.transitionTo("hasElement")),t},invokeObserver:function(e,t){t.call(e)}})}(),function(){var e=Ember.get,t=Ember.set,r=Ember.View.states.hasElement=Ember.create(Ember.View.states._default);Ember.merge(r,{$:function(t,r){var n=e(t,"element");return r?Ember.$(r,n):Ember.$(n)},getElement:function(t){var r=e(t,"parentView");return r&&(r=e(r,"element")),r?t.findElementInParentElement(r):Ember.$("#"+e(t,"elementId"))[0]},setElement:function(e,t){if(null!==t)throw"You cannot set an element to a non-null value when the element is already in the DOM.";return e.transitionTo("preRender"),t},rerender:function(e){return e.triggerRecursively("willClearRender"),e.clearRenderedChildren(),e.domManager.replace(e),e},destroyElement:function(e){return e._notifyWillDestroyElement(),e.domManager.remove(e),t(e,"element",null),e._scheduledInsert&&(Ember.run.cancel(e._scheduledInsert),e._scheduledInsert=null),e},empty:function(e){var t,r,n=e._childViews;if(n)for(t=n.length,r=0;t>r;r++)n[r]._notifyWillDestroyElement();e.domManager.empty(e)},handleEvent:function(e,t,r){return e.has(t)?e.trigger(t,r):!0},invokeObserver:function(e,t){t.call(e)}});var n=Ember.View.states.inDOM=Ember.create(r);Ember.merge(n,{enter:function(e){e.isVirtual||(Ember.View.views[e.elementId]=e),e.addBeforeObserver("elementId",function(){throw new Ember.Error("Changing a view's elementId after creation is not allowed")})},exit:function(e){this.isVirtual||delete Ember.View.views[e.elementId]},insertElement:function(){throw"You can't insert an element into the DOM that has already been inserted"}})}(),function(){var e="You can't call %@ on a view being destroyed",t=Ember.String.fmt,r=Ember.View.states.destroying=Ember.create(Ember.View.states._default);Ember.merge(r,{appendChild:function(){throw t(e,["appendChild"])},rerender:function(){throw t(e,["rerender"])},destroyElement:function(){throw t(e,["destroyElement"])},empty:function(){throw t(e,["empty"])},setElement:function(){throw t(e,["set('element', ...)"])},renderToBufferIfNeeded:function(){return!1},insertElement:Ember.K})}(),function(){Ember.View.cloneStates=function(e){var t={};t._default={},t.preRender=Ember.create(t._default),t.destroying=Ember.create(t._default),t.inBuffer=Ember.create(t._default),t.hasElement=Ember.create(t._default),t.inDOM=Ember.create(t.hasElement);for(var r in e)e.hasOwnProperty(r)&&Ember.merge(t[r],e[r]);return t}}(),function(){function e(e,t,r,n){t.triggerRecursively("willInsertElement"),r?r.domManager.after(r,n.string()):e.domManager.prepend(e,n.string()),t.forEach(function(e){e.transitionTo("inDOM"),e.propertyDidChange("element"),e.triggerRecursively("didInsertElement")})}var t=Ember.View.cloneStates(Ember.View.states),r=Ember.get,n=Ember.set,i=Ember.EnumerableUtils.forEach,o=Ember._ViewCollection;Ember.ContainerView=Ember.View.extend(Ember.MutableArray,{states:t,init:function(){this._super();var e=r(this,"childViews");Ember.defineProperty(this,"childViews",Ember.View.childViewsProperty);var t=this._childViews;i(e,function(e,i){var o;"string"==typeof e?(o=r(this,e),o=this.createChildView(o),n(this,e,o)):o=this.createChildView(e),t[i]=o},this);var o=r(this,"currentView");o&&(t.length||(t=this._childViews=this._childViews.slice()),t.push(this.createChildView(o)))},replace:function(e,t,n){var i=n?r(n,"length"):0;if(this.arrayContentWillChange(e,t,i),this.childViewsWillChange(this._childViews,e,t),0===i)this._childViews.splice(e,t);else{var o=[e,t].concat(n);n.length&&!this._childViews.length&&(this._childViews=this._childViews.slice()),this._childViews.splice.apply(this._childViews,o)}return this.arrayContentDidChange(e,t,i),this.childViewsDidChange(this._childViews,e,t,i),this},objectAt:function(e){return this._childViews[e]},length:Ember.computed(function(){return this._childViews.length}).volatile(),render:function(e){this.forEachChildView(function(t){t.renderToBuffer(e)})},instrumentName:"container",childViewsWillChange:function(e,t,r){if(this.propertyWillChange("childViews"),r>0){var n=e.slice(t,t+r);this.currentState.childViewsWillChange(this,e,t,r),this.initializeViews(n,null,null)}},removeChild:function(e){return this.removeObject(e),this},childViewsDidChange:function(e,t,n,i){if(i>0){var o=e.slice(t,t+i);this.initializeViews(o,this,r(this,"templateData")),this.currentState.childViewsDidChange(this,e,t,i)}this.propertyDidChange("childViews")},initializeViews:function(e,t,o){i(e,function(e){n(e,"_parentView",t),!e.container&&t&&n(e,"container",t.container),r(e,"templateData")||n(e,"templateData",o)})},currentView:null,_currentViewWillChange:Ember.beforeObserver("currentView",function(){var e=r(this,"currentView");e&&e.destroy()}),_currentViewDidChange:Ember.observer("currentView",function(){var e=r(this,"currentView");e&&this.pushObject(e)}),_ensureChildrenAreInDOM:function(){this.currentState.ensureChildrenAreInDOM(this)}}),Ember.merge(t._default,{childViewsWillChange:Ember.K,childViewsDidChange:Ember.K,ensureChildrenAreInDOM:Ember.K}),Ember.merge(t.inBuffer,{childViewsDidChange:function(){throw new Ember.Error("You cannot modify child views while in the inBuffer state")}}),Ember.merge(t.hasElement,{childViewsWillChange:function(e,t,r,n){for(var i=r;r+n>i;i++)t[i].remove()},childViewsDidChange:function(e){Ember.run.scheduleOnce("render",e,"_ensureChildrenAreInDOM")},ensureChildrenAreInDOM:function(t){var r,n,i,a,s,u=t._childViews,c=new o;for(r=0,n=u.length;n>r;r++)i=u[r],s||(s=Ember.RenderBuffer(),s._hasElement=!1),i.renderToBufferIfNeeded(s)?c.push(i):c.length?(e(t,c,a,s),s=null,a=i,c.clear()):a=i;c.length&&e(t,c,a,s)}})}(),function(){{var e=Ember.get,t=Ember.set;Ember.String.fmt}Ember.CollectionView=Ember.ContainerView.extend({content:null,emptyViewClass:Ember.View,emptyView:null,itemViewClass:Ember.View,init:function(){var e=this._super();return this._contentDidChange(),e},_contentWillChange:Ember.beforeObserver("content",function(){var t=this.get("content");t&&t.removeArrayObserver(this);var r=t?e(t,"length"):0;this.arrayWillChange(t,0,r)}),_contentDidChange:Ember.observer("content",function(){var t=e(this,"content");t&&(this._assertArrayLike(t),t.addArrayObserver(this));var r=t?e(t,"length"):0;this.arrayDidChange(t,0,null,r)}),_assertArrayLike:function(){},destroy:function(){if(this._super()){var t=e(this,"content");return t&&t.removeArrayObserver(this),this._createdEmptyView&&this._createdEmptyView.destroy(),this}},arrayWillChange:function(t,r,n){var i=e(this,"emptyView");i&&i instanceof Ember.View&&i.removeFromParent();var o,a,s,u=this._childViews;s=this._childViews.length;var c=n===s;for(c&&(this.currentState.empty(this),this.invokeRecursively(function(e){e.removedFromDOM=!0},!1)),a=r+n-1;a>=r;a--)o=u[a],o.destroy()},arrayDidChange:function(r,n,i,o){var a,s,u,c,l,h,m=[];if(c=r?e(r,"length"):0)for(l=e(this,"itemViewClass"),"string"==typeof l&&(l=e(l)||l),u=n;n+o>u;u++)s=r.objectAt(u),a=this.createChildView(l,{content:s,contentIndex:u}),m.push(a);else{if(h=e(this,"emptyView"),!h)return;"string"==typeof h&&(h=e(h)||h),h=this.createChildView(h),m.push(h),t(this,"emptyView",h),Ember.CoreView.detect(h)&&(this._createdEmptyView=h)}this.replace(n,0,m)},createChildView:function(r,n){r=this._super(r,n);var i=e(r,"tagName");return(null===i||void 0===i)&&(i=Ember.CollectionView.CONTAINER_MAP[e(this,"tagName")],t(r,"tagName",i)),r}}),Ember.CollectionView.CONTAINER_MAP={ul:"li",ol:"li",table:"tr",thead:"tr",tbody:"tr",tfoot:"tr",tr:"td",select:"option"}}(),function(){var e=Ember.get,t=Ember.set,r=(Ember.isNone,Array.prototype.slice);Ember.Component=Ember.View.extend(Ember.TargetActionSupport,{init:function(){this._super(),t(this,"context",this),t(this,"controller",this)},defaultLayout:function(e){e.data={view:e._context},Ember.Handlebars.helpers.yield.apply(this,[e])},cloneKeywords:function(){return{view:this,controller:this}},_yield:function(t,r){var n=r.data.view,i=this._parentView,o=e(this,"template");o&&n.appendChild(Ember.View,{isVirtual:!0,tagName:"",_contextView:i,template:o,context:e(i,"context"),controller:e(i,"controller"),templateData:{keywords:i.cloneKeywords()}})},targetObject:Ember.computed(function(){var t=e(this,"_parentView");return t?e(t,"controller"):null}).property("_parentView"),sendAction:function(t){var n,i=r.call(arguments,1);n=void 0===t?e(this,"action"):e(this,t),void 0!==n&&this.triggerAction({action:n,actionContext:i})}})}(),function(){Ember.ViewTargetActionSupport=Ember.Mixin.create(Ember.TargetActionSupport,{target:Ember.computed.alias("controller"),actionContext:Ember.computed.alias("context")})}(),function(){e("metamorph",[],function(){"use strict";// Copyright: ©2011 My Company Inc. All rights reserved.
21
- var e=function(){},t=0,r=this.document,n=("undefined"==typeof ENV?{}:ENV).DISABLE_RANGE_API,i=!n&&r&&"createRange"in r&&"undefined"!=typeof Range&&Range.prototype.createContextualFragment,o=r&&function(){var e=r.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML}(),a=r&&function(){var e=r.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value","Test:"===e.childNodes[0].nodeValue&&" Value"===e.childNodes[2].nodeValue}(),s=function(r){var n;n=this instanceof s?this:new e,n.innerHTML=r;var i="metamorph-"+t++;return n.start=i+"-start",n.end=i+"-end",n};e.prototype=s.prototype;var u,c,l,h,m,f,p,d,b;if(h=function(){return this.startTag()+this.innerHTML+this.endTag()},d=function(){return"<script id='"+this.start+"' type='text/x-placeholder'></script>"},b=function(){return"<script id='"+this.end+"' type='text/x-placeholder'></script>"},i)u=function(e,t){var n=r.createRange(),i=r.getElementById(e.start),o=r.getElementById(e.end);return t?(n.setStartBefore(i),n.setEndAfter(o)):(n.setStartAfter(i),n.setEndBefore(o)),n},c=function(e,t){var r=u(this,t);r.deleteContents();var n=r.createContextualFragment(e);r.insertNode(n)},l=function(){var e=u(this,!0);e.deleteContents()},m=function(e){var t=r.createRange();t.setStart(e),t.collapse(!1);var n=t.createContextualFragment(this.outerHTML());e.appendChild(n)},f=function(e){var t=r.createRange(),n=r.getElementById(this.end);t.setStartAfter(n),t.setEndAfter(n);var i=t.createContextualFragment(e);t.insertNode(i)},p=function(e){var t=r.createRange(),n=r.getElementById(this.start);t.setStartAfter(n),t.setEndAfter(n);var i=t.createContextualFragment(e);t.insertNode(i)};else{var v={select:[1,"<select multiple='multiple'>","</select>"],fieldset:[1,"<fieldset>","</fieldset>"],table:[1,"<table>","</table>"],tbody:[2,"<table><tbody>","</tbody></table>"],tr:[3,"<table><tbody><tr>","</tr></tbody></table>"],colgroup:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],map:[1,"<map>","</map>"],_default:[0,"",""]},E=function(e,t){if(e.getAttribute("id")===t)return e;var r,n,i,o=e.childNodes.length;for(r=0;o>r;r++)if(n=e.childNodes[r],i=1===n.nodeType&&E(n,t))return i},g=function(e,t){var n=[];if(a&&(t=t.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,r,i){return n.push([i,t]),r})),e.innerHTML=t,n.length>0){var i,o=n.length;for(i=0;o>i;i++){var s=E(e,n[i][0]),u=r.createTextNode(n[i][1]);s.parentNode.insertBefore(u,s)}}},y=function(e,t){var n=v[e.tagName.toLowerCase()]||v._default,i=n[0],a=n[1],s=n[2];o&&(t="&shy;"+t);var u=r.createElement("div");g(u,a+t+s);for(var c=0;i>=c;c++)u=u.firstChild;if(o){for(var l=u;1===l.nodeType&&!l.nodeName;)l=l.firstChild;3===l.nodeType&&"­"===l.nodeValue.charAt(0)&&(l.nodeValue=l.nodeValue.slice(1))}return u},w=function(e){for(;""===e.parentNode.tagName;)e=e.parentNode;return e},_=function(e,t){e.parentNode!==t.parentNode&&t.parentNode.insertBefore(e,t.parentNode.firstChild)};c=function(e,t){var n,i,o,a=w(r.getElementById(this.start)),s=r.getElementById(this.end),u=s.parentNode;for(_(a,s),n=a.nextSibling;n;){if(i=n.nextSibling,o=n===s){if(!t)break;s=n.nextSibling}if(n.parentNode.removeChild(n),o)break;n=i}for(n=y(a.parentNode,e);n;)i=n.nextSibling,u.insertBefore(n,s),n=i},l=function(){var e=w(r.getElementById(this.start)),t=r.getElementById(this.end);this.html(""),e.parentNode.removeChild(e),t.parentNode.removeChild(t)},m=function(e){for(var t,r=y(e,this.outerHTML());r;)t=r.nextSibling,e.appendChild(r),r=t},f=function(e){var t,n,i=r.getElementById(this.end),o=i.nextSibling,a=i.parentNode;for(n=y(a,e);n;)t=n.nextSibling,a.insertBefore(n,o),n=t},p=function(e){var t,n,i=r.getElementById(this.start),o=i.parentNode;n=y(o,e);for(var a=i.nextSibling;n;)t=n.nextSibling,o.insertBefore(n,a),n=t}}return s.prototype.html=function(e){return this.checkRemoved(),void 0===e?this.innerHTML:(c.call(this,e),this.innerHTML=e,void 0)},s.prototype.replaceWith=function(e){this.checkRemoved(),c.call(this,e,!0)},s.prototype.remove=l,s.prototype.outerHTML=h,s.prototype.appendTo=m,s.prototype.after=f,s.prototype.prepend=p,s.prototype.startTag=d,s.prototype.endTag=b,s.prototype.isRemoved=function(){var e=r.getElementById(this.start),t=r.getElementById(this.end);return!e||!t},s.prototype.checkRemoved=function(){if(this.isRemoved())throw new Error("Cannot perform operations on a Metamorph that is not in the DOM.")},s})}(),function(){var e=Object.create||function(e){function t(){}return t.prototype=e,new t},t=Ember.imports&&Ember.imports.Handlebars||this&&this.Handlebars;t||"function"!=typeof r||(t=r("handlebars")),Ember.Handlebars=e(t),Ember.Handlebars.helper=function(e,t){Ember.View.detect(t)?Ember.Handlebars.registerHelper(e,Ember.Handlebars.makeViewHelper(t)):Ember.Handlebars.registerBoundHelper.apply(null,arguments)},Ember.Handlebars.makeViewHelper=function(e){return function(t){return Ember.Handlebars.helpers.view.call(this,e,t)}},Ember.Handlebars.helpers=e(t.helpers),Ember.Handlebars.Compiler=function(){},t.Compiler&&(Ember.Handlebars.Compiler.prototype=e(t.Compiler.prototype)),Ember.Handlebars.Compiler.prototype.compiler=Ember.Handlebars.Compiler,Ember.Handlebars.JavaScriptCompiler=function(){},t.JavaScriptCompiler&&(Ember.Handlebars.JavaScriptCompiler.prototype=e(t.JavaScriptCompiler.prototype),Ember.Handlebars.JavaScriptCompiler.prototype.compiler=Ember.Handlebars.JavaScriptCompiler),Ember.Handlebars.JavaScriptCompiler.prototype.namespace="Ember.Handlebars",Ember.Handlebars.JavaScriptCompiler.prototype.initializeBuffer=function(){return"''"},Ember.Handlebars.JavaScriptCompiler.prototype.appendToBuffer=function(e){return"data.buffer.push("+e+");"};var n=/helpers\.(.*?)\)/,i=/helpers\['(.*?)'/,o=/(.*blockHelperMissing\.call\(.*)(stack[0-9]+)(,.*)/;Ember.Handlebars.JavaScriptCompiler.stringifyLastBlockHelperMissingInvocation=function(e){var t=e[e.length-1],r=(n.exec(t)||i.exec(t))[1],a=o.exec(t);e[e.length-1]=a[1]+"'"+r+"'"+a[3]};var a=Ember.Handlebars.JavaScriptCompiler.stringifyLastBlockHelperMissingInvocation,s=Ember.Handlebars.JavaScriptCompiler.prototype.blockValue;Ember.Handlebars.JavaScriptCompiler.prototype.blockValue=function(){s.apply(this,arguments),a(this.source)};var u=Ember.Handlebars.JavaScriptCompiler.prototype.ambiguousBlockValue;Ember.Handlebars.JavaScriptCompiler.prototype.ambiguousBlockValue=function(){u.apply(this,arguments),a(this.source)};var c="ember"+ +new Date,l=1;Ember.Handlebars.Compiler.prototype.mustache=function(e){if(e.isHelper&&"control"===e.id.string)e.hash=e.hash||new t.AST.HashNode([]),e.hash.pairs.push(["controlID",new t.AST.StringNode(c+l++)]);else if(e.params.length||e.hash);else{var r=new t.AST.IdNode([{part:"_triageMustache"}]);e.escaped||(e.hash=e.hash||new t.AST.HashNode([]),e.hash.pairs.push(["unescaped",new t.AST.StringNode("true")])),e=new t.AST.MustacheNode([r].concat([e.id]),e.hash,!e.escaped)}return t.Compiler.prototype.mustache.call(this,e)},Ember.Handlebars.precompile=function(e){var r=t.parse(e),n={knownHelpers:{action:!0,unbound:!0,"bind-attr":!0,template:!0,view:!0,_triageMustache:!0},data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(r,n);return(new Ember.Handlebars.JavaScriptCompiler).compile(i,n,void 0,!0)},t.compile&&(Ember.Handlebars.compile=function(e){var r=t.parse(e),n={data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(r,n),o=(new Ember.Handlebars.JavaScriptCompiler).compile(i,n,void 0,!0),a=Ember.Handlebars.template(o);return a.isMethod=!1,a})}(),function(){function e(e,t,r,n){var i,o,a,s,u=[],c=n.hash,l=c.boundOptions;for(s in l)l.hasOwnProperty(s)&&(c[s]=Ember.Handlebars.get(e,l[s],n));for(i=0,o=r.length;o>i;++i)a=r[i],u.push(Ember.Handlebars.get(a.root,a.path,n));return u.push(n),t.apply(e,u)}var t=Array.prototype.slice,r=Ember.Handlebars.template,n=Ember.Handlebars.normalizePath=function(e,t,r){var n,i,o=r&&r.keywords||{};return n=t.split(".",1)[0],o.hasOwnProperty(n)&&(e=o[n],i=!0,t=t===n?"":t.substr(n.length+1)),{root:e,path:t,isKeyword:i}},i=Ember.Handlebars.get=function(e,t,r){var i,o=r&&r.data,a=n(e,t,o);return e=a.root,t=a.path,i=Ember.get(e,t),void 0===i&&e!==Ember.lookup&&Ember.isGlobalPath(t)&&(i=Ember.get(Ember.lookup,t)),i};Ember.Handlebars.resolveParams=function(e,t,r){for(var n,o,a=[],s=r.types,u=0,c=t.length;c>u;u++)n=t[u],o=s[u],"ID"===o?a.push(i(e,n,r)):a.push(n);return a},Ember.Handlebars.resolveHash=function(e,t,r){var n,o={},a=r.hashTypes;for(var s in t)t.hasOwnProperty(s)&&(n=a[s],o[s]="ID"===n?i(e,t[s],r):t[s]);return o},Ember.Handlebars.registerHelper("helperMissing",function(e){var r,n="",i=arguments[arguments.length-1],o=Ember.Handlebars.resolveHelper(i.data.view.container,e);if(o)return o.apply(this,t.call(arguments,1));throw r="%@ Handlebars error: Could not find property '%@' on object %@.",i.data&&(n=i.data.view),new Ember.Error(Ember.String.fmt(r,[n,e,this]))}),Ember.Handlebars.registerHelper("blockHelperMissing",function(e){var r=arguments[arguments.length-1],n=Ember.Handlebars.resolveHelper(r.data.view.container,e);return n?n.apply(this,t.call(arguments,1)):Handlebars.helpers.helperMissing.call(this,e)}),Ember.Handlebars.registerBoundHelper=function(e){var r=t.call(arguments,1),n=Ember.Handlebars.makeBoundHelper.apply(this,r);Ember.Handlebars.registerHelper(e,n)},Ember.Handlebars.makeBoundHelper=function(r){function i(){var i,a,s,u,c,l=t.call(arguments,0,-1),h=l.length,m=arguments[arguments.length-1],f=[],p=m.types,d=m.data,b=m.hash,v=d.view,E=m.contexts,g=E&&E.length?E[0]:this,y="",w=Ember._SimpleHandlebarsView.prototype.normalizedValue,_=b.boundOptions={};for(s in b)Ember.IS_BINDING.test(s)&&(_[s.slice(0,-7)]=b[s]);var C=[];for(d.properties=[],i=0;h>i;++i)if(d.properties.push(l[i]),"ID"===p[i]){var O=n(g,l[i],d);f.push(O),C.push(O)}else f.push(null);if(d.isUnbound)return e(this,r,f,m);var A=new Ember._SimpleHandlebarsView(null,null,!m.hash.unescaped,m.data);A.normalizedValue=function(){var e,t=[];for(e in _)_.hasOwnProperty(e)&&(c=n(g,_[e],d),A.path=c.path,A.pathRoot=c.root,b[e]=w.call(A));for(i=0;h>i;++i)c=f[i],c?(A.path=c.path,A.pathRoot=c.root,t.push(w.call(A))):t.push(l[i]);return t.push(m),r.apply(g,t)},v.appendChild(A);for(u in _)_.hasOwnProperty(u)&&C.push(n(g,_[u],d));for(i=0,a=C.length;a>i;++i)c=C[i],v.registerObserver(c.root,c.path,A,A.rerender);if("ID"===p[0]&&0!==f.length){var P=f[0],x=P.root,V=P.path;Ember.isEmpty(V)||(y=V+".");for(var T=0,S=o.length;S>T;T++)v.registerObserver(x,y+o[T],A,A.rerender)}}var o=t.call(arguments,1);return i._rawFunction=r,i},Ember.Handlebars.template=function(e){var t=r(e);return t.isTop=!0,t}}(),function(){Ember.String.htmlSafe=function(e){return new Handlebars.SafeString(e)};var e=Ember.String.htmlSafe;(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)&&(String.prototype.htmlSafe=function(){return e(this)})}(),function(){Ember.Handlebars.resolvePaths=function(e){for(var t=[],r=e.contexts,n=e.roots,i=e.data,o=0,a=r.length;a>o;o++)t.push(Ember.Handlebars.get(n[o],r[o],{data:i}));return t}}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}var r=(Ember.set,Ember.get,t("metamorph")),n={remove:function(t){t.morph.remove(),e()},prepend:function(t,r){t.morph.prepend(r),e()},after:function(t,r){t.morph.after(r),e()},html:function(t,r){t.morph.html(r),e()},replace:function(t){var r=t.morph;t.transitionTo("preRender"),Ember.run.schedule("render",this,function(){if(!t.isDestroying){t.clearRenderedChildren();var n=t.renderToBuffer();t.invokeRecursively(function(e){e.propertyWillChange("element")}),t.triggerRecursively("willInsertElement"),r.replaceWith(n.string()),t.transitionTo("inDOM"),t.invokeRecursively(function(e){e.propertyDidChange("element")}),t.triggerRecursively("didInsertElement"),e()}})},empty:function(t){t.morph.html(""),e()}};Ember._Metamorph=Ember.Mixin.create({isVirtual:!0,tagName:"",instrumentName:"metamorph",init:function(){this._super(),this.morph=r()},beforeRender:function(e){e.push(this.morph.startTag()),e.pushOpeningTag()},afterRender:function(e){e.pushClosingTag(),e.push(this.morph.endTag())},createElement:function(){var e=this.renderToBuffer();this.outerHTML=e.string(),this.clearBuffer()},domManager:n}),Ember._MetamorphView=Ember.View.extend(Ember._Metamorph),Ember._SimpleMetamorphView=Ember.CoreView.extend(Ember._Metamorph)}(),function(){function e(e,t,r,n){this.path=e,this.pathRoot=t,this.isEscaped=r,this.templateData=n,this.morph=o(),this.state="preRender",this.updateId=null,this._parentView=null,this.buffer=null}var r=Ember.get,n=Ember.set,i=Ember.Handlebars.get,o=t("metamorph");Ember._SimpleHandlebarsView=e,e.prototype={isVirtual:!0,isView:!0,destroy:function(){this.updateId&&(Ember.run.cancel(this.updateId),this.updateId=null),this._parentView&&this._parentView.removeChild(this),this.morph=null,this.state="destroyed"},propertyWillChange:Ember.K,propertyDidChange:Ember.K,normalizedValue:function(){var e,t,r=this.path,n=this.pathRoot;return""===r?e=n:(t=this.templateData,e=i(n,r,{data:t})),e},renderToBuffer:function(e){var t="";t+=this.morph.startTag(),t+=this.render(),t+=this.morph.endTag(),e.push(t)},render:function(){var e=this.isEscaped,t=this.normalizedValue();return null===t||void 0===t?t="":t instanceof Handlebars.SafeString||(t=String(t)),e&&(t=Handlebars.Utils.escapeExpression(t)),t},rerender:function(){switch(this.state){case"preRender":case"destroyed":break;case"inBuffer":throw new Ember.Error("Something you did tried to replace an {{expression}} before it was inserted into the DOM.");case"hasElement":case"inDOM":this.updateId=Ember.run.scheduleOnce("render",this,"update")}return this},update:function(){this.updateId=null,this.morph.html(this.render())},transitionTo:function(e){this.state=e}};var a=Ember.View.cloneStates(Ember.View.states),s=Ember.merge;s(a._default,{rerenderIfNeeded:Ember.K}),s(a.inDOM,{rerenderIfNeeded:function(e){e.normalizedValue()!==e._lastNormalizedValue&&e.rerender()}}),Ember._HandlebarsBoundView=Ember._MetamorphView.extend({instrumentName:"boundHandlebars",states:a,shouldDisplayFunc:null,preserveContext:!1,previousContext:null,displayTemplate:null,inverseTemplate:null,path:null,pathRoot:null,normalizedValue:function(){var e,t,n=r(this,"path"),o=r(this,"pathRoot"),a=r(this,"valueNormalizerFunc");return""===n?e=o:(t=r(this,"templateData"),e=i(o,n,{data:t})),a?a(e):e},rerenderIfNeeded:function(){this.currentState.rerenderIfNeeded(this)},render:function(e){var t=r(this,"isEscaped"),i=r(this,"shouldDisplayFunc"),o=r(this,"preserveContext"),a=r(this,"previousContext"),s=r(this,"inverseTemplate"),u=r(this,"displayTemplate"),c=this.normalizedValue();if(this._lastNormalizedValue=c,i(c))if(n(this,"template",u),o)n(this,"_context",a);else{if(!u)return null===c||void 0===c?c="":c instanceof Handlebars.SafeString||(c=String(c)),t&&(c=Handlebars.Utils.escapeExpression(c)),e.push(c),void 0;n(this,"_context",c)}else s?(n(this,"template",s),o?n(this,"_context",a):n(this,"_context",c)):n(this,"template",function(){return""});return this._super(e)}})}(),function(){function e(e){return!Ember.isNone(e)}function t(e,t,r,n,a,s){var u,c,l,h=t.data,m=t.fn,f=t.inverse,p=h.view,d=this;if(u=o(d,e,h),"object"==typeof this){if(h.insideGroup){c=function(){Ember.run.once(p,"rerender")};var b,v,E=i(d,e,t);E=a?a(E):E,v=r?d:E,n(E)?b=m:f&&(b=f),b(v,{data:t.data})}else{var g=p.createChildView(Ember._HandlebarsBoundView,{preserveContext:r,shouldDisplayFunc:n,valueNormalizerFunc:a,displayTemplate:m,inverseTemplate:f,path:e,pathRoot:d,previousContext:d,isEscaped:!t.hash.unescaped,templateData:t.data});p.appendChild(g),c=function(){Ember.run.scheduleOnce("render",g,"rerenderIfNeeded")}}if(""!==u.path&&(p.registerObserver(u.root,u.path,c),s))for(l=0;l<s.length;l++)p.registerObserver(u.root,u.path+"."+s[l],c)}else h.buffer.push(i(d,e,t))}function r(e,t,r){var n,a,s,u,c=r.data,l=c.view;if(n=o(e,t,c),s=n.root,s&&"object"==typeof s){if(c.insideGroup){a=function(){Ember.run.once(l,"rerender")};var h=i(e,t,r);(null===h||void 0===h)&&(h=""),c.buffer.push(h)}else{var m=new Ember._SimpleHandlebarsView(t,e,!r.hash.unescaped,r.data);m._parentView=l,l.appendChild(m),a=function(){Ember.run.scheduleOnce("render",m,"rerender")}}""!==n.path&&l.registerObserver(n.root,n.path,a)}else u=i(e,t,r),c.buffer.push(null===u||"undefined"==typeof u?"":u)}var n=Ember.get,i=(Ember.set,Ember.String.fmt,Ember.Handlebars.get),o=Ember.Handlebars.normalizePath,a=Ember.ArrayPolyfills.forEach,s=Ember.create,u=Ember.Handlebars,c=u.helpers;u.bind=t,u.registerHelper("_triageMustache",function(e,t){if(c[e])return c[e].call(this,t);var r=Ember.Handlebars.resolveHelper(t.data.view.container,e);return r?r.call(this,t):c.bind.call(this,e,t)}),Ember.Handlebars.resolveHelper=function(e,t){if(e&&-1!==t.indexOf("-")){var r=e.lookup("helper:"+t);if(!r){var n=e.lookup("component-lookup:main"),i=n.lookupFactory(t,e);i&&(r=u.makeViewHelper(i),e.register("helper:"+t,r))}return r}},u.registerHelper("bind",function(n,i){var o=i.contexts&&i.contexts.length?i.contexts[0]:this;return i.fn?t.call(o,n,i,!1,e):r(o,n,i)}),u.registerHelper("boundIf",function(e,r){var i=r.contexts&&r.contexts.length?r.contexts[0]:this,o=function(e){var t=e&&n(e,"isTruthy");return"boolean"==typeof t?t:Ember.isArray(e)?0!==n(e,"length"):!!e};return t.call(i,e,r,!0,o,o,["isTruthy","length"])}),u.registerHelper("with",function(r,n){if(4===arguments.length){var i,a,u,l,h;n=arguments[3],i=arguments[2],a=arguments[0];var m=s(n);if(m.data=s(n.data),m.data.keywords=s(n.data.keywords||{}),Ember.isGlobalPath(a))h=a;else{l=o(this,a,n.data),a=l.path,u=l.root;var f=Ember.$.expando+Ember.guidFor(u);m.data.keywords[f]=u,h=a?f+"."+a:f}return Ember.bind(m.data.keywords,i,h),t.call(this,a,m,!0,e)}return c.bind.call(n.contexts[0],r,n)}),u.registerHelper("if",function(e,t){return c.boundIf.call(t.contexts[0],e,t)}),u.registerHelper("unless",function(e,t){var r=t.fn,n=t.inverse;return t.fn=n,t.inverse=r,c.boundIf.call(t.contexts[0],e,t)}),u.registerHelper("bind-attr",function(e){var t=e.hash,r=e.data.view,n=[],s=this,c=++Ember.uuid,l=t["class"];if(null!=l){var h=u.bindClasses(this,l,r,c,e);n.push('class="'+Handlebars.Utils.escapeExpression(h.join(" "))+'"'),delete t["class"]}var m=Ember.keys(t);return a.call(m,function(a){var u,l=t[a];u=o(s,l,e.data);var h,m,f="this"===l?u.root:i(s,l,e),p=Ember.typeOf(f);h=function(){var t=i(s,l,e),n=r.$("[data-bindattr-"+c+"='"+c+"']");return n&&0!==n.length?(Ember.View.applyAttributeBindings(n,a,t),void 0):(Ember.removeObserver(u.root,u.path,m),void 0)},"this"===l||u.isKeyword&&""===u.path||r.registerObserver(u.root,u.path,h),"string"===p||"number"===p&&!isNaN(f)?n.push(a+'="'+Handlebars.Utils.escapeExpression(f)+'"'):f&&"boolean"===p&&n.push(a+'="'+a+'"')},this),n.push("data-bindattr-"+c+'="'+c+'"'),new u.SafeString(n.join(" "))}),u.registerHelper("bindAttr",function(){return u.helpers["bind-attr"].apply(this,arguments)}),u.bindClasses=function(e,t,r,n,s){var u,c,l,h=[],m=function(e,t,r){var n,o=t.path;return n="this"===o?e:""===o?!0:i(e,o,r),Ember.View._classStringForValue(o,n,t.className,t.falsyClassName)};return a.call(t.split(" "),function(t){var i,a,f,p,d=Ember.View._parsePropertyPath(t),b=d.path,v=e;""!==b&&"this"!==b&&(p=o(e,b,s.data),v=p.root,b=p.path),a=function(){u=m(e,d,s),l=n?r.$("[data-bindattr-"+n+"='"+n+"']"):r.$(),l&&0!==l.length?(i&&l.removeClass(i),u?(l.addClass(u),i=u):i=null):Ember.removeObserver(v,b,f)},""!==b&&"this"!==b&&r.registerObserver(v,b,a),c=m(e,d,s),c&&(h.push(c),i=c)}),h}}(),function(){function e(e,r){var n=r.hash,i=r.hashTypes;for(var o in n)if("ID"===i[o]){var a=n[o];Ember.IS_BINDING.test(o)||(n[o+"Binding"]=a,i[o+"Binding"]="STRING",delete n[o],delete i[o])}n.hasOwnProperty("idBinding")&&(n.id=t.get(e,n.idBinding,r),i.id="STRING",delete n.idBinding,delete i.idBinding)}var t=(Ember.get,Ember.set,Ember.Handlebars),r=/^[a-z]/,n=/^view\./;t.ViewHelper=Ember.Object.create({propertiesFromHTMLOptions:function(e){var t=e.hash,r=e.data,n={},i=t["class"],o=!1;t.id&&(n.elementId=t.id,o=!0),t.tag&&(n.tagName=t.tag,o=!0),i&&(i=i.split(" "),n.classNames=i,o=!0),t.classBinding&&(n.classNameBindings=t.classBinding.split(" "),o=!0),t.classNameBindings&&(void 0===n.classNameBindings&&(n.classNameBindings=[]),n.classNameBindings=n.classNameBindings.concat(t.classNameBindings.split(" ")),o=!0),t.attributeBindings&&(n.attributeBindings=null,o=!0),o&&(t=Ember.$.extend({},t),delete t.id,delete t.tag,delete t["class"],delete t.classBinding);var a;for(var s in t)t.hasOwnProperty(s)&&Ember.IS_BINDING.test(s)&&"string"==typeof t[s]&&(a=this.contextualizeBindingPath(t[s],r),a&&(t[s]=a));if(n.classNameBindings)for(var u in n.classNameBindings){var c=n.classNameBindings[u];if("string"==typeof c){var l=Ember.View._parsePropertyPath(c);a=this.contextualizeBindingPath(l.path,r),a&&(n.classNameBindings[u]=a+l.classNames)}}return Ember.$.extend(t,n)},contextualizeBindingPath:function(e,t){var r=Ember.Handlebars.normalizePath(null,e,t);return r.isKeyword?"templateData.keywords."+e:Ember.isGlobalPath(e)?null:"this"===e||""===e?"_parentView.context":"_parentView.context."+e},helper:function(i,o,a){var s,u=a.data,c=a.fn;e(i,a),s="string"==typeof o?"STRING"===a.types[0]&&r.test(o)&&!n.test(o)?u.view.container.lookupFactory("view:"+o):t.get(i,o,a):o;var l=this.propertiesFromHTMLOptions(a,i),h=u.view;l.templateData=u;var m=s.proto?s.proto():s;c&&(l.template=c),m.controller||m.controllerBinding||l.controller||l.controllerBinding||(l._context=i),h.appendChild(s,l)}}),t.registerHelper("view",function(e,r){return e&&e.data&&e.data.isRenderData&&(r=e,e="Ember.View"),t.ViewHelper.helper(this,e,r)})}(),function(){{var e=Ember.get,t=Ember.Handlebars.get;Ember.String.fmt}Ember.Handlebars.registerHelper("collection",function(r,n){r&&r.data&&r.data.isRenderData&&(n=r,r=void 0);{var i,o=n.fn,a=n.data,s=n.inverse;n.data.view}i=r?t(this,r,n):Ember.CollectionView;var u,c,l=n.hash,h={},m=i.proto();if(l.itemView){var f=a.keywords.controller,p=f.container;c=p.resolve("view:"+l.itemView)}else c=l.itemViewClass?t(m,l.itemViewClass,n):m.itemViewClass;delete l.itemViewClass,delete l.itemView;for(var d in l)l.hasOwnProperty(d)&&(u=d.match(/^item(.)(.*)$/),u&&"itemController"!==d&&(h[u[1].toLowerCase()+u[2]]=l[d],delete l[d]));o&&(h.template=o,delete n.fn);var b;s&&s!==Ember.Handlebars.VM.noop?(b=e(m,"emptyViewClass"),b=b.extend({template:s,tagName:h.tagName})):l.emptyViewClass&&(b=t(this,l.emptyViewClass,n)),b&&(l.emptyView=b),l.keyword||(h._context=Ember.computed.alias("content"));var v=Ember.Handlebars.ViewHelper.propertiesFromHTMLOptions({data:a,hash:h},this);return l.itemViewClass=c.extend(v),Ember.Handlebars.helpers.view.call(this,i,n)})}(),function(){var e=Ember.Handlebars.get;Ember.Handlebars.registerHelper("unbound",function(t,r){var n,i,o,a=arguments[arguments.length-1];return arguments.length>2?(a.data.isUnbound=!0,n=Ember.Handlebars.helpers[arguments[0]]||Ember.Handlebars.helperMissing,o=n.apply(this,Array.prototype.slice.call(arguments,1)),delete a.data.isUnbound,o):(i=r.contexts&&r.contexts.length?r.contexts[0]:this,e(i,t,r))})}(),function(){var e=(Ember.get,Ember.Handlebars.get),t=Ember.Handlebars.normalizePath;Ember.Handlebars.registerHelper("log",function(r,n){var i=n.contexts&&n.contexts.length?n.contexts[0]:this,o=t(i,r,n.data),a=o.root,s=o.path,u="this"===s?a:e(a,s,n);Ember.Logger.log(u)}),Ember.Handlebars.registerHelper("debugger",function(){{var e=this;Ember.inspect(e)}})}(),function(){var e=Ember.get,t=Ember.set;Ember.Handlebars.EachView=Ember.CollectionView.extend(Ember._Metamorph,{init:function(){var r,n=e(this,"itemController");if(n){var i=e(this,"controller.container").lookupFactory("controller:array").create({parentController:e(this,"controller"),itemController:n,target:e(this,"controller"),_eachView:this});this.disableContentObservers(function(){t(this,"content",i),r=new Ember.Binding("content","_eachView.dataSource").oneWay(),r.connect(i)}),t(this,"_arrayController",i)}else this.disableContentObservers(function(){r=new Ember.Binding("content","dataSource").oneWay(),r.connect(this)});return this._super()},_assertArrayLike:function(){},disableContentObservers:function(e){Ember.removeBeforeObserver(this,"content",null,"_contentWillChange"),Ember.removeObserver(this,"content",null,"_contentDidChange"),e.call(this),Ember.addBeforeObserver(this,"content",null,"_contentWillChange"),Ember.addObserver(this,"content",null,"_contentDidChange")},itemViewClass:Ember._MetamorphView,emptyViewClass:Ember._MetamorphView,createChildView:function(r,n){r=this._super(r,n);var i=e(this,"keyword"),o=e(r,"content");if(i){var a=e(r,"templateData");a=Ember.copy(a),a.keywords=r.cloneKeywords(),t(r,"templateData",a),a.keywords[i]=o}return o&&e(o,"isController")&&t(r,"controller",o),r},destroy:function(){if(this._super()){var t=e(this,"_arrayController");return t&&t.destroy(),this}}});var r=Ember.Handlebars.GroupedEach=function(e,t,r){var n=this,i=Ember.Handlebars.normalizePath(e,t,r.data);this.context=e,this.path=t,this.options=r,this.template=r.fn,this.containingView=r.data.view,this.normalizedRoot=i.root,this.normalizedPath=i.path,this.content=this.lookupContent(),this.addContentObservers(),this.addArrayObservers(),this.containingView.on("willClearRender",function(){n.destroy()})};r.prototype={contentWillChange:function(){this.removeArrayObservers()},contentDidChange:function(){this.content=this.lookupContent(),this.addArrayObservers(),this.rerenderContainingView()},contentArrayWillChange:Ember.K,contentArrayDidChange:function(){this.rerenderContainingView()},lookupContent:function(){return Ember.Handlebars.get(this.normalizedRoot,this.normalizedPath,this.options)},addArrayObservers:function(){this.content&&this.content.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},removeArrayObservers:function(){this.content&&this.content.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},addContentObservers:function(){Ember.addBeforeObserver(this.normalizedRoot,this.normalizedPath,this,this.contentWillChange),Ember.addObserver(this.normalizedRoot,this.normalizedPath,this,this.contentDidChange)},removeContentObservers:function(){Ember.removeBeforeObserver(this.normalizedRoot,this.normalizedPath,this.contentWillChange),Ember.removeObserver(this.normalizedRoot,this.normalizedPath,this.contentDidChange)},render:function(){if(this.content){var t=this.content,r=e(t,"length"),n=this.options.data,i=this.template;n.insideEach=!0;for(var o=0;r>o;o++)i(t.objectAt(o),{data:n})}},rerenderContainingView:function(){var e=this;Ember.run.scheduleOnce("render",this,function(){e.destroyed||e.containingView.rerender()})},destroy:function(){this.removeContentObservers(),this.content&&this.removeArrayObservers(),this.destroyed=!0}},Ember.Handlebars.registerHelper("each",function(e,t){if(4===arguments.length){var r=arguments[0];t=arguments[3],e=arguments[2],""===e&&(e="this"),t.hash.keyword=r}return 1===arguments.length&&(t=e,e="this"),t.hash.dataSourceBinding=e,!t.data.insideGroup||t.hash.groupedRows||t.hash.itemViewClass?Ember.Handlebars.helpers.collection.call(this,"Ember.Handlebars.EachView",t):(new Ember.Handlebars.GroupedEach(this,e,t).render(),void 0)})}(),function(){Ember.Handlebars.registerHelper("template",function(){return Ember.Handlebars.helpers.partial.apply(this,arguments)})}(),function(){function e(e){return!Ember.isNone(e)}function t(e,t,r){var n=t.split("/"),i=n[n.length-1];n[n.length-1]="_"+i;var o=r.data.view,a=n.join("/"),s=o.templateForName(a),u=!s&&o.templateForName(t);s=s||u,s(e,{data:r.data})}Ember.Handlebars.registerHelper("partial",function(r,n){var i=n.contexts&&n.contexts.length?n.contexts[0]:this;return"ID"===n.types[0]?(n.fn=function(e,n){var i=Ember.Handlebars.get(e,r,n);t(e,i,n)},Ember.Handlebars.bind.call(i,r,n,!0,e)):(t(i,r,n),void 0)})}(),function(){{var e=Ember.get;Ember.set}Ember.Handlebars.registerHelper("yield",function(t){for(var r=t.data.view;r&&!e(r,"layout");)r=r._contextView?r._contextView:e(r,"parentView");r._yield(this,t)})}(),function(){Ember.Handlebars.registerHelper("loc",function(e){return Ember.String.loc(e)})}(),function(){{var e=Ember.set;Ember.get}Ember.Checkbox=Ember.View.extend({classNames:["ember-checkbox"],tagName:"input",attributeBindings:["type","checked","indeterminate","disabled","tabindex","name"],type:"checkbox",checked:!1,disabled:!1,indeterminate:!1,init:function(){this._super(),this.on("change",this,this._updateElementValue)},didInsertElement:function(){this._super(),this.get("element").indeterminate=!!this.get("indeterminate")},_updateElementValue:function(){e(this,"checked",this.$().prop("checked"))}})}(),function(){function e(e,r,n){var i=t(r,e),o=t(r,"onEvent"),a=t(r,"value");(o===e||"keyPress"===o&&"key-press"===e)&&r.sendAction("action",a),r.sendAction(e,a),(i||o===e)&&(t(r,"bubbles")||n.stopPropagation())}var t=Ember.get,r=Ember.set;Ember.TextSupport=Ember.Mixin.create({value:"",attributeBindings:["placeholder","disabled","maxlength","tabindex","readonly"],placeholder:null,disabled:!1,maxlength:null,init:function(){this._super(),this.on("focusOut",this,this._elementValueDidChange),this.on("change",this,this._elementValueDidChange),this.on("paste",this,this._elementValueDidChange),this.on("cut",this,this._elementValueDidChange),this.on("input",this,this._elementValueDidChange),this.on("keyUp",this,this.interpretKeyEvents)},action:null,onEvent:"enter",bubbles:!1,interpretKeyEvents:function(e){var t=Ember.TextSupport.KEY_EVENTS,r=t[e.keyCode];return this._elementValueDidChange(),r?this[r](e):void 0},_elementValueDidChange:function(){r(this,"value",this.$().val())},insertNewline:function(t){e("enter",this,t),e("insert-newline",this,t)},cancel:function(t){e("escape-press",this,t)},focusIn:function(t){e("focus-in",this,t)},focusOut:function(t){e("focus-out",this,t)},keyPress:function(t){e("key-press",this,t)}}),Ember.TextSupport.KEY_EVENTS={13:"insertNewline",27:"cancel"}}(),function(){Ember.get,Ember.set;Ember.TextField=Ember.Component.extend(Ember.TextSupport,{classNames:["ember-text-field"],tagName:"input",attributeBindings:["type","value","size","pattern","name"],value:"",type:"text",size:null,pattern:null})}(),function(){var e=Ember.get,t=Ember.set;Ember.Button=Ember.View.extend(Ember.TargetActionSupport,{classNames:["ember-button"],classNameBindings:["isActive"],tagName:"button",propagateEvents:!1,attributeBindings:["type","disabled","href","tabindex"],targetObject:Ember.computed(function(){var t=e(this,"target"),r=e(this,"context"),n=e(this,"templateData");return"string"!=typeof t?t:Ember.Handlebars.get(r,t,{data:n})}).property("target"),type:Ember.computed(function(){var e=this.tagName;return"input"===e||"button"===e?"button":void 0}),disabled:!1,href:Ember.computed(function(){return"a"===this.tagName?"#":null}),mouseDown:function(){return e(this,"disabled")||(t(this,"isActive",!0),this._mouseDown=!0,this._mouseEntered=!0),e(this,"propagateEvents")},mouseLeave:function(){this._mouseDown&&(t(this,"isActive",!1),this._mouseEntered=!1)},mouseEnter:function(){this._mouseDown&&(t(this,"isActive",!0),this._mouseEntered=!0)},mouseUp:function(){return e(this,"isActive")&&(this.triggerAction(),t(this,"isActive",!1)),this._mouseDown=!1,this._mouseEntered=!1,e(this,"propagateEvents")},keyDown:function(e){(13===e.keyCode||32===e.keyCode)&&this.mouseDown()},keyUp:function(e){(13===e.keyCode||32===e.keyCode)&&this.mouseUp()},touchStart:function(e){return this.mouseDown(e)},touchEnd:function(e){return this.mouseUp(e)},init:function(){this._super()}})}(),function(){{var e=Ember.get;Ember.set}Ember.TextArea=Ember.Component.extend(Ember.TextSupport,{classNames:["ember-text-area"],tagName:"textarea",attributeBindings:["rows","cols","name"],rows:null,cols:null,_updateElementValue:Ember.observer("value",function(){var t=e(this,"value"),r=this.$();r&&t!==r.val()&&r.val(t)}),init:function(){this._super(),this.on("didInsertElement",this,this._updateElementValue)}})}(),function(){{var e=Ember.set,t=Ember.get,r=Ember.EnumerableUtils.indexOf,n=Ember.EnumerableUtils.indexesOf,i=Ember.EnumerableUtils.forEach,o=Ember.EnumerableUtils.replace,a=Ember.isArray;Ember.Handlebars.compile}Ember.SelectOption=Ember.View.extend({tagName:"option",attributeBindings:["value","selected"],defaultTemplate:function(e,t){t={data:t.data,hash:{}},Ember.Handlebars.helpers.bind.call(e,"view.label",t)},init:function(){this.labelPathDidChange(),this.valuePathDidChange(),this._super()},selected:Ember.computed(function(){var e=t(this,"content"),n=t(this,"parentView.selection");return t(this,"parentView.multiple")?n&&r(n,e.valueOf())>-1:e==n}).property("content","parentView.selection"),labelPathDidChange:Ember.observer("parentView.optionLabelPath",function(){var e=t(this,"parentView.optionLabelPath");
22
- e&&Ember.defineProperty(this,"label",Ember.computed(function(){return t(this,e)}).property(e))}),valuePathDidChange:Ember.observer("parentView.optionValuePath",function(){var e=t(this,"parentView.optionValuePath");e&&Ember.defineProperty(this,"value",Ember.computed(function(){return t(this,e)}).property(e))})}),Ember.SelectOptgroup=Ember.CollectionView.extend({tagName:"optgroup",attributeBindings:["label"],selectionBinding:"parentView.selection",multipleBinding:"parentView.multiple",optionLabelPathBinding:"parentView.optionLabelPath",optionValuePathBinding:"parentView.optionValuePath",itemViewClassBinding:"parentView.optionView"}),Ember.Select=Ember.View.extend({tagName:"select",classNames:["ember-select"],defaultTemplate:Ember.Handlebars.template(function(e,t,r,n,i){function o(e,t){var n,i,o="";return t.buffer.push('<option value="">'),n={},i={},t.buffer.push(p(r._triageMustache.call(e,"view.prompt",{hash:{},contexts:[e],types:["ID"],hashContexts:i,hashTypes:n,data:t}))),t.buffer.push("</option>"),o}function a(e,t){var n,i,o;i={},o={},n=r.each.call(e,"view.groupedContent",{hash:{},inverse:d.noop,fn:d.program(4,s,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:i,data:t}),n||0===n?t.buffer.push(n):t.buffer.push("")}function s(e,t){var n,i;n={content:e,label:e},i={content:"ID",label:"ID"},t.buffer.push(p(r.view.call(e,"view.groupView",{hash:{content:"content",label:"label"},contexts:[e],types:["ID"],hashContexts:n,hashTypes:i,data:t})))}function u(e,t){var n,i,o;i={},o={},n=r.each.call(e,"view.content",{hash:{},inverse:d.noop,fn:d.program(7,c,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:i,data:t}),n||0===n?t.buffer.push(n):t.buffer.push("")}function c(e,t){var n,i;n={content:e},i={content:"ID"},t.buffer.push(p(r.view.call(e,"view.optionView",{hash:{content:""},contexts:[e],types:["ID"],hashContexts:n,hashTypes:i,data:t})))}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),i=i||{};var l,h,m,f="",p=this.escapeExpression,d=this;return h={},m={},l=r["if"].call(t,"view.prompt",{hash:{},inverse:d.noop,fn:d.program(1,o,i),contexts:[t],types:["ID"],hashContexts:m,hashTypes:h,data:i}),(l||0===l)&&i.buffer.push(l),h={},m={},l=r["if"].call(t,"view.optionGroupPath",{hash:{},inverse:d.program(6,u,i),fn:d.program(3,a,i),contexts:[t],types:["ID"],hashContexts:m,hashTypes:h,data:i}),(l||0===l)&&i.buffer.push(l),f}),attributeBindings:["multiple","disabled","tabindex","name"],multiple:!1,disabled:!1,content:null,selection:null,value:Ember.computed(function(e,r){if(2===arguments.length)return r;var n=t(this,"optionValuePath").replace(/^content\.?/,"");return n?t(this,"selection."+n):t(this,"selection")}).property("selection"),prompt:null,optionLabelPath:"content",optionValuePath:"content",optionGroupPath:null,groupView:Ember.SelectOptgroup,groupedContent:Ember.computed(function(){var e=t(this,"optionGroupPath"),r=Ember.A(),n=t(this,"content")||[];return i(n,function(n){var i=t(n,e);t(r,"lastObject.label")!==i&&r.pushObject({label:i,content:Ember.A()}),t(r,"lastObject.content").push(n)}),r}).property("optionGroupPath","content.@each"),optionView:Ember.SelectOption,_change:function(){t(this,"multiple")?this._changeMultiple():this._changeSingle()},selectionDidChange:Ember.observer("selection.@each",function(){var r=t(this,"selection");if(t(this,"multiple")){if(!a(r))return e(this,"selection",Ember.A([r])),void 0;this._selectionDidChangeMultiple()}else this._selectionDidChangeSingle()}),valueDidChange:Ember.observer("value",function(){var e,r=t(this,"content"),n=t(this,"value"),i=t(this,"optionValuePath").replace(/^content\.?/,""),o=i?t(this,"selection."+i):t(this,"selection");n!==o&&(e=r?r.find(function(e){return n===(i?t(e,i):e)}):null,this.set("selection",e))}),_triggerChange:function(){var e=t(this,"selection"),r=t(this,"value");Ember.isNone(e)||this.selectionDidChange(),Ember.isNone(r)||this.valueDidChange(),this._change()},_changeSingle:function(){var r=this.$()[0].selectedIndex,n=t(this,"content"),i=t(this,"prompt");if(n&&t(n,"length")){if(i&&0===r)return e(this,"selection",null),void 0;i&&(r-=1),e(this,"selection",n.objectAt(r))}},_changeMultiple:function(){var r=this.$("option:selected"),n=t(this,"prompt"),i=n?1:0,s=t(this,"content"),u=t(this,"selection");if(s&&r){var c=r.map(function(){return this.index-i}).toArray(),l=s.objectsAt(c);a(u)?o(u,0,t(u,"length"),l):e(this,"selection",l)}},_selectionDidChangeSingle:function(){var e=this.get("element");if(e){var n=t(this,"content"),i=t(this,"selection"),o=n?r(n,i):-1,a=t(this,"prompt");a&&(o+=1),e&&(e.selectedIndex=o)}},_selectionDidChangeMultiple:function(){var e,i=t(this,"content"),o=t(this,"selection"),a=i?n(i,o):[-1],s=t(this,"prompt"),u=s?1:0,c=this.$("option");c&&c.each(function(){e=this.index>-1?this.index-u:-1,this.selected=r(a,e)>-1})},init:function(){this._super(),this.on("didInsertElement",this,this._triggerChange),this.on("change",this,this._change)}})}(),function(){Ember.Handlebars.registerHelper("input",function(e){var t=e.hash,r=(e.hashTypes,t.type),n=t.on;return delete t.type,delete t.on,"checkbox"===r?Ember.Handlebars.helpers.view.call(this,Ember.Checkbox,e):(r&&(t.type=r),t.onEvent=n||"enter",Ember.Handlebars.helpers.view.call(this,Ember.TextField,e))}),Ember.Handlebars.registerHelper("textarea",function(e){e.hash,e.hashTypes;return Ember.Handlebars.helpers.view.call(this,Ember.TextArea,e)})}(),function(){Ember.ComponentLookup=Ember.Object.extend({lookupFactory:function(e,t){t=t||this.container;var r="component:"+e,n="template:components/"+e,i=t&&t.has(n);i&&t.injection(r,"layout",n);var o=t.lookupFactory(r);return i||o?(o||(t.register(r,Ember.Component),o=t.lookupFactory(r)),o):void 0}})}(),function(){function e(){Ember.Handlebars.bootstrap(Ember.$(document))}function t(e){e.register("component-lookup:main",Ember.ComponentLookup)}Ember.Handlebars.bootstrap=function(e){var t='script[type="text/x-handlebars"], script[type="text/x-raw-handlebars"]';Ember.$(t,e).each(function(){var e=Ember.$(this),t="text/x-raw-handlebars"===e.attr("type")?Ember.$.proxy(Handlebars.compile,Handlebars):Ember.$.proxy(Ember.Handlebars.compile,Ember.Handlebars),r=e.attr("data-template-name")||e.attr("id")||"application",n=t(e.html());if(void 0!==Ember.TEMPLATES[r])throw new Ember.Error('Template named "'+r+'" already exists.');Ember.TEMPLATES[r]=n,e.remove()})},Ember.onLoad("Ember.Application",function(r){r.initializer({name:"domTemplates",initialize:e}),r.initializer({name:"registerComponentLookup",after:"domTemplates",initialize:t})})}(),function(){Ember.runLoadHooks("Ember.Handlebars",Ember.Handlebars)}(),function(){e("route-recognizer",[],function(){"use strict";function e(e){this.string=e}function t(e){this.name=e}function r(e){this.name=e}function n(){}function i(i,o,a){"/"===i.charAt(0)&&(i=i.substr(1));for(var s=i.split("/"),u=[],c=0,l=s.length;l>c;c++){var h,m=s[c];(h=m.match(/^:([^\/]+)$/))?(u.push(new t(h[1])),o.push(h[1]),a.dynamics++):(h=m.match(/^\*([^\/]+)$/))?(u.push(new r(h[1])),o.push(h[1]),a.stars++):""===m?u.push(new n):(u.push(new e(m)),a.statics++)}return u}function o(e){this.charSpec=e,this.nextStates=[]}function a(e){return e.sort(function(e,t){return e.types.stars!==t.types.stars?e.types.stars-t.types.stars:e.types.dynamics!==t.types.dynamics?e.types.dynamics-t.types.dynamics:e.types.statics!==t.types.statics?t.types.statics-e.types.statics:0})}function s(e,t){for(var r=[],n=0,i=e.length;i>n;n++){var o=e[n];r=r.concat(o.match(t))}return r}function u(e,t,r){for(var n=e.handlers,i=e.regex,o=t.match(i),a=1,s=[],u=0,c=n.length;c>u;u++){var l,h,m=n[u],f=m.names,p={},d=m.queryParams||[],b={};for(l=0,h=f.length;h>l;l++)p[f[l]]=o[a++];for(l=0,h=d.length;h>l;l++){var v=d[l];r[v]&&(b[v]=r[v])}var E={handler:m.handler,params:p,isDynamic:!!f.length};d&&d.length>0&&(E.queryParams=b),s.push(E)}return s}function c(e,t){return t.eachChar(function(t){e=e.put(t)}),e}function l(e,t,r){this.path=e,this.matcher=t,this.delegate=r}function h(e){this.routes={},this.children={},this.queryParams={},this.target=e}function m(e,t,r){return function(n,i){var o=e+n;return i?(i(m(o,t,r)),void 0):new l(e+n,t,r)}}function f(e,t,r,n){for(var i=0,o=0,a=e.length;a>o;o++)i+=e[o].path.length;t=t.substr(i);var s={path:t,handler:r};n&&(s.queryParams=n),e.push(s)}function p(e,t,r,n){var i=t.routes,o=t.queryParams;for(var a in i)if(i.hasOwnProperty(a)){var s=e.slice();f(s,a,i[a],o[a]),t.children[a]?p(s,t.children[a],r,n):r.call(n,s)}}var d=["/",".","*","+","?","|","(",")","[","]","{","}","\\"],b=new RegExp("(\\"+d.join("|\\")+")","g");e.prototype={eachChar:function(e){for(var t,r=this.string,n=0,i=r.length;i>n;n++)t=r.charAt(n),e({validChars:t})},regex:function(){return this.string.replace(b,"\\$1")},generate:function(){return this.string}},t.prototype={eachChar:function(e){e({invalidChars:"/",repeat:!0})},regex:function(){return"([^/]+)"},generate:function(e){return e[this.name]}},r.prototype={eachChar:function(e){e({invalidChars:"",repeat:!0})},regex:function(){return"(.+)"},generate:function(e){return e[this.name]}},n.prototype={eachChar:function(){},regex:function(){return""},generate:function(){return""}},o.prototype={get:function(e){for(var t=this.nextStates,r=0,n=t.length;n>r;r++){var i=t[r],o=i.charSpec.validChars===e.validChars;if(o=o&&i.charSpec.invalidChars===e.invalidChars)return i}},put:function(e){var t;return(t=this.get(e))?t:(t=new o(e),this.nextStates.push(t),e.repeat&&t.nextStates.push(t),t)},match:function(e){for(var t,r,n,i=this.nextStates,o=[],a=0,s=i.length;s>a;a++)t=i[a],r=t.charSpec,"undefined"!=typeof(n=r.validChars)?-1!==n.indexOf(e)&&o.push(t):"undefined"!=typeof(n=r.invalidChars)&&-1===n.indexOf(e)&&o.push(t);return o}};var v=function(){this.rootState=new o,this.names={}};return v.prototype={add:function(e,t){for(var r,o=this.rootState,a="^",s={statics:0,dynamics:0,stars:0},u=[],l=[],h=!0,m=0,f=e.length;f>m;m++){var p=e[m],d=[],b=i(p.path,d,s);l=l.concat(b);for(var v=0,E=b.length;E>v;v++){var g=b[v];g instanceof n||(h=!1,o=o.put({validChars:"/"}),a+="/",o=c(o,g),a+=g.regex())}var y={handler:p.handler,names:d};p.queryParams&&(y.queryParams=p.queryParams),u.push(y)}h&&(o=o.put({validChars:"/"}),a+="/"),o.handlers=u,o.regex=new RegExp(a+"$"),o.types=s,(r=t&&t.as)&&(this.names[r]={segments:l,handlers:u})},handlersFor:function(e){var t=this.names[e],r=[];if(!t)throw new Error("There is no route named "+e);for(var n=0,i=t.handlers.length;i>n;n++)r.push(t.handlers[n]);return r},hasRoute:function(e){return!!this.names[e]},generate:function(e,t){var r=this.names[e],i="";if(!r)throw new Error("There is no route named "+e);for(var o=r.segments,a=0,s=o.length;s>a;a++){var u=o[a];u instanceof n||(i+="/",i+=u.generate(t))}return"/"!==i.charAt(0)&&(i="/"+i),t&&t.queryParams&&(i+=this.generateQueryString(t.queryParams,r.handlers)),i},generateQueryString:function(e,t){for(var r=[],n=[],i=0;i<t.length;i++){var o=t[i].queryParams;o&&n.push.apply(n,o)}for(var a in e)if(e.hasOwnProperty(a)){if(-1===n.indexOf(a))throw'Query param "'+a+'" is not specified as a valid param for this route';var s=e[a],u=encodeURIComponent(a);s!==!0&&(u+="="+encodeURIComponent(s)),r.push(u)}return 0===r.length?"":"?"+r.join("&")},parseQueryString:function(e){for(var t=e.split("&"),r={},n=0;n<t.length;n++){var i=t[n].split("="),o=decodeURIComponent(i[0]),a=i[1]?decodeURIComponent(i[1]):!0;r[o]=a}return r},recognize:function(e){var t,r,n,i,o=[this.rootState],c={};if(i=e.indexOf("?"),-1!==i){var l=e.substr(i+1,e.length);e=e.substr(0,i),c=this.parseQueryString(l)}for("/"!==e.charAt(0)&&(e="/"+e),t=e.length,t>1&&"/"===e.charAt(t-1)&&(e=e.substr(0,t-1)),r=0,n=e.length;n>r&&(o=s(o,e.charAt(r)),o.length);r++);var h=[];for(r=0,n=o.length;n>r;r++)o[r].handlers&&h.push(o[r]);o=a(h);var m=h[0];return m&&m.handlers?u(m,e,c):void 0}},l.prototype={to:function(e,t){var r=this.delegate;if(r&&r.willAddRoute&&(e=r.willAddRoute(this.matcher.target,e)),this.matcher.add(this.path,e),t){if(0===t.length)throw new Error("You must have an argument in the function passed to `to`");this.matcher.addChild(this.path,e,t,this.delegate)}return this},withQueryParams:function(){if(0===arguments.length)throw new Error("you must provide arguments to the withQueryParams method");for(var e=0;e<arguments.length;e++)if("string"!=typeof arguments[e])throw new Error('you should call withQueryParams with a list of strings, e.g. withQueryParams("foo", "bar")');var t=[].slice.call(arguments);this.matcher.addQueryParams(this.path,t)}},h.prototype={add:function(e,t){this.routes[e]=t},addQueryParams:function(e,t){this.queryParams[e]=t},addChild:function(e,t,r,n){var i=new h(t);this.children[e]=i;var o=m(e,i,n);n&&n.contextEntered&&n.contextEntered(t,o),r(o)}},v.prototype.map=function(e,t){var r=new h;e(m("",r,this.delegate)),p([],r,function(e){t?t(this,e):this.add(e)},this)},v})}(),function(){e("router",["route-recognizer","rsvp","exports"],function(e,t,r){"use strict";function n(e,t){this.router=e,this.promise=t,this.data={},this.resolvedModels={},this.providedModels={},this.providedModelsArray=[],this.sequence=++n.currentSequence,this.params={}}function i(){this.recognizer=new k}function o(e,t){return new n(e,H.reject(t))}function a(e,t,r,n){var i,o,a=t.length,u={},c=e.currentHandlerInfos||[],l={},m=e.currentParams||{},f=e.activeTransition,p={};for(r=L.call(r),h(l,n),i=t.length-1;i>=0;i--){var d=t[i],b=d.handler,v=c[i],E=!1;if(v&&v.name===d.handler||(E=!0),d.isDynamic)if(o=s(r,b,f,!0,l))E=!0,u[b]=o;else{p[b]={};for(var g in d.params)if(d.params.hasOwnProperty(g)){var w=d.params[g];m[g]!==w&&(E=!0),p[b][g]=l[g]=w}}else if(d.hasOwnProperty("names"))if(r.length&&(E=!0),o=s(r,b,f,d.names[0],l))u[b]=o;else{var _=d.names;p[b]={};for(var C=0,O=_.length;O>C;++C){var A=_[C];p[b][A]=l[A]=l[A]||m[A]}}v&&!y(v.queryParams,d.queryParams)&&(E=!0),E&&(a=i)}if(r.length>0)throw new Error("More context objects were passed than there are dynamic segments for the route: "+t[t.length-1].handler);var P=c[a-1],x=P&&P.handler;return{matchPoint:a,providedModels:u,params:l,handlerParams:p,pivotHandler:x}}function s(e,t,r,n,i){if(e.length&&n){var o=e.pop();if(!u(o))return o;i[n]=o.toString()}else if(r)return r.resolvedModels[t]||n&&r.providedModels[t]}function u(e){return"string"==typeof e||e instanceof String||"number"==typeof e||e instanceof Number}function c(e,t){for(var r=e.recognizer.handlersFor(t),n=[],i=0;i<r.length;i++)n.push.apply(n,r[i].queryParams||[]);return n}function l(e,t,r,n){var i,o,s,u,c,l=e.recognizer.handlersFor(t),p={},d=f(e,l,n),b=a(e,d,r).matchPoint;for(p.queryParams={},c=0;c<l.length;c++)o=l[c],s=e.getHandler(o.handler),u=o.names,u.length&&(i=c>=b?r.shift():s.context,h(p,j(s,i,u))),n!==!1&&(m(p.queryParams,e.currentQueryParams,o.queryParams),m(p.queryParams,n,o.queryParams));return y(p.queryParams,{})&&delete p.queryParams,p}function h(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}function m(e,t,r){if(t&&r)for(var n=0;n<r.length;n++){var i,o=r[n];t.hasOwnProperty(o)&&(i=t[o],null===i||i===!1||"undefined"==typeof i?delete e[o]:e[o]=t[o])}}function f(e,t,r){for(var n=[],i=0;i<t.length;i++){var o=t[i],a={handler:o.handler,names:o.names,context:o.context,isDynamic:o.isDynamic},s={};r!==!1&&(m(s,e.currentQueryParams,o.queryParams),m(s,r,o.queryParams)),o.queryParams&&o.queryParams.length>0&&(a.queryParams=s),n.push(a)}return n}function p(e,t,r){var n=e.currentHandlerInfos,i=n[n.length-1],o=i.name;return I(e,"Attempting query param transition"),d(e,[o,t],r)}function d(e,t,r){var n=A(t),i=n[0],o=n[1],a=e.recognizer.handlersFor(i[0]),s=f(e,a,o);return I(e,"Attempting transition to "+i[0]),x(e,s,L.call(i,1),e.currentParams,o,null,r)}function b(e,t,r){var n,a,s=e.recognizer.recognize(t),u=(e.currentHandlerInfos,{});if(I(e,"Attempting URL transition to "+t),s)for(n=0,a=s.length;a>n;++n)if(e.getHandler(s[n].handler).inaccessibleByURL){s=null;break}if(!s)return o(e,new i.UnrecognizedURLError(t));for(n=0,a=s.length;a>n;n++)h(u,s[n].queryParams);return x(e,s,[],{},u,null,r)}function v(e,t){var r=e.router,n=w(r.currentHandlerInfos||[],t);r.targetHandlerInfos=t,g(n.exited,function(e){var t=e.handler;delete t.context,t.exit&&t.exit()});var i=n.unchanged.slice();r.currentHandlerInfos=i,g(n.updatedContext,function(t){E(e,i,t,!1)}),g(n.entered,function(t){E(e,i,t,!0)})}function E(e,t,r,n){var o=r.handler,a=r.context;try{n&&o.enter&&o.enter(),D(e),C(o,a),O(o,r.queryParams),o.setup&&o.setup(a,r.queryParams),D(e)}catch(s){throw s instanceof i.TransitionAborted||e.trigger(!0,"error",s,e,o),s}t.push(r)}function g(e,t){for(var r=0,n=e.length;n>r;r++)t(e[r])}function y(e,t){e=e||{},t=t||{};var r,n=[];for(r in e)if(e.hasOwnProperty(r)){if(t[r]!==e[r])return!1;n.push(r)}for(r in t)if(t.hasOwnProperty(r)&&!~n.indexOf(r))return!1;return!0}function w(e,t){var r,n,i,o,a,s={updatedContext:[],exited:[],entered:[],unchanged:[]};for(o=0,a=t.length;a>o;o++){var u=e[o],c=t[o];u&&u.handler===c.handler?y(u.queryParams,c.queryParams)||(i=!0):r=!0,r?(s.entered.push(c),u&&s.exited.unshift(u)):n||u.context!==c.context||i?(n=!0,s.updatedContext.push(c)):s.unchanged.push(u)}for(o=t.length,a=e.length;a>o;o++)s.exited.unshift(e[o]);return s}function _(e,t,r,n){if(e.triggerEvent)return e.triggerEvent(t,r,n),void 0;var i=n.shift();if(!t){if(r)return;throw new Error("Could not trigger event '"+i+"'. There are no active handlers")}for(var o=!1,a=t.length-1;a>=0;a--){var s=t[a],u=s.handler;if(u.events&&u.events[i]){if(u.events[i].apply(u,n)!==!0)return;o=!0}}if(!o&&!r)throw new Error("Nothing handled the event '"+i+"'.")}function C(e,t){e.context=t,e.contextDidChange&&e.contextDidChange()}function O(e,t){e.queryParams=t,e.queryParamsDidChange&&e.queryParamsDidChange()}function A(e){var t,r,n=e&&e.length;return n&&n>0&&e[n-1]&&e[n-1].hasOwnProperty("queryParams")?(r=e[n-1].queryParams,t=L.call(e,0,n-1),[t,r]):[e,null]}function P(e,t,r){for(var n=V(e,t),i=0;i<n.length;++i){var o=n[i];o.context=r.providedModels[o.name]}var a={router:e,isAborted:!1};v(a,n)}function x(e,t,r,i,o,s,u){function c(){D(b);try{S(b,v),_(e,e.currentHandlerInfos,!0,["didTransition"]),e.didTransition&&e.didTransition(v),I(e,b.sequence,"TRANSITION COMPLETE."),b.isActive=!1,d.resolve(v[v.length-1].handler)}catch(t){d.reject(t)}b.isAborted||(e.activeTransition=null)}function l(e){d.reject(e)}var h=a(e,t,r,i,o),m=t[t.length-1].handler,f=!1,p=e.currentHandlerInfos;if(u)return P(e,t,h);if(e.activeTransition){if(T(e.activeTransition,m,r,o))return e.activeTransition;e.activeTransition.abort(),f=!0}var d=H.defer(),b=new n(e,d.promise);b.targetName=m,b.providedModels=h.providedModels,b.providedModelsArray=r,b.params=h.params,b.data=s||{},b.queryParams=o,b.pivotHandler=h.pivotHandler,e.activeTransition=b;var v=V(e,t);return b.handlerInfos=v,f||_(e,p,!0,["willTransition",b]),I(e,b.sequence,"Beginning validation for transition to "+b.targetName),N(b,h.matchPoint,h.handlerParams).then(c,l),b}function V(e,t){for(var r=[],n=0,i=t.length;i>n;++n){var o=t[n],a=o.isDynamic||o.names&&o.names.length,s={isDynamic:!!a,name:o.handler,handler:e.getHandler(o.handler)};o.queryParams&&(s.queryParams=o.queryParams),r.push(s)}return r}function T(e,t,r,n){if(e.targetName!==t)return!1;var i=e.providedModelsArray;if(i.length!==r.length)return!1;for(var o=0,a=i.length;a>o;++o)if(i[o]!==r[o])return!1;return y(e.queryParams,n)?!0:!1}function S(e,t){I(e.router,e.sequence,"Validation succeeded, finalizing transition;");var r,n=e.router,i=(e.sequence,t[t.length-1].name),o=e.urlMethod,a=[],s=e.providedModelsArray.slice();for(r=t.length-1;r>=0;--r){var c=t[r];if(c.isDynamic){var m=s.pop();a.unshift(u(m)?m.toString():c.context)}c.handler.inaccessibleByURL&&(o=null)}var f={};for(r=t.length-1;r>=0;--r)h(f,t[r].queryParams);n.currentQueryParams=f;var p=l(n,i,a,e.queryParams);if(n.currentParams=p,o){var d=n.recognizer.generate(i,p);"replace"===o?n.replaceURL(d):n.updateURL(d)}v(e,t)}function N(e,t,r){function o(t){return e.isAborted?(I(e.router,e.sequence,"detected abort."),H.reject(new i.TransitionAborted)):t}function a(t){return t instanceof i.TransitionAborted||e.isAborted?H.reject(t):(e.abort(),I(f,v,b+": handling error: "+t),e.trigger(!0,"error",t,e,p.handler),H.reject(t))}function s(){I(f,v,b+": calling beforeModel hook");var t;t=p.queryParams?[p.queryParams,e]:[e];var r=d.beforeModel&&d.beforeModel.apply(d,t);return r instanceof n?null:r}function u(){I(f,v,b+": resolving model");var i=R(p,e,r[b],m>=t);return i instanceof n?null:i}function c(t){I(f,v,b+": calling afterModel hook"),e.resolvedModels[p.name]=t;var r;r=p.queryParams?[t,p.queryParams,e]:[t,e];var i=d.afterModel&&d.afterModel.apply(d,r);return i instanceof n?null:i}function l(){return I(f,v,b+": validation succeeded, proceeding"),p.context=e.resolvedModels[p.name],e.resolveIndex++,N(e,t,r)}var h=e.handlerInfos,m=e.resolveIndex;if(m===h.length)return H.resolve(e.resolvedModels);var f=e.router,p=h[m],d=p.handler,b=p.name,v=e.sequence;return t>m?(I(f,v,b+": using context from already-active handler"),e.resolvedModels[p.name]=e.providedModels[p.name]||p.handler.context,l()):(e.trigger(!0,"willResolveModel",e,d),H.resolve().then(o).then(s).then(o).then(u).then(o).then(c).then(o).then(null,a).then(l))}function D(e){if(e.isAborted)throw I(e.router,e.sequence,"detected abort."),new i.TransitionAborted}function R(e,t,r,n){var i,o=e.handler,a=e.name;if(!n&&o.hasOwnProperty("context"))return o.context;if(t.providedModels.hasOwnProperty(a)){var s=t.providedModels[a];return"function"==typeof s?s():s}return i=e.queryParams?[r||{},e.queryParams,t]:[r||{},t,e.queryParams],o.model&&o.model.apply(o,i)}function I(e,t,r){e.log&&(3===arguments.length?e.log("Transition #"+t+": "+r):(r=t,e.log(r)))}function M(e,t,r){var n=t[0]||"/";return 1===t.length&&t[0].hasOwnProperty("queryParams")?p(e,t[0],r):"/"===n.charAt(0)?b(e,n,r):d(e,L.call(t),r)}function j(e,t,r){var n={};if(u(t))return n[r[0]]=t,n;if(e.serialize)return e.serialize(t,r);if(1===r.length){var i=r[0];return n[i]=/_id$/.test(i)?t.id:t,n}}var k=e,H=t,L=Array.prototype.slice;n.currentSequence=0,n.prototype={targetName:null,urlMethod:"update",providedModels:null,resolvedModels:null,params:null,pivotHandler:null,resolveIndex:0,handlerInfos:null,isActive:!0,promise:null,data:null,then:function(e,t){return this.promise.then(e,t)},abort:function(){return this.isAborted?this:(I(this.router,this.sequence,this.targetName+": transition was aborted"),this.isAborted=!0,this.isActive=!1,this.router.activeTransition=null,this)},retry:function(){this.abort();var e=this.router.recognizer.handlersFor(this.targetName),t=f(this.router,e,this.queryParams),r=x(this.router,t,this.providedModelsArray,this.params,this.queryParams,this.data);return r},method:function(e){return this.urlMethod=e,this},trigger:function(e){var t=L.call(arguments);"boolean"==typeof e?t.shift():e=!1,_(this.router,this.handlerInfos.slice(0,this.resolveIndex+1),e,t)},toString:function(){return"Transition (sequence "+this.sequence+")"}},i.Transition=n,r["default"]=i,i.UnrecognizedURLError=function(e){this.message=e||"UnrecognizedURLError",this.name="UnrecognizedURLError"},i.TransitionAborted=function(e){this.message=e||"TransitionAborted",this.name="TransitionAborted"},i.prototype={map:function(e){this.recognizer.delegate=this.delegate,this.recognizer.map(e,function(e,t){var r=t[t.length-1].handler,n=[t,{as:r}];e.add.apply(e,n)})},hasRoute:function(e){return this.recognizer.hasRoute(e)},reset:function(){g(this.currentHandlerInfos||[],function(e){var t=e.handler;t.exit&&t.exit()}),this.currentHandlerInfos=null,this.targetHandlerInfos=null},activeTransition:null,handleURL:function(e){var t=L.call(arguments);return"/"!==e.charAt(0)&&(t[0]="/"+e),M(this,t).method(null)},updateURL:function(){throw new Error("updateURL is not implemented")},replaceURL:function(e){this.updateURL(e)},transitionTo:function(){return M(this,arguments)},intermediateTransitionTo:function(){M(this,arguments,!0)},replaceWith:function(){return M(this,arguments).method("replace")},paramsForHandler:function(e){var t=A(L.call(arguments,1));return l(this,e,t[0],t[1])},queryParamsForHandler:function(e){return c(this,e)},generate:function(e){var t=A(L.call(arguments,1)),r=t[0],n=t[1],i=l(this,e,r,n),o=c(this,e),a=[];for(var s in n)n.hasOwnProperty(s)&&!~o.indexOf(s)&&a.push(s);if(a.length>0){var u="You supplied the params ";throw u+=a.map(function(e){return'"'+e+"="+n[e]+'"'}).join(" and "),u+=' which are not valid for the "'+e+'" handler or its parents',new Error(u)}return this.recognizer.generate(e,i)},isActive:function(e){var t,r,n=A(L.call(arguments,1)),i=n[0],o=n[1],a={},s={},c=this.targetHandlerInfos,l=!1;if(!c)return!1;for(var f=this.recognizer.handlersFor(c[c.length-1].name),p=c.length-1;p>=0;p--)if(r=c[p],r.name===e&&(l=!0),l){var d=f[p];if(h(a,r.queryParams),o!==!1&&(h(s,r.queryParams),m(s,o,d.queryParams)),r.isDynamic&&i.length>0)if(t=i.pop(),u(t)){var b=d.names[0];if(!this.currentParams||""+t!==this.currentParams[b])return!1}else if(r.context!==t)return!1}return 0===i.length&&l&&y(a,s)},trigger:function(){var e=L.call(arguments);_(this,this.currentHandlerInfos,!1,e)},log:null}})}(),function(){function e(e){this.parent=e,this.matches=[]}function t(e,t,r){r=r||{},"string"!=typeof r.path&&(r.path="/"+t),e.parent&&"application"!==e.parent&&(t=e.parent+"."+t),e.push(r.path,t,null,r.queryParams)}e.prototype={resource:function(r,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n={}),1===arguments.length&&(n={}),"string"!=typeof n.path&&(n.path="/"+r),i){var o=new e(r);t(o,"loading"),t(o,"error",{path:"/_unused_dummy_error_path_route_"+r+"/:error"}),i.call(o),this.push(n.path,r,o.generate(),n.queryParams)}else this.push(n.path,r,null,n.queryParams)},push:function(e,t,r,n){var i=t.split(".");(""===e||"/"===e||"index"===i[i.length-1])&&(this.explicitIndex=!0),this.matches.push([e,t,r,n])},route:function(e,r){t(this,e,r)},generate:function(){var e=this.matches;return this.explicitIndex||this.route("index",{path:"/"}),function(t){for(var r=0,n=e.length;n>r;r++){var i=e[r];t(i[0]).to(i[1],i[2])}}}},e.map=function(t){var r=new e;return t.call(r),r},Ember.RouterDSL=e}(),function(){var e=Ember.get;Ember.controllerFor=function(e,t,r){return e.lookup("controller:"+t,r)},Ember.generateController=function(t,r,n){var i,o,a,s,u;return u=n&&Ember.isArray(n)?"array":n?"object":"basic",s="controller:"+u,i=t.lookupFactory(s).extend({isGenerated:!0,toString:function(){return"(generated "+r+" controller)"}}),o="controller:"+r,t.register(o,i),a=t.lookup(o),e(a,"namespace.LOG_ACTIVE_GENERATION")&&Ember.Logger.info("generated -> "+o,{fullName:o}),a}}(),function(){function e(e,t,r){for(var n=t.handlerInfos,i=!1,o=n.length-1;o>=0;--o){var a=n[o],s=a.handler;if(i){if(r(s,n[o+1].handler)!==!0)return!1}else e===s&&(i=!0)}return!0}function r(e,t,r){var i,o=e.router,a=(t.routeName.split(".").pop(),"application"===e.routeName?"":e.routeName+".");return i=a+r,n(o,i)?i:void 0}function n(e,t){var r=e.container;return e.hasRoute(t)&&(r.has("template:"+t)||r.has("route:"+t))}function i(e,t,r){var n=r.shift();if(!e){if(t)return;throw new Ember.Error("Can't trigger action '"+n+"' because your app hasn't finished transitioning into its first route. To trigger an action on destination routes during a transition, you can call `.send()` on the `Transition` object passed to the `model/beforeModel/afterModel` hooks.")}for(var i=!1,o=e.length-1;o>=0;o--){var a=e[o],s=a.handler;if(s._actions&&s._actions[n]){if(s._actions[n].apply(s,r)!==!0)return;i=!0}}if(m[n])return m[n].apply(null,r),void 0;if(!i&&!t)throw new Ember.Error("Nothing handled the action '"+n+"'. If you did handle the action, this error can be caused by returning true from an action handler in a controller, causing the action to bubble.")}function o(e){var t=e.container.lookup("controller:application");if(t){var r=e.router.currentHandlerInfos,n=Ember.Router._routePath(r);"currentPath"in t||c(t,"currentPath"),u(t,"currentPath",n),"currentRouteName"in t||c(t,"currentRouteName"),u(t,"currentRouteName",r[r.length-1].name)}}var a=t("router")["default"],s=Ember.get,u=Ember.set,c=Ember.defineProperty,l=Array.prototype.slice,h=Ember._MetamorphView;Ember.Router=Ember.Object.extend(Ember.Evented,{location:"hash",init:function(){this.router=this.constructor.router||this.constructor.map(Ember.K),this._activeViews={},this._setupLocation(),s(this,"namespace.LOG_TRANSITIONS_INTERNAL")&&(this.router.log=Ember.Logger.debug)},url:Ember.computed(function(){return s(this,"location").getURL()}),startRouting:function(){this.router=this.router||this.constructor.map(Ember.K);var e=this.router,t=s(this,"location"),r=this.container,n=this;this._setupRouter(e,t),r.register("view:default",h),r.register("view:toplevel",Ember.View.extend()),t.onUpdateURL(function(e){n.handleURL(e)}),this.handleURL(t.getURL())},didTransition:function(e){o(this),this._cancelLoadingEvent(),this.notifyPropertyChange("url"),Ember.run.once(this,this.trigger,"didTransition"),s(this,"namespace").LOG_TRANSITIONS&&Ember.Logger.log("Transitioned into '"+Ember.Router._routePath(e)+"'")},handleURL:function(e){return this._doTransition("handleURL",[e])},transitionTo:function(){return this._doTransition("transitionTo",arguments)},intermediateTransitionTo:function(){this.router.intermediateTransitionTo.apply(this.router,arguments),o(this);var e=this.router.currentHandlerInfos;s(this,"namespace").LOG_TRANSITIONS&&Ember.Logger.log("Intermediate-transitioned into '"+Ember.Router._routePath(e)+"'")},replaceWith:function(){return this._doTransition("replaceWith",arguments)},generate:function(){var e=this.router.generate.apply(this.router,arguments);return this.location.formatURL(e)},isActive:function(){var e=this.router;return e.isActive.apply(e,arguments)},send:function(){this.router.trigger.apply(this.router,arguments)},hasRoute:function(e){return this.router.hasRoute(e)},reset:function(){this.router.reset()},willDestroy:function(){var e=s(this,"location");e.destroy(),this._super.apply(this,arguments)},_lookupActiveView:function(e){var t=this._activeViews[e];return t&&t[0]},_connectActiveView:function(e,t){var r=this._activeViews[e];r&&r[0].off("willDestroyElement",this,r[1]);var n=function(){delete this._activeViews[e]};this._activeViews[e]=[t,n],t.one("willDestroyElement",this,n)},_setupLocation:function(){var e=s(this,"location"),t=s(this,"rootURL"),r={};"string"==typeof t&&(r.rootURL=t),"string"==typeof e&&(r.implementation=e,e=u(this,"location",Ember.Location.create(r))),"function"==typeof e.initState&&e.initState()},_getHandlerFunction:function(){var e={},t=this.container,r=t.lookupFactory("route:basic"),n=this;return function(i){var o="route:"+i,a=t.lookup(o);return e[i]?a:(e[i]=!0,a||(t.register(o,r.extend()),a=t.lookup(o),s(n,"namespace.LOG_ACTIVE_GENERATION")&&Ember.Logger.info("generated -> "+o,{fullName:o})),a.routeName=i,a)}},_setupRouter:function(e,t){var r,n=this;e.getHandler=this._getHandlerFunction();var i=function(){t.setURL(r)};if(e.updateURL=function(e){r=e,Ember.run.once(i)},t.replaceURL){var o=function(){t.replaceURL(r)};e.replaceURL=function(e){r=e,Ember.run.once(o)}}e.didTransition=function(e){n.didTransition(e)}},_doTransition:function(e,t){t=l.call(t),t[0]=t[0]||"/";var r,n=t[0],i=!1;i||"/"!==n.charAt(0)?i||(r=this.router.hasRoute(n)?n:t[0]=n+".index"):r=n;var o=this.router[e].apply(this.router,t);return o.then(null,function(e){"UnrecognizedURLError"===e.name}),o},_scheduleLoadingEvent:function(e,t){this._cancelLoadingEvent(),this._loadingStateTimer=Ember.run.scheduleOnce("routerTransitions",this,"_fireLoadingEvent",e,t)},_fireLoadingEvent:function(e,t){this.router.activeTransition&&e.trigger(!0,"loading",e,t)},_cancelLoadingEvent:function(){this._loadingStateTimer&&Ember.run.cancel(this._loadingStateTimer),this._loadingStateTimer=null}});var m={willResolveModel:function(e,t){t.router._scheduleLoadingEvent(e,t)},error:function(t,i,o){var a=o.router,s=e(o,i,function(e,n){var i=r(e,n,"error");return i?(a.intermediateTransitionTo(i,t),void 0):!0});return s?n(o.router,"application_error")?(a.intermediateTransitionTo("application_error",t),void 0):(Ember.Logger.error("Error while loading route: "+t.stack),void 0):void 0},loading:function(t,i){var o=i.router,a=e(i,t,function(e,n){var i=r(e,n,"loading");return i?(o.intermediateTransitionTo(i),void 0):t.pivotHandler!==e?!0:void 0});return a&&n(i.router,"application_loading")?(o.intermediateTransitionTo("application_loading"),void 0):void 0}};Ember.Router.reopenClass({router:null,map:function(e){var t=this.router;t||(t=new a,t.callbacks=[],t.triggerEvent=i,this.reopenClass({router:t}));var r=Ember.RouterDSL.map(function(){this.resource("application",{path:"/"},function(){for(var r=0;r<t.callbacks.length;r++)t.callbacks[r].call(this);e.call(this)})});return t.callbacks.push(e),t.map(r.generate()),t},_routePath:function(e){function t(e,t){for(var r=0,n=e.length;n>r;++r)if(e[r]!==t[r])return!1;
23
- return!0}for(var r=[],n=1,i=e.length;i>n;n++){for(var o=e[n].name,a=o.split("."),s=l.call(r);s.length&&!t(s,a);)s.shift();r.push.apply(r,a.slice(s.length))}return r.join(".")}}),a.Transition.prototype.send=a.Transition.prototype.trigger}(),function(){function e(e){var t=e.router.router.targetHandlerInfos;if(t)for(var r,n,i=0,o=t.length;o>i;i++){if(n=t[i].handler,n===e)return r;r=n}}function t(r){var n,i=e(r);if(i)return(n=i.lastRenderedTemplate)?n:t(i)}function r(e,r,n,i){i=i||{},i.into=i.into?i.into.replace(/\//g,"."):t(e),i.outlet=i.outlet||"main",i.name=r,i.template=n,i.LOG_VIEW_LOOKUPS=s(e.router,"namespace.LOG_VIEW_LOOKUPS");var o,a=i.controller;return a=i.controller?i.controller:(o=e.container.lookup("controller:"+r))?o:e.controllerName||e.routeName,"string"==typeof a&&(a=e.container.lookup("controller:"+a)),i.controller=a,i}function n(e,t,r){if(e)r.LOG_VIEW_LOOKUPS&&Ember.Logger.info("Rendering "+r.name+" with "+e,{fullName:"view:"+r.name});else{var n=r.into?"view:default":"view:toplevel";e=t.lookup(n),r.LOG_VIEW_LOOKUPS&&Ember.Logger.info("Rendering "+r.name+" with default view "+e,{fullName:"view:"+r.name})}return s(e,"templateName")||(u(e,"template",r.template),u(e,"_debugTemplateName",r.name)),u(e,"renderedName",r.name),u(e,"controller",r.controller),e}function i(e,t,r){if(r.into){var n=e.router._lookupActiveView(r.into),i=a(n,r.outlet);e.teardownOutletViews||(e.teardownOutletViews=[]),h(e.teardownOutletViews,0,0,[i]),n.connectOutlet(r.outlet,t)}else{var u=s(e,"router.namespace.rootElement");e.teardownTopLevelView&&e.teardownTopLevelView(),e.router._connectActiveView(r.name,t),e.teardownTopLevelView=o(t),t.appendTo(u)}}function o(e){return function(){e.destroy()}}function a(e,t){return function(){e.disconnectOutlet(t)}}var s=Ember.get,u=Ember.set,c=Ember.getProperties,l=(Ember.String.classify,Ember.String.fmt,Ember.EnumerableUtils.forEach),h=Ember.EnumerableUtils.replace;Ember.Route=Ember.Object.extend(Ember.ActionHandler,{exit:function(){this.deactivate(),this.teardownViews()},enter:function(){this.activate()},actions:null,events:null,mergedProperties:["events"],deactivate:Ember.K,activate:Ember.K,transitionTo:function(){var e=this.router;return e.transitionTo.apply(e,arguments)},intermediateTransitionTo:function(){var e=this.router;e.intermediateTransitionTo.apply(e,arguments)},replaceWith:function(){var e=this.router;return e.replaceWith.apply(e,arguments)},send:function(){return this.router.send.apply(this.router,arguments)},setup:function(e){var t=this.controllerName||this.routeName,r=this.controllerFor(t,!0);r||(r=this.generateController(t,e)),this.controller=r;var n=[r,e];this.setupControllers?this.setupControllers(r,e):this.setupController.apply(this,n),this.renderTemplates?this.renderTemplates(e):this.renderTemplate.apply(this,n)},redirect:Ember.K,beforeModel:Ember.K,afterModel:function(e,t){this.redirect(e,t)},contextDidChange:function(){this.currentModel=this.context},model:function(e){var t,r,n,i;for(var o in e)(t=o.match(/^(.*)_id$/))&&(r=t[1],i=e[o]),n=!0;if(!r&&n)return e;if(r)return this.findModel(r,i)},findModel:function(){var e=s(this,"store");return e.find.apply(e,arguments)},store:Ember.computed(function(){{var e=this.container;this.routeName,s(this,"router.namespace")}return{find:function(t,r){var n=e.lookupFactory("model:"+t);return n.find(r)}}}),serialize:function(e,t){if(!(t.length<1)&&e){var r=t[0],n={};return/_id$/.test(r)&&1===t.length?n[r]=s(e,"id"):n=c(e,t),n}},setupController:function(e,t){e&&void 0!==t&&u(e,"model",t)},controllerFor:function(e){var t,r=this.container,n=r.lookup("route:"+e);return n&&n.controllerName&&(e=n.controllerName),t=r.lookup("controller:"+e)},generateController:function(e,t){var r=this.container;return t=t||this.modelFor(e),Ember.generateController(r,e,t)},modelFor:function(e){var t=this.container.lookup("route:"+e),r=this.router.router.activeTransition;if(r){var n=t&&t.routeName||e;if(r.resolvedModels.hasOwnProperty(n))return r.resolvedModels[n]}return t&&t.currentModel},renderTemplate:function(){this.render()},render:function(e,t){"object"!=typeof e||t||(t=e,e=this.routeName),t=t||{};var o;e?(e=e.replace(/\//g,"."),o=e):(e=this.routeName,o=this.templateName||e);var a=t.view||this.viewName||e,u=this.container,c=u.lookup("view:"+a),l=c?c.get("template"):null;return l||(l=u.lookup("template:"+o)),c||l?(t=r(this,e,l,t),c=n(c,u,t),"main"===t.outlet&&(this.lastRenderedTemplate=e),i(this,c,t),void 0):(s(this.router,"namespace.LOG_VIEW_LOOKUPS")&&Ember.Logger.info('Could not find "'+e+'" template or view. Nothing will be rendered',{fullName:"template:"+e}),void 0)},disconnectOutlet:function(e){e=e||{},e.parentView=e.parentView?e.parentView.replace(/\//g,"."):t(this),e.outlet=e.outlet||"main";var r=this.router._lookupActiveView(e.parentView);r.disconnectOutlet(e.outlet)},willDestroy:function(){this.teardownViews()},teardownViews:function(){this.teardownTopLevelView&&this.teardownTopLevelView();var e=this.teardownOutletViews||[];l(e,function(e){e()}),delete this.teardownTopLevelView,delete this.teardownOutletViews,delete this.lastRenderedTemplate}})}(),function(){Ember.onLoad("Ember.Handlebars",function(){function e(e,r,i){return n.call(t(e,r,i),function(t,n){return null===t?r[n]:o(e,t,i)})}function t(e,t,o){function a(e,t){return"controller"===t?t:Ember.ControllerMixin.detect(e)?a(i(e,"model"),t?t+".model":"model"):t}var s=r(e,t,o),u=o.types;return n.call(s,function(e,r){return"ID"===u[r]?a(e,t[r]):null})}var r=Ember.Handlebars.resolveParams,n=Ember.ArrayPolyfills.map,i=Ember.get,o=Ember.Handlebars.get;Ember.Router.resolveParams=e,Ember.Router.resolvePaths=t})}(),function(){{var e=Ember.get;Ember.set,Ember.String.fmt}Ember.onLoad("Ember.Handlebars",function(){function t(e,t){var r;return e.hasRoute(t)||(r=t+".index",t=r),t}function r(e){var t=e.options.types,r=e.options.data;return i(e.context,e.params,{types:t,data:r})}var n=Ember.Router.resolveParams,i=Ember.Router.resolvePaths,o=Ember.ViewUtils.isSimpleClick,a=Ember.LinkView=Ember.View.extend({tagName:"a",currentWhen:null,title:null,rel:null,activeClass:"active",loadingClass:"loading",disabledClass:"disabled",_isDisabled:!1,replace:!1,attributeBindings:["href","title","rel"],classNameBindings:["active","loading","disabled"],eventName:"click",init:function(){this._super.apply(this,arguments);var t=e(this,"eventName");this.on(t,this,this._invoke)},_paramsChanged:function(){this.notifyPropertyChange("resolvedParams")},_setupPathObservers:function(){var e,t,n,i=this.parameters,o=i.options.linkTextPath,a=r(i),s=a.length;for(o&&(n=Ember.Handlebars.normalizePath(i.context,o,i.options.data),this.registerObserver(n.root,n.path,this,this.rerender)),t=0;s>t;t++)e=a[t],null!==e&&(n=Ember.Handlebars.normalizePath(i.context,e,i.options.data),this.registerObserver(n.root,n.path,this,this._paramsChanged))},afterRender:function(){this._super.apply(this,arguments),this._setupPathObservers()},_queryParamsChanged:function(){this.notifyPropertyChange("queryParams")},concreteView:Ember.computed(function(){return e(this,"parentView")}).property("parentView"),disabled:Ember.computed(function(t,r){return void 0!==r&&this.set("_isDisabled",r),r?e(this,"disabledClass"):!1}),active:Ember.computed(function(){if(e(this,"loading"))return!1;var t=e(this,"router"),r=e(this,"routeArgs"),n=r.slice(1),i=e(this,"resolvedParams"),o=this.currentWhen||i[0],a=o+".index",s=t.isActive.apply(t,[o].concat(n))||t.isActive.apply(t,[a].concat(n));return s?e(this,"activeClass"):void 0}).property("resolvedParams","routeArgs","router.url"),loading:Ember.computed(function(){return e(this,"routeArgs")?void 0:e(this,"loadingClass")}).property("routeArgs"),router:Ember.computed(function(){return e(this,"controller").container.lookup("router:main")}),_invoke:function(t){if(!o(t))return!0;if(this.preventDefault!==!1&&t.preventDefault(),this.bubbles===!1&&t.stopPropagation(),e(this,"_isDisabled"))return!1;if(e(this,"loading"))return Ember.Logger.warn("This link-to is in an inactive loading state because at least one of its parameters presently has a null/undefined value, or the provided route name is invalid."),!1;var r=e(this,"router"),n=e(this,"routeArgs");e(this,"replace")?r.replaceWith.apply(r,n):r.transitionTo.apply(r,n)},resolvedParams:Ember.computed(function(){var e=this.parameters,t=e.options,r=t.types,i=t.data;return n(e.context,e.params,{types:r,data:i})}).property(),routeArgs:Ember.computed(function(){var r=e(this,"resolvedParams").slice(0),n=e(this,"router"),i=r[0];if(i){i=t(n,i),r[0]=i;for(var o=1,a=r.length;a>o;++o){var s=r[o];if(null===s||"undefined"==typeof s)return}return r}}).property("resolvedParams","queryParams","router.url"),_potentialQueryParams:Ember.computed(function(){var r=e(this,"resolvedParams")[0];if(!r)return null;var n=e(this,"router");return r=t(n,r),n.router.queryParamsForHandler(r)}).property("resolvedParams"),queryParams:Ember.computed(function(){var t=this,r=null,n=e(this,"_potentialQueryParams");return n?(n.forEach(function(n){var i=e(t,n);"undefined"!=typeof i&&(r=r||{},r[n]=i)}),r):null}).property("_potentialQueryParams.[]"),href:Ember.computed(function(){if("a"===e(this,"tagName")){var t=e(this,"router"),r=e(this,"routeArgs");return r?t.generate.apply(t,r):e(this,"loadingHref")}}).property("routeArgs"),loadingHref:"#"});a.toString=function(){return"LinkView"},Ember.Handlebars.registerHelper("link-to",function(){var e=[].slice.call(arguments,-1)[0],t=[].slice.call(arguments,0,-1),r=e.hash;if(r.disabledBinding=r.disabledWhen,!e.fn){var n=t.shift(),i=e.types.shift(),o=this;"ID"===i?(e.linkTextPath=n,e.fn=function(){return Ember.Handlebars.get(o,n,e)}):e.fn=function(){return n}}return r.parameters={context:this,options:e,params:t},Ember.Handlebars.helpers.view.call(this,a,e)}),Ember.Handlebars.registerHelper("linkTo",function(){return Ember.Handlebars.helpers["link-to"].apply(this,arguments)})})}(),function(){Ember.get,Ember.set;Ember.onLoad("Ember.Handlebars",function(e){e.OutletView=Ember.ContainerView.extend(Ember._Metamorph),e.registerHelper("outlet",function(t,r){var n,i;for(t&&t.data&&t.data.isRenderData&&(r=t,t="main"),n=r.data.view;!n.get("template.isTop");)n=n.get("_parentView");return i=r.hash.viewClass||e.OutletView,r.data.view.set("outletSource",n),r.hash.currentViewBinding="_view.outletSource._outlets."+t,e.helpers.view.call(this,i,r)})})}(),function(){Ember.get,Ember.set;Ember.onLoad("Ember.Handlebars",function(){Ember.Handlebars.registerHelper("render",function(e,t,r){var n,i,o,a,s,u,c=3===arguments.length;2===arguments.length&&(r=t,t=void 0),"string"==typeof t&&(s=Ember.Handlebars.get(r.contexts[1],t,r),u={singleton:!1}),e=e.replace(/\//g,"."),n=r.data.keywords.controller.container,i=n.lookup("router:main"),a=n.lookup("view:"+e)||n.lookup("view:default");var l=r.hash.controller;o=l?n.lookup("controller:"+l,u):n.lookup("controller:"+e,u)||Ember.generateController(n,e,s),o&&c&&o.set("model",s);var h=r.contexts[1];h&&a.registerObserver(h,t,function(){o.set("model",Ember.Handlebars.get(h,t,r))}),o.set("target",r.data.keywords.controller),r.hash.viewName=Ember.String.camelize(e),r.hash.template=n.lookup("template:"+e),r.hash.controller=o,i&&!s&&i._connectActiveView(e,a),Ember.Handlebars.helpers.view.call(this,a,r)})})}(),function(){Ember.onLoad("Ember.Handlebars",function(){function e(e,r){var n=[];r&&n.push(r);var i=e.options.types.slice(1),o=e.options.data;return n.concat(t(e.context,e.params,{types:i,data:o}))}var t=Ember.Router.resolveParams,r=Ember.ViewUtils.isSimpleClick,n=Ember.Handlebars,i=n.get,o=n.SafeString,a=Ember.ArrayPolyfills.forEach,s=(Ember.get,Array.prototype.slice),u=n.ActionHelper={registeredActions:{}},c=["alt","shift","meta","ctrl"],l=/^click|mouse|touch/,h=function(e,t){if("undefined"==typeof t){if(l.test(e.type))return r(e);t=""}if(t.indexOf("any")>=0)return!0;var n=!0;return a.call(c,function(r){e[r+"Key"]&&-1===t.indexOf(r)&&(n=!1)}),n};u.registerAction=function(t,r,n){var o=(++Ember.uuid).toString();return u.registeredActions[o]={eventName:r.eventName,handler:function(o){if(!h(o,n))return!0;r.preventDefault!==!1&&o.preventDefault(),r.bubbles===!1&&o.stopPropagation();var a=r.target;a=a.target?i(a.root,a.target,a.options):a.root,Ember.run(function(){a.send?a.send.apply(a,e(r.parameters,t)):a[t].apply(a,e(r.parameters))})}},r.view.on("willClearRender",function(){delete u.registeredActions[o]}),o},n.registerHelper("action",function(e){var t,r=arguments[arguments.length-1],n=s.call(arguments,1,-1),i=r.hash,a={eventName:i.on||"click"};a.parameters={context:this,options:r,params:n},a.view=r.data.view;var c,l;i.target?(c=this,l=i.target):(t=r.data.keywords.controller)&&(c=t),a.target={root:c,target:l,options:r},a.bubbles=i.bubbles,a.preventDefault=i.preventDefault;var h=u.registerAction(e,a,i.allowedKeys);return new o('data-ember-action="'+h+'"')})})}(),function(){{var e=Ember.get;Ember.set}Ember.ControllerMixin.reopen({transitionToRoute:function(){var t=e(this,"target"),r=t.transitionToRoute||t.transitionTo;return r.apply(t,arguments)},transitionTo:function(){return this.transitionToRoute.apply(this,arguments)},replaceRoute:function(){var t=e(this,"target"),r=t.replaceRoute||t.replaceWith;return r.apply(t,arguments)},replaceWith:function(){return this.replaceRoute.apply(this,arguments)}})}(),function(){var e=Ember.get,t=Ember.set;Ember.View.reopen({init:function(){t(this,"_outlets",{}),this._super()},connectOutlet:function(r,n){if(this._pendingDisconnections&&delete this._pendingDisconnections[r],this._hasEquivalentView(r,n))return n.destroy(),void 0;var i=e(this,"_outlets"),o=e(this,"container"),a=o&&o.lookup("router:main"),s=e(n,"renderedName");t(i,r,n),a&&s&&a._connectActiveView(s,n)},_hasEquivalentView:function(t,r){var n=e(this,"_outlets."+t);return n&&n.constructor===r.constructor&&n.get("template")===r.get("template")&&n.get("context")===r.get("context")},disconnectOutlet:function(e){this._pendingDisconnections||(this._pendingDisconnections={}),this._pendingDisconnections[e]=!0,Ember.run.once(this,"_finishDisconnections")},_finishDisconnections:function(){var r=e(this,"_outlets"),n=this._pendingDisconnections;this._pendingDisconnections=null;for(var i in n)t(r,i,null)}})}(),function(){var e=Ember.run.queues,t=Ember.ArrayPolyfills.indexOf;e.splice(t.call(e,"actions")+1,0,"routerTransitions")}(),function(){Ember.get,Ember.set;Ember.Location={create:function(e){var t=e&&e.implementation,r=this.implementations[t];return r.create.apply(r,arguments)},registerImplementation:function(e,t){this.implementations[e]=t},implementations:{}}}(),function(){var e=Ember.get,t=Ember.set;Ember.NoneLocation=Ember.Object.extend({path:"",getURL:function(){return e(this,"path")},setURL:function(e){t(this,"path",e)},onUpdateURL:function(e){this.updateCallback=e},handleURL:function(e){t(this,"path",e),this.updateCallback(e)},formatURL:function(e){return e}}),Ember.Location.registerImplementation("none",Ember.NoneLocation)}(),function(){var e=Ember.get,t=Ember.set;Ember.HashLocation=Ember.Object.extend({init:function(){t(this,"location",e(this,"location")||window.location)},getURL:function(){return e(this,"location").hash.substr(1)},setURL:function(r){e(this,"location").hash=r,t(this,"lastSetURL",r)},replaceURL:function(t){e(this,"location").replace("#"+t)},onUpdateURL:function(r){var n=this,i=Ember.guidFor(this);Ember.$(window).on("hashchange.ember-location-"+i,function(){Ember.run(function(){var i=location.hash.substr(1);e(n,"lastSetURL")!==i&&(t(n,"lastSetURL",null),r(i))})})},formatURL:function(e){return"#"+e},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).off("hashchange.ember-location-"+e)}}),Ember.Location.registerImplementation("hash",Ember.HashLocation)}(),function(){var e=Ember.get,t=Ember.set,r=!1,n=window.history&&"state"in window.history;Ember.HistoryLocation=Ember.Object.extend({init:function(){t(this,"location",e(this,"location")||window.location)},initState:function(){t(this,"history",e(this,"history")||window.history),this.replaceState(this.formatURL(this.getURL()))},rootURL:"/",getURL:function(){var t=e(this,"rootURL"),r=e(this,"location"),n=r.pathname;t=t.replace(/\/$/,"");var i=n.replace(t,"");return i},setURL:function(e){var t=this.getState();e=this.formatURL(e),t&&t.path!==e&&this.pushState(e)},replaceURL:function(e){var t=this.getState();e=this.formatURL(e),t&&t.path!==e&&this.replaceState(e)},getState:function(){return n?e(this,"history").state:this._historyState},pushState:function(t){var r={path:t};e(this,"history").pushState(r,null,t),n||(this._historyState=r),this._previousURL=this.getURL()},replaceState:function(t){var r={path:t};e(this,"history").replaceState(r,null,t),n||(this._historyState=r),this._previousURL=this.getURL()},onUpdateURL:function(e){var t=Ember.guidFor(this),n=this;Ember.$(window).on("popstate.ember-location-"+t,function(){(r||(r=!0,n.getURL()!==n._previousURL))&&e(n.getURL())})},formatURL:function(t){var r=e(this,"rootURL");return""!==t&&(r=r.replace(/\/$/,"")),r+t},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).off("popstate.ember-location-"+e)}}),Ember.Location.registerImplementation("history",Ember.HistoryLocation)}(),function(){function e(t,r,n,i){var o,a=t.name,s=t.incoming,u=t.incomingNames,c=u.length;if(n||(n={}),i||(i=[]),!n.hasOwnProperty(a)){for(i.push(a),n[a]=!0,o=0;c>o;o++)e(s[u[o]],r,n,i);r(t,i),i.pop()}}function t(){this.names=[],this.vertices={}}t.prototype.add=function(e){if(e){if(this.vertices.hasOwnProperty(e))return this.vertices[e];var t={name:e,incoming:{},incomingNames:[],hasOutgoing:!1,value:null};return this.vertices[e]=t,this.names.push(e),t}},t.prototype.map=function(e,t){this.add(e).value=t},t.prototype.addEdge=function(t,r){function n(e,t){if(e.name===r)throw new Ember.Error("cycle detected: "+r+" <- "+t.join(" <- "))}if(t&&r&&t!==r){var i=this.add(t),o=this.add(r);o.incoming.hasOwnProperty(t)||(e(i,n),i.hasOutgoing=!0,o.incoming[t]=i,o.incomingNames.push(t))}},t.prototype.topsort=function(t){var r,n,i={},o=this.vertices,a=this.names,s=a.length;for(r=0;s>r;r++)n=o[a[r]],n.hasOutgoing||e(n,t,i)},t.prototype.addEdges=function(e,t,r,n){var i;if(this.map(e,t),r)if("string"==typeof r)this.addEdge(e,r);else for(i=0;i<r.length;i++)this.addEdge(e,r[i]);if(n)if("string"==typeof n)this.addEdge(n,e);else for(i=0;i<n.length;i++)this.addEdge(n[i],e)},Ember.DAG=t}(),function(){var e=Ember.get,t=Ember.String.classify,r=Ember.String.capitalize,n=Ember.String.decamelize;Ember.DefaultResolver=Ember.Object.extend({namespace:null,normalize:function(e){var t=e.split(":",2),r=t[0],n=t[1];if("template"!==r){var i=n;return i.indexOf(".")>-1&&(i=i.replace(/\.(.)/g,function(e){return e.charAt(1).toUpperCase()})),n.indexOf("_")>-1&&(i=i.replace(/_(.)/g,function(e){return e.charAt(1).toUpperCase()})),r+":"+i}return e},resolve:function(e){var t=this.parseName(e),r=this[t.resolveMethodName];if(!t.name||!t.type)throw new TypeError("Invalid fullName: `"+e+"`, must of of the form `type:name` ");if(r){var n=r.call(this,t);if(n)return n}return this.resolveOther(t)},parseName:function(n){var i=n.split(":"),o=i[0],a=i[1],s=a,u=e(this,"namespace"),c=u;if("template"!==o&&-1!==s.indexOf("/")){var l=s.split("/");s=l[l.length-1];var h=r(l.slice(0,-1).join("."));c=Ember.Namespace.byName(h)}return{fullName:n,type:o,fullNameWithoutType:a,name:s,root:c,resolveMethodName:"resolve"+t(o)}},resolveTemplate:function(e){var t=e.fullNameWithoutType.replace(/\./g,"/");return Ember.TEMPLATES[t]?Ember.TEMPLATES[t]:(t=n(t),Ember.TEMPLATES[t]?Ember.TEMPLATES[t]:void 0)},useRouterNaming:function(e){e.name=e.name.replace(/\./g,"_"),"basic"===e.name&&(e.name="")},resolveController:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveRoute:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveView:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveHelper:function(e){return this.resolveOther(e)||Ember.Handlebars.helpers[e.fullNameWithoutType]},resolveModel:function(r){var n=t(r.name),i=e(r.root,n);return i?i:void 0},resolveOther:function(r){var n=t(r.name)+t(r.type),i=e(r.root,n);return i?i:void 0},lookupDescription:function(e){var r=this.parseName(e);if("template"===r.type)return"template at "+r.fullNameWithoutType.replace(/\./g,"/");var n=r.root+"."+t(r.name);return"model"!==r.type&&(n+=t(r.type)),n},makeToString:function(e){return e.toString()}})}(),function(){function e(e){this._container=e}function t(e){function t(e){return n.resolve(e)}e.get("resolver");var r=e.get("resolver")||e.get("Resolver")||Ember.DefaultResolver,n=r.create({namespace:e});return t.describe=function(e){return n.lookupDescription(e)},t.makeToString=function(e,t){return n.makeToString(e,t)},t.normalize=function(e){return n.normalize?n.normalize(e):e},t}var r=Ember.get,n=Ember.set;e.deprecate=function(e){return function(){var t=this._container;return t[e].apply(t,arguments)}},e.prototype={_container:null,lookup:e.deprecate("lookup"),resolve:e.deprecate("resolve"),register:e.deprecate("register")};var i=Ember.Application=Ember.Namespace.extend(Ember.DeferredMixin,{rootElement:"body",eventDispatcher:null,customEvents:null,_readinessDeferrals:1,init:function(){if(this.$||(this.$=Ember.$),this.__container__=this.buildContainer(),this.Router=this.defaultRouter(),this._super(),this.scheduleInitialize(),Ember.libraries.registerCoreLibrary("Handlebars",Ember.Handlebars.VERSION),Ember.libraries.registerCoreLibrary("jQuery",Ember.$().jquery),Ember.LOG_VERSION){Ember.LOG_VERSION=!1;var e=Math.max.apply(this,Ember.A(Ember.libraries).mapBy("name.length"));Ember.libraries.each(function(t){new Array(e-t.length+1).join(" ")})}},buildContainer:function(){var e=this.__container__=i.buildContainer(this);return e},defaultRouter:function(){if(this.Router!==!1){var e=this.__container__;return this.Router&&(e.unregister("router:main"),e.register("router:main",this.Router)),e.lookupFactory("router:main")}},scheduleInitialize:function(){var e=this;!this.$||this.$.isReady?Ember.run.schedule("actions",e,"_initialize"):this.$().ready(function(){Ember.run(e,"_initialize")})},deferReadiness:function(){this._readinessDeferrals++},advanceReadiness:function(){this._readinessDeferrals--,0===this._readinessDeferrals&&Ember.run.once(this,this.didBecomeReady)},register:function(){var e=this.__container__;e.register.apply(e,arguments)},inject:function(){var e=this.__container__;e.injection.apply(e,arguments)},initialize:function(){},_initialize:function(){if(!this.isDestroyed){if(this.Router){var e=this.__container__;e.unregister("router:main"),e.register("router:main",this.Router)}return this.runInitializers(),Ember.runLoadHooks("application",this),this.advanceReadiness(),this}},reset:function(){function e(){var e=this.__container__.lookup("router:main");e.reset(),Ember.run(this.__container__,"destroy"),this.buildContainer(),Ember.run.schedule("actions",this,function(){this._initialize()})}this._readinessDeferrals=1,Ember.run.join(this,e)},runInitializers:function(){var e,t,n=r(this.constructor,"initializers"),i=this.__container__,o=new Ember.DAG,a=this;for(e in n)t=n[e],o.addEdges(t.name,t.initialize,t.before,t.after);o.topsort(function(e){var t=e.value;t(i,a)})},didBecomeReady:function(){this.setupEventDispatcher(),this.ready(),this.startRouting(),Ember.testing||(Ember.Namespace.processAll(),Ember.BOOTED=!0),this.resolve(this)},setupEventDispatcher:function(){var e=r(this,"customEvents"),t=r(this,"rootElement"),i=this.__container__.lookup("event_dispatcher:main");n(this,"eventDispatcher",i),i.setup(e,t)},startRouting:function(){var e=this.__container__.lookup("router:main");e&&e.startRouting()},handleURL:function(e){var t=this.__container__.lookup("router:main");t.handleURL(e)},ready:Ember.K,resolver:null,Resolver:null,willDestroy:function(){Ember.BOOTED=!1,this.__container__.destroy()},initializer:function(e){this.constructor.initializer(e)}});Ember.Application.reopenClass({initializers:{},initializer:function(e){void 0!==this.superclass.initializers&&this.superclass.initializers===this.initializers&&this.reopenClass({initializers:Ember.create(this.initializers)}),this.initializers[e.name]=e},buildContainer:function(r){var n=new Ember.Container;return Ember.Container.defaultContainer=new e(n),n.set=Ember.set,n.resolver=t(r),n.normalize=n.resolver.normalize,n.describe=n.resolver.describe,n.makeToString=n.resolver.makeToString,n.optionsForType("component",{singleton:!1}),n.optionsForType("view",{singleton:!1}),n.optionsForType("template",{instantiate:!1}),n.optionsForType("helper",{instantiate:!1}),n.register("application:main",r,{instantiate:!1}),n.register("controller:basic",Ember.Controller,{instantiate:!1}),n.register("controller:object",Ember.ObjectController,{instantiate:!1}),n.register("controller:array",Ember.ArrayController,{instantiate:!1}),n.register("route:basic",Ember.Route,{instantiate:!1}),n.register("event_dispatcher:main",Ember.EventDispatcher),n.register("router:main",Ember.Router),n.injection("router:main","namespace","application:main"),n.injection("controller","target","router:main"),n.injection("controller","namespace","application:main"),n.injection("route","router","router:main"),n}}),Ember.runLoadHooks("Ember.Application",Ember.Application)}(),function(){function e(e,t,r){var n,i,o;for(i=0,o=r.length;o>i;i++)n=r[i],-1===n.indexOf(":")&&(n="controller:"+n),!t.has(n)}var t=Ember.get,r=(Ember.set,Ember.computed(function(){var e=this;return{needs:t(e,"needs"),container:t(e,"container"),unknownProperty:function(t){var r,n,i,o=this.needs;for(n=0,i=o.length;i>n;n++)if(r=o[n],r===t)return this.container.lookup("controller:"+t);var a=Ember.inspect(e)+"#needs does not include `"+t+"`. To access the "+t+" controller from "+Ember.inspect(e)+", "+Ember.inspect(e)+" should have a `needs` property that is an array of the controllers it has access to.";throw new ReferenceError(a)},setUnknownProperty:function(t){throw new Error("You cannot overwrite the value of `controllers."+t+"` of "+Ember.inspect(e))}}}));Ember.ControllerMixin.reopen({concatenatedProperties:["needs"],needs:[],init:function(){var r=t(this,"needs"),n=t(r,"length");n>0&&(this.container&&e(this,this.container,r),t(this,"controllers")),this._super.apply(this,arguments)},controllerFor:function(e){return Ember.controllerFor(t(this,"container"),e)},controllers:r})}(),function(){Ember.DataAdapter=Ember.Object.extend({init:function(){this._super(),this.releaseMethods=Ember.A()},container:null,attributeLimit:3,releaseMethods:Ember.A(),getFilters:function(){return Ember.A()},watchModelTypes:function(e,t){var r,n=this.getModelTypes(),i=this,o=Ember.A();r=n.map(function(e){var r=i.wrapModelType(e);return o.push(i.observeModelType(e,t)),r}),e(r);var a=function(){o.forEach(function(e){e()}),i.releaseMethods.removeObject(a)};return this.releaseMethods.pushObject(a),a},watchRecords:function(e,t,r,n){var i,o=this,a=Ember.A(),s=this.getRecords(e),u=function(e){r([e])},c=s.map(function(e){return a.push(o.observeRecord(e,u)),o.wrapRecord(e)}),l=function(e,r,i,s){for(var c=r;r+s>c;c++){var l=e.objectAt(c),h=o.wrapRecord(l);a.push(o.observeRecord(l,u)),t([h])}i&&n(r,i)},h={didChange:l,willChange:Ember.K};return s.addArrayObserver(o,h),i=function(){a.forEach(function(e){e()}),s.removeArrayObserver(o,h),o.releaseMethods.removeObject(i)},t(c),this.releaseMethods.pushObject(i),i},willDestroy:function(){this._super(),this.releaseMethods.forEach(function(e){e()})},detect:function(){return!1},columnsForType:function(){return Ember.A()},observeModelType:function(e,t){var r=this,n=this.getRecords(e),i=function(){t([r.wrapModelType(e)])},o={didChange:function(){Ember.run.scheduleOnce("actions",this,i)},willChange:Ember.K};n.addArrayObserver(this,o);var a=function(){n.removeArrayObserver(r,o)};return a},wrapModelType:function(e){var t,r=this.getRecords(e);return t={name:e.toString(),count:Ember.get(r,"length"),columns:this.columnsForType(e),object:e}},getModelTypes:function(){var e=Ember.A(Ember.Namespace.NAMESPACES),t=Ember.A(),r=this;return e.forEach(function(e){for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];r.detect(i)&&t.push(i)}}),t},getRecords:function(){return Ember.A()},wrapRecord:function(e){var t={object:e};return t.columnValues=this.getRecordColumnValues(e),t.searchKeywords=this.getRecordKeywords(e),t.filterValues=this.getRecordFilterValues(e),t.color=this.getRecordColor(e),t},getRecordColumnValues:function(){return{}},getRecordKeywords:function(){return Ember.A()},getRecordFilterValues:function(){return{}},getRecordColor:function(){return null},observeRecord:function(){return function(){}}})}()}(),"undefined"==typeof location||"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname||Ember.Logger.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.");
1
+ /*!
2
+ * @overview Ember - JavaScript Application Framework
3
+ * @copyright Copyright 2011-2013 Tilde Inc. and contributors
4
+ * Portions Copyright 2006-2011 Strobe Inc.
5
+ * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
6
+ * @license Licensed under MIT license
7
+ * See https://raw.github.com/emberjs/ember.js/master/LICENSE
8
+ * @version 1.4.0-beta.1+canary.dc0dc0ce
9
+ */
10
+ !function(){var e,t,r,n;!function(){var i={},o={};e=function(e,t,r){i[e]={deps:t,callback:r}},n=r=t=function(e){function r(t){if("."!==t.charAt(0))return t;for(var r=t.split("/"),n=e.split("/").slice(0,-1),i=0,o=r.length;o>i;i++){var a=r[i];if(".."===a)n.pop();else{if("."===a)continue;n.push(a)}}return n.join("/")}if(n._eak_seen=i,o[e])return o[e];if(o[e]={},!i[e])throw new Error("Could not find module "+e);for(var a,s=i[e],u=s.deps,c=s.callback,l=[],h=0,m=u.length;m>h;h++)"exports"===u[h]?l.push(a={}):l.push(t(r(u[h])));var f=c.apply(this,l);return o[e]=a||f}}(),function(){"undefined"==typeof Ember&&(Ember={});{var e=(Ember.imports=Ember.imports||this,Ember.exports=Ember.exports||this);Ember.lookup=Ember.lookup||this}e.Em=e.Ember=Em=Ember,Ember.isNamespace=!0,Ember.toString=function(){return"Ember"},Ember.VERSION="1.4.0-beta.1+canary.dc0dc0ce","undefined"==typeof ENV&&(e.ENV={}),"undefined"==typeof ENV.DISABLE_RANGE_API&&(ENV.DISABLE_RANGE_API=!0),Ember.ENV=Ember.ENV||ENV,Ember.config=Ember.config||{},Ember.FEATURES=Ember.ENV.FEATURES||{},Ember.FEATURES.isEnabled=function(e){var t=Ember.FEATURES[e];return Ember.ENV.ENABLE_ALL_FEATURES?!0:t===!0||t===!1||void 0===t?t:Ember.ENV.ENABLE_OPTIONAL_FEATURES?!0:!1},Ember.EXTEND_PROTOTYPES=Ember.ENV.EXTEND_PROTOTYPES,"undefined"==typeof Ember.EXTEND_PROTOTYPES&&(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.LOG_VERSION=Ember.ENV.LOG_VERSION===!1?!1:!0,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.merge=function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e},Ember.isNone=function(e){return null===e||void 0===e},Ember.none=Ember.deprecateFunc("Ember.none is deprecated. Please use Ember.isNone instead.",Ember.isNone),Ember.isEmpty=function(e){return Ember.isNone(e)||0===e.length&&"function"!=typeof e||"object"==typeof e&&0===Ember.get(e,"length")},Ember.empty=Ember.deprecateFunc("Ember.empty is deprecated. Please use Ember.isEmpty instead.",Ember.isEmpty)}(),function(){var e=Ember.platform={};if(Ember.create=Object.create,Ember.create&&2!==Ember.create({a:1},{a:{value:2}}).a&&(Ember.create=null),!Ember.create||Ember.ENV.STUB_OBJECT_CREATE){var t=function(){};Ember.create=function(e,r){if(t.prototype=e,e=new t,r){t.prototype=e;for(var n in r)t.prototype[n]=r[n].value;e=new t}return t.prototype=null,e},Ember.create.isSimulated=!0}var r,n,i=Object.defineProperty;if(i)try{i({},"a",{get:function(){}})}catch(o){i=null}i&&(r=function(){var e={};return i(e,"a",{configurable:!0,enumerable:!0,get:function(){},set:function(){}}),i(e,"a",{configurable:!0,enumerable:!0,writable:!0,value:!0}),e.a===!0}(),n=function(){try{return i(document.createElement("div"),"definePropertyOnDOM",{}),!0}catch(e){}return!1}(),r?n||(i=function(e,t,r){var n;return n="object"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName,n?e[t]=r.value:Object.defineProperty(e,t,r)}):i=null),e.defineProperty=i,e.hasPropertyAccessors=!0,e.defineProperty||(e.hasPropertyAccessors=!1,e.defineProperty=function(e,t,r){r.get||(e[t]=r.value)},e.defineProperty.isSimulated=!0),Ember.ENV.MANDATORY_SETTER&&!e.hasPropertyAccessors&&(Ember.ENV.MANDATORY_SETTER=!1)}(),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(void 0===this||null===this)throw new TypeError;var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var n=new Array(r),i=arguments[1],o=0;r>o;o++)o in t&&(n[o]=e.call(i,t[o],o,t));return n},r=e(Array.prototype.forEach)?Array.prototype.forEach:function(e){if(void 0===this||null===this)throw new TypeError;var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var n=arguments[1],i=0;r>i;i++)i in t&&e.call(n,t[i],i,t)},n=e(Array.prototype.indexOf)?Array.prototype.indexOf:function(e,t){null===t||void 0===t?t=0:0>t&&(t=Math.max(0,this.length+t));for(var r=t,n=this.length;n>r;r++)if(this[r]===e)return r;return-1};Ember.ArrayPolyfills={map:t,forEach:r,indexOf:n},Ember.SHIM_ES5&&(Array.prototype.map||(Array.prototype.map=t),Array.prototype.forEach||(Array.prototype.forEach=r),Array.prototype.indexOf||(Array.prototype.indexOf=n))}(),function(){var e=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){var t=Error.apply(this,arguments);Error.captureStackTrace&&Error.captureStackTrace(this,Ember.Error);for(var r=0;r<e.length;r++)this[e[r]]=t[e[r]]},Ember.Error.prototype=Ember.create(Error.prototype),Ember.onerror=null,Ember.handleErrors=function(e,t){if("function"!=typeof Ember.onerror)return e.call(t||this);try{return e.call(t||this)}catch(r){Ember.onerror(r)}}}(),function(){function e(e){this.descs={},this.watching={},this.cache={},this.source=e}function t(e,t){return!(!e||"function"!=typeof e[t])}Ember.GUID_PREFIX="ember";var r=Ember.platform.defineProperty,n=Ember.create,i="__ember"+ +new Date,o=0,a=[],s={},u=Ember.ENV.MANDATORY_SETTER;Ember.GUID_KEY=i;var c={writable:!1,configurable:!1,enumerable:!1,value:null};Ember.generateGuid=function(e,t){t||(t=Ember.GUID_PREFIX);var n=t+o++;return e&&(c.value=n,r(e,i,c)),n},Ember.guidFor=function(e){if(void 0===e)return"(undefined)";if(null===e)return"(null)";var t,n=typeof e;switch(n){case"number":return t=a[e],t||(t=a[e]="nu"+e),t;case"string":return t=s[e],t||(t=s[e]="st"+o++),t;case"boolean":return e?"(true)":"(false)";default:return e[i]?e[i]:e===Object?"(Object)":e===Array?"(Array)":(t="ember"+o++,c.value=t,r(e,i,c),t)}};var l={writable:!0,configurable:!1,enumerable:!1,value:null},h=Ember.GUID_KEY+"_meta";Ember.META_KEY=h;var m={descs:{},watching:{}};u&&(m.values={}),Ember.EMPTY_META=m,Object.freeze&&Object.freeze(m);var f=Ember.platform.defineProperty.isSimulated;f&&(e.prototype.__preventPlainObject__=!0,e.prototype.toJSON=function(){}),Ember.meta=function(t,i){var o=t[h];return i===!1?o||m:(o?o.source!==t&&(f||r(t,h,l),o=n(o),o.descs=n(o.descs),o.watching=n(o.watching),o.cache={},o.source=t,u&&(o.values=n(o.values)),t[h]=o):(f||r(t,h,l),o=new e(t),u&&(o.values={}),t[h]=o,o.descs.constructor=null),o)},Ember.getMeta=function(e,t){var r=Ember.meta(e,!1);return r[t]},Ember.setMeta=function(e,t,r){var n=Ember.meta(e,!0);return n[t]=r,r},Ember.metaPath=function(e,t,r){for(var i,o,a=Ember.meta(e,r),s=0,u=t.length;u>s;s++){if(i=t[s],o=a[i]){if(o.__ember_source__!==e){if(!r)return void 0;o=a[i]=n(o),o.__ember_source__=e}}else{if(!r)return void 0;o=a[i]={__ember_source__:e}}a=o}return o},Ember.wrap=function(e,t){function r(){}function n(){var n,i=this._super;return this._super=t||r,n=e.apply(this,arguments),this._super=i,n}return n.wrappedFunction=e,n.__ember_observes__=e.__ember_observes__,n.__ember_observesBefore__=e.__ember_observesBefore__,n.__ember_listens__=e.__ember_listens__,n},Ember.isArray=function(e){return!e||e.setInterval?!1:Array.isArray&&Array.isArray(e)?!0:Ember.Array&&Ember.Array.detect(e)?!0:void 0!==e.length&&"object"==typeof e?!0:!1},Ember.makeArray=function(e){return null===e||void 0===e?[]:Ember.isArray(e)?e:[e]},Ember.canInvoke=t,Ember.tryInvoke=function(e,r,n){return t(e,r)?e[r].apply(e,n||[]):void 0};var p=function(){var e=0;try{try{}finally{throw e++,new Error("needsFinallyFixTest")}}catch(t){}return 1!==e}();Ember.tryFinally=p?function(e,t,r){var n,i,o;r=r||this;try{n=e.call(r)}finally{try{i=t.call(r)}catch(a){o=a}}if(o)throw o;return void 0===i?n:i}:function(e,t,r){var n,i;r=r||this;try{n=e.call(r)}finally{i=t.call(r)}return void 0===i?n:i},Ember.tryCatchFinally=p?function(e,t,r,n){var i,o,a;n=n||this;try{i=e.call(n)}catch(s){i=t.call(n,s)}finally{try{o=r.call(n)}catch(u){a=u}}if(a)throw a;return void 0===o?i:o}:function(e,t,r,n){var i,o;n=n||this;try{i=e.call(n)}catch(a){i=t.call(n,a)}finally{o=r.call(n)}return void 0===o?i:o};var d={},b="Boolean Number String Function Array Date RegExp Object".split(" ");Ember.ArrayPolyfills.forEach.call(b,function(e){d["[object "+e+"]"]=e.toLowerCase()});var E=Object.prototype.toString;Ember.typeOf=function(e){var t;return t=null===e||void 0===e?String(e):d[E.call(e)]||"object","function"===t?Ember.Object&&Ember.Object.detect(e)&&(t="class"):"object"===t&&(t=e instanceof Error?"error":Ember.Object&&e instanceof Ember.Object?"instance":"object"),t},Ember.inspect=function(e){var t=Ember.typeOf(e);if("array"===t)return"["+e+"]";if("object"!==t)return e+"";var r,n=[];for(var i in e)if(e.hasOwnProperty(i)){if(r=e[i],"toString"===r)continue;"function"===Ember.typeOf(r)&&(r="function() { ... }"),n.push(i+": "+r)}return"{"+n.join(", ")+"}"}}(),function(){Ember.Instrumentation={};var e=[],t={},r=function(r){for(var n,i=[],o=0,a=e.length;a>o;o++)n=e[o],n.regex.test(r)&&i.push(n.object);return t[r]=i,i},n=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,o,a){function s(){for(p=0,d=m.length;d>p;p++)f=m[p],b[p]=f.before(e,n(),i);return o.call(a)}function u(e){i=i||{},i.exception=e}function c(){for(p=0,d=m.length;d>p;p++)f=m[p],f.after(e,n(),i,b[p]);Ember.STRUCTURED_PROFILE&&console.timeEnd(l)}var l,h,m=t[e];if(Ember.STRUCTURED_PROFILE&&(l=e+": "+i.object,console.time(l)),m||(m=r(e)),0===m.length)return h=o.call(a),Ember.STRUCTURED_PROFILE&&console.timeEnd(l),h;var f,p,d,b=[];return Ember.tryCatchFinally(s,u,c)},Ember.Instrumentation.subscribe=function(r,n){for(var i,o=r.split("."),a=[],s=0,u=o.length;u>s;s++)i=o[s],"*"===i?a.push("[^\\.]*"):a.push(i);a=a.join("\\."),a+="(\\..*)?";var c={pattern:r,regex:new RegExp("^"+a+"$"),object:n};return e.push(c),t={},c},Ember.Instrumentation.unsubscribe=function(r){for(var n,i=0,o=e.length;o>i;i++)e[i]===r&&(n=i);e.splice(n,1),t={}},Ember.Instrumentation.reset=function(){e=[],t={}},Ember.instrument=Ember.Instrumentation.instrument,Ember.subscribe=Ember.Instrumentation.subscribe}(),function(){var e,t,r,n;e=Array.prototype.map||Ember.ArrayPolyfills.map,t=Array.prototype.forEach||Ember.ArrayPolyfills.forEach,r=Array.prototype.indexOf||Ember.ArrayPolyfills.indexOf,n=Array.prototype.splice;var i=Ember.EnumerableUtils={map:function(t,r,n){return t.map?t.map.call(t,r,n):e.call(t,r,n)},forEach:function(e,r,n){return e.forEach?e.forEach.call(e,r,n):t.call(e,r,n)},indexOf:function(e,t,n){return e.indexOf?e.indexOf.call(e,t,n):r.call(e,t,n)},indexesOf:function(e,t){return void 0===t?[]:i.map(t,function(t){return i.indexOf(e,t)})},addObject:function(e,t){var r=i.indexOf(e,t);-1===r&&e.push(t)},removeObject:function(e,t){var r=i.indexOf(e,t);-1!==r&&e.splice(r,1)},_replace:function(e,t,r,i){for(var o,a,s=[].concat(i),u=[],c=6e4,l=t,h=r;s.length;)a=h>c?c:h,0>=a&&(a=0),o=s.splice(0,c),o=[l,a].concat(o),l+=c,h-=a,u=u.concat(n.apply(e,o));return u},replace:function(e,t,r,n){return e.replace?e.replace(t,r,n):i._replace(e,t,r,n)},intersection:function(e,t){var r=[];return i.forEach(e,function(e){i.indexOf(t,e)>=0&&r.push(e)}),r}}}(),function(){var e,t=Ember.META_KEY,r=Ember.ENV.MANDATORY_SETTER,n=/^([A-Z$]|([0-9][A-Z$])).*[\.\*]/,i=/^this[\.\*]/,o=/^([^\.\*]+)/;e=function(e,n){if(""===n)return e;if(n||"string"!=typeof e||(n=e,e=null),null===e||-1!==n.indexOf("."))return s(e,n);var i,o=e[t],a=o&&o.descs[n];return a?a.get(e,n):(i=r&&o&&o.watching[n]>0?o.values[n]:e[n],void 0!==i||"object"!=typeof e||n in e||"function"!=typeof e.unknownProperty?i:e.unknownProperty(n))},Ember.config.overrideAccessors&&(Ember.get=e,Ember.config.overrideAccessors(),e=Ember.get);var a=Ember.normalizeTuple=function(t,r){var a,s=i.test(r),u=!s&&n.test(r);if((!t||u)&&(t=Ember.lookup),s&&(r=r.slice(5)),t===Ember.lookup&&(a=r.match(o)[0],t=e(t,a),r=r.slice(a.length+1)),!r||0===r.length)throw new Ember.Error("Path cannot be empty");return[t,r]},s=Ember._getPath=function(t,r){var n,o,s,u,c;if(null===t&&-1===r.indexOf("."))return e(Ember.lookup,r);for(n=i.test(r),(!t||n)&&(s=a(t,r),t=s[0],r=s[1],s.length=0),o=r.split("."),c=o.length,u=0;null!=t&&c>u;u++)if(t=e(t,o[u],!0),t&&t.isDestroyed)return void 0;return t};Ember.getWithDefault=function(t,r,n){var i=e(t,r);return void 0===i?n:i},Ember.get=e}(),function(){function e(e,t,r){for(var n=-1,i=0,o=e.length;o>i;i+=3)if(t===e[i]&&r===e[i+1]){n=i;break}return n}function t(e,t){var r,n=f(e,!0);return n.listeners||(n.listeners={}),n.hasOwnProperty("listeners")||(n.listeners=m(n.listeners)),r=n.listeners[t],r&&!n.listeners.hasOwnProperty(t)?r=n.listeners[t]=n.listeners[t].slice():r||(r=n.listeners[t]=[]),r}function r(t,r,n){var i=t[p],o=i&&i.listeners&&i.listeners[r];if(o)for(var a=o.length-3;a>=0;a-=3){var s=o[a],u=o[a+1],c=o[a+2],l=e(n,s,u);-1===l&&n.push(s,u,c)}}function n(t,r,n){var i=t[p],o=i&&i.listeners&&i.listeners[r],a=[];if(o){for(var s=o.length-3;s>=0;s-=3){var u=o[s],c=o[s+1],l=o[s+2],h=e(n,u,c);-1===h&&(n.push(u,c,l),a.push(u,c,l))}return a}}function i(r,n,i,o,a){o||"function"!=typeof i||(o=i,i=null);var s=t(r,n),u=e(s,i,o),c=0;a&&(c|=b),-1===u&&(s.push(i,o,c),"function"==typeof r.didAddListener&&r.didAddListener(n,i,o))}function o(r,n,i,o){function a(i,o){var a=t(r,n),s=e(a,i,o);-1!==s&&(a.splice(s,3),"function"==typeof r.didRemoveListener&&r.didRemoveListener(n,i,o))}if(o||"function"!=typeof i||(o=i,i=null),o)a(i,o);else{var s=r[p],u=s&&s.listeners&&s.listeners[n];if(!u)return;for(var c=u.length-3;c>=0;c-=3)a(u[c],u[c+1])}}function a(r,n,i,o,a){function s(){return a.call(i)}function u(){-1!==l&&(c[l+2]&=~E)}o||"function"!=typeof i||(o=i,i=null);var c=t(r,n),l=e(c,i,o);return-1!==l&&(c[l+2]|=E),Ember.tryFinally(s,u)}function s(r,n,i,o,a){function s(){return a.call(i)}function u(){for(var e=0,t=f.length;t>e;e++){var r=f[e];p[e][r+2]&=~E}}o||"function"!=typeof i||(o=i,i=null);var c,l,h,m,f=[],p=[];for(h=0,m=n.length;m>h;h++){c=n[h],l=t(r,c);var d=e(l,i,o);-1!==d&&(l[d+2]|=E,f.push(d),p.push(l))}return Ember.tryFinally(s,u)}function u(e){var t=e[p].listeners,r=[];if(t)for(var n in t)t[n]&&r.push(n);return r}function c(e,t,r,n){if(e!==Ember&&"function"==typeof e.sendEvent&&e.sendEvent(t,r),!n){var i=e[p];n=i&&i.listeners&&i.listeners[t]}if(n){for(var a=n.length-3;a>=0;a-=3){var s=n[a],u=n[a+1],c=n[a+2];u&&(c&E||(c&b&&o(e,t,s,u),s||(s=e),"string"==typeof u&&(u=s[u]),r?u.apply(s,r):u.call(s)))}return!0}}function l(e,t){var r=e[p],n=r&&r.listeners&&r.listeners[t];return!(!n||!n.length)}function h(e,t){var r=[],n=e[p],i=n&&n.listeners&&n.listeners[t];if(!i)return r;for(var o=0,a=i.length;a>o;o+=3){var s=i[o],u=i[o+1];r.push([s,u])}return r}var m=Ember.create,f=Ember.meta,p=Ember.META_KEY,d=[].slice,b=1,E=2;Ember.on=function(){var e=d.call(arguments,-1)[0],t=d.call(arguments,0,-1);return e.__ember_listens__=t,e},Ember.addListener=i,Ember.removeListener=o,Ember._suspendListener=a,Ember._suspendListeners=s,Ember.sendEvent=c,Ember.hasListeners=l,Ember.watchedEvents=u,Ember.listenersFor=h,Ember.listenersDiff=n,Ember.listenersUnion=r}(),function(){var e=Ember.guidFor,t=Ember.sendEvent,r=Ember._ObserverSet=function(){this.clear()};r.prototype.add=function(t,r,n){var i,o=this.observerSet,a=this.observers,s=e(t),u=o[s];return u||(o[s]=u={}),i=u[r],void 0===i&&(i=a.push({sender:t,keyName:r,eventName:n,listeners:[]})-1,u[r]=i),a[i].listeners},r.prototype.flush=function(){var e,r,n,i,o=this.observers;for(this.clear(),e=0,r=o.length;r>e;++e)n=o[e],i=n.sender,i.isDestroying||i.isDestroyed||t(i,n.eventName,[i,n.keyName],n.listeners)},r.prototype.clear=function(){this.observerSet={},this.observers=[]}}(),function(){function e(e,t){var n=h(e,!1),i=n.watching[t]>0||"length"===t,a=n.proto,s=n.descs[t];i&&a!==e&&(s&&s.willChange&&s.willChange(e,t),r(e,t,n),o(e,t,n),c(e,t))}function t(e,t){var r=h(e,!1),i=r.watching[t]>0||"length"===t,o=r.proto,s=r.descs[t];o!==e&&(s&&s.didChange&&s.didChange(e,t),(i||"length"===t)&&(n(e,t,r),a(e,t,r,!1),l(e,t)))}function r(t,r,n){if(!t.isDestroying){var o=w,a=!o;a&&(o=w={}),i(e,t,r,o,n),a&&(w=null)}}function n(e,r,n){if(!e.isDestroying){var o=_,a=!o;a&&(o=_={}),i(t,e,r,o,n),a&&(_=null)}}function i(e,t,r,n,i){var o=m(t);if(n[o]||(n[o]={}),!n[o][r]){n[o][r]=!0;var a=i.deps;if(a=a&&a[r])for(var s in a){var u=i.descs[s];u&&u._suspended===t||e(t,s)}}}function o(t,r,n){if(n.hasOwnProperty("chainWatchers")&&n.chainWatchers[r]){var i,o,a=n.chainWatchers[r],s=[];for(i=0,o=a.length;o>i;i++)a[i].willChange(s);for(i=0,o=s.length;o>i;i+=2)e(s[i],s[i+1])}}function a(e,r,n,i){if(n.hasOwnProperty("chainWatchers")&&n.chainWatchers[r]){var o,a,s=n.chainWatchers[r],u=i?null:[];for(o=0,a=s.length;a>o;o++)s[o].didChange(u);if(!i)for(o=0,a=u.length;a>o;o+=2)t(u[o],u[o+1])}}function s(){y++}function u(){y--,0>=y&&(v.clear(),g.flush())}function c(e,t){if(!e.isDestroying){var r,n,i=t+":before";y?(r=v.add(e,t,i),n=b(e,i,r),p(e,i,[e,t],n)):p(e,i,[e,t])}}function l(e,t){if(!e.isDestroying){var r,n=t+":change";y?(r=g.add(e,t,n),d(e,n,r)):p(e,n,[e,t])}}var h=Ember.meta,m=Ember.guidFor,f=Ember.tryFinally,p=Ember.sendEvent,d=Ember.listenersUnion,b=Ember.listenersDiff,E=Ember._ObserverSet,v=new E,g=new E,y=0;Ember.propertyWillChange=e,Ember.propertyDidChange=t;var w,_;Ember.overrideChains=function(e,t,r){a(e,t,r,!0)},Ember.beginPropertyChanges=s,Ember.endPropertyChanges=u,Ember.changeProperties=function(e,t){s(),f(e,u,t)}}(),function(){function e(e,t,r,o){var a;if(a=t.slice(t.lastIndexOf(".")+1),t=t===a?a:t.slice(0,t.length-(a.length+1)),"this"!==t&&(e=n(e,t)),!a||0===a.length)throw new Ember.Error("Property set failed: You passed an empty path");if(!e){if(o)return;throw new Ember.Error('Property set failed: object in path "'+t+'" could not be found or was destroyed.')}return i(e,a,r)}var t=Ember.META_KEY,r=Ember.ENV.MANDATORY_SETTER,n=Ember._getPath,i=function(n,i,o,a){if("string"==typeof n&&(o=i,i=n,n=null),!n||-1!==i.indexOf("."))return e(n,i,o,a);var s,u,c=n[t],l=c&&c.descs[i];return l?l.set(n,i,o):(s="object"==typeof n&&!(i in n),s&&"function"==typeof n.setUnknownProperty?n.setUnknownProperty(i,o):c&&c.watching[i]>0?(u=r?c.values[i]:n[i],o!==u&&(Ember.propertyWillChange(n,i),r?void 0!==u||i in n?c.values[i]=o:Ember.defineProperty(n,i,null,o):n[i]=o,Ember.propertyDidChange(n,i))):n[i]=o),o};Ember.config.overrideAccessors&&(Ember.set=i,Ember.config.overrideAccessors(),i=Ember.set),Ember.set=i,Ember.trySet=function(e,t,r){return i(e,t,r,!0)}}(),function(){var e=Ember.set,t=Ember.guidFor,r=Ember.ArrayPolyfills.indexOf,n=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t},i=function(e,t){var r=e.keys.copy(),i=n(e.values);return t.keys=r,t.values=i,t.length=e.length,t},o=Ember.OrderedSet=function(){this.clear()};o.create=function(){return new o},o.prototype={clear:function(){this.presenceSet={},this.list=[]},add:function(e){var r=t(e),n=this.presenceSet,i=this.list;r in n||(n[r]=!0,i.push(e))},remove:function(e){var n=t(e),i=this.presenceSet,o=this.list;delete i[n];var a=r.call(o,e);a>-1&&o.splice(a,1)},isEmpty:function(){return 0===this.list.length},has:function(e){var r=t(e),n=this.presenceSet;return r in n},forEach:function(e,t){for(var r=this.toArray(),n=0,i=r.length;i>n;n++)e.call(t,r[n])},toArray:function(){return this.list.slice()},copy:function(){var e=new o;return e.presenceSet=n(this.presenceSet),e.list=this.toArray(),e}};var a=Ember.Map=function(){this.keys=Ember.OrderedSet.create(),this.values={}};a.create=function(){return new a},a.prototype={length:0,get:function(e){var r=this.values,n=t(e);return r[n]},set:function(r,n){var i=this.keys,o=this.values,a=t(r);i.add(r),o[a]=n,e(this,"length",i.list.length)},remove:function(r){var n=this.keys,i=this.values,o=t(r);return i.hasOwnProperty(o)?(n.remove(r),delete i[o],e(this,"length",n.list.length),!0):!1},has:function(e){var r=this.values,n=t(e);return r.hasOwnProperty(n)},forEach:function(e,r){var n=this.keys,i=this.values;n.forEach(function(n){var o=t(n);e.call(r,n,i[o])})},copy:function(){return i(this,new a)}};var s=Ember.MapWithDefault=function(e){a.call(this),this.defaultValue=e.defaultValue};s.create=function(e){return e?new s(e):new a},s.prototype=Ember.create(a.prototype),s.prototype.get=function(e){var t=this.has(e);if(t)return a.prototype.get.call(this,e);var r=this.defaultValue(e);return this.set(e,r),r},s.prototype.copy=function(){return i(this,new s({defaultValue:this.defaultValue}))}}(),function(){function e(e){var t,r;Ember.imports.console?t=Ember.imports.console:"undefined"!=typeof console&&(t=console);var n="object"==typeof t?t[e]:null;return n?n.apply?(r=function(){n.apply(t,arguments)},r.displayName="console."+e,r):function(){var e=Array.prototype.join.call(arguments,", ");n(e)}:void 0}function t(e,t){if(!e)try{throw new Ember.Error("assertion failed: "+t)}catch(r){setTimeout(function(){throw r},0)}}Ember.Logger={log:e("log")||Ember.K,warn:e("warn")||Ember.K,error:e("error")||Ember.K,info:e("info")||Ember.K,debug:e("debug")||e("info")||Ember.K,assert:e("assert")||t}}(),function(){var e=Ember.META_KEY,t=Ember.meta,r=Ember.platform.defineProperty,n=Ember.ENV.MANDATORY_SETTER;Ember.Descriptor=function(){};var i=Ember.MANDATORY_SETTER_FUNCTION=function(){},o=Ember.DEFAULT_GETTER_FUNCTION=function(t){return function(){var r=this[e];return r&&r.values[t]}};Ember.defineProperty=function(e,a,s,u,c){var l,h,m,f;return c||(c=t(e)),l=c.descs,h=c.descs[a],m=c.watching[a]>0,h instanceof Ember.Descriptor&&h.teardown(e,a),s instanceof Ember.Descriptor?(f=s,l[a]=s,n&&m?r(e,a,{configurable:!0,enumerable:!0,writable:!0,value:void 0}):e[a]=void 0):(l[a]=void 0,null==s?(f=u,n&&m?(c.values[a]=u,r(e,a,{configurable:!0,enumerable:!0,set:i,get:o(a)})):e[a]=u):(f=s,r(e,a,s))),m&&Ember.overrideChains(e,a,c),e.didDefineProperty&&e.didDefineProperty(e,a,f),this}}(),function(){var e=Ember.get;Ember.getProperties=function(t){var r={},n=arguments,i=1;2===arguments.length&&"array"===Ember.typeOf(arguments[1])&&(i=0,n=arguments[1]);for(var o=n.length;o>i;i++)r[n[i]]=e(t,n[i]);return r}}(),function(){var e=Ember.changeProperties,t=Ember.set;Ember.setProperties=function(r,n){return e(function(){for(var e in n)n.hasOwnProperty(e)&&t(r,e,n[e])}),r}}(),function(){var e=Ember.meta,t=Ember.typeOf,r=Ember.ENV.MANDATORY_SETTER,n=Ember.platform.defineProperty;Ember.watchKey=function(i,o){if("length"!==o||"array"!==t(i)){var a=e(i),s=a.watching;s[o]?s[o]=(s[o]||0)+1:(s[o]=1,"function"==typeof i.willWatchProperty&&i.willWatchProperty(o),r&&o in i&&(a.values[o]=i[o],n(i,o,{configurable:!0,enumerable:!0,set:Ember.MANDATORY_SETTER_FUNCTION,get:Ember.DEFAULT_GETTER_FUNCTION(o)})))}},Ember.unwatchKey=function(t,i){var o=e(t),a=o.watching;1===a[i]?(a[i]=0,"function"==typeof t.didUnwatchProperty&&t.didUnwatchProperty(i),r&&i in t&&(n(t,i,{configurable:!0,enumerable:!0,writable:!0,value:o.values[i]}),delete o.values[i])):a[i]>1&&a[i]--}}(),function(){function e(e){return e.match(l)[0]}function t(e,t,r){if(e&&"object"==typeof e){var i=n(e),o=i.chainWatchers;i.hasOwnProperty("chainWatchers")||(o=i.chainWatchers={}),o[t]||(o[t]=[]),o[t].push(r),u(e,t)}}function r(e,t){if(!e)return void 0;var r=n(e,!1);if(r.proto===e)return void 0;if("@each"===t)return i(e,t);var o=r.descs[t];return o&&o._cacheable?t in r.cache?r.cache[t]:void 0:i(e,t)}var n=Ember.meta,i=Ember.get,o=Ember.normalizeTuple,a=Ember.ArrayPolyfills.forEach,s=Ember.warn,u=Ember.watchKey,c=Ember.unwatchKey,l=/^([^\.\*]+)/,h=[];Ember.flushPendingChains=function(){if(0!==h.length){var e=h;h=[],a.call(e,function(e){e[0].add(e[1])}),s("Watching an undefined global, Ember expects watched globals to be setup by the time the run loop is flushed, check for typos",0===h.length)}};var m=Ember.removeChainWatcher=function(e,t,r){if(e&&"object"==typeof e){var i=n(e,!1);if(i.hasOwnProperty("chainWatchers")){var o=i.chainWatchers;if(o[t]){o=o[t];for(var a=0,s=o.length;s>a;a++)o[a]===r&&o.splice(a,1)}c(e,t)}}},f=Ember._ChainNode=function(e,r,n){this._parent=e,this._key=r,this._watching=void 0===n,this._value=n,this._paths={},this._watching&&(this._object=e.value(),this._object&&t(this._object,this._key,this)),this._parent&&"@each"===this._parent._key&&this.value()},p=f.prototype;p.value=function(){if(void 0===this._value&&this._watching){var e=this._parent.value();this._value=r(e,this._key)}return this._value},p.destroy=function(){if(this._watching){var e=this._object;e&&m(e,this._key,this),this._watching=!1}},p.copy=function(e){var t,r=new f(null,null,e),n=this._paths;for(t in n)n[t]<=0||r.add(t);return r},p.add=function(t){var r,n,i,a,s;if(s=this._paths,s[t]=(s[t]||0)+1,r=this.value(),n=o(r,t),n[0]&&n[0]===r)t=n[1],i=e(t),t=t.slice(i.length+1);else{if(!n[0])return h.push([this,t]),n.length=0,void 0;a=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]}n.length=0,this.chain(i,t,a)},p.remove=function(t){var r,n,i,a,s;s=this._paths,s[t]>0&&s[t]--,r=this.value(),n=o(r,t),n[0]===r?(t=n[1],i=e(t),t=t.slice(i.length+1)):(a=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]),n.length=0,this.unchain(i,t)},p.count=0,p.chain=function(t,r,n){var i,o=this._chains;o||(o=this._chains={}),i=o[t],i||(i=o[t]=new f(this,t,n)),i.count++,r&&r.length>0&&(t=e(r),r=r.slice(t.length+1),i.chain(t,r))},p.unchain=function(t,r){var n=this._chains,i=n[t];r&&r.length>1&&(t=e(r),r=r.slice(t.length+1),i.unchain(t,r)),i.count--,i.count<=0&&(delete n[i._key],i.destroy())},p.willChange=function(e){var t=this._chains;if(t)for(var r in t)t.hasOwnProperty(r)&&t[r].willChange(e);this._parent&&this._parent.chainWillChange(this,this._key,1,e)},p.chainWillChange=function(e,t,r,n){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainWillChange(this,t,r+1,n):(r>1&&n.push(this.value(),t),t="this."+t,this._paths[t]>0&&n.push(this.value(),t))},p.chainDidChange=function(e,t,r,n){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainDidChange(this,t,r+1,n):(r>1&&n.push(this.value(),t),t="this."+t,this._paths[t]>0&&n.push(this.value(),t))},p.didChange=function(e){if(this._watching){var r=this._parent.value();r!==this._object&&(m(this._object,this._key,this),this._object=r,t(r,this._key,this)),this._value=void 0,this._parent&&"@each"===this._parent._key&&this.value()}var n=this._chains;if(n)for(var i in n)n.hasOwnProperty(i)&&n[i].didChange(e);null!==e&&this._parent&&this._parent.chainDidChange(this,this._key,1,e)},Ember.finishChains=function(e){var t=n(e,!1),r=t.chains;r&&(r.value()!==e&&(t.chains=r=r.copy(e)),r.didChange(null))}}(),function(){if(Ember.FEATURES.isEnabled("propertyBraceExpansion")){var e=Ember.EnumerableUtils.forEach,t=/^((?:[^\.]*\.)*)\{(.*)\}$/;Ember.expandProperties=function(r,n){var i,o,a;(i=t.exec(r))?(o=i[1],a=i[2],e(a.split(","),function(e){n(o+e)})):n(r)}}}(),function(){function e(e){var r=t(e),i=r.chains;return i?i.value()!==e&&(i=r.chains=i.copy(e)):i=r.chains=new n(null,null,e),i}var t=Ember.meta,r=Ember.typeOf,n=Ember._ChainNode;Ember.watchPath=function(n,i){if("length"!==i||"array"!==r(n)){var o=t(n),a=o.watching;a[i]?a[i]=(a[i]||0)+1:(a[i]=1,e(n).add(i))}},Ember.unwatchPath=function(r,n){var i=t(r),o=i.watching;1===o[n]?(o[n]=0,e(r).remove(n)):o[n]>1&&o[n]--}}(),function(){function e(e){return"*"===e||!h.test(e)}var t=Ember.meta,r=Ember.GUID_KEY,n=Ember.META_KEY,i=Ember.removeChainWatcher,o=Ember.watchKey,a=Ember.unwatchKey,s=Ember.watchPath,u=Ember.unwatchPath,c=Ember.typeOf,l=Ember.generateGuid,h=/[\.\*]/;Ember.watch=function(t,r){("length"!==r||"array"!==c(t))&&(e(r)?o(t,r):s(t,r))},Ember.isWatching=function(e,t){var r=e[n];return(r&&r.watching[t])>0},Ember.watch.flushPending=Ember.flushPendingChains,Ember.unwatch=function(t,r){("length"!==r||"array"!==c(t))&&(e(r)?a(t,r):u(t,r))},Ember.rewatch=function(e){var n=t(e,!1),i=n.chains;r in e&&!e.hasOwnProperty(r)&&l(e),i&&i.value()!==e&&(n.chains=i.copy(e))};var m=[];Ember.destroy=function(e){var t,r,o,a,s=e[n];if(s&&(e[n]=null,t=s.chains))for(m.push(t);m.length>0;){if(t=m.pop(),r=t._chains)for(o in r)r.hasOwnProperty(o)&&m.push(r[o]);t._watching&&(a=t._object,a&&i(a,t._key,t))}}}(),function(){function e(e,t){var r=e[t];return r?e.hasOwnProperty(t)||(r=e[t]=f(r)):r=e[t]={},r}function t(t){return e(t,"deps")}function r(r,n,i,o){var a,s,u,c,l,h=r._dependentKeys;if(h)for(a=t(o),s=0,u=h.length;u>s;s++)c=h[s],l=e(a,c),l[i]=(l[i]||0)+1,p(n,c)}function n(r,n,i,o){var a,s,u,c,l,h=r._dependentKeys;if(h)for(a=t(o),s=0,u=h.length;u>s;s++)c=h[s],l=e(a,c),l[i]=(l[i]||0)-1,d(n,c)}function i(e,t){this.func=e,this._cacheable=t&&void 0!==t.cacheable?t.cacheable:!0,this._dependentKeys=t&&t.dependentKeys,this._readOnly=t&&(void 0!==t.readOnly||!!t.readOnly)}function o(e){for(var t=0,r=e.length;r>t;t++)e[t].didChange(null)}function a(e,t){for(var r={},n=0;n<t.length;n++)r[t[n]]=c(e,t[n]);return r}function s(e,t){Ember.computed[e]=function(e){var r=m.call(arguments);return Ember.computed(e,function(){return t.apply(this,r)})}}function u(e,t){Ember.computed[e]=function(){var e=m.call(arguments),r=Ember.computed(function(){return t.apply(this,[a(this,e)])});return r.property.apply(r,e)}}var c=Ember.get,l=Ember.set,h=Ember.meta,m=[].slice,f=Ember.create,p=(Ember.META_KEY,Ember.watch),d=Ember.unwatch;if(Ember.FEATURES.isEnabled("propertyBraceExpansion"))var b=Ember.expandProperties;Ember.ComputedProperty=i,i.prototype=new Ember.Descriptor;var E=i.prototype;E.cacheable=function(e){return this._cacheable=e!==!1,this},E.volatile=function(){return this.cacheable(!1)},E.readOnly=function(e){return this._readOnly=void 0===e||!!e,this},E.property=function(){var e;if(Ember.FEATURES.isEnabled("propertyBraceExpansion")){var t=function(t){e.push(t)};e=[];for(var r=0,n=arguments.length;n>r;r++)b(arguments[r],t)}else e=m.call(arguments);return this._dependentKeys=e,this},E.meta=function(e){return 0===arguments.length?this._meta||{}:(this._meta=e,this)},E.didChange=function(e,t){if(this._cacheable&&this._suspended!==e){var r=h(e);t in r.cache&&(delete r.cache[t],n(this,e,t,r))}},E.get=function(e,t){var n,i,a,s;if(this._cacheable){if(a=h(e),i=a.cache,t in i)return i[t];n=i[t]=this.func.call(e,t),s=a.chainWatchers&&a.chainWatchers[t],s&&o(s),r(this,e,t,a)}else n=this.func.call(e,t);return n},E.set=function(e,t,n){var i,o,a,s=this._cacheable,u=this.func,c=h(e,s),l=c.watching[t],m=this._suspended,f=!1,p=c.cache;if(this._readOnly)throw new Ember.Error("Cannot Set: "+t+" on: "+Ember.inspect(e));this._suspended=e;try{if(s&&p.hasOwnProperty(t)&&(o=p[t],f=!0),i=u.wrappedFunction?u.wrappedFunction.length:u.length,3===i)a=u.call(e,t,n,o);else{if(2!==i)return Ember.defineProperty(e,t,null,o),Ember.set(e,t,n),void 0;a=u.call(e,t,n)}if(f&&o===a)return;l&&Ember.propertyWillChange(e,t),f&&delete p[t],s&&(f||r(this,e,t,c),p[t]=a),l&&Ember.propertyDidChange(e,t)}finally{this._suspended=m}return a},E.teardown=function(e,t){var r=h(e);return t in r.cache&&n(this,e,t,r),this._cacheable&&delete r.cache[t],null},Ember.computed=function(e){var t;if(arguments.length>1&&(t=m.call(arguments,0,-1),e=m.call(arguments,-1)[0]),"function"!=typeof e)throw new Ember.Error("Computed Property declared without a property function");var r=new i(e);return t&&r.property.apply(r,t),r},Ember.cacheFor=function(e,t){var r=h(e,!1).cache;return r&&t in r?r[t]:void 0},s("empty",function(e){return Ember.isEmpty(c(this,e))}),s("notEmpty",function(e){return!Ember.isEmpty(c(this,e))}),s("none",function(e){return Ember.isNone(c(this,e))}),s("not",function(e){return!c(this,e)}),s("bool",function(e){return!!c(this,e)}),s("match",function(e,t){var r=c(this,e);return"string"==typeof r?t.test(r):!1}),s("equal",function(e,t){return c(this,e)===t}),s("gt",function(e,t){return c(this,e)>t}),s("gte",function(e,t){return c(this,e)>=t}),s("lt",function(e,t){return c(this,e)<t}),s("lte",function(e,t){return c(this,e)<=t}),u("and",function(e){for(var t in e)if(e.hasOwnProperty(t)&&!e[t])return!1;return!0}),u("or",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!0;return!1}),u("any",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return e[t];return null}),u("collect",function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&(Ember.isNone(e[r])?t.push(null):t.push(e[r]));return t}),Ember.computed.alias=function(e){return Ember.computed(e,function(t,r){return arguments.length>1?(l(this,e,r),r):c(this,e)})},Ember.computed.oneWay=function(e){return Ember.computed(e,function(){return c(this,e)})},Ember.FEATURES.isEnabled("computed-read-only")&&(Ember.computed.readOnly=function(e){return Ember.computed(e,function(){return c(this,e)}).readOnly()}),Ember.computed.defaultTo=function(e){return Ember.computed(function(t,r,n){return 1===arguments.length?null!=n?n:c(this,e):null!=r?r:c(this,e)
11
+ })}}(),function(){function e(e){return e+r}function t(e){return e+n}var r=":change",n=":before";Ember.addObserver=function(t,r,n,i){return Ember.addListener(t,e(r),n,i),Ember.watch(t,r),this},Ember.observersFor=function(t,r){return Ember.listenersFor(t,e(r))},Ember.removeObserver=function(t,r,n,i){return Ember.unwatch(t,r),Ember.removeListener(t,e(r),n,i),this},Ember.addBeforeObserver=function(e,r,n,i){return Ember.addListener(e,t(r),n,i),Ember.watch(e,r),this},Ember._suspendBeforeObserver=function(e,r,n,i,o){return Ember._suspendListener(e,t(r),n,i,o)},Ember._suspendObserver=function(t,r,n,i,o){return Ember._suspendListener(t,e(r),n,i,o)};var i=Ember.ArrayPolyfills.map;Ember._suspendBeforeObservers=function(e,r,n,o,a){var s=i.call(r,t);return Ember._suspendListeners(e,s,n,o,a)},Ember._suspendObservers=function(t,r,n,o,a){var s=i.call(r,e);return Ember._suspendListeners(t,s,n,o,a)},Ember.beforeObserversFor=function(e,r){return Ember.listenersFor(e,t(r))},Ember.removeBeforeObserver=function(e,r,n,i){return Ember.unwatch(e,r),Ember.removeListener(e,t(r),n,i),this}}(),function(){e("backburner/queue",["exports"],function(e){"use strict";function t(e,t,r){this.daq=e,this.name=t,this.options=r,this._queue=[]}t.prototype={daq:null,name:null,options:null,_queue:null,push:function(e,t,r,n){var i=this._queue;return i.push(e,t,r,n),{queue:this,target:e,method:t}},pushUnique:function(e,t,r,n){var i,o,a,s,u=this._queue;for(a=0,s=u.length;s>a;a+=4)if(i=u[a],o=u[a+1],i===e&&o===t)return u[a+2]=r,u[a+3]=n,{queue:this,target:e,method:t};return this._queue.push(e,t,r,n),{queue:this,target:e,method:t}},flush:function(){var e,t,r,n,i,o=this._queue,a=this.options,s=a&&a.before,u=a&&a.after,c=o.length;for(c&&s&&s(),i=0;c>i;i+=4)e=o[i],t=o[i+1],r=o[i+2],n=o[i+3],r&&r.length>0?t.apply(e,r):t.call(e);c&&u&&u(),o.length>c?(this._queue=o.slice(c),this.flush()):this._queue.length=0},cancel:function(e){var t,r,n,i,o=this._queue;for(n=0,i=o.length;i>n;n+=4)if(t=o[n],r=o[n+1],t===e.target&&r===e.method)return o.splice(n,4),!0;if(o=this._queueBeingFlushed)for(n=0,i=o.length;i>n;n+=4)if(t=o[n],r=o[n+1],t===e.target&&r===e.method)return o[n+1]=null,!0}},e.Queue=t}),e("backburner/deferred_action_queues",["backburner/queue","exports"],function(e,t){"use strict";function r(e,t){var r=this.queues={};this.queueNames=e=e||[];for(var n,o=0,a=e.length;a>o;o++)n=e[o],r[n]=new i(this,n,t[n])}function n(e,t){for(var r,n,i=0,o=t;o>=i;i++)if(r=e.queueNames[i],n=e.queues[r],n._queue.length)return i;return-1}var i=e.Queue;r.prototype={queueNames:null,queues:null,schedule:function(e,t,r,n,i,o){var a=this.queues,s=a[e];if(!s)throw new Error("You attempted to schedule an action in a queue ("+e+") that doesn't exist");return i?s.pushUnique(t,r,n,o):s.push(t,r,n,o)},flush:function(){for(var e,t,r,i,o=this.queues,a=this.queueNames,s=0,u=a.length;u>s;){e=a[s],t=o[e],r=t._queueBeingFlushed=t._queue.slice(),t._queue=[];var c,l,h,m,f=t.options,p=f&&f.before,d=f&&f.after,b=0,E=r.length;for(E&&p&&p();E>b;)c=r[b],l=r[b+1],h=r[b+2],m=r[b+3],"string"==typeof l&&(l=c[l]),l&&(h&&h.length>0?l.apply(c,h):l.call(c)),b+=4;t._queueBeingFlushed=null,E&&d&&d(),-1===(i=n(this,s))?s++:s=i}}},t.DeferredActionQueues=r}),e("backburner",["backburner/deferred_action_queues","exports"],function(e,t){"use strict";function r(e){return"number"==typeof e||g.test(e)}function n(e,t){this.queueNames=e,this.options=t||{},this.options.defaultQueue||(this.options.defaultQueue=e[0]),this.instanceStack=[]}function i(e){e.begin(),c=v.setTimeout(function(){c=null,e.end()})}function o(e,t,r){(!l||h>t)&&(l&&clearTimeout(l),l=v.setTimeout(function(){l=null,h=null,a(e)},r),h=t)}function a(e){var t,r,n,i,a=+new Date;e.run(function(){for(n=0,i=E.length;i>n&&(t=E[n],!(t>a));n+=2);for(r=E.splice(0,n),n=1,i=r.length;i>n;n+=2)e.schedule(e.options.defaultQueue,null,r[n])}),E.length&&o(e,E[0],E[0]-a)}function s(e,t){for(var r,n=-1,i=0,o=b.length;o>i;i++)if(r=b[i],r[0]===e&&r[1]===t){n=i;break}return n}function u(e,t){for(var r,n=-1,i=0,o=d.length;o>i;i++)if(r=d[i],r[0]===e&&r[1]===t){n=i;break}return n}var c,l,h,m=e.DeferredActionQueues,f=[].slice,p=[].pop,d=[],b=[],E=[],v=this,g=/\d+/;n.prototype={queueNames:null,options:null,currentInstance:null,instanceStack:null,begin:function(){var e=this.options&&this.options.onBegin,t=this.currentInstance;t&&this.instanceStack.push(t),this.currentInstance=new m(this.queueNames,this.options),e&&e(this.currentInstance,t)},end:function(){var e=this.options&&this.options.onEnd,t=this.currentInstance,r=null;try{t.flush()}finally{this.currentInstance=null,this.instanceStack.length&&(r=this.instanceStack.pop(),this.currentInstance=r),e&&e(t,r)}},run:function(e,t){var r;this.begin(),t||(t=e,e=null),"string"==typeof t&&(t=e[t]);var n=!1;try{r=arguments.length>2?t.apply(e,f.call(arguments,2)):t.call(e)}finally{n||(n=!0,this.end())}return r},defer:function(e,t,r){r||(r=t,t=null),"string"==typeof r&&(r=t[r]);var n=this.DEBUG?(new Error).stack:void 0,o=arguments.length>3?f.call(arguments,3):void 0;return this.currentInstance||i(this),this.currentInstance.schedule(e,t,r,o,!1,n)},deferOnce:function(e,t,r){r||(r=t,t=null),"string"==typeof r&&(r=t[r]);var n=this.DEBUG?(new Error).stack:void 0,o=arguments.length>3?f.call(arguments,3):void 0;return this.currentInstance||i(this),this.currentInstance.schedule(e,t,r,o,!0,n)},setTimeout:function(){function e(){t.apply(i,c)}var t,n,i,a,s,u,c=f.call(arguments),l=c.length,h=this;if(0!==l){if(1===l)t=c.shift(),n=0;else if(2===l)a=c[0],s=c[1],"function"==typeof s||"function"==typeof a[s]?(i=c.shift(),t=c.shift(),n=0):r(s)?(t=c.shift(),n=c.shift()):(t=c.shift(),n=0);else{var m=c[c.length-1];r(m)&&(n=c.pop()),a=c[0],u=c[1],"function"==typeof u||"string"==typeof u&&null!==a&&u in a?(i=c.shift(),t=c.shift()):t=c.shift()}var p=+new Date+parseInt(n,10);"string"==typeof t&&(t=i[t]);var d,b;for(d=0,b=E.length;b>d&&!(p<E[d]);d+=2);return E.splice(d,0,p,e),o(h,p,n),e}},throttle:function(e,t){var r,n,i,o=this,a=arguments,s=parseInt(p.call(a),10);return n=u(e,t),n>-1?d[n]:(i=v.setTimeout(function(){o.run.apply(o,a);var r=u(e,t);r>-1&&d.splice(r,1)},s),r=[e,t,i],d.push(r),r)},debounce:function(e,t){var r,n,i,o,a=this,u=arguments,c=p.call(u);return"number"==typeof c||"string"==typeof c?(r=c,c=!1):r=p.call(u),r=parseInt(r,10),n=s(e,t),n>-1&&(i=b[n],b.splice(n,1),clearTimeout(i[2])),o=v.setTimeout(function(){c||a.run.apply(a,u);var r=s(e,t);r>-1&&b.splice(r,1)},r),c&&-1===n&&a.run.apply(a,u),i=[e,t,o],b.push(i),i},cancelTimers:function(){var e,t;for(e=0,t=d.length;t>e;e++)clearTimeout(d[e][2]);for(d=[],e=0,t=b.length;t>e;e++)clearTimeout(b[e][2]);b=[],l&&(clearTimeout(l),l=null),E=[],c&&(clearTimeout(c),c=null)},hasTimers:function(){return!!E.length||c},cancel:function(e){var t=typeof e;if(e&&"object"===t&&e.queue&&e.method)return e.queue.cancel(e);if("function"!==t)return"[object Array]"===window.toString.call(e)?this._cancelItem(u,d,e)||this._cancelItem(s,b,e):void 0;for(var r=0,n=E.length;n>r;r+=2)if(E[r+1]===e)return E.splice(r,2),!0},_cancelItem:function(e,t,r){var n,i;return r.length<3?!1:(i=e(r[0],r[1]),i>-1&&(n=t[i],n[2]===r[2])?(t.splice(i,1),clearTimeout(r[2]),!0):!1)}},n.prototype.schedule=n.prototype.defer,n.prototype.scheduleOnce=n.prototype.deferOnce,n.prototype.later=n.prototype.setTimeout,t.Backburner=n})}(),function(){function e(){!Ember.run.currentRunLoop}var r=function(e){Ember.run.currentRunLoop=e},n=function(e,t){Ember.run.currentRunLoop=t},i=t("backburner").Backburner,o=new i(["sync","actions","destroy"],{sync:{before:Ember.beginPropertyChanges,after:Ember.endPropertyChanges},defaultQueue:"actions",onBegin:r,onEnd:n}),a=[].slice;Ember.run=function(){var e;if(Ember.onerror)try{e=o.run.apply(o,arguments)}catch(t){Ember.onerror(t)}else e=o.run.apply(o,arguments);return e},Ember.run.join=function(){if(!Ember.run.currentRunLoop)return Ember.run.apply(Ember.run,arguments);var e=a.call(arguments);e.unshift("actions"),Ember.run.schedule.apply(Ember.run,e)},Ember.run.backburner=o;Ember.run;Ember.run.currentRunLoop=null,Ember.run.queues=o.queueNames,Ember.run.begin=function(){o.begin()},Ember.run.end=function(){o.end()},Ember.run.schedule=function(){e(),o.schedule.apply(o,arguments)},Ember.run.hasScheduledTimers=function(){return o.hasTimers()},Ember.run.cancelTimers=function(){o.cancelTimers()},Ember.run.sync=function(){o.currentInstance&&o.currentInstance.queues.sync.flush()},Ember.run.later=function(){return o.later.apply(o,arguments)},Ember.run.once=function(){e();var t=a.call(arguments);return t.unshift("actions"),o.scheduleOnce.apply(o,t)},Ember.run.scheduleOnce=function(){return e(),o.scheduleOnce.apply(o,arguments)},Ember.run.next=function(){var e=a.call(arguments);return e.push(1),o.later.apply(o,e)},Ember.run.cancel=function(e){return o.cancel(e)},Ember.run.debounce=function(){return o.debounce.apply(o,arguments)},Ember.run.throttle=function(){return o.throttle.apply(o,arguments)}}(),function(){function e(e,t){return r(o(t)?Ember.lookup:e,t)}function t(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}Ember.LOG_BINDINGS=!1||!!Ember.ENV.LOG_BINDINGS;var r=Ember.get,n=(Ember.set,Ember.guidFor),i=/^([A-Z$]|([0-9][A-Z$]))/,o=Ember.isGlobalPath=function(e){return i.test(e)},a=function(e,t){this._direction="fwd",this._from=t,this._to=e,this._directionMap=Ember.Map.create()};a.prototype={copy:function(){var e=new a(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(t){var r=this._from,n=this._to;return Ember.trySet(t,n,e(t,r)),Ember.addObserver(t,r,this,this.fromDidChange),this._oneWay||Ember.addObserver(t,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 r=this._directionMap,n=r.get(e);n||(Ember.run.schedule("sync",this,this._sync,e),r.set(e,t)),"back"===n&&"fwd"===t&&r.set(e,"fwd")},_sync:function(t){var n=Ember.LOG_BINDINGS;if(!t.isDestroyed&&this._readyToSync){var i=this._directionMap,o=i.get(t),a=this._from,s=this._to;if(i.remove(t),"fwd"===o){var u=e(t,this._from);n&&Ember.Logger.log(" ",this.toString(),"->",u,t),this._oneWay?Ember.trySet(t,s,u):Ember._suspendObserver(t,s,this,this.toDidChange,function(){Ember.trySet(t,s,u)})}else if("back"===o){var c=r(t,this._to);n&&Ember.Logger.log(" ",this.toString(),"<-",c,t),Ember._suspendObserver(t,a,this,this.fromDidChange,function(){Ember.trySet(Ember.isGlobalPath(a)?Ember.lookup:t,a,c)})}}}},t(a,{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 r=this,n=new r(null,e);return n.oneWay(t)}}),Ember.Binding=a,Ember.bind=function(e,t,r){return new Ember.Binding(t,r).connect(e)},Ember.oneWay=function(e,t,r){return new Ember.Binding(t,r).oneWay().connect(e)}}(),function(){function e(e){var t=Ember.meta(e,!0),r=t.mixins;return r?t.hasOwnProperty("mixins")||(r=t.mixins=x(r)):r=t.mixins={},r}function t(e,t){return t&&t.length>0&&(e.mixins=C.call(t,function(e){if(e instanceof y)return e;var t=new y;return t.properties=e,t})),e}function r(e){return"function"==typeof e&&e.isMethod!==!1&&e!==Boolean&&e!==Object&&e!==Number&&e!==Array&&e!==Date&&e!==String}function n(e,t){var r;return t instanceof y?(r=S(t),e[r]?N:(e[r]=t,t.properties)):t}function i(e,t,r,n){var i;return i=r[e]||n[e],t[e]&&(i=i?i.concat(t[e]):t[e]),i}function o(e,t,r,n,i){var o;return void 0===n[t]&&(o=i[t]),o=o||e.descs[t],o&&o instanceof Ember.ComputedProperty?(r=x(r),r.func=Ember.wrap(r.func,o.func),r):r}function a(e,t,r,n,i){var o;return void 0===i[t]&&(o=n[t]),o=o||e[t],"function"!=typeof o?r:Ember.wrap(r,o)}function s(e,t,r,n){var i=n[t]||e[t];return i?"function"==typeof i.concat?i.concat(r):Ember.makeArray(i).concat(r):Ember.makeArray(r)}function u(e,t,n,i){var o=i[t]||e[t];if(!o)return n;var s=Ember.merge({},o);for(var u in n)if(n.hasOwnProperty(u)){var c=n[u];s[u]=r(c)?a(e,u,c,o,{}):c}return s}function c(e,t,n,i,c,l,h,m){if(n instanceof Ember.Descriptor){if(n===w&&c[t])return N;n.func&&(n=o(i,t,n,l,c)),c[t]=n,l[t]=void 0}else h&&O.call(h,t)>=0||"concatenatedProperties"===t||"mergedProperties"===t?n=s(e,t,n,l):m&&O.call(m,t)>=0?n=u(e,t,n,l):r(n)&&(n=a(e,t,n,l,c)),c[t]=void 0,l[t]=n}function l(e,t,r,o,a,s){function u(e){delete r[e],delete o[e]}for(var h,m,f,p,d,b,E=0,v=e.length;v>E;E++)if(h=e[E],m=n(t,h),m!==N)if(m){b=Ember.meta(a),a.willMergeMixin&&a.willMergeMixin(m),p=i("concatenatedProperties",m,o,a),d=i("mergedProperties",m,o,a);for(f in m)m.hasOwnProperty(f)&&(s.push(f),c(a,f,m[f],b,r,o,p,d));m.hasOwnProperty("toString")&&(a.toString=m.toString)}else h.mixins&&(l(h.mixins,t,r,o,a,s),h._without&&A.call(h._without,u))}function h(e,t,r,n){if(R.test(t)){var i=n.bindings;i?n.hasOwnProperty("bindings")||(i=n.bindings=x(n.bindings)):i=n.bindings={},i[t]=r}}function m(e,t){var r,n,i,o=t.bindings;if(o){for(r in o)n=o[r],n&&(i=r.slice(0,-7),n instanceof Ember.Binding?(n=n.copy(),n.to(i)):n=new Ember.Binding(i,n),n.connect(e),e[r]=n);t.bindings={}}}function f(e,t){return m(e,t||Ember.meta(e)),e}function p(e,t,r,n,i){var o,a=t.methodName;return n[a]||i[a]?(o=i[a],t=n[a]):r.descs[a]?(t=r.descs[a],o=void 0):(t=void 0,o=e[a]),{desc:t,value:o}}function d(e,t,r,n,i){var o=r[n];if(o)for(var a=0,s=o.length;s>a;a++)Ember[i](e,o[a],null,t)}function b(e,t,r){var n=e[t];"function"==typeof n&&(d(e,t,n,"__ember_observesBefore__","removeBeforeObserver"),d(e,t,n,"__ember_observes__","removeObserver"),d(e,t,n,"__ember_listens__","removeListener")),"function"==typeof r&&(d(e,t,r,"__ember_observesBefore__","addBeforeObserver"),d(e,t,r,"__ember_observes__","addObserver"),d(e,t,r,"__ember_listens__","addListener"))}function E(t,r,n){var i,o,a,s={},u={},c=Ember.meta(t),m=[];l(r,e(t),s,u,t,m);for(var d=0,E=m.length;E>d;d++)if(i=m[d],"constructor"!==i&&u.hasOwnProperty(i)&&(a=s[i],o=u[i],a!==w)){for(;a&&a instanceof _;){var v=p(t,a,c,s,u);a=v.desc,o=v.value}(void 0!==a||void 0!==o)&&(b(t,i,o),h(t,i,o,c),T(t,i,a,o,c))}return n||f(t,c),t}function v(e,t,r){var n=S(e);if(r[n])return!1;if(r[n]=!0,e===t)return!0;for(var i=e.mixins,o=i?i.length:0;--o>=0;)if(v(i[o],t,r))return!0;return!1}function g(e,t,r){if(!r[S(t)])if(r[S(t)]=!0,t.properties){var n=t.properties;for(var i in n)n.hasOwnProperty(i)&&(e[i]=!0)}else t.mixins&&A.call(t.mixins,function(t){g(e,t,r)})}var y,w,_,C=Ember.ArrayPolyfills.map,O=Ember.ArrayPolyfills.indexOf,A=Ember.ArrayPolyfills.forEach,P=[].slice,x=Ember.create,T=Ember.defineProperty,S=Ember.guidFor;if(Ember.FEATURES.isEnabled("propertyBraceExpansion"))var V=Ember.expandProperties;var N={},R=Ember.IS_BINDING=/^.+Binding$/;Ember.mixin=function(e){var t=P.call(arguments,1);return E(e,t,!1),e},Ember.Mixin=function(){return t(this,arguments)},y=Ember.Mixin,y.prototype={properties:null,mixins:null,ownerConstructor:null},y._apply=E,y.applyPartial=function(e){var t=P.call(arguments,1);return E(e,t,!0)},y.finishPartial=f,Ember.anyUnprocessedMixins=!1,y.create=function(){Ember.anyUnprocessedMixins=!0;var e=this;return t(new e,arguments)};var D=y.prototype;D.reopen=function(){var e,t;this.properties?(e=y.create(),e.properties=this.properties,delete this.properties,this.mixins=[e]):this.mixins||(this.mixins=[]);var r,n=arguments.length,i=this.mixins;for(r=0;n>r;r++)e=arguments[r],e instanceof y?i.push(e):(t=y.create(),t.properties=e,i.push(t));return this},D.apply=function(e){return E(e,[this],!1)},D.applyPartial=function(e){return E(e,[this],!0)},D.detect=function(e){if(!e)return!1;if(e instanceof y)return v(e,this,{});var t=Ember.meta(e,!1).mixins;return t?!!t[S(this)]:!1},D.without=function(){var e=new y(this);return e._without=P.call(arguments),e},D.keys=function(){var e={},t={},r=[];g(e,this,t);for(var n in e)e.hasOwnProperty(n)&&r.push(n);return r},y.mixins=function(e){var t=Ember.meta(e,!1).mixins,r=[];if(!t)return r;for(var n in t){var i=t[n];i.properties||r.push(i)}return r},w=new Ember.Descriptor,w.toString=function(){return"(Required Property)"},Ember.required=function(){return w},_=function(e){this.methodName=e},_.prototype=new Ember.Descriptor,Ember.aliasMethod=function(e){return new _(e)},Ember.observer=function(){var e,t=P.call(arguments,-1)[0];if(Ember.FEATURES.isEnabled("propertyBraceExpansion")){var r=function(t){e.push(t)},n=P.call(arguments,0,-1);"function"!=typeof t&&(t=arguments[0],n=P.call(arguments,1)),e=[];for(var i=0;i<n.length;++i)V(n[i],r)}else e=P.call(arguments,0,-1),"function"!=typeof t&&(t=arguments[0],e=P.call(arguments,1));if("function"!=typeof t)throw new Ember.Error("Ember.observer called without a function");return t.__ember_observes__=e,t},Ember.immediateObserver=function(){for(var e=0,t=arguments.length;t>e;e++){arguments[e]}return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(){var e,t=P.call(arguments,-1)[0];if(Ember.FEATURES.isEnabled("propertyBraceExpansion")){var r=function(t){e.push(t)},n=P.call(arguments,0,-1);"function"!=typeof t&&(t=arguments[0],n=P.call(arguments,1)),e=[];for(var i=0;i<n.length;++i)V(n[i],r)}else e=P.call(arguments,0,-1),"function"!=typeof t&&(t=arguments[0],e=P.call(arguments,1));if("function"!=typeof t)throw new Ember.Error("Ember.beforeObserver called without a function");return t.__ember_observesBefore__=e,t}}(),function(){var e=Ember.EnumerableUtils.forEach,t=Ember.EnumerableUtils.indexOf;Ember.libraries=function(){var r=[],n=0,i=function(e){for(var t=0;t<r.length;t++)if(r[t].name===e)return r[t]};return r.register=function(e,t){i(e)||r.push({name:e,version:t})},r.registerCoreLibrary=function(e,t){i(e)||r.splice(n++,0,{name:e,version:t})},r.deRegister=function(e){var n=i(e);n&&r.splice(t(r,n),1)},r.each=function(t){e(r,function(e){t(e.name,e.version)})},r}(),Ember.libraries.registerCoreLibrary("Ember",Ember.VERSION)}(),function(){e("rsvp/all",["./promise","./utils","exports"],function(e,t,r){"use strict";function n(e,t){if(!o(e))throw new TypeError("You must pass an array to all.");return new i(function(t,r){function n(e){return function(t){i(e,t)}}function i(e,r){s[e]=r,0===--u&&t(s)}var o,s=[],u=e.length;0===u&&t([]);for(var c=0;c<e.length;c++)o=e[c],o&&a(o.then)?o.then(n(c),r,"RSVP: RSVP#all"):i(c,o)},t)}var i=e.Promise,o=t.isArray,a=t.isFunction;r.all=n}),e("rsvp/cast",["exports"],function(e){"use strict";function t(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=this;return new t(function(t){t(e)})}e.cast=t}),e("rsvp/config",["./events","exports"],function(e,t){"use strict";function r(e,t){return"onerror"===e?(i.on("error",t),void 0):2!==arguments.length?i[e]:(i[e]=t,void 0)}var n=e.EventTarget,i={instrument:!1};n.mixin(i),t.config=i,t.configure=r}),e("rsvp/defer",["./promise","exports"],function(e,t){"use strict";function r(e){var t={resolve:void 0,reject:void 0,promise:void 0};return t.promise=new n(function(e,r){t.resolve=e,t.reject=r},e),t}var n=e.Promise;t.defer=r}),e("rsvp/events",["exports"],function(e){"use strict";var t=function(e,t){for(var r=0,n=e.length;n>r;r++)if(e[r]===t)return r;return-1},r=function(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t},n={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e._promiseCallbacks=void 0,e},on:function(e,n){var i,o=r(this);i=o[e],i||(i=o[e]=[]),-1===t(i,n)&&i.push(n)},off:function(e,n){var i,o,a=r(this);return n?(i=a[e],o=t(i,n),-1!==o&&i.splice(o,1),void 0):(a[e]=[],void 0)},trigger:function(e,t){var n,i,o=r(this);if(n=o[e])for(var a=0;a<n.length;a++)(i=n[a])(t)}};e.EventTarget=n}),e("rsvp/hash",["./promise","./utils","exports"],function(e,t,r){"use strict";function n(e){var t={},r=a(e),n=r.length;return new i(function(i,a){var s,u;if(0===n)return i({}),void 0;for(var c=function(e){return function(t){l(e,t)}},l=function(e,r){t[e]=r,0===--n&&i(t)},h=0,m=r.length;m>h;h++)u=r[h],s=e[u],s&&o(s.then)?s.then(c(u),a,"RSVP: RSVP#hash"):l(u,s)})}var i=e.Promise,o=t.isFunction,a=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};r.hash=n}),e("rsvp/instrument",["./config","./utils","exports"],function(e,t,r){"use strict";function n(e,t,r){try{i.trigger(e,{guid:t._guidKey+t._id,eventName:e,detail:t._detail,childGuid:r&&t._guidKey+r._id,label:t._label,timeStamp:o()})}catch(n){setTimeout(function(){throw n},0)}}var i=e.config,o=t.now;r.instrument=n}),e("rsvp/node",["./promise","./all","exports"],function(e,t,r){"use strict";function n(e,t){return function(r,n){r?t(r):arguments.length>2?e(s.call(arguments,1)):e(n)}}function i(e,t){return function(){var r=s.call(arguments),i=this||t;return new o(function(t,o){a(r).then(function(r){try{r.push(n(t,o)),e.apply(i,r)}catch(a){o(a)}})})}}var o=e.Promise,a=t.all,s=Array.prototype.slice;r.denodeify=i}),e("rsvp/promise",["./config","./events","./cast","./instrument","./utils","exports"],function(e,t,r,n,i,o){"use strict";function a(e,t){if(!w(e))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof a))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._id=O++,this._label=t,this._subscribers=[],E.instrument&&g("created",this),s(e,this)}function s(e,t){function r(e){m(t,e)}function n(e){p(t,e)}try{e(r,n)}catch(i){n(i)}}function u(e,t,r,n){var i,o,a,s,u=w(r);if(u)try{i=r(n),a=!0}catch(c){s=!0,o=c}else i=n,a=!0;h(t,i)||(u&&a?m(t,i):s?p(t,o):e===x?m(t,i):e===T&&p(t,i))}function c(e,t,r,n){var i=e._subscribers,o=i.length;i[o]=t,i[o+x]=r,i[o+T]=n}function l(e,t){var r,n,i=e._subscribers,o=e._detail;E.instrument&&g(t===x?"fulfilled":"rejected",e);for(var a=0;a<i.length;a+=3)r=i[a],n=i[a+t],u(t,r,n,o);e._subscribers=null}function h(e,t){var r,n=null;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(y(t)&&(n=t.then,w(n)))return n.call(t,function(n){return r?!0:(r=!0,t!==n?m(e,n):f(e,n),void 0)},function(t){return r?!0:(r=!0,p(e,t),void 0)},"Locked onto "+(e._label||" unknown promise")),!0}catch(i){return r?!0:(p(e,i),!0)}return!1}function m(e,t){e===t?f(e,t):h(e,t)||f(e,t)}function f(e,t){e._state===A&&(e._state=P,e._detail=t,E.async(d,e))}function p(e,t){e._state===A&&(e._state=P,e._detail=t,E.async(b,e))}function d(e){l(e,e._state=x)}function b(e){e._onerror&&e._onerror(e._detail),l(e,e._state=T)}var E=e.config,v=(t.EventTarget,r.cast),g=n.instrument,y=i.objectOrFunction,w=i.isFunction,_=i.now,C="rsvp_"+_()+"-",O=0,A=void 0,P=0,x=1,T=2;a.prototype={constructor:a,_id:void 0,_guidKey:C,_label:void 0,_state:void 0,_detail:void 0,_subscribers:void 0,_onerror:function(e){E.trigger("error",e)},then:function(e,t,r){var n=this;this._onerror=null;var i=new this.constructor(function(){},r);if(this._state){var o=arguments;E.async(function(){u(n._state,i,o[n._state-1],n._detail)})}else c(this,i,e,t);return E.instrument&&g("chained",n,i),i},"catch":function(e,t){return this.then(null,e,t)},"finally":function(e,t){var r=this.constructor;return this.then(function(t){return r.cast(e()).then(function(){return t})},function(t){return r.cast(e()).then(function(){throw t})},t)}},a.cast=v,o.Promise=a}),e("rsvp/race",["./promise","./utils","exports"],function(e,t,r){"use strict";function n(e,t){if(!o(e))throw new TypeError("You must pass an array to race.");return new i(function(t,r){for(var n,i=0;i<e.length;i++)n=e[i],n&&"function"==typeof n.then?n.then(t,r,"RSVP: RSVP#race"):t(n)},t)}var i=e.Promise,o=t.isArray;r.race=n}),e("rsvp/reject",["./promise","exports"],function(e,t){"use strict";function r(e,t){return new n(function(t,r){r(e)},t)}var n=e.Promise;t.reject=r}),e("rsvp/resolve",["./promise","exports"],function(e,t){"use strict";function r(e,t){return new n(function(t){t(e)},t)}var n=e.Promise;t.resolve=r}),e("rsvp/rethrow",["exports"],function(e){"use strict";function t(e){throw r.setTimeout(function(){throw e}),e}var r="undefined"==typeof global?this:global;e.rethrow=t}),e("rsvp/utils",["exports"],function(e){"use strict";function t(e){return r(e)||"object"==typeof e&&null!==e}function r(e){return"function"==typeof e}function n(e){return"[object Array]"===Object.prototype.toString.call(e)}var i=Date.now||function(){return(new Date).getTime()};e.objectOrFunction=t,e.isFunction=r,e.isArray=n,e.now=i}),e("rsvp",["./rsvp/events","./rsvp/promise","./rsvp/node","./rsvp/all","./rsvp/race","./rsvp/hash","./rsvp/rethrow","./rsvp/defer","./rsvp/config","./rsvp/resolve","./rsvp/reject","exports"],function(e,t,r,n,i,o,a,s,u,c,l,h){"use strict";function m(e,t){C.async(e,t)}function f(){C.on.apply(C,arguments)}function p(){C.off.apply(C,arguments)}var d=e.EventTarget,b=t.Promise,E=r.denodeify,v=n.all,g=i.race,y=o.hash,w=a.rethrow,_=s.defer,C=u.config,O=u.configure,A=c.resolve,P=l.reject;h.Promise=b,h.EventTarget=d,h.all=v,h.race=g,h.hash=y,h.rethrow=w,h.defer=_,h.denodeify=E,h.configure=O,h.on=f,h.off=p,h.resolve=A,h.reject=P,h.async=m})}(),function(){Ember.MODEL_FACTORY_INJECTIONS=!1||!!Ember.ENV.MODEL_FACTORY_INJECTIONS,e("container",[],function(){"use strict";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.factoryCache=new e(t&&t.factoryCache),this.resolveCache=new e(t&&t.resolveCache),this.typeInjections=new e(t&&t.typeInjections),this.injections={},this.factoryTypeInjections=new e(t&&t.factoryTypeInjections),this.factoryInjections={},this._options=new e(t&&t._options),this._typeOptions=new e(t&&t._typeOptions)}function r(e,t){return e.cache.has(t)?!0:!!e.resolve(t)}function n(e,t,r){if(r=r||{},e.cache.has(t)&&r.singleton!==!1)return e.cache.get(t);var n=h(e,t);return void 0!==n?(o(e,t)&&r.singleton!==!1&&e.cache.set(t,n),n):void 0}function i(e){throw new Error(e+" is not currently supported on child containers")}function o(e,t){var r=s(e,t,"singleton");return r!==!1}function a(e,t){var r={};if(!t)return r;for(var i,o,a=0,s=t.length;s>a;a++){if(i=t[a],o=n(e,i.fullName),void 0===o)throw new Error("Attempting to inject an unknown injection: `"+i.fullName+"`");r[i.property]=o}return r}function s(e,t,r){var n=e._options.get(t);if(n&&void 0!==n[r])return n[r];var i=t.split(":")[0];return n=e._typeOptions.get(i),n?n[r]:void 0}function u(e,t){var r,n=t,i=e.resolve(n),o=e.factoryCache,a=t.split(":")[0];if(void 0!==i){if(o.has(t))return o.get(t);if(!i||"function"!=typeof i.extend||!Ember.MODEL_FACTORY_INJECTIONS&&"model"===a)return i;var s=c(e,t),u=l(e,t);return u._toString=e.makeToString(i,t),r=i.extend(s),r.reopenClass(u),o.set(t,r),r}}function c(e,t){var r=t.split(":"),n=r[0],i=[];return i=i.concat(e.typeInjections.get(n)||[]),i=i.concat(e.injections[t]||[]),i=a(e,i),i._debugContainerKey=t,i.container=e,i}function l(e,t){var r=t.split(":"),n=r[0],i=[];return i=i.concat(e.factoryTypeInjections.get(n)||[]),i=i.concat(e.factoryInjections[t]||[]),i=a(e,i),i._debugContainerKey=t,i}function h(e,t){var r=u(e,t);return s(e,t,"instantiate")===!1?r:r?"function"==typeof r.extend?r.create():r.create(c(e,t)):void 0}function m(e,t){e.cache.eachLocal(function(r,n){s(e,r,"instantiate")!==!1&&t(n)})}function f(e){e.cache.eachLocal(function(t,r){s(e,t,"instantiate")!==!1&&r.destroy()}),e.cache.dict={}}function p(e,t,r,n){var i=e.get(t);i||(i=[],e.set(t,i)),i.push({property:r,fullName:n})}function d(e){if(!E.test(e))throw new TypeError("Invalid Fullname, expected: `type:name` got: "+e)}function b(e,t,r,n){var i=e[t]=e[t]||[];i.push({property:r,fullName:n})}e.prototype={parent:null,dict:null,get:function(e){var t=this.dict;return t.hasOwnProperty(e)?t[e]:this.parent?this.parent.get(e):void 0},set:function(e,t){this.dict[e]=t},remove:function(e){delete this.dict[e]},has:function(e){var t=this.dict;return t.hasOwnProperty(e)?!0:this.parent?this.parent.has(e):!1},eachLocal:function(e,t){var r=this.dict;for(var n in r)r.hasOwnProperty(n)&&e.call(t,n,r[n])}},t.prototype={parent:null,children:null,resolver:null,registry:null,cache:null,typeInjections:null,injections:null,_options:null,_typeOptions:null,child:function(){var e=new t(this);return this.children.push(e),e},set:function(e,t,r){e[t]=r},register:function(e,t,r){if(d(e),void 0===t)throw new TypeError("Attempting to register an unknown factory: `"+e+"`");var n=this.normalize(e);if(this.cache.has(n))throw new Error("Cannot re-register: `"+e+"`, as it has already been looked up.");this.registry.set(n,t),this._options.set(n,r||{})},unregister:function(e){d(e);var t=this.normalize(e);this.registry.remove(t),this.cache.remove(t),this.factoryCache.remove(t),this.resolveCache.remove(t),this._options.remove(t)},resolve:function(e){d(e);var t=this.normalize(e),r=this.resolveCache.get(t);if(r)return r;var n=this.resolver(t)||this.registry.get(t);return this.resolveCache.set(t,n),n},describe:function(e){return e},normalize:function(e){return e},makeToString:function(e){return e.toString()},lookup:function(e,t){return d(e),n(this,this.normalize(e),t)},lookupFactory:function(e){return d(e),u(this,this.normalize(e))},has:function(e){return d(e),r(this,this.normalize(e))},optionsForType:function(e,t){this.parent&&i("optionsForType"),this._typeOptions.set(e,t)},options:function(e,t){this.optionsForType(e,t)},typeInjection:function(e,t,r){d(r),this.parent&&i("typeInjection"),p(this.typeInjections,e,t,r)},injection:function(e,t,r){this.parent&&i("injection"),d(r);var n=this.normalize(r);if(-1===e.indexOf(":"))return this.typeInjection(e,t,n);d(e);var o=this.normalize(e);b(this.injections,o,t,n)},factoryTypeInjection:function(e,t,r){this.parent&&i("factoryTypeInjection"),p(this.factoryTypeInjections,e,t,this.normalize(r))},factoryInjection:function(e,t,r){this.parent&&i("injection");var n=this.normalize(e),o=this.normalize(r);return d(r),-1===e.indexOf(":")?this.factoryTypeInjection(n,t,o):(d(e),b(this.factoryInjections,n,t,o),void 0)},destroy:function(){for(var e=0,t=this.children.length;t>e;e++)this.children[e].destroy();this.children=[],m(this,function(e){e.destroy()}),this.parent=void 0,this.isDestroyed=!0},reset:function(){for(var e=0,t=this.children.length;t>e;e++)f(this.children[e]);f(this)}};var E=/^[^:]+.+:[^:]+$/;return t})}(),function(){function e(r,n,i,o){var a,s,u;if("object"!=typeof r||null===r)return r;if(n&&(s=t(i,r))>=0)return o[s];if("array"===Ember.typeOf(r)){if(a=r.slice(),n)for(s=a.length;--s>=0;)a[s]=e(a[s],n,i,o)}else if(Ember.Copyable&&Ember.Copyable.detect(r))a=r.copy(n,i,o);else{a={};for(u in r)r.hasOwnProperty(u)&&"__"!==u.substring(0,2)&&(a[u]=n?e(r[u],n,i,o):r[u])}return n&&(i.push(r),o.push(a)),a}var t=Ember.EnumerableUtils.indexOf;if(Ember.compare=function i(e,t){if(e===t)return 0;var r=Ember.typeOf(e),n=Ember.typeOf(t),o=Ember.Comparable;if(o){if("instance"===r&&o.detect(e.constructor))return e.constructor.compare(e,t);if("instance"===n&&o.detect(t.constructor))return 1-t.constructor.compare(t,e)}var a=Ember.ORDER_DEFINITION_MAPPING;if(!a){var s=Ember.ORDER_DEFINITION;a=Ember.ORDER_DEFINITION_MAPPING={};var u,c;for(u=0,c=s.length;c>u;++u)a[s[u]]=u;delete Ember.ORDER_DEFINITION}var l=a[r],h=a[n];if(h>l)return-1;if(l>h)return 1;switch(r){case"boolean":case"number":return t>e?-1:e>t?1:0;case"string":var m=e.localeCompare(t);return 0>m?-1:m>0?1:0;case"array":for(var f=e.length,p=t.length,d=Math.min(f,p),b=0,E=0;0===b&&d>E;)b=i(e[E],t[E]),E++;return 0!==b?b:p>f?-1:f>p?1:0;case"instance":return Ember.Comparable&&Ember.Comparable.detect(e)?e.compare(e,t):0;case"date":var v=e.getTime(),g=t.getTime();return g>v?-1:v>g?1:0;default:return 0}},Ember.copy=function(t,r){return"object"!=typeof t||null===t?t:Ember.Copyable&&Ember.Copyable.detect(t)?t.copy(r):e(t,r,r?[]:null,r?[]:null)},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.create.isSimulated){var r=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","valueOf","toLocaleString","toString"],n=function(e,r,n){"__"!==n.substring(0,2)&&"_super"!==n&&(t(r,n)>=0||e.hasOwnProperty(n)&&r.push(n))};Ember.keys=function(e){var t,i=[];for(t in e)n(e,i,t);for(var o=0,a=r.length;a>o;o++)t=r[o],n(e,i,t);return i}}}(),function(){var e=/[ _]/g,t={},r=/([a-z\d])([A-Z])/g,n=/(\-|_|\.|\s)+(.)?/g,i=/([a-z\d])([A-Z]+)/g,o=/\-|\s+/g,a=/[_|\/|\s]+/g,s=/[^a-z0-9\-]+/gi,u=/[\-]+/g,c=/^-+|-+$/g;
12
+ Ember.STRINGS={},Ember.String={fmt:function(e,t){var r=0;return e.replace(/%@([0-9]+)?/g,function(e,n){return n=n?parseInt(n,10)-1:r++,e=t[n],null===e?"(null)":void 0===e?"":Ember.inspect(e)})},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(r,"$1_$2").toLowerCase()},dasherize:function(r){var n,i=t,o=i.hasOwnProperty(r);return o?i[r]:(n=Ember.String.decamelize(r).replace(e,"-"),i[r]=n,n)},camelize:function(e){return e.replace(n,function(e,t,r){return r?r.toUpperCase():""}).replace(/^([A-Z])/,function(e){return e.toLowerCase()})},classify:function(e){for(var t=e.split("."),r=[],n=0,i=t.length;i>n;n++){var o=Ember.String.camelize(t[n]);r.push(o.charAt(0).toUpperCase()+o.substr(1))}return r.join(".")},underscore:function(e){return e.replace(i,"$1_$2").replace(o,"_").toLowerCase()},capitalize:function(e){return e.charAt(0).toUpperCase()+e.substr(1)}},Ember.FEATURES.isEnabled("string-humanize")&&(Ember.String.humanize=function(e){return e.replace(/_id$/,"").replace(/_/g," ").replace(/^\w/g,function(e){return e.toUpperCase()})}),Ember.FEATURES.isEnabled("string-parameterize")&&(Ember.String.parameterize=function(e){return e.replace(a,"-").replace(s,"").replace(u,"-").replace(c,"").toLowerCase()})}(),function(){var e=Ember.String.fmt,t=Ember.String.w,r=Ember.String.loc,n=Ember.String.camelize,i=Ember.String.decamelize,o=Ember.String.dasherize,a=Ember.String.underscore,s=Ember.String.capitalize,u=Ember.String.classify;if(Ember.FEATURES.isEnabled("string-humanize"))var c=Ember.String.humanize;if(Ember.FEATURES.isEnabled("string-parameterize"))var l=Ember.String.parameterize;(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 r(this,arguments)},String.prototype.camelize=function(){return n(this)},String.prototype.decamelize=function(){return i(this)},String.prototype.dasherize=function(){return o(this)},String.prototype.underscore=function(){return a(this)},String.prototype.classify=function(){return u(this)},String.prototype.capitalize=function(){return s(this)},Ember.FEATURES.isEnabled("string-humanize")&&(String.prototype.humanize=function(){return c(this)}),Ember.FEATURES.isEnabled("string-parameterize")&&(String.prototype.parameterize=function(){return l(this)}))}(),function(){var e=Ember.get,t=Ember.set,r=Array.prototype.slice,n=Ember.getProperties;Ember.Observable=Ember.Mixin.create({get:function(t){return e(this,t)},getProperties:function(){return n.apply(null,[this].concat(r.call(arguments)))},set:function(e,r){return t(this,e,r),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,r){Ember.addBeforeObserver(this,e,t,r)},addObserver:function(e,t,r){Ember.addObserver(this,e,t,r)},removeObserver:function(e,t,r){Ember.removeObserver(this,e,t,r)},hasObserverFor:function(e){return Ember.hasListeners(this,e+":change")},getWithDefault:function(e,t){return Ember.getWithDefault(this,e,t)},incrementProperty:function(r,n){return Ember.isNone(n)&&(n=1),t(this,r,(e(this,r)||0)+n),e(this,r)},decrementProperty:function(r,n){return Ember.isNone(n)&&(n=1),t(this,r,(e(this,r)||0)-n),e(this,r)},toggleProperty:function(r){return t(this,r,!e(this,r)),e(this,r)},cacheFor:function(e){return Ember.cacheFor(this,e)},observersForKey:function(e){return Ember.observersFor(this,e)}})}(),function(){function e(){var e,t,o=!1,a=function(){o||a.proto(),n(this,i,g),n(this,"_super",g);var u=s(this),h=u.proto;if(u.proto=this,e){var m=e;e=null,this.reopen.apply(this,m)}if(t){var f=t;t=null;for(var p=this.concatenatedProperties,b=0,y=f.length;y>b;b++){var w=f[b];if("object"!=typeof w&&void 0!==w)throw new Ember.Error("Ember.Object.create only accepts objects.");if(w)for(var _=Ember.keys(w),C=0,O=_.length;O>C;C++){var A=_[C];if(w.hasOwnProperty(A)){var P=w[A],x=Ember.IS_BINDING;if(x.test(A)){var T=u.bindings;T?u.hasOwnProperty("bindings")||(T=u.bindings=r(u.bindings)):T=u.bindings={},T[A]=P}var S=u.descs[A];if(p&&v(p,A)>=0){var V=this[A];P=V?"function"==typeof V.concat?V.concat(P):Ember.makeArray(V).concat(P):Ember.makeArray(P)}S?S.set(this,A,P):"function"!=typeof this.setUnknownProperty||A in this?E?Ember.defineProperty(this,A,null,P):this[A]=P:this.setUnknownProperty(A,P)}}}}d(this,u),this.init.apply(this,arguments),u.proto=h,c(this),l(this,"init")};return a.toString=f.prototype.toString,a.willReopen=function(){o&&(a.PrototypeMixin=f.create(a.PrototypeMixin)),o=!1},a._initMixins=function(t){e=t},a._initProperties=function(e){t=e},a.proto=function(){var e=a.superclass;return e&&e.proto(),o||(o=!0,a.PrototypeMixin.applyPartial(a.prototype),u(a.prototype)),this.prototype},a}function t(e){return function(){return e}}var r=(Ember.set,Ember.get,Ember.create),n=Ember.platform.defineProperty,i=Ember.GUID_KEY,o=Ember.guidFor,a=Ember.generateGuid,s=Ember.meta,u=Ember.rewatch,c=Ember.finishChains,l=Ember.sendEvent,h=Ember.destroy,m=Ember.run.schedule,f=Ember.Mixin,p=f._apply,d=f.finishPartial,b=f.prototype.reopen,E=Ember.ENV.MANDATORY_SETTER,v=Ember.EnumerableUtils.indexOf,g={configurable:!0,writable:!0,enumerable:!1,value:void 0},y=e();y.toString=function(){return"Ember.CoreObject"},y.PrototypeMixin=f.create({reopen:function(){return p(this,arguments,!0),this},init:function(){},concatenatedProperties:null,isDestroyed:!1,isDestroying:!1,destroy:function(){return this.isDestroying?void 0:(this.isDestroying=!0,m("actions",this,this.willDestroy),m("destroy",this,this._scheduledDestroy),this)},willDestroy:Ember.K,_scheduledDestroy:function(){this.isDestroyed||(h(this),this.isDestroyed=!0)},bind:function(e,t){return t instanceof Ember.Binding||(t=Ember.Binding.from(t)),t.to(e).connect(this),t},toString:function(){var e="function"==typeof this.toStringExtension,r=e?":"+this.toStringExtension():"",n="<"+this.constructor.toString()+":"+o(this)+r+">";return this.toString=t(n),n}}),y.PrototypeMixin.ownerConstructor=y,Ember.config.overridePrototypeMixin&&Ember.config.overridePrototypeMixin(y.PrototypeMixin),y.__super__=null;var w=f.create({ClassMixin:Ember.required(),PrototypeMixin:Ember.required(),isClass:!0,isMethod:!1,extend:function(){var t,n=e();return n.ClassMixin=f.create(this.ClassMixin),n.PrototypeMixin=f.create(this.PrototypeMixin),n.ClassMixin.ownerConstructor=n,n.PrototypeMixin.ownerConstructor=n,b.apply(n.PrototypeMixin,arguments),n.superclass=this,n.__super__=this.prototype,t=n.prototype=r(this.prototype),t.constructor=n,a(t),s(t).proto=t,n.ClassMixin.apply(n),n},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(),b.apply(this.PrototypeMixin,arguments),this},reopenClass:function(){return b.apply(this.ClassMixin,arguments),p(this,arguments,!1),this},detect:function(e){if("function"!=typeof e)return!1;for(;e;){if(e===this)return!0;e=e.superclass}return!1},detectInstance:function(e){return e instanceof this},metaForProperty:function(e){var t=s(this.proto(),!1).descs[e];return t._meta||{}},eachComputedProperty:function(e,t){var r,n=this.proto(),i=s(n).descs,o={};for(var a in i)r=i[a],r instanceof Ember.ComputedProperty&&e.call(t||this,a,r._meta||o)}});w.ownerConstructor=y,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(w),y.ClassMixin=w,w.apply(y),Ember.CoreObject=y}(),function(){Ember.Object=Ember.CoreObject.extend(Ember.Observable),Ember.Object.toString=function(){return"Ember.Object"}}(),function(){function e(t,r,i){var a=t.length;c[t.join(".")]=r;for(var s in r)if(l.call(r,s)){var u=r[s];if(t[a]=s,u&&u.toString===n)u.toString=o(t.join(".")),u[m]=t.join(".");else if(u&&u.isNamespace){if(i[h(u)])continue;i[h(u)]=!0,e(t,u,i)}}t.length=a}function t(){var e,t,r=Ember.Namespace,n=Ember.lookup;if(!r.PROCESSED)for(var i in n)if("parent"!==i&&"top"!==i&&"frameElement"!==i&&"webkitStorageInfo"!==i&&!("globalStorage"===i&&n.StorageList&&n.globalStorage instanceof n.StorageList||n.hasOwnProperty&&!n.hasOwnProperty(i))){try{e=Ember.lookup[i],t=e&&e.isNamespace}catch(o){continue}t&&(e[m]=i)}}function r(e){var t=e.superclass;return t?t[m]?t[m]:r(t):void 0}function n(){Ember.BOOTED||this[m]||i();var e;if(this[m])e=this[m];else if(this._toString)e=this._toString;else{var t=r(this);e=t?"(subclass of "+t+")":"(unknown mixin)",this.toString=o(e)}return e}function i(){var r=!u.PROCESSED,n=Ember.anyUnprocessedMixins;if(r&&(t(),u.PROCESSED=!0),r||n){for(var i,o=u.NAMESPACES,a=0,s=o.length;s>a;a++)i=o[a],e([i.toString()],i,{});Ember.anyUnprocessedMixins=!1}}function o(e){return function(){return e}}var a=Ember.get,s=Ember.ArrayPolyfills.indexOf,u=Ember.Namespace=Ember.Object.extend({isNamespace:!0,init:function(){Ember.Namespace.NAMESPACES.push(this),Ember.Namespace.PROCESSED=!1},toString:function(){var e=a(this,"name");return e?e:(t(),this[Ember.GUID_KEY+"_name"])},nameClasses:function(){e([this.toString()],this,{})},destroy:function(){var e=Ember.Namespace.NAMESPACES;Ember.lookup[this.toString()]=void 0,e.splice(s.call(e,this),1),this._super()}});u.reopenClass({NAMESPACES:[Ember],NAMESPACES_BY_ID:{},PROCESSED:!1,processAll:i,byName:function(e){return Ember.BOOTED||i(),c[e]}});var c=u.NAMESPACES_BY_ID,l={}.hasOwnProperty,h=Ember.guidFor,m=Ember.NAME_KEY=Ember.GUID_KEY+"_name";Ember.Mixin.prototype.toString=n}(),function(){function e(e,t){var r=t.slice(8);r in this||u(this,r)}function t(e,t){var r=t.slice(8);r in this||c(this,r)}var r=Ember.get,n=Ember.set,i=(Ember.String.fmt,Ember.addBeforeObserver),o=Ember.addObserver,a=Ember.removeBeforeObserver,s=Ember.removeObserver,u=Ember.propertyWillChange,c=Ember.propertyDidChange,l=Ember.meta,h=Ember.defineProperty;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer("content",function(){}),isTruthy:Ember.computed.bool("content"),_debugContainerKey:null,willWatchProperty:function(r){var n="content."+r;i(this,n,null,e),o(this,n,null,t)},didUnwatchProperty:function(r){var n="content."+r;a(this,n,null,e),s(this,n,null,t)},unknownProperty:function(e){var t=r(this,"content");return t?r(t,e):void 0},setUnknownProperty:function(e,t){var i=l(this);if(i.proto===this)return h(this,e,null,t),t;var o=r(this,"content");return n(o,e,t)}})}(),function(){function e(){return 0===s.length?{}:s.pop()}function t(e){return s.push(e),null}function r(e,t){function r(r){var o=n(r,e);return i?t===o:!!o}var i=2===arguments.length;return r}var n=Ember.get,i=Ember.set,o=Array.prototype.slice,a=Ember.EnumerableUtils.indexOf,s=[];Ember.Enumerable=Ember.Mixin.create({nextObject:Ember.required(Function),firstObject:Ember.computed(function(){if(0===n(this,"length"))return void 0;var r,i=e();return r=this.nextObject(0,null,i),t(i),r}).property("[]"),lastObject:Ember.computed(function(){var r=n(this,"length");if(0===r)return void 0;var i,o=e(),a=0,s=null;do s=i,i=this.nextObject(a++,s,o);while(void 0!==i);return t(o),s}).property("[]"),contains:function(e){return void 0!==this.find(function(t){return t===e})},forEach:function(r,i){if("function"!=typeof r)throw new TypeError;var o=n(this,"length"),a=null,s=e();void 0===i&&(i=null);for(var u=0;o>u;u++){var c=this.nextObject(u,a,s);r.call(i,c,u,this),a=c}return a=null,s=t(s),this},getEach:function(e){return this.mapBy(e)},setEach:function(e,t){return this.forEach(function(r){i(r,e,t)})},map:function(e,t){var r=Ember.A();return this.forEach(function(n,i,o){r[i]=e.call(t,n,i,o)}),r},mapBy:function(e){return this.map(function(t){return n(t,e)})},mapProperty:Ember.aliasMethod("mapBy"),filter:function(e,t){var r=Ember.A();return this.forEach(function(n,i,o){e.call(t,n,i,o)&&r.push(n)}),r},reject:function(e,t){return this.filter(function(){return!e.apply(t,arguments)})},filterBy:function(){return this.filter(r.apply(this,arguments))},filterProperty:Ember.aliasMethod("filterBy"),rejectBy:function(e,t){var r=function(r){return n(r,e)===t},i=function(t){return!!n(t,e)},o=2===arguments.length?r:i;return this.reject(o)},rejectProperty:Ember.aliasMethod("rejectBy"),find:function(r,i){var o=n(this,"length");void 0===i&&(i=null);for(var a,s,u=null,c=!1,l=e(),h=0;o>h&&!c;h++)a=this.nextObject(h,u,l),(c=r.call(i,a,h,this))&&(s=a),u=a;return a=u=null,l=t(l),s},findBy:function(){return this.find(r.apply(this,arguments))},findProperty:Ember.aliasMethod("findBy"),every:function(e,t){return!this.find(function(r,n,i){return!e.call(t,r,n,i)})},everyBy:Ember.aliasMethod("isEvery"),everyProperty:Ember.aliasMethod("isEvery"),isEvery:function(){return this.every(r.apply(this,arguments))},any:function(e,t){var r=this.find(function(r,n,i){return!!e.call(t,r,n,i)});return"undefined"!=typeof r},some:Ember.aliasMethod("any"),isAny:function(){return this.any(r.apply(this,arguments))},anyBy:Ember.aliasMethod("isAny"),someProperty:Ember.aliasMethod("isAny"),reduce:function(e,t,r){if("function"!=typeof e)throw new TypeError;var n=t;return this.forEach(function(t,i){n=e(n,t,i,this,r)},this),n},invoke:function(e){var t,r=Ember.A();return arguments.length>1&&(t=o.call(arguments,1)),this.forEach(function(n,i){var o=n&&n[e];"function"==typeof o&&(r[i]=t?o.apply(n,t):n[e]())},this),r},toArray:function(){var e=Ember.A();return this.forEach(function(t,r){e[r]=t}),e},compact:function(){return this.filter(function(e){return null!=e})},without:function(e){if(!this.contains(e))return this;var t=Ember.A();return this.forEach(function(r){r!==e&&(t[t.length]=r)}),t},uniq:function(){var e=Ember.A();return this.forEach(function(t){a(e,t)<0&&e.push(t)}),e},"[]":Ember.computed(function(){return this}),addEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",o=n(this,"hasEnumerableObservers");return o||Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.addListener(this,"@enumerable:before",e,r),Ember.addListener(this,"@enumerable:change",e,i),o||Ember.propertyDidChange(this,"hasEnumerableObservers"),this},removeEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",o=n(this,"hasEnumerableObservers");return o&&Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.removeListener(this,"@enumerable:before",e,r),Ember.removeListener(this,"@enumerable:change",e,i),o&&Ember.propertyDidChange(this,"hasEnumerableObservers"),this},hasEnumerableObservers:Ember.computed(function(){return Ember.hasListeners(this,"@enumerable:change")||Ember.hasListeners(this,"@enumerable:before")}),enumerableContentWillChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||i-r!==0,-1===e&&(e=null),-1===t&&(t=null),Ember.propertyWillChange(this,"[]"),o&&Ember.propertyWillChange(this,"length"),Ember.sendEvent(this,"@enumerable:before",[this,e,t]),this},enumerableContentDidChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||i-r!==0,-1===e&&(e=null),-1===t&&(t=null),Ember.sendEvent(this,"@enumerable:change",[this,e,t]),o&&Ember.propertyDidChange(this,"length"),Ember.propertyDidChange(this,"[]"),this},sortBy:function(){var e=arguments;return this.toArray().sort(function(t,r){for(var i=0;i<e.length;i++){var o=e[i],a=n(t,o),s=n(r,o),u=Ember.compare(a,s);if(u)return u}return 0})}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.isNone),r=Ember.EnumerableUtils.map,n=Ember.cacheFor;Ember.Array=Ember.Mixin.create(Ember.Enumerable,{length:Ember.required(),objectAt:function(t){return 0>t||t>=e(this,"length")?void 0: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,r){return void 0!==r&&this.replace(0,e(this,"length"),r),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(r,n){var i=Ember.A(),o=e(this,"length");for(t(r)&&(r=0),(t(n)||n>o)&&(n=o),0>r&&(r=o+r),0>n&&(n=o+n);n>r;)i[i.length]=this.objectAt(r++);return i},indexOf:function(t,r){var n,i=e(this,"length");for(void 0===r&&(r=0),0>r&&(r+=i),n=r;i>n;n++)if(this.objectAt(n)===t)return n;return-1},lastIndexOf:function(t,r){var n,i=e(this,"length");for((void 0===r||r>=i)&&(r=i-1),0>r&&(r+=i),n=r;n>=0;n--)if(this.objectAt(n)===t)return n;return-1},addArrayObserver:function(t,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",o=e(this,"hasArrayObservers");return o||Ember.propertyWillChange(this,"hasArrayObservers"),Ember.addListener(this,"@array:before",t,n),Ember.addListener(this,"@array:change",t,i),o||Ember.propertyDidChange(this,"hasArrayObservers"),this},removeArrayObserver:function(t,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",o=e(this,"hasArrayObservers");return o&&Ember.propertyWillChange(this,"hasArrayObservers"),Ember.removeListener(this,"@array:before",t,n),Ember.removeListener(this,"@array:change",t,i),o&&Ember.propertyDidChange(this,"hasArrayObservers"),this},hasArrayObservers:Ember.computed(function(){return Ember.hasListeners(this,"@array:change")||Ember.hasListeners(this,"@array:before")}),arrayContentWillChange:function(t,r,n){void 0===t?(t=0,r=n=-1):(void 0===r&&(r=-1),void 0===n&&(n=-1)),Ember.isWatching(this,"@each")&&e(this,"@each"),Ember.sendEvent(this,"@array:before",[this,t,r,n]);var i,o;if(t>=0&&r>=0&&e(this,"hasEnumerableObservers")){i=[],o=t+r;for(var a=t;o>a;a++)i.push(this.objectAt(a))}else i=r;return this.enumerableContentWillChange(i,n),this},arrayContentDidChange:function(t,r,i){void 0===t?(t=0,r=i=-1):(void 0===r&&(r=-1),void 0===i&&(i=-1));var o,a;if(t>=0&&i>=0&&e(this,"hasEnumerableObservers")){o=[],a=t+i;for(var s=t;a>s;s++)o.push(this.objectAt(s))}else o=i;this.enumerableContentDidChange(r,o),Ember.sendEvent(this,"@array:change",[this,t,r,i]);var u=e(this,"length"),c=n(this,"firstObject"),l=n(this,"lastObject");return this.objectAt(0)!==c&&(Ember.propertyWillChange(this,"firstObject"),Ember.propertyDidChange(this,"firstObject")),this.objectAt(u-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(){function e(e,t){return"@this"===t?e:m(e,t)}function t(e,t,r){this.callbacks=e,this.cp=t,this.instanceMeta=r,this.dependentKeysByGuid={},this.trackedArraysByGuid={},this.suspended=!1,this.changedItems={}}function r(e,t,r){this.dependentArray=e,this.index=t,this.item=e.objectAt(t),this.trackedArray=r,this.beforeObserver=null,this.observer=null,this.destroyed=!1}function n(e,t,r){return 0>e?Math.max(0,t+e):t>e?e:Math.min(t-r,e)}function i(e,t,r){return Math.min(r,t-e)}function o(e,t,r,n,i,o){var a={arrayChanged:e,index:r,item:t,propertyName:n,property:i};return o&&(a.previousValues=o),a}function a(e,t,r,n,i){O(e,function(a,s){i.setValue(t.addedItem.call(this,i.getValue(),a,o(e,a,s,n,r),i.sugarMeta))},this)}function s(e,t){{var r;e._callbacks()}e._hasInstanceMeta(this,t)?(r=e._instanceMeta(this,t),r.setValue(e.resetValue(r.getValue()))):r=e._instanceMeta(this,t),e.options.initialize&&e.options.initialize.call(this,r.getValue(),{property:e,propertyName:t},r.sugarMeta)}function u(t,r){if(x.test(r))return!1;var n=e(t,r);return Ember.Array.detect(n)}function c(e,t,r){this.context=e,this.propertyName=t,this.cache=p(e).cache,this.dependentArrays={},this.sugarMeta={},this.initialValue=r}function l(t){var r=this;this.options=t,this._instanceMetas={},this._dependentKeys=null,this._itemPropertyKeys={},this._previousItemPropertyKeys={},this.readOnly(),this.cacheable(),this.recomputeOnce=function(e){Ember.run.once(this,n,e)};var n=function(t){var n=(r._dependentKeys,r._instanceMeta(this,t)),i=r._callbacks();s.call(this,r,t),n.dependentArraysObserver.suspendArrayObservers(function(){O(r._dependentKeys,function(t){if(u(this,t)){var i=e(this,t),o=n.dependentArrays[t];i===o?r._previousItemPropertyKeys[t]&&(delete r._previousItemPropertyKeys[t],n.dependentArraysObserver.setupPropertyObservers(t,r._itemPropertyKeys[t])):(n.dependentArrays[t]=i,o&&n.dependentArraysObserver.teardownObservers(o,t),i&&n.dependentArraysObserver.setupObservers(i,t))}},this)},this),O(r._dependentKeys,function(o){if(u(this,o)){var s=e(this,o);s&&a.call(this,s,i,r,t,n)}},this)};this.func=function(e){return n.call(this,e),r._instanceMeta(this,e).getValue()}}function h(e){return e}var m=Ember.get,f=(Ember.set,Ember.guidFor),p=Ember.meta,d=Ember.propertyWillChange,b=Ember.propertyDidChange,E=Ember.addBeforeObserver,v=Ember.removeBeforeObserver,g=Ember.addObserver,y=Ember.removeObserver,w=Ember.ComputedProperty,_=[].slice,C=Ember.create,O=Ember.EnumerableUtils.forEach,A=/^(.*)\.@each\.(.*)/,P=/(.*\.@each){2,}/,x=/\.\[\]$/;if(Ember.FEATURES.isEnabled("propertyBraceExpansion"))var T=Ember.expandProperties;t.prototype={setValue:function(e){this.instanceMeta.setValue(e,!0)},getValue:function(){return this.instanceMeta.getValue()},setupObservers:function(e,t){this.dependentKeysByGuid[f(e)]=t,e.addArrayObserver(this,{willChange:"dependentArrayWillChange",didChange:"dependentArrayDidChange"}),this.cp._itemPropertyKeys[t]&&this.setupPropertyObservers(t,this.cp._itemPropertyKeys[t])},teardownObservers:function(e,t){var r=this.cp._itemPropertyKeys[t]||[];delete this.dependentKeysByGuid[f(e)],this.teardownPropertyObservers(t,r),e.removeArrayObserver(this,{willChange:"dependentArrayWillChange",didChange:"dependentArrayDidChange"})},suspendArrayObservers:function(e,t){var r=this.suspended;this.suspended=!0,e.call(t),this.suspended=r},setupPropertyObservers:function(t,r){var n=e(this.instanceMeta.context,t),i=e(n,"length"),o=new Array(i);this.resetTransformations(t,o),O(n,function(e,i){var a=this.createPropertyObserverContext(n,i,this.trackedArraysByGuid[t]);o[i]=a,O(r,function(t){E(e,t,this,a.beforeObserver),g(e,t,this,a.observer)},this)},this)},teardownPropertyObservers:function(e,t){var r,n,i,o=this,a=this.trackedArraysByGuid[e];a&&a.apply(function(e,a,s){s!==Ember.TrackedArray.DELETE&&O(e,function(e){e.destroyed=!0,r=e.beforeObserver,n=e.observer,i=e.item,O(t,function(e){v(i,e,o,r),y(i,e,o,n)})})})},createPropertyObserverContext:function(e,t,n){var i=new r(e,t,n);return this.createPropertyObserver(i),i},createPropertyObserver:function(e){var t=this;e.beforeObserver=function(r,n){return t.itemPropertyWillChange(r,n,e.dependentArray,e)},e.observer=function(r,n){return t.itemPropertyDidChange(r,n,e.dependentArray,e)}},resetTransformations:function(e,t){this.trackedArraysByGuid[e]=new Ember.TrackedArray(t)},trackAdd:function(e,t,r){var n=this.trackedArraysByGuid[e];n&&n.addItems(t,r)},trackRemove:function(e,t,r){var n=this.trackedArraysByGuid[e];return n?n.removeItems(t,r):[]},updateIndexes:function(t,r){var n=e(r,"length");t.apply(function(e,t,r){r!==Ember.TrackedArray.DELETE&&(r!==Ember.TrackedArray.RETAIN||e.length!==n||0!==t)&&O(e,function(e,r){e.index=r+t})})},dependentArrayWillChange:function(t,r,a){function s(e){m[h].destroyed=!0,v(c,e,this,m[h].beforeObserver),y(c,e,this,m[h].observer)}if(!this.suspended){var u,c,l,h,m,p=this.callbacks.removedItem,d=f(t),b=this.dependentKeysByGuid[d],E=this.cp._itemPropertyKeys[b]||[],g=e(t,"length"),w=n(r,g,0),_=i(w,g,a);for(m=this.trackRemove(b,w,_),h=_-1;h>=0&&(l=w+h,!(l>=g));--h)c=t.objectAt(l),O(E,s,this),u=o(t,c,l,this.instanceMeta.propertyName,this.cp),this.setValue(p.call(this.instanceMeta.context,this.getValue(),c,u,this.instanceMeta.sugarMeta))}},dependentArrayDidChange:function(t,r,i,a){if(!this.suspended){var s,u,c=this.callbacks.addedItem,l=f(t),h=this.dependentKeysByGuid[l],m=new Array(a),p=this.cp._itemPropertyKeys[h],d=e(t,"length"),b=n(r,d,a);O(t.slice(b,b+a),function(e,r){p&&(u=m[r]=this.createPropertyObserverContext(t,b+r,this.trackedArraysByGuid[h]),O(p,function(t){E(e,t,this,u.beforeObserver),g(e,t,this,u.observer)},this)),s=o(t,e,b+r,this.instanceMeta.propertyName,this.cp),this.setValue(c.call(this.instanceMeta.context,this.getValue(),e,s,this.instanceMeta.sugarMeta))},this),this.trackAdd(h,b,m)}},itemPropertyWillChange:function(t,r,n,i){var o=f(t);this.changedItems[o]||(this.changedItems[o]={array:n,observerContext:i,obj:t,previousValues:{}}),this.changedItems[o].previousValues[r]=e(t,r)},itemPropertyDidChange:function(){this.flushChanges()},flushChanges:function(){var e,t,r,n=this.changedItems;for(e in n)t=n[e],t.observerContext.destroyed||(this.updateIndexes(t.observerContext.trackedArray,t.observerContext.dependentArray),r=o(t.array,t.obj,t.observerContext.index,this.instanceMeta.propertyName,this.cp,t.previousValues),this.setValue(this.callbacks.removedItem.call(this.instanceMeta.context,this.getValue(),t.obj,r,this.instanceMeta.sugarMeta)),this.setValue(this.callbacks.addedItem.call(this.instanceMeta.context,this.getValue(),t.obj,r,this.instanceMeta.sugarMeta)));this.changedItems={}}},c.prototype={getValue:function(){return this.propertyName in this.cache?this.cache[this.propertyName]:this.initialValue},setValue:function(e,t){if(void 0!==e){var r=t&&e!==this.cache[this.propertyName];r&&d(this.context,this.propertyName),this.cache[this.propertyName]=e,r&&b(this.context,this.propertyName)}else delete this.cache[this.propertyName]}},Ember.ReduceComputedProperty=l,l.prototype=C(w.prototype),l.prototype._callbacks=function(){if(!this.callbacks){var e=this.options;this.callbacks={removedItem:e.removedItem||h,addedItem:e.addedItem||h}}return this.callbacks},l.prototype._hasInstanceMeta=function(e,t){var r=f(e),n=r+":"+t;return!!this._instanceMetas[n]},l.prototype._instanceMeta=function(e,r){var n=f(e),i=n+":"+r,o=this._instanceMetas[i];return o||(o=this._instanceMetas[i]=new c(e,r,this.initialValue()),o.dependentArraysObserver=new t(this._callbacks(),this,o,e,r,o.sugarMeta)),o},l.prototype.initialValue=function(){return"function"==typeof this.options.initialValue?this.options.initialValue():this.options.initialValue},l.prototype.resetValue=function(){return this.initialValue()},l.prototype.itemPropertyKey=function(e,t){this._itemPropertyKeys[e]=this._itemPropertyKeys[e]||[],this._itemPropertyKeys[e].push(t)},l.prototype.clearItemPropertyKeys=function(e){this._itemPropertyKeys[e]&&(this._previousItemPropertyKeys[e]=this._itemPropertyKeys[e],this._itemPropertyKeys[e]=[])},l.prototype.property=function(){var e,t,r,n=this,i=(_.call(arguments),new Ember.Set);return O(_.call(arguments),function(o){if(P.test(o))throw new Ember.Error("Nested @each properties not supported: "+o);if(e=A.exec(o)){if(t=e[1],Ember.FEATURES.isEnabled("propertyBraceExpansion")){var a=e[2],s=function(e){n.itemPropertyKey(t,e)};T(a,s)}else r=e[2],n.itemPropertyKey(t,r);i.add(t)}else i.add(o)}),w.prototype.property.apply(this,i.toArray())},Ember.reduceComputed=function(e){var t;if(arguments.length>1&&(t=_.call(arguments,0,-1),e=_.call(arguments,-1)[0]),"object"!=typeof e)throw new Ember.Error("Reduce Computed Property declared without an options hash");if(!("initialValue"in e))throw new Ember.Error("Reduce Computed Property declared without an initial value");var r=new l(e);return t&&r.property.apply(r,t),r}}(),function(){function e(){var e=this;return t.apply(this,arguments),this.func=function(t){return function(r){return e._hasInstanceMeta(this,r)||i(e._dependentKeys,function(t){Ember.addObserver(this,t,function(){e.recomputeOnce.call(this,r)})},this),t.apply(this,arguments)}}(this.func),this}var t=Ember.ReduceComputedProperty,r=[].slice,n=Ember.create,i=Ember.EnumerableUtils.forEach;Ember.ArrayComputedProperty=e,e.prototype=n(t.prototype),e.prototype.initialValue=function(){return Ember.A()},e.prototype.resetValue=function(e){return e.clear(),e},Ember.arrayComputed=function(t){var n;if(arguments.length>1&&(n=r.call(arguments,0,-1),t=r.call(arguments,-1)[0]),"object"!=typeof t)throw new Ember.Error("Array Computed Property declared without an options hash");var i=new e(t);return n&&i.property.apply(i,n),i}}(),function(){function e(e,i,o,a){function s(e){return t.detectInstance(e)?n(r(e,"content")):n(e)}var u,c,l,h,m;return arguments.length<4&&(a=r(e,"length")),arguments.length<3&&(o=0),o===a?o:(u=o+Math.floor((a-o)/2),c=e.objectAt(u),h=s(c),m=s(i),h===m?u:(l=this.order(c,i),0===l&&(l=m>h?-1:1),0>l?this.binarySearch(e,i,u+1,a):l>0?this.binarySearch(e,i,o,u):u))}var t,r=Ember.get,n=(Ember.set,Ember.guidFor),i=Ember.merge,o=[].slice,a=Ember.EnumerableUtils.forEach,s=Ember.EnumerableUtils.map;Ember.computed.max=function(e){return Ember.reduceComputed(e,{initialValue:-1/0,addedItem:function(e,t){return Math.max(e,t)},removedItem:function(e,t){return e>t?e:void 0}})},Ember.computed.min=function(e){return Ember.reduceComputed(e,{initialValue:1/0,addedItem:function(e,t){return Math.min(e,t)},removedItem:function(e,t){return t>e?e:void 0}})},Ember.computed.map=function(e,t){var r={addedItem:function(e,r,n){var i=t.call(this,r);return e.insertAt(n.index,i),e},removedItem:function(e,t,r){return e.removeAt(r.index,1),e}};return Ember.arrayComputed(e,r)},Ember.computed.mapBy=function(e,t){var n=function(e){return r(e,t)};return Ember.computed.map(e+".@each."+t,n)},Ember.computed.mapProperty=Ember.computed.mapBy,Ember.computed.filter=function(e,t){var r={initialize:function(e,t,r){r.filteredArrayIndexes=new Ember.SubArray},addedItem:function(e,r,n,i){var o=!!t.call(this,r),a=i.filteredArrayIndexes.addItem(n.index,o);return o&&e.insertAt(a,r),e},removedItem:function(e,t,r,n){var i=n.filteredArrayIndexes.removeItem(r.index);return i>-1&&e.removeAt(i),e}};return Ember.arrayComputed(e,r)},Ember.computed.filterBy=function(e,t,n){var i;return i=2===arguments.length?function(e){return r(e,t)}:function(e){return r(e,t)===n},Ember.computed.filter(e+".@each."+t,i)},Ember.computed.filterProperty=Ember.computed.filterBy,Ember.computed.uniq=function(){var e=o.call(arguments);return e.push({initialize:function(e,t,r){r.itemCounts={}},addedItem:function(e,t,r,i){var o=n(t);return i.itemCounts[o]?++i.itemCounts[o]:i.itemCounts[o]=1,e.addObject(t),e},removedItem:function(e,t,r,i){var o=n(t),a=i.itemCounts;return 0===--a[o]&&e.removeObject(t),e}}),Ember.arrayComputed.apply(null,e)},Ember.computed.union=Ember.computed.uniq,Ember.computed.intersect=function(){var e=function(e){return s(e.property._dependentKeys,function(e){return n(e)})},t=o.call(arguments);return t.push({initialize:function(e,t,r){r.itemCounts={}},addedItem:function(t,r,i,o){var a=n(r),s=(e(i),n(i.arrayChanged)),u=i.property._dependentKeys.length,c=o.itemCounts;return c[a]||(c[a]={}),void 0===c[a][s]&&(c[a][s]=0),1===++c[a][s]&&u===Ember.keys(c[a]).length&&t.addObject(r),t},removedItem:function(t,r,i,o){var a,s=n(r),u=(e(i),n(i.arrayChanged)),c=(i.property._dependentKeys.length,o.itemCounts);return void 0===c[s][u]&&(c[s][u]=0),0===--c[s][u]&&(delete c[s][u],a=Ember.keys(c[s]).length,0===a&&delete c[s],t.removeObject(r)),t}}),Ember.arrayComputed.apply(null,t)},Ember.computed.setDiff=function(e,t){if(2!==arguments.length)throw new Ember.Error("setDiff requires exactly two dependent arrays.");return Ember.arrayComputed(e,t,{addedItem:function(n,i,o){var a=r(this,e),s=r(this,t);return o.arrayChanged===a?s.contains(i)||n.addObject(i):n.removeObject(i),n},removedItem:function(n,i,o){var a=r(this,e),s=r(this,t);return o.arrayChanged===s?a.contains(i)&&n.addObject(i):n.removeObject(i),n}})},t=Ember.ObjectProxy.extend(),Ember.computed.sort=function(n,o){var s,u;return"function"==typeof o?s=function(t,r,n){n.order=o,n.binarySearch=e}:(u=o,s=function(t,i,o){function s(){var e,t,s,l=r(this,u),h=o.sortProperties=[],m=o.sortPropertyAscending={};i.property.clearItemPropertyKeys(n),a(l,function(r){-1!==(t=r.indexOf(":"))?(e=r.substring(0,t),s="desc"!==r.substring(t+1).toLowerCase()):(e=r,s=!0),h.push(e),m[e]=s,i.property.itemPropertyKey(n,e)}),l.addObserver("@each",this,c)}function c(){Ember.run.once(this,l,i.propertyName)}function l(e){s.call(this),i.property.recomputeOnce.call(this,e)}Ember.addObserver(this,u,c),s.call(this),o.order=function(e,t){for(var n,i,o,a=0;a<this.sortProperties.length;++a)if(n=this.sortProperties[a],i=Ember.compare(r(e,n),r(t,n)),0!==i)return o=this.sortPropertyAscending[n],o?i:-1*i;
13
+ return 0},o.binarySearch=e}),Ember.arrayComputed(n,{initialize:s,addedItem:function(e,t,r,n){var i=n.binarySearch(e,t);return e.insertAt(i,t),e},removedItem:function(e,r,n,o){var a,s,u;return n.previousValues?(a=i({content:r},n.previousValues),u=t.create(a)):u=r,s=o.binarySearch(e,u),e.removeAt(s),e}})}}(),function(){Ember.RSVP=t("rsvp"),Ember.RSVP.onerrorDefault=function(e){if(e instanceof Error)if(Ember.testing){if(!Ember.Test||!Ember.Test.adapter)throw e;Ember.Test.adapter.exception(e)}else Ember.Logger.error(e.stack)},Ember.RSVP.on("error",Ember.RSVP.onerrorDefault)}(),function(){var e=Array.prototype.slice;if(Ember.FEATURES.isEnabled("propertyBraceExpansion"))var t=Ember.expandProperties;(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(){if(Ember.FEATURES.isEnabled("propertyBraceExpansion")){for(var r=function(e){n.push(e)},n=[],i=0;i<arguments.length;++i)t(arguments[i],r);this.__ember_observes__=n}else this.__ember_observes__=e.call(arguments);return this},Function.prototype.observesImmediately=function(){for(var e=0,t=arguments.length;t>e;e++){arguments[e]}return this.observes.apply(this,arguments)},Function.prototype.observesBefore=function(){if(Ember.FEATURES.isEnabled("propertyBraceExpansion")){for(var r=function(e){n.push(e)},n=[],i=0;i<arguments.length;++i)t(arguments[i],r);this.__ember_observesBefore__=n}else this.__ember_observesBefore__=e.call(arguments);return this},Function.prototype.on=function(){var t=e.call(arguments);return this.__ember_listens__=t,this})}(),function(){Ember.Comparable=Ember.Mixin.create({compare:Ember.required(Function)})}(),function(){{var e=Ember.get;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 Ember.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=[],r=Ember.get;Ember.set}Ember.MutableArray=Ember.Mixin.create(Ember.Array,Ember.MutableEnumerable,{replace:Ember.required(),clear:function(){var e=r(this,"length");return 0===e?this:(this.replace(0,e,t),this)},insertAt:function(t,n){if(t>r(this,"length"))throw new Ember.Error(e);return this.replace(t,0,[n]),this},removeAt:function(n,i){if("number"==typeof n){if(0>n||n>=r(this,"length"))throw new Ember.Error(e);void 0===i&&(i=1),this.replace(n,i,t)}return this},pushObject:function(e){return this.insertAt(r(this,"length"),e),e},pushObjects:function(e){if(!Ember.Enumerable.detect(e)&&!Ember.isArray(e))throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects");return this.replace(r(this,"length"),0,e),this},popObject:function(){var e=r(this,"length");if(0===e)return null;var t=this.objectAt(e-1);return this.removeAt(e-1,1),t},shiftObject:function(){if(0===r(this,"length"))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=r(this,"length");if(0===e)return this;var t=this.toArray().reverse();return this.replace(0,e,t),this},setObjects:function(e){if(0===e.length)return this.clear();var t=r(this,"length");return this.replace(0,t,e),this},removeObject:function(e){for(var t=r(this,"length")||0;--t>=0;){var n=this.objectAt(t);n===e&&this.removeAt(t)}return this},addObject:function(e){return this.contains(e)||this.pushObject(e),this}})}(),function(){{var e=Ember.get;Ember.set}Ember.TargetActionSupport=Ember.Mixin.create({target:null,action:null,actionContext:null,targetObject:Ember.computed(function(){var t=e(this,"target");if("string"===Ember.typeOf(t)){var r=e(this,t);return void 0===r&&(r=e(Ember.lookup,t)),r}return t}).property("target"),actionContextObject:Ember.computed(function(){var t=e(this,"actionContext");if("string"===Ember.typeOf(t)){var r=e(this,t);return void 0===r&&(r=e(Ember.lookup,t)),r}return t}).property("actionContext"),triggerAction:function(t){function r(e,t){var r=[];return t&&r.push(t),r.concat(e)}t=t||{};var n=t.action||e(this,"action"),i=t.target||e(this,"targetObject"),o=t.actionContext;if("undefined"==typeof o&&(o=e(this,"actionContextObject")||this),i&&n){var a;return a=i.send?i.send.apply(i,r(o,n)):i[n].apply(i,r(o)),a!==!1&&(a=!0),a}return!1}})}(),function(){Ember.Evented=Ember.Mixin.create({on:function(e,t,r){return Ember.addListener(this,e,t,r),this},one:function(e,t,r){return r||(r=t,t=null),Ember.addListener(this,e,t,r,!0),this},trigger:function(e){var t,r,n=[];for(t=1,r=arguments.length;r>t;t++)n.push(arguments[t]);Ember.sendEvent(this,e,n)},off:function(e,t,r){return Ember.removeListener(this,e,t,r),this},has:function(e){return Ember.hasListeners(this,e)}})}(),function(){var e=t("rsvp");e.configure("async",function(e,t){Ember.run.schedule("actions",t,e,t)}),e.Promise.prototype.fail=function(e,t){return this["catch"](e,t)};var r=Ember.get;Ember.DeferredMixin=Ember.Mixin.create({then:function(e,t){function n(t){return t===o?e(a):e(t)}var i,o,a;return a=this,i=r(this,"_deferred"),o=i.promise,o.then(e&&n,t)},resolve:function(e){var t,n;t=r(this,"_deferred"),n=t.promise,e===this?t.resolve(n):t.resolve(e)},reject:function(e){r(this,"_deferred").reject(e)},_deferred:Ember.computed(function(){return e.defer()})})}(),function(){var e=Ember.get,t=Ember.typeOf;Ember.ActionHandler=Ember.Mixin.create({mergedProperties:["_actions"],willMergeMixin:function(e){var r;e._actions||("object"===t(e.actions)?r="actions":"object"===t(e.events)&&(r="events"),r&&(e._actions=Ember.merge(e._actions||{},e[r])),delete e[r])},send:function(t){var r,n=[].slice.call(arguments,1);if(this._actions&&this._actions[t]){if(this._actions[t].apply(this,n)!==!0)return}else if(this.deprecatedSend&&this.deprecatedSendHandles&&this.deprecatedSendHandles(t)&&this.deprecatedSend.apply(this,[].slice.call(arguments))!==!0)return;(r=e(this,"target"))&&r.send.apply(r,arguments)}})}(),function(){function e(e,r){return r.then(function(r){return t(e,"isFulfilled",!0),t(e,"content",r),r},function(r){throw t(e,"isRejected",!0),t(e,"reason",r),r})}var t=Ember.set,r=Ember.get,n=Ember.computed.not,i=Ember.computed.or;Ember.PromiseProxyMixin=Ember.Mixin.create({reason:null,isPending:n("isSettled").readOnly(),isSettled:i("isRejected","isFulfilled").readOnly(),isRejected:!1,isFulfilled:!1,promise:Ember.computed(function(t,r){if(2===arguments.length)return e(this,r);throw new Ember.Error("PromiseProxy's promise must be set")}),then:function(e,t){return r(this,"promise").then(e,t)}})}(),function(){function e(e,t,r){this.type=e,this.count=t,this.items=r}function t(e,t,r,n){this.operation=e,this.index=t,this.split=r,this.rangeStart=n}var r=Ember.get,n=Ember.EnumerableUtils.forEach,i="r",o="i",a="d";Ember.TrackedArray=function(t){arguments.length<1&&(t=[]);var n=r(t,"length");this._operations=n?[new e(i,n,t)]:[]},Ember.TrackedArray.RETAIN=i,Ember.TrackedArray.INSERT=o,Ember.TrackedArray.DELETE=a,Ember.TrackedArray.prototype={addItems:function(t,n){var i=r(n,"length");if(!(1>i)){var a,s,u=this._findArrayOperation(t),c=u.operation,l=u.index,h=u.rangeStart;s=new e(o,i,n),c?u.split?(this._split(l,t-h,s),a=l+1):(this._operations.splice(l,0,s),a=l):(this._operations.push(s),a=l),this._composeInsert(a)}},removeItems:function(t,r){if(!(1>r)){var n,i,o=this._findArrayOperation(t),s=(o.operation,o.index),u=o.rangeStart;return n=new e(a,r),o.split?(this._split(s,t-u,n),i=s+1):(this._operations.splice(s,0,n),i=s),this._composeDelete(i)}},apply:function(t){var r=[],o=0;n(this._operations,function(e){t(e.items,o,e.type),e.type!==a&&(o+=e.count,r=r.concat(e.items))}),this._operations=[new e(i,r.length,r)]},_findArrayOperation:function(e){var r,n,i,o,s,u=!1;for(r=o=0,n=this._operations.length;n>r;++r)if(i=this._operations[r],i.type!==a){if(s=o+i.count-1,e===o)break;if(e>o&&s>=e){u=!0;break}o=s+1}return new t(i,r,u,o)},_split:function(t,r,n){var i=this._operations[t],o=i.items.slice(r),a=new e(i.type,o.length,o);i.count=r,i.items=i.items.slice(0,r),this._operations.splice(t+1,0,n,a)},_composeInsert:function(e){var t=this._operations[e],r=this._operations[e-1],n=this._operations[e+1],i=r&&r.type,a=n&&n.type;i===o?(r.count+=t.count,r.items=r.items.concat(t.items),a===o?(r.count+=n.count,r.items=r.items.concat(n.items),this._operations.splice(e,2)):this._operations.splice(e,1)):a===o&&(t.count+=n.count,t.items=t.items.concat(n.items),this._operations.splice(e+1,1))},_composeDelete:function(e){var t,r,n,i=this._operations[e],s=i.count,u=this._operations[e-1],c=u&&u.type,l=!1,h=[];c===a&&(i=u,e-=1);for(var m=e+1;s>0;++m)t=this._operations[m],r=t.type,n=t.count,r!==a?(n>s?(h=h.concat(t.items.splice(0,s)),t.count-=s,m-=1,n=s,s=0):(n===s&&(l=!0),h=h.concat(t.items),s-=n),r===o&&(i.count-=n)):i.count+=n;return i.count>0?this._operations.splice(e+1,m-1-e):this._operations.splice(e,l?2:1),h},toString:function(){var e="";return n(this._operations,function(t){e+=" "+t.type+":"+t.count}),e.substring(1)}}}(),function(){function e(e,t){this.type=e,this.count=t}var t=(Ember.get,Ember.EnumerableUtils.forEach),r="r",n="f";Ember.SubArray=function(t){arguments.length<1&&(t=0),this._operations=t>0?[new e(r,t)]:[]},Ember.SubArray.prototype={addItem:function(t,i){var o=-1,a=i?r:n,s=this;return this._findOperation(t,function(n,u,c,l,h){var m,f;a===n.type?++n.count:t===c?s._operations.splice(u,0,new e(a,1)):(m=new e(a,1),f=new e(n.type,l-t+1),n.count=t-c,s._operations.splice(u+1,0,m,f)),i&&(o=n.type===r?h+(t-c):h),s._composeAt(u)},function(t){s._operations.push(new e(a,1)),i&&(o=t),s._composeAt(s._operations.length-1)}),o},removeItem:function(e){var t=-1,n=this;return this._findOperation(e,function(i,o,a,s,u){i.type===r&&(t=u+(e-a)),i.count>1?--i.count:(n._operations.splice(o,1),n._composeAt(o))},function(){throw new Ember.Error("Can't remove an item that has never been added.")}),t},_findOperation:function(e,t,n){var i,o,a,s,u,c=0;for(i=s=0,o=this._operations.length;o>i;s=u+1,++i){if(a=this._operations[i],u=s+a.count-1,e>=s&&u>=e)return t(a,i,s,u,c),void 0;a.type===r&&(c+=a.count)}n(c)},_composeAt:function(e){var t,r=this._operations[e];r&&(e>0&&(t=this._operations[e-1],t.type===r.type&&(r.count+=t.count,this._operations.splice(e-1,1),--e)),e<this._operations.length-1&&(t=this._operations[e+1],t.type===r.type&&(r.count+=t.count,this._operations.splice(e+1,1))))},toString:function(){var e="";return t(this._operations,function(t){e+=" "+t.type+":"+t.count}),e.substring(1)}}}(),function(){Ember.Container=t("container"),Ember.Container.set=Ember.set}(),function(){Ember.Application=Ember.Namespace.extend()}(),function(){{var e="Index out of range",t=[],r=Ember.get;Ember.set}Ember.ArrayProxy=Ember.Object.extend(Ember.MutableArray,{content:null,arrangedContent:Ember.computed.alias("content"),objectAtContent:function(e){return r(this,"arrangedContent").objectAt(e)},replaceContent:function(e,t,n){r(this,"content").replace(e,t,n)},_contentWillChange:Ember.beforeObserver("content",function(){this._teardownContent()}),_teardownContent:function(){var e=r(this,"content");e&&e.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer("content",function(){r(this,"content");this._setupContent()}),_setupContent:function(){var e=r(this,"content");e&&e.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},_arrangedContentWillChange:Ember.beforeObserver("arrangedContent",function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this.arrangedContentArrayWillChange(this,0,t,void 0),this.arrangedContentWillChange(this),this._teardownArrangedContent(e)}),_arrangedContentDidChange:Ember.observer("arrangedContent",function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this._setupArrangedContent(),this.arrangedContentDidChange(this),this.arrangedContentArrayDidChange(this,0,void 0,t)}),_setupArrangedContent:function(){var e=r(this,"arrangedContent");e&&e.addArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},_teardownArrangedContent:function(){var e=r(this,"arrangedContent");e&&e.removeArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},arrangedContentWillChange:Ember.K,arrangedContentDidChange:Ember.K,objectAt:function(e){return r(this,"content")&&this.objectAtContent(e)},length:Ember.computed(function(){var e=r(this,"arrangedContent");return e?r(e,"length"):0}),_replace:function(e,t,n){var i=r(this,"content");return i&&this.replaceContent(e,t,n),this},replace:function(){if(r(this,"arrangedContent")!==r(this,"content"))throw new Ember.Error("Using replace on an arranged ArrayProxy is not allowed.");this._replace.apply(this,arguments)},_insertAt:function(t,n){if(t>r(this,"content.length"))throw new Ember.Error(e);return this._replace(t,0,[n]),this},insertAt:function(e,t){if(r(this,"arrangedContent")===r(this,"content"))return this._insertAt(e,t);throw new Ember.Error("Using insertAt on an arranged ArrayProxy is not allowed.")},removeAt:function(n,i){if("number"==typeof n){var o,a=r(this,"content"),s=r(this,"arrangedContent"),u=[];if(0>n||n>=r(this,"length"))throw new Ember.Error(e);for(void 0===i&&(i=1),o=n;n+i>o;o++)u.push(a.indexOf(s.objectAt(o)));for(u.sort(function(e,t){return t-e}),Ember.beginPropertyChanges(),o=0;o<u.length;o++)this._replace(u[o],1,t);Ember.endPropertyChanges()}return this},pushObject:function(e){return this._insertAt(r(this,"content.length"),e),e},pushObjects:function(e){if(!Ember.Enumerable.detect(e)&&!Ember.isArray(e))throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects");return this._replace(r(this,"length"),0,e),this},setObjects:function(e){if(0===e.length)return this.clear();var t=r(this,"length");return this._replace(0,t,e),this},unshiftObject:function(e){return this._insertAt(0,e),e},unshiftObjects:function(e){return this._replace(0,0,e),this},slice:function(){var e=this.toArray();return e.slice.apply(e,arguments)},arrangedContentArrayWillChange:function(e,t,r,n){this.arrayContentWillChange(t,r,n)},arrangedContentArrayDidChange:function(e,t,r,n){this.arrayContentDidChange(t,r,n)},init:function(){this._super(),this._setupContent(),this._setupArrangedContent()},willDestroy:function(){this._teardownArrangedContent(),this._teardownContent()}})}(),function(){function e(e,t,r,i,o){var a,s=r._objects;for(s||(s=r._objects={});--o>=i;){var u=e.objectAt(o);u&&(Ember.addBeforeObserver(u,t,r,"contentKeyWillChange"),Ember.addObserver(u,t,r,"contentKeyDidChange"),a=n(u),s[a]||(s[a]=[]),s[a].push(o))}}function t(e,t,r,i,a){var s=r._objects;s||(s=r._objects={});for(var u,c;--a>=i;){var l=e.objectAt(a);l&&(Ember.removeBeforeObserver(l,t,r,"contentKeyWillChange"),Ember.removeObserver(l,t,r,"contentKeyDidChange"),c=n(l),u=s[c],u[o.call(u,a)]=null)}}var r=(Ember.set,Ember.get),n=Ember.guidFor,i=Ember.EnumerableUtils.forEach,o=Ember.ArrayPolyfills.indexOf,a=Ember.Object.extend(Ember.Array,{init:function(e,t,r){this._super(),this._keyName=t,this._owner=r,this._content=e},objectAt:function(e){var t=this._content.objectAt(e);return t&&r(t,this._keyName)},length:Ember.computed(function(){var e=this._content;return e?r(e,"length"):0})}),s=/^.+:(before|change)$/;Ember.EachProxy=Ember.Object.extend({init:function(e){this._super(),this._content=e,e.addArrayObserver(this),i(Ember.watchedEvents(this),function(e){this.didAddListener(e)},this)},unknownProperty:function(e){var t;return t=new a(this._content,e,this),Ember.defineProperty(this,e,null,t),this.beginObservingContentKey(e),t},arrayWillChange:function(e,r,n){var i,o,a=this._keys;o=n>0?r+n:-1,Ember.beginPropertyChanges(this);for(i in a)a.hasOwnProperty(i)&&(o>0&&t(e,i,this,r,o),Ember.propertyWillChange(this,i));Ember.propertyWillChange(this._content,"@each"),Ember.endPropertyChanges(this)},arrayDidChange:function(t,r,n,i){var o,a=this._keys;o=i>0?r+i:-1,Ember.changeProperties(function(){for(var n in a)a.hasOwnProperty(n)&&(o>0&&e(t,n,this,r,o),Ember.propertyDidChange(this,n));Ember.propertyDidChange(this._content,"@each")},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(t){var n=this._keys;if(n||(n=this._keys={}),n[t])n[t]++;else{n[t]=1;var i=this._content,o=r(i,"length");e(i,t,this,0,o)}},stopObservingContentKey:function(e){var n=this._keys;if(n&&n[e]>0&&--n[e]<=0){var i=this._content,o=r(i,"length");t(i,e,this,0,o)}},contentKeyWillChange:function(e,t){Ember.propertyWillChange(this,t)},contentKeyDidChange:function(e,t){Ember.propertyDidChange(this,t)}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils._replace),r=Ember.Mixin.create(Ember.MutableArray,Ember.Observable,Ember.Copyable,{get:function(e){return"length"===e?this.length:"number"==typeof e?this[e]:this._super(e)},objectAt:function(e){return this[e]},replace:function(r,n,i){if(this.isFrozen)throw Ember.FROZEN_ERROR;var o=i?e(i,"length"):0;return this.arrayContentWillChange(r,n,o),0===o?this.splice(r,n):t(this,r,n,i),this.arrayContentDidChange(r,n,o),this},unknownProperty:function(e,t){var r;return void 0!==t&&void 0===r&&(r=this[e]=t),r},indexOf:function(e,t){var r,n=this.length;for(t=void 0===t?0:0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=n),r=t;n>r;r++)if(this[r]===e)return r;return-1},lastIndexOf:function(e,t){var r,n=this.length;for(t=void 0===t?n-1:0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=n),r=t;r>=0;r--)if(this[r]===e)return r;return-1},copy:function(e){return e?this.map(function(e){return Ember.copy(e,!0)}):this.slice()}}),n=["length"];Ember.EnumerableUtils.forEach(r.keys(),function(e){Array.prototype[e]&&n.push(e)}),n.length>0&&(r=r.without.apply(r,n)),Ember.NativeArray=r,Ember.A=function(e){return void 0===e&&(e=[]),Ember.Array.detect(e)?e:Ember.NativeArray.apply(e)},Ember.NativeArray.activate=function(){r.apply(Array.prototype),Ember.A=function(e){return e||[]}},(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.Array)&&Ember.NativeArray.activate()}(),function(){var e=Ember.get,t=Ember.set,r=Ember.guidFor,n=Ember.isNone,i=Ember.String.fmt;Ember.Set=Ember.CoreObject.extend(Ember.MutableEnumerable,Ember.Copyable,Ember.Freezable,{length:0,clear:function(){if(this.isFrozen)throw new Ember.Error(Ember.FROZEN_ERROR);var n=e(this,"length");if(0===n)return this;var i;this.enumerableContentWillChange(n,0),Ember.propertyWillChange(this,"firstObject"),Ember.propertyWillChange(this,"lastObject");for(var o=0;n>o;o++)i=r(this[o]),delete this[i],delete this[o];return t(this,"length",0),Ember.propertyDidChange(this,"firstObject"),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(n,0),this},isEqual:function(t){if(!Ember.Enumerable.detect(t))return!1;var r=e(this,"length");if(e(t,"length")!==r)return!1;for(;--r>=0;)if(!t.contains(this[r]))return!1;return!0},add:Ember.aliasMethod("addObject"),remove:Ember.aliasMethod("removeObject"),pop:function(){if(e(this,"isFrozen"))throw new Ember.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]:void 0}),lastObject:Ember.computed(function(){return this.length>0?this[this.length-1]:void 0}),addObject:function(i){if(e(this,"isFrozen"))throw new Ember.Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,a=r(i),s=this[a],u=e(this,"length");return s>=0&&u>s&&this[s]===i?this:(o=[i],this.enumerableContentWillChange(null,o),Ember.propertyWillChange(this,"lastObject"),u=e(this,"length"),this[a]=u,this[u]=i,t(this,"length",u+1),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(null,o),this)},removeObject:function(i){if(e(this,"isFrozen"))throw new Ember.Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,a,s=r(i),u=this[s],c=e(this,"length"),l=0===u,h=u===c-1;return u>=0&&c>u&&this[u]===i&&(a=[i],this.enumerableContentWillChange(a,null),l&&Ember.propertyWillChange(this,"firstObject"),h&&Ember.propertyWillChange(this,"lastObject"),c-1>u&&(o=this[c-1],this[u]=o,this[r(o)]=u),delete this[s],delete this[c-1],t(this,"length",c-1),l&&Ember.propertyDidChange(this,"firstObject"),h&&Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(a,null)),this},contains:function(e){return this[r(e)]>=0},copy:function(){var n=this.constructor,i=new n,o=e(this,"length");for(t(i,"length",o);--o>=0;)i[o]=this[o],i[r(this[o])]=o;return i},toString:function(){var e,t=this.length,r=[];for(e=0;t>e;e++)r[e]=this[e];return i("Ember.Set<%@>",[r.join(",")])}})}(),function(){var e=Ember.DeferredMixin,t=(Ember.get,Ember.Object.extend(e));t.reopenClass({promise:function(e,r){var n=t.create();return e.call(r,n),n}}),Ember.Deferred=t}(),function(){var e=Ember.ArrayPolyfills.forEach,t=Ember.ENV.EMBER_LOAD_HOOKS||{},r={};Ember.onLoad=function(e,n){var i;t[e]=t[e]||Ember.A(),t[e].pushObject(n),(i=r[e])&&n(i)},Ember.runLoadHooks=function(n,i){r[n]=i,t[n]&&e.call(t[n],function(e){e(i)})}}(),function(){Ember.get;Ember.ControllerMixin=Ember.Mixin.create(Ember.ActionHandler,{isController:!0,target:null,container:null,parentController:null,store:null,model:Ember.computed.alias("content"),deprecatedSendHandles:function(e){return!!this[e]},deprecatedSend:function(e){var t=[].slice.call(arguments,1);this[e].apply(this,t)}}),Ember.Controller=Ember.Object.extend(Ember.ControllerMixin)}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils.forEach);Ember.SortableMixin=Ember.Mixin.create(Ember.MutableEnumerable,{sortProperties:null,sortAscending:!0,sortFunction:Ember.compare,orderBy:function(r,n){var i=0,o=e(this,"sortProperties"),a=e(this,"sortAscending"),s=e(this,"sortFunction");return t(o,function(t){0===i&&(i=s(e(r,t),e(n,t)),0===i||a||(i=-1*i))}),i},destroy:function(){var r=e(this,"content"),n=e(this,"sortProperties");return r&&n&&t(r,function(e){t(n,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},isSorted:Ember.computed.bool("sortProperties"),arrangedContent:Ember.computed("content","sortProperties.@each",function(){var r=e(this,"content"),n=e(this,"isSorted"),i=e(this,"sortProperties"),o=this;return r&&n?(r=r.slice(),r.sort(function(e,t){return o.orderBy(e,t)}),t(r,function(e){t(i,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),Ember.A(r)):r}),_contentWillChange:Ember.beforeObserver("content",function(){var r=e(this,"content"),n=e(this,"sortProperties");r&&n&&t(r,function(e){t(n,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()}),sortAscendingWillChange:Ember.beforeObserver("sortAscending",function(){this._lastSortAscending=e(this,"sortAscending")}),sortAscendingDidChange:Ember.observer("sortAscending",function(){if(e(this,"sortAscending")!==this._lastSortAscending){var t=e(this,"arrangedContent");t.reverseObjects()}}),contentArrayWillChange:function(r,n,i,o){var a=e(this,"isSorted");if(a){var s=e(this,"arrangedContent"),u=r.slice(n,n+i),c=e(this,"sortProperties");t(u,function(e){s.removeObject(e),t(c,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},contentArrayDidChange:function(r,n,i,o){var a=e(this,"isSorted"),s=e(this,"sortProperties");if(a){var u=r.slice(n,n+o);t(u,function(e){this.insertItemSorted(e),t(s,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},insertItemSorted:function(t){var r=e(this,"arrangedContent"),n=e(r,"length"),i=this._binarySearch(t,0,n);r.insertAt(i,t)},contentItemSortPropertyDidChange:function(t){var r=e(this,"arrangedContent"),n=r.indexOf(t),i=r.objectAt(n-1),o=r.objectAt(n+1),a=i&&this.orderBy(t,i),s=o&&this.orderBy(t,o);(0>a||s>0)&&(r.removeObject(t),this.insertItemSorted(t))},_binarySearch:function(t,r,n){var i,o,a,s;return r===n?r:(s=e(this,"arrangedContent"),i=r+Math.floor((n-r)/2),o=s.objectAt(i),a=this.orderBy(o,t),0>a?this._binarySearch(t,i+1,n):a>0?this._binarySearch(t,r,i):i)}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils.forEach),r=Ember.EnumerableUtils.replace;Ember.ArrayController=Ember.ArrayProxy.extend(Ember.ControllerMixin,Ember.SortableMixin,{itemController:null,lookupItemController:function(){return e(this,"itemController")},objectAtContent:function(t){var r=e(this,"length"),n=e(this,"arrangedContent"),i=n&&n.objectAt(t);if(t>=0&&r>t){var o=this.lookupItemController(i);if(o)return this.controllerAt(t,i,o)}return i},arrangedContentDidChange:function(){this._super(),this._resetSubControllers()},arrayContentDidChange:function(n,i,o){var a=e(this,"_subControllers"),s=a.slice(n,n+i);t(s,function(e){e&&e.destroy()}),r(a,n,i,new Array(o)),this._super(n,i,o)},init:function(){this._super(),this.set("_subControllers",Ember.A())},content:Ember.computed(function(){return Ember.A()}),controllerAt:function(t,r,n){var i,o=e(this,"container"),a=e(this,"_subControllers"),s=a[t];if(s)return s;if(i="controller:"+n,!o.has(i))throw new Ember.Error('Could not resolve itemController: "'+n+'"');return s=o.lookupFactory(i).create({target:this,parentController:e(this,"parentController")||this,content:r}),a[t]=s,s},_subControllers:null,_resetSubControllers:function(){var r=e(this,"_subControllers");r&&t(r,function(e){e&&e.destroy()}),this.set("_subControllers",Ember.A())}})}(),function(){Ember.ObjectController=Ember.ObjectProxy.extend(Ember.ControllerMixin)}(),function(){var e=this&&this.jQuery||Ember.imports&&Ember.imports.jQuery;e||"function"!=typeof r||(e=r("jquery")),Ember.$=e}(),function(){if(Ember.$){var e=Ember.String.w("dragstart drag dragenter dragleave dragover drop dragend");Ember.EnumerableUtils.forEach(e,function(e){Ember.$.event.fixHooks[e]={props:["dataTransfer"]}})}}(),function(){function e(e){var t=e.shiftKey||e.metaKey||e.altKey||e.ctrlKey,r=e.which>1;return!t&&!r}var t="undefined"!=typeof document&&function(){var e=document.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML}(),r="undefined"!=typeof document&&function(){var e=document.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value","Test:"===e.childNodes[0].nodeValue&&" Value"===e.childNodes[2].nodeValue}(),n=function(e,t){if(e.getAttribute("id")===t)return e;var r,i,o,a=e.childNodes.length;for(r=0;a>r;r++)if(i=e.childNodes[r],o=1===i.nodeType&&n(i,t))return o},i=function(e,i){t&&(i="&shy;"+i);var o=[];if(r&&(i=i.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,r,n){return o.push([n,t]),r})),e.innerHTML=i,o.length>0){var a,s=o.length;for(a=0;s>a;a++){var u=n(e,o[a][0]),c=document.createTextNode(o[a][1]);u.parentNode.insertBefore(c,u)}}if(t){for(var l=e.firstChild;1===l.nodeType&&!l.nodeName;)l=l.firstChild;3===l.nodeType&&"­"===l.nodeValue.charAt(0)&&(l.nodeValue=l.nodeValue.slice(1))}},o={},a=function(e){if(void 0!==o[e])return o[e];var t=!0;if("select"===e.toLowerCase()){var r=document.createElement("select");i(r,'<option value="test">Test</option>'),t=1===r.options.length}return o[e]=t,t},s=function(e,t){var r=e.tagName;if(a(r))i(e,t);else{var n=e.outerHTML||(new XMLSerializer).serializeToString(e),o=n.match(new RegExp("<"+r+"([^>]*)>","i"))[0],s="</"+r+">",u=document.createElement("div");for(i(u,o+t+s),e=u.firstChild;e.tagName!==r;)e=e.nextSibling}return e};Ember.ViewUtils={setInnerHTML:s,isSimpleClick:e}}(),function(){function e(e){return e?n.test(e)?e.replace(i,""):e:e}function t(e){var t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r=function(e){return t[e]||"&amp;"},n=e.toString();return a.test(n)?n.replace(o,r):n}var r=(Ember.get,Ember.set,function(){this.seen={},this.list=[]});r.prototype={add:function(e){e in this.seen||(this.seen[e]=!0,this.list.push(e))},toDOM:function(){return this.list.join(" ")}};var n=/[^a-zA-Z0-9\-]/,i=/[^a-zA-Z0-9\-]/g,o=/&(?!\w+;)|[<>"'`]/g,a=/[&<>"'`]/,s=function(){var e=document.createElement("div"),t=document.createElement("input");return t.setAttribute("name","foo"),e.appendChild(t),!!e.innerHTML.match("foo")}();Ember.RenderBuffer=function(e){return new Ember._RenderBuffer(e)},Ember._RenderBuffer=function(e){this.tagNames=[e||null],this.buffer=""},Ember._RenderBuffer.prototype={_element:null,_hasElement:!0,elementClasses:null,classes:null,elementId:null,elementAttributes:null,elementProperties:null,elementTag:null,elementStyle:null,parentBuffer:null,push:function(e){return this.buffer+=e,this},addClass:function(e){return this.elementClasses=this.elementClasses||new r,this.elementClasses.add(e),this.classes=this.elementClasses.list,this},setClasses:function(e){this.classes=e},id:function(e){return this.elementId=e,this},attr:function(e,t){var r=this.elementAttributes=this.elementAttributes||{};return 1===arguments.length?r[e]:(r[e]=t,this)},removeAttr:function(e){var t=this.elementAttributes;return t&&delete t[e],this},prop:function(e,t){var r=this.elementProperties=this.elementProperties||{};return 1===arguments.length?r[e]:(r[e]=t,this)},removeProp:function(e){var t=this.elementProperties;return t&&delete t[e],this},style:function(e,t){return this.elementStyle=this.elementStyle||{},this.elementStyle[e]=t,this},begin:function(e){return this.tagNames.push(e||null),this},pushOpeningTag:function(){var r=this.currentTagName();if(r){if(this._hasElement&&!this._element&&0===this.buffer.length)return this._element=this.generateElement(),void 0;var n,i,o=this.buffer,a=this.elementId,s=this.classes,u=this.elementAttributes,c=this.elementProperties,l=this.elementStyle;if(o+="<"+e(r),a&&(o+=' id="'+t(a)+'"',this.elementId=null),s&&(o+=' class="'+t(s.join(" "))+'"',this.classes=null),l){o+=' style="';for(i in l)l.hasOwnProperty(i)&&(o+=i+":"+t(l[i])+";");o+='"',this.elementStyle=null}if(u){for(n in u)u.hasOwnProperty(n)&&(o+=" "+n+'="'+t(u[n])+'"');this.elementAttributes=null}if(c){for(i in c)if(c.hasOwnProperty(i)){var h=c[i];(h||"number"==typeof h)&&(o+=h===!0?" "+i+'="'+i+'"':" "+i+'="'+t(c[i])+'"')}this.elementProperties=null}o+=">",this.buffer=o}},pushClosingTag:function(){var t=this.tagNames.pop();t&&(this.buffer+="</"+e(t)+">")},currentTagName:function(){return this.tagNames[this.tagNames.length-1]},generateElement:function(){var r,n,i,o=this.tagNames.pop(),a=this.elementId,u=this.classes,c=this.elementAttributes,l=this.elementProperties,h=this.elementStyle,m="";i=c&&c.name&&!s?"<"+e(o)+' name="'+t(c.name)+'">':o;var f=document.createElement(i),p=Ember.$(f);if(a&&(p.attr("id",a),this.elementId=null),u&&(p.attr("class",u.join(" ")),this.classes=null),h){for(n in h)h.hasOwnProperty(n)&&(m+=n+":"+h[n]+";");p.attr("style",m),this.elementStyle=null}if(c){for(r in c)c.hasOwnProperty(r)&&p.attr(r,c[r]);this.elementAttributes=null}if(l){for(n in l)l.hasOwnProperty(n)&&p.prop(n,l[n]);this.elementProperties=null}return f},element:function(){var e=this.innerString();return e&&(this._element=Ember.ViewUtils.setInnerHTML(this._element,e)),this._element},string:function(){if(this._hasElement&&this._element){var e=this.element(),t=e.outerHTML;return"undefined"==typeof t?Ember.$("<div/>").append(e).html():t}return this.innerString()},innerString:function(){return this.buffer}}}(),function(){{var e=Ember.get,t=Ember.set;Ember.String.fmt}Ember.EventDispatcher=Ember.Object.extend({events:{touchstart:"touchStart",touchmove:"touchMove",touchend:"touchEnd",touchcancel:"touchCancel",keydown:"keyDown",keyup:"keyUp",keypress:"keyPress",mousedown:"mouseDown",mouseup:"mouseUp",contextmenu:"contextMenu",click:"click",dblclick:"doubleClick",mousemove:"mouseMove",focusin:"focusIn",focusout:"focusOut",mouseenter:"mouseEnter",mouseleave:"mouseLeave",submit:"submit",input:"input",change:"change",dragstart:"dragStart",drag:"drag",dragenter:"dragEnter",dragleave:"dragLeave",dragover:"dragOver",drop:"drop",dragend:"dragEnd"},rootElement:"body",setup:function(r,n){var i,o=e(this,"events");
14
+ Ember.$.extend(o,r||{}),Ember.isNone(n)||t(this,"rootElement",n),n=Ember.$(e(this,"rootElement")),n.addClass("ember-application");for(i in o)o.hasOwnProperty(i)&&this.setupHandler(n,i,o[i])},setupHandler:function(e,t,r){var n=this;e.on(t+".ember",".ember-view",function(e,t){return Ember.handleErrors(function(){var i=Ember.View.views[this.id],o=!0,a=null;return a=n._findNearestEventManager(i,r),a&&a!==t?o=n._dispatchEvent(a,e,r,i):i?o=n._bubbleEvent(i,e,r):e.stopPropagation(),o},this)}),e.on(t+".ember","[data-ember-action]",function(e){return Ember.handleErrors(function(){var t=Ember.$(e.currentTarget).attr("data-ember-action"),n=Ember.Handlebars.ActionHelper.registeredActions[t];return n&&n.eventName===r?n.handler(e):void 0},this)})},_findNearestEventManager:function(t,r){for(var n=null;t&&(n=e(t,"eventManager"),!n||!n[r]);)t=e(t,"parentView");return n},_dispatchEvent:function(e,t,r,n){var i=!0,o=e[r];return"function"===Ember.typeOf(o)?(i=Ember.run(function(){return o.call(e,t,n)}),t.stopPropagation()):i=this._bubbleEvent(n,t,r),i},_bubbleEvent:function(e,t,r){return Ember.run(function(){return e.handleEvent(r,t)})},destroy:function(){var t=e(this,"rootElement");return Ember.$(t).off(".ember","**").removeClass("ember-application"),this._super()}})}(),function(){var e=Ember.run.queues,t=Ember.ArrayPolyfills.indexOf;e.splice(t.call(e,"actions")+1,0,"render","afterRender")}(),function(){var e=Ember.get,t=Ember.set;Ember.ControllerMixin.reopen({target:null,namespace:null,view:null,container:null,_childContainers:null,init:function(){this._super(),t(this,"_childContainers",{})},_modelDidChange:Ember.observer("model",function(){var r=e(this,"_childContainers");for(var n in r)r.hasOwnProperty(n)&&r[n].destroy();t(this,"_childContainers",{})})})}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}var t={},r=Ember.get,n=Ember.set,i=Ember.guidFor,o=Ember.EnumerableUtils.forEach,a=Ember.EnumerableUtils.addObject,s=Ember.meta,u=Ember.computed(function(){var e=this._childViews,t=Ember.A(),n=this;return o(e,function(e){var n;e.isVirtual?(n=r(e,"childViews"))&&t.pushObjects(n):t.push(e)}),t.replace=function(e,t,r){if(n instanceof Ember.ContainerView)return n.replace(e,t,r);throw new Ember.Error("childViews is immutable")},t});Ember.TEMPLATES={},Ember.CoreView=Ember.Object.extend(Ember.Evented,Ember.ActionHandler,{isView:!0,states:t,init:function(){this._super(),this.transitionTo("preRender")},parentView:Ember.computed(function(){var e=this._parentView;return e&&e.isVirtual?r(e,"parentView"):e}).property("_parentView"),state:null,_parentView:null,concreteView:Ember.computed(function(){return this.isVirtual?r(this,"parentView"):this}).property("parentView"),instrumentName:"core_view",instrumentDetails:function(e){e.object=this.toString()},renderToBuffer:function(e,t){var r="render."+this.instrumentName,n={};return this.instrumentDetails(n),Ember.instrument(r,n,function(){return this._renderToBuffer(e,t)},this)},_renderToBuffer:function(e){var t=this.tagName;(null===t||void 0===t)&&(t="div");var r=this.buffer=e&&e.begin(t)||Ember.RenderBuffer(t);return this.transitionTo("inBuffer",!1),this.beforeRender(r),this.render(r),this.afterRender(r),r},trigger:function(e){this._super.apply(this,arguments);var t=this[e];if(t){var r,n,i=[];for(r=1,n=arguments.length;n>r;r++)i.push(arguments[r]);return t.apply(this,i)}},deprecatedSendHandles:function(e){return!!this[e]},deprecatedSend:function(e){var t=[].slice.call(arguments,1);this[e].apply(this,t)},has:function(e){return"function"===Ember.typeOf(this[e])||this._super(e)},destroy:function(){var e=this._parentView;if(this._super())return this.removedFromDOM||this.destroyElement(),e&&e.removeChild(this),this.transitionTo("destroying",!1),this},clearRenderedChildren:Ember.K,triggerRecursively:Ember.K,invokeRecursively:Ember.K,transitionTo:Ember.K,destroyElement:Ember.K});var c=Ember._ViewCollection=function(e){var t=this.views=e||[];this.length=t.length};c.prototype={length:0,trigger:function(e){for(var t,r=this.views,n=0,i=r.length;i>n;n++)t=r[n],t.trigger&&t.trigger(e)},triggerRecursively:function(e){for(var t=this.views,r=0,n=t.length;n>r;r++)t[r].triggerRecursively(e)},invokeRecursively:function(e){for(var t,r=this.views,n=0,i=r.length;i>n;n++)t=r[n],e(t)},transitionTo:function(e,t){for(var r=this.views,n=0,i=r.length;i>n;n++)r[n].transitionTo(e,t)},push:function(){this.length+=arguments.length;var e=this.views;return e.push.apply(e,arguments)},objectAt:function(e){return this.views[e]},forEach:function(e){var t=this.views;return o(t,e)},clear:function(){this.length=0,this.views.length=0}};var l=[];Ember.View=Ember.CoreView.extend({concatenatedProperties:["classNames","classNameBindings","attributeBindings"],isView:!0,templateName:null,layoutName:null,template:Ember.computed(function(e,t){if(void 0!==t)return t;var n=r(this,"templateName"),i=this.templateForName(n,"template");return i||r(this,"defaultTemplate")}).property("templateName"),controller:Ember.computed(function(){var e=r(this,"_parentView");return e?r(e,"controller"):null}).property("_parentView"),layout:Ember.computed(function(){var e=r(this,"layoutName"),t=this.templateForName(e,"layout");return t||r(this,"defaultLayout")}).property("layoutName"),_yield:function(e,t){var n=r(this,"template");n&&n(e,t)},templateForName:function(e){if(e){var t=this.container||Ember.Container&&Ember.Container.defaultContainer;return t&&t.lookup("template:"+e)}},context:Ember.computed(function(e,t){return 2===arguments.length?(n(this,"_context",t),t):r(this,"_context")}).volatile(),_context:Ember.computed(function(){var e,t;return(t=r(this,"controller"))?t:(e=this._parentView,e?r(e,"_context"):null)}),_contextDidChange:Ember.observer("context",function(){this.rerender()}),isVisible:!0,childViews:u,_childViews:l,_childViewsWillChange:Ember.beforeObserver("childViews",function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyWillChange(e,"childViews")}}),_childViewsDidChange:Ember.observer("childViews",function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyDidChange(e,"childViews")}}),nearestInstanceOf:function(e){for(var t=r(this,"parentView");t;){if(t instanceof e)return t;t=r(t,"parentView")}},nearestOfType:function(e){for(var t=r(this,"parentView"),n=e instanceof Ember.Mixin?function(t){return e.detect(t)}:function(t){return e.detect(t.constructor)};t;){if(n(t))return t;t=r(t,"parentView")}},nearestWithProperty:function(e){for(var t=r(this,"parentView");t;){if(e in t)return t;t=r(t,"parentView")}},nearestChildOf:function(e){for(var t=r(this,"parentView");t;){if(r(t,"parentView")instanceof e)return t;t=r(t,"parentView")}},_parentViewDidChange:Ember.observer("_parentView",function(){this.isDestroying||(this.trigger("parentViewDidChange"),r(this,"parentView.controller")&&!r(this,"controller")&&this.notifyPropertyChange("controller"))}),_controllerDidChange:Ember.observer("controller",function(){this.isDestroying||(this.rerender(),this.forEachChildView(function(e){e.propertyDidChange("controller")}))}),cloneKeywords:function(){var e=r(this,"templateData"),t=e?Ember.copy(e.keywords):{};return n(t,"view",r(this,"concreteView")),n(t,"_view",this),n(t,"controller",r(this,"controller")),t},render:function(e){var t=r(this,"layout")||r(this,"template");if(t){var n,i=r(this,"context"),o=this.cloneKeywords(),a={view:this,buffer:e,isRenderData:!0,keywords:o,insideGroup:r(this,"templateData.insideGroup")};n=t(i,{data:a}),void 0!==n&&e.push(n)}},rerender:function(){return this.currentState.rerender(this)},clearRenderedChildren:function(){for(var e=this.lengthBeforeRender,t=this.lengthAfterRender,r=this._childViews,n=t-1;n>=e;n--)r[n]&&r[n].destroy()},_applyClassNameBindings:function(e){var t,r,n,i=this.classNames;o(e,function(e){var o,s=Ember.View._parsePropertyPath(e),u=function(){r=this._classStringForProperty(e),t=this.$(),o&&(t.removeClass(o),i.removeObject(o)),r?(t.addClass(r),o=r):o=null};n=this._classStringForProperty(e),n&&(a(i,n),o=n),this.registerObserver(this,s.path,u),this.one("willClearRender",function(){o&&(i.removeObject(o),o=null)})},this)},_applyAttributeBindings:function(e,t){var n,i;o(t,function(t){var o=t.split(":"),a=o[0],s=o[1]||a,u=function(){i=this.$(),n=r(this,a),Ember.View.applyAttributeBindings(i,s,n)};this.registerObserver(this,a,u),n=r(this,a),Ember.View.applyAttributeBindings(e,s,n)},this)},_classStringForProperty:function(e){var t=Ember.View._parsePropertyPath(e),n=t.path,i=r(this,n);return void 0===i&&Ember.isGlobalPath(n)&&(i=r(Ember.lookup,n)),Ember.View._classStringForValue(n,i,t.className,t.falsyClassName)},element:Ember.computed(function(e,t){return void 0!==t?this.currentState.setElement(this,t):this.currentState.getElement(this)}).property("_parentView"),$:function(e){return this.currentState.$(this,e)},mutateChildViews:function(e){for(var t,r=this._childViews,n=r.length;--n>=0;)t=r[n],e(this,t,n);return this},forEachChildView:function(e){var t=this._childViews;if(!t)return this;var r,n,i=t.length;for(n=0;i>n;n++)r=t[n],e(r);return this},appendTo:function(e){return this._insertElementLater(function(){this.$().appendTo(e)}),this},replaceIn:function(e){return this._insertElementLater(function(){Ember.$(e).empty(),this.$().appendTo(e)}),this},_insertElementLater:function(e){this._scheduledInsert=Ember.run.scheduleOnce("render",this,"_insertElement",e)},_insertElement:function(e){this._scheduledInsert=null,this.currentState.insertElement(this,e)},append:function(){return this.appendTo(document.body)},remove:function(){this.removedFromDOM||this.destroyElement(),this.invokeRecursively(function(e){e.clearRenderedChildren&&e.clearRenderedChildren()})},elementId:null,findElementInParentElement:function(e){var t="#"+this.elementId;return Ember.$(t)[0]||Ember.$(t,e)[0]},createElement:function(){if(r(this,"element"))return this;var e=this.renderToBuffer();return n(this,"element",e.element()),this},willInsertElement:Ember.K,didInsertElement:Ember.K,willClearRender:Ember.K,invokeRecursively:function(e,t){for(var r,n,i,o=t===!1?this._childViews:[this];o.length;){r=o.slice(),o=[];for(var a=0,s=r.length;s>a;a++)n=r[a],i=n._childViews?n._childViews.slice(0):null,e(n),i&&o.push.apply(o,i)}},triggerRecursively:function(e){for(var t,r,n,i=[this];i.length;){t=i.slice(),i=[];for(var o=0,a=t.length;a>o;o++)r=t[o],n=r._childViews?r._childViews.slice(0):null,r.trigger&&r.trigger(e),n&&i.push.apply(i,n)}},viewHierarchyCollection:function(){for(var e,t=new c([this]),r=0;r<t.length;r++)e=t.objectAt(r),e._childViews&&t.push.apply(t,e._childViews);return t},destroyElement:function(){return this.currentState.destroyElement(this)},willDestroyElement:Ember.K,_notifyWillDestroyElement:function(){var e=this.viewHierarchyCollection();return e.trigger("willClearRender"),e.trigger("willDestroyElement"),e},_elementDidChange:Ember.observer("element",function(){this.forEachChildView(function(e){delete s(e).cache.element})}),parentViewDidChange:Ember.K,instrumentName:"view",instrumentDetails:function(e){e.template=r(this,"templateName"),this._super(e)},_renderToBuffer:function(e,t){this.lengthBeforeRender=this._childViews.length;var r=this._super(e,t);return this.lengthAfterRender=this._childViews.length,r},renderToBufferIfNeeded:function(e){return this.currentState.renderToBufferIfNeeded(this,e)},beforeRender:function(e){this.applyAttributesToBuffer(e),e.pushOpeningTag()},afterRender:function(e){e.pushClosingTag()},applyAttributesToBuffer:function(e){var t=r(this,"classNameBindings");t.length&&this._applyClassNameBindings(t);var n=r(this,"attributeBindings");n.length&&this._applyAttributeBindings(e,n),e.setClasses(this.classNames),e.id(this.elementId);var i=r(this,"ariaRole");i&&e.attr("role",i),r(this,"isVisible")===!1&&e.style("display","none")},tagName:null,ariaRole:null,classNames:["ember-view"],classNameBindings:l,attributeBindings:l,init:function(){this.elementId=this.elementId||i(this),this._super(),this._childViews=this._childViews.slice(),this.classNameBindings=Ember.A(this.classNameBindings.slice()),this.classNames=Ember.A(this.classNames.slice())},appendChild:function(e,t){return this.currentState.appendChild(this,e,t)},removeChild:function(e){if(!this.isDestroying){n(e,"_parentView",null);var t=this._childViews;return Ember.EnumerableUtils.removeObject(t,e),this.propertyDidChange("childViews"),this}},removeAllChildren:function(){return this.mutateChildViews(function(e,t){e.removeChild(t)})},destroyAllChildren:function(){return this.mutateChildViews(function(e,t){t.destroy()})},removeFromParent:function(){var e=this._parentView;return this.remove(),e&&e.removeChild(this),this},destroy:function(){var e,t,n=this._childViews,i=r(this,"parentView"),o=this.viewName;if(this._super()){for(e=n.length,t=e-1;t>=0;t--)n[t].removedFromDOM=!0;for(o&&i&&i.set(o,null),e=n.length,t=e-1;t>=0;t--)n[t].destroy();return this}},createChildView:function(e,t){if(!e)throw new TypeError("createChildViews first argument must exist");if(e.isView&&e._parentView===this&&e.container===this.container)return e;if(t=t||{},t._parentView=this,Ember.CoreView.detect(e))t.templateData=t.templateData||r(this,"templateData"),t.container=this.container,e=e.create(t),e.viewName&&n(r(this,"concreteView"),e.viewName,e);else if("string"==typeof e){var i="view:"+e,o=this.container.lookupFactory(i);t.templateData=r(this,"templateData"),e=o.create(t)}else t.container=this.container,r(e,"templateData")||(t.templateData=r(this,"templateData")),Ember.setProperties(e,t);return e},becameVisible:Ember.K,becameHidden:Ember.K,_isVisibleDidChange:Ember.observer("isVisible",function(){var e=this.$();if(e){var t=r(this,"isVisible");e.toggle(t),this._isAncestorHidden()||(t?this._notifyBecameVisible():this._notifyBecameHidden())}}),_notifyBecameVisible:function(){this.trigger("becameVisible"),this.forEachChildView(function(e){var t=r(e,"isVisible");(t||null===t)&&e._notifyBecameVisible()})},_notifyBecameHidden:function(){this.trigger("becameHidden"),this.forEachChildView(function(e){var t=r(e,"isVisible");(t||null===t)&&e._notifyBecameHidden()})},_isAncestorHidden:function(){for(var e=r(this,"parentView");e;){if(r(e,"isVisible")===!1)return!0;e=r(e,"parentView")}return!1},clearBuffer:function(){this.invokeRecursively(function(e){e.buffer=null})},transitionTo:function(e,t){var r=this.currentState,n=this.currentState=this.states[e];this.state=e,r&&r.exit&&r.exit(this),n.enter&&n.enter(this),"inDOM"===e&&delete Ember.meta(this).cache.element,t!==!1&&this.forEachChildView(function(t){t.transitionTo(e)})},handleEvent:function(e,t){return this.currentState.handleEvent(this,e,t)},registerObserver:function(e,t,r,n){if(n||"function"!=typeof r||(n=r,r=null),e&&"object"==typeof e){var i=this,o=function(){i.currentState.invokeObserver(this,n)},a=function(){Ember.run.scheduleOnce("render",this,o)};Ember.addObserver(e,t,r,a),this.one("willClearRender",function(){Ember.removeObserver(e,t,r,a)})}}});var h={prepend:function(t,r){t.$().prepend(r),e()},after:function(t,r){t.$().after(r),e()},html:function(t,r){t.$().html(r),e()},replace:function(t){var i=r(t,"element");n(t,"element",null),t._insertElementLater(function(){Ember.$(i).replaceWith(r(t,"element")),e()})},remove:function(t){t.$().remove(),e()},empty:function(t){t.$().empty(),e()}};Ember.View.reopen({domManager:h}),Ember.View.reopenClass({_parsePropertyPath:function(e){var t,r,n=e.split(":"),i=n[0],o="";return n.length>1&&(t=n[1],3===n.length&&(r=n[2]),o=":"+t,r&&(o+=":"+r)),{path:i,classNames:o,className:""===t?void 0:t,falsyClassName:r}},_classStringForValue:function(e,t,r,n){if(r||n)return r&&t?r:n&&!t?n:null;if(t===!0){var i=e.split(".");return Ember.String.dasherize(i[i.length-1])}return t!==!1&&null!=t?t:null}});var m=Ember.Object.extend(Ember.Evented).create();Ember.View.addMutationListener=function(e){m.on("change",e)},Ember.View.removeMutationListener=function(e){m.off("change",e)},Ember.View.notifyMutationListeners=function(){m.trigger("change")},Ember.View.views={},Ember.View.childViewsProperty=u,Ember.View.applyAttributeBindings=function(e,t,r){var n=Ember.typeOf(r);"value"===t||"string"!==n&&("number"!==n||isNaN(r))?"value"===t||"boolean"===n?(Ember.isNone(r)&&(r=""),r!==e.prop(t)&&e.prop(t,r)):r||e.removeAttr(t):r!==e.attr(t)&&e.attr(t,r)},Ember.View.states=t}(),function(){var e=(Ember.get,Ember.set);Ember.View.states._default={appendChild:function(){throw"You can't use appendChild outside of the rendering process"},$:function(){return void 0},getElement:function(){return null},handleEvent:function(){return!0},destroyElement:function(t){return e(t,"element",null),t._scheduledInsert&&(Ember.run.cancel(t._scheduledInsert),t._scheduledInsert=null),t},renderToBufferIfNeeded:function(){return!1},rerender:Ember.K,invokeObserver:Ember.K}}(),function(){var e=Ember.View.states.preRender=Ember.create(Ember.View.states._default);Ember.merge(e,{insertElement:function(e,t){e.createElement();var r=e.viewHierarchyCollection();r.trigger("willInsertElement"),t.call(e);for(var n=e.get("element");n=n.parentNode;)n===document&&(r.transitionTo("inDOM",!1),r.trigger("didInsertElement"))},renderToBufferIfNeeded:function(e,t){return e.renderToBuffer(t),!0},empty:Ember.K,setElement:function(e,t){return null!==t&&e.transitionTo("hasElement"),t}})}(),function(){var e=(Ember.get,Ember.set,Ember.View.states.inBuffer=Ember.create(Ember.View.states._default));Ember.merge(e,{$:function(e){return e.rerender(),Ember.$()},rerender:function(){throw new Ember.Error("Something you did caused a view to re-render after it rendered but before it was inserted into the DOM.")},appendChild:function(e,t,r){var n=e.buffer,i=e._childViews;return t=e.createChildView(t,r),i.length||(i=e._childViews=i.slice()),i.push(t),t.renderToBuffer(n),e.propertyDidChange("childViews"),t},destroyElement:function(e){e.clearBuffer();var t=e._notifyWillDestroyElement();return t.transitionTo("preRender",!1),e},empty:function(){},renderToBufferIfNeeded:function(){return!1},insertElement:function(){throw"You can't insert an element that has already been rendered"},setElement:function(e,t){return null===t?e.transitionTo("preRender"):(e.clearBuffer(),e.transitionTo("hasElement")),t},invokeObserver:function(e,t){t.call(e)}})}(),function(){var e=Ember.get,t=Ember.set,r=Ember.View.states.hasElement=Ember.create(Ember.View.states._default);Ember.merge(r,{$:function(t,r){var n=e(t,"element");return r?Ember.$(r,n):Ember.$(n)},getElement:function(t){var r=e(t,"parentView");return r&&(r=e(r,"element")),r?t.findElementInParentElement(r):Ember.$("#"+e(t,"elementId"))[0]},setElement:function(e,t){if(null!==t)throw"You cannot set an element to a non-null value when the element is already in the DOM.";return e.transitionTo("preRender"),t},rerender:function(e){return e.triggerRecursively("willClearRender"),e.clearRenderedChildren(),e.domManager.replace(e),e},destroyElement:function(e){return e._notifyWillDestroyElement(),e.domManager.remove(e),t(e,"element",null),e._scheduledInsert&&(Ember.run.cancel(e._scheduledInsert),e._scheduledInsert=null),e},empty:function(e){var t,r,n=e._childViews;if(n)for(t=n.length,r=0;t>r;r++)n[r]._notifyWillDestroyElement();e.domManager.empty(e)},handleEvent:function(e,t,r){return e.has(t)?e.trigger(t,r):!0},invokeObserver:function(e,t){t.call(e)}})}(),function(){var e=Ember.View.states.hasElement,t=Ember.View.states.inDOM=Ember.create(e);Ember.merge(t,{enter:function(e){e.isVirtual||(Ember.View.views[e.elementId]=e),e.addBeforeObserver("elementId",function(){throw new Ember.Error("Changing a view's elementId after creation is not allowed")})},exit:function(e){this.isVirtual||delete Ember.View.views[e.elementId]},insertElement:function(){throw"You can't insert an element into the DOM that has already been inserted"}})}(),function(){var e="You can't call %@ on a view being destroyed",t=Ember.String.fmt,r=Ember.View.states.destroying=Ember.create(Ember.View.states._default);Ember.merge(r,{appendChild:function(){throw t(e,["appendChild"])},rerender:function(){throw t(e,["rerender"])},destroyElement:function(){throw t(e,["destroyElement"])},empty:function(){throw t(e,["empty"])},setElement:function(){throw t(e,["set('element', ...)"])},renderToBufferIfNeeded:function(){return!1},insertElement:Ember.K})}(),function(){Ember.View.cloneStates=function(e){var t={};t._default={},t.preRender=Ember.create(t._default),t.destroying=Ember.create(t._default),t.inBuffer=Ember.create(t._default),t.hasElement=Ember.create(t._default),t.inDOM=Ember.create(t.hasElement);for(var r in e)e.hasOwnProperty(r)&&Ember.merge(t[r],e[r]);return t}}(),function(){function e(e,t,r,n){t.triggerRecursively("willInsertElement"),r?r.domManager.after(r,n.string()):e.domManager.prepend(e,n.string()),t.forEach(function(e){e.transitionTo("inDOM"),e.propertyDidChange("element"),e.triggerRecursively("didInsertElement")})}var t=Ember.View.cloneStates(Ember.View.states),r=Ember.get,n=Ember.set,i=Ember.EnumerableUtils.forEach,o=Ember._ViewCollection;Ember.ContainerView=Ember.View.extend(Ember.MutableArray,{states:t,init:function(){this._super();var e=r(this,"childViews");Ember.defineProperty(this,"childViews",Ember.View.childViewsProperty);var t=this._childViews;i(e,function(e,i){var o;"string"==typeof e?(o=r(this,e),o=this.createChildView(o),n(this,e,o)):o=this.createChildView(e),t[i]=o},this);var o=r(this,"currentView");o&&(t.length||(t=this._childViews=this._childViews.slice()),t.push(this.createChildView(o)))},replace:function(e,t,n){var i=n?r(n,"length"):0;if(this.arrayContentWillChange(e,t,i),this.childViewsWillChange(this._childViews,e,t),0===i)this._childViews.splice(e,t);else{var o=[e,t].concat(n);n.length&&!this._childViews.length&&(this._childViews=this._childViews.slice()),this._childViews.splice.apply(this._childViews,o)}return this.arrayContentDidChange(e,t,i),this.childViewsDidChange(this._childViews,e,t,i),this},objectAt:function(e){return this._childViews[e]},length:Ember.computed(function(){return this._childViews.length}).volatile(),render:function(e){this.forEachChildView(function(t){t.renderToBuffer(e)})},instrumentName:"container",childViewsWillChange:function(e,t,r){if(this.propertyWillChange("childViews"),r>0){var n=e.slice(t,t+r);this.currentState.childViewsWillChange(this,e,t,r),this.initializeViews(n,null,null)}},removeChild:function(e){return this.removeObject(e),this},childViewsDidChange:function(e,t,n,i){if(i>0){var o=e.slice(t,t+i);this.initializeViews(o,this,r(this,"templateData")),this.currentState.childViewsDidChange(this,e,t,i)}this.propertyDidChange("childViews")},initializeViews:function(e,t,o){i(e,function(e){n(e,"_parentView",t),!e.container&&t&&n(e,"container",t.container),r(e,"templateData")||n(e,"templateData",o)})},currentView:null,_currentViewWillChange:Ember.beforeObserver("currentView",function(){var e=r(this,"currentView");e&&e.destroy()}),_currentViewDidChange:Ember.observer("currentView",function(){var e=r(this,"currentView");e&&this.pushObject(e)}),_ensureChildrenAreInDOM:function(){this.currentState.ensureChildrenAreInDOM(this)}}),Ember.merge(t._default,{childViewsWillChange:Ember.K,childViewsDidChange:Ember.K,ensureChildrenAreInDOM:Ember.K}),Ember.merge(t.inBuffer,{childViewsDidChange:function(){throw new Ember.Error("You cannot modify child views while in the inBuffer state")}}),Ember.merge(t.hasElement,{childViewsWillChange:function(e,t,r,n){for(var i=r;r+n>i;i++)t[i].remove()},childViewsDidChange:function(e){Ember.run.scheduleOnce("render",e,"_ensureChildrenAreInDOM")},ensureChildrenAreInDOM:function(t){var r,n,i,a,s,u=t._childViews,c=new o;for(r=0,n=u.length;n>r;r++)i=u[r],s||(s=Ember.RenderBuffer(),s._hasElement=!1),i.renderToBufferIfNeeded(s)?c.push(i):c.length?(e(t,c,a,s),s=null,a=i,c.clear()):a=i;c.length&&e(t,c,a,s)}})}(),function(){{var e=Ember.get,t=Ember.set;Ember.String.fmt}Ember.CollectionView=Ember.ContainerView.extend({content:null,emptyViewClass:Ember.View,emptyView:null,itemViewClass:Ember.View,init:function(){var e=this._super();return this._contentDidChange(),e},_contentWillChange:Ember.beforeObserver("content",function(){var t=this.get("content");t&&t.removeArrayObserver(this);var r=t?e(t,"length"):0;this.arrayWillChange(t,0,r)}),_contentDidChange:Ember.observer("content",function(){var t=e(this,"content");t&&(this._assertArrayLike(t),t.addArrayObserver(this));var r=t?e(t,"length"):0;this.arrayDidChange(t,0,null,r)}),_assertArrayLike:function(){},destroy:function(){if(this._super()){var t=e(this,"content");return t&&t.removeArrayObserver(this),this._createdEmptyView&&this._createdEmptyView.destroy(),this}},arrayWillChange:function(t,r,n){var i=e(this,"emptyView");i&&i instanceof Ember.View&&i.removeFromParent();var o,a,s,u=this._childViews;s=this._childViews.length;var c=n===s;for(c&&(this.currentState.empty(this),this.invokeRecursively(function(e){e.removedFromDOM=!0},!1)),a=r+n-1;a>=r;a--)o=u[a],o.destroy()},arrayDidChange:function(r,n,i,o){var a,s,u,c,l,h,m=[];if(c=r?e(r,"length"):0)for(l=e(this,"itemViewClass"),"string"==typeof l&&(l=e(l)||l),u=n;n+o>u;u++)s=r.objectAt(u),a=this.createChildView(l,{content:s,contentIndex:u}),m.push(a);else{if(h=e(this,"emptyView"),!h)return;"string"==typeof h&&(h=e(h)||h),h=this.createChildView(h),m.push(h),t(this,"emptyView",h),Ember.CoreView.detect(h)&&(this._createdEmptyView=h)}this.replace(n,0,m)},createChildView:function(r,n){r=this._super(r,n);var i=e(r,"tagName");return(null===i||void 0===i)&&(i=Ember.CollectionView.CONTAINER_MAP[e(this,"tagName")],t(r,"tagName",i)),r}}),Ember.CollectionView.CONTAINER_MAP={ul:"li",ol:"li",table:"tr",thead:"tr",tbody:"tr",tfoot:"tr",tr:"td",select:"option"}}(),function(){var e=Ember.get,t=Ember.set,r=(Ember.isNone,Array.prototype.slice);Ember.Component=Ember.View.extend(Ember.TargetActionSupport,{init:function(){this._super(),t(this,"context",this),t(this,"controller",this)},defaultLayout:function(e){e.data={view:e._context},Ember.Handlebars.helpers.yield.apply(this,[e])},cloneKeywords:function(){return{view:this,controller:this}},_yield:function(t,r){var n=r.data.view,i=this._parentView,o=e(this,"template");o&&n.appendChild(Ember.View,{isVirtual:!0,tagName:"",_contextView:i,template:o,context:e(i,"context"),controller:e(i,"controller"),templateData:{keywords:i.cloneKeywords()}})},targetObject:Ember.computed(function(){var t=e(this,"_parentView");return t?e(t,"controller"):null}).property("_parentView"),sendAction:function(t){var n,i=r.call(arguments,1);n=void 0===t?e(this,"action"):e(this,t),void 0!==n&&this.triggerAction({action:n,actionContext:i})}})}(),function(){Ember.ViewTargetActionSupport=Ember.Mixin.create(Ember.TargetActionSupport,{target:Ember.computed.alias("controller"),actionContext:Ember.computed.alias("context")})}(),function(){e("metamorph",[],function(){"use strict";// Copyright: ©2011 My Company Inc. All rights reserved.
15
+ var e=function(){},t=0,r=("undefined"==typeof ENV?{}:ENV).DISABLE_RANGE_API,n=!r&&"undefined"!=typeof document&&"createRange"in document&&"undefined"!=typeof Range&&Range.prototype.createContextualFragment,i="undefined"!=typeof document&&function(){var e=document.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML}(),o=document&&function(){var e=document.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value","Test:"===e.childNodes[0].nodeValue&&" Value"===e.childNodes[2].nodeValue}(),a=function(r){var n;n=this instanceof a?this:new e,n.innerHTML=r;var i="metamorph-"+t++;return n.start=i+"-start",n.end=i+"-end",n};e.prototype=a.prototype;var s,u,c,l,h,m,f,p,d;if(l=function(){return this.startTag()+this.innerHTML+this.endTag()},p=function(){return"<script id='"+this.start+"' type='text/x-placeholder'></script>"},d=function(){return"<script id='"+this.end+"' type='text/x-placeholder'></script>"},n)s=function(e,t){var r=document.createRange(),n=document.getElementById(e.start),i=document.getElementById(e.end);return t?(r.setStartBefore(n),r.setEndAfter(i)):(r.setStartAfter(n),r.setEndBefore(i)),r},u=function(e,t){var r=s(this,t);r.deleteContents();var n=r.createContextualFragment(e);r.insertNode(n)},c=function(){var e=s(this,!0);e.deleteContents()},h=function(e){var t=document.createRange();t.setStart(e),t.collapse(!1);var r=t.createContextualFragment(this.outerHTML());e.appendChild(r)},m=function(e){var t=document.createRange(),r=document.getElementById(this.end);t.setStartAfter(r),t.setEndAfter(r);var n=t.createContextualFragment(e);t.insertNode(n)},f=function(e){var t=document.createRange(),r=document.getElementById(this.start);t.setStartAfter(r),t.setEndAfter(r);var n=t.createContextualFragment(e);t.insertNode(n)};else{var b={select:[1,"<select multiple='multiple'>","</select>"],fieldset:[1,"<fieldset>","</fieldset>"],table:[1,"<table>","</table>"],tbody:[2,"<table><tbody>","</tbody></table>"],tr:[3,"<table><tbody><tr>","</tr></tbody></table>"],colgroup:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],map:[1,"<map>","</map>"],_default:[0,"",""]},E=function(e,t){if(e.getAttribute("id")===t)return e;var r,n,i,o=e.childNodes.length;for(r=0;o>r;r++)if(n=e.childNodes[r],i=1===n.nodeType&&E(n,t))return i},v=function(e,t){var r=[];if(o&&(t=t.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,n,i){return r.push([i,t]),n})),e.innerHTML=t,r.length>0){var n,i=r.length;for(n=0;i>n;n++){var a=E(e,r[n][0]),s=document.createTextNode(r[n][1]);a.parentNode.insertBefore(s,a)}}},g=function(e,t){var r=b[e.tagName.toLowerCase()]||b._default,n=r[0],o=r[1],a=r[2];i&&(t="&shy;"+t);var s=document.createElement("div");v(s,o+t+a);for(var u=0;n>=u;u++)s=s.firstChild;if(i){for(var c=s;1===c.nodeType&&!c.nodeName;)c=c.firstChild;3===c.nodeType&&"­"===c.nodeValue.charAt(0)&&(c.nodeValue=c.nodeValue.slice(1))}return s},y=function(e){for(;""===e.parentNode.tagName;)e=e.parentNode;return e},w=function(e,t){e.parentNode!==t.parentNode&&t.parentNode.insertBefore(e,t.parentNode.firstChild)};u=function(e,t){var r,n,i,o=y(document.getElementById(this.start)),a=document.getElementById(this.end),s=a.parentNode;for(w(o,a),r=o.nextSibling;r;){if(n=r.nextSibling,i=r===a){if(!t)break;a=r.nextSibling}if(r.parentNode.removeChild(r),i)break;r=n}for(r=g(o.parentNode,e);r;)n=r.nextSibling,s.insertBefore(r,a),r=n},c=function(){var e=y(document.getElementById(this.start)),t=document.getElementById(this.end);this.html(""),e.parentNode.removeChild(e),t.parentNode.removeChild(t)},h=function(e){for(var t,r=g(e,this.outerHTML());r;)t=r.nextSibling,e.appendChild(r),r=t},m=function(e){var t,r,n=document.getElementById(this.end),i=n.nextSibling,o=n.parentNode;for(r=g(o,e);r;)t=r.nextSibling,o.insertBefore(r,i),r=t},f=function(e){var t,r,n=document.getElementById(this.start),i=n.parentNode;r=g(i,e);for(var o=n.nextSibling;r;)t=r.nextSibling,i.insertBefore(r,o),r=t}}return a.prototype.html=function(e){return this.checkRemoved(),void 0===e?this.innerHTML:(u.call(this,e),this.innerHTML=e,void 0)},a.prototype.replaceWith=function(e){this.checkRemoved(),u.call(this,e,!0)},a.prototype.remove=c,a.prototype.outerHTML=l,a.prototype.appendTo=h,a.prototype.after=m,a.prototype.prepend=f,a.prototype.startTag=p,a.prototype.endTag=d,a.prototype.isRemoved=function(){var e=document.getElementById(this.start),t=document.getElementById(this.end);return!e||!t},a.prototype.checkRemoved=function(){if(this.isRemoved())throw new Error("Cannot perform operations on a Metamorph that is not in the DOM.")},a})}(),function(){var e=Object.create||function(e){function t(){}return t.prototype=e,new t},t=Ember.imports&&Ember.imports.Handlebars||this&&this.Handlebars;t||"function"!=typeof r||(t=r("handlebars")),Ember.Handlebars=e(t),Ember.Handlebars.helper=function(e,t){Ember.View.detect(t)?Ember.Handlebars.registerHelper(e,Ember.Handlebars.makeViewHelper(t)):Ember.Handlebars.registerBoundHelper.apply(null,arguments)},Ember.Handlebars.makeViewHelper=function(e){return function(t){return Ember.Handlebars.helpers.view.call(this,e,t)}},Ember.Handlebars.helpers=e(t.helpers),Ember.Handlebars.Compiler=function(){},t.Compiler&&(Ember.Handlebars.Compiler.prototype=e(t.Compiler.prototype)),Ember.Handlebars.Compiler.prototype.compiler=Ember.Handlebars.Compiler,Ember.Handlebars.JavaScriptCompiler=function(){},t.JavaScriptCompiler&&(Ember.Handlebars.JavaScriptCompiler.prototype=e(t.JavaScriptCompiler.prototype),Ember.Handlebars.JavaScriptCompiler.prototype.compiler=Ember.Handlebars.JavaScriptCompiler),Ember.Handlebars.JavaScriptCompiler.prototype.namespace="Ember.Handlebars",Ember.Handlebars.JavaScriptCompiler.prototype.initializeBuffer=function(){return"''"},Ember.Handlebars.JavaScriptCompiler.prototype.appendToBuffer=function(e){return"data.buffer.push("+e+");"};var n=/helpers\.(.*?)\)/,i=/helpers\['(.*?)'/,o=/(.*blockHelperMissing\.call\(.*)(stack[0-9]+)(,.*)/;Ember.Handlebars.JavaScriptCompiler.stringifyLastBlockHelperMissingInvocation=function(e){var t=e[e.length-1],r=(n.exec(t)||i.exec(t))[1],a=o.exec(t);e[e.length-1]=a[1]+"'"+r+"'"+a[3]};var a=Ember.Handlebars.JavaScriptCompiler.stringifyLastBlockHelperMissingInvocation,s=Ember.Handlebars.JavaScriptCompiler.prototype.blockValue;Ember.Handlebars.JavaScriptCompiler.prototype.blockValue=function(){s.apply(this,arguments),a(this.source)};var u=Ember.Handlebars.JavaScriptCompiler.prototype.ambiguousBlockValue;Ember.Handlebars.JavaScriptCompiler.prototype.ambiguousBlockValue=function(){u.apply(this,arguments),a(this.source)};var c="ember"+ +new Date,l=1;Ember.Handlebars.Compiler.prototype.mustache=function(e){if(e.isHelper&&"control"===e.id.string)e.hash=e.hash||new t.AST.HashNode([]),e.hash.pairs.push(["controlID",new t.AST.StringNode(c+l++)]);else if(e.params.length||e.hash);else{var r=new t.AST.IdNode([{part:"_triageMustache"}]);e.escaped||(e.hash=e.hash||new t.AST.HashNode([]),e.hash.pairs.push(["unescaped",new t.AST.StringNode("true")])),e=new t.AST.MustacheNode([r].concat([e.id]),e.hash,!e.escaped)}return t.Compiler.prototype.mustache.call(this,e)},Ember.Handlebars.precompile=function(e){var r=t.parse(e),n={knownHelpers:{action:!0,unbound:!0,"bind-attr":!0,template:!0,view:!0,_triageMustache:!0},data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(r,n);return(new Ember.Handlebars.JavaScriptCompiler).compile(i,n,void 0,!0)},t.compile&&(Ember.Handlebars.compile=function(e){var r=t.parse(e),n={data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(r,n),o=(new Ember.Handlebars.JavaScriptCompiler).compile(i,n,void 0,!0),a=Ember.Handlebars.template(o);return a.isMethod=!1,a})}(),function(){function e(e,t,r,n){var i,o,a,s,u=[],c=n.hash,l=c.boundOptions;for(s in l)l.hasOwnProperty(s)&&(c[s]=Ember.Handlebars.get(e,l[s],n));for(i=0,o=r.length;o>i;++i)a=r[i],u.push(Ember.Handlebars.get(a.root,a.path,n));return u.push(n),t.apply(e,u)}var t=Array.prototype.slice,r=Ember.Handlebars.template,n=Ember.Handlebars.normalizePath=function(e,t,r){var n,i,o=r&&r.keywords||{};return n=t.split(".",1)[0],o.hasOwnProperty(n)&&(e=o[n],i=!0,t=t===n?"":t.substr(n.length+1)),{root:e,path:t,isKeyword:i}},i=Ember.Handlebars.get=function(e,t,r){var i,o=r&&r.data,a=n(e,t,o);return Ember.FEATURES.isEnabled("ember-handlebars-caps-lookup")?i=Ember.isGlobalPath(t)?Ember.get(Ember.lookup,t):Ember.get(a.root,a.path):(e=a.root,t=a.path,i=Ember.get(e,t),void 0===i&&e!==Ember.lookup&&Ember.isGlobalPath(t)&&(i=Ember.get(Ember.lookup,t))),i};Ember.Handlebars.resolveParams=function(e,t,r){for(var n,o,a=[],s=r.types,u=0,c=t.length;c>u;u++)n=t[u],o=s[u],"ID"===o?a.push(i(e,n,r)):a.push(n);return a},Ember.Handlebars.resolveHash=function(e,t,r){var n,o={},a=r.hashTypes;for(var s in t)t.hasOwnProperty(s)&&(n=a[s],o[s]="ID"===n?i(e,t[s],r):t[s]);return o},Ember.Handlebars.registerHelper("helperMissing",function(e){var r,n="",i=arguments[arguments.length-1],o=Ember.Handlebars.resolveHelper(i.data.view.container,e);if(o)return o.apply(this,t.call(arguments,1));throw r="%@ Handlebars error: Could not find property '%@' on object %@.",i.data&&(n=i.data.view),new Ember.Error(Ember.String.fmt(r,[n,e,this]))}),Ember.Handlebars.registerHelper("blockHelperMissing",function(e){var r=arguments[arguments.length-1],n=Ember.Handlebars.resolveHelper(r.data.view.container,e);return n?n.apply(this,t.call(arguments,1)):Handlebars.helpers.helperMissing.call(this,e)}),Ember.Handlebars.registerBoundHelper=function(e){var r=t.call(arguments,1),n=Ember.Handlebars.makeBoundHelper.apply(this,r);Ember.Handlebars.registerHelper(e,n)},Ember.Handlebars.makeBoundHelper=function(r){function i(){var i,a,s,u,c,l=t.call(arguments,0,-1),h=l.length,m=arguments[arguments.length-1],f=[],p=m.types,d=m.data,b=m.hash,E=d.view,v=m.contexts,g=v&&v.length?v[0]:this,y="",w=Ember._SimpleHandlebarsView.prototype.normalizedValue,_=b.boundOptions={};for(s in b)Ember.IS_BINDING.test(s)&&(_[s.slice(0,-7)]=b[s]);var C=[];for(d.properties=[],i=0;h>i;++i)if(d.properties.push(l[i]),"ID"===p[i]){var O=n(g,l[i],d);f.push(O),C.push(O)}else f.push(null);if(d.isUnbound)return e(this,r,f,m);var A=new Ember._SimpleHandlebarsView(null,null,!m.hash.unescaped,m.data);A.normalizedValue=function(){var e,t=[];for(e in _)_.hasOwnProperty(e)&&(c=n(g,_[e],d),A.path=c.path,A.pathRoot=c.root,b[e]=w.call(A));for(i=0;h>i;++i)c=f[i],c?(A.path=c.path,A.pathRoot=c.root,t.push(w.call(A))):t.push(l[i]);return t.push(m),r.apply(g,t)},E.appendChild(A);for(u in _)_.hasOwnProperty(u)&&C.push(n(g,_[u],d));for(i=0,a=C.length;a>i;++i)c=C[i],E.registerObserver(c.root,c.path,A,A.rerender);if("ID"===p[0]&&0!==f.length){var P=f[0],x=P.root,T=P.path;Ember.isEmpty(T)||(y=T+".");for(var S=0,V=o.length;V>S;S++)E.registerObserver(x,y+o[S],A,A.rerender)}}var o=t.call(arguments,1);return i._rawFunction=r,i},Ember.Handlebars.template=function(e){var t=r(e);return t.isTop=!0,t}}(),function(){Ember.String.htmlSafe=function(e){return new Handlebars.SafeString(e)};var e=Ember.String.htmlSafe;(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)&&(String.prototype.htmlSafe=function(){return e(this)})}(),function(){Ember.Handlebars.resolvePaths=function(e){for(var t=[],r=e.contexts,n=e.roots,i=e.data,o=0,a=r.length;a>o;o++)t.push(Ember.Handlebars.get(n[o],r[o],{data:i}));return t}}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}var r=(Ember.set,Ember.get,t("metamorph")),n={remove:function(t){t.morph.remove(),e()},prepend:function(t,r){t.morph.prepend(r),e()},after:function(t,r){t.morph.after(r),e()},html:function(t,r){t.morph.html(r),e()},replace:function(t){var r=t.morph;t.transitionTo("preRender"),Ember.run.schedule("render",this,function(){if(!t.isDestroying){t.clearRenderedChildren();var n=t.renderToBuffer();t.invokeRecursively(function(e){e.propertyWillChange("element")}),t.triggerRecursively("willInsertElement"),r.replaceWith(n.string()),t.transitionTo("inDOM"),t.invokeRecursively(function(e){e.propertyDidChange("element")}),t.triggerRecursively("didInsertElement"),e()}})},empty:function(t){t.morph.html(""),e()}};Ember._Metamorph=Ember.Mixin.create({isVirtual:!0,tagName:"",instrumentName:"metamorph",init:function(){this._super(),this.morph=r()},beforeRender:function(e){e.push(this.morph.startTag()),e.pushOpeningTag()},afterRender:function(e){e.pushClosingTag(),e.push(this.morph.endTag())},createElement:function(){var e=this.renderToBuffer();this.outerHTML=e.string(),this.clearBuffer()},domManager:n}),Ember._MetamorphView=Ember.View.extend(Ember._Metamorph),Ember._SimpleMetamorphView=Ember.CoreView.extend(Ember._Metamorph)}(),function(){function e(e,t,r,n){this.path=e,this.pathRoot=t,this.isEscaped=r,this.templateData=n,this.morph=o(),this.state="preRender",this.updateId=null,this._parentView=null,this.buffer=null}var r=Ember.get,n=Ember.set,i=Ember.Handlebars.get,o=t("metamorph");Ember._SimpleHandlebarsView=e,e.prototype={isVirtual:!0,isView:!0,destroy:function(){this.updateId&&(Ember.run.cancel(this.updateId),this.updateId=null),this._parentView&&this._parentView.removeChild(this),this.morph=null,this.state="destroyed"},propertyWillChange:Ember.K,propertyDidChange:Ember.K,normalizedValue:function(){var e,t,r=this.path,n=this.pathRoot;return""===r?e=n:(t=this.templateData,e=i(n,r,{data:t})),e},renderToBuffer:function(e){var t="";t+=this.morph.startTag(),t+=this.render(),t+=this.morph.endTag(),e.push(t)},render:function(){var e=this.isEscaped,t=this.normalizedValue();return null===t||void 0===t?t="":t instanceof Handlebars.SafeString||(t=String(t)),e&&(t=Handlebars.Utils.escapeExpression(t)),t},rerender:function(){switch(this.state){case"preRender":case"destroyed":break;case"inBuffer":throw new Ember.Error("Something you did tried to replace an {{expression}} before it was inserted into the DOM.");case"hasElement":case"inDOM":this.updateId=Ember.run.scheduleOnce("render",this,"update")}return this},update:function(){this.updateId=null,this.morph.html(this.render())},transitionTo:function(e){this.state=e}};var a=Ember.View.cloneStates(Ember.View.states),s=Ember.merge;s(a._default,{rerenderIfNeeded:Ember.K}),s(a.inDOM,{rerenderIfNeeded:function(e){e.normalizedValue()!==e._lastNormalizedValue&&e.rerender()}}),Ember._HandlebarsBoundView=Ember._MetamorphView.extend({instrumentName:"boundHandlebars",states:a,shouldDisplayFunc:null,preserveContext:!1,previousContext:null,displayTemplate:null,inverseTemplate:null,path:null,pathRoot:null,normalizedValue:function(){var e,t,n=r(this,"path"),o=r(this,"pathRoot"),a=r(this,"valueNormalizerFunc");return""===n?e=o:(t=r(this,"templateData"),e=i(o,n,{data:t})),a?a(e):e},rerenderIfNeeded:function(){this.currentState.rerenderIfNeeded(this)},render:function(e){var t,i=r(this,"isEscaped"),o=r(this,"shouldDisplayFunc"),a=r(this,"preserveContext"),s=r(this,"previousContext");Ember.FEATURES.isEnabled("with-controller")&&(t=r(this,"contextController"));var u=r(this,"inverseTemplate"),c=r(this,"displayTemplate"),l=this.normalizedValue();if(this._lastNormalizedValue=l,o(l))if(n(this,"template",c),a)n(this,"_context",s);else{if(!c)return null===l||void 0===l?l="":l instanceof Handlebars.SafeString||(l=String(l)),i&&(l=Handlebars.Utils.escapeExpression(l)),e.push(l),void 0;Ember.FEATURES.isEnabled("with-controller")&&t&&(n(t,"content",l),l=t),n(this,"_context",l)}else u?(n(this,"template",u),a?n(this,"_context",s):n(this,"_context",l)):n(this,"template",function(){return""});return this._super(e)}})}(),function(){function e(e){return!Ember.isNone(e)}function t(e,t,r,n,i,s){var u,c,l,h=t.data,m=t.fn,f=t.inverse,p=h.view,d=this;if(u=a(d,e,h),"object"==typeof this){if(h.insideGroup){c=function(){Ember.run.once(p,"rerender")};var b,E,v=o(d,e,t);v=i?i(v):v,E=r?d:v,n(v)?b=m:f&&(b=f),b(E,{data:t.data})}else{var g=p.createChildView(Ember._HandlebarsBoundView,{preserveContext:r,shouldDisplayFunc:n,valueNormalizerFunc:i,displayTemplate:m,inverseTemplate:f,path:e,pathRoot:d,previousContext:d,isEscaped:!t.hash.unescaped,templateData:t.data});Ember.FEATURES.isEnabled("with-controller")&&t.hash.controller&&g.set("contextController",this.container.lookupFactory("controller:"+t.hash.controller).create({container:d})),p.appendChild(g),c=function(){Ember.run.scheduleOnce("render",g,"rerenderIfNeeded")}}if(""!==u.path&&(p.registerObserver(u.root,u.path,c),s))for(l=0;l<s.length;l++)p.registerObserver(u.root,u.path+"."+s[l],c)}else h.buffer.push(o(d,e,t))}function r(e,t,r){var n,i,s,u,c=r.data,l=c.view;if(n=a(e,t,c),s=n.root,s&&"object"==typeof s){if(c.insideGroup){i=function(){Ember.run.once(l,"rerender")};var h=o(e,t,r);(null===h||void 0===h)&&(h=""),c.buffer.push(h)}else{var m=new Ember._SimpleHandlebarsView(t,e,!r.hash.unescaped,r.data);m._parentView=l,l.appendChild(m),i=function(){Ember.run.scheduleOnce("render",m,"rerender")}}""!==n.path&&l.registerObserver(n.root,n.path,i)}else u=o(e,t,r),c.buffer.push(null===u||"undefined"==typeof u?"":u)}function n(e){var t=e&&i(e,"isTruthy");return"boolean"==typeof t?t:Ember.isArray(e)?0!==i(e,"length"):!!e}var i=Ember.get,o=(Ember.set,Ember.String.fmt,Ember.Handlebars.get),a=Ember.Handlebars.normalizePath,s=Ember.ArrayPolyfills.forEach,u=Ember.create,c=Ember.Handlebars,l=c.helpers;c.bind=t,c.registerHelper("_triageMustache",function(e,t){if(l[e])return l[e].call(this,t);var r=Ember.Handlebars.resolveHelper(t.data.view.container,e);return r?r.call(this,t):l.bind.call(this,e,t)}),Ember.Handlebars.resolveHelper=function(e,t){if(e&&-1!==t.indexOf("-")){var r=e.lookup("helper:"+t);if(!r){var n=e.lookup("component-lookup:main"),i=n.lookupFactory(t,e);i&&(r=c.makeViewHelper(i),e.register("helper:"+t,r))}return r}},c.registerHelper("bind",function(n,i){var o=i.contexts&&i.contexts.length?i.contexts[0]:this;return i.fn?t.call(o,n,i,!1,e):r(o,n,i)}),c.registerHelper("boundIf",function(e,r){var i=r.contexts&&r.contexts.length?r.contexts[0]:this;return t.call(i,e,r,!0,n,n,["isTruthy","length"])}),c.registerHelper("unboundIf",function(e,t){var r,i,s=t.contexts&&t.contexts.length?t.contexts[0]:this,u=t.data,c=t.fn,l=t.inverse;r=a(s,e,u),i=o(s,e,t),n(i)||(c=l),c(s,{data:u})}),c.registerHelper("with",function(r,n){if(4===arguments.length){var i,o,s,c,h;n=arguments[3],i=arguments[2],o=arguments[0];var m=u(n);if(m.data=u(n.data),m.data.keywords=u(n.data.keywords||{}),Ember.isGlobalPath(o))h=o;else{c=a(this,o,n.data),o=c.path,s=c.root;var f=Ember.$.expando+Ember.guidFor(s);m.data.keywords[f]=s,h=o?f+"."+o:f}return Ember.bind(m.data.keywords,i,h),t.call(this,o,m,!0,e)}return l.bind.call(n.contexts[0],r,n)}),c.registerHelper("if",function(e,t){return t.data.isUnbound?l.unboundIf.call(t.contexts[0],e,t):l.boundIf.call(t.contexts[0],e,t)}),c.registerHelper("unless",function(e,t){var r=t.fn,n=t.inverse;return t.fn=n,t.inverse=r,t.data.isUnbound?l.unboundIf.call(t.contexts[0],e,t):l.boundIf.call(t.contexts[0],e,t)}),c.registerHelper("bind-attr",function(e){var t=e.hash,r=e.data.view,n=[],i=this,u=++Ember.uuid,l=t["class"];if(null!=l){var h=c.bindClasses(this,l,r,u,e);n.push('class="'+Handlebars.Utils.escapeExpression(h.join(" "))+'"'),delete t["class"]}var m=Ember.keys(t);return s.call(m,function(s){var c,l=t[s];c=a(i,l,e.data);var h,m,f="this"===l?c.root:o(i,l,e),p=Ember.typeOf(f);h=function(){var t=o(i,l,e),n=r.$("[data-bindattr-"+u+"='"+u+"']");return n&&0!==n.length?(Ember.View.applyAttributeBindings(n,s,t),void 0):(Ember.removeObserver(c.root,c.path,m),void 0)},"this"===l||c.isKeyword&&""===c.path||r.registerObserver(c.root,c.path,h),"string"===p||"number"===p&&!isNaN(f)?n.push(s+'="'+Handlebars.Utils.escapeExpression(f)+'"'):f&&"boolean"===p&&n.push(s+'="'+s+'"')},this),n.push("data-bindattr-"+u+'="'+u+'"'),new c.SafeString(n.join(" "))}),c.registerHelper("bindAttr",function(){return c.helpers["bind-attr"].apply(this,arguments)}),c.bindClasses=function(e,t,r,n,i){var u,c,l,h=[],m=function(e,t,r){var n,i=t.path;return n="this"===i?e:""===i?!0:o(e,i,r),Ember.View._classStringForValue(i,n,t.className,t.falsyClassName)};return s.call(t.split(" "),function(t){var o,s,f,p,d=Ember.View._parsePropertyPath(t),b=d.path,E=e;""!==b&&"this"!==b&&(p=a(e,b,i.data),E=p.root,b=p.path),s=function(){u=m(e,d,i),l=n?r.$("[data-bindattr-"+n+"='"+n+"']"):r.$(),l&&0!==l.length?(o&&l.removeClass(o),u?(l.addClass(u),o=u):o=null):Ember.removeObserver(E,b,f)},""!==b&&"this"!==b&&r.registerObserver(E,b,s),c=m(e,d,i),c&&(h.push(c),o=c)}),h}}(),function(){function e(e,r){var n=r.hash,i=r.hashTypes;for(var o in n)if("ID"===i[o]){var a=n[o];Ember.IS_BINDING.test(o)||(n[o+"Binding"]=a,i[o+"Binding"]="STRING",delete n[o],delete i[o])}n.hasOwnProperty("idBinding")&&(n.id=t.get(e,n.idBinding,r),i.id="STRING",delete n.idBinding,delete i.idBinding)}var t=(Ember.get,Ember.set,Ember.Handlebars),r=/^[a-z]/,n=/^view\./;t.ViewHelper=Ember.Object.create({propertiesFromHTMLOptions:function(e){var t=e.hash,r=e.data,n={},i=t["class"],o=!1;t.id&&(n.elementId=t.id,o=!0),t.tag&&(n.tagName=t.tag,o=!0),i&&(i=i.split(" "),n.classNames=i,o=!0),t.classBinding&&(n.classNameBindings=t.classBinding.split(" "),o=!0),t.classNameBindings&&(void 0===n.classNameBindings&&(n.classNameBindings=[]),n.classNameBindings=n.classNameBindings.concat(t.classNameBindings.split(" ")),o=!0),t.attributeBindings&&(n.attributeBindings=null,o=!0),o&&(t=Ember.$.extend({},t),delete t.id,delete t.tag,delete t["class"],delete t.classBinding);var a;for(var s in t)t.hasOwnProperty(s)&&Ember.IS_BINDING.test(s)&&"string"==typeof t[s]&&(a=this.contextualizeBindingPath(t[s],r),a&&(t[s]=a));if(n.classNameBindings)for(var u in n.classNameBindings){var c=n.classNameBindings[u];if("string"==typeof c){var l=Ember.View._parsePropertyPath(c);a=this.contextualizeBindingPath(l.path,r),a&&(n.classNameBindings[u]=a+l.classNames)}}return Ember.$.extend(t,n)},contextualizeBindingPath:function(e,t){var r=Ember.Handlebars.normalizePath(null,e,t);return r.isKeyword?"templateData.keywords."+e:Ember.isGlobalPath(e)?null:"this"===e||""===e?"_parentView.context":"_parentView.context."+e},helper:function(i,o,a){var s,u=a.data,c=a.fn;e(i,a),s="string"==typeof o?"STRING"===a.types[0]&&r.test(o)&&!n.test(o)?u.view.container.lookupFactory("view:"+o):t.get(i,o,a):o;var l=this.propertiesFromHTMLOptions(a,i),h=u.view;l.templateData=u;var m=s.proto?s.proto():s;c&&(l.template=c),m.controller||m.controllerBinding||l.controller||l.controllerBinding||(l._context=i),h.appendChild(s,l)}}),t.registerHelper("view",function(e,r){return e&&e.data&&e.data.isRenderData&&(r=e,e="Ember.View"),t.ViewHelper.helper(this,e,r)})}(),function(){{var e=Ember.get,t=Ember.Handlebars.get;Ember.String.fmt}Ember.Handlebars.registerHelper("collection",function(r,n){r&&r.data&&r.data.isRenderData&&(n=r,r=void 0);{var i,o=n.fn,a=n.data,s=n.inverse;n.data.view}i=r?t(this,r,n):Ember.CollectionView;var u,c,l=n.hash,h={},m=i.proto();if(l.itemView){var f=a.keywords.controller,p=f.container;c=p.resolve("view:"+l.itemView)}else c=l.itemViewClass?t(m,l.itemViewClass,n):m.itemViewClass;delete l.itemViewClass,delete l.itemView;for(var d in l)l.hasOwnProperty(d)&&(u=d.match(/^item(.)(.*)$/),u&&"itemController"!==d&&(h[u[1].toLowerCase()+u[2]]=l[d],delete l[d]));o&&(h.template=o,delete n.fn);var b;s&&s!==Ember.Handlebars.VM.noop?(b=e(m,"emptyViewClass"),b=b.extend({template:s,tagName:h.tagName})):l.emptyViewClass&&(b=t(this,l.emptyViewClass,n)),b&&(l.emptyView=b),l.keyword||(h._context=Ember.computed.alias("content"));var E=Ember.Handlebars.ViewHelper.propertiesFromHTMLOptions({data:a,hash:h},this);return l.itemViewClass=c.extend(E),Ember.Handlebars.helpers.view.call(this,i,n)})}(),function(){var e=Ember.Handlebars.get;Ember.Handlebars.registerHelper("unbound",function(t,r){var n,i,o,a=arguments[arguments.length-1];return arguments.length>2?(a.data.isUnbound=!0,n=Ember.Handlebars.helpers[arguments[0]]||Ember.Handlebars.helperMissing,o=n.apply(this,Array.prototype.slice.call(arguments,1)),delete a.data.isUnbound,o):(i=r.contexts&&r.contexts.length?r.contexts[0]:this,e(i,t,r))})}(),function(){var e=(Ember.get,Ember.Handlebars.get),t=Ember.Handlebars.normalizePath;Ember.Handlebars.registerHelper("log",function(r,n){var i=n.contexts&&n.contexts.length?n.contexts[0]:this,o=t(i,r,n.data),a=o.root,s=o.path,u="this"===s?a:e(a,s,n);Ember.Logger.log(u)}),Ember.Handlebars.registerHelper("debugger",function(){{var e=this;Ember.inspect(e)}})}(),function(){{var e=Ember.get,t=Ember.set;Ember.String.fmt}Ember.Handlebars.EachView=Ember.CollectionView.extend(Ember._Metamorph,{init:function(){var r,n=e(this,"itemController");if(n){var i=e(this,"controller.container").lookupFactory("controller:array").create({parentController:e(this,"controller"),itemController:n,target:e(this,"controller"),_eachView:this});this.disableContentObservers(function(){t(this,"content",i),r=new Ember.Binding("content","_eachView.dataSource").oneWay(),r.connect(i)}),t(this,"_arrayController",i)}else this.disableContentObservers(function(){r=new Ember.Binding("content","dataSource").oneWay(),r.connect(this)});return this._super()},_assertArrayLike:function(){},disableContentObservers:function(e){Ember.removeBeforeObserver(this,"content",null,"_contentWillChange"),Ember.removeObserver(this,"content",null,"_contentDidChange"),e.call(this),Ember.addBeforeObserver(this,"content",null,"_contentWillChange"),Ember.addObserver(this,"content",null,"_contentDidChange")},itemViewClass:Ember._MetamorphView,emptyViewClass:Ember._MetamorphView,createChildView:function(r,n){r=this._super(r,n);var i=e(this,"keyword"),o=e(r,"content");if(i){var a=e(r,"templateData");a=Ember.copy(a),a.keywords=r.cloneKeywords(),t(r,"templateData",a),a.keywords[i]=o}return o&&e(o,"isController")&&t(r,"controller",o),r},destroy:function(){if(this._super()){var t=e(this,"_arrayController");return t&&t.destroy(),this}}});var r=Ember.Handlebars.GroupedEach=function(e,t,r){var n=this,i=Ember.Handlebars.normalizePath(e,t,r.data);this.context=e,this.path=t,this.options=r,this.template=r.fn,this.containingView=r.data.view,this.normalizedRoot=i.root,this.normalizedPath=i.path,this.content=this.lookupContent(),this.addContentObservers(),this.addArrayObservers(),this.containingView.on("willClearRender",function(){n.destroy()})};r.prototype={contentWillChange:function(){this.removeArrayObservers()},contentDidChange:function(){this.content=this.lookupContent(),this.addArrayObservers(),this.rerenderContainingView()},contentArrayWillChange:Ember.K,contentArrayDidChange:function(){this.rerenderContainingView()},lookupContent:function(){return Ember.Handlebars.get(this.normalizedRoot,this.normalizedPath,this.options)},addArrayObservers:function(){this.content&&this.content.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},removeArrayObservers:function(){this.content&&this.content.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},addContentObservers:function(){Ember.addBeforeObserver(this.normalizedRoot,this.normalizedPath,this,this.contentWillChange),Ember.addObserver(this.normalizedRoot,this.normalizedPath,this,this.contentDidChange)},removeContentObservers:function(){Ember.removeBeforeObserver(this.normalizedRoot,this.normalizedPath,this.contentWillChange),Ember.removeObserver(this.normalizedRoot,this.normalizedPath,this.contentDidChange)},render:function(){if(this.content){var t=this.content,r=e(t,"length"),n=this.options.data,i=this.template;n.insideEach=!0;for(var o=0;r>o;o++)i(t.objectAt(o),{data:n})}},rerenderContainingView:function(){var e=this;Ember.run.scheduleOnce("render",this,function(){e.destroyed||e.containingView.rerender()})},destroy:function(){this.removeContentObservers(),this.content&&this.removeArrayObservers(),this.destroyed=!0}},Ember.Handlebars.registerHelper("each",function(e,t){if(4===arguments.length){var r=arguments[0];t=arguments[3],e=arguments[2],""===e&&(e="this"),t.hash.keyword=r}return 1===arguments.length&&(t=e,e="this"),t.hash.dataSourceBinding=e,!t.data.insideGroup||t.hash.groupedRows||t.hash.itemViewClass?Ember.Handlebars.helpers.collection.call(this,"Ember.Handlebars.EachView",t):(new Ember.Handlebars.GroupedEach(this,e,t).render(),void 0)})}(),function(){Ember.Handlebars.registerHelper("template",function(){return Ember.Handlebars.helpers.partial.apply(this,arguments)})}(),function(){function e(e){return!Ember.isNone(e)}function t(e,t,r){var n=t.split("/"),i=n[n.length-1];n[n.length-1]="_"+i;var o=r.data.view,a=n.join("/"),s=o.templateForName(a),u=!s&&o.templateForName(t);(s=s||u)(e,{data:r.data})}Ember.Handlebars.registerHelper("partial",function(r,n){var i=n.contexts&&n.contexts.length?n.contexts[0]:this;return"ID"===n.types[0]?(n.fn=function(e,n){var i=Ember.Handlebars.get(e,r,n);t(e,i,n)},Ember.Handlebars.bind.call(i,r,n,!0,e)):(t(i,r,n),void 0)})}(),function(){{var e=Ember.get;Ember.set}Ember.Handlebars.registerHelper("yield",function(t){for(var r=t.data.view;r&&!e(r,"layout");)r=r._contextView?r._contextView:e(r,"parentView");r._yield(this,t)})}(),function(){Ember.Handlebars.registerHelper("loc",function(e){return Ember.String.loc(e)})}(),function(){{var e=Ember.set;Ember.get}Ember.Checkbox=Ember.View.extend({classNames:["ember-checkbox"],tagName:"input",attributeBindings:["type","checked","indeterminate","disabled","tabindex","name"],type:"checkbox",checked:!1,disabled:!1,indeterminate:!1,init:function(){this._super(),this.on("change",this,this._updateElementValue)},didInsertElement:function(){this._super(),this.get("element").indeterminate=!!this.get("indeterminate")},_updateElementValue:function(){e(this,"checked",this.$().prop("checked"))}})}(),function(){function e(e,r,n){var i=t(r,e),o=t(r,"onEvent"),a=t(r,"value");(o===e||"keyPress"===o&&"key-press"===e)&&r.sendAction("action",a),r.sendAction(e,a),(i||o===e)&&(t(r,"bubbles")||n.stopPropagation())}var t=Ember.get,r=Ember.set;Ember.TextSupport=Ember.Mixin.create({value:"",attributeBindings:["placeholder","disabled","maxlength","tabindex","readonly"],placeholder:null,disabled:!1,maxlength:null,init:function(){this._super(),this.on("focusOut",this,this._elementValueDidChange),this.on("change",this,this._elementValueDidChange),this.on("paste",this,this._elementValueDidChange),this.on("cut",this,this._elementValueDidChange),this.on("input",this,this._elementValueDidChange),this.on("keyUp",this,this.interpretKeyEvents)},action:null,onEvent:"enter",bubbles:!1,interpretKeyEvents:function(e){var t=Ember.TextSupport.KEY_EVENTS,r=t[e.keyCode];return this._elementValueDidChange(),r?this[r](e):void 0},_elementValueDidChange:function(){r(this,"value",this.$().val())},insertNewline:function(t){e("enter",this,t),e("insert-newline",this,t)},cancel:function(t){e("escape-press",this,t)},focusIn:function(t){e("focus-in",this,t)},focusOut:function(t){e("focus-out",this,t)},keyPress:function(t){e("key-press",this,t)}}),Ember.TextSupport.KEY_EVENTS={13:"insertNewline",27:"cancel"}}(),function(){Ember.get,Ember.set;Ember.TextField=Ember.Component.extend(Ember.TextSupport,{classNames:["ember-text-field"],tagName:"input",attributeBindings:["type","value","size","pattern","name","min","max"],value:"",type:"text",size:null,pattern:null,min:null,max:null})}(),function(){{var e=Ember.get;Ember.set}Ember.TextArea=Ember.Component.extend(Ember.TextSupport,{classNames:["ember-text-area"],tagName:"textarea",attributeBindings:["rows","cols","name"],rows:null,cols:null,_updateElementValue:Ember.observer("value",function(){var t=e(this,"value"),r=this.$();r&&t!==r.val()&&r.val(t)}),init:function(){this._super(),this.on("didInsertElement",this,this._updateElementValue)}})}(),function(){{var e=Ember.set,t=Ember.get,r=Ember.EnumerableUtils.indexOf,n=Ember.EnumerableUtils.indexesOf,i=Ember.EnumerableUtils.forEach,o=Ember.EnumerableUtils.replace,a=Ember.isArray;Ember.Handlebars.compile}Ember.SelectOption=Ember.View.extend({tagName:"option",attributeBindings:["value","selected"],defaultTemplate:function(e,t){t={data:t.data,hash:{}},Ember.Handlebars.helpers.bind.call(e,"view.label",t)},init:function(){this.labelPathDidChange(),this.valuePathDidChange(),this._super()},selected:Ember.computed(function(){var e=t(this,"content"),n=t(this,"parentView.selection");return t(this,"parentView.multiple")?n&&r(n,e.valueOf())>-1:e==n}).property("content","parentView.selection"),labelPathDidChange:Ember.observer("parentView.optionLabelPath",function(){var e=t(this,"parentView.optionLabelPath");e&&Ember.defineProperty(this,"label",Ember.computed(function(){return t(this,e)}).property(e))}),valuePathDidChange:Ember.observer("parentView.optionValuePath",function(){var e=t(this,"parentView.optionValuePath");e&&Ember.defineProperty(this,"value",Ember.computed(function(){return t(this,e)}).property(e))})}),Ember.SelectOptgroup=Ember.CollectionView.extend({tagName:"optgroup",attributeBindings:["label"],selectionBinding:"parentView.selection",multipleBinding:"parentView.multiple",optionLabelPathBinding:"parentView.optionLabelPath",optionValuePathBinding:"parentView.optionValuePath",itemViewClassBinding:"parentView.optionView"}),Ember.Select=Ember.View.extend({tagName:"select",classNames:["ember-select"],defaultTemplate:Ember.Handlebars.template(function(e,t,r,n,i){function o(e,t){var n,i,o="";
16
+ return t.buffer.push('<option value="">'),n={},i={},t.buffer.push(p(r._triageMustache.call(e,"view.prompt",{hash:{},contexts:[e],types:["ID"],hashContexts:i,hashTypes:n,data:t}))),t.buffer.push("</option>"),o}function a(e,t){var n,i,o;i={},o={},n=r.each.call(e,"view.groupedContent",{hash:{},inverse:d.noop,fn:d.program(4,s,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:i,data:t}),n||0===n?t.buffer.push(n):t.buffer.push("")}function s(e,t){var n,i;n={content:e,label:e},i={content:"ID",label:"ID"},t.buffer.push(p(r.view.call(e,"view.groupView",{hash:{content:"content",label:"label"},contexts:[e],types:["ID"],hashContexts:n,hashTypes:i,data:t})))}function u(e,t){var n,i,o;i={},o={},n=r.each.call(e,"view.content",{hash:{},inverse:d.noop,fn:d.program(7,c,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:i,data:t}),n||0===n?t.buffer.push(n):t.buffer.push("")}function c(e,t){var n,i;n={content:e},i={content:"ID"},t.buffer.push(p(r.view.call(e,"view.optionView",{hash:{content:""},contexts:[e],types:["ID"],hashContexts:n,hashTypes:i,data:t})))}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),i=i||{};var l,h,m,f="",p=this.escapeExpression,d=this;return h={},m={},l=r["if"].call(t,"view.prompt",{hash:{},inverse:d.noop,fn:d.program(1,o,i),contexts:[t],types:["ID"],hashContexts:m,hashTypes:h,data:i}),(l||0===l)&&i.buffer.push(l),h={},m={},l=r["if"].call(t,"view.optionGroupPath",{hash:{},inverse:d.program(6,u,i),fn:d.program(3,a,i),contexts:[t],types:["ID"],hashContexts:m,hashTypes:h,data:i}),(l||0===l)&&i.buffer.push(l),f}),attributeBindings:["multiple","disabled","tabindex","name"],multiple:!1,disabled:!1,content:null,selection:null,value:Ember.computed(function(e,r){if(2===arguments.length)return r;var n=t(this,"optionValuePath").replace(/^content\.?/,"");return n?t(this,"selection."+n):t(this,"selection")}).property("selection"),prompt:null,optionLabelPath:"content",optionValuePath:"content",optionGroupPath:null,groupView:Ember.SelectOptgroup,groupedContent:Ember.computed(function(){var e=t(this,"optionGroupPath"),r=Ember.A(),n=t(this,"content")||[];return i(n,function(n){var i=t(n,e);t(r,"lastObject.label")!==i&&r.pushObject({label:i,content:Ember.A()}),t(r,"lastObject.content").push(n)}),r}).property("optionGroupPath","content.@each"),optionView:Ember.SelectOption,_change:function(){t(this,"multiple")?this._changeMultiple():this._changeSingle()},selectionDidChange:Ember.observer("selection.@each",function(){var r=t(this,"selection");if(t(this,"multiple")){if(!a(r))return e(this,"selection",Ember.A([r])),void 0;this._selectionDidChangeMultiple()}else this._selectionDidChangeSingle()}),valueDidChange:Ember.observer("value",function(){var e,r=t(this,"content"),n=t(this,"value"),i=t(this,"optionValuePath").replace(/^content\.?/,""),o=i?t(this,"selection."+i):t(this,"selection");n!==o&&(e=r?r.find(function(e){return n===(i?t(e,i):e)}):null,this.set("selection",e))}),_triggerChange:function(){var e=t(this,"selection"),r=t(this,"value");Ember.isNone(e)||this.selectionDidChange(),Ember.isNone(r)||this.valueDidChange(),this._change()},_changeSingle:function(){var r=this.$()[0].selectedIndex,n=t(this,"content"),i=t(this,"prompt");if(n&&t(n,"length")){if(i&&0===r)return e(this,"selection",null),void 0;i&&(r-=1),e(this,"selection",n.objectAt(r))}},_changeMultiple:function(){var r=this.$("option:selected"),n=t(this,"prompt"),i=n?1:0,s=t(this,"content"),u=t(this,"selection");if(s&&r){var c=r.map(function(){return this.index-i}).toArray(),l=s.objectsAt(c);a(u)?o(u,0,t(u,"length"),l):e(this,"selection",l)}},_selectionDidChangeSingle:function(){var e=this.get("element");if(e){var n=t(this,"content"),i=t(this,"selection"),o=n?r(n,i):-1,a=t(this,"prompt");a&&(o+=1),e&&(e.selectedIndex=o)}},_selectionDidChangeMultiple:function(){var e,i=t(this,"content"),o=t(this,"selection"),a=i?n(i,o):[-1],s=t(this,"prompt"),u=s?1:0,c=this.$("option");c&&c.each(function(){e=this.index>-1?this.index-u:-1,this.selected=r(a,e)>-1})},init:function(){this._super(),this.on("didInsertElement",this,this._triggerChange),this.on("change",this,this._change)}})}(),function(){Ember.Handlebars.registerHelper("input",function(e){var t=e.hash,r=(e.hashTypes,t.type),n=t.on;return delete t.type,delete t.on,"checkbox"===r?Ember.Handlebars.helpers.view.call(this,Ember.Checkbox,e):(r&&(t.type=r),t.onEvent=n||"enter",Ember.Handlebars.helpers.view.call(this,Ember.TextField,e))}),Ember.Handlebars.registerHelper("textarea",function(e){e.hash,e.hashTypes;return Ember.Handlebars.helpers.view.call(this,Ember.TextArea,e)})}(),function(){Ember.ComponentLookup=Ember.Object.extend({lookupFactory:function(e,t){t=t||this.container;var r="component:"+e,n="template:components/"+e,i=t&&t.has(n);i&&t.injection(r,"layout",n);var o=t.lookupFactory(r);return i||o?(o||(t.register(r,Ember.Component),o=t.lookupFactory(r)),o):void 0}})}(),function(){function e(){Ember.Handlebars.bootstrap(Ember.$(document))}function t(e){e.register("component-lookup:main",Ember.ComponentLookup)}Ember.Handlebars.bootstrap=function(e){var t='script[type="text/x-handlebars"], script[type="text/x-raw-handlebars"]';Ember.$(t,e).each(function(){var e=Ember.$(this),t="text/x-raw-handlebars"===e.attr("type")?Ember.$.proxy(Handlebars.compile,Handlebars):Ember.$.proxy(Ember.Handlebars.compile,Ember.Handlebars),r=e.attr("data-template-name")||e.attr("id")||"application",n=t(e.html());if(void 0!==Ember.TEMPLATES[r])throw new Ember.Error('Template named "'+r+'" already exists.');Ember.TEMPLATES[r]=n,e.remove()})},Ember.onLoad("Ember.Application",function(r){r.initializer({name:"domTemplates",initialize:e}),r.initializer({name:"registerComponentLookup",after:"domTemplates",initialize:t})})}(),function(){Ember.runLoadHooks("Ember.Handlebars",Ember.Handlebars)}(),function(){e("route-recognizer",[],function(){"use strict";function e(e){this.string=e}function t(e){this.name=e}function r(e){this.name=e}function n(){}function i(i,o,a){"/"===i.charAt(0)&&(i=i.substr(1));for(var s=i.split("/"),u=[],c=0,l=s.length;l>c;c++){var h,m=s[c];(h=m.match(/^:([^\/]+)$/))?(u.push(new t(h[1])),o.push(h[1]),a.dynamics++):(h=m.match(/^\*([^\/]+)$/))?(u.push(new r(h[1])),o.push(h[1]),a.stars++):""===m?u.push(new n):(u.push(new e(m)),a.statics++)}return u}function o(e){this.charSpec=e,this.nextStates=[]}function a(e){return e.sort(function(e,t){return e.types.stars!==t.types.stars?e.types.stars-t.types.stars:e.types.dynamics!==t.types.dynamics?e.types.dynamics-t.types.dynamics:e.types.statics!==t.types.statics?t.types.statics-e.types.statics:0})}function s(e,t){for(var r=[],n=0,i=e.length;i>n;n++){var o=e[n];r=r.concat(o.match(t))}return r}function u(e,t,r){for(var n=e.handlers,i=e.regex,o=t.match(i),a=1,s=[],u=0,c=n.length;c>u;u++){var l,h,m=n[u],f=m.names,p={},d=m.queryParams||[],b={};for(l=0,h=f.length;h>l;l++)p[f[l]]=o[a++];for(l=0,h=d.length;h>l;l++){var E=d[l];r[E]&&(b[E]=r[E])}var v={handler:m.handler,params:p,isDynamic:!!f.length};d&&d.length>0&&(v.queryParams=b),s.push(v)}return s}function c(e,t){return t.eachChar(function(t){e=e.put(t)}),e}function l(e,t,r){this.path=e,this.matcher=t,this.delegate=r}function h(e){this.routes={},this.children={},this.queryParams={},this.target=e}function m(e,t,r){return function(n,i){var o=e+n;return i?(i(m(o,t,r)),void 0):new l(e+n,t,r)}}function f(e,t,r,n){for(var i=0,o=0,a=e.length;a>o;o++)i+=e[o].path.length;t=t.substr(i);var s={path:t,handler:r};n&&(s.queryParams=n),e.push(s)}function p(e,t,r,n){var i=t.routes,o=t.queryParams;for(var a in i)if(i.hasOwnProperty(a)){var s=e.slice();f(s,a,i[a],o[a]),t.children[a]?p(s,t.children[a],r,n):r.call(n,s)}}var d=["/",".","*","+","?","|","(",")","[","]","{","}","\\"],b=new RegExp("(\\"+d.join("|\\")+")","g");e.prototype={eachChar:function(e){for(var t,r=this.string,n=0,i=r.length;i>n;n++)t=r.charAt(n),e({validChars:t})},regex:function(){return this.string.replace(b,"\\$1")},generate:function(){return this.string}},t.prototype={eachChar:function(e){e({invalidChars:"/",repeat:!0})},regex:function(){return"([^/]+)"},generate:function(e){return e[this.name]}},r.prototype={eachChar:function(e){e({invalidChars:"",repeat:!0})},regex:function(){return"(.+)"},generate:function(e){return e[this.name]}},n.prototype={eachChar:function(){},regex:function(){return""},generate:function(){return""}},o.prototype={get:function(e){for(var t=this.nextStates,r=0,n=t.length;n>r;r++){var i=t[r],o=i.charSpec.validChars===e.validChars;if(o=o&&i.charSpec.invalidChars===e.invalidChars)return i}},put:function(e){var t;return(t=this.get(e))?t:(t=new o(e),this.nextStates.push(t),e.repeat&&t.nextStates.push(t),t)},match:function(e){for(var t,r,n,i=this.nextStates,o=[],a=0,s=i.length;s>a;a++)t=i[a],r=t.charSpec,"undefined"!=typeof(n=r.validChars)?-1!==n.indexOf(e)&&o.push(t):"undefined"!=typeof(n=r.invalidChars)&&-1===n.indexOf(e)&&o.push(t);return o}};var E=function(){this.rootState=new o,this.names={}};return E.prototype={add:function(e,t){for(var r,o=this.rootState,a="^",s={statics:0,dynamics:0,stars:0},u=[],l=[],h=!0,m=0,f=e.length;f>m;m++){var p=e[m],d=[],b=i(p.path,d,s);l=l.concat(b);for(var E=0,v=b.length;v>E;E++){var g=b[E];g instanceof n||(h=!1,o=o.put({validChars:"/"}),a+="/",o=c(o,g),a+=g.regex())}var y={handler:p.handler,names:d};p.queryParams&&(y.queryParams=p.queryParams),u.push(y)}h&&(o=o.put({validChars:"/"}),a+="/"),o.handlers=u,o.regex=new RegExp(a+"$"),o.types=s,(r=t&&t.as)&&(this.names[r]={segments:l,handlers:u})},handlersFor:function(e){var t=this.names[e],r=[];if(!t)throw new Error("There is no route named "+e);for(var n=0,i=t.handlers.length;i>n;n++)r.push(t.handlers[n]);return r},hasRoute:function(e){return!!this.names[e]},generate:function(e,t){var r=this.names[e],i="";if(!r)throw new Error("There is no route named "+e);for(var o=r.segments,a=0,s=o.length;s>a;a++){var u=o[a];u instanceof n||(i+="/",i+=u.generate(t))}return"/"!==i.charAt(0)&&(i="/"+i),t&&t.queryParams&&(i+=this.generateQueryString(t.queryParams,r.handlers)),i},generateQueryString:function(e,t){for(var r=[],n=[],i=0;i<t.length;i++){var o=t[i].queryParams;o&&n.push.apply(n,o)}for(var a in e)if(e.hasOwnProperty(a)){if(-1===n.indexOf(a))throw'Query param "'+a+'" is not specified as a valid param for this route';var s=e[a],u=encodeURIComponent(a);s!==!0&&(u+="="+encodeURIComponent(s)),r.push(u)}return 0===r.length?"":"?"+r.join("&")},parseQueryString:function(e){for(var t=e.split("&"),r={},n=0;n<t.length;n++){var i=t[n].split("="),o=decodeURIComponent(i[0]),a=i[1]?decodeURIComponent(i[1]):!0;r[o]=a}return r},recognize:function(e){var t,r,n,i,o=[this.rootState],c={};if(i=e.indexOf("?"),-1!==i){var l=e.substr(i+1,e.length);e=e.substr(0,i),c=this.parseQueryString(l)}for("/"!==e.charAt(0)&&(e="/"+e),t=e.length,t>1&&"/"===e.charAt(t-1)&&(e=e.substr(0,t-1)),r=0,n=e.length;n>r&&(o=s(o,e.charAt(r)),o.length);r++);var h=[];for(r=0,n=o.length;n>r;r++)o[r].handlers&&h.push(o[r]);o=a(h);var m=h[0];return m&&m.handlers?u(m,e,c):void 0}},l.prototype={to:function(e,t){var r=this.delegate;if(r&&r.willAddRoute&&(e=r.willAddRoute(this.matcher.target,e)),this.matcher.add(this.path,e),t){if(0===t.length)throw new Error("You must have an argument in the function passed to `to`");this.matcher.addChild(this.path,e,t,this.delegate)}return this},withQueryParams:function(){if(0===arguments.length)throw new Error("you must provide arguments to the withQueryParams method");for(var e=0;e<arguments.length;e++)if("string"!=typeof arguments[e])throw new Error('you should call withQueryParams with a list of strings, e.g. withQueryParams("foo", "bar")');var t=[].slice.call(arguments);this.matcher.addQueryParams(this.path,t)}},h.prototype={add:function(e,t){this.routes[e]=t},addQueryParams:function(e,t){this.queryParams[e]=t},addChild:function(e,t,r,n){var i=new h(t);this.children[e]=i;var o=m(e,i,n);n&&n.contextEntered&&n.contextEntered(t,o),r(o)}},E.prototype.map=function(e,t){var r=new h;e(m("",r,this.delegate)),p([],r,function(e){t?t(this,e):this.add(e)},this)},E})}(),function(){e("router",["route-recognizer","rsvp","exports"],function(e,t,r){"use strict";function n(e,t){this.router=e,this.promise=t,this.data={},this.resolvedModels={},this.providedModels={},this.providedModelsArray=[],this.sequence=++n.currentSequence,this.params={}}function i(){this.recognizer=new k}function o(e,t){return new n(e,H.reject(t))}function a(e,t,r,n){var i,o,a=t.length,u={},c=e.currentHandlerInfos||[],l={},m=e.currentParams||{},f=e.activeTransition,p={};for(r=L.call(r),h(l,n),i=t.length-1;i>=0;i--){var d=t[i],b=d.handler,E=c[i],v=!1;if(E&&E.name===d.handler||(v=!0),d.isDynamic)if(o=s(r,b,f,!0,l))v=!0,u[b]=o;else{p[b]={};for(var g in d.params)if(d.params.hasOwnProperty(g)){var w=d.params[g];m[g]!==w&&(v=!0),p[b][g]=l[g]=w}}else if(d.hasOwnProperty("names"))if(r.length&&(v=!0),o=s(r,b,f,d.names[0],l))u[b]=o;else{var _=d.names;p[b]={};for(var C=0,O=_.length;O>C;++C){var A=_[C];p[b][A]=l[A]=l[A]||m[A]}}E&&!y(E.queryParams,d.queryParams)&&(v=!0),v&&(a=i)}if(r.length>0)throw new Error("More context objects were passed than there are dynamic segments for the route: "+t[t.length-1].handler);var P=c[a-1],x=P&&P.handler;return{matchPoint:a,providedModels:u,params:l,handlerParams:p,pivotHandler:x}}function s(e,t,r,n,i){if(e.length&&n){var o=e.pop();if(!u(o))return o;i[n]=o.toString()}else if(r)return r.resolvedModels[t]||n&&r.providedModels[t]}function u(e){return"string"==typeof e||e instanceof String||"number"==typeof e||e instanceof Number}function c(e,t){for(var r=e.recognizer.handlersFor(t),n=[],i=0;i<r.length;i++)n.push.apply(n,r[i].queryParams||[]);return n}function l(e,t,r,n){var i,o,s,u,c,l=e.recognizer.handlersFor(t),p={},d=f(e,l,n),b=a(e,d,r).matchPoint;for(p.queryParams={},c=0;c<l.length;c++)o=l[c],s=e.getHandler(o.handler),u=o.names,u.length&&(i=c>=b?r.shift():s.context,h(p,j(s,i,u))),n!==!1&&(m(p.queryParams,e.currentQueryParams,o.queryParams),m(p.queryParams,n,o.queryParams));return y(p.queryParams,{})&&delete p.queryParams,p}function h(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}function m(e,t,r){if(t&&r)for(var n=0;n<r.length;n++){var i,o=r[n];t.hasOwnProperty(o)&&(i=t[o],null===i||i===!1||"undefined"==typeof i?delete e[o]:e[o]=t[o])}}function f(e,t,r){for(var n=[],i=0;i<t.length;i++){var o=t[i],a={handler:o.handler,names:o.names,context:o.context,isDynamic:o.isDynamic},s={};r!==!1&&(m(s,e.currentQueryParams,o.queryParams),m(s,r,o.queryParams)),o.queryParams&&o.queryParams.length>0&&(a.queryParams=s),n.push(a)}return n}function p(e,t,r){var n=e.currentHandlerInfos,i=n[n.length-1],o=i.name;return I(e,"Attempting query param transition"),d(e,[o,t],r)}function d(e,t,r){var n=A(t),i=n[0],o=n[1],a=e.recognizer.handlersFor(i[0]),s=f(e,a,o);return I(e,"Attempting transition to "+i[0]),x(e,s,L.call(i,1),e.currentParams,o,null,r)}function b(e,t,r){var n,a,s=e.recognizer.recognize(t),u=(e.currentHandlerInfos,{});if(I(e,"Attempting URL transition to "+t),s)for(n=0,a=s.length;a>n;++n)if(e.getHandler(s[n].handler).inaccessibleByURL){s=null;break}if(!s)return o(e,new i.UnrecognizedURLError(t));for(n=0,a=s.length;a>n;n++)h(u,s[n].queryParams);return x(e,s,[],{},u,null,r)}function E(e,t){var r=e.router,n=w(r.currentHandlerInfos||[],t);r.targetHandlerInfos=t,g(n.exited,function(e){var t=e.handler;delete t.context,t.exit&&t.exit()});var i=n.unchanged.slice();r.currentHandlerInfos=i,g(n.updatedContext,function(t){v(e,i,t,!1)}),g(n.entered,function(t){v(e,i,t,!0)})}function v(e,t,r,n){var o=r.handler,a=r.context;try{n&&o.enter&&o.enter(),R(e),C(o,a),O(o,r.queryParams),o.setup&&o.setup(a,r.queryParams),R(e)}catch(s){throw s instanceof i.TransitionAborted||e.trigger(!0,"error",s,e,o),s}t.push(r)}function g(e,t){for(var r=0,n=e.length;n>r;r++)t(e[r])}function y(e,t){e=e||{},t=t||{};var r,n=[];for(r in e)if(e.hasOwnProperty(r)){if(t[r]!==e[r])return!1;n.push(r)}for(r in t)if(t.hasOwnProperty(r)&&!~n.indexOf(r))return!1;return!0}function w(e,t){var r,n,i,o,a,s={updatedContext:[],exited:[],entered:[],unchanged:[]};for(o=0,a=t.length;a>o;o++){var u=e[o],c=t[o];u&&u.handler===c.handler?y(u.queryParams,c.queryParams)||(i=!0):r=!0,r?(s.entered.push(c),u&&s.exited.unshift(u)):n||u.context!==c.context||i?(n=!0,s.updatedContext.push(c)):s.unchanged.push(u)}for(o=t.length,a=e.length;a>o;o++)s.exited.unshift(e[o]);return s}function _(e,t,r,n){if(e.triggerEvent)return e.triggerEvent(t,r,n),void 0;var i=n.shift();if(!t){if(r)return;throw new Error("Could not trigger event '"+i+"'. There are no active handlers")}for(var o=!1,a=t.length-1;a>=0;a--){var s=t[a],u=s.handler;if(u.events&&u.events[i]){if(u.events[i].apply(u,n)!==!0)return;o=!0}}if(!o&&!r)throw new Error("Nothing handled the event '"+i+"'.")}function C(e,t){e.context=t,e.contextDidChange&&e.contextDidChange()}function O(e,t){e.queryParams=t,e.queryParamsDidChange&&e.queryParamsDidChange()}function A(e){var t,r,n=e&&e.length;return n&&n>0&&e[n-1]&&e[n-1].hasOwnProperty("queryParams")?(r=e[n-1].queryParams,t=L.call(e,0,n-1),[t,r]):[e,null]}function P(e,t,r){for(var n=T(e,t),i=0;i<n.length;++i){var o=n[i];o.context=r.providedModels[o.name]}var a={router:e,isAborted:!1};E(a,n)}function x(e,t,r,i,o,s,u){function c(){R(b);try{V(b,E),_(e,e.currentHandlerInfos,!0,["didTransition"]),e.didTransition&&e.didTransition(E),I(e,b.sequence,"TRANSITION COMPLETE."),b.isActive=!1,d.resolve(E[E.length-1].handler)}catch(t){d.reject(t)}b.isAborted||(e.activeTransition=null)}function l(e){d.reject(e)}var h=a(e,t,r,i,o),m=t[t.length-1].handler,f=!1,p=e.currentHandlerInfos;if(u)return P(e,t,h);if(e.activeTransition){if(S(e.activeTransition,m,r,o))return e.activeTransition;e.activeTransition.abort(),f=!0}var d=H.defer(),b=new n(e,d.promise);b.targetName=m,b.providedModels=h.providedModels,b.providedModelsArray=r,b.params=h.params,b.data=s||{},b.queryParams=o,b.pivotHandler=h.pivotHandler,e.activeTransition=b;var E=T(e,t);return b.handlerInfos=E,f||_(e,p,!0,["willTransition",b]),I(e,b.sequence,"Beginning validation for transition to "+b.targetName),N(b,h.matchPoint,h.handlerParams).then(c,l),b}function T(e,t){for(var r=[],n=0,i=t.length;i>n;++n){var o=t[n],a=o.isDynamic||o.names&&o.names.length,s={isDynamic:!!a,name:o.handler,handler:e.getHandler(o.handler)};o.queryParams&&(s.queryParams=o.queryParams),r.push(s)}return r}function S(e,t,r,n){if(e.targetName!==t)return!1;var i=e.providedModelsArray;if(i.length!==r.length)return!1;for(var o=0,a=i.length;a>o;++o)if(i[o]!==r[o])return!1;return y(e.queryParams,n)?!0:!1}function V(e,t){I(e.router,e.sequence,"Validation succeeded, finalizing transition;");var r,n=e.router,i=(e.sequence,t[t.length-1].name),o=e.urlMethod,a=[],s=e.providedModelsArray.slice();for(r=t.length-1;r>=0;--r){var c=t[r];if(c.isDynamic){var m=s.pop();a.unshift(u(m)?m.toString():c.context)}c.handler.inaccessibleByURL&&(o=null)}var f={};for(r=t.length-1;r>=0;--r)h(f,t[r].queryParams);n.currentQueryParams=f;var p=l(n,i,a,e.queryParams);if(n.currentParams=p,o){var d=n.recognizer.generate(i,p);"replace"===o?n.replaceURL(d):n.updateURL(d)}E(e,t)}function N(e,t,r){function o(t){return e.isAborted?(I(e.router,e.sequence,"detected abort."),H.reject(new i.TransitionAborted)):t}function a(t){return t instanceof i.TransitionAborted||e.isAborted?H.reject(t):(e.abort(),I(f,E,b+": handling error: "+t),e.trigger(!0,"error",t,e,p.handler),H.reject(t))}function s(){I(f,E,b+": calling beforeModel hook");var t;t=p.queryParams?[p.queryParams,e]:[e];var r=d.beforeModel&&d.beforeModel.apply(d,t);return r instanceof n?null:r}function u(){I(f,E,b+": resolving model");var i=D(p,e,r[b],m>=t);return i instanceof n?null:i}function c(t){I(f,E,b+": calling afterModel hook"),e.resolvedModels[p.name]=t;var r;r=p.queryParams?[t,p.queryParams,e]:[t,e];var i=d.afterModel&&d.afterModel.apply(d,r);return i instanceof n?null:i}function l(){return I(f,E,b+": validation succeeded, proceeding"),p.context=e.resolvedModels[p.name],e.resolveIndex++,N(e,t,r)}var h=e.handlerInfos,m=e.resolveIndex;if(m===h.length)return H.resolve(e.resolvedModels);var f=e.router,p=h[m],d=p.handler,b=p.name,E=e.sequence;return t>m?(I(f,E,b+": using context from already-active handler"),e.resolvedModels[p.name]=e.providedModels[p.name]||p.handler.context,l()):(e.trigger(!0,"willResolveModel",e,d),H.resolve().then(o).then(s).then(o).then(u).then(o).then(c).then(o).then(null,a).then(l))}function R(e){if(e.isAborted)throw I(e.router,e.sequence,"detected abort."),new i.TransitionAborted}function D(e,t,r,n){var i,o=e.handler,a=e.name;if(!n&&o.hasOwnProperty("context"))return o.context;if(t.providedModels.hasOwnProperty(a)){var s=t.providedModels[a];return"function"==typeof s?s():s}return i=e.queryParams?[r||{},e.queryParams,t]:[r||{},t,e.queryParams],o.model&&o.model.apply(o,i)}function I(e,t,r){e.log&&(3===arguments.length?e.log("Transition #"+t+": "+r):(r=t,e.log(r)))}function M(e,t,r){var n=t[0]||"/";return 1===t.length&&t[0].hasOwnProperty("queryParams")?p(e,t[0],r):"/"===n.charAt(0)?b(e,n,r):d(e,L.call(t),r)}function j(e,t,r){var n={};if(u(t))return n[r[0]]=t,n;if(e.serialize)return e.serialize(t,r);if(1===r.length){var i=r[0];return n[i]=/_id$/.test(i)?t.id:t,n}}var k=e,H=t,L=Array.prototype.slice;n.currentSequence=0,n.prototype={targetName:null,urlMethod:"update",providedModels:null,resolvedModels:null,params:null,pivotHandler:null,resolveIndex:0,handlerInfos:null,isActive:!0,promise:null,data:null,then:function(e,t){return this.promise.then(e,t)},abort:function(){return this.isAborted?this:(I(this.router,this.sequence,this.targetName+": transition was aborted"),this.isAborted=!0,this.isActive=!1,this.router.activeTransition=null,this)},retry:function(){this.abort();var e=this.router.recognizer.handlersFor(this.targetName),t=f(this.router,e,this.queryParams),r=x(this.router,t,this.providedModelsArray,this.params,this.queryParams,this.data);return r},method:function(e){return this.urlMethod=e,this},trigger:function(e){var t=L.call(arguments);"boolean"==typeof e?t.shift():e=!1,_(this.router,this.handlerInfos.slice(0,this.resolveIndex+1),e,t)},toString:function(){return"Transition (sequence "+this.sequence+")"}},i.Transition=n,r["default"]=i,i.UnrecognizedURLError=function(e){this.message=e||"UnrecognizedURLError",this.name="UnrecognizedURLError"},i.TransitionAborted=function(e){this.message=e||"TransitionAborted",this.name="TransitionAborted"},i.prototype={map:function(e){this.recognizer.delegate=this.delegate,this.recognizer.map(e,function(e,t){var r=t[t.length-1].handler,n=[t,{as:r}];e.add.apply(e,n)})},hasRoute:function(e){return this.recognizer.hasRoute(e)},reset:function(){g(this.currentHandlerInfos||[],function(e){var t=e.handler;t.exit&&t.exit()}),this.currentHandlerInfos=null,this.targetHandlerInfos=null},activeTransition:null,handleURL:function(e){var t=L.call(arguments);return"/"!==e.charAt(0)&&(t[0]="/"+e),M(this,t).method(null)},updateURL:function(){throw new Error("updateURL is not implemented")},replaceURL:function(e){this.updateURL(e)},transitionTo:function(){return M(this,arguments)},intermediateTransitionTo:function(){M(this,arguments,!0)},replaceWith:function(){return M(this,arguments).method("replace")},paramsForHandler:function(e){var t=A(L.call(arguments,1));return l(this,e,t[0],t[1])},queryParamsForHandler:function(e){return c(this,e)},generate:function(e){var t=A(L.call(arguments,1)),r=t[0],n=t[1],i=l(this,e,r,n),o=c(this,e),a=[];for(var s in n)n.hasOwnProperty(s)&&!~o.indexOf(s)&&a.push(s);if(a.length>0){var u="You supplied the params ";throw u+=a.map(function(e){return'"'+e+"="+n[e]+'"'}).join(" and "),u+=' which are not valid for the "'+e+'" handler or its parents',new Error(u)}return this.recognizer.generate(e,i)},isActive:function(e){var t,r,n=A(L.call(arguments,1)),i=n[0],o=n[1],a={},s={},c=this.targetHandlerInfos,l=!1;if(!c)return!1;for(var f=this.recognizer.handlersFor(c[c.length-1].name),p=c.length-1;p>=0;p--)if(r=c[p],r.name===e&&(l=!0),l){var d=f[p];if(h(a,r.queryParams),o!==!1&&(h(s,r.queryParams),m(s,o,d.queryParams)),r.isDynamic&&i.length>0)if(t=i.pop(),u(t)){var b=d.names[0];if(!this.currentParams||""+t!==this.currentParams[b])return!1}else if(r.context!==t)return!1}return 0===i.length&&l&&y(a,s)},trigger:function(){var e=L.call(arguments);_(this,this.currentHandlerInfos,!1,e)},log:null}})}(),function(){function e(e){this.parent=e,this.matches=[]}function t(e,t,r){r=r||{},"string"!=typeof r.path&&(r.path="/"+t),e.parent&&"application"!==e.parent&&(t=e.parent+"."+t),e.push(r.path,t,null,r.queryParams)}e.prototype={resource:function(r,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n={}),1===arguments.length&&(n={}),"string"!=typeof n.path&&(n.path="/"+r),i){var o=new e(r);t(o,"loading"),t(o,"error",{path:"/_unused_dummy_error_path_route_"+r+"/:error"}),i.call(o),this.push(n.path,r,o.generate(),n.queryParams)}else this.push(n.path,r,null,n.queryParams);Ember.FEATURES.isEnabled("ember-routing-named-substates")&&(r=r.split(".").pop(),t(this,r+"_loading"),t(this,r+"_error",{path:"/_unused_dummy_error_path_route_"+r+"/:error"}))},push:function(e,t,r,n){var i=t.split(".");(""===e||"/"===e||"index"===i[i.length-1])&&(this.explicitIndex=!0),this.matches.push([e,t,r,n])},route:function(e,r){t(this,e,r),Ember.FEATURES.isEnabled("ember-routing-named-substates")&&(t(this,e+"_loading"),t(this,e+"_error",{path:"/_unused_dummy_error_path_route_"+e+"/:error"}))},generate:function(){var e=this.matches;return this.explicitIndex||this.route("index",{path:"/"}),function(t){for(var r=0,n=e.length;n>r;r++){var i=e[r],o=t(i[0]).to(i[1],i[2]);Ember.FEATURES.isEnabled("query-params")&&i[3]&&o.withQueryParams.apply(o,i[3])}}}},e.map=function(t){var r=new e;return t.call(r),r},Ember.RouterDSL=e}(),function(){var e=Ember.get;Ember.controllerFor=function(e,t,r){return e.lookup("controller:"+t,r)},Ember.generateControllerFactory=function(e,t,r){var n,i,o,a;return a=r&&Ember.isArray(r)?"array":r?"object":"basic",o="controller:"+a,n=e.lookupFactory(o).extend({isGenerated:!0,toString:function(){return"(generated "+t+" controller)"}}),i="controller:"+t,e.register(i,n),n},Ember.generateController=function(t,r,n){Ember.generateControllerFactory(t,r,n);var i="controller:"+r,o=t.lookup(i);return e(o,"namespace.LOG_ACTIVE_GENERATION")&&Ember.Logger.info("generated -> "+i,{fullName:i}),o}}(),function(){function e(e,t,r){for(var n=t.handlerInfos,i=!1,o=n.length-1;o>=0;--o){var a=n[o],s=a.handler;if(i){if(r(s,n[o+1].handler)!==!0)return!1}else e===s&&(i=!0)}return!0}function r(e,t,r){var i,o=e.router,a=t.routeName.split(".").pop(),s="application"===e.routeName?"":e.routeName+".";return Ember.FEATURES.isEnabled("ember-routing-named-substates")&&(i=s+a+"_"+r,n(o,i))?i:(i=s+r,n(o,i)?i:void 0)}function n(e,t){var r=e.container;return e.hasRoute(t)&&(r.has("template:"+t)||r.has("route:"+t))}function i(e,t,r){var n=r.shift();if(!e){if(t)return;throw new Ember.Error("Can't trigger action '"+n+"' because your app hasn't finished transitioning into its first route. To trigger an action on destination routes during a transition, you can call `.send()` on the `Transition` object passed to the `model/beforeModel/afterModel` hooks.")}for(var i=!1,o=e.length-1;o>=0;o--){var a=e[o],s=a.handler;if(s._actions&&s._actions[n]){if(s._actions[n].apply(s,r)!==!0)return;i=!0}}if(m[n])return m[n].apply(null,r),void 0;if(!i&&!t)throw new Ember.Error("Nothing handled the action '"+n+"'. If you did handle the action, this error can be caused by returning true from an action handler in a controller, causing the action to bubble.")}function o(e){var t=e.container.lookup("controller:application");if(t){var r=e.router.currentHandlerInfos,n=Ember.Router._routePath(r);"currentPath"in t||c(t,"currentPath"),u(t,"currentPath",n),"currentRouteName"in t||c(t,"currentRouteName"),u(t,"currentRouteName",r[r.length-1].name)}}var a=t("router")["default"],s=Ember.get,u=Ember.set,c=Ember.defineProperty,l=Array.prototype.slice,h=Ember._MetamorphView;Ember.Router=Ember.Object.extend(Ember.Evented,{location:"hash",init:function(){this.router=this.constructor.router||this.constructor.map(Ember.K),this._activeViews={},this._setupLocation(),s(this,"namespace.LOG_TRANSITIONS_INTERNAL")&&(this.router.log=Ember.Logger.debug)},url:Ember.computed(function(){return s(this,"location").getURL()}),startRouting:function(){this.router=this.router||this.constructor.map(Ember.K);var e=this.router,t=s(this,"location"),r=this.container,n=this;this._setupRouter(e,t),r.register("view:default",h),r.register("view:toplevel",Ember.View.extend()),t.onUpdateURL(function(e){n.handleURL(e)}),this.handleURL(t.getURL())},didTransition:function(e){o(this),this._cancelLoadingEvent(),this.notifyPropertyChange("url"),Ember.run.once(this,this.trigger,"didTransition"),s(this,"namespace").LOG_TRANSITIONS&&Ember.Logger.log("Transitioned into '"+Ember.Router._routePath(e)+"'")},handleURL:function(e){return this._doTransition("handleURL",[e])},transitionTo:function(){return this._doTransition("transitionTo",arguments)},intermediateTransitionTo:function(){this.router.intermediateTransitionTo.apply(this.router,arguments),o(this);var e=this.router.currentHandlerInfos;s(this,"namespace").LOG_TRANSITIONS&&Ember.Logger.log("Intermediate-transitioned into '"+Ember.Router._routePath(e)+"'")},replaceWith:function(){return this._doTransition("replaceWith",arguments)},generate:function(){var e=this.router.generate.apply(this.router,arguments);return this.location.formatURL(e)},isActive:function(){var e=this.router;return e.isActive.apply(e,arguments)},send:function(){this.router.trigger.apply(this.router,arguments)},hasRoute:function(e){return this.router.hasRoute(e)},reset:function(){this.router.reset()},_lookupActiveView:function(e){var t=this._activeViews[e];return t&&t[0]},_connectActiveView:function(e,t){var r=this._activeViews[e];r&&r[0].off("willDestroyElement",this,r[1]);var n=function(){delete this._activeViews[e]};this._activeViews[e]=[t,n],t.one("willDestroyElement",this,n)},_setupLocation:function(){var e=s(this,"location"),t=s(this,"rootURL");if("string"==typeof e&&this.container){var r=this.container.lookup("location:"+e);if("undefined"!=typeof r)e=u(this,"location",r);else{var n={implementation:e};e=u(this,"location",Ember.Location.create(n))}}"string"==typeof t&&(e.rootURL=t),"function"==typeof e.initState&&e.initState()},_getHandlerFunction:function(){var e={},t=this.container,r=t.lookupFactory("route:basic"),n=this;return function(i){var o="route:"+i,a=t.lookup(o);return e[i]?a:(e[i]=!0,a||(t.register(o,r.extend()),a=t.lookup(o),s(n,"namespace.LOG_ACTIVE_GENERATION")&&Ember.Logger.info("generated -> "+o,{fullName:o})),a.routeName=i,a)}},_setupRouter:function(e,t){var r,n=this;e.getHandler=this._getHandlerFunction();var i=function(){t.setURL(r)};if(e.updateURL=function(e){r=e,Ember.run.once(i)},t.replaceURL){var o=function(){t.replaceURL(r)};e.replaceURL=function(e){r=e,Ember.run.once(o)}}e.didTransition=function(e){n.didTransition(e)}},_doTransition:function(e,t){t=l.call(t),t[0]=t[0]||"/";var r,n=t[0],i=!1;Ember.FEATURES.isEnabled("query-params")&&(i=1===t.length&&t[0].hasOwnProperty("queryParams")),i||"/"!==n.charAt(0)?i||(r=this.router.hasRoute(n)?n:t[0]=n+".index"):r=n;var o=this.router[e].apply(this.router,t);return o.then(null,function(e){"UnrecognizedURLError"===e.name}),o},_scheduleLoadingEvent:function(e,t){this._cancelLoadingEvent(),this._loadingStateTimer=Ember.run.scheduleOnce("routerTransitions",this,"_fireLoadingEvent",e,t)},_fireLoadingEvent:function(e,t){this.router.activeTransition&&e.trigger(!0,"loading",e,t)},_cancelLoadingEvent:function(){this._loadingStateTimer&&Ember.run.cancel(this._loadingStateTimer),this._loadingStateTimer=null}});var m={willResolveModel:function(e,t){t.router._scheduleLoadingEvent(e,t)},error:function(t,i,o){var a=o.router,s=e(o,i,function(e,n){var i=r(e,n,"error");return i?(a.intermediateTransitionTo(i,t),void 0):!0});return s?n(o.router,"application_error")?(a.intermediateTransitionTo("application_error",t),void 0):(Ember.Logger.error("Error while loading route: "+t.stack),void 0):void 0},loading:function(t,i){var o=i.router,a=e(i,t,function(e,n){var i=r(e,n,"loading");return i?(o.intermediateTransitionTo(i),void 0):t.pivotHandler!==e?!0:void 0});return a&&n(i.router,"application_loading")?(o.intermediateTransitionTo("application_loading"),void 0):void 0}};Ember.Router.reopenClass({router:null,map:function(e){var t=this.router;t||(t=new a,t.callbacks=[],t.triggerEvent=i,this.reopenClass({router:t}));var r=Ember.RouterDSL.map(function(){this.resource("application",{path:"/"},function(){for(var r=0;r<t.callbacks.length;r++)t.callbacks[r].call(this);e.call(this)})});return t.callbacks.push(e),t.map(r.generate()),t},_routePath:function(e){function t(e,t){for(var r=0,n=e.length;n>r;++r)if(e[r]!==t[r])return!1;return!0}for(var r=[],n=1,i=e.length;i>n;n++){for(var o=e[n].name,a=o.split("."),s=l.call(r);s.length&&!t(s,a);)s.shift();
17
+ r.push.apply(r,a.slice(s.length))}return r.join(".")}}),a.Transition.prototype.send=a.Transition.prototype.trigger}(),function(){function e(e){var t=e.router.router.targetHandlerInfos;if(t)for(var r,n,i=0,o=t.length;o>i;i++){if(n=t[i].handler,n===e)return r;r=n}}function t(r){var n,i=e(r);if(i)return(n=i.lastRenderedTemplate)?n:t(i)}function r(e,r,n,i){i=i||{},i.into=i.into?i.into.replace(/\//g,"."):t(e),i.outlet=i.outlet||"main",i.name=r,i.template=n,i.LOG_VIEW_LOOKUPS=s(e.router,"namespace.LOG_VIEW_LOOKUPS");var o,a=i.controller;return a=i.controller?i.controller:(o=e.container.lookup("controller:"+r))?o:e.controllerName||e.routeName,"string"==typeof a&&(a=e.container.lookup("controller:"+a)),i.controller=a,i}function n(e,t,r){if(e)r.LOG_VIEW_LOOKUPS&&Ember.Logger.info("Rendering "+r.name+" with "+e,{fullName:"view:"+r.name});else{var n=r.into?"view:default":"view:toplevel";e=t.lookup(n),r.LOG_VIEW_LOOKUPS&&Ember.Logger.info("Rendering "+r.name+" with default view "+e,{fullName:"view:"+r.name})}return s(e,"templateName")||(u(e,"template",r.template),u(e,"_debugTemplateName",r.name)),u(e,"renderedName",r.name),u(e,"controller",r.controller),e}function i(e,t,r){if(r.into){var n=e.router._lookupActiveView(r.into),i=a(n,r.outlet);e.teardownOutletViews||(e.teardownOutletViews=[]),h(e.teardownOutletViews,0,0,[i]),n.connectOutlet(r.outlet,t)}else{var u=s(e,"router.namespace.rootElement");e.teardownTopLevelView&&e.teardownTopLevelView(),e.router._connectActiveView(r.name,t),e.teardownTopLevelView=o(t),t.appendTo(u)}}function o(e){return function(){e.destroy()}}function a(e,t){return function(){e.disconnectOutlet(t)}}var s=Ember.get,u=Ember.set,c=Ember.getProperties,l=(Ember.String.classify,Ember.String.fmt,Ember.EnumerableUtils.forEach),h=Ember.EnumerableUtils.replace;Ember.Route=Ember.Object.extend(Ember.ActionHandler,{exit:function(){this.deactivate(),this.teardownViews()},enter:function(){this.activate()},actions:null,events:null,mergedProperties:["events"],deactivate:Ember.K,activate:Ember.K,transitionTo:function(){var e=this.router;return e.transitionTo.apply(e,arguments)},intermediateTransitionTo:function(){var e=this.router;e.intermediateTransitionTo.apply(e,arguments)},replaceWith:function(){var e=this.router;return e.replaceWith.apply(e,arguments)},send:function(){return this.router.send.apply(this.router,arguments)},setup:function(e,t){var r=this.controllerName||this.routeName,n=this.controllerFor(r,!0);n||(n=this.generateController(r,e)),this.controller=n;var i=[n,e];Ember.FEATURES.isEnabled("query-params")&&i.push(t),this.setupControllers?this.setupControllers(n,e):this.setupController.apply(this,i),this.renderTemplates?this.renderTemplates(e):this.renderTemplate.apply(this,i)},redirect:Ember.K,beforeModel:Ember.K,afterModel:function(e,t){this.redirect(e,t)},contextDidChange:function(){this.currentModel=this.context},model:function(e){var t,r,n,i;for(var o in e)(t=o.match(/^(.*)_id$/))&&(r=t[1],i=e[o]),n=!0;if(!r&&n)return e;if(r)return this.findModel(r,i)},findModel:function(){var e=s(this,"store");return e.find.apply(e,arguments)},store:Ember.computed(function(){{var e=this.container;this.routeName,s(this,"router.namespace")}return{find:function(t,r){var n=e.lookupFactory("model:"+t);return n.find(r)}}}),serialize:function(e,t){if(!(t.length<1)&&e){var r=t[0],n={};return/_id$/.test(r)&&1===t.length?n[r]=s(e,"id"):n=c(e,t),n}},setupController:function(e,t){e&&void 0!==t&&u(e,"model",t)},controllerFor:function(e){var t,r=this.container,n=r.lookup("route:"+e);return n&&n.controllerName&&(e=n.controllerName),t=r.lookup("controller:"+e)},generateController:function(e,t){var r=this.container;return t=t||this.modelFor(e),Ember.generateController(r,e,t)},modelFor:function(e){var t=this.container.lookup("route:"+e),r=this.router.router.activeTransition;if(r){var n=t&&t.routeName||e;if(r.resolvedModels.hasOwnProperty(n))return r.resolvedModels[n]}return t&&t.currentModel},renderTemplate:function(){this.render()},render:function(e,t){"object"!=typeof e||t||(t=e,e=this.routeName),t=t||{};var o;e?(e=e.replace(/\//g,"."),o=e):(e=this.routeName,o=this.templateName||e);var a=t.view||this.viewName||e,u=this.container,c=u.lookup("view:"+a),l=c?c.get("template"):null;return l||(l=u.lookup("template:"+o)),c||l?(t=r(this,e,l,t),c=n(c,u,t),"main"===t.outlet&&(this.lastRenderedTemplate=e),i(this,c,t),void 0):(s(this.router,"namespace.LOG_VIEW_LOOKUPS")&&Ember.Logger.info('Could not find "'+e+'" template or view. Nothing will be rendered',{fullName:"template:"+e}),void 0)},disconnectOutlet:function(e){e=e||{},e.parentView=e.parentView?e.parentView.replace(/\//g,"."):t(this),e.outlet=e.outlet||"main";var r=this.router._lookupActiveView(e.parentView);r.disconnectOutlet(e.outlet)},willDestroy:function(){this.teardownViews()},teardownViews:function(){this.teardownTopLevelView&&this.teardownTopLevelView();var e=this.teardownOutletViews||[];l(e,function(e){e()}),delete this.teardownTopLevelView,delete this.teardownOutletViews,delete this.lastRenderedTemplate}})}(),function(){Ember.onLoad("Ember.Handlebars",function(){function e(e,r,i){return n.call(t(e,r,i),function(t,n){return null===t?r[n]:o(e,t,i)})}function t(e,t,o){function a(e,t){return"controller"===t?t:Ember.ControllerMixin.detect(e)?a(i(e,"model"),t?t+".model":"model"):t}var s=r(e,t,o),u=o.types;return n.call(s,function(e,r){return"ID"===u[r]?a(e,t[r]):null})}var r=Ember.Handlebars.resolveParams,n=Ember.ArrayPolyfills.map,i=Ember.get,o=Ember.Handlebars.get;Ember.Router.resolveParams=e,Ember.Router.resolvePaths=t})}(),function(){{var e=Ember.get;Ember.set,Ember.String.fmt}Ember.onLoad("Ember.Handlebars",function(){function t(e,t){var r;return e.hasRoute(t)||(r=t+".index",t=r),t}function r(e){var t=e.options.types,r=e.options.data;return i(e.context,e.params,{types:t,data:r})}var n=Ember.Router.resolveParams,i=Ember.Router.resolvePaths,o=Ember.ViewUtils.isSimpleClick,a=Ember.LinkView=Ember.View.extend({tagName:"a",currentWhen:null,title:null,rel:null,activeClass:"active",loadingClass:"loading",disabledClass:"disabled",_isDisabled:!1,replace:!1,attributeBindings:["href","title","rel"],classNameBindings:["active","loading","disabled"],eventName:"click",init:function(){this._super.apply(this,arguments);var t,r=e(this,"eventName");if(this.on(r,this,this._invoke),Ember.FEATURES.isEnabled("query-params")){var n=e(this,"_potentialQueryParams")||[];for(t=0;t<n.length;t++)this.registerObserver(this,n[t],this,this._queryParamsChanged)}},_paramsChanged:function(){this.notifyPropertyChange("resolvedParams")},_setupPathObservers:function(){var e,t,n,i=this.parameters,o=i.options.linkTextPath,a=r(i),s=a.length;for(o&&(n=Ember.Handlebars.normalizePath(i.context,o,i.options.data),this.registerObserver(n.root,n.path,this,this.rerender)),t=0;s>t;t++)e=a[t],null!==e&&(n=Ember.Handlebars.normalizePath(i.context,e,i.options.data),this.registerObserver(n.root,n.path,this,this._paramsChanged))},afterRender:function(){this._super.apply(this,arguments),this._setupPathObservers()},_queryParamsChanged:function(){this.notifyPropertyChange("queryParams")},concreteView:Ember.computed(function(){return e(this,"parentView")}).property("parentView"),disabled:Ember.computed(function(t,r){return void 0!==r&&this.set("_isDisabled",r),r?e(this,"disabledClass"):!1}),active:Ember.computed(function(){if(e(this,"loading"))return!1;var t=e(this,"router"),r=e(this,"routeArgs"),n=r.slice(1),i=e(this,"resolvedParams"),o=this.currentWhen||i[0],a=o+".index",s=t.isActive.apply(t,[o].concat(n))||t.isActive.apply(t,[a].concat(n));return s?e(this,"activeClass"):void 0}).property("resolvedParams","routeArgs","router.url"),loading:Ember.computed(function(){return e(this,"routeArgs")?void 0:e(this,"loadingClass")}).property("routeArgs"),router:Ember.computed(function(){return e(this,"controller").container.lookup("router:main")}),_invoke:function(t){if(!o(t))return!0;if(this.preventDefault!==!1&&t.preventDefault(),this.bubbles===!1&&t.stopPropagation(),e(this,"_isDisabled"))return!1;if(e(this,"loading"))return Ember.Logger.warn("This link-to is in an inactive loading state because at least one of its parameters presently has a null/undefined value, or the provided route name is invalid."),!1;var r=e(this,"router"),n=e(this,"routeArgs");e(this,"replace")?r.replaceWith.apply(r,n):r.transitionTo.apply(r,n)},resolvedParams:Ember.computed(function(){var t=this.parameters,r=t.options,i=r.types,o=r.data;if(Ember.FEATURES.isEnabled("query-params")){if(0===t.params.length){var a=this.container.lookup("controller:application");return[e(a,"currentRouteName")]}return n(t.context,t.params,{types:i,data:o})}return n(t.context,t.params,{types:i,data:o})}).property(),routeArgs:Ember.computed(function(){var r=e(this,"resolvedParams").slice(0),n=e(this,"router"),i=r[0];if(i){i=t(n,i),r[0]=i;for(var o=1,a=r.length;a>o;++o){var s=r[o];if(null===s||"undefined"==typeof s)return}if(Ember.FEATURES.isEnabled("query-params")){var u=e(this,"queryParams");(u||u===!1)&&r.push({queryParams:u})}return r}}).property("resolvedParams","queryParams","router.url"),_potentialQueryParams:Ember.computed(function(){var r=e(this,"resolvedParams")[0];if(!r)return null;var n=e(this,"router");return r=t(n,r),n.router.queryParamsForHandler(r)}).property("resolvedParams"),queryParams:Ember.computed(function(){var t=this,r=null,n=e(this,"_potentialQueryParams");return n?(n.forEach(function(n){var i=e(t,n);"undefined"!=typeof i&&(r=r||{},r[n]=i)}),r):null}).property("_potentialQueryParams.[]"),href:Ember.computed(function(){if("a"===e(this,"tagName")){var t=e(this,"router"),r=e(this,"routeArgs");return r?t.generate.apply(t,r):e(this,"loadingHref")}}).property("routeArgs"),loadingHref:"#"});a.toString=function(){return"LinkView"},Ember.Handlebars.registerHelper("link-to",function(){var e=[].slice.call(arguments,-1)[0],t=[].slice.call(arguments,0,-1),r=e.hash;if(r.disabledBinding=r.disabledWhen,!e.fn){var n=t.shift(),i=e.types.shift(),o=this;"ID"===i?(e.linkTextPath=n,e.fn=function(){return Ember.Handlebars.get(o,n,e)}):e.fn=function(){return n}}return r.parameters={context:this,options:e,params:t},Ember.Handlebars.helpers.view.call(this,a,e)}),Ember.Handlebars.registerHelper("linkTo",function(){return Ember.Handlebars.helpers["link-to"].apply(this,arguments)})})}(),function(){Ember.get,Ember.set;Ember.onLoad("Ember.Handlebars",function(e){e.OutletView=Ember.ContainerView.extend(Ember._Metamorph),e.registerHelper("outlet",function(t,r){var n,i;for(t&&t.data&&t.data.isRenderData&&(r=t,t="main"),n=r.data.view;!n.get("template.isTop");)n=n.get("_parentView");return i=r.hash.viewClass||e.OutletView,r.data.view.set("outletSource",n),r.hash.currentViewBinding="_view.outletSource._outlets."+t,e.helpers.view.call(this,i,r)})})}(),function(){Ember.get,Ember.set;Ember.onLoad("Ember.Handlebars",function(){Ember.Handlebars.registerHelper("render",function(e,t,r){var n,i,o,a,s,u=arguments.length;if(n=(r||t).data.keywords.controller.container,i=n.lookup("router:main"),2===u)r=t,t=void 0;else{if(3!==u)throw Ember.Error("You must pass a templateName to render");s=Ember.Handlebars.get(r.contexts[1],t,r)}e=e.replace(/\//g,"."),a=n.lookup("view:"+e)||n.lookup("view:default");var c=r.hash.controller||e,l="controller:"+c;r.hash.controller;var h=r.data.keywords.controller;if(u>2){var m=n.lookupFactory(l)||Ember.generateControllerFactory(n,c,s);o=m.create({model:s,target:h})}else o=n.lookup(l)||Ember.generateController(n,c),o.set("target",h);var f=r.contexts[1];f&&a.registerObserver(f,t,function(){o.set("model",Ember.Handlebars.get(f,t,r))}),r.hash.viewName=Ember.String.camelize(e),r.hash.template=n.lookup("template:"+e),r.hash.controller=o,i&&!s&&i._connectActiveView(e,a),Ember.Handlebars.helpers.view.call(this,a,r)})})}(),function(){Ember.onLoad("Ember.Handlebars",function(){function e(e,r){var n=[];r&&n.push(r);var i=e.options.types.slice(1),o=e.options.data;return n.concat(t(e.context,e.params,{types:i,data:o}))}var t=Ember.Router.resolveParams,r=Ember.ViewUtils.isSimpleClick,n=Ember.Handlebars,i=n.get,o=n.SafeString,a=Ember.ArrayPolyfills.forEach,s=(Ember.get,Array.prototype.slice),u=n.ActionHelper={registeredActions:{}},c=["alt","shift","meta","ctrl"],l=/^click|mouse|touch/,h=function(e,t){if("undefined"==typeof t){if(l.test(e.type))return r(e);t=""}if(t.indexOf("any")>=0)return!0;var n=!0;return a.call(c,function(r){e[r+"Key"]&&-1===t.indexOf(r)&&(n=!1)}),n};u.registerAction=function(t,r,n){var o=(++Ember.uuid).toString();return u.registeredActions[o]={eventName:r.eventName,handler:function(o){if(!h(o,n))return!0;r.preventDefault!==!1&&o.preventDefault(),r.bubbles===!1&&o.stopPropagation();var a=r.target;a=a.target?i(a.root,a.target,a.options):a.root,Ember.run(function(){a.send?a.send.apply(a,e(r.parameters,t)):a[t].apply(a,e(r.parameters))})}},r.view.on("willClearRender",function(){delete u.registeredActions[o]}),o},n.registerHelper("action",function(e){var t,r=arguments[arguments.length-1],n=s.call(arguments,1,-1),i=r.hash,a={eventName:i.on||"click"};a.parameters={context:this,options:r,params:n},a.view=r.data.view;var c,l;i.target?(c=this,l=i.target):(t=r.data.keywords.controller)&&(c=t),a.target={root:c,target:l,options:r},a.bubbles=i.bubbles,a.preventDefault=i.preventDefault;var h=u.registerAction(e,a,i.allowedKeys);return new o('data-ember-action="'+h+'"')})})}(),function(){{var e=Ember.get;Ember.set}Ember.ControllerMixin.reopen({transitionToRoute:function(){var t=e(this,"target"),r=t.transitionToRoute||t.transitionTo;return r.apply(t,arguments)},transitionTo:function(){return this.transitionToRoute.apply(this,arguments)},replaceRoute:function(){var t=e(this,"target"),r=t.replaceRoute||t.replaceWith;return r.apply(t,arguments)},replaceWith:function(){return this.replaceRoute.apply(this,arguments)}})}(),function(){var e=Ember.get,t=Ember.set;Ember.View.reopen({init:function(){t(this,"_outlets",{}),this._super()},connectOutlet:function(r,n){if(this._pendingDisconnections&&delete this._pendingDisconnections[r],this._hasEquivalentView(r,n))return n.destroy(),void 0;var i=e(this,"_outlets"),o=e(this,"container"),a=o&&o.lookup("router:main"),s=e(n,"renderedName");t(i,r,n),a&&s&&a._connectActiveView(s,n)},_hasEquivalentView:function(t,r){var n=e(this,"_outlets."+t);return n&&n.constructor===r.constructor&&n.get("template")===r.get("template")&&n.get("context")===r.get("context")},disconnectOutlet:function(e){this._pendingDisconnections||(this._pendingDisconnections={}),this._pendingDisconnections[e]=!0,Ember.run.once(this,"_finishDisconnections")},_finishDisconnections:function(){var r=e(this,"_outlets"),n=this._pendingDisconnections;this._pendingDisconnections=null;for(var i in n)t(r,i,null)}})}(),function(){var e=Ember.run.queues,t=Ember.ArrayPolyfills.indexOf;e.splice(t.call(e,"actions")+1,0,"routerTransitions")}(),function(){Ember.get,Ember.set;Ember.Location={create:function(e){var t=e&&e.implementation,r=this.implementations[t];return r.create.apply(r,arguments)},registerImplementation:function(e,t){this.implementations[e]=t},implementations:{}}}(),function(){var e=Ember.get,t=Ember.set;Ember.NoneLocation=Ember.Object.extend({implementation:"none",path:"",getURL:function(){return e(this,"path")},setURL:function(e){t(this,"path",e)},onUpdateURL:function(e){this.updateCallback=e},handleURL:function(e){t(this,"path",e),this.updateCallback(e)},formatURL:function(e){return e}})}(),function(){var e=Ember.get,t=Ember.set;Ember.HashLocation=Ember.Object.extend({implementation:"hash",init:function(){t(this,"location",e(this,"location")||window.location)},getURL:function(){if(Ember.FEATURES.isEnabled("query-params")){var t=e(this,"location").href,r=t.indexOf("#");return-1===r?"":t.substr(r+1)}return e(this,"location").hash.substr(1)},setURL:function(r){e(this,"location").hash=r,t(this,"lastSetURL",r)},replaceURL:function(t){e(this,"location").replace("#"+t)},onUpdateURL:function(r){var n=this,i=Ember.guidFor(this);Ember.$(window).on("hashchange.ember-location-"+i,function(){Ember.run(function(){var i=location.hash.substr(1);e(n,"lastSetURL")!==i&&(t(n,"lastSetURL",null),r(i))})})},formatURL:function(e){return"#"+e},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).off("hashchange.ember-location-"+e)}})}(),function(){var e=Ember.get,t=Ember.set,r=!1,n=window.history&&"state"in window.history;Ember.HistoryLocation=Ember.Object.extend({implementation:"history",init:function(){t(this,"location",e(this,"location")||window.location)},initState:function(){t(this,"history",e(this,"history")||window.history),this.replaceState(this.formatURL(this.getURL()))},rootURL:"/",getURL:function(){var t=e(this,"rootURL"),r=e(this,"location"),n=r.pathname;t=t.replace(/\/$/,"");var i=n.replace(t,"");if(Ember.FEATURES.isEnabled("query-params")){var o=r.search||"";i+=o}return i},setURL:function(e){var t=this.getState();e=this.formatURL(e),t&&t.path!==e&&this.pushState(e)},replaceURL:function(e){var t=this.getState();e=this.formatURL(e),t&&t.path!==e&&this.replaceState(e)},getState:function(){return n?e(this,"history").state:this._historyState},pushState:function(t){var r={path:t};e(this,"history").pushState(r,null,t),n||(this._historyState=r),this._previousURL=this.getURL()},replaceState:function(t){var r={path:t};e(this,"history").replaceState(r,null,t),n||(this._historyState=r),this._previousURL=this.getURL()},onUpdateURL:function(e){var t=Ember.guidFor(this),n=this;Ember.$(window).on("popstate.ember-location-"+t,function(){(r||(r=!0,n.getURL()!==n._previousURL))&&e(n.getURL())})},formatURL:function(t){var r=e(this,"rootURL");return""!==t&&(r=r.replace(/\/$/,"")),r+t},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).off("popstate.ember-location-"+e)}})}(),function(){function e(t,r,n,i){var o,a=t.name,s=t.incoming,u=t.incomingNames,c=u.length;if(n||(n={}),i||(i=[]),!n.hasOwnProperty(a)){for(i.push(a),n[a]=!0,o=0;c>o;o++)e(s[u[o]],r,n,i);r(t,i),i.pop()}}function t(){this.names=[],this.vertices={}}t.prototype.add=function(e){if(e){if(this.vertices.hasOwnProperty(e))return this.vertices[e];var t={name:e,incoming:{},incomingNames:[],hasOutgoing:!1,value:null};return this.vertices[e]=t,this.names.push(e),t}},t.prototype.map=function(e,t){this.add(e).value=t},t.prototype.addEdge=function(t,r){function n(e,t){if(e.name===r)throw new Ember.Error("cycle detected: "+r+" <- "+t.join(" <- "))}if(t&&r&&t!==r){var i=this.add(t),o=this.add(r);o.incoming.hasOwnProperty(t)||(e(i,n),i.hasOutgoing=!0,o.incoming[t]=i,o.incomingNames.push(t))}},t.prototype.topsort=function(t){var r,n,i={},o=this.vertices,a=this.names,s=a.length;for(r=0;s>r;r++)n=o[a[r]],n.hasOutgoing||e(n,t,i)},t.prototype.addEdges=function(e,t,r,n){var i;if(this.map(e,t),r)if("string"==typeof r)this.addEdge(e,r);else for(i=0;i<r.length;i++)this.addEdge(e,r[i]);if(n)if("string"==typeof n)this.addEdge(n,e);else for(i=0;i<n.length;i++)this.addEdge(n[i],e)},Ember.DAG=t}(),function(){var e=Ember.get,t=Ember.String.classify,r=Ember.String.capitalize,n=Ember.String.decamelize;Ember.DefaultResolver=Ember.Object.extend({namespace:null,normalize:function(e){var t=e.split(":",2),r=t[0],n=t[1];if("template"!==r){var i=n;return i.indexOf(".")>-1&&(i=i.replace(/\.(.)/g,function(e){return e.charAt(1).toUpperCase()})),n.indexOf("_")>-1&&(i=i.replace(/_(.)/g,function(e){return e.charAt(1).toUpperCase()})),r+":"+i}return e},resolve:function(e){var t=this.parseName(e),r=this[t.resolveMethodName];if(!t.name||!t.type)throw new TypeError("Invalid fullName: `"+e+"`, must of of the form `type:name` ");if(r){var n=r.call(this,t);if(n)return n}return this.resolveOther(t)},parseName:function(n){var i=n.split(":"),o=i[0],a=i[1],s=a,u=e(this,"namespace"),c=u;if("template"!==o&&-1!==s.indexOf("/")){var l=s.split("/");s=l[l.length-1];var h=r(l.slice(0,-1).join("."));c=Ember.Namespace.byName(h)}return{fullName:n,type:o,fullNameWithoutType:a,name:s,root:c,resolveMethodName:"resolve"+t(o)}},resolveTemplate:function(e){var t=e.fullNameWithoutType.replace(/\./g,"/");return Ember.TEMPLATES[t]?Ember.TEMPLATES[t]:(t=n(t),Ember.TEMPLATES[t]?Ember.TEMPLATES[t]:void 0)},useRouterNaming:function(e){e.name=e.name.replace(/\./g,"_"),"basic"===e.name&&(e.name="")},resolveController:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveRoute:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveView:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveHelper:function(e){return this.resolveOther(e)||Ember.Handlebars.helpers[e.fullNameWithoutType]},resolveModel:function(r){var n=t(r.name),i=e(r.root,n);return i?i:void 0},resolveOther:function(r){var n=t(r.name)+t(r.type),i=e(r.root,n);return i?i:void 0},lookupDescription:function(e){var r=this.parseName(e);if("template"===r.type)return"template at "+r.fullNameWithoutType.replace(/\./g,"/");var n=r.root+"."+t(r.name);return"model"!==r.type&&(n+=t(r.type)),n},makeToString:function(e){return e.toString()}})}(),function(){function e(e){this._container=e}function t(e){function t(e){return n.resolve(e)}e.get("resolver");var r=e.get("resolver")||e.get("Resolver")||Ember.DefaultResolver,n=r.create({namespace:e});return t.describe=function(e){return n.lookupDescription(e)},t.makeToString=function(e,t){return n.makeToString(e,t)},t.normalize=function(e){return n.normalize?n.normalize(e):e},t}var r=Ember.get,n=Ember.set;e.deprecate=function(e){return function(){var t=this._container;return t[e].apply(t,arguments)}},e.prototype={_container:null,lookup:e.deprecate("lookup"),resolve:e.deprecate("resolve"),register:e.deprecate("register")};var i=Ember.Application=Ember.Namespace.extend(Ember.DeferredMixin,{rootElement:"body",eventDispatcher:null,customEvents:null,_readinessDeferrals:1,init:function(){if(this.$||(this.$=Ember.$),this.__container__=this.buildContainer(),this.Router=this.defaultRouter(),this._super(),this.scheduleInitialize(),Ember.libraries.registerCoreLibrary("Handlebars",Ember.Handlebars.VERSION),Ember.libraries.registerCoreLibrary("jQuery",Ember.$().jquery),Ember.LOG_VERSION){Ember.LOG_VERSION=!1;var e=Math.max.apply(this,Ember.A(Ember.libraries).mapBy("name.length"));Ember.libraries.each(function(t){new Array(e-t.length+1).join(" ")})}},buildContainer:function(){var e=this.__container__=i.buildContainer(this);return e},defaultRouter:function(){if(this.Router!==!1){var e=this.__container__;return this.Router&&(e.unregister("router:main"),e.register("router:main",this.Router)),e.lookupFactory("router:main")}},scheduleInitialize:function(){var e=this;!this.$||this.$.isReady?Ember.run.schedule("actions",e,"_initialize"):this.$().ready(function(){Ember.run(e,"_initialize")})},deferReadiness:function(){this._readinessDeferrals++},advanceReadiness:function(){this._readinessDeferrals--,0===this._readinessDeferrals&&Ember.run.once(this,this.didBecomeReady)},register:function(){var e=this.__container__;e.register.apply(e,arguments)},inject:function(){var e=this.__container__;e.injection.apply(e,arguments)},initialize:function(){},_initialize:function(){if(!this.isDestroyed){if(this.Router){var e=this.__container__;e.unregister("router:main"),e.register("router:main",this.Router)}return this.runInitializers(),Ember.runLoadHooks("application",this),this.advanceReadiness(),this}},reset:function(){function e(){var e=this.__container__.lookup("router:main");e.reset(),Ember.run(this.__container__,"destroy"),this.buildContainer(),Ember.run.schedule("actions",this,function(){this._initialize()})}this._readinessDeferrals=1,Ember.run.join(this,e)},runInitializers:function(){var e,t,n=r(this.constructor,"initializers"),i=this.__container__,o=new Ember.DAG,a=this;for(e in n)t=n[e],o.addEdges(t.name,t.initialize,t.before,t.after);o.topsort(function(e){var t=e.value;t(i,a)})},didBecomeReady:function(){this.setupEventDispatcher(),this.ready(),this.startRouting(),Ember.testing||(Ember.Namespace.processAll(),Ember.BOOTED=!0),this.resolve(this)},setupEventDispatcher:function(){var e=r(this,"customEvents"),t=r(this,"rootElement"),i=this.__container__.lookup("event_dispatcher:main");n(this,"eventDispatcher",i),i.setup(e,t)},startRouting:function(){var e=this.__container__.lookup("router:main");e&&e.startRouting()},handleURL:function(e){var t=this.__container__.lookup("router:main");t.handleURL(e)},ready:Ember.K,resolver:null,Resolver:null,willDestroy:function(){Ember.BOOTED=!1,this.__container__.destroy()},initializer:function(e){this.constructor.initializer(e)}});Ember.Application.reopenClass({initializers:{},initializer:function(e){void 0!==this.superclass.initializers&&this.superclass.initializers===this.initializers&&this.reopenClass({initializers:Ember.create(this.initializers)}),this.initializers[e.name]=e},buildContainer:function(r){var n=new Ember.Container;return Ember.Container.defaultContainer=new e(n),n.set=Ember.set,n.resolver=t(r),n.normalize=n.resolver.normalize,n.describe=n.resolver.describe,n.makeToString=n.resolver.makeToString,n.optionsForType("component",{singleton:!1}),n.optionsForType("view",{singleton:!1}),n.optionsForType("template",{instantiate:!1}),n.optionsForType("helper",{instantiate:!1}),n.register("application:main",r,{instantiate:!1}),n.register("controller:basic",Ember.Controller,{instantiate:!1}),n.register("controller:object",Ember.ObjectController,{instantiate:!1}),n.register("controller:array",Ember.ArrayController,{instantiate:!1}),n.register("route:basic",Ember.Route,{instantiate:!1}),n.register("event_dispatcher:main",Ember.EventDispatcher),n.register("router:main",Ember.Router),n.injection("router:main","namespace","application:main"),n.register("location:hash",Ember.HashLocation),n.register("location:history",Ember.HistoryLocation),n.register("location:none",Ember.NoneLocation),n.injection("controller","target","router:main"),n.injection("controller","namespace","application:main"),n.injection("route","router","router:main"),n}}),Ember.runLoadHooks("Ember.Application",Ember.Application)}(),function(){function e(e,t,r){var n,i,o;for(i=0,o=r.length;o>i;i++)n=r[i],-1===n.indexOf(":")&&(n="controller:"+n),!t.has(n)}var t=Ember.get,r=(Ember.set,Ember.computed(function(){var e=this;return{needs:t(e,"needs"),container:t(e,"container"),unknownProperty:function(t){var r,n,i,o=this.needs;for(n=0,i=o.length;i>n;n++)if(r=o[n],r===t)return this.container.lookup("controller:"+t);var a=Ember.inspect(e)+"#needs does not include `"+t+"`. To access the "+t+" controller from "+Ember.inspect(e)+", "+Ember.inspect(e)+" should have a `needs` property that is an array of the controllers it has access to.";throw new ReferenceError(a)},setUnknownProperty:function(t){throw new Error("You cannot overwrite the value of `controllers."+t+"` of "+Ember.inspect(e))}}}));Ember.ControllerMixin.reopen({concatenatedProperties:["needs"],needs:[],init:function(){var r=t(this,"needs"),n=t(r,"length");n>0&&(this.container&&e(this,this.container,r),t(this,"controllers")),this._super.apply(this,arguments)},controllerFor:function(e){return Ember.controllerFor(t(this,"container"),e)},controllers:r})}(),function(){Ember.DataAdapter=Ember.Object.extend({init:function(){this._super(),this.releaseMethods=Ember.A()},container:null,attributeLimit:3,releaseMethods:Ember.A(),getFilters:function(){return Ember.A()},watchModelTypes:function(e,t){var r,n=this.getModelTypes(),i=this,o=Ember.A();r=n.map(function(e){var r=i.wrapModelType(e);return o.push(i.observeModelType(e,t)),r}),e(r);var a=function(){o.forEach(function(e){e()}),i.releaseMethods.removeObject(a)};return this.releaseMethods.pushObject(a),a},watchRecords:function(e,t,r,n){var i,o=this,a=Ember.A(),s=this.getRecords(e),u=function(e){r([e])},c=s.map(function(e){return a.push(o.observeRecord(e,u)),o.wrapRecord(e)}),l=function(e,r,i,s){for(var c=r;r+s>c;c++){var l=e.objectAt(c),h=o.wrapRecord(l);a.push(o.observeRecord(l,u)),t([h])}i&&n(r,i)},h={didChange:l,willChange:Ember.K};return s.addArrayObserver(o,h),i=function(){a.forEach(function(e){e()}),s.removeArrayObserver(o,h),o.releaseMethods.removeObject(i)},t(c),this.releaseMethods.pushObject(i),i},willDestroy:function(){this._super(),this.releaseMethods.forEach(function(e){e()})},detect:function(){return!1},columnsForType:function(){return Ember.A()},observeModelType:function(e,t){var r=this,n=this.getRecords(e),i=function(){t([r.wrapModelType(e)])},o={didChange:function(){Ember.run.scheduleOnce("actions",this,i)},willChange:Ember.K};n.addArrayObserver(this,o);var a=function(){n.removeArrayObserver(r,o)};return a},wrapModelType:function(e){var t,r=this.getRecords(e);return t={name:e.toString(),count:Ember.get(r,"length"),columns:this.columnsForType(e),object:e}},getModelTypes:function(){var e=Ember.A(Ember.Namespace.NAMESPACES),t=Ember.A(),r=this;return e.forEach(function(e){for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];r.detect(i)&&t.push(i)}}),t},getRecords:function(){return Ember.A()},wrapRecord:function(e){var t={object:e};return t.columnValues=this.getRecordColumnValues(e),t.searchKeywords=this.getRecordKeywords(e),t.filterValues=this.getRecordFilterValues(e),t.color=this.getRecordColor(e),t},getRecordColumnValues:function(){return{}},getRecordKeywords:function(){return Ember.A()},getRecordFilterValues:function(){return{}},getRecordColor:function(){return null},observeRecord:function(){return function(){}}})}()}(),"undefined"==typeof location||"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname||Ember.Logger.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.");
@@ -1,14 +1,13 @@
1
- // ==========================================================================
2
- // Project: Ember - JavaScript Application Framework
3
- // Copyright: Copyright 2011-2013 Tilde Inc. and contributors
4
- // Portions Copyright 2006-2011 Strobe Inc.
5
- // Portions Copyright 2008-2011 Apple Inc. All rights reserved.
6
- // License: Licensed under MIT license
7
- // See https://raw.github.com/emberjs/ember.js/master/LICENSE
8
- // ==========================================================================
9
-
1
+ /*!
2
+ * @overview Ember - JavaScript Application Framework
3
+ * @copyright Copyright 2011-2013 Tilde Inc. and contributors
4
+ * Portions Copyright 2006-2011 Strobe Inc.
5
+ * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
6
+ * @license Licensed under MIT license
7
+ * See https://raw.github.com/emberjs/ember.js/master/LICENSE
8
+ * @version 1.4.0-beta.1+canary.dc0dc0ce
9
+ */
10
10
 
11
- // Version: 1.3.0-beta.3
12
11
 
13
12
  (function() {
14
13
  var define, requireModule, require, requirejs;
@@ -89,7 +88,7 @@ var define, requireModule, require, requirejs;
89
88
 
90
89
  @class Ember
91
90
  @static
92
- @version 1.3.0-beta.3
91
+ @version 1.4.0-beta.1+canary.dc0dc0ce
93
92
  */
94
93
 
95
94
  if ('undefined' === typeof Ember) {
@@ -116,10 +115,10 @@ Ember.toString = function() { return "Ember"; };
116
115
  /**
117
116
  @property VERSION
118
117
  @type String
119
- @default '1.3.0-beta.3'
118
+ @default '1.4.0-beta.1+canary.dc0dc0ce'
120
119
  @final
121
120
  */
122
- Ember.VERSION = '1.3.0-beta.3';
121
+ Ember.VERSION = '1.4.0-beta.1+canary.dc0dc0ce';
123
122
 
124
123
  /**
125
124
  Standard environmental variables. You can define these in a global `ENV`
@@ -1360,6 +1359,41 @@ Ember.typeOf = function(item) {
1360
1359
  return ret;
1361
1360
  };
1362
1361
 
1362
+ /**
1363
+ Convenience method to inspect an object. This method will attempt to
1364
+ convert the object into a useful string description.
1365
+
1366
+ It is a pretty simple implementation. If you want something more robust,
1367
+ use something like JSDump: https://github.com/NV/jsDump
1368
+
1369
+ @method inspect
1370
+ @for Ember
1371
+ @param {Object} obj The object you want to inspect.
1372
+ @return {String} A description of the object
1373
+ */
1374
+ Ember.inspect = function(obj) {
1375
+ var type = Ember.typeOf(obj);
1376
+ if (type === 'array') {
1377
+ return '[' + obj + ']';
1378
+ }
1379
+ if (type !== 'object') {
1380
+ return obj + '';
1381
+ }
1382
+
1383
+ var v, ret = [];
1384
+ for(var key in obj) {
1385
+ if (obj.hasOwnProperty(key)) {
1386
+ v = obj[key];
1387
+ if (v === 'toString') { continue; } // ignore useless items
1388
+ if (Ember.typeOf(v) === 'function') { v = "function() { ... }"; }
1389
+ ret.push(key + ": " + v);
1390
+ }
1391
+ }
1392
+ return "{" + ret.join(", ") + "}";
1393
+ };
1394
+
1395
+
1396
+
1363
1397
  })();
1364
1398
 
1365
1399
 
@@ -1770,7 +1804,7 @@ var normalizeTuple = Ember.normalizeTuple = function(target, path) {
1770
1804
  }
1771
1805
 
1772
1806
  // must return some kind of path to be valid else other things will break.
1773
- if (!path || path.length===0) throw new Ember.Error('Invalid Path');
1807
+ if (!path || path.length===0) throw new Ember.Error('Path cannot be empty');
1774
1808
 
1775
1809
  return [ target, path ];
1776
1810
  };
@@ -3821,6 +3855,52 @@ Ember.finishChains = function(obj) {
3821
3855
 
3822
3856
 
3823
3857
  (function() {
3858
+ if (Ember.FEATURES.isEnabled('propertyBraceExpansion')) {
3859
+ /**
3860
+ @module ember-metal
3861
+ */
3862
+
3863
+ var forEach = Ember.EnumerableUtils.forEach,
3864
+ BRACE_EXPANSION = /^((?:[^\.]*\.)*)\{(.*)\}$/;
3865
+
3866
+ /**
3867
+ Expands `pattern`, invoking `callback` for each expansion.
3868
+
3869
+ The only pattern supported is brace-expansion, anything else will be passed
3870
+ once to `callback` directly. Brace expansion can only appear at the end of a
3871
+ pattern, for example as the last item in a chain.
3872
+
3873
+ Example
3874
+ ```js
3875
+ function echo(arg){ console.log(arg); }
3876
+
3877
+ Ember.expandProperties('foo.bar', echo); //=> 'foo.bar'
3878
+ Ember.expandProperties('{foo,bar}', echo); //=> 'foo', 'bar'
3879
+ Ember.expandProperties('foo.{bar,baz}', echo); //=> 'foo.bar', 'foo.baz'
3880
+ Ember.expandProperties('{foo,bar}.baz', echo); //=> '{foo,bar}.baz'
3881
+ ```
3882
+
3883
+ @method
3884
+ @private
3885
+ @param {string} pattern The property pattern to expand.
3886
+ @param {function} callback The callback to invoke. It is invoked once per
3887
+ expansion, and is passed the expansion.
3888
+ */
3889
+ Ember.expandProperties = function (pattern, callback) {
3890
+ var match, prefix, list;
3891
+
3892
+ if (match = BRACE_EXPANSION.exec(pattern)) {
3893
+ prefix = match[1];
3894
+ list = match[2];
3895
+
3896
+ forEach(list.split(','), function (suffix) {
3897
+ callback(prefix + suffix);
3898
+ });
3899
+ } else {
3900
+ callback(pattern);
3901
+ }
3902
+ };
3903
+ }
3824
3904
 
3825
3905
  })();
3826
3906
 
@@ -4025,6 +4105,9 @@ var get = Ember.get,
4025
4105
  watch = Ember.watch,
4026
4106
  unwatch = Ember.unwatch;
4027
4107
 
4108
+ if (Ember.FEATURES.isEnabled('propertyBraceExpansion')) {
4109
+ var expandProperties = Ember.expandProperties;
4110
+ }
4028
4111
 
4029
4112
  // ..........................................................
4030
4113
  // DEPENDENT KEYS
@@ -4289,9 +4372,18 @@ ComputedPropertyPrototype.readOnly = function(readOnly) {
4289
4372
  ComputedPropertyPrototype.property = function() {
4290
4373
  var args;
4291
4374
 
4292
-
4375
+ if (Ember.FEATURES.isEnabled('propertyBraceExpansion')) {
4376
+ var addArg = function (property) {
4377
+ args.push(property);
4378
+ };
4379
+
4380
+ args = [];
4381
+ for (var i = 0, l = arguments.length; i < l; i++) {
4382
+ expandProperties(arguments[i], addArg);
4383
+ }
4384
+ } else {
4293
4385
  args = a_slice.call(arguments);
4294
-
4386
+ }
4295
4387
 
4296
4388
  this._dependentKeys = args;
4297
4389
  return this;
@@ -4420,7 +4512,7 @@ ComputedPropertyPrototype.set = function(obj, keyName, value) {
4420
4512
  funcArgLength, cachedValue, ret;
4421
4513
 
4422
4514
  if (this._readOnly) {
4423
- throw new Ember.Error('Cannot Set: ' + keyName + ' on: ' + obj.toString() );
4515
+ throw new Ember.Error('Cannot Set: ' + keyName + ' on: ' + Ember.inspect(obj));
4424
4516
  }
4425
4517
 
4426
4518
  this._suspended = obj;
@@ -5097,7 +5189,51 @@ Ember.computed.oneWay = function(dependentKey) {
5097
5189
  });
5098
5190
  };
5099
5191
 
5192
+ if (Ember.FEATURES.isEnabled('computed-read-only')) {
5193
+ /**
5194
+ Where `computed.oneWay` provides oneWay bindings, `computed.readOnly` provides
5195
+ a readOnly one way binding. Very often when using `computed.oneWay` one does
5196
+ not also want changes to propogate back up, as they will replace the value.
5197
+
5198
+ This prevents the reverse flow, and also throws an exception when it occurs.
5199
+
5200
+ Example
5201
+
5202
+ ```javascript
5203
+ User = Ember.Object.extend({
5204
+ firstName: null,
5205
+ lastName: null,
5206
+ nickName: Ember.computed.readOnly('firstName')
5207
+ });
5208
+
5209
+ user = User.create({
5210
+ firstName: 'Teddy',
5211
+ lastName: 'Zeenny'
5212
+ });
5213
+
5214
+ user.get('nickName');
5215
+ # 'Teddy'
5100
5216
 
5217
+ user.set('nickName', 'TeddyBear');
5218
+ # throws Exception
5219
+ # throw new Ember.Error('Cannot Set: nickName on: <User:ember27288>' );`
5220
+
5221
+ user.get('firstName');
5222
+ # 'Teddy'
5223
+ ```
5224
+
5225
+ @method computed.readOnly
5226
+ @for Ember
5227
+ @param {String} dependentKey
5228
+ @return {Ember.ComputedProperty} computed property which creates a
5229
+ one way computed property to the original value for property.
5230
+ */
5231
+ Ember.computed.readOnly = function(dependentKey) {
5232
+ return Ember.computed(dependentKey, function() {
5233
+ return get(this, dependentKey);
5234
+ }).readOnly();
5235
+ };
5236
+ }
5101
5237
  /**
5102
5238
  A computed property that acts like a standard getter and setter,
5103
5239
  but returns the value at the provided `defaultPath` if the
@@ -6175,7 +6311,7 @@ Ember.run.later = function(target, method) {
6175
6311
  If you pass a string it will be resolved on the
6176
6312
  target at the time the method is invoked.
6177
6313
  @param {Object} [args*] Optional arguments to pass to the timeout.
6178
- @return {Object} timer
6314
+ @return {Object} Timer information for use in cancelling, see `Ember.run.cancel`.
6179
6315
  */
6180
6316
  Ember.run.once = function(target, method) {
6181
6317
  checkAutoRun();
@@ -6226,7 +6362,7 @@ Ember.run.once = function(target, method) {
6226
6362
  If you pass a string it will be resolved on the
6227
6363
  target at the time the method is invoked.
6228
6364
  @param {Object} [args*] Optional arguments to pass to the timeout.
6229
- @return {Object} timer
6365
+ @return {Object} Timer information for use in cancelling, see `Ember.run.cancel`.
6230
6366
  */
6231
6367
  Ember.run.scheduleOnce = function(queue, target, method) {
6232
6368
  checkAutoRun();
@@ -6288,7 +6424,7 @@ Ember.run.scheduleOnce = function(queue, target, method) {
6288
6424
  If you pass a string it will be resolved on the
6289
6425
  target at the time the method is invoked.
6290
6426
  @param {Object} [args*] Optional arguments to pass to the timeout.
6291
- @return {Object} timer
6427
+ @return {Object} Timer information for use in cancelling, see `Ember.run.cancel`.
6292
6428
  */
6293
6429
  Ember.run.next = function() {
6294
6430
  var args = slice.call(arguments);
@@ -6298,7 +6434,8 @@ Ember.run.next = function() {
6298
6434
 
6299
6435
  /**
6300
6436
  Cancels a scheduled item. Must be a value returned by `Ember.run.later()`,
6301
- `Ember.run.once()`, or `Ember.run.next()`.
6437
+ `Ember.run.once()`, `Ember.run.next()`, `Ember.run.debounce()`, or
6438
+ `Ember.run.throttle()`.
6302
6439
 
6303
6440
  ```javascript
6304
6441
  var runNext = Ember.run.next(myContext, function() {
@@ -6315,11 +6452,29 @@ Ember.run.next = function() {
6315
6452
  // will not be executed
6316
6453
  });
6317
6454
  Ember.run.cancel(runOnce);
6455
+
6456
+ var throttle = Ember.run.throttle(myContext, function() {
6457
+ // will not be executed
6458
+ }, 1);
6459
+ Ember.run.cancel(throttle);
6460
+
6461
+ var debounce = Ember.run.debounce(myContext, function() {
6462
+ // will not be executed
6463
+ }, 1);
6464
+ Ember.run.cancel(debounce);
6465
+
6466
+ var debounceImmediate = Ember.run.debounce(myContext, function() {
6467
+ // will be executed since we passed in true (immediate)
6468
+ }, 100, true);
6469
+ // the 100ms delay until this method can be called again will be cancelled
6470
+ Ember.run.cancel(debounceImmediate);
6471
+ ```
6472
+ ```
6318
6473
  ```
6319
6474
 
6320
6475
  @method cancel
6321
6476
  @param {Object} timer Timer object to cancel
6322
- @return {void}
6477
+ @return {Boolean} true if cancelled or false/undefined if it wasn't found
6323
6478
  */
6324
6479
  Ember.run.cancel = function(timer) {
6325
6480
  return backburner.cancel(timer);
@@ -6351,6 +6506,34 @@ Ember.run.cancel = function(timer) {
6351
6506
  // console logs 'debounce ran.' one time.
6352
6507
  ```
6353
6508
 
6509
+ Immediate allows you to run the function immediately, but debounce
6510
+ other calls for this function until the wait time has elapsed. If
6511
+ `debounce` is called again before the specified time has elapsed,
6512
+ the timer is reset and the entire period msut pass again before
6513
+ the method can be called again.
6514
+
6515
+ ```javascript
6516
+ var myFunc = function() { console.log(this.name + ' ran.'); };
6517
+ var myContext = {name: 'debounce'};
6518
+
6519
+ Ember.run.debounce(myContext, myFunc, 150, true);
6520
+
6521
+ // console logs 'debounce ran.' one time immediately.
6522
+ // 100ms passes
6523
+
6524
+ Ember.run.debounce(myContext, myFunc, 150, true);
6525
+
6526
+ // 150ms passes and nothing else is logged to the console and
6527
+ // the debouncee is no longer being watched
6528
+
6529
+ Ember.run.debounce(myContext, myFunc, 150, true);
6530
+
6531
+ // console logs 'debounce ran.' one time immediately.
6532
+ // 150ms passes and nothing else is logged tot he console and
6533
+ // the debouncee is no longer being watched
6534
+
6535
+ ```
6536
+
6354
6537
  @method debounce
6355
6538
  @param {Object} [target] target of method to invoke
6356
6539
  @param {Function|String} method The method to invoke.
@@ -6359,7 +6542,7 @@ Ember.run.cancel = function(timer) {
6359
6542
  @param {Object} [args*] Optional arguments to pass to the timeout.
6360
6543
  @param {Number} wait Number of milliseconds to wait.
6361
6544
  @param {Boolean} immediate Trigger the function on the leading instead of the trailing edge of the wait interval.
6362
- @return {void}
6545
+ @return {Array} Timer information for use in cancelling, see `Ember.run.cancel`.
6363
6546
  */
6364
6547
  Ember.run.debounce = function() {
6365
6548
  return backburner.debounce.apply(backburner, arguments);
@@ -6396,7 +6579,7 @@ Ember.run.debounce = function() {
6396
6579
  then it will be looked up on the passed target.
6397
6580
  @param {Object} [args*] Optional arguments to pass to the timeout.
6398
6581
  @param {Number} spacing Number of milliseconds to space out requests.
6399
- @return {void}
6582
+ @return {Array} Timer information for use in cancelling, see `Ember.run.cancel`.
6400
6583
  */
6401
6584
  Ember.run.throttle = function() {
6402
6585
  return backburner.throttle.apply(backburner, arguments);
@@ -6906,6 +7089,9 @@ var Mixin, REQUIRED, Alias,
6906
7089
  defineProperty = Ember.defineProperty,
6907
7090
  guidFor = Ember.guidFor;
6908
7091
 
7092
+ if (Ember.FEATURES.isEnabled('propertyBraceExpansion')) {
7093
+ var expandProperties = Ember.expandProperties;
7094
+ }
6909
7095
 
6910
7096
  function mixinsMeta(obj) {
6911
7097
  var m = Ember.meta(obj, true), ret = m.mixins;
@@ -7479,35 +7665,6 @@ Alias = function(methodName) {
7479
7665
  };
7480
7666
  Alias.prototype = new Ember.Descriptor();
7481
7667
 
7482
- /**
7483
- Makes a property or method available via an additional name.
7484
-
7485
- ```javascript
7486
- App.PaintSample = Ember.Object.extend({
7487
- color: 'red',
7488
- colour: Ember.alias('color'),
7489
- name: function() {
7490
- return "Zed";
7491
- },
7492
- moniker: Ember.alias("name")
7493
- });
7494
-
7495
- var paintSample = App.PaintSample.create()
7496
- paintSample.get('colour'); // 'red'
7497
- paintSample.moniker(); // 'Zed'
7498
- ```
7499
-
7500
- @method alias
7501
- @for Ember
7502
- @param {String} methodName name of the method or property to alias
7503
- @return {Ember.Descriptor}
7504
- @deprecated Use `Ember.aliasMethod` or `Ember.computed.alias` instead
7505
- */
7506
- Ember.alias = function(methodName) {
7507
-
7508
- return new Alias(methodName);
7509
- };
7510
-
7511
7668
  /**
7512
7669
  Makes a method available via an additional name.
7513
7670
 
@@ -7562,7 +7719,23 @@ Ember.observer = function() {
7562
7719
  var func = a_slice.call(arguments, -1)[0];
7563
7720
  var paths;
7564
7721
 
7565
-
7722
+ if (Ember.FEATURES.isEnabled('propertyBraceExpansion')) {
7723
+ var addWatchedProperty = function (path) { paths.push(path); };
7724
+ var _paths = a_slice.call(arguments, 0, -1);
7725
+
7726
+ if (typeof func !== "function") {
7727
+ // revert to old, soft-deprecated argument ordering
7728
+
7729
+ func = arguments[0];
7730
+ _paths = a_slice.call(arguments, 1);
7731
+ }
7732
+
7733
+ paths = [];
7734
+
7735
+ for (var i=0; i<_paths.length; ++i) {
7736
+ expandProperties(_paths[i], addWatchedProperty);
7737
+ }
7738
+ } else {
7566
7739
  paths = a_slice.call(arguments, 0, -1);
7567
7740
 
7568
7741
  if (typeof func !== "function") {
@@ -7571,7 +7744,7 @@ Ember.observer = function() {
7571
7744
  func = arguments[0];
7572
7745
  paths = a_slice.call(arguments, 1);
7573
7746
  }
7574
-
7747
+ }
7575
7748
 
7576
7749
  if (typeof func !== "function") {
7577
7750
  throw new Ember.Error("Ember.observer called without a function");
@@ -7660,7 +7833,24 @@ Ember.beforeObserver = function() {
7660
7833
  var func = a_slice.call(arguments, -1)[0];
7661
7834
  var paths;
7662
7835
 
7663
-
7836
+ if (Ember.FEATURES.isEnabled('propertyBraceExpansion')) {
7837
+ var addWatchedProperty = function(path) { paths.push(path); };
7838
+
7839
+ var _paths = a_slice.call(arguments, 0, -1);
7840
+
7841
+ if (typeof func !== "function") {
7842
+ // revert to old, soft-deprecated argument ordering
7843
+
7844
+ func = arguments[0];
7845
+ _paths = a_slice.call(arguments, 1);
7846
+ }
7847
+
7848
+ paths = [];
7849
+
7850
+ for (var i=0; i<_paths.length; ++i) {
7851
+ expandProperties(_paths[i], addWatchedProperty);
7852
+ }
7853
+ } else {
7664
7854
  paths = a_slice.call(arguments, 0, -1);
7665
7855
 
7666
7856
  if (typeof func !== "function") {
@@ -7669,7 +7859,7 @@ Ember.beforeObserver = function() {
7669
7859
  func = arguments[0];
7670
7860
  paths = a_slice.call(arguments, 1);
7671
7861
  }
7672
-
7862
+ }
7673
7863
 
7674
7864
  if (typeof func !== "function") {
7675
7865
  throw new Ember.Error("Ember.beforeObserver called without a function");
@@ -7747,7 +7937,7 @@ Ember Metal
7747
7937
  @class RSVP
7748
7938
  @module RSVP
7749
7939
  */
7750
- define("rsvp/all",
7940
+ define("rsvp/all",
7751
7941
  ["./promise","./utils","exports"],
7752
7942
  function(__dependency1__, __dependency2__, __exports__) {
7753
7943
  "use strict";
@@ -7843,7 +8033,7 @@ define("rsvp/all",
7843
8033
  __exports__.all = all;
7844
8034
  });
7845
8035
 
7846
- define("rsvp/cast",
8036
+ define("rsvp/cast",
7847
8037
  ["exports"],
7848
8038
  function(__exports__) {
7849
8039
  "use strict";
@@ -7914,7 +8104,7 @@ define("rsvp/cast",
7914
8104
 
7915
8105
  __exports__.cast = cast;
7916
8106
  });
7917
- define("rsvp/config",
8107
+ define("rsvp/config",
7918
8108
  ["./events","exports"],
7919
8109
  function(__dependency1__, __exports__) {
7920
8110
  "use strict";
@@ -7945,7 +8135,7 @@ define("rsvp/config",
7945
8135
  __exports__.config = config;
7946
8136
  __exports__.configure = configure;
7947
8137
  });
7948
- define("rsvp/defer",
8138
+ define("rsvp/defer",
7949
8139
  ["./promise","exports"],
7950
8140
  function(__dependency1__, __exports__) {
7951
8141
  "use strict";
@@ -8000,7 +8190,7 @@ define("rsvp/defer",
8000
8190
 
8001
8191
  __exports__.defer = defer;
8002
8192
  });
8003
- define("rsvp/events",
8193
+ define("rsvp/events",
8004
8194
  ["exports"],
8005
8195
  function(__exports__) {
8006
8196
  "use strict";
@@ -8209,7 +8399,7 @@ define("rsvp/events",
8209
8399
 
8210
8400
  __exports__.EventTarget = EventTarget;
8211
8401
  });
8212
- define("rsvp/hash",
8402
+ define("rsvp/hash",
8213
8403
  ["./promise","./utils","exports"],
8214
8404
  function(__dependency1__, __dependency2__, __exports__) {
8215
8405
  "use strict";
@@ -8354,7 +8544,7 @@ define("rsvp/hash",
8354
8544
 
8355
8545
  __exports__.hash = hash;
8356
8546
  });
8357
- define("rsvp/instrument",
8547
+ define("rsvp/instrument",
8358
8548
  ["./config","./utils","exports"],
8359
8549
  function(__dependency1__, __dependency2__, __exports__) {
8360
8550
  "use strict";
@@ -8381,7 +8571,7 @@ define("rsvp/instrument",
8381
8571
 
8382
8572
  __exports__.instrument = instrument;
8383
8573
  });
8384
- define("rsvp/node",
8574
+ define("rsvp/node",
8385
8575
  ["./promise","./all","exports"],
8386
8576
  function(__dependency1__, __dependency2__, __exports__) {
8387
8577
  "use strict";
@@ -8496,7 +8686,7 @@ define("rsvp/node",
8496
8686
 
8497
8687
  __exports__.denodeify = denodeify;
8498
8688
  });
8499
- define("rsvp/promise",
8689
+ define("rsvp/promise",
8500
8690
  ["./config","./events","./cast","./instrument","./utils","exports"],
8501
8691
  function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __exports__) {
8502
8692
  "use strict";
@@ -8745,7 +8935,7 @@ define("rsvp/promise",
8745
8935
 
8746
8936
  __exports__.Promise = Promise;
8747
8937
  });
8748
- define("rsvp/race",
8938
+ define("rsvp/race",
8749
8939
  ["./promise","./utils","exports"],
8750
8940
  function(__dependency1__, __dependency2__, __exports__) {
8751
8941
  "use strict";
@@ -8837,7 +9027,7 @@ define("rsvp/race",
8837
9027
 
8838
9028
  __exports__.race = race;
8839
9029
  });
8840
- define("rsvp/reject",
9030
+ define("rsvp/reject",
8841
9031
  ["./promise","exports"],
8842
9032
  function(__dependency1__, __exports__) {
8843
9033
  "use strict";
@@ -8887,7 +9077,7 @@ define("rsvp/reject",
8887
9077
 
8888
9078
  __exports__.reject = reject;
8889
9079
  });
8890
- define("rsvp/resolve",
9080
+ define("rsvp/resolve",
8891
9081
  ["./promise","exports"],
8892
9082
  function(__dependency1__, __exports__) {
8893
9083
  "use strict";
@@ -8933,7 +9123,7 @@ define("rsvp/resolve",
8933
9123
 
8934
9124
  __exports__.resolve = resolve;
8935
9125
  });
8936
- define("rsvp/rethrow",
9126
+ define("rsvp/rethrow",
8937
9127
  ["exports"],
8938
9128
  function(__exports__) {
8939
9129
  "use strict";
@@ -8986,7 +9176,7 @@ define("rsvp/rethrow",
8986
9176
 
8987
9177
  __exports__.rethrow = rethrow;
8988
9178
  });
8989
- define("rsvp/utils",
9179
+ define("rsvp/utils",
8990
9180
  ["exports"],
8991
9181
  function(__exports__) {
8992
9182
  "use strict";
@@ -9012,7 +9202,7 @@ define("rsvp/utils",
9012
9202
  __exports__.isArray = isArray;
9013
9203
  __exports__.now = now;
9014
9204
  });
9015
- define("rsvp",
9205
+ define("rsvp",
9016
9206
  ["./rsvp/events","./rsvp/promise","./rsvp/node","./rsvp/all","./rsvp/race","./rsvp/hash","./rsvp/rethrow","./rsvp/defer","./rsvp/config","./rsvp/resolve","./rsvp/reject", "exports"],
9017
9207
  function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __dependency11__, __exports__) {
9018
9208
  "use strict";
@@ -9056,6 +9246,7 @@ define("rsvp",
9056
9246
  __exports__.reject = reject;
9057
9247
  __exports__.async = async;
9058
9248
  });
9249
+
9059
9250
  })();
9060
9251
 
9061
9252
  (function() {
@@ -9076,6 +9267,7 @@ Ember.MODEL_FACTORY_INJECTIONS = false || !!Ember.ENV.MODEL_FACTORY_INJECTIONS;
9076
9267
  define("container",
9077
9268
  [],
9078
9269
  function() {
9270
+ "use strict";
9079
9271
 
9080
9272
  // A safe and simple inheriting object.
9081
9273
  function InheritingDict(parent) {
@@ -9197,7 +9389,8 @@ define("container",
9197
9389
 
9198
9390
  this.registry = new InheritingDict(parent && parent.registry);
9199
9391
  this.cache = new InheritingDict(parent && parent.cache);
9200
- this.factoryCache = new InheritingDict(parent && parent.cache);
9392
+ this.factoryCache = new InheritingDict(parent && parent.factoryCache);
9393
+ this.resolveCache = new InheritingDict(parent && parent.resolveCache);
9201
9394
  this.typeInjections = new InheritingDict(parent && parent.typeInjections);
9202
9395
  this.injections = {};
9203
9396
 
@@ -9318,9 +9511,7 @@ define("container",
9318
9511
  @param {Object} options
9319
9512
  */
9320
9513
  register: function(fullName, factory, options) {
9321
- if (fullName.indexOf(':') === -1) {
9322
- throw new TypeError("malformed fullName, expected: `type:name` got: " + fullName + "");
9323
- }
9514
+ validateFullName(fullName);
9324
9515
 
9325
9516
  if (factory === undefined) {
9326
9517
  throw new TypeError('Attempting to register an unknown factory: `' + fullName + '`');
@@ -9353,11 +9544,14 @@ define("container",
9353
9544
  @param {String} fullName
9354
9545
  */
9355
9546
  unregister: function(fullName) {
9547
+ validateFullName(fullName);
9548
+
9356
9549
  var normalizedName = this.normalize(fullName);
9357
9550
 
9358
9551
  this.registry.remove(normalizedName);
9359
9552
  this.cache.remove(normalizedName);
9360
9553
  this.factoryCache.remove(normalizedName);
9554
+ this.resolveCache.remove(normalizedName);
9361
9555
  this._options.remove(normalizedName);
9362
9556
  },
9363
9557
 
@@ -9394,7 +9588,18 @@ define("container",
9394
9588
  @return {Function} fullName's factory
9395
9589
  */
9396
9590
  resolve: function(fullName) {
9397
- return this.resolver(fullName) || this.registry.get(fullName);
9591
+ validateFullName(fullName);
9592
+
9593
+ var normalizedName = this.normalize(fullName);
9594
+ var cached = this.resolveCache.get(normalizedName);
9595
+
9596
+ if (cached) { return cached; }
9597
+
9598
+ var resolved = this.resolver(normalizedName) || this.registry.get(normalizedName);
9599
+
9600
+ this.resolveCache.set(normalizedName, resolved);
9601
+
9602
+ return resolved;
9398
9603
  },
9399
9604
 
9400
9605
  /**
@@ -9475,23 +9680,8 @@ define("container",
9475
9680
  @return {any}
9476
9681
  */
9477
9682
  lookup: function(fullName, options) {
9478
- fullName = this.normalize(fullName);
9479
-
9480
- options = options || {};
9481
-
9482
- if (this.cache.has(fullName) && options.singleton !== false) {
9483
- return this.cache.get(fullName);
9484
- }
9485
-
9486
- var value = instantiate(this, fullName);
9487
-
9488
- if (value === undefined) { return; }
9489
-
9490
- if (isSingleton(this, fullName) && options.singleton !== false) {
9491
- this.cache.set(fullName, value);
9492
- }
9493
-
9494
- return value;
9683
+ validateFullName(fullName);
9684
+ return lookup(this, this.normalize(fullName), options);
9495
9685
  },
9496
9686
 
9497
9687
  /**
@@ -9502,7 +9692,8 @@ define("container",
9502
9692
  @return {any}
9503
9693
  */
9504
9694
  lookupFactory: function(fullName) {
9505
- return factoryFor(this, fullName);
9695
+ validateFullName(fullName);
9696
+ return factoryFor(this, this.normalize(fullName));
9506
9697
  },
9507
9698
 
9508
9699
  /**
@@ -9514,11 +9705,8 @@ define("container",
9514
9705
  @return {Boolean}
9515
9706
  */
9516
9707
  has: function(fullName) {
9517
- if (this.cache.has(fullName)) {
9518
- return true;
9519
- }
9520
-
9521
- return !!this.resolve(fullName);
9708
+ validateFullName(fullName);
9709
+ return has(this, this.normalize(fullName));
9522
9710
  },
9523
9711
 
9524
9712
  /**
@@ -9600,6 +9788,7 @@ define("container",
9600
9788
  @param {String} fullName
9601
9789
  */
9602
9790
  typeInjection: function(type, property, fullName) {
9791
+ validateFullName(fullName);
9603
9792
  if (this.parent) { illegalChildOperation('typeInjection'); }
9604
9793
 
9605
9794
  addTypeInjection(this.typeInjections, type, property, fullName);
@@ -9649,14 +9838,20 @@ define("container",
9649
9838
  @param {String} property
9650
9839
  @param {String} injectionName
9651
9840
  */
9652
- injection: function(factoryName, property, injectionName) {
9841
+ injection: function(fullName, property, injectionName) {
9653
9842
  if (this.parent) { illegalChildOperation('injection'); }
9654
9843
 
9655
- if (factoryName.indexOf(':') === -1) {
9656
- return this.typeInjection(factoryName, property, injectionName);
9844
+ validateFullName(injectionName);
9845
+ var normalizedInjectionName = this.normalize(injectionName);
9846
+
9847
+ if (fullName.indexOf(':') === -1) {
9848
+ return this.typeInjection(fullName, property, normalizedInjectionName);
9657
9849
  }
9658
9850
 
9659
- addInjection(this.injections, factoryName, property, injectionName);
9851
+ validateFullName(fullName);
9852
+ var normalizedName = this.normalize(fullName);
9853
+
9854
+ addInjection(this.injections, normalizedName, property, normalizedInjectionName);
9660
9855
  },
9661
9856
 
9662
9857
 
@@ -9693,7 +9888,7 @@ define("container",
9693
9888
  factoryTypeInjection: function(type, property, fullName) {
9694
9889
  if (this.parent) { illegalChildOperation('factoryTypeInjection'); }
9695
9890
 
9696
- addTypeInjection(this.factoryTypeInjections, type, property, fullName);
9891
+ addTypeInjection(this.factoryTypeInjections, type, property, this.normalize(fullName));
9697
9892
  },
9698
9893
 
9699
9894
  /**
@@ -9745,14 +9940,21 @@ define("container",
9745
9940
  @param {String} property
9746
9941
  @param {String} injectionName
9747
9942
  */
9748
- factoryInjection: function(factoryName, property, injectionName) {
9943
+ factoryInjection: function(fullName, property, injectionName) {
9749
9944
  if (this.parent) { illegalChildOperation('injection'); }
9750
9945
 
9751
- if (factoryName.indexOf(':') === -1) {
9752
- return this.factoryTypeInjection(factoryName, property, injectionName);
9946
+ var normalizedName = this.normalize(fullName);
9947
+ var normalizedInjectionName = this.normalize(injectionName);
9948
+
9949
+ validateFullName(injectionName);
9950
+
9951
+ if (fullName.indexOf(':') === -1) {
9952
+ return this.factoryTypeInjection(normalizedName, property, normalizedInjectionName);
9753
9953
  }
9754
9954
 
9755
- addInjection(this.factoryInjections, factoryName, property, injectionName);
9955
+ validateFullName(fullName);
9956
+
9957
+ addInjection(this.factoryInjections, normalizedName, property, normalizedInjectionName);
9756
9958
  },
9757
9959
 
9758
9960
  /**
@@ -9762,7 +9964,6 @@ define("container",
9762
9964
  @method destroy
9763
9965
  */
9764
9966
  destroy: function() {
9765
-
9766
9967
  for (var i=0, l=this.children.length; i<l; i++) {
9767
9968
  this.children[i].destroy();
9768
9969
  }
@@ -9788,6 +9989,32 @@ define("container",
9788
9989
  }
9789
9990
  };
9790
9991
 
9992
+ function has(container, fullName){
9993
+ if (container.cache.has(fullName)) {
9994
+ return true;
9995
+ }
9996
+
9997
+ return !!container.resolve(fullName);
9998
+ }
9999
+
10000
+ function lookup(container, fullName, options) {
10001
+ options = options || {};
10002
+
10003
+ if (container.cache.has(fullName) && options.singleton !== false) {
10004
+ return container.cache.get(fullName);
10005
+ }
10006
+
10007
+ var value = instantiate(container, fullName);
10008
+
10009
+ if (value === undefined) { return; }
10010
+
10011
+ if (isSingleton(container, fullName) && options.singleton !== false) {
10012
+ container.cache.set(fullName, value);
10013
+ }
10014
+
10015
+ return value;
10016
+ }
10017
+
9791
10018
  function illegalChildOperation(operation) {
9792
10019
  throw new Error(operation + " is not currently supported on child containers");
9793
10020
  }
@@ -9803,14 +10030,14 @@ define("container",
9803
10030
 
9804
10031
  if (!injections) { return hash; }
9805
10032
 
9806
- var injection, lookup;
10033
+ var injection, injectable;
9807
10034
 
9808
10035
  for (var i=0, l=injections.length; i<l; i++) {
9809
10036
  injection = injections[i];
9810
- lookup = container.lookup(injection.fullName);
10037
+ injectable = lookup(container, injection.fullName);
9811
10038
 
9812
- if (lookup !== undefined) {
9813
- hash[injection.property] = lookup;
10039
+ if (injectable !== undefined) {
10040
+ hash[injection.property] = injectable;
9814
10041
  } else {
9815
10042
  throw new Error('Attempting to inject an unknown injection: `' + injection.fullName + '`');
9816
10043
  }
@@ -9835,7 +10062,7 @@ define("container",
9835
10062
  }
9836
10063
 
9837
10064
  function factoryFor(container, fullName) {
9838
- var name = container.normalize(fullName);
10065
+ var name = fullName;
9839
10066
  var factory = container.resolve(name);
9840
10067
  var injectedFactory;
9841
10068
  var cache = container.factoryCache;
@@ -9945,6 +10172,13 @@ define("container",
9945
10172
  });
9946
10173
  }
9947
10174
 
10175
+ var VALID_FULL_NAME_REGEXP = /^[^:]+.+:[^:]+$/;
10176
+ function validateFullName(fullName) {
10177
+ if (!VALID_FULL_NAME_REGEXP.test(fullName)) {
10178
+ throw new TypeError('Invalid Fullname, expected: `type:name` got: ' + fullName);
10179
+ }
10180
+ }
10181
+
9948
10182
  function addInjection(rules, factoryName, property, injectionName) {
9949
10183
  var injections = rules[factoryName] = rules[factoryName] || [];
9950
10184
  injections.push({ property: property, fullName: injectionName });
@@ -10138,39 +10372,6 @@ Ember.copy = function(obj, deep) {
10138
10372
  return _copy(obj, deep, deep ? [] : null, deep ? [] : null);
10139
10373
  };
10140
10374
 
10141
- /**
10142
- Convenience method to inspect an object. This method will attempt to
10143
- convert the object into a useful string description.
10144
-
10145
- It is a pretty simple implementation. If you want something more robust,
10146
- use something like JSDump: https://github.com/NV/jsDump
10147
-
10148
- @method inspect
10149
- @for Ember
10150
- @param {Object} obj The object you want to inspect.
10151
- @return {String} A description of the object
10152
- */
10153
- Ember.inspect = function(obj) {
10154
- var type = Ember.typeOf(obj);
10155
- if (type === 'array') {
10156
- return '[' + obj + ']';
10157
- }
10158
- if (type !== 'object') {
10159
- return obj + '';
10160
- }
10161
-
10162
- var v, ret = [];
10163
- for(var key in obj) {
10164
- if (obj.hasOwnProperty(key)) {
10165
- v = obj[key];
10166
- if (v === 'toString') { continue; } // ignore useless items
10167
- if (Ember.typeOf(v) === 'function') { v = "function() { ... }"; }
10168
- ret.push(key + ": " + v);
10169
- }
10170
- }
10171
- return "{" + ret.join(", ") + "}";
10172
- };
10173
-
10174
10375
  /**
10175
10376
  Compares two objects, returning true if they are logically equal. This is
10176
10377
  a deeper comparison than a simple triple equal. For sets it will compare the
@@ -10275,6 +10476,10 @@ var STRING_DECAMELIZE_REGEXP = (/([a-z\d])([A-Z])/g);
10275
10476
  var STRING_CAMELIZE_REGEXP = (/(\-|_|\.|\s)+(.)?/g);
10276
10477
  var STRING_UNDERSCORE_REGEXP_1 = (/([a-z\d])([A-Z]+)/g);
10277
10478
  var STRING_UNDERSCORE_REGEXP_2 = (/\-|\s+/g);
10479
+ var STRING_PARAMETERIZE_REGEXP_1 = (/[_|\/|\s]+/g);
10480
+ var STRING_PARAMETERIZE_REGEXP_2 = (/[^a-z0-9\-]+/gi);
10481
+ var STRING_PARAMETERIZE_REGEXP_3 = (/[\-]+/g);
10482
+ var STRING_PARAMETERIZE_REGEXP_4 = (/^-+|-+$/g);
10278
10483
 
10279
10484
  /**
10280
10485
  Defines the hash of localized strings for the current language. Used by
@@ -10513,6 +10718,54 @@ Ember.String = {
10513
10718
  }
10514
10719
  };
10515
10720
 
10721
+ if (Ember.FEATURES.isEnabled("string-humanize")) {
10722
+ /**
10723
+ Returns the Humanized form of a string
10724
+
10725
+ Replaces underscores with spaces, and capitializes first character
10726
+ of string. Also strips "_id" suffixes.
10727
+
10728
+ ```javascript
10729
+ 'first_name'.humanize() // 'First name'
10730
+ 'user_id'.humanize() // 'User'
10731
+ ```
10732
+
10733
+ @method humanize
10734
+ @param {String} str The string to humanize.
10735
+ @return {String} The humanized string.
10736
+ */
10737
+
10738
+ Ember.String.humanize = function(str) {
10739
+ return str.replace(/_id$/, '').
10740
+ replace(/_/g, ' ').
10741
+ replace(/^\w/g, function(s){
10742
+ return s.toUpperCase();
10743
+ });
10744
+ };
10745
+ }
10746
+
10747
+ if (Ember.FEATURES.isEnabled("string-parameterize")) {
10748
+ /**
10749
+ Transforms a string so that it may be used as part of a 'pretty' / SEO friendly URL.
10750
+
10751
+ ```javascript
10752
+ 'My favorite items.'.parameterize(); // 'my-favorite-items'
10753
+ 'action_name'.parameterize(); // 'action-name'
10754
+ '100 ways Ember.js is better than Angular.'.parameterize(); // '100-ways-emberjs-is-better-than-angular'
10755
+ ```
10756
+
10757
+ @method parameterize
10758
+ @param {String} str The string to parameterize.
10759
+ @return {String} the parameterized string.
10760
+ */
10761
+ Ember.String.parameterize = function(str) {
10762
+ return str.replace(STRING_PARAMETERIZE_REGEXP_1, '-') // replace underscores, slashes and spaces with separator
10763
+ .replace(STRING_PARAMETERIZE_REGEXP_2, '') // remove non-alphanumeric characters except the separator
10764
+ .replace(STRING_PARAMETERIZE_REGEXP_3, '-') // replace multiple occurring separators
10765
+ .replace(STRING_PARAMETERIZE_REGEXP_4, '') // trim leading and trailing separators
10766
+ .toLowerCase();
10767
+ };
10768
+ }
10516
10769
 
10517
10770
 
10518
10771
  })();
@@ -10537,6 +10790,13 @@ var fmt = Ember.String.fmt,
10537
10790
  capitalize = Ember.String.capitalize,
10538
10791
  classify = Ember.String.classify;
10539
10792
 
10793
+ if (Ember.FEATURES.isEnabled("string-humanize")) {
10794
+ var humanize = Ember.String.humanize;
10795
+ }
10796
+
10797
+ if (Ember.FEATURES.isEnabled("string-parameterize")) {
10798
+ var parameterize = Ember.String.parameterize;
10799
+ }
10540
10800
 
10541
10801
  if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.String) {
10542
10802
 
@@ -10630,7 +10890,30 @@ if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.String) {
10630
10890
  return capitalize(this);
10631
10891
  };
10632
10892
 
10633
-
10893
+ if (Ember.FEATURES.isEnabled("string-humanize")) {
10894
+ /**
10895
+ See [Ember.String.humanize](/api/classes/Ember.String.html#method_humanize).
10896
+
10897
+ @method humanize
10898
+ @for String
10899
+ */
10900
+ String.prototype.humanize = function() {
10901
+ return humanize(this);
10902
+ };
10903
+ }
10904
+
10905
+ if (Ember.FEATURES.isEnabled("string-parameterize")) {
10906
+ /**
10907
+ See [Ember.String.parameterize](/api/classes/Ember.String.html#method_parameterize).
10908
+
10909
+ @method parameterize
10910
+ @for String
10911
+ */
10912
+ String.prototype.parameterize = function() {
10913
+ return parameterize(this);
10914
+ };
10915
+ }
10916
+
10634
10917
  }
10635
10918
 
10636
10919
 
@@ -13000,7 +13283,7 @@ Ember.Enumerable = Ember.Mixin.create({
13000
13283
  var ret = initialValue;
13001
13284
 
13002
13285
  this.forEach(function(item, i) {
13003
- ret = callback.call(null, ret, item, i, this, reducerProperty);
13286
+ ret = callback(ret, item, i, this, reducerProperty);
13004
13287
  }, this);
13005
13288
 
13006
13289
  return ret;
@@ -13023,7 +13306,7 @@ Ember.Enumerable = Ember.Mixin.create({
13023
13306
  this.forEach(function(x, idx) {
13024
13307
  var method = x && x[methodName];
13025
13308
  if ('function' === typeof method) {
13026
- ret[idx] = args ? method.apply(x, args) : method.call(x);
13309
+ ret[idx] = args ? method.apply(x, args) : x[methodName]();
13027
13310
  }
13028
13311
  }, this);
13029
13312
 
@@ -13218,8 +13501,6 @@ Ember.Enumerable = Ember.Mixin.create({
13218
13501
  notify range observers.
13219
13502
 
13220
13503
  @method enumerableContentDidChange
13221
- @param {Number} [start] optional start offset for the content change.
13222
- For unordered enumerables, you should always pass -1.
13223
13504
  @param {Ember.Enumerable|Number} removing An enumerable of the objects to
13224
13505
  be removed or the number of items to be removed.
13225
13506
  @param {Ember.Enumerable|Number} adding An enumerable of the objects to
@@ -13429,7 +13710,7 @@ Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.protot
13429
13710
 
13430
13711
  @method slice
13431
13712
  @param {Integer} beginIndex (Optional) index to begin slicing from.
13432
- @param {Integer} endIndex (Optional) index to end the slice at.
13713
+ @param {Integer} endIndex (Optional) index to end the slice at (but not included).
13433
13714
  @return {Array} New array with specified slice
13434
13715
  */
13435
13716
  slice: function(beginIndex, endIndex) {
@@ -13580,7 +13861,7 @@ Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.protot
13580
13861
  Becomes true whenever the array currently has observers watching changes
13581
13862
  on the array.
13582
13863
 
13583
- @property Boolean
13864
+ @property {Boolean} hasArrayObservers
13584
13865
  */
13585
13866
  hasArrayObservers: Ember.computed(function() {
13586
13867
  return Ember.hasListeners(this, '@array:change') || Ember.hasListeners(this, '@array:before');
@@ -13729,6 +14010,9 @@ var e_get = Ember.get,
13729
14010
  doubleEachPropertyPattern = /(.*\.@each){2,}/,
13730
14011
  arrayBracketPattern = /\.\[\]$/;
13731
14012
 
14013
+ if (Ember.FEATURES.isEnabled('propertyBraceExpansion')) {
14014
+ var expandProperties = Ember.expandProperties;
14015
+ }
13732
14016
 
13733
14017
  function get(obj, key) {
13734
14018
  if (key === '@this') {
@@ -14314,10 +14598,17 @@ ReduceComputedProperty.prototype.property = function () {
14314
14598
  } else if (match = eachPropertyPattern.exec(dependentKey)) {
14315
14599
  dependentArrayKey = match[1];
14316
14600
 
14317
-
14601
+ if (Ember.FEATURES.isEnabled('propertyBraceExpansion')) {
14602
+ var itemPropertyKeyPattern = match[2],
14603
+ addItemPropertyKey = function (itemPropertyKey) {
14604
+ cp.itemPropertyKey(dependentArrayKey, itemPropertyKey);
14605
+ };
14606
+
14607
+ expandProperties(itemPropertyKeyPattern, addItemPropertyKey);
14608
+ } else {
14318
14609
  itemPropertyKey = match[2];
14319
14610
  cp.itemPropertyKey(dependentArrayKey, itemPropertyKey);
14320
-
14611
+ }
14321
14612
  propertyArgs.add(dependentArrayKey);
14322
14613
  } else {
14323
14614
  propertyArgs.add(dependentKey);
@@ -14428,7 +14719,7 @@ ReduceComputedProperty.prototype.property = function () {
14428
14719
 
14429
14720
  ```javascript
14430
14721
  Ember.computed.max = function (dependentKey) {
14431
- return Ember.reduceComputed.call(null, dependentKey, {
14722
+ return Ember.reduceComputed(dependentKey, {
14432
14723
  initialValue: -Infinity,
14433
14724
 
14434
14725
  addedItem: function (accumulatedValue, item, changeMeta, instanceMeta) {
@@ -14737,8 +15028,6 @@ var get = Ember.get,
14737
15028
  dependent array. This will return `-Infinity` when the dependent
14738
15029
  array is empty.
14739
15030
 
14740
- Example
14741
-
14742
15031
  ```javascript
14743
15032
  App.Person = Ember.Object.extend({
14744
15033
  childAges: Ember.computed.mapBy('children', 'age'),
@@ -14747,9 +15036,17 @@ var get = Ember.get,
14747
15036
 
14748
15037
  var lordByron = App.Person.create({children: []});
14749
15038
  lordByron.get('maxChildAge'); // -Infinity
14750
- lordByron.get('children').pushObject({name: 'Augusta Ada Byron', age: 7});
15039
+ lordByron.get('children').pushObject({
15040
+ name: 'Augusta Ada Byron', age: 7
15041
+ });
14751
15042
  lordByron.get('maxChildAge'); // 7
14752
- lordByron.get('children').pushObjects([{name: 'Allegra Byron', age: 5}, {name: 'Elizabeth Medora Leigh', age: 8}]);
15043
+ lordByron.get('children').pushObjects([{
15044
+ name: 'Allegra Byron',
15045
+ age: 5
15046
+ }, {
15047
+ name: 'Elizabeth Medora Leigh',
15048
+ age: 8
15049
+ }]);
14753
15050
  lordByron.get('maxChildAge'); // 8
14754
15051
  ```
14755
15052
 
@@ -14759,7 +15056,7 @@ var get = Ember.get,
14759
15056
  @return {Ember.ComputedProperty} computes the largest value in the dependentKey's array
14760
15057
  */
14761
15058
  Ember.computed.max = function (dependentKey) {
14762
- return Ember.reduceComputed.call(null, dependentKey, {
15059
+ return Ember.reduceComputed(dependentKey, {
14763
15060
  initialValue: -Infinity,
14764
15061
 
14765
15062
  addedItem: function (accumulatedValue, item, changeMeta, instanceMeta) {
@@ -14779,8 +15076,6 @@ Ember.computed.max = function (dependentKey) {
14779
15076
  dependent array. This will return `Infinity` when the dependent
14780
15077
  array is empty.
14781
15078
 
14782
- Example
14783
-
14784
15079
  ```javascript
14785
15080
  App.Person = Ember.Object.extend({
14786
15081
  childAges: Ember.computed.mapBy('children', 'age'),
@@ -14789,9 +15084,17 @@ Ember.computed.max = function (dependentKey) {
14789
15084
 
14790
15085
  var lordByron = App.Person.create({children: []});
14791
15086
  lordByron.get('minChildAge'); // Infinity
14792
- lordByron.get('children').pushObject({name: 'Augusta Ada Byron', age: 7});
15087
+ lordByron.get('children').pushObject({
15088
+ name: 'Augusta Ada Byron', age: 7
15089
+ });
14793
15090
  lordByron.get('minChildAge'); // 7
14794
- lordByron.get('children').pushObjects([{name: 'Allegra Byron', age: 5}, {name: 'Elizabeth Medora Leigh', age: 8}]);
15091
+ lordByron.get('children').pushObjects([{
15092
+ name: 'Allegra Byron',
15093
+ age: 5
15094
+ }, {
15095
+ name: 'Elizabeth Medora Leigh',
15096
+ age: 8
15097
+ }]);
14795
15098
  lordByron.get('minChildAge'); // 5
14796
15099
  ```
14797
15100
 
@@ -14801,7 +15104,7 @@ Ember.computed.max = function (dependentKey) {
14801
15104
  @return {Ember.ComputedProperty} computes the smallest value in the dependentKey's array
14802
15105
  */
14803
15106
  Ember.computed.min = function (dependentKey) {
14804
- return Ember.reduceComputed.call(null, dependentKey, {
15107
+ return Ember.reduceComputed(dependentKey, {
14805
15108
  initialValue: Infinity,
14806
15109
 
14807
15110
  addedItem: function (accumulatedValue, item, changeMeta, instanceMeta) {
@@ -14819,14 +15122,13 @@ Ember.computed.min = function (dependentKey) {
14819
15122
  /**
14820
15123
  Returns an array mapped via the callback
14821
15124
 
14822
- The callback method you provide should have the following signature:
15125
+ The callback method you provide should have the following signature.
15126
+ `item` is the current item in the iteration.
14823
15127
 
14824
15128
  ```javascript
14825
15129
  function(item);
14826
15130
  ```
14827
15131
 
14828
- - `item` is the current item in the iteration.
14829
-
14830
15132
  Example
14831
15133
 
14832
15134
  ```javascript
@@ -14836,8 +15138,10 @@ Ember.computed.min = function (dependentKey) {
14836
15138
  })
14837
15139
  });
14838
15140
 
14839
- var hamster = App.Hamster.create({chores: ['cook', 'clean', 'write more unit tests']});
14840
- hamster.get('excitingChores'); // ['COOK!', 'CLEAN!', 'WRITE MORE UNIT TESTS!']
15141
+ var hamster = App.Hamster.create({
15142
+ chores: ['clean', 'write more unit tests']
15143
+ });
15144
+ hamster.get('excitingChores'); // ['CLEAN!', 'WRITE MORE UNIT TESTS!']
14841
15145
  ```
14842
15146
 
14843
15147
  @method computed.map
@@ -14865,8 +15169,6 @@ Ember.computed.map = function(dependentKey, callback) {
14865
15169
  /**
14866
15170
  Returns an array mapped to the specified key.
14867
15171
 
14868
- Example
14869
-
14870
15172
  ```javascript
14871
15173
  App.Person = Ember.Object.extend({
14872
15174
  childAges: Ember.computed.mapBy('children', 'age')
@@ -14876,7 +15178,13 @@ Ember.computed.map = function(dependentKey, callback) {
14876
15178
  lordByron.get('childAges'); // []
14877
15179
  lordByron.get('children').pushObject({name: 'Augusta Ada Byron', age: 7});
14878
15180
  lordByron.get('childAges'); // [7]
14879
- lordByron.get('children').pushObjects([{name: 'Allegra Byron', age: 5}, {name: 'Elizabeth Medora Leigh', age: 8}]);
15181
+ lordByron.get('children').pushObjects([{
15182
+ name: 'Allegra Byron',
15183
+ age: 5
15184
+ }, {
15185
+ name: 'Elizabeth Medora Leigh',
15186
+ age: 8
15187
+ }]);
14880
15188
  lordByron.get('childAges'); // [7, 5, 8]
14881
15189
  ```
14882
15190
 
@@ -14903,16 +15211,13 @@ Ember.computed.mapProperty = Ember.computed.mapBy;
14903
15211
  /**
14904
15212
  Filters the array by the callback.
14905
15213
 
14906
- The callback method you provide should have the following signature:
15214
+ The callback method you provide should have the following signature.
15215
+ `item` is the current item in the iteration.
14907
15216
 
14908
15217
  ```javascript
14909
15218
  function(item);
14910
15219
  ```
14911
15220
 
14912
- - `item` is the current item in the iteration.
14913
-
14914
- Example
14915
-
14916
15221
  ```javascript
14917
15222
  App.Hamster = Ember.Object.extend({
14918
15223
  remainingChores: Ember.computed.filter('chores', function(chore) {
@@ -14968,8 +15273,6 @@ Ember.computed.filter = function(dependentKey, callback) {
14968
15273
  /**
14969
15274
  Filters the array by the property and value
14970
15275
 
14971
- Example
14972
-
14973
15276
  ```javascript
14974
15277
  App.Hamster = Ember.Object.extend({
14975
15278
  remainingChores: Ember.computed.filterBy('chores', 'done', false)
@@ -15192,7 +15495,7 @@ Ember.computed.setDiff = function (setAProperty, setBProperty) {
15192
15495
  if (arguments.length !== 2) {
15193
15496
  throw new Ember.Error("setDiff requires exactly two dependent arrays.");
15194
15497
  }
15195
- return Ember.arrayComputed.call(null, setAProperty, setBProperty, {
15498
+ return Ember.arrayComputed(setAProperty, setBProperty, {
15196
15499
  addedItem: function (array, item, changeMeta, instanceMeta) {
15197
15500
  var setA = get(this, setAProperty),
15198
15501
  setB = get(this, setBProperty);
@@ -15393,7 +15696,7 @@ Ember.computed.sort = function (itemsKey, sortDefinition) {
15393
15696
  };
15394
15697
  }
15395
15698
 
15396
- return Ember.arrayComputed.call(null, itemsKey, {
15699
+ return Ember.arrayComputed(itemsKey, {
15397
15700
  initialize: initFn,
15398
15701
 
15399
15702
  addedItem: function (array, item, changeMeta, instanceMeta) {
@@ -15456,6 +15759,9 @@ Ember.RSVP.on('error', Ember.RSVP.onerrorDefault);
15456
15759
 
15457
15760
  var a_slice = Array.prototype.slice;
15458
15761
 
15762
+ if (Ember.FEATURES.isEnabled('propertyBraceExpansion')) {
15763
+ var expandProperties = Ember.expandProperties;
15764
+ }
15459
15765
 
15460
15766
  if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.Function) {
15461
15767
 
@@ -15552,9 +15858,18 @@ if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.Function) {
15552
15858
  @for Function
15553
15859
  */
15554
15860
  Function.prototype.observes = function() {
15555
-
15861
+ if (Ember.FEATURES.isEnabled('propertyBraceExpansion')) {
15862
+ var addWatchedProperty = function (obs) { watched.push(obs); };
15863
+ var watched = [];
15864
+
15865
+ for (var i=0; i<arguments.length; ++i) {
15866
+ expandProperties(arguments[i], addWatchedProperty);
15867
+ }
15868
+
15869
+ this.__ember_observes__ = watched;
15870
+ } else {
15556
15871
  this.__ember_observes__ = a_slice.call(arguments);
15557
-
15872
+ }
15558
15873
 
15559
15874
  return this;
15560
15875
  };
@@ -15617,9 +15932,18 @@ if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.Function) {
15617
15932
  @for Function
15618
15933
  */
15619
15934
  Function.prototype.observesBefore = function() {
15620
-
15935
+ if (Ember.FEATURES.isEnabled('propertyBraceExpansion')) {
15936
+ var addWatchedProperty = function (obs) { watched.push(obs); };
15937
+ var watched = [];
15938
+
15939
+ for (var i=0; i<arguments.length; ++i) {
15940
+ expandProperties(arguments[i], addWatchedProperty);
15941
+ }
15942
+
15943
+ this.__ember_observesBefore__ = watched;
15944
+ } else {
15621
15945
  this.__ember_observesBefore__ = a_slice.call(arguments);
15622
-
15946
+ }
15623
15947
 
15624
15948
  return this;
15625
15949
  };
@@ -16590,6 +16914,11 @@ RSVP.configure('async', function(callback, promise) {
16590
16914
  Ember.run.schedule('actions', promise, callback, promise);
16591
16915
  });
16592
16916
 
16917
+ RSVP.Promise.prototype.fail = function(callback, label){
16918
+
16919
+ return this['catch'](callback, label);
16920
+ };
16921
+
16593
16922
  /**
16594
16923
  @module ember
16595
16924
  @submodule ember-runtime
@@ -16699,6 +17028,8 @@ Ember.ActionHandler = Ember.Mixin.create({
16699
17028
  var hashName;
16700
17029
 
16701
17030
  if (!props._actions) {
17031
+
17032
+
16702
17033
  if (typeOf(props.actions) === 'object') {
16703
17034
  hashName = 'actions';
16704
17035
  } else if (typeOf(props.events) === 'object') {
@@ -16745,8 +17076,6 @@ Ember.ActionHandler = Ember.Mixin.create({
16745
17076
 
16746
17077
  (function() {
16747
17078
  var set = Ember.set, get = Ember.get,
16748
- resolve = Ember.RSVP.resolve,
16749
- rethrow = Ember.RSVP.rethrow,
16750
17079
  not = Ember.computed.not,
16751
17080
  or = Ember.computed.or;
16752
17081
 
@@ -16755,14 +17084,15 @@ var set = Ember.set, get = Ember.get,
16755
17084
  @submodule ember-runtime
16756
17085
  */
16757
17086
 
16758
- function observePromise(proxy, promise) {
16759
- promise.then(function(value) {
17087
+ function tap(proxy, promise) {
17088
+ return promise.then(function(value) {
16760
17089
  set(proxy, 'isFulfilled', true);
16761
17090
  set(proxy, 'content', value);
17091
+ return value;
16762
17092
  }, function(reason) {
16763
17093
  set(proxy, 'isRejected', true);
16764
17094
  set(proxy, 'reason', reason);
16765
- // don't re-throw, as we are merely observing
17095
+ throw reason;
16766
17096
  });
16767
17097
  }
16768
17098
 
@@ -16840,9 +17170,7 @@ Ember.PromiseProxyMixin = Ember.Mixin.create({
16840
17170
 
16841
17171
  promise: Ember.computed(function(key, promise) {
16842
17172
  if (arguments.length === 2) {
16843
- promise = resolve(promise);
16844
- observePromise(this, promise);
16845
- return promise.then(); // fork the promise.
17173
+ return tap(this, promise);
16846
17174
  } else {
16847
17175
  throw new Ember.Error("PromiseProxy's promise must be set");
16848
17176
  }
@@ -19297,7 +19625,7 @@ Ember Runtime
19297
19625
  @submodule ember-views
19298
19626
  */
19299
19627
 
19300
- var jQuery = this.jQuery || (Ember.imports && Ember.imports.jQuery);
19628
+ var jQuery = (this && this.jQuery) || (Ember.imports && Ember.imports.jQuery);
19301
19629
  if (!jQuery && typeof require === 'function') {
19302
19630
  jQuery = require('jquery');
19303
19631
  }
@@ -19347,7 +19675,7 @@ if (Ember.$) {
19347
19675
  // is a "zero-scope" element. This problem can be worked around by making
19348
19676
  // the first node an invisible text node. We, like Modernizr, use &shy;
19349
19677
 
19350
- var needsShy = this.document && (function() {
19678
+ var needsShy = typeof document !== 'undefined' && (function() {
19351
19679
  var testEl = document.createElement('div');
19352
19680
  testEl.innerHTML = "<div></div>";
19353
19681
  testEl.firstChild.innerHTML = "<script></script>";
@@ -19357,7 +19685,7 @@ var needsShy = this.document && (function() {
19357
19685
  // IE 8 (and likely earlier) likes to move whitespace preceeding
19358
19686
  // a script tag to appear after it. This means that we can
19359
19687
  // accidentally remove whitespace when updating a morph.
19360
- var movesWhitespace = this.document && (function() {
19688
+ var movesWhitespace = typeof document !== 'undefined' && (function() {
19361
19689
  var testEl = document.createElement('div');
19362
19690
  testEl.innerHTML = "Test: <script type='text/x-placeholder'></script>Value";
19363
19691
  return testEl.childNodes[0].nodeValue === 'Test:' &&
@@ -22589,6 +22917,8 @@ Ember.View = Ember.CoreView.extend(
22589
22917
  element was destroyed, it is in the preRender state
22590
22918
  * inBuffer: once a view has been rendered, but before it has
22591
22919
  been inserted into the DOM, it is in the inBuffer state
22920
+ * hasElement: the DOM representation of the view is created,
22921
+ and is ready to be inserted
22592
22922
  * inDOM: once a view has been inserted into the DOM it is in
22593
22923
  the inDOM state. A view spends the vast majority of its
22594
22924
  existence in this state.
@@ -23087,7 +23417,17 @@ Ember.merge(hasElement, {
23087
23417
  observer.call(target);
23088
23418
  }
23089
23419
  });
23420
+ })();
23421
+
23422
+
23423
+
23424
+ (function() {
23425
+ /**
23426
+ @module ember
23427
+ @submodule ember-views
23428
+ */
23090
23429
 
23430
+ var hasElement = Ember.View.states.hasElement;
23091
23431
  var inDOM = Ember.View.states.inDOM = Ember.create(hasElement);
23092
23432
 
23093
23433
  Ember.merge(inDOM, {
@@ -23654,7 +23994,7 @@ var get = Ember.get, set = Ember.set, fmt = Ember.String.fmt;
23654
23994
  Given an empty `<body>` and the following code:
23655
23995
 
23656
23996
  ```javascript
23657
- anUndorderedListView = Ember.CollectionView.create({
23997
+ anUnorderedListView = Ember.CollectionView.create({
23658
23998
  tagName: 'ul',
23659
23999
  content: ['A','B','C'],
23660
24000
  itemViewClass: Ember.View.extend({
@@ -23662,7 +24002,7 @@ var get = Ember.get, set = Ember.set, fmt = Ember.String.fmt;
23662
24002
  })
23663
24003
  });
23664
24004
 
23665
- anUndorderedListView.appendTo('body');
24005
+ anUnorderedListView.appendTo('body');
23666
24006
  ```
23667
24007
 
23668
24008
  Will result in the following HTML structure
@@ -24362,16 +24702,15 @@ define("metamorph",
24362
24702
 
24363
24703
  var K = function() {},
24364
24704
  guid = 0,
24365
- document = this.document,
24366
24705
  disableRange = ('undefined' === typeof ENV ? {} : ENV).DISABLE_RANGE_API,
24367
24706
 
24368
24707
  // Feature-detect the W3C range API, the extended check is for IE9 which only partially supports ranges
24369
- supportsRange = (!disableRange) && document && ('createRange' in document) && (typeof Range !== 'undefined') && Range.prototype.createContextualFragment,
24708
+ supportsRange = (!disableRange) && typeof document !== 'undefined' && ('createRange' in document) && (typeof Range !== 'undefined') && Range.prototype.createContextualFragment,
24370
24709
 
24371
24710
  // Internet Explorer prior to 9 does not allow setting innerHTML if the first element
24372
24711
  // is a "zero-scope" element. This problem can be worked around by making
24373
24712
  // the first node an invisible text node. We, like Modernizr, use &shy;
24374
- needsShy = document && (function() {
24713
+ needsShy = typeof document !== 'undefined' && (function() {
24375
24714
  var testEl = document.createElement('div');
24376
24715
  testEl.innerHTML = "<div></div>";
24377
24716
  testEl.firstChild.innerHTML = "<script></script>";
@@ -25191,7 +25530,21 @@ var handlebarsGet = Ember.Handlebars.get = function(root, path, options) {
25191
25530
  normalizedPath = normalizePath(root, path, data),
25192
25531
  value;
25193
25532
 
25194
-
25533
+ if (Ember.FEATURES.isEnabled("ember-handlebars-caps-lookup")) {
25534
+
25535
+ // If the path starts with a capital letter, look it up on Ember.lookup,
25536
+ // which defaults to the `window` object in browsers.
25537
+ if (Ember.isGlobalPath(path)) {
25538
+ value = Ember.get(Ember.lookup, path);
25539
+ } else {
25540
+
25541
+ // In cases where the path begins with a keyword, change the
25542
+ // root to the value represented by that keyword, and ensure
25543
+ // the path is relative to it.
25544
+ value = Ember.get(normalizedPath.root, normalizedPath.path);
25545
+ }
25546
+
25547
+ } else {
25195
25548
  root = normalizedPath.root;
25196
25549
  path = normalizedPath.path;
25197
25550
 
@@ -25200,7 +25553,7 @@ var handlebarsGet = Ember.Handlebars.get = function(root, path, options) {
25200
25553
  if (value === undefined && root !== Ember.lookup && Ember.isGlobalPath(path)) {
25201
25554
  value = Ember.get(Ember.lookup, path);
25202
25555
  }
25203
-
25556
+ }
25204
25557
 
25205
25558
  return value;
25206
25559
  };
@@ -26082,6 +26435,12 @@ Ember._HandlebarsBoundView = Ember._MetamorphView.extend({
26082
26435
  preserveContext = get(this, 'preserveContext'),
26083
26436
  context = get(this, 'previousContext');
26084
26437
 
26438
+ var contextController;
26439
+
26440
+ if (Ember.FEATURES.isEnabled('with-controller')) {
26441
+ contextController = get(this, 'contextController');
26442
+ }
26443
+
26085
26444
  var inverseTemplate = get(this, 'inverseTemplate'),
26086
26445
  displayTemplate = get(this, 'displayTemplate');
26087
26446
 
@@ -26101,6 +26460,12 @@ Ember._HandlebarsBoundView = Ember._MetamorphView.extend({
26101
26460
  // Otherwise, determine if this is a block bind or not.
26102
26461
  // If so, pass the specified object to the template
26103
26462
  if (displayTemplate) {
26463
+ if (Ember.FEATURES.isEnabled('with-controller')) {
26464
+ if (contextController) {
26465
+ set(contextController, 'content', result);
26466
+ result = contextController;
26467
+ }
26468
+ }
26104
26469
  set(this, '_context', result);
26105
26470
  } else {
26106
26471
  // This is not a bind block, just push the result of the
@@ -26201,6 +26566,14 @@ function bind(property, options, preserveContext, shouldDisplay, valueNormalizer
26201
26566
  templateData: options.data
26202
26567
  });
26203
26568
 
26569
+ if (Ember.FEATURES.isEnabled('with-controller')) {
26570
+ if (options.hash.controller) {
26571
+ bindView.set('contextController', this.container.lookupFactory('controller:'+options.hash.controller).create({
26572
+ container: currentContext
26573
+ }));
26574
+ }
26575
+ }
26576
+
26204
26577
  view.appendChild(bindView);
26205
26578
 
26206
26579
  observer = function() {
@@ -26275,6 +26648,17 @@ function simpleBind(currentContext, property, options) {
26275
26648
  }
26276
26649
  }
26277
26650
 
26651
+ function shouldDisplayIfHelperContent(result) {
26652
+ var truthy = result && get(result, 'isTruthy');
26653
+ if (typeof truthy === 'boolean') { return truthy; }
26654
+
26655
+ if (Ember.isArray(result)) {
26656
+ return get(result, 'length') !== 0;
26657
+ } else {
26658
+ return !!result;
26659
+ }
26660
+ }
26661
+
26278
26662
  /**
26279
26663
  @private
26280
26664
 
@@ -26382,18 +26766,43 @@ EmberHandlebars.registerHelper('bind', function bindHelper(property, options) {
26382
26766
  */
26383
26767
  EmberHandlebars.registerHelper('boundIf', function boundIfHelper(property, fn) {
26384
26768
  var context = (fn.contexts && fn.contexts.length) ? fn.contexts[0] : this;
26385
- var func = function(result) {
26386
- var truthy = result && get(result, 'isTruthy');
26387
- if (typeof truthy === 'boolean') { return truthy; }
26388
26769
 
26389
- if (Ember.isArray(result)) {
26390
- return get(result, 'length') !== 0;
26391
- } else {
26392
- return !!result;
26393
- }
26394
- };
26770
+ return bind.call(context, property, fn, true, shouldDisplayIfHelperContent, shouldDisplayIfHelperContent, ['isTruthy', 'length']);
26771
+ });
26772
+
26773
+
26774
+ /**
26775
+ @private
26776
+
26777
+ Use the `unboundIf` helper to create a conditional that evaluates once.
26778
+
26779
+ ```handlebars
26780
+ {{#unboundIf "content.shouldDisplayTitle"}}
26781
+ {{content.title}}
26782
+ {{/unboundIf}}
26783
+ ```
26784
+
26785
+ @method unboundIf
26786
+ @for Ember.Handlebars.helpers
26787
+ @param {String} property Property to bind
26788
+ @param {Function} fn Context to provide for rendering
26789
+ @return {String} HTML string
26790
+ */
26791
+ EmberHandlebars.registerHelper('unboundIf', function unboundIfHelper(property, fn) {
26792
+ var context = (fn.contexts && fn.contexts.length) ? fn.contexts[0] : this,
26793
+ data = fn.data,
26794
+ template = fn.fn,
26795
+ inverse = fn.inverse,
26796
+ normalized, propertyValue, result;
26797
+
26798
+ normalized = normalizePath(context, property, data);
26799
+ propertyValue = handlebarsGet(context, property, fn);
26395
26800
 
26396
- return bind.call(context, property, fn, true, func, func, ['isTruthy', 'length']);
26801
+ if (!shouldDisplayIfHelperContent(propertyValue)) {
26802
+ template = inverse;
26803
+ }
26804
+
26805
+ template(context, { data: data });
26397
26806
  });
26398
26807
 
26399
26808
  /**
@@ -26444,6 +26853,7 @@ EmberHandlebars.registerHelper('with', function withHelper(context, options) {
26444
26853
 
26445
26854
  /**
26446
26855
  See [boundIf](/api/classes/Ember.Handlebars.helpers.html#method_boundIf)
26856
+ and [unboundIf](/api/classes/Ember.Handlebars.helpers.html#method_unboundIf)
26447
26857
 
26448
26858
  @method if
26449
26859
  @for Ember.Handlebars.helpers
@@ -26454,8 +26864,11 @@ EmberHandlebars.registerHelper('with', function withHelper(context, options) {
26454
26864
  EmberHandlebars.registerHelper('if', function ifHelper(context, options) {
26455
26865
 
26456
26866
 
26457
-
26458
- return helpers.boundIf.call(options.contexts[0], context, options);
26867
+ if (options.data.isUnbound) {
26868
+ return helpers.unboundIf.call(options.contexts[0], context, options);
26869
+ } else {
26870
+ return helpers.boundIf.call(options.contexts[0], context, options);
26871
+ }
26459
26872
  });
26460
26873
 
26461
26874
  /**
@@ -26474,7 +26887,11 @@ EmberHandlebars.registerHelper('unless', function unlessHelper(context, options)
26474
26887
  options.fn = inverse;
26475
26888
  options.inverse = fn;
26476
26889
 
26477
- return helpers.boundIf.call(options.contexts[0], context, options);
26890
+ if (options.data.isUnbound) {
26891
+ return helpers.unboundIf.call(options.contexts[0], context, options);
26892
+ } else {
26893
+ return helpers.boundIf.call(options.contexts[0], context, options);
26894
+ }
26478
26895
  });
26479
26896
 
26480
26897
  /**
@@ -27243,7 +27660,7 @@ var get = Ember.get, handlebarsGet = Ember.Handlebars.get, fmt = Ember.String.fm
27243
27660
  </div>
27244
27661
  ```
27245
27662
 
27246
- ### Blockless Use
27663
+ ### Blockless use in a collection
27247
27664
 
27248
27665
  If you provide an `itemViewClass` option that has its own `template` you can
27249
27666
  omit the block.
@@ -27551,6 +27968,7 @@ Ember.Handlebars.registerHelper('debugger', function debuggerHelper(options) {
27551
27968
  */
27552
27969
 
27553
27970
  var get = Ember.get, set = Ember.set;
27971
+ var fmt = Ember.String.fmt;
27554
27972
 
27555
27973
  Ember.Handlebars.EachView = Ember.CollectionView.extend(Ember._Metamorph, {
27556
27974
  init: function() {
@@ -28542,7 +28960,7 @@ Ember.TextField = Ember.Component.extend(Ember.TextSupport,
28542
28960
 
28543
28961
  classNames: ['ember-text-field'],
28544
28962
  tagName: "input",
28545
- attributeBindings: ['type', 'value', 'size', 'pattern', 'name'],
28963
+ attributeBindings: ['type', 'value', 'size', 'pattern', 'name', 'min', 'max'],
28546
28964
 
28547
28965
  /**
28548
28966
  The `value` attribute of the input element. As the user inputs text, this
@@ -28573,141 +28991,31 @@ Ember.TextField = Ember.Component.extend(Ember.TextSupport,
28573
28991
  size: null,
28574
28992
 
28575
28993
  /**
28576
- The `pattern` the pattern attribute of input element.
28994
+ The `pattern` attribute of input element.
28577
28995
 
28578
28996
  @property pattern
28579
28997
  @type String
28580
28998
  @default null
28581
28999
  */
28582
- pattern: null
28583
- });
29000
+ pattern: null,
28584
29001
 
28585
- })();
28586
-
28587
-
28588
-
28589
- (function() {
28590
- /*
28591
- @module ember
28592
- @submodule ember-handlebars
28593
- */
28594
-
28595
- var get = Ember.get, set = Ember.set;
28596
-
28597
- /*
28598
- @class Button
28599
- @namespace Ember
28600
- @extends Ember.View
28601
- @uses Ember.TargetActionSupport
28602
- @deprecated
28603
- */
28604
- Ember.Button = Ember.View.extend(Ember.TargetActionSupport, {
28605
- classNames: ['ember-button'],
28606
- classNameBindings: ['isActive'],
28607
-
28608
- tagName: 'button',
28609
-
28610
- propagateEvents: false,
28611
-
28612
- attributeBindings: ['type', 'disabled', 'href', 'tabindex'],
28613
-
28614
- /*
28615
- @private
28616
-
28617
- Overrides `TargetActionSupport`'s `targetObject` computed
28618
- property to use Handlebars-specific path resolution.
29002
+ /**
29003
+ The `min` attribute of input element used with `type="number"` or `type="range"`.
28619
29004
 
28620
- @property targetObject
29005
+ @property min
29006
+ @type String
29007
+ @default null
28621
29008
  */
28622
- targetObject: Ember.computed(function() {
28623
- var target = get(this, 'target'),
28624
- root = get(this, 'context'),
28625
- data = get(this, 'templateData');
29009
+ min: null,
28626
29010
 
28627
- if (typeof target !== 'string') { return target; }
28628
-
28629
- return Ember.Handlebars.get(root, target, { data: data });
28630
- }).property('target'),
28631
-
28632
- // Defaults to 'button' if tagName is 'input' or 'button'
28633
- type: Ember.computed(function(key) {
28634
- var tagName = this.tagName;
28635
- if (tagName === 'input' || tagName === 'button') { return 'button'; }
28636
- }),
28637
-
28638
- disabled: false,
28639
-
28640
- // Allow 'a' tags to act like buttons
28641
- href: Ember.computed(function() {
28642
- return this.tagName === 'a' ? '#' : null;
28643
- }),
28644
-
28645
- mouseDown: function() {
28646
- if (!get(this, 'disabled')) {
28647
- set(this, 'isActive', true);
28648
- this._mouseDown = true;
28649
- this._mouseEntered = true;
28650
- }
28651
- return get(this, 'propagateEvents');
28652
- },
28653
-
28654
- mouseLeave: function() {
28655
- if (this._mouseDown) {
28656
- set(this, 'isActive', false);
28657
- this._mouseEntered = false;
28658
- }
28659
- },
28660
-
28661
- mouseEnter: function() {
28662
- if (this._mouseDown) {
28663
- set(this, 'isActive', true);
28664
- this._mouseEntered = true;
28665
- }
28666
- },
28667
-
28668
- mouseUp: function(event) {
28669
- if (get(this, 'isActive')) {
28670
- // Actually invoke the button's target and action.
28671
- // This method comes from the Ember.TargetActionSupport mixin.
28672
- this.triggerAction();
28673
- set(this, 'isActive', false);
28674
- }
28675
-
28676
- this._mouseDown = false;
28677
- this._mouseEntered = false;
28678
- return get(this, 'propagateEvents');
28679
- },
28680
-
28681
- keyDown: function(event) {
28682
- // Handle space or enter
28683
- if (event.keyCode === 13 || event.keyCode === 32) {
28684
- this.mouseDown();
28685
- }
28686
- },
28687
-
28688
- keyUp: function(event) {
28689
- // Handle space or enter
28690
- if (event.keyCode === 13 || event.keyCode === 32) {
28691
- this.mouseUp();
28692
- }
28693
- },
28694
-
28695
- // TODO: Handle proper touch behavior. Including should make inactive when
28696
- // finger moves more than 20x outside of the edge of the button (vs mouse
28697
- // which goes inactive as soon as mouse goes out of edges.)
28698
-
28699
- touchStart: function(touch) {
28700
- return this.mouseDown(touch);
28701
- },
28702
-
28703
- touchEnd: function(touch) {
28704
- return this.mouseUp(touch);
28705
- },
28706
-
28707
- init: function() {
29011
+ /**
29012
+ The `max` attribute of input element used with `type="number"` or `type="range"`.
28708
29013
 
28709
- this._super();
28710
- }
29014
+ @property max
29015
+ @type String
29016
+ @default null
29017
+ */
29018
+ max: null
28711
29019
  });
28712
29020
 
28713
29021
  })();
@@ -31994,7 +32302,15 @@ DSL.prototype = {
31994
32302
  }
31995
32303
 
31996
32304
 
31997
- },
32305
+ if (Ember.FEATURES.isEnabled("ember-routing-named-substates")) {
32306
+ // For namespace-preserving nested resource (e.g. resource('foo.bar') within
32307
+ // resource('foo')) we only want to use the last route name segment to determine
32308
+ // the names of the error/loading substates (e.g. 'bar_loading')
32309
+ name = name.split('.').pop();
32310
+ route(this, name + '_loading');
32311
+ route(this, name + '_error', { path: "/_unused_dummy_error_path_route_" + name + "/:error" });
32312
+ }
32313
+ },
31998
32314
 
31999
32315
  push: function(url, name, callback, queryParams) {
32000
32316
  var parts = name.split('.');
@@ -32005,7 +32321,11 @@ DSL.prototype = {
32005
32321
 
32006
32322
  route: function(name, options) {
32007
32323
  route(this, name, options);
32008
- },
32324
+ if (Ember.FEATURES.isEnabled("ember-routing-named-substates")) {
32325
+ route(this, name + '_loading');
32326
+ route(this, name + '_error', { path: "/_unused_dummy_error_path_route_" + name + "/:error" });
32327
+ }
32328
+ },
32009
32329
 
32010
32330
  generate: function() {
32011
32331
  var dslMatches = this.matches;
@@ -32018,7 +32338,12 @@ DSL.prototype = {
32018
32338
  for (var i=0, l=dslMatches.length; i<l; i++) {
32019
32339
  var dslMatch = dslMatches[i];
32020
32340
  var matchObj = match(dslMatch[0]).to(dslMatch[1], dslMatch[2]);
32021
- }
32341
+ if (Ember.FEATURES.isEnabled("query-params")) {
32342
+ if(dslMatch[3]) {
32343
+ matchObj.withQueryParams.apply(matchObj, dslMatch[3]);
32344
+ }
32345
+ }
32346
+ }
32022
32347
  };
32023
32348
  }
32024
32349
  };
@@ -32060,7 +32385,7 @@ var get = Ember.get;
32060
32385
  */
32061
32386
 
32062
32387
  /**
32063
-
32388
+
32064
32389
  Finds a controller instance.
32065
32390
 
32066
32391
  @for Ember
@@ -32072,17 +32397,22 @@ Ember.controllerFor = function(container, controllerName, lookupOptions) {
32072
32397
  };
32073
32398
 
32074
32399
  /**
32075
- Generates a controller automatically if none was provided.
32076
- The type of generated controller depends on the context.
32400
+ Generates a controller factory
32401
+
32402
+ The type of the generated controller factory is derived
32403
+ from the context. If the context is an array an array controller
32404
+ is generated, if an object, an object controller otherwise, a basic
32405
+ controller is generated.
32406
+
32077
32407
  You can customize your generated controllers by defining
32078
- `App.ObjectController` and `App.ArrayController`
32079
-
32408
+ `App.ObjectController` or `App.ArrayController`.
32409
+
32080
32410
  @for Ember
32081
- @method generateController
32411
+ @method generateControllerFactory
32082
32412
  @private
32083
32413
  */
32084
- Ember.generateController = function(container, controllerName, context) {
32085
- var ControllerFactory, fullName, instance, name, factoryName, controllerType;
32414
+ Ember.generateControllerFactory = function(container, controllerName, context) {
32415
+ var Factory, fullName, instance, name, factoryName, controllerType;
32086
32416
 
32087
32417
  if (context && Ember.isArray(context)) {
32088
32418
  controllerType = 'array';
@@ -32094,7 +32424,7 @@ Ember.generateController = function(container, controllerName, context) {
32094
32424
 
32095
32425
  factoryName = 'controller:' + controllerType;
32096
32426
 
32097
- ControllerFactory = container.lookupFactory(factoryName).extend({
32427
+ Factory = container.lookupFactory(factoryName).extend({
32098
32428
  isGenerated: true,
32099
32429
  toString: function() {
32100
32430
  return "(generated " + controllerName + " controller)";
@@ -32103,9 +32433,27 @@ Ember.generateController = function(container, controllerName, context) {
32103
32433
 
32104
32434
  fullName = 'controller:' + controllerName;
32105
32435
 
32106
- container.register(fullName, ControllerFactory);
32436
+ container.register(fullName, Factory);
32437
+
32438
+ return Factory;
32439
+ };
32440
+
32441
+ /**
32442
+ Generates and instantiates a controller.
32443
+
32444
+ The type of the generated controller factory is derived
32445
+ from the context. If the context is an array an array controller
32446
+ is generated, if an object, an object controller otherwise, a basic
32447
+ controller is generated.
32107
32448
 
32108
- instance = container.lookup(fullName);
32449
+ @for Ember
32450
+ @method generateController
32451
+ @private
32452
+ */
32453
+ Ember.generateController = function(container, controllerName, context) {
32454
+ Ember.generateControllerFactory(container, controllerName, context);
32455
+ var fullName = 'controller:' + controllerName;
32456
+ var instance = container.lookup(fullName);
32109
32457
 
32110
32458
  if (get(instance, 'namespace.LOG_ACTIVE_GENERATION')) {
32111
32459
  Ember.Logger.info("generated -> " + fullName, { fullName: fullName });
@@ -32244,13 +32592,6 @@ Ember.Router = Ember.Object.extend(Ember.Evented, {
32244
32592
  this.router.reset();
32245
32593
  },
32246
32594
 
32247
- willDestroy: function(){
32248
- var location = get(this, 'location');
32249
- location.destroy();
32250
-
32251
- this._super.apply(this, arguments);
32252
- },
32253
-
32254
32595
  _lookupActiveView: function(templateName) {
32255
32596
  var active = this._activeViews[templateName];
32256
32597
  return active && active[0];
@@ -32273,16 +32614,23 @@ Ember.Router = Ember.Object.extend(Ember.Evented, {
32273
32614
 
32274
32615
  _setupLocation: function() {
32275
32616
  var location = get(this, 'location'),
32276
- rootURL = get(this, 'rootURL'),
32277
- options = {};
32617
+ rootURL = get(this, 'rootURL');
32278
32618
 
32279
- if (typeof rootURL === 'string') {
32280
- options.rootURL = rootURL;
32619
+ if ('string' === typeof location && this.container) {
32620
+ var resolvedLocation = this.container.lookup('location:' + location);
32621
+
32622
+ if ('undefined' !== typeof resolvedLocation) {
32623
+ location = set(this, 'location', resolvedLocation);
32624
+ } else {
32625
+ // Allow for deprecated registration of custom location API's
32626
+ var options = {implementation: location};
32627
+
32628
+ location = set(this, 'location', Ember.Location.create(options));
32629
+ }
32281
32630
  }
32282
32631
 
32283
- if ('string' === typeof location) {
32284
- options.implementation = location;
32285
- location = set(this, 'location', Ember.Location.create(options));
32632
+ if (typeof rootURL === 'string') {
32633
+ location.rootURL = rootURL;
32286
32634
  }
32287
32635
 
32288
32636
  // ensure that initState is called AFTER the rootURL is set on
@@ -32355,7 +32703,10 @@ Ember.Router = Ember.Object.extend(Ember.Evented, {
32355
32703
  var passedName = args[0], name, self = this,
32356
32704
  isQueryParamsOnly = false;
32357
32705
 
32358
-
32706
+ if (Ember.FEATURES.isEnabled("query-params")) {
32707
+ isQueryParamsOnly = (args.length === 1 && args[0].hasOwnProperty('queryParams'));
32708
+ }
32709
+
32359
32710
  if (!isQueryParamsOnly && passedName.charAt(0) === '/') {
32360
32711
  name = passedName;
32361
32712
  } else if (!isQueryParamsOnly) {
@@ -32504,7 +32855,14 @@ function findChildRouteName(parentRoute, originatingChildRoute, name) {
32504
32855
  targetChildRouteName = originatingChildRoute.routeName.split('.').pop(),
32505
32856
  namespace = parentRoute.routeName === 'application' ? '' : parentRoute.routeName + '.';
32506
32857
 
32507
-
32858
+ if (Ember.FEATURES.isEnabled("ember-routing-named-substates")) {
32859
+ // First, try a named loading state, e.g. 'foo_loading'
32860
+ childName = namespace + targetChildRouteName + '_' + name;
32861
+ if (routeHasBeenDefined(router, childName)) {
32862
+ return childName;
32863
+ }
32864
+ }
32865
+
32508
32866
  // Second, try general loading state, e.g. 'loading'
32509
32867
  childName = namespace + name;
32510
32868
  if (routeHasBeenDefined(router, childName)) {
@@ -33117,7 +33475,10 @@ Ember.Route = Ember.Object.extend(Ember.ActionHandler, {
33117
33475
 
33118
33476
  var args = [controller, context];
33119
33477
 
33120
-
33478
+ if (Ember.FEATURES.isEnabled("query-params")) {
33479
+ args.push(queryParams);
33480
+ }
33481
+
33121
33482
  if (this.setupControllers) {
33122
33483
 
33123
33484
  this.setupControllers(controller, context);
@@ -34148,7 +34509,14 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
34148
34509
  var eventName = get(this, 'eventName'), i;
34149
34510
  this.on(eventName, this, this._invoke);
34150
34511
 
34151
- },
34512
+ if (Ember.FEATURES.isEnabled("query-params")) {
34513
+ var queryParams = get(this, '_potentialQueryParams') || [];
34514
+
34515
+ for(i=0; i < queryParams.length; i++) {
34516
+ this.registerObserver(this, queryParams[i], this, this._queryParamsChanged);
34517
+ }
34518
+ }
34519
+ },
34152
34520
 
34153
34521
  /**
34154
34522
  @private
@@ -34330,7 +34698,15 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
34330
34698
  types = options.types,
34331
34699
  data = options.data;
34332
34700
 
34333
-
34701
+ if (Ember.FEATURES.isEnabled("query-params")) {
34702
+ if (parameters.params.length === 0) {
34703
+ var appController = this.container.lookup('controller:application');
34704
+ return [get(appController, 'currentRouteName')];
34705
+ } else {
34706
+ return resolveParams(parameters.context, parameters.params, { types: types, data: data });
34707
+ }
34708
+ }
34709
+
34334
34710
  // Original implementation if query params not enabled
34335
34711
  return resolveParams(parameters.context, parameters.params, { types: types, data: data });
34336
34712
  }).property(),
@@ -34362,7 +34738,12 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
34362
34738
  }
34363
34739
  }
34364
34740
 
34365
-
34741
+ if (Ember.FEATURES.isEnabled("query-params")) {
34742
+ var queryParams = get(this, 'queryParams');
34743
+
34744
+ if (queryParams || queryParams === false) { resolvedParams.push({queryParams: queryParams}); }
34745
+ }
34746
+
34366
34747
  return resolvedParams;
34367
34748
  }).property('resolvedParams', 'queryParams', 'router.url'),
34368
34749
 
@@ -34926,40 +35307,58 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
34926
35307
  @return {String} HTML string
34927
35308
  */
34928
35309
  Ember.Handlebars.registerHelper('render', function renderHelper(name, contextString, options) {
35310
+ var length = arguments.length;
34929
35311
 
34930
- var contextProvided = arguments.length === 3,
35312
+ var contextProvided = length === 3,
34931
35313
  container, router, controller, view, context, lookupOptions;
34932
35314
 
34933
- if (arguments.length === 2) {
35315
+ container = (options || contextString).data.keywords.controller.container;
35316
+ router = container.lookup('router:main');
35317
+
35318
+ if (length === 2) {
35319
+ // use the singleton controller
34934
35320
  options = contextString;
34935
35321
  contextString = undefined;
34936
- }
34937
35322
 
34938
- if (typeof contextString === 'string') {
35323
+ } else if (length === 3) {
35324
+ // create a new controller
34939
35325
  context = Ember.Handlebars.get(options.contexts[1], contextString, options);
34940
- lookupOptions = { singleton: false };
35326
+ } else {
35327
+ throw Ember.Error("You must pass a templateName to render");
34941
35328
  }
34942
35329
 
35330
+ // # legacy namespace
34943
35331
  name = name.replace(/\//g, '.');
34944
- container = options.data.keywords.controller.container;
34945
- router = container.lookup('router:main');
35332
+ // \ legacy slash as namespace support
34946
35333
 
34947
35334
 
34948
35335
  view = container.lookup('view:' + name) || container.lookup('view:default');
34949
35336
 
34950
- var controllerName = options.hash.controller;
35337
+ // provide controller override
35338
+ var controllerName = options.hash.controller || name;
35339
+ var controllerFullName = 'controller:' + controllerName;
34951
35340
 
34952
- // Look up the controller by name, if provided.
34953
- if (controllerName) {
34954
- controller = container.lookup('controller:' + controllerName, lookupOptions);
35341
+ if (options.hash.controller) {
34955
35342
 
34956
- } else {
34957
- controller = container.lookup('controller:' + name, lookupOptions) ||
34958
- Ember.generateController(container, name, context);
34959
35343
  }
34960
35344
 
34961
- if (controller && contextProvided) {
34962
- controller.set('model', context);
35345
+ var target = options.data.keywords.controller;
35346
+
35347
+ // choose name
35348
+ if (length > 2) {
35349
+ var factory = container.lookupFactory(controllerFullName) ||
35350
+ Ember.generateControllerFactory(container, controllerName, context);
35351
+
35352
+ controller = factory.create({
35353
+ model: context,
35354
+ target: target
35355
+ });
35356
+
35357
+ } else {
35358
+ controller = container.lookup(controllerFullName) ||
35359
+ Ember.generateController(container, controllerName);
35360
+
35361
+ controller.set('target', target);
34963
35362
  }
34964
35363
 
34965
35364
  var root = options.contexts[1];
@@ -34970,8 +35369,6 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
34970
35369
  });
34971
35370
  }
34972
35371
 
34973
- controller.set('target', options.data.keywords.controller);
34974
-
34975
35372
  options.hash.viewName = Ember.String.camelize(name);
34976
35373
  options.hash.template = container.lookup('template:' + name);
34977
35374
  options.hash.controller = controller;
@@ -34982,7 +35379,6 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
34982
35379
 
34983
35380
  Ember.Handlebars.helpers.view.call(this, view, options);
34984
35381
  });
34985
-
34986
35382
  });
34987
35383
 
34988
35384
  })();
@@ -35677,6 +36073,8 @@ Ember.Location = {
35677
36073
  @param {Object} implementation of the `location` API
35678
36074
  */
35679
36075
  registerImplementation: function(name, implementation) {
36076
+
36077
+
35680
36078
  this.implementations[name] = implementation;
35681
36079
  },
35682
36080
 
@@ -35706,6 +36104,7 @@ var get = Ember.get, set = Ember.set;
35706
36104
  @extends Ember.Object
35707
36105
  */
35708
36106
  Ember.NoneLocation = Ember.Object.extend({
36107
+ implementation: 'none',
35709
36108
  path: '',
35710
36109
 
35711
36110
  /**
@@ -35781,8 +36180,6 @@ Ember.NoneLocation = Ember.Object.extend({
35781
36180
  }
35782
36181
  });
35783
36182
 
35784
- Ember.Location.registerImplementation('none', Ember.NoneLocation);
35785
-
35786
36183
  })();
35787
36184
 
35788
36185
 
@@ -35805,6 +36202,7 @@ var get = Ember.get, set = Ember.set;
35805
36202
  @extends Ember.Object
35806
36203
  */
35807
36204
  Ember.HashLocation = Ember.Object.extend({
36205
+ implementation: 'hash',
35808
36206
 
35809
36207
  init: function() {
35810
36208
  set(this, 'location', get(this, 'location') || window.location);
@@ -35818,7 +36216,19 @@ Ember.HashLocation = Ember.Object.extend({
35818
36216
  @method getURL
35819
36217
  */
35820
36218
  getURL: function() {
35821
- // Default implementation without feature flag enabled
36219
+ if (Ember.FEATURES.isEnabled("query-params")) {
36220
+ // location.hash is not used because it is inconsistently
36221
+ // URL-decoded between browsers.
36222
+ var href = get(this, 'location').href,
36223
+ hashIndex = href.indexOf('#');
36224
+
36225
+ if ( hashIndex === -1 ) {
36226
+ return "";
36227
+ } else {
36228
+ return href.substr(hashIndex + 1);
36229
+ }
36230
+ }
36231
+ // Default implementation without feature flag enabled
35822
36232
  return get(this, 'location').hash.substr(1);
35823
36233
  },
35824
36234
 
@@ -35906,8 +36316,6 @@ Ember.HashLocation = Ember.Object.extend({
35906
36316
  }
35907
36317
  });
35908
36318
 
35909
- Ember.Location.registerImplementation('hash', Ember.HashLocation);
35910
-
35911
36319
  })();
35912
36320
 
35913
36321
 
@@ -35931,6 +36339,7 @@ var supportsHistoryState = window.history && 'state' in window.history;
35931
36339
  @extends Ember.Object
35932
36340
  */
35933
36341
  Ember.HistoryLocation = Ember.Object.extend({
36342
+ implementation: 'history',
35934
36343
 
35935
36344
  init: function() {
35936
36345
  set(this, 'location', get(this, 'location') || window.location);
@@ -35972,7 +36381,11 @@ Ember.HistoryLocation = Ember.Object.extend({
35972
36381
  rootURL = rootURL.replace(/\/$/, '');
35973
36382
  var url = path.replace(rootURL, '');
35974
36383
 
35975
-
36384
+ if (Ember.FEATURES.isEnabled("query-params")) {
36385
+ var search = location.search || '';
36386
+ url += search;
36387
+ }
36388
+
35976
36389
  return url;
35977
36390
  },
35978
36391
 
@@ -36125,8 +36538,6 @@ Ember.HistoryLocation = Ember.Object.extend({
36125
36538
  }
36126
36539
  });
36127
36540
 
36128
- Ember.Location.registerImplementation('history', Ember.HistoryLocation);
36129
-
36130
36541
  })();
36131
36542
 
36132
36543
 
@@ -36977,9 +37388,15 @@ var Application = Ember.Application = Ember.Namespace.extend(Ember.DeferredMixin
36977
37388
 
36978
37389
  ```javascript
36979
37390
  App.inject(<full_name or type>, <property name>, <full_name>)
36980
- App.inject('model:user', 'email', 'model:email')
36981
- App.inject('model', 'source', 'source:main')
37391
+ App.inject('controller:application', 'email', 'model:email')
37392
+ App.inject('controller', 'source', 'source:main')
36982
37393
  ```
37394
+ Please note that injections on models are currently disabled.
37395
+ This was done because ember-data was not ready for fully a container aware ecosystem.
37396
+
37397
+ You can enable injections on models by setting `Ember.MODEL_FACTORY_INJECTIONS` flag to `true`
37398
+ If model factory injections are enabled, models should not be
37399
+ accessed globally (only through `container.lookupFactory('model:modelName'))`);
36983
37400
 
36984
37401
  @method inject
36985
37402
  @param factoryNameOrType {String}
@@ -37313,6 +37730,10 @@ Ember.Application.reopenClass({
37313
37730
  container.register('router:main', Ember.Router);
37314
37731
  container.injection('router:main', 'namespace', 'application:main');
37315
37732
 
37733
+ container.register('location:hash', Ember.HashLocation);
37734
+ container.register('location:history', Ember.HistoryLocation);
37735
+ container.register('location:none', Ember.NoneLocation);
37736
+
37316
37737
  container.injection('controller', 'target', 'router:main');
37317
37738
  container.injection('controller', 'namespace', 'application:main');
37318
37739