jet-framework 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. data/LICENSE +20 -0
  2. data/README.md +10 -0
  3. data/bin/jet +10 -0
  4. data/lib/jet.rb +12 -0
  5. data/lib/jet/application.rb +74 -0
  6. data/lib/jet/cli.rb +27 -0
  7. data/lib/jet/file.rb +20 -0
  8. data/lib/jet/handlebars_template.rb +24 -0
  9. data/lib/jet/jst_processor.rb +10 -0
  10. data/lib/jet/templates/application/Guardfile +9 -0
  11. data/lib/jet/templates/application/Procfile +2 -0
  12. data/lib/jet/templates/application/app/.DS_Store +0 -0
  13. data/lib/jet/templates/application/app/controllers/.empty_directory +0 -0
  14. data/lib/jet/templates/application/app/images/.empty_directory +0 -0
  15. data/lib/jet/templates/application/app/models/.empty_directory +0 -0
  16. data/lib/jet/templates/application/app/states/application_statechart.js.coffee +1 -0
  17. data/lib/jet/templates/application/app/stylesheets/.DS_Store +0 -0
  18. data/lib/jet/templates/application/app/stylesheets/application.css.scss +4 -0
  19. data/lib/jet/templates/application/app/templates/.empty_directory +0 -0
  20. data/lib/jet/templates/application/app/views/.empty_directory +0 -0
  21. data/lib/jet/templates/application/build/development/.empty_directory +0 -0
  22. data/lib/jet/templates/application/build/production/.empty_directory +0 -0
  23. data/lib/jet/templates/application/build/test/.empty_directory +0 -0
  24. data/lib/jet/templates/application/config/application.js.coffee.tt +1 -0
  25. data/lib/jet/templates/application/config/boot.js.coffee +9 -0
  26. data/lib/jet/templates/application/doc/.empty_directory +0 -0
  27. data/lib/jet/templates/application/lib/.empty_directory +0 -0
  28. data/lib/jet/templates/application/public/404.html +1 -0
  29. data/lib/jet/templates/application/public/apple-touch-icon.png +0 -0
  30. data/lib/jet/templates/application/public/favicon.ico +0 -0
  31. data/lib/jet/templates/application/public/index.html +29 -0
  32. data/lib/jet/templates/application/public/robots.txt +0 -0
  33. data/lib/jet/templates/application/test/.empty_directory +0 -0
  34. data/lib/jet/templates/application/vendor/jquery/jquery-1.6.1.js +8936 -0
  35. data/lib/jet/templates/application/vendor/jquery/jquery-1.6.1.min.js +18 -0
  36. data/lib/jet/templates/application/vendor/sproutcore/sproutcore-2.0.beta.3.js +13860 -0
  37. data/lib/jet/templates/application/vendor/sproutcore/sproutcore-2.0.beta.3.min.js +11 -0
  38. data/lib/jet/version.rb +3 -0
  39. metadata +172 -0
