ember-source 1.0.0.rc5.1 → 1.0.0.rc6
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.
- data/VERSION +1 -1
- data/dist/ember-data-deps.js +172 -69
- data/dist/ember-data-deps.min.js +6 -6
- data/dist/ember-data-deps.prod.js +159 -62
- data/dist/ember-debug.js +10 -5
- data/dist/ember-old-router.js +486 -172
- data/dist/ember-old-router.min.js +9 -9
- data/dist/ember-old-router.prod.js +472 -164
- data/dist/ember-runtime.js +160 -59
- data/dist/ember-runtime.min.js +5 -5
- data/dist/ember-runtime.prod.js +147 -52
- data/dist/ember-spade.js +1 -1
- data/dist/ember-template-compiler.js +66 -2
- data/dist/ember-template-compiler.min.js +3 -3
- data/dist/ember-template-compiler.prod.js +64 -0
- data/dist/ember-tests.js +3 -2
- data/dist/ember.js +1703 -700
- data/dist/ember.min.js +9 -9
- data/dist/ember.prod.js +1658 -668
- metadata +2 -5
- data/dist/ember-1.0.0-rc.5.1.js +0 -29967
- data/dist/ember-1.0.0-rc.5.1.min.js +0 -21
- data/dist/ember-1.0.0-rc.5.1.prod.js +0 -29347
@@ -8,14 +8,14 @@
|
|
8
8
|
// ==========================================================================
|
9
9
|
|
10
10
|
|
11
|
-
// Version: v1.0.0-rc.
|
12
|
-
// Last commit:
|
11
|
+
// Version: v1.0.0-rc.6-1-g42f0c68
|
12
|
+
// Last commit: 42f0c68 (2013-06-23 15:43:35 -0400)
|
13
13
|
|
14
14
|
|
15
|
-
!function(){var e,t;!function(){var r={},n={};e=function(e,t,n){r[e]={deps:t,callback:n}},t=function(e){if(n[e])return n[e];n[e]={};var i,s,o,a,u;if(i=r[e],!i)throw new Error("Module '"+e+"' not found.");s=i.deps,o=i.callback,a=[];for(var c=0,h=s.length;h>c;c++)"exports"===s[c]?a.push(u={}):a.push(t(s[c]));var l=o.apply(this,a);return n[e]=u||l}}(),function(){function e(e){return t.console&&t.console[e]?t.console[e].apply?function(){t.console[e].apply(t.console,arguments)}:function(){var r=Array.prototype.join.call(arguments,", ");t.console[e](r)}:void 0}"undefined"==typeof Ember&&(Ember={});var t=Ember.imports=Ember.imports||this,r=Ember.exports=Ember.exports||this;Ember.lookup=Ember.lookup||this,r.Em=r.Ember=Em=Ember,Ember.isNamespace=!0,Ember.toString=function(){return"Ember"},Ember.VERSION="1.0.0-rc.5",Ember.ENV=Ember.ENV||("undefined"==typeof ENV?{}:ENV),Ember.config=Ember.config||{},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.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},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)}},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(s){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],s=0;r>s;s++)s in t&&(n[s]=e.call(i,t[s],s,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(){function e(e){this.descs={},this.watching={},this.cache={},this.source=e}function t(e,t){return!(!e||"function"!=typeof e[t])}var r=Ember.platform.defineProperty,n=Ember.create,i="__ember"+ +new Date,s=0,o=[],a={},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");var n=t+s++;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=o[e],t||(t=o[e]="nu"+e),t;case"string":return t=a[e],t||(t=a[e]="st"+s++),t;case"boolean":return e?"(true)":"(false)";default:return e[i]?e[i]:e===Object?"(Object)":e===Array?"(Array)":(t="ember"+s++,c.value=t,r(e,i,c),t)}};var h={writable:!0,configurable:!1,enumerable:!1,value:null},l=Ember.GUID_KEY+"_meta";Ember.META_KEY=l;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 s=t[l];return i===!1?s||m:(s?s.source!==t&&(f||r(t,l,h),s=n(s),s.descs=n(s.descs),s.watching=n(s.watching),s.cache={},s.source=t,u&&(s.values=n(s.values)),t[l]=s):(f||r(t,l,h),s=new e(t),u&&(s.values={}),t[l]=s,s.descs.constructor=null),s)},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,s,o=Ember.meta(e,r),a=0,u=t.length;u>a;a++){if(i=t[a],s=o[i]){if(s.__ember_source__!==e){if(!r)return void 0;s=o[i]=n(s),s.__ember_source__=e}}else{if(!r)return void 0;s=o[i]={__ember_source__:e}}o=s}return s},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.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,s;r=r||this;try{n=e.call(r)}finally{try{i=t.call(r)}catch(o){s=o}}if(s)throw s;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,s,o;n=n||this;try{i=e.call(n)}catch(a){i=t.call(n,a)}finally{try{s=r.call(n)}catch(u){o=u}}if(o)throw o;return void 0===s?i:s}:function(e,t,r,n){var i,s;n=n||this;try{i=e.call(n)}catch(o){i=t.call(n,o)}finally{s=r.call(n)}return void 0===s?i:s};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}}(),function(){Ember.Instrumentation={};var e=[],t={},r=function(r){for(var n,i=[],s=0,o=e.length;o>s;s++)n=e[s],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,s,o){function a(){for(p=0,d=m.length;d>p;p++)f=m[p],b[p]=f.before(e,n(),i);return s.call(o)}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(h)}var h,l,m=t[e];if(Ember.STRUCTURED_PROFILE&&(h=e+": "+i.object,console.time(h)),m||(m=r(e)),0===m.length)return l=s.call(o),Ember.STRUCTURED_PROFILE&&console.timeEnd(h),l;var f,p,d,b=[];return Ember.tryCatchFinally(a,u,c)},Ember.Instrumentation.subscribe=function(r,n){for(var i,s=r.split("."),o=[],a=0,u=s.length;u>a;a++)i=s[a],"*"===i?o.push("[^\\.]*"):o.push(i);o=o.join("\\."),o+="(\\..*)?";var c={pattern:r,regex:new RegExp("^"+o+"$"),object:n};return e.push(c),t={},c},Ember.Instrumentation.unsubscribe=function(r){for(var n,i=0,s=e.length;s>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;n=Array.prototype.concat,e=Array.prototype.map||Ember.ArrayPolyfills.map,t=Array.prototype.forEach||Ember.ArrayPolyfills.forEach,r=Array.prototype.indexOf||Ember.ArrayPolyfills.indexOf;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){if(e.replace)return e.replace(t,r,i);var s=n.apply([t,r],i);return e.splice.apply(e,s)},intersection:function(e,t){var r=[];return i.forEach(e,function(e){i.indexOf(t,e)>=0&&r.push(e)}),r}}}(),function(){function e(e){return e.match(a)[0]}function t(t,n){var i,a=o.test(n),u=!a&&s.test(n);if((!t||u)&&(t=Ember.lookup),a&&(n=n.slice(5)),t===Ember.lookup&&(i=e(n),t=r(t,i),n=n.slice(i.length+1)),!n||0===n.length)throw new Error("Invalid Path");return[t,n]}var r,n=Ember.META_KEY,i=Ember.ENV.MANDATORY_SETTER,s=/^([A-Z$]|([0-9][A-Z$])).*[\.\*]/,o=/^this[\.\*]/,a=/^([^\.\*]+)/;r=function(e,t){if(""===t)return e;if(t||"string"!=typeof e||(t=e,e=null),null===e||-1!==t.indexOf("."))return u(e,t);var r,s=e[n],o=s&&s.descs[t];return o?o.get(e,t):(r=i&&s&&s.watching[t]>0?s.values[t]:e[t],void 0!==r||"object"!=typeof e||t in e||"function"!=typeof e.unknownProperty?r:e.unknownProperty(t))},Ember.config.overrideAccessors&&(Ember.get=r,Ember.config.overrideAccessors(),r=Ember.get);var u=Ember._getPath=function(e,n){var i,s,a,u,c;if(null===e&&-1===n.indexOf("."))return r(Ember.lookup,n);for(i=o.test(n),(!e||i)&&(a=t(e,n),e=a[0],n=a[1],a.length=0),s=n.split("."),c=s.length,u=0;null!=e&&c>u;u++)if(e=r(e,s[u],!0),e&&e.isDestroyed)return void 0;return e};Ember.normalizeTuple=function(e,r){return t(e,r)},Ember.getWithDefault=function(e,t,n){var i=r(e,t);return void 0===i?n:i},Ember.get=r,Ember.getPath=Ember.deprecateFunc("getPath is deprecated since get now supports paths",Ember.get)}(),function(){function e(e,t,r){for(var n=-1,i=0,s=e.length;s>i;i++)if(t===e[i][0]&&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],s=i&&i.listeners&&i.listeners[r];if(s)for(var o=s.length-1;o>=0;o--){var a=s[o][0],u=s[o][1],c=s[o][2],h=e(n,a,u);-1===h&&n.push([a,u,c])}}function n(t,r,n){var i=t[p],s=i&&i.listeners&&i.listeners[r],o=[];if(s){for(var a=s.length-1;a>=0;a--){var u=s[a][0],c=s[a][1],h=s[a][2],l=e(n,u,c);-1===l&&(n.push([u,c,h]),o.push([u,c,h]))}return o}}function i(r,n,i,s,o){s||"function"!=typeof i||(s=i,i=null);var a=t(r,n),u=e(a,i,s),c=0;o&&(c|=d),-1===u&&(a.push([i,s,c]),"function"==typeof r.didAddListener&&r.didAddListener(n,i,s))}function s(r,n,i,s){function o(i,s){var o=t(r,n),a=e(o,i,s);-1!==a&&(o.splice(a,1),"function"==typeof r.didRemoveListener&&r.didRemoveListener(n,i,s))}if(s||"function"!=typeof i||(s=i,i=null),s)o(i,s);else{var a=r[p],u=a&&a.listeners&&a.listeners[n];if(!u)return;for(var c=u.length-1;c>=0;c--)o(u[c][0],u[c][1])}}function o(r,n,i,s,o){function a(){return o.call(i)}function u(){c&&(c[2]&=~b)}s||"function"!=typeof i||(s=i,i=null);var c,h=t(r,n),l=e(h,i,s);return-1!==l&&(c=h[l].slice(),c[2]|=b,h[l]=c),Ember.tryFinally(a,u)}function a(r,n,i,s,o){function a(){return o.call(i)}function u(){for(m=0,f=p.length;f>m;m++)p[m][2]&=~b}s||"function"!=typeof i||(s=i,i=null);var c,h,l,m,f,p=[];for(m=0,f=n.length;f>m;m++){c=n[m],h=t(r,c);var d=e(h,i,s);-1!==d&&(l=h[d].slice(),l[2]|=b,h[d]=l,p.push(l))}return Ember.tryFinally(a,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 o=n.length-1;o>=0;o--){var a=n[o];if(a){var u=a[0],c=a[1],h=a[2];h&b||(h&d&&s(e,t,u,c),u||(u=e),"string"==typeof c&&(c=u[c]),r?c.apply(u,r):c.call(u))}}return!0}}function h(e,t){var r=e[p],n=r&&r.listeners&&r.listeners[t];return!(!n||!n.length)}function l(e,t){var r=[],n=e[p],i=n&&n.listeners&&n.listeners[t];if(!i)return r;for(var s=0,o=i.length;o>s;s++){var a=i[s][0],u=i[s][1];r.push([a,u])}return r}var m=Ember.create,f=Ember.meta,p=Ember.META_KEY,d=1,b=2;Ember.addListener=i,Ember.removeListener=s,Ember._suspendListener=o,Ember._suspendListeners=a,Ember.sendEvent=c,Ember.hasListeners=h,Ember.watchedEvents=u,Ember.listenersFor=l,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,s=this.observerSet,o=this.observers,a=e(t),u=s[a];return u||(s[a]=u={}),i=u[r],void 0===i&&(i=o.push({sender:t,keyName:r,eventName:n,listeners:[]})-1,u[r]=i),o[i].listeners},r.prototype.flush=function(){var e,r,n,i,s=this.observers;for(this.clear(),e=0,r=s.length;r>e;++e)n=s[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,i){if(!e.isDestroying){var s=n,o=!s;o&&(s=n={}),r(d,e,t,s,i),o&&(n=null)}}function t(e,t,n){if(!e.isDestroying){var s=i,o=!s;o&&(s=i={}),r(b,e,t,s,n),o&&(i=null)}}function r(e,t,r,n,i){var s=o(t);if(n[s]||(n[s]={}),!n[s][r]){n[s][r]=!0;var a=i.deps;if(a=a&&a[r])for(var u in a){var c=i.descs[u];c&&c._suspended===t||e(t,u)}}}var n,i,s=Ember.meta,o=Ember.guidFor,a=Ember.tryFinally,u=Ember.sendEvent,c=Ember.listenersUnion,h=Ember.listenersDiff,l=Ember._ObserverSet,m=new l,f=new l,p=0,d=Ember.propertyWillChange=function(t,r){var n=s(t,!1),i=n.watching[r]>0||"length"===r,o=n.proto,a=n.descs[r];i&&o!==t&&(a&&a.willChange&&a.willChange(t,r),e(t,r,n),E(t,r,n),w(t,r))},b=Ember.propertyDidChange=function(e,r){var n=s(e,!1),i=n.watching[r]>0||"length"===r,o=n.proto,a=n.descs[r];o!==e&&(a&&a.didChange&&a.didChange(e,r),(i||"length"===r)&&(t(e,r,n),v(e,r,n),_(e,r)))},E=function(e,t,r,n){if(r.hasOwnProperty("chainWatchers")){var i=r.chainWatchers;if(i=i[t])for(var s=0,o=i.length;o>s;s++)i[s].willChange(n)}},v=function(e,t,r,n){if(r.hasOwnProperty("chainWatchers")){var i=r.chainWatchers;if(i=i[t])for(var s=i.length-1;s>=0;s--)i[s].didChange(n)}};Ember.overrideChains=function(e,t,r){v(e,t,r,!0)};var g=Ember.beginPropertyChanges=function(){p++},y=Ember.endPropertyChanges=function(){p--,0>=p&&(m.clear(),f.flush())};Ember.changeProperties=function(e,t){g(),a(e,y,t)};var w=function(e,t){if(!e.isDestroying){var r,n,i=t+":before";p?(r=m.add(e,t,i),n=h(e,i,r),u(e,i,[e,t],n)):u(e,i,[e,t])}},_=function(e,t){if(!e.isDestroying){var r,n=t+":change";p?(r=f.add(e,t,n),c(e,n,r)):u(e,n,[e,t])}}}(),function(){function e(e,t,r,s){var o;if(o=t.slice(t.lastIndexOf(".")+1),t=t.slice(0,t.length-(o.length+1)),"this"!==t&&(e=n(e,t)),!o||0===o.length)throw new Error("You passed an empty path");if(!e){if(s)return;throw new Error("Object in path "+t+" could not be found or was destroyed.")}return i(e,o,r)}var t=Ember.META_KEY,r=Ember.ENV.MANDATORY_SETTER,n=Ember._getPath,i=function(n,i,s,o){if("string"==typeof n&&(s=i,i=n,n=null),!n||-1!==i.indexOf("."))return e(n,i,s,o);var a,u,c=n[t],h=c&&c.descs[i];return h?h.set(n,i,s):(a="object"==typeof n&&!(i in n),a&&"function"==typeof n.setUnknownProperty?n.setUnknownProperty(i,s):c&&c.watching[i]>0?(u=r?c.values[i]:n[i],s!==u&&(Ember.propertyWillChange(n,i),r?void 0!==u||i in n?c.values[i]=s:Ember.defineProperty(n,i,null,s):n[i]=s,Ember.propertyDidChange(n,i))):n[i]=s),s};Ember.config.overrideAccessors&&(Ember.set=i,Ember.config.overrideAccessors(),i=Ember.set),Ember.set=i,Ember.setPath=Ember.deprecateFunc("setPath is deprecated since set now supports paths",Ember.set),Ember.trySet=function(e,t,r){return i(e,t,r,!0)},Ember.trySetPath=Ember.deprecateFunc("trySetPath has been renamed to trySet",Ember.trySet)}(),function(){var e=(Ember.get,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},s=Ember.OrderedSet=function(){this.clear()};s.create=function(){return new s},s.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,s=this.list;delete i[n];var o=r.call(s,e);o>-1&&s.splice(o,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 s;return e.presenceSet=n(this.presenceSet),e.list=this.toArray(),e}};var o=Ember.Map=function(){this.keys=Ember.OrderedSet.create(),this.values={}};o.create=function(){return new o},o.prototype={length:0,get:function(e){var r=this.values,n=t(e);return r[n]},set:function(r,n){var i=this.keys,s=this.values,o=t(r);i.add(r),s[o]=n,e(this,"length",i.list.length)},remove:function(r){var n=this.keys,i=this.values,s=t(r);return i.hasOwnProperty(s)?(n.remove(r),delete i[s],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 s=t(n);e.call(r,n,i[s])})},copy:function(){return i(this,new o)}};var a=Ember.MapWithDefault=function(e){o.call(this),this.defaultValue=e.defaultValue};a.create=function(e){return e?new a(e):new o},a.prototype=Ember.create(o.prototype),a.prototype.get=function(e){var t=this.has(e);if(t)return o.prototype.get.call(this,e);var r=this.defaultValue(e);return this.set(e,r),r},a.prototype.copy=function(){return i(this,new a({defaultValue:this.defaultValue}))}}(),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(){},s=Ember.DEFAULT_GETTER_FUNCTION=function(t){return function(){var r=this[e];return r&&r.values[t]}};Ember.defineProperty=function(e,o,a,u,c){var h,l,m,f;return c||(c=t(e)),h=c.descs,l=c.descs[o],m=c.watching[o]>0,l instanceof Ember.Descriptor&&l.teardown(e,o),a instanceof Ember.Descriptor?(f=a,h[o]=a,n&&m?r(e,o,{configurable:!0,enumerable:!0,writable:!0,value:void 0}):e[o]=void 0,a.setup(e,o)):(h[o]=void 0,null==a?(f=u,n&&m?(c.values[o]=u,r(e,o,{configurable:!0,enumerable:!0,set:i,get:s(o)})):e[o]=u):(f=a,r(e,o,a))),m&&Ember.overrideChains(e,o,c),e.didDefineProperty&&e.didDefineProperty(e,o,f),this}}(),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,s){if("length"!==s||"array"!==t(i)){var o,a=e(i),u=a.watching;u[s]?u[s]=(u[s]||0)+1:(u[s]=1,o=a.descs[s],o&&o.willWatch&&o.willWatch(i,s),"function"==typeof i.willWatchProperty&&i.willWatchProperty(s),r&&s in i&&(a.values[s]=i[s],n(i,s,{configurable:!0,enumerable:!0,set:Ember.MANDATORY_SETTER_FUNCTION,get:Ember.DEFAULT_GETTER_FUNCTION(s)})))}},Ember.unwatchKey=function(t,i){var s,o=e(t),a=o.watching;1===a[i]?(a[i]=0,s=o.descs[i],s&&s.didUnwatch&&s.didUnwatch(t,i),"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(m)[0]}function t(e,t,r){if(e&&"object"==typeof e){var i=n(e),s=i.chainWatchers;i.hasOwnProperty("chainWatchers")||(s=i.chainWatchers={}),s[t]||(s[t]=[]),s[t].push(r),u(e,t)}}function r(e){return n(e,!1).proto===e}var n=Ember.meta,i=Ember.get,s=Ember.normalizeTuple,o=Ember.ArrayPolyfills.forEach,a=Ember.warn,u=Ember.watchKey,c=Ember.unwatchKey,h=Ember.propertyWillChange,l=Ember.propertyDidChange,m=/^([^\.\*]+)/,f=[];Ember.flushPendingChains=function(){if(0!==f.length){var e=f;f=[],o.call(e,function(e){e[0].add(e[1])}),a("Watching an undefined global, Ember expects watched globals to be setup by the time the run loop is flushed, check for typos",0===f.length)}};var p=Ember.removeChainWatcher=function(e,t,r){if(e&&"object"==typeof e){var i=n(e,!1);if(i.hasOwnProperty("chainWatchers")){var s=i.chainWatchers;if(s[t]){s=s[t];for(var o=0,a=s.length;a>o;o++)s[o]===r&&s.splice(o,1)}c(e,t)}}},d=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()},b=d.prototype;b.value=function(){if(void 0===this._value&&this._watching){var e=this._parent.value();this._value=e&&!r(e)?i(e,this._key):void 0}return this._value},b.destroy=function(){if(this._watching){var e=this._object;e&&p(e,this._key,this),this._watching=!1}},b.copy=function(e){var t,r=new d(null,null,e),n=this._paths;for(t in n)n[t]<=0||r.add(t);return r},b.add=function(t){var r,n,i,o,a;if(a=this._paths,a[t]=(a[t]||0)+1,r=this.value(),n=s(r,t),n[0]&&n[0]===r)t=n[1],i=e(t),t=t.slice(i.length+1);else{if(!n[0])return f.push([this,t]),n.length=0,void 0;o=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]}n.length=0,this.chain(i,t,o)},b.remove=function(t){var r,n,i,o,a;a=this._paths,a[t]>0&&a[t]--,r=this.value(),n=s(r,t),n[0]===r?(t=n[1],i=e(t),t=t.slice(i.length+1)):(o=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]),n.length=0,this.unchain(i,t)},b.count=0,b.chain=function(t,r,n){var i,s=this._chains;s||(s=this._chains={}),i=s[t],i||(i=s[t]=new d(this,t,n)),i.count++,r&&r.length>0&&(t=e(r),r=r.slice(t.length+1),i.chain(t,r))},b.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())},b.willChange=function(){var e=this._chains;if(e)for(var t in e)e.hasOwnProperty(t)&&e[t].willChange();this._parent&&this._parent.chainWillChange(this,this._key,1)},b.chainWillChange=function(e,t,r){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainWillChange(this,t,r+1):(r>1&&h(this.value(),t),t="this."+t,this._paths[t]>0&&h(this.value(),t))},b.chainDidChange=function(e,t,r){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainDidChange(this,t,r+1):(r>1&&l(this.value(),t),t="this."+t,this._paths[t]>0&&l(this.value(),t))},b.didChange=function(e){if(this._watching){var r=this._parent.value();r!==this._object&&(p(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);e||this._parent&&this._parent.chainDidChange(this,this._key,1)},Ember.finishChains=function(e){var t=n(e,!1),r=t.chains;r&&(r.value()!==e&&(t.chains=r=r.copy(e)),r.didChange(!0))}}(),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 s=t(n),o=s.watching;o[i]?o[i]=(o[i]||0)+1:(o[i]=1,e(n).add(i))}},Ember.unwatchPath=function(r,n){var i=t(r),s=i.watching;1===s[n]?(s[n]=0,e(r).remove(n)):s[n]>1&&s[n]--}}(),function(){function e(e){return"*"===e||!l.test(e)}var t=Ember.meta,r=Ember.GUID_KEY,n=Ember.META_KEY,i=Ember.removeChainWatcher,s=Ember.watchKey,o=Ember.unwatchKey,a=Ember.watchPath,u=Ember.unwatchPath,c=Ember.typeOf,h=Ember.generateGuid,l=/[\.\*]/;Ember.watch=function(t,r){("length"!==r||"array"!==c(t))&&(e(r)?s(t,r):a(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)?o(t,r):u(t,r))},Ember.rewatch=function(e){var n=t(e,!1),i=n.chains;r in e&&!e.hasOwnProperty(r)&&h(e,"ember"),i&&i.value()!==e&&(n.chains=i.copy(e))};var m=[];Ember.destroy=function(e){var t,r,s,o,a=e[n];if(a&&(e[n]=null,t=a.chains))for(m.push(t);m.length>0;){if(t=m.pop(),r=t._chains)for(s in r)r.hasOwnProperty(s)&&m.push(r[s]);t._watching&&(o=t._object,o&&i(o,t._key,t))}}}(),function(){function e(e,t){var r=e[t];return r?e.hasOwnProperty(t)||(r=e[t]=m(r)):r=e[t]={},r}function t(t){return e(t,"deps")}function r(r,n,i,s){var o,a,u,c,h,l=r._dependentKeys;if(l)for(o=t(s),a=0,u=l.length;u>a;a++)c=l[a],h=e(o,c),h[i]=(h[i]||0)+1,p(n,c)}function n(r,n,i,s){var o,a,u,c,h,l=r._dependentKeys;if(l)for(o=t(s),a=0,u=l.length;u>a;a++)c=l[a],h=e(o,c),h[i]=(h[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 s(e,t){for(var r={},n=0;n<t.length;n++)r[t[n]]=u(e,t[n]);return r}function o(e,t){Ember.computed[e]=function(e){var r=l.call(arguments);return Ember.computed(e,function(){return t.apply(this,r)})}}function a(e,t){Ember.computed[e]=function(){var e=l.call(arguments),r=Ember.computed(function(){return t.apply(this,[s(this,e)])});return r.property.apply(r,e)}}var u=Ember.get,c=Ember.set,h=Ember.meta,l=[].slice,m=Ember.create,f=Ember.META_KEY,p=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(){for(var e=[],t=0,r=arguments.length;r>t;t++)e.push(arguments[t]);return this._dependentKeys=e,this},b.meta=function(e){return 0===arguments.length?this._meta||{}:(this._meta=e,this)},b.willWatch=function(e,t){var n=e[f];t in n.cache||r(this,e,t,n)},b.didUnwatch=function(e,t){var r=e[f];t in r.cache||n(this,e,t,r)},b.didChange=function(e,t){if(this._cacheable&&this._suspended!==e){var r=h(e);t in r.cache&&(delete r.cache[t],r.watching[t]||n(this,e,t,r))}},b.get=function(e,t){var n,i,s;if(this._cacheable){if(s=h(e),i=s.cache,t in i)return i[t];n=i[t]=this.func.call(e,t),s.watching[t]||r(this,e,t,s)}else n=this.func.call(e,t);return n},b.set=function(e,t,n){var i,s,o=this._cacheable,a=this.func,u=h(e,o),c=u.watching[t],l=this._suspended,m=!1,f=u.cache;if(this._readOnly)throw new Error("Cannot Set: "+t+" on: "+e.toString());this._suspended=e;try{if(o&&f.hasOwnProperty(t)&&(i=f[t],m=!0),a.wrappedFunction&&(a=a.wrappedFunction),3===a.length)s=a.call(e,t,n,i);else{if(2!==a.length)return Ember.defineProperty(e,t,null,i),Ember.set(e,t,n),void 0;s=a.call(e,t,n)}if(m&&i===s)return;c&&Ember.propertyWillChange(e,t),m&&delete f[t],o&&(c||m||r(this,e,t,u),f[t]=s),c&&Ember.propertyDidChange(e,t)}finally{this._suspended=l}return s},b.setup=function(e,t){var n=e[f];n&&n.watching[t]&&r(this,e,t,h(e))},b.teardown=function(e,t){var r=h(e);return(r.watching[t]||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=l.call(arguments,0,-1),e=l.call(arguments,-1)[0]),"function"!=typeof e)throw new 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},o("empty",function(e){return Ember.isEmpty(u(this,e))}),o("notEmpty",function(e){return!Ember.isEmpty(u(this,e))}),o("none",function(e){return Ember.isNone(u(this,e))}),o("not",function(e){return!u(this,e)}),o("bool",function(e){return!!u(this,e)}),o("match",function(e,t){var r=u(this,e);return"string"==typeof r?!!r.match(t):!1}),o("equal",function(e,t){return u(this,e)===t}),o("gt",function(e,t){return u(this,e)>t}),o("gte",function(e,t){return u(this,e)>=t}),o("lt",function(e,t){return u(this,e)<t}),o("lte",function(e,t){return u(this,e)<=t}),a("and",function(e){for(var t in e)if(e.hasOwnProperty(t)&&!e[t])return!1;return!0}),a("or",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!0;return!1}),a("any",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return e[t];return null}),a("map",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?(c(this,e,r),r):u(this,e)})},Ember.computed.oneWay=function(e){return Ember.computed(e,function(){return u(this,e)})},Ember.computed.defaultTo=function(e){return Ember.computed(function(t,r,n){return 1===arguments.length?null!=n?n:u(this,e):null!=r?r:u(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,s){return Ember._suspendListener(e,t(r),n,i,s)},Ember._suspendObserver=function(t,r,n,i,s){return Ember._suspendListener(t,e(r),n,i,s)};var i=Ember.ArrayPolyfills.map;Ember._suspendBeforeObservers=function(e,r,n,s,o){var a=i.call(r,t);return Ember._suspendListeners(e,a,n,s,o)},Ember._suspendObservers=function(t,r,n,s,o){var a=i.call(r,e);return Ember._suspendListeners(t,a,n,s,o)},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",["backburner/deferred_action_queues","exports"],function(e,t){"use strict";function r(e,t){this.queueNames=e,this.options=t||{},this.options.defaultQueue||(this.options.defaultQueue=e[0]),this.instanceStack=[]}function n(e){e.begin(),s=window.setTimeout(function(){e.end(),s=null})}function i(e){var t,r,n,s,u=+new Date;e.run(function(){for(n=0,s=m.length;s>n&&(t=m[n],!(t>u));n+=2);for(r=m.splice(0,n),n=1,s=r.length;s>n;n+=2)e.schedule(e.options.defaultQueue,null,r[n])}),m.length&&(o=window.setTimeout(function(){i(e),o=null,a=null},m[0]-u),a=m[0])}var s,o,a,u=e.DeferredActionQueues,c=[].slice,h=[].pop,l=[],m=[];r.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 u(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)
|
16
|
-
}},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,c.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 i=this.DEBUG?(new Error).stack:void 0,s=arguments.length>3?c.call(arguments,3):void 0;return this.currentInstance||n(this),this.currentInstance.schedule(e,t,r,s,!1,i)},deferOnce:function(e,t,r){r||(r=t,t=null),"string"==typeof r&&(r=t[r]);var i=this.DEBUG?(new Error).stack:void 0,s=arguments.length>3?c.call(arguments,3):void 0;return this.currentInstance||n(this),this.currentInstance.schedule(e,t,r,s,!0,i)},setTimeout:function(){var e=this,t=h.call(arguments),r=arguments[0],n=arguments[1],s=+new Date+t;n||(n=r,r=null),"string"==typeof n&&(n=r[n]);var u,l;arguments.length>2?(l=c.call(arguments,2),u=function(){n.apply(r,l)}):u=function(){n.call(r)};var f,p;for(f=0,p=m.length;p>f&&!(s<m[f]);f+=2);return m.splice(f,0,s,u),o&&s>a?u:(o&&(clearTimeout(o),o=null),o=window.setTimeout(function(){i(e),o=null,a=null},t),a=s,u)},debounce:function(e,t){for(var r,n=this,i=arguments,s=h.call(i),o=0,a=l.length;a>o;o++)if(r=l[o],r[0]===e&&r[1]===t)return;var u=window.setTimeout(function(){n.run.apply(n,i);for(var s=-1,o=0,a=l.length;a>o;o++)if(r=l[o],r[0]===e&&r[1]===t){s=o;break}s>-1&&l.splice(s,1)},s);l.push([e,t,u])},cancelTimers:function(){for(var e=0,t=l.length;t>e;e++)clearTimeout(l[e][2]);l=[],o&&(clearTimeout(o),o=null),m=[],s&&(clearTimeout(s),s=null)},hasTimers:function(){return!!m.length||s},cancel:function(e){if("object"==typeof e&&e.queue&&e.method)return e.queue.cancel(e);if("function"==typeof e)for(var t=0,r=m.length;r>t;t+=2)if(m[t+1]===e)return m.splice(t,2),!0}},r.prototype.schedule=r.prototype.defer,r.prototype.scheduleOnce=r.prototype.deferOnce,r.prototype.later=r.prototype.setTimeout,t.Backburner=r}),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,s=0,o=e.length;o>s;s++)n=e[s],r[n]=new i(this,n,t[n])}function n(e,t){for(var r,n,i=0,s=t;s>=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,s){var o=this.queues,a=o[e];if(!a)throw new Error("You attempted to schedule an action in a queue ("+e+") that doesn't exist");return i?a.pushUnique(t,r,n,s):a.push(t,r,n,s)},flush:function(){for(var e,t,r,i,s=this.queues,o=this.queueNames,a=0,u=o.length;u>a;){e=o[a],t=s[e],r=t._queue.slice(),t._queue=[];var c,h,l,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],h=r[b+1],l=r[b+2],m=r[b+3],"string"==typeof h&&(h=c[h]),l&&l.length>0?h.apply(c,l):h.call(c),b+=4;E&&d&&d(),-1===(i=n(this,a))?a++:a=i}}},t.DeferredActionQueues=r}),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,s,o,a,u=this._queue;for(o=0,a=u.length;a>o;o+=4)if(i=u[o],s=u[o+1],i===e&&s===t)return u[o+2]=r,u[o+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,s=this._queue,o=this.options,a=o&&o.before,u=o&&o.after,c=s.length;for(c&&a&&a(),i=0;c>i;i+=4)e=s[i],t=s[i+1],r=s[i+2],n=s[i+3],r&&r.length>0?t.apply(e,r):t.call(e);c&&u&&u(),s.length>c?(this._queue=s.slice(c),this.flush()):this._queue.length=0},cancel:function(e){var t,r,n,i,s=this._queue;for(n=0,i=s.length;i>n;n+=4)if(t=s[n],r=s[n+1],t===e.target&&r===e.method)return s.splice(n,4),!0}},e.Queue=t})}(),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,s=new i(["sync","actions","destroy"],{sync:{before:Ember.beginPropertyChanges,after:Ember.endPropertyChanges},defaultQueue:"actions",onBegin:r,onEnd:n}),o=[].slice;Ember.run=function(){var e;if(Ember.onerror)try{e=s.run.apply(s,arguments)}catch(t){Ember.onerror(t)}else e=s.run.apply(s,arguments);return e},Ember.run.join=function(){if(!Ember.run.currentRunLoop)return Ember.run.apply(Ember.run,arguments);var e=o.call(arguments);e.unshift("actions"),Ember.run.schedule.apply(Ember.run,e)},Ember.run.backburner=s,Ember.run,Ember.run.currentRunLoop=null,Ember.run.queues=s.queueNames,Ember.run.begin=function(){s.begin()},Ember.run.end=function(){s.end()},Ember.run.schedule=function(){e(),s.schedule.apply(s,arguments)},Ember.run.hasScheduledTimers=function(){return s.hasTimers()},Ember.run.cancelTimers=function(){s.cancelTimers()},Ember.run.sync=function(){s.currentInstance.queues.sync.flush()},Ember.run.later=function(){return s.later.apply(s,arguments)},Ember.run.once=function(){e();var t=o.call(arguments);return t.unshift("actions"),s.scheduleOnce.apply(s,t)},Ember.run.scheduleOnce=function(){return e(),s.scheduleOnce.apply(s,arguments)},Ember.run.next=function(){var e=o.call(arguments);return e.push(1),s.later.apply(s,e)},Ember.run.cancel=function(e){return s.cancel(e)}}(),function(){function e(e,t){return r(s(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$]))/,s=Ember.isGlobalPath=function(e){return i.test(e)},o=function(e,t){this._direction="fwd",this._from=t,this._to=e,this._directionMap=Ember.Map.create()};o.prototype={copy:function(){var e=new o(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,s=i.get(t),o=this._from,a=this._to;if(i.remove(t),"fwd"===s){var u=e(t,this._from);n&&Ember.Logger.log(" ",this.toString(),"->",u,t),this._oneWay?Ember.trySet(t,a,u):Ember._suspendObserver(t,a,this,this.toDidChange,function(){Ember.trySet(t,a,u)})}else if("back"===s){var c=r(t,this._to);n&&Ember.Logger.log(" ",this.toString(),"<-",c,t),Ember._suspendObserver(t,o,this,this.fromDidChange,function(){Ember.trySet(Ember.isGlobalPath(o)?Ember.lookup:t,o,c)})}}}},t(o,{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=o,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=P(r)):r=t.mixins={},r}function t(e,t){return t&&t.length>0&&(e.mixins=_.call(t,function(e){if(e instanceof g)return e;var t=new g;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 g?(r=x(t),e[r]?V:(e[r]=t,t.properties)):t}function i(e,t,r){var n;return n=t.concatenatedProperties||r.concatenatedProperties,e.concatenatedProperties&&(n=n?n.concat(e.concatenatedProperties):e.concatenatedProperties),n}function s(e,t,r,n,i){var s;return void 0===n[t]&&(s=i[t]),s=s||e.descs[t],s&&s instanceof Ember.ComputedProperty?(r=P(r),r.func=Ember.wrap(r.func,s.func),r):r}function o(e,t,r,n,i){var s;return void 0===i[t]&&(s=n[t]),s=s||e[t],"function"!=typeof s?r:Ember.wrap(r,s)}function a(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,u,c,h){if(n instanceof Ember.Descriptor){if(n===y&&u[t])return V;n.func&&(n=s(i,t,n,c,u)),u[t]=n,c[t]=void 0}else r(n)?n=o(e,t,n,c,u):(h&&C.call(h,t)>=0||"concatenatedProperties"===t)&&(n=a(e,t,n,c)),u[t]=void 0,c[t]=n}function c(e,t,r,s,o,a){function h(e){delete r[e],delete s[e]}for(var l,m,f,p,d,b=0,E=e.length;E>b;b++)if(l=e[b],m=n(t,l),m!==V)if(m){d=Ember.meta(o),p=i(m,s,o);for(f in m)m.hasOwnProperty(f)&&(a.push(f),u(o,f,m[f],d,r,s,p));m.hasOwnProperty("toString")&&(o.toString=m.toString)}else l.mixins&&(c(l.mixins,t,r,s,o,a),l._without&&O.call(l._without,h))}function h(e,t,r,n){if(D.test(t)){var i=n.bindings;i?n.hasOwnProperty("bindings")||(i=n.bindings=P(n.bindings)):i=n.bindings={},i[t]=r}}function l(e,t){var r,n,i,s=t.bindings;if(s){for(r in s)n=s[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 m(e,t){return l(e,t||Ember.meta(e)),e}function f(e,t,r,n,i){var s,o=t.methodName;return n[o]||i[o]?(s=i[o],t=n[o]):r.descs[o]?(t=r.descs[o],s=void 0):(t=void 0,s=e[o]),{desc:t,value:s}}function p(e,t,r,n,i){if("function"==typeof r){var s=r[n];if(s)for(var o=0,a=s.length;a>o;o++)Ember[i](e,s[o],null,t)}}function d(e,t,r){var n=e[t];p(e,t,n,"__ember_observesBefore__","removeBeforeObserver"),p(e,t,n,"__ember_observes__","removeObserver"),p(e,t,r,"__ember_observesBefore__","addBeforeObserver"),p(e,t,r,"__ember_observes__","addObserver")}function b(t,r,n){var i,s,o,a={},u={},l=Ember.meta(t),p=[];c(r,e(t),a,u,t,p);for(var b=0,E=p.length;E>b;b++)if(i=p[b],"constructor"!==i&&u.hasOwnProperty(i)&&(o=a[i],s=u[i],o!==y)){for(;o&&o instanceof w;){var v=f(t,o,l,a,u);o=v.desc,s=v.value}(void 0!==o||void 0!==s)&&(d(t,i,s),h(t,i,s,l),A(t,i,o,s,l))}return n||m(t,l),t}function E(e,t,r){var n=x(e);if(r[n])return!1;if(r[n]=!0,e===t)return!0;for(var i=e.mixins,s=i?i.length:0;--s>=0;)if(E(i[s],t,r))return!0;return!1}function v(e,t,r){if(!r[x(t)])if(r[x(t)]=!0,t.properties){var n=t.properties;for(var i in n)n.hasOwnProperty(i)&&(e[i]=!0)}else t.mixins&&O.call(t.mixins,function(t){v(e,t,r)})}var g,y,w,_=Ember.ArrayPolyfills.map,C=Ember.ArrayPolyfills.indexOf,O=Ember.ArrayPolyfills.forEach,S=[].slice,P=Ember.create,A=Ember.defineProperty,x=Ember.guidFor,V={},D=Ember.IS_BINDING=/^.+Binding$/;Ember.mixin=function(e){var t=S.call(arguments,1);return b(e,t,!1),e},Ember.Mixin=function(){return t(this,arguments)},g=Ember.Mixin,g.prototype={properties:null,mixins:null,ownerConstructor:null},g._apply=b,g.applyPartial=function(e){var t=S.call(arguments,1);return b(e,t,!0)},g.finishPartial=m,Ember.anyUnprocessedMixins=!1,g.create=function(){Ember.anyUnprocessedMixins=!0;var e=this;return t(new e,arguments)};var T=g.prototype;T.reopen=function(){var e,t;this.properties?(e=g.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 g?i.push(e):(t=g.create(),t.properties=e,i.push(t));return this},T.apply=function(e){return b(e,[this],!1)},T.applyPartial=function(e){return b(e,[this],!0)},T.detect=function(e){if(!e)return!1;if(e instanceof g)return E(e,this,{});var t=Ember.meta(e,!1).mixins;return t?!!t[x(this)]:!1},T.without=function(){var e=new g(this);return e._without=S.call(arguments),e},T.keys=function(){var e={},t={},r=[];v(e,this,t);for(var n in e)e.hasOwnProperty(n)&&r.push(n);return r},g.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},y=new Ember.Descriptor,y.toString=function(){return"(Required Property)"},Ember.required=function(){return y},w=function(e){this.methodName=e},w.prototype=new Ember.Descriptor,Ember.alias=function(e){return new w(e)},Ember.alias=Ember.deprecateFunc("Ember.alias is deprecated. Please use Ember.aliasMethod or Ember.computed.alias instead.",Ember.alias),Ember.aliasMethod=function(e){return new w(e)},Ember.observer=function(e){var t=S.call(arguments,1);return e.__ember_observes__=t,e},Ember.immediateObserver=function(){for(var e=0,t=arguments.length;t>e;e++)arguments[e];return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(e){var t=S.call(arguments,1);return e.__ember_observesBefore__=t,e}}(),function(){e("rsvp/all",["rsvp/defer","exports"],function(e,t){"use strict";function r(e){var t=[],r=n(),i=e.length;0===i&&r.resolve([]);for(var s=function(e){return function(t){o(e,t)}},o=function(e,n){t[e]=n,0===--i&&r.resolve(t)},a=function(e){r.reject(e)},u=0;u<e.length;u++)e[u]&&"function"==typeof e[u].then?e[u].then(s(u),a):o(u,e[u]);return r.promise}var n=e.defer;t.all=r}),e("rsvp/async",["exports"],function(e){"use strict";var t,r="undefined"!=typeof window?window:{},n=r.MutationObserver||r.WebKitMutationObserver;if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))t=function(e,t){process.nextTick(function(){e.call(t)})};else if(n){var i=[],s=new n(function(){var e=i.slice();i=[],e.forEach(function(e){var t=e[0],r=e[1];t.call(r)})}),o=document.createElement("div");s.observe(o,{attributes:!0}),window.addEventListener("unload",function(){s.disconnect(),s=null}),t=function(e,t){i.push([e,t]),o.setAttribute("drainQueue","drainQueue")}}else t=function(e,t){setTimeout(function(){e.call(t)},1)};e.async=t}),e("rsvp/config",["rsvp/async","exports"],function(e,t){"use strict";var r=e.async,n={};n.async=r,t.config=n}),e("rsvp/defer",["rsvp/promise","exports"],function(e,t){"use strict";function r(){var e={},t=new n(function(t,r){e.resolve=t,e.reject=r});return e.promise=t,e}var n=e.Promise;t.defer=r}),e("rsvp/events",["exports"],function(e){"use strict";var t=function(e,t){this.type=e;for(var r in t)t.hasOwnProperty(r)&&(this[r]=t[r])},r=function(e,t){for(var r=0,n=e.length;n>r;r++)if(e[r][0]===t)return r;return-1},n=function(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t},i={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e},on:function(e,t,i){var s,o,a=n(this);for(e=e.split(/\s+/),i=i||this;o=e.shift();)s=a[o],s||(s=a[o]=[]),-1===r(s,t)&&s.push([t,i])},off:function(e,t){var i,s,o,a=n(this);for(e=e.split(/\s+/);s=e.shift();)t?(i=a[s],o=r(i,t),-1!==o&&i.splice(o,1)):a[s]=[]},trigger:function(e,r){var i,s,o,a,u,c=n(this);if(i=c[e])for(var h=0;h<i.length;h++)s=i[h],o=s[0],a=s[1],"object"!=typeof r&&(r={detail:r}),u=new t(e,r),o.call(a,u)}};e.EventTarget=i}),e("rsvp/hash",["rsvp/defer","exports"],function(e,t){"use strict";function r(e){var t=0;for(var r in e)t++;return t}function n(e){var t={},n=i(),s=r(e);0===s&&n.resolve({});var o=function(e){return function(t){a(e,t)}},a=function(e,r){t[e]=r,0===--s&&n.resolve(t)},u=function(e){n.reject(e)};for(var c in e)e[c]&&"function"==typeof e[c].then?e[c].then(o(c),u):a(c,e[c]);return n.promise}var i=e.defer;t.hash=n}),e("rsvp/node",["rsvp/promise","rsvp/all","exports"],function(e,t,r){"use strict";function n(e,t){return function(r,n){r?t(r):arguments.length>2?e(Array.prototype.slice.call(arguments,1)):e(n)}}function i(e){return function(){var t,r,i=Array.prototype.slice.call(arguments),a=new s(function(e,n){t=e,r=n});return o(i).then(function(i){i.push(n(t,r));try{e.apply(this,i)}catch(s){r(s)}}),a}}var s=e.Promise,o=t.all;r.denodeify=i}),e("rsvp/promise",["rsvp/config","rsvp/events","exports"],function(e,t,r){"use strict";function n(e){return i(e)||"object"==typeof e&&null!==e}function i(e){return"function"==typeof e}function s(e,t){e===t?a(e,t):o(e,t)||a(e,t)}function o(e,t){var r=null;if(n(t)){try{r=t.then}catch(o){return u(e,o),!0}if(i(r)){try{r.call(t,function(r){t!==r?s(e,r):a(e,r)},function(t){u(e,t)})}catch(o){u(e,o)}return!0}}return!1}function a(e,t){c.async(function(){e.trigger("promise:resolved",{detail:t}),e.isFulfilled=!0,e.fulfillmentValue=t})}function u(e,t){c.async(function(){e.trigger("promise:failed",{detail:t}),e.isRejected=!0,e.rejectedReason=t})}var c=e.config,h=t.EventTarget,l=function(e){var t=this,r=!1;if("function"!=typeof e)throw new TypeError("You must pass a resolver function as the sole argument to the promise constructor");if(!(t instanceof l))return new l(e);var n=function(e){r||(r=!0,s(t,e))},i=function(e){r||(r=!0,u(t,e))};this.on("promise:resolved",function(e){this.trigger("success",{detail:e.detail})},this),this.on("promise:failed",function(e){this.trigger("error",{detail:e.detail})},this);try{e(n,i)}catch(o){i(o)}},m=function(e,t,r,n){var a,c,h,l,m=i(r);if(m)try{a=r(n.detail),h=!0}catch(f){l=!0,c=f}else a=n.detail,h=!0;o(t,a)||(m&&h?s(t,a):l?u(t,c):"resolve"===e?s(t,a):"reject"===e&&u(t,a))};l.prototype={constructor:l,then:function(e,t){var r=new l(function(){});return this.isFulfilled&&c.async(function(){m("resolve",r,e,{detail:this.fulfillmentValue})},this),this.isRejected&&c.async(function(){m("reject",r,t,{detail:this.rejectedReason})},this),this.on("promise:resolved",function(t){m("resolve",r,e,t)}),this.on("promise:failed",function(e){m("reject",r,t,e)}),r}},h.mixin(l.prototype),r.Promise=l}),e("rsvp/reject",["rsvp/promise","exports"],function(e,t){"use strict";function r(e){return new n(function(t,r){r(e)})}var n=e.Promise;t.reject=r}),e("rsvp/resolve",["rsvp/promise","exports"],function(e,t){"use strict";function r(e){return"function"==typeof e||"object"==typeof e&&null!==e}function n(e){var t=new i(function(t,n){var i;try{r(e)?(i=e.then,"function"==typeof i?i.call(e,t,n):t(e)):t(e)}catch(s){n(s)}});return t}var i=e.Promise;t.resolve=n}),e("rsvp",["rsvp/events","rsvp/promise","rsvp/node","rsvp/all","rsvp/hash","rsvp/defer","rsvp/config","rsvp/resolve","rsvp/reject","exports"],function(e,t,r,n,i,s,o,a,u,c){"use strict";function h(e,t){E[e]=t}var l=e.EventTarget,m=t.Promise,f=r.denodeify,p=n.all,d=i.hash,b=s.defer,E=o.config,v=a.resolve,g=u.reject;c.Promise=m,c.EventTarget=l,c.all=p,c.hash=d,c.defer=b,c.denodeify=f,c.configure=h,c.resolve=v,c.reject=g})}(),function(){e("container",[],function(){function e(e){this.parent=e,this.dict={}}function t(t){this.parent=t,this.children=[],this.resolver=t&&t.resolver||function(){},this.registry=new e(t&&t.registry),this.cache=new e(t&&t.cache),this.typeInjections=new e(t&&t.typeInjections),this.injections={},this._options=new e(t&&t._options),this._typeOptions=new e(t&&t._typeOptions)}function r(e){throw new Error(e+" is not currently supported on child containers")}function n(e,t){var r=s(e,t,"singleton");return r!==!1}function i(e,t){var r={};if(!t)return r;for(var n,i,s=0,o=t.length;o>s;s++)n=t[s],i=e.lookup(n.fullName),r[n.property]=i;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 o(e,t){var r=e.normalize(t);return e.resolve(r)}function a(e,t){var r,n=o(e,t),a=t.split(":"),u=a[0];if(s(e,t,"instantiate")===!1)return n;if(n){var c=[];c=c.concat(e.typeInjections.get(u)||[]),c=c.concat(e.injections[t]||[]);var h=i(e,c);return h.container=e,h._debugContainerKey=t,r=n.create(h)}}function u(e,t){e.cache.eachLocal(function(r,n){s(e,r,"instantiate")!==!1&&t(n)})}function c(e){e.cache.eachLocal(function(t,r){s(e,t,"instantiate")!==!1&&r.destroy()}),e.cache.dict={}}return e.prototype={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},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={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,n){var i;-1!==e.indexOf(":")?(n=r,r=t,i=e):i=e+":"+t;var s=this.normalize(i);this.registry.set(s,r),this._options.set(s,n||{})},resolve:function(e){return this.resolver(e)||this.registry.get(e)},normalize:function(e){return e},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=a(this,e);return r?(n(this,e)&&t.singleton!==!1&&this.cache.set(e,r),r):void 0},has:function(e){return this.cache.has(e)?!0:!!o(this,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");var i=this.typeInjections.get(e);i||(i=[],this.typeInjections.set(e,i)),i.push({property:t,fullName:n})},injection:function(e,t,n){if(this.parent&&r("injection"),-1===e.indexOf(":"))return this.typeInjection(e,t,n);var i=this.injections[e]=this.injections[e]||[];i.push({property:t,fullName:n})},destroy:function(){this.isDestroyed=!0;for(var e=0,t=this.children.length;t>e;e++)this.children[e].destroy();this.children=[],u(this,function(e){e.destroy()}),delete this.parent,this.isDestroyed=!0},reset:function(){for(var e=0,t=this.children.length;t>e;e++)c(this.children[e]);c(this)}},t})}(),function(){function e(r,n,i,s){var o,a,u;if("object"!=typeof r||null===r)return r;if(n&&(a=t(i,r))>=0)return s[a];if("array"===Ember.typeOf(r)){if(o=r.slice(),n)for(a=o.length;--a>=0;)o[a]=e(o[a],n,i,s)}else if(Ember.Copyable&&Ember.Copyable.detect(r))o=r.copy(n,i,s);else{o={};for(u in r)r.hasOwnProperty(u)&&"__"!==u.substring(0,2)&&(o[u]=n?e(r[u],n,i,s):r[u])}return n&&(i.push(r),s.push(o)),o}var t=Ember.EnumerableUtils.indexOf;Ember.compare=function n(e,t){if(e===t)return 0;var r=Ember.typeOf(e),i=Ember.typeOf(t),s=Ember.Comparable;if(s){if("instance"===r&&s.detect(e.constructor))return e.constructor.compare(e,t);if("instance"===i&&s.detect(t.constructor))return 1-t.constructor.compare(t,e)}var o=Ember.ORDER_DEFINITION_MAPPING;if(!o){var a=Ember.ORDER_DEFINITION;o=Ember.ORDER_DEFINITION_MAPPING={};var u,c;for(u=0,c=a.length;c>u;++u)o[a[u]]=u;delete Ember.ORDER_DEFINITION}var h=o[r],l=o[i];if(l>h)return-1;if(h>l)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=n(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.inspect=function(e){if("object"!=typeof e||null===e)return e+"";var t,r=[];for(var n in e)if(e.hasOwnProperty(n)){if(t=e[n],"toString"===t)continue;"function"===Ember.typeOf(t)&&(t="function() { ... }"),r.push(n+": "+t)}return"{"+r.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)&&(Ember.keys=function(e){var t=[];for(var r in e)"__"!==r.substring(0,2)&&"_super"!==r&&e.hasOwnProperty(r)&&t.push(r);return t});var r=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){for(var e=Error.apply(this,arguments),t=0;t<r.length;t++)this[r[t]]=e[r[t]]},Ember.Error.prototype=Ember.create(Error.prototype)}(),function(){Ember.RSVP=t("rsvp")}(),function(){var e=/[ _]/g,t={},r=/([a-z])([A-Z])/g,n=/(\-|_|\.|\s)+(.)?/g,i=/([a-z\d])([A-Z]+)/g,s=/\-|\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,0)-1:r++,e=t[n],(null===e?"(null)":void 0===e?"":e).toString()})},loc:function(e,t){return e=Ember.STRINGS[e]||e,Ember.String.fmt(e,t)},w:function(e){return e.split(/\s+/)},decamelize:function(e){return e.replace(r,"$1_$2").toLowerCase()},dasherize:function(r){var n,i=t,s=i.hasOwnProperty(r);return s?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 s=Ember.String.camelize(t[n]);r.push(s.charAt(0).toUpperCase()+s.substr(1))}return r.join(".")},underscore:function(e){return e.replace(i,"$1_$2").replace(s,"_").toLowerCase()},capitalize:function(e){return e.charAt(0).toUpperCase()+e.substr(1)}}}(),function(){var e=Ember.String.fmt,t=Ember.String.w,r=Ember.String.loc,n=Ember.String.camelize,i=Ember.String.decamelize,s=Ember.String.dasherize,o=Ember.String.underscore,a=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 s(this)},String.prototype.underscore=function(){return o(this)},String.prototype.classify=function(){return u(this)},String.prototype.capitalize=function(){return a(this)})}(),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.observesBefore=function(){return this.__ember_observesBefore__=e.call(arguments),this})}(),function(){function e(){return 0===a.length?{}:a.pop()}function t(e){return a.push(e),null}function r(e,t){function r(r){var s=n(r,e);return i?t===s:!!s}var i=2===arguments.length;return r}var n=Ember.get,i=Ember.set,s=Array.prototype.slice,o=Ember.EnumerableUtils.indexOf,a=[];Ember.Enumerable=Ember.Mixin.create({isEnumerable:!0,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,s=e(),o=0,a=null;do a=i,i=this.nextObject(o++,a,s);while(void 0!==i);return t(s),a}).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 s=n(this,"length"),o=null,a=e();void 0===i&&(i=null);for(var u=0;s>u;u++){var c=this.nextObject(u,o,a);r.call(i,c,u,this),o=c}return o=null,a=t(a),this},getEach:function(e){return this.mapProperty(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,s){r[i]=e.call(t,n,i,s)}),r},mapProperty:function(e){return this.map(function(t){return n(t,e)})},filter:function(e,t){var r=Ember.A([]);return this.forEach(function(n,i,s){e.call(t,n,i,s)&&r.push(n)}),r},reject:function(e,t){return this.filter(function(){return!e.apply(t,arguments)})},filterProperty:function(){return this.filter(r.apply(this,arguments))},rejectProperty:function(e,t){var r=function(r){return n(r,e)===t},i=function(t){return!!n(t,e)},s=2===arguments.length?r:i;return this.reject(s)},find:function(r,i){var s=n(this,"length");void 0===i&&(i=null);for(var o,a,u=null,c=!1,h=e(),l=0;s>l&&!c;l++)o=this.nextObject(l,u,h),(c=r.call(i,o,l,this))&&(a=o),u=o;return o=u=null,h=t(h),a},findProperty:function(){return this.find(r.apply(this,arguments))},every:function(e,t){return!this.find(function(r,n,i){return!e.call(t,r,n,i)})},everyProperty:function(){return this.every(r.apply(this,arguments))},some:function(e,t){return!!this.find(function(r,n,i){return!!e.call(t,r,n,i)})},someProperty:function(){return this.some(r.apply(this,arguments))},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=s.call(arguments,1)),this.forEach(function(n,i){var s=n&&n[e];"function"==typeof s&&(r[i]=t?s.apply(n,t):s.call(n))},this),r},toArray:function(){var e=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){o(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",s=n(this,"hasEnumerableObservers");return s||Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.addListener(this,"@enumerable:before",e,r),Ember.addListener(this,"@enumerable:change",e,i),s||Ember.propertyDidChange(this,"hasEnumerableObservers"),this},removeEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",s=n(this,"hasEnumerableObservers");return s&&Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.removeListener(this,"@enumerable:before",e,r),Ember.removeListener(this,"@enumerable:change",e,i),s&&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,s;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,s=0>i||0>r||0!==i-r,-1===e&&(e=null),-1===t&&(t=null),Ember.propertyWillChange(this,"[]"),s&&Ember.propertyWillChange(this,"length"),Ember.sendEvent(this,"@enumerable:before",[this,e,t]),this},enumerableContentDidChange:function(e,t){var r,i,s;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,s=0>i||0>r||0!==i-r,-1===e&&(e=null),-1===t&&(t=null),Ember.sendEvent(this,"@enumerable:change",[this,e,t]),s&&Ember.propertyDidChange(this,"length"),Ember.propertyDidChange(this,"[]"),this}})}(),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([]),s=e(this,"length");for(t(r)&&(r=0),(t(n)||n>s)&&(n=s),0>r&&(r=s+r),0>n&&(n=s+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,!0)===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",s=e(this,"hasArrayObservers");return s||Ember.propertyWillChange(this,"hasArrayObservers"),Ember.addListener(this,"@array:before",t,n),Ember.addListener(this,"@array:change",t,i),s||Ember.propertyDidChange(this,"hasArrayObservers"),this},removeArrayObserver:function(t,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",s=e(this,"hasArrayObservers");return s&&Ember.propertyWillChange(this,"hasArrayObservers"),Ember.removeListener(this,"@array:before",t,n),Ember.removeListener(this,"@array:change",t,i),s&&Ember.propertyDidChange(this,"hasArrayObservers"),this
|
17
|
-
},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,s;if(t>=0&&r>=0&&e(this,"hasEnumerableObservers")){i=[],s=t+r;for(var o=t;s>o;o++)i.push(this.objectAt(o))}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 s,o;if(t>=0&&i>=0&&e(this,"hasEnumerableObservers")){s=[],o=t+i;for(var a=t;o>a;a++)s.push(this.objectAt(a))}else s=i;this.enumerableContentDidChange(r,s),Ember.sendEvent(this,"@array:change",[this,t,r,i]);var u=e(this,"length"),c=n(this,"firstObject"),h=n(this,"lastObject");return this.objectAt(0)!==c&&(Ember.propertyWillChange(this,"firstObject"),Ember.propertyDidChange(this,"firstObject")),this.objectAt(u-1)!==h&&(Ember.propertyWillChange(this,"lastObject"),Ember.propertyDidChange(this,"lastObject")),this},"@each":Ember.computed(function(){return this.__each||(this.__each=new Ember.EachProxy(this)),this.__each})})}(),function(){Ember.Comparable=Ember.Mixin.create({isComparable:!0,compare:Ember.required(Function)})}(),function(){var e=Ember.get;Ember.set,Ember.Copyable=Ember.Mixin.create({copy:Ember.required(Function),frozenCopy:function(){if(Ember.Freezable&&Ember.Freezable.detect(this))return e(this,"isFrozen")?this:this.copy().freeze();throw new Error(Ember.String.fmt("%@ does not support freezing",[this]))}})}(),function(){var e=Ember.get,t=Ember.set;Ember.Freezable=Ember.Mixin.create({isFrozen:!1,freeze:function(){return e(this,"isFrozen")?this:(t(this,"isFrozen",!0),this)}}),Ember.FROZEN_ERROR="Frozen object cannot be modified."}(),function(){var e=Ember.EnumerableUtils.forEach;Ember.MutableEnumerable=Ember.Mixin.create(Ember.Enumerable,{addObject:Ember.required(Function),addObjects:function(t){return Ember.beginPropertyChanges(this),e(t,function(e){this.addObject(e)},this),Ember.endPropertyChanges(this),this},removeObject:Ember.required(Function),removeObjects:function(t){return Ember.beginPropertyChanges(this),e(t,function(e){this.removeObject(e)},this),Ember.endPropertyChanges(this),this}})}(),function(){var e="Index out of range",t=[],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 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 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){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,t=Ember.set;Ember.Observable=Ember.Mixin.create({get:function(t){return e(this,t)},getProperties:function(){var t={},r=arguments;1===arguments.length&&"array"===Ember.typeOf(arguments[0])&&(r=arguments[0]);for(var n=0;n<r.length;n++)t[r[n]]=e(this,r[n]);return t},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")},getPath:function(e){return this.get(e)},setPath:function(e,t){return this.set(e,t)},getWithDefault:function(e,t){return Ember.getWithDefault(this,e,t)},incrementProperty:function(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(){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){t=t||{};var r=t.action||e(this,"action"),n=t.target||e(this,"targetObject"),i=t.actionContext||e(this,"actionContextObject")||this;if(n&&r){var s;return s=n.send?n.send.apply(n,[r,i]):n[r].apply(n,[i]),s!==!1&&(s=!0),s}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)},fire:function(){this.trigger.apply(this,arguments)},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)});var r=Ember.get;Ember.DeferredMixin=Ember.Mixin.create({then:function(e,t){function n(t){return t===s?e(o):e(t)}var i,s,o;return o=this,i=r(this,"_deferred"),s=i.promise,s.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(){Ember.Container=t("container"),Ember.Container.set=Ember.set}(),function(){function e(){var e,t,s=!1,o=function(){s||o.proto(),n(this,i,v),n(this,"_super",v);var u=a(this);if(u.proto=this,e){var h=e;e=null,this.reopen.apply(this,h)}if(t){var l=t;t=null;for(var m=this.concatenatedProperties,f=0,d=l.length;d>f;f++){var g=l[f];for(var y in g)if(g.hasOwnProperty(y)){var w=g[y],_=Ember.IS_BINDING;if(_.test(y)){var C=u.bindings;C?u.hasOwnProperty("bindings")||(C=u.bindings=r(u.bindings)):C=u.bindings={},C[y]=w}var O=u.descs[y];if(m&&E(m,y)>=0){var S=this[y];w=S?"function"==typeof S.concat?S.concat(w):Ember.makeArray(S).concat(w):Ember.makeArray(w)}O?O.set(this,y,w):"function"!=typeof this.setUnknownProperty||y in this?b?Ember.defineProperty(this,y,null,w):this[y]=w:this.setUnknownProperty(y,w)}}}p(this,u),delete u.proto,c(this),this.init.apply(this,arguments)};return o.toString=m.prototype.toString,o.willReopen=function(){s&&(o.PrototypeMixin=m.create(o.PrototypeMixin)),s=!1},o._initMixins=function(t){e=t},o._initProperties=function(e){t=e},o.proto=function(){var e=o.superclass;return e&&e.proto(),s||(s=!0,o.PrototypeMixin.applyPartial(o.prototype),u(o.prototype)),this.prototype},o}function t(e){return function(){return e}}var r=(Ember.set,Ember.get,Ember.create),n=Ember.platform.defineProperty,i=Ember.GUID_KEY,s=Ember.guidFor,o=Ember.generateGuid,a=Ember.meta,u=Ember.rewatch,c=Ember.finishChains,h=Ember.destroy,l=Ember.run.schedule,m=Ember.Mixin,f=m._apply,p=m.finishPartial,d=m.prototype.reopen,b=Ember.ENV.MANDATORY_SETTER,E=Ember.EnumerableUtils.indexOf,v={configurable:!0,writable:!0,enumerable:!1,value:void 0},g=e();g.toString=function(){return"Ember.CoreObject"},g.PrototypeMixin=m.create({reopen:function(){return f(this,arguments,!0),this},isInstance:!0,init:function(){},concatenatedProperties:null,isDestroyed:!1,isDestroying:!1,destroy:function(){return this.isDestroying?void 0:(this.isDestroying=!0,l("actions",this,this.willDestroy),l("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()+":"+s(this)+r+">";return this.toString=t(n),n}}),g.PrototypeMixin.ownerConstructor=g,Ember.config.overridePrototypeMixin&&Ember.config.overridePrototypeMixin(g.PrototypeMixin),g.__super__=null;var y=m.create({ClassMixin:Ember.required(),PrototypeMixin:Ember.required(),isClass:!0,isMethod:!1,extend:function(){var t,n=e();return n.ClassMixin=m.create(this.ClassMixin),n.PrototypeMixin=m.create(this.PrototypeMixin),n.ClassMixin.ownerConstructor=n,n.PrototypeMixin.ownerConstructor=n,d.apply(n.PrototypeMixin,arguments),n.superclass=this,n.__super__=this.prototype,t=n.prototype=r(this.prototype),t.constructor=n,o(t,"ember"),a(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(),d.apply(this.PrototypeMixin,arguments),this},reopenClass:function(){return d.apply(this.ClassMixin,arguments),f(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=a(this.proto(),!1).descs[e];return t._meta||{}},eachComputedProperty:function(e,t){var r,n=this.proto(),i=a(n).descs,s={};for(var o in i)r=i[o],r instanceof Ember.ComputedProperty&&e.call(t||this,o,r._meta||s)}});y.ownerConstructor=g,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(y),g.ClassMixin=y,y.apply(g),Ember.CoreObject=g}(),function(){Ember.Object=Ember.CoreObject.extend(Ember.Observable),Ember.Object.toString=function(){return"Ember.Object"}}(),function(){function e(t,r,i){var o=t.length;c[t.join(".")]=r;for(var a in r)if(h.call(r,a)){var u=r[a];if(t[o]=a,u&&u.toString===n)u.toString=s(t.join(".")),u[m]=t.join(".");else if(u&&u.isNamespace){if(i[l(u)])continue;i[l(u)]=!0,e(t,u,i)}}t.length=o}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(s){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{var t=r(this);e=t?"(subclass of "+t+")":"(unknown mixin)",this.toString=s(e)}return e}function i(){var r=!u.PROCESSED,n=Ember.anyUnprocessedMixins;if(r&&(t(),u.PROCESSED=!0),r||n){for(var i,s=u.NAMESPACES,o=0,a=s.length;a>o;o++)i=s[o],e([i.toString()],i,{});Ember.anyUnprocessedMixins=!1}}function s(e){return function(){return e}}var o=Ember.get,a=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=o(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(a.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,h={}.hasOwnProperty,l=Ember.guidFor,m=Ember.NAME_KEY=Ember.GUID_KEY+"_name";Ember.Mixin.prototype.toString=n}(),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(function(){this._teardownContent()},"content"),_teardownContent:function(){var e=r(this,"content");e&&e.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer(function(){r(this,"content"),this._setupContent()},"content"),_setupContent:function(){var e=r(this,"content");e&&e.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},_arrangedContentWillChange:Ember.beforeObserver(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)},"arrangedContent"),_arrangedContentDidChange:Ember.observer(function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this._setupArrangedContent(),this.arrangedContentDidChange(this),this.arrangedContentArrayDidChange(this,0,void 0,t)},"arrangedContent"),_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 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 s,o=r(this,"content"),a=r(this,"arrangedContent"),u=[];if(0>n||n>=r(this,"length"))throw new Error(e);for(void 0===i&&(i=1),s=n;n+i>s;s++)u.push(o.indexOf(a.objectAt(s)));for(u.sort(function(e,t){return t-e}),Ember.beginPropertyChanges(),s=0;s<u.length;s++)this._replace(u[s],1,t);Ember.endPropertyChanges()}return this},pushObject:function(e){return this._insertAt(r(this,"content.length"),e),e},pushObjects:function(e){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){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),s=Ember.addObserver,o=Ember.removeBeforeObserver,a=Ember.removeObserver,u=Ember.propertyWillChange,c=Ember.propertyDidChange;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer(function(){},"content"),isTruthy:Ember.computed.bool("content"),_debugContainerKey:null,willWatchProperty:function(r){var n="content."+r;i(this,n,null,e),s(this,n,null,t)},didUnwatchProperty:function(r){var n="content."+r;o(this,n,null,e),a(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=r(this,"content");return n(i,e,t)}}),Ember.ObjectProxy.reopenClass({create:function(){var e,t,r,n,i,s;if(arguments.length){for(t=this.proto(),r=0,n=arguments.length;n>r;r++){i=arguments[r];for(s in i)!i.hasOwnProperty(s)||s in t||(e||(e={}),e[s]=null)}e&&this._initMixins([e])}return this._super.apply(this,arguments)}})}(),function(){function e(e,t,r,i,s){var o,a=r._objects;for(a||(a=r._objects={});--s>=i;){var u=e.objectAt(s);u&&(Ember.addBeforeObserver(u,t,r,"contentKeyWillChange"),Ember.addObserver(u,t,r,"contentKeyDidChange"),o=n(u),a[o]||(a[o]=[]),a[o].push(s))}}function t(e,t,r,i,s){var o=r._objects;o||(o=r._objects={});for(var a,u;--s>=i;){var c=e.objectAt(s);c&&(Ember.removeBeforeObserver(c,t,r,"contentKeyWillChange"),Ember.removeObserver(c,t,r,"contentKeyDidChange"),u=n(c),a=o[u],a[a.indexOf(s)]=null)}}var r=(Ember.set,Ember.get),n=Ember.guidFor,i=Ember.EnumerableUtils.forEach,s=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})}),o=/^.+:(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 s(this._content,e,this),Ember.defineProperty(this,e,null,t),this.beginObservingContentKey(e),t},arrayWillChange:function(e,r,n){var i,s,o=this._keys;s=n>0?r+n:-1,Ember.beginPropertyChanges(this);for(i in o)o.hasOwnProperty(i)&&(s>0&&t(e,i,this,r,s),Ember.propertyWillChange(this,i));Ember.propertyWillChange(this._content,"@each"),Ember.endPropertyChanges(this)},arrayDidChange:function(t,r,n,i){var s,o,a=this._keys;o=i>0?r+i:-1,Ember.beginPropertyChanges(this);for(s in a)a.hasOwnProperty(s)&&(o>0&&e(t,s,this,r,o),Ember.propertyDidChange(this,s));Ember.propertyDidChange(this._content,"@each"),Ember.endPropertyChanges(this)},didAddListener:function(e){o.test(e)&&this.beginObservingContentKey(e.slice(0,-7))},didRemoveListener:function(e){o.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,s=r(i,"length");e(i,t,this,0,s)}},stopObservingContentKey:function(e){var n=this._keys;if(n&&n[e]>0&&--n[e]<=0){var i=this._content,s=r(i,"length");t(i,e,this,0,s)}},contentKeyWillChange:function(e,t){Ember.propertyWillChange(this,t)},contentKeyDidChange:function(e,t){Ember.propertyDidChange(this,t)}})}(),function(){var e=Ember.get;Ember.set;var t=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(t,r,n){if(this.isFrozen)throw Ember.FROZEN_ERROR;var i=n?e(n,"length"):0;if(this.arrayContentWillChange(t,r,i),n&&0!==n.length){var s=[t,r].concat(n);this.splice.apply(this,s)}else this.splice(t,r);return this.arrayContentDidChange(t,r,i),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()}}),r=["length"];Ember.EnumerableUtils.forEach(t.keys(),function(e){Array.prototype[e]&&r.push(e)}),r.length>0&&(t=t.without.apply(t,r)),Ember.NativeArray=t,Ember.A=function(e){return void 0===e&&(e=[]),Ember.Array.detect(e)?e:Ember.NativeArray.apply(e)},Ember.NativeArray.activate=function(){t.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 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 s=0;n>s;s++)i=r(this[s]),delete this[i],delete this[s];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 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 Error(Ember.FROZEN_ERROR);if(n(i))return this;var s,o=r(i),a=this[o],u=e(this,"length");return a>=0&&u>a&&this[a]===i?this:(s=[i],this.enumerableContentWillChange(null,s),Ember.propertyWillChange(this,"lastObject"),u=e(this,"length"),this[o]=u,this[u]=i,t(this,"length",u+1),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(null,s),this)},removeObject:function(i){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(n(i))return this;var s,o,a=r(i),u=this[a],c=e(this,"length"),h=0===u,l=u===c-1;return u>=0&&c>u&&this[u]===i&&(o=[i],this.enumerableContentWillChange(o,null),h&&Ember.propertyWillChange(this,"firstObject"),l&&Ember.propertyWillChange(this,"lastObject"),c-1>u&&(s=this[c-1],this[u]=s,this[r(s)]=u),delete this[a],delete this[c-1],t(this,"length",c-1),h&&Ember.propertyDidChange(this,"firstObject"),l&&Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(o,null)),this},contains:function(e){return this[r(e)]>=0},copy:function(){var n=this.constructor,i=new n,s=e(this,"length");for(t(i,"length",s);--s>=0;)i[s]=this[s],i[r(this[s])]=s;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;Ember.get;var t=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(){var e=Ember.get;Ember.ControllerMixin=Ember.Mixin.create({isController:!0,target:null,container:null,parentController:null,store:null,model:Ember.computed.alias("content"),send:function(t){var r,n=[].slice.call(arguments,1);this[t]?this[t].apply(this,n):(r=e(this,"target"))&&r.send.apply(r,arguments)}}),Ember.Controller=Ember.Object.extend(Ember.ControllerMixin)}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils.forEach);Ember.SortableMixin=Ember.Mixin.create(Ember.MutableEnumerable,{sortProperties:null,sortAscending:!0,orderBy:function(r,n){var i=0,s=e(this,"sortProperties"),o=e(this,"sortAscending");return t(s,function(t){0===i&&(i=Ember.compare(e(r,t),e(n,t)),0===i||o||(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"),s=this;return r&&n?(r=r.slice(),r.sort(function(e,t){return s.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(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()},"content"),sortAscendingWillChange:Ember.beforeObserver(function(){this._lastSortAscending=e(this,"sortAscending")},"sortAscending"),sortAscendingDidChange:Ember.observer(function(){if(e(this,"sortAscending")!==this._lastSortAscending){var t=e(this,"arrangedContent");t.reverseObjects()}},"sortAscending"),contentArrayWillChange:function(r,n,i,s){var o=e(this,"isSorted");if(o){var a=e(this,"arrangedContent"),u=r.slice(n,n+i),c=e(this,"sortProperties");t(u,function(e){a.removeObject(e),t(c,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,s)},contentArrayDidChange:function(r,n,i,s){var o=e(this,"isSorted"),a=e(this,"sortProperties");if(o){var u=r.slice(n,n+s);t(u,function(e){this.insertItemSorted(e),t(a,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,s)},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),s=r.objectAt(n+1),o=i&&this.orderBy(t,i),a=s&&this.orderBy(t,s);(0>o||a>0)&&(r.removeObject(t),this.insertItemSorted(t))},_binarySearch:function(t,r,n){var i,s,o,a;return r===n?r:(a=e(this,"arrangedContent"),i=r+Math.floor((n-r)/2),s=a.objectAt(i),o=this.orderBy(s,t),0>o?this._binarySearch(t,i+1,n):o>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 s=this.lookupItemController(i);if(s)return this.controllerAt(t,i,s)}return i},arrangedContentDidChange:function(){this._super(),this._resetSubControllers()},arrayContentDidChange:function(n,i,s){var o=e(this,"_subControllers"),a=o.slice(n,n+i);t(a,function(e){e&&e.destroy()}),r(o,n,i,new Array(s)),this._super(n,i,s)},init:function(){this.get("content")||Ember.defineProperty(this,"content",void 0,Ember.A()),this._super(),this.set("_subControllers",Ember.A())},controllerAt:function(t,r,n){var i=e(this,"container"),s=e(this,"_subControllers"),o=s[t];if(o||(o=i.lookup("controller:"+n,{singleton:!1}),s[t]=o),!o)throw new Error('Could not resolve itemController: "'+n+'"');return o.set("target",this),o.set("parentController",e(this,"parentController")||this),o.set("content",r),o},_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=Ember.imports.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,s,o=e.childNodes.length;for(r=0;o>r;r++)if(i=e.childNodes[r],s=1===i.nodeType&&n(i,t))return s},i=function(e,i){t&&(i="­"+i);var s=[];if(r&&(i=i.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,r,n){return s.push([n,t]),r})),e.innerHTML=i,s.length>0){var o,a=s.length;for(o=0;a>o;o++){var u=n(e,s[o][0]),c=document.createTextNode(s[o][1]);u.parentNode.insertBefore(c,u)}}if(t){for(var h=e.firstChild;1===h.nodeType&&!h.nodeName;)h=h.firstChild;3===h.nodeType&&""===h.nodeValue.charAt(0)&&(h.nodeValue=h.nodeValue.slice(1))}},s={},o=function(e){if(void 0!==s[e])return s[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 s[e]=t,t},a=function(e,t){var r=e.tagName;if(o(r))i(e,t);else{var n=e.outerHTML||(new XMLSerializer).serializeToString(e),s=n.match(new RegExp("<"+r+"([^>]*)>","i"))[0],a="</"+r+">",u=document.createElement("div");for(i(u,s+t+a),e=u.firstChild;e.tagName!==r;)e=e.nextSibling}return e};Ember.ViewUtils={setInnerHTML:a,isSimpleClick:e}}(),function(){function e(e){return e?n.test(e)?e.replace(i,""):e:e}function t(e){var t={"<":"<",">":">",'"':""","'":"'","`":"`"},r=function(e){return t[e]||"&"},n=e.toString();return o.test(n)?n.replace(s,r):n}Ember.get,Ember.set;var r=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-Z\-]/,i=/[^a-zA-Z\-]/g,s=/&(?!\w+;)|[<>"'`]/g,o=/[&<>"'`]/;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
|
18
|
-
},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,s=this.buffer,o=this.elementId,a=this.classes,u=this.elementAttributes,c=this.elementProperties,h=this.elementStyle;if(s+="<"+e(r),o&&(s+=' id="'+t(o)+'"',this.elementId=null),a&&(s+=' class="'+t(a.join(" "))+'"',this.classes=null),h){s+=' style="';for(i in h)h.hasOwnProperty(i)&&(s+=i+":"+t(h[i])+";");s+='"',this.elementStyle=null}if(u){for(n in u)u.hasOwnProperty(n)&&(s+=" "+n+'="'+t(u[n])+'"');this.elementAttributes=null}if(c){for(i in c)if(c.hasOwnProperty(i)){var l=c[i];(l||"number"==typeof l)&&(s+=l===!0?" "+i+'="'+i+'"':" "+i+'="'+t(c[i])+'"')}this.elementProperties=null}s+=">",this.buffer=s}},pushClosingTag:function(){var t=this.tagNames.pop();t&&(this.buffer+="</"+e(t)+">")},currentTagName:function(){return this.tagNames[this.tagNames.length-1]},generateElement:function(){var e,t,r=this.tagNames.pop(),n=document.createElement(r),i=Ember.$(n),s=this.elementId,o=this.classes,a=this.elementAttributes,u=this.elementProperties,c=this.elementStyle,h="";if(s&&(i.attr("id",s),this.elementId=null),o&&(i.attr("class",o.join(" ")),this.classes=null),c){for(t in c)c.hasOwnProperty(t)&&(h+=t+":"+c[t]+";");i.attr("style",h),this.elementStyle=null}if(a){for(e in a)a.hasOwnProperty(e)&&i.attr(e,a[e]);this.elementAttributes=null}if(u){for(t in u)u.hasOwnProperty(t)&&i.prop(t,u[t]);this.elementProperties=null}return n},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({rootElement:"body",setup:function(r,n){var i,s={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"};Ember.$.extend(s,r||{}),Ember.isNone(n)||t(this,"rootElement",n),n=Ember.$(e(this,"rootElement")),n.addClass("ember-application");for(i in s)s.hasOwnProperty(i)&&this.setupHandler(n,i,s[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],s=!0,o=null;return o=n._findNearestEventManager(i,r),o&&o!==t?s=n._dispatchEvent(o,e,r,i):i?s=n._bubbleEvent(i,e,r):e.stopPropagation(),s},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,s=e[r];return"function"===Ember.typeOf(s)?(i=s.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(function(){var r=e(this,"_childContainers");for(var n in r)r.hasOwnProperty(n)&&r[n].destroy();t(this,"_childContainers",{})},"model")})}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}var t={},r=Ember.get,n=Ember.set,i=Ember.guidFor,s=Ember.EnumerableUtils.forEach,o=Ember.EnumerableUtils.addObject,a=Ember.computed(function(){var e=this._childViews,t=Ember.A(),n=this;return s(e,function(e){e.isVirtual?t.pushObjects(r(e,"childViews")):t.push(e)}),t.replace=function(e,t,r){if(n instanceof Ember.ContainerView)return n.replace(e,t,r);throw new Error("childViews is immutable")},t});Ember.TEMPLATES={},Ember.CoreView=Ember.Object.extend(Ember.Evented,{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)}},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 u=Ember._ViewCollection=function(e){var t=this.views=e||[];this.length=t.length};u.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 s(t,e)},clear:function(){this.length=0,this.views.length=0}};var c=[];Ember.View=Ember.CoreView.extend({concatenatedProperties:["classNames","classNameBindings","attributeBindings"],isView:!0,templateName:null,layoutName:null,templates:Ember.TEMPLATES,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"),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(function(){this.rerender()},"context"),isVisible:!0,childViews:a,_childViews:c,_childViewsWillChange:Ember.beforeObserver(function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyWillChange(e,"childViews")}},"childViews"),_childViewsDidChange:Ember.observer(function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyDidChange(e,"childViews")}},"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(function(){this.isDestroying||r(this,"parentView.controller")&&!r(this,"controller")&&this.notifyPropertyChange("controller")},"_parentView"),_controllerDidChange:Ember.observer(function(){this.isDestroying||(this.rerender(),this.forEachChildView(function(e){e.propertyDidChange("controller")}))},"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"),s=this.cloneKeywords(),o={view:this,buffer:e,isRenderData:!0,keywords:s,insideGroup:r(this,"templateData.insideGroup")};n=t(i,{data:o}),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;s(e,function(e){var s,a=Ember.View._parsePropertyPath(e),u=function(){r=this._classStringForProperty(e),t=this.$(),s&&(t.removeClass(s),i.removeObject(s)),r?(t.addClass(r),s=r):s=null};n=this._classStringForProperty(e),n&&(o(i,n),s=n),this.registerObserver(this,a.path,u),this.one("willClearRender",function(){s&&(i.removeObject(s),s=null)})},this)},_applyAttributeBindings:function(e,t){var n,i;s(t,function(t){var s=t.split(":"),o=s[0],a=s[1]||o,u=function(){i=this.$(),n=r(this,o),Ember.View.applyAttributeBindings(i,a,n)};this.registerObserver(this,o,u),n=r(this,o),Ember.View.applyAttributeBindings(e,a,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=t===!1?this._childViews:[this];i.length;){r=i.slice(),i=[];for(var s=0,o=r.length;o>s;s++)n=r[s],e(n),n._childViews&&i.push.apply(i,n._childViews)}},triggerRecursively:function(e){for(var t,r,n=[this];n.length;){t=n.slice(),n=[];for(var i=0,s=t.length;s>i;i++)r=t[i],r.trigger&&r.trigger(e),r._childViews&&n.push.apply(n,r._childViews)}},viewHierarchyCollection:function(){for(var e,t=new u([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:function(){},_notifyWillDestroyElement:function(){var e=this.viewHierarchyCollection();return e.trigger("willClearRender"),e.trigger("willDestroyElement"),e},_elementWillChange:Ember.beforeObserver(function(){this.forEachChildView(function(e){Ember.propertyWillChange(e,"element")})},"element"),_elementDidChange:Ember.observer(function(){this.forEachChildView(function(e){Ember.propertyDidChange(e,"element")})},"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:c,attributeBindings:c,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());var e=r(this,"viewController");e&&(e=r(e),e&&n(e,"view",this))},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"),s=this.viewName;if(this._super()){for(e=n.length,t=e-1;t>=0;t--)n[t].removedFromDOM=!0;for(s&&i&&i.set(s,null),e=n.length,t=e-1;t>=0;t--)n[t].destroy();return this}},createChildView:function(e,t){return e.isView&&e._parentView===this?e:(Ember.CoreView.detect(e)?(t=t||{},t._parentView=this,t.container=this.container,t.templateData=t.templateData||r(this,"templateData"),e=e.create(t),e.viewName&&n(r(this,"concreteView"),e.viewName,e)):(t&&e.setProperties(t),r(e,"templateData")||n(e,"templateData",r(this,"templateData")),n(e,"_parentView",this)),e)},becameVisible:Ember.K,becameHidden:Ember.K,_isVisibleDidChange:Ember.observer(function(){var e=this.$();if(e){var t=r(this,"isVisible");e.toggle(t),this._isAncestorHidden()||(t?this._notifyBecameVisible():this._notifyBecameHidden())}},"isVisible"),_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),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){n||"function"!=typeof r||(n=r,r=null);var i=this,s=function(){i.currentState.invokeObserver(this,n)},o=function(){Ember.run.scheduleOnce("render",this,s)};Ember.addObserver(e,t,r,o),this.one("willClearRender",function(){Ember.removeObserver(e,t,r,o)})}});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],s="";return n.length>1&&(t=n[1],3===n.length&&(r=n[2]),s=":"+t,r&&(s+=":"+r)),{path:i,classNames:s,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 l=Ember.Object.extend(Ember.Evented).create();Ember.View.addMutationListener=function(e){l.on("change",e)},Ember.View.removeMutationListener=function(e){l.off("change",e)},Ember.View.notifyMutationListeners=function(){l.trigger("change")},Ember.View.views={},Ember.View.childViewsProperty=a,Ember.View.applyAttributeBindings=function(e,t,r){var n=Ember.typeOf(r);"value"===t||"string"!==n&&("number"!==n||isNaN(r))?"value"===t||"boolean"===n?(void 0===r&&(r=null),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),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(){Ember.get,Ember.set;var e=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 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,s=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 s;"string"==typeof e?(s=r(this,e),s=this.createChildView(s),n(this,e,s)):s=this.createChildView(e),t[i]=s},this);var s=r(this,"currentView");s&&(t.length||(t=this._childViews=this._childViews.slice()),t.push(this.createChildView(s)))},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 s=[e,t].concat(n);n.length&&!this._childViews.length&&(this._childViews=this._childViews.slice()),this._childViews.splice.apply(this._childViews,s)}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}),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 s=e.slice(t,t+i);this.initializeViews(s,this,r(this,"templateData")),this.currentState.childViewsDidChange(this,e,t,i)}this.propertyDidChange("childViews")},initializeViews:function(e,t,s){i(e,function(e){n(e,"_parentView",t),r(e,"templateData")||n(e,"templateData",s)})},currentView:null,_currentViewWillChange:Ember.beforeObserver(function(){var e=r(this,"currentView");e&&e.destroy()},"currentView"),_currentViewDidChange:Ember.observer(function(){var e=r(this,"currentView");e&&this.pushObject(e)},"currentView"),_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 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,o,a,u=t._childViews,c=new s;for(r=0,n=u.length;n>r;r++)i=u[r],a||(a=Ember.RenderBuffer(),a._hasElement=!1),i.renderToBufferIfNeeded(a)?c.push(i):c.length?(e(t,c,o,a),a=null,o=i,c.clear()):o=i;c.length&&e(t,c,o,a)}})}(),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(function(){var t=this.get("content");t&&t.removeArrayObserver(this);var r=t?e(t,"length"):0;this.arrayWillChange(t,0,r)},"content"),_contentDidChange:Ember.observer(function(){var t=e(this,"content");t&&t.addArrayObserver(this);var r=t?e(t,"length"):0;this.arrayDidChange(t,0,null,r)},"content"),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 s,o,a,u=this._childViews;a=this._childViews.length;var c=n===a;for(c&&(this.currentState.empty(this),this.invokeRecursively(function(e){e.removedFromDOM=!0},!1)),o=r+n-1;o>=r;o--)s=u[o],s.destroy()},arrayDidChange:function(r,n,i,s){var o,a,u,c,h=e(this,"itemViewClass"),l=[];if("string"==typeof h&&(h=e(h)),c=r?e(r,"length"):0)for(u=n;n+s>u;u++)a=r.objectAt(u),o=this.createChildView(h,{content:a,contentIndex:u}),l.push(o);else{var m=e(this,"emptyView");if(!m)return;var f=Ember.CoreView.detect(m);m=this.createChildView(m),l.push(m),t(this,"emptyView",m),f&&(this._createdEmptyView=m)}this.replace(n,0,l)},createChildView:function(r,n){r=this._super(r,n);var i=e(r,"tagName"),s=null===i||void 0===i?Ember.CollectionView.CONTAINER_MAP[e(this,"tagName")]:i;return t(r,"tagName",s),r}}),Ember.CollectionView.CONTAINER_MAP={ul:"li",ol:"li",table:"tr",thead:"tr",tbody:"tr",tfoot:"tr",tr:"td",select:"option"}}(),function(){Ember.ViewTargetActionSupport=Ember.Mixin.create(Ember.TargetActionSupport,{target:Ember.computed.alias("controller"),actionContext:Ember.computed.alias("context")})}(),function(){var e=Ember.get,t=Ember.set;Ember.State=Ember.Object.extend(Ember.Evented,{isState:!0,parentState:null,start:null,name:null,path:Ember.computed(function(){var t=e(this,"parentState.path"),r=e(this,"name");return t&&(r=t+"."+r),r}),trigger:function(e){this[e]&&this[e].apply(this,[].slice.call(arguments,1)),this._super.apply(this,arguments)},init:function(){var r=e(this,"states");t(this,"childStates",Ember.A()),t(this,"eventTransitions",e(this,"eventTransitions")||{});var n,i,s;if(r)for(n in r)this.setupChild(r,n,r[n]);else{r={};for(n in this)"constructor"!==n&&(i=this[n])&&((s=i.transitionTarget)&&(this.eventTransitions[n]=s),this.setupChild(r,n,i));t(this,"states",r)}t(this,"pathsCaches",{})},setPathsCache:function(t,r,n){var i=Ember.guidFor(t.constructor),s=e(this,"pathsCaches"),o=s[i]||{};o[r]=n,s[i]=o},getPathsCache:function(t,r){var n=Ember.guidFor(t.constructor),i=e(this,"pathsCaches"),s=i[n]||{};return s[r]},setupChild:function(r,n,i){return i?(i.isState?t(i,"name",n):Ember.State.detect(i)&&(i=i.create({name:n})),i.isState?(t(i,"parentState",this),e(this,"childStates").pushObject(i),r[n]=i,i):void 0):!1},lookupEventTransition:function(e){for(var t,r=this;r&&!t;)t=r.eventTransitions[e],r=r.get("parentState");return t},isLeaf:Ember.computed(function(){return!e(this,"childStates").length}),hasContext:!0,setup:Ember.K,enter:Ember.K,exit:Ember.K}),Ember.State.reopenClass({transitionTo:function(e){var t=function(t,r){var n=[],i=Ember.$&&Ember.$.Event;r&&i&&r instanceof i?r.hasOwnProperty("contexts")&&(n=r.contexts.slice()):n=[].slice.call(arguments,1),n.unshift(e),t.transitionTo.apply(t,n)};return t.transitionTarget=e,t}})}(),function(){var e=Ember.get,t=Ember.set,r=Ember.String.fmt,n=Ember.ArrayPolyfills.forEach,i=function(e){this.enterStates=e.enterStates.slice(),this.exitStates=e.exitStates.slice(),this.resolveState=e.resolveState,this.finalState=e.enterStates[e.enterStates.length-1]||e.resolveState};i.prototype={normalize:function(e,t){return this.matchContextsToStates(t),this.addInitialStates(),this.removeUnchangedContexts(e),this},matchContextsToStates:function(t){for(var r,n,i=this.enterStates.length-1,s=[];t.length>0;){if(i>=0)r=this.enterStates[i--];else{if(this.enterStates.length){if(r=e(this.enterStates[0],"parentState"),!r)throw"Cannot match all contexts to states"}else r=this.resolveState;this.enterStates.unshift(r),this.exitStates.unshift(r)}n=e(r,"hasContext")?t.pop():null,s.unshift(n)}this.contexts=s},addInitialStates:function(){for(var t,r=this.finalState;;){if(t=e(r,"initialState")||"start",r=e(r,"states."+t),!r)break;this.finalState=r,this.enterStates.push(r),this.contexts.push(void 0)}},removeUnchangedContexts:function(e){for(;this.enterStates.length>0&&this.enterStates[0]===this.exitStates[0];){if(this.enterStates.length===this.contexts.length){if(e.getStateMeta(this.enterStates[0],"context")!==this.contexts[0])break;this.contexts.shift()}this.resolveState=this.enterStates.shift(),this.exitStates.shift()}}};var s=function(t,n,i){var a,u,c,h=this.enableLogging,l=i?"unhandledEvent":t,m=n[l];if(a=[].slice.call(arguments,3),"function"==typeof m)return h&&(i?Ember.Logger.log(r("STATEMANAGER: Unhandled event '%@' being sent to state %@.",[t,e(n,"path")])):Ember.Logger.log(r("STATEMANAGER: Sending event '%@' to state %@.",[t,e(n,"path")]))),c=a,i&&c.unshift(t),c.unshift(this),m.apply(n,c);var f=e(n,"parentState");return f?(u=a,u.unshift(t,f,i),s.apply(this,u)):i?void 0:o.call(this,t,a,!0)},o=function(t,r,n){return r.unshift(t,e(this,"currentState"),n),s.apply(this,r)};Ember.StateManager=Ember.State.extend({init:function(){this._super(),t(this,"stateMeta",Ember.Map.create());var r=e(this,"initialState");!r&&e(this,"states.start")&&(r="start"),r&&this.transitionTo(r)},stateMetaFor:function(t){var r=e(this,"stateMeta"),n=r.get(t);return n||(n={},r.set(t,n)),n},setStateMeta:function(e,r,n){return t(this.stateMetaFor(e),r,n)},getStateMeta:function(t,r){return e(this.stateMetaFor(t),r)},currentState:null,currentPath:Ember.computed.alias("currentState.path"),transitionEvent:"setup",errorOnUnhandledEvent:!0,send:function(e){var t=[].slice.call(arguments,1);return o.call(this,e,t,!1)},unhandledEvent:function(t,r){if(e(this,"errorOnUnhandledEvent"))throw new Ember.Error(this.toString()+" could not respond to event "+r+" in state "+e(this,"currentState.path")+".")},getStateByPath:function(t,r){for(var n=r.split("."),i=t,s=0,o=n.length;o>s&&(i=e(e(i,"states"),n[s]),i);s++);return i},findStateByPath:function(t,r){for(var n;!n&&t;)n=this.getStateByPath(t,r),t=e(t,"parentState");return n},getStatesInPath:function(t,r){if(!r||""===r)return void 0;for(var n,i,s=r.split("."),o=[],a=0,u=s.length;u>a;a++){if(n=e(t,"states"),!n)return void 0;if(i=e(n,s[a]),!i)return void 0;t=i,o.push(i)}return o},goToState:function(){return this.transitionTo.apply(this,arguments)},transitionTo:function(t,r){if(!Ember.isEmpty(t)){var n=r?Array.prototype.slice.call(arguments,1):[],s=e(this,"currentState")||this,o=this.contextFreeTransition(s,t),a=new i(o).normalize(this,n);this.enterState(a),this.triggerSetupContext(a)}},contextFreeTransition:function(t,r){var n=t.getPathsCache(this,r);
|
19
|
-
if(n)return n;for(var i=this.getStatesInPath(t,r),s=[],o=t;o&&!i;){if(s.unshift(o),o=e(o,"parentState"),!o&&(i=this.getStatesInPath(this,r),!i))return;i=this.getStatesInPath(o,r)}for(;i.length>0&&i[0]===s[0];)o=i.shift(),s.shift();var a={exitStates:s,enterStates:i,resolveState:o};return t.setPathsCache(this,r,a),a},triggerSetupContext:function(t){var r=t.contexts,i=t.enterStates.length-r.length,s=t.enterStates,o=e(this,"transitionEvent");n.call(s,function(e,t){e.trigger(o,this,r[t-i])},this)},getState:function(t){var r=e(this,t),n=e(this,"parentState");return r?r:n?n.getState(t):void 0},enterState:function(r){var i=this.enableLogging,s=r.exitStates.slice(0).reverse();n.call(s,function(e){e.trigger("exit",this)},this),n.call(r.enterStates,function(t){i&&Ember.Logger.log("STATEMANAGER: Entering "+e(t,"path")),t.trigger("enter",this)},this),t(this,"currentState",r.finalState)}})}(),function(){e("metamorph",[],function(){"use strict";// Copyright: ©2011 My Company Inc. All rights reserved.
|
20
|
-
var e=function(){},t=0,r=this.document,n=r&&"createRange"in r&&"undefined"!=typeof Range&&Range.prototype.createContextualFragment,i=r&&function(){var e=r.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML}(),s=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}(),o=function(r){var n;n=this instanceof o?this:new e,n.innerHTML=r;var i="metamorph-"+t++;return n.start=i+"-start",n.end=i+"-end",n};e.prototype=o.prototype;var a,u,c,h,l,m,f,p,d;if(h=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)a=function(e,t){var n=r.createRange(),i=r.getElementById(e.start),s=r.getElementById(e.end);return t?(n.setStartBefore(i),n.setEndAfter(s)):(n.setStartAfter(i),n.setEndBefore(s)),n},u=function(e,t){var r=a(this,t);r.deleteContents();var n=r.createContextualFragment(e);r.insertNode(n)},c=function(){var e=a(this,!0);e.deleteContents()},l=function(e){var t=r.createRange();t.setStart(e),t.collapse(!1);var n=t.createContextualFragment(this.outerHTML());e.appendChild(n)},m=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)},f=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 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,s=e.childNodes.length;for(r=0;s>r;r++)if(n=e.childNodes[r],i=1===n.nodeType&&E(n,t))return i},v=function(e,t){var n=[];if(s&&(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 a=E(e,n[i][0]),u=r.createTextNode(n[i][1]);a.parentNode.insertBefore(u,a)}}},g=function(e,t){var n=b[e.tagName.toLowerCase()]||b._default,s=n[0],o=n[1],a=n[2];i&&(t="­"+t);var u=r.createElement("div");v(u,o+t+a);for(var c=0;s>=c;c++)u=u.firstChild;if(i){for(var h=u;1===h.nodeType&&!h.nodeName;)h=h.firstChild;3===h.nodeType&&""===h.nodeValue.charAt(0)&&(h.nodeValue=h.nodeValue.slice(1))}return u},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 n,i,s,o=y(r.getElementById(this.start)),a=r.getElementById(this.end),u=a.parentNode;for(w(o,a),n=o.nextSibling;n;){if(i=n.nextSibling,s=n===a){if(!t)break;a=n.nextSibling}if(n.parentNode.removeChild(n),s)break;n=i}for(n=g(o.parentNode,e);n;)i=n.nextSibling,u.insertBefore(n,a),n=i},c=function(){var e=y(r.getElementById(this.start)),t=r.getElementById(this.end);this.html(""),e.parentNode.removeChild(e),t.parentNode.removeChild(t)},l=function(e){for(var t,r=g(e,this.outerHTML());r;)t=r.nextSibling,e.appendChild(r),r=t},m=function(e){var t,n,i=r.getElementById(this.end),s=i.nextSibling,o=i.parentNode;for(n=g(o,e);n;)t=n.nextSibling,o.insertBefore(n,s),n=t},f=function(e){var t,n,i=r.getElementById(this.start),s=i.parentNode;n=g(s,e);for(var o=i.nextSibling;n;)t=n.nextSibling,s.insertBefore(n,o),n=t}}return o.prototype.html=function(e){return this.checkRemoved(),void 0===e?this.innerHTML:(u.call(this,e),this.innerHTML=e,void 0)},o.prototype.replaceWith=function(e){this.checkRemoved(),u.call(this,e,!0)},o.prototype.remove=c,o.prototype.outerHTML=h,o.prototype.appendTo=l,o.prototype.after=m,o.prototype.prepend=f,o.prototype.startTag=p,o.prototype.endTag=d,o.prototype.isRemoved=function(){var e=r.getElementById(this.start),t=r.getElementById(this.end);return!e||!t},o.prototype.checkRemoved=function(){if(this.isRemoved())throw new Error("Cannot perform operations on a Metamorph that is not in the DOM.")},o})}(),function(){function e(e){var t=e.hash,r=e.hashTypes;for(var n in t)"ID"===r[n]&&(t[n+"Binding"]=t[n],r[n+"Binding"]="STRING",delete t[n],delete r[n])}var t=Object.create||function(e){function t(){}return t.prototype=e,new t},r=this.Handlebars||Ember.imports&&Ember.imports.Handlebars;r||"function"!=typeof require||(r=require("handlebars")),Ember.Handlebars=t(r),Ember.Handlebars.helper=function(t,r){Ember.View.detect(r)?Ember.Handlebars.registerHelper(t,function(t){return e(t),Ember.Handlebars.helpers.view.call(this,r,t)}):Ember.Handlebars.registerBoundHelper.apply(null,arguments)},Ember.Handlebars.helpers=t(r.helpers),Ember.Handlebars.Compiler=function(){},r.Compiler&&(Ember.Handlebars.Compiler.prototype=t(r.Compiler.prototype)),Ember.Handlebars.Compiler.prototype.compiler=Ember.Handlebars.Compiler,Ember.Handlebars.JavaScriptCompiler=function(){},r.JavaScriptCompiler&&(Ember.Handlebars.JavaScriptCompiler.prototype=t(r.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="ember"+ +new Date,i=1;Ember.Handlebars.Compiler.prototype.mustache=function(e){if(e.isHelper&&"control"===e.id.string)e.hash=e.hash||new r.AST.HashNode([]),e.hash.pairs.push(["controlID",new r.AST.StringNode(n+i++)]);else if(e.params.length||e.hash);else{var t=new r.AST.IdNode(["_triageMustache"]);e.escaped||(e.hash=e.hash||new r.AST.HashNode([]),e.hash.pairs.push(["unescaped",new r.AST.StringNode("true")])),e=new r.AST.MustacheNode([t].concat([e.id]),e.hash,!e.escaped)}return r.Compiler.prototype.mustache.call(this,e)},Ember.Handlebars.precompile=function(e){var t=r.parse(e),n={knownHelpers:{action:!0,unbound:!0,bindAttr:!0,template:!0,view:!0,_triageMustache:!0},data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(t,n);return(new Ember.Handlebars.JavaScriptCompiler).compile(i,n,void 0,!0)},r.compile&&(Ember.Handlebars.compile=function(e){var t=r.parse(e),n={data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(t,n),s=(new Ember.Handlebars.JavaScriptCompiler).compile(i,n,void 0,!0);return Ember.Handlebars.template(s)})}(),function(){function e(e,t,r,i){var s,o,a,u,c,h,l=r.length,m=i.data,f=m.view,p=i.hash,d=p.boundOptions;a=new Ember._SimpleHandlebarsView(null,null,!p.unescaped,m),a.normalizedValue=function(){var s,o=[];for(s in d)d.hasOwnProperty(s)&&(c=n(e,d[s],m),a.path=c.path,a.pathRoot=c.root,p[s]=Ember._SimpleHandlebarsView.prototype.normalizedValue.call(a));for(u=0;l>u;++u)c=r[u],a.path=c.path,a.pathRoot=c.root,o.push(Ember._SimpleHandlebarsView.prototype.normalizedValue.call(a));return o.push(i),t.apply(e,o)},f.appendChild(a),s=[];for(o in d)d.hasOwnProperty(o)&&s.push(n(e,d[o],m));for(s=s.concat(r),u=0,h=s.length;h>u;++u)c=s[u],f.registerObserver(c.root,c.path,a,a.rerender)}function t(e,t,r,n){var i,s,o,a,u=[],c=n.hash,h=c.boundOptions;for(a in h)h.hasOwnProperty(a)&&(c[a]=Ember.Handlebars.get(e,h[a],n));for(i=0,s=r.length;s>i;++i)o=r[i],u.push(Ember.Handlebars.get(e,o.path,n));return u.push(n),t.apply(e,u)}var r=Array.prototype.slice,n=Ember.Handlebars.normalizePath=function(e,t,r){var n,i,s=r&&r.keywords||{};return n=t.split(".",1)[0],s.hasOwnProperty(n)&&(e=s[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,s=r&&r.data,o=n(e,t,s);return e=o.root,t=o.path,i=Ember.get(e,t),void 0===i&&e!==Ember.lookup&&Ember.isGlobalPath(t)&&(i=Ember.get(Ember.lookup,t)),i};Ember.Handlebars.getPath=Ember.deprecateFunc("`Ember.Handlebars.getPath` has been changed to `Ember.Handlebars.get` for consistency.",Ember.Handlebars.get),Ember.Handlebars.resolveParams=function(e,t,r){for(var n,s,o=[],a=r.types,u=0,c=t.length;c>u;u++)n=t[u],s=a[u],"ID"===s?o.push(i(e,n,r)):o.push(n);return o},Ember.Handlebars.resolveHash=function(e,t,r){var n,s={},o=r.hashTypes;for(var a in t)t.hasOwnProperty(a)&&(n=o[a],s[a]="ID"===n?i(e,t[a],r):t[a]);return s},Ember.Handlebars.registerHelper("helperMissing",function(e,t){var r,n="";throw r="%@ Handlebars error: Could not find property '%@' on object %@.",t.data&&(n=t.data.view),new Ember.Error(Ember.String.fmt(r,[n,e,this]))}),Ember.Handlebars.registerBoundHelper=function(i,s){function o(){var i,o,u,c,h,l=r.call(arguments,0,-1),m=l.length,f=arguments[arguments.length-1],p=[],d=f.data,b=f.hash,E=d.view,v=f.contexts&&f.contexts[0]||this;b.boundOptions={};for(h in b)b.hasOwnProperty(h)&&Ember.IS_BINDING.test(h)&&"string"==typeof b[h]&&(b.boundOptions[h.slice(0,-7)]=b[h]);for(d.properties=[],c=0;m>c;++c)d.properties.push(l[c]),p.push(n(v,l[c],d));if(d.isUnbound)return t(this,s,p,f);if(0===a.length)return e(v,s,p,f);i=p[0],o=i.root,u=i.path;var g=new Ember._SimpleHandlebarsView(u,o,!f.hash.unescaped,f.data);g.normalizedValue=function(){var e=Ember._SimpleHandlebarsView.prototype.normalizedValue.call(g);return s.call(E,e,f)},E.appendChild(g),E.registerObserver(o,u,g,g.rerender);for(var y=0,w=a.length;w>y;y++)E.registerObserver(o,u+"."+a[y],g,g.rerender)}var a=r.call(arguments,2);o._rawFunction=s,Ember.Handlebars.registerHelper(i,o)},Ember.Handlebars.template=function(e){var t=Handlebars.template(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,s=0,o=r.length;o>s;s++)t.push(Ember.Handlebars.get(n[s],r[s],{data:i}));return t}}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}Ember.set,Ember.get;var r=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=s(),this.state="preRender",this.updateId=null}var r=Ember.get,n=Ember.set,i=Ember.Handlebars.get,s=t("metamorph");Ember._SimpleHandlebarsView=e,e.prototype={isVirtual:!0,isView:!0,destroy:function(){this.updateId&&(Ember.run.cancel(this.updateId),this.updateId=null),this.morph=null},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"destroying":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 o=Ember.View.cloneStates(Ember.View.states),a=Ember.merge;a(o._default,{rerenderIfNeeded:Ember.K}),a(o.inDOM,{rerenderIfNeeded:function(e){e.normalizedValue()!==e._lastNormalizedValue&&e.rerender()}}),Ember._HandlebarsBoundView=Ember._MetamorphView.extend({instrumentName:"boundHandlebars",states:o,shouldDisplayFunc:null,preserveContext:!1,previousContext:null,displayTemplate:null,inverseTemplate:null,path:null,pathRoot:null,normalizedValue:function(){var e,t,n=r(this,"path"),s=r(this,"pathRoot"),o=r(this,"valueNormalizerFunc");return""===n?e=s:(t=r(this,"templateData"),e=i(s,n,{data:t})),o?o(e):e},rerenderIfNeeded:function(){this.currentState.rerenderIfNeeded(this)},render:function(e){var t=r(this,"isEscaped"),i=r(this,"shouldDisplayFunc"),s=r(this,"preserveContext"),o=r(this,"previousContext"),a=r(this,"inverseTemplate"),u=r(this,"displayTemplate"),c=this.normalizedValue();if(this._lastNormalizedValue=c,i(c))if(n(this,"template",u),s)n(this,"_context",o);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 a?(n(this,"template",a),s?n(this,"_context",o):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,o,a){var u,c,h,l=t.data,m=t.fn,f=t.inverse,p=l.view,d=this;if(u=s(d,e,l),"object"==typeof this){if(l.insideGroup){c=function(){Ember.run.once(p,"rerender")};var b,E,v=i(d,e,t);v=o(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:o,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),a))for(h=0;h<a.length;h++)p.registerObserver(u.root,u.path+"."+a[h],c)}else l.buffer.push(i(d,e,t))}function r(e,t){var r,n,o=t.data,a=o.view,u=this;if(r=s(u,e,o),"object"==typeof this){if(o.insideGroup){n=function(){Ember.run.once(a,"rerender")};var c=i(u,e,t);(null===c||void 0===c)&&(c=""),o.buffer.push(c)}else{var h=new Ember._SimpleHandlebarsView(e,u,!t.hash.unescaped,t.data);h._parentView=a,a.appendChild(h),n=function(){Ember.run.scheduleOnce("render",h,"rerender")}}""!==r.path&&a.registerObserver(r.root,r.path,n)}else o.buffer.push(i(u,e,t))}var n=Ember.get;Ember.set,Ember.String.fmt;var i=Ember.Handlebars.get,s=Ember.Handlebars.normalizePath,o=Ember.ArrayPolyfills.forEach,a=Ember.Handlebars,u=a.helpers;a.registerHelper("_triageMustache",function(e,t){return u[e]?u[e].call(this,t):u.bind.apply(this,arguments)}),a.registerHelper("bind",function(n,i){var s=i.contexts&&i.contexts[0]||this;return i.fn?t.call(s,n,i,!1,e):r.call(s,n,i)}),a.registerHelper("boundIf",function(e,r){var i=r.contexts&&r.contexts[0]||this,s=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,s,s,["isTruthy","length"])}),a.registerHelper("with",function(r,n){if(4===arguments.length){var i,o,a,c;if(n=arguments[3],i=arguments[2],o=arguments[0],Ember.isGlobalPath(o))Ember.bind(n.data.keywords,i,o);else{c=s(this,o,n.data),o=c.path,a=c.root;var h=Ember.$.expando+Ember.guidFor(a);n.data.keywords[h]=a;var l=o?h+"."+o:h;Ember.bind(n.data.keywords,i,l)}return t.call(this,o,n,!0,e)}return u.bind.call(n.contexts[0],r,n)}),a.registerHelper("if",function(e,t){return u.boundIf.call(t.contexts[0],e,t)}),a.registerHelper("unless",function(e,t){var r=t.fn,n=t.inverse;return t.fn=n,t.inverse=r,u.boundIf.call(t.contexts[0],e,t)}),a.registerHelper("bindAttr",function(e){var t=e.hash,r=e.data.view,n=[],u=this,c=++Ember.uuid,h=t["class"];if(null!=h){var l=a.bindClasses(this,h,r,c,e);n.push('class="'+Handlebars.Utils.escapeExpression(l.join(" "))+'"'),delete t["class"]}var m=Ember.keys(t);return o.call(m,function(o){var a,h=t[o];a=s(u,h,e.data);var l,m,f="this"===h?a.root:i(u,h,e),p=Ember.typeOf(f);l=function(){var t=i(u,h,e),n=r.$("[data-bindattr-"+c+"='"+c+"']");return n&&0!==n.length?(Ember.View.applyAttributeBindings(n,o,t),void 0):(Ember.removeObserver(a.root,a.path,m),void 0)},"this"===h||a.isKeyword&&""===a.path||r.registerObserver(a.root,a.path,l),"string"===p||"number"===p&&!isNaN(f)?n.push(o+'="'+Handlebars.Utils.escapeExpression(f)+'"'):f&&"boolean"===p&&n.push(o+'="'+o+'"')},this),n.push("data-bindattr-"+c+'="'+c+'"'),new a.SafeString(n.join(" "))}),a.bindClasses=function(e,t,r,n,a){var u,c,h,l=[],m=function(e,t,r){var n,s=t.path;return n="this"===s?e:""===s?!0:i(e,s,r),Ember.View._classStringForValue(s,n,t.className,t.falsyClassName)};return o.call(t.split(" "),function(t){var i,o,f,p,d=Ember.View._parsePropertyPath(t),b=d.path,E=e;""!==b&&"this"!==b&&(p=s(e,b,a.data),E=p.root,b=p.path),o=function(){u=m(e,d,a),h=n?r.$("[data-bindattr-"+n+"='"+n+"']"):r.$(),h&&0!==h.length?(i&&h.removeClass(i),u?(h.addClass(u),i=u):i=null):Ember.removeObserver(E,b,f)},""!==b&&"this"!==b&&r.registerObserver(E,b,o),c=m(e,d,a),c&&(l.push(c),i=c)}),l}}(),function(){Ember.get,Ember.set;var e=Ember.Handlebars;e.ViewHelper=Ember.Object.create({propertiesFromHTMLOptions:function(e){var t=e.hash,r=e.data,n={},i=t["class"],s=!1;t.id&&(n.elementId=t.id,s=!0),t.tag&&(n.tagName=t.tag,s=!0),i&&(i=i.split(" "),n.classNames=i,s=!0),t.classBinding&&(n.classNameBindings=t.classBinding.split(" "),s=!0),t.classNameBindings&&(void 0===n.classNameBindings&&(n.classNameBindings=[]),n.classNameBindings=n.classNameBindings.concat(t.classNameBindings.split(" ")),s=!0),t.attributeBindings&&(n.attributeBindings=null,s=!0),s&&(t=Ember.$.extend({},t),delete t.id,delete t.tag,delete t["class"],delete t.classBinding);var o;for(var a in t)t.hasOwnProperty(a)&&Ember.IS_BINDING.test(a)&&"string"==typeof t[a]&&(o=this.contextualizeBindingPath(t[a],r),o&&(t[a]=o));if(n.classNameBindings)for(var u in n.classNameBindings){var c=n.classNameBindings[u];if("string"==typeof c){var h=Ember.View._parsePropertyPath(c);o=this.contextualizeBindingPath(h.path,r),o&&(n.classNameBindings[u]=o+h.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?"_parentView.context":"_parentView.context."+e},helper:function(t,r,n){var i,s=n.data,o=n.fn;i="string"==typeof r?e.get(t,r,n):r;var a=this.propertiesFromHTMLOptions(n,t),u=s.view;a.templateData=s;var c=i.proto?i.proto():i;o&&(a.template=o),c.controller||c.controllerBinding||a.controller||a.controllerBinding||(a._context=t),u.appendChild(i,a)}}),e.registerHelper("view",function(t,r){return t&&t.data&&t.data.isRenderData&&(r=t,t="Ember.View"),e.ViewHelper.helper(this,t,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=n.fn,s=n.data,o=n.inverse;n.data.view;var a;a=r?t(this,r,n):Ember.CollectionView;var u,c,h=n.hash,l={},m=h.itemViewClass,f=a.proto();delete h.itemViewClass,c=m?t(f,m,n):f.itemViewClass;for(var p in h)h.hasOwnProperty(p)&&(u=p.match(/^item(.)(.*)$/),u&&"itemController"!==p&&(l[u[1].toLowerCase()+u[2]]=h[p],delete h[p]));i&&(l.template=i,delete n.fn);var d;o&&o!==Handlebars.VM.noop?(d=e(f,"emptyViewClass"),d=d.extend({template:o,tagName:l.tagName})):h.emptyViewClass&&(d=t(this,h.emptyViewClass,n)),d&&(h.emptyView=d),h.keyword||(l._context=Ember.computed.alias("content"));var b=Ember.Handlebars.ViewHelper.propertiesFromHTMLOptions({data:s,hash:l},this);return h.itemViewClass=c.extend(b),Ember.Handlebars.helpers.view.call(this,a,n)})}(),function(){var e=Ember.Handlebars.get;Ember.Handlebars.registerHelper("unbound",function(t,r){var n,i,s,o=arguments[arguments.length-1];return arguments.length>2?(o.data.isUnbound=!0,n=Ember.Handlebars.helpers[arguments[0]]||Ember.Handlebars.helperMissing,s=n.apply(this,Array.prototype.slice.call(arguments,1)),delete o.data.isUnbound,s):(i=r.contexts&&r.contexts[0]||this,e(i,t,r))})}(),function(){var e=Ember.Handlebars.get,t=Ember.Handlebars.normalizePath;Ember.Handlebars.registerHelper("log",function(r,n){var i=n.contexts&&n.contexts[0]||this,s=t(i,r,n.data),o=s.root,a=s.path,u="this"===a?o:e(o,a,n);Ember.Logger.log(u)}),Ember.Handlebars.registerHelper("debugger",function(){})}(),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=Ember.ArrayController.create();t(i,"itemController",n),t(i,"container",e(this,"controller.container")),t(i,"_eachView",this),t(i,"target",e(this,"controller")),t(i,"parentController",e(this,"controller")),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()},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"),s=e(r,"content");if(i){var o=e(r,"templateData");o=Ember.copy(o),o.keywords=r.cloneKeywords(),t(r,"templateData",o),o.keywords[i]=s}return s&&e(s,"isController")&&t(r,"controller",s),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.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},removeArrayObservers:function(){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(){var t=this.content,r=e(t,"length"),n=this.options.data,i=this.template;n.insideEach=!0;for(var s=0;r>s;s++)i(t.objectAt(s),{data:n})},rerenderContainingView:function(){Ember.run.scheduleOnce("render",this.containingView,"rerender")},destroy:function(){this.removeContentObservers(),this.removeArrayObservers()}},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(e,t){var r=t.data.view,n=r.templateForName(e);n(this,{data:t.data})})}(),function(){Ember.Handlebars.registerHelper("partial",function(e,t){var r=e.split("/"),n=r[r.length-1];r[r.length-1]="_"+n;var i=t.data.view,s=r.join("/"),o=i.templateForName(s),a=!o&&i.templateForName(e);o=o||a,o(this,{data:t.data})})}(),function(){var e=Ember.get;Ember.set,Ember.Handlebars.registerHelper("yield",function(t){for(var r,n=t.data.view;n&&!e(n,"layout");)n=e(n,"parentView");r=e(n,"template"),r&&r(this,t)})}(),function(){var e=Ember.set;Ember.get,Ember.Checkbox=Ember.View.extend({classNames:["ember-checkbox"],tagName:"input",attributeBindings:["type","checked","disabled","tabindex","name"],type:"checkbox",checked:!1,disabled:!1,init:function(){this._super(),this.on("change",this,this._updateElementValue)},_updateElementValue:function(){e(this,"checked",this.$().prop("checked"))}})}(),function(){var e=(Ember.get,Ember.set);Ember.TextSupport=Ember.Mixin.create({value:"",attributeBindings:["placeholder","disabled","maxlength","tabindex"],placeholder:null,disabled:!1,maxlength:null,insertNewline:Ember.K,cancel:Ember.K,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)},interpretKeyEvents:function(e){var t=Ember.TextSupport.KEY_EVENTS,r=t[e.keyCode];return this._elementValueDidChange(),r?this[r](e):void 0},_elementValueDidChange:function(){e(this,"value",this.$().val())}}),Ember.TextSupport.KEY_EVENTS={13:"insertNewline",27:"cancel"}}(),function(){function e(e,r,n){var i=t(r,"action"),s=t(r,"onEvent");if(i&&s===e){var o=t(r,"controller"),a=t(r,"value"),u=t(r,"bubbles");o.send(i,a,r),u||n.stopPropagation()}}var t=Ember.get;Ember.set,Ember.TextField=Ember.View.extend(Ember.TextSupport,{classNames:["ember-text-field"],tagName:"input",attributeBindings:["type","value","size","pattern","name"],value:"",type:"text",size:null,pattern:null,action:null,onEvent:"enter",bubbles:!1,insertNewline:function(t){e("enter",this,t)},keyPress:function(t){e("keyPress",this,t)}})}(),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.View.extend(Ember.TextSupport,{classNames:["ember-text-area"],tagName:"textarea",attributeBindings:["rows","cols","name"],rows:null,cols:null,_updateElementValue:Ember.observer(function(){var t=e(this,"value"),r=this.$();r&&t!==r.val()&&r.val(t)},"value"),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.replace,s=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(function(){var e=t(this,"parentView.optionLabelPath");e&&Ember.defineProperty(this,"label",Ember.computed(function(){return t(this,e)}).property(e))},"parentView.optionLabelPath"),valuePathDidChange:Ember.observer(function(){var e=t(this,"parentView.optionValuePath");e&&Ember.defineProperty(this,"value",Ember.computed(function(){return t(this,e)}).property(e))},"parentView.optionValuePath")}),Ember.Select=Ember.View.extend({tagName:"select",classNames:["ember-select"],defaultTemplate:Ember.Handlebars.template(function(e,t,r,n,i){function s(e,t){var n,i,s="";return t.buffer.push('<option value="">'),n={},i={},t.buffer.push(l(r._triageMustache.call(e,"view.prompt",{hash:{},contexts:[e],types:["ID"],hashContexts:i,hashTypes:n,data:t}))),t.buffer.push("</option>"),s}function o(e,t){var n,i;n={contentBinding:e},i={contentBinding:"STRING"},t.buffer.push(l(r.view.call(e,"view.optionView",{hash:{contentBinding:"this"},contexts:[e],types:["ID"],hashContexts:n,hashTypes:i,data:t})))}this.compilerInfo=[3,">= 1.0.0-rc.4"],r=r||Ember.Handlebars.helpers,i=i||{};var a,u,c,h="",l=this.escapeExpression,m=this;return u={},c={},a=r["if"].call(t,"view.prompt",{hash:{},inverse:m.noop,fn:m.program(1,s,i),contexts:[t],types:["ID"],hashContexts:c,hashTypes:u,data:i}),(a||0===a)&&i.buffer.push(a),u={},c={},a=r.each.call(t,"view.content",{hash:{},inverse:m.noop,fn:m.program(3,o,i),contexts:[t],types:["ID"],hashContexts:c,hashTypes:u,data:i}),(a||0===a)&&i.buffer.push(a),h}),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",optionView:Ember.SelectOption,_change:function(){t(this,"multiple")?this._changeMultiple():this._changeSingle()},selectionDidChange:Ember.observer(function(){var r=t(this,"selection");if(t(this,"multiple")){if(!s(r))return e(this,"selection",Ember.A([r])),void 0;this._selectionDidChangeMultiple()}else this._selectionDidChangeSingle()},"selection.@each"),valueDidChange:Ember.observer(function(){var e,r=t(this,"content"),n=t(this,"value"),i=t(this,"optionValuePath").replace(/^content\.?/,""),s=i?t(this,"selection."+i):t(this,"selection");n!==s&&(e=r?r.find(function(e){return n===(i?t(e,i):e)}):null,this.set("selection",e))},"value"),_triggerChange:function(){var e=t(this,"selection"),r=t(this,"value");e&&this.selectionDidChange(),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"),o=n?1:0,a=t(this,"content"),u=t(this,"selection");
|
21
|
-
if(a&&r){var c=r.map(function(){return this.index-o}).toArray(),h=a.objectsAt(c);s(u)?i(u,0,t(u,"length"),h):e(this,"selection",h)}},_selectionDidChangeSingle:function(){var e=this.get("element");if(e){var n=t(this,"content"),i=t(this,"selection"),s=n?r(n,i):-1,o=t(this,"prompt");o&&(s+=1),e&&(e.selectedIndex=s)}},_selectionDidChangeMultiple:function(){var e,i=t(this,"content"),s=t(this,"selection"),o=i?n(i,s):[-1],a=t(this,"prompt"),u=a?1:0,c=this.$("option");c&&c.each(function(){e=this.index>-1?this.index-u:-1,this.selected=r(o,e)>-1})},init:function(){this._super(),this.on("didInsertElement",this,this._triggerChange),this.on("change",this,this._change)}})}(),function(){function e(e,t){for(var r in e)"ID"===t[r]&&(e[r+"Binding"]=e[r],delete e[r])}Ember.Handlebars.registerHelper("input",function(t){var r=t.hash,n=t.hashTypes,i=r.type,s=r.on;return delete r.type,delete r.on,e(r,n),"checkbox"===i?Ember.Handlebars.helpers.view.call(this,Ember.Checkbox,t):(r.type=i,r.onEvent=s||"enter",Ember.Handlebars.helpers.view.call(this,Ember.TextField,t))}),Ember.Handlebars.registerHelper("textarea",function(t){var r=t.hash,n=t.hashTypes;return e(r,n),Ember.Handlebars.helpers.view.call(this,Ember.TextArea,t)})}(),function(){function e(){Ember.Handlebars.bootstrap(Ember.$(document))}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());Ember.TEMPLATES[r]=n,e.remove()})},Ember.onLoad("application",e)}(),function(){Ember.runLoadHooks("Ember.Handlebars",Ember.Handlebars)}(),function(){var e=Ember.get,t=Ember.set;Ember._PromiseChain=Ember.Object.extend({promises:null,failureCallback:Ember.K,successCallback:Ember.K,abortCallback:Ember.K,promiseSuccessCallback:Ember.K,runNextPromise:function(){if(!e(this,"isDestroyed")){var t=e(this,"promises").shiftObject();if(t){var r=e(t,"promise")||t,n=this,i=function(){n.promiseSuccessCallback.call(this,t,arguments),n.runNextPromise()},s=e(n,"failureCallback");r.then(i,s)}else this.successCallback()}},start:function(){return this.runNextPromise(),this},abort:function(){this.abortCallback(),this.destroy()},init:function(){t(this,"promises",Ember.A(e(this,"promises"))),this._super()}})}(),function(){function e(t,r,n,i){var s,o=t.name,a=t.incoming,u=t.incomingNames,c=u.length;if(n||(n={}),i||(i=[]),!n.hasOwnProperty(o)){for(i.push(o),n[o]=!0,s=0;c>s;s++)e(a[u[s]],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 Error("cycle detected: "+r+" <- "+t.join(" <- "))}if(t&&r&&t!==r){var i=this.add(t),s=this.add(r);s.incoming.hasOwnProperty(t)||(e(i,n),i.hasOutgoing=!0,s.incoming[t]=i,s.incomingNames.push(t))}},t.prototype.topsort=function(t){var r,n,i={},s=this.vertices,o=this.names,a=o.length;for(r=0;a>r;r++)n=s[o[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.set;Ember.Application=Ember.Namespace.extend({rootElement:"body",eventDispatcher:null,customEvents:null,autoinit:!Ember.testing,isInitialized:!1,init:function(){if(this.$||(this.$=Ember.$),this._super(),this.createEventDispatcher(),this._readinessDeferrals=1,this.waitForDOMContentLoaded(),this.autoinit){var e=this;this.$().ready(function(){e.isDestroyed||e.isInitialized||e.initialize()})}},createEventDispatcher:function(){var r=e(this,"rootElement"),n=Ember.EventDispatcher.create({rootElement:r});t(this,"eventDispatcher",n)},waitForDOMContentLoaded:function(){this.deferReadiness();var e=this;this.$().ready(function(){e.advanceReadiness()})},deferReadiness:function(){this._readinessDeferrals++},advanceReadiness:function(){this._readinessDeferrals--,0===this._readinessDeferrals&&Ember.run.once(this,this.didBecomeReady)},initialize:function(e){return e=this.setupRouter(e),this.runInjections(e),Ember.runLoadHooks("application",this),this.isInitialized=!0,this.advanceReadiness(),this},runInjections:function(t){var r,n,i=e(this.constructor,"injections"),s=new Ember.DAG,o=this;for(r=0;r<i.length;r++)n=i[r],s.addEdges(n.name,n.injection,n.before,n.after);s.topsort(function(e){var r=e.value,n=Ember.A(Ember.keys(o));n.forEach(function(e){r(o,t,e)})})},setupRouter:function(e){return!e&&Ember.Router.detect(this.Router)&&(e=this.Router.create(),this._createdRouter=e),e&&(t(this,"router",e),t(e,"namespace",this)),e},didBecomeReady:function(){var t,r=e(this,"eventDispatcher"),n=e(this,"customEvents");r.setup(n),this.ready(),t=e(this,"router"),this.createApplicationView(t),t&&t instanceof Ember.Router&&this.startRouting(t),Ember.BOOTED=!0},createApplicationView:function(r){var n,i,s=e(this,"rootElement"),o={},a=this.ApplicationView,u=Ember.TEMPLATES.application;(a||u)&&(r&&(n=e(r,"applicationController"),n&&(o.controller=n)),u&&(o.template=u),a||(a=Ember.View),i=a.create(o),this._createdApplicationView=i,r&&t(r,"applicationView",i),i.appendTo(s))},startRouting:function(t){var r=e(t,"location");t.route(r.getURL()),r.onUpdateURL(function(e){t.route(e)})},ready:Ember.K,willDestroy:function(){e(this,"eventDispatcher").destroy(),this._createdRouter&&this._createdRouter.destroy(),this._createdApplicationView&&this._createdApplicationView.destroy()},registerInjection:function(e){this.constructor.registerInjection(e)}}),Ember.Application.reopenClass({concatenatedProperties:["injections"],injections:Ember.A(),registerInjection:function(t){var r=e(this,"injections");r.push(t)}}),Ember.Application.registerInjection({name:"controllers",injection:function(e,t,r){if(t&&/^[A-Z].*Controller$/.test(r)){var n,i=r.charAt(0).toLowerCase()+r.substr(1),s=e[r];Ember.Object.detect(s)&&(n=e[r].create(),t.set(i,n),n.setProperties({target:t,controllers:t,namespace:e}))}}}),Ember.runLoadHooks("Ember.Application",Ember.Application)}(),function(){var e=Ember.get;Ember._ResolvedState=Ember.Object.extend({manager:null,state:null,match:null,object:Ember.computed(function(){if(this._object)return this._object;var t=e(this,"state"),r=e(this,"match"),n=e(this,"manager");return t.deserialize(n,r.hash)}),hasPromise:Ember.computed(function(){return Ember.canInvoke(e(this,"object"),"then")}).property("object"),promise:Ember.computed(function(){var t=e(this,"object");return Ember.canInvoke(t,"then")?t:{then:function(e){e(t)}}}).property("object"),transition:function(){var t=e(this,"manager"),r=e(this,"state.path"),n=e(this,"object");t.transitionTo(r,n)}})}(),function(){var e=Ember.get,t=function(e){var t=e.toString(),r=t.split("."),n=r[r.length-1];return Ember.String.underscore(n)+"_id"},r=function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e.hasOwnProperty(r)||(e[r]=t[r]))};Ember.Routable=Ember.Mixin.create({init:function(){var t;this.on("setup",this,this.stashContext),(t=e(this,"redirectsTo"))&&(this.connectOutlets=function(e){e.transitionTo(t)});var r=e(this,"route");""===r&&(r="/"),this._super()},setup:function(){return this.connectOutlets.apply(this,arguments)},stashContext:function(t,r){this.router=t;var n=this.serialize(t,r);t.setStateMeta(this,"context",r),t.setStateMeta(this,"serialized",n),e(this,"isRoutable")&&!e(t,"isRouting")&&this.updateRoute(t,e(t,"location"))},updateRoute:function(t,r){if(e(this,"isLeafRoute")){var n=this.absoluteRoute(t);r.setURL(n)}},absoluteRoute:function(t,n){var i,s,o=e(this,"parentState"),a="";s=null,n&&(n instanceof Array?n.length>0&&(s=n.shift()):s=n),e(o,"isRoutable")&&(a=o.absoluteRoute(t,n));var u=e(this,"routeMatcher"),c=t.getStateMeta(this,"serialized");return s=s||{},r(s,c),i=u&&u.generate(s),i&&(a=a+"/"+i),a},isRoutable:Ember.computed(function(){return"string"==typeof e(this,"route")}),isLeafRoute:Ember.computed(function(){return e(this,"isLeaf")?!0:!e(this,"childStates").findProperty("isRoutable")}),routeMatcher:Ember.computed(function(){var t=e(this,"route");return t?Ember._RouteMatcher.create({route:t}):void 0}),hasContext:Ember.computed(function(){var t=e(this,"routeMatcher");return t?t.identifiers.length>0:void 0}),modelClass:Ember.computed(function(){var t=e(this,"modelType");return"string"==typeof t?Ember.get(Ember.lookup,t):t}),modelClassFor:function(t){var r,n,i,s,o;if(r=e(this,"modelClass"))return r;if(t&&(n=e(this,"routeMatcher"),n&&(i=n.identifiers,2===i.length&&(s=i[1].match(/^(.*)_id$/)))))return o=Ember.String.classify(s[1]),e(t,o)},deserialize:function(r,n){var i;return(i=this.modelClassFor(e(r,"namespace")))?i.find(n[t(i)]):n},serialize:function(r,n){var i,s,o;return Ember.isEmpty(n)?"":((i=this.modelClassFor(e(r,"namespace")))&&(s=t(i),o=e(n,"id"),n={},n[s]=o),n)},resolvePath:function(t,r){if(e(this,"isLeafRoute"))return Ember.A();var n,i=e(this,"childStates");i=Ember.A(i.filterProperty("isRoutable")),i=i.sort(function(t,r){var n=e(t,"routeMatcher.identifiers.length"),i=e(r,"routeMatcher.identifiers.length"),s=e(t,"route"),o=e(r,"route");return 0===s.indexOf(o)?-1:0===o.indexOf(s)?1:n!==i?n-i:e(r,"route.length")-e(t,"route.length")});var s=i.find(function(t){var i=e(t,"routeMatcher");return(n=i.match(r))?!0:void 0}),o=Ember._ResolvedState.create({manager:t,state:s,match:n}),a=s.resolvePath(t,n.remaining);return Ember.A([o]).pushObjects(a)},routePath:function(t,r){function n(){i.forEach(function(e){e.transition()})}if(!e(this,"isLeafRoute")){var i=this.resolvePath(t,r),s=i.some(function(t){return e(t,"hasPromise")});s?(t.transitionTo("loading"),t.handleStatePromises(i,n)):n()}},unroutePath:function(t,r){var n=e(this,"parentState");if(n!==t){r=r.replace(/^(?=[^\/])/,"/");var i=this.absoluteRoute(t),s=e(this,"route");if("/"!==s){var o=r.indexOf(i),a=r.charAt(i.length);if(0===o&&("/"===a||""===a))return}t.enterState({exitStates:[this],enterStates:[],finalState:n}),t.send("unroutePath",r)}},parentTemplate:Ember.computed(function(){for(var t,r=this;r=e(r,"parentState");)if(t=e(r,"template"))return t;return"application"}),_template:Ember.computed(function(){var t=e(this,"template");if(t)return t;var r,n=this.constructor.toString();return/^[^\[].*Route$/.test(n)?(r=n.match(/([^\.]+\.)*([^\.]+)/)[2],r=r.replace(/Route$/,""),r.charAt(0).toLowerCase()+r.substr(1)):void 0}),render:function(t){t=t||{};var r=t.template||e(this,"_template"),n=t.into||e(this,"parentTemplate"),i=e(this.router,n+"Controller"),s=Ember.String.classify(r)+"View",o=e(e(this.router,"namespace"),s);o=(o||Ember.View).extend({templateName:r}),i.set("view",o.create())},connectOutlets:Ember.K,navigateAway:Ember.K})}(),function(){Ember.Route=Ember.State.extend(Ember.Routable)}(),function(){var e=function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^\$|#\s]/g,"\\$&")};Ember._RouteMatcher=Ember.Object.extend({state:null,init:function(){var t,r=this.route,n=[],i=1;"/"===r.charAt(0)&&(r=this.route=r.substr(1)),t=e(r);var s=t.replace(/(:|(?:\\\*))([a-z_]+)(?=$|\/)/gi,function(e,t,r){switch(n[i++]=r,t){case":":return"([^/]+)";case"\\*":return"(.+)"}});this.identifiers=n,this.regex=new RegExp("^/?"+s)},match:function(e){var t=e.match(this.regex);if(t){for(var r=this.identifiers,n={},i=1,s=r.length;s>i;i++)n[r[i]]=t[i];return{remaining:e.substr(t[0].length),hash:r.length>0?n:null}}},generate:function(e){for(var t,r=this.identifiers,n=this.route,i=1,s=r.length;s>i;i++)t=r[i],n=n.replace(new RegExp("(:|(\\*))"+t),e[t]);return n}})}(),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(){},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)},onUpdateURL:function(r){var n=this,i=Ember.guidFor(this);Ember.$(window).on("hashchange.ember-location-"+i,function(){var i=location.hash.substr(1);e(n,"lastSetURL")!==i&&(t(n,"lastSetURL",null),r(location.hash.substr(1)))})},formatURL:function(e){return"#"+e},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).unbind("hashchange.ember-location-"+e)}}),Ember.Location.registerImplementation("hash",Ember.HashLocation)}(),function(){var e=Ember.get,t=Ember.set,r=!1;Ember.HistoryLocation=Ember.Object.extend({init:function(){t(this,"location",e(this,"location")||window.location),this.initState()},initState:function(){this.replaceState(e(this,"location").pathname),t(this,"history",window.history)},rootURL:"/",getURL:function(){return e(this,"location").pathname},setURL:function(e){e=this.formatURL(e),this.getState()&&this.getState().path!==e&&(r=!0,this.pushState(e))},getState:function(){return e(this,"history").state},pushState:function(e){window.history.pushState({path:e},null,e)},replaceState:function(e){window.history.replaceState({path:e},null,e)},onUpdateURL:function(e){var t=Ember.guidFor(this);Ember.$(window).on("popstate.ember-location-"+t,function(){r&&e(location.pathname)})},formatURL:function(t){var r=e(this,"rootURL");return""!==t&&(r=r.replace(/\/$/,"")),r+t},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).unbind("popstate.ember-location-"+e)}}),Ember.Location.registerImplementation("history",Ember.HistoryLocation)}(),function(){var e=Ember.get,t=Ember.set;Ember.Router=Ember.StateManager.extend({initialState:"root",location:"hash",rootURL:"/",transitionTo:function(){this.abortRoutingPromises(),this._super.apply(this,arguments)},route:function(r){function n(){for(r=r.replace(e(this,"rootURL"),""),r=r.replace(/^(?=[^\/])/,"/"),this.send("navigateAway"),this.send("unroutePath",r),s=e(this,"currentState");s&&!s.get("isRoutable");)s=e(s,"parentState");var t=s?s.absoluteRoute(this):"",n=r.substr(t.length);this.send("routePath",n)}function i(){t(this,"isRouting",!1)}this.abortRoutingPromises(),t(this,"isRouting",!0);var s;for(Ember.tryFinally(n,i,this),s=e(this,"currentState");s&&!s.get("isRoutable");)s=e(s,"parentState");s&&s.updateRoute(this,e(this,"location"))},urlFor:function(t,r){var n=e(this,"currentState")||this,i=this.findStateByPath(n,t),s=e(this,"location"),o=i.absoluteRoute(this,r);return s.formatURL(o)},urlForEvent:function(t){var r,n,i=Array.prototype.slice.call(arguments,1),s=e(this,"currentState"),o=s.lookupEventTransition(t);return r=this.findStateByPath(s,o),n=this.serializeRecursively(r,i,[]),this.urlFor(o,n)},serializeRecursively:function(t,r,n){var i,s=e(t,"hasContext")?r.pop():null,o=s?t.serialize(this,s):null;return n.push(o),i=t.get("parentState"),i&&i instanceof Ember.Route?this.serializeRecursively(i,r,n):n},abortRoutingPromises:function(){this._routingPromises&&(this._routingPromises.abort(),this._routingPromises=null)},handleStatePromises:function(e,r){this.abortRoutingPromises(),this.set("isLocked",!0);var n=this;this._routingPromises=Ember._PromiseChain.create({promises:e.slice(),successCallback:function(){n.set("isLocked",!1),r()},failureCallback:function(){throw"Unable to load object"},promiseSuccessCallback:function(e,r){t(e,"object",r[0])},abortCallback:function(){n.set("isLocked",!1)}}).start()},moveStatesIntoRoot:function(){this.root=Ember.Route.extend();for(var e in this)if("constructor"!==e){var t=this[e];(t instanceof Ember.Route||Ember.Route.detect(t))&&(this.root[e]=t,delete this[e])}},init:function(){this.root||this.moveStatesIntoRoot(),this._super();var r=e(this,"location"),n=e(this,"rootURL");"string"==typeof r&&t(this,"location",Ember.Location.create({implementation:r,rootURL:n})),this.assignRouter(this,this)},assignRouter:function(e,t){e.router=t;var r=e.states;if(r)for(var n in r)r.hasOwnProperty(n)&&this.assignRouter(r[n],t)},willDestroy:function(){e(this,"location").destroy()}})}(),function(){var e=Ember.Handlebars,t=e.get,r=Ember.get,n=Array.prototype.slice,i=e.ActionHelper={registeredActions:{}};i.registerAction=function(e,t){var r=(++Ember.uuid).toString();return i.registeredActions[r]={eventName:t.eventName,handler:function(r){var n=r.shiftKey||r.metaKey||r.altKey||r.ctrlKey,i=r.which>1,s=n||i;if(!t.link||!s){r.preventDefault(),r.view=t.view,t.hasOwnProperty("context")&&(r.context=t.context),t.hasOwnProperty("contexts")&&(r.contexts=t.contexts);var o=t.target;return"function"==typeof o.send?o.send(e,r):o[e].call(o,r)}}},t.view.on("willClearRender",function(){delete i.registeredActions[r]}),r},e.registerHelper("action",function(s){var o,a,u=arguments[arguments.length-1],c=n.call(arguments,1,-1),h=u.hash,l=u.data.view,m={eventName:h.on||"click"};m.view=l=r(l,"concreteView"),h.target?o=t(this,h.target,u):(a=u.data.keywords.controller)&&(o=a),m.target=o=o||l,c.length&&(m.contexts=c=Ember.EnumerableUtils.map(c,function(e){return t(this,e,u)},this),m.context=c[0]);var f,p=[];h.href&&o.urlForEvent&&(f=o.urlForEvent.apply(o,[s].concat(c)),p.push('href="'+f+'"'),m.link=!0);var d=i.registerAction(s,m);return p.push('data-ember-action="'+d+'"'),new e.SafeString(p.join(" "))})}(),function(){Ember.onLoad("Ember.Handlebars",function(e){e.OutletView=Ember.ContainerView.extend(Ember._Metamorph),e.registerHelper("outlet",function(t,r){return t&&t.data&&t.data.isRenderData&&(r=t,t="view"),r.hash.currentViewBinding="view.context."+t,e.helpers.view.call(this,e.OutletView,r)})})}(),function(){var e=Ember.get,t=Ember.set;Ember.ControllerMixin.reopen({controllers:null,connectOutlet:function(r,n){var i,s,o,a,u;if("string"===Ember.typeOf(n)&&(i=r,r=n,n=arguments[2]),1===arguments.length?"object"===Ember.typeOf(r)&&(u=r,i=u.outletName,r=u.name,s=u.viewClass,a=u.controller,n=u.context):u={},i=i||"view",r){var c=e(this,"namespace"),h=e(this,"controllers"),l=r.charAt(0).toUpperCase()+r.substr(1)+"View";s=e(c,l),a=e(h,r+"Controller")}return a&&n&&t(a,"content",n),o=this.createOutletView(i,s),a&&t(o,"controller",a),t(this,i,o),o},connectControllers:function(){for(var r,n=e(this,"controllers"),i=Array.prototype.slice.apply(arguments),s=0,o=i.length;o>s;s++)r=i[s]+"Controller",t(this,r,e(n,r))},disconnectOutlet:function(e){e=e||"view",t(this,e,null)},createOutletView:function(e,t){return t.create()},urlForEvent:function(t,r){var n=e(this,"target");return n?n.urlForEvent(t,r):void 0}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.String.fmt);Ember.View.reopen({templateForName:function(r,n){if(r){var i=e(this,"templates"),s=e(i,r);if(!s)throw new Ember.Error(t('%@ - Unable to find %@ "%@".',[this,n,r]));return s}}})}()}(),"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.");
|
15
|
+
!function(){var e,t;!function(){var r={},n={};e=function(e,t,n){r[e]={deps:t,callback:n}},t=function(e){if(n[e])return n[e];n[e]={};var i,s,o,a,u;if(i=r[e],!i)throw new Error("Module '"+e+"' not found.");s=i.deps,o=i.callback,a=[];for(var c=0,h=s.length;h>c;c++)"exports"===s[c]?a.push(u={}):a.push(t(s[c]));var l=o.apply(this,a);return n[e]=u||l}}(),function(){function e(e){return r.console&&r.console[e]?r.console[e].apply?function(){r.console[e].apply(r.console,arguments)}:function(){var t=Array.prototype.join.call(arguments,", ");r.console[e](t)}:void 0}function t(e,t){if(!e)try{throw new Error("assertion failed: "+t)}catch(r){setTimeout(function(){throw r},0)}}"undefined"==typeof Ember&&(Ember={});var r=Ember.imports=Ember.imports||this,n=Ember.exports=Ember.exports||this;Ember.lookup=Ember.lookup||this,n.Em=n.Ember=Em=Ember,Ember.isNamespace=!0,Ember.toString=function(){return"Ember"},Ember.VERSION="1.0.0-rc.6",Ember.ENV=Ember.ENV||("undefined"==typeof ENV?{}:ENV),Ember.config=Ember.config||{},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.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},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)}},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(s){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],s=0;r>s;s++)s in t&&(n[s]=e.call(i,t[s],s,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(){function e(e){this.descs={},this.watching={},this.cache={},this.source=e}function t(e,t){return!(!e||"function"!=typeof e[t])}var r=Ember.platform.defineProperty,n=Ember.create,i="__ember"+ +new Date,s=0,o=[],a={},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");var n=t+s++;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=o[e],t||(t=o[e]="nu"+e),t;case"string":return t=a[e],t||(t=a[e]="st"+s++),t;case"boolean":return e?"(true)":"(false)";default:return e[i]?e[i]:e===Object?"(Object)":e===Array?"(Array)":(t="ember"+s++,c.value=t,r(e,i,c),t)}};var h={writable:!0,configurable:!1,enumerable:!1,value:null},l=Ember.GUID_KEY+"_meta";Ember.META_KEY=l;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 s=t[l];return i===!1?s||m:(s?s.source!==t&&(f||r(t,l,h),s=n(s),s.descs=n(s.descs),s.watching=n(s.watching),s.cache={},s.source=t,u&&(s.values=n(s.values)),t[l]=s):(f||r(t,l,h),s=new e(t),u&&(s.values={}),t[l]=s,s.descs.constructor=null),s)},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,s,o=Ember.meta(e,r),a=0,u=t.length;u>a;a++){if(i=t[a],s=o[i]){if(s.__ember_source__!==e){if(!r)return void 0;s=o[i]=n(s),s.__ember_source__=e}}else{if(!r)return void 0;s=o[i]={__ember_source__:e}}o=s}return s},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.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,s;r=r||this;try{n=e.call(r)}finally{try{i=t.call(r)}catch(o){s=o}}if(s)throw s;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,s,o;n=n||this;try{i=e.call(n)}catch(a){i=t.call(n,a)}finally{try{s=r.call(n)}catch(u){o=u}}if(o)throw o;return void 0===s?i:s}:function(e,t,r,n){var i,s;n=n||this;try{i=e.call(n)}catch(o){i=t.call(n,o)}finally{s=r.call(n)}return void 0===s?i:s};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}}(),function(){Ember.Instrumentation={};var e=[],t={},r=function(r){for(var n,i=[],s=0,o=e.length;o>s;s++)n=e[s],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,s,o){function a(){for(p=0,d=m.length;d>p;p++)f=m[p],b[p]=f.before(e,n(),i);return s.call(o)}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(h)}var h,l,m=t[e];if(Ember.STRUCTURED_PROFILE&&(h=e+": "+i.object,console.time(h)),m||(m=r(e)),0===m.length)return l=s.call(o),Ember.STRUCTURED_PROFILE&&console.timeEnd(h),l;var f,p,d,b=[];return Ember.tryCatchFinally(a,u,c)},Ember.Instrumentation.subscribe=function(r,n){for(var i,s=r.split("."),o=[],a=0,u=s.length;u>a;a++)i=s[a],"*"===i?o.push("[^\\.]*"):o.push(i);o=o.join("\\."),o+="(\\..*)?";var c={pattern:r,regex:new RegExp("^"+o+"$"),object:n};return e.push(c),t={},c},Ember.Instrumentation.unsubscribe=function(r){for(var n,i=0,s=e.length;s>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;n=Array.prototype.concat,e=Array.prototype.map||Ember.ArrayPolyfills.map,t=Array.prototype.forEach||Ember.ArrayPolyfills.forEach,r=Array.prototype.indexOf||Ember.ArrayPolyfills.indexOf;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){if(e.replace)return e.replace(t,r,i);var s=n.apply([t,r],i);return e.splice.apply(e,s)},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[\.\*]/,s=/^([^\.\*]+)/;e=function(e,n){if(""===n)return e;if(n||"string"!=typeof e||(n=e,e=null),null===e||-1!==n.indexOf("."))return a(e,n);var i,s=e[t],o=s&&s.descs[n];return o?o.get(e,n):(i=r&&s&&s.watching[n]>0?s.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 o=Ember.normalizeTuple=function(t,r){var o,a=i.test(r),u=!a&&n.test(r);if((!t||u)&&(t=Ember.lookup),a&&(r=r.slice(5)),t===Ember.lookup&&(o=r.match(s)[0],t=e(t,o),r=r.slice(o.length+1)),!r||0===r.length)throw new Error("Invalid Path");return[t,r]},a=Ember._getPath=function(t,r){var n,s,a,u,c;if(null===t&&-1===r.indexOf("."))return e(Ember.lookup,r);for(n=i.test(r),(!t||n)&&(a=o(t,r),t=a[0],r=a[1],a.length=0),s=r.split("."),c=s.length,u=0;null!=t&&c>u;u++)if(t=e(t,s[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,Ember.getPath=Ember.deprecateFunc("getPath is deprecated since get now supports paths",Ember.get)}(),function(){function e(e,t,r){for(var n=-1,i=0,s=e.length;s>i;i++)if(t===e[i][0]&&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],s=i&&i.listeners&&i.listeners[r];if(s)for(var o=s.length-1;o>=0;o--){var a=s[o][0],u=s[o][1],c=s[o][2],h=e(n,a,u);-1===h&&n.push([a,u,c])}}function n(t,r,n){var i=t[p],s=i&&i.listeners&&i.listeners[r],o=[];if(s){for(var a=s.length-1;a>=0;a--){var u=s[a][0],c=s[a][1],h=s[a][2],l=e(n,u,c);-1===l&&(n.push([u,c,h]),o.push([u,c,h]))}return o}}function i(r,n,i,s,o){s||"function"!=typeof i||(s=i,i=null);var a=t(r,n),u=e(a,i,s),c=0;o&&(c|=d),-1===u&&(a.push([i,s,c]),"function"==typeof r.didAddListener&&r.didAddListener(n,i,s))}function s(r,n,i,s){function o(i,s){var o=t(r,n),a=e(o,i,s);-1!==a&&(o.splice(a,1),"function"==typeof r.didRemoveListener&&r.didRemoveListener(n,i,s))}if(s||"function"!=typeof i||(s=i,i=null),s)o(i,s);else{var a=r[p],u=a&&a.listeners&&a.listeners[n];if(!u)return;for(var c=u.length-1;c>=0;c--)o(u[c][0],u[c][1])}}function o(r,n,i,s,o){function a(){return o.call(i)}function u(){c&&(c[2]&=~b)}s||"function"!=typeof i||(s=i,i=null);var c,h=t(r,n),l=e(h,i,s);return-1!==l&&(c=h[l].slice(),c[2]|=b,h[l]=c),Ember.tryFinally(a,u)}function a(r,n,i,s,o){function a(){return o.call(i)}function u(){for(m=0,f=p.length;f>m;m++)p[m][2]&=~b}s||"function"!=typeof i||(s=i,i=null);var c,h,l,m,f,p=[];for(m=0,f=n.length;f>m;m++){c=n[m],h=t(r,c);var d=e(h,i,s);-1!==d&&(l=h[d].slice(),l[2]|=b,h[d]=l,p.push(l))}return Ember.tryFinally(a,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 o=n.length-1;o>=0;o--){var a=n[o];if(a){var u=a[0],c=a[1],h=a[2];h&b||(h&d&&s(e,t,u,c),u||(u=e),"string"==typeof c&&(c=u[c]),r?c.apply(u,r):c.call(u))}}return!0}}function h(e,t){var r=e[p],n=r&&r.listeners&&r.listeners[t];return!(!n||!n.length)}function l(e,t){var r=[],n=e[p],i=n&&n.listeners&&n.listeners[t];if(!i)return r;for(var s=0,o=i.length;o>s;s++){var a=i[s][0],u=i[s][1];r.push([a,u])}return r}var m=Ember.create,f=Ember.meta,p=Ember.META_KEY,d=1,b=2;Ember.addListener=i,Ember.removeListener=s,Ember._suspendListener=o,Ember._suspendListeners=a,Ember.sendEvent=c,Ember.hasListeners=h,Ember.watchedEvents=u,Ember.listenersFor=l,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,s=this.observerSet,o=this.observers,a=e(t),u=s[a];return u||(s[a]=u={}),i=u[r],void 0===i&&(i=o.push({sender:t,keyName:r,eventName:n,listeners:[]})-1,u[r]=i),o[i].listeners},r.prototype.flush=function(){var e,r,n,i,s=this.observers;for(this.clear(),e=0,r=s.length;r>e;++e)n=s[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,i){if(!e.isDestroying){var s=n,o=!s;o&&(s=n={}),r(d,e,t,s,i),o&&(n=null)}}function t(e,t,n){if(!e.isDestroying){var s=i,o=!s;o&&(s=i={}),r(b,e,t,s,n),o&&(i=null)}}function r(e,t,r,n,i){var s=o(t);if(n[s]||(n[s]={}),!n[s][r]){n[s][r]=!0;var a=i.deps;if(a=a&&a[r])for(var u in a){var c=i.descs[u];c&&c._suspended===t||e(t,u)}}}var n,i,s=Ember.meta,o=Ember.guidFor,a=Ember.tryFinally,u=Ember.sendEvent,c=Ember.listenersUnion,h=Ember.listenersDiff,l=Ember._ObserverSet,m=new l,f=new l,p=0,d=Ember.propertyWillChange=function(t,r){var n=s(t,!1),i=n.watching[r]>0||"length"===r,o=n.proto,a=n.descs[r];i&&o!==t&&(a&&a.willChange&&a.willChange(t,r),e(t,r,n),E(t,r,n),w(t,r))},b=Ember.propertyDidChange=function(e,r){var n=s(e,!1),i=n.watching[r]>0||"length"===r,o=n.proto,a=n.descs[r];o!==e&&(a&&a.didChange&&a.didChange(e,r),(i||"length"===r)&&(t(e,r,n),v(e,r,n),_(e,r)))},E=function(e,t,r,n){if(r.hasOwnProperty("chainWatchers")){var i=r.chainWatchers;if(i=i[t])for(var s=0,o=i.length;o>s;s++)i[s].willChange(n)}},v=function(e,t,r,n){if(r.hasOwnProperty("chainWatchers")){var i=r.chainWatchers;if(i=i[t])for(var s=i.length-1;s>=0;s--)i[s].didChange(n)}};Ember.overrideChains=function(e,t,r){v(e,t,r,!0)};var g=Ember.beginPropertyChanges=function(){p++},y=Ember.endPropertyChanges=function(){p--,0>=p&&(m.clear(),f.flush())};Ember.changeProperties=function(e,t){g(),a(e,y,t)};var w=function(e,t){if(!e.isDestroying){var r,n,i=t+":before";p?(r=m.add(e,t,i),n=h(e,i,r),u(e,i,[e,t],n)):u(e,i,[e,t])}},_=function(e,t){if(!e.isDestroying){var r,n=t+":change";p?(r=f.add(e,t,n),c(e,n,r)):u(e,n,[e,t])}}}(),function(){function e(e,t,r,s){var o;if(o=t.slice(t.lastIndexOf(".")+1),t=t.slice(0,t.length-(o.length+1)),"this"!==t&&(e=n(e,t)),!o||0===o.length)throw new Error("You passed an empty path");if(!e){if(s)return;throw new Error("Object in path "+t+" could not be found or was destroyed.")}return i(e,o,r)}var t=Ember.META_KEY,r=Ember.ENV.MANDATORY_SETTER,n=Ember._getPath,i=function(n,i,s,o){if("string"==typeof n&&(s=i,i=n,n=null),!n||-1!==i.indexOf("."))return e(n,i,s,o);var a,u,c=n[t],h=c&&c.descs[i];return h?h.set(n,i,s):(a="object"==typeof n&&!(i in n),a&&"function"==typeof n.setUnknownProperty?n.setUnknownProperty(i,s):c&&c.watching[i]>0?(u=r?c.values[i]:n[i],s!==u&&(Ember.propertyWillChange(n,i),r?void 0!==u||i in n?c.values[i]=s:Ember.defineProperty(n,i,null,s):n[i]=s,Ember.propertyDidChange(n,i))):n[i]=s),s};Ember.config.overrideAccessors&&(Ember.set=i,Ember.config.overrideAccessors(),i=Ember.set),Ember.set=i,Ember.setPath=Ember.deprecateFunc("setPath is deprecated since set now supports paths",Ember.set),Ember.trySet=function(e,t,r){return i(e,t,r,!0)},Ember.trySetPath=Ember.deprecateFunc("trySetPath has been renamed to trySet",Ember.trySet)}(),function(){var e=(Ember.get,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},s=Ember.OrderedSet=function(){this.clear()};s.create=function(){return new s},s.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,s=this.list;delete i[n];var o=r.call(s,e);o>-1&&s.splice(o,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 s;return e.presenceSet=n(this.presenceSet),e.list=this.toArray(),e}};var o=Ember.Map=function(){this.keys=Ember.OrderedSet.create(),this.values={}};o.create=function(){return new o},o.prototype={length:0,get:function(e){var r=this.values,n=t(e);return r[n]},set:function(r,n){var i=this.keys,s=this.values,o=t(r);i.add(r),s[o]=n,e(this,"length",i.list.length)},remove:function(r){var n=this.keys,i=this.values,s=t(r);return i.hasOwnProperty(s)?(n.remove(r),delete i[s],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 s=t(n);e.call(r,n,i[s])})},copy:function(){return i(this,new o)}};var a=Ember.MapWithDefault=function(e){o.call(this),this.defaultValue=e.defaultValue};a.create=function(e){return e?new a(e):new o},a.prototype=Ember.create(o.prototype),a.prototype.get=function(e){var t=this.has(e);if(t)return o.prototype.get.call(this,e);var r=this.defaultValue(e);return this.set(e,r),r},a.prototype.copy=function(){return i(this,new a({defaultValue:this.defaultValue}))}}(),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(){},s=Ember.DEFAULT_GETTER_FUNCTION=function(t){return function(){var r=this[e];return r&&r.values[t]}};Ember.defineProperty=function(e,o,a,u,c){var h,l,m,f;return c||(c=t(e)),h=c.descs,l=c.descs[o],m=c.watching[o]>0,l instanceof Ember.Descriptor&&l.teardown(e,o),a instanceof Ember.Descriptor?(f=a,h[o]=a,n&&m?r(e,o,{configurable:!0,enumerable:!0,writable:!0,value:void 0}):e[o]=void 0,a.setup(e,o)):(h[o]=void 0,null==a?(f=u,n&&m?(c.values[o]=u,r(e,o,{configurable:!0,enumerable:!0,set:i,get:s(o)})):e[o]=u):(f=a,r(e,o,a))),m&&Ember.overrideChains(e,o,c),e.didDefineProperty&&e.didDefineProperty(e,o,f),this}}(),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,s){if("length"!==s||"array"!==t(i)){var o,a=e(i),u=a.watching;u[s]?u[s]=(u[s]||0)+1:(u[s]=1,o=a.descs[s],o&&o.willWatch&&o.willWatch(i,s),"function"==typeof i.willWatchProperty&&i.willWatchProperty(s),r&&s in i&&(a.values[s]=i[s],n(i,s,{configurable:!0,enumerable:!0,set:Ember.MANDATORY_SETTER_FUNCTION,get:Ember.DEFAULT_GETTER_FUNCTION(s)})))}},Ember.unwatchKey=function(t,i){var s,o=e(t),a=o.watching;1===a[i]?(a[i]=0,s=o.descs[i],s&&s.didUnwatch&&s.didUnwatch(t,i),"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(m)[0]}function t(e,t,r){if(e&&"object"==typeof e){var i=n(e),s=i.chainWatchers;i.hasOwnProperty("chainWatchers")||(s=i.chainWatchers={}),s[t]||(s[t]=[]),s[t].push(r),u(e,t)}}function r(e){return n(e,!1).proto===e}var n=Ember.meta,i=Ember.get,s=Ember.normalizeTuple,o=Ember.ArrayPolyfills.forEach,a=Ember.warn,u=Ember.watchKey,c=Ember.unwatchKey,h=Ember.propertyWillChange,l=Ember.propertyDidChange,m=/^([^\.\*]+)/,f=[];Ember.flushPendingChains=function(){if(0!==f.length){var e=f;f=[],o.call(e,function(e){e[0].add(e[1])}),a("Watching an undefined global, Ember expects watched globals to be setup by the time the run loop is flushed, check for typos",0===f.length)}};var p=Ember.removeChainWatcher=function(e,t,r){if(e&&"object"==typeof e){var i=n(e,!1);if(i.hasOwnProperty("chainWatchers")){var s=i.chainWatchers;if(s[t]){s=s[t];for(var o=0,a=s.length;a>o;o++)s[o]===r&&s.splice(o,1)}c(e,t)}}},d=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()},b=d.prototype;b.value=function(){if(void 0===this._value&&this._watching){var e=this._parent.value();this._value=e&&!r(e)?i(e,this._key):void 0}return this._value},b.destroy=function(){if(this._watching){var e=this._object;e&&p(e,this._key,this),this._watching=!1}},b.copy=function(e){var t,r=new d(null,null,e),n=this._paths;for(t in n)n[t]<=0||r.add(t);return r},b.add=function(t){var r,n,i,o,a;if(a=this._paths,a[t]=(a[t]||0)+1,r=this.value(),n=s(r,t),n[0]&&n[0]===r)t=n[1],i=e(t),t=t.slice(i.length+1);else{if(!n[0])return f.push([this,t]),n.length=0,void 0;o=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]}n.length=0,this.chain(i,t,o)},b.remove=function(t){var r,n,i,o,a;a=this._paths,a[t]>0&&a[t]--,r=this.value(),n=s(r,t),n[0]===r?(t=n[1],i=e(t),t=t.slice(i.length+1)):(o=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]),n.length=0,this.unchain(i,t)},b.count=0,b.chain=function(t,r,n){var i,s=this._chains;s||(s=this._chains={}),i=s[t],i||(i=s[t]=new d(this,t,n)),i.count++,r&&r.length>0&&(t=e(r),r=r.slice(t.length+1),i.chain(t,r))},b.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())},b.willChange=function(){var e=this._chains;if(e)for(var t in e)e.hasOwnProperty(t)&&e[t].willChange();this._parent&&this._parent.chainWillChange(this,this._key,1)},b.chainWillChange=function(e,t,r){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainWillChange(this,t,r+1):(r>1&&h(this.value(),t),t="this."+t,this._paths[t]>0&&h(this.value(),t))},b.chainDidChange=function(e,t,r){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainDidChange(this,t,r+1):(r>1&&l(this.value(),t),t="this."+t,this._paths[t]>0&&l(this.value(),t))},b.didChange=function(e){if(this._watching){var r=this._parent.value();r!==this._object&&(p(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);e||this._parent&&this._parent.chainDidChange(this,this._key,1)},Ember.finishChains=function(e){var t=n(e,!1),r=t.chains;r&&(r.value()!==e&&(t.chains=r=r.copy(e)),r.didChange(!0))}}(),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 s=t(n),o=s.watching;o[i]?o[i]=(o[i]||0)+1:(o[i]=1,e(n).add(i))}},Ember.unwatchPath=function(r,n){var i=t(r),s=i.watching;1===s[n]?(s[n]=0,e(r).remove(n)):s[n]>1&&s[n]--}}(),function(){function e(e){return"*"===e||!l.test(e)}var t=Ember.meta,r=Ember.GUID_KEY,n=Ember.META_KEY,i=Ember.removeChainWatcher,s=Ember.watchKey,o=Ember.unwatchKey,a=Ember.watchPath,u=Ember.unwatchPath,c=Ember.typeOf,h=Ember.generateGuid,l=/[\.\*]/;Ember.watch=function(t,r){("length"!==r||"array"!==c(t))&&(e(r)?s(t,r):a(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)?o(t,r):u(t,r))},Ember.rewatch=function(e){var n=t(e,!1),i=n.chains;r in e&&!e.hasOwnProperty(r)&&h(e,"ember"),i&&i.value()!==e&&(n.chains=i.copy(e))};var m=[];Ember.destroy=function(e){var t,r,s,o,a=e[n];if(a&&(e[n]=null,t=a.chains))for(m.push(t);m.length>0;){if(t=m.pop(),r=t._chains)for(s in r)r.hasOwnProperty(s)&&m.push(r[s]);t._watching&&(o=t._object,o&&i(o,t._key,t))}}}(),function(){function e(e,t){var r=e[t];return r?e.hasOwnProperty(t)||(r=e[t]=m(r)):r=e[t]={},r}function t(t){return e(t,"deps")}function r(r,n,i,s){var o,a,u,c,h,l=r._dependentKeys;if(l)for(o=t(s),a=0,u=l.length;u>a;a++)c=l[a],h=e(o,c),h[i]=(h[i]||0)+1,p(n,c)}function n(r,n,i,s){var o,a,u,c,h,l=r._dependentKeys;if(l)for(o=t(s),a=0,u=l.length;u>a;a++)c=l[a],h=e(o,c),h[i]=(h[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 s(e,t){for(var r={},n=0;n<t.length;n++)r[t[n]]=u(e,t[n]);return r}function o(e,t){Ember.computed[e]=function(e){var r=l.call(arguments);return Ember.computed(e,function(){return t.apply(this,r)})}}function a(e,t){Ember.computed[e]=function(){var e=l.call(arguments),r=Ember.computed(function(){return t.apply(this,[s(this,e)])});return r.property.apply(r,e)}}var u=Ember.get,c=Ember.set,h=Ember.meta,l=[].slice,m=Ember.create,f=Ember.META_KEY,p=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(){for(var e=[],t=0,r=arguments.length;r>t;t++)e.push(arguments[t]);return this._dependentKeys=e,this},b.meta=function(e){return 0===arguments.length?this._meta||{}:(this._meta=e,this)},b.willWatch=function(e,t){var n=e[f];t in n.cache||r(this,e,t,n)},b.didUnwatch=function(e,t){var r=e[f];t in r.cache||n(this,e,t,r)},b.didChange=function(e,t){if(this._cacheable&&this._suspended!==e){var r=h(e);t in r.cache&&(delete r.cache[t],r.watching[t]||n(this,e,t,r))}},b.get=function(e,t){var n,i,s;if(this._cacheable){if(s=h(e),i=s.cache,t in i)return i[t];n=i[t]=this.func.call(e,t),s.watching[t]||r(this,e,t,s)}else n=this.func.call(e,t);return n},b.set=function(e,t,n){var i,s,o=this._cacheable,a=this.func,u=h(e,o),c=u.watching[t],l=this._suspended,m=!1,f=u.cache;if(this._readOnly)throw new Error("Cannot Set: "+t+" on: "+e.toString());this._suspended=e;try{if(o&&f.hasOwnProperty(t)&&(i=f[t],m=!0),a.wrappedFunction&&(a=a.wrappedFunction),3===a.length)s=a.call(e,t,n,i);else{if(2!==a.length)return Ember.defineProperty(e,t,null,i),Ember.set(e,t,n),void 0;s=a.call(e,t,n)}if(m&&i===s)return;c&&Ember.propertyWillChange(e,t),m&&delete f[t],o&&(c||m||r(this,e,t,u),f[t]=s),c&&Ember.propertyDidChange(e,t)}finally{this._suspended=l}return s},b.setup=function(e,t){var n=e[f];n&&n.watching[t]&&r(this,e,t,h(e))},b.teardown=function(e,t){var r=h(e);return(r.watching[t]||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=l.call(arguments,0,-1),e=l.call(arguments,-1)[0]),"function"!=typeof e)throw new 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},o("empty",function(e){return Ember.isEmpty(u(this,e))}),o("notEmpty",function(e){return!Ember.isEmpty(u(this,e))}),o("none",function(e){return Ember.isNone(u(this,e))}),o("not",function(e){return!u(this,e)}),o("bool",function(e){return!!u(this,e)}),o("match",function(e,t){var r=u(this,e);return"string"==typeof r?!!r.match(t):!1}),o("equal",function(e,t){return u(this,e)===t}),o("gt",function(e,t){return u(this,e)>t}),o("gte",function(e,t){return u(this,e)>=t}),o("lt",function(e,t){return u(this,e)<t}),o("lte",function(e,t){return u(this,e)<=t}),a("and",function(e){for(var t in e)if(e.hasOwnProperty(t)&&!e[t])return!1;return!0}),a("or",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!0;return!1}),a("any",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return e[t];return null}),a("map",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?(c(this,e,r),r):u(this,e)})},Ember.computed.oneWay=function(e){return Ember.computed(e,function(){return u(this,e)})},Ember.computed.defaultTo=function(e){return Ember.computed(function(t,r,n){return 1===arguments.length?null!=n?n:u(this,e):null!=r?r:u(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,s){return Ember._suspendListener(e,t(r),n,i,s)},Ember._suspendObserver=function(t,r,n,i,s){return Ember._suspendListener(t,e(r),n,i,s)};var i=Ember.ArrayPolyfills.map;Ember._suspendBeforeObservers=function(e,r,n,s,o){var a=i.call(r,t);return Ember._suspendListeners(e,a,n,s,o)},Ember._suspendObservers=function(t,r,n,s,o){var a=i.call(r,e);return Ember._suspendListeners(t,a,n,s,o)},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",["backburner/deferred_action_queues","exports"],function(e,t){"use strict";function r(e,t){this.queueNames=e,this.options=t||{},this.options.defaultQueue||(this.options.defaultQueue=e[0]),this.instanceStack=[]}function n(e){e.begin(),s=window.setTimeout(function(){e.end(),s=null})}function i(e){var t,r,n,s,u=+new Date;e.run(function(){for(n=0,s=m.length;s>n&&(t=m[n],!(t>u));n+=2);for(r=m.splice(0,n),n=1,s=r.length;s>n;n+=2)e.schedule(e.options.defaultQueue,null,r[n])}),m.length&&(o=window.setTimeout(function(){i(e),o=null,a=null},m[0]-u),a=m[0])}var s,o,a,u=e.DeferredActionQueues,c=[].slice,h=[].pop,l=[],m=[];r.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 u(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)
|
16
|
+
}},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,c.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 i=this.DEBUG?(new Error).stack:void 0,s=arguments.length>3?c.call(arguments,3):void 0;return this.currentInstance||n(this),this.currentInstance.schedule(e,t,r,s,!1,i)},deferOnce:function(e,t,r){r||(r=t,t=null),"string"==typeof r&&(r=t[r]);var i=this.DEBUG?(new Error).stack:void 0,s=arguments.length>3?c.call(arguments,3):void 0;return this.currentInstance||n(this),this.currentInstance.schedule(e,t,r,s,!0,i)},setTimeout:function(){var e=this,t=h.call(arguments),r=arguments[0],n=arguments[1],s=+new Date+t;n||(n=r,r=null),"string"==typeof n&&(n=r[n]);var u,l;arguments.length>2?(l=c.call(arguments,2),u=function(){n.apply(r,l)}):u=function(){n.call(r)};var f,p;for(f=0,p=m.length;p>f&&!(s<m[f]);f+=2);return m.splice(f,0,s,u),o&&s>a?u:(o&&(clearTimeout(o),o=null),o=window.setTimeout(function(){i(e),o=null,a=null},t),a=s,u)},debounce:function(e,t){for(var r,n=this,i=arguments,s=h.call(i),o=0,a=l.length;a>o;o++)if(r=l[o],r[0]===e&&r[1]===t)return;var u=window.setTimeout(function(){n.run.apply(n,i);for(var s=-1,o=0,a=l.length;a>o;o++)if(r=l[o],r[0]===e&&r[1]===t){s=o;break}s>-1&&l.splice(s,1)},s);l.push([e,t,u])},cancelTimers:function(){for(var e=0,t=l.length;t>e;e++)clearTimeout(l[e][2]);l=[],o&&(clearTimeout(o),o=null),m=[],s&&(clearTimeout(s),s=null)},hasTimers:function(){return!!m.length||s},cancel:function(e){if(e&&"object"==typeof e&&e.queue&&e.method)return e.queue.cancel(e);if("function"==typeof e)for(var t=0,r=m.length;r>t;t+=2)if(m[t+1]===e)return m.splice(t,2),!0}},r.prototype.schedule=r.prototype.defer,r.prototype.scheduleOnce=r.prototype.deferOnce,r.prototype.later=r.prototype.setTimeout,t.Backburner=r}),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,s=0,o=e.length;o>s;s++)n=e[s],r[n]=new i(this,n,t[n])}function n(e,t){for(var r,n,i=0,s=t;s>=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,s){var o=this.queues,a=o[e];if(!a)throw new Error("You attempted to schedule an action in a queue ("+e+") that doesn't exist");return i?a.pushUnique(t,r,n,s):a.push(t,r,n,s)},flush:function(){for(var e,t,r,i,s=this.queues,o=this.queueNames,a=0,u=o.length;u>a;){e=o[a],t=s[e],r=t._queueBeingFlushed=t._queue.slice(),t._queue=[];var c,h,l,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],h=r[b+1],l=r[b+2],m=r[b+3],"string"==typeof h&&(h=c[h]),h&&(l&&l.length>0?h.apply(c,l):h.call(c)),b+=4;t._queueBeingFlushed=null,E&&d&&d(),-1===(i=n(this,a))?a++:a=i}}},t.DeferredActionQueues=r}),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,s,o,a,u=this._queue;for(o=0,a=u.length;a>o;o+=4)if(i=u[o],s=u[o+1],i===e&&s===t)return u[o+2]=r,u[o+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,s=this._queue,o=this.options,a=o&&o.before,u=o&&o.after,c=s.length;for(c&&a&&a(),i=0;c>i;i+=4)e=s[i],t=s[i+1],r=s[i+2],n=s[i+3],r&&r.length>0?t.apply(e,r):t.call(e);c&&u&&u(),s.length>c?(this._queue=s.slice(c),this.flush()):this._queue.length=0},cancel:function(e){var t,r,n,i,s=this._queue;for(n=0,i=s.length;i>n;n+=4)if(t=s[n],r=s[n+1],t===e.target&&r===e.method)return s.splice(n,4),!0;if(s=this._queueBeingFlushed)for(n=0,i=s.length;i>n;n+=4)if(t=s[n],r=s[n+1],t===e.target&&r===e.method)return s[n+1]=null,!0}},e.Queue=t})}(),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,s=new i(["sync","actions","destroy"],{sync:{before:Ember.beginPropertyChanges,after:Ember.endPropertyChanges},defaultQueue:"actions",onBegin:r,onEnd:n}),o=[].slice;Ember.run=function(){var e;if(Ember.onerror)try{e=s.run.apply(s,arguments)}catch(t){Ember.onerror(t)}else e=s.run.apply(s,arguments);return e},Ember.run.join=function(){if(!Ember.run.currentRunLoop)return Ember.run.apply(Ember.run,arguments);var e=o.call(arguments);e.unshift("actions"),Ember.run.schedule.apply(Ember.run,e)},Ember.run.backburner=s,Ember.run,Ember.run.currentRunLoop=null,Ember.run.queues=s.queueNames,Ember.run.begin=function(){s.begin()},Ember.run.end=function(){s.end()},Ember.run.schedule=function(){e(),s.schedule.apply(s,arguments)},Ember.run.hasScheduledTimers=function(){return s.hasTimers()},Ember.run.cancelTimers=function(){s.cancelTimers()},Ember.run.sync=function(){s.currentInstance&&s.currentInstance.queues.sync.flush()},Ember.run.later=function(){return s.later.apply(s,arguments)},Ember.run.once=function(){e();var t=o.call(arguments);return t.unshift("actions"),s.scheduleOnce.apply(s,t)},Ember.run.scheduleOnce=function(){return e(),s.scheduleOnce.apply(s,arguments)},Ember.run.next=function(){var e=o.call(arguments);return e.push(1),s.later.apply(s,e)},Ember.run.cancel=function(e){return s.cancel(e)},Ember.run.debounce=function(){return s.debounce.apply(s,arguments)}}(),function(){function e(e,t){return r(s(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$]))/,s=Ember.isGlobalPath=function(e){return i.test(e)},o=function(e,t){this._direction="fwd",this._from=t,this._to=e,this._directionMap=Ember.Map.create()};o.prototype={copy:function(){var e=new o(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,s=i.get(t),o=this._from,a=this._to;if(i.remove(t),"fwd"===s){var u=e(t,this._from);n&&Ember.Logger.log(" ",this.toString(),"->",u,t),this._oneWay?Ember.trySet(t,a,u):Ember._suspendObserver(t,a,this,this.toDidChange,function(){Ember.trySet(t,a,u)})}else if("back"===s){var c=r(t,this._to);n&&Ember.Logger.log(" ",this.toString(),"<-",c,t),Ember._suspendObserver(t,o,this,this.fromDidChange,function(){Ember.trySet(Ember.isGlobalPath(o)?Ember.lookup:t,o,c)})}}}},t(o,{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=o,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=A(r)):r=t.mixins={},r}function t(e,t){return t&&t.length>0&&(e.mixins=_.call(t,function(e){if(e instanceof g)return e;var t=new g;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 g?(r=x(t),e[r]?V:(e[r]=t,t.properties)):t}function i(e,t,r){var n;return n=t.concatenatedProperties||r.concatenatedProperties,e.concatenatedProperties&&(n=n?n.concat(e.concatenatedProperties):e.concatenatedProperties),n}function s(e,t,r,n,i){var s;return void 0===n[t]&&(s=i[t]),s=s||e.descs[t],s&&s instanceof Ember.ComputedProperty?(r=A(r),r.func=Ember.wrap(r.func,s.func),r):r}function o(e,t,r,n,i){var s;return void 0===i[t]&&(s=n[t]),s=s||e[t],"function"!=typeof s?r:Ember.wrap(r,s)}function a(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,u,c,h){if(n instanceof Ember.Descriptor){if(n===y&&u[t])return V;n.func&&(n=s(i,t,n,c,u)),u[t]=n,c[t]=void 0}else r(n)?n=o(e,t,n,c,u):(h&&C.call(h,t)>=0||"concatenatedProperties"===t)&&(n=a(e,t,n,c)),u[t]=void 0,c[t]=n}function c(e,t,r,s,o,a){function h(e){delete r[e],delete s[e]}for(var l,m,f,p,d,b=0,E=e.length;E>b;b++)if(l=e[b],m=n(t,l),m!==V)if(m){d=Ember.meta(o),p=i(m,s,o);for(f in m)m.hasOwnProperty(f)&&(a.push(f),u(o,f,m[f],d,r,s,p));m.hasOwnProperty("toString")&&(o.toString=m.toString)}else l.mixins&&(c(l.mixins,t,r,s,o,a),l._without&&O.call(l._without,h))}function h(e,t,r,n){if(D.test(t)){var i=n.bindings;i?n.hasOwnProperty("bindings")||(i=n.bindings=A(n.bindings)):i=n.bindings={},i[t]=r}}function l(e,t){var r,n,i,s=t.bindings;if(s){for(r in s)n=s[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 m(e,t){return l(e,t||Ember.meta(e)),e}function f(e,t,r,n,i){var s,o=t.methodName;return n[o]||i[o]?(s=i[o],t=n[o]):r.descs[o]?(t=r.descs[o],s=void 0):(t=void 0,s=e[o]),{desc:t,value:s}}function p(e,t,r,n,i){if("function"==typeof r){var s=r[n];if(s)for(var o=0,a=s.length;a>o;o++)Ember[i](e,s[o],null,t)}}function d(e,t,r){var n=e[t];p(e,t,n,"__ember_observesBefore__","removeBeforeObserver"),p(e,t,n,"__ember_observes__","removeObserver"),p(e,t,r,"__ember_observesBefore__","addBeforeObserver"),p(e,t,r,"__ember_observes__","addObserver")}function b(t,r,n){var i,s,o,a={},u={},l=Ember.meta(t),p=[];c(r,e(t),a,u,t,p);for(var b=0,E=p.length;E>b;b++)if(i=p[b],"constructor"!==i&&u.hasOwnProperty(i)&&(o=a[i],s=u[i],o!==y)){for(;o&&o instanceof w;){var v=f(t,o,l,a,u);o=v.desc,s=v.value}(void 0!==o||void 0!==s)&&(d(t,i,s),h(t,i,s,l),P(t,i,o,s,l))}return n||m(t,l),t}function E(e,t,r){var n=x(e);if(r[n])return!1;if(r[n]=!0,e===t)return!0;for(var i=e.mixins,s=i?i.length:0;--s>=0;)if(E(i[s],t,r))return!0;return!1}function v(e,t,r){if(!r[x(t)])if(r[x(t)]=!0,t.properties){var n=t.properties;for(var i in n)n.hasOwnProperty(i)&&(e[i]=!0)}else t.mixins&&O.call(t.mixins,function(t){v(e,t,r)})}var g,y,w,_=Ember.ArrayPolyfills.map,C=Ember.ArrayPolyfills.indexOf,O=Ember.ArrayPolyfills.forEach,S=[].slice,A=Ember.create,P=Ember.defineProperty,x=Ember.guidFor,V={},D=Ember.IS_BINDING=/^.+Binding$/;Ember.mixin=function(e){var t=S.call(arguments,1);return b(e,t,!1),e},Ember.Mixin=function(){return t(this,arguments)},g=Ember.Mixin,g.prototype={properties:null,mixins:null,ownerConstructor:null},g._apply=b,g.applyPartial=function(e){var t=S.call(arguments,1);return b(e,t,!0)},g.finishPartial=m,Ember.anyUnprocessedMixins=!1,g.create=function(){Ember.anyUnprocessedMixins=!0;var e=this;return t(new e,arguments)};var T=g.prototype;T.reopen=function(){var e,t;this.properties?(e=g.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 g?i.push(e):(t=g.create(),t.properties=e,i.push(t));return this},T.apply=function(e){return b(e,[this],!1)},T.applyPartial=function(e){return b(e,[this],!0)},T.detect=function(e){if(!e)return!1;if(e instanceof g)return E(e,this,{});var t=Ember.meta(e,!1).mixins;return t?!!t[x(this)]:!1},T.without=function(){var e=new g(this);return e._without=S.call(arguments),e},T.keys=function(){var e={},t={},r=[];v(e,this,t);for(var n in e)e.hasOwnProperty(n)&&r.push(n);return r},g.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},y=new Ember.Descriptor,y.toString=function(){return"(Required Property)"},Ember.required=function(){return y},w=function(e){this.methodName=e},w.prototype=new Ember.Descriptor,Ember.alias=function(e){return new w(e)},Ember.alias=Ember.deprecateFunc("Ember.alias is deprecated. Please use Ember.aliasMethod or Ember.computed.alias instead.",Ember.alias),Ember.aliasMethod=function(e){return new w(e)},Ember.observer=function(e){var t=S.call(arguments,1);return e.__ember_observes__=t,e},Ember.immediateObserver=function(){for(var e=0,t=arguments.length;t>e;e++)arguments[e];return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(e){var t=S.call(arguments,1);return e.__ember_observesBefore__=t,e}}(),function(){e("rsvp/all",["rsvp/defer","exports"],function(e,t){"use strict";function r(e){var t=[],r=n(),i=e.length;0===i&&r.resolve([]);for(var s=function(e){return function(t){o(e,t)}},o=function(e,n){t[e]=n,0===--i&&r.resolve(t)},a=function(e){r.reject(e)},u=0;u<e.length;u++)e[u]&&"function"==typeof e[u].then?e[u].then(s(u),a):o(u,e[u]);return r.promise}var n=e.defer;t.all=r}),e("rsvp/async",["exports"],function(e){"use strict";var t,r="undefined"!=typeof window?window:{},n=r.MutationObserver||r.WebKitMutationObserver;if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))t=function(e,t){process.nextTick(function(){e.call(t)})};else if(n){var i=[],s=new n(function(){var e=i.slice();i=[],e.forEach(function(e){var t=e[0],r=e[1];t.call(r)})}),o=document.createElement("div");s.observe(o,{attributes:!0}),window.addEventListener("unload",function(){s.disconnect(),s=null}),t=function(e,t){i.push([e,t]),o.setAttribute("drainQueue","drainQueue")}}else t=function(e,t){setTimeout(function(){e.call(t)},1)};e.async=t}),e("rsvp/config",["rsvp/async","exports"],function(e,t){"use strict";var r=e.async,n={};n.async=r,t.config=n}),e("rsvp/defer",["rsvp/promise","exports"],function(e,t){"use strict";function r(){var e={},t=new n(function(t,r){e.resolve=t,e.reject=r});return e.promise=t,e}var n=e.Promise;t.defer=r}),e("rsvp/events",["exports"],function(e){"use strict";var t=function(e,t){this.type=e;for(var r in t)t.hasOwnProperty(r)&&(this[r]=t[r])},r=function(e,t){for(var r=0,n=e.length;n>r;r++)if(e[r][0]===t)return r;return-1},n=function(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t},i={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e},on:function(e,t,i){var s,o,a=n(this);for(e=e.split(/\s+/),i=i||this;o=e.shift();)s=a[o],s||(s=a[o]=[]),-1===r(s,t)&&s.push([t,i])},off:function(e,t){var i,s,o,a=n(this);for(e=e.split(/\s+/);s=e.shift();)t?(i=a[s],o=r(i,t),-1!==o&&i.splice(o,1)):a[s]=[]},trigger:function(e,r){var i,s,o,a,u,c=n(this);if(i=c[e])for(var h=0;h<i.length;h++)s=i[h],o=s[0],a=s[1],"object"!=typeof r&&(r={detail:r}),u=new t(e,r),o.call(a,u)}};e.EventTarget=i}),e("rsvp/hash",["rsvp/defer","exports"],function(e,t){"use strict";function r(e){var t=0;for(var r in e)t++;return t}function n(e){var t={},n=i(),s=r(e);0===s&&n.resolve({});var o=function(e){return function(t){a(e,t)}},a=function(e,r){t[e]=r,0===--s&&n.resolve(t)},u=function(e){n.reject(e)};for(var c in e)e[c]&&"function"==typeof e[c].then?e[c].then(o(c),u):a(c,e[c]);return n.promise}var i=e.defer;t.hash=n}),e("rsvp/node",["rsvp/promise","rsvp/all","exports"],function(e,t,r){"use strict";function n(e,t){return function(r,n){r?t(r):arguments.length>2?e(Array.prototype.slice.call(arguments,1)):e(n)}}function i(e){return function(){var t,r,i=Array.prototype.slice.call(arguments),a=new s(function(e,n){t=e,r=n});return o(i).then(function(i){i.push(n(t,r));try{e.apply(this,i)}catch(s){r(s)}}),a}}var s=e.Promise,o=t.all;r.denodeify=i}),e("rsvp/promise",["rsvp/config","rsvp/events","exports"],function(e,t,r){"use strict";function n(e){return i(e)||"object"==typeof e&&null!==e}function i(e){return"function"==typeof e}function s(e,t){e===t?a(e,t):o(e,t)||a(e,t)}function o(e,t){var r=null;if(n(t)){try{r=t.then}catch(o){return u(e,o),!0}if(i(r)){try{r.call(t,function(r){t!==r?s(e,r):a(e,r)},function(t){u(e,t)})}catch(o){u(e,o)}return!0}}return!1}function a(e,t){c.async(function(){e.trigger("promise:resolved",{detail:t}),e.isFulfilled=!0,e.fulfillmentValue=t})}function u(e,t){c.async(function(){e.trigger("promise:failed",{detail:t}),e.isRejected=!0,e.rejectedReason=t})}var c=e.config,h=t.EventTarget,l=function(e){var t=this,r=!1;if("function"!=typeof e)throw new TypeError("You must pass a resolver function as the sole argument to the promise constructor");if(!(t instanceof l))return new l(e);var n=function(e){r||(r=!0,s(t,e))},i=function(e){r||(r=!0,u(t,e))};this.on("promise:resolved",function(e){this.trigger("success",{detail:e.detail})},this),this.on("promise:failed",function(e){this.trigger("error",{detail:e.detail})},this);try{e(n,i)}catch(o){i(o)}},m=function(e,t,r,n){var a,c,h,l,m=i(r);if(m)try{a=r(n.detail),h=!0}catch(f){l=!0,c=f}else a=n.detail,h=!0;o(t,a)||(m&&h?s(t,a):l?u(t,c):"resolve"===e?s(t,a):"reject"===e&&u(t,a))};l.prototype={constructor:l,then:function(e,t){var r=new l(function(){});return this.isFulfilled&&c.async(function(){m("resolve",r,e,{detail:this.fulfillmentValue})},this),this.isRejected&&c.async(function(){m("reject",r,t,{detail:this.rejectedReason})},this),this.on("promise:resolved",function(t){m("resolve",r,e,t)}),this.on("promise:failed",function(e){m("reject",r,t,e)}),r}},h.mixin(l.prototype),r.Promise=l}),e("rsvp/reject",["rsvp/promise","exports"],function(e,t){"use strict";function r(e){return new n(function(t,r){r(e)})}var n=e.Promise;t.reject=r}),e("rsvp/resolve",["rsvp/promise","exports"],function(e,t){"use strict";function r(e){return"function"==typeof e||"object"==typeof e&&null!==e}function n(e){var t=new i(function(t,n){var i;try{r(e)?(i=e.then,"function"==typeof i?i.call(e,t,n):t(e)):t(e)}catch(s){n(s)}});return t}var i=e.Promise;t.resolve=n}),e("rsvp",["rsvp/events","rsvp/promise","rsvp/node","rsvp/all","rsvp/hash","rsvp/defer","rsvp/config","rsvp/resolve","rsvp/reject","exports"],function(e,t,r,n,i,s,o,a,u,c){"use strict";function h(e,t){E[e]=t}var l=e.EventTarget,m=t.Promise,f=r.denodeify,p=n.all,d=i.hash,b=s.defer,E=o.config,v=a.resolve,g=u.reject;c.Promise=m,c.EventTarget=l,c.all=p,c.hash=d,c.defer=b,c.denodeify=f,c.configure=h,c.resolve=v,c.reject=g})}(),function(){e("container",[],function(){function e(e){this.parent=e,this.dict={}}function t(t){this.parent=t,this.children=[],this.resolver=t&&t.resolver||function(){},this.registry=new e(t&&t.registry),this.cache=new e(t&&t.cache),this.typeInjections=new e(t&&t.typeInjections),this.injections={},this._options=new e(t&&t._options),this._typeOptions=new e(t&&t._typeOptions)}function r(e){throw new Error(e+" is not currently supported on child containers")}function n(e,t){var r=s(e,t,"singleton");return r!==!1}function i(e,t){var r={};if(!t)return r;for(var n,i,s=0,o=t.length;o>s;s++)n=t[s],i=e.lookup(n.fullName),r[n.property]=i;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 o(e,t){var r=e.normalize(t);return e.resolve(r)}function a(e,t){var r,n=o(e,t),a=t.split(":"),u=a[0];if(s(e,t,"instantiate")===!1)return n;if(n){var c=[];c=c.concat(e.typeInjections.get(u)||[]),c=c.concat(e.injections[t]||[]);var h=i(e,c);return h.container=e,h._debugContainerKey=t,r=n.create(h)}}function u(e,t){e.cache.eachLocal(function(r,n){s(e,r,"instantiate")!==!1&&t(n)})}function c(e){e.cache.eachLocal(function(t,r){s(e,t,"instantiate")!==!1&&r.destroy()}),e.cache.dict={}}return e.prototype={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},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={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,n){var i;-1!==e.indexOf(":")?(n=r,r=t,i=e):i=e+":"+t;var s=this.normalize(i);this.registry.set(s,r),this._options.set(s,n||{})},resolve:function(e){return this.resolver(e)||this.registry.get(e)},normalize:function(e){return e},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=a(this,e);return r?(n(this,e)&&t.singleton!==!1&&this.cache.set(e,r),r):void 0},lookupFactory:function(e){return o(this,e)},has:function(e){return this.cache.has(e)?!0:!!o(this,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");var i=this.typeInjections.get(e);i||(i=[],this.typeInjections.set(e,i)),i.push({property:t,fullName:n})},injection:function(e,t,n){if(this.parent&&r("injection"),-1===e.indexOf(":"))return this.typeInjection(e,t,n);var i=this.injections[e]=this.injections[e]||[];i.push({property:t,fullName:n})},destroy:function(){this.isDestroyed=!0;for(var e=0,t=this.children.length;t>e;e++)this.children[e].destroy();this.children=[],u(this,function(e){e.destroy()}),delete this.parent,this.isDestroyed=!0},reset:function(){for(var e=0,t=this.children.length;t>e;e++)c(this.children[e]);c(this)}},t})}(),function(){function e(r,n,i,s){var o,a,u;if("object"!=typeof r||null===r)return r;if(n&&(a=t(i,r))>=0)return s[a];if("array"===Ember.typeOf(r)){if(o=r.slice(),n)for(a=o.length;--a>=0;)o[a]=e(o[a],n,i,s)}else if(Ember.Copyable&&Ember.Copyable.detect(r))o=r.copy(n,i,s);else{o={};for(u in r)r.hasOwnProperty(u)&&"__"!==u.substring(0,2)&&(o[u]=n?e(r[u],n,i,s):r[u])}return n&&(i.push(r),s.push(o)),o}var t=Ember.EnumerableUtils.indexOf;Ember.compare=function n(e,t){if(e===t)return 0;var r=Ember.typeOf(e),i=Ember.typeOf(t),s=Ember.Comparable;if(s){if("instance"===r&&s.detect(e.constructor))return e.constructor.compare(e,t);if("instance"===i&&s.detect(t.constructor))return 1-t.constructor.compare(t,e)}var o=Ember.ORDER_DEFINITION_MAPPING;if(!o){var a=Ember.ORDER_DEFINITION;o=Ember.ORDER_DEFINITION_MAPPING={};var u,c;for(u=0,c=a.length;c>u;++u)o[a[u]]=u;delete Ember.ORDER_DEFINITION}var h=o[r],l=o[i];if(l>h)return-1;if(h>l)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=n(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.inspect=function(e){if("object"!=typeof e||null===e)return e+"";var t,r=[];for(var n in e)if(e.hasOwnProperty(n)){if(t=e[n],"toString"===t)continue;"function"===Ember.typeOf(t)&&(t="function() { ... }"),r.push(n+": "+t)}return"{"+r.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)&&(Ember.keys=function(e){var t=[];for(var r in e)"__"!==r.substring(0,2)&&"_super"!==r&&e.hasOwnProperty(r)&&t.push(r);return t});var r=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){for(var e=Error.apply(this,arguments),t=0;t<r.length;t++)this[r[t]]=e[r[t]]},Ember.Error.prototype=Ember.create(Error.prototype)}(),function(){Ember.RSVP=t("rsvp")}(),function(){var e=/[ _]/g,t={},r=/([a-z])([A-Z])/g,n=/(\-|_|\.|\s)+(.)?/g,i=/([a-z\d])([A-Z]+)/g,s=/\-|\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,0)-1:r++,e=t[n],(null===e?"(null)":void 0===e?"":e).toString()})},loc:function(e,t){return e=Ember.STRINGS[e]||e,Ember.String.fmt(e,t)},w:function(e){return e.split(/\s+/)},decamelize:function(e){return e.replace(r,"$1_$2").toLowerCase()},dasherize:function(r){var n,i=t,s=i.hasOwnProperty(r);return s?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 s=Ember.String.camelize(t[n]);r.push(s.charAt(0).toUpperCase()+s.substr(1))}return r.join(".")},underscore:function(e){return e.replace(i,"$1_$2").replace(s,"_").toLowerCase()},capitalize:function(e){return e.charAt(0).toUpperCase()+e.substr(1)}}}(),function(){var e=Ember.String.fmt,t=Ember.String.w,r=Ember.String.loc,n=Ember.String.camelize,i=Ember.String.decamelize,s=Ember.String.dasherize,o=Ember.String.underscore,a=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 s(this)},String.prototype.underscore=function(){return o(this)},String.prototype.classify=function(){return u(this)},String.prototype.capitalize=function(){return a(this)})}(),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.observesBefore=function(){return this.__ember_observesBefore__=e.call(arguments),this})}(),function(){function e(){return 0===a.length?{}:a.pop()}function t(e){return a.push(e),null}function r(e,t){function r(r){var s=n(r,e);return i?t===s:!!s}var i=2===arguments.length;return r}var n=Ember.get,i=Ember.set,s=Array.prototype.slice,o=Ember.EnumerableUtils.indexOf,a=[];Ember.Enumerable=Ember.Mixin.create({isEnumerable:!0,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,s=e(),o=0,a=null;do a=i,i=this.nextObject(o++,a,s);while(void 0!==i);return t(s),a}).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 s=n(this,"length"),o=null,a=e();void 0===i&&(i=null);for(var u=0;s>u;u++){var c=this.nextObject(u,o,a);r.call(i,c,u,this),o=c}return o=null,a=t(a),this},getEach:function(e){return this.mapProperty(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,s){r[i]=e.call(t,n,i,s)}),r},mapProperty:function(e){return this.map(function(t){return n(t,e)})},filter:function(e,t){var r=Ember.A([]);return this.forEach(function(n,i,s){e.call(t,n,i,s)&&r.push(n)}),r},reject:function(e,t){return this.filter(function(){return!e.apply(t,arguments)})},filterProperty:function(){return this.filter(r.apply(this,arguments))},rejectProperty:function(e,t){var r=function(r){return n(r,e)===t},i=function(t){return!!n(t,e)},s=2===arguments.length?r:i;return this.reject(s)},find:function(r,i){var s=n(this,"length");void 0===i&&(i=null);for(var o,a,u=null,c=!1,h=e(),l=0;s>l&&!c;l++)o=this.nextObject(l,u,h),(c=r.call(i,o,l,this))&&(a=o),u=o;return o=u=null,h=t(h),a},findProperty:function(){return this.find(r.apply(this,arguments))},every:function(e,t){return!this.find(function(r,n,i){return!e.call(t,r,n,i)})},everyProperty:function(){return this.every(r.apply(this,arguments))},some:function(e,t){return!!this.find(function(r,n,i){return!!e.call(t,r,n,i)})},someProperty:function(){return this.some(r.apply(this,arguments))},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=s.call(arguments,1)),this.forEach(function(n,i){var s=n&&n[e];"function"==typeof s&&(r[i]=t?s.apply(n,t):s.call(n))},this),r},toArray:function(){var e=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){o(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",s=n(this,"hasEnumerableObservers");return s||Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.addListener(this,"@enumerable:before",e,r),Ember.addListener(this,"@enumerable:change",e,i),s||Ember.propertyDidChange(this,"hasEnumerableObservers"),this},removeEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",s=n(this,"hasEnumerableObservers");return s&&Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.removeListener(this,"@enumerable:before",e,r),Ember.removeListener(this,"@enumerable:change",e,i),s&&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,s;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,s=0>i||0>r||0!==i-r,-1===e&&(e=null),-1===t&&(t=null),Ember.propertyWillChange(this,"[]"),s&&Ember.propertyWillChange(this,"length"),Ember.sendEvent(this,"@enumerable:before",[this,e,t]),this},enumerableContentDidChange:function(e,t){var r,i,s;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,s=0>i||0>r||0!==i-r,-1===e&&(e=null),-1===t&&(t=null),Ember.sendEvent(this,"@enumerable:change",[this,e,t]),s&&Ember.propertyDidChange(this,"length"),Ember.propertyDidChange(this,"[]"),this}})}(),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([]),s=e(this,"length");for(t(r)&&(r=0),(t(n)||n>s)&&(n=s),0>r&&(r=s+r),0>n&&(n=s+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,!0)===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",s=e(this,"hasArrayObservers");return s||Ember.propertyWillChange(this,"hasArrayObservers"),Ember.addListener(this,"@array:before",t,n),Ember.addListener(this,"@array:change",t,i),s||Ember.propertyDidChange(this,"hasArrayObservers"),this
|
17
|
+
},removeArrayObserver:function(t,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",s=e(this,"hasArrayObservers");return s&&Ember.propertyWillChange(this,"hasArrayObservers"),Ember.removeListener(this,"@array:before",t,n),Ember.removeListener(this,"@array:change",t,i),s&&Ember.propertyDidChange(this,"hasArrayObservers"),this},hasArrayObservers:Ember.computed(function(){return Ember.hasListeners(this,"@array:change")||Ember.hasListeners(this,"@array:before")}),arrayContentWillChange:function(t,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,s;if(t>=0&&r>=0&&e(this,"hasEnumerableObservers")){i=[],s=t+r;for(var o=t;s>o;o++)i.push(this.objectAt(o))}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 s,o;if(t>=0&&i>=0&&e(this,"hasEnumerableObservers")){s=[],o=t+i;for(var a=t;o>a;a++)s.push(this.objectAt(a))}else s=i;this.enumerableContentDidChange(r,s),Ember.sendEvent(this,"@array:change",[this,t,r,i]);var u=e(this,"length"),c=n(this,"firstObject"),h=n(this,"lastObject");return this.objectAt(0)!==c&&(Ember.propertyWillChange(this,"firstObject"),Ember.propertyDidChange(this,"firstObject")),this.objectAt(u-1)!==h&&(Ember.propertyWillChange(this,"lastObject"),Ember.propertyDidChange(this,"lastObject")),this},"@each":Ember.computed(function(){return this.__each||(this.__each=new Ember.EachProxy(this)),this.__each})})}(),function(){Ember.Comparable=Ember.Mixin.create({isComparable:!0,compare:Ember.required(Function)})}(),function(){var e=Ember.get;Ember.set,Ember.Copyable=Ember.Mixin.create({copy:Ember.required(Function),frozenCopy:function(){if(Ember.Freezable&&Ember.Freezable.detect(this))return e(this,"isFrozen")?this:this.copy().freeze();throw new Error(Ember.String.fmt("%@ does not support freezing",[this]))}})}(),function(){var e=Ember.get,t=Ember.set;Ember.Freezable=Ember.Mixin.create({isFrozen:!1,freeze:function(){return e(this,"isFrozen")?this:(t(this,"isFrozen",!0),this)}}),Ember.FROZEN_ERROR="Frozen object cannot be modified."}(),function(){var e=Ember.EnumerableUtils.forEach;Ember.MutableEnumerable=Ember.Mixin.create(Ember.Enumerable,{addObject:Ember.required(Function),addObjects:function(t){return Ember.beginPropertyChanges(this),e(t,function(e){this.addObject(e)},this),Ember.endPropertyChanges(this),this},removeObject:Ember.required(Function),removeObjects:function(t){return Ember.beginPropertyChanges(this),e(t,function(e){this.removeObject(e)},this),Ember.endPropertyChanges(this),this}})}(),function(){var e="Index out of range",t=[],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 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 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){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,t=Ember.set;Ember.Observable=Ember.Mixin.create({get:function(t){return e(this,t)},getProperties:function(){var t={},r=arguments;1===arguments.length&&"array"===Ember.typeOf(arguments[0])&&(r=arguments[0]);for(var n=0;n<r.length;n++)t[r[n]]=e(this,r[n]);return t},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")},getPath:function(e){return this.get(e)},setPath:function(e,t){return this.set(e,t)},getWithDefault:function(e,t){return Ember.getWithDefault(this,e,t)},incrementProperty:function(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(){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){t=t||{};var r=t.action||e(this,"action"),n=t.target||e(this,"targetObject"),i=t.actionContext||e(this,"actionContextObject")||this;if(n&&r){var s;return s=n.send?n.send.apply(n,[r,i]):n[r].apply(n,[i]),s!==!1&&(s=!0),s}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)},fire:function(){this.trigger.apply(this,arguments)},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)});var r=Ember.get;Ember.DeferredMixin=Ember.Mixin.create({then:function(e,t){function n(t){return t===s?e(o):e(t)}var i,s,o;return o=this,i=r(this,"_deferred"),s=i.promise,s.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(){Ember.Container=t("container"),Ember.Container.set=Ember.set}(),function(){function e(){var e,t,s=!1,o=function(){s||o.proto(),n(this,i,v),n(this,"_super",v);var u=a(this);if(u.proto=this,e){var h=e;e=null,this.reopen.apply(this,h)}if(t){var l=t;t=null;for(var m=this.concatenatedProperties,f=0,d=l.length;d>f;f++){var g=l[f];for(var y in g)if(g.hasOwnProperty(y)){var w=g[y],_=Ember.IS_BINDING;if(_.test(y)){var C=u.bindings;C?u.hasOwnProperty("bindings")||(C=u.bindings=r(u.bindings)):C=u.bindings={},C[y]=w}var O=u.descs[y];if(m&&E(m,y)>=0){var S=this[y];w=S?"function"==typeof S.concat?S.concat(w):Ember.makeArray(S).concat(w):Ember.makeArray(w)}O?O.set(this,y,w):"function"!=typeof this.setUnknownProperty||y in this?b?Ember.defineProperty(this,y,null,w):this[y]=w:this.setUnknownProperty(y,w)}}}p(this,u),delete u.proto,c(this),this.init.apply(this,arguments)};return o.toString=m.prototype.toString,o.willReopen=function(){s&&(o.PrototypeMixin=m.create(o.PrototypeMixin)),s=!1},o._initMixins=function(t){e=t},o._initProperties=function(e){t=e},o.proto=function(){var e=o.superclass;return e&&e.proto(),s||(s=!0,o.PrototypeMixin.applyPartial(o.prototype),u(o.prototype)),this.prototype},o}function t(e){return function(){return e}}var r=(Ember.set,Ember.get,Ember.create),n=Ember.platform.defineProperty,i=Ember.GUID_KEY,s=Ember.guidFor,o=Ember.generateGuid,a=Ember.meta,u=Ember.rewatch,c=Ember.finishChains,h=Ember.destroy,l=Ember.run.schedule,m=Ember.Mixin,f=m._apply,p=m.finishPartial,d=m.prototype.reopen,b=Ember.ENV.MANDATORY_SETTER,E=Ember.EnumerableUtils.indexOf,v={configurable:!0,writable:!0,enumerable:!1,value:void 0},g=e();g.toString=function(){return"Ember.CoreObject"},g.PrototypeMixin=m.create({reopen:function(){return f(this,arguments,!0),this},isInstance:!0,init:function(){},concatenatedProperties:null,isDestroyed:!1,isDestroying:!1,destroy:function(){return this.isDestroying?void 0:(this.isDestroying=!0,l("actions",this,this.willDestroy),l("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()+":"+s(this)+r+">";return this.toString=t(n),n}}),g.PrototypeMixin.ownerConstructor=g,Ember.config.overridePrototypeMixin&&Ember.config.overridePrototypeMixin(g.PrototypeMixin),g.__super__=null;var y=m.create({ClassMixin:Ember.required(),PrototypeMixin:Ember.required(),isClass:!0,isMethod:!1,extend:function(){var t,n=e();return n.ClassMixin=m.create(this.ClassMixin),n.PrototypeMixin=m.create(this.PrototypeMixin),n.ClassMixin.ownerConstructor=n,n.PrototypeMixin.ownerConstructor=n,d.apply(n.PrototypeMixin,arguments),n.superclass=this,n.__super__=this.prototype,t=n.prototype=r(this.prototype),t.constructor=n,o(t,"ember"),a(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(),d.apply(this.PrototypeMixin,arguments),this},reopenClass:function(){return d.apply(this.ClassMixin,arguments),f(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=a(this.proto(),!1).descs[e];return t._meta||{}},eachComputedProperty:function(e,t){var r,n=this.proto(),i=a(n).descs,s={};for(var o in i)r=i[o],r instanceof Ember.ComputedProperty&&e.call(t||this,o,r._meta||s)}});y.ownerConstructor=g,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(y),g.ClassMixin=y,y.apply(g),Ember.CoreObject=g}(),function(){Ember.Object=Ember.CoreObject.extend(Ember.Observable),Ember.Object.toString=function(){return"Ember.Object"}}(),function(){function e(t,r,i){var o=t.length;c[t.join(".")]=r;for(var a in r)if(h.call(r,a)){var u=r[a];if(t[o]=a,u&&u.toString===n)u.toString=s(t.join(".")),u[m]=t.join(".");else if(u&&u.isNamespace){if(i[l(u)])continue;i[l(u)]=!0,e(t,u,i)}}t.length=o}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(s){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{var t=r(this);e=t?"(subclass of "+t+")":"(unknown mixin)",this.toString=s(e)}return e}function i(){var r=!u.PROCESSED,n=Ember.anyUnprocessedMixins;if(r&&(t(),u.PROCESSED=!0),r||n){for(var i,s=u.NAMESPACES,o=0,a=s.length;a>o;o++)i=s[o],e([i.toString()],i,{});Ember.anyUnprocessedMixins=!1}}function s(e){return function(){return e}}var o=Ember.get,a=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=o(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(a.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,h={}.hasOwnProperty,l=Ember.guidFor,m=Ember.NAME_KEY=Ember.GUID_KEY+"_name";Ember.Mixin.prototype.toString=n}(),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(function(){this._teardownContent()},"content"),_teardownContent:function(){var e=r(this,"content");e&&e.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer(function(){r(this,"content"),this._setupContent()},"content"),_setupContent:function(){var e=r(this,"content");e&&e.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},_arrangedContentWillChange:Ember.beforeObserver(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)},"arrangedContent"),_arrangedContentDidChange:Ember.observer(function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this._setupArrangedContent(),this.arrangedContentDidChange(this),this.arrangedContentArrayDidChange(this,0,void 0,t)},"arrangedContent"),_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 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 s,o=r(this,"content"),a=r(this,"arrangedContent"),u=[];if(0>n||n>=r(this,"length"))throw new Error(e);for(void 0===i&&(i=1),s=n;n+i>s;s++)u.push(o.indexOf(a.objectAt(s)));for(u.sort(function(e,t){return t-e}),Ember.beginPropertyChanges(),s=0;s<u.length;s++)this._replace(u[s],1,t);Ember.endPropertyChanges()}return this},pushObject:function(e){return this._insertAt(r(this,"content.length"),e),e},pushObjects:function(e){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){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),s=Ember.addObserver,o=Ember.removeBeforeObserver,a=Ember.removeObserver,u=Ember.propertyWillChange,c=Ember.propertyDidChange;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer(function(){},"content"),isTruthy:Ember.computed.bool("content"),_debugContainerKey:null,willWatchProperty:function(r){var n="content."+r;i(this,n,null,e),s(this,n,null,t)},didUnwatchProperty:function(r){var n="content."+r;o(this,n,null,e),a(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=r(this,"content");return n(i,e,t)}}),Ember.ObjectProxy.reopenClass({create:function(){var e,t,r,n,i,s;if(arguments.length){for(t=this.proto(),r=0,n=arguments.length;n>r;r++){i=arguments[r];for(s in i)!i.hasOwnProperty(s)||s in t||(e||(e={}),e[s]=null)}e&&this._initMixins([e])}return this._super.apply(this,arguments)}})}(),function(){function e(e,t,r,i,s){var o,a=r._objects;for(a||(a=r._objects={});--s>=i;){var u=e.objectAt(s);u&&(Ember.addBeforeObserver(u,t,r,"contentKeyWillChange"),Ember.addObserver(u,t,r,"contentKeyDidChange"),o=n(u),a[o]||(a[o]=[]),a[o].push(s))}}function t(e,t,r,i,s){var o=r._objects;o||(o=r._objects={});for(var a,u;--s>=i;){var c=e.objectAt(s);c&&(Ember.removeBeforeObserver(c,t,r,"contentKeyWillChange"),Ember.removeObserver(c,t,r,"contentKeyDidChange"),u=n(c),a=o[u],a[a.indexOf(s)]=null)}}var r=(Ember.set,Ember.get),n=Ember.guidFor,i=Ember.EnumerableUtils.forEach,s=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})}),o=/^.+:(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 s(this._content,e,this),Ember.defineProperty(this,e,null,t),this.beginObservingContentKey(e),t},arrayWillChange:function(e,r,n){var i,s,o=this._keys;s=n>0?r+n:-1,Ember.beginPropertyChanges(this);for(i in o)o.hasOwnProperty(i)&&(s>0&&t(e,i,this,r,s),Ember.propertyWillChange(this,i));Ember.propertyWillChange(this._content,"@each"),Ember.endPropertyChanges(this)},arrayDidChange:function(t,r,n,i){var s,o,a=this._keys;o=i>0?r+i:-1,Ember.beginPropertyChanges(this);for(s in a)a.hasOwnProperty(s)&&(o>0&&e(t,s,this,r,o),Ember.propertyDidChange(this,s));Ember.propertyDidChange(this._content,"@each"),Ember.endPropertyChanges(this)},didAddListener:function(e){o.test(e)&&this.beginObservingContentKey(e.slice(0,-7))},didRemoveListener:function(e){o.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,s=r(i,"length");e(i,t,this,0,s)}},stopObservingContentKey:function(e){var n=this._keys;if(n&&n[e]>0&&--n[e]<=0){var i=this._content,s=r(i,"length");t(i,e,this,0,s)}},contentKeyWillChange:function(e,t){Ember.propertyWillChange(this,t)},contentKeyDidChange:function(e,t){Ember.propertyDidChange(this,t)}})}(),function(){var e=Ember.get;Ember.set;var t=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(t,r,n){if(this.isFrozen)throw Ember.FROZEN_ERROR;var i=n?e(n,"length"):0;if(this.arrayContentWillChange(t,r,i),n&&0!==n.length){var s=[t,r].concat(n);this.splice.apply(this,s)}else this.splice(t,r);return this.arrayContentDidChange(t,r,i),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()}}),r=["length"];Ember.EnumerableUtils.forEach(t.keys(),function(e){Array.prototype[e]&&r.push(e)}),r.length>0&&(t=t.without.apply(t,r)),Ember.NativeArray=t,Ember.A=function(e){return void 0===e&&(e=[]),Ember.Array.detect(e)?e:Ember.NativeArray.apply(e)},Ember.NativeArray.activate=function(){t.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 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 s=0;n>s;s++)i=r(this[s]),delete this[i],delete this[s];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 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 Error(Ember.FROZEN_ERROR);if(n(i))return this;var s,o=r(i),a=this[o],u=e(this,"length");return a>=0&&u>a&&this[a]===i?this:(s=[i],this.enumerableContentWillChange(null,s),Ember.propertyWillChange(this,"lastObject"),u=e(this,"length"),this[o]=u,this[u]=i,t(this,"length",u+1),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(null,s),this)},removeObject:function(i){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(n(i))return this;var s,o,a=r(i),u=this[a],c=e(this,"length"),h=0===u,l=u===c-1;return u>=0&&c>u&&this[u]===i&&(o=[i],this.enumerableContentWillChange(o,null),h&&Ember.propertyWillChange(this,"firstObject"),l&&Ember.propertyWillChange(this,"lastObject"),c-1>u&&(s=this[c-1],this[u]=s,this[r(s)]=u),delete this[a],delete this[c-1],t(this,"length",c-1),h&&Ember.propertyDidChange(this,"firstObject"),l&&Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(o,null)),this},contains:function(e){return this[r(e)]>=0},copy:function(){var n=this.constructor,i=new n,s=e(this,"length");for(t(i,"length",s);--s>=0;)i[s]=this[s],i[r(this[s])]=s;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;Ember.get;var t=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(){var e=Ember.get;Ember.ControllerMixin=Ember.Mixin.create({isController:!0,target:null,container:null,parentController:null,store:null,model:Ember.computed.alias("content"),send:function(t){var r,n=[].slice.call(arguments,1);this[t]?this[t].apply(this,n):(r=e(this,"target"))&&r.send.apply(r,arguments)}}),Ember.Controller=Ember.Object.extend(Ember.ControllerMixin)}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils.forEach);Ember.SortableMixin=Ember.Mixin.create(Ember.MutableEnumerable,{sortProperties:null,sortAscending:!0,sortFunction:Ember.compare,orderBy:function(r,n){var i=0,s=e(this,"sortProperties"),o=e(this,"sortAscending"),a=e(this,"sortFunction");return t(s,function(t){0===i&&(i=a(e(r,t),e(n,t)),0===i||o||(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"),s=this;return r&&n?(r=r.slice(),r.sort(function(e,t){return s.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(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()},"content"),sortAscendingWillChange:Ember.beforeObserver(function(){this._lastSortAscending=e(this,"sortAscending")},"sortAscending"),sortAscendingDidChange:Ember.observer(function(){if(e(this,"sortAscending")!==this._lastSortAscending){var t=e(this,"arrangedContent");t.reverseObjects()}},"sortAscending"),contentArrayWillChange:function(r,n,i,s){var o=e(this,"isSorted");if(o){var a=e(this,"arrangedContent"),u=r.slice(n,n+i),c=e(this,"sortProperties");t(u,function(e){a.removeObject(e),t(c,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,s)},contentArrayDidChange:function(r,n,i,s){var o=e(this,"isSorted"),a=e(this,"sortProperties");if(o){var u=r.slice(n,n+s);t(u,function(e){this.insertItemSorted(e),t(a,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,s)},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),s=r.objectAt(n+1),o=i&&this.orderBy(t,i),a=s&&this.orderBy(t,s);(0>o||a>0)&&(r.removeObject(t),this.insertItemSorted(t))},_binarySearch:function(t,r,n){var i,s,o,a;return r===n?r:(a=e(this,"arrangedContent"),i=r+Math.floor((n-r)/2),s=a.objectAt(i),o=this.orderBy(s,t),0>o?this._binarySearch(t,i+1,n):o>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 s=this.lookupItemController(i);if(s)return this.controllerAt(t,i,s)}return i},arrangedContentDidChange:function(){this._super(),this._resetSubControllers()},arrayContentDidChange:function(n,i,s){var o=e(this,"_subControllers"),a=o.slice(n,n+i);t(a,function(e){e&&e.destroy()}),r(o,n,i,new Array(s)),this._super(n,i,s)},init:function(){this.get("content")||Ember.defineProperty(this,"content",void 0,Ember.A()),this._super(),this.set("_subControllers",Ember.A())},controllerAt:function(t,r,n){var i=e(this,"container"),s=e(this,"_subControllers"),o=s[t];if(o||(o=i.lookup("controller:"+n,{singleton:!1}),s[t]=o),!o)throw new Error('Could not resolve itemController: "'+n+'"');return o.set("target",this),o.set("parentController",e(this,"parentController")||this),o.set("content",r),o},_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=Ember.imports.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,s,o=e.childNodes.length;for(r=0;o>r;r++)if(i=e.childNodes[r],s=1===i.nodeType&&n(i,t))return s},i=function(e,i){t&&(i="­"+i);var s=[];if(r&&(i=i.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,r,n){return s.push([n,t]),r})),e.innerHTML=i,s.length>0){var o,a=s.length;for(o=0;a>o;o++){var u=n(e,s[o][0]),c=document.createTextNode(s[o][1]);u.parentNode.insertBefore(c,u)}}if(t){for(var h=e.firstChild;1===h.nodeType&&!h.nodeName;)h=h.firstChild;3===h.nodeType&&""===h.nodeValue.charAt(0)&&(h.nodeValue=h.nodeValue.slice(1))}},s={},o=function(e){if(void 0!==s[e])return s[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 s[e]=t,t},a=function(e,t){var r=e.tagName;if(o(r))i(e,t);else{var n=e.outerHTML||(new XMLSerializer).serializeToString(e),s=n.match(new RegExp("<"+r+"([^>]*)>","i"))[0],a="</"+r+">",u=document.createElement("div");for(i(u,s+t+a),e=u.firstChild;e.tagName!==r;)e=e.nextSibling}return e};Ember.ViewUtils={setInnerHTML:a,isSimpleClick:e}}(),function(){Ember.get,Ember.set;var e=function(){this.seen={},this.list=[]};e.prototype={add:function(e){e in this.seen||(this.seen[e]=!0,this.list.push(e))},toDOM:function(){return this.list.join(" ")}},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(t){return this.elementClasses=this.elementClasses||new e,this.elementClasses.add(t),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
|
18
|
+
},begin:function(e){return this.tagNames.push(e||null),this},pushOpeningTag:function(){var e=this.currentTagName();if(e){if(this._hasElement&&!this._element&&0===this.buffer.length)return this._element=this.generateElement(),void 0;var t,r,n=this.buffer,i=this.elementId,s=this.classes,o=this.elementAttributes,a=this.elementProperties,u=this.elementStyle;if(n+="<"+e,i&&(n+=' id="'+this._escapeAttribute(i)+'"',this.elementId=null),s&&(n+=' class="'+this._escapeAttribute(s.join(" "))+'"',this.classes=null),u){n+=' style="';for(r in u)u.hasOwnProperty(r)&&(n+=r+":"+this._escapeAttribute(u[r])+";");n+='"',this.elementStyle=null}if(o){for(t in o)o.hasOwnProperty(t)&&(n+=" "+t+'="'+this._escapeAttribute(o[t])+'"');this.elementAttributes=null}if(a){for(r in a)if(a.hasOwnProperty(r)){var c=a[r];(c||"number"==typeof c)&&(n+=c===!0?" "+r+'="'+r+'"':" "+r+'="'+this._escapeAttribute(a[r])+'"')}this.elementProperties=null}n+=">",this.buffer=n}},pushClosingTag:function(){var e=this.tagNames.pop();e&&(this.buffer+="</"+e+">")},currentTagName:function(){return this.tagNames[this.tagNames.length-1]},generateElement:function(){var e,t,r=this.tagNames.pop(),n=document.createElement(r),i=Ember.$(n),s=this.elementId,o=this.classes,a=this.elementAttributes,u=this.elementProperties,c=this.elementStyle,h="";if(s&&(i.attr("id",s),this.elementId=null),o&&(i.attr("class",o.join(" ")),this.classes=null),c){for(t in c)c.hasOwnProperty(t)&&(h+=t+":"+c[t]+";");i.attr("style",h),this.elementStyle=null}if(a){for(e in a)a.hasOwnProperty(e)&&i.attr(e,a[e]);this.elementAttributes=null}if(u){for(t in u)u.hasOwnProperty(t)&&i.prop(t,u[t]);this.elementProperties=null}return n},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},_escapeAttribute:function(e){var t={"<":"<",">":">",'"':""","'":"'","`":"`"},r=/&(?!\w+;)|[<>"'`]/g,n=/[&<>"'`]/,i=function(e){return t[e]||"&"},s=e.toString();return n.test(s)?s.replace(r,i):s}}}(),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,s=e(this,"events");Ember.$.extend(s,r||{}),Ember.isNone(n)||t(this,"rootElement",n),n=Ember.$(e(this,"rootElement")),n.addClass("ember-application");for(i in s)s.hasOwnProperty(i)&&this.setupHandler(n,i,s[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],s=!0,o=null;return o=n._findNearestEventManager(i,r),o&&o!==t?s=n._dispatchEvent(o,e,r,i):i?s=n._bubbleEvent(i,e,r):e.stopPropagation(),s},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,s=e[r];return"function"===Ember.typeOf(s)?(i=s.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(function(){var r=e(this,"_childContainers");for(var n in r)r.hasOwnProperty(n)&&r[n].destroy();t(this,"_childContainers",{})},"model")})}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}var t={},r=Ember.get,n=Ember.set,i=Ember.guidFor,s=Ember.EnumerableUtils.forEach,o=Ember.EnumerableUtils.addObject,a=Ember.computed(function(){var e=this._childViews,t=Ember.A(),n=this;return s(e,function(e){e.isVirtual?t.pushObjects(r(e,"childViews")):t.push(e)}),t.replace=function(e,t,r){if(n instanceof Ember.ContainerView)return n.replace(e,t,r);throw new Error("childViews is immutable")},t});Ember.TEMPLATES={},Ember.CoreView=Ember.Object.extend(Ember.Evented,{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)}},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 u=Ember._ViewCollection=function(e){var t=this.views=e||[];this.length=t.length};u.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 s(t,e)},clear:function(){this.length=0,this.views.length=0}};var c=[];Ember.View=Ember.CoreView.extend({concatenatedProperties:["classNames","classNameBindings","attributeBindings"],isView:!0,templateName:null,layoutName:null,templates:Ember.TEMPLATES,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"),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(function(){this.rerender()},"context"),isVisible:!0,childViews:a,_childViews:c,_childViewsWillChange:Ember.beforeObserver(function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyWillChange(e,"childViews")}},"childViews"),_childViewsDidChange:Ember.observer(function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyDidChange(e,"childViews")}},"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(function(){this.isDestroying||(this.trigger("parentViewDidChange"),r(this,"parentView.controller")&&!r(this,"controller")&&this.notifyPropertyChange("controller"))},"_parentView"),_controllerDidChange:Ember.observer(function(){this.isDestroying||(this.rerender(),this.forEachChildView(function(e){e.propertyDidChange("controller")}))},"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"),s=this.cloneKeywords(),o={view:this,buffer:e,isRenderData:!0,keywords:s,insideGroup:r(this,"templateData.insideGroup")};n=t(i,{data:o}),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;s(e,function(e){var s,a=Ember.View._parsePropertyPath(e),u=function(){r=this._classStringForProperty(e),t=this.$(),s&&(t.removeClass(s),i.removeObject(s)),r?(t.addClass(r),s=r):s=null};n=this._classStringForProperty(e),n&&(o(i,n),s=n),this.registerObserver(this,a.path,u),this.one("willClearRender",function(){s&&(i.removeObject(s),s=null)})},this)},_applyAttributeBindings:function(e,t){var n,i;s(t,function(t){var s=t.split(":"),o=s[0],a=s[1]||o,u=function(){i=this.$(),n=r(this,o),Ember.View.applyAttributeBindings(i,a,n)};this.registerObserver(this,o,u),n=r(this,o),Ember.View.applyAttributeBindings(e,a,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=t===!1?this._childViews:[this];i.length;){r=i.slice(),i=[];for(var s=0,o=r.length;o>s;s++)n=r[s],e(n),n._childViews&&i.push.apply(i,n._childViews)}},triggerRecursively:function(e){for(var t,r,n=[this];n.length;){t=n.slice(),n=[];for(var i=0,s=t.length;s>i;i++)r=t[i],r.trigger&&r.trigger(e),r._childViews&&n.push.apply(n,r._childViews)}},viewHierarchyCollection:function(){for(var e,t=new u([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:function(){},_notifyWillDestroyElement:function(){var e=this.viewHierarchyCollection();return e.trigger("willClearRender"),e.trigger("willDestroyElement"),e},_elementWillChange:Ember.beforeObserver(function(){this.forEachChildView(function(e){Ember.propertyWillChange(e,"element")})},"element"),_elementDidChange:Ember.observer(function(){this.forEachChildView(function(e){Ember.propertyDidChange(e,"element")})},"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:c,attributeBindings:c,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());var e=r(this,"viewController");e&&(e=r(e),e&&n(e,"view",this))},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"),s=this.viewName;if(this._super()){for(e=n.length,t=e-1;t>=0;t--)n[t].removedFromDOM=!0;for(s&&i&&i.set(s,null),e=n.length,t=e-1;t>=0;t--)n[t].destroy();return this}},createChildView:function(e,t){return e.isView&&e._parentView===this&&e.container===this.container?e:(t=t||{},t._parentView=this,t.container=this.container,Ember.CoreView.detect(e)?(t.templateData=t.templateData||r(this,"templateData"),e=e.create(t),e.viewName&&n(r(this,"concreteView"),e.viewName,e)):(Ember.setProperties(e,t),r(e,"templateData")||n(e,"templateData",r(this,"templateData"))),e)},becameVisible:Ember.K,becameHidden:Ember.K,_isVisibleDidChange:Ember.observer(function(){var e=this.$();if(e){var t=r(this,"isVisible");e.toggle(t),this._isAncestorHidden()||(t?this._notifyBecameVisible():this._notifyBecameHidden())}},"isVisible"),_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),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){n||"function"!=typeof r||(n=r,r=null);var i=this,s=function(){i.currentState.invokeObserver(this,n)},o=function(){Ember.run.scheduleOnce("render",this,s)};Ember.addObserver(e,t,r,o),this.one("willClearRender",function(){Ember.removeObserver(e,t,r,o)})}});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],s="";return n.length>1&&(t=n[1],3===n.length&&(r=n[2]),s=":"+t,r&&(s+=":"+r)),{path:i,classNames:s,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 l=Ember.Object.extend(Ember.Evented).create();Ember.View.addMutationListener=function(e){l.on("change",e)},Ember.View.removeMutationListener=function(e){l.off("change",e)},Ember.View.notifyMutationListeners=function(){l.trigger("change")},Ember.View.views={},Ember.View.childViewsProperty=a,Ember.View.applyAttributeBindings=function(e,t,r){var n=Ember.typeOf(r);"value"===t||"string"!==n&&("number"!==n||isNaN(r))?"value"===t||"boolean"===n?(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),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(){Ember.get,Ember.set;var e=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 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,s=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 s;"string"==typeof e?(s=r(this,e),s=this.createChildView(s),n(this,e,s)):s=this.createChildView(e),t[i]=s},this);var s=r(this,"currentView");s&&(t.length||(t=this._childViews=this._childViews.slice()),t.push(this.createChildView(s)))},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 s=[e,t].concat(n);n.length&&!this._childViews.length&&(this._childViews=this._childViews.slice()),this._childViews.splice.apply(this._childViews,s)}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}),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 s=e.slice(t,t+i);this.initializeViews(s,this,r(this,"templateData")),this.currentState.childViewsDidChange(this,e,t,i)}this.propertyDidChange("childViews")},initializeViews:function(e,t,s){i(e,function(e){n(e,"_parentView",t),n(e,"container",t&&t.container),r(e,"templateData")||n(e,"templateData",s)})},currentView:null,_currentViewWillChange:Ember.beforeObserver(function(){var e=r(this,"currentView");e&&e.destroy()},"currentView"),_currentViewDidChange:Ember.observer(function(){var e=r(this,"currentView");e&&this.pushObject(e)},"currentView"),_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 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,o,a,u=t._childViews,c=new s;for(r=0,n=u.length;n>r;r++)i=u[r],a||(a=Ember.RenderBuffer(),a._hasElement=!1),i.renderToBufferIfNeeded(a)?c.push(i):c.length?(e(t,c,o,a),a=null,o=i,c.clear()):o=i;c.length&&e(t,c,o,a)}})}(),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(function(){var t=this.get("content");t&&t.removeArrayObserver(this);var r=t?e(t,"length"):0;this.arrayWillChange(t,0,r)},"content"),_contentDidChange:Ember.observer(function(){var t=e(this,"content");t&&t.addArrayObserver(this);var r=t?e(t,"length"):0;this.arrayDidChange(t,0,null,r)},"content"),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 s,o,a,u=this._childViews;a=this._childViews.length;var c=n===a;for(c&&(this.currentState.empty(this),this.invokeRecursively(function(e){e.removedFromDOM=!0},!1)),o=r+n-1;o>=r;o--)s=u[o],s.destroy()},arrayDidChange:function(r,n,i,s){var o,a,u,c,h=e(this,"itemViewClass"),l=[];if("string"==typeof h&&(h=e(h)),c=r?e(r,"length"):0)for(u=n;n+s>u;u++)a=r.objectAt(u),o=this.createChildView(h,{content:a,contentIndex:u}),l.push(o);else{var m=e(this,"emptyView");if(!m)return;var f=Ember.CoreView.detect(m);m=this.createChildView(m),l.push(m),t(this,"emptyView",m),f&&(this._createdEmptyView=m)}this.replace(n,0,l)},createChildView:function(r,n){r=this._super(r,n);var i=e(r,"tagName"),s=null===i||void 0===i?Ember.CollectionView.CONTAINER_MAP[e(this,"tagName")]:i;return t(r,"tagName",s),r}}),Ember.CollectionView.CONTAINER_MAP={ul:"li",ol:"li",table:"tr",thead:"tr",tbody:"tr",tfoot:"tr",tr:"td",select:"option"}}(),function(){Ember.Component=Ember.View.extend({init:function(){this._super(),this.set("context",this),this.set("controller",this)}})}(),function(){Ember.ViewTargetActionSupport=Ember.Mixin.create(Ember.TargetActionSupport,{target:Ember.computed.alias("controller"),actionContext:Ember.computed.alias("context")})}(),function(){var e=Ember.get,t=Ember.set;Ember.State=Ember.Object.extend(Ember.Evented,{parentState:null,start:null,name:null,path:Ember.computed(function(){var t=e(this,"parentState.path"),r=e(this,"name");return t&&(r=t+"."+r),r}),trigger:function(e){this[e]&&this[e].apply(this,[].slice.call(arguments,1)),this._super.apply(this,arguments)},init:function(){var r=e(this,"states");t(this,"childStates",Ember.A()),t(this,"eventTransitions",e(this,"eventTransitions")||{});var n,i,s;if(r)for(n in r)this.setupChild(r,n,r[n]);else{r={};for(n in this)"constructor"!==n&&(i=this[n])&&((s=i.transitionTarget)&&(this.eventTransitions[n]=s),this.setupChild(r,n,i));t(this,"states",r)}t(this,"pathsCaches",{})},setPathsCache:function(t,r,n){var i=Ember.guidFor(t.constructor),s=e(this,"pathsCaches"),o=s[i]||{};o[r]=n,s[i]=o},getPathsCache:function(t,r){var n=Ember.guidFor(t.constructor),i=e(this,"pathsCaches"),s=i[n]||{};return s[r]},setupChild:function(r,n,i){if(!i)return!1;var s;return i instanceof Ember.State?(t(i,"name",n),s=i,s.container=this.container):Ember.State.detect(i)&&(s=i.create({name:n,container:this.container})),s instanceof Ember.State?(t(s,"parentState",this),e(this,"childStates").pushObject(s),r[n]=s,s):void 0},lookupEventTransition:function(e){for(var t,r=this;r&&!t;)t=r.eventTransitions[e],r=r.get("parentState");return t},isLeaf:Ember.computed(function(){return!e(this,"childStates").length}),hasContext:!0,setup:Ember.K,enter:Ember.K,exit:Ember.K}),Ember.State.reopenClass({transitionTo:function(e){var t=function(t,r){var n=[],i=Ember.$&&Ember.$.Event;r&&i&&r instanceof i?r.hasOwnProperty("contexts")&&(n=r.contexts.slice()):n=[].slice.call(arguments,1),n.unshift(e),t.transitionTo.apply(t,n)};return t.transitionTarget=e,t}})}(),function(){var e=Ember.get,t=Ember.set,r=Ember.String.fmt,n=Ember.ArrayPolyfills.forEach,i=function(e){this.enterStates=e.enterStates.slice(),this.exitStates=e.exitStates.slice(),this.resolveState=e.resolveState,this.finalState=e.enterStates[e.enterStates.length-1]||e.resolveState};i.prototype={normalize:function(e,t){return this.matchContextsToStates(t),this.addInitialStates(),this.removeUnchangedContexts(e),this},matchContextsToStates:function(t){for(var r,n,i=this.enterStates.length-1,s=[];t.length>0;){if(i>=0)r=this.enterStates[i--];else{if(this.enterStates.length){if(r=e(this.enterStates[0],"parentState"),!r)throw"Cannot match all contexts to states"}else r=this.resolveState;this.enterStates.unshift(r),this.exitStates.unshift(r)}n=e(r,"hasContext")?t.pop():null,s.unshift(n)}this.contexts=s},addInitialStates:function(){for(var t,r=this.finalState;;){if(t=e(r,"initialState")||"start",r=e(r,"states."+t),!r)break;this.finalState=r,this.enterStates.push(r),this.contexts.push(void 0)}},removeUnchangedContexts:function(e){for(;this.enterStates.length>0&&this.enterStates[0]===this.exitStates[0];){if(this.enterStates.length===this.contexts.length){if(e.getStateMeta(this.enterStates[0],"context")!==this.contexts[0])break;this.contexts.shift()}this.resolveState=this.enterStates.shift(),this.exitStates.shift()}}};var s=function(t,n,i){var a,u,c,h=this.enableLogging,l=i?"unhandledEvent":t,m=n[l];if(a=[].slice.call(arguments,3),"function"==typeof m)return h&&(i?Ember.Logger.log(r("STATEMANAGER: Unhandled event '%@' being sent to state %@.",[t,e(n,"path")])):Ember.Logger.log(r("STATEMANAGER: Sending event '%@' to state %@.",[t,e(n,"path")]))),c=a,i&&c.unshift(t),c.unshift(this),m.apply(n,c);var f=e(n,"parentState");return f?(u=a,u.unshift(t,f,i),s.apply(this,u)):i?void 0:o.call(this,t,a,!0)},o=function(t,r,n){return r.unshift(t,e(this,"currentState"),n),s.apply(this,r)};Ember.StateManager=Ember.State.extend({init:function(){this._super(),t(this,"stateMeta",Ember.Map.create());var r=e(this,"initialState");!r&&e(this,"states.start")&&(r="start"),r&&this.transitionTo(r)},stateMetaFor:function(t){var r=e(this,"stateMeta"),n=r.get(t);return n||(n={},r.set(t,n)),n},setStateMeta:function(e,r,n){return t(this.stateMetaFor(e),r,n)},getStateMeta:function(t,r){return e(this.stateMetaFor(t),r)},currentState:null,currentPath:Ember.computed.alias("currentState.path"),transitionEvent:"setup",errorOnUnhandledEvent:!0,send:function(e){var t=[].slice.call(arguments,1);return o.call(this,e,t,!1)},unhandledEvent:function(t,r){if(e(this,"errorOnUnhandledEvent"))throw new Ember.Error(this.toString()+" could not respond to event "+r+" in state "+e(this,"currentState.path")+".")},getStateByPath:function(t,r){for(var n=r.split("."),i=t,s=0,o=n.length;o>s&&(i=e(e(i,"states"),n[s]),i);s++);return i
|
19
|
+
},findStateByPath:function(t,r){for(var n;!n&&t;)n=this.getStateByPath(t,r),t=e(t,"parentState");return n},getStatesInPath:function(t,r){if(!r||""===r)return void 0;for(var n,i,s=r.split("."),o=[],a=0,u=s.length;u>a;a++){if(n=e(t,"states"),!n)return void 0;if(i=e(n,s[a]),!i)return void 0;t=i,o.push(i)}return o},goToState:function(){return this.transitionTo.apply(this,arguments)},transitionTo:function(t,r){if(!Ember.isEmpty(t)){var n=r?Array.prototype.slice.call(arguments,1):[],s=e(this,"currentState")||this,o=this.contextFreeTransition(s,t),a=new i(o).normalize(this,n);this.enterState(a),this.triggerSetupContext(a)}},contextFreeTransition:function(t,r){var n=t.getPathsCache(this,r);if(n)return n;for(var i=this.getStatesInPath(t,r),s=[],o=t;o&&!i;){if(s.unshift(o),o=e(o,"parentState"),!o&&(i=this.getStatesInPath(this,r),!i))return;i=this.getStatesInPath(o,r)}for(;i.length>0&&i[0]===s[0];)o=i.shift(),s.shift();var a={exitStates:s,enterStates:i,resolveState:o};return t.setPathsCache(this,r,a),a},triggerSetupContext:function(t){var r=t.contexts,i=t.enterStates.length-r.length,s=t.enterStates,o=e(this,"transitionEvent");n.call(s,function(e,t){e.trigger(o,this,r[t-i])},this)},getState:function(t){var r=e(this,t),n=e(this,"parentState");return r?r:n?n.getState(t):void 0},enterState:function(r){var i=this.enableLogging,s=r.exitStates.slice(0).reverse();n.call(s,function(e){e.trigger("exit",this)},this),n.call(r.enterStates,function(t){i&&Ember.Logger.log("STATEMANAGER: Entering "+e(t,"path")),t.trigger("enter",this)},this),t(this,"currentState",r.finalState)}})}(),function(){e("metamorph",[],function(){"use strict";// Copyright: ©2011 My Company Inc. All rights reserved.
|
20
|
+
var e=function(){},t=0,r=this.document,n=r&&"createRange"in r&&"undefined"!=typeof Range&&Range.prototype.createContextualFragment,i=r&&function(){var e=r.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML}(),s=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}(),o=function(r){var n;n=this instanceof o?this:new e,n.innerHTML=r;var i="metamorph-"+t++;return n.start=i+"-start",n.end=i+"-end",n};e.prototype=o.prototype;var a,u,c,h,l,m,f,p,d;if(h=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)a=function(e,t){var n=r.createRange(),i=r.getElementById(e.start),s=r.getElementById(e.end);return t?(n.setStartBefore(i),n.setEndAfter(s)):(n.setStartAfter(i),n.setEndBefore(s)),n},u=function(e,t){var r=a(this,t);r.deleteContents();var n=r.createContextualFragment(e);r.insertNode(n)},c=function(){var e=a(this,!0);e.deleteContents()},l=function(e){var t=r.createRange();t.setStart(e),t.collapse(!1);var n=t.createContextualFragment(this.outerHTML());e.appendChild(n)},m=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)},f=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 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,s=e.childNodes.length;for(r=0;s>r;r++)if(n=e.childNodes[r],i=1===n.nodeType&&E(n,t))return i},v=function(e,t){var n=[];if(s&&(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 a=E(e,n[i][0]),u=r.createTextNode(n[i][1]);a.parentNode.insertBefore(u,a)}}},g=function(e,t){var n=b[e.tagName.toLowerCase()]||b._default,s=n[0],o=n[1],a=n[2];i&&(t="­"+t);var u=r.createElement("div");v(u,o+t+a);for(var c=0;s>=c;c++)u=u.firstChild;if(i){for(var h=u;1===h.nodeType&&!h.nodeName;)h=h.firstChild;3===h.nodeType&&""===h.nodeValue.charAt(0)&&(h.nodeValue=h.nodeValue.slice(1))}return u},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 n,i,s,o=y(r.getElementById(this.start)),a=r.getElementById(this.end),u=a.parentNode;for(w(o,a),n=o.nextSibling;n;){if(i=n.nextSibling,s=n===a){if(!t)break;a=n.nextSibling}if(n.parentNode.removeChild(n),s)break;n=i}for(n=g(o.parentNode,e);n;)i=n.nextSibling,u.insertBefore(n,a),n=i},c=function(){var e=y(r.getElementById(this.start)),t=r.getElementById(this.end);this.html(""),e.parentNode.removeChild(e),t.parentNode.removeChild(t)},l=function(e){for(var t,r=g(e,this.outerHTML());r;)t=r.nextSibling,e.appendChild(r),r=t},m=function(e){var t,n,i=r.getElementById(this.end),s=i.nextSibling,o=i.parentNode;for(n=g(o,e);n;)t=n.nextSibling,o.insertBefore(n,s),n=t},f=function(e){var t,n,i=r.getElementById(this.start),s=i.parentNode;n=g(s,e);for(var o=i.nextSibling;n;)t=n.nextSibling,s.insertBefore(n,o),n=t}}return o.prototype.html=function(e){return this.checkRemoved(),void 0===e?this.innerHTML:(u.call(this,e),this.innerHTML=e,void 0)},o.prototype.replaceWith=function(e){this.checkRemoved(),u.call(this,e,!0)},o.prototype.remove=c,o.prototype.outerHTML=h,o.prototype.appendTo=l,o.prototype.after=m,o.prototype.prepend=f,o.prototype.startTag=p,o.prototype.endTag=d,o.prototype.isRemoved=function(){var e=r.getElementById(this.start),t=r.getElementById(this.end);return!e||!t},o.prototype.checkRemoved=function(){if(this.isRemoved())throw new Error("Cannot perform operations on a Metamorph that is not in the DOM.")},o})}(),function(){function e(e){var t=e.hash,r=e.hashTypes;for(var n in t)"ID"===r[n]&&(t[n+"Binding"]=t[n],r[n+"Binding"]="STRING",delete t[n],delete r[n])}var t=Object.create||function(e){function t(){}return t.prototype=e,new t},r=this.Handlebars||Ember.imports&&Ember.imports.Handlebars;r||"function"!=typeof require||(r=require("handlebars")),Ember.Handlebars=t(r),Ember.Handlebars.helper=function(t,r){if(Ember.Component.detect(r)){var n=r.proto();n.layoutName||n.templateName||r.reopen({layoutName:"components/"+t})}Ember.View.detect(r)?Ember.Handlebars.registerHelper(t,function(t){return e(t),Ember.Handlebars.helpers.view.call(this,r,t)}):Ember.Handlebars.registerBoundHelper.apply(null,arguments)},Ember.Handlebars.helpers=t(r.helpers),Ember.Handlebars.Compiler=function(){},r.Compiler&&(Ember.Handlebars.Compiler.prototype=t(r.Compiler.prototype)),Ember.Handlebars.Compiler.prototype.compiler=Ember.Handlebars.Compiler,Ember.Handlebars.JavaScriptCompiler=function(){},r.JavaScriptCompiler&&(Ember.Handlebars.JavaScriptCompiler.prototype=t(r.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="ember"+ +new Date,i=1;Ember.Handlebars.Compiler.prototype.mustache=function(e){if(e.isHelper&&"control"===e.id.string)e.hash=e.hash||new r.AST.HashNode([]),e.hash.pairs.push(["controlID",new r.AST.StringNode(n+i++)]);else if(e.params.length||e.hash);else{var t=new r.AST.IdNode(["_triageMustache"]);e.escaped||(e.hash=e.hash||new r.AST.HashNode([]),e.hash.pairs.push(["unescaped",new r.AST.StringNode("true")])),e=new r.AST.MustacheNode([t].concat([e.id]),e.hash,!e.escaped)}return r.Compiler.prototype.mustache.call(this,e)},Ember.Handlebars.precompile=function(e){var t=r.parse(e),n={knownHelpers:{action:!0,unbound:!0,bindAttr:!0,template:!0,view:!0,_triageMustache:!0},data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(t,n);return(new Ember.Handlebars.JavaScriptCompiler).compile(i,n,void 0,!0)},r.compile&&(Ember.Handlebars.compile=function(e){var t=r.parse(e),n={data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(t,n),s=(new Ember.Handlebars.JavaScriptCompiler).compile(i,n,void 0,!0);return Ember.Handlebars.template(s)})}(),function(){function e(e,t,r,i){var s,o,a,u,c,h,l=r.length,m=i.data,f=m.view,p=i.hash,d=p.boundOptions;a=new Ember._SimpleHandlebarsView(null,null,!p.unescaped,m),a.normalizedValue=function(){var s,o=[];for(s in d)d.hasOwnProperty(s)&&(c=n(e,d[s],m),a.path=c.path,a.pathRoot=c.root,p[s]=Ember._SimpleHandlebarsView.prototype.normalizedValue.call(a));for(u=0;l>u;++u)c=r[u],a.path=c.path,a.pathRoot=c.root,o.push(Ember._SimpleHandlebarsView.prototype.normalizedValue.call(a));return o.push(i),t.apply(e,o)},f.appendChild(a),s=[];for(o in d)d.hasOwnProperty(o)&&s.push(n(e,d[o],m));for(s=s.concat(r),u=0,h=s.length;h>u;++u)c=s[u],f.registerObserver(c.root,c.path,a,a.rerender)}function t(e,t,r,n){var i,s,o,a,u=[],c=n.hash,h=c.boundOptions;for(a in h)h.hasOwnProperty(a)&&(c[a]=Ember.Handlebars.get(e,h[a],n));for(i=0,s=r.length;s>i;++i)o=r[i],u.push(Ember.Handlebars.get(e,o.path,n));return u.push(n),t.apply(e,u)}var r=Array.prototype.slice,n=Ember.Handlebars.normalizePath=function(e,t,r){var n,i,s=r&&r.keywords||{};return n=t.split(".",1)[0],s.hasOwnProperty(n)&&(e=s[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,s=r&&r.data,o=n(e,t,s);return e=o.root,t=o.path,i=Ember.get(e,t),void 0===i&&e!==Ember.lookup&&Ember.isGlobalPath(t)&&(i=Ember.get(Ember.lookup,t)),i};Ember.Handlebars.getPath=Ember.deprecateFunc("`Ember.Handlebars.getPath` has been changed to `Ember.Handlebars.get` for consistency.",Ember.Handlebars.get),Ember.Handlebars.resolveParams=function(e,t,r){for(var n,s,o=[],a=r.types,u=0,c=t.length;c>u;u++)n=t[u],s=a[u],"ID"===s?o.push(i(e,n,r)):o.push(n);return o},Ember.Handlebars.resolveHash=function(e,t,r){var n,s={},o=r.hashTypes;for(var a in t)t.hasOwnProperty(a)&&(n=o[a],s[a]="ID"===n?i(e,t[a],r):t[a]);return s},Ember.Handlebars.registerHelper("helperMissing",function(e,t){var r,n="";throw r="%@ Handlebars error: Could not find property '%@' on object %@.",t.data&&(n=t.data.view),new Ember.Error(Ember.String.fmt(r,[n,e,this]))}),Ember.Handlebars.registerBoundHelper=function(i,s){function o(){var i,o,u,c,h,l=r.call(arguments,0,-1),m=l.length,f=arguments[arguments.length-1],p=[],d=f.data,b=f.hash,E=d.view,v=f.contexts&&f.contexts[0]||this;b.boundOptions={};for(h in b)b.hasOwnProperty(h)&&Ember.IS_BINDING.test(h)&&"string"==typeof b[h]&&(b.boundOptions[h.slice(0,-7)]=b[h]);for(d.properties=[],c=0;m>c;++c)d.properties.push(l[c]),p.push(n(v,l[c],d));if(d.isUnbound)return t(this,s,p,f);if(0===a.length)return e(v,s,p,f);i=p[0],o=i.root,u=i.path;var g=new Ember._SimpleHandlebarsView(u,o,!f.hash.unescaped,f.data);g.normalizedValue=function(){var e=Ember._SimpleHandlebarsView.prototype.normalizedValue.call(g);return s.call(E,e,f)},E.appendChild(g),E.registerObserver(o,u,g,g.rerender);for(var y=0,w=a.length;w>y;y++)E.registerObserver(o,u+"."+a[y],g,g.rerender)}var a=r.call(arguments,2);o._rawFunction=s,Ember.Handlebars.registerHelper(i,o)},Ember.Handlebars.template=function(e){var t=Handlebars.template(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,s=0,o=r.length;o>s;s++)t.push(Ember.Handlebars.get(n[s],r[s],{data:i}));return t}}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}Ember.set,Ember.get;var r=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=s(),this.state="preRender",this.updateId=null}var r=Ember.get,n=Ember.set,i=Ember.Handlebars.get,s=t("metamorph");Ember._SimpleHandlebarsView=e,e.prototype={isVirtual:!0,isView:!0,destroy:function(){this.updateId&&(Ember.run.cancel(this.updateId),this.updateId=null),this.morph=null},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"destroying":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 o=Ember.View.cloneStates(Ember.View.states),a=Ember.merge;a(o._default,{rerenderIfNeeded:Ember.K}),a(o.inDOM,{rerenderIfNeeded:function(e){e.normalizedValue()!==e._lastNormalizedValue&&e.rerender()}}),Ember._HandlebarsBoundView=Ember._MetamorphView.extend({instrumentName:"boundHandlebars",states:o,shouldDisplayFunc:null,preserveContext:!1,previousContext:null,displayTemplate:null,inverseTemplate:null,path:null,pathRoot:null,normalizedValue:function(){var e,t,n=r(this,"path"),s=r(this,"pathRoot"),o=r(this,"valueNormalizerFunc");return""===n?e=s:(t=r(this,"templateData"),e=i(s,n,{data:t})),o?o(e):e},rerenderIfNeeded:function(){this.currentState.rerenderIfNeeded(this)},render:function(e){var t=r(this,"isEscaped"),i=r(this,"shouldDisplayFunc"),s=r(this,"preserveContext"),o=r(this,"previousContext"),a=r(this,"inverseTemplate"),u=r(this,"displayTemplate"),c=this.normalizedValue();if(this._lastNormalizedValue=c,i(c))if(n(this,"template",u),s)n(this,"_context",o);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 a?(n(this,"template",a),s?n(this,"_context",o):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,o,a){var u,c,h,l=t.data,m=t.fn,f=t.inverse,p=l.view,d=this;if(u=s(d,e,l),"object"==typeof this){if(l.insideGroup){c=function(){Ember.run.once(p,"rerender")};var b,E,v=i(d,e,t);v=o(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:o,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),a))for(h=0;h<a.length;h++)p.registerObserver(u.root,u.path+"."+a[h],c)}else l.buffer.push(i(d,e,t))}function r(e,t){var r,n,o=t.data,a=o.view,u=this;if(r=s(u,e,o),"object"==typeof this){if(o.insideGroup){n=function(){Ember.run.once(a,"rerender")};var c=i(u,e,t);(null===c||void 0===c)&&(c=""),o.buffer.push(c)}else{var h=new Ember._SimpleHandlebarsView(e,u,!t.hash.unescaped,t.data);h._parentView=a,a.appendChild(h),n=function(){Ember.run.scheduleOnce("render",h,"rerender")}}""!==r.path&&a.registerObserver(r.root,r.path,n)}else o.buffer.push(i(u,e,t))}var n=Ember.get;Ember.set,Ember.String.fmt;var i=Ember.Handlebars.get,s=Ember.Handlebars.normalizePath,o=Ember.ArrayPolyfills.forEach,a=Ember.Handlebars,u=a.helpers;a.registerHelper("_triageMustache",function(e,t){return u[e]?u[e].call(this,t):u.bind.apply(this,arguments)}),a.registerHelper("bind",function(n,i){var s=i.contexts&&i.contexts[0]||this;return i.fn?t.call(s,n,i,!1,e):r.call(s,n,i)}),a.registerHelper("boundIf",function(e,r){var i=r.contexts&&r.contexts[0]||this,s=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,s,s,["isTruthy","length"])}),a.registerHelper("with",function(r,n){if(4===arguments.length){var i,o,a,c;if(n=arguments[3],i=arguments[2],o=arguments[0],Ember.isGlobalPath(o))Ember.bind(n.data.keywords,i,o);else{c=s(this,o,n.data),o=c.path,a=c.root;var h=Ember.$.expando+Ember.guidFor(a);n.data.keywords[h]=a;var l=o?h+"."+o:h;Ember.bind(n.data.keywords,i,l)}return t.call(this,o,n,!0,e)}return u.bind.call(n.contexts[0],r,n)}),a.registerHelper("if",function(e,t){return u.boundIf.call(t.contexts[0],e,t)}),a.registerHelper("unless",function(e,t){var r=t.fn,n=t.inverse;return t.fn=n,t.inverse=r,u.boundIf.call(t.contexts[0],e,t)}),a.registerHelper("bindAttr",function(e){var t=e.hash,r=e.data.view,n=[],u=this,c=++Ember.uuid,h=t["class"];if(null!=h){var l=a.bindClasses(this,h,r,c,e);n.push('class="'+Handlebars.Utils.escapeExpression(l.join(" "))+'"'),delete t["class"]}var m=Ember.keys(t);return o.call(m,function(o){var a,h=t[o];a=s(u,h,e.data);var l,m,f="this"===h?a.root:i(u,h,e),p=Ember.typeOf(f);l=function(){var t=i(u,h,e),n=r.$("[data-bindattr-"+c+"='"+c+"']");return n&&0!==n.length?(Ember.View.applyAttributeBindings(n,o,t),void 0):(Ember.removeObserver(a.root,a.path,m),void 0)},"this"===h||a.isKeyword&&""===a.path||r.registerObserver(a.root,a.path,l),"string"===p||"number"===p&&!isNaN(f)?n.push(o+'="'+Handlebars.Utils.escapeExpression(f)+'"'):f&&"boolean"===p&&n.push(o+'="'+o+'"')},this),n.push("data-bindattr-"+c+'="'+c+'"'),new a.SafeString(n.join(" "))}),a.bindClasses=function(e,t,r,n,a){var u,c,h,l=[],m=function(e,t,r){var n,s=t.path;return n="this"===s?e:""===s?!0:i(e,s,r),Ember.View._classStringForValue(s,n,t.className,t.falsyClassName)};return o.call(t.split(" "),function(t){var i,o,f,p,d=Ember.View._parsePropertyPath(t),b=d.path,E=e;""!==b&&"this"!==b&&(p=s(e,b,a.data),E=p.root,b=p.path),o=function(){u=m(e,d,a),h=n?r.$("[data-bindattr-"+n+"='"+n+"']"):r.$(),h&&0!==h.length?(i&&h.removeClass(i),u?(h.addClass(u),i=u):i=null):Ember.removeObserver(E,b,f)},""!==b&&"this"!==b&&r.registerObserver(E,b,o),c=m(e,d,a),c&&(l.push(c),i=c)}),l}}(),function(){Ember.get,Ember.set;var e=Ember.Handlebars;e.ViewHelper=Ember.Object.create({propertiesFromHTMLOptions:function(e){var t=e.hash,r=e.data,n={},i=t["class"],s=!1;t.id&&(n.elementId=t.id,s=!0),t.tag&&(n.tagName=t.tag,s=!0),i&&(i=i.split(" "),n.classNames=i,s=!0),t.classBinding&&(n.classNameBindings=t.classBinding.split(" "),s=!0),t.classNameBindings&&(void 0===n.classNameBindings&&(n.classNameBindings=[]),n.classNameBindings=n.classNameBindings.concat(t.classNameBindings.split(" ")),s=!0),t.attributeBindings&&(n.attributeBindings=null,s=!0),s&&(t=Ember.$.extend({},t),delete t.id,delete t.tag,delete t["class"],delete t.classBinding);var o;for(var a in t)t.hasOwnProperty(a)&&Ember.IS_BINDING.test(a)&&"string"==typeof t[a]&&(o=this.contextualizeBindingPath(t[a],r),o&&(t[a]=o));if(n.classNameBindings)for(var u in n.classNameBindings){var c=n.classNameBindings[u];if("string"==typeof c){var h=Ember.View._parsePropertyPath(c);o=this.contextualizeBindingPath(h.path,r),o&&(n.classNameBindings[u]=o+h.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?"_parentView.context":"_parentView.context."+e},helper:function(t,r,n){var i,s=n.data,o=n.fn;i="string"==typeof r?e.get(t,r,n):r;var a=this.propertiesFromHTMLOptions(n,t),u=s.view;a.templateData=s;var c=i.proto?i.proto():i;o&&(a.template=o),c.controller||c.controllerBinding||a.controller||a.controllerBinding||(a._context=t),u.appendChild(i,a)}}),e.registerHelper("view",function(t,r){return t&&t.data&&t.data.isRenderData&&(r=t,t="Ember.View"),e.ViewHelper.helper(this,t,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=n.fn,s=n.data,o=n.inverse;n.data.view;var a;a=r?t(this,r,n):Ember.CollectionView;var u,c,h=n.hash,l={},m=h.itemViewClass,f=a.proto();delete h.itemViewClass,c=m?t(f,m,n):f.itemViewClass;for(var p in h)h.hasOwnProperty(p)&&(u=p.match(/^item(.)(.*)$/),u&&"itemController"!==p&&(l[u[1].toLowerCase()+u[2]]=h[p],delete h[p]));i&&(l.template=i,delete n.fn);var d;o&&o!==Handlebars.VM.noop?(d=e(f,"emptyViewClass"),d=d.extend({template:o,tagName:l.tagName})):h.emptyViewClass&&(d=t(this,h.emptyViewClass,n)),d&&(h.emptyView=d),h.keyword||(l._context=Ember.computed.alias("content"));var b=Ember.Handlebars.ViewHelper.propertiesFromHTMLOptions({data:s,hash:l},this);return h.itemViewClass=c.extend(b),Ember.Handlebars.helpers.view.call(this,a,n)})}(),function(){var e=Ember.Handlebars.get;Ember.Handlebars.registerHelper("unbound",function(t,r){var n,i,s,o=arguments[arguments.length-1];return arguments.length>2?(o.data.isUnbound=!0,n=Ember.Handlebars.helpers[arguments[0]]||Ember.Handlebars.helperMissing,s=n.apply(this,Array.prototype.slice.call(arguments,1)),delete o.data.isUnbound,s):(i=r.contexts&&r.contexts[0]||this,e(i,t,r))})}(),function(){var e=Ember.Handlebars.get,t=Ember.Handlebars.normalizePath;Ember.Handlebars.registerHelper("log",function(r,n){var i=n.contexts&&n.contexts[0]||this,s=t(i,r,n.data),o=s.root,a=s.path,u="this"===a?o:e(o,a,n);Ember.Logger.log(u)}),Ember.Handlebars.registerHelper("debugger",function(){})}(),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=Ember.ArrayController.create();t(i,"itemController",n),t(i,"container",e(this,"controller.container")),t(i,"_eachView",this),t(i,"target",e(this,"controller")),t(i,"parentController",e(this,"controller")),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()},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"),s=e(r,"content");if(i){var o=e(r,"templateData");o=Ember.copy(o),o.keywords=r.cloneKeywords(),t(r,"templateData",o),o.keywords[i]=s}return s&&e(s,"isController")&&t(r,"controller",s),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.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},removeArrayObservers:function(){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(){var t=this.content,r=e(t,"length"),n=this.options.data,i=this.template;n.insideEach=!0;for(var s=0;r>s;s++)i(t.objectAt(s),{data:n})},rerenderContainingView:function(){Ember.run.scheduleOnce("render",this.containingView,"rerender")},destroy:function(){this.removeContentObservers(),this.removeArrayObservers()}},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(e,t){var r=t.data.view,n=r.templateForName(e);n(this,{data:t.data})})}(),function(){Ember.Handlebars.registerHelper("partial",function(e,t){var r=e.split("/"),n=r[r.length-1];r[r.length-1]="_"+n;var i=t.data.view,s=r.join("/"),o=i.templateForName(s),a=!o&&i.templateForName(e);o=o||a,o(this,{data:t.data})})}(),function(){var e=Ember.get;Ember.set,Ember.Handlebars.registerHelper("yield",function(t){for(var r,n=t.data.view;n&&!e(n,"layout");)n=e(n,"parentView");r=e(n,"template"),r&&r(this,t)})}(),function(){var e=Ember.set;Ember.get,Ember.Checkbox=Ember.View.extend({classNames:["ember-checkbox"],tagName:"input",attributeBindings:["type","checked","disabled","tabindex","name"],type:"checkbox",checked:!1,disabled:!1,init:function(){this._super(),this.on("change",this,this._updateElementValue)},_updateElementValue:function(){e(this,"checked",this.$().prop("checked"))}})}(),function(){var e=(Ember.get,Ember.set);Ember.TextSupport=Ember.Mixin.create({value:"",attributeBindings:["placeholder","disabled","maxlength","tabindex"],placeholder:null,disabled:!1,maxlength:null,insertNewline:Ember.K,cancel:Ember.K,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)},interpretKeyEvents:function(e){var t=Ember.TextSupport.KEY_EVENTS,r=t[e.keyCode];return this._elementValueDidChange(),r?this[r](e):void 0},_elementValueDidChange:function(){e(this,"value",this.$().val())}}),Ember.TextSupport.KEY_EVENTS={13:"insertNewline",27:"cancel"}}(),function(){function e(e,r,n){var i=t(r,"action"),s=t(r,"onEvent");if(i&&s===e){var o=t(r,"controller"),a=t(r,"value"),u=t(r,"bubbles");o.send(i,a,r),u||n.stopPropagation()}}var t=Ember.get;Ember.set,Ember.TextField=Ember.View.extend(Ember.TextSupport,{classNames:["ember-text-field"],tagName:"input",attributeBindings:["type","value","size","pattern","name"],value:"",type:"text",size:null,pattern:null,action:null,onEvent:"enter",bubbles:!1,insertNewline:function(t){e("enter",this,t)},keyPress:function(t){e("keyPress",this,t)}})}(),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.View.extend(Ember.TextSupport,{classNames:["ember-text-area"],tagName:"textarea",attributeBindings:["rows","cols","name"],rows:null,cols:null,_updateElementValue:Ember.observer(function(){var t=e(this,"value"),r=this.$();r&&t!==r.val()&&r.val(t)},"value"),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.replace,s=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(function(){var e=t(this,"parentView.optionLabelPath");e&&Ember.defineProperty(this,"label",Ember.computed(function(){return t(this,e)}).property(e))},"parentView.optionLabelPath"),valuePathDidChange:Ember.observer(function(){var e=t(this,"parentView.optionValuePath");e&&Ember.defineProperty(this,"value",Ember.computed(function(){return t(this,e)}).property(e))},"parentView.optionValuePath")}),Ember.Select=Ember.View.extend({tagName:"select",classNames:["ember-select"],defaultTemplate:Ember.Handlebars.template(function(e,t,r,n,i){function s(e,t){var n,i,s="";return t.buffer.push('<option value="">'),n={},i={},t.buffer.push(l(r._triageMustache.call(e,"view.prompt",{hash:{},contexts:[e],types:["ID"],hashContexts:i,hashTypes:n,data:t}))),t.buffer.push("</option>"),s}function o(e,t){var n,i;n={contentBinding:e},i={contentBinding:"STRING"},t.buffer.push(l(r.view.call(e,"view.optionView",{hash:{contentBinding:"this"},contexts:[e],types:["ID"],hashContexts:n,hashTypes:i,data:t})))}this.compilerInfo=[3,">= 1.0.0-rc.4"],r=r||Ember.Handlebars.helpers,i=i||{};var a,u,c,h="",l=this.escapeExpression,m=this;return u={},c={},a=r["if"].call(t,"view.prompt",{hash:{},inverse:m.noop,fn:m.program(1,s,i),contexts:[t],types:["ID"],hashContexts:c,hashTypes:u,data:i}),(a||0===a)&&i.buffer.push(a),u={},c={},a=r.each.call(t,"view.content",{hash:{},inverse:m.noop,fn:m.program(3,o,i),contexts:[t],types:["ID"],hashContexts:c,hashTypes:u,data:i}),(a||0===a)&&i.buffer.push(a),h}),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",optionView:Ember.SelectOption,_change:function(){t(this,"multiple")?this._changeMultiple():this._changeSingle()},selectionDidChange:Ember.observer(function(){var r=t(this,"selection");if(t(this,"multiple")){if(!s(r))return e(this,"selection",Ember.A([r])),void 0;this._selectionDidChangeMultiple()}else this._selectionDidChangeSingle()},"selection.@each"),valueDidChange:Ember.observer(function(){var e,r=t(this,"content"),n=t(this,"value"),i=t(this,"optionValuePath").replace(/^content\.?/,""),s=i?t(this,"selection."+i):t(this,"selection");n!==s&&(e=r?r.find(function(e){return n===(i?t(e,i):e)}):null,this.set("selection",e))},"value"),_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))
|
21
|
+
}},_changeMultiple:function(){var r=this.$("option:selected"),n=t(this,"prompt"),o=n?1:0,a=t(this,"content"),u=t(this,"selection");if(a&&r){var c=r.map(function(){return this.index-o}).toArray(),h=a.objectsAt(c);s(u)?i(u,0,t(u,"length"),h):e(this,"selection",h)}},_selectionDidChangeSingle:function(){var e=this.get("element");if(e){var n=t(this,"content"),i=t(this,"selection"),s=n?r(n,i):-1,o=t(this,"prompt");o&&(s+=1),e&&(e.selectedIndex=s)}},_selectionDidChangeMultiple:function(){var e,i=t(this,"content"),s=t(this,"selection"),o=i?n(i,s):[-1],a=t(this,"prompt"),u=a?1:0,c=this.$("option");c&&c.each(function(){e=this.index>-1?this.index-u:-1,this.selected=r(o,e)>-1})},init:function(){this._super(),this.on("didInsertElement",this,this._triggerChange),this.on("change",this,this._change)}})}(),function(){function e(e,t){for(var r in e)"ID"===t[r]&&(e[r+"Binding"]=e[r],delete e[r])}Ember.Handlebars.registerHelper("input",function(t){var r=t.hash,n=t.hashTypes,i=r.type,s=r.on;return delete r.type,delete r.on,e(r,n),"checkbox"===i?Ember.Handlebars.helpers.view.call(this,Ember.Checkbox,t):(r.type=i,r.onEvent=s||"enter",Ember.Handlebars.helpers.view.call(this,Ember.TextField,t))}),Ember.Handlebars.registerHelper("textarea",function(t){var r=t.hash,n=t.hashTypes;return e(r,n),Ember.Handlebars.helpers.view.call(this,Ember.TextArea,t)})}(),function(){function e(){Ember.Handlebars.bootstrap(Ember.$(document))}function t(e){var t,n=Ember.TEMPLATES;if(n)for(var i in n)(t=i.match(/^components\/(.*)$/))&&r(e,t[1])}function r(e,t){var r=t.replace(/-/g,"_"),n=e.lookupFactory("component:"+r)||e.lookupFactory("component:"+t),i=n||Ember.Component.extend();i.reopen({layoutName:"components/"+t}),Ember.Handlebars.helper(t,i)}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());Ember.TEMPLATES[r]=n,e.remove()})},Ember.onLoad("Ember.Application",function(r){r.initializer?(r.initializer({name:"domTemplates",initialize:e}),r.initializer({name:"registerComponents",after:"domTemplates",initialize:t})):Ember.onLoad("application",e)})}(),function(){Ember.runLoadHooks("Ember.Handlebars",Ember.Handlebars)}(),function(){var e=Ember.get,t=Ember.set;Ember._PromiseChain=Ember.Object.extend({promises:null,failureCallback:Ember.K,successCallback:Ember.K,abortCallback:Ember.K,promiseSuccessCallback:Ember.K,runNextPromise:function(){if(!e(this,"isDestroyed")){var t=e(this,"promises").shiftObject();if(t){var r=e(t,"promise")||t,n=this,i=function(){n.promiseSuccessCallback.call(this,t,arguments),n.runNextPromise()},s=e(n,"failureCallback");r.then(i,s)}else this.successCallback()}},start:function(){return this.runNextPromise(),this},abort:function(){this.abortCallback(),this.destroy()},init:function(){t(this,"promises",Ember.A(e(this,"promises"))),this._super()}})}(),function(){function e(t,r,n,i){var s,o=t.name,a=t.incoming,u=t.incomingNames,c=u.length;if(n||(n={}),i||(i=[]),!n.hasOwnProperty(o)){for(i.push(o),n[o]=!0,s=0;c>s;s++)e(a[u[s]],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 Error("cycle detected: "+r+" <- "+t.join(" <- "))}if(t&&r&&t!==r){var i=this.add(t),s=this.add(r);s.incoming.hasOwnProperty(t)||(e(i,n),i.hasOutgoing=!0,s.incoming[t]=i,s.incomingNames.push(t))}},t.prototype.topsort=function(t){var r,n,i={},s=this.vertices,o=this.names,a=o.length;for(r=0;a>r;r++)n=s[o[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.set;Ember.Application=Ember.Namespace.extend({rootElement:"body",eventDispatcher:null,customEvents:null,autoinit:!Ember.testing,isInitialized:!1,init:function(){if(this.$||(this.$=Ember.$),this._super(),this.createEventDispatcher(),this._readinessDeferrals=1,this.waitForDOMContentLoaded(),this.autoinit){var e=this;this.$().ready(function(){e.isDestroyed||e.isInitialized||e.initialize()})}},createEventDispatcher:function(){var r=e(this,"rootElement"),n=Ember.EventDispatcher.create({rootElement:r});t(this,"eventDispatcher",n)},waitForDOMContentLoaded:function(){this.deferReadiness();var e=this;this.$().ready(function(){e.advanceReadiness()})},deferReadiness:function(){this._readinessDeferrals++},advanceReadiness:function(){this._readinessDeferrals--,0===this._readinessDeferrals&&Ember.run.once(this,this.didBecomeReady)},initialize:function(e){return e=this.setupRouter(e),this.runInjections(e),Ember.runLoadHooks("application",this),this.isInitialized=!0,this.advanceReadiness(),this},runInjections:function(t){var r,n,i=e(this.constructor,"injections"),s=new Ember.DAG,o=this;for(r=0;r<i.length;r++)n=i[r],s.addEdges(n.name,n.injection,n.before,n.after);s.topsort(function(e){var r=e.value,n=Ember.A(Ember.keys(o));n.forEach(function(e){r(o,t,e)})})},setupRouter:function(e){return!e&&Ember.Router.detect(this.Router)&&(e=this.Router.create(),this._createdRouter=e),e&&(t(this,"router",e),t(e,"namespace",this)),e},didBecomeReady:function(){var t,r=e(this,"eventDispatcher"),n=e(this,"customEvents");r.setup(n),this.ready(),t=e(this,"router"),this.createApplicationView(t),t&&t instanceof Ember.Router&&this.startRouting(t),Ember.BOOTED=!0},createApplicationView:function(r){var n,i,s=e(this,"rootElement"),o={},a=this.ApplicationView,u=Ember.TEMPLATES.application;(a||u)&&(r&&(n=e(r,"applicationController"),n&&(o.controller=n)),u&&(o.template=u),a||(a=Ember.View),i=a.create(o),this._createdApplicationView=i,r&&t(r,"applicationView",i),i.appendTo(s))},startRouting:function(t){var r=e(t,"location");t.route(r.getURL()),r.onUpdateURL(function(e){t.route(e)})},ready:Ember.K,willDestroy:function(){e(this,"eventDispatcher").destroy(),this._createdRouter&&this._createdRouter.destroy(),this._createdApplicationView&&this._createdApplicationView.destroy()},registerInjection:function(e){this.constructor.registerInjection(e)}}),Ember.Application.reopenClass({concatenatedProperties:["injections"],injections:Ember.A(),registerInjection:function(t){var r=e(this,"injections");r.push(t)}}),Ember.Application.registerInjection({name:"controllers",injection:function(e,t,r){if(t&&/^[A-Z].*Controller$/.test(r)){var n,i=r.charAt(0).toLowerCase()+r.substr(1),s=e[r];Ember.Object.detect(s)&&(n=e[r].create(),t.set(i,n),n.setProperties({target:t,controllers:t,namespace:e}))}}}),Ember.runLoadHooks("Ember.Application",Ember.Application)}(),function(){var e=Ember.get;Ember._ResolvedState=Ember.Object.extend({manager:null,state:null,match:null,object:Ember.computed(function(){if(this._object)return this._object;var t=e(this,"state"),r=e(this,"match"),n=e(this,"manager");return t.deserialize(n,r.hash)}),hasPromise:Ember.computed(function(){return Ember.canInvoke(e(this,"object"),"then")}).property("object"),promise:Ember.computed(function(){var t=e(this,"object");return Ember.canInvoke(t,"then")?t:{then:function(e){e(t)}}}).property("object"),transition:function(){var t=e(this,"manager"),r=e(this,"state.path"),n=e(this,"object");t.transitionTo(r,n)}})}(),function(){var e=Ember.get,t=function(e){var t=e.toString(),r=t.split("."),n=r[r.length-1];return Ember.String.underscore(n)+"_id"},r=function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e.hasOwnProperty(r)||(e[r]=t[r]))};Ember.Routable=Ember.Mixin.create({init:function(){var t;this.on("setup",this,this.stashContext),(t=e(this,"redirectsTo"))&&(this.connectOutlets=function(e){e.transitionTo(t)});var r=e(this,"route");""===r&&(r="/"),this._super()},setup:function(){return this.connectOutlets.apply(this,arguments)},stashContext:function(t,r){this.router=t;var n=this.serialize(t,r);t.setStateMeta(this,"context",r),t.setStateMeta(this,"serialized",n),e(this,"isRoutable")&&!e(t,"isRouting")&&this.updateRoute(t,e(t,"location"))},updateRoute:function(t,r){if(e(this,"isLeafRoute")){var n=this.absoluteRoute(t);r.setURL(n)}},absoluteRoute:function(t,n){var i,s,o=e(this,"parentState"),a="";s=null,n&&(n instanceof Array?n.length>0&&(s=n.shift()):s=n),e(o,"isRoutable")&&(a=o.absoluteRoute(t,n));var u=e(this,"routeMatcher"),c=t.getStateMeta(this,"serialized");return s=s||{},r(s,c),i=u&&u.generate(s),i&&(a=a+"/"+i),a},isRoutable:Ember.computed(function(){return"string"==typeof e(this,"route")}),isLeafRoute:Ember.computed(function(){return e(this,"isLeaf")?!0:!e(this,"childStates").findProperty("isRoutable")}),routeMatcher:Ember.computed(function(){var t=e(this,"route");return t?Ember._RouteMatcher.create({route:t}):void 0}),hasContext:Ember.computed(function(){var t=e(this,"routeMatcher");return t?t.identifiers.length>0:void 0}),modelClass:Ember.computed(function(){var t=e(this,"modelType");return"string"==typeof t?Ember.get(Ember.lookup,t):t}),modelClassFor:function(t){var r,n,i,s,o;if(r=e(this,"modelClass"))return r;if(t&&(n=e(this,"routeMatcher"),n&&(i=n.identifiers,2===i.length&&(s=i[1].match(/^(.*)_id$/)))))return o=Ember.String.classify(s[1]),e(t,o)},deserialize:function(r,n){var i;return(i=this.modelClassFor(e(r,"namespace")))?i.find(n[t(i)]):n},serialize:function(r,n){var i,s,o;return Ember.isEmpty(n)?"":((i=this.modelClassFor(e(r,"namespace")))&&(s=t(i),o=e(n,"id"),n={},n[s]=o),n)},resolvePath:function(t,r){if(e(this,"isLeafRoute"))return Ember.A();var n,i=e(this,"childStates");i=Ember.A(i.filterProperty("isRoutable")),i=i.sort(function(t,r){var n=e(t,"routeMatcher.identifiers.length"),i=e(r,"routeMatcher.identifiers.length"),s=e(t,"route"),o=e(r,"route");return 0===s.indexOf(o)?-1:0===o.indexOf(s)?1:n!==i?n-i:e(r,"route.length")-e(t,"route.length")});var s=i.find(function(t){var i=e(t,"routeMatcher");return(n=i.match(r))?!0:void 0}),o=Ember._ResolvedState.create({manager:t,state:s,match:n}),a=s.resolvePath(t,n.remaining);return Ember.A([o]).pushObjects(a)},routePath:function(t,r){function n(){i.forEach(function(e){e.transition()})}if(!e(this,"isLeafRoute")){var i=this.resolvePath(t,r),s=i.some(function(t){return e(t,"hasPromise")});s?(t.transitionTo("loading"),t.handleStatePromises(i,n)):n()}},unroutePath:function(t,r){var n=e(this,"parentState");if(n!==t){r=r.replace(/^(?=[^\/])/,"/");var i=this.absoluteRoute(t),s=e(this,"route");if("/"!==s){var o=r.indexOf(i),a=r.charAt(i.length);if(0===o&&("/"===a||""===a))return}t.enterState({exitStates:[this],enterStates:[],finalState:n}),t.send("unroutePath",r)}},parentTemplate:Ember.computed(function(){for(var t,r=this;r=e(r,"parentState");)if(t=e(r,"template"))return t;return"application"}),_template:Ember.computed(function(){var t=e(this,"template");if(t)return t;var r,n=this.constructor.toString();return/^[^\[].*Route$/.test(n)?(r=n.match(/([^\.]+\.)*([^\.]+)/)[2],r=r.replace(/Route$/,""),r.charAt(0).toLowerCase()+r.substr(1)):void 0}),render:function(t){t=t||{};var r=t.template||e(this,"_template"),n=t.into||e(this,"parentTemplate"),i=e(this.router,n+"Controller"),s=Ember.String.classify(r)+"View",o=e(e(this.router,"namespace"),s);o=(o||Ember.View).extend({templateName:r}),i.set("view",o.create())},connectOutlets:Ember.K,navigateAway:Ember.K})}(),function(){Ember.Route=Ember.State.extend(Ember.Routable)}(),function(){var e=function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^\$|#\s]/g,"\\$&")};Ember._RouteMatcher=Ember.Object.extend({state:null,init:function(){var t,r=this.route,n=[],i=1;"/"===r.charAt(0)&&(r=this.route=r.substr(1)),t=e(r);var s=t.replace(/(:|(?:\\\*))([a-z_]+)(?=$|\/)/gi,function(e,t,r){switch(n[i++]=r,t){case":":return"([^/]+)";case"\\*":return"(.+)"}});this.identifiers=n,this.regex=new RegExp("^/?"+s)},match:function(e){var t=e.match(this.regex);if(t){for(var r=this.identifiers,n={},i=1,s=r.length;s>i;i++)n[r[i]]=t[i];return{remaining:e.substr(t[0].length),hash:r.length>0?n:null}}},generate:function(e){for(var t,r=this.identifiers,n=this.route,i=1,s=r.length;s>i;i++)t=r[i],n=n.replace(new RegExp("(:|(\\*))"+t),e[t]);return n}})}(),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(){},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)},onUpdateURL:function(r){var n=this,i=Ember.guidFor(this);Ember.$(window).on("hashchange.ember-location-"+i,function(){var i=location.hash.substr(1);e(n,"lastSetURL")!==i&&(t(n,"lastSetURL",null),r(location.hash.substr(1)))})},formatURL:function(e){return"#"+e},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).unbind("hashchange.ember-location-"+e)}}),Ember.Location.registerImplementation("hash",Ember.HashLocation)}(),function(){var e=Ember.get,t=Ember.set,r=!1;Ember.HistoryLocation=Ember.Object.extend({init:function(){t(this,"location",e(this,"location")||window.location),this.initState()},initState:function(){this.replaceState(e(this,"location").pathname),t(this,"history",window.history)},rootURL:"/",getURL:function(){return e(this,"location").pathname},setURL:function(e){e=this.formatURL(e),this.getState()&&this.getState().path!==e&&(r=!0,this.pushState(e))},getState:function(){return e(this,"history").state},pushState:function(e){window.history.pushState({path:e},null,e)},replaceState:function(e){window.history.replaceState({path:e},null,e)},onUpdateURL:function(e){var t=Ember.guidFor(this);Ember.$(window).on("popstate.ember-location-"+t,function(){r&&e(location.pathname)})},formatURL:function(t){var r=e(this,"rootURL");return""!==t&&(r=r.replace(/\/$/,"")),r+t},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).unbind("popstate.ember-location-"+e)}}),Ember.Location.registerImplementation("history",Ember.HistoryLocation)}(),function(){var e=Ember.get,t=Ember.set;Ember.Router=Ember.StateManager.extend({initialState:"root",location:"hash",rootURL:"/",transitionTo:function(){this.abortRoutingPromises(),this._super.apply(this,arguments)},route:function(r){function n(){for(r=r.replace(e(this,"rootURL"),""),r=r.replace(/^(?=[^\/])/,"/"),this.send("navigateAway"),this.send("unroutePath",r),s=e(this,"currentState");s&&!s.get("isRoutable");)s=e(s,"parentState");var t=s?s.absoluteRoute(this):"",n=r.substr(t.length);this.send("routePath",n)}function i(){t(this,"isRouting",!1)}this.abortRoutingPromises(),t(this,"isRouting",!0);var s;for(Ember.tryFinally(n,i,this),s=e(this,"currentState");s&&!s.get("isRoutable");)s=e(s,"parentState");s&&s.updateRoute(this,e(this,"location"))},urlFor:function(t,r){var n=e(this,"currentState")||this,i=this.findStateByPath(n,t),s=e(this,"location"),o=i.absoluteRoute(this,r);return s.formatURL(o)},urlForEvent:function(t){var r,n,i=Array.prototype.slice.call(arguments,1),s=e(this,"currentState"),o=s.lookupEventTransition(t);return r=this.findStateByPath(s,o),n=this.serializeRecursively(r,i,[]),this.urlFor(o,n)},serializeRecursively:function(t,r,n){var i,s=e(t,"hasContext")?r.pop():null,o=s?t.serialize(this,s):null;return n.push(o),i=t.get("parentState"),i&&i instanceof Ember.Route?this.serializeRecursively(i,r,n):n},abortRoutingPromises:function(){this._routingPromises&&(this._routingPromises.abort(),this._routingPromises=null)},handleStatePromises:function(e,r){this.abortRoutingPromises(),this.set("isLocked",!0);var n=this;this._routingPromises=Ember._PromiseChain.create({promises:e.slice(),successCallback:function(){n.set("isLocked",!1),r()},failureCallback:function(){throw"Unable to load object"},promiseSuccessCallback:function(e,r){t(e,"object",r[0])},abortCallback:function(){n.set("isLocked",!1)}}).start()},moveStatesIntoRoot:function(){this.root=Ember.Route.extend();for(var e in this)if("constructor"!==e){var t=this[e];(t instanceof Ember.Route||Ember.Route.detect(t))&&(this.root[e]=t,delete this[e])}},init:function(){this.root||this.moveStatesIntoRoot(),this._super();var r=e(this,"location"),n=e(this,"rootURL");"string"==typeof r&&t(this,"location",Ember.Location.create({implementation:r,rootURL:n})),this.assignRouter(this,this)},assignRouter:function(e,t){e.router=t;var r=e.states;if(r)for(var n in r)r.hasOwnProperty(n)&&this.assignRouter(r[n],t)},willDestroy:function(){e(this,"location").destroy()}})}(),function(){var e=Ember.Handlebars,t=e.get,r=Ember.get,n=Array.prototype.slice,i=e.ActionHelper={registeredActions:{}};i.registerAction=function(e,t){var r=(++Ember.uuid).toString();return i.registeredActions[r]={eventName:t.eventName,handler:function(r){var n=r.shiftKey||r.metaKey||r.altKey||r.ctrlKey,i=r.which>1,s=n||i;if(!t.link||!s){r.preventDefault(),r.view=t.view,t.hasOwnProperty("context")&&(r.context=t.context),t.hasOwnProperty("contexts")&&(r.contexts=t.contexts);var o=t.target;return"function"==typeof o.send?o.send(e,r):o[e].call(o,r)}}},t.view.on("willClearRender",function(){delete i.registeredActions[r]}),r},e.registerHelper("action",function(s){var o,a,u=arguments[arguments.length-1],c=n.call(arguments,1,-1),h=u.hash,l=u.data.view,m={eventName:h.on||"click"};m.view=l=r(l,"concreteView"),h.target?o=t(this,h.target,u):(a=u.data.keywords.controller)&&(o=a),m.target=o=o||l,c.length&&(m.contexts=c=Ember.EnumerableUtils.map(c,function(e){return t(this,e,u)},this),m.context=c[0]);var f,p=[];h.href&&o.urlForEvent&&(f=o.urlForEvent.apply(o,[s].concat(c)),p.push('href="'+f+'"'),m.link=!0);var d=i.registerAction(s,m);return p.push('data-ember-action="'+d+'"'),new e.SafeString(p.join(" "))})}(),function(){Ember.onLoad("Ember.Handlebars",function(e){e.OutletView=Ember.ContainerView.extend(Ember._Metamorph),e.registerHelper("outlet",function(t,r){return t&&t.data&&t.data.isRenderData&&(r=t,t="view"),r.hash.currentViewBinding="view.context."+t,e.helpers.view.call(this,e.OutletView,r)})})}(),function(){var e=Ember.get,t=Ember.set;Ember.ControllerMixin.reopen({controllers:null,connectOutlet:function(r,n){var i,s,o,a,u;if("string"===Ember.typeOf(n)&&(i=r,r=n,n=arguments[2]),1===arguments.length?"object"===Ember.typeOf(r)&&(u=r,i=u.outletName,r=u.name,s=u.viewClass,a=u.controller,n=u.context):u={},i=i||"view",r){var c=e(this,"namespace"),h=e(this,"controllers"),l=r.charAt(0).toUpperCase()+r.substr(1)+"View";s=e(c,l),a=e(h,r+"Controller")}return a&&n&&t(a,"content",n),o=this.createOutletView(i,s),a&&t(o,"controller",a),t(this,i,o),o},connectControllers:function(){for(var r,n=e(this,"controllers"),i=Array.prototype.slice.apply(arguments),s=0,o=i.length;o>s;s++)r=i[s]+"Controller",t(this,r,e(n,r))},disconnectOutlet:function(e){e=e||"view",t(this,e,null)},createOutletView:function(e,t){return t.create()},urlForEvent:function(t,r){var n=e(this,"target");return n?n.urlForEvent(t,r):void 0}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.String.fmt);Ember.View.reopen({templateForName:function(r,n){if(r){var i=e(this,"templates"),s=e(i,r);if(!s)throw new Ember.Error(t('%@ - Unable to find %@ "%@".',[this,n,r]));return s}}})}()}(),"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.");
|
@@ -62,7 +62,7 @@ var define, requireModule;
|
|
62
62
|
|
63
63
|
@class Ember
|
64
64
|
@static
|
65
|
-
@version 1.0.0-rc.
|
65
|
+
@version 1.0.0-rc.6
|
66
66
|
*/
|
67
67
|
|
68
68
|
if ('undefined' === typeof Ember) {
|
@@ -89,10 +89,10 @@ Ember.toString = function() { return "Ember"; };
|
|
89
89
|
/**
|
90
90
|
@property VERSION
|
91
91
|
@type String
|
92
|
-
@default '1.0.0-rc.
|
92
|
+
@default '1.0.0-rc.6'
|
93
93
|
@final
|
94
94
|
*/
|
95
|
-
Ember.VERSION = '1.0.0-rc.
|
95
|
+
Ember.VERSION = '1.0.0-rc.6';
|
96
96
|
|
97
97
|
/**
|
98
98
|
Standard environmental variables. You can define these in a global `ENV`
|
@@ -207,6 +207,19 @@ function consoleMethod(name) {
|
|
207
207
|
}
|
208
208
|
}
|
209
209
|
|
210
|
+
function assertPolyfill(test, message) {
|
211
|
+
if (!test) {
|
212
|
+
try {
|
213
|
+
// attempt to preserve the stack
|
214
|
+
throw new Error("assertion failed: " + message);
|
215
|
+
} catch(error) {
|
216
|
+
setTimeout(function(){
|
217
|
+
throw error;
|
218
|
+
}, 0);
|
219
|
+
}
|
220
|
+
}
|
221
|
+
}
|
222
|
+
|
210
223
|
/**
|
211
224
|
Inside Ember-Metal, simply uses the methods from `imports.console`.
|
212
225
|
Override this to provide more robust logging functionality.
|
@@ -219,7 +232,8 @@ Ember.Logger = {
|
|
219
232
|
warn: consoleMethod('warn') || Ember.K,
|
220
233
|
error: consoleMethod('error') || Ember.K,
|
221
234
|
info: consoleMethod('info') || Ember.K,
|
222
|
-
debug: consoleMethod('debug') || consoleMethod('info') || Ember.K
|
235
|
+
debug: consoleMethod('debug') || consoleMethod('info') || Ember.K,
|
236
|
+
assert: consoleMethod('assert') || assertPolyfill
|
223
237
|
};
|
224
238
|
|
225
239
|
|
@@ -1488,6 +1502,7 @@ get = function get(obj, keyName) {
|
|
1488
1502
|
}
|
1489
1503
|
|
1490
1504
|
|
1505
|
+
|
1491
1506
|
if (obj === null || keyName.indexOf('.') !== -1) {
|
1492
1507
|
return getPath(obj, keyName);
|
1493
1508
|
}
|
@@ -1518,12 +1533,21 @@ if (Ember.config.overrideAccessors) {
|
|
1518
1533
|
get = Ember.get;
|
1519
1534
|
}
|
1520
1535
|
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1536
|
+
/**
|
1537
|
+
@private
|
1538
|
+
|
1539
|
+
Normalizes a target/path pair to reflect that actual target/path that should
|
1540
|
+
be observed, etc. This takes into account passing in global property
|
1541
|
+
paths (i.e. a path beginning with a captial letter not defined on the
|
1542
|
+
target) and * separators.
|
1524
1543
|
|
1525
|
-
|
1526
|
-
|
1544
|
+
@method normalizeTuple
|
1545
|
+
@for Ember
|
1546
|
+
@param {Object} target The current target. May be `null`.
|
1547
|
+
@param {String} path A path on the target or a global property path.
|
1548
|
+
@return {Array} a temporary array with the normalized target/path pair.
|
1549
|
+
*/
|
1550
|
+
var normalizeTuple = Ember.normalizeTuple = function(target, path) {
|
1527
1551
|
var hasThis = HAS_THIS.test(path),
|
1528
1552
|
isGlobal = !hasThis && IS_GLOBAL_PATH.test(path),
|
1529
1553
|
key;
|
@@ -1532,7 +1556,7 @@ function normalizeTuple(target, path) {
|
|
1532
1556
|
if (hasThis) path = path.slice(5);
|
1533
1557
|
|
1534
1558
|
if (target === Ember.lookup) {
|
1535
|
-
key =
|
1559
|
+
key = path.match(FIRST_KEY)[0];
|
1536
1560
|
target = get(target, key);
|
1537
1561
|
path = path.slice(key.length+1);
|
1538
1562
|
}
|
@@ -1541,7 +1565,7 @@ function normalizeTuple(target, path) {
|
|
1541
1565
|
if (!path || path.length===0) throw new Error('Invalid Path');
|
1542
1566
|
|
1543
1567
|
return [ target, path ];
|
1544
|
-
}
|
1568
|
+
};
|
1545
1569
|
|
1546
1570
|
var getPath = Ember._getPath = function(root, path) {
|
1547
1571
|
var hasThis, parts, tuple, idx, len;
|
@@ -1570,24 +1594,6 @@ var getPath = Ember._getPath = function(root, path) {
|
|
1570
1594
|
return root;
|
1571
1595
|
};
|
1572
1596
|
|
1573
|
-
/**
|
1574
|
-
@private
|
1575
|
-
|
1576
|
-
Normalizes a target/path pair to reflect that actual target/path that should
|
1577
|
-
be observed, etc. This takes into account passing in global property
|
1578
|
-
paths (i.e. a path beginning with a captial letter not defined on the
|
1579
|
-
target) and * separators.
|
1580
|
-
|
1581
|
-
@method normalizeTuple
|
1582
|
-
@for Ember
|
1583
|
-
@param {Object} target The current target. May be `null`.
|
1584
|
-
@param {String} path A path on the target or a global property path.
|
1585
|
-
@return {Array} a temporary array with the normalized target/path pair.
|
1586
|
-
*/
|
1587
|
-
Ember.normalizeTuple = function(target, path) {
|
1588
|
-
return normalizeTuple(target, path);
|
1589
|
-
};
|
1590
|
-
|
1591
1597
|
Ember.getWithDefault = function(root, key, defaultValue) {
|
1592
1598
|
var value = get(root, key);
|
1593
1599
|
|
@@ -2307,6 +2313,7 @@ var set = function set(obj, keyName, value, tolerant) {
|
|
2307
2313
|
obj = null;
|
2308
2314
|
}
|
2309
2315
|
|
2316
|
+
|
2310
2317
|
if (!obj || keyName.indexOf('.') !== -1) {
|
2311
2318
|
return setPath(obj, keyName, value, tolerant);
|
2312
2319
|
}
|
@@ -2957,9 +2964,9 @@ var changeProperties = Ember.changeProperties,
|
|
2957
2964
|
observers will be buffered.
|
2958
2965
|
|
2959
2966
|
@method setProperties
|
2960
|
-
@param
|
2961
|
-
@param {
|
2962
|
-
@return
|
2967
|
+
@param self
|
2968
|
+
@param {Object} hash
|
2969
|
+
@return self
|
2963
2970
|
*/
|
2964
2971
|
Ember.setProperties = function(self, hash) {
|
2965
2972
|
changeProperties(function(){
|
@@ -4598,7 +4605,7 @@ define("backburner",
|
|
4598
4605
|
},
|
4599
4606
|
|
4600
4607
|
cancel: function(timer) {
|
4601
|
-
if (typeof timer === 'object' && timer.queue && timer.method) { // we're cancelling a deferOnce
|
4608
|
+
if (timer && typeof timer === 'object' && timer.queue && timer.method) { // we're cancelling a deferOnce
|
4602
4609
|
return timer.queue.cancel(timer);
|
4603
4610
|
} else if (typeof timer === 'function') { // we're cancelling a setTimeout
|
4604
4611
|
for (var i = 0, l = timers.length; i < l; i += 2) {
|
@@ -4607,6 +4614,8 @@ define("backburner",
|
|
4607
4614
|
return true;
|
4608
4615
|
}
|
4609
4616
|
}
|
4617
|
+
} else {
|
4618
|
+
return; // timer was null or not a timer
|
4610
4619
|
}
|
4611
4620
|
}
|
4612
4621
|
};
|
@@ -4699,7 +4708,7 @@ define("backburner/deferred_action_queues",
|
|
4699
4708
|
while (queueNameIndex < numberOfQueues) {
|
4700
4709
|
queueName = queueNames[queueNameIndex];
|
4701
4710
|
queue = queues[queueName];
|
4702
|
-
queueItems = queue._queue.slice();
|
4711
|
+
queueItems = queue._queueBeingFlushed = queue._queue.slice();
|
4703
4712
|
queue._queue = [];
|
4704
4713
|
|
4705
4714
|
var options = queue.options,
|
@@ -4717,15 +4726,19 @@ define("backburner/deferred_action_queues",
|
|
4717
4726
|
|
4718
4727
|
if (typeof method === 'string') { method = target[method]; }
|
4719
4728
|
|
4720
|
-
//
|
4721
|
-
if (
|
4722
|
-
|
4723
|
-
|
4724
|
-
|
4729
|
+
// method could have been nullified / canceled during flush
|
4730
|
+
if (method) {
|
4731
|
+
// TODO: error handling
|
4732
|
+
if (args && args.length > 0) {
|
4733
|
+
method.apply(target, args);
|
4734
|
+
} else {
|
4735
|
+
method.call(target);
|
4736
|
+
}
|
4725
4737
|
}
|
4726
4738
|
|
4727
4739
|
queueIndex += 4;
|
4728
4740
|
}
|
4741
|
+
queue._queueBeingFlushed = null;
|
4729
4742
|
if (numberOfQueueItems && after) { after(); }
|
4730
4743
|
|
4731
4744
|
if ((priorQueueNameIndex = indexOfPriorQueueWithActions(this, queueNameIndex)) !== -1) {
|
@@ -4750,6 +4763,7 @@ define("backburner/deferred_action_queues",
|
|
4750
4763
|
return -1;
|
4751
4764
|
}
|
4752
4765
|
|
4766
|
+
|
4753
4767
|
__exports__.DeferredActionQueues = DeferredActionQueues;
|
4754
4768
|
});
|
4755
4769
|
|
@@ -4839,12 +4853,30 @@ define("backburner/queue",
|
|
4839
4853
|
return true;
|
4840
4854
|
}
|
4841
4855
|
}
|
4856
|
+
|
4857
|
+
// if not found in current queue
|
4858
|
+
// could be in the queue that is being flushed
|
4859
|
+
queue = this._queueBeingFlushed;
|
4860
|
+
if (!queue) {
|
4861
|
+
return;
|
4862
|
+
}
|
4863
|
+
for (i = 0, l = queue.length; i < l; i += 4) {
|
4864
|
+
currentTarget = queue[i];
|
4865
|
+
currentMethod = queue[i+1];
|
4866
|
+
|
4867
|
+
if (currentTarget === actionToCancel.target && currentMethod === actionToCancel.method) {
|
4868
|
+
// don't mess with array during flush
|
4869
|
+
// just nullify the method
|
4870
|
+
queue[i+1] = null;
|
4871
|
+
return true;
|
4872
|
+
}
|
4873
|
+
}
|
4842
4874
|
}
|
4843
4875
|
};
|
4844
4876
|
|
4877
|
+
|
4845
4878
|
__exports__.Queue = Queue;
|
4846
4879
|
});
|
4847
|
-
|
4848
4880
|
})();
|
4849
4881
|
|
4850
4882
|
|
@@ -4952,7 +4984,7 @@ Ember.run = function(target, method) {
|
|
4952
4984
|
May be a function or a string. If you pass a string
|
4953
4985
|
then it will be looked up on the passed target.
|
4954
4986
|
@param {Object} [args*] Any additional arguments you wish to pass to the method.
|
4955
|
-
@return {Object} return value from invoking the passed function. Please note,
|
4987
|
+
@return {Object} return value from invoking the passed function. Please note,
|
4956
4988
|
when called within an existing loop, no return value is possible.
|
4957
4989
|
*/
|
4958
4990
|
Ember.run.join = function(target, method) {
|
@@ -5088,7 +5120,9 @@ Ember.run.cancelTimers = function () {
|
|
5088
5120
|
@return {void}
|
5089
5121
|
*/
|
5090
5122
|
Ember.run.sync = function() {
|
5091
|
-
backburner.currentInstance
|
5123
|
+
if (backburner.currentInstance) {
|
5124
|
+
backburner.currentInstance.queues.sync.flush();
|
5125
|
+
}
|
5092
5126
|
};
|
5093
5127
|
|
5094
5128
|
/**
|
@@ -5281,6 +5315,38 @@ Ember.run.cancel = function(timer) {
|
|
5281
5315
|
return backburner.cancel(timer);
|
5282
5316
|
};
|
5283
5317
|
|
5318
|
+
/**
|
5319
|
+
Execute the passed method in a specified amount of time, reset timer
|
5320
|
+
upon additional calls.
|
5321
|
+
|
5322
|
+
```javascript
|
5323
|
+
var myFunc = function() { console.log(this.name + ' ran.'); };
|
5324
|
+
var myContext = {name: 'debounce'};
|
5325
|
+
|
5326
|
+
Ember.run.debounce(myContext, myFunc, 150);
|
5327
|
+
|
5328
|
+
// less than 150ms passes
|
5329
|
+
|
5330
|
+
Ember.run.debounce(myContext, myFunc, 150);
|
5331
|
+
|
5332
|
+
// 150ms passes
|
5333
|
+
// myFunc is invoked with context myContext
|
5334
|
+
// console logs 'debounce ran.' one time.
|
5335
|
+
```
|
5336
|
+
|
5337
|
+
@method debounce
|
5338
|
+
@param {Object} [target] target of method to invoke
|
5339
|
+
@param {Function|String} method The method to invoke.
|
5340
|
+
May be a function or a string. If you pass a string
|
5341
|
+
then it will be looked up on the passed target.
|
5342
|
+
@param {Object} [args*] Optional arguments to pass to the timeout.
|
5343
|
+
@param {Number} wait Number of milliseconds to wait.
|
5344
|
+
@return {void}
|
5345
|
+
*/
|
5346
|
+
Ember.run.debounce = function() {
|
5347
|
+
return backburner.debounce.apply(backburner, arguments);
|
5348
|
+
};
|
5349
|
+
|
5284
5350
|
// Make sure it's not an autorun during testing
|
5285
5351
|
function checkAutoRun() {
|
5286
5352
|
if (!Ember.run.currentRunLoop) {
|
@@ -7070,6 +7136,8 @@ define("rsvp",
|
|
7070
7136
|
__exports__.reject = reject;
|
7071
7137
|
});
|
7072
7138
|
|
7139
|
+
|
7140
|
+
|
7073
7141
|
})();
|
7074
7142
|
|
7075
7143
|
(function() {
|
@@ -7194,6 +7262,10 @@ define("container",
|
|
7194
7262
|
return value;
|
7195
7263
|
},
|
7196
7264
|
|
7265
|
+
lookupFactory: function(fullName) {
|
7266
|
+
return factoryFor(this, fullName);
|
7267
|
+
},
|
7268
|
+
|
7197
7269
|
has: function(fullName) {
|
7198
7270
|
if (this.cache.has(fullName)) {
|
7199
7271
|
return true;
|
@@ -7913,8 +7985,8 @@ Ember.String = {
|
|
7913
7985
|
```
|
7914
7986
|
|
7915
7987
|
@method capitalize
|
7916
|
-
@param {String} str
|
7917
|
-
@return {String}
|
7988
|
+
@param {String} str The string to capitalize.
|
7989
|
+
@return {String} The capitalized string.
|
7918
7990
|
*/
|
7919
7991
|
capitalize: function(str) {
|
7920
7992
|
return str.charAt(0).toUpperCase() + str.substr(1);
|
@@ -9287,15 +9359,15 @@ Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.protot
|
|
9287
9359
|
Adds an array observer to the receiving array. The array observer object
|
9288
9360
|
normally must implement two methods:
|
9289
9361
|
|
9290
|
-
* `arrayWillChange(start, removeCount, addCount)` - This method will be
|
9362
|
+
* `arrayWillChange(observedObj, start, removeCount, addCount)` - This method will be
|
9291
9363
|
called just before the array is modified.
|
9292
|
-
* `arrayDidChange(start, removeCount, addCount)` - This method will be
|
9364
|
+
* `arrayDidChange(observedObj, start, removeCount, addCount)` - This method will be
|
9293
9365
|
called just after the array is modified.
|
9294
9366
|
|
9295
|
-
Both callbacks will be passed the starting index of the
|
9296
|
-
a count of the items to be removed and added. You can use
|
9297
|
-
to optionally inspect the array during the change, clear
|
9298
|
-
any other bookkeeping necessary.
|
9367
|
+
Both callbacks will be passed the observed object, starting index of the
|
9368
|
+
change as well a a count of the items to be removed and added. You can use
|
9369
|
+
these callbacks to optionally inspect the array during the change, clear
|
9370
|
+
caches, or do any other bookkeeping necessary.
|
9299
9371
|
|
9300
9372
|
In addition to passing a target, you can also include an options hash
|
9301
9373
|
which you can use to override the method names that will be invoked on the
|
@@ -13298,16 +13370,39 @@ Ember.SortableMixin = Ember.Mixin.create(Ember.MutableEnumerable, {
|
|
13298
13370
|
@property {Boolean} sortAscending
|
13299
13371
|
*/
|
13300
13372
|
sortAscending: true,
|
13373
|
+
|
13374
|
+
/**
|
13375
|
+
The function used to compare two values. You can override this if you
|
13376
|
+
want to do custom comparisons.Functions must be of the type expected by
|
13377
|
+
Array#sort, i.e.
|
13378
|
+
return 0 if the two parameters are equal,
|
13379
|
+
return a negative value if the first parameter is smaller than the second or
|
13380
|
+
return a positive value otherwise:
|
13301
13381
|
|
13382
|
+
```javascript
|
13383
|
+
function(x,y){ // These are assumed to be integers
|
13384
|
+
if(x === y)
|
13385
|
+
return 0;
|
13386
|
+
return x < y ? -1 : 1;
|
13387
|
+
}
|
13388
|
+
```
|
13389
|
+
|
13390
|
+
@property sortFunction
|
13391
|
+
@type {Function}
|
13392
|
+
@default Ember.compare
|
13393
|
+
*/
|
13394
|
+
sortFunction: Ember.compare,
|
13395
|
+
|
13302
13396
|
orderBy: function(item1, item2) {
|
13303
13397
|
var result = 0,
|
13304
13398
|
sortProperties = get(this, 'sortProperties'),
|
13305
|
-
sortAscending = get(this, 'sortAscending')
|
13399
|
+
sortAscending = get(this, 'sortAscending'),
|
13400
|
+
sortFunction = get(this, 'sortFunction');
|
13306
13401
|
|
13307
13402
|
|
13308
13403
|
forEach(sortProperties, function(propertyName) {
|
13309
13404
|
if (result === 0) {
|
13310
|
-
result =
|
13405
|
+
result = sortFunction(get(item1, propertyName), get(item2, propertyName));
|
13311
13406
|
if ((result !== 0) && !sortAscending) {
|
13312
13407
|
result = (-1) * result;
|
13313
13408
|
}
|
@@ -13947,45 +14042,6 @@ ClassSet.prototype = {
|
|
13947
14042
|
}
|
13948
14043
|
};
|
13949
14044
|
|
13950
|
-
var BAD_TAG_NAME_TEST_REGEXP = /[^a-zA-Z\-]/;
|
13951
|
-
var BAD_TAG_NAME_REPLACE_REGEXP = /[^a-zA-Z\-]/g;
|
13952
|
-
|
13953
|
-
function stripTagName(tagName) {
|
13954
|
-
if (!tagName) {
|
13955
|
-
return tagName;
|
13956
|
-
}
|
13957
|
-
|
13958
|
-
if (!BAD_TAG_NAME_TEST_REGEXP.test(tagName)) {
|
13959
|
-
return tagName;
|
13960
|
-
}
|
13961
|
-
|
13962
|
-
return tagName.replace(BAD_TAG_NAME_REPLACE_REGEXP, '');
|
13963
|
-
}
|
13964
|
-
|
13965
|
-
var BAD_CHARS_REGEXP = /&(?!\w+;)|[<>"'`]/g;
|
13966
|
-
var POSSIBLE_CHARS_REGEXP = /[&<>"'`]/;
|
13967
|
-
|
13968
|
-
function escapeAttribute(value) {
|
13969
|
-
// Stolen shamelessly from Handlebars
|
13970
|
-
|
13971
|
-
var escape = {
|
13972
|
-
"<": "<",
|
13973
|
-
">": ">",
|
13974
|
-
'"': """,
|
13975
|
-
"'": "'",
|
13976
|
-
"`": "`"
|
13977
|
-
};
|
13978
|
-
|
13979
|
-
var escapeChar = function(chr) {
|
13980
|
-
return escape[chr] || "&";
|
13981
|
-
};
|
13982
|
-
|
13983
|
-
var string = value.toString();
|
13984
|
-
|
13985
|
-
if(!POSSIBLE_CHARS_REGEXP.test(string)) { return string; }
|
13986
|
-
return string.replace(BAD_CHARS_REGEXP, escapeChar);
|
13987
|
-
}
|
13988
|
-
|
13989
14045
|
/**
|
13990
14046
|
`Ember.RenderBuffer` gathers information regarding the a view and generates the
|
13991
14047
|
final representation. `Ember.RenderBuffer` will generate HTML which can be pushed
|
@@ -14273,14 +14329,14 @@ Ember._RenderBuffer.prototype =
|
|
14273
14329
|
style = this.elementStyle,
|
14274
14330
|
attr, prop;
|
14275
14331
|
|
14276
|
-
buffer += '<' +
|
14332
|
+
buffer += '<' + tagName;
|
14277
14333
|
|
14278
14334
|
if (id) {
|
14279
|
-
buffer += ' id="' +
|
14335
|
+
buffer += ' id="' + this._escapeAttribute(id) + '"';
|
14280
14336
|
this.elementId = null;
|
14281
14337
|
}
|
14282
14338
|
if (classes) {
|
14283
|
-
buffer += ' class="' +
|
14339
|
+
buffer += ' class="' + this._escapeAttribute(classes.join(' ')) + '"';
|
14284
14340
|
this.classes = null;
|
14285
14341
|
}
|
14286
14342
|
|
@@ -14289,7 +14345,7 @@ Ember._RenderBuffer.prototype =
|
|
14289
14345
|
|
14290
14346
|
for (prop in style) {
|
14291
14347
|
if (style.hasOwnProperty(prop)) {
|
14292
|
-
buffer += prop + ':' +
|
14348
|
+
buffer += prop + ':' + this._escapeAttribute(style[prop]) + ';';
|
14293
14349
|
}
|
14294
14350
|
}
|
14295
14351
|
|
@@ -14301,7 +14357,7 @@ Ember._RenderBuffer.prototype =
|
|
14301
14357
|
if (attrs) {
|
14302
14358
|
for (attr in attrs) {
|
14303
14359
|
if (attrs.hasOwnProperty(attr)) {
|
14304
|
-
buffer += ' ' + attr + '="' +
|
14360
|
+
buffer += ' ' + attr + '="' + this._escapeAttribute(attrs[attr]) + '"';
|
14305
14361
|
}
|
14306
14362
|
}
|
14307
14363
|
|
@@ -14316,7 +14372,7 @@ Ember._RenderBuffer.prototype =
|
|
14316
14372
|
if (value === true) {
|
14317
14373
|
buffer += ' ' + prop + '="' + prop + '"';
|
14318
14374
|
} else {
|
14319
|
-
buffer += ' ' + prop + '="' +
|
14375
|
+
buffer += ' ' + prop + '="' + this._escapeAttribute(props[prop]) + '"';
|
14320
14376
|
}
|
14321
14377
|
}
|
14322
14378
|
}
|
@@ -14331,7 +14387,7 @@ Ember._RenderBuffer.prototype =
|
|
14331
14387
|
|
14332
14388
|
pushClosingTag: function() {
|
14333
14389
|
var tagName = this.tagNames.pop();
|
14334
|
-
if (tagName) { this.buffer += '</' +
|
14390
|
+
if (tagName) { this.buffer += '</' + tagName + '>'; }
|
14335
14391
|
},
|
14336
14392
|
|
14337
14393
|
currentTagName: function() {
|
@@ -14429,7 +14485,32 @@ Ember._RenderBuffer.prototype =
|
|
14429
14485
|
|
14430
14486
|
innerString: function() {
|
14431
14487
|
return this.buffer;
|
14488
|
+
},
|
14489
|
+
|
14490
|
+
_escapeAttribute: function(value) {
|
14491
|
+
// Stolen shamelessly from Handlebars
|
14492
|
+
|
14493
|
+
var escape = {
|
14494
|
+
"<": "<",
|
14495
|
+
">": ">",
|
14496
|
+
'"': """,
|
14497
|
+
"'": "'",
|
14498
|
+
"`": "`"
|
14499
|
+
};
|
14500
|
+
|
14501
|
+
var badChars = /&(?!\w+;)|[<>"'`]/g;
|
14502
|
+
var possible = /[&<>"'`]/;
|
14503
|
+
|
14504
|
+
var escapeChar = function(chr) {
|
14505
|
+
return escape[chr] || "&";
|
14506
|
+
};
|
14507
|
+
|
14508
|
+
var string = value.toString();
|
14509
|
+
|
14510
|
+
if(!possible.test(string)) { return string; }
|
14511
|
+
return string.replace(badChars, escapeChar);
|
14432
14512
|
}
|
14513
|
+
|
14433
14514
|
};
|
14434
14515
|
|
14435
14516
|
})();
|
@@ -14457,6 +14538,47 @@ var get = Ember.get, set = Ember.set, fmt = Ember.String.fmt;
|
|
14457
14538
|
*/
|
14458
14539
|
Ember.EventDispatcher = Ember.Object.extend(/** @scope Ember.EventDispatcher.prototype */{
|
14459
14540
|
|
14541
|
+
/**
|
14542
|
+
The set of events names (and associated handler function names) to be setup
|
14543
|
+
and dispatched by the `EventDispatcher`. Custom events can added to this list at setup
|
14544
|
+
time, generally via the `Ember.Application.customEvents` hash. Only override this
|
14545
|
+
default set to prevent the EventDispatcher from listening on some events all together.
|
14546
|
+
|
14547
|
+
This set will be modified by `setup` to also include any events added at that time.
|
14548
|
+
|
14549
|
+
@property events
|
14550
|
+
@type Object
|
14551
|
+
*/
|
14552
|
+
events: {
|
14553
|
+
touchstart : 'touchStart',
|
14554
|
+
touchmove : 'touchMove',
|
14555
|
+
touchend : 'touchEnd',
|
14556
|
+
touchcancel : 'touchCancel',
|
14557
|
+
keydown : 'keyDown',
|
14558
|
+
keyup : 'keyUp',
|
14559
|
+
keypress : 'keyPress',
|
14560
|
+
mousedown : 'mouseDown',
|
14561
|
+
mouseup : 'mouseUp',
|
14562
|
+
contextmenu : 'contextMenu',
|
14563
|
+
click : 'click',
|
14564
|
+
dblclick : 'doubleClick',
|
14565
|
+
mousemove : 'mouseMove',
|
14566
|
+
focusin : 'focusIn',
|
14567
|
+
focusout : 'focusOut',
|
14568
|
+
mouseenter : 'mouseEnter',
|
14569
|
+
mouseleave : 'mouseLeave',
|
14570
|
+
submit : 'submit',
|
14571
|
+
input : 'input',
|
14572
|
+
change : 'change',
|
14573
|
+
dragstart : 'dragStart',
|
14574
|
+
drag : 'drag',
|
14575
|
+
dragenter : 'dragEnter',
|
14576
|
+
dragleave : 'dragLeave',
|
14577
|
+
dragover : 'dragOver',
|
14578
|
+
drop : 'drop',
|
14579
|
+
dragend : 'dragEnd'
|
14580
|
+
},
|
14581
|
+
|
14460
14582
|
/**
|
14461
14583
|
@private
|
14462
14584
|
|
@@ -14488,35 +14610,7 @@ Ember.EventDispatcher = Ember.Object.extend(/** @scope Ember.EventDispatcher.pro
|
|
14488
14610
|
@param addedEvents {Hash}
|
14489
14611
|
*/
|
14490
14612
|
setup: function(addedEvents, rootElement) {
|
14491
|
-
var event, events =
|
14492
|
-
touchstart : 'touchStart',
|
14493
|
-
touchmove : 'touchMove',
|
14494
|
-
touchend : 'touchEnd',
|
14495
|
-
touchcancel : 'touchCancel',
|
14496
|
-
keydown : 'keyDown',
|
14497
|
-
keyup : 'keyUp',
|
14498
|
-
keypress : 'keyPress',
|
14499
|
-
mousedown : 'mouseDown',
|
14500
|
-
mouseup : 'mouseUp',
|
14501
|
-
contextmenu : 'contextMenu',
|
14502
|
-
click : 'click',
|
14503
|
-
dblclick : 'doubleClick',
|
14504
|
-
mousemove : 'mouseMove',
|
14505
|
-
focusin : 'focusIn',
|
14506
|
-
focusout : 'focusOut',
|
14507
|
-
mouseenter : 'mouseEnter',
|
14508
|
-
mouseleave : 'mouseLeave',
|
14509
|
-
submit : 'submit',
|
14510
|
-
input : 'input',
|
14511
|
-
change : 'change',
|
14512
|
-
dragstart : 'dragStart',
|
14513
|
-
drag : 'drag',
|
14514
|
-
dragenter : 'dragEnter',
|
14515
|
-
dragleave : 'dragLeave',
|
14516
|
-
dragover : 'dragOver',
|
14517
|
-
drop : 'drop',
|
14518
|
-
dragend : 'dragEnd'
|
14519
|
-
};
|
14613
|
+
var event, events = get(this, 'events');
|
14520
14614
|
|
14521
14615
|
Ember.$.extend(events, addedEvents || {});
|
14522
14616
|
|
@@ -14760,6 +14854,15 @@ var childViewsProperty = Ember.computed(function() {
|
|
14760
14854
|
*/
|
14761
14855
|
Ember.TEMPLATES = {};
|
14762
14856
|
|
14857
|
+
/**
|
14858
|
+
`Ember.CoreView` is
|
14859
|
+
|
14860
|
+
@class CoreView
|
14861
|
+
@namespace Ember
|
14862
|
+
@extends Ember.Object
|
14863
|
+
@uses Ember.Evented
|
14864
|
+
*/
|
14865
|
+
|
14763
14866
|
Ember.CoreView = Ember.Object.extend(Ember.Evented, {
|
14764
14867
|
isView: true,
|
14765
14868
|
|
@@ -15463,8 +15566,10 @@ class:
|
|
15463
15566
|
|
15464
15567
|
### Event Names
|
15465
15568
|
|
15466
|
-
|
15467
|
-
are
|
15569
|
+
All of the event handling approaches described above respond to the same set
|
15570
|
+
of events. The names of the built-in events are listed below. (The hash of
|
15571
|
+
built-in events exists in `Ember.EventDispatcher`.) Additional, custom events
|
15572
|
+
can be registered by using `Ember.Application.customEvents`.
|
15468
15573
|
|
15469
15574
|
Touch events:
|
15470
15575
|
|
@@ -15517,8 +15622,7 @@ class:
|
|
15517
15622
|
|
15518
15623
|
@class View
|
15519
15624
|
@namespace Ember
|
15520
|
-
@extends Ember.
|
15521
|
-
@uses Ember.Evented
|
15625
|
+
@extends Ember.CoreView
|
15522
15626
|
*/
|
15523
15627
|
Ember.View = Ember.CoreView.extend(
|
15524
15628
|
/** @scope Ember.View.prototype */ {
|
@@ -15697,7 +15801,7 @@ Ember.View = Ember.CoreView.extend(
|
|
15697
15801
|
If a value that affects template rendering changes, the view should be
|
15698
15802
|
re-rendered to reflect the new value.
|
15699
15803
|
|
15700
|
-
@method
|
15804
|
+
@method _contextDidChange
|
15701
15805
|
*/
|
15702
15806
|
_contextDidChange: Ember.observer(function() {
|
15703
15807
|
this.rerender();
|
@@ -15827,6 +15931,8 @@ Ember.View = Ember.CoreView.extend(
|
|
15827
15931
|
_parentViewDidChange: Ember.observer(function() {
|
15828
15932
|
if (this.isDestroying) { return; }
|
15829
15933
|
|
15934
|
+
this.trigger('parentViewDidChange');
|
15935
|
+
|
15830
15936
|
if (get(this, 'parentView.controller') && !get(this, 'controller')) {
|
15831
15937
|
this.notifyPropertyChange('controller');
|
15832
15938
|
}
|
@@ -16097,9 +16203,9 @@ Ember.View = Ember.CoreView.extend(
|
|
16097
16203
|
For example, calling `view.$('li')` will return a jQuery object containing
|
16098
16204
|
all of the `li` elements inside the DOM element of this view.
|
16099
16205
|
|
16100
|
-
@
|
16206
|
+
@method $
|
16101
16207
|
@param {String} [selector] a jQuery-compatible selector string
|
16102
|
-
@return {jQuery} the
|
16208
|
+
@return {jQuery} the jQuery object for the DOM node
|
16103
16209
|
*/
|
16104
16210
|
$: function(sel) {
|
16105
16211
|
return this.currentState.$(this, sel);
|
@@ -16778,31 +16884,32 @@ Ember.View = Ember.CoreView.extend(
|
|
16778
16884
|
@return {Ember.View} new instance
|
16779
16885
|
*/
|
16780
16886
|
createChildView: function(view, attrs) {
|
16781
|
-
if (view.isView && view._parentView === this
|
16887
|
+
if (view.isView && view._parentView === this && view.container === this.container) {
|
16888
|
+
return view;
|
16889
|
+
}
|
16890
|
+
|
16891
|
+
attrs = attrs || {};
|
16892
|
+
attrs._parentView = this;
|
16893
|
+
attrs.container = this.container;
|
16782
16894
|
|
16783
16895
|
if (Ember.CoreView.detect(view)) {
|
16784
|
-
attrs = attrs || {};
|
16785
|
-
attrs._parentView = this;
|
16786
|
-
attrs.container = this.container;
|
16787
16896
|
attrs.templateData = attrs.templateData || get(this, 'templateData');
|
16788
16897
|
|
16789
16898
|
view = view.create(attrs);
|
16790
16899
|
|
16791
16900
|
// don't set the property on a virtual view, as they are invisible to
|
16792
16901
|
// consumers of the view API
|
16793
|
-
if (view.viewName) {
|
16902
|
+
if (view.viewName) {
|
16903
|
+
set(get(this, 'concreteView'), view.viewName, view);
|
16904
|
+
}
|
16794
16905
|
} else {
|
16795
16906
|
|
16796
16907
|
|
16797
|
-
|
16798
|
-
view.setProperties(attrs);
|
16799
|
-
}
|
16908
|
+
Ember.setProperties(view, attrs);
|
16800
16909
|
|
16801
16910
|
if (!get(view, 'templateData')) {
|
16802
16911
|
set(view, 'templateData', get(this, 'templateData'));
|
16803
16912
|
}
|
16804
|
-
|
16805
|
-
set(view, '_parentView', this);
|
16806
16913
|
}
|
16807
16914
|
|
16808
16915
|
return view;
|
@@ -17149,8 +17256,8 @@ Ember.View.applyAttributeBindings = function(elem, name, value) {
|
|
17149
17256
|
elem.attr(name, value);
|
17150
17257
|
}
|
17151
17258
|
} else if (name === 'value' || type === 'boolean') {
|
17152
|
-
// We can't set properties to undefined
|
17153
|
-
if (value
|
17259
|
+
// We can't set properties to undefined or null
|
17260
|
+
if (!value) { value = ''; }
|
17154
17261
|
|
17155
17262
|
if (value !== elem.prop(name)) {
|
17156
17263
|
// value and booleans should always be properties
|
@@ -17850,6 +17957,7 @@ Ember.ContainerView = Ember.View.extend(Ember.MutableArray, {
|
|
17850
17957
|
initializeViews: function(views, parentView, templateData) {
|
17851
17958
|
forEach(views, function(view) {
|
17852
17959
|
set(view, '_parentView', parentView);
|
17960
|
+
set(view, 'container', parentView && parentView.container);
|
17853
17961
|
|
17854
17962
|
if (!get(view, 'templateData')) {
|
17855
17963
|
set(view, 'templateData', templateData);
|
@@ -18314,6 +18422,103 @@ Ember.CollectionView.CONTAINER_MAP = {
|
|
18314
18422
|
|
18315
18423
|
|
18316
18424
|
|
18425
|
+
(function() {
|
18426
|
+
/**
|
18427
|
+
@module ember
|
18428
|
+
@submodule ember-views
|
18429
|
+
*/
|
18430
|
+
|
18431
|
+
/**
|
18432
|
+
An `Ember.Component` is a view that is completely
|
18433
|
+
isolated. Property access in its templates go
|
18434
|
+
to the view object and actions are targeted at
|
18435
|
+
the view object. There is no access to the
|
18436
|
+
surrounding context or outer controller; all
|
18437
|
+
contextual information is passed in.
|
18438
|
+
|
18439
|
+
The easiest way to create an `Ember.Component` is via
|
18440
|
+
a template. If you name a template
|
18441
|
+
`controls/my-foo`, you will be able to use
|
18442
|
+
`{{my-foo}}` in other templates, which will make
|
18443
|
+
an instance of the isolated control.
|
18444
|
+
|
18445
|
+
```html
|
18446
|
+
{{app-profile person=currentUser}}
|
18447
|
+
```
|
18448
|
+
|
18449
|
+
```html
|
18450
|
+
<!-- app-profile template -->
|
18451
|
+
<h1>{{person.title}}</h1>
|
18452
|
+
<img {{bindAttr src=person.avatar}}>
|
18453
|
+
<p class='signature'>{{person.signature}}</p>
|
18454
|
+
```
|
18455
|
+
|
18456
|
+
You can also use `yield` inside a template to
|
18457
|
+
include the **contents** of the custom tag:
|
18458
|
+
|
18459
|
+
```html
|
18460
|
+
{{#my-profile person=currentUser}}
|
18461
|
+
<p>Admin mode</p>
|
18462
|
+
{{/my-profile}}
|
18463
|
+
```
|
18464
|
+
|
18465
|
+
```html
|
18466
|
+
<!-- app-profile template -->
|
18467
|
+
|
18468
|
+
<h1>{{person.title}}</h1>
|
18469
|
+
{{yield}} <!-- block contents -->
|
18470
|
+
```
|
18471
|
+
|
18472
|
+
If you want to customize the control, in order to
|
18473
|
+
handle events or actions, you implement a subclass
|
18474
|
+
of `Ember.Component` named after the name of the
|
18475
|
+
control.
|
18476
|
+
|
18477
|
+
For example, you could implement the action
|
18478
|
+
`hello` for the `app-profile` control:
|
18479
|
+
|
18480
|
+
```js
|
18481
|
+
App.AppProfileComponent = Ember.Component.extend({
|
18482
|
+
hello: function(name) {
|
18483
|
+
console.log("Hello", name)
|
18484
|
+
}
|
18485
|
+
});
|
18486
|
+
```
|
18487
|
+
|
18488
|
+
And then use it in the control's template:
|
18489
|
+
|
18490
|
+
```html
|
18491
|
+
<!-- app-profile template -->
|
18492
|
+
|
18493
|
+
<h1>{{person.title}}</h1>
|
18494
|
+
{{yield}} <!-- block contents -->
|
18495
|
+
|
18496
|
+
<button {{action 'hello' person.name}}>
|
18497
|
+
Say Hello to {{person.name}}
|
18498
|
+
</button>
|
18499
|
+
```
|
18500
|
+
|
18501
|
+
Components must have a `-` in their name to avoid
|
18502
|
+
conflicts with built-in controls that wrap HTML
|
18503
|
+
elements. This is consistent with the same
|
18504
|
+
requirement in web components.
|
18505
|
+
|
18506
|
+
@class Component
|
18507
|
+
@namespace Ember
|
18508
|
+
@extends Ember.View
|
18509
|
+
*/
|
18510
|
+
Ember.Component = Ember.View.extend({
|
18511
|
+
init: function() {
|
18512
|
+
this._super();
|
18513
|
+
this.set('context', this);
|
18514
|
+
this.set('controller', this);
|
18515
|
+
}
|
18516
|
+
});
|
18517
|
+
|
18518
|
+
})();
|
18519
|
+
|
18520
|
+
|
18521
|
+
|
18317
18522
|
(function() {
|
18318
18523
|
|
18319
18524
|
})();
|
@@ -18384,7 +18589,6 @@ Ember.ViewTargetActionSupport = Ember.Mixin.create(Ember.TargetActionSupport, {
|
|
18384
18589
|
|
18385
18590
|
|
18386
18591
|
(function() {
|
18387
|
-
/*globals jQuery*/
|
18388
18592
|
/**
|
18389
18593
|
Ember Views
|
18390
18594
|
|
@@ -18412,8 +18616,6 @@ var get = Ember.get, set = Ember.set;
|
|
18412
18616
|
*/
|
18413
18617
|
Ember.State = Ember.Object.extend(Ember.Evented,
|
18414
18618
|
/** @scope Ember.State.prototype */{
|
18415
|
-
isState: true,
|
18416
|
-
|
18417
18619
|
/**
|
18418
18620
|
A reference to the parent state.
|
18419
18621
|
|
@@ -18523,20 +18725,24 @@ Ember.State = Ember.Object.extend(Ember.Evented,
|
|
18523
18725
|
|
18524
18726
|
setupChild: function(states, name, value) {
|
18525
18727
|
if (!value) { return false; }
|
18728
|
+
var instance;
|
18526
18729
|
|
18527
|
-
if (value.
|
18730
|
+
if (value instanceof Ember.State) {
|
18528
18731
|
set(value, 'name', name);
|
18732
|
+
instance = value;
|
18733
|
+
instance.container = this.container;
|
18529
18734
|
} else if (Ember.State.detect(value)) {
|
18530
|
-
|
18531
|
-
name: name
|
18735
|
+
instance = value.create({
|
18736
|
+
name: name,
|
18737
|
+
container: this.container
|
18532
18738
|
});
|
18533
18739
|
}
|
18534
18740
|
|
18535
|
-
if (
|
18536
|
-
set(
|
18537
|
-
get(this, 'childStates').pushObject(
|
18538
|
-
states[name] =
|
18539
|
-
return
|
18741
|
+
if (instance instanceof Ember.State) {
|
18742
|
+
set(instance, 'parentState', this);
|
18743
|
+
get(this, 'childStates').pushObject(instance);
|
18744
|
+
states[name] = instance;
|
18745
|
+
return instance;
|
18540
18746
|
}
|
18541
18747
|
},
|
18542
18748
|
|
@@ -20170,7 +20376,71 @@ function makeBindings(options) {
|
|
20170
20376
|
}
|
20171
20377
|
}
|
20172
20378
|
|
20379
|
+
/**
|
20380
|
+
Register a bound helper or custom view helper.
|
20381
|
+
|
20382
|
+
## Simple bound helper example
|
20383
|
+
|
20384
|
+
```javascript
|
20385
|
+
Ember.Handlebars.helper('capitalize', function(value) {
|
20386
|
+
return value.toUpperCase();
|
20387
|
+
});
|
20388
|
+
```
|
20389
|
+
|
20390
|
+
The above bound helper can be used inside of templates as follows:
|
20391
|
+
|
20392
|
+
```handlebars
|
20393
|
+
{{capitalize name}}
|
20394
|
+
```
|
20395
|
+
|
20396
|
+
In this case, when the `name` property of the template's context changes,
|
20397
|
+
the rendered value of the helper will update to reflect this change.
|
20398
|
+
|
20399
|
+
For more examples of bound helpers, see documentation for
|
20400
|
+
`Ember.Handlebars.registerBoundHelper`.
|
20401
|
+
|
20402
|
+
## Custom view helper example
|
20403
|
+
|
20404
|
+
Assuming a view subclass named `App.CalenderView` were defined, a helper
|
20405
|
+
for rendering instances of this view could be registered as follows:
|
20406
|
+
|
20407
|
+
```javascript
|
20408
|
+
Ember.Handlebars.helper('calendar', App.CalendarView):
|
20409
|
+
```
|
20410
|
+
|
20411
|
+
The above bound helper can be used inside of templates as follows:
|
20412
|
+
|
20413
|
+
```handlebars
|
20414
|
+
{{calendar}}
|
20415
|
+
```
|
20416
|
+
|
20417
|
+
Which is functionally equivalent to:
|
20418
|
+
|
20419
|
+
```handlebars
|
20420
|
+
{{view App.CalendarView}}
|
20421
|
+
```
|
20422
|
+
|
20423
|
+
Options in the helper will be passed to the view in exactly the same
|
20424
|
+
manner as with the `view` helper.
|
20425
|
+
|
20426
|
+
@method helper
|
20427
|
+
@for Ember.Handlebars
|
20428
|
+
@param {String} name
|
20429
|
+
@param {Function|Ember.View} function or view class constructor
|
20430
|
+
@param {String} dependentKeys*
|
20431
|
+
*/
|
20173
20432
|
Ember.Handlebars.helper = function(name, value) {
|
20433
|
+
if (Ember.Component.detect(value)) {
|
20434
|
+
|
20435
|
+
|
20436
|
+
var proto = value.proto();
|
20437
|
+
if (!proto.layoutName && !proto.templateName) {
|
20438
|
+
value.reopen({
|
20439
|
+
layoutName: 'components/' + name
|
20440
|
+
});
|
20441
|
+
}
|
20442
|
+
}
|
20443
|
+
|
20174
20444
|
if (Ember.View.detect(value)) {
|
20175
20445
|
Ember.Handlebars.registerHelper(name, function(options) {
|
20176
20446
|
|
@@ -20929,7 +21199,7 @@ Ember._MetamorphView = Ember.View.extend(Ember._Metamorph);
|
|
20929
21199
|
/**
|
20930
21200
|
@class _SimpleMetamorphView
|
20931
21201
|
@namespace Ember
|
20932
|
-
@extends Ember.
|
21202
|
+
@extends Ember.CoreView
|
20933
21203
|
@uses Ember._Metamorph
|
20934
21204
|
@private
|
20935
21205
|
*/
|
@@ -23735,7 +24005,6 @@ Ember.SelectOption = Ember.View.extend({
|
|
23735
24005
|
|
23736
24006
|
```html
|
23737
24007
|
<select class="ember-select">
|
23738
|
-
<option value>Please Select</option>
|
23739
24008
|
<option value="1">Yehuda</option>
|
23740
24009
|
<option value="2">Tom</option>
|
23741
24010
|
</select>
|
@@ -23768,7 +24037,6 @@ Ember.SelectOption = Ember.View.extend({
|
|
23768
24037
|
|
23769
24038
|
```html
|
23770
24039
|
<select class="ember-select">
|
23771
|
-
<option value>Please Select</option>
|
23772
24040
|
<option value="1">Yehuda</option>
|
23773
24041
|
<option value="2" selected="selected">Tom</option>
|
23774
24042
|
</select>
|
@@ -23806,7 +24074,6 @@ Ember.SelectOption = Ember.View.extend({
|
|
23806
24074
|
|
23807
24075
|
```html
|
23808
24076
|
<select class="ember-select">
|
23809
|
-
<option value>Please Select</option>
|
23810
24077
|
<option value="1">Yehuda</option>
|
23811
24078
|
<option value="2" selected="selected">Tom</option>
|
23812
24079
|
</select>
|
@@ -24074,8 +24341,8 @@ function program3(depth0,data) {
|
|
24074
24341
|
var selection = get(this, 'selection');
|
24075
24342
|
var value = get(this, 'value');
|
24076
24343
|
|
24077
|
-
if (selection) { this.selectionDidChange(); }
|
24078
|
-
if (value) { this.valueDidChange(); }
|
24344
|
+
if (!Ember.isNone(selection)) { this.selectionDidChange(); }
|
24345
|
+
if (!Ember.isNone(value)) { this.valueDidChange(); }
|
24079
24346
|
|
24080
24347
|
this._change();
|
24081
24348
|
},
|
@@ -24272,6 +24539,31 @@ function bootstrap() {
|
|
24272
24539
|
Ember.Handlebars.bootstrap( Ember.$(document) );
|
24273
24540
|
}
|
24274
24541
|
|
24542
|
+
function registerComponents(container) {
|
24543
|
+
var templates = Ember.TEMPLATES, match;
|
24544
|
+
if (!templates) { return; }
|
24545
|
+
|
24546
|
+
for (var prop in templates) {
|
24547
|
+
if (match = prop.match(/^components\/(.*)$/)) {
|
24548
|
+
registerComponent(container, match[1]);
|
24549
|
+
}
|
24550
|
+
}
|
24551
|
+
}
|
24552
|
+
|
24553
|
+
function registerComponent(container, name) {
|
24554
|
+
|
24555
|
+
|
24556
|
+
var className = name.replace(/-/g, '_');
|
24557
|
+
var Component = container.lookupFactory('component:' + className) || container.lookupFactory('component:' + name);
|
24558
|
+
var View = Component || Ember.Component.extend();
|
24559
|
+
|
24560
|
+
View.reopen({
|
24561
|
+
layoutName: 'components/' + name
|
24562
|
+
});
|
24563
|
+
|
24564
|
+
Ember.Handlebars.helper(name, View);
|
24565
|
+
}
|
24566
|
+
|
24275
24567
|
/*
|
24276
24568
|
We tie this to application.load to ensure that we've at least
|
24277
24569
|
attempted to bootstrap at the point that the application is loaded.
|
@@ -24283,7 +24575,23 @@ function bootstrap() {
|
|
24283
24575
|
from the DOM after processing.
|
24284
24576
|
*/
|
24285
24577
|
|
24286
|
-
Ember.onLoad('
|
24578
|
+
Ember.onLoad('Ember.Application', function(Application) {
|
24579
|
+
if (Application.initializer) {
|
24580
|
+
Application.initializer({
|
24581
|
+
name: 'domTemplates',
|
24582
|
+
initialize: bootstrap
|
24583
|
+
});
|
24584
|
+
|
24585
|
+
Application.initializer({
|
24586
|
+
name: 'registerComponents',
|
24587
|
+
after: 'domTemplates',
|
24588
|
+
initialize: registerComponents
|
24589
|
+
});
|
24590
|
+
} else {
|
24591
|
+
// for ember-old-router
|
24592
|
+
Ember.onLoad('application', bootstrap);
|
24593
|
+
}
|
24594
|
+
});
|
24287
24595
|
|
24288
24596
|
})();
|
24289
24597
|
|