diff --git a/ui/index.html b/ui/index.html index 2d750e9cbf..050b2ceb4e 100644 --- a/ui/index.html +++ b/ui/index.html @@ -3,7 +3,7 @@ - + Consul @@ -48,6 +48,28 @@ + + - - + + + + - - + + + diff --git a/ui/javascripts/app/controllers.js b/ui/javascripts/app/controllers.js index f77d43cba9..919fd8cead 100644 --- a/ui/javascripts/app/controllers.js +++ b/ui/javascripts/app/controllers.js @@ -1,3 +1,9 @@ +App.ApplicationController = Ember.ObjectController.extend({ + updateCurrentPath: function() { + App.set('currentPath', this.get('currentPath')); + }.observes('currentPath') +}); + App.DcController = Ember.Controller.extend({ // Whether or not the dropdown menu can be seen isDropdownVisible: false, @@ -45,6 +51,18 @@ App.DcController = Ember.Controller.extend({ }.property('nodes'), + // + // + // + checkStatus: function() { + if (this.get('hasFailingChecks') == true) { + return "failing"; + } else { + return "passing"; + } + + }.property('nodes'), + // // Boolean if the datacenter has any failing checks. // @@ -216,3 +234,54 @@ App.KvEditController = KvBaseController.extend({ } }); + +ItemBaseController = Ember.ArrayController.extend({ + needs: ["dc", "application"], + queryParams: ["filter", "status", "condensed"], + dc: Ember.computed.alias("controllers.dc"), + condensed: true, + filter: "", // default + status: "any status", // default + statuses: ["any status", "passing", "failing"], + + isShowingItem: function() { + var currentPath = this.get('controllers.application.currentPath'); + return (currentPath === "dc.nodes.show" || currentPath === "dc.services.show"); + }.property('controllers.application.currentPath'), + + filteredContent: function() { + var filter = this.get('filter'); + var status = this.get('status'); + + var items = this.get('items').filter(function(item, index, enumerable){ + return item.get('filterKey').toLowerCase().match(filter.toLowerCase()); + }); + + switch (status) { + case "passing": + return items.filterBy('hasFailingChecks', false) + break; + case "failing": + return items.filterBy('hasFailingChecks', true) + break; + default: + return items + } + + }.property('filter', 'status', 'items.@each'), + + actions: { + toggleCondensed: function() { + this.set('condensed', !this.get('condensed')) + } + } +}); + +App.NodesController = ItemBaseController.extend({ + items: Ember.computed.alias("nodes"), +}); + +App.ServicesController = ItemBaseController.extend({ + items: Ember.computed.alias("services"), +}); + diff --git a/ui/javascripts/app/helpers.js b/ui/javascripts/app/helpers.js index 19297d30a3..71abbb1920 100644 --- a/ui/javascripts/app/helpers.js +++ b/ui/javascripts/app/helpers.js @@ -8,3 +8,14 @@ Ember.Handlebars.helper('panelBar', function(status) { } return new Handlebars.SafeString('
'); }); + +Ember.Handlebars.helper('listBar', function(status) { + var highlightClass; + + if (status == "passing") { + highlightClass = "bg-green"; + } else { + highlightClass = "bg-orange"; + } + return new Handlebars.SafeString('
'); +}); diff --git a/ui/javascripts/app/models.js b/ui/javascripts/app/models.js index 60734f0c6b..4ecf38bbf3 100644 --- a/ui/javascripts/app/models.js +++ b/ui/javascripts/app/models.js @@ -13,8 +13,9 @@ App.Service = Ember.Object.extend({ // Otherwise, we need to filter the child checks by both failing // states } else { - return (checks.filterBy('Status', 'critical').get('length') + - checks.filterBy('Status', 'warning').get('length')) + var checks = this.get('Checks'); + return (checks.filterBy('Status', 'critical').get('length') + + checks.filterBy('Status', 'warning').get('length')) } }.property('Checks'), @@ -45,13 +46,25 @@ App.Service = Ember.Object.extend({ } }.property('Checks'), + nodes: function() { + return (this.get('Nodes')) + }.property('Nodes'), + // // Boolean of whether or not there are failing checks in the service. // This is used to set color backgrounds and so on. // hasFailingChecks: function() { return (this.get('failingChecks') > 0); - }.property('Checks') + }.property('Checks'), + + // + // Key used for filtering through an array of this model, i.e s + // searching + // + filterKey: function() { + return this.get('Name') + }.property('Name'), }); // @@ -93,7 +106,43 @@ App.Node = Ember.Object.extend({ // hasFailingChecks: function() { return (this.get('failingChecks') > 0); - }.property('Checks') + }.property('Checks'), + + // + // The number of services on the node + // + numServices: function() { + return (this.get('Services').length) + }.property('Services'), + // The number of services on the node + // + + services: function() { + return (this.get('Services')) + }.property('Services'), + + filterKey: function() { + return this.get('Node') + }.property('Node'), + + // + // Returns a combined and distinct list of the tags on the services + // running on the node + // + nodeTags: function() { + var tags = []; + + // Collect the services tags + this.get('Services').map(function(Service){ + tags.push(Service.Tags) + }) + + // strip nulls + tags = tags.filter(function(n){ return n != undefined }); + + // only keep unique tags and convert to comma sep + return tags.uniq().join(', ') + }.property('Services') }); diff --git a/ui/javascripts/app/router.js b/ui/javascripts/app/router.js index d86921915c..598858460f 100644 --- a/ui/javascripts/app/router.js +++ b/ui/javascripts/app/router.js @@ -1,5 +1,6 @@ window.App = Ember.Application.create({ - rootElement: "#app" + rootElement: "#app", + currentPath: '' }); diff --git a/ui/javascripts/app/routes.js b/ui/javascripts/app/routes.js index b0020b3968..220f8c99d9 100644 --- a/ui/javascripts/app/routes.js +++ b/ui/javascripts/app/routes.js @@ -3,6 +3,15 @@ // App.BaseRoute = Ember.Route.extend({ rootKey: '', + condensedView: false, + + // Don't record characters in browser history + // for the "search" query item (filter) + queryParams: { + filter: { + replace: true + } + }, getParentAndGrandparent: function(key) { var parentKey = this.rootKey, diff --git a/ui/javascripts/app/views.js b/ui/javascripts/app/views.js index bac819180f..6552fbc5de 100644 --- a/ui/javascripts/app/views.js +++ b/ui/javascripts/app/views.js @@ -14,6 +14,11 @@ App.DcView = Ember.View.extend({ } }) + +App.ItemView = Ember.View.extend({ + templateName: 'item' +}) + // // Services // @@ -45,6 +50,15 @@ App.NodesLoadingView = Ember.View.extend({ templateName: 'item/loading' }) + +// KV + App.KvListView = Ember.View.extend({ templateName: 'kv' }) + +// Actions + +App.ActionBarView = Ember.View.extend({ + templateName: 'actionbar' +}) diff --git a/ui/javascripts/libs/ember-1.5.1.min.js b/ui/javascripts/libs/ember-1.5.1.min.js deleted file mode 100644 index a9383a689e..0000000000 --- a/ui/javascripts/libs/ember-1.5.1.min.js +++ /dev/null @@ -1,29 +0,0 @@ -/*! - * @overview Ember - JavaScript Application Framework - * @copyright Copyright 2011-2014 Tilde Inc. and contributors - * Portions Copyright 2006-2011 Strobe Inc. - * Portions Copyright 2008-2011 Apple Inc. All rights reserved. - * @license Licensed under MIT license - * See https://raw.github.com/emberjs/ember.js/master/LICENSE - * @version 1.5.1 - */ -!function(){if("undefined"==typeof Ember&&(Ember={},"undefined"!=typeof window&&(window.Em=window.Ember=Em=Ember)),Ember.ENV||(Ember.ENV="undefined"!=typeof EmberENV?EmberENV:"undefined"!=typeof ENV?ENV:{}),"MANDATORY_SETTER"in Ember.ENV||(Ember.ENV.MANDATORY_SETTER=!0),Ember.assert=function(e,t){if(!t)throw new Ember.Error("Assertion Failed: "+e)},Ember.warn=function(e,t){t||(Ember.Logger.warn("WARNING: "+e),"trace"in Ember.Logger&&Ember.Logger.trace())},Ember.debug=function(e){Ember.Logger.debug("DEBUG: "+e)},Ember.deprecate=function(e,t){if(!t){if(Ember.ENV.RAISE_ON_DEPRECATION)throw new Ember.Error(e);var r;try{__fail__.fail()}catch(n){r=n}if(Ember.LOG_STACKTRACE_ON_DEPRECATION&&r.stack){var i,o="";r.arguments?(i=r.stack.replace(/^\s+at\s+/gm,"").replace(/^([^\(]+?)([\n$])/gm,"{anonymous}($1)$2").replace(/^Object.\s*\(([^\)]+)\)/gm,"{anonymous}($1)").split("\n"),i.shift()):i=r.stack.replace(/(?:\n@:0)?\s+$/m,"").replace(/^\(/gm,"{anonymous}(").split("\n"),o="\n "+i.slice(2).join("\n "),e+=o}Ember.Logger.warn("DEPRECATION: "+e)}},Ember.deprecateFunc=function(e,t){return function(){return Ember.deprecate(e),t.apply(this,arguments)}},Ember.runInDebug=function(e){e()},!Ember.testing){var e="undefined"!=typeof InstallTrigger,t=!!window.chrome&&!window.opera;"undefined"!=typeof window&&(e||t)&&window.addEventListener&&window.addEventListener("load",function(){if(document.documentElement&&document.documentElement.dataset&&!document.documentElement.dataset.emberExtension){var r;t?r="https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi":e&&(r="https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/"),Ember.debug("For more advanced debugging, install the Ember Inspector from "+r)}},!1)}}(),/*! - * @overview Ember - JavaScript Application Framework - * @copyright Copyright 2011-2014 Tilde Inc. and contributors - * Portions Copyright 2006-2011 Strobe Inc. - * Portions Copyright 2008-2011 Apple Inc. All rights reserved. - * @license Licensed under MIT license - * See https://raw.github.com/emberjs/ember.js/master/LICENSE - * @version 1.5.1 - */ -function(){var e,t,r,n;!function(){var i={},o={};e=function(e,t,r){i[e]={deps:t,callback:r}},n=r=t=function(e){function r(t){if("."!==t.charAt(0))return t;for(var r=t.split("/"),n=e.split("/").slice(0,-1),i=0,o=r.length;o>i;i++){var a=r[i];if(".."===a)n.pop();else{if("."===a)continue;n.push(a)}}return n.join("/")}if(n._eak_seen=i,o[e])return o[e];if(o[e]={},!i[e])throw new Error("Could not find module "+e);for(var a,s=i[e],u=s.deps,l=s.callback,c=[],h=0,m=u.length;m>h;h++)c.push("exports"===u[h]?a={}:t(r(u[h])));var p=l.apply(this,c);return o[e]=a||p}}(),function(){"undefined"==typeof Ember&&(Ember={});{var e=(Ember.imports=Ember.imports||this,Ember.exports=Ember.exports||this);Ember.lookup=Ember.lookup||this}e.Em=e.Ember=Em=Ember,Ember.isNamespace=!0,Ember.toString=function(){return"Ember"},Ember.VERSION="1.5.1",Ember.ENV||(Ember.ENV="undefined"!=typeof EmberENV?EmberENV:"undefined"!=typeof ENV?ENV:{}),Ember.config=Ember.config||{},"undefined"==typeof Ember.ENV.DISABLE_RANGE_API&&(Ember.ENV.DISABLE_RANGE_API=!0),"undefined"==typeof MetamorphENV&&(e.MetamorphENV={}),MetamorphENV.DISABLE_RANGE_API=Ember.ENV.DISABLE_RANGE_API,Ember.FEATURES=Ember.ENV.FEATURES||{},Ember.FEATURES.isEnabled=function(e){var t=Ember.FEATURES[e];return Ember.ENV.ENABLE_ALL_FEATURES?!0:t===!0||t===!1||void 0===t?t:Ember.ENV.ENABLE_OPTIONAL_FEATURES?!0:!1},Ember.EXTEND_PROTOTYPES=Ember.ENV.EXTEND_PROTOTYPES,"undefined"==typeof Ember.EXTEND_PROTOTYPES&&(Ember.EXTEND_PROTOTYPES=!0),Ember.LOG_STACKTRACE_ON_DEPRECATION=Ember.ENV.LOG_STACKTRACE_ON_DEPRECATION!==!1,Ember.SHIM_ES5=Ember.ENV.SHIM_ES5===!1?!1:Ember.EXTEND_PROTOTYPES,Ember.LOG_VERSION=Ember.ENV.LOG_VERSION===!1?!1:!0,Ember.K=function(){return this},"undefined"==typeof Ember.assert&&(Ember.assert=Ember.K),"undefined"==typeof Ember.warn&&(Ember.warn=Ember.K),"undefined"==typeof Ember.debug&&(Ember.debug=Ember.K),"undefined"==typeof Ember.runInDebug&&(Ember.runInDebug=Ember.K),"undefined"==typeof Ember.deprecate&&(Ember.deprecate=Ember.K),"undefined"==typeof Ember.deprecateFunc&&(Ember.deprecateFunc=function(e,t){return t}),Ember.uuid=0,Ember.merge=function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e},Ember.isNone=function(e){return null===e||void 0===e},Ember.none=Ember.deprecateFunc("Ember.none is deprecated. Please use Ember.isNone instead.",Ember.isNone),Ember.isEmpty=function(e){return Ember.isNone(e)||0===e.length&&"function"!=typeof e||"object"==typeof e&&0===Ember.get(e,"length")},Ember.empty=Ember.deprecateFunc("Ember.empty is deprecated. Please use Ember.isEmpty instead.",Ember.isEmpty),Ember.isBlank=function(e){return Ember.isEmpty(e)||"string"==typeof e&&null===e.match(/\S/)}}(),function(){var e=Ember.platform={};if(Ember.create=Object.create,Ember.create&&2!==Ember.create({a:1},{a:{value:2}}).a&&(Ember.create=null),!Ember.create||Ember.ENV.STUB_OBJECT_CREATE){var t=function(){};Ember.create=function(e,r){if(t.prototype=e,e=new t,r){t.prototype=e;for(var n in r)t.prototype[n]=r[n].value;e=new t}return t.prototype=null,e},Ember.create.isSimulated=!0}var r,n,i=Object.defineProperty;if(i)try{i({},"a",{get:function(){}})}catch(o){i=null}i&&(r=function(){var e={};return i(e,"a",{configurable:!0,enumerable:!0,get:function(){},set:function(){}}),i(e,"a",{configurable:!0,enumerable:!0,writable:!0,value:!0}),e.a===!0}(),n=function(){try{return i(document.createElement("div"),"definePropertyOnDOM",{}),!0}catch(e){}return!1}(),r?n||(i=function(e,t,r){var n;return n="object"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName,n?e[t]=r.value:Object.defineProperty(e,t,r)}):i=null),e.defineProperty=i,e.hasPropertyAccessors=!0,e.defineProperty||(e.hasPropertyAccessors=!1,e.defineProperty=function(e,t,r){r.get||(e[t]=r.value)},e.defineProperty.isSimulated=!0),Ember.ENV.MANDATORY_SETTER&&!e.hasPropertyAccessors&&(Ember.ENV.MANDATORY_SETTER=!1)}(),function(){var e=function(e){return e&&Function.prototype.toString.call(e).indexOf("[native code]")>-1},t=e(Array.prototype.map)?Array.prototype.map:function(e){if(void 0===this||null===this)throw new TypeError;var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var n=new Array(r),i=arguments[1],o=0;r>o;o++)o in t&&(n[o]=e.call(i,t[o],o,t));return n},r=e(Array.prototype.forEach)?Array.prototype.forEach:function(e){if(void 0===this||null===this)throw new TypeError;var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var n=arguments[1],i=0;r>i;i++)i in t&&e.call(n,t[i],i,t)},n=e(Array.prototype.indexOf)?Array.prototype.indexOf:function(e,t){null===t||void 0===t?t=0:0>t&&(t=Math.max(0,this.length+t));for(var r=t,n=this.length;n>r;r++)if(this[r]===e)return r;return-1},i=e(Array.prototype.filter)?Array.prototype.filter:function(e,t){var r,n,i=[],o=this.length;for(r=0;o>r;r++)this.hasOwnProperty(r)&&(n=this[r],e.call(t,n,r,this)&&i.push(n));return i};Ember.ArrayPolyfills={map:t,forEach:r,filter:i,indexOf:n},Ember.SHIM_ES5&&(Array.prototype.map||(Array.prototype.map=t),Array.prototype.forEach||(Array.prototype.forEach=r),Array.prototype.filter||(Array.prototype.filter=i),Array.prototype.indexOf||(Array.prototype.indexOf=n))}(),function(){var e=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){var t=Error.apply(this,arguments);Error.captureStackTrace&&Error.captureStackTrace(this,Ember.Error);for(var r=0;rs;s++){if(i=t[s],o=a[i]){if(o.__ember_source__!==e){if(!r)return void 0;o=a[i]=n(o),o.__ember_source__=e}}else{if(!r)return void 0;o=a[i]={__ember_source__:e}}a=o}return o},Ember.wrap=function(e,t){function r(){var r,n=this.__nextSuper;return this.__nextSuper=t,r=e.apply(this,arguments),this.__nextSuper=n,r}return r.wrappedFunction=e,r.__ember_observes__=e.__ember_observes__,r.__ember_observesBefore__=e.__ember_observesBefore__,r.__ember_listens__=e.__ember_listens__,r},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 d=function(){var e=0;try{try{}finally{throw e++,new Error("needsFinallyFixTest")}}catch(t){}return 1!==e}();Ember.tryFinally=d?function(e,t,r){var n,i,o;r=r||this;try{n=e.call(r)}finally{try{i=t.call(r)}catch(a){o=a}}if(o)throw o;return void 0===i?n:i}:function(e,t,r){var n,i;r=r||this;try{n=e.call(r)}finally{i=t.call(r)}return void 0===i?n:i},Ember.tryCatchFinally=d?function(e,t,r,n){var i,o,a;n=n||this;try{i=e.call(n)}catch(s){i=t.call(n,s)}finally{try{o=r.call(n)}catch(u){a=u}}if(a)throw a;return void 0===o?i:o}:function(e,t,r,n){var i,o;n=n||this;try{i=e.call(n)}catch(a){i=t.call(n,a)}finally{o=r.call(n)}return void 0===o?i:o};var f={},b="Boolean Number String Function Array Date RegExp Object".split(" ");Ember.ArrayPolyfills.forEach.call(b,function(e){f["[object "+e+"]"]=e.toLowerCase()});var E=Object.prototype.toString;Ember.typeOf=function(e){var t;return t=null===e||void 0===e?String(e):f[E.call(e)]||"object","function"===t?Ember.Object&&Ember.Object.detect(e)&&(t="class"):"object"===t&&(e instanceof Error?t="error":Ember.Object&&e instanceof Ember.Object?t="instance":e instanceof Date&&(t="date")),t},Ember.inspect=function(e){var t=Ember.typeOf(e);if("array"===t)return"["+e+"]";if("object"!==t)return e+"";var r,n=[];for(var i in e)if(e.hasOwnProperty(i)){if(r=e[i],"toString"===r)continue;"function"===Ember.typeOf(r)&&(r="function() { ... }"),n.push(i+": "+r)}return"{"+n.join(", ")+"}"}}(),function(){Ember.Instrumentation={};var e=[],t={},r=function(r){for(var n,i=[],o=0,a=e.length;a>o;o++)n=e[o],n.regex.test(r)&&i.push(n.object);return t[r]=i,i},n=function(){var e="undefined"!=typeof window?window.performance||{}:{},t=e.now||e.mozNow||e.webkitNow||e.msNow||e.oNow;return t?t.bind(e):function(){return+new Date}}();Ember.Instrumentation.instrument=function(e,i,o,a){function s(){for(d=0,f=m.length;f>d;d++)p=m[d],b[d]=p.before(e,n(),i);return o.call(a)}function u(e){i=i||{},i.exception=e}function l(){for(d=0,f=m.length;f>d;d++)p=m[d],p.after(e,n(),i,b[d]);Ember.STRUCTURED_PROFILE&&console.timeEnd(c)}var c,h,m=t[e];if(Ember.STRUCTURED_PROFILE&&(c=e+": "+i.object,console.time(c)),m||(m=r(e)),0===m.length)return h=o.call(a),Ember.STRUCTURED_PROFILE&&console.timeEnd(c),h;var p,d,f,b=[];return Ember.tryCatchFinally(s,u,l)},Ember.Instrumentation.subscribe=function(r,n){for(var i,o=r.split("."),a=[],s=0,u=o.length;u>s;s++)i=o[s],a.push("*"===i?"[^\\.]*":i);a=a.join("\\."),a+="(\\..*)?";var l={pattern:r,regex:new RegExp("^"+a+"$"),object:n};return e.push(l),t={},l},Ember.Instrumentation.unsubscribe=function(r){for(var n,i=0,o=e.length;o>i;i++)e[i]===r&&(n=i);e.splice(n,1),t={}},Ember.Instrumentation.reset=function(){e=[],t={}},Ember.instrument=Ember.Instrumentation.instrument,Ember.subscribe=Ember.Instrumentation.subscribe}(),function(){var e,t,r,n,i;e=Array.prototype.map||Ember.ArrayPolyfills.map,t=Array.prototype.forEach||Ember.ArrayPolyfills.forEach,r=Array.prototype.indexOf||Ember.ArrayPolyfills.indexOf,i=Array.prototype.filter||Ember.ArrayPolyfills.filter,n=Array.prototype.splice;var o=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)},filter:function(e,t,r){return e.filter?e.filter.call(e,t,r):i.call(e,t,r)},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?[]:o.map(t,function(t){return o.indexOf(e,t)})},addObject:function(e,t){var r=o.indexOf(e,t);-1===r&&e.push(t)},removeObject:function(e,t){var r=o.indexOf(e,t);-1!==r&&e.splice(r,1)},_replace:function(e,t,r,i){for(var o,a,s=[].concat(i),u=[],l=6e4,c=t,h=r;s.length;)a=h>l?l:h,0>=a&&(a=0),o=s.splice(0,l),o=[c,a].concat(o),c+=l,h-=a,u=u.concat(n.apply(e,o));return u},replace:function(e,t,r,n){return e.replace?e.replace(t,r,n):o._replace(e,t,r,n)},intersection:function(e,t){var r=[];return o.forEach(e,function(e){o.indexOf(t,e)>=0&&r.push(e)}),r}}}(),function(){var e,t=Ember.META_KEY,r=Ember.ENV.MANDATORY_SETTER,n=/^([A-Z$]|([0-9][A-Z$])).*[\.\*]/,i=/^this[\.\*]/,o=/^([^\.\*]+)/;e=function(e,n){if(""===n)return e;if(n||"string"!=typeof e||(n=e,e=null),Ember.assert("Cannot call get with "+n+" key.",!!n),Ember.assert("Cannot call get with '"+n+"' on an undefined object.",void 0!==e),null===e||-1!==n.indexOf("."))return s(e,n);var i,o=e[t],a=o&&o.descs[n];return a?a.get(e,n):(i=r&&o&&o.watching[n]>0?o.values[n]:e[n],void 0!==i||"object"!=typeof e||n in e||"function"!=typeof e.unknownProperty?i:e.unknownProperty(n))},Ember.config.overrideAccessors&&(Ember.get=e,Ember.config.overrideAccessors(),e=Ember.get);var a=Ember.normalizeTuple=function(t,r){var a,s=i.test(r),u=!s&&n.test(r);if((!t||u)&&(t=Ember.lookup),s&&(r=r.slice(5)),t===Ember.lookup&&(a=r.match(o)[0],t=e(t,a),r=r.slice(a.length+1)),!r||0===r.length)throw new Ember.Error("Path cannot be empty");return[t,r]},s=Ember._getPath=function(t,r){var n,o,s,u,l;if(null===t&&-1===r.indexOf("."))return e(Ember.lookup,r);for(n=i.test(r),(!t||n)&&(s=a(t,r),t=s[0],r=s[1],s.length=0),o=r.split("."),l=o.length,u=0;null!=t&&l>u;u++)if(t=e(t,o[u],!0),t&&t.isDestroyed)return void 0;return t};Ember.getWithDefault=function(t,r,n){var i=e(t,r);return void 0===i?n:i},Ember.get=e}(),function(){function e(e,t,r){for(var n=-1,i=e.length-3;i>=0;i-=3)if(t===e[i]&&r===e[i+1]){n=i;break}return n}function t(e,t){var r,n=p(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[d],o=i&&i.listeners&&i.listeners[r];if(o)for(var a=o.length-3;a>=0;a-=3){var s=o[a],u=o[a+1],l=o[a+2],c=e(n,s,u);-1===c&&n.push(s,u,l)}}function n(t,r,n){var i=t[d],o=i&&i.listeners&&i.listeners[r],a=[];if(o){for(var s=o.length-3;s>=0;s-=3){var u=o[s],l=o[s+1],c=o[s+2],h=e(n,u,l);-1===h&&(n.push(u,l,c),a.push(u,l,c))}return a}}function i(r,n,i,o,a){Ember.assert("You must pass at least an object and event name to Ember.addListener",!!r&&!!n),o||"function"!=typeof i||(o=i,i=null);var s=t(r,n),u=e(s,i,o),l=0;a&&(l|=b),-1===u&&(s.push(i,o,l),"function"==typeof r.didAddListener&&r.didAddListener(n,i,o))}function o(r,n,i,o){function a(i,o){var a=t(r,n),s=e(a,i,o);-1!==s&&(a.splice(s,3),"function"==typeof r.didRemoveListener&&r.didRemoveListener(n,i,o))}if(Ember.assert("You must pass at least an object and event name to Ember.removeListener",!!r&&!!n),o||"function"!=typeof i||(o=i,i=null),o)a(i,o);else{var s=r[d],u=s&&s.listeners&&s.listeners[n];if(!u)return;for(var l=u.length-3;l>=0;l-=3)a(u[l],u[l+1])}}function a(r,n,i,o,a){function s(){return a.call(i)}function u(){-1!==c&&(l[c+2]&=~E)}o||"function"!=typeof i||(o=i,i=null);var l=t(r,n),c=e(l,i,o);return-1!==c&&(l[c+2]|=E),Ember.tryFinally(s,u)}function s(r,n,i,o,a){function s(){return a.call(i)}function u(){for(var e=0,t=p.length;t>e;e++){var r=p[e];d[e][r+2]&=~E}}o||"function"!=typeof i||(o=i,i=null);var l,c,h,m,p=[],d=[];for(h=0,m=n.length;m>h;h++){l=n[h],c=t(r,l);var f=e(c,i,o);-1!==f&&(c[f+2]|=E,p.push(f),d.push(c))}return Ember.tryFinally(s,u)}function u(e){var t=e[d].listeners,r=[];if(t)for(var n in t)t[n]&&r.push(n);return r}function l(e,t,r,n){if(e!==Ember&&"function"==typeof e.sendEvent&&e.sendEvent(t,r),!n){var i=e[d];n=i&&i.listeners&&i.listeners[t]}if(n){for(var a=n.length-3;a>=0;a-=3){var s=n[a],u=n[a+1],l=n[a+2];u&&(l&E||(l&b&&o(e,t,s,u),s||(s=e),"string"==typeof u&&(u=s[u]),r?u.apply(s,r):u.call(s)))}return!0}}function c(e,t){var r=e[d],n=r&&r.listeners&&r.listeners[t];return!(!n||!n.length)}function h(e,t){var r=[],n=e[d],i=n&&n.listeners&&n.listeners[t];if(!i)return r;for(var o=0,a=i.length;a>o;o+=3){var s=i[o],u=i[o+1];r.push([s,u])}return r}var m=Ember.create,p=Ember.meta,d=Ember.META_KEY,f=[].slice,b=1,E=2;Ember.on=function(){var e=f.call(arguments,-1)[0],t=f.call(arguments,0,-1);return e.__ember_listens__=t,e},Ember.addListener=i,Ember.removeListener=o,Ember._suspendListener=a,Ember._suspendListeners=s,Ember.sendEvent=l,Ember.hasListeners=c,Ember.watchedEvents=u,Ember.listenersFor=h,Ember.listenersDiff=n,Ember.listenersUnion=r}(),function(){var e=Ember.guidFor,t=Ember.sendEvent,r=Ember._ObserverSet=function(){this.clear()};r.prototype.add=function(t,r,n){var i,o=this.observerSet,a=this.observers,s=e(t),u=o[s];return u||(o[s]=u={}),i=u[r],void 0===i&&(i=a.push({sender:t,keyName:r,eventName:n,listeners:[]})-1,u[r]=i),a[i].listeners},r.prototype.flush=function(){var e,r,n,i,o=this.observers;for(this.clear(),e=0,r=o.length;r>e;++e)n=o[e],i=n.sender,i.isDestroying||i.isDestroyed||t(i,n.eventName,[i,n.keyName],n.listeners)},r.prototype.clear=function(){this.observerSet={},this.observers=[]}}(),function(){function e(e,t){var n=e[h],i=n&&n.watching[t]>0||"length"===t,a=n&&n.proto,s=n&&n.descs[t];i&&a!==e&&(s&&s.willChange&&s.willChange(e,t),r(e,t,n),o(e,t,n),l(e,t))}function t(e,t){var r=e[h],i=r&&r.watching[t]>0||"length"===t,o=r&&r.proto,s=r&&r.descs[t];o!==e&&(s&&s.didChange&&s.didChange(e,t),(i||"length"===t)&&(n(e,t,r),a(e,t,r,!1),c(e,t)))}function r(t,r,n){if(!t.isDestroying){var o=w,a=!o;a&&(o=w={}),i(e,t,r,o,n),a&&(w=null)}}function n(e,r,n){if(!e.isDestroying){var o=_,a=!o;a&&(o=_={}),i(t,e,r,o,n),a&&(_=null)}}function i(e,t,r,n,i){var o=m(t);if(n[o]||(n[o]={}),!n[o][r]){n[o][r]=!0;var a=i.deps;if(a=a&&a[r])for(var s in a){var u=i.descs[s];u&&u._suspended===t||e(t,s)}}}function o(t,r,n){if(n.hasOwnProperty("chainWatchers")&&n.chainWatchers[r]){var i,o,a=n.chainWatchers[r],s=[];for(i=0,o=a.length;o>i;i++)a[i].willChange(s);for(i=0,o=s.length;o>i;i+=2)e(s[i],s[i+1])}}function a(e,r,n,i){if(n&&n.hasOwnProperty("chainWatchers")&&n.chainWatchers[r]){var o,a,s=n.chainWatchers[r],u=i?null:[];for(o=0,a=s.length;a>o;o++)s[o].didChange(u);if(!i)for(o=0,a=u.length;a>o;o+=2)t(u[o],u[o+1])}}function s(){y++}function u(){y--,0>=y&&(v.clear(),g.flush())}function l(e,t){if(!e.isDestroying){var r,n,i=t+":before";y?(r=v.add(e,t,i),n=b(e,i,r),d(e,i,[e,t],n)):d(e,i,[e,t])}}function c(e,t){if(!e.isDestroying){var r,n=t+":change";y?(r=g.add(e,t,n),f(e,n,r)):d(e,n,[e,t])}}var h=Ember.META_KEY,m=Ember.guidFor,p=Ember.tryFinally,d=Ember.sendEvent,f=Ember.listenersUnion,b=Ember.listenersDiff,E=Ember._ObserverSet,v=new E,g=new E,y=0;Ember.propertyWillChange=e,Ember.propertyDidChange=t;var w,_;Ember.overrideChains=function(e,t,r){a(e,t,r,!0)},Ember.beginPropertyChanges=s,Ember.endPropertyChanges=u,Ember.changeProperties=function(e,t){s(),p(e,u,t)}}(),function(){function e(e,t,r,n){var a;if(a=t.slice(t.lastIndexOf(".")+1),t=t===a?a:t.slice(0,t.length-(a.length+1)),"this"!==t&&(e=i(e,t)),!a||0===a.length)throw new Ember.Error("Property set failed: You passed an empty path");if(!e){if(n)return;throw new Ember.Error('Property set failed: object in path "'+t+'" could not be found or was destroyed.')}return o(e,a,r)}var t=Ember.META_KEY,r=Ember.ENV.MANDATORY_SETTER,n=/^([A-Z$]|([0-9][A-Z$]))/,i=Ember._getPath,o=function(i,o,a,s){if("string"==typeof i&&(Ember.assert("Path '"+i+"' must be global if no obj is given.",n.test(i)),a=o,o=i,i=null),Ember.assert("Cannot call set with "+o+" key.",!!o),!i||-1!==o.indexOf("."))return e(i,o,a,s);Ember.assert("You need to provide an object and key to `set`.",!!i&&void 0!==o),Ember.assert("calling set on destroyed object",!i.isDestroyed);var u,l,c=i[t],h=c&&c.descs[o];return h?h.set(i,o,a):(u="object"==typeof i&&!(o in i),u&&"function"==typeof i.setUnknownProperty?i.setUnknownProperty(o,a):c&&c.watching[o]>0?(l=r?c.values[o]:i[o],a!==l&&(Ember.propertyWillChange(i,o),r?(void 0!==l||o in i)&&i.propertyIsEnumerable(o)?c.values[o]=a:Ember.defineProperty(i,o,null,a):i[o]=a,Ember.propertyDidChange(i,o))):i[o]=a),a};Ember.config.overrideAccessors&&(Ember.set=o,Ember.config.overrideAccessors(),o=Ember.set),Ember.set=o,Ember.trySet=function(e,t,r){return o(e,t,r,!0)}}(),function(){var e=Ember.set,t=Ember.guidFor,r=Ember.ArrayPolyfills.indexOf,n=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t},i=function(e,t){var r=e.keys.copy(),i=n(e.values);return t.keys=r,t.values=i,t.length=e.length,t},o=Ember.OrderedSet=function(){this.clear()};o.create=function(){return new o},o.prototype={clear:function(){this.presenceSet={},this.list=[]},add:function(e){var r=t(e),n=this.presenceSet,i=this.list;r in n||(n[r]=!0,i.push(e))},remove:function(e){var n=t(e),i=this.presenceSet,o=this.list;delete i[n];var a=r.call(o,e);a>-1&&o.splice(a,1)},isEmpty:function(){return 0===this.list.length},has:function(e){var r=t(e),n=this.presenceSet;return r in n},forEach:function(e,t){for(var r=this.toArray(),n=0,i=r.length;i>n;n++)e.call(t,r[n])},toArray:function(){return this.list.slice()},copy:function(){var e=new o;return e.presenceSet=n(this.presenceSet),e.list=this.toArray(),e}};var a=Ember.Map=function(){this.keys=Ember.OrderedSet.create(),this.values={}};a.create=function(){return new a},a.prototype={length:0,get:function(e){var r=this.values,n=t(e);return r[n]},set:function(r,n){var i=this.keys,o=this.values,a=t(r);i.add(r),o[a]=n,e(this,"length",i.list.length)},remove:function(r){var n=this.keys,i=this.values,o=t(r);return i.hasOwnProperty(o)?(n.remove(r),delete i[o],e(this,"length",n.list.length),!0):!1},has:function(e){var r=this.values,n=t(e);return r.hasOwnProperty(n)},forEach:function(e,r){var n=this.keys,i=this.values;n.forEach(function(n){var o=t(n);e.call(r,n,i[o])})},copy:function(){return i(this,new a)}};var s=Ember.MapWithDefault=function(e){a.call(this),this.defaultValue=e.defaultValue};s.create=function(e){return e?new s(e):new a},s.prototype=Ember.create(a.prototype),s.prototype.get=function(e){var t=this.has(e);if(t)return a.prototype.get.call(this,e);var r=this.defaultValue(e);return this.set(e,r),r},s.prototype.copy=function(){return i(this,new s({defaultValue:this.defaultValue}))}}(),function(){function e(e){var t,r;Ember.imports.console?t=Ember.imports.console:"undefined"!=typeof console&&(t=console);var n="object"==typeof t?t[e]:null;return n?"function"==typeof n.apply?(r=function(){n.apply(t,arguments)},r.displayName="console."+e,r):function(){var e=Array.prototype.join.call(arguments,", ");n(e)}:void 0}function t(e,t){if(!e)try{throw new Ember.Error("assertion failed: "+t)}catch(r){setTimeout(function(){throw r},0)}}Ember.Logger={log:e("log")||Ember.K,warn:e("warn")||Ember.K,error:e("error")||Ember.K,info:e("info")||Ember.K,debug:e("debug")||e("info")||Ember.K,assert:e("assert")||t}}(),function(){var e=Ember.META_KEY,t=Ember.meta,r=Ember.platform.defineProperty,n=Ember.ENV.MANDATORY_SETTER;Ember.Descriptor=function(){};var i=Ember.MANDATORY_SETTER_FUNCTION=function(){Ember.assert("You must use Ember.set() to access this property (of "+this+")",!1)},o=Ember.DEFAULT_GETTER_FUNCTION=function(t){return function(){var r=this[e];return r&&r.values[t]}};if(Ember.defineProperty=function(e,s,u,l,c){var h,m,p,d;return c||(c=t(e)),h=c.descs,m=c.descs[s],p=c.watching[s]>0,m instanceof Ember.Descriptor&&m.teardown(e,s),u instanceof Ember.Descriptor?(d=u,h[s]=u,n&&p?r(e,s,{configurable:!0,enumerable:!0,writable:!0,value:void 0}):e[s]=void 0,Ember.FEATURES.isEnabled("composable-computed-properties")&&u.func&&u._dependentCPs&&a(e,u._dependentCPs,c)):(h[s]=void 0,null==u?(d=l,n&&p?(c.values[s]=l,r(e,s,{configurable:!0,enumerable:!0,set:i,get:o(s)})):e[s]=l):(d=u,r(e,s,u))),p&&Ember.overrideChains(e,s,c),e.didDefineProperty&&e.didDefineProperty(e,s,d),this},Ember.FEATURES.isEnabled("composable-computed-properties"))var a=function(e,t,r){for(var n,i,o=t.length,s=0;o>s;++s)n=t[s],i=n.implicitCPKey,Ember.defineProperty(e,i,n,void 0,r),n._dependentCPs&&a(e,n._dependentCPs,r)}}(),function(){var e=Ember.get;Ember.getProperties=function(t){var r={},n=arguments,i=1;2===arguments.length&&"array"===Ember.typeOf(arguments[1])&&(i=0,n=arguments[1]);for(var o=n.length;o>i;i++)r[n[i]]=e(t,n[i]);return r}}(),function(){var e=Ember.changeProperties,t=Ember.set;Ember.setProperties=function(r,n){return e(function(){for(var e in n)n.hasOwnProperty(e)&&t(r,e,n[e])}),r}}(),function(){var e=Ember.meta,t=Ember.typeOf,r=Ember.ENV.MANDATORY_SETTER,n=Ember.platform.defineProperty;Ember.watchKey=function(i,o,a){if("length"!==o||"array"!==t(i)){var s=a||e(i),u=s.watching;u[o]?u[o]=(u[o]||0)+1:(u[o]=1,"function"==typeof i.willWatchProperty&&i.willWatchProperty(o),r&&o in i&&(s.values[o]=i[o],n(i,o,{configurable:!0,enumerable:i.propertyIsEnumerable(o),set:Ember.MANDATORY_SETTER_FUNCTION,get:Ember.DEFAULT_GETTER_FUNCTION(o)})))}},Ember.unwatchKey=function(t,i,o){var a=o||e(t),s=a.watching;1===s[i]?(s[i]=0,"function"==typeof t.didUnwatchProperty&&t.didUnwatchProperty(i),r&&i in t&&n(t,i,{configurable:!0,enumerable:t.propertyIsEnumerable(i),set:function(e){n(t,i,{configurable:!0,writable:!0,enumerable:!0,value:e}),delete a.values[i]},get:Ember.DEFAULT_GETTER_FUNCTION(i)})):s[i]>1&&s[i]--}}(),function(){function e(e){return e.match(c)[0]}function t(e,t,r){if(e&&"object"==typeof e){var i=n(e),o=i.chainWatchers;i.hasOwnProperty("chainWatchers")||(o=i.chainWatchers={}),o[t]||(o[t]=[]),o[t].push(r),u(e,t,i)}}function r(e,t){if(!e)return void 0;var r=e[h];if(r&&r.proto===e)return void 0;if("@each"===t)return i(e,t);var n=r&&r.descs[t];return n&&n._cacheable?t in r.cache?r.cache[t]:void 0:i(e,t)}var n=Ember.meta,i=Ember.get,o=Ember.normalizeTuple,a=Ember.ArrayPolyfills.forEach,s=Ember.warn,u=Ember.watchKey,l=Ember.unwatchKey,c=/^([^\.\*]+)/,h=Ember.META_KEY,m=[];Ember.flushPendingChains=function(){if(0!==m.length){var e=m;m=[],a.call(e,function(e){e[0].add(e[1])}),s("Watching an undefined global, Ember expects watched globals to be setup by the time the run loop is flushed, check for typos",0===m.length)}};var p=Ember.removeChainWatcher=function(e,t,r){if(e&&"object"==typeof e){var n=e[h];if(!n||n.hasOwnProperty("chainWatchers")){var i=n&&n.chainWatchers;if(i&&i[t]){i=i[t];for(var o=0,a=i.length;a>o;o++)i[o]===r&&i.splice(o,1)}l(e,t,n)}}},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()},f=d.prototype;f.value=function(){if(void 0===this._value&&this._watching){var e=this._parent.value();this._value=r(e,this._key)}return this._value},f.destroy=function(){if(this._watching){var e=this._object;e&&p(e,this._key,this),this._watching=!1}},f.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},f.add=function(t){var r,n,i,a,s;if(s=this._paths,s[t]=(s[t]||0)+1,r=this.value(),n=o(r,t),n[0]&&n[0]===r)t=n[1],i=e(t),t=t.slice(i.length+1);else{if(!n[0])return m.push([this,t]),void(n.length=0);a=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]}n.length=0,this.chain(i,t,a)},f.remove=function(t){var r,n,i,a,s;s=this._paths,s[t]>0&&s[t]--,r=this.value(),n=o(r,t),n[0]===r?(t=n[1],i=e(t),t=t.slice(i.length+1)):(a=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]),n.length=0,this.unchain(i,t)},f.count=0,f.chain=function(t,r,n){var i,o=this._chains;o||(o=this._chains={}),i=o[t],i||(i=o[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))},f.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())},f.willChange=function(e){var t=this._chains;if(t)for(var r in t)t.hasOwnProperty(r)&&t[r].willChange(e);this._parent&&this._parent.chainWillChange(this,this._key,1,e)},f.chainWillChange=function(e,t,r,n){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainWillChange(this,t,r+1,n):(r>1&&n.push(this.value(),t),t="this."+t,this._paths[t]>0&&n.push(this.value(),t))},f.chainDidChange=function(e,t,r,n){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainDidChange(this,t,r+1,n):(r>1&&n.push(this.value(),t),t="this."+t,this._paths[t]>0&&n.push(this.value(),t))},f.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);null!==e&&this._parent&&this._parent.chainDidChange(this,this._key,1,e)},Ember.finishChains=function(e){var t=e[h],r=t&&t.chains;r&&(r.value()!==e?n(e).chains=r=r.copy(e):r.didChange(null))}}(),function(){var e=Ember.EnumerableUtils.forEach,t=/^((?:[^\.]*\.)*)\{(.*)\}$/;Ember.expandProperties=function(r,n){var i,o,a;(i=t.exec(r))?(o=i[1],a=i[2],e(a.split(","),function(e){n(o+e)})):n(r)}}(),function(){function e(e,r){var i=r||t(e),o=i.chains;return o?o.value()!==e&&(o=i.chains=o.copy(e)):o=i.chains=new n(null,null,e),o}var t=Ember.meta,r=Ember.typeOf,n=Ember._ChainNode;Ember.watchPath=function(n,i,o){if("length"!==i||"array"!==r(n)){var a=o||t(n),s=a.watching;s[i]?s[i]=(s[i]||0)+1:(s[i]=1,e(n,a).add(i))}},Ember.unwatchPath=function(r,n,i){var o=i||t(r),a=o.watching;1===a[n]?(a[n]=0,e(r,o).remove(n)):a[n]>1&&a[n]--}}(),function(){function e(e){return"*"===e||!c.test(e)}var t=(Ember.meta,Ember.GUID_KEY),r=Ember.META_KEY,n=Ember.removeChainWatcher,i=Ember.watchKey,o=Ember.unwatchKey,a=Ember.watchPath,s=Ember.unwatchPath,u=Ember.typeOf,l=Ember.generateGuid,c=/[\.\*]/;Ember.watch=function(t,r,n){("length"!==r||"array"!==u(t))&&(e(r)?i(t,r,n):a(t,r,n))},Ember.isWatching=function(e,t){var n=e[r];return(n&&n.watching[t])>0},Ember.watch.flushPending=Ember.flushPendingChains,Ember.unwatch=function(t,r,n){("length"!==r||"array"!==u(t))&&(e(r)?o(t,r,n):s(t,r,n))},Ember.rewatch=function(e){var n=e[r],i=n&&n.chains;t in e&&!e.hasOwnProperty(t)&&l(e),i&&i.value()!==e&&(n.chains=i.copy(e))};var h=[];Ember.destroy=function(e){var t,i,o,a,s=e[r];if(s&&(e[r]=null,t=s.chains))for(h.push(t);h.length>0;){if(t=h.pop(),i=t._chains)for(o in i)i.hasOwnProperty(o)&&h.push(i[o]);t._watching&&(a=t._object,a&&n(a,t._key,t))}}}(),function(){function e(e,t){var r=e[t];return r?e.hasOwnProperty(t)||(r=e[t]=h(r)):r=e[t]={},r}function t(t){return e(t,"deps")}function r(r,n,i,o){var a,s,u,l,c,h=r._dependentKeys;if(h)for(a=t(o),s=0,u=h.length;u>s;s++)l=h[s],c=e(a,l),c[i]=(c[i]||0)+1,p(n,l,o)}function n(r,n,i,o){var a,s,u,l,c,h=r._dependentKeys;if(h)for(a=t(o),s=0,u=h.length;u>s;s++)l=h[s],c=e(a,l),c[i]=(c[i]||0)-1,d(n,l,o)}function i(e,t){this.func=e,Ember.FEATURES.isEnabled("composable-computed-properties")?P(this,t&&t.dependentKeys):this._dependentKeys=t&&t.dependentKeys,this._cacheable=t&&void 0!==t.cacheable?t.cacheable:!0,this._readOnly=t&&(void 0!==t.readOnly||!!t.readOnly)}function o(e){for(var t=0,r=e.length;r>t;t++)e[t].didChange(null)}function a(e,t){for(var r={},n=0;nr;r++)f(arguments[r],t);return Ember.FEATURES.isEnabled("composable-computed-properties")?P(this,e):this._dependentKeys=e,this},b.meta=function(e){return 0===arguments.length?this._meta||{}:(this._meta=e,this)},b.didChange=function(e,t){if(this._cacheable&&this._suspended!==e){var r=l(e);t in r.cache&&(delete r.cache[t],n(this,e,t,r))}},b.get=function(e,t){var n,i,a,s;if(this._cacheable){if(a=l(e),i=a.cache,t in i)return i[t];n=i[t]=this.func.call(e,t),s=a.chainWatchers&&a.chainWatchers[t],s&&o(s),r(this,e,t,a)}else n=this.func.call(e,t);return n},b.set=function(e,t,n){var i,o,a,s=this._cacheable,u=this.func,c=l(e,s),h=c.watching[t],m=this._suspended,p=!1,d=c.cache;if(this._readOnly)throw new Ember.Error('Cannot set read-only property "'+t+'" on object: '+Ember.inspect(e)); -this._suspended=e;try{if(s&&d.hasOwnProperty(t)&&(o=d[t],p=!0),i=u.wrappedFunction?u.wrappedFunction.length:u.length,3===i)a=u.call(e,t,n,o);else{if(2!==i)return Ember.defineProperty(e,t,null,o),void Ember.set(e,t,n);a=u.call(e,t,n)}if(p&&o===a)return;h&&Ember.propertyWillChange(e,t),p&&delete d[t],s&&(p||r(this,e,t,c),d[t]=a),h&&Ember.propertyDidChange(e,t)}finally{this._suspended=m}return a},b.teardown=function(e,t){var r=l(e);return t in r.cache&&n(this,e,t,r),this._cacheable&&delete r.cache[t],null},Ember.computed=function(e){var t;if(arguments.length>1&&(t=c.call(arguments,0,-1),e=c.call(arguments,-1)[0]),"function"!=typeof e)throw new Ember.Error("Computed Property declared without a property function");var r=new i(e);return t&&r.property.apply(r,t),r},Ember.cacheFor=function(e,t){var r=e[m],n=r&&r.cache;return n&&t in n?n[t]:void 0};var E,v;if(Ember.FEATURES.isEnabled("composable-computed-properties")){var g=Ember.guidFor,y=Ember.EnumerableUtils.map,w=Ember.EnumerableUtils.filter,_=(Ember.typeOf,function(e){return[g(e)].concat(e._dependentKeys).join("_").replace(/\./g,"_DOT_")}),C=function(e){return e instanceof Ember.ComputedProperty?_(e):e},O=function(e){return y(e,function(e){return C(e)})},A=function(e){return w(e,function(e){return e instanceof Ember.ComputedProperty})},P=function(e,t){t?(e._dependentKeys=O(t),e._dependentCPs=A(t)):e._dependentKeys=e._dependentCPs=[],e.implicitCPKey=_(e)};Ember.computed.normalizeDependentKey=C,Ember.computed.normalizeDependentKeys=O,E=function(e,t){Ember.computed[e]=function(e){var r=O(c.call(arguments));return Ember.computed(e,function(){return t.apply(this,r)})}}}Ember.FEATURES.isEnabled("composable-computed-properties")?v=function(e,t){Ember.computed[e]=function(){var e=c.call(arguments),r=O(e),n=Ember.computed(function(){return t.apply(this,[a(this,r)])});return n.property.apply(n,e)}}:(E=function(e,t){Ember.computed[e]=function(e){var r=c.call(arguments);return Ember.computed(e,function(){return t.apply(this,r)})}},v=function(e,t){Ember.computed[e]=function(){var e=c.call(arguments),r=Ember.computed(function(){return t.apply(this,[a(this,e)])});return r.property.apply(r,e)}}),Ember.FEATURES.isEnabled("composable-computed-properties")&&(Ember.computed.literal=function(e){return Ember.computed(function(){return e})}),E("empty",function(e){return Ember.isEmpty(s(this,e))}),E("notEmpty",function(e){return!Ember.isEmpty(s(this,e))}),E("none",function(e){return Ember.isNone(s(this,e))}),E("not",function(e){return!s(this,e)}),E("bool",function(e){return!!s(this,e)}),E("match",function(e,t){var r=s(this,e);return"string"==typeof r?t.test(r):!1}),E("equal",function(e,t){return s(this,e)===t}),E("gt",function(e,t){return s(this,e)>t}),E("gte",function(e,t){return s(this,e)>=t}),E("lt",function(e,t){return s(this,e)1?(u(this,e,r),r):s(this,e)})},Ember.computed.oneWay=function(e){return Ember.computed(e,function(){return s(this,e)})},Ember.computed.readOnly=function(e){return Ember.computed(e,function(){return s(this,e)}).readOnly()},Ember.computed.defaultTo=function(e){return Ember.computed(function(t,r,n){return 1===arguments.length?null!=n?n:s(this,e):null!=r?r:s(this,e)})}}(),function(){function e(e){return e+r}function t(e){return e+n}var r=":change",n=":before";Ember.addObserver=function(t,r,n,i){return Ember.addListener(t,e(r),n,i),Ember.watch(t,r),this},Ember.observersFor=function(t,r){return Ember.listenersFor(t,e(r))},Ember.removeObserver=function(t,r,n,i){return Ember.unwatch(t,r),Ember.removeListener(t,e(r),n,i),this},Ember.addBeforeObserver=function(e,r,n,i){return Ember.addListener(e,t(r),n,i),Ember.watch(e,r),this},Ember._suspendBeforeObserver=function(e,r,n,i,o){return Ember._suspendListener(e,t(r),n,i,o)},Ember._suspendObserver=function(t,r,n,i,o){return Ember._suspendListener(t,e(r),n,i,o)};var i=Ember.ArrayPolyfills.map;Ember._suspendBeforeObservers=function(e,r,n,o,a){var s=i.call(r,t);return Ember._suspendListeners(e,s,n,o,a)},Ember._suspendObservers=function(t,r,n,o,a){var s=i.call(r,e);return Ember._suspendListeners(t,s,n,o,a)},Ember.beforeObserversFor=function(e,r){return Ember.listenersFor(e,t(r))},Ember.removeBeforeObserver=function(e,r,n,i){return Ember.unwatch(e,r),Ember.removeListener(e,t(r),n,i),this}}(),function(){e("backburner/queue",["exports"],function(e){"use strict";function t(e,t,r){this.daq=e,this.name=t,this.options=r,this._queue=[]}t.prototype={daq:null,name:null,options:null,_queue:null,push:function(e,t,r,n){var i=this._queue;return i.push(e,t,r,n),{queue:this,target:e,method:t}},pushUnique:function(e,t,r,n){var i,o,a,s,u=this._queue;for(a=0,s=u.length;s>a;a+=4)if(i=u[a],o=u[a+1],i===e&&o===t)return u[a+2]=r,u[a+3]=n,{queue:this,target:e,method:t};return this._queue.push(e,t,r,n),{queue:this,target:e,method:t}},flush:function(){var e,t,r,n,i,o=this._queue,a=this.options,s=a&&a.before,u=a&&a.after,l=o.length;for(l&&s&&s(),i=0;l>i;i+=4)e=o[i],t=o[i+1],r=o[i+2],n=o[i+3],r&&r.length>0?t.apply(e,r):t.call(e);l&&u&&u(),o.length>l?(this._queue=o.slice(l),this.flush()):this._queue.length=0},cancel:function(e){var t,r,n,i,o=this._queue;for(n=0,i=o.length;i>n;n+=4)if(t=o[n],r=o[n+1],t===e.target&&r===e.method)return o.splice(n,4),!0;if(o=this._queueBeingFlushed)for(n=0,i=o.length;i>n;n+=4)if(t=o[n],r=o[n+1],t===e.target&&r===e.method)return o[n+1]=null,!0}},e.Queue=t}),e("backburner/deferred_action_queues",["backburner/queue","exports"],function(e,t){"use strict";function r(e,t){var r=this.queues={};this.queueNames=e=e||[];for(var n,o=0,a=e.length;a>o;o++)n=e[o],r[n]=new i(this,n,t[n])}function n(e,t){for(var r,n,i=0,o=t;o>=i;i++)if(r=e.queueNames[i],n=e.queues[r],n._queue.length)return i;return-1}var i=e.Queue;r.prototype={queueNames:null,queues:null,schedule:function(e,t,r,n,i,o){var a=this.queues,s=a[e];if(!s)throw new Error("You attempted to schedule an action in a queue ("+e+") that doesn't exist");return i?s.pushUnique(t,r,n,o):s.push(t,r,n,o)},flush:function(){for(var e,t,r,i,o=this.queues,a=this.queueNames,s=0,u=a.length;u>s;){e=a[s],t=o[e],r=t._queueBeingFlushed=t._queue.slice(),t._queue=[];var l,c,h,m,p=t.options,d=p&&p.before,f=p&&p.after,b=0,E=r.length;for(E&&d&&d();E>b;)l=r[b],c=r[b+1],h=r[b+2],m=r[b+3],"string"==typeof c&&(c=l[c]),c&&(h&&h.length>0?c.apply(l,h):c.call(l)),b+=4;t._queueBeingFlushed=null,E&&f&&f(),-1===(i=n(this,s))?s++:s=i}}},t.DeferredActionQueues=r}),e("backburner",["backburner/deferred_action_queues","exports"],function(e,t){"use strict";function r(e){return"number"==typeof e||g.test(e)}function n(e,t){this.queueNames=e,this.options=t||{},this.options.defaultQueue||(this.options.defaultQueue=e[0]),this.instanceStack=[]}function i(e){e.begin(),l=v.setTimeout(function(){l=null,e.end()})}function o(e,t,r){(!c||h>t)&&(c&&clearTimeout(c),c=v.setTimeout(function(){c=null,h=null,a(e)},r),h=t)}function a(e){var t,r,n,i,a=+new Date;e.run(function(){for(n=0,i=E.length;i>n&&(t=E[n],!(t>a));n+=2);for(r=E.splice(0,n),n=1,i=r.length;i>n;n+=2)e.schedule(e.options.defaultQueue,null,r[n])}),E.length&&o(e,E[0],E[0]-a)}function s(e,t){for(var r,n=-1,i=0,o=b.length;o>i;i++)if(r=b[i],r[0]===e&&r[1]===t){n=i;break}return n}function u(e,t){for(var r,n=-1,i=0,o=f.length;o>i;i++)if(r=f[i],r[0]===e&&r[1]===t){n=i;break}return n}var l,c,h,m=e.DeferredActionQueues,p=[].slice,d=[].pop,f=[],b=[],E=[],v=this,g=/\d+/;n.prototype={queueNames:null,options:null,currentInstance:null,instanceStack:null,begin:function(){var e=this.options&&this.options.onBegin,t=this.currentInstance;t&&this.instanceStack.push(t),this.currentInstance=new m(this.queueNames,this.options),e&&e(this.currentInstance,t)},end:function(){var e=this.options&&this.options.onEnd,t=this.currentInstance,r=null;try{t.flush()}finally{this.currentInstance=null,this.instanceStack.length&&(r=this.instanceStack.pop(),this.currentInstance=r),e&&e(t,r)}},run:function(e,t){var r;this.begin(),t||(t=e,e=null),"string"==typeof t&&(t=e[t]);var n=!1;try{r=arguments.length>2?t.apply(e,p.call(arguments,2)):t.call(e)}finally{n||(n=!0,this.end())}return r},defer:function(e,t,r){r||(r=t,t=null),"string"==typeof r&&(r=t[r]);var n=this.DEBUG?new Error:void 0,o=arguments.length>3?p.call(arguments,3):void 0;return this.currentInstance||i(this),this.currentInstance.schedule(e,t,r,o,!1,n)},deferOnce:function(e,t,r){r||(r=t,t=null),"string"==typeof r&&(r=t[r]);var n=this.DEBUG?new Error:void 0,o=arguments.length>3?p.call(arguments,3):void 0;return this.currentInstance||i(this),this.currentInstance.schedule(e,t,r,o,!0,n)},setTimeout:function(){function e(){t.apply(i,l)}var t,n,i,a,s,u,l=p.call(arguments),c=l.length,h=this;if(0!==c){if(1===c)t=l.shift(),n=0;else if(2===c)a=l[0],s=l[1],"function"==typeof s||"function"==typeof a[s]?(i=l.shift(),t=l.shift(),n=0):r(s)?(t=l.shift(),n=l.shift()):(t=l.shift(),n=0);else{var m=l[l.length-1];r(m)&&(n=l.pop()),a=l[0],u=l[1],"function"==typeof u||"string"==typeof u&&null!==a&&u in a?(i=l.shift(),t=l.shift()):t=l.shift()}var d=+new Date+parseInt(n,10);"string"==typeof t&&(t=i[t]);var f,b;for(f=0,b=E.length;b>f&&!(d-1?f[i]:(o=v.setTimeout(function(){l||a.run.apply(a,s);var r=u(e,t);r>-1&&f.splice(r,1)},r),l&&a.run.apply(a,s),n=[e,t,o],f.push(n),n)},debounce:function(e,t){var r,n,i,o,a=this,u=arguments,l=d.call(u);return"number"==typeof l||"string"==typeof l?(r=l,l=!1):r=d.call(u),r=parseInt(r,10),n=s(e,t),n>-1&&(i=b[n],b.splice(n,1),clearTimeout(i[2])),o=v.setTimeout(function(){l||a.run.apply(a,u);var r=s(e,t);r>-1&&b.splice(r,1)},r),l&&-1===n&&a.run.apply(a,u),i=[e,t,o],b.push(i),i},cancelTimers:function(){var e,t;for(e=0,t=f.length;t>e;e++)clearTimeout(f[e][2]);for(f=[],e=0,t=b.length;t>e;e++)clearTimeout(b[e][2]);b=[],c&&(clearTimeout(c),c=null),E=[],l&&(clearTimeout(l),l=null)},hasTimers:function(){return!!E.length||l},cancel:function(e){var t=typeof e;if(e&&"object"===t&&e.queue&&e.method)return e.queue.cancel(e);if("function"!==t)return"[object Array]"===Object.prototype.toString.call(e)?this._cancelItem(u,f,e)||this._cancelItem(s,b,e):void 0;for(var r=0,n=E.length;n>r;r+=2)if(E[r+1]===e)return E.splice(r,2),!0},_cancelItem:function(e,t,r){var n,i;return r.length<3?!1:(i=e(r[0],r[1]),i>-1&&(n=t[i],n[2]===r[2])?(t.splice(i,1),clearTimeout(r[2]),!0):!1)}},n.prototype.schedule=n.prototype.defer,n.prototype.scheduleOnce=n.prototype.deferOnce,n.prototype.later=n.prototype.setTimeout,t.Backburner=n})}(),function(){function e(e){try{return a.run.apply(a,e)}catch(t){Ember.onerror(t)}}function r(){Ember.run.currentRunLoop||Ember.assert("You have turned on testing mode, which disabled the run-loop's autorun. You will need to wrap any code with asynchronous side-effects in an Ember.run",!Ember.testing)}{var n=function(e){Ember.run.currentRunLoop=e},i=function(e,t){Ember.run.currentRunLoop=t},o=t("backburner").Backburner,a=new o(["sync","actions","destroy"],{sync:{before:Ember.beginPropertyChanges,after:Ember.endPropertyChanges},defaultQueue:"actions",onBegin:n,onEnd:i}),s=[].slice;[].concat}Ember.run=function(){return Ember.onerror?e(arguments):a.run.apply(a,arguments)},Ember.run.join=function(){if(!Ember.run.currentRunLoop)return Ember.run.apply(Ember.run,arguments);var e=s.call(arguments);e.unshift("actions"),Ember.run.schedule.apply(Ember.run,e)},Ember.run.bind=function(){var e=s.call(arguments);return function(){return Ember.run.join.apply(Ember.run,e.concat(s.call(arguments)))}},Ember.run.backburner=a;Ember.run;Ember.run.currentRunLoop=null,Ember.run.queues=a.queueNames,Ember.run.begin=function(){a.begin()},Ember.run.end=function(){a.end()},Ember.run.schedule=function(){r(),a.schedule.apply(a,arguments)},Ember.run.hasScheduledTimers=function(){return a.hasTimers()},Ember.run.cancelTimers=function(){a.cancelTimers()},Ember.run.sync=function(){a.currentInstance&&a.currentInstance.queues.sync.flush()},Ember.run.later=function(){return a.later.apply(a,arguments)},Ember.run.once=function(){r();var e=s.call(arguments);return e.unshift("actions"),a.scheduleOnce.apply(a,e)},Ember.run.scheduleOnce=function(){return r(),a.scheduleOnce.apply(a,arguments)},Ember.run.next=function(){var e=s.call(arguments);return e.push(1),a.later.apply(a,e)},Ember.run.cancel=function(e){return a.cancel(e)},Ember.run.debounce=function(){return a.debounce.apply(a,arguments)},Ember.run.throttle=function(){return a.throttle.apply(a,arguments)}}(),function(){function e(e,t){return r(o(t)?Ember.lookup:e,t)}function t(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}Ember.LOG_BINDINGS=!1||!!Ember.ENV.LOG_BINDINGS;var r=Ember.get,n=(Ember.set,Ember.guidFor),i=/^([A-Z$]|([0-9][A-Z$]))/,o=Ember.isGlobalPath=function(e){return i.test(e)},a=function(e,t){this._direction="fwd",this._from=t,this._to=e,this._directionMap=Ember.Map.create()};a.prototype={copy:function(){var e=new a(this._to,this._from);return this._oneWay&&(e._oneWay=!0),e},from:function(e){return this._from=e,this},to:function(e){return this._to=e,this},oneWay:function(){return this._oneWay=!0,this},toString:function(){var e=this._oneWay?"[oneWay]":"";return"Ember.Binding<"+n(this)+">("+this._from+" -> "+this._to+")"+e},connect:function(t){Ember.assert("Must pass a valid object to Ember.Binding.connect()",!!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){Ember.assert("Must pass a valid object to Ember.Binding.disconnect()",!!e);var t=!this._oneWay;return Ember.removeObserver(e,this._from,this,this.fromDidChange),t&&Ember.removeObserver(e,this._to,this,this.toDidChange),this._readyToSync=!1,this},fromDidChange:function(e){this._scheduleSync(e,"fwd")},toDidChange:function(e){this._scheduleSync(e,"back")},_scheduleSync:function(e,t){var r=this._directionMap,n=r.get(e);n||(Ember.run.schedule("sync",this,this._sync,e),r.set(e,t)),"back"===n&&"fwd"===t&&r.set(e,"fwd")},_sync:function(t){var n=Ember.LOG_BINDINGS;if(!t.isDestroyed&&this._readyToSync){var i=this._directionMap,o=i.get(t),a=this._from,s=this._to;if(i.remove(t),"fwd"===o){var u=e(t,this._from);n&&Ember.Logger.log(" ",this.toString(),"->",u,t),this._oneWay?Ember.trySet(t,s,u):Ember._suspendObserver(t,s,this,this.toDidChange,function(){Ember.trySet(t,s,u)})}else if("back"===o){var l=r(t,this._to);n&&Ember.Logger.log(" ",this.toString(),"<-",l,t),Ember._suspendObserver(t,a,this,this.fromDidChange,function(){Ember.trySet(Ember.isGlobalPath(a)?Ember.lookup:t,a,l)})}}}},t(a,{from:function(){var e=this,t=new e;return t.from.apply(t,arguments)},to:function(){var e=this,t=new e;return t.to.apply(t,arguments)},oneWay:function(e,t){var r=this,n=new r(null,e);return n.oneWay(t)}}),Ember.Binding=a,Ember.bind=function(e,t,r){return new Ember.Binding(t,r).connect(e)},Ember.oneWay=function(e,t,r){return new Ember.Binding(t,r).oneWay().connect(e)}}(),function(){function e(){var e,t=this.__nextSuper;return t&&(this.__nextSuper=null,e=t.apply(this,arguments),this.__nextSuper=t),e}function t(e){var t=N(e,!0),r=t.mixins;return r?t.hasOwnProperty("mixins")||(r=t.mixins=x(r)):r=t.mixins={},r}function r(e,t){return t&&t.length>0&&(e.mixins=O.call(t,function(e){if(e instanceof w)return e;var t=new w;return t.properties=e,t})),e}function n(e){return"function"==typeof e&&e.isMethod!==!1&&e!==Boolean&&e!==Object&&e!==Number&&e!==Array&&e!==Date&&e!==String}function i(e,t){var r;return t instanceof w?(r=V(t),e[r]?k:(e[r]=t,t.properties)):t}function o(e,t,r,n){var i;return i=r[e]||n[e],t[e]&&(i=i?i.concat(t[e]):t[e]),i}function a(e,t,r,n,i){var o;return void 0===n[t]&&(o=i[t]),o=o||e.descs[t],o&&o instanceof Ember.ComputedProperty?(r=x(r),r.func=Ember.wrap(r.func,o.func),r):r}function s(e,t,r,n,i){var o;return void 0===i[t]&&(o=n[t]),o=o||e[t],"function"!=typeof o?r:Ember.wrap(r,o)}function u(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 l(t,r,i,o){var a=o[r]||t[r];if(!a)return i;var u=Ember.merge({},a),l=!1;for(var c in i)if(i.hasOwnProperty(c)){var h=i[c];n(h)?(l=!0,u[c]=s(t,c,h,a,{})):u[c]=h}return l&&(u._super=e),u}function c(e,t,r,i,o,c,h,m){if(r instanceof Ember.Descriptor){if(r===_&&o[t])return k;r.func&&(r=a(i,t,r,c,o)),o[t]=r,c[t]=void 0}else h&&A.call(h,t)>=0||"concatenatedProperties"===t||"mergedProperties"===t?r=u(e,t,r,c):m&&A.call(m,t)>=0?r=l(e,t,r,c):n(r)&&(r=s(e,t,r,c,o)),o[t]=void 0,c[t]=r}function h(e,t,r,n,a,s){function u(e){delete r[e],delete n[e]}for(var l,m,p,d,f,b,E=0,v=e.length;v>E;E++)if(l=e[E],Ember.assert("Expected hash or Mixin instance, got "+Object.prototype.toString.call(l),"object"==typeof l&&null!==l&&"[object Array]"!==Object.prototype.toString.call(l)),m=i(t,l),m!==k)if(m){b=N(a),a.willMergeMixin&&a.willMergeMixin(m),d=o("concatenatedProperties",m,n,a),f=o("mergedProperties",m,n,a);for(p in m)m.hasOwnProperty(p)&&(s.push(p),c(a,p,m[p],b,r,n,d,f));m.hasOwnProperty("toString")&&(a.toString=m.toString)}else l.mixins&&(h(l.mixins,t,r,n,a,s),l._without&&P.call(l._without,u))}function m(e,t,r,n){if(D.test(t)){var i=n.bindings;i?n.hasOwnProperty("bindings")||(i=n.bindings=x(n.bindings)):i=n.bindings={},i[t]=r}}function p(e,t){var r,n,i,o=t.bindings;if(o){for(r in o)n=o[r],n&&(i=r.slice(0,-7),n instanceof Ember.Binding?(n=n.copy(),n.to(i)):n=new Ember.Binding(i,n),n.connect(e),e[r]=n);t.bindings={}}}function d(e,t){return p(e,t||N(e)),e}function f(e,t,r,n,i){var o,a=t.methodName;return n[a]||i[a]?(o=i[a],t=n[a]):r.descs[a]?(t=r.descs[a],o=void 0):(t=void 0,o=e[a]),{desc:t,value:o}}function b(e,t,r,n,i){var o=r[n];if(o)for(var a=0,s=o.length;s>a;a++)Ember[i](e,o[a],null,t)}function E(e,t,r){var n=e[t];"function"==typeof n&&(b(e,t,n,"__ember_observesBefore__","removeBeforeObserver"),b(e,t,n,"__ember_observes__","removeObserver"),b(e,t,n,"__ember_listens__","removeListener")),"function"==typeof r&&(b(e,t,r,"__ember_observesBefore__","addBeforeObserver"),b(e,t,r,"__ember_observes__","addObserver"),b(e,t,r,"__ember_listens__","addListener"))}function v(r,n,i){var o,a,s,u={},l={},c=N(r),p=[];r._super=e,h(n,t(r),u,l,r,p);for(var b=0,v=p.length;v>b;b++)if(o=p[b],"constructor"!==o&&l.hasOwnProperty(o)&&(s=u[o],a=l[o],s!==_)){for(;s&&s instanceof C;){var g=f(r,s,c,u,l);s=g.desc,a=g.value}(void 0!==s||void 0!==a)&&(E(r,o,a),m(r,o,a,c),S(r,o,s,a,c))}return i||d(r,c),r}function g(e,t,r){var n=V(e);if(r[n])return!1;if(r[n]=!0,e===t)return!0;for(var i=e.mixins,o=i?i.length:0;--o>=0;)if(g(i[o],t,r))return!0;return!1}function y(e,t,r){if(!r[V(t)])if(r[V(t)]=!0,t.properties){var n=t.properties;for(var i in n)n.hasOwnProperty(i)&&(e[i]=!0)}else t.mixins&&P.call(t.mixins,function(t){y(e,t,r)})}var w,_,C,O=Ember.ArrayPolyfills.map,A=Ember.ArrayPolyfills.indexOf,P=Ember.ArrayPolyfills.forEach,T=[].slice,x=Ember.create,S=Ember.defineProperty,V=Ember.guidFor,N=Ember.meta,I=Ember.META_KEY,R=Ember.expandProperties,k={},D=Ember.IS_BINDING=/^.+Binding$/;Ember.mixin=function(e){var t=T.call(arguments,1);return v(e,t,!1),e},Ember.Mixin=function(){return r(this,arguments)},w=Ember.Mixin,w.prototype={properties:null,mixins:null,ownerConstructor:null},w._apply=v,w.applyPartial=function(e){var t=T.call(arguments,1);return v(e,t,!0)},w.finishPartial=d,Ember.anyUnprocessedMixins=!1,w.create=function(){Ember.anyUnprocessedMixins=!0;var e=this;return r(new e,arguments)};var j=w.prototype;j.reopen=function(){var e,t;this.properties?(e=w.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],Ember.assert("Expected hash or Mixin instance, got "+Object.prototype.toString.call(e),"object"==typeof e&&null!==e&&"[object Array]"!==Object.prototype.toString.call(e)),e instanceof w?i.push(e):(t=w.create(),t.properties=e,i.push(t));return this},j.apply=function(e){return v(e,[this],!1)},j.applyPartial=function(e){return v(e,[this],!0)},j.detect=function(e){if(!e)return!1;if(e instanceof w)return g(e,this,{});var t=e[I],r=t&&t.mixins;return r?!!r[V(this)]:!1},j.without=function(){var e=new w(this);return e._without=T.call(arguments),e},j.keys=function(){var e={},t={},r=[];y(e,this,t);for(var n in e)e.hasOwnProperty(n)&&r.push(n);return r},w.mixins=function(e){var t=e[I],r=t&&t.mixins,n=[];if(!r)return n;for(var i in r){var o=r[i];o.properties||n.push(o)}return n},_=new Ember.Descriptor,_.toString=function(){return"(Required Property)"},Ember.required=function(){return _},C=function(e){this.methodName=e},C.prototype=new Ember.Descriptor,Ember.aliasMethod=function(e){return new C(e)},Ember.observer=function(){var e,t=T.call(arguments,-1)[0],r=function(t){e.push(t)},n=T.call(arguments,0,-1);"function"!=typeof t&&(t=arguments[0],n=T.call(arguments,1)),e=[];for(var i=0;ie;e++){var r=arguments[e];Ember.assert("Immediate observers must observe internal properties only, not properties on other objects.","string"!=typeof r||-1===r.indexOf("."))}return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(){var e,t=T.call(arguments,-1)[0],r=function(t){e.push(t)},n=T.call(arguments,0,-1);"function"!=typeof t&&(t=arguments[0],n=T.call(arguments,1)),e=[];for(var i=0;ir;r++)if(e[r]===t)return r;return-1},r=function(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t};e["default"]={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e._promiseCallbacks=void 0,e},on:function(e,n){var i,o=r(this);i=o[e],i||(i=o[e]=[]),-1===t(i,n)&&i.push(n)},off:function(e,n){var i,o,a=r(this);return n?(i=a[e],o=t(i,n),void(-1!==o&&i.splice(o,1))):void(a[e]=[])},trigger:function(e,t){var n,i,o=r(this);if(n=o[e])for(var a=0;at;t++)e[t]&&i.push(n[t]);return i})})}var o=e["default"],a=t["default"],s=r.isFunction,u=r.isArray;n["default"]=i}),e("rsvp/hash",["./promise","./utils","exports"],function(e,t,r){"use strict";var n=e["default"],i=t.isNonThenable,o=t.keysOf;r["default"]=function(e){return new n(function(t,r){function a(e){return function(r){c[e]=r,0===--m&&t(c)}}function s(e){m=0,r(e)}var u,l,c={},h=o(e),m=h.length;if(0===m)return void t(c);for(var p=0;ps;s++)l.push(t(n[s]));return i(l,r)})}}),e("rsvp/node",["./promise","exports"],function(e,t){"use strict";function r(e,t){return function(r,n){r?t(r):e(arguments.length>2?i.call(arguments,1):n)}}var n=e["default"],i=Array.prototype.slice;t["default"]=function(e,t){return function(){var o=i.call(arguments),a=this||t;return new n(function(t,i){n.all(o).then(function(n){try{n.push(r(t,i)),e.apply(a,n)}catch(o){i(o)}})})}}}),e("rsvp/promise",["./config","./events","./instrument","./utils","./promise/cast","./promise/all","./promise/race","./promise/resolve","./promise/reject","exports"],function(e,t,r,n,i,o,a,s,u,l){"use strict";function c(){}function h(e,t){if(!A(e))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof h))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._id=R++,this._label=t,this._subscribers=[],_.instrument&&C("created",this),c!==e&&m(e,this)}function m(e,t){function r(e){E(t,e)}function n(e){g(t,e)}try{e(r,n)}catch(i){n(i)}}function p(e,t,r,n){var i=e._subscribers,o=i.length;i[o]=t,i[o+j]=r,i[o+M]=n}function d(e,t){var r,n,i=e._subscribers,o=e._detail;_.instrument&&C(t===j?"fulfilled":"rejected",e);for(var a=0;aa;a++){if(n=t[a],o=i(e,n.fullName),void 0===o)throw new Error("Attempting to inject an unknown injection: `"+n.fullName+"`");r[n.property]=o}return r}function u(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 l(e,t){var r,n=t,i=e.resolve(n),o=e.factoryCache,a=t.split(":")[0];if(void 0!==i){if(o.has(t))return o.get(t);if(!i||"function"!=typeof i.extend||!Ember.MODEL_FACTORY_INJECTIONS&&"model"===a)return i;var s=c(e,t),u=h(e,t);return u._toString=e.makeToString(i,t),r=i.extend(s),r.reopenClass(u),o.set(t,r),r}}function c(e,t){var r=t.split(":"),n=r[0],i=[];return i=i.concat(e.typeInjections.get(n)||[]),i=i.concat(e.injections[t]||[]),i=s(e,i),i._debugContainerKey=t,i.container=e,i}function h(e,t){var r=t.split(":"),n=r[0],i=[];return i=i.concat(e.factoryTypeInjections.get(n)||[]),i=i.concat(e.factoryInjections[t]||[]),i=s(e,i),i._debugContainerKey=t,i}function m(e,t){var r=l(e,t);return u(e,t,"instantiate")===!1?r:r?"function"==typeof r.extend?r.create():r.create(c(e,t)):void 0}function p(e,t){e.cache.eachLocal(function(r,n){u(e,r,"instantiate")!==!1&&t(n)})}function d(e){e.cache.eachLocal(function(t,r){u(e,t,"instantiate")!==!1&&r.destroy()}),e.cache.dict={}}function f(e,t,r,n){var i=e.get(t);i||(i=[],e.set(t,i)),i.push({property:r,fullName:n})}function b(e){if(!g.test(e))throw new TypeError("Invalid Fullname, expected: `type:name` got: "+e)}function E(e,t,r,n){var i=e[t]=e[t]||[];i.push({property:r,fullName:n})}var v=e["default"];r.prototype={parent:null,children:null,resolver:null,registry:null,cache:null,typeInjections:null,injections:null,_options:null,_typeOptions:null,child:function(){var e=new r(this);return this.children.push(e),e},set:function(e,t,r){e[t]=r},register:function(e,t,r){if(b(e),void 0===t)throw new TypeError("Attempting to register an unknown factory: `"+e+"`");var n=this.normalize(e);if(this.cache.has(n))throw new Error("Cannot re-register: `"+e+"`, as it has already been looked up.");this.registry.set(n,t),this._options.set(n,r||{})},unregister:function(e){b(e);var t=this.normalize(e);this.registry.remove(t),this.cache.remove(t),this.factoryCache.remove(t),this.resolveCache.remove(t),this._options.remove(t)},resolve:function(e){b(e);var t=this.normalize(e),r=this.resolveCache.get(t);if(r)return r;var n=this.resolver(t)||this.registry.get(t);return this.resolveCache.set(t,n),n},describe:function(e){return e},normalize:function(e){return e},makeToString:function(e){return e.toString()},lookup:function(e,t){return b(e),i(this,this.normalize(e),t)},lookupFactory:function(e){return b(e),l(this,this.normalize(e))},has:function(e){return b(e),n(this,this.normalize(e))},optionsForType:function(e,t){this.parent&&o("optionsForType"),this._typeOptions.set(e,t)},options:function(e,t){this.optionsForType(e,t)},typeInjection:function(e,t,r){b(r),this.parent&&o("typeInjection"),f(this.typeInjections,e,t,r)},injection:function(e,t,r){this.parent&&o("injection"),b(r);var n=this.normalize(r);if(-1===e.indexOf(":"))return this.typeInjection(e,t,n);b(e);var i=this.normalize(e);E(this.injections,i,t,n)},factoryTypeInjection:function(e,t,r){this.parent&&o("factoryTypeInjection"),f(this.factoryTypeInjections,e,t,this.normalize(r))},factoryInjection:function(e,t,r){this.parent&&o("injection");var n=this.normalize(e),i=this.normalize(r);return b(r),-1===e.indexOf(":")?this.factoryTypeInjection(n,t,i):(b(e),void E(this.factoryInjections,n,t,i))},destroy:function(){for(var e=0,t=this.children.length;t>e;e++)this.children[e].destroy();this.children=[],p(this,function(e){e.destroy()}),this.parent=void 0,this.isDestroyed=!0},reset:function(){for(var e=0,t=this.children.length;t>e;e++)d(this.children[e]);d(this)}};var g=/^[^:]+.+:[^:]+$/;t["default"]=r}),e("container/inheriting_dict",["exports"],function(e){"use strict";function t(e){this.parent=e,this.dict={}}t.prototype={parent:null,dict:null,get:function(e){var t=this.dict;return t.hasOwnProperty(e)?t[e]:this.parent?this.parent.get(e):void 0},set:function(e,t){this.dict[e]=t},remove:function(e){delete this.dict[e]},has:function(e){var t=this.dict;return t.hasOwnProperty(e)?!0:this.parent?this.parent.has(e):!1},eachLocal:function(e,t){var r=this.dict;for(var n in r)r.hasOwnProperty(n)&&e.call(t,n,r[n])}},e["default"]=t}),e("container",["container/container","exports"],function(e,t){"use strict";Ember.MODEL_FACTORY_INJECTIONS=!1||!!Ember.ENV.MODEL_FACTORY_INJECTIONS;var r=e["default"];t["default"]=r})}(),function(){function e(r,n,i,o){var a,s,u;if("object"!=typeof r||null===r)return r;if(n&&(s=t(i,r))>=0)return o[s];if(Ember.assert("Cannot clone an Ember.Object that does not implement Ember.Copyable",!(r instanceof Ember.Object)||Ember.Copyable&&Ember.Copyable.detect(r)),"array"===Ember.typeOf(r)){if(a=r.slice(),n)for(s=a.length;--s>=0;)a[s]=e(a[s],n,i,o)}else if(Ember.Copyable&&Ember.Copyable.detect(r))a=r.copy(n,i,o);else if(r instanceof Date)a=new Date(r.getTime());else{a={};for(u in r)r.hasOwnProperty(u)&&"__"!==u.substring(0,2)&&(a[u]=n?e(r[u],n,i,o):r[u])}return n&&(i.push(r),o.push(a)),a}var t=Ember.EnumerableUtils.indexOf;if(Ember.compare=function i(e,t){if(e===t)return 0;var r=Ember.typeOf(e),n=Ember.typeOf(t),o=Ember.Comparable;if(o){if("instance"===r&&o.detect(e.constructor))return e.constructor.compare(e,t);if("instance"===n&&o.detect(t.constructor))return 1-t.constructor.compare(t,e)}var a=Ember.ORDER_DEFINITION_MAPPING;if(!a){var s=Ember.ORDER_DEFINITION;a=Ember.ORDER_DEFINITION_MAPPING={};var u,l;for(u=0,l=s.length;l>u;++u)a[s[u]]=u;delete Ember.ORDER_DEFINITION}var c=a[r],h=a[n];if(h>c)return-1;if(c>h)return 1;switch(r){case"boolean":case"number":return t>e?-1:e>t?1:0;case"string":var m=e.localeCompare(t);return 0>m?-1:m>0?1:0;case"array":for(var p=e.length,d=t.length,f=Math.min(p,d),b=0,E=0;0===b&&f>E;)b=i(e[E],t[E]),E++;return 0!==b?b:d>p?-1:p>d?1:0;case"instance":return Ember.Comparable&&Ember.Comparable.detect(e)?e.compare(e,t):0;case"date":var v=e.getTime(),g=t.getTime();return g>v?-1:v>g?1:0;default:return 0}},Ember.copy=function(t,r){return"object"!=typeof t||null===t?t:Ember.Copyable&&Ember.Copyable.detect(t)?t.copy(r):e(t,r,r?[]:null,r?[]:null)},Ember.isEqual=function(e,t){return e&&"function"==typeof e.isEqual?e.isEqual(t):e===t},Ember.ORDER_DEFINITION=Ember.ENV.ORDER_DEFINITION||["undefined","null","boolean","number","string","array","object","instance","function","class","date"],Ember.keys=Object.keys,!Ember.keys||Ember.create.isSimulated){var r=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","valueOf","toLocaleString","toString"],n=function(e,r,n){"__"!==n.substring(0,2)&&"_super"!==n&&(t(r,n)>=0||e.hasOwnProperty(n)&&r.push(n))};Ember.keys=function(e){var t,i=[];for(t in e)n(e,i,t);for(var o=0,a=r.length;a>o;o++)t=r[o],n(e,i,t);return i}}}(),function(){var e=/[ _]/g,t={},r=/([a-z\d])([A-Z])/g,n=/(\-|_|\.|\s)+(.)?/g,i=/([a-z\d])([A-Z]+)/g,o=/\-|\s+/g;Ember.STRINGS={},Ember.String={fmt:function(e,t){var r=0;return e.replace(/%@([0-9]+)?/g,function(e,n){return n=n?parseInt(n,10)-1:r++,e=t[n],null===e?"(null)":void 0===e?"":Ember.inspect(e)})},loc:function(e,t){return e=Ember.STRINGS[e]||e,Ember.String.fmt(e,t)},w:function(e){return e.split(/\s+/)},decamelize:function(e){return e.replace(r,"$1_$2").toLowerCase()},dasherize:function(r){var n,i=t,o=i.hasOwnProperty(r);return o?i[r]:(n=Ember.String.decamelize(r).replace(e,"-"),i[r]=n,n)},camelize:function(e){return e.replace(n,function(e,t,r){return r?r.toUpperCase():""}).replace(/^([A-Z])/,function(e){return e.toLowerCase()})},classify:function(e){for(var t=e.split("."),r=[],n=0,i=t.length;i>n;n++){var o=Ember.String.camelize(t[n]);r.push(o.charAt(0).toUpperCase()+o.substr(1))}return r.join(".")},underscore:function(e){return e.replace(i,"$1_$2").replace(o,"_").toLowerCase()},capitalize:function(e){return e.charAt(0).toUpperCase()+e.substr(1)}}}(),function(){var e=Ember.String.fmt,t=Ember.String.w,r=Ember.String.loc,n=Ember.String.camelize,i=Ember.String.decamelize,o=Ember.String.dasherize,a=Ember.String.underscore,s=Ember.String.capitalize,u=Ember.String.classify;(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)&&(String.prototype.fmt=function(){return e(this,arguments)},String.prototype.w=function(){return t(this)},String.prototype.loc=function(){return r(this,arguments)},String.prototype.camelize=function(){return n(this)},String.prototype.decamelize=function(){return i(this)},String.prototype.dasherize=function(){return o(this)},String.prototype.underscore=function(){return a(this)},String.prototype.classify=function(){return u(this)},String.prototype.capitalize=function(){return s(this)})}(),function(){var e=Ember.get,t=Ember.set,r=Array.prototype.slice,n=Ember.getProperties;Ember.Observable=Ember.Mixin.create({get:function(t){return e(this,t)},getProperties:function(){return n.apply(null,[this].concat(r.call(arguments)))},set:function(e,r){return t(this,e,r),this},setProperties:function(e){return Ember.setProperties(this,e)},beginPropertyChanges:function(){return Ember.beginPropertyChanges(),this},endPropertyChanges:function(){return Ember.endPropertyChanges(),this},propertyWillChange:function(e){return Ember.propertyWillChange(this,e),this},propertyDidChange:function(e){return Ember.propertyDidChange(this,e),this},notifyPropertyChange:function(e){return this.propertyWillChange(e),this.propertyDidChange(e),this},addBeforeObserver:function(e,t,r){Ember.addBeforeObserver(this,e,t,r)},addObserver:function(e,t,r){Ember.addObserver(this,e,t,r)},removeObserver:function(e,t,r){Ember.removeObserver(this,e,t,r)},hasObserverFor:function(e){return Ember.hasListeners(this,e+":change")},getWithDefault:function(e,t){return Ember.getWithDefault(this,e,t)},incrementProperty:function(r,n){return Ember.isNone(n)&&(n=1),Ember.assert("Must pass a numeric value to incrementProperty",!isNaN(parseFloat(n))&&isFinite(n)),t(this,r,(e(this,r)||0)+n),e(this,r)},decrementProperty:function(r,n){return Ember.isNone(n)&&(n=1),Ember.assert("Must pass a numeric value to decrementProperty",!isNaN(parseFloat(n))&&isFinite(n)),t(this,r,(e(this,r)||0)-n),e(this,r)},toggleProperty:function(r){return t(this,r,!e(this,r)),e(this,r)},cacheFor:function(e){return Ember.cacheFor(this,e)},observersForKey:function(e){return Ember.observersFor(this,e)}})}(),function(){function e(){var e,t,o=!1,a=function(){o||a.proto(),n(this,i,w),n(this,"__nextSuper",y);var u=s(this),l=u.proto;if(u.proto=this,e){var m=e;e=null,this.reopen.apply(this,m)}if(t){var p=t;t=null;for(var d=this.concatenatedProperties,f=0,E=p.length;E>f;f++){var _=p[f];if(Ember.assert("Ember.Object.create no longer supports mixing in other definitions, use createWithMixins instead.",!(_ instanceof Ember.Mixin)),"object"!=typeof _&&void 0!==_)throw new Ember.Error("Ember.Object.create only accepts objects.");if(_)for(var C=Ember.keys(_),O=0,A=C.length;A>O;O++){var P=C[O];if(_.hasOwnProperty(P)){var T=_[P],x=Ember.IS_BINDING;if(x.test(P)){var S=u.bindings;S?u.hasOwnProperty("bindings")||(S=u.bindings=r(u.bindings)):S=u.bindings={},S[P]=T}var V=u.descs[P];if(Ember.assert("Ember.Object.create no longer supports defining computed properties. Define computed properties using extend() or reopen() before calling create().",!(T instanceof Ember.ComputedProperty)),Ember.assert("Ember.Object.create no longer supports defining methods that call _super.",!("function"==typeof T&&-1!==T.toString().indexOf("._super"))),Ember.assert("`actions` must be provided at extend time, not at create time, when Ember.ActionHandler is used (i.e. views, controllers & routes).",!("actions"===P&&Ember.ActionHandler.detect(this))),d&&g(d,P)>=0){var N=this[P];T=N?"function"==typeof N.concat?N.concat(T):Ember.makeArray(N).concat(T):Ember.makeArray(T)}V?V.set(this,P,T):"function"!=typeof this.setUnknownProperty||P in this?v?Ember.defineProperty(this,P,null,T):this[P]=T:this.setUnknownProperty(P,T)}}}}b(this,u),this.init.apply(this,arguments),u.proto=l,c(this),h(this,"init")};return a.toString=d.prototype.toString,a.willReopen=function(){o&&(a.PrototypeMixin=d.create(a.PrototypeMixin)),o=!1},a._initMixins=function(t){e=t},a._initProperties=function(e){t=e},a.proto=function(){var e=a.superclass;return e&&e.proto(),o||(o=!0,a.PrototypeMixin.applyPartial(a.prototype),l(a.prototype)),this.prototype},a}function t(e){return function(){return e}}var r=(Ember.set,Ember.get,Ember.create),n=Ember.platform.defineProperty,i=Ember.GUID_KEY,o=Ember.guidFor,a=Ember.generateGuid,s=Ember.meta,u=Ember.META_KEY,l=Ember.rewatch,c=Ember.finishChains,h=Ember.sendEvent,m=Ember.destroy,p=Ember.run.schedule,d=Ember.Mixin,f=d._apply,b=d.finishPartial,E=d.prototype.reopen,v=Ember.ENV.MANDATORY_SETTER,g=Ember.EnumerableUtils.indexOf,y={configurable:!0,writable:!0,enumerable:!1,value:void 0},w={configurable:!0,writable:!0,enumerable:!1,value:null},_=e();_.toString=function(){return"Ember.CoreObject"},_.PrototypeMixin=d.create({reopen:function(){return f(this,arguments,!0),this},init:function(){},concatenatedProperties:null,isDestroyed:!1,isDestroying:!1,destroy:function(){return this.isDestroying?void 0:(this.isDestroying=!0,p("actions",this,this.willDestroy),p("destroy",this,this._scheduledDestroy),this)},willDestroy:Ember.K,_scheduledDestroy:function(){this.isDestroyed||(m(this),this.isDestroyed=!0)},bind:function(e,t){return t instanceof Ember.Binding||(t=Ember.Binding.from(t)),t.to(e).connect(this),t},toString:function(){var e="function"==typeof this.toStringExtension,r=e?":"+this.toStringExtension():"",n="<"+this.constructor.toString()+":"+o(this)+r+">";return this.toString=t(n),n}}),_.PrototypeMixin.ownerConstructor=_,Ember.config.overridePrototypeMixin&&Ember.config.overridePrototypeMixin(_.PrototypeMixin),_.__super__=null;var C=d.create({ClassMixin:Ember.required(),PrototypeMixin:Ember.required(),isClass:!0,isMethod:!1,extend:function(){var t,n=e();return n.ClassMixin=d.create(this.ClassMixin),n.PrototypeMixin=d.create(this.PrototypeMixin),n.ClassMixin.ownerConstructor=n,n.PrototypeMixin.ownerConstructor=n,E.apply(n.PrototypeMixin,arguments),n.superclass=this,n.__super__=this.prototype,t=n.prototype=r(this.prototype),t.constructor=n,a(t),s(t).proto=t,n.ClassMixin.apply(n),n},createWithMixins:function(){var e=this;return arguments.length>0&&this._initMixins(arguments),new e},create:function(){var e=this;return arguments.length>0&&this._initProperties(arguments),new e},reopen:function(){return this.willReopen(),E.apply(this.PrototypeMixin,arguments),this},reopenClass:function(){return E.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=this.proto()[u],r=t&&t.descs[e];return Ember.assert("metaForProperty() could not find a computed property with key '"+e+"'.",!!r&&r instanceof Ember.ComputedProperty),r._meta||{}},eachComputedProperty:function(e,t){var r,n=this.proto(),i=s(n).descs,o={};for(var a in i)r=i[a],r instanceof Ember.ComputedProperty&&e.call(t||this,a,r._meta||o)}});C.ownerConstructor=_,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(C),_.ClassMixin=C,C.apply(_),Ember.CoreObject=_}(),function(){Ember.Object=Ember.CoreObject.extend(Ember.Observable),Ember.Object.toString=function(){return"Ember.Object"}}(),function(){function e(t,r,i){var a=t.length;l[t.join(".")]=r;for(var s in r)if(c.call(r,s)){var u=r[s];if(t[a]=s,u&&u.toString===n)u.toString=o(t.join(".")),u[m]=t.join(".");else if(u&&u.isNamespace){if(i[h(u)])continue;i[h(u)]=!0,e(t,u,i)}}t.length=a}function t(){var e,t,r=Ember.Namespace,n=Ember.lookup;if(!r.PROCESSED)for(var i in n)if("parent"!==i&&"top"!==i&&"frameElement"!==i&&"webkitStorageInfo"!==i&&!("globalStorage"===i&&n.StorageList&&n.globalStorage instanceof n.StorageList||n.hasOwnProperty&&!n.hasOwnProperty(i))){try{e=Ember.lookup[i],t=e&&e.isNamespace}catch(o){continue}t&&(Ember.deprecate("Namespaces should not begin with lowercase.",/^[A-Z]/.test(i)),e[m]=i)}}function r(e){var t=e.superclass;return t?t[m]?t[m]:r(t):void 0}function n(){Ember.BOOTED||this[m]||i();var e;if(this[m])e=this[m];else if(this._toString)e=this._toString;else{var t=r(this);e=t?"(subclass of "+t+")":"(unknown mixin)",this.toString=o(e)}return e}function i(){var r=!u.PROCESSED,n=Ember.anyUnprocessedMixins;if(r&&(t(),u.PROCESSED=!0),r||n){for(var i,o=u.NAMESPACES,a=0,s=o.length;s>a;a++)i=o[a],e([i.toString()],i,{});Ember.anyUnprocessedMixins=!1}}function o(e){return function(){return e}}var a=Ember.get,s=Ember.ArrayPolyfills.indexOf,u=Ember.Namespace=Ember.Object.extend({isNamespace:!0,init:function(){Ember.Namespace.NAMESPACES.push(this),Ember.Namespace.PROCESSED=!1},toString:function(){var e=a(this,"name");return e?e:(t(),this[Ember.GUID_KEY+"_name"])},nameClasses:function(){e([this.toString()],this,{})},destroy:function(){var e=Ember.Namespace.NAMESPACES;Ember.lookup[this.toString()]=void 0,delete Ember.Namespace.NAMESPACES_BY_ID[this.toString()],e.splice(s.call(e,this),1),this._super()}});u.reopenClass({NAMESPACES:[Ember],NAMESPACES_BY_ID:{},PROCESSED:!1,processAll:i,byName:function(e){return Ember.BOOTED||i(),l[e]}});var l=u.NAMESPACES_BY_ID,c={}.hasOwnProperty,h=Ember.guidFor,m=Ember.NAME_KEY=Ember.GUID_KEY+"_name";Ember.Mixin.prototype.toString=n}(),function(){function e(e,t){var r=t.slice(8);r in this||l(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,o=Ember.addBeforeObserver,a=Ember.addObserver,s=Ember.removeBeforeObserver,u=Ember.removeObserver,l=Ember.propertyWillChange,c=Ember.propertyDidChange,h=Ember.meta,m=Ember.defineProperty;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer("content",function(){Ember.assert("Can't set ObjectProxy's content to itself",this.get("content")!==this)}),isTruthy:Ember.computed.bool("content"),_debugContainerKey:null,willWatchProperty:function(r){var n="content."+r;o(this,n,null,e),a(this,n,null,t)},didUnwatchProperty:function(r){var n="content."+r;s(this,n,null,e),u(this,n,null,t)},unknownProperty:function(e){var t=r(this,"content");return t?r(t,e):void 0},setUnknownProperty:function(e,t){var o=h(this);if(o.proto===this)return m(this,e,null,t),t;var a=r(this,"content");return Ember.assert(i("Cannot delegate set('%@', %@) to the 'content' property of object proxy %@: its 'content' is undefined.",[e,t,this]),a),n(a,e,t)}})}(),function(){function e(){return 0===s.length?{}:s.pop()}function t(e){return s.push(e),null}function r(e,t){function r(r){var o=n(r,e);return i?t===o:!!o}var i=2===arguments.length;return r}var n=Ember.get,i=Ember.set,o=Array.prototype.slice,a=Ember.EnumerableUtils.indexOf,s=[];Ember.Enumerable=Ember.Mixin.create({nextObject:Ember.required(Function),firstObject:Ember.computed(function(){if(0===n(this,"length"))return void 0;var r,i=e();return r=this.nextObject(0,null,i),t(i),r}).property("[]"),lastObject:Ember.computed(function(){var r=n(this,"length");if(0===r)return void 0;var i,o=e(),a=0,s=null;do s=i,i=this.nextObject(a++,s,o);while(void 0!==i);return t(o),s}).property("[]"),contains:function(e){return void 0!==this.find(function(t){return t===e})},forEach:function(r,i){if("function"!=typeof r)throw new TypeError;var o=n(this,"length"),a=null,s=e();void 0===i&&(i=null);for(var u=0;o>u;u++){var l=this.nextObject(u,a,s);r.call(i,l,u,this),a=l}return a=null,s=t(s),this},getEach:function(e){return this.mapBy(e)},setEach:function(e,t){return this.forEach(function(r){i(r,e,t)})},map:function(e,t){var r=Ember.A();return this.forEach(function(n,i,o){r[i]=e.call(t,n,i,o)}),r},mapBy:function(e){return this.map(function(t){return n(t,e)})},mapProperty:Ember.aliasMethod("mapBy"),filter:function(e,t){var r=Ember.A();return this.forEach(function(n,i,o){e.call(t,n,i,o)&&r.push(n)}),r},reject:function(e,t){return this.filter(function(){return!e.apply(t,arguments)})},filterBy:function(){return this.filter(r.apply(this,arguments))},filterProperty:Ember.aliasMethod("filterBy"),rejectBy:function(e,t){var r=function(r){return n(r,e)===t},i=function(t){return!!n(t,e)},o=2===arguments.length?r:i;return this.reject(o)},rejectProperty:Ember.aliasMethod("rejectBy"),find:function(r,i){var o=n(this,"length");void 0===i&&(i=null);for(var a,s,u=null,l=!1,c=e(),h=0;o>h&&!l;h++)a=this.nextObject(h,u,c),(l=r.call(i,a,h,this))&&(s=a),u=a;return a=u=null,c=t(c),s},findBy:function(){return this.find(r.apply(this,arguments))},findProperty:Ember.aliasMethod("findBy"),every:function(e,t){return!this.find(function(r,n,i){return!e.call(t,r,n,i)})},everyBy:Ember.aliasMethod("isEvery"),everyProperty:Ember.aliasMethod("isEvery"),isEvery:function(){return this.every(r.apply(this,arguments))},any:function(r,i){var o,a,s=n(this,"length"),u=e(),l=!1,c=null;for(void 0===i&&(i=null),a=0;s>a&&!l;a++)o=this.nextObject(a,c,u),l=r.call(i,o,a,this),c=o;return o=c=null,u=t(u),l},some:Ember.aliasMethod("any"),isAny:function(){return this.any(r.apply(this,arguments))},anyBy:Ember.aliasMethod("isAny"),someProperty:Ember.aliasMethod("isAny"),reduce:function(e,t,r){if("function"!=typeof e)throw new TypeError;var n=t;return this.forEach(function(t,i){n=e(n,t,i,this,r)},this),n},invoke:function(e){var t,r=Ember.A();return arguments.length>1&&(t=o.call(arguments,1)),this.forEach(function(n,i){var o=n&&n[e];"function"==typeof o&&(r[i]=t?o.apply(n,t):n[e]())},this),r},toArray:function(){var e=Ember.A();return this.forEach(function(t,r){e[r]=t}),e},compact:function(){return this.filter(function(e){return null!=e})},without:function(e){if(!this.contains(e))return this;var t=Ember.A();return this.forEach(function(r){r!==e&&(t[t.length]=r)}),t},uniq:function(){var e=Ember.A();return this.forEach(function(t){a(e,t)<0&&e.push(t)}),e},"[]":Ember.computed(function(){return this}),addEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",o=n(this,"hasEnumerableObservers");return o||Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.addListener(this,"@enumerable:before",e,r),Ember.addListener(this,"@enumerable:change",e,i),o||Ember.propertyDidChange(this,"hasEnumerableObservers"),this},removeEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",o=n(this,"hasEnumerableObservers");return o&&Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.removeListener(this,"@enumerable:before",e,r),Ember.removeListener(this,"@enumerable:change",e,i),o&&Ember.propertyDidChange(this,"hasEnumerableObservers"),this},hasEnumerableObservers:Ember.computed(function(){return Ember.hasListeners(this,"@enumerable:change")||Ember.hasListeners(this,"@enumerable:before")}),enumerableContentWillChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||i-r!==0,-1===e&&(e=null),-1===t&&(t=null),Ember.propertyWillChange(this,"[]"),o&&Ember.propertyWillChange(this,"length"),Ember.sendEvent(this,"@enumerable:before",[this,e,t]),this},enumerableContentDidChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||i-r!==0,-1===e&&(e=null),-1===t&&(t=null),Ember.sendEvent(this,"@enumerable:change",[this,e,t]),o&&Ember.propertyDidChange(this,"length"),Ember.propertyDidChange(this,"[]"),this},sortBy:function(){var e=arguments;return this.toArray().sort(function(t,r){for(var i=0;it||t>=e(this,"length")?void 0:e(this,t)},objectsAt:function(e){var t=this;return r(e,function(e){return t.objectAt(e)})},nextObject:function(e){return this.objectAt(e)},"[]":Ember.computed(function(t,r){return void 0!==r&&this.replace(0,e(this,"length"),r),this}),firstObject:Ember.computed(function(){return this.objectAt(0)}),lastObject:Ember.computed(function(){return this.objectAt(e(this,"length")-1)}),contains:function(e){return this.indexOf(e)>=0},slice:function(r,n){var i=Ember.A(),o=e(this,"length");for(t(r)&&(r=0),(t(n)||n>o)&&(n=o),0>r&&(r=o+r),0>n&&(n=o+n);n>r;)i[i.length]=this.objectAt(r++);return i},indexOf:function(t,r){var n,i=e(this,"length");for(void 0===r&&(r=0),0>r&&(r+=i),n=r;i>n;n++)if(this.objectAt(n)===t)return n;return-1},lastIndexOf:function(t,r){var n,i=e(this,"length");for((void 0===r||r>=i)&&(r=i-1),0>r&&(r+=i),n=r;n>=0;n--)if(this.objectAt(n)===t)return n;return-1},addArrayObserver:function(t,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",o=e(this,"hasArrayObservers");return o||Ember.propertyWillChange(this,"hasArrayObservers"),Ember.addListener(this,"@array:before",t,n),Ember.addListener(this,"@array:change",t,i),o||Ember.propertyDidChange(this,"hasArrayObservers"),this},removeArrayObserver:function(t,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",o=e(this,"hasArrayObservers");return o&&Ember.propertyWillChange(this,"hasArrayObservers"),Ember.removeListener(this,"@array:before",t,n),Ember.removeListener(this,"@array:change",t,i),o&&Ember.propertyDidChange(this,"hasArrayObservers"),this},hasArrayObservers:Ember.computed(function(){return Ember.hasListeners(this,"@array:change")||Ember.hasListeners(this,"@array:before")}),arrayContentWillChange:function(t,r,n){void 0===t?(t=0,r=n=-1):(void 0===r&&(r=-1),void 0===n&&(n=-1)),Ember.isWatching(this,"@each")&&e(this,"@each"),Ember.sendEvent(this,"@array:before",[this,t,r,n]);var i,o;if(t>=0&&r>=0&&e(this,"hasEnumerableObservers")){i=[],o=t+r;for(var a=t;o>a;a++)i.push(this.objectAt(a))}else i=r;return this.enumerableContentWillChange(i,n),this},arrayContentDidChange:function(t,r,i){void 0===t?(t=0,r=i=-1):(void 0===r&&(r=-1),void 0===i&&(i=-1));var o,a;if(t>=0&&i>=0&&e(this,"hasEnumerableObservers")){o=[],a=t+i;for(var s=t;a>s;s++)o.push(this.objectAt(s))}else o=i;this.enumerableContentDidChange(r,o),Ember.sendEvent(this,"@array:change",[this,t,r,i]);var u=e(this,"length"),l=n(this,"firstObject"),c=n(this,"lastObject");return this.objectAt(0)!==l&&(Ember.propertyWillChange(this,"firstObject"),Ember.propertyDidChange(this,"firstObject")),this.objectAt(u-1)!==c&&(Ember.propertyWillChange(this,"lastObject"),Ember.propertyDidChange(this,"lastObject")),this},"@each":Ember.computed(function(){return this.__each||(this.__each=new Ember.EachProxy(this)),this.__each})})}(),function(){function e(e,t){return"@this"===t?e:m(e,t)}function t(e,t,r){this.callbacks=e,this.cp=t,this.instanceMeta=r,this.dependentKeysByGuid={},this.trackedArraysByGuid={},this.suspended=!1,this.changedItems={}}function r(e,t,r){Ember.assert("Internal error: trackedArray is null or undefined",r),this.dependentArray=e,this.index=t,this.item=e.objectAt(t),this.trackedArray=r,this.beforeObserver=null,this.observer=null,this.destroyed=!1}function n(e,t,r){return 0>e?Math.max(0,t+e):t>e?e:Math.min(t-r,e)}function i(e,t,r){return Math.min(r,t-e)}function o(e,t,r,n,i,o){var a={arrayChanged:e,index:r,item:t,propertyName:n,property:i};return o&&(a.previousValues=o),a}function a(e,t,r,n,i){O(e,function(a,s){i.setValue(t.addedItem.call(this,i.getValue(),a,o(e,a,s,n,r),i.sugarMeta))},this)}function s(e,t){{var r;e._callbacks()}e._hasInstanceMeta(this,t)?(r=e._instanceMeta(this,t),r.setValue(e.resetValue(r.getValue()))):r=e._instanceMeta(this,t),e.options.initialize&&e.options.initialize.call(this,r.getValue(),{property:e,propertyName:t},r.sugarMeta)}function u(t,r){if(T.test(r))return!1;var n=e(t,r);return Ember.Array.detect(n)}function l(e,t,r){this.context=e,this.propertyName=t,this.cache=d(e).cache,this.dependentArrays={},this.sugarMeta={},this.initialValue=r}function c(t){var r=this;this.options=t,this._dependentKeys=null,this._itemPropertyKeys={},this._previousItemPropertyKeys={},this.readOnly(),this.cacheable(),this.recomputeOnce=function(e){Ember.run.once(this,n,e)};var n=function(t){var n=(r._dependentKeys,r._instanceMeta(this,t)),i=r._callbacks();s.call(this,r,t),n.dependentArraysObserver.suspendArrayObservers(function(){O(r._dependentKeys,function(t){if(Ember.assert("dependent array "+t+" must be an `Ember.Array`. If you are not extending arrays, you will need to wrap native arrays with `Ember.A`",!(Ember.isArray(e(this,t))&&!Ember.Array.detect(e(this,t)))),u(this,t)){var i=e(this,t),o=n.dependentArrays[t];i===o?r._previousItemPropertyKeys[t]&&(delete r._previousItemPropertyKeys[t],n.dependentArraysObserver.setupPropertyObservers(t,r._itemPropertyKeys[t])):(n.dependentArrays[t]=i,o&&n.dependentArraysObserver.teardownObservers(o,t),i&&n.dependentArraysObserver.setupObservers(i,t))}},this)},this),O(r._dependentKeys,function(o){if(u(this,o)){var s=e(this,o);s&&a.call(this,s,i,r,t,n)}},this)};this.func=function(e){return Ember.assert("Computed reduce values require at least one dependent key",r._dependentKeys),n.call(this,e),r._instanceMeta(this,e).getValue()}}function h(e){return e}var m=Ember.get,p=(Ember.set,Ember.guidFor),d=Ember.meta,f=Ember.propertyWillChange,b=Ember.propertyDidChange,E=Ember.addBeforeObserver,v=Ember.removeBeforeObserver,g=Ember.addObserver,y=Ember.removeObserver,w=Ember.ComputedProperty,_=[].slice,C=Ember.create,O=Ember.EnumerableUtils.forEach,A=(Ember.cacheFor.set,Ember.cacheFor.get,Ember.cacheFor.remove,/^(.*)\.@each\.(.*)/),P=/(.*\.@each){2,}/,T=/\.\[\]$/,x=Ember.expandProperties;t.prototype={setValue:function(e){this.instanceMeta.setValue(e,!0)},getValue:function(){return this.instanceMeta.getValue()},setupObservers:function(e,t){this.dependentKeysByGuid[p(e)]=t,e.addArrayObserver(this,{willChange:"dependentArrayWillChange",didChange:"dependentArrayDidChange"}),this.cp._itemPropertyKeys[t]&&this.setupPropertyObservers(t,this.cp._itemPropertyKeys[t])},teardownObservers:function(e,t){var r=this.cp._itemPropertyKeys[t]||[];delete this.dependentKeysByGuid[p(e)],this.teardownPropertyObservers(t,r),e.removeArrayObserver(this,{willChange:"dependentArrayWillChange",didChange:"dependentArrayDidChange"})},suspendArrayObservers:function(e,t){var r=this.suspended;this.suspended=!0,e.call(t),this.suspended=r},setupPropertyObservers:function(t,r){var n=e(this.instanceMeta.context,t),i=e(n,"length"),o=new Array(i);this.resetTransformations(t,o),O(n,function(e,i){var a=this.createPropertyObserverContext(n,i,this.trackedArraysByGuid[t]);o[i]=a,O(r,function(t){E(e,t,this,a.beforeObserver),g(e,t,this,a.observer)},this)},this)},teardownPropertyObservers:function(e,t){var r,n,i,o=this,a=this.trackedArraysByGuid[e];a&&a.apply(function(e,a,s){s!==Ember.TrackedArray.DELETE&&O(e,function(e){e.destroyed=!0,r=e.beforeObserver,n=e.observer,i=e.item,O(t,function(e){v(i,e,o,r),y(i,e,o,n)})})})},createPropertyObserverContext:function(e,t,n){var i=new r(e,t,n);return this.createPropertyObserver(i),i},createPropertyObserver:function(e){var t=this;e.beforeObserver=function(r,n){return t.itemPropertyWillChange(r,n,e.dependentArray,e)},e.observer=function(r,n){return t.itemPropertyDidChange(r,n,e.dependentArray,e)}},resetTransformations:function(e,t){this.trackedArraysByGuid[e]=new Ember.TrackedArray(t)},trackAdd:function(e,t,r){var n=this.trackedArraysByGuid[e];n&&n.addItems(t,r)},trackRemove:function(e,t,r){var n=this.trackedArraysByGuid[e];return n?n.removeItems(t,r):[]},updateIndexes:function(t,r){var n=e(r,"length");t.apply(function(e,t,r){r!==Ember.TrackedArray.DELETE&&(r!==Ember.TrackedArray.RETAIN||e.length!==n||0!==t)&&O(e,function(e,r){e.index=r+t})})},dependentArrayWillChange:function(t,r,a){function s(e){m[h].destroyed=!0,v(l,e,this,m[h].beforeObserver),y(l,e,this,m[h].observer)}if(!this.suspended){var u,l,c,h,m,d=this.callbacks.removedItem,f=p(t),b=this.dependentKeysByGuid[f],E=this.cp._itemPropertyKeys[b]||[],g=e(t,"length"),w=n(r,g,0),_=i(w,g,a);for(m=this.trackRemove(b,w,_),h=_-1;h>=0&&(c=w+h,!(c>=g));--h)l=t.objectAt(c),O(E,s,this),u=o(t,l,c,this.instanceMeta.propertyName,this.cp),this.setValue(d.call(this.instanceMeta.context,this.getValue(),l,u,this.instanceMeta.sugarMeta)) -}},dependentArrayDidChange:function(t,r,i,a){if(!this.suspended){var s,u,l=this.callbacks.addedItem,c=p(t),h=this.dependentKeysByGuid[c],m=new Array(a),d=this.cp._itemPropertyKeys[h],f=e(t,"length"),b=n(r,f,a);O(t.slice(b,b+a),function(e,r){d&&(u=m[r]=this.createPropertyObserverContext(t,b+r,this.trackedArraysByGuid[h]),O(d,function(t){E(e,t,this,u.beforeObserver),g(e,t,this,u.observer)},this)),s=o(t,e,b+r,this.instanceMeta.propertyName,this.cp),this.setValue(l.call(this.instanceMeta.context,this.getValue(),e,s,this.instanceMeta.sugarMeta))},this),this.trackAdd(h,b,m)}},itemPropertyWillChange:function(t,r,n,i){var o=p(t);this.changedItems[o]||(this.changedItems[o]={array:n,observerContext:i,obj:t,previousValues:{}}),this.changedItems[o].previousValues[r]=e(t,r)},itemPropertyDidChange:function(){this.flushChanges()},flushChanges:function(){var e,t,r,n=this.changedItems;for(e in n)t=n[e],t.observerContext.destroyed||(this.updateIndexes(t.observerContext.trackedArray,t.observerContext.dependentArray),r=o(t.array,t.obj,t.observerContext.index,this.instanceMeta.propertyName,this.cp,t.previousValues),this.setValue(this.callbacks.removedItem.call(this.instanceMeta.context,this.getValue(),t.obj,r,this.instanceMeta.sugarMeta)),this.setValue(this.callbacks.addedItem.call(this.instanceMeta.context,this.getValue(),t.obj,r,this.instanceMeta.sugarMeta)));this.changedItems={}}},l.prototype={getValue:function(){return this.propertyName in this.cache?this.cache[this.propertyName]:this.initialValue},setValue:function(e,t){e!==this.cache[this.propertyName]&&(t&&f(this.context,this.propertyName),void 0===e?delete this.cache[this.propertyName]:this.cache[this.propertyName]=e,t&&b(this.context,this.propertyName))}},Ember.ReduceComputedProperty=c,c.prototype=C(w.prototype),c.prototype._callbacks=function(){if(!this.callbacks){var e=this.options;this.callbacks={removedItem:e.removedItem||h,addedItem:e.addedItem||h}}return this.callbacks},c.prototype._hasInstanceMeta=function(e,t){return!!d(e).cacheMeta[t]},c.prototype._instanceMeta=function(e,r){var n=d(e).cacheMeta,i=n[r];return i||(i=n[r]=new l(e,r,this.initialValue()),i.dependentArraysObserver=new t(this._callbacks(),this,i,e,r,i.sugarMeta)),i},c.prototype.initialValue=function(){return"function"==typeof this.options.initialValue?this.options.initialValue():this.options.initialValue},c.prototype.resetValue=function(){return this.initialValue()},c.prototype.itemPropertyKey=function(e,t){this._itemPropertyKeys[e]=this._itemPropertyKeys[e]||[],this._itemPropertyKeys[e].push(t)},c.prototype.clearItemPropertyKeys=function(e){this._itemPropertyKeys[e]&&(this._previousItemPropertyKeys[e]=this._itemPropertyKeys[e],this._itemPropertyKeys[e]=[])},c.prototype.property=function(){var e,t,r=this,n=_.call(arguments),i=new Ember.Set;return O(n,function(n){if(P.test(n))throw new Ember.Error("Nested @each properties not supported: "+n);if(e=A.exec(n)){t=e[1];var o=e[2],a=function(e){r.itemPropertyKey(t,e)};x(o,a),i.add(t)}else i.add(n)}),w.prototype.property.apply(this,i.toArray())},Ember.reduceComputed=function(e){var t;if(arguments.length>1&&(t=_.call(arguments,0,-1),e=_.call(arguments,-1)[0]),"object"!=typeof e)throw new Ember.Error("Reduce Computed Property declared without an options hash");if(!("initialValue"in e))throw new Ember.Error("Reduce Computed Property declared without an initial value");var r=new c(e);return t&&r.property.apply(r,t),r}}(),function(){function e(){var e=this;return t.apply(this,arguments),this.func=function(t){return function(r){return e._hasInstanceMeta(this,r)||i(e._dependentKeys,function(t){Ember.addObserver(this,t,function(){e.recomputeOnce.call(this,r)})},this),t.apply(this,arguments)}}(this.func),this}var t=Ember.ReduceComputedProperty,r=[].slice,n=Ember.create,i=Ember.EnumerableUtils.forEach;Ember.ArrayComputedProperty=e,e.prototype=n(t.prototype),e.prototype.initialValue=function(){return Ember.A()},e.prototype.resetValue=function(e){return e.clear(),e},e.prototype.didChange=function(){},Ember.arrayComputed=function(t){var n;if(arguments.length>1&&(n=r.call(arguments,0,-1),t=r.call(arguments,-1)[0]),"object"!=typeof t)throw new Ember.Error("Array Computed Property declared without an options hash");var i=new e(t);return n&&i.property.apply(i,n),i}}(),function(){function e(e,i,o,a){function s(e){return n(t.detectInstance(e)?r(e,"content"):e)}var u,l,c,h,m;return arguments.length<4&&(a=r(e,"length")),arguments.length<3&&(o=0),o===a?o:(u=o+Math.floor((a-o)/2),l=e.objectAt(u),h=s(l),m=s(i),h===m?u:(c=this.order(l,i),0===c&&(c=m>h?-1:1),0>c?this.binarySearch(e,i,u+1,a):c>0?this.binarySearch(e,i,o,u):u))}var t,r=Ember.get,n=(Ember.set,Ember.guidFor),i=Ember.merge,o=[].slice,a=Ember.EnumerableUtils.forEach,s=Ember.EnumerableUtils.map;Ember.computed.sum=function(e){return Ember.reduceComputed(e,{initialValue:0,addedItem:function(e,t){return e+t},removedItem:function(e,t){return e-t}})},Ember.computed.max=function(e){return Ember.reduceComputed(e,{initialValue:-1/0,addedItem:function(e,t){return Math.max(e,t)},removedItem:function(e,t){return e>t?e:void 0}})},Ember.computed.min=function(e){return Ember.reduceComputed(e,{initialValue:1/0,addedItem:function(e,t){return Math.min(e,t)},removedItem:function(e,t){return t>e?e:void 0}})},Ember.computed.map=function(e,t){var r={addedItem:function(e,r,n){var i=t.call(this,r);return e.insertAt(n.index,i),e},removedItem:function(e,t,r){return e.removeAt(r.index,1),e}};return Ember.arrayComputed(e,r)},Ember.computed.mapBy=function(e,t){var n=function(e){return r(e,t)};return Ember.computed.map(e+".@each."+t,n)},Ember.computed.mapProperty=Ember.computed.mapBy,Ember.computed.filter=function(e,t){var r={initialize:function(e,t,r){r.filteredArrayIndexes=new Ember.SubArray},addedItem:function(e,r,n,i){var o=!!t.call(this,r),a=i.filteredArrayIndexes.addItem(n.index,o);return o&&e.insertAt(a,r),e},removedItem:function(e,t,r,n){var i=n.filteredArrayIndexes.removeItem(r.index);return i>-1&&e.removeAt(i),e}};return Ember.arrayComputed(e,r)},Ember.computed.filterBy=function(e,t,n){var i;return i=2===arguments.length?function(e){return r(e,t)}:function(e){return r(e,t)===n},Ember.computed.filter(e+".@each."+t,i)},Ember.computed.filterProperty=Ember.computed.filterBy,Ember.computed.uniq=function(){var e=o.call(arguments);return e.push({initialize:function(e,t,r){r.itemCounts={}},addedItem:function(e,t,r,i){var o=n(t);return i.itemCounts[o]?++i.itemCounts[o]:i.itemCounts[o]=1,e.addObject(t),e},removedItem:function(e,t,r,i){var o=n(t),a=i.itemCounts;return 0===--a[o]&&e.removeObject(t),e}}),Ember.arrayComputed.apply(null,e)},Ember.computed.union=Ember.computed.uniq,Ember.computed.intersect=function(){var e=function(e){return s(e.property._dependentKeys,function(e){return n(e)})},t=o.call(arguments);return t.push({initialize:function(e,t,r){r.itemCounts={}},addedItem:function(t,r,i,o){var a=n(r),s=(e(i),n(i.arrayChanged)),u=i.property._dependentKeys.length,l=o.itemCounts;return l[a]||(l[a]={}),void 0===l[a][s]&&(l[a][s]=0),1===++l[a][s]&&u===Ember.keys(l[a]).length&&t.addObject(r),t},removedItem:function(t,r,i,o){var a,s=n(r),u=(e(i),n(i.arrayChanged)),l=(i.property._dependentKeys.length,o.itemCounts);return void 0===l[s][u]&&(l[s][u]=0),0===--l[s][u]&&(delete l[s][u],a=Ember.keys(l[s]).length,0===a&&delete l[s],t.removeObject(r)),t}}),Ember.arrayComputed.apply(null,t)},Ember.computed.setDiff=function(e,t){if(2!==arguments.length)throw new Ember.Error("setDiff requires exactly two dependent arrays.");return Ember.arrayComputed(e,t,{addedItem:function(n,i,o){var a=r(this,e),s=r(this,t);return o.arrayChanged===a?s.contains(i)||n.addObject(i):n.removeObject(i),n},removedItem:function(n,i,o){var a=r(this,e),s=r(this,t);return o.arrayChanged===s?a.contains(i)&&n.addObject(i):n.removeObject(i),n}})},t=Ember.ObjectProxy.extend(),Ember.computed.sort=function(n,o){Ember.assert("Ember.computed.sort requires two arguments: an array key to sort and either a sort properties key or sort function",2===arguments.length);var s,u;return"function"==typeof o?s=function(t,r,n){n.order=o,n.binarySearch=e}:(u=o,s=function(i,o,s){function l(){var e,t,i,l=r(this,u),h=s.sortProperties=[],m=s.sortPropertyAscending={};Ember.assert("Cannot sort: '"+u+"' is not an array.",Ember.isArray(l)),o.property.clearItemPropertyKeys(n),a(l,function(r){-1!==(t=r.indexOf(":"))?(e=r.substring(0,t),i="desc"!==r.substring(t+1).toLowerCase()):(e=r,i=!0),h.push(e),m[e]=i,o.property.itemPropertyKey(n,e)}),l.addObserver("@each",this,c)}function c(){Ember.run.once(this,h,o.propertyName)}function h(e){l.call(this),o.property.recomputeOnce.call(this,e)}Ember.addObserver(this,u,c),l.call(this),s.order=function(e,n){for(var i,o,a,s=n instanceof t,u=0;ue;e++){var r=arguments[e];Ember.assert("Immediate observers must observe internal properties only, not properties on other objects.",-1===r.indexOf("."))}return this.observes.apply(this,arguments)},Function.prototype.observesBefore=function(){for(var e=function(e){r.push(e)},r=[],n=0;nr(this,"length"))throw new Ember.Error(e);return this.replace(t,0,[n]),this},removeAt:function(n,i){if("number"==typeof n){if(0>n||n>=r(this,"length"))throw new Ember.Error(e);void 0===i&&(i=1),this.replace(n,i,t)}return this},pushObject:function(e){return this.insertAt(r(this,"length"),e),e},pushObjects:function(e){if(!Ember.Enumerable.detect(e)&&!Ember.isArray(e))throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects");return this.replace(r(this,"length"),0,e),this},popObject:function(){var e=r(this,"length");if(0===e)return null;var t=this.objectAt(e-1);return this.removeAt(e-1,1),t},shiftObject:function(){if(0===r(this,"length"))return null;var e=this.objectAt(0);return this.removeAt(0),e},unshiftObject:function(e){return this.insertAt(0,e),e},unshiftObjects:function(e){return this.replace(0,0,e),this},reverseObjects:function(){var e=r(this,"length");if(0===e)return this;var t=this.toArray().reverse();return this.replace(0,e,t),this},setObjects:function(e){if(0===e.length)return this.clear();var t=r(this,"length");return this.replace(0,t,e),this},removeObject:function(e){for(var t=r(this,"length")||0;--t>=0;){var n=this.objectAt(t);n===e&&this.removeAt(t)}return this},addObject:function(e){return this.contains(e)||this.pushObject(e),this}})}(),function(){{var e=Ember.get;Ember.set}Ember.TargetActionSupport=Ember.Mixin.create({target:null,action:null,actionContext:null,targetObject:Ember.computed(function(){var t=e(this,"target");if("string"===Ember.typeOf(t)){var r=e(this,t);return void 0===r&&(r=e(Ember.lookup,t)),r}return t}).property("target"),actionContextObject:Ember.computed(function(){var t=e(this,"actionContext");if("string"===Ember.typeOf(t)){var r=e(this,t);return void 0===r&&(r=e(Ember.lookup,t)),r}return t}).property("actionContext"),triggerAction:function(t){function r(e,t){var r=[];return t&&r.push(t),r.concat(e)}t=t||{};var n=t.action||e(this,"action"),i=t.target||e(this,"targetObject"),o=t.actionContext;if("undefined"==typeof o&&(o=e(this,"actionContextObject")||this),i&&n){var a;return i.send?a=i.send.apply(i,r(o,n)):(Ember.assert("The action '"+n+"' did not exist on "+i,"function"==typeof i[n]),a=i[n].apply(i,r(o))),a!==!1&&(a=!0),a}return!1}})}(),function(){Ember.Evented=Ember.Mixin.create({on:function(e,t,r){return Ember.addListener(this,e,t,r),this},one:function(e,t,r){return r||(r=t,t=null),Ember.addListener(this,e,t,r,!0),this},trigger:function(e){var t,r,n=[];for(t=1,r=arguments.length;r>t;t++)n.push(arguments[t]);Ember.sendEvent(this,e,n)},off:function(e,t,r){return Ember.removeListener(this,e,t,r),this},has:function(e){return Ember.hasListeners(this,e)}})}(),function(){var e=t("rsvp");if(Ember.FEATURES["ember-runtime-test-friendly-promises"]){var r=function(){Ember.Test&&Ember.Test.adapter&&Ember.Test.adapter.asyncStart()},n=function(){Ember.Test&&Ember.Test.adapter&&Ember.Test.adapter.asyncEnd()};e.configure("async",function(e,t){var i=!Ember.run.currentRunLoop;Ember.testing&&i&&r(),Ember.run.backburner.schedule("actions",function(){Ember.testing&&i&&n(),e(t)})})}else e.configure("async",function(e,t){Ember.run.backburner.schedule("actions",function(){e(t)})});e.Promise.prototype.fail=function(e,t){return Ember.deprecate("RSVP.Promise.fail has been renamed as RSVP.Promise.catch"),this["catch"](e,t)};var i=Ember.get;Ember.DeferredMixin=Ember.Mixin.create({then:function(e,t,r){function n(t){return e(t===a?s:t)}var o,a,s;return s=this,o=i(this,"_deferred"),a=o.promise,a.then(e&&n,t,r)},resolve:function(e){var t,r;t=i(this,"_deferred"),r=t.promise,t.resolve(e===this?r:e)},reject:function(e){i(this,"_deferred").reject(e)},_deferred:Ember.computed(function(){return e.defer("Ember: DeferredMixin - "+this)})})}(),function(){var e=Ember.get,t=Ember.typeOf;Ember.ActionHandler=Ember.Mixin.create({mergedProperties:["_actions"],willMergeMixin:function(e){var r;e._actions||(Ember.assert("'actions' should not be a function","function"!=typeof e.actions),"object"===t(e.actions)?r="actions":"object"===t(e.events)&&(Ember.deprecate("Action handlers contained in an `events` object are deprecated in favor of putting them in an `actions` object",!1),r="events"),r&&(e._actions=Ember.merge(e._actions||{},e[r])),delete e[r])},send:function(t){var r,n=[].slice.call(arguments,1);if(this._actions&&this._actions[t]){if(this._actions[t].apply(this,n)!==!0)return}else if(!Ember.FEATURES.isEnabled("ember-routing-drop-deprecated-action-style")&&this.deprecatedSend&&this.deprecatedSendHandles&&this.deprecatedSendHandles(t)&&(Ember.warn("The current default is deprecated but will prefer to handle actions directly on the controller instead of a similarly named action in the actions hash. To turn off this deprecated feature set: Ember.FEATURES['ember-routing-drop-deprecated-action-style'] = true"),this.deprecatedSend.apply(this,[].slice.call(arguments))!==!0))return;(r=e(this,"target"))&&(Ember.assert("The `target` for "+this+" ("+r+") does not have a `send` method","function"==typeof r.send),r.send.apply(r,arguments))}})}(),function(){function e(e,t){return r(e,"isFulfilled",!1),r(e,"isRejected",!1),t.then(function(t){return r(e,"isFulfilled",!0),r(e,"content",t),t},function(t){throw r(e,"isRejected",!0),r(e,"reason",t),t},"Ember: PromiseProxy")}function t(e){return function(){var t=n(this,"promise");return t[e].apply(t,arguments)}}var r=Ember.set,n=Ember.get,i=Ember.computed.not,o=Ember.computed.or;Ember.PromiseProxyMixin=Ember.Mixin.create({reason:null,isPending:i("isSettled").readOnly(),isSettled:o("isRejected","isFulfilled").readOnly(),isRejected:!1,isFulfilled:!1,promise:Ember.computed(function(t,r){if(2===arguments.length)return e(this,r);throw new Ember.Error("PromiseProxy's promise must be set")}),then:t("then"),"catch":t("catch"),"finally":t("finally")})}(),function(){function e(e,t,r){this.type=e,this.count=t,this.items=r}function t(e,t,r,n){this.operation=e,this.index=t,this.split=r,this.rangeStart=n}var r=Ember.get,n=Ember.EnumerableUtils.forEach,i="r",o="i",a="d";Ember.TrackedArray=function(t){arguments.length<1&&(t=[]);var n=r(t,"length");this._operations=n?[new e(i,n,t)]:[]},Ember.TrackedArray.RETAIN=i,Ember.TrackedArray.INSERT=o,Ember.TrackedArray.DELETE=a,Ember.TrackedArray.prototype={addItems:function(t,n){var i=r(n,"length");if(!(1>i)){var a,s,u=this._findArrayOperation(t),l=u.operation,c=u.index,h=u.rangeStart;s=new e(o,i,n),l?u.split?(this._split(c,t-h,s),a=c+1):(this._operations.splice(c,0,s),a=c):(this._operations.push(s),a=c),this._composeInsert(a)}},removeItems:function(t,r){if(!(1>r)){var n,i,o=this._findArrayOperation(t),s=(o.operation,o.index),u=o.rangeStart;return n=new e(a,r),o.split?(this._split(s,t-u,n),i=s+1):(this._operations.splice(s,0,n),i=s),this._composeDelete(i)}},apply:function(t){var r=[],o=0;n(this._operations,function(e){t(e.items,o,e.type),e.type!==a&&(o+=e.count,r=r.concat(e.items))}),this._operations=[new e(i,r.length,r)]},_findArrayOperation:function(e){var r,n,i,o,s,u=!1;for(r=o=0,n=this._operations.length;n>r;++r)if(i=this._operations[r],i.type!==a){if(s=o+i.count-1,e===o)break;if(e>o&&s>=e){u=!0;break}o=s+1}return new t(i,r,u,o)},_split:function(t,r,n){var i=this._operations[t],o=i.items.slice(r),a=new e(i.type,o.length,o);i.count=r,i.items=i.items.slice(0,r),this._operations.splice(t+1,0,n,a)},_composeInsert:function(e){var t=this._operations[e],r=this._operations[e-1],n=this._operations[e+1],i=r&&r.type,a=n&&n.type;i===o?(r.count+=t.count,r.items=r.items.concat(t.items),a===o?(r.count+=n.count,r.items=r.items.concat(n.items),this._operations.splice(e,2)):this._operations.splice(e,1)):a===o&&(t.count+=n.count,t.items=t.items.concat(n.items),this._operations.splice(e+1,1))},_composeDelete:function(e){var t,r,n,i=this._operations[e],s=i.count,u=this._operations[e-1],l=u&&u.type,c=!1,h=[];l===a&&(i=u,e-=1);for(var m=e+1;s>0;++m)t=this._operations[m],r=t.type,n=t.count,r!==a?(n>s?(h=h.concat(t.items.splice(0,s)),t.count-=s,m-=1,n=s,s=0):(n===s&&(c=!0),h=h.concat(t.items),s-=n),r===o&&(i.count-=n)):i.count+=n;return i.count>0?this._operations.splice(e+1,m-1-e):this._operations.splice(e,c?2:1),h},toString:function(){var e="";return n(this._operations,function(t){e+=" "+t.type+":"+t.count}),e.substring(1)}}}(),function(){function e(e,t){this.type=e,this.count=t}var t=(Ember.get,Ember.EnumerableUtils.forEach),r="r",n="f";Ember.SubArray=function(t){arguments.length<1&&(t=0),this._operations=t>0?[new e(r,t)]:[]},Ember.SubArray.prototype={addItem:function(t,i){var o=-1,a=i?r:n,s=this;return this._findOperation(t,function(n,u,l,c,h){var m,p;a===n.type?++n.count:t===l?s._operations.splice(u,0,new e(a,1)):(m=new e(a,1),p=new e(n.type,c-t+1),n.count=t-l,s._operations.splice(u+1,0,m,p)),i&&(o=n.type===r?h+(t-l):h),s._composeAt(u)},function(t){s._operations.push(new e(a,1)),i&&(o=t),s._composeAt(s._operations.length-1)}),o},removeItem:function(e){var t=-1,n=this;return this._findOperation(e,function(i,o,a,s,u){i.type===r&&(t=u+(e-a)),i.count>1?--i.count:(n._operations.splice(o,1),n._composeAt(o))},function(){throw new Ember.Error("Can't remove an item that has never been added.")}),t},_findOperation:function(e,t,n){var i,o,a,s,u,l=0;for(i=s=0,o=this._operations.length;o>i;s=u+1,++i){if(a=this._operations[i],u=s+a.count-1,e>=s&&u>=e)return void t(a,i,s,u,l);a.type===r&&(l+=a.count)}n(l)},_composeAt:function(e){var t,r=this._operations[e];r&&(e>0&&(t=this._operations[e-1],t.type===r.type&&(r.count+=t.count,this._operations.splice(e-1,1),--e)),er(this,"content.length"))throw new Ember.Error(e);return this._replace(t,0,[n]),this},insertAt:function(e,t){if(r(this,"arrangedContent")===r(this,"content"))return this._insertAt(e,t);throw new Ember.Error("Using insertAt on an arranged ArrayProxy is not allowed.")},removeAt:function(n,i){if("number"==typeof n){var o,a=r(this,"content"),s=r(this,"arrangedContent"),u=[];if(0>n||n>=r(this,"length"))throw new Ember.Error(e);for(void 0===i&&(i=1),o=n;n+i>o;o++)u.push(a.indexOf(s.objectAt(o)));for(u.sort(function(e,t){return t-e}),Ember.beginPropertyChanges(),o=0;o=i;){var u=e.objectAt(o);u&&(Ember.assert("When using @each to observe the array "+e+", the array must return an object","instance"===Ember.typeOf(u)||"object"===Ember.typeOf(u)),Ember.addBeforeObserver(u,t,r,"contentKeyWillChange"),Ember.addObserver(u,t,r,"contentKeyDidChange"),a=n(u),s[a]||(s[a]=[]),s[a].push(o))}}function t(e,t,r,i,a){var s=r._objects;s||(s=r._objects={});for(var u,l;--a>=i;){var c=e.objectAt(a);c&&(Ember.removeBeforeObserver(c,t,r,"contentKeyWillChange"),Ember.removeObserver(c,t,r,"contentKeyDidChange"),l=n(c),u=s[l],u[o.call(u,a)]=null)}}var r=(Ember.set,Ember.get),n=Ember.guidFor,i=Ember.EnumerableUtils.forEach,o=Ember.ArrayPolyfills.indexOf,a=Ember.Object.extend(Ember.Array,{init:function(e,t,r){this._super(),this._keyName=t,this._owner=r,this._content=e},objectAt:function(e){var t=this._content.objectAt(e);return t&&r(t,this._keyName)},length:Ember.computed(function(){var e=this._content;return e?r(e,"length"):0})}),s=/^.+:(before|change)$/;Ember.EachProxy=Ember.Object.extend({init:function(e){this._super(),this._content=e,e.addArrayObserver(this),i(Ember.watchedEvents(this),function(e){this.didAddListener(e)},this)},unknownProperty:function(e){var t;return t=new a(this._content,e,this),Ember.defineProperty(this,e,null,t),this.beginObservingContentKey(e),t},arrayWillChange:function(e,r,n){var i,o,a=this._keys;o=n>0?r+n:-1,Ember.beginPropertyChanges(this);for(i in a)a.hasOwnProperty(i)&&(o>0&&t(e,i,this,r,o),Ember.propertyWillChange(this,i));Ember.propertyWillChange(this._content,"@each"),Ember.endPropertyChanges(this)},arrayDidChange:function(t,r,n,i){var o,a=this._keys;o=i>0?r+i:-1,Ember.changeProperties(function(){for(var n in a)a.hasOwnProperty(n)&&(o>0&&e(t,n,this,r,o),Ember.propertyDidChange(this,n));Ember.propertyDidChange(this._content,"@each")},this)},didAddListener:function(e){s.test(e)&&this.beginObservingContentKey(e.slice(0,-7))},didRemoveListener:function(e){s.test(e)&&this.stopObservingContentKey(e.slice(0,-7))},beginObservingContentKey:function(t){var n=this._keys;if(n||(n=this._keys={}),n[t])n[t]++;else{n[t]=1;var i=this._content,o=r(i,"length");e(i,t,this,0,o)}},stopObservingContentKey:function(e){var n=this._keys;if(n&&n[e]>0&&--n[e]<=0){var i=this._content,o=r(i,"length");t(i,e,this,0,o)}},contentKeyWillChange:function(e,t){Ember.propertyWillChange(this,t)},contentKeyDidChange:function(e,t){Ember.propertyDidChange(this,t)}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils._replace),r=Ember.Mixin.create(Ember.MutableArray,Ember.Observable,Ember.Copyable,{get:function(e){return"length"===e?this.length:"number"==typeof e?this[e]:this._super(e)},objectAt:function(e){return this[e]},replace:function(r,n,i){if(this.isFrozen)throw Ember.FROZEN_ERROR;var o=i?e(i,"length"):0;return this.arrayContentWillChange(r,n,o),0===o?this.splice(r,n):t(this,r,n,i),this.arrayContentDidChange(r,n,o),this},unknownProperty:function(e,t){var r;return void 0!==t&&void 0===r&&(r=this[e]=t),r},indexOf:function(e,t){var r,n=this.length;for(t=void 0===t?0:0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=n),r=t;n>r;r++)if(this[r]===e)return r;return-1},lastIndexOf:function(e,t){var r,n=this.length;for(t=void 0===t?n-1:0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=n),r=t;r>=0;r--)if(this[r]===e)return r;return-1},copy:function(e){return e?this.map(function(e){return Ember.copy(e,!0)}):this.slice()}}),n=["length"];Ember.EnumerableUtils.forEach(r.keys(),function(e){Array.prototype[e]&&n.push(e)}),n.length>0&&(r=r.without.apply(r,n)),Ember.NativeArray=r,Ember.A=function(e){return void 0===e&&(e=[]),Ember.Array.detect(e)?e:Ember.NativeArray.apply(e)},Ember.NativeArray.activate=function(){r.apply(Array.prototype),Ember.A=function(e){return e||[]}},(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.Array)&&Ember.NativeArray.activate()}(),function(){var e=Ember.get,t=Ember.set,r=Ember.guidFor,n=Ember.isNone,i=Ember.String.fmt;Ember.Set=Ember.CoreObject.extend(Ember.MutableEnumerable,Ember.Copyable,Ember.Freezable,{length:0,clear:function(){if(this.isFrozen)throw new Ember.Error(Ember.FROZEN_ERROR);var n=e(this,"length");if(0===n)return this;var i;this.enumerableContentWillChange(n,0),Ember.propertyWillChange(this,"firstObject"),Ember.propertyWillChange(this,"lastObject");for(var o=0;n>o;o++)i=r(this[o]),delete this[i],delete this[o];return t(this,"length",0),Ember.propertyDidChange(this,"firstObject"),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(n,0),this},isEqual:function(t){if(!Ember.Enumerable.detect(t))return!1;var r=e(this,"length");if(e(t,"length")!==r)return!1;for(;--r>=0;)if(!t.contains(this[r]))return!1;return!0},add:Ember.aliasMethod("addObject"),remove:Ember.aliasMethod("removeObject"),pop:function(){if(e(this,"isFrozen"))throw new Ember.Error(Ember.FROZEN_ERROR);var t=this.length>0?this[this.length-1]:null;return this.remove(t),t},push:Ember.aliasMethod("addObject"),shift:Ember.aliasMethod("pop"),unshift:Ember.aliasMethod("push"),addEach:Ember.aliasMethod("addObjects"),removeEach:Ember.aliasMethod("removeObjects"),init:function(e){this._super(),e&&this.addObjects(e)},nextObject:function(e){return this[e]},firstObject:Ember.computed(function(){return this.length>0?this[0]:void 0}),lastObject:Ember.computed(function(){return this.length>0?this[this.length-1]:void 0}),addObject:function(i){if(e(this,"isFrozen"))throw new Ember.Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,a=r(i),s=this[a],u=e(this,"length");return s>=0&&u>s&&this[s]===i?this:(o=[i],this.enumerableContentWillChange(null,o),Ember.propertyWillChange(this,"lastObject"),u=e(this,"length"),this[a]=u,this[u]=i,t(this,"length",u+1),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(null,o),this)},removeObject:function(i){if(e(this,"isFrozen"))throw new Ember.Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,a,s=r(i),u=this[s],l=e(this,"length"),c=0===u,h=u===l-1;return u>=0&&l>u&&this[u]===i&&(a=[i],this.enumerableContentWillChange(a,null),c&&Ember.propertyWillChange(this,"firstObject"),h&&Ember.propertyWillChange(this,"lastObject"),l-1>u&&(o=this[l-1],this[u]=o,this[r(o)]=u),delete this[s],delete this[l-1],t(this,"length",l-1),c&&Ember.propertyDidChange(this,"firstObject"),h&&Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(a,null)),this},contains:function(e){return this[r(e)]>=0},copy:function(){var n=this.constructor,i=new n,o=e(this,"length");for(t(i,"length",o);--o>=0;)i[o]=this[o],i[r(this[o])]=o;return i},toString:function(){var e,t=this.length,r=[];for(e=0;t>e;e++)r[e]=this[e];return i("Ember.Set<%@>",[r.join(",")])}})}(),function(){var e=Ember.DeferredMixin,t=(Ember.get,Ember.Object.extend(e)); -t.reopenClass({promise:function(e,r){var n=t.create();return e.call(r,n),n}}),Ember.Deferred=t}(),function(){var e=Ember.ArrayPolyfills.forEach,t=Ember.ENV.EMBER_LOAD_HOOKS||{},r={};Ember.onLoad=function(e,n){var i;t[e]=t[e]||Ember.A(),t[e].pushObject(n),(i=r[e])&&n(i)},Ember.runLoadHooks=function(n,i){if(r[n]=i,"object"==typeof window&&"function"==typeof window.dispatchEvent&&"function"==typeof CustomEvent){var o=new CustomEvent(n,{detail:i,name:n});window.dispatchEvent(o)}t[n]&&e.call(t[n],function(e){e(i)})}}(),function(){Ember.get;Ember.ControllerMixin=Ember.Mixin.create(Ember.ActionHandler,{isController:!0,target:null,container:null,parentController:null,store:null,model:Ember.computed.alias("content"),deprecatedSendHandles:function(e){return!!this[e]},deprecatedSend:function(e){var t=[].slice.call(arguments,1);Ember.assert(""+this+" has the action "+e+" but it is not a function","function"==typeof this[e]),Ember.deprecate("Action handlers implemented directly on controllers are deprecated in favor of action handlers on an `actions` object ( action: `"+e+"` on "+this+")",!1),this[e].apply(this,t)}}),Ember.Controller=Ember.Object.extend(Ember.ControllerMixin)}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils.forEach);Ember.SortableMixin=Ember.Mixin.create(Ember.MutableEnumerable,{sortProperties:null,sortAscending:!0,sortFunction:Ember.compare,orderBy:function(r,n){var i=0,o=e(this,"sortProperties"),a=e(this,"sortAscending"),s=e(this,"sortFunction");return Ember.assert("you need to define `sortProperties`",!!o),t(o,function(t){0===i&&(i=s(e(r,t),e(n,t)),0===i||a||(i=-1*i))}),i},destroy:function(){var r=e(this,"content"),n=e(this,"sortProperties");return r&&n&&t(r,function(e){t(n,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},isSorted:Ember.computed.bool("sortProperties"),arrangedContent:Ember.computed("content","sortProperties.@each",function(){var r=e(this,"content"),n=e(this,"isSorted"),i=e(this,"sortProperties"),o=this;return r&&n?(r=r.slice(),r.sort(function(e,t){return o.orderBy(e,t)}),t(r,function(e){t(i,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),Ember.A(r)):r}),_contentWillChange:Ember.beforeObserver("content",function(){var r=e(this,"content"),n=e(this,"sortProperties");r&&n&&t(r,function(e){t(n,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()}),sortAscendingWillChange:Ember.beforeObserver("sortAscending",function(){this._lastSortAscending=e(this,"sortAscending")}),sortAscendingDidChange:Ember.observer("sortAscending",function(){if(e(this,"sortAscending")!==this._lastSortAscending){var t=e(this,"arrangedContent");t.reverseObjects()}}),contentArrayWillChange:function(r,n,i,o){var a=e(this,"isSorted");if(a){var s=e(this,"arrangedContent"),u=r.slice(n,n+i),l=e(this,"sortProperties");t(u,function(e){s.removeObject(e),t(l,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},contentArrayDidChange:function(r,n,i,o){var a=e(this,"isSorted"),s=e(this,"sortProperties");if(a){var u=r.slice(n,n+o);t(u,function(e){this.insertItemSorted(e),t(s,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},insertItemSorted:function(t){var r=e(this,"arrangedContent"),n=e(r,"length"),i=this._binarySearch(t,0,n);r.insertAt(i,t)},contentItemSortPropertyDidChange:function(t){var r=e(this,"arrangedContent"),n=r.indexOf(t),i=r.objectAt(n-1),o=r.objectAt(n+1),a=i&&this.orderBy(t,i),s=o&&this.orderBy(t,o);(0>a||s>0)&&(r.removeObject(t),this.insertItemSorted(t))},_binarySearch:function(t,r,n){var i,o,a,s;return r===n?r:(s=e(this,"arrangedContent"),i=r+Math.floor((n-r)/2),o=s.objectAt(i),a=this.orderBy(o,t),0>a?this._binarySearch(t,i+1,n):a>0?this._binarySearch(t,r,i):i)}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils.forEach),r=Ember.EnumerableUtils.replace;Ember.ArrayController=Ember.ArrayProxy.extend(Ember.ControllerMixin,Ember.SortableMixin,{itemController:null,lookupItemController:function(){return e(this,"itemController")},objectAtContent:function(t){var r=e(this,"length"),n=e(this,"arrangedContent"),i=n&&n.objectAt(t);if(t>=0&&r>t){var o=this.lookupItemController(i);if(o)return this.controllerAt(t,i,o)}return i},arrangedContentDidChange:function(){this._super(),this._resetSubControllers()},arrayContentDidChange:function(n,i,o){var a=e(this,"_subControllers"),s=a.slice(n,n+i);t(s,function(e){e&&e.destroy()}),r(a,n,i,new Array(o)),this._super(n,i,o)},init:function(){this._super(),this.set("_subControllers",Ember.A())},content:Ember.computed(function(){return Ember.A()}),_isVirtual:!1,controllerAt:function(t,r,n){var i,o=e(this,"container"),a=e(this,"_subControllers"),s=a[t];if(s)return s;if(i="controller:"+n,!o.has(i))throw new Ember.Error('Could not resolve itemController: "'+n+'"');var u;return this._isVirtual&&(u=e(this,"parentController")),u=u||this,s=o.lookupFactory(i).create({target:this,parentController:u,content:r}),a[t]=s,s},_subControllers:null,_resetSubControllers:function(){var r=e(this,"_subControllers");r&&t(r,function(e){e&&e.destroy()}),this.set("_subControllers",Ember.A())}})}(),function(){Ember.ObjectController=Ember.ObjectProxy.extend(Ember.ControllerMixin)}(),function(){var e=Ember.imports&&Ember.imports.jQuery||this&&this.jQuery;e||"function"!=typeof r||(e=r("jquery")),Ember.assert("Ember Views require jQuery between 1.7 and 2.1",e&&(e().jquery.match(/^((1\.(7|8|9|10|11))|(2\.(0|1)))(\.\d+)?(pre|rc\d?)?/)||Ember.ENV.FORCE_JQUERY)),Ember.$=e}(),function(){if(Ember.$){var e=Ember.String.w("dragstart drag dragenter dragleave dragover drop dragend");Ember.EnumerableUtils.forEach(e,function(e){Ember.$.event.fixHooks[e]={props:["dataTransfer"]}})}}(),function(){function e(e){var t=e.shiftKey||e.metaKey||e.altKey||e.ctrlKey,r=e.which>1;return!t&&!r}var t="undefined"!=typeof document&&function(){var e=document.createElement("div");return e.innerHTML="
",e.firstChild.innerHTML="",""===e.firstChild.innerHTML}(),r="undefined"!=typeof document&&function(){var e=document.createElement("div");return e.innerHTML="Test: Value","Test:"===e.childNodes[0].nodeValue&&" Value"===e.childNodes[2].nodeValue}(),n=function(e,t){if(e.getAttribute("id")===t)return e;var r,i,o,a=e.childNodes.length;for(r=0;a>r;r++)if(i=e.childNodes[r],o=1===i.nodeType&&n(i,t))return o},i=function(e,i){t&&(i="­"+i);var o=[];if(r&&(i=i.replace(/(\s+)(",""===e.firstChild.innerHTML}(),o=document&&function(){var e=document.createElement("div");return e.innerHTML="Test: Value","Test:"===e.childNodes[0].nodeValue&&" Value"===e.childNodes[2].nodeValue}(),a=function(r){var n;n=this instanceof a?this:new e,n.innerHTML=r;var i="metamorph-"+t++;return n.start=i+"-start",n.end=i+"-end",n};e.prototype=a.prototype;var s,u,l,c,h,m,p,d,f;if(c=function(){return this.startTag()+this.innerHTML+this.endTag()},d=function(){return""},f=function(){return""},n)s=function(e,t){var r=document.createRange(),n=document.getElementById(e.start),i=document.getElementById(e.end);return t?(r.setStartBefore(n),r.setEndAfter(i)):(r.setStartAfter(n),r.setEndBefore(i)),r},u=function(e,t){var r=s(this,t);r.deleteContents();var n=r.createContextualFragment(e);r.insertNode(n)},l=function(){var e=s(this,!0);e.deleteContents()},h=function(e){var t=document.createRange();t.setStart(e),t.collapse(!1);var r=t.createContextualFragment(this.outerHTML());e.appendChild(r)},m=function(e){var t=document.createRange(),r=document.getElementById(this.end);t.setStartAfter(r),t.setEndAfter(r);var n=t.createContextualFragment(e);t.insertNode(n)},p=function(e){var t=document.createRange(),r=document.getElementById(this.start);t.setStartAfter(r),t.setEndAfter(r);var n=t.createContextualFragment(e);t.insertNode(n)};else{var b={select:[1,""],fieldset:[1,"
","
"],table:[1,"","
"],tbody:[2,"","
"],tr:[3,"","
"],colgroup:[2,"","
"],map:[1,"",""],_default:[0,"",""]},E=function(e,t){if(e.getAttribute("id")===t)return e;var r,n,i,o=e.childNodes.length;for(r=0;o>r;r++)if(n=e.childNodes[r],i=1===n.nodeType&&E(n,t))return i},v=function(e,t){var r=[];if(o&&(t=t.replace(/(\s+)(";return testEl.firstChild.innerHTML===""}();var movesWhitespace=typeof document!=="undefined"&&function(){var testEl=document.createElement("div");testEl.innerHTML="Test: Value";return testEl.childNodes[0].nodeValue==="Test:"&&testEl.childNodes[2].nodeValue===" Value"}();var findChildById=function(element,id){if(element.getAttribute("id")===id){return element}var len=element.childNodes.length,idx,node,found;for(idx=0;idx0){var len=matches.length,idx;for(idx=0;idxTest');canSet=el.options.length===1}innerHTMLTags[tagName]=canSet;return canSet};function setInnerHTML(element,html){var tagName=element.tagName;if(canSetInnerHTML(tagName)){setInnerHTMLWithoutFix(element,html)}else{var outerHTML=element.outerHTML||(new XMLSerializer).serializeToString(element);var startTag=outerHTML.match(new RegExp("<"+tagName+"([^>]*)>","i"))[0],endTag="";var wrapper=document.createElement("div");setInnerHTMLWithoutFix(wrapper,startTag+html+endTag);element=wrapper.firstChild;while(element.tagName!==tagName){element=element.nextSibling}}return element}__exports__.setInnerHTML=setInnerHTML;function isSimpleClick(event){var modifier=event.shiftKey||event.metaKey||event.altKey||event.ctrlKey,secondaryClick=event.which>1;return!modifier&&!secondaryClick}__exports__.isSimpleClick=isSimpleClick});define("ember-views/views/collection_view",["ember-metal/core","ember-metal/platform","ember-metal/binding","ember-metal/merge","ember-metal/property_get","ember-metal/property_set","ember-runtime/system/string","ember-views/views/container_view","ember-views/views/view","ember-metal/mixin","ember-runtime/mixins/array","exports"],function(__dependency1__,__dependency2__,__dependency3__,__dependency4__,__dependency5__,__dependency6__,__dependency7__,__dependency8__,__dependency9__,__dependency10__,__dependency11__,__exports__){"use strict";var Ember=__dependency1__["default"];var create=__dependency2__.create;var isGlobalPath=__dependency3__.isGlobalPath;var merge=__dependency4__["default"];var get=__dependency5__.get;var set=__dependency6__.set;var fmt=__dependency7__.fmt;var ContainerView=__dependency8__["default"];var CoreView=__dependency9__.CoreView;var View=__dependency9__.View;var observer=__dependency10__.observer;var beforeObserver=__dependency10__.beforeObserver;var EmberArray=__dependency11__["default"];var CollectionView=ContainerView.extend({content:null,emptyViewClass:View,emptyView:null,itemViewClass:View,init:function(){var ret=this._super();this._contentDidChange();return ret},_contentWillChange:beforeObserver("content",function(){var content=this.get("content");if(content){content.removeArrayObserver(this)}var len=content?get(content,"length"):0;this.arrayWillChange(content,0,len)}),_contentDidChange:observer("content",function(){var content=get(this,"content");if(content){this._assertArrayLike(content);content.addArrayObserver(this)}var len=content?get(content,"length"):0;this.arrayDidChange(content,0,null,len)}),_assertArrayLike:function(content){},destroy:function(){if(!this._super()){return}var content=get(this,"content");if(content){content.removeArrayObserver(this)}if(this._createdEmptyView){this._createdEmptyView.destroy()}return this},arrayWillChange:function(content,start,removedCount){var emptyView=get(this,"emptyView");if(emptyView&&emptyView instanceof View){emptyView.removeFromParent()}var childViews=this._childViews,childView,idx,len;len=this._childViews.length;var removingAll=removedCount===len;if(removingAll){this.currentState.empty(this);this.invokeRecursively(function(view){view.removedFromDOM=true},false)}for(idx=start+removedCount-1;idx>=start;idx--){childView=childViews[idx];childView.destroy()}},arrayDidChange:function(content,start,removed,added){var addedViews=[],view,item,idx,len,itemViewClass,emptyView;len=content?get(content,"length"):0;if(len){itemViewClass=get(this,"itemViewClass");if("string"===typeof itemViewClass&&isGlobalPath(itemViewClass)){itemViewClass=get(itemViewClass)||itemViewClass}for(idx=start;idx0){var changedViews=views.slice(start,start+removed);this.currentState.childViewsWillChange(this,views,start,removed);this.initializeViews(changedViews,null,null)}},removeChild:function(child){this.removeObject(child);return this},childViewsDidChange:function(views,start,removed,added){if(added>0){var changedViews=views.slice(start,start+added);this.initializeViews(changedViews,this,get(this,"templateData"));this.currentState.childViewsDidChange(this,views,start,added)}this.propertyDidChange("childViews")},initializeViews:function(views,parentView,templateData){forEach(views,function(view){set(view,"_parentView",parentView);if(!view.container&&parentView){set(view,"container",parentView.container)}if(!get(view,"templateData")){set(view,"templateData",templateData)}})},currentView:null,_currentViewWillChange:beforeObserver("currentView",function(){var currentView=get(this,"currentView");if(currentView){currentView.destroy()}}),_currentViewDidChange:observer("currentView",function(){var currentView=get(this,"currentView");if(currentView){this.pushObject(currentView)}}),_ensureChildrenAreInDOM:function(){this.currentState.ensureChildrenAreInDOM(this)}});merge(states._default,{childViewsWillChange:Ember.K,childViewsDidChange:Ember.K,ensureChildrenAreInDOM:Ember.K});merge(states.inBuffer,{childViewsDidChange:function(parentView,views,start,added){throw new EmberError("You cannot modify child views while in the inBuffer state")}});merge(states.hasElement,{childViewsWillChange:function(view,views,start,removed){for(var i=start;i=lengthBefore;i--){if(childViews[i]){childViews[i].destroy()}}},_applyClassNameBindings:function(classBindings){var classNames=this.classNames,elem,newClass,dasherizedClass;a_forEach(classBindings,function(binding){var oldClass;var parsedPath=View._parsePropertyPath(binding);var observer=function(){newClass=this._classStringForProperty(binding);elem=this.$();if(oldClass){elem.removeClass(oldClass);classNames.removeObject(oldClass)}if(newClass){elem.addClass(newClass);oldClass=newClass}else{oldClass=null}};dasherizedClass=this._classStringForProperty(binding);if(dasherizedClass){a_addObject(classNames,dasherizedClass);oldClass=dasherizedClass}this.registerObserver(this,parsedPath.path,observer);this.one("willClearRender",function(){if(oldClass){classNames.removeObject(oldClass);oldClass=null}})},this)},_unspecifiedAttributeBindings:null,_applyAttributeBindings:function(buffer,attributeBindings){var attributeValue,unspecifiedAttributeBindings=this._unspecifiedAttributeBindings=this._unspecifiedAttributeBindings||{};a_forEach(attributeBindings,function(binding){var split=binding.split(":"),property=split[0],attributeName=split[1]||property;if(property in this){this._setupAttributeBindingObservation(property,attributeName);attributeValue=get(this,property);View.applyAttributeBindings(buffer,attributeName,attributeValue)}else{unspecifiedAttributeBindings[property]=attributeName}},this);this.setUnknownProperty=this._setUnknownProperty},_setupAttributeBindingObservation:function(property,attributeName){var attributeValue,elem;var observer=function(){elem=this.$();attributeValue=get(this,property);View.applyAttributeBindings(elem,attributeName,attributeValue)};this.registerObserver(this,property,observer)},setUnknownProperty:null,_setUnknownProperty:function(key,value){var attributeName=this._unspecifiedAttributeBindings&&this._unspecifiedAttributeBindings[key];if(attributeName){this._setupAttributeBindingObservation(key,attributeName)}defineProperty(this,key);return set(this,key,value)},_classStringForProperty:function(property){var parsedPath=View._parsePropertyPath(property);var path=parsedPath.path;var val=get(this,path);if(val===undefined&&isGlobalPath(path)){val=get(Ember.lookup,path)}return View._classStringForValue(path,val,parsedPath.className,parsedPath.falsyClassName)},element:computed("_parentView",function(key,value){if(value!==undefined){return this.currentState.setElement(this,value)}else{return this.currentState.getElement(this)}}),$:function(sel){return this.currentState.$(this,sel)},mutateChildViews:function(callback){var childViews=this._childViews,idx=childViews.length,view;while(--idx>=0){view=childViews[idx];callback(this,view,idx)}return this},forEachChildView:function(callback){var childViews=this._childViews;if(!childViews){return this}var len=childViews.length,view,idx;for(idx=0;idx=0;i--){childViews[i].removedFromDOM=true}if(viewName&&nonVirtualParentView){nonVirtualParentView.set(viewName,null)}childLen=childViews.length;for(i=childLen-1;i>=0;i--){childViews[i].destroy()}return this},createChildView:function(view,attrs){if(!view){throw new TypeError("createChildViews first argument must exist")}if(view.isView&&view._parentView===this&&view.container===this.container){return view}attrs=attrs||{};attrs._parentView=this;if(CoreView.detect(view)){attrs.templateData=attrs.templateData||get(this,"templateData");attrs.container=this.container;view=view.create(attrs);if(view.viewName){set(get(this,"concreteView"),view.viewName,view)}}else if("string"===typeof view){var fullName="view:"+view;var ViewKlass=this.container.lookupFactory(fullName);attrs.templateData=get(this,"templateData");view=ViewKlass.create(attrs)}else{attrs.container=this.container;if(!get(view,"templateData")){attrs.templateData=get(this,"templateData")}setProperties(view,attrs)}return view},becameVisible:Ember.K,becameHidden:Ember.K,_isVisibleDidChange:observer("isVisible",function(){if(this._isVisible===get(this,"isVisible")){return}run.scheduleOnce("render",this,this._toggleVisibility)}),_toggleVisibility:function(){var $el=this.$();if(!$el){return}var isVisible=get(this,"isVisible");if(this._isVisible===isVisible){return}$el.toggle(isVisible);this._isVisible=isVisible;if(this._isAncestorHidden()){return +}if(isVisible){this._notifyBecameVisible()}else{this._notifyBecameHidden()}},_notifyBecameVisible:function(){this.trigger("becameVisible");this.forEachChildView(function(view){var isVisible=get(view,"isVisible");if(isVisible||isVisible===null){view._notifyBecameVisible()}})},_notifyBecameHidden:function(){this.trigger("becameHidden");this.forEachChildView(function(view){var isVisible=get(view,"isVisible");if(isVisible||isVisible===null){view._notifyBecameHidden()}})},_isAncestorHidden:function(){var parent=get(this,"parentView");while(parent){if(get(parent,"isVisible")===false){return true}parent=get(parent,"parentView")}return false},clearBuffer:function(){this.invokeRecursively(nullViewsBuffer)},transitionTo:function(state,children){var priorState=this.currentState,currentState=this.currentState=this._states[state];this._state=state;if(priorState&&priorState.exit){priorState.exit(this)}if(currentState.enter){currentState.enter(this)}if(state==="inDOM"){meta(this).cache.element=undefined}if(children!==false){this.forEachChildView(function(view){view.transitionTo(state)})}},handleEvent:function(eventName,evt){return this.currentState.handleEvent(this,eventName,evt)},registerObserver:function(root,path,target,observer){if(!observer&&"function"===typeof target){observer=target;target=null}if(!root||typeof root!=="object"){return}var view=this,stateCheckedObserver=function(){view.currentState.invokeObserver(this,observer)},scheduledObserver=function(){run.scheduleOnce("render",this,stateCheckedObserver)};addObserver(root,path,target,scheduledObserver);this.one("willClearRender",function(){removeObserver(root,path,target,scheduledObserver)})}});function notifyMutationListeners(){run.once(View,"notifyMutationListeners")}var DOMManager={prepend:function(view,html){view.$().prepend(html);notifyMutationListeners()},after:function(view,html){view.$().after(html);notifyMutationListeners()},html:function(view,html){view.$().html(html);notifyMutationListeners()},replace:function(view){var element=get(view,"element");set(view,"element",null);view._insertElementLater(function(){jQuery(element).replaceWith(get(view,"element"));notifyMutationListeners()})},remove:function(view){view.$().remove();notifyMutationListeners()},empty:function(view){view.$().empty();notifyMutationListeners()}};View.reopen({domManager:DOMManager});View.reopenClass({_parsePropertyPath:function(path){var split=path.split(":"),propertyPath=split[0],classNames="",className,falsyClassName;if(split.length>1){className=split[1];if(split.length===3){falsyClassName=split[2]}classNames=":"+className;if(falsyClassName){classNames+=":"+falsyClassName}}return{path:propertyPath,classNames:classNames,className:className===""?undefined:className,falsyClassName:falsyClassName}},_classStringForValue:function(path,val,className,falsyClassName){if(isArray(val)){val=get(val,"length")!==0}if(className||falsyClassName){if(className&&!!val){return className}else if(falsyClassName&&!val){return falsyClassName}else{return null}}else if(val===true){var parts=path.split(".");return dasherize(parts[parts.length-1])}else if(val!==false&&val!=null){return val}else{return null}}});var mutation=EmberObject.extend(Evented).create();View.addMutationListener=function(callback){mutation.on("change",callback)};View.removeMutationListener=function(callback){mutation.off("change",callback)};View.notifyMutationListeners=function(){mutation.trigger("change")};View.views={};View.childViewsProperty=childViewsProperty;View.applyAttributeBindings=function(elem,name,value){var type=typeOf(value);if(name!=="value"&&(type==="string"||type==="number"&&!isNaN(value))){if(value!==elem.attr(name)){elem.attr(name,value)}}else if(name==="value"||type==="boolean"){if(isNone(value)||value===false){elem.removeAttr(name);elem.prop(name,"")}else if(value!==elem.prop(name)){elem.prop(name,value)}}else if(!value){elem.removeAttr(name)}};__exports__.CoreView=CoreView;__exports__.View=View;__exports__.ViewCollection=ViewCollection});define("ember",["ember-metal","ember-runtime","ember-handlebars","ember-views","ember-routing","ember-application","ember-extension-support"],function(__dependency1__,__dependency2__,__dependency3__,__dependency4__,__dependency5__,__dependency6__,__dependency7__){"use strict";if(Ember.__loader.registry["ember-testing"]){requireModule("ember-testing")}function throwWithMessage(msg){return function(){throw new Ember.Error(msg)}}function generateRemovedClass(className){var msg=" has been moved into a plugin: https://github.com/emberjs/ember-states";return{extend:throwWithMessage(className+msg),create:throwWithMessage(className+msg)}}Ember.StateManager=generateRemovedClass("Ember.StateManager");Ember.State=generateRemovedClass("Ember.State")});define("metamorph",[],function(){"use strict";var K=function(){},guid=0,disableRange=function(){if("undefined"!==typeof MetamorphENV){return MetamorphENV.DISABLE_RANGE_API}else if("undefined"!==ENV){return ENV.DISABLE_RANGE_API}else{return false}}(),supportsRange=!disableRange&&typeof document!=="undefined"&&"createRange"in document&&typeof Range!=="undefined"&&Range.prototype.createContextualFragment,needsShy=typeof document!=="undefined"&&function(){var testEl=document.createElement("div");testEl.innerHTML="
";testEl.firstChild.innerHTML="";return testEl.firstChild.innerHTML===""}(),movesWhitespace=document&&function(){var testEl=document.createElement("div");testEl.innerHTML="Test: Value";return testEl.childNodes[0].nodeValue==="Test:"&&testEl.childNodes[2].nodeValue===" Value"}();var Metamorph=function(html){var self;if(this instanceof Metamorph){self=this}else{self=new K}self.innerHTML=html;var myGuid="metamorph-"+guid++;self.start=myGuid+"-start";self.end=myGuid+"-end";return self};K.prototype=Metamorph.prototype;var rangeFor,htmlFunc,removeFunc,outerHTMLFunc,appendToFunc,afterFunc,prependFunc,startTagFunc,endTagFunc;outerHTMLFunc=function(){return this.startTag()+this.innerHTML+this.endTag()};startTagFunc=function(){return""};endTagFunc=function(){return""};if(supportsRange){rangeFor=function(morph,outerToo){var range=document.createRange();var before=document.getElementById(morph.start);var after=document.getElementById(morph.end);if(outerToo){range.setStartBefore(before);range.setEndAfter(after)}else{range.setStartAfter(before);range.setEndBefore(after)}return range};htmlFunc=function(html,outerToo){var range=rangeFor(this,outerToo);range.deleteContents();var fragment=range.createContextualFragment(html);range.insertNode(fragment)};removeFunc=function(){var range=rangeFor(this,true);range.deleteContents()};appendToFunc=function(node){var range=document.createRange();range.setStart(node);range.collapse(false);var frag=range.createContextualFragment(this.outerHTML());node.appendChild(frag)};afterFunc=function(html){var range=document.createRange();var after=document.getElementById(this.end);range.setStartAfter(after);range.setEndAfter(after);var fragment=range.createContextualFragment(html);range.insertNode(fragment)};prependFunc=function(html){var range=document.createRange();var start=document.getElementById(this.start);range.setStartAfter(start);range.setEndAfter(start);var fragment=range.createContextualFragment(html);range.insertNode(fragment)}}else{var wrapMap={select:[1,""],fieldset:[1,"
","
"],table:[1,"","
"],tbody:[2,"","
"],tr:[3,"","
"],colgroup:[2,"","
"],map:[1,"",""],_default:[0,"",""]};var findChildById=function(element,id){if(element.getAttribute("id")===id){return element}var len=element.childNodes.length,idx,node,found;for(idx=0;idx0){var len=matches.length,idx;for(idx=0;idx2&&key.slice(keyLength-2)==="[]"){isArray=true;key=key.slice(0,keyLength-2);if(!queryParams[key]){queryParams[key]=[]}}value=pair[1]?decodeURIComponent(pair[1]):""}if(isArray){queryParams[key].push(value)}else{queryParams[key]=decodeURIComponent(value)}}return queryParams},recognize:function(path){var states=[this.rootState],pathLen,i,l,queryStart,queryParams={},isSlashDropped=false;path=decodeURI(path);queryStart=path.indexOf("?");if(queryStart!==-1){var queryString=path.substr(queryStart+1,path.length);path=path.substr(0,queryStart);queryParams=this.parseQueryString(queryString)}if(path.charAt(0)!=="/"){path="/"+path}pathLen=path.length;if(pathLen>1&&path.charAt(pathLen-1)==="/"){path=path.substr(0,pathLen-1);isSlashDropped=true}for(i=0,l=path.length;i=0&&proceed;--i){var route=routes[i];recognizer.add(routes,{as:route.handler});proceed=route.path==="/"||route.path===""||route.handler.slice(-6)===".index"}})},hasRoute:function(route){return this.recognizer.hasRoute(route)},transitionByIntent:function(intent,isIntermediate){var wasTransitioning=!!this.activeTransition;var oldState=wasTransitioning?this.activeTransition.state:this.state;var newTransition;var router=this;try{var newState=intent.applyToState(oldState,this.recognizer,this.getHandler,isIntermediate);if(handlerInfosEqual(newState.handlerInfos,oldState.handlerInfos)){var queryParamChangelist=getChangelist(oldState.queryParams,newState.queryParams);if(queryParamChangelist){this._changedQueryParams=queryParamChangelist.changed;for(var k in queryParamChangelist.removed){if(queryParamChangelist.removed.hasOwnProperty(k)){this._changedQueryParams[k]=null}}trigger(this,newState.handlerInfos,true,["queryParamsDidChange",queryParamChangelist.changed,queryParamChangelist.all,queryParamChangelist.removed]);this._changedQueryParams=null;if(!wasTransitioning&&this.activeTransition){return this.activeTransition}else{newTransition=new Transition(this);oldState.queryParams=finalizeQueryParamChange(this,newState.handlerInfos,newState.queryParams,newTransition);newTransition.promise=newTransition.promise.then(function(result){updateURL(newTransition,oldState,true);if(router.didTransition){router.didTransition(router.currentHandlerInfos)}return result},null,promiseLabel("Transition complete"));return newTransition}}return new Transition(this)}if(isIntermediate){setupContexts(this,newState);return}newTransition=new Transition(this,intent,newState);if(this.activeTransition){this.activeTransition.abort() +}this.activeTransition=newTransition;newTransition.promise=newTransition.promise.then(function(result){return finalizeTransition(newTransition,result.state)},null,promiseLabel("Settle transition promise when transition is finalized"));if(!wasTransitioning){notifyExistingHandlers(this,newState,newTransition)}return newTransition}catch(e){return new Transition(this,intent,null,e)}},reset:function(){if(this.state){forEach(this.state.handlerInfos,function(handlerInfo){var handler=handlerInfo.handler;if(handler.exit){handler.exit()}})}this.state=new TransitionState;this.currentHandlerInfos=null},activeTransition:null,handleURL:function(url){var args=slice.call(arguments);if(url.charAt(0)!=="/"){args[0]="/"+url}return doTransition(this,args).method(null)},updateURL:function(){throw new Error("updateURL is not implemented")},replaceURL:function(url){this.updateURL(url)},transitionTo:function(name){return doTransition(this,arguments)},intermediateTransitionTo:function(name){doTransition(this,arguments,true)},refresh:function(pivotHandler){var state=this.activeTransition?this.activeTransition.state:this.state;var handlerInfos=state.handlerInfos;var params={};for(var i=0,len=handlerInfos.length;i=0;--i){var handlerInfo=handlerInfos[i];merge(params,handlerInfo.params);if(handlerInfo.handler.inaccessibleByURL){urlMethod=null}}if(urlMethod){params.queryParams=transition._visibleQueryParams||state.queryParams;var url=router.recognizer.generate(handlerName,params);if(urlMethod==="replace"){router.replaceURL(url)}else{router.updateURL(url)}}}function finalizeTransition(transition,newState){try{log(transition.router,transition.sequence,"Resolved all models on destination route; finalizing transition.");var router=transition.router,handlerInfos=newState.handlerInfos,seq=transition.sequence;setupContexts(router,newState,transition);if(transition.isAborted){router.state.handlerInfos=router.currentHandlerInfos;return Promise.reject(logAbort(transition))}updateURL(transition,newState,transition.intent.url);transition.isActive=false;router.activeTransition=null;trigger(router,router.currentHandlerInfos,true,["didTransition"]);if(router.didTransition){router.didTransition(router.currentHandlerInfos)}log(router,transition.sequence,"TRANSITION COMPLETE.");return handlerInfos[handlerInfos.length-1].handler}catch(e){if(!(e instanceof TransitionAborted)){var infos=transition.state.handlerInfos;transition.trigger(true,"error",e,transition,infos[infos.length-1].handler);transition.abort()}throw e}}function doTransition(router,args,isIntermediate){var name=args[0]||"/";var lastArg=args[args.length-1];var queryParams={};if(lastArg&&lastArg.hasOwnProperty("queryParams")){queryParams=pop.call(args).queryParams}var intent;if(args.length===0){log(router,"Updating query params");var handlerInfos=router.state.handlerInfos;intent=new NamedTransitionIntent({name:handlerInfos[handlerInfos.length-1].name,contexts:[],queryParams:queryParams})}else if(name.charAt(0)==="/"){log(router,"Attempting URL transition to "+name);intent=new URLTransitionIntent({url:name})}else{log(router,"Attempting transition to "+name);intent=new NamedTransitionIntent({name:args[0],contexts:slice.call(args,1),queryParams:queryParams})}return router.transitionByIntent(intent,isIntermediate)}function handlerInfosEqual(handlerInfos,otherHandlerInfos){if(handlerInfos.length!==otherHandlerInfos.length){return false}for(var i=0,len=handlerInfos.length;i0){router._triggerWillChangeContext(changing,newTransition)}trigger(router,oldHandlers,true,["willTransition",newTransition])}__exports__["default"]=Router});define("router/transition-intent",["./utils","exports"],function(__dependency1__,__exports__){"use strict";var merge=__dependency1__.merge;function TransitionIntent(props){this.initialize(props);this.data=this.data||{}}TransitionIntent.prototype={initialize:null,applyToState:null};__exports__["default"]=TransitionIntent});define("router/transition-intent/named-transition-intent",["../transition-intent","../transition-state","../handler-info/factory","../utils","exports"],function(__dependency1__,__dependency2__,__dependency3__,__dependency4__,__exports__){"use strict";var TransitionIntent=__dependency1__["default"];var TransitionState=__dependency2__["default"];var handlerInfoFactory=__dependency3__["default"];var isParam=__dependency4__.isParam;var extractQueryParams=__dependency4__.extractQueryParams;var merge=__dependency4__.merge;var subclass=__dependency4__.subclass;__exports__["default"]=subclass(TransitionIntent,{name:null,pivotHandler:null,contexts:null,queryParams:null,initialize:function(props){this.name=props.name;this.pivotHandler=props.pivotHandler;this.contexts=props.contexts||[];this.queryParams=props.queryParams},applyToState:function(oldState,recognizer,getHandler,isIntermediate){var partitionedArgs=extractQueryParams([this.name].concat(this.contexts)),pureArgs=partitionedArgs[0],queryParams=partitionedArgs[1],handlers=recognizer.handlersFor(pureArgs[0]);var targetRouteName=handlers[handlers.length-1].handler;return this.applyToHandlers(oldState,handlers,getHandler,targetRouteName,isIntermediate)},applyToHandlers:function(oldState,handlers,getHandler,targetRouteName,isIntermediate,checkingIfActive){var i;var newState=new TransitionState;var objects=this.contexts.slice(0);var invalidateIndex=handlers.length;if(this.pivotHandler){for(i=0;i=0;--i){var result=handlers[i];var name=result.handler;var handler=getHandler(name);var oldHandlerInfo=oldState.handlerInfos[i];var newHandlerInfo=null;if(result.names.length>0){if(i>=invalidateIndex){newHandlerInfo=this.createParamHandlerInfo(name,handler,result.names,objects,oldHandlerInfo)}else{newHandlerInfo=this.getHandlerInfoForDynamicSegment(name,handler,result.names,objects,oldHandlerInfo,targetRouteName,i)}}else{newHandlerInfo=this.createParamHandlerInfo(name,handler,result.names,objects,oldHandlerInfo)}if(checkingIfActive){newHandlerInfo=newHandlerInfo.becomeResolved(null,newHandlerInfo.context);var oldContext=oldHandlerInfo&&oldHandlerInfo.context;if(result.names.length>0&&newHandlerInfo.context===oldContext){newHandlerInfo.params=oldHandlerInfo&&oldHandlerInfo.params}newHandlerInfo.context=oldContext}var handlerToUse=oldHandlerInfo;if(i>=invalidateIndex||newHandlerInfo.shouldSupercede(oldHandlerInfo)){invalidateIndex=Math.min(i,invalidateIndex);handlerToUse=newHandlerInfo}if(isIntermediate&&!checkingIfActive){handlerToUse=handlerToUse.becomeResolved(null,handlerToUse.context)}newState.handlerInfos.unshift(handlerToUse)}if(objects.length>0){throw new Error("More context objects were passed than there are dynamic segments for the route: "+targetRouteName)}if(!isIntermediate){this.invalidateChildren(newState.handlerInfos,invalidateIndex)}merge(newState.queryParams,oldState.queryParams);merge(newState.queryParams,this.queryParams||{});return newState},invalidateChildren:function(handlerInfos,invalidateIndex){for(var i=invalidateIndex,l=handlerInfos.length;i0){objectToUse=objects[objects.length-1];if(isParam(objectToUse)){return this.createParamHandlerInfo(name,handler,names,objects,oldHandlerInfo)}else{objects.pop()}}else if(oldHandlerInfo&&oldHandlerInfo.name===name){return oldHandlerInfo}else{if(this.preTransitionState){var preTransitionHandlerInfo=this.preTransitionState.handlerInfos[i];objectToUse=preTransitionHandlerInfo&&preTransitionHandlerInfo.context}else{return oldHandlerInfo}}return handlerInfoFactory("object",{name:name,handler:handler,context:objectToUse,names:names})},createParamHandlerInfo:function(name,handler,names,objects,oldHandlerInfo){var params={};var numNames=names.length;while(numNames--){var oldParams=oldHandlerInfo&&name===oldHandlerInfo.name&&oldHandlerInfo.params||{};var peek=objects[objects.length-1];var paramName=names[numNames];if(isParam(peek)){params[paramName]=""+objects.pop()}else{if(oldParams.hasOwnProperty(paramName)){params[paramName]=oldParams[paramName]}else{throw new Error("You didn't provide enough string/numeric parameters to satisfy all of the dynamic segments for route "+name)}}}return handlerInfoFactory("param",{name:name,handler:handler,params:params})}})});define("router/transition-intent/url-transition-intent",["../transition-intent","../transition-state","../handler-info/factory","../utils","exports"],function(__dependency1__,__dependency2__,__dependency3__,__dependency4__,__exports__){"use strict";var TransitionIntent=__dependency1__["default"];var TransitionState=__dependency2__["default"];var handlerInfoFactory=__dependency3__["default"];var oCreate=__dependency4__.oCreate;var merge=__dependency4__.merge;var subclass=__dependency4__.subclass;__exports__["default"]=subclass(TransitionIntent,{url:null,initialize:function(props){this.url=props.url},applyToState:function(oldState,recognizer,getHandler){var newState=new TransitionState;var results=recognizer.recognize(this.url),queryParams={},i,len;if(!results){throw new UnrecognizedURLError(this.url)}var statesDiffer=false;for(i=0,len=results.length;i=handlerInfos.length?handlerInfos.length-1:payload.resolveIndex;return Promise.reject({error:error,handlerWithError:currentState.handlerInfos[errorHandlerIndex].handler,wasAborted:wasAborted,state:currentState})}function proceed(resolvedHandlerInfo){var wasAlreadyResolved=currentState.handlerInfos[payload.resolveIndex].isResolved;currentState.handlerInfos[payload.resolveIndex++]=resolvedHandlerInfo;if(!wasAlreadyResolved){var handler=resolvedHandlerInfo.handler;if(handler&&handler.redirect){handler.redirect(resolvedHandlerInfo.context,payload)}}return innerShouldContinue().then(resolveOneHandlerInfo,null,promiseLabel("Resolve handler"))}function resolveOneHandlerInfo(){if(payload.resolveIndex===currentState.handlerInfos.length){return{error:null,state:currentState}}var handlerInfo=currentState.handlerInfos[payload.resolveIndex];return handlerInfo.resolve(innerShouldContinue,payload).then(proceed,null,promiseLabel("Proceed"))}}};__exports__["default"]=TransitionState});define("router/transition",["rsvp/promise","./handler-info","./utils","exports"],function(__dependency1__,__dependency2__,__dependency3__,__exports__){"use strict";var Promise=__dependency1__["default"];var ResolvedHandlerInfo=__dependency2__.ResolvedHandlerInfo;var trigger=__dependency3__.trigger;var slice=__dependency3__.slice;var log=__dependency3__.log;var promiseLabel=__dependency3__.promiseLabel;function Transition(router,intent,state,error){var transition=this;this.state=state||router.state;this.intent=intent;this.router=router;this.data=this.intent&&this.intent.data||{};this.resolvedModels={};this.queryParams={};if(error){this.promise=Promise.reject(error);return}if(state){this.params=state.params;this.queryParams=state.queryParams;var len=state.handlerInfos.length;if(len){this.targetName=state.handlerInfos[state.handlerInfos.length-1].name}for(var i=0;i0&&array[len-1]&&array[len-1].hasOwnProperty("queryParams")){queryParams=array[len-1].queryParams;head=slice.call(array,0,len-1);return[head,queryParams]}else{return[array,null]}}__exports__.extractQueryParams=extractQueryParams;function coerceQueryParamsToString(queryParams){for(var key in queryParams){if(typeof queryParams[key]==="number"){queryParams[key]=""+queryParams[key]}else if(isArray(queryParams[key])){for(var i=0,l=queryParams[key].length;i=0;i--){var handlerInfo=handlerInfos[i],handler=handlerInfo.handler;if(handler.events&&handler.events[name]){if(handler.events[name].apply(handler,args)===true){eventWasHandled=true}else{return}}}if(!eventWasHandled&&!ignoreFailure){throw new Error("Nothing handled the event '"+name+"'.")}}__exports__.trigger=trigger;function getChangelist(oldObject,newObject){var key;var results={all:{},changed:{},removed:{}};merge(results.all,newObject);var didChange=false;coerceQueryParamsToString(oldObject);coerceQueryParamsToString(newObject);for(key in oldObject){if(oldObject.hasOwnProperty(key)){if(!newObject.hasOwnProperty(key)){didChange=true;results.removed[key]=oldObject[key]}}}for(key in newObject){if(newObject.hasOwnProperty(key)){if(isArray(oldObject[key])&&isArray(newObject[key])){if(oldObject[key].length!==newObject[key].length){results.changed[key]=newObject[key];didChange=true}else{for(var i=0,l=oldObject[key].length;i":">",'"':""","'":"'","`":"`"},h=/[&<>"'`]/g,c=/[&<>"'`]/;r.extend=s;var p=Object.prototype.toString;r.toString=p;var l=function(t){return"function"==typeof t};l(/x/)&&(l=function(t){return"function"==typeof t&&"[object Function]"===p.call(t)});var l;r.isFunction=l;var u=Array.isArray||function(t){return t&&"object"==typeof t?"[object Array]"===p.call(t):!1};return r.isArray=u,r.escapeExpression=i,r.isEmpty=n,r}(t),s=function(){"use strict";function t(){for(var t=Error.prototype.constructor.apply(this,arguments),e=0;e0?t.helpers.each(e,s):i(this):n(e)}),t.registerHelper("each",function(t,e){var s,i=e.fn,n=e.inverse,r=0,o="";if(u(t)&&(t=t.call(this)),e.data&&(s=m(e.data)),t&&"object"==typeof t)if(l(t))for(var a=t.length;a>r;r++)s&&(s.index=r,s.first=0===r,s.last=r===t.length-1),o+=i(t[r],{data:s});else for(var h in t)t.hasOwnProperty(h)&&(s&&(s.key=h),o+=i(t[h],{data:s}),r++);return 0===r&&(o=n(this)),o}),t.registerHelper("if",function(t,e){return u(t)&&(t=t.call(this)),!e.hash.includeZero&&!t||o.isEmpty(t)?e.inverse(this):e.fn(this)}),t.registerHelper("unless",function(e,s){return t.helpers["if"].call(this,e,{fn:s.inverse,inverse:s.fn,hash:s.hash})}),t.registerHelper("with",function(t,e){return u(t)&&(t=t.call(this)),o.isEmpty(t)?void 0:e.fn(t)}),t.registerHelper("log",function(e,s){var i=s.data&&null!=s.data.level?parseInt(s.data.level,10):1;t.log(i,e)})}function n(t,e){g.log(t,e)}var r={},o=t,a=e,h="1.1.2";r.VERSION=h;var c=4;r.COMPILER_REVISION=c;var p={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};r.REVISION_CHANGES=p;var l=o.isArray,u=o.isFunction,f=o.toString,d="[object Object]";r.HandlebarsEnvironment=s,s.prototype={constructor:s,logger:g,log:n,registerHelper:function(t,e,s){if(f.call(t)===d){if(s||e)throw new a("Arg not supported with multiple helpers");o.extend(this.helpers,t)}else s&&(e.not=s),this.helpers[t]=e},registerPartial:function(t,e){f.call(t)===d?o.extend(this.partials,t):this.partials[t]=e}};var g={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(t,e){if(g.level<=t){var s=g.methodMap[t];"undefined"!=typeof console&&console[s]&&console[s].call(console,e)}}};r.logger=g,r.log=n;var m=function(t){var e={};return o.extend(e,t),e};return r.createFrame=m,r}(e,s),n=function(t,e,s){"use strict";function i(t){var e=t&&t[0]||1,s=u;if(e!==s){if(s>e){var i=f[s],n=f[e];throw new Error("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+i+") or downgrade your runtime to an older version ("+n+").")}throw new Error("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}}function n(t,e){if(!e)throw new Error("No environment passed to template");var s;s=e.compile?function(t,s,i,n,r,o){var h=a.apply(this,arguments);if(h)return h;var c={helpers:n,partials:r,data:o};return r[s]=e.compile(t,{data:void 0!==o},e),r[s](i,c)}:function(t,e){var s=a.apply(this,arguments);if(s)return s;throw new l("The partial "+e+" could not be compiled when running in runtime-only mode")};var n={escapeExpression:p.escapeExpression,invokePartial:s,programs:[],program:function(t,e,s){var i=this.programs[t];return s?i=o(t,e,s):i||(i=this.programs[t]=o(t,e)),i},merge:function(t,e){var s=t||e;return t&&e&&t!==e&&(s={},p.extend(s,e),p.extend(s,t)),s},programWithDepth:r,noop:h,compilerInfo:null};return function(s,r){r=r||{};var o,a,h=r.partial?r:e;r.partial||(o=r.helpers,a=r.partials);var c=t.call(n,h,s,o,a,r.data);return r.partial||i(n.compilerInfo),c}}function r(t,e,s){var i=Array.prototype.slice.call(arguments,3),n=function(t,n){return n=n||{},e.apply(this,[t,n.data||s].concat(i))};return n.program=t,n.depth=i.length,n}function o(t,e,s){var i=function(t,i){return i=i||{},e(t,i.data||s)};return i.program=t,i.depth=0,i}function a(t,e,s,i,n,r){var o={partial:!0,helpers:i,partials:n,data:r};if(void 0===t)throw new l("The partial "+e+" could not be found");return t instanceof Function?t(s,o):void 0}function h(){return""}var c={},p=t,l=e,u=s.COMPILER_REVISION,f=s.REVISION_CHANGES;return c.template=n,c.programWithDepth=r,c.program=o,c.invokePartial=a,c.noop=h,c}(e,s,i),r=function(t,e,s,i,n){"use strict";var r,o=t,a=e,h=s,c=i,p=n,l=function(){var t=new o.HandlebarsEnvironment;return c.extend(t,o),t.SafeString=a,t.Exception=h,t.Utils=c,t.VM=p,t.template=function(e){return p.template(e,t)},t},u=l();return u.create=l,r=u}(i,t,s,e,n),o=function(t){"use strict";function e(t,s,i){this.type="program",this.statements=t,this.strip={},i?(this.inverse=new e(i,s),this.strip.right=s.left):s&&(this.strip.left=s.right)}function s(t,e,s,i){this.type="mustache",this.hash=e,this.strip=i;var n=s[3]||s[2];this.escaped="{"!==n&&"&"!==n;var r=this.id=t[0],o=this.params=t.slice(1),a=this.eligibleHelper=r.isSimple;this.isHelper=a&&(o.length||e)}function i(t,e,s){this.type="partial",this.partialName=t,this.context=e,this.strip=s}function n(t,e,s,i){if(t.id.original!==i.path.original)throw new g(t.id.original+" doesn't match "+i.path.original);this.type="block",this.mustache=t,this.program=e,this.inverse=s,this.strip={left:t.strip.left,right:i.strip.right},(e||s).strip.left=t.strip.right,(s||e).strip.right=i.strip.left,s&&!e&&(this.isInverse=!0)}function r(t){this.type="content",this.string=t}function o(t){this.type="hash",this.pairs=t}function a(t){this.type="ID";for(var e="",s=[],i=0,n=0,r=t.length;r>n;n++){var o=t[n].part;if(e+=(t[n].separator||"")+o,".."===o||"."===o||"this"===o){if(s.length>0)throw new g("Invalid path: "+e);".."===o?i++:this.isScoped=!0}else s.push(o)}this.original=e,this.parts=s,this.string=s.join("."),this.depth=i,this.isSimple=1===t.length&&!this.isScoped&&0===i,this.stringModeValue=this.string}function h(t){this.type="PARTIAL_NAME",this.name=t.original}function c(t){this.type="DATA",this.id=t}function p(t){this.type="STRING",this.original=this.string=this.stringModeValue=t}function l(t){this.type="INTEGER",this.original=this.integer=t,this.stringModeValue=Number(t)}function u(t){this.type="BOOLEAN",this.bool=t,this.stringModeValue="true"===t}function f(t){this.type="comment",this.comment=t}var d={},g=t;return d.ProgramNode=e,d.MustacheNode=s,d.PartialNode=i,d.BlockNode=n,d.ContentNode=r,d.HashNode=o,d.IdNode=a,d.PartialNameNode=h,d.DataNode=c,d.StringNode=p,d.IntegerNode=l,d.BooleanNode=u,d.CommentNode=f,d}(s),a=function(){"use strict";var t,e=function(){function t(t,e){return{left:"~"===t[2],right:"~"===e[0]||"~"===e[1]}}function e(){this.yy={}}var s={trace:function(){},yy:{},symbols_:{error:2,root:3,statements:4,EOF:5,program:6,simpleInverse:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,inMustache:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,CLOSE_UNESCAPED:24,OPEN_PARTIAL:25,partialName:26,partial_option0:27,inMustache_repetition0:28,inMustache_option0:29,dataName:30,param:31,STRING:32,INTEGER:33,BOOLEAN:34,hash:35,hash_repetition_plus0:36,hashSegment:37,ID:38,EQUALS:39,DATA:40,pathSegments:41,SEP:42,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",32:"STRING",33:"INTEGER",34:"BOOLEAN",38:"ID",39:"EQUALS",40:"DATA",42:"SEP"},productions_:[0,[3,2],[3,1],[6,2],[6,3],[6,2],[6,1],[6,1],[6,0],[4,1],[4,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,4],[7,2],[17,3],[17,1],[31,1],[31,1],[31,1],[31,1],[31,1],[35,1],[37,3],[26,1],[26,1],[26,1],[30,2],[21,1],[41,3],[41,1],[27,0],[27,1],[28,0],[28,2],[29,0],[29,1],[36,1],[36,2]],performAction:function(e,s,i,n,r,o){var a=o.length-1;switch(r){case 1:return new n.ProgramNode(o[a-1]);case 2:return new n.ProgramNode([]);case 3:this.$=new n.ProgramNode([],o[a-1],o[a]);break;case 4:this.$=new n.ProgramNode(o[a-2],o[a-1],o[a]);break;case 5:this.$=new n.ProgramNode(o[a-1],o[a],[]);break;case 6:this.$=new n.ProgramNode(o[a]);break;case 7:this.$=new n.ProgramNode([]);break;case 8:this.$=new n.ProgramNode([]);break;case 9:this.$=[o[a]];break;case 10:o[a-1].push(o[a]),this.$=o[a-1];break;case 11:this.$=new n.BlockNode(o[a-2],o[a-1].inverse,o[a-1],o[a]);break;case 12:this.$=new n.BlockNode(o[a-2],o[a-1],o[a-1].inverse,o[a]);break;case 13:this.$=o[a];break;case 14:this.$=o[a];break;case 15:this.$=new n.ContentNode(o[a]);break;case 16:this.$=new n.CommentNode(o[a]);break;case 17:this.$=new n.MustacheNode(o[a-1][0],o[a-1][1],o[a-2],t(o[a-2],o[a]));break;case 18:this.$=new n.MustacheNode(o[a-1][0],o[a-1][1],o[a-2],t(o[a-2],o[a]));break;case 19:this.$={path:o[a-1],strip:t(o[a-2],o[a])};break;case 20:this.$=new n.MustacheNode(o[a-1][0],o[a-1][1],o[a-2],t(o[a-2],o[a]));break;case 21:this.$=new n.MustacheNode(o[a-1][0],o[a-1][1],o[a-2],t(o[a-2],o[a]));break;case 22:this.$=new n.PartialNode(o[a-2],o[a-1],t(o[a-3],o[a]));break;case 23:this.$=t(o[a-1],o[a]);break;case 24:this.$=[[o[a-2]].concat(o[a-1]),o[a]];break;case 25:this.$=[[o[a]],null];break;case 26:this.$=o[a];break;case 27:this.$=new n.StringNode(o[a]);break;case 28:this.$=new n.IntegerNode(o[a]);break;case 29:this.$=new n.BooleanNode(o[a]);break;case 30:this.$=o[a];break;case 31:this.$=new n.HashNode(o[a]);break;case 32:this.$=[o[a-2],o[a]];break;case 33:this.$=new n.PartialNameNode(o[a]);break;case 34:this.$=new n.PartialNameNode(new n.StringNode(o[a]));break;case 35:this.$=new n.PartialNameNode(new n.IntegerNode(o[a]));break;case 36:this.$=new n.DataNode(o[a]);break;case 37:this.$=new n.IdNode(o[a]);break;case 38:o[a-2].push({part:o[a],separator:o[a-1]}),this.$=o[a-2];break;case 39:this.$=[{part:o[a]}];break;case 42:this.$=[];break;case 43:o[a-1].push(o[a]);break;case 46:this.$=[o[a]];break;case 47:o[a-1].push(o[a])}},table:[{3:1,4:2,5:[1,3],8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[3]},{5:[1,16],8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[2,2]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],25:[2,9]},{4:20,6:18,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{4:20,6:22,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],25:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],25:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],25:[2,15]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],25:[2,16]},{17:23,21:24,30:25,38:[1,28],40:[1,27],41:26},{17:29,21:24,30:25,38:[1,28],40:[1,27],41:26},{17:30,21:24,30:25,38:[1,28],40:[1,27],41:26},{17:31,21:24,30:25,38:[1,28],40:[1,27],41:26},{21:33,26:32,32:[1,34],33:[1,35],38:[1,28],41:26},{1:[2,1]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],25:[2,10]},{10:36,20:[1,37]},{4:38,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,7],22:[1,13],23:[1,14],25:[1,15]},{7:39,8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,6],22:[1,13],23:[1,14],25:[1,15]},{17:23,18:[1,40],21:24,30:25,38:[1,28],40:[1,27],41:26},{10:41,20:[1,37]},{18:[1,42]},{18:[2,42],24:[2,42],28:43,32:[2,42],33:[2,42],34:[2,42],38:[2,42],40:[2,42]},{18:[2,25],24:[2,25]},{18:[2,37],24:[2,37],32:[2,37],33:[2,37],34:[2,37],38:[2,37],40:[2,37],42:[1,44]},{21:45,38:[1,28],41:26},{18:[2,39],24:[2,39],32:[2,39],33:[2,39],34:[2,39],38:[2,39],40:[2,39],42:[2,39]},{18:[1,46]},{18:[1,47]},{24:[1,48]},{18:[2,40],21:50,27:49,38:[1,28],41:26},{18:[2,33],38:[2,33]},{18:[2,34],38:[2,34]},{18:[2,35],38:[2,35]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],25:[2,11]},{21:51,38:[1,28],41:26},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,3],22:[1,13],23:[1,14],25:[1,15]},{4:52,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,5],22:[1,13],23:[1,14],25:[1,15]},{14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],25:[2,23]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],25:[2,12]},{14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],25:[2,18]},{18:[2,44],21:56,24:[2,44],29:53,30:60,31:54,32:[1,57],33:[1,58],34:[1,59],35:55,36:61,37:62,38:[1,63],40:[1,27],41:26},{38:[1,64]},{18:[2,36],24:[2,36],32:[2,36],33:[2,36],34:[2,36],38:[2,36],40:[2,36]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],25:[2,17]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],25:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],25:[2,21]},{18:[1,65]},{18:[2,41]},{18:[1,66]},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],25:[1,15]},{18:[2,24],24:[2,24]},{18:[2,43],24:[2,43],32:[2,43],33:[2,43],34:[2,43],38:[2,43],40:[2,43]},{18:[2,45],24:[2,45]},{18:[2,26],24:[2,26],32:[2,26],33:[2,26],34:[2,26],38:[2,26],40:[2,26]},{18:[2,27],24:[2,27],32:[2,27],33:[2,27],34:[2,27],38:[2,27],40:[2,27]},{18:[2,28],24:[2,28],32:[2,28],33:[2,28],34:[2,28],38:[2,28],40:[2,28]},{18:[2,29],24:[2,29],32:[2,29],33:[2,29],34:[2,29],38:[2,29],40:[2,29]},{18:[2,30],24:[2,30],32:[2,30],33:[2,30],34:[2,30],38:[2,30],40:[2,30]},{18:[2,31],24:[2,31],37:67,38:[1,68]},{18:[2,46],24:[2,46],38:[2,46]},{18:[2,39],24:[2,39],32:[2,39],33:[2,39],34:[2,39],38:[2,39],39:[1,69],40:[2,39],42:[2,39]},{18:[2,38],24:[2,38],32:[2,38],33:[2,38],34:[2,38],38:[2,38],40:[2,38],42:[2,38]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],25:[2,22]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],25:[2,19]},{18:[2,47],24:[2,47],38:[2,47]},{39:[1,69]},{21:56,30:60,31:70,32:[1,57],33:[1,58],34:[1,59],38:[1,28],40:[1,27],41:26},{18:[2,32],24:[2,32],38:[2,32]}],defaultActions:{3:[2,2],16:[2,1],50:[2,41]},parseError:function(t){throw new Error(t)},parse:function(t){function e(){var t;return t=s.lexer.lex()||1,"number"!=typeof t&&(t=s.symbols_[t]||t),t}var s=this,i=[0],n=[null],r=[],o=this.table,a="",h=0,c=0,p=0;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;r.push(l);var u=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var f,d,g,m,y,v,k,S,x,b={};;){if(g=i[i.length-1],this.defaultActions[g]?m=this.defaultActions[g]:((null===f||"undefined"==typeof f)&&(f=e()),m=o[g]&&o[g][f]),"undefined"==typeof m||!m.length||!m[0]){var E="";if(!p){x=[];for(v in o[g])this.terminals_[v]&&v>2&&x.push("'"+this.terminals_[v]+"'");E=this.lexer.showPosition?"Parse error on line "+(h+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(E,{text:this.lexer.match,token:this.terminals_[f]||f,line:this.lexer.yylineno,loc:l,expected:x})}}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+f);switch(m[0]){case 1:i.push(f),n.push(this.lexer.yytext),r.push(this.lexer.yylloc),i.push(m[1]),f=null,d?(f=d,d=null):(c=this.lexer.yyleng,a=this.lexer.yytext,h=this.lexer.yylineno,l=this.lexer.yylloc,p>0&&p--);break;case 2:if(k=this.productions_[m[1]][1],b.$=n[n.length-k],b._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},u&&(b._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),y=this.performAction.call(b,a,c,h,this.yy,m[1],n,r),"undefined"!=typeof y)return y;k&&(i=i.slice(0,-1*k*2),n=n.slice(0,-1*k),r=r.slice(0,-1*k)),i.push(this.productions_[m[1]][0]),n.push(b.$),r.push(b._$),S=o[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this},more:function(){return this._more=!0,this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,s,i,n;this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),o=0;oe[0].length)||(e=s,i=o,this.options.flex));o++);return e?(n=e[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,r[i],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t?t:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return"undefined"!=typeof t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return t.options={},t.performAction=function(t,e,s,i){function n(t,s){return e.yytext=e.yytext.substr(t,e.yyleng-s)}switch(s){case 0:if("\\\\"===e.yytext.slice(-2)?(n(0,1),this.begin("mu")):"\\"===e.yytext.slice(-1)?(n(0,1),this.begin("emu")):this.begin("mu"),e.yytext)return 14;break;case 1:return 14;case 2:return"\\"!==e.yytext.slice(-1)&&this.popState(),"\\"===e.yytext.slice(-1)&&n(0,1),14;case 3:return n(0,4),this.popState(),15;case 4:return 25;case 5:return 16;case 6:return 20;case 7:return 19;case 8:return 19;case 9:return 23;case 10:return 22;case 11:this.popState(),this.begin("com");break;case 12:return n(3,5),this.popState(),15;case 13:return 22;case 14:return 39;case 15:return 38;case 16:return 38;case 17:return 42;case 18:break;case 19:return this.popState(),24;case 20:return this.popState(),18;case 21:return e.yytext=n(1,2).replace(/\\"/g,'"'),32;case 22:return e.yytext=n(1,2).replace(/\\'/g,"'"),32;case 23:return 40;case 24:return 34;case 25:return 34;case 26:return 33;case 27:return 38;case 28:return e.yytext=n(1,2),38;case 29:return"INVALID";case 30:return 5}},t.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s])))/,/^(?:false(?=([~}\s])))/,/^(?:-?[0-9]+(?=([~}\s])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],t.conditions={mu:{rules:[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[3],inclusive:!1},INITIAL:{rules:[0,1,30],inclusive:!0}},t}();return s.lexer=i,e.prototype=s,s.Parser=e,new e}();return t=e}(),h=function(t,e){"use strict";function s(t){return t.constructor===r.ProgramNode?t:(n.yy=r,n.parse(t))}var i={},n=t,r=e;return i.parser=n,i.parse=s,i}(a,o),c=function(t){"use strict";function e(t){this.value=t}function s(){}var i,n=t.COMPILER_REVISION,r=t.REVISION_CHANGES,o=t.log;s.prototype={nameLookup:function(t,e){var i,n;return 0===t.indexOf("depth")&&(i=!0),n=/^[0-9]+$/.test(e)?t+"["+e+"]":s.isValidJavaScriptVariableName(e)?t+"."+e:t+"['"+e+"']",i?"("+t+" && "+n+")":n},appendToBuffer:function(t){return this.environment.isSimple?"return "+t+";":{appendToBuffer:!0,content:t,toString:function(){return"buffer += "+t+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(t,e,s,i){this.environment=t,this.options=e||{},o("debug",this.environment.disassemble()+"\n\n"),this.name=this.environment.name,this.isChild=!!s,this.context=s||{programs:[],environments:[],aliases:{}},this.preamble(),this.stackSlot=0,this.stackVars=[],this.registers={list:[]},this.compileStack=[],this.inlineStack=[],this.compileChildren(t,e);var n,r=t.opcodes;this.i=0;for(var a=r.length;this.ia;a++)i.push("depth"+this.environment.depths.list[a]);var c=this.mergeSource();if(!this.isChild){var p=n,l=r[p];c="this.compilerInfo = ["+p+",'"+l+"'];\n"+c}if(t)return i.push(c),Function.apply(this,i);var u="function "+(this.name||"")+"("+i.join(",")+") {\n "+c+"}";return o("debug",u+"\n\n"),u},mergeSource:function(){for(var t,e="",s=0,i=this.source.length;i>s;s++){var n=this.source[s];n.appendToBuffer?t=t?t+"\n + "+n.content:n.content:(t&&(e+="buffer += "+t+";\n ",t=void 0),e+=n+"\n ")}return e},blockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var t=["depth0"];this.setupParams(0,t),this.replaceStack(function(e){return t.splice(1,0,e),"blockHelperMissing.call("+t.join(", ")+")"})},ambiguousBlockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var t=["depth0"];this.setupParams(0,t);var e=this.topStack();t.splice(1,0,e),t[t.length-1]="options",this.pushSource("if (!"+this.lastHelper+") { "+e+" = blockHelperMissing.call("+t.join(", ")+"); }")},appendContent:function(t){this.pendingContent&&(t=this.pendingContent+t),this.stripNext&&(t=t.replace(/^\s+/,"")),this.pendingContent=t},strip:function(){this.pendingContent&&(this.pendingContent=this.pendingContent.replace(/\s+$/,"")),this.stripNext="strip"},append:function(){this.flushInline();var t=this.popStack();this.pushSource("if("+t+" || "+t+" === 0) { "+this.appendToBuffer(t)+" }"),this.environment.isSimple&&this.pushSource("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){this.context.aliases.escapeExpression="this.escapeExpression",this.pushSource(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(t){this.lastContext!==t&&(this.lastContext=t)},lookupOnContext:function(t){this.push(this.nameLookup("depth"+this.lastContext,t,"context"))},pushContext:function(){this.pushStackLiteral("depth"+this.lastContext)},resolvePossibleLambda:function(){this.context.aliases.functionType='"function"',this.replaceStack(function(t){return"typeof "+t+" === functionType ? "+t+".apply(depth0) : "+t})},lookup:function(t){this.replaceStack(function(e){return e+" == null || "+e+" === false ? "+e+" : "+this.nameLookup(e,t,"context")})},lookupData:function(){this.push("data")},pushStringParam:function(t,e){this.pushStackLiteral("depth"+this.lastContext),this.pushString(e),"string"==typeof t?this.pushString(t):this.pushStackLiteral(t)},emptyHash:function(){this.pushStackLiteral("{}"),this.options.stringParams&&(this.register("hashTypes","{}"),this.register("hashContexts","{}"))},pushHash:function(){this.hash={values:[],types:[],contexts:[]}},popHash:function(){var t=this.hash;this.hash=void 0,this.options.stringParams&&(this.register("hashContexts","{"+t.contexts.join(",")+"}"),this.register("hashTypes","{"+t.types.join(",")+"}")),this.push("{\n "+t.values.join(",\n ")+"\n }")},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},push:function(t){return this.inlineStack.push(t),t},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){this.pushStackLiteral(null!=t?this.programExpression(t):null)},invokeHelper:function(t,e){this.context.aliases.helperMissing="helpers.helperMissing";var s=this.lastHelper=this.setupHelper(t,e,!0),i=this.nameLookup("depth"+this.lastContext,e,"context");this.push(s.name+" || "+i),this.replaceStack(function(t){return t+" ? "+t+".call("+s.callParams+") : helperMissing.call("+s.helperMissingParams+")"})},invokeKnownHelper:function(t,e){var s=this.setupHelper(t,e);this.push(s.name+".call("+s.callParams+")")},invokeAmbiguous:function(t,e){this.context.aliases.functionType='"function"',this.pushStackLiteral("{}");var s=this.setupHelper(0,t,e),i=this.lastHelper=this.nameLookup("helpers",t,"helper"),n=this.nameLookup("depth"+this.lastContext,t,"context"),r=this.nextStack();this.pushSource("if ("+r+" = "+i+") { "+r+" = "+r+".call("+s.callParams+"); }"),this.pushSource("else { "+r+" = "+n+"; "+r+" = typeof "+r+" === functionType ? "+r+".call("+s.callParams+") : "+r+"; }")},invokePartial:function(t){var e=[this.nameLookup("partials",t,"partial"),"'"+t+"'",this.popStack(),"helpers","partials"];this.options.data&&e.push("data"),this.context.aliases.self="this",this.push("self.invokePartial("+e.join(", ")+")")},assignToHash:function(t){var e,s,i=this.popStack();this.options.stringParams&&(s=this.popStack(),e=this.popStack());var n=this.hash;e&&n.contexts.push("'"+t+"': "+e),s&&n.types.push("'"+t+"': "+s),n.values.push("'"+t+"': ("+i+")")},compiler:s,compileChildren:function(t,e){for(var s,i,n=t.children,r=0,o=n.length;o>r;r++){s=n[r],i=new this.compiler;var a=this.matchExistingProgram(s);null==a?(this.context.programs.push(""),a=this.context.programs.length,s.index=a,s.name="program"+a,this.context.programs[a]=i.compile(s,e,this.context),this.context.environments[a]=s):(s.index=a,s.name="program"+a)}},matchExistingProgram:function(t){for(var e=0,s=this.context.environments.length;s>e;e++){var i=this.context.environments[e];if(i&&i.equals(t))return e}},programExpression:function(t){if(this.context.aliases.self="this",null==t)return"self.noop";for(var e,s=this.environment.children[t],i=s.depths.list,n=[s.index,s.name,"data"],r=0,o=i.length;o>r;r++)e=i[r],n.push(1===e?"depth0":"depth"+(e-1));return(0===i.length?"self.program(":"self.programWithDepth(")+n.join(", ")+")"},register:function(t,e){this.useRegister(t),this.pushSource(t+" = "+e+";")},useRegister:function(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},pushStackLiteral:function(t){return this.push(new e(t))},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent))),this.pendingContent=void 0),t&&this.source.push(t)},pushStack:function(t){this.flushInline();var e=this.incrStack();return t&&this.pushSource(e+" = "+t+";"),this.compileStack.push(e),e},replaceStack:function(t){var s,i="",n=this.isInline();if(n){var r=this.popStack(!0);if(r instanceof e)s=r.value;else{var o=this.stackSlot?this.topStackName():this.incrStack();i="("+this.push(o)+" = "+r+"),",s=this.topStack()}}else s=this.topStack();var a=t.call(this,s);return n?((this.inlineStack.length||this.compileStack.length)&&this.popStack(),this.push("("+i+a+")")):(/^stack/.test(s)||(s=this.nextStack()),this.pushSource(s+" = ("+i+a+");")),s},nextStack:function(){return this.pushStack()},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;if(t.length){this.inlineStack=[];for(var s=0,i=t.length;i>s;s++){var n=t[s];n instanceof e?this.compileStack.push(n):this.pushStack(n)}}},isInline:function(){return this.inlineStack.length},popStack:function(t){var s=this.isInline(),i=(s?this.inlineStack:this.compileStack).pop();return!t&&i instanceof e?i.value:(s||this.stackSlot--,i)},topStack:function(t){var s=this.isInline()?this.inlineStack:this.compileStack,i=s[s.length-1];return!t&&i instanceof e?i.value:i},quotedString:function(t){return'"'+t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},setupHelper:function(t,e,s){var i=[];this.setupParams(t,i,s);var n=this.nameLookup("helpers",e,"helper");return{params:i,name:n,callParams:["depth0"].concat(i).join(", "),helperMissingParams:s&&["depth0",this.quotedString(e)].concat(i).join(", ")}},setupParams:function(t,e,s){var i,n,r,o=[],a=[],h=[]; -o.push("hash:"+this.popStack()),n=this.popStack(),r=this.popStack(),(r||n)&&(r||(this.context.aliases.self="this",r="self.noop"),n||(this.context.aliases.self="this",n="self.noop"),o.push("inverse:"+n),o.push("fn:"+r));for(var c=0;t>c;c++)i=this.popStack(),e.push(i),this.options.stringParams&&(h.push(this.popStack()),a.push(this.popStack()));return this.options.stringParams&&(o.push("contexts:["+a.join(",")+"]"),o.push("types:["+h.join(",")+"]"),o.push("hashContexts:hashContexts"),o.push("hashTypes:hashTypes")),this.options.data&&o.push("data:data"),o="{"+o.join(",")+"}",s?(this.register("options",o),e.push("options")):e.push(o),e.join(", ")}};for(var a="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),h=s.RESERVED_WORDS={},c=0,p=a.length;p>c;c++)h[a[c]]=!0;return s.isValidJavaScriptVariableName=function(t){return!s.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(t)?!0:!1},i=s}(i),p=function(t,e,s,i){"use strict";function n(){}function r(t,e){if(null==t||"string"!=typeof t&&t.constructor!==l.ProgramNode)throw new h("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0);var s=c(t),i=(new n).compile(s,e);return(new p).compile(i,e)}function o(t,e,s){function i(){var i=c(t),r=(new n).compile(i,e),o=(new p).compile(r,e,void 0,!0);return s.template(o)}if(null==t||"string"!=typeof t&&t.constructor!==l.ProgramNode)throw new h("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=e||{},"data"in e||(e.data=!0);var r;return function(t,e){return r||(r=i()),r.call(this,t,e)}}var a={},h=t,c=e.parse,p=s,l=i;return a.Compiler=n,n.prototype={compiler:n,disassemble:function(){for(var t,e,s,i=this.opcodes,n=[],r=0,o=i.length;o>r;r++)if(t=i[r],"DECLARE"===t.opcode)n.push("DECLARE "+t.name+"="+t.value);else{e=[];for(var a=0;as;s++){var i=this.opcodes[s],n=t.opcodes[s];if(i.opcode!==n.opcode||i.args.length!==n.args.length)return!1;for(var r=0;rs;s++)if(!this.children[s].equals(t.children[s]))return!1;return!0},guid:0,compile:function(t,e){this.opcodes=[],this.children=[],this.depths={list:[]},this.options=e;var s=this.options.knownHelpers;if(this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0},s)for(var i in s)this.options.knownHelpers[i]=s[i];return this.accept(t)},accept:function(t){var e,s=t.strip||{};return s.left&&this.opcode("strip"),e=this[t.type](t),s.right&&this.opcode("strip"),e},program:function(t){for(var e=t.statements,s=0,i=e.length;i>s;s++)this.accept(e[s]);return this.isSimple=1===i,this.depths.list=this.depths.list.sort(function(t,e){return t-e}),this},compileProgram:function(t){var e,s=(new this.compiler).compile(t,this.options),i=this.guid++;this.usePartial=this.usePartial||s.usePartial,this.children[i]=s;for(var n=0,r=s.depths.list.length;r>n;n++)e=s.depths.list[n],2>e||this.addDepth(e-1);return i},block:function(t){var e=t.mustache,s=t.program,i=t.inverse;s&&(s=this.compileProgram(s)),i&&(i=this.compileProgram(i));var n=this.classifyMustache(e);"helper"===n?this.helperMustache(e,s,i):"simple"===n?(this.simpleMustache(e),this.opcode("pushProgram",s),this.opcode("pushProgram",i),this.opcode("emptyHash"),this.opcode("blockValue")):(this.ambiguousMustache(e,s,i),this.opcode("pushProgram",s),this.opcode("pushProgram",i),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},hash:function(t){var e,s,i=t.pairs;this.opcode("pushHash");for(var n=0,r=i.length;r>n;n++)e=i[n],s=e[1],this.options.stringParams?(s.depth&&this.addDepth(s.depth),this.opcode("getContext",s.depth||0),this.opcode("pushStringParam",s.stringModeValue,s.type)):this.accept(s),this.opcode("assignToHash",e[0]);this.opcode("popHash")},partial:function(t){var e=t.partialName;this.usePartial=!0,t.context?this.ID(t.context):this.opcode("push","depth0"),this.opcode("invokePartial",e.name),this.opcode("append")},content:function(t){this.opcode("appendContent",t.string)},mustache:function(t){var e=this.options,s=this.classifyMustache(t);"simple"===s?this.simpleMustache(t):"helper"===s?this.helperMustache(t):this.ambiguousMustache(t),this.opcode(t.escaped&&!e.noEscape?"appendEscaped":"append")},ambiguousMustache:function(t,e,s){var i=t.id,n=i.parts[0],r=null!=e||null!=s;this.opcode("getContext",i.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",s),this.opcode("invokeAmbiguous",n,r)},simpleMustache:function(t){var e=t.id;"DATA"===e.type?this.DATA(e):e.parts.length?this.ID(e):(this.addDepth(e.depth),this.opcode("getContext",e.depth),this.opcode("pushContext")),this.opcode("resolvePossibleLambda")},helperMustache:function(t,e,s){var i=this.setupFullMustacheParams(t,e,s),n=t.id.parts[0];if(this.options.knownHelpers[n])this.opcode("invokeKnownHelper",i.length,n);else{if(this.options.knownHelpersOnly)throw new Error("You specified knownHelpersOnly, but used the unknown helper "+n);this.opcode("invokeHelper",i.length,n)}},ID:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0];e?this.opcode("lookupOnContext",t.parts[0]):this.opcode("pushContext");for(var s=1,i=t.parts.length;i>s;s++)this.opcode("lookup",t.parts[s])},DATA:function(t){if(this.options.data=!0,t.id.isScoped||t.id.depth)throw new h("Scoped data references are not supported: "+t.original);this.opcode("lookupData");for(var e=t.id.parts,s=0,i=e.length;i>s;s++)this.opcode("lookup",e[s])},STRING:function(t){this.opcode("pushString",t.string)},INTEGER:function(t){this.opcode("pushLiteral",t.integer)},BOOLEAN:function(t){this.opcode("pushLiteral",t.bool)},comment:function(){},opcode:function(t){this.opcodes.push({opcode:t,args:[].slice.call(arguments,1)})},declare:function(t,e){this.opcodes.push({opcode:"DECLARE",name:t,value:e})},addDepth:function(t){if(isNaN(t))throw new Error("EWOT");0!==t&&(this.depths[t]||(this.depths[t]=!0,this.depths.list.push(t)))},classifyMustache:function(t){var e=t.isHelper,s=t.eligibleHelper,i=this.options;if(s&&!e){var n=t.id.parts[0];i.knownHelpers[n]?e=!0:i.knownHelpersOnly&&(s=!1)}return e?"helper":s?"ambiguous":"simple"},pushParams:function(t){for(var e,s=t.length;s--;)e=t[s],this.options.stringParams?(e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",e.stringModeValue,e.type)):this[e.type](e)},setupMustacheParams:function(t){var e=t.params;return this.pushParams(e),t.hash?this.hash(t.hash):this.opcode("emptyHash"),e},setupFullMustacheParams:function(t,e,s){var i=t.params;return this.pushParams(i),this.opcode("pushProgram",e),this.opcode("pushProgram",s),t.hash?this.hash(t.hash):this.opcode("emptyHash"),i}},a.precompile=r,a.compile=o,a}(s,h,c,o),l=function(t,e,s,i,n){"use strict";var r,o=t,a=e,h=s.parser,c=s.parse,p=i.Compiler,l=i.compile,u=i.precompile,f=n,d=o.create,g=function(){var t=d();return t.compile=function(e,s){return l(e,s,t)},t.precompile=u,t.AST=a,t.Compiler=p,t.JavaScriptCompiler=f,t.Parser=h,t.parse=c,t};return o=g(),o.create=g,r=o}(r,o,h,p,c);return l}(); \ No newline at end of file diff --git a/ui/javascripts/libs/handlebars-1.3.0.min.js b/ui/javascripts/libs/handlebars-1.3.0.min.js new file mode 100644 index 0000000000..cf13f76af7 --- /dev/null +++ b/ui/javascripts/libs/handlebars-1.3.0.min.js @@ -0,0 +1,83 @@ +var Handlebars=function(){var y=function(){function l(h){this.string=h}l.prototype.toString=function(){return""+this.string};return l}(),v=function(l){function h(a){return b[a]||"&"}var g={},b={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},a=/[&<>"'`]/g,c=/[&<>"'`]/;g.extend=function(a,b){for(var k in b)Object.prototype.hasOwnProperty.call(b,k)&&(a[k]=b[k])};var d=Object.prototype.toString;g.toString=d;var e=function(a){return"function"===typeof a};e(/x/)&&(e=function(a){return"function"=== +typeof a&&"[object Function]"===d.call(a)});g.isFunction=e;var x=Array.isArray||function(a){return a&&"object"===typeof a?"[object Array]"===d.call(a):!1};g.isArray=x;g.escapeExpression=function(b){if(b instanceof l)return b.toString();if(!b&&0!==b)return"";b=""+b;return!c.test(b)?b:b.replace(a,h)};g.isEmpty=function(a){return!a&&0!==a?!0:x(a)&&0===a.length?!0:!1};return g}(y),p=function(){function l(g,b){var a;b&&b.firstLine&&(a=b.firstLine,g+=" - "+a+":"+b.firstColumn);for(var c=Error.prototype.constructor.call(this, +g),d=0;d= 1.0.0"};var x=d.isArray,f=d.isFunction,r=d.toString;c.HandlebarsEnvironment=g;g.prototype={constructor:g,logger:k,log:a,registerHelper:function(a,b,k){if("[object Object]"===r.call(a)){if(k||b)throw new e("Arg not supported with multiple helpers");d.extend(this.helpers,a)}else k&&(b.not=k),this.helpers[a]=b},registerPartial:function(a,b){"[object Object]"===r.call(a)?d.extend(this.partials,a):this.partials[a]=b}};var k= +{methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(a,b){if(k.level<=a){var c=k.methodMap[a];"undefined"!==typeof console&&console[c]&&console[c].call(console,b)}}};c.logger=k;c.log=a;var n=function(a){var b={};d.extend(b,a);return b};c.createFrame=n;return c}(v,p),A=function(l,h,g){function b(a,b,c){var d=function(a,n){n=n||{};return b(a,n.data||c)};d.program=a;d.depth=0;return d}var a={},c=g.COMPILER_REVISION,d=g.REVISION_CHANGES;a.checkRevision= +function(a){var b=a&&a[0]||1;if(b!==c){if(ba.length&&(a+=this._input.substr(0, +20-a.length));return(a.substr(0,20)+(20a[0].length))if(a=b,d=g,!this.options.flex)break;if(a){if(b=a[0].match(/(?:\r\n?|\n).*/g))this.yylineno+= +b.length;this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length};this.yytext+=a[0];this.match+=a[0];this.matches=a;this.yyleng=this.yytext.length;this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]);this._more=!1;this._input=this._input.slice(a[0].length);this.matched+=a[0];a=this.performAction.call(this,this.yy, +this,e[d],this.conditionStack[this.conditionStack.length-1]);this.done&&this._input&&(this.done=!1);if(a)return a}else return""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!==typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length- +1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)},options:{},performAction:function(a,b,d,e){function g(a,d){return b.yytext=b.yytext.substr(a,b.yyleng-d)}switch(d){case 0:"\\\\"===b.yytext.slice(-2)?(g(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(g(0,1),this.begin("emu")):this.begin("mu");if(b.yytext)return 14;break;case 1:return 14;case 2:return this.popState(),14;case 3:return g(0,4),this.popState(),15;case 4:return 35; +case 5:return 36;case 6:return 25;case 7:return 16;case 8:return 20;case 9:return 19;case 10:return 19;case 11:return 23;case 12:return 22;case 13:this.popState();this.begin("com");break;case 14:return g(3,5),this.popState(),15;case 15:return 22;case 16:return 41;case 17:return 40;case 18:return 40;case 19:return 44;case 21:return this.popState(),24;case 22:return this.popState(),18;case 23:return b.yytext=g(1,2).replace(/\\"/g,'"'),32;case 24:return b.yytext=g(1,2).replace(/\\'/g,"'"),32;case 25:return 42; +case 26:return 34;case 27:return 34;case 28:return 33;case 29:return 40;case 30:return b.yytext=g(1,2),40;case 31:return"INVALID";case 32:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/, +/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[3],inclusive:!1},INITIAL:{rules:[0,1,32],inclusive:!0}}}}(); +g.lexer=b;h.prototype=g;g.Parser=h;return new h}()}(),v),B=function(l){function h(){}var g={};g.Compiler=h;h.prototype={compiler:h,disassemble:function(){for(var b=this.opcodes,a,c=[],d,e,g=0,f=b.length;gc||this.addDepth(c-1);return a},block:function(b){var a=b.mustache,c=b.program;b=b.inverse;c&&(c=this.compileProgram(c));b&&(b=this.compileProgram(b));var a=a.sexpr,d=this.classifySexpr(a);"helper"===d?this.helperSexpr(a,c,b):"simple"===d?(this.simpleSexpr(a),this.opcode("pushProgram",c),this.opcode("pushProgram",b),this.opcode("emptyHash"), +this.opcode("blockValue")):(this.ambiguousSexpr(a,c,b),this.opcode("pushProgram",c),this.opcode("pushProgram",b),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue"));this.opcode("append")},hash:function(b){b=b.pairs;var a,c;this.opcode("pushHash");for(var d=0,e=b.length;dthis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot);return this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;if(a.length){this.inlineStack=[];for(var b=0,c=a.length;bthis.lengthBeforeRender&&(this.clearRenderedChildren(),this._childViews.length=this.lengthBeforeRender),l?(o=Ember.RenderBuffer(),o=this.renderToBuffer(o),h=this._childViews.length>0,h&&this.invokeRecursively(e,!1),i.innerHTML=o.innerString?o.innerString():s(o),r(this,"element",i),this.transitionTo("inDOM"),h&&this.invokeRecursively(t,!1)):i.innerHTML="")}var n=Ember.get,r=Ember.set,s=function(e){var t=[],i=e.childBuffers;return Ember.ArrayPolyfills.forEach.call(i,function(e){var i="string"==typeof e;i?t.push(e):e.array(t)}),t.join("")};Ember.ListItemView=Ember.View.extend(Ember.ListItemViewMixin,{updateContext:function(e){var t=n(this,"context");Ember.instrument("view.updateContext.render",this,function(){t!==e&&(r(this,"context",e),e&&e.isController&&r(this,"controller",e))},this)},rerender:function(){Ember.run.scheduleOnce("render",this,i)},_contextDidChange:Ember.observer(i,"context","controller")})}(),function(){var e=Ember.get,t=Ember.set;Ember.ReusableListItemView=Ember.View.extend(Ember.ListItemViewMixin,{init:function(){this._super();var e=Ember.ObjectProxy.create();this.set("context",e),this._proxyContext=e},isVisible:Ember.computed("context.content",function(){return!!this.get("context.content")}),updateContext:function(i){var n=e(this._proxyContext,"content");n!==i&&("inDOM"===this.state&&this.prepareForReuse(i),t(this._proxyContext,"content",i),i&&i.isController&&t(this,"controller",i))},prepareForReuse:Ember.K})}(),function(){function e(e){if(e in i)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),r=0;r'),this._super(e),e.push("")},willInsertElement:function(){if(!this.get("height")||!this.get("rowHeight"))throw new Error("A ListView must be created with a height and a rowHeight.");this._super()},style:Ember.computed("height","width",function(){var e,t,i,n;e=l(this,"height"),t=l(this,"width"),n=l(this,"css"),i="",e&&(i+="height:"+e+"px;"),t&&(i+="width:"+t+"px;");for(var r in n)n.hasOwnProperty(r)&&(i+=r+":"+n[r]+";");return i}),scrollTo:function(){throw new Error("must override to perform the visual scroll and effectively delegate to _scrollContentTo")},_scrollTo:Ember.K,_scrollContentTo:function(e){var t,i,n,r,s,o,h;if(o=a(0,e),this.scrollTop!==o){var u=a(0,l(this,"totalHeight")-l(this,"height"));o=c(o,u),h=l(this,"content"),s=l(h,"length"),t=this._startingIndex(s),Ember.instrument("view._scrollContentTo",{scrollTop:o,content:h,startingIndex:t,endingIndex:c(a(s-1,0),t+this._numChildViewsForViewport())},function(){return this.scrollTop=o,r=a(s-1,0),t=this._startingIndex(),n=t+this._numChildViewsForViewport(),i=c(r,n),t===this._lastStartingIndex&&i===this._lastEndingIndex?(this.trigger("scrollYChanged",e),void 0):(Ember.run(this,function(){this._reuseChildren(),this._lastStartingIndex=t,this._lastEndingIndex=i,this.trigger("scrollYChanged",e)}),void 0)},this)}},totalHeight:Ember.computed("content.length","rowHeight","columnCount","bottomPadding",function(){var e,t,i,n;return e=l(this,"content.length"),t=l(this,"rowHeight"),i=l(this,"columnCount"),n=l(this,"bottomPadding"),d(e/i)*t+n}),_prepareChildForReuse:function(e){e.prepareForReuse()},_reuseChildForContentIndex:function(e,t){var i,n,r,s;i=l(this,"content"),s=l(this,"enableProfiling"),r=this.positionForIndex(t),e.updatePosition(r),h(e,"contentIndex",t),s&&Ember.instrument("view._reuseChildForContentIndex",r,function(){},this),n=i.objectAt(t),e.updateContext(n)},positionForIndex:function(e){var t,i,n,r,s,o;return t=l(this,"elementWidth")||1,i=l(this,"width")||1,n=l(this,"columnCount"),r=l(this,"rowHeight"),s=r*u(e/n),o=e%n*t,{y:s,x:o}},_childViewCount:function(){var e,t;return e=l(this,"content.length"),t=this._numChildViewsForViewport(),c(e,t)},columnCount:Ember.computed("width","elementWidth",function(){var e,t,i;return e=l(this,"elementWidth"),t=l(this,"width"),i=e&&t>e?u(t/e):1}),columnCountDidChange:Ember.observer(function(){var e,t,i,n,r,s,o,h;s=this._lastColumnCount,t=this.scrollTop,o=l(this,"columnCount"),n=l(this,"maxScrollTop"),h=l(this,"element"),this._lastColumnCount=o,s&&(e=s/o,i=t*e,r=c(n,i),this._scrollTo(r),this.scrollTop=r),arguments.length>0&&Ember.run.schedule("afterRender",this,this._syncListContainerWidth)},"columnCount"),maxScrollTop:Ember.computed("height","totalHeight",function(){var e,t;return e=l(this,"totalHeight"),t=l(this,"height"),a(0,e-t)}),_isChildEmptyView:function(){var e=l(this,"emptyView");return e&&e instanceof Ember.View&&1===this._childViews.length&&0===this._childViews.indexOf(e)},_numChildViewsForViewport:function(){var e,t,i,n;return e=l(this,"height"),t=l(this,"rowHeight"),i=l(this,"paddingCount"),n=l(this,"columnCount"),d(e/t)*n+i*n},_startingIndex:function(e){var t,i,n,r,s,o;return s=void 0===e?l(this,"content.length"):e,t=this.scrollTop,i=l(this,"rowHeight"),n=l(this,"columnCount"),r=u(t/i)*n,o=a(s-1,0),c(r,o)},contentWillChange:Ember.beforeObserver(function(){var e;e=l(this,"content"),e&&e.removeArrayObserver(this)},"content"),contentDidChange:Ember.observer(function(){e.call(this),i.call(this)},"content"),needsSyncChildViews:Ember.observer(i,"height","width","columnCount"),_addItemView:function(){var e,t;e=l(this,"itemViewClass"),t=this.createChildView(e),this.pushObject(t)},_syncChildViews:function(){var e,i,n,r,h,c,a,u,d,f,p;if(!l(this,"isDestroyed")&&!l(this,"isDestroying")){if(u=l(this,"content.length"),d=l(this,"emptyView"),i=this._childViewCount(),e=this.positionOrderedChildViews(),this._isChildEmptyView()&&s.call(this),c=this._startingIndex(),a=c+i,r=i,n=e.length,p=r-n,0===p);else if(p>0)for(h=this._lastEndingIndex,f=0;p>f;f++,h++)this._addItemView(h);else m.call(e.splice(r,n),t,this);this._reuseChildren(),this._lastStartingIndex=c,this._lastEndingIndex=this._lastEndingIndex+p,(0===u||void 0===u)&&o.call(this)}},_syncListContainerWidth:function(){var e,t,i,n;e=l(this,"elementWidth"),t=l(this,"columnCount"),i=e*t,n=this.$(".ember-list-container"),i&&n&&n.css("width",i)},_reuseChildren:function(){var e,t,i,n,r,s,o,h,u,d,m;for(m=this.scrollTop,e=l(this,"content.length"),u=a(e-1,0),t=this.getReusableChildViews(),i=t.length,n=this._startingIndex(),h=n+this._numChildViewsForViewport(),r=c(u,h),d=c(h,n+i),o=n;d>o;o++)s=t[o%i],this._reuseChildForContentIndex(s,o)},getReusableChildViews:function(){return this._childViews},positionOrderedChildViews:function(){return this.getReusableChildViews().sort(n)},arrayWillChange:Ember.K,arrayDidChange:function(e,t){var n,r;s.call(this),"inDOM"===this.state&&((t>=this._lastStartingIndex||t .ember-list-container")[0]},willBeginScroll:function(e,t){this._isScrolling=!1,this.trigger("scrollingDidStart"),this.scroller.doTouchStart(e,t)},continueScroll:function(e,t){var i,n,r;this._isScrolling?this.scroller.doTouchMove(e,t):(i=this._scrollerTop,this.scroller.doTouchMove(e,t),n=this._scrollerTop,i!==n&&(r=Ember.$.Event("scrollerstart"),Ember.$(e[0].target).trigger(r),this._isScrolling=!0))},endScroll:function(e){this.scroller.doTouchEnd(e)},scrollTo:function(e,t){void 0===t&&(t=!0),this.scroller.scrollTo(0,e,t,1)},mouseWheel:function(e){var t,i,n;return t=e.webkitDirectionInvertedFromDevice,i=e.wheelDeltaY*(t?.8:-.8),n=this.scroller.__scrollTop+i,n>=0&&n<=this.scroller.__maxScrollTop&&(this.scroller.scrollBy(0,i,!0),e.stopPropagation()),!1}})}(),function(){Ember.Handlebars.registerHelper("ember-list",function(e){var t=e.hash,i=e.hashTypes;t.content=t.items,delete t.items,i.content=i.items,delete i.items,t.content||(t.content="this",i.content="ID");for(var n in t)if(/-/.test(n)){var r=Ember.String.camelize(n);t[r]=t[n],i[r]=i[n],delete t[n],delete i[n]}return Ember.Handlebars.helpers.collection.call(this,"Ember.ListView",e)})}(),"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."); \ No newline at end of file diff --git a/ui/scripts/compile.rb b/ui/scripts/compile.rb index f693695434..0f6f4fecd3 100644 --- a/ui/scripts/compile.rb +++ b/ui/scripts/compile.rb @@ -4,9 +4,10 @@ File.open("static/application.min.js", "w") {|file| file.truncate(0) } libs = [ "javascripts/libs/jquery-1.10.2.min.js", - "javascripts/libs/handlebars-1.1.2.min.js", - "javascripts/libs/ember-1.5.1.min.js", + "javascripts/libs/handlebars-1.3.0.min.js", + "javascripts/libs/ember.min.js", "javascripts/libs/ember-validations.min.js", + "javascripts/libs/list-view.min.js", ] app = [ diff --git a/ui/styles/_buttons.scss b/ui/styles/_buttons.scss index ab704a6cf8..419b415926 100644 --- a/ui/styles/_buttons.scss +++ b/ui/styles/_buttons.scss @@ -76,5 +76,9 @@ } + &.btn-mini { + font-size: 10px; + padding: 8px; + } } diff --git a/ui/styles/_forms.scss b/ui/styles/_forms.scss index 6f3422a66f..d9990af8b1 100644 --- a/ui/styles/_forms.scss +++ b/ui/styles/_forms.scss @@ -3,6 +3,10 @@ @include transition(border-color .2s ease-in-out); @include transition(box-shadow .2s ease-in-out); @include transition(border-color .2s ease-in-out); + + &.form-control-mini { + font-size: 12px; + } } &.valid { diff --git a/ui/styles/_lists.scss b/ui/styles/_lists.scss index b9fe9fc1ec..faea9df15a 100644 --- a/ui/styles/_lists.scss +++ b/ui/styles/_lists.scss @@ -2,7 +2,7 @@ padding: 0; border-width: 2px; border-bottom-width: 2px; - border-radius: 0px; + border-radius: 2px; margin-bottom: 15px; margin-top: 15px; @include transition(background-color .3s ease-in-out); @@ -33,8 +33,6 @@ .list-bar { width: 100%; height: 20px; - border-top-right-radius: 2px; - border-top-left-radius: 2px; } &.list-link:hover { @@ -42,25 +40,48 @@ background-color: lighten($gray-background, 8%); } + &.list-condensed-link:hover { + cursor: pointer; + background-color: lighten($gray-background, 8%); + } + + &.list-condensed-link { + border-color: $gray-background; + margin-bottom: 4px; + margin-top: 4px; + + height: 40px; + font-weight: 700; + + .name { + font-size: 15px; + padding-top: 7px; + + small { + padding-right: 8px; + padding-top: 2px; + font-size: 12px; + color: $gray-light; + } + } + } + + .list-bar-horizontal { + width: 20px; + float: left; + height: 100%; + margin-right: 10px; + } + + &.active { @include transition(border-color .1s linear); border-color: $purple; - .list-bar { + .list-bar, .list-bar-horizontal { @include transition(background-color .1s linear); background-color: $purple; } } } - -ul.list-broken { - li { - // border-top: 2px lighten($gray-background, 5%) solid; - } - - &:last-child { - // border-bottom: 2px lighten($gray-background, 5%) solid; - } - -} diff --git a/ui/styles/_nav.scss b/ui/styles/_nav.scss index 57c5b0e08c..b3a46875dc 100644 --- a/ui/styles/_nav.scss +++ b/ui/styles/_nav.scss @@ -10,8 +10,10 @@ .topbar { padding: 30px; + padding-top: 10px; + padding-bottom: 10px; margin-bottom: 20px; - min-height: 100px; + min-height: 95px; border-bottom: 1px #eee solid; .btn { diff --git a/ui/styles/_panels.scss b/ui/styles/_panels.scss index 9d87b55b5c..ead5b3749f 100644 --- a/ui/styles/_panels.scss +++ b/ui/styles/_panels.scss @@ -4,6 +4,7 @@ @include transition(background-color .3s ease-in-out); .panel-heading { + padding: 10px 7px; background-color: transparent; border-width: 2px; border-color: $gray-background; @@ -31,6 +32,7 @@ } .panel-body { + padding: 0px 15px 0px 15px; p { font-size: 14px; color: $text-color; @@ -41,6 +43,9 @@ h4.check { font-size: 16px; } + &.panel-form { + padding-bottom: 15px; + } } .panel-bar { @@ -53,6 +58,23 @@ border-bottom-width: 2px; } + &.panel-list { + ul { + margin: 0; + li { + margin: 0; + border: 0; + } + } + } + .panel-bar-horizontal { + width: 20px; + float: left; + height: 50px; + margin-right: 10px; + display: block; + } + &.panel-short { border-bottom-width: 0px; } diff --git a/ui/styles/_type.scss b/ui/styles/_type.scss index b7a2cd6df0..bffda1c36e 100644 --- a/ui/styles/_type.scss +++ b/ui/styles/_type.scss @@ -65,3 +65,7 @@ pre { .bold { font-weight: 700; } + +.light { + color: $gray; +} diff --git a/ui/styles/base.scss b/ui/styles/base.scss index 2ea7f6b0d3..883797f206 100644 --- a/ui/styles/base.scss +++ b/ui/styles/base.scss @@ -7,19 +7,13 @@ @import "lists"; @import "forms"; -@media (min-width: 768px) { // + 18 +@media (min-width: 1120px) { // + 30 .container { - width: 750px; + width: 1100px; } } -@media (min-width: 970px) { // + 22 - .container { - width: 970px; - } -} - -@media (min-width: 1230px) { // + 30 +@media (min-width: 1200px) { // + 30 .container { width: 1200px; } @@ -41,17 +35,17 @@ a { height: 50px; } -.border-left { - display: block; - height: 700px; - - .line { - margin: 0 auto; - background-color: $gray-background; - height: 100%; - width: 1px; +@media (min-width: 991px) { + .border-left { + border-left: 1px $gray-background solid; + .padded-border{ + padding-left: 30px; + } } } +.padded-right-middle { + padding-right: 30px; +} .no-margin { margin: 0; @@ -103,3 +97,24 @@ a { .bg-light-gray { background-color: $gray-background; } + +.action-bar { + min-height: 50px; + padding-top: 10px; + padding-bottom: 10px; +} + +.ember-list-view { + overflow: auto; + position: relative; +} + +.ember-list-item-view { + position: absolute; + width: 100%; +} + +.scrollable { + overflow: auto; + height: 800px; +}