@@ -0,0 +1,11 @@
1
+ // ==========================================================================
2
+ // Project: SproutCore - JavaScript Application Framework
3
+ // Copyright: ©2006-2011 Strobe Inc. and contributors.
4
+ // Portions ©2008-2011 Apple Inc. All rights reserved.
5
+ // License: Licensed under MIT license (see license.js)
6
+ // ==========================================================================
7
+
8
+ (function(a){var b={};window.Handlebars=b,b.VERSION="1.0.beta.2",b.helpers={},b.partials={},b.registerHelper=function(a,b,c){c&&(b.not=c),this.helpers[a]=b},b.registerPartial=function(a,b){this.partials[a]=b},b.registerHelper("helperMissing",function(a){if(arguments.length===2)return undefined;throw new Error("Could not find property '"+a+"'")}),b.registerHelper("blockHelperMissing",function(a,b){var c=b.inverse||function(){},d=b.fn,e="",f=Object.prototype.toString.call(a);f==="[object Function]"&&(a=a());if(a===!0)return d(this);if(a===!1||a==null)return c(this);if(f==="[object Array]"){if(a.length>0)for(var g=0,h=a.length;g<h;g++)e=e+d(a[g]);else e=c(this);return e}return d(a)}),b.registerHelper("each",function(a,b){var c=b.fn,d=b.inverse,e="";if(a&&a.length>0)for(var f=0,g=a.length;f<g;f++)e=e+c(a[f]);else e=d(this);return e}),b.registerHelper("if",function(a,c){return!a||b.Utils.isEmpty(a)?c.inverse(this):c.fn(this)}),b.registerHelper("unless",function(a,c){var d=c.fn,e=c.inverse;c.fn=e,c.inverse=d;return b.helpers["if"].call(this,a,c)}),b.registerHelper("with",function(a,b){return b.fn(a)});var c=function(){var a={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,statements: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,OPEN_PARTIAL:24,params:25,hash:26,param:27,STRING:28,INTEGER:29,BOOLEAN:30,hashSegments:31,hashSegment:32,ID:33,EQUALS:34,pathSegments:35,SEP:36,$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:"OPEN_PARTIAL",28:"STRING",29:"INTEGER",30:"BOOLEAN",33:"ID",34:"EQUALS",36:"SEP"},productions_:[0,[3,2],[4,3],[4,1],[4,0],[6,1],[6,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[7,2],[17,3],[17,2],[17,2],[17,1],[25,2],[25,1],[27,1],[27,1],[27,1],[27,1],[26,1],[31,2],[31,1],[32,3],[32,3],[32,3],[32,3],[21,1],[35,3],[35,1]],performAction:function(b,c,d,e,f,g,h){var i=g.length-1;switch(f){case 1:return g[i-1];case 2:this.$=new e.ProgramNode(g[i-2],g[i]);break;case 3:this.$=new e.ProgramNode(g[i]);break;case 4:this.$=new e.ProgramNode([]);break;case 5:this.$=[g[i]];break;case 6:g[i-1].push(g[i]),this.$=g[i-1];break;case 7:this.$=new e.InverseNode(g[i-2],g[i-1],g[i]);break;case 8:this.$=new e.BlockNode(g[i-2],g[i-1],g[i]);break;case 9:this.$=g[i];break;case 10:this.$=g[i];break;case 11:this.$=new e.ContentNode(g[i]);break;case 12:this.$=new e.CommentNode(g[i]);break;case 13:this.$=new e.MustacheNode(g[i-1][0],g[i-1][1]);break;case 14:this.$=new e.MustacheNode(g[i-1][0],g[i-1][1]);break;case 15:this.$=g[i-1];break;case 16:this.$=new e.MustacheNode(g[i-1][0],g[i-1][1]);break;case 17:this.$=new e.MustacheNode(g[i-1][0],g[i-1][1],!0);break;case 18:this.$=new e.PartialNode(g[i-1]);break;case 19:this.$=new e.PartialNode(g[i-2],g[i-1]);break;case 20:break;case 21:this.$=[[g[i-2]].concat(g[i-1]),g[i]];break;case 22:this.$=[[g[i-1]].concat(g[i]),null];break;case 23:this.$=[[g[i-1]],g[i]];break;case 24:this.$=[[g[i]],null];break;case 25:g[i-1].push(g[i]),this.$=g[i-1];break;case 26:this.$=[g[i]];break;case 27:this.$=g[i];break;case 28:this.$=new e.StringNode(g[i]);break;case 29:this.$=new e.IntegerNode(g[i]);break;case 30:this.$=new e.BooleanNode(g[i]);break;case 31:this.$=new e.HashNode(g[i]);break;case 32:g[i-1].push(g[i]),this.$=g[i-1];break;case 33:this.$=[g[i]];break;case 34:this.$=[g[i-2],g[i]];break;case 35:this.$=[g[i-2],new e.StringNode(g[i])];break;case 36:this.$=[g[i-2],new e.IntegerNode(g[i])];break;case 37:this.$=[g[i-2],new e.BooleanNode(g[i])];break;case 38:this.$=new e.IdNode(g[i]);break;case 39:g[i-2].push(g[i]),this.$=g[i-2];break;case 40:this.$=[g[i]]}},table:[{3:1,4:2,5:[2,4],6: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],24:[1,15]},{1:[3]},{5:[1,16]},{5:[2,3],7:17,8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,19],20:[2,3],22:[1,13],23:[1,14],24:[1,15]},{5:[2,5],14:[2,5],15:[2,5],16:[2,5],19:[2,5],20:[2,5],22:[2,5],23:[2,5],24:[2,5]},{4:20,6:3,8:4,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],24:[1,15]},{4:21,6:3,8:4,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],24:[1,15]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],24:[2,9]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],24:[2,10]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],24:[2,11]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],24:[2,12]},{17:22,21:23,33:[1,25],35:24},{17:26,21:23,33:[1,25],35:24},{17:27,21:23,33:[1,25],35:24},{17:28,21:23,33:[1,25],35:24},{21:29,33:[1,25],35:24},{1:[2,1]},{6:30,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],24:[1,15]},{5:[2,6],14:[2,6],15:[2,6],16:[2,6],19:[2,6],20:[2,6],22:[2,6],23:[2,6],24:[2,6]},{17:22,18:[1,31],21:23,33:[1,25],35:24},{10:32,20:[1,33]},{10:34,20:[1,33]},{18:[1,35]},{18:[2,24],21:40,25:36,26:37,27:38,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,38],28:[2,38],29:[2,38],30:[2,38],33:[2,38],36:[1,46]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],36:[2,40]},{18:[1,47]},{18:[1,48]},{18:[1,49]},{18:[1,50],21:51,33:[1,25],35:24},{5:[2,2],8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,2],22:[1,13],23:[1,14],24:[1,15]},{14:[2,20],15:[2,20],16:[2,20],19:[2,20],22:[2,20],23:[2,20],24:[2,20]},{5:[2,7],14:[2,7],15:[2,7],16:[2,7],19:[2,7],20:[2,7],22:[2,7],23:[2,7],24:[2,7]},{21:52,33:[1,25],35:24},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],24:[2,8]},{14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],24:[2,14]},{18:[2,22],21:40,26:53,27:54,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,23]},{18:[2,26],28:[2,26],29:[2,26],30:[2,26],33:[2,26]},{18:[2,31],32:55,33:[1,56]},{18:[2,27],28:[2,27],29:[2,27],30:[2,27],33:[2,27]},{18:[2,28],28:[2,28],29:[2,28],30:[2,28],33:[2,28]},{18:[2,29],28:[2,29],29:[2,29],30:[2,29],33:[2,29]},{18:[2,30],28:[2,30],29:[2,30],30:[2,30],33:[2,30]},{18:[2,33],33:[2,33]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],34:[1,57],36:[2,40]},{33:[1,58]},{14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],24:[2,13]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],24:[2,16]},{5:[2,17],14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],24:[2,17]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],24:[2,18]},{18:[1,59]},{18:[1,60]},{18:[2,21]},{18:[2,25],28:[2,25],29:[2,25],30:[2,25],33:[2,25]},{18:[2,32],33:[2,32]},{34:[1,57]},{21:61,28:[1,62],29:[1,63],30:[1,64],33:[1,25],35:24},{18:[2,39],28:[2,39],29:[2,39],30:[2,39],33:[2,39],36:[2,39]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],24:[2,19]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],24:[2,15]},{18:[2,34],33:[2,34]},{18:[2,35],33:[2,35]},{18:[2,36],33:[2,36]},{18:[2,37],33:[2,37]}],defaultActions:{16:[2,1],37:[2,23],53:[2,21]},parseError:function(b,c){throw new Error(b)},parse:function(b){function p(){var a;a=c.lexer.lex()||1,typeof a!="number"&&(a=c.symbols_[a]||a);return a}function o(a){d.length=d.length-2*a,e.length=e.length-a,f.length=f.length-a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0,l=2,m=1;this.lexer.setInput(b),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={});var n=this.lexer.yylloc;f.push(n),typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);var q,r,s,t,u,v,w={},x,y,z,A;for(;;){s=d[d.length-1],this.defaultActions[s]?t=this.defaultActions[s]:(q==null&&(q=p()),t=g[s]&&g[s][q]);if(typeof t=="undefined"||!t.length||!t[0]){if(!k){A=[];for(x in g[s])this.terminals_[x]&&x>2&&A.push("'"+this.terminals_[x]+"'");var B="";this.lexer.showPosition?B="Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+A.join(", "):B="Parse error on line "+(i+1)+": Unexpected "+(q==1?"end of input":"'"+(this.terminals_[q]||q)+"'"),this.parseError(B,{text:this.lexer.match,token:this.terminals_[q]||q,line:this.lexer.yylineno,loc:n,expected:A})}if(k==3){if(q==m)throw new Error(B||"Parsing halted.");j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,n=this.lexer.yylloc,q=p()}for(;;){if(l.toString()in g[s])break;if(s==0)throw new Error(B||"Parsing halted.");o(1),s=d[d.length-1]}r=q,q=l,s=d[d.length-1],t=g[s]&&g[s][l],k=3}if(t[0]instanceof Array&&t.length>1)throw new Error("Parse Error: multiple actions possible at state: "+s+", token: "+q);switch(t[0]){case 1:d.push(q),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(t[1]),q=null,r?(q=r,r=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,n=this.lexer.yylloc,k>0&&k--);break;case 2:y=this.productions_[t[1]][1],w.$=e[e.length-y],w._$={first_line:f[f.length-(y||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(y||1)].first_column,last_column:f[f.length-1].last_column},v=this.performAction.call(w,h,j,i,this.yy,t[1],e,f);if(typeof v!="undefined")return v;y&&(d=d.slice(0,-1*y*2),e=e.slice(0,-1*y),f=f.slice(0,-1*y)),d.push(this.productions_[t[1]][0]),e.push(w.$),f.push(w._$),z=g[d[d.length-2]][d[d.length-1]],d.push(z);break;case 3:return!0}}return!0}},b=function(){var a={EOF:1,parseError:function(b,c){if(this.yy.parseError)this.yy.parseError(b,c);else throw new Error(b)},setInput:function(a){this._input=a,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};return this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.match+=a,this.matched+=a;var b=a.match(/\n/);b&&this.yylineno++,this._input=this._input.slice(1);return a},unput:function(a){this._input=a+this._input;return this},more:function(){this._more=!0;return this},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;a.length<20&&(a+=this._input.substr(0,20-a.length));return(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d;this._more||(this.yytext="",this.match="");var e=this._currentRules();for(var f=0;f<e.length;f++){b=this._input.match(this.rules[e[f]]);if(b){d=b[0].match(/\n.*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-1:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,e[f],this.conditionStack[this.conditionStack.length-1]);if(a)return a;return}}if(this._input==="")return 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 b=this.next();return typeof b!="undefined"?b:this.lex()},begin:function(b){this.conditionStack.push(b)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules}};a.performAction=function(b,c,d,e){var f=e;switch(d){case 0:this.begin("mu");if(c.yytext)return 14;break;case 1:return 14;case 2:return 24;case 3:return 16;case 4:return 20;case 5:return 19;case 6:return 19;case 7:return 23;case 8:return 23;case 9:c.yytext=c.yytext.substr(3,c.yyleng-5),this.begin("INITIAL");return 15;case 10:return 22;case 11:return 34;case 12:return 33;case 13:return 33;case 14:return 36;case 15:break;case 16:this.begin("INITIAL");return 18;case 17:this.begin("INITIAL");return 18;case 18:c.yytext=c.yytext.substr(1,c.yyleng-2).replace(/\\"/g,'"');return 28;case 19:return 30;case 20:return 30;case 21:return 29;case 22:return 33;case 23:return"INVALID";case 24:return 5}},a.rules=[/^[^\x00]*?(?=(\{\{))/,/^[^\x00]+/,/^\{\{>/,/^\{\{#/,/^\{\{\//,/^\{\{\^/,/^\{\{\s*else\b/,/^\{\{\{/,/^\{\{&/,/^\{\{![\s\S]*?\}\}/,/^\{\{/,/^=/,/^\.(?=[} ])/,/^\.\./,/^[/.]/,/^\s+/,/^\}\}\}/,/^\}\}/,/^"(\\["]|[^"])*"/,/^true(?=[}\s])/,/^false(?=[}\s])/,/^[0-9]+(?=[}\s])/,/^[a-zA-Z0-9_$-]+(?=[=}\s/.])/,/^./,/^$/],a.conditions={mu:{rules:[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],inclusive:!1},INITIAL:{rules:[0,1,24],inclusive:!0}};return a}();a.lexer=b;return a}();typeof require!="undefined"&&typeof a!="undefined"&&(a.parser=c,a.parse=function(){return c.parse.apply(c,arguments)},a.main=function(c){if(!c[1])throw new Error("Usage: "+c[0]+" FILE");if(typeof process!="undefined")var d=require("fs").readFileSync(require("path").join(process.cwd(),c[1]),"utf8");else var e=require("file").path(require("file").cwd()),d=e.join(c[1]).read({charset:"utf-8"});return a.parser.parse(d)},typeof module!="undefined"&&require.main===module&&a.main(typeof process!="undefined"?process.argv.slice(1):require("system").args)),b.Parser=c,b.parse=function(a){b.Parser.yy=b.AST;return b.Parser.parse(a)},b.print=function(a){return(new b.PrintVisitor).accept(a)},b.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(a,b){}},b.log=function(a,c){b.logger.log(a,c)},function(){b.AST={},b.AST.ProgramNode=function(a,c){this.type="program",this.statements=a,c&&(this.inverse=new b.AST.ProgramNode(c))},b.AST.MustacheNode=function(a,b,c){this.type="mustache",this.id=a[0],this.params=a.slice(1),this.hash=b,this.escaped=!c},b.AST.PartialNode=function(a,b){this.type="partial",this.id=a,this.context=b};var a=function(a,c){if(a.original!==c.original)throw new b.Exception(a.original+" doesn't match "+c.original)};b.AST.BlockNode=function(b,c,d){a(b.id,d),this.type="block",this.mustache=b,this.program=c},b.AST.InverseNode=function(b,c,d){a(b.id,d),this.type="inverse",this.mustache=b,this.program=c},b.AST.ContentNode=function(a){this.type="content",this.string=a},b.AST.HashNode=function(a){this.type="hash",this.pairs=a},b.AST.IdNode=function(a){this.type="ID",this.original=a.join(".");var b=[],c=0;for(var d=0,e=a.length;d<e;d++){var f=a[d];f===".."?c++:f==="."||f==="this"?this.isScoped=!0:b.push(f)}this.parts=b,this.string=b.join("."),this.depth=c,this.isSimple=b.length===1&&c===0},b.AST.StringNode=function(a){this.type="STRING",this.string=a},b.AST.IntegerNode=function(a){this.type="INTEGER",this.integer=a},b.AST.BooleanNode=function(a){this.type="BOOLEAN",this.bool=a},b.AST.CommentNode=function(a){this.type="comment",this.comment=a}}(),b.Exception=function(a){var b=Error.prototype.constructor.apply(this,arguments);for(var c in b)b.hasOwnProperty(c)&&(this[c]=b[c])},b.Exception.prototype=new Error,b.SafeString=function(a){this.string=a},b.SafeString.prototype.toString=function(){return this.string.toString()},function(){var a={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},c=/&(?!\w+;)|[<>"'`]/g,d=/[&<>"'`]/,e=function(b){return a[b]||"&amp;"};b.Utils={escapeExpression:function(a){if(a instanceof b.SafeString)return a.toString();if(a==null||a===!1)return"";if(!d.test(a))return a;return a.replace(c,e)},isEmpty:function(a){return typeof a=="undefined"?!0:a===null?!0:a===!1?!0:Object.prototype.toString.call(a)==="[object Array]"&&a.length===0?!0:!1}}}(),b.Compiler=function(){},b.JavaScriptCompiler=function(){},function(a,c){a.OPCODE_MAP={appendContent:1,getContext:2,lookupWithHelpers:3,lookup:4,append:5,invokeMustache:6,appendEscaped:7,pushString:8,truthyOrFallback:9,functionOrFallback:10,invokeProgram:11,invokePartial:12,push:13,assignToHash:15,pushStringParam:16},a.MULTI_PARAM_OPCODES={appendContent:1,getContext:1,lookupWithHelpers:2,lookup:1,invokeMustache:3,pushString:1,truthyOrFallback:1,functionOrFallback:1,invokeProgram:3,invokePartial:1,push:1,assignToHash:1,pushStringParam:1},a.DISASSEMBLE_MAP={};for(var d in a.OPCODE_MAP){var e=a.OPCODE_MAP[d];a.DISASSEMBLE_MAP[e]=d}a.multiParamSize=function(b){return a.MULTI_PARAM_OPCODES[a.DISASSEMBLE_MAP[b]]},a.prototype={compiler:a,disassemble:function(){var b=this.opcodes,c,d,e=[],f,g,h;for(var i=0,j=b.length;i<j;i++){c=b[i];if(c==="DECLARE")g=b[++i],h=b[++i],e.push("DECLARE "+g+" = "+h);else{f=a.DISASSEMBLE_MAP[c];var k=a.multiParamSize(c),l=[];for(var m=0;m<k;m++)d=b[++i],typeof d=="string"&&(d='"'+d.replace("\n","\\n")+'"'),l.push(d);f=f+" "+l.join(" "),e.push(f)}}return e.join("\n")},guid:0,compile:function(a,b){this.children=[],this.depths={list:[]},this.options=b;var c=this.options.knownHelpers;this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0};if(c)for(var d in c)this.options.knownHelpers[d]=c[d];return this.program(a)},accept:function(a){return this[a.type](a)},program:function(a){var b=a.statements,c;this.opcodes=[];for(var d=0,e=b.length;d<e;d++)c=b[d],this[c.type](c);this.isSimple=e===1,this.depths.list=this.depths.list.sort(function(a,b){return a-b});return this},compileProgram:function(a){var b=(new this.compiler).compile(a,this.options),c=this.guid++;this.usePartial=this.usePartial||b.usePartial,this.children[c]=b;for(var d=0,e=b.depths.list.length;d<e;d++){depth=b.depths.list[d];if(depth<2)continue;this.addDepth(depth-1)}return c},block:function(a){var b=a.mustache,c,d,e,f,g=this.setupStackForMustache(b),h=this.compileProgram(a.program);a.program.inverse&&(f=this.compileProgram(a.program.inverse),this.declare("inverse",f)),this.opcode("invokeProgram",h,g.length,!!b.hash),this.declare("inverse",null),this.opcode("append")},inverse:function(a){var b=this.setupStackForMustache(a.mustache),c=this.compileProgram(a.program);this.declare("inverse",c),this.opcode("invokeProgram",null,b.length,!!a.mustache.hash),this.opcode("append")},hash:function(a){var b=a.pairs,c,d;this.opcode("push","{}");for(var e=0,f=b.length;e<f;e++)c=b[e],d=c[1],this.accept(d),this.opcode("assignToHash",c[0])},partial:function(a){var b=a.id;this.usePartial=!0,a.context?this.ID(a.context):this.opcode("push","depth0"),this.opcode("invokePartial",b.original),this.opcode("append")},content:function(a){this.opcode("appendContent",a.string)},mustache:function(a){var b=this.setupStackForMustache(a);this.opcode("invokeMustache",b.length,a.id.original,!!a.hash),a.escaped?this.opcode("appendEscaped"):this.opcode("append")},ID:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth),this.opcode("lookupWithHelpers",a.parts[0]||null,a.isScoped||!1);for(var b=1,c=a.parts.length;b<c;b++)this.opcode("lookup",a.parts[b])},STRING:function(a){this.opcode("pushString",a.string)},INTEGER:function(a){this.opcode("push",a.integer)},BOOLEAN:function(a){this.opcode("push",a.bool)},comment:function(){},pushParams:function(a){var b=a.length,c;while(b--)c=a[b],this.options.stringParams?(c.depth&&this.addDepth(c.depth),this.opcode("getContext",c.depth||0),this.opcode("pushStringParam",c.string)):this[c.type](c)},opcode:function(b,c,d,e){this.opcodes.push(a.OPCODE_MAP[b]),c!==undefined&&this.opcodes.push(c),d!==undefined&&this.opcodes.push(d),e!==undefined&&this.opcodes.push(e)},declare:function(a,b){this.opcodes.push("DECLARE"),this.opcodes.push(a),this.opcodes.push(b)},addDepth:function(a){a!==0&&(this.depths[a]||(this.depths[a]=!0,this.depths.list.push(a)))},setupStackForMustache:function(a){var b=a.params;this.pushParams(b),a.hash&&this.hash(a.hash),this.ID(a.id);return b}},c.prototype={nameLookup:function(a,b,d){return c.RESERVED_WORDS[b]||b.indexOf("-")!==-1||!isNaN(b)?a+"['"+b+"']":/^[0-9]+$/.test(b)?a+"["+b+"]":a+"."+b},appendToBuffer:function(a){return this.environment.isSimple?"return "+a+";":"buffer += "+a+";"},initializeBuffer:function(){return this.quotedString("")},compile:function(a,b,c,d){this.environment=a,this.options=b||{},this.name=this.environment.name,this.isChild=!!c,this.context=c||{programs:[],aliases:{self:"this"},registers:{list:[]}},this.preamble(),this.stackSlot=0,this.stackVars=[],this.compileChildren(a,b);var e=a.opcodes,f;this.i=0;for(h=e.length;this.i<h;this.i++)f=this.nextOpcode(0),f[0]==="DECLARE"?(this.i=this.i+2,this[f[1]]=f[2]):(this.i=this.i+f[1].length,this[f[0]].apply(this,f[1]));return this.createFunctionContext(d)},nextOpcode:function(b){var c=this.environment.opcodes,d=c[this.i+b],e,f,g,h;if(d==="DECLARE"){e=c[this.i+1],f=c[this.i+2];return["DECLARE",e,f]}e=a.DISASSEMBLE_MAP[d],g=a.multiParamSize(d),h=[];for(var i=0;i<g;i++)h.push(c[this.i+i+1+b]);return[e,h]},eat:function(a){this.i=this.i+a.length},preamble:function(){var a=[];if(!this.isChild){var b="helpers = helpers || Handlebars.helpers;";this.environment.usePartial&&(b=b+" partials = partials || Handlebars.partials;"),a.push(b)}else a.push("");this.environment.isSimple?a.push(""):a.push(", buffer = "+this.initializeBuffer()),this.lastContext=0,this.source=a},createFunctionContext:function(a){var c=this.stackVars;this.isChild||(c=c.concat(this.context.registers.list)),c.length>0&&(this.source[1]=this.source[1]+", "+c.join(", "));if(!this.isChild){var d=[];for(var e in this.context.aliases)this.source[1]=this.source[1]+", "+e+"="+this.context.aliases[e]}this.source[1]&&(this.source[1]="var "+this.source[1].substring(2)+";"),this.isChild||(this.source[1]+="\n"+this.context.programs.join("\n")+"\n"),this.environment.isSimple||this.source.push("return buffer;");var f=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"];for(var g=0,h=this.environment.depths.list.length;g<h;g++)f.push("depth"+this.environment.depths.list[g]);f.length===4&&!this.environment.usePartial&&f.pop();if(a){f.push(this.source.join("\n "));return Function.apply(this,f)}var i="function "+(this.name||"")+"("+f.join(",")+") {\n "+this.source.join("\n ")+"}";b.log(b.logger.DEBUG,i+"\n\n");return i},appendContent:function(a){this.source.push(this.appendToBuffer(this.quotedString(a)))},append:function(){var a=this.popStack();this.source.push("if("+a+" || "+a+" === 0) { "+this.appendToBuffer(a)+" }"),this.environment.isSimple&&this.source.push("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){var a=this.nextOpcode(1),b="";this.context.aliases.escapeExpression="this.escapeExpression",a[0]==="appendContent"&&(b=" + "+this.quotedString(a[1][0]),this.eat(a)),this.source.push(this.appendToBuffer("escapeExpression("+this.popStack()+")"+b))},getContext:function(a){this.lastContext!==a&&(this.lastContext=a)},lookupWithHelpers:function(a,b){if(a){var c=this.nextStack();this.usingKnownHelper=!1;var d;!b&&this.options.knownHelpers[a]?(d=c+" = "+this.nameLookup("helpers",a,"helper"),this.usingKnownHelper=!0):b||this.options.knownHelpersOnly?d=c+" = "+this.nameLookup("depth"+this.lastContext,a,"context"):d=c+" = "+this.nameLookup("helpers",a,"helper")+" || "+this.nameLookup("depth"+this.lastContext,a,"context"),this.source.push(d)}else this.pushStack("depth"+this.lastContext)},lookup:function(a){var b=this.topStack();this.source.push(b+" = "+this.nameLookup(b,a,"context")+";")},pushStringParam:function(a){this.pushStack("depth"+this.lastContext),this.pushString(a)},pushString:function(a){this.pushStack(this.quotedString(a))},push:function(a){this.pushStack(a)},invokeMustache:function(a,b,c){this.populateParams(a,this.quotedString(b),"{}",null,c,function(a,b,c){this.usingKnownHelper||(this.context.aliases.helperMissing="helpers.helperMissing",this.context.aliases.undef="void 0",this.source.push("else if("+c+"=== undef) { "+a+" = helperMissing.call("+b+"); }"),a!==c&&this.source.push("else { "+a+" = "+c+"; }"))})},invokeProgram:function(a,b,c){var d=this.programExpression(this.inverse),e=this.programExpression(a);this.populateParams(b,null,e,d,c,function(a,b,c){this.usingKnownHelper||(this.context.aliases.blockHelperMissing="helpers.blockHelperMissing",this.source.push("else { "+a+" = blockHelperMissing.call("+b+"); }"))})},populateParams:function(a,b,c,d,e,f){var g=e||this.options.stringParams||d||this.options.data,h=this.popStack(),i,j=[],k,l,m;g?(this.register("tmp1",c),m="tmp1"):m="{ hash: {} }";if(g){var n=e?this.popStack():"{}";this.source.push("tmp1.hash = "+n+";")}this.options.stringParams&&this.source.push("tmp1.contexts = [];");for(var o=0;o<a;o++)k=this.popStack(),j.push(k),this.options.stringParams&&this.source.push("tmp1.contexts.push("+this.popStack()+");");d&&(this.source.push("tmp1.fn = tmp1;"),this.source.push("tmp1.inverse = "+d+";")),this.options.data&&this.source.push("tmp1.data = data;"),j.push(m),this.populateCall(j,h,b||h,f)},populateCall:function(a,b,c,d){var e=["depth0"].concat(a).join(", "),f=["depth0"].concat(c).concat(a).join(", "),g=this.nextStack();this.usingKnownHelper?this.source.push(g+" = "+b+".call("+e+");"):(this.context.aliases.functionType='"function"',this.source.push("if(typeof "+b+" === functionType) { "+g+" = "+b+".call("+e+"); }")),d.call(this,g,f,b),this.usingKnownHelper=!1},invokePartial:function(a){this.pushStack("self.invokePartial("+this.nameLookup("partials",a,"partial")+", '"+a+"', "+this.popStack()+", helpers, partials);")},assignToHash:function(a){var b=this.popStack(),c=this.topStack();this.source.push(c+"['"+a+"'] = "+b+";")},compiler:c,compileChildren:function(a,b){var c=a.children,d,e;for(var f=0,g=c.length;f<g;f++){d=c[f],e=new this.compiler,this.context.programs.push("");var h=this.context.programs.length;d.index=h,d.name="program"+h,this.context.programs[h]=e.compile(d,b,this.context)}},programExpression:function(a){if(a==null)return"self.noop";var b=this.environment.children[a],c=b.depths.list,d=[b.index,b.name,"data"];for(var e=0,f=c.length;e<f;e++)depth=c[e],depth===1?d.push("depth0"):d.push("depth"+(depth-1));if(c.length===0)return"self.program("+d.join(", ")+")";d.shift();return"self.programWithDepth("+d.join(", ")+")"},register:function(a,b){this.useRegister(a),this.source.push(a+" = "+b+";")},useRegister:function(a){this.context.registers[a]||(this.context.registers[a]=!0,this.context.registers.list.push(a))},pushStack:function(a){this.source.push(this.nextStack()+" = "+a+";");return"stack"+this.stackSlot},nextStack:function(){this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot);return"stack"+this.stackSlot},popStack:function(){return"stack"+this.stackSlot--},topStack:function(){return"stack"+this.stackSlot},quotedString:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r")+'"'}};var f="break case catch continue default delete do else finally for function if in instanceof new return switch this throw try typeof var void while with null true false".split(" ");compilerWords=c.RESERVED_WORDS={};for(var g=0,h=f.length;g<h;g++)compilerWords[f[g]]=!0}(b.Compiler,b.JavaScriptCompiler),b.precompile=function(a,c){c=c||{};var d=b.parse(a),e=(new b.Compiler).compile(d,c);return(new b.JavaScriptCompiler).compile(e,c)},b.compile=function(a,c){c=c||{};var d=b.parse(a),e=(new b.Compiler).compile(d,c),f=(new b.JavaScriptCompiler).compile(e,c,undefined,!0);return b.template(f)},b.VM={template:function(a){var c={escapeExpression:b.Utils.escapeExpression,invokePartial:b.VM.invokePartial,programs:[],program:function(a,c,d){var e=this.programs[a];if(d)return b.VM.program(c,d);if(e)return e;e=this.programs[a]=b.VM.program(c);return e},programWithDepth:b.VM.programWithDepth,noop:b.VM.noop};return function(d,e){e=e||{};return a.call(c,b,d,e.helpers,e.partials,e.data)}},programWithDepth:function(a,b,c){var d=Array.prototype.slice.call(arguments,2);return function(c,e){e=e||{};return a.apply(this,[c,e.data||b].concat(d))}},program:function(a,b){return function(c,d){d=d||{};return a(c,d.data||b)}},noop:function(){return""},invokePartial:function(a,c,d,e,f){if(a===undefined)throw new b.Exception("The partial "+c+" could not be found");if(a instanceof Function)return a(d,{helpers:e,partials:f});if(!b.compile)throw new b.Exception("The partial "+c+" could not be compiled when running in vm mode");f[c]=b.compile(a);return f[c](d,{helpers:e,partials:f})}},b.template=b.VM.template})({}),function(a){"undefined"==typeof SC&&(SC={},"undefined"!=typeof window&&(window.SC=window.SproutCore=SproutCore=SC)),SC.VERSION="2.0.alpha",SC.ENV="undefined"==typeof ENV?{}:ENV,SC.K=function(){return this},window.sc_assert=function(b,c){"function"==typeof c&&(c=c()!==!1);if(!c)throw new Error("assertion failed: "+b)},"undefined"==typeof require&&(require=SC.K)}({}),function(a){var b=SC.platform={};b.create=Object.create;if(!b.create){var c=function(){},d=c.prototype;b.create=function(a,e){c.prototype=a,a=new c,c.prototype=d;if(e!==undefined)for(var f in e){if(!e.hasOwnProperty(f))continue;b.defineProperty(a,f,e[f])}return a},b.create.isSimulated=!0}var e=Object.defineProperty,f,g;if(e)try{e({},"a",{get:function(){}})}catch(h){e=null}e&&(f=function(){var a={};e(a,"a",{configurable:!0,enumerable:!0,get:function(){},set:function(){}}),e(a,"a",{configurable:!0,enumerable:!0,writable:!0,value:!0});return a.a===!0}(),g=function(){try{e(document.body,"definePropertyOnDOM",{});return!0}catch(a){}return!1}(),f?g||(e=function(a,b,c){var d;typeof Node=="object"?d=a instanceof Node:d=typeof a=="object"&&typeof a.nodeType=="number"&&typeof a.nodeName=="string";return d?a[b]=c.value:Object.defineProperty(a,b,c)}):e=null),b.defineProperty=e,b.hasPropertyAccessors=!0,b.defineProperty||(b.hasPropertyAccessors=!1,b.defineProperty=function(a,b,c){a[b]=c.value},b.defineProperty.isSimulated=!0)}({}),function(a){var b="__sc"+ +(new Date),c,d,e;c=0,d=[],e={};var f={configurable:!0,writable:!0,enumerable:!1},g=SC.platform.defineProperty,h=SC.platform.create;SC.GUID_KEY=b,SC.generateGuid=function(a,d){d||(d="sc");var e=d+c++;a&&(f.value=e,g(a,b,f),f.value=null);return e},SC.guidFor=function(a){if(a===undefined)return"(undefined)";if(a===null)return"(null)";var f,g,h=typeof a;switch(h){case"number":g=d[a],g||(g=d[a]="nu"+a);return g;case"string":g=e[a],g||(g=e[a]="st"+c++);return g;case"boolean":return a?"(true)":"(false)";default:if(a[b])return a[b];if(a===Object)return"(Object)";if(a===Array)return"(Array)";return SC.generateGuid(a,"sc")}};var i={writable:!0,configurable:!1,enumerable:!1,value:null},j=SC.GUID_KEY+"_meta";SC.META_KEY=j;var k={descs:{},watching:{}};Object.freeze&&Object.freeze(k),SC.meta=function(b,c){var d=b[j];if(c===!1)return d||k;d?d.source!==b&&(d=b[j]=h(d),d.descs=h(d.descs),d.values=h(d.values),d.watching=h(d.watching),d.lastSetValues={},d.cache={},d.source=b):(g(b,j,i),d=b[j]={descs:{},watching:{},values:{},lastSetValues:{},cache:{},source:b},d.descs.constructor=null);return d},SC.metaPath=function(a,b,c){var d=SC.meta(a,c),e,f;for(var g=0,i=b.length;g<i;g++){e=b[g],f=d[e];if(!f){if(!c)return undefined;f=d[e]={__sc_source__:a}}else if(f.__sc_source__!==a){if(!c)return undefined;f=d[e]=h(f),f.__sc_source__=a}d=f}return f},SC.wrap=function(a,b){function c(){}var d=function(){var d,e=this._super;this._super=b||c,d=a.apply(this,arguments),this._super=e;return d};d.base=a;return d},SC.isArray=function(a){if(!a||a.setInterval)return!1;if(Array.isArray&&Array.isArray(a))return!0;if(SC.Array&&SC.Array.detect(a))return!0;if(a.length!==undefined&&"object"==typeof a)return!0;return!1},SC.makeArray=function(a){if(a==null)return[];return SC.isArray(a)?a:[a]}}({}),function(a){function p(a,b){var e=m.test(b),f=!e&&k.test(b),g;if(!a||f)a=window;e&&(b=b.slice(5));var h=b.indexOf("*");h>0&&b.charAt(h-1)!=="."?(a&&c(a,!1).proto!==a?a=i(a,b.slice(0,h)):a=null,b=b.slice(h+1)):a===window&&(g=o(b),a=d(a,g),b=b.slice(g.length+1));if(!b||b.length===0)throw new Error("Invalid Path");j[0]=a,j[1]=b;return j}function o(a){return a.match(n)[0]}function i(a,b){var c=b.length,e,f,g;e=b.indexOf("*");if(e>0&&b[e-1]!==".")return i(i(a,b.slice(0,e)),b.slice(e+1));e=0;while(a&&e<c){f=b.indexOf(".",e),f<0&&(f=c),g=b.slice(e,f),a=g==="*"?a:d(a,g);if(a&&a.isDestroyed)return undefined;e=f+1}return a}function h(a){if(a==="*")return a;var b=a.charAt(0);if(b===".")return"this"+a;if(b==="*"&&a.charAt(1)!==".")return"this."+a.slice(1);return a}var b=SC.platform.hasPropertyAccessors&&SC.ENV.USE_ACCESSORS;SC.USE_ACCESSORS=!!b;var c=SC.meta,d,e;d=function(b,c){c===undefined&&"string"==typeof b&&(c=b,b=SC);if(!b)return undefined;var d=
9
+ b[c];d===undefined&&"function"==typeof b.unknownProperty&&(d=b.unknownProperty(c));return d},e=function(b,c,d){"object"!=typeof b||c in b?b[c]=d:"function"==typeof b.setUnknownProperty?b.setUnknownProperty(c,d):"function"==typeof b.unknownProperty?b.unknownProperty(c,d):b[c]=d;return d};if(!b){var f=d,g=e;d=function(a,b){b===undefined&&"string"==typeof a&&(b=a,a=SC);if(!a)return undefined;var d=c(a,!1).descs[b];return d?d.get(a,b):f(a,b)},e=function(a,b,d){var e=c(a,!1).descs[b];e?e.set(a,b,d):g(a,b,d);return d}}SC.get=d,SC.set=e;var j=[],k=/^([A-Z$]|([0-9][A-Z$])).*[\.\*]/,l=/^([A-Z$]|([0-9][A-Z$])).*[\.\*]?/,m=/^this[\.\*]/,n=/^([^\.\*]+)/;SC.normalizePath=h,SC.normalizeTuple=function(a,b){return p(a,h(b))},SC.normalizeTuple.primitive=p,SC.getPath=function(a,b){var c,e,f;!b&&"string"==typeof a&&(b=a,a=null),e=b.indexOf("*")>-1;if(a===null&&!e&&b.indexOf(".")<0)return d(window,b);b=h(b),c=m.test(b),f=!c&&k.test(b);if(!a||c||f||e){var g=p(a,b);a=g[0],b=g[1]}return i(a,b)},SC.setPath=function(a,b,c,d){var e;arguments.length===2&&"string"==typeof a&&(c=b,b=a,a=null),b=h(b);if(b.indexOf("*")>0){var f=p(a,b);a=f[0],b=f[1]}if(b.indexOf(".")>0)e=b.slice(b.lastIndexOf(".")+1),b=b.slice(0,b.length-(e.length+1)),!m.test(b)&&l.test(b)&&b.indexOf(".")<0?a=window[b]:b!=="this"&&(a=SC.getPath(a,b));else{if(l.test(b))throw new Error("Invalid Path");e=b}if(!e||e.length===0||e==="*")throw new Error("Invalid Path");if(!a){if(d)return;throw new Error("Object in path "+b+" could not be found or was destroyed.")}return SC.set(a,e,c)},SC.trySetPath=function(a,b,c){arguments.length===2&&"string"==typeof a&&(c=b,b=a,a=null);return SC.setPath(a,b,c,!0)},SC.isGlobalPath=function(a){return!m.test(a)&&k.test(a)}}({}),function(a){Array.prototype.map||(Array.prototype.map=function(a){"use strict";if(this===void 0||this===null)throw new TypeError;var b=Object(this),c=b.length>>>0;if(typeof a!="function")throw new TypeError;var d=Array(c),e=arguments[1];for(var f=0;f<c;f++)f in b&&(d[f]=a.call(e,b[f],f,b));return d}),Array.prototype.forEach||(Array.prototype.forEach=function(a){"use strict";if(this===void 0||this===null)throw new TypeError;var b=Object(this),c=b.length>>>0;if(typeof a!="function")throw new TypeError;var d=arguments[1];for(var e=0;e<c;e++)e in b&&a.call(d,b[e],e,b)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b==null?b=0:b<0&&(b=Math.max(0,this.length+b));for(var c=b,d=this.length;c<d;c++)if(this[c]===a)return c;return-1})}({}),function(a){function u(a,b){return b==="toString"?"function"!=typeof a.toString:!!a[b]}function t(a){var b=s[a];b||(b=s[a]=function(b){return p(this,a,b)});return b}function r(a){var b=q[a];b||(b=q[a]=function(){return o(this,a)});return b}function p(a,b,c){var d=e(a),f;f=d.watching[b]>0&&c!==d.values[b],f&&SC.propertyWillChange(a,b),d.values[b]=c,f&&SC.propertyDidChange(a,b);return c}function o(a,b,c){c=c||e(a,!1).values;if(c){var d=c[b];if(d!==undefined)return d;if(a.unknownProperty)return a.unknownProperty(b)}}var b=SC.USE_ACCESSORS,c=SC.GUID_KEY,d=SC.META_KEY,e=SC.meta,f=SC.platform.create,g=SC.platform.defineProperty,h,i,j={writable:!0,configurable:!0,enumerable:!0,value:null},k=SC.Descriptor=function(){},l=k.setup=function(a,b,c){j.value=c,g(a,b,j),j.value=null},m=SC.Descriptor.prototype;m.set=function(a,b,c){a[b]=c;return c},m.get=function(a,b){return o(a,b,a)},m.setup=l,m.teardown=function(a,b){return a[b]},m.val=function(a,b){return a[b]},b||(SC.Descriptor.MUST_USE_GETTER=function(){},SC.Descriptor.MUST_USE_SETTER=function(){!this.isDestroyed});var n={configurable:!0,enumerable:!0,set:SC.Descriptor.MUST_USE_SETTER},q={},s={};i=new SC.Descriptor,SC.platform.hasPropertyAccessors?(i.get=o,i.set=p,b?i.setup=function(a,b,c){n.get=r(b),n.set=t(b),g(a,b,n),n.get=n.set=null,c!==undefined&&(e(a).values[b]=c)}:i.setup=function(a,b,c){n.get=r(b),g(a,b,n),n.get=null,c!==undefined&&(e(a).values[b]=c)},i.teardown=function(a,b){var c=e(a).values[b];delete e(a).values[b];return c}):i.set=function(a,b,c){var d=e(a),f;f=d.watching[b]>0&&c!==a[b],f&&SC.propertyWillChange(a,b),a[b]=c,f&&SC.propertyDidChange(a,b);return c},SC.SIMPLE_PROPERTY=new SC.Descriptor,h=SC.SIMPLE_PROPERTY,h.unwatched=i.unwatched=h,h.watched=i.watched=i,SC.defineProperty=function(a,b,c,d){var f=e(a,!1),i=f.descs,j=f.watching[b]>0;d===undefined?d=u(i,b)?i[b].teardown(a,b):a[b]:u(i,b)&&i[b].teardown(a,b),c||(c=h),c instanceof SC.Descriptor?(f=e(a,!0),i=f.descs,c=(j?c.watched:c.unwatched)||c,i[b]=c,c.setup(a,b,d,j)):(i[b]&&(e(a).descs[b]=null),g(a,b,c));return this},SC.create=function(a,b){var e=f(a,b);c in e&&SC.generateGuid(e,"sc"),d in e&&SC.rewatch(e);return e},SC.createPrototype=function(a,b){var g=f(a,b);e(g,!0).proto=g,c in g&&SC.generateGuid(g,"sc"),d in g&&SC.rewatch(g);return g},SC.destroy=function(a){a[d]&&(a[d]=null)}}({}),function(a){function o(a,d){var e=d._cacheable,f=d.func;return function(g){var h=b(this,e),i=h.source===this&&h.watching[a]>0,j,k,l;k=d._suspended,d._suspended=this,i=i&&h.lastSetValues[a]!==c(g),i&&(h.lastSetValues[a]=c(g),SC.propertyWillChange(this,a)),e&&delete h.cache[a],j=f.call(this,a,g),e&&(h.cache[a]=j),i&&SC.propertyDidChange(this,a),d._suspended=k;return j}}function n(a,c){var d=c._cacheable,e=c.func;return d?function(){var c,d=b(this).cache;if(a in d)return d[a];c=d[a]=e.call(this,a);return c}:function(){return e.call(this,a)}}function l(a,b){this.func=a,this._cacheable=b&&b.cacheable,this._dependentKeys=b&&b.dependentKeys}function k(a,b,c){var d=a._dependentKeys,e=d?d.length:0;for(var f=0;f<e;f++)i(b,c,d[f])}function j(a,b,c){var d=h(a,c);d[b]=(d[b]||0)-1,SC.unwatch(a,c)}function i(a,b,c){var d=h(a,c);d[b]=(d[b]||0)+1,SC.watch(a,c)}function h(a,c){var d=b(a),e,g;e=d.deps,e?e.__scproto__!==a&&(e=d.deps=f(e),e.__scproto__=a):e=d.deps={__scproto__:a},g=e[c],g?g.__scproto__!==a&&(g=e[c]=f(g),g.__scproto__=a):g=e[c]={__scproto__:a};return g}var b=SC.meta,c=SC.guidFor,d=SC.USE_ACCESSORS,e=Array.prototype.slice,f=SC.platform.create,g=SC.platform.defineProperty;SC.ComputedProperty=l,l.prototype=new SC.Descriptor;var m={configurable:!0,enumerable:!0,get:function(){return undefined},set:SC.Descriptor.MUST_USE_SETTER},p=l.prototype;p.cacheable=function(a){this._cacheable=a!==!1;return this},p.property=function(){this._dependentKeys=e.call(arguments);return this},p.setup=function(a,b,c){m.get=n(b,this),m.set=o(b,this),g(a,b,m),m.get=m.set=null,k(this,a,b)},p.teardown=function(a,c){var d=this._dependentKeys,e=d?d.length:0;for(var f=0;f<e;f++)j(a,c,d[f]);this._cacheable&&delete b(a).cache[c];return null},p.didChange=function(a,c){this._cacheable&&this._suspended!==a&&delete b(a).cache[c]},p.get=function(a,c){var d,e;if(this._cacheable){e=b(a).cache;if(c in e)return e[c];d=e[c]=this.func.call(a,c)}else d=this.func.call(a,c);return d},p.set=function(a,d,e){var f=this._cacheable,g=b(a,f),h=g.source===a&&g.watching[d]>0,i,j,k;j=this._suspended,this._suspended=a,h=h&&g.lastSetValues[d]!==c(e),h&&(g.lastSetValues[d]=c(e),SC.propertyWillChange(a,d)),f&&delete g.cache[d],i=this.func.call(a,d,e),f&&(g.cache[d]=i),h&&SC.propertyDidChange(a,d),this._suspended=j;return i},p.val=function(a,c){return b(a,!1).values[c]},SC.platform.hasPropertyAccessors?d||(p.setup=function(a,b){g(a,b,m),k(this,a,b)}):p.setup=function(a,b,c){a[b]=undefined,k(this,a,b)},SC.computed=function(a){return new l(a)}}({}),function(a){function p(a,b){var c=h(a,b),d=[];if(!c)return d;var e;for(var f in c){if(i[f]||!c[f])continue;var g=c[f];for(var j in g){if(i[j]||!g[j])continue;e=g[j],d.push([e.target,e.method])}}return d}function o(a,b){var c=h(a,b);if(!c)return!1;for(var d in c){if(i[d]||!c[d])continue;var e=c[d];for(var g in e){if(i[g]||!e[g])continue;return!0}}var j=f(a,["listeners"],!0);j[b]=null;return!1}function n(a,b){a!==SC&&"function"==typeof a.sendEvent&&a.sendEvent.apply(a,e.call(arguments,1));var c=h(a,b);if(!c)return!1;j(c,arguments);return!0}function m(a){var b=c(a,!1).listeners,d=[];if(b)for(var e in b)!i[e]&&b[e]&&d.push(e);return d}function l(a,b,c,e){!e&&"function"==typeof c&&(e=c,c=null);var f=g(a,b,c,!0),h=d(e);f&&f[h]&&(f[h]=null),a&&"function"==typeof a.didRemoveListener&&a.didRemoveListener(b,c,e)}function k(a,b,c,e,f){!e&&"function"==typeof c&&(e=c,c=null);var h=g(a,b,c,!0),i=d(e),j;h[i]?h[i].xform=f:h[i]={target:c,method:e,xform:f},"function"==typeof a.didAddListener&&a.didAddListener(b,c,e);return j}function j(a,b){for(var c in a){if(i[c])continue;var d=a[c];for(var e in d){if(i[e])continue;var f=d[e];if(!f)continue;var g=f.method,h=f.target;h||(h=b[0]),"string"==typeof g&&(g=h[g]);var j=f.xform;j?j(h,g,b):g.apply(h,b)}}}function h(a,b){var d=c(a,!1).listeners;if(!d)return!1;return d[b]||!1}function g(a,b,c,e){var g=d(c);return f(a,["listeners",b,g],e)}var b=SC.platform.create,c=SC.meta,d=SC.guidFor,e=Array.prototype.slice,f=SC.metaPath,i={__sc_source__:!0};SC.addListener=k,SC.removeListener=l,SC.sendEvent=n,SC.hasListeners=o,SC.watchedEvents=m,SC.listenersFor=p}({}),function(a){function s(a,b,c){var d=c[0],e=p(c[1]),f;b.length>2&&(f=SC.getPath(d,e)),b.call(a,d,e,f)}function q(a){return function(b,c,d){var e=d[0],f=o(d[1]),g;c.length>2&&(g=SC.getPath(e,f)),a.unshift(e,f,g),c.apply(b,a)}}function p(a){return a.slice(0,-7)}function o(a){return a.slice(0,-7)}function n(a){return a+c}function m(a){return a+b}function l(){j.empty();!!i&&i.array.length!==0&&i.forEach(function(a,b){SC.sendEvent(a,b)})}function k(a,b,c){f&&!c?i.contains(a,b)||i.add(a,b):SC.sendEvent(a,b)}var b=":change",c=":before",d=SC.guidFor,e=SC.normalizePath,f=0,g=Array.prototype.slice,h=function(a){this.set={},a&&(this.array=[])};h.prototype.add=function(a,b){var c=this.set,d=SC.guidFor(a),e;c[d]||(c[d]={}),c[d][b]=!0,(e=this.array)&&e.push([a,b])},h.prototype.contains=function(a,b){var c=this.set,d=SC.guidFor(a),e=c[d];return e&&e[b]},h.prototype.empty=function(){this.set={},this.array=[]},h.prototype.forEach=function(a){var b=this.array;this.empty(),b.forEach(function(b){a(b[0],b[1])})};var i=new h(!0),j=new h;SC.beginPropertyChanges=function(){f++;return this},SC.endPropertyChanges=function(){f--,f<=0&&l()};var r=q([]);SC.addObserver=function(a,b,c,d){b=e(b);var f;if(arguments.length>4){var h=g.call(arguments,4);f=q(h)}else f=r;SC.addListener(a,m(b),c,d,f),SC.watch(a,b);return this},SC.observersFor=function(a,b){return SC.listenersFor(a,m(b))},SC.removeObserver=function(a,b,c,d){b=e(b),SC.unwatch(a,b),SC.removeListener(a,m(b),c,d);return this},SC.addBeforeObserver=function(a,b,c,d){b=e(b),SC.addListener(a,n(b),c,d,s),SC.watch(a,b);return this},SC.beforeObserversFor=function(a,b){return SC.listenersFor(a,n(b))},SC.removeBeforeObserver=function(a,b,c,d){b=e(b),SC.unwatch(a,b),SC.removeListener(a,n(b),c,d);return this},SC.notifyObservers=function(a,b){k(a,m(b))},SC.notifyBeforeObservers=function(a,b){var c,d,e=!1;if(f)if(!j.contains(a,b))j.add(a,b),e=!0;else return;k(a,n(b),e)}}({}),function(a){function E(a,b){C(a,b,"didChange")}function D(a,b){C(a,b,"willChange")}function C(a,b,d){var e=c(a,!1),f=e.chainWatchers;if(!!f&&f.__scproto__===a){f=f[b];if(!f)return;for(var g in f){if(!f.hasOwnProperty(g))continue;f[g][d](a,b)}}}function B(a){var b=c(a),d=b.chains;d?d._value!==a&&(d=b.chains=d.copy(a)):d=b.chains=new z(null,null,a);return d}function y(a){return c(a,!1).proto===a}function x(a){if(w.length!==0){var b=w;w=[],b.forEach(function(a){a[0].add(a[1])}),a!==!1&&w.length>0&&setTimeout(x,1)}}function v(a,d,e){if(!!a&&"object"==typeof a){var f=c(a,!1),g=f.chainWatchers;if(!g||g.__scproto__!==a)return;g[d]&&delete g[d][b(e)],SC.unwatch(a,d)}}function u(a,d,e){if(!!a&&"object"==typeof a){var f=c(a),g=f.chainWatchers;if(!g||g.__scproto__!==a)g=f.chainWatchers={__scproto__:a};g[d]||(g[d]={}),g[d][b(e)]=e,SC.watch(a,d)}}function t(a,b){var c=r,d=!c;d&&(c=r={}),p("propertyDidChange",a,b,c),d&&(r=null)}function s(a,b){var c=q,d=!c;d&&(c=q={}),p("propertyWillChange",a,b,c),d&&(q=null)}function p(a,d,e,f){var g=b(d);f[g]||(f[g]={});if(!f[g][e]){f[g][e]=!0;var h=c(d,!1).deps,i=SC[a];h=h&&h[e];if(h)for(var j in h){if(o[j])continue;i(d,j)}}}function n(a){return a==="*"||!l.test(a)}function m(a){return a.match(k)[0]}var b=SC.guidFor,c=SC.meta,d=SC.get,e=SC.set,f=SC.normalizeTuple.primitive,g=SC.normalizePath,h=SC.SIMPLE_PROPERTY,i=SC.GUID_KEY,j=SC.notifyObservers,k=/^([^\.\*]+)/,l=/[\.\*]/,o={__scproto__:!0},q,r,w=[],z=function(a,b,c,e){var f;this._parent=a,this._key=b,this._watching=c===undefined,this._value=c||a._value&&!y(a._value)&&d(a._value,b),this._separator=e||".",this._paths={},this._watching&&(this._object=a._value,this._object&&u(this._object,this._key,this))},A=z.prototype;A.destroy=function(){if(this._watching){var a=this._object;a&&v(a,this._key,this),this._watching=!1}},A.copy=function(a){var b=new z(null,null,a,this._separator),c=this._paths,d;for(d in c){if(!(c[d]>0))continue;b.add(d)}return b},A.add=function(a){var b,c,d,e,g,h;h=this._paths,h[a]=(h[a]||0)+1,b=this._value,c=f(b,a);if(c[0]&&c[0]===b)a=c[1],d=m(a),a=a.slice(d.length+1);else{if(!c[0]){w.push([this,a]);return}e=c[0],d=a.slice(0,0-(c[1].length+1)),g=a.slice(d.length,d.length+1),a=c[1]}this.chain(d,a,e,g)},A.remove=function(a){var b,c,d,e,g;g=this._paths,g[a]>0&&g[a]--,b=this._value,c=f(b,a),c[0]===b?(a=c[1],d=m(a),a=a.slice(d.length+1)):(e=c[0],d=a.slice(0,0-(c[1].length+1)),a=c[1]),this.unchain(d,a)},A.count=0,A.chain=function(a,b,c,d){var e=this._chains,f;e||(e=this._chains={}),f=e[a],f||(f=e[a]=new z(this,a,c,d)),f.count++,b&&b.length>0&&(a=m(b),b=b.slice(a.length+1),f.chain(a,b))},A.unchain=function(a,b){var c=this._chains,d=c[a];b&&b.length>1&&(a=m(b),b=b.slice(a.length+1),d.unchain(a,b)),d.count--,d.count<=0&&(delete c[d._key],d.destroy())},A.willChange=function(){var a=this._chains;if(a)for(var b in a){if(!a.hasOwnProperty(b))continue;a[b].willChange()}this._parent&&this._parent.chainWillChange(this,this._key,1)},A.chainWillChange=function(a,b,c){this._key&&(b=this._key+this._separator+b),this._parent?this._parent.chainWillChange(this,b,c+1):(c>1&&SC.propertyWillChange(this._value,b),b="this."+b,this._paths[b]>0&&SC.propertyWillChange(this._value,b))},A.chainDidChange=function(a,b,c){this._key&&(b=this._key+this._separator+b),this._parent?this._parent.chainDidChange(this,b,c+1):(c>1&&SC.propertyDidChange(this._value,b),b="this."+b,this._paths[b]>0&&SC.propertyDidChange(this._value,b))},A.didChange=function(){if(this._watching){var a=this._parent._value;a!==this._object&&(v(this._object,this._key,this),this._object=a,u(a,this._key,this)),this._value=a&&!y(a)?d(a,this._key):undefined}var b=this._chains;if(b)for(var c in b){if(!b.hasOwnProperty(c))continue;b[c].didChange()}this._parent&&this._parent.chainDidChange(this,this._key,1)};var F=SC.SIMPLE_PROPERTY.watched;SC.watch=function(a,b){if(b==="length"&&SC.typeOf(a)==="array")return this;var d=c(a),e=d.watching,f;b=g(b),e[b]?e[b]=(e[b]||0)+1:(e[b]=1,n(b)?(f=d.descs[b],f=f?f.watched:F,f&&SC.defineProperty(a,b,f)):B(a).add(b));return this},SC.isWatching=function(a,b){return!!c(a).watching[b]},SC.watch.flushPending=x,SC.unwatch=function(a,b){if(b==="length"&&SC.typeOf(a)==="array")return this;var d=c(a).watching,e,f;b=g(b),d[b]===1?(d[b]=0,n(b)?(e=c(a).descs[b],e=e?e.unwatched:h,e&&SC.defineProperty(a,b,e)):B(a).remove(b)):d[b]>1&&d[b]--;return this},SC.rewatch=function(a){var b=c(a,!1),d=b.chains,e=b.bindings,f,g;i in a&&!a.hasOwnProperty(i)&&SC.generateGuid(a,"sc"),d&&d._value!==a&&B(a);if(e&&b.proto!==a)for(f in e)g=!o[f]&&a[f],g&&g instanceof SC.Binding&&g.fromDidChange(a);return this},SC.propertyWillChange=function(a,b){var d=c(a,!1),e=d.proto,f=d.descs[b];e!==a&&(f&&f.willChange&&f.willChange(a,b),s(a,b),D(a,b),SC.notifyBeforeObservers(a,b))},SC.propertyDidChange=function(a,b){var d=c(a,!1),e=d.proto,f=d.descs[b];e!==a&&(f&&f.didChange&&f.didChange(a,b),t(a,b),E(a,b),SC.notifyObservers(a,b))}}({}),function(a){function z(a,b,c){var d=a.length;for(var e in b){if(!b.hasOwnProperty||!b.hasOwnProperty(e))continue;var g=b[e];a[d]=e;if(g&&g.toString===f)g[y]=a.join(".");else if(e==="SC"||SC.Namespace&&g instanceof SC.Namespace){if(c[SC.guidFor(g)])continue;c[SC.guidFor(g)]=!0,z(a,g,c)}}a.length=d}function x(a,b,c){if(!c[SC.guidFor(b)]){c[SC.guidFor(b)]=!0;if(b.properties){var d=b.properties;for(var e in d)d.hasOwnProperty(e)&&(a[e]=!0)}else b.mixins&&b.mixins.forEach(function(b){x(a,b,c)})}}function w(a,b,c){var d=SC.guidFor(a);if(c[d])return!1;c[d]=!0;if(a===b)return!0;var e=a.mixins,f=e?e.length:0;while(--f>=0)if(w(e[f],b,c))return!0;return!1}function u(a,b,f){var g={},h={},i=SC.meta(a),k=i.required,m,n,o,u,v,w=SC._mixinBindings;p(b,l(a),g,h,a),c.detect(a)&&(n=h.willApplyProperty||a.willApplyProperty,o=h.didApplyProperty||a.didApplyProperty);for(m in g){if(!g.hasOwnProperty(m))continue;v=g[m],u=h[m];if(v===d){if(!(m in a)){if(!f)throw new Error("Required property not defined: "+m);k=r(a),k.__sc_count__++,k[m]=!0}}else{while(v instanceof e){var x=v.methodName;g[x]?(u=h[x],v=g[x]):i.descs[x]?(v=i.descs[x],u=v.val(a,x)):(u=a[x],v=SC.SIMPLE_PROPERTY)}n&&n.call(a,m);var y=s(u),z=y&&s(a[m]),A=t(u),B=A&&t(a[m]),C,D;if(z){C=z.length;for(D=0;D<C;D++)SC.removeObserver(a,z[D],null,m)}if(B){C=B.length;for(D=0;D<C;D++)SC.removeBeforeObserver(a,B[D],null,m)}u=w(a,m,u,i),q(a,m,v,u);if(y){C=y.length;for(D=0;D<C;D++)SC.addObserver(a,y[D],null,m)}if(A){C=A.length;for(D=0;D<C;D++)SC.addBeforeObserver(a,A[D],null,m)}k&&k[m]&&(k=r(a),k.__sc_count__--,k[m]=!1),o&&o.call(a,m)}}if(!f&&k&&k.__sc_count__>0){var E=[];for(m in k){if(j[m])continue;E.push(m)}throw new Error("Required properties not defined: "+E.join(","))}return a}function t(a){return"function"==typeof a&&a.__sc_observesBefore__}function s(a){return"function"==typeof a&&a.__sc_observes__}function r(a){var b=SC.meta(a),c=b.required;if(!c||c.__scproto__!==a)c=b.required=c?k(c):{__sc_count__:0},c.__scproto__=a;return c}function p(a,c,e,f,g){function s(a){delete e[a],delete f[a]}var h=a.length,i,j,k,l,m,n,q,r;for(i=0;i<h;i++){j=a[i];if(!j)throw new Error("Null value found in SC.mixin()");if(j instanceof b){k=SC.guidFor(j);if(c[k])continue;c[k]=j,l=j.properties}else l=j;if(l){r=f.concatenatedProperties||g.concatenatedProperties,l.concatenatedProperties&&(r=r?r.concat(l.concatenatedProperties):l.concatenatedProperties);for(n in l){if(!l.hasOwnProperty(n))continue;m=l[n];if(m instanceof SC.Descriptor){if(m===d&&e[n])continue;e[n]=m,f[n]=undefined}else{if(o(m)){q=e[n]===SC.SIMPLE_PROPERTY&&f[n],q||(q=g[n]),"function"!=typeof q&&(q=null);if(q){var t=m.__sc_observes__,u=m.__sc_observesBefore__;m=SC.wrap(m,q),m.__sc_observes__=t,m.__sc_observesBefore__=u}}else if(r&&r.indexOf(n)>=0||n==="concatenatedProperties"){var v=f[n]||g[n];m=v?v.concat(m):SC.makeArray(m)}e[n]=SC.SIMPLE_PROPERTY,f[n]=m}}l.hasOwnProperty("toString")&&(g.toString=l.toString)}else j.mixins&&(p(j.mixins,c,e,f,g),j._without&&j._without.forEach(s))}}function o(a){if("function"!=typeof a||a.isMethod===!1)return!1;return n.indexOf(a)<0}function m(a,c){c&&c.length>0&&(a.mixins=h.call(c,function(a){if(a instanceof b)return a;var c=new b;c.properties=a;return c}));return a}function l(a,b){var c=SC.meta(a,b!==!1),d=c.mixins;if(b===!1)return d||i;d?d.__scproto__!==a&&(d=c.mixins=k(d),d.__scproto__=a):d=c.mixins={__scproto__:a};return d}var b,c,d,e,f,g,h=Array.prototype.map,i={},j={__scproto__:!0,__sc_count__:!0},k=SC.platform.create,n=[Boolean,Object,Number,Array,Date,String],q=SC.defineProperty;SC._mixinBindings=function(a,b,c,d){return c},SC.mixin=function(a){var b=Array.prototype.slice.call(arguments,1);return u(a,b,!1)},b=function(){return m(this,arguments)},b._apply=u,b.applyPartial=function(a){var b=Array.prototype.slice.call(arguments,1);return u(a,b,!0)},b.create=function(){f.processed=!1;var a=this;return m(new a,arguments)},b.prototype.reopen=function(){var a,c;this.properties&&(a=b.create(),a.properties=this.properties,delete this.properties,this.mixins=[a]);var d=arguments.length,e=this.mixins,f;for(f=0;f<d;f++)a=arguments[f],a instanceof b?e.push(a):(c=b.create(),c.properties=a,e.push(c));return this};var v=[];b.prototype.apply=function(a){v.length=0,v[0]=this;return u(a,v,!1)},b.prototype.applyPartial=function(a){v.length=0,v[0]=this;return u(a,v,!0)},b.prototype.detect=function(a){if(!a)return!1;if(a instanceof b)return w(a,this,{});return!!l(a,!1)[SC.guidFor(this)]},b.prototype.without=function(){var a=new b(this);a._without=Array.prototype.slice.call(arguments);return a},b.prototype.keys=function(){var a={},b={},c=[];x(a,this,b);for(var d in a)a.hasOwnProperty(d)&&c.push(d);return c};var y=SC.GUID_KEY+"_name";g=function(a){var b=a.superclass;if(b)return b[y]?b[y]:g(b);return},f=function(){!this[y]&&!f.processed&&(f.processed=!0,z([],window,{}));if(this[y])return this[y];var a=g(this);return a?"(subclass of "+a+")":"(unknown mixin)"},b.prototype.toString=f,b.mixins=function(a){var b=[],c=l(a,!1),d,e;for(d in c){if(j[d])continue;e=c[d],e.properties||b.push(c[d])}return b},d=new SC.Descriptor,d.toString=function(){return"(Required Property)"},SC.required=function(){return d},e=function(a){this.methodName=a},e.prototype=new SC.Descriptor,SC.alias=function(a){return new e(a)},SC.Mixin=b,c=b.create({willApplyProperty:SC.required(),didApplyProperty:SC.required()}),SC.MixinDelegate=c,SC.observer=function(a){var b=Array.prototype.slice.call(arguments,1);a.__sc_observes__=b;return a},SC.beforeObserver=function(a){var b=Array.prototype.slice.call(arguments,1);a.__sc_observesBefore__=b;return a}}({}),function(a){}({}),function(a){function h(a,b,c){b.call(a,c[0],c[2],c[3])}function g(a,c){function d(d){var e=b(d,a);return c===undefined?!!e:c===e}return d}function f(a){d.push(a);return null}function e(){return d.length===0?{}:d.pop()}var b=SC.get,c=SC.set,d=[];SC.Enumerable=SC.Mixin.create({isEnumerable:!0,nextObject:SC.required(Function),firstObject:SC.computed(function(){if(b(this,"length")===0)return undefined;if(SC.Array&&SC.Array.detect(this))return this.objectAt(0);var a=e(),c;c=this.nextObject(0,null,a),f(a);return c}).property("[]").cacheable(),lastObject:SC.computed(function(){var a=b(this,"length");if(a===0)return undefined;if(SC.Array&&SC.Array.detect(this))return this.objectAt(a-1);var c=e(),d=0,g,h=null;do h=g,g=this.nextObject(d++,h,c);while(g!==undefined);f(c);return h}).property("[]").cacheable(),contains:function(a){return this.find(function(b){return b===a})!==undefined},forEach:function(a,c){if(typeof a!="function")throw new TypeError;var d=b(this,"length"),g=null,h=e();c===undefined&&(c=null);for(var i=0;i<d;i++){var j=this.nextObject(i,g,h);a.call(c,j,i,this),g=j}g=null,h=f(h);return this},getEach:function(a){return this.map(function(c){return b(c,a)})},setEach:function(a,b){return this.forEach(function(d){c(d,a,b)})},map:function(a,b){var c=[];this.forEach(function(d,e,f){c[e]=a.call(b,d,e,f)});return c},mapProperty:function(a){return this.map(function(c){return b(c,a)})},filter:function(a,b){var c=[];this.forEach(function(d,e,f){a.call(b,d,e,f)&&c.push(d)});return c},filterProperty:function(a,b){return this.filter(g(a,b))},find:function(a,c){var d=b(this,"length");c===undefined&&(c=null);var g=null,h,i=!1,j,k=e();for(var l=0;l<d&&!i;l++){h=this.nextObject(l,g,k);if(i=a.call(c,h,l,this))j=h;g=h}h=g=null,k=f(k);return j},findProperty:function(a,b){return this.find(g(a,b))},every:function(a,b){return!this.find(function(c,d,e){return!a.call(b,c,d,e)})},everyProperty:function(a,b){return this.every(g(a,b))},some:function(a,b){return!!this.find(function(c,d,e){return!!a.call(b,c,d,e)})},someProperty:function(a,b){return this.some(g(a,b))},reduce:function(a,b,c){if(typeof a!="function")throw new TypeError;var d=b;this.forEach(function(b,e){d=a.call(null,d,b,e,this,c)},this);return d},invoke:function(a){var b,c=[];arguments.length>1&&(b=Array.prototype.slice.call(arguments,1)),this.forEach(function(d,e){var f=d&&d[a];"function"==typeof f&&(c[e]=b?f.apply(d,b):f.call(d))},this);return c},toArray:function(){var a=[];this.forEach(function(b,c){a[c]=b});return a},compact:function(){return this.without(null)},without:function(a){if(!this.contains(a))return this;var b=[];this.forEach(function(c){c!==a&&(b[b.length]=c)});return b},uniq:function(){var a=[],b=!1;this.forEach(function(c){a.indexOf(c)<0?a[a.length]=c:b=!0});return b?a:this},"[]":SC.computed(function(a,b){return this}).property().cacheable(),addEnumerableObserver:function(a,c){var d=c&&c.willChange||"enumerableWillChange",e=c&&c.didChange||"enumerableDidChange",f=b(this,"hasEnumerableObservers");f||SC.propertyWillChange(this,"hasEnumerableObservers"),SC.addListener(this,"@enumerable:before",a,d,h),SC.addListener(this,"@enumerable:change",a,e,h),f||SC.propertyDidChange(this,"hasEnumerableObservers");return this},removeEnumerableObserver:function(a,c){var d=c&&c.willChange||"enumerableWillChange",e=c&&c.didChange||"enumerableDidChange",f=b(this,"hasEnumerableObservers");f&&SC.propertyWillChange(this,"hasEnumerableObservers"),SC.removeListener(this,"@enumerable:before",a,d),SC.removeListener(this,"@enumerable:change",a,e),f&&SC.propertyDidChange(this,"hasEnumerableObservers");return this},hasEnumerableObservers:SC.computed(function(){return SC.hasListeners(this,"@enumerable:change")||SC.hasListeners(this,"@enumerable:before")}).property().cacheable(),enumerableContentWillChange:function(a,c){var d,e,f;"number"==typeof a?d=a:a?d=b(a,"length"):d=a=-1,"number"==typeof c?e=c:c?e=b(c,"length"):e=c=-1,f=e<0||d<0||e-d!==0,a===-1&&(a=null),c===-1&&(c=null),SC.propertyWillChange(this,"[]"),f&&SC.propertyWillChange(this,"length"),SC.sendEvent(this,"@enumerable:before",a,c);return this},enumerableContentDidChange:function(a,c){var d=this.propertyDidChange,e,f,g;"number"==typeof a?e=a:a?e=b(a,"length"):e=a=-1,"number"==typeof c?f=c:c?f=b(c,"length"):f=c=-1,g=f<0||e<0||f-e!==0,a===-1&&(a=null),c===-1&&(c=null),SC.sendEvent(this,"@enumerable:change",a,c),g&&SC.propertyDidChange(this,"length"),SC.propertyDidChange(this,"[]");return this}})}({}),function(a){function f(a,b,c){b.call(a,c[0],c[2],c[3],c[4])}function e(a){return a===null||a===undefined}var b=SC.get,c=SC.set,d=SC.meta;SC.Array=SC.Mixin.create(SC.Enumerable,{isSCArray:!0,length:SC.required(),objectAt:function(a){if(a<0||a>=b(this,"length"))return undefined;return b(this,a)},nextObject:function(a){return this.objectAt(a)},"[]":SC.computed(function(a,c){c!==undefined&&this.replace(0,b(this,"length"),c);return this}).property().cacheable(),contains:function(a){return this.indexOf(a)>=0},slice:function(a,c){var d=[],f=b(this,"length");e(a)&&(a=0);if(e(c)||c>f)c=f;while(a<c)d[d.length]=this.objectAt(a++);return d},indexOf:function(a,c){var d,e=b(this,"length");c===undefined&&(c=0),c<0&&(c+=e);for(d=c;d<e;d++)if(this.objectAt(d,!0)===a)return d;return-1},lastIndexOf:function(a,c){var d,e=b(this,"length");c===undefined&&(c=e-1),c<0&&(c+=e);for(d=c;d>=0;d--)if(this.objectAt(d)===a)return d;return-1},addArrayObserver:function(a,c){var d=c&&c.willChange||"arrayWillChange",e=c&&c.didChange||"arrayDidChange",g=b(this,"hasArrayObservers");g||SC.propertyWillChange(this,"hasArrayObservers"),SC.addListener(this,"@array:before",a,d,f),SC.addListener(this,"@array:change",a,e,f),g||SC.propertyDidChange(this,"hasArrayObservers");return this},removeArrayObserver:function(a,c){var d=c&&c.willChange||"arrayWillChange",e=c&&c.didChange||"arrayDidChange",g=b(this,"hasArrayObservers");g&&SC.propertyWillChange(this,"hasArrayObservers"),SC.removeListener(this,"@array:before",a,d,f),SC.removeListener(this,"@array:change",a,e,f),g&&SC.propertyDidChange(this,"hasArrayObservers");return this},hasArrayObservers:SC.computed(function(){return SC.hasListeners(this,"@array:change")||SC.hasListeners(this,"@array:before")}).property().cacheable(),arrayContentWillChange:function(a,c,d){a===undefined?(a=0,c=d=-1):(c||(c=0),d||(d=0)),SC.sendEvent(this,"@array:before",a,c,d);var e,f;if(a>=0&&c>=0&&b(this,"hasEnumerableObservers")){e=[],f=a+c;for(var g=a;g<f;g++)e.push(this.objectAt(g))}else e=c;this.enumerableContentWillChange(e,d),SC.isWatching(this,"@each")&&b(this,"@each");return this},arrayContentDidChange:function(a,c,d){a===undefined?(a=0,c=d=-1):(c||(c=0),d||(d=0));var e,f;if(a>=0&&d>=0&&b(this,"hasEnumerableObservers")){e=[],f=a+d;for(var g=a;g<f;g++)e.push(this.objectAt(g))}else e=d;this.enumerableContentDidChange(c,e),SC.sendEvent(this,"@array:change",a,c,d);return this},"@each":SC.computed(function(){this.__each||(this.__each=new SC.EachProxy(this));return this.__each}).property().cacheable()})}({}),function(a){SC.MutableEnumerable=SC.Mixin.create(SC.Enumerable,{addObject:SC.required(Function),addObjects:function(a){SC.beginPropertyChanges(this),a.forEach(function(a){this.addObject(a)},this),SC.endPropertyChanges(this);return this},removeObject:SC.required(Function),removeObjects:function(a){SC.beginPropertyChanges(this),a.forEach(function(a){this.removeObject(a)},this),SC.endPropertyChanges(this);return this}})}({}),function(a){var b="Index out of range",c=[],d=SC.get,e=SC.set;SC.MutableArray=SC.Mixin.create(SC.Array,SC.MutableEnumerable,{replace:SC.required(),insertAt:function(a,c){if(a>d(this,"length"))throw new Error(b);this.replace(a,0,[c]);return this},removeAt:function(a,e){var f=0;if("number"==typeof a){if(a<0||a>=d(this,"length"))throw new Error(b);e===undefined&&(e=1),this.replace(a,e,c)}return this},pushObject:function(a){this.insertAt(d(this,"length"),a);return a},pushObjects:function(a){this.beginPropertyChanges(),a.forEach(function(a){this.pushObject(a)},this),this.endPropertyChanges();return this},popObject:function(){var a=d(this,"length");if(a===0)return null;var b=this.objectAt(a-1);this.removeAt(a-1,1);return b},shiftObject:function(){if(d(this,"length")===0)return null;var a=this.objectAt(0);this.removeAt(0);return a},unshiftObject:function(a){this.insertAt(0,a);return a},unshiftObjects:function(a){this.beginPropertyChanges(),a.forEach(function(a){this.unshiftObject(a)},this),this.endPropertyChanges();return this},removeObject:function(a){var b=d(this,"length")||0;while(--b>=0){var c=this.objectAt(b);c===a&&this.removeAt(b)}return this},addObject:function(a){this.contains(a)||this.pushObject(a);return this}})}({}),function(a){var b=SC.get,c=SC.set;SC.Observable=SC.Mixin.create({isObserverable:!0,get:function(a){return b(this,a)},set:function(a,b){c(this,a,b);return this},setProperties:function(a){SC.beginPropertyChanges(this);for(var b in a)a.hasOwnProperty(b)&&c(this,b,a[b]);SC.endPropertyChanges(this);return this},beginPropertyChanges:function(){SC.beginPropertyChanges();return this},endPropertyChanges:function(){SC.endPropertyChanges();return this},propertyWillChange:function(a){SC.propertyWillChange(this,a);return this},propertyDidChange:function(a){SC.propertyDidChange(this,a);return this},notifyPropertyChange:function(a){this.propertyWillChange(a),this.propertyDidChange(a);return this},addObserver:function(a,b,c){SC.addObserver(this,a,b,c)},removeObserver:function(a,b,c){SC.removeObserver(this,a,b,c)},hasObserverFor:function(a){return SC.hasListeners(this,a+":change")},unknownProperty:function(a){return undefined},setUnknownProperty:function(a,b){this[a]=b},getPath:function(a){return SC.getPath(this,a)},setPath:function(a,b){SC.setPath(this,a,b);return this},incrementProperty:function(a,d){d||(d=1),c(this,a,(b(this,a)||0)+d);return b(this,a)},decrementProperty:function(a,d){d||(d=1),c(this,a,(b(this,a)||0)-d);return b(this,a)},toggleProperty:function(a){c(this,a,!b(this,a));return b(this,a)},observersForKey:function(a){return SC.observersFor(this,a)}})}({}),function(a){function h(){var a=!1,d,f=!1,h=!1,i=function(){a||e(i,"proto"),d?(this.reopen.apply(this,d),d=null,b(this),this.init.apply(this,arguments)):(h?b(this):this[SC.GUID_KEY]=undefined,f===!1&&(f=this.init),f.apply(this,arguments))};i.toString=c,i._prototypeMixinDidChange=function(){a=!1},i._initMixins=function(a){d=a},SC.defineProperty(i,"proto",SC.computed(function(){a||(a=!0,i.PrototypeMixin.applyPartial(i.prototype),h=!!g(i.prototype,!1).chains);return this.prototype}));return i}var b=SC.rewatch,c=SC.Mixin.prototype.toString,d=SC.set,e=SC.get,f=SC.platform.create,g=SC.meta,i=h();i.PrototypeMixin=SC.Mixin.create({reopen:function(){SC.Mixin._apply(this,arguments,!0);return this},isInstance:!0,init:function(){},isDestroyed:!1,destroy:function(){d(this,"isDestroyed",!0),SC.run.schedule("destroy",this,this._scheduledDestroy);return this},_scheduledDestroy:function(){this[SC.META_KEY]=null},bind:function(a,b){b instanceof SC.Binding||(b=SC.Binding.from(b)),b.to(a).connect(this);return b},toString:function(){return"<"+this.constructor.toString()+":"+SC.guidFor(this)+">"}}),i.__super__=null;var j=SC.Mixin.create({ClassMixin:SC.required(),PrototypeMixin:SC.required(),isClass:!0,isMethod:!1,extend:function(){var a=h(),b;a.ClassMixin=SC.Mixin.create(this.ClassMixin),a.PrototypeMixin=SC.Mixin.create(this
10
+ .PrototypeMixin),a.ClassMixin.ownerConstructor=a,a.PrototypeMixin.ownerConstructor=a;var c=a.PrototypeMixin;c.reopen.apply(c,arguments),a.superclass=this,a.__super__=this.prototype,b=a.prototype=f(this.prototype),b.constructor=a,SC.generateGuid(b,"sc"),g(b).proto=b,SC.rewatch(b),a.subclasses=SC.Set?new SC.Set:null,this.subclasses&&this.subclasses.add(a),a.ClassMixin.apply(a);return a},create:function(){var a=this;arguments.length>0&&this._initMixins(arguments);return new a},reopen:function(){var a=this.PrototypeMixin;a.reopen.apply(a,arguments),this._prototypeMixinDidChange();return this},reopenClass:function(){var a=this.ClassMixin;a.reopen.apply(a,arguments),SC.Mixin._apply(this,arguments,!1);return this},detect:function(a){if("function"!=typeof a)return!1;while(a){if(a===this)return!0;a=a.superclass}return!1}});i.ClassMixin=j,j.apply(i),SC.CoreObject=i}({}),function(a){function e(a,b,c,d){var f,g,h;if("object"!=typeof a||a===null)return a;if(b&&(g=c.indexOf(a))>=0)return d[g];if(SC.typeOf(a)==="array"){f=a.slice();if(b){g=f.length;while(--g>=0)f[g]=e(f[g],b,c,d)}}else if(SC.Copyable&&SC.Copyable.detect(a))f=a.copy(b,c,d);else{f={};for(h in a){if(!a.hasOwnProperty(h))continue;f[h]=b?e(a[h],b,c,d):a[h]}}b&&(c.push(a),d.push(f));return f}YES=!0,NO=!1,typeof console=="undefined"&&(window.console={},console.log=console.info=console.warn=console.error=function(){}),SC.EXTEND_PROTOTYPES=SC.ENV.EXTEND_PROTOTYPES!==!1;var b={},c="Boolean Number String Function Array Date RegExp Object".split(" ");c.forEach(function(a){b["[object "+a+"]"]=a.toLowerCase()});var d=Object.prototype.toString;SC.typeOf=function(a){var c;c=a==null?String(a):b[d.call(a)]||"object",c==="function"?SC.Object&&SC.Object.detect(a)&&(c="class"):c==="object"&&(a instanceof Error?c="error":SC.Object&&a instanceof SC.Object?c="instance":c="object");return c},SC.none=function(a){return a===null||a===undefined},SC.empty=function(a){return a===null||a===undefined||a===""},SC.compare=function(a,b){if(a===b)return 0;var c=SC.typeOf(a),d=SC.typeOf(b),e=SC.Comparable;if(e){if(c==="instance"&&e.detect(a.constructor))return a.constructor.compare(a,b);if(d==="instance"&&e.detect(b.constructor))return 1-b.constructor.compare(b,a)}var f=SC.ORDER_DEFINITION_MAPPING;if(!f){var g=SC.ORDER_DEFINITION;f=SC.ORDER_DEFINITION_MAPPING={};var h,i;for(h=0,i=g.length;h<i;++h)f[g[h]]=h;delete SC.ORDER_DEFINITION}var j=f[c],k=f[d];if(j<k)return-1;if(j>k)return 1;switch(c){case"boolean":case"number":if(a<b)return-1;if(a>b)return 1;return 0;case"string":var l=a.localeCompare(b);if(l<0)return-1;if(l>0)return 1;return 0;case"array":var m=a.length,n=b.length,o=Math.min(m,n),p=0,q=0,r=arguments.callee;while(p===0&&q<o)p=r(a[q],b[q]),q++;if(p!==0)return p;if(m<n)return-1;if(m>n)return 1;return 0;case"instance":if(SC.Comparable&&SC.Comparable.detect(a))return a.compare(a,b);return 0;default:return 0}},SC.copy=function(a,b){if("object"!=typeof a||a===null)return a;if(SC.Copyable&&SC.Copyable.detect(a))return a.copy(b);return e(a,b,b?[]:null,b?[]:null)},SC.inspect=function(a){var b,c=[];for(var d in a)if(a.hasOwnProperty(d)){b=a[d];if(b==="toString")continue;SC.typeOf(b)===SC.T_FUNCTION&&(b="function() { ... }"),c.push(d+": "+b)}return"{"+c.join(" , ")+"}"},SC.isEqual=function(a,b){if(a&&"function"==typeof a.isEqual)return a.isEqual(b);return a===b},SC.ORDER_DEFINITION=SC.ENV.ORDER_DEFINITION||["undefined","null","boolean","number","string","array","object","instance","function","class"],SC.keys=Object.keys,SC.keys||(SC.keys=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b}),SC.Error=function(){var a=Error.prototype.constructor.apply(this,arguments);for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b])},SC.Error.prototype=SC.create(Error.prototype),SC.Logger=window.console}({}),function(a){var b=/[ _]/g,c={},d=/([a-z])([A-Z])/g;SC.STRINGS={},SC.String={fmt:function(a,b){var c=0;return a.replace(/%@([0-9]+)?/g,function(a,d){d=d?parseInt(d,0)-1:c++,a=b[d];return(a===null?"(null)":a===undefined?"":a).toString()})},loc:function(a,b){a=SC.STRINGS[a]||a;return SC.String.fmt(a,b)},w:function(a){return a.split(/\s+/)},decamelize:function(a){return a.replace(d,"$1_$2").toLowerCase()},dasherize:function(a){var d=c,e=d[a];if(e)return e;e=SC.String.decamelize(a).replace(b,"-"),d[a]=e;return e}}}({}),function(a){var b=SC.get,c=SC.set;SC.Copyable=SC.Mixin.create({copy:SC.required(Function),frozenCopy:function(){if(SC.Freezable&&SC.Freezable.detect(this))return b(this,"isFrozen")?this:this.copy().freeze();throw new Error(SC.String.fmt("%@ does not support freezing",this))}})}({}),function(a){var b=SC.get,c=SC.set;SC.Freezable=SC.Mixin.create({isFrozen:!1,freeze:function(){if(b(this,"isFrozen"))return this;c(this,"isFrozen",!0);return this}}),SC.FROZEN_ERROR="Frozen object cannot be modified."}({}),function(a){var b=SC.get,c=SC.set,d=SC.guidFor,e=SC.none;SC.Set=SC.CoreObject.extend(SC.MutableEnumerable,SC.Copyable,SC.Freezable,{length:0,clear:function(){if(this.isFrozen)throw new Error(SC.FROZEN_ERROR);var a=b(this,"length");this.enumerableContentWillChange(a,0),c(this,"length",0),this.enumerableContentDidChange(a,0);return this},isEqual:function(a){if(!SC.Enumerable.detect(a))return!1;var c=b(this,"length");if(b(a,"length")!==c)return!1;while(--c>=0)if(!a.contains(this[c]))return!1;return!0},add:SC.alias("addObject"),remove:SC.alias("removeObject"),pop:function(){if(b(this,"isFrozen"))throw new Error(SC.FROZEN_ERROR);var a=this.length>0?this[this.length-1]:null;this.remove(a);return a},push:SC.alias("addObject"),shift:SC.alias("pop"),unshift:SC.alias("push"),addEach:SC.alias("addObjects"),removeEach:SC.alias("removeObjects"),init:function(a){this._super(),a&&this.addObjects(a)},nextObject:function(a){return this[a]},firstObject:SC.computed(function(){return this.length>0?this[0]:undefined}).property("[]").cacheable(),lastObject:SC.computed(function(){return this.length>0?this[this.length-1]:undefined}).property("[]").cacheable(),addObject:function(a){if(b(this,"isFrozen"))throw new Error(SC.FROZEN_ERROR);if(e(a))return this;var f=d(a),g=this[f],h=b(this,"length"),i;if(g>=0&&g<h&&this[g]===a)return this;i=[a],this.enumerableContentWillChange(null,i),h=b(this,"length"),this[f]=h,this[h]=a,c(this,"length",h+1),this.enumerableContentDidChange(null,i);return this},removeObject:function(a){if(b(this,"isFrozen"))throw new Error(SC.FROZEN_ERROR);if(e(a))return this;var f=d(a),g=this[f],h=b(this,"length"),i,j;g>=0&&g<h&&this[g]===a&&(j=[a],this.enumerableContentWillChange(j,null),g<h-1&&(i=this[h-1],this[g]=i,this[d(i)]=g),delete this[f],delete this[h-1],c(this,"length",h-1),this.enumerableContentDidChange(j,null));return this},contains:function(a){return this[d(a)]>=0},copy:function(){var a=this.constructor,e=new a,f=b(this,"length");c(e,"length",f);while(--f>=0)e[f]=this[f],e[d(this[f])]=f;return e},toString:function(){var a=this.length,b,c=[];for(b=0;b<a;b++)c[b]=this[b];return"SC.Set<%@>".fmt(c.join(","))},isSet:!0});var f=SC.Set.create;SC.Set.create=function(a){if(a&&SC.Enumerable.detect(a)){SC.Logger.warn("Passing an enumerable to SC.Set.create() is deprecated and will be removed in a future version of SproutCore. Use new SC.Set(items) instead");return new SC.Set(a)}return f.apply(this,arguments)}}({}),function(a){SC.CoreObject.subclasses=new SC.Set,SC.Object=SC.CoreObject.extend(SC.Observable)}({}),function(a){var b=SC.get,c=SC.set;SC.ArrayProxy=SC.Object.extend(SC.MutableArray,{content:null,objectAtContent:function(a){return b(this,"content").objectAt(a)},replaceContent:function(a,c,d){b(this,"content").replace(a,c,d)},contentWillChange:SC.beforeObserver(function(){var a=b(this,"content"),c=a?b(a,"length"):0;this.arrayWillChange(a,0,c,undefined),a&&a.removeArrayObserver(this)},"content"),contentDidChange:SC.observer(function(){var a=b(this,"content"),c=a?b(a,"length"):0;a&&a.addArrayObserver(this),this.arrayDidChange(a,0,undefined,c)},"content"),objectAt:function(a){return b(this,"content")&&this.objectAtContent(a)},length:SC.computed(function(){var a=b(this,"content");return a?b(a,"length"):0}).property("content.length").cacheable(),replace:function(a,c,d){b(this,"content")&&this.replaceContent(a,c,d);return this},arrayWillChange:function(a,b,c,d){this.arrayContentWillChange(b,c,d)},arrayDidChange:function(a,b,c,d){this.arrayContentDidChange(b,c,d)},init:function(a){this._super(),a&&c(this,"content",a),this.contentDidChange()}})}({}),function(a){SC.ArrayController=SC.ArrayProxy.extend()}({}),function(a){}({}),function(a){var b=SC.String.fmt,c=SC.String.w,d=SC.String.loc,e=SC.String.decamelize,f=SC.String.dasherize;SC.EXTEND_PROTOTYPES&&(String.prototype.fmt=function(){return b(this,arguments)},String.prototype.w=function(){return c(this)},String.prototype.loc=function(){return d(this,arguments)},String.prototype.decamelize=function(){return e(this)},String.prototype.dashersize=function(){return f(this)})}({}),function(a){SC.EXTEND_PROTOTYPES&&(Function.prototype.property=function(){var a=SC.computed(this);return a.property.apply(a,arguments)},Function.prototype.observes=function(){this.__sc_observes__=Array.prototype.slice.call(arguments);return this},Function.prototype.observesBefore=function(){this.__sc_observesBefore__=Array.prototype.slice.call(arguments);return this})}({}),function(a){var b=SC.IS_BINDING=/^.+Binding$/;SC._mixinBindings=function(a,c,d,e){if(b.test(c)){d instanceof SC.Binding?d.to(c.slice(0,-7)):d=new SC.Binding(c.slice(0,-7),d),d.connect(a);var f=e.bindings;f?f.__scproto__!==a&&(f=e.bindings=SC.create(e.bindings),f.__scproto__=a):f=e.bindings={__scproto__:a},f[c]=!0}return d}}({}),function(a){}({}),function(a){}({}),function(a){SC.Comparable=SC.Mixin.create({isComparable:!0,compare:SC.required(Function)})}({}),function(a){}({}),function(a){SC.Namespace=SC.Object.extend()}({}),function(a){SC.Application=SC.Namespace.extend()}({}),function(a){function n(){m=null;for(var a in i){if(!i.hasOwnProperty(a))continue;var b=i[a];b.next&&(delete i[a],c(b.target,b.method,b.args,2))}}function l(a,b){b[this.tguid]&&delete b[this.tguid][this.mguid],i[a]&&c(this.target,this.method,this.args,2),delete i[a]}function k(){var a=+(new Date),b=-1;for(var d in i){if(!i.hasOwnProperty(d))continue;var e=i[d];if(e&&e.expires)if(a>=e.expires)delete i[d],c(e.target,e.method,e.args,2);else if(b<0||e.expires<b)b=e.expires}b>0&&setTimeout(k,b- +(new Date))}function h(){g=null,f.currentRunLoop&&f.end()}function c(a,c,d,e){c===undefined&&(c=a,a=undefined),"string"==typeof c&&(c=a[c]),d&&e>0&&(d=d.length>e?b.call(d,e):null);return c.apply(a||this,d||[])}var b=Array.prototype.slice,d,e=SC.Object.extend({_prev:null,init:function(a){this._prev=a,this.onceTimers={}},end:function(){this.flush();return this._prev},schedule:function(a,c,d){var e=this._queues,f;e||(e=this._queues={}),f=e[a],f||(f=e[a]=[]);var g=arguments.length>3?b.call(arguments,3):null;f.push({target:c,method:d,args:g});return this},flush:function(a){function j(a){c(a.target,a.method,a.args)}var b=this._queues,e,f,g,h,i;if(!b)return this;SC.watch.flushPending();if(a)while(this._queues&&(h=this._queues[a]))this._queues[a]=null,i=SC.LOG_BINDINGS&&a==="sync",i&&SC.Logger.log("Begin: Flush Sync Queue"),a==="sync"&&SC.beginPropertyChanges(),h.forEach(j),a==="sync"&&SC.endPropertyChanges(),i&&SC.Logger.log("End: Flush Sync Queue");else{e=SC.run.queues,g=e.length;do{this._queues=null;for(f=0;f<g;f++)a=e[f],h=b[a],i=SC.LOG_BINDINGS&&a==="sync",i&&SC.Logger.log("Begin: Flush Sync Queue"),a==="sync"&&SC.beginPropertyChanges(),h&&h.forEach(j),a==="sync"&&SC.endPropertyChanges(),i&&SC.Logger.log("End: Flush Sync Queue")}while(b=this._queues)}d=null;return this}});SC.RunLoop=e;var f;SC.run=f=function(a,b){var d,e;f.begin();if(a||b)d=c(a,b,arguments,2);f.end();return d},SC.run.begin=function(){f.currentRunLoop=new e(f.currentRunLoop)},SC.run.end=function(){f.currentRunLoop=f.currentRunLoop.end()},SC.run.queues=["sync","actions","destroy","timers"],SC.run.schedule=function(a,b,c){var d=f.autorun();d.schedule.apply(d,arguments)};var g;SC.run.autorun=function(){f.currentRunLoop||(f.begin(),SC.testing?f.end():g||(g=setTimeout(h,1)));return f.currentRunLoop},SC.run.sync=function(){f.autorun(),f.currentRunLoop.flush("sync")};var i={},j=!1;SC.run.later=function(a,c){var d,e,g,h,j;arguments.length===2&&"function"==typeof a?(j=c,c=a,a=undefined,d=[a,c]):(d=b.call(arguments),j=d.pop()),e=+(new Date)+j,g={target:a,method:c,expires:e,args:d},h=SC.guidFor(g),i[h]=g,f.once(i,k);return h},SC.run.once=function(a,c){var d=SC.guidFor(a),e=SC.guidFor(c),g,h,j=f.autorun().onceTimers;g=j[d]&&j[d][e],g&&i[g]?i[g].args=b.call(arguments):(h={target:a,method:c,args:b.call(arguments),tguid:d,mguid:e},g=SC.guidFor(h),i[g]=h,j[d]||(j[d]={}),j[d][e]=g,f.schedule("actions",h,l,g,j));return g};var m=!1;SC.run.next=function(a,c){var d,e;d={target:a,method:c,args:b.call(arguments),next:!0},e=SC.guidFor(d),i[e]=d,m||(m=setTimeout(n,1));return e},SC.run.cancel=function(a){delete i[a]},SC.RunLoop.begin=SC.run.begin,SC.RunLoop.end=SC.run.end}({}),function(a){function m(a,b){var c=g(a,b._to);return j(b,c,a,"from")}function l(a,b){var c=b._operation,d=c?c(a,b._from,b._operand):g(a,b._from);return j(b,d,a,"to")}function k(a){return a===undefined||a===null||a===""||SC.isArray(a)&&f(a,"length")===0}function j(a,b,c,d){var e=a._typeTransform;e&&(b=e(b,a._placeholder));var f=a._transforms,g=f?f.length:0,h;for(h=0;h<g;h++){var i=f[h][d];i&&(b=i.call(this,b,c))}return b}function c(a,b){if(a instanceof Array)return a.length>1?b:a[0];return a}function b(a){if(a instanceof Array)return a;if(a===undefined||a===null)return[];return[a]}SC.LOG_BINDINGS=!!SC.ENV.LOG_BINDINGS,SC.BENCHMARK_BINDING_NOTIFICATIONS=!!SC.ENV.BENCHMARK_BINDING_NOTIFICATIONS,SC.BENCHMARK_BINDING_SETUP=!!SC.ENV.BENCHMARK_BINDING_SETUP,SC.MULTIPLE_PLACEHOLDER="@@MULT@@",SC.EMPTY_PLACEHOLDER="@@EMPTY@@";var d={to:function(a){return!!a}},e={to:function(b){return!b}},f=SC.get,g=SC.getPath,h=SC.setPath,i=SC.guidFor,n=function(a,b,c){return g(a,b)&&g(a,c)},o=function(a,b,c){return g(a,b)||g(a,c)},p=SC.Object.extend({_direction:"fwd",init:function(a,b){this._from=b,this._to=a},from:function(a,b){b||(b=a,a=null),this._from=b,this._object=a;return this},to:function(a){this._to=a;return this},oneWay:function(a){this._oneWay=a===undefined?!0:!!a;return this},transform:function(a){"function"==typeof a&&(a={to:a}),this._transforms||(this._transforms=[]),this._transforms.push(a);return this},resetTransforms:function(){this._transforms=null;return this},single:function(a){a===undefined&&(a=SC.MULTIPLE_PLACEHOLDER),this._typeTransform=c,this._placeholder=a;return this},multiple:function(){this._typeTransform=b,this._placeholder=null;return this},bool:function(){this.transform(d);return this},notEmpty:function(a){a||(a=SC.EMPTY_PLACEHOLDER),this.transform({to:function(b){return k(b)?a:b}});return this},notNull:function(a){a||(a=SC.EMPTY_PLACEHOLDER),this.transform({to:function(b){return b==null?a:b}});return this},not:function(){this.transform(e);return this},isNull:function(){this.transform(function(a){return a==null});return this},toString:function(){var a=this._oneWay?"[oneWay]":"";return SC.String.fmt("SC.Binding<%@>(%@ -> %@)%@",[i(this),this._from,this._to,a])},connect:function(a){var b=this._oneWay,c=this._operand;SC.addObserver(a,this._from,this,this.fromDidChange),c&&SC.addObserver(a,c,this,this.fromDidChange),b||SC.addObserver(a,this._to,this,this.toDidChange),SC.meta(a,!1).proto!==a&&this._scheduleSync(a,"fwd"),this._readyToSync=!0;return this},disconnect:function(a){var b=this._oneWay,c=this._operand;SC.removeObserver(a,this._from,this,this.fromDidChange),c&&SC.removeObserver(a,c,this,this.fromDidChange),b||SC.removeObserver(a,this._to,this,this.toDidChange),this._readyToSync=!1;return this},fromDidChange:function(a){this._scheduleSync(a,"fwd")},toDidChange:function(a){this._scheduleSync(a,"back")},_scheduleSync:function(a,b){var c=i(a),d=this[c];d||(SC.run.schedule("sync",this,this._sync,a),this[c]=b),d==="back"&&b==="fwd"&&(this[c]="fwd")},_sync:function(a){var b=SC.LOG_BINDINGS;if(!a.isDestroyed&&!!this._readyToSync){var c=i(a),d=this[c],e,f,g=this._from,h=this._to;delete this[c];var j=l(a,this),k=m(a,this);if(k===j)return;d==="fwd"?(b&&SC.Logger.log(" ",this.toString(),e,"->",j,a),SC.trySetPath(a,h,j)):d==="back"&&(b&&SC.Logger.log(" ",this.toString(),e,"<-",j,a),SC.trySetPath(a,g,k))}}});p.reopenClass({from:function(){var a=this,b=new a;return b.from.apply(b,arguments)},to:function(){var a=this,b=new a;return b.to.apply(b,arguments)},oneWay:function(a,b){var c=this,d=new c(null,a);return d.oneWay(b)},single:function(a){var b=this,c=new b(null,a);return c.single()},multiple:function(a){var b=this,c=new b(null,a);return c.multiple()},transform:function(a){var b=this,c=new b;return c.transform(a)},notEmpty:function(a,b){var c=this,d=new c(null,a);return d.notEmpty(b)},bool:function(a){var b=this,c=new b(null,a);return c.bool()},not:function(a){var b=this,c=new b(null,a);return c.not()},and:function(a,b){var c=this,d=(new c(null,a)).oneWay();d._operand=b,d._operation=n;return d},or:function(a,b){var c=this,d=(new c(null,a)).oneWay();d._operand=b,d._operation=o;return d}}),SC.Binding=p,SC.bind=function(a,b,c){return(new SC.Binding(b,c)).connect(a)},SC.oneWay=function(a,b,c){return(new SC.Binding(b,c)).oneWay().connect(a)}}({}),function(a){function h(a,b,c,e,f){var g=c._objects;g||(g=c._objects={});var h,i;while(--f>=e){var j=a.objectAt(f);j&&(SC.removeBeforeObserver(j,b,c,"contentKeyWillChange"),SC.removeObserver(j,b,c,"contentKeyDidChange"),i=d(j),h=g[i],h[h.indexOf(f)]=null)}}function g(a,b,c,e,f){var g=c._objects,h;g||(g=c._objects={});while(--f>=e){var i=a.objectAt(f);i&&(SC.addBeforeObserver(i,b,c,"contentKeyWillChange"),SC.addObserver(i,b,c,"contentKeyDidChange"),h=d(i),g[h]||(g[h]=[]),g[h].push(f))}}var b=SC.set,c=SC.get,d=SC.guidFor,e=SC.Object.extend(SC.Array,{init:function(a,b,c){this._super(),this._keyName=b,this._owner=c,this._content=a},objectAt:function(a){var b=this._content.objectAt(a);return b&&c(b,this._keyName)},length:function(){var a=this._content;return a?c(a,"length"):0}.property("[]").cacheable()}),f=/^.+:(before|change)$/;SC.EachProxy=SC.Object.extend({init:function(a){this._super(),this._content=a,a.addArrayObserver(this),SC.watchedEvents(this).forEach(function(a){this.didAddListener(a)},this)},unknownProperty:function(a,b){var c;c=new e(this._content,a,this),(new SC.Descriptor).setup(this,a,c),this.beginObservingContentKey(a);return c},arrayWillChange:function(a,b,d,e){var f=this._keys,g,i,j;j=d>0?b+d:-1,SC.beginPropertyChanges(this);for(g in f){if(!f.hasOwnProperty(g))continue;j>0&&h(a,g,this,b,j),i=c(this,g),SC.propertyWillChange(this,g),i&&i.arrayContentWillChange(b,d,e)}SC.propertyWillChange(this._content,"@each"),SC.endPropertyChanges(this)},arrayDidChange:function(a,b,d,e){var f=this._keys,h,i,j;j=e>0?b+e:-1,SC.beginPropertyChanges(this);for(h in f){if(!f.hasOwnProperty(h))continue;j>0&&g(a,h,this,b,j),i=c(this,h),i&&i.arrayContentDidChange(b,d,e),SC.propertyDidChange(this,h)}SC.propertyDidChange(this._content,"@each"),SC.endPropertyChanges(this)},didAddListener:function(a){f.test(a)&&this.beginObservingContentKey(a.slice(0,-7))},didRemoveListener:function(a){f.test(a)&&this.stopObservingContentKey(a.slice(0,-7))},beginObservingContentKey:function(a){var b=this._keys;b||(b=this._keys={});if(!b[a]){b[a]=1;var d=this._content,e=c(d,"length");g(d,a,this,0,e)}else b[a]++},stopObservingContentKey:function(a){var b=this._keys;if(b&&b[a]>0&&--b[a]<=0){var d=this._content,e=c(d,"length");h(d,a,this,0,e)}},contentKeyWillChange:function(a,b){var e=this._objects[d(a)],f=c(this,b),g=f&&e?e.length:0,h;for(h=0;h<g;h++)f.arrayContentWillChange(e[h],1,1)},contentKeyDidChange:function(a,b){var e=this._objects[d(a)],f=c(this,b),g=f&&e?e.length:0,h;for(h=0;h<g;h++)f.arrayContentDidChange(e[h],1,1);SC.propertyDidChange(this,b)}})}({}),function(a){var b=SC.get,c=SC.set,d=SC.Mixin.create(SC.MutableArray,SC.Observable,SC.Copyable,{get:function(a){return a==="length"?this.length:"number"==typeof a?this[a]:this._super(a)},objectAt:function(a){return this[a]},replace:function(a,c,d){if(this.isFrozen)throw SC.FROZEN_ERROR;var e=d?b(d,"length"):0;this.arrayContentWillChange(a,c,e);if(!d||d.length===0)this.splice(a,c);else{var f=[a,c].concat(d);this.splice.apply(this,f)}this.arrayContentDidChange(a,c,e);return this},unknownProperty:function(a,b){var c;b!==undefined&&c===undefined&&(c=this[a]=b);return c},indexOf:function(a,b){var c,d=this.length;b===undefined?b=0:b=b<0?Math.ceil(b):Math.floor(b),b<0&&(b+=d);for(c=b;c<d;c++)if(this[c]===a)return c;return-1},lastIndexOf:function(a,b){var c,d=this.length;b===undefined?b=d-1:b=b<0?Math.ceil(b):Math.floor(b),b<0&&(b+=d);for(c=b;c>=0;c--)if(this[c]===a)return c;return-1},copy:function(){return this.slice()}}),e=["length"];d.keys().forEach(function(a){Array.prototype[a]&&e.push(a)}),e.length>0&&(d=d.without.apply(d,e)),SC.NativeArray=d,SC.NativeArray.activate=function(){d.apply(Array.prototype)},SC.EXTEND_PROTOTYPES&&SC.NativeArray.activate()}({}),function(a){}({}),function(a){}({}),function(a){var b=SC.get,c=SC.set;SC.RenderBuffer=function(a){return SC._RenderBuffer.create({elementTag:a})},SC._RenderBuffer=SC.Object.extend({elementClasses:null,elementId:null,elementAttributes:null,elementTag:null,elementStyle:null,parentBuffer:null,init:function(){this._super(),c(this,"elementClasses",[]),c(this,"elementAttributes",{}),c(this,"elementStyle",{}),c(this,"childBuffers",[]),c(this,"elements",{})},push:function(a){b(this,"childBuffers").pushObject(String(a));return this},addClass:function(a){b(this,"elementClasses").pushObject(a);return this},id:function(a){c(this,"elementId",a);return this},attr:function(a,c){b(this,"elementAttributes")[a]=c;return this},style:function(a,c){b(this,"elementStyle")[a]=c;return this},newBuffer:function(a,b,c,d){var e=SC._RenderBuffer.create({parentBuffer:b,elementTag:a});d&&e.setProperties(d),c&&c.call(this,e);return e},replaceWithBuffer:function(a){var c=b(this,"parentBuffer"),d=b(c,"childBuffers"),e=d.indexOf(this);a?d.splice(e,1,a):d.splice(e,1)},begin:function(a){return this.newBuffer(a,this,function(a){b(this,"childBuffers").pushObject(a)})},prepend:function(a){return this.newBuffer(a,this,function(a){b(this,"childBuffers").insertAt(0,a)})},replaceWith:function(a){var c=b(this,"parentBuffer");return this.newBuffer(a,c,function(a){this.replaceWithBuffer(a)})},insertAfter:function(a){var c=b(this,"parentBuffer");return this.newBuffer(a,c,function(a){var d=b(c,"childBuffers"),e=d.indexOf(this);d.insertAt(e+1,a)})},end:function(){var a=b(this,"parentBuffer");return a||this},remove:function(){this.replaceWithBuffer(null)},element:function(){return SC.$(this.string())[0]},string:function(){var a=b(this,"elementId"),c=b(this,"elementClasses"),d=b(this,"elementAttributes"),e=b(this,"elementStyle"),f=b(this,"elementTag"),g="",h=[],i,j=["<"+f];a&&j.push('id="'+a+'"'),c.length&&j.push('class="'+c.join(" ")+'"');if(!jQuery.isEmptyObject(e)){for(i in e)e.hasOwnProperty(i)&&h.push(i+":"+e[i]+";");j.push('style="'+h.join("")+'"')}for(i in d)d.hasOwnProperty(i)&&j.push(i+'="'+d[i]+'"');j=j.join(" ")+">";var k=b(this,"childBuffers");k.forEach(function(a){var b=typeof a=="string";g=g+(b?a:a.string())});return j+g+"</"+f+">"}})}({}),function(a){var b=SC.get,c=SC.set,d=SC.String.fmt;SC.EventDispatcher=SC.Object.extend({rootElement:document,setup:function(a){var c,d={touchstart:"touchStart",touchmove:"touchMove",touchend:"touchEnd",touchcancel:"touchCancel",keydown:"keyDown",keyup:"keyUp",keypress:"keyPress",mousedown:"mouseDown",mouseup:"mouseUp",click:"click",dblclick:"doubleClick",mousemove:"mouseMove",focusin:"focusIn",focusout:"focusOut",mouseenter:"mouseEnter",mouseleave:"mouseLeave",submit:"submit",change:"change"};jQuery.extend(d,a||{});var e=SC.$(b(this,"rootElement"));e.addClass("sc-application");for(c in d)d.hasOwnProperty(c)&&this.setupHandler(e,c,d[c])},setupHandler:function(a,b,c){var d=this;a.delegate(".sc-view",b+".sproutcore",function(a,b){var e=SC.View.views[this.id],f=!0,g=null;g=d._findNearestEventManager(e,c),g&&g!==b?f=d._dispatchEvent(g,a,c,e):e?f=d._bubbleEvent(e,a,c):a.stopPropagation();return f})},_findNearestEventManager:function(a,c){var d=null;while(a){d=b(a,"eventManager");if(d&&d[c])break;a=b(a,"parentView")}return d},_dispatchEvent:function(a,b,c,d){var e=!0;handler=a[c],SC.typeOf(handler)==="function"?(e=handler.call(a,b,d),b.stopPropagation()):e=this._bubbleEvent(d,b,c);return e},_bubbleEvent:function(a,b,c){var d=!0,e,f=this;SC.run(function(){e=a[c],SC.typeOf(e)==="function"&&(d=e.call(a,b))});return d},destroy:function(){var a=b(this,"rootElement");SC.$(a).undelegate(".sproutcore").removeClass("sc-application");return this._super()}})}({}),function(a){var b=SC.get,c=SC.set;SC.Application=SC.Namespace.extend({rootElement:document,eventDispatcher:null,customEvents:null,init:function(){var a,d=b(this,"rootElement");a=SC.EventDispatcher.create({rootElement:d}),c(this,"eventDispatcher",a);var e=this;SC.$(document).ready(function(){e.ready()})},ready:function(){var a=b(this,"eventDispatcher"),c=b(this,"customEvents");a.setup(c)},destroy:function(){b(this,"eventDispatcher").destroy();return this._super()}})}({}),function(a){var b=SC.run.queues;b.insertAt(b.indexOf("actions")+1,"render")}({}),function(a){}({}),function(a){var b=SC.get,c=SC.set,d=SC.addObserver,e=SC.getPath,f=SC.meta,g=SC.String.fmt;SC.TEMPLATES={},SC.View=SC.Object.extend({concatenatedProperties:["classNames","classNameBindings","attributeBindings"],isView:YES,templateName:null,templates:SC.TEMPLATES,template:function(a,c){if(c!==undefined)return c;var d=b(this,"templateName"),e;d&&(e=b(b(this,"templates"),d));if(!e&&d){"undefined"!==require&&require.exists&&require.exists(d)&&(e=require(d));if(!e)throw new SC.Error('%@ - Unable to find template "%@".'.fmt(this,d))}return e||b(this,"defaultTemplate")}.property("templateName").cacheable(),templateContext:function(a,b){return b!==undefined?b:this}.property().cacheable(),parentView:null,isVisible:!0,childViews:[],nearestInstanceOf:function(a){var b=this.parentView;while(b){if(b instanceof a)return b;b=b.parentView}},nearestWithProperty:function(a){var b=this.parentView;while(b){if(a in b.parentView)return b;b=b.parentView}},nearestChildOf:function(a){var b=this.parentView;while(b){if(b.parentView instanceof a)return b;b=b.parentView}},collectionView:function(){return this.nearestInstanceOf(SC.CollectionView)}.property().cacheable(),itemView:function(){return this.nearestChildOf(SC.CollectionView)}.property().cacheable(),contentView:function(){return this.nearestWithProperty("content")}.property().cacheable(),_parentViewDidChange:function(){this.invokeRecursively(function(a){a.propertyDidChange("collectionView"),a.propertyDidChange("itemView"),a.propertyDidChange("contentView")})}.observes("parentView"),render:function(a){var c=b(this,"template");if(c){var d=b(this,"templateContext"),e={view:this,buffer:a,isRenderData:!0},f=c(d,{data:e});f!==undefined&&a.push(f)}},invokeForState:function(a){var c=this,d=c.states;while(d){var e=b(this,"state"),f=d[e];if(f){var g=f[a]||d["default"][a];if(g){var h=Array.prototype.slice.call(arguments,1);h.unshift(this);return g.apply(this,h)}}d=d.parent}},rerender:function(){return this.invokeForState("rerender")},clearRenderedChildren:function(){var a=f(this)["SC.View"],c=a.lengthBeforeRender,d=a.lengthAfterRender,e=b(this,"childViews");for(var g=c;g<d;g++)e[g]&&e[g].destroy()},_applyClassNameBindings:function(){var a=b(this,"classNameBindings"),c=b(this,"classNames"),e,f,g;!a||a.forEach(function(a){var b,h=function(){f=this._classStringForProperty(a),e=this.$(),b&&e.removeClass(b),f?(e.addClass(f),b=f):b=null};d(this,a,h),g=this._classStringForProperty(a),g&&(c.push(g),b=g)},this)},_applyAttributeBindings:function(a){var c=b(this,"attributeBindings"),e,f,g;!c||c.forEach(function(c){var h=function(){f=this.$();var a=f.attr(c);e=b(this,c),g=typeof e,g!=="string"&&g!=="number"||e===a?e&&g==="boolean"?f.attr(c,c):e===NO&&f.removeAttr(c):f.attr(c,e)};d(this,c,h),e=b(this,c),g=typeof e,g==="string"||g==="number"?a.attr(c,e):e&&g==="boolean"&&a.attr(c,c)},this)},_classStringForProperty:function(a){var c=a.split(":"),d=c[1];a=c[0];var e=SC.getPath(this,a);if(e===YES){if(d)return d;return SC.String.dasherize(b(a.split("."),"lastObject"))}return e!==NO&&e!==undefined&&e!==null?e:null},element:function(a,b){return b!==undefined?this.invokeForState("setElement",b):this.invokeForState("getElement")}.property("parentView","state").cacheable(),$:function(a){return this.invokeForState("$",a)},mutateChildViews:function(a){var c=b(this,"childViews"),d=b(c,"length"),e;while(--d>=0)e=c[d],a.call(this,e,d);return this},forEachChildView:function(a){var c=b(this,"childViews"),d=b(c,"length"),e,f;for(f=0;f<d;f++)e=c[f],a.call(this,e);return this},appendTo:function(a){this._insertElementLater(function(){this.$().appendTo(a)});return this},_insertElementLater:function(a){SC.run.schedule("render",this,"invokeForState","insertElement",a)},append:function(){return this.appendTo(document.body)},remove:function(){this.destroyElement()},elementId:function(a,b){return b!==undefined?b:SC.guidFor(this)}.property().cacheable(),findElementInParentElement:function(a){var c="#"+b(this,"elementId");return jQuery(c)[0]||jQuery(c,a)[0]},renderBuffer:function(a){return SC.RenderBuffer(a||b(this,"tagName")||"div")},createElement:function(){if(b(this,"element"))return this;var a=this.renderToBuffer();c(this,"element",a.element());return this},willInsertElement:SC.K,didInsertElement:SC.K,invokeRecursively:function(a){a.call(this,this),this.forEachChildView(function(b){b.invokeRecursively(a)})},invalidateRecursively:function(a){this.forEachChildView(function(b){b.propertyDidChange(a)})},_notifyWillInsertElement:function(){this.invokeRecursively(function(a){a.willInsertElement()})},_notifyDidInsertElement:function(){this.invokeRecursively(function(a){a.didInsertElement()})},destroyElement:function(){return this.invokeForState("destroyElement")},willDestroyElement:function(){},_notifyWillDestroyElement:function(){this.invokeRecursively(function(a){a.willDestroyElement()})},_elementWillChange:function(){this.forEachChildView(function(a){SC.propertyWillChange(a,"element")})}.observesBefore("element"),_elementDidChange:function(){this.forEachChildView(function(a){SC.propertyDidChange(a,"element")})}.observes("element"),parentViewDidChange:SC.K,renderToBuffer:function(a,c){var d=f(this)["SC.View"],g;SC.run.sync(),c=c||"begin",a?g=a[c](b(this,"tagName")||"div"):g=this.renderBuffer(),d.buffer=g,this.transitionTo("inBuffer"),d.lengthBeforeRender=e(this,"childViews.length"),this.applyAttributesToBuffer(g),this.render(g),d.lengthAfterRender=e(this,"childViews.length");return g},applyAttributesToBuffer:function(a){this._applyClassNameBindings(),this._applyAttributeBindings(a),a.addClass(b(this,"classNames").join(" ")),a.id(b(this,"elementId"));var c=b(this,"ariaRole");c&&a.attr("role",c),b(this,"isVisible")||a.style("display","none")},tagName:null,ariaRole:null,classNames:["sc-view"],classNameBindings:[],attributeBindings:[],init:function(){c(this,"state","preRender");var a=b(this,"parentView");this._super(),SC.View.views[b(this,"elementId")]=this;var d=b(this,"childViews").slice();c(this,"childViews",d),this.mutateChildViews(function(a,b){var c;"string"==typeof a?(c=this[a],c=this.createChildView(c),d[b]=this[a]=c):a.isClass&&(c=this.createChildView(a),d[b]=c)}),this.classNameBindings=b(this,"classNameBindings").slice(),this.classNames=b(this,"classNames").slice(),f(this)["SC.View"]={}},appendChild:function(a,b){return this.invokeForState("appendChild",a,b)},removeChild:function(a){c(a,"parentView",null);var d=b(this,"childViews");d.removeObject(a);return this},removeAllChildren:function(){return this.mutateChildViews(function(a){this.removeChild(a)})},destroyAllChildren:function(){return this.mutateChildViews(function(a){a.destroy()})},removeFromParent:function(){var a=b(this,"parentView");this.remove(),a&&a.removeChild(this);return this},destroy:function(){if(!b(this,"isDestroyed")){var a=f(this)["SC.View"],c=b(this,"childViews"),d=b(this,"parentView"),e=b(this,"elementId"),g=c.length;this.destroyElement(),d&&d.removeChild(this),SC.Descriptor.setup(this,"state","destroyed"),this._super();for(var h=g-1;h>=0;h--)c[h].destroy();delete SC.View.views[b(this,"elementId")];return this}},createChildView:function(a,b){SC.View.detect(a)?a=a.create(b||{},{parentView:this}):c(a,"parentView",this);return a},_isVisibleDidChange:function(){this.$().toggle(b(this,"isVisible"))}.observes("isVisible"),clearBuffer:function(){this.invokeRecursively(function(a){f(a)["SC.View"].buffer=null})
11
+ },transitionTo:function(a,b){c(this,"state",a),b!==!1&&this.forEachChildView(function(b){b.transitionTo(a)})}}),SC.View.reopen({states:SC.View.states}),SC.View.views={}}({}),function(a){var b=SC.get,c=SC.set;SC.View.states={"default":{appendChild:function(){throw"You can't use appendChild outside of the rendering process"},$:function(){return SC.$()},getElement:function(){return null},setElement:function(a){if(a)view.clearBuffer(),view.transitionTo("inDOM");else throw"You can't set an element to null when the view has not yet been inserted into the DOM";return a}}},SC.View.reopen({states:SC.View.states})}({}),function(a){SC.View.states.preRender={insertElement:function(a,b){a.createElement(),a._notifyWillInsertElement(),b.call(a),a._notifyDidInsertElement()},setElement:function(a,b){a.beginPropertyChanges(),a.invalidateRecursively("element"),b!==null&&a.transitionTo("inDOM"),a.endPropertyChanges();return b}}}({}),function(a){var b=SC.get,c=SC.set,d=SC.meta;SC.View.states.inBuffer={$:function(a,b){a.rerender();return SC.$()},rerender:function(a){var b=d(a)["SC.View"].buffer;a.clearRenderedChildren(),a.renderToBuffer(b,"replaceWith")},appendChild:function(a,b,c){var e=d(a)["SC.View"].buffer;b=this.createChildView(b,c),a.childViews.pushObject(b),b.renderToBuffer(e);return b},destroyElement:function(a){a.clearBuffer(),a._notifyWillDestroyElement(),a.transitionTo("preRender");return a},insertElement:function(){throw"You can't insert an element that has already been rendered"},setElement:function(a,b){a.invalidateRecursively("element"),b===null?a.transitionTo("preRender"):(a.clearBuffer(),a.transitionTo("inDOM"));return b}}}({}),function(a){var b=SC.get,c=SC.set,d=SC.meta;SC.View.states.inDOM={$:function(a,c){var d=b(a,"element");return c?SC.$(c,d):SC.$(d)},getElement:function(a){var c=b(a,"parentView");c&&(c=b(c,"element"));if(c)return ret=a.findElementInParentElement(c)},setElement:function(a,b){if(b===null)a.invalidateRecursively("element"),a.transitionTo("preRender");else throw"You cannot set an element to a non-null value when the element is already in the DOM.";return b},rerender:function(a){var d=b(a,"element");a.clearRenderedChildren(),c(a,"element",null),a._insertElementLater(function(){SC.$(d).replaceWith(b(a,"element"))})},destroyElement:function(a){var d=b(this,"element");a.invokeRecursively(function(a){this.willDestroyElement()}),c(a,"element",null),SC.$(d).remove();return a},insertElement:function(){throw"You can't insert an element into the DOM that has already been inserted"}}}({}),function(a){var b="You can't call %@ on a destroyed view",c=SC.String.fmt;SC.View.states.destroyed={appendChild:function(){throw c(b,["appendChild"])},rerender:function(){throw c(b,["rerender"])},destroyElement:function(){throw c(b,["destroyElement"])},setElement:function(){throw c(b,["set('element', ...)"])},insertElement:SC.K}}({}),function(a){}({}),function(a){var b=SC.get,c=SC.set,d=SC.meta;SC.ContainerView=SC.View.extend({renderToBuffer:function(){var a=this._super.apply(this,arguments);b(this,"childViews").addArrayObserver(this,{willChange:"childViewsWillChange",didChange:"childViewsDidChange"});return a},render:function(a){this.forEachChildView(function(b){b.renderToBuffer(a)})},destroy:function(){b(this,"childViews").removeArrayObserver(this,{willChange:"childViewsWillChange",didChange:"childViewsDidChange"}),this._super()},childViewsWillChange:function(a,b,c){this.invokeForState("childViewsWillChange",a,b,c)},childViewsDidChange:function(a,c,d,e){var f=b(a,"length");e!==0&&this.invokeForState("childViewsDidChange",a,c,e)},_scheduleInsertion:function(a,b){var c=this;a._insertElementLater(function(){b?b.$().after(a.$()):c.$().prepend(a.$())})}}),SC.ContainerView.states={parent:SC.View.states,"default":{},inBuffer:{childViewsDidChange:function(a,b,c,e){var f=d(a)["SC.View"].buffer,g,h,i,j;c===0?(j=b[c],g=c+1,j.renderToBuffer(f,"prepend")):(j=b[c-1],g=c);for(var k=g;k<c+e;k++)h=j,j=b[k],i=d(h)["SC.View"].buffer,j.renderToBuffer(i,"insertAfter")}},inDOM:{childViewsWillChange:function(a,b,c,d){for(var e=c;e<c+d;e++)b[e].destroyElement()},childViewsDidChange:function(a,b,c,d){prev=c===0?null:b[c-1];for(var e=c;e<c+d;e++)a=b[e],this._scheduleInsertion(a,prev),prev=a}}},SC.ContainerView.reopen({states:SC.ContainerView.states})}({}),function(a){var b=SC.get,c=SC.set,d=SC.String.fmt;SC.CollectionView=SC.ContainerView.extend({content:null,emptyView:null,itemViewClass:SC.View,init:function(){var a=this._super();this._contentDidChange();return a},_contentWillChange:function(){var a=this.get("content");a&&a.removeArrayObserver(this);var c=a?b(a,"length"):0;this.arrayWillChange(a,0,c)}.observesBefore("content"),_contentDidChange:function(){var a=b(this,"content");a&&a.addArrayObserver(this);var c=a?b(a,"length"):0;this.arrayDidChange(a,0,null,c)}.observes("content"),destroy:function(){var a=b(this,"content");a&&a.removeArrayObserver(this),this._super();return this},arrayWillChange:function(a,c,d){var e=b(this,"emptyView");e&&e instanceof SC.View&&e.removeFromParent();var f=b(this,"childViews"),g,h,i;i=b(f,"length");for(h=c+d-1;h>=c;h--)f[h].destroy()},arrayDidChange:function(a,d,e,f){var g=b(this,"itemViewClass"),h=b(this,"childViews"),i=[],j,k,l,m,n;m=a?b(a,"length"):0;if(m)for(l=d;l<d+f;l++)k=a.objectAt(l),j=this.createChildView(g,{content:k,contentIndex:l}),i.push(j);else{var o=b(this,"emptyView");if(!o)return;o=this.createChildView(o),i.push(o),c(this,"emptyView",o)}h.replace(d,0,i)},createChildView:function(a,d){var a=this._super(a,d),e=b(a,"tagName"),f=e||SC.CollectionView.CONTAINER_MAP[b(this,"tagName")];c(a,"tagName",f||null);return a}}),SC.CollectionView.CONTAINER_MAP={ul:"li",ol:"li",table:"tr",thead:"tr",tbody:"tr",tfoot:"tr",tr:"td",select:"option"}}({}),function(a){}({}),function(a){SC.$=jQuery}({}),function(a){SC.Handlebars={},SC.Handlebars.Compiler=function(){},SC.Handlebars.Compiler.prototype=SC.create(Handlebars.Compiler.prototype),SC.Handlebars.Compiler.prototype.compiler=SC.Handlebars.Compiler,SC.Handlebars.JavaScriptCompiler=function(){},SC.Handlebars.JavaScriptCompiler.prototype=SC.create(Handlebars.JavaScriptCompiler.prototype),SC.Handlebars.JavaScriptCompiler.prototype.compiler=SC.Handlebars.JavaScriptCompiler,SC.Handlebars.JavaScriptCompiler.prototype.nameLookup=function(a,b,c){return c==="context"?"SC.get("+a+", "+this.quotedString(b)+");":Handlebars.JavaScriptCompiler.prototype.nameLookup.call(this,a,b,c)},SC.Handlebars.JavaScriptCompiler.prototype.initializeBuffer=function(){return"''"},SC.Handlebars.JavaScriptCompiler.prototype.appendToBuffer=function(a){return"data.buffer.push("+a+");"},SC.Handlebars.Compiler.prototype.mustache=function(a){if(a.params.length||a.hash)return Handlebars.Compiler.prototype.mustache.call(this,a);var b=new Handlebars.AST.IdNode(["bind"]);a.escaped&&(a.hash=a.hash||new Handlebars.AST.HashNode([]),a.hash.pairs.push(["escaped",new Handlebars.AST.StringNode("true")])),a=new Handlebars.AST.MustacheNode([b].concat([a.id]),a.hash,!a.escaped);return Handlebars.Compiler.prototype.mustache.call(this,a)},SC.Handlebars.compile=function(a){var b=Handlebars.parse(a),c={data:!0,stringParams:!0},d=(new SC.Handlebars.Compiler).compile(b,c),e=(new SC.Handlebars.JavaScriptCompiler).compile(d,c,undefined,!0);return Handlebars.template(e)},Handlebars.registerHelper("helperMissing",function(a,b){var c,d="";c="%@ Handlebars error: Could not find property '%@' on object %@.",b.data&&(d=b.data.view);throw new SC.Error(SC.String.fmt(c,[d,a,this]))})}({}),function(a){var b=SC.set,c=SC.get;SC.Checkbox=SC.View.extend({title:null,value:!1,classNames:["sc-checkbox"],defaultTemplate:SC.Handlebars.compile('<label><input type="checkbox" {{bindAttr checked="value"}}>{{title}}</label>'),change:function(){SC.run.once(this,this._updateElementValue)},_updateElementValue:function(){var a=this.$("input:checkbox");b(this,"value",a.prop("checked"))}})}({}),function(a){var b=SC.get,c=SC.set;SC.TextField=SC.View.extend({classNames:["sc-text-field"],insertNewline:SC.K,cancel:SC.K,tagName:"input",attributeBindings:["type","placeholder","value"],type:"text",value:"",placeholder:null,focusOut:function(a){this._elementValueDidChange();return!1},change:function(a){this._elementValueDidChange();return!1},keyUp:function(a){this.interpretKeyEvents(a);return!1},interpretKeyEvents:function(a){var b=SC.TextField.KEY_EVENTS,c=b[a.keyCode];if(c)return this[c](a);this._elementValueDidChange()},_elementValueDidChange:function(){c(this,"value",this.$().val())},_updateElementValue:function(){this.$().val(b(this,"value"))}}),SC.TextField.KEY_EVENTS={13:"insertNewline",27:"cancel"}}({}),function(a){var b=SC.get,c=SC.set;SC.Button=SC.View.extend({classNames:["sc-button"],classNameBindings:["isActive"],tagName:"button",attributeBindings:["type"],type:"button",targetObject:function(){var a=b(this,"target");return SC.typeOf(a)==="string"?SC.getPath(this,a):a}.property("target").cacheable(),mouseDown:function(){c(this,"isActive",!0),this._mouseDown=!0,this._mouseEntered=!0},mouseLeave:function(){this._mouseDown&&(c(this,"isActive",!1),this._mouseEntered=!1)},mouseEnter:function(){this._mouseDown&&(c(this,"isActive",!0),this._mouseEntered=!0)},mouseUp:function(a){if(b(this,"isActive")){var d=b(this,"action"),e=b(this,"targetObject");e&&d&&(typeof d=="string"&&(d=e[d]),d.call(e,this)),c(this,"isActive",!1)}this._mouseDown=!1,this._mouseEntered=!1},touchStart:function(a){this.mouseDown(a)},touchEnd:function(a){this.mouseUp(a)}})}({}),function(a){var b=SC.get,c=SC.set;SC.TextArea=SC.View.extend({classNames:["sc-text-area"],tagName:"textarea",value:"",attributeBindings:["placeholder"],placeholder:null,insertNewline:SC.K,cancel:SC.K,focusOut:function(a){this._elementValueDidChange();return!1},change:function(a){this._elementValueDidChange();return!1},keyUp:function(a){this.interpretKeyEvents(a);return!1},willInsertElement:function(){this._updateElementValue()},interpretKeyEvents:function(a){var b=SC.TextArea.KEY_EVENTS,c=b[a.keyCode];this._elementValueDidChange();if(c)return this[c](a)},_elementValueDidChange:function(){c(this,"value",this.$().val()||null)},_updateElementValue:function(){this.$().val(b(this,"value"))}.observes("value")}),SC.TextArea.KEY_EVENTS={13:"insertNewline",27:"cancel"}}({}),function(a){}({}),function(a){var b=SC.get,c=SC.set,d=SC.getPath;SC._BindableSpanView=SC.View.extend({tagName:"span",shouldDisplayFunc:null,preserveContext:!1,displayTemplate:null,inverseTemplate:null,property:null,render:function(a){var e=b(this,"isEscaped"),f=b(this,"shouldDisplayFunc"),g=b(this,"property"),h=b(this,"preserveContext"),i=b(this,"previousContext"),j=b(this,"inverseTemplate"),k=b(this,"displayTemplate"),l=d(i,g);if(f(l)){c(this,"template",k);if(h)c(this,"templateContext",i);else if(k)c(this,"templateContext",l);else{l==null?l="":l=String(l),e&&(l=Handlebars.Utils.escapeExpression(l)),a.push(l);return}}else j?(c(this,"template",j),h?c(this,"templateContext",i):c(this,"templateContext",l)):c(this,"template",function(){return""});return this._super(a)}})}({}),function(a){var b=SC.get,c=SC.getPath,d=SC.String.fmt;(function(){var a=function(a,d,e,f){var g=d.data,h=d.fn,i=d.inverse,j=g.view,k=this;if("object"==typeof this){var l=j.createChildView(SC._BindableSpanView,{preserveContext:e,shouldDisplayFunc:f,displayTemplate:h,inverseTemplate:i,property:a,previousContext:k,isEscaped:d.hash.escaped,tagName:d.hash.tagName||"span"}),m,n;j.appendChild(l),m=function(){b(l,"element")?l.rerender():SC.removeObserver(k,a,n)},n=function(){SC.run.once(m)},SC.addObserver(k,a,n)}else g.buffer.push(c(this,a))};Handlebars.registerHelper("bind",function(b,c){return a.call(this,b,c,!1,function(a){return!SC.none(a)})}),Handlebars.registerHelper("boundIf",function(c,d){return a.call(this,c,d,!0,function(a){return SC.typeOf(a)==="array"?b(a,"length")!==0:!!a})})})(),Handlebars.registerHelper("with",function(a,b){return Handlebars.helpers.bind.call(b.contexts[0],a,b)}),Handlebars.registerHelper("if",function(a,b){return Handlebars.helpers.boundIf.call(b.contexts[0],a,b)}),Handlebars.registerHelper("unless",function(a,b){var c=b.fn,d=b.inverse;b.fn=d,b.inverse=c;return Handlebars.helpers.boundIf.call(b.contexts[0],a,b)}),Handlebars.registerHelper("bindAttr",function(a){var b=a.hash,d=a.data.view,e=[],f=this,g=jQuery.uuid++,h=b["class"];if(h!==null&&h!==undefined){var i=SC.Handlebars.bindClasses(this,h,d,g);e.push('class="'+i.join(" ")+'"'),delete b["class"]}var j=SC.keys(b);j.forEach(function(a){var h=b[a],i=c(f,h),j,k;j=function(){var e=c(f,h),i=d.$("[data-handlebars-id='"+g+"']");if(i.length===0)SC.removeObserver(f,h,k);else{var j=i.attr(a);e===!1&&j?i.removeAttr(a):e===!0&&j!==a?i.attr(a,a):j!==e&&i.attr(a,e)}},k=function(){SC.run.once(j)},SC.addObserver(f,h,k),i===!0&&(i=a),i!==!1&&e.push(a+'="'+i+'"')},this),e.push('data-handlebars-id="'+g+'"');return new Handlebars.SafeString(e.join(" "))}),SC.Handlebars.bindClasses=function(a,d,e,f){var g=[],h,i,j,k=function(d){var e=c(a,d);return e===YES?SC.String.dasherize(b(d.split("."),"lastObject")):e!==NO&&e!==undefined&&e!==null?e:null};d.split(" ").forEach(function(b){var c,d,l;d=function(){h=k(b),j=f?e.$("[data-handlebars-id='"+f+"']"):e.$(),j.length===0?SC.removeObserver(a,b,l):(c&&j.removeClass(c),h?(j.addClass(h),c=h):c=null)},l=function(){SC.run.once(d)},SC.addObserver(a,b,l),i=k(b),i&&(g.push(i),c=i)});return g}}({}),function(a){var b=SC.get,c=SC.set,d=/^parentView\./;SC.Handlebars.ViewHelper=SC.Object.create({viewClassFromHTMLOptions:function(a,b,c){var e={},f=b["class"],g=!1;b.id&&(e.elementId=b.id,g=!0),f&&(f=f.split(" "),e.classNames=f,g=!0),b.classBinding&&(e.classNameBindings=b.classBinding.split(" "),g=!0),g&&(b=jQuery.extend({},b),delete b.id,delete b["class"],delete b.classBinding);var h;for(var i in b){if(!b.hasOwnProperty(i))continue;SC.IS_BINDING.test(i)&&(h=b[i],SC.isGlobalPath(h)||(d.test(h)?SC.Logger.warn("As of SproutCore 2.0 beta 3, it is no longer necessary to bind to parentViews. Instead, please provide binding paths relative to the current Handlebars context."):b[i]="bindingContext."+h))}e.bindingContext=c;return a.extend(b,e)},helper:function(a,b,c){var d=c.inverse,e=c.data,f=e.view,g=c.fn,h=c.hash,i;"string"==typeof b?i=SC.getPath(a,b):i=b,i=this.viewClassFromHTMLOptions(i,h,a);var j=e.view,k={};g&&(k.template=g),j.appendChild(i,k)}}),Handlebars.registerHelper("view",function(a,b){a&&a.data&&a.data.isRenderData&&(b=a,a="SC.View");return SC.Handlebars.ViewHelper.helper(this,a,b)})}({}),function(a){var b=SC.get;Handlebars.registerHelper("collection",function(a,c){a&&a.data&&a.data.isRenderData&&(c=a,a=undefined);var d=c.fn,e=c.data,f=c.inverse,g;g=a?SC.getPath(this,a):SC.CollectionView;var h=c.hash,i={},j,k,l=h.itemViewClass,m=b(g,"proto");delete h.itemViewClass,k=l?SC.getPath(m,l):m.itemViewClass;for(var n in h)h.hasOwnProperty(n)&&(j=n.match(/^item(.)(.*)$/),j&&(i[j[1].toLowerCase()+j[2]]=h[n],delete h[n]));var o=h.tagName||b(g,"proto").tagName;d&&(i.template=d,delete c.fn),f&&f!==Handlebars.VM.noop&&(h.emptyView=SC.View.extend({template:f,tagName:i.tagName})),h.preserveContext&&(i.templateContext=function(){return b(this,"content")}.property("content"),delete h.preserveContext),h.itemViewClass=SC.Handlebars.ViewHelper.viewClassFromHTMLOptions(k,i);return Handlebars.helpers.view.call(this,g,c)}),Handlebars.registerHelper("each",function(a,b){b.hash.contentBinding=SC.Binding.from("parentView."+a).oneWay(),b.hash.preserveContext=!0;return Handlebars.helpers.collection.call(this,null,b)})}({}),function(a){var b=SC.getPath;Handlebars.registerHelper("unbound",function(a){return b(this,a)})}({}),function(a){var b=SC.getPath;Handlebars.registerHelper("log",function(a){console.log(b(this,a))}),Handlebars.registerHelper("debugger",function(){debugger})}({}),function(a){}({}),function(a){SC.$(document).ready(function(){SC.$('script[type="text/html"], script[type="text/x-handlebars"]').each(function(){var a=SC.$(this),b=a.attr("data-template-name")||a.attr("id"),c=SC.Handlebars.compile(a.html()),d,e;if(b)SC.TEMPLATES[b]=c,a.remove();else{if(a.parents("head").length!==0)throw new SC.Error("Template found in <head> without a name specified. Please provide a data-template-name attribute.\n"+a.html());e=a.attr("data-view"),d=e?SC.getPath(e):SC.View,d=d.create({template:c}),d._insertElementLater(function(){a.replaceWith(this.$()),a=null})}})})}({}),function(a){}({}),function(a){}({})
@@ -0,0 +1,3 @@
1
+ module Jet
2
+ VERSION = "0.0.1"
3
+ end
metadata ADDED
@@ -0,0 +1,172 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jet-framework
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Erwan Barrier
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-12-02 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: thor
16
+ requirement: &70105098940220 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70105098940220
25
+ - !ruby/object:Gem::Dependency
26
+ name: foreman
27
+ requirement: &70105098930620 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70105098930620
36
+ - !ruby/object:Gem::Dependency
37
+ name: sprockets
38
+ requirement: &70105098928660 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70105098928660
47
+ - !ruby/object:Gem::Dependency
48
+ name: coffee-script
49
+ requirement: &70105098927740 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: *70105098927740
58
+ - !ruby/object:Gem::Dependency
59
+ name: compass
60
+ requirement: &70105098925500 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: 0.12.alpha.2
66
+ type: :runtime
67
+ prerelease: false
68
+ version_requirements: *70105098925500
69
+ - !ruby/object:Gem::Dependency
70
+ name: sprockets-sass
71
+ requirement: &70105098895220 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: *70105098895220
80
+ - !ruby/object:Gem::Dependency
81
+ name: guard
82
+ requirement: &70105098894440 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ type: :runtime
89
+ prerelease: false
90
+ version_requirements: *70105098894440
91
+ - !ruby/object:Gem::Dependency
92
+ name: bundler
93
+ requirement: &70105098893920 !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ type: :development
100
+ prerelease: false
101
+ version_requirements: *70105098893920
102
+ description: Jet is a micro framework that sits on top of sproutcore 2
103
+ email:
104
+ - erwan.barrier@gmail.com
105
+ executables:
106
+ - jet
107
+ extensions: []
108
+ extra_rdoc_files: []
109
+ files:
110
+ - lib/jet/application.rb
111
+ - lib/jet/cli.rb
112
+ - lib/jet/file.rb
113
+ - lib/jet/handlebars_template.rb
114
+ - lib/jet/jst_processor.rb
115
+ - lib/jet/templates/application/app/states/application_statechart.js.coffee
116
+ - lib/jet/templates/application/app/stylesheets/application.css.scss
117
+ - lib/jet/templates/application/config/application.js.coffee.tt
118
+ - lib/jet/templates/application/config/boot.js.coffee
119
+ - lib/jet/templates/application/Guardfile
120
+ - lib/jet/templates/application/Procfile
121
+ - lib/jet/templates/application/public/404.html
122
+ - lib/jet/templates/application/public/apple-touch-icon.png
123
+ - lib/jet/templates/application/public/favicon.ico
124
+ - lib/jet/templates/application/public/index.html
125
+ - lib/jet/templates/application/public/robots.txt
126
+ - lib/jet/templates/application/vendor/jquery/jquery-1.6.1.js
127
+ - lib/jet/templates/application/vendor/jquery/jquery-1.6.1.min.js
128
+ - lib/jet/templates/application/vendor/sproutcore/sproutcore-2.0.beta.3.js
129
+ - lib/jet/templates/application/vendor/sproutcore/sproutcore-2.0.beta.3.min.js
130
+ - lib/jet/version.rb
131
+ - lib/jet.rb
132
+ - lib/jet/templates/application/app/.DS_Store
133
+ - lib/jet/templates/application/app/controllers/.empty_directory
134
+ - lib/jet/templates/application/app/images/.empty_directory
135
+ - lib/jet/templates/application/app/models/.empty_directory
136
+ - lib/jet/templates/application/app/stylesheets/.DS_Store
137
+ - lib/jet/templates/application/app/templates/.empty_directory
138
+ - lib/jet/templates/application/app/views/.empty_directory
139
+ - lib/jet/templates/application/build/development/.empty_directory
140
+ - lib/jet/templates/application/build/production/.empty_directory
141
+ - lib/jet/templates/application/build/test/.empty_directory
142
+ - lib/jet/templates/application/doc/.empty_directory
143
+ - lib/jet/templates/application/lib/.empty_directory
144
+ - lib/jet/templates/application/test/.empty_directory
145
+ - bin/jet
146
+ - LICENSE
147
+ - README.md
148
+ homepage: http://github.com/erwanb/jet
149
+ licenses: []
150
+ post_install_message:
151
+ rdoc_options: []
152
+ require_paths:
153
+ - lib
154
+ required_ruby_version: !ruby/object:Gem::Requirement
155
+ none: false
156
+ requirements:
157
+ - - ! '>='
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ required_rubygems_version: !ruby/object:Gem::Requirement
161
+ none: false
162
+ requirements:
163
+ - - ! '>='
164
+ - !ruby/object:Gem::Version
165
+ version: 1.3.6
166
+ requirements: []
167
+ rubyforge_project: jet-framework
168
+ rubygems_version: 1.8.10
169
+ signing_key:
170
+ specification_version: 3
171
+ summary: The Jet framework gem
172
+ test_files: []