YUI.add("handlebars-compiler",function(e,t){ /*! Handlebars.js - Copyright (C) 2011 Yehuda Katz https://raw.github.com/wycats/handlebars.js/master/LICENSE */ ;var n=e.Handlebars;n.Helpers={},function(e,t){"use strict";function n(e,t){return{left:e.charAt(2)==="~",right:t.charAt(t.length-3)==="~"}}function r(e,n,r,i,f,l){if(e.sexpr.id.original!==i.path.original)throw new t(e.sexpr.id.original+" doesn't match "+i.path.original,e);var c=r&&r.program,h={left:e.strip.left,right:i.strip.right,openStandalone:o(n.statements),closeStandalone:s((c||n).statements)};e.strip.right&&u(n.statements,null,!0);if(c){var p=r.strip;p.left&&a(n.statements,null,!0),p.right&&u(c.statements,null,!0),i.strip.left&&a(c.statements,null,!0),s(n.statements)&&o(c.statements)&&(a(n.statements),u(c.statements))}else i.strip.left&&a(n.statements,null,!0);return f?new this.BlockNode(e,c,n,h,l):new this.BlockNode(e,n,c,h,l)}function i(e,t){for(var n=0,r=e.length;n2&&k.push("'"+this.terminals_[T]+"'");this.lexer.showPosition?L="Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[g]||g)+"'":L="Parse error on line "+(a+1)+": Unexpected "+(g==1?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(L,{text:this.lexer.match,token:this.terminals_[g]||g,line:this.lexer.yylineno,loc:p,expected:k})}}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+g);switch(w[0]){case 1:r.push(g),i.push(this.lexer.yytext),s.push(this.lexer.yylloc),r.push(w[1]),g=null,y?(g=y,y=null):(f=this.lexer.yyleng,u=this.lexer.yytext,a=this.lexer.yylineno,p=this.lexer.yylloc,l>0&&l--);break;case 2:N=this.productions_[w[1]][1],x.$=i[i.length-N],x._$={first_line:s[s.length-(N||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(N||1)].first_column,last_column:s[s.length-1].last_column},d&&(x._$.range=[s[s.length-(N||1)].range[0],s[s.length-1].range[1]]),S=this.performAction.call(x,u,f,a,this.yy,w[1],i,s);if(typeof S!="undefined")return S;N&&(r=r.slice(0,-1*N*2),i=i.slice(0,-1*N),s=s.slice(0,-1*N)),r.push(this.productions_[w[1]][0]),i.push(x.$),s.push(x._$),C=o[r[r.length-2]][r[r.length-1]],r.push(C);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var t=e.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this},more:function(){return this._more=!0,this},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=(new Array(e.length+1)).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r,i,s;this._more||(this.yytext="",this.match="");var o=this._currentRules();for(var u=0;ut[0].length)){t=n,r=u;if(!this.options.flex)break}}if(t){s=t[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,o[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1);if(e)return e;return}return this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return typeof t!="undefined"?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return e.options={},e.performAction=function(t,n,r,i){function s(e,t){return n.yytext=n.yytext.substr(e,n.yyleng-t)}var o=i;switch(r){case 0:n.yytext.slice(-2)==="\\\\"?(s(0,1),this.begin("mu")):n.yytext.slice(-1)==="\\"?(s(0,1),this.begin("emu")):this.begin("mu");if(n.yytext)return 12;break;case 1:return 12;case 2:return this.popState(),12;case 3:return n.yytext=n.yytext.substr(5,n.yyleng-9),this.popState(),15;case 4:return 12;case 5:return s(0,4),this.popState(),13;case 6:return 45;case 7:return 46;case 8:return 16;case 9:return this.popState(),this.begin("raw"),18;case 10:return 34;case 11:return 24;case 12:return 29;case 13:return this .popState(),28;case 14:return this.popState(),28;case 15:return 26;case 16:return 26;case 17:return 32;case 18:return 31;case 19:this.popState(),this.begin("com");break;case 20:return s(3,5),this.popState(),13;case 21:return 31;case 22:return 51;case 23:return 50;case 24:return 50;case 25:return 54;case 26:break;case 27:return this.popState(),33;case 28:return this.popState(),25;case 29:return n.yytext=s(1,2).replace(/\\"/g,'"'),42;case 30:return n.yytext=s(1,2).replace(/\\'/g,"'"),42;case 31:return 52;case 32:return 44;case 33:return 44;case 34:return 43;case 35:return 50;case 36:return n.yytext=s(1,2),50;case 37:return"INVALID";case 38:return 5}},e.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{\/)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],e.conditions={mu:{rules:[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[5],inclusive:!1},raw:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,1,38],inclusive:!0}},e}();return e.lexer=t,n.prototype=e,e.Parser=n,new n}();e["default"]=t}(n.Parser),n.Parser=n.Parser["default"],n.AST={},function(e,t){"use strict";function n(e){e=e||{},this.firstLine=e.first_line,this.firstColumn=e.first_column,this.lastColumn=e.last_column,this.lastLine=e.last_line}var r={ProgramNode:function(e,t,r){n.call(this,r),this.type="program",this.statements=e,this.strip=t},MustacheNode:function(e,t,i,s,o){n.call(this,o),this.type="mustache",this.strip=s;if(i!=null&&i.charAt){var u=i.charAt(3)||i.charAt(2);this.escaped=u!=="{"&&u!=="&"}else this.escaped=!!i;e instanceof r.SexprNode?this.sexpr=e:this.sexpr=new r.SexprNode(e,t),this.id=this.sexpr.id,this.params=this.sexpr.params,this.hash=this.sexpr.hash,this.eligibleHelper=this.sexpr.eligibleHelper,this.isHelper=this.sexpr.isHelper},SexprNode:function(e,t,r){n.call(this,r),this.type="sexpr",this.hash=t;var i=this.id=e[0],s=this.params=e.slice(1);this.isHelper=!!s.length||!!t,this.eligibleHelper=this.isHelper||i.isSimple},PartialNode:function(e,t,r,i,s){n.call(this,s),this.type="partial",this.partialName=e,this.context=t,this.hash=r,this.strip=i,this.strip.inlineStandalone=!0},BlockNode:function(e,t,r,i,s){n.call(this,s),this.type="block",this.mustache=e,this.program=t,this.inverse=r,this.strip=i,r&&!t&&(this.isInverse=!0)},RawBlockNode:function(e,i,s,o){n.call(this,o);if(e.sexpr.id.original!==s)throw new t(e.sexpr.id.original+" doesn't match "+s,this);i=new r.ContentNode(i,o),this.type="block",this.mustache=e,this.program=new r.ProgramNode([i],{},o)},ContentNode:function(e,t){n.call(this,t),this.type="content",this.original=this.string=e},HashNode:function(e,t){n.call(this,t),this.type="hash",this.pairs=e},IdNode:function(e,r){n.call(this,r),this.type="ID";var i="",s=[],o=0,u="";for(var a=0,f=e.length;a0)throw new t("Invalid path: "+i,this);l===".."?(o++,u+="../"):this.isScoped=!0}else s.push(l)}this.original=i,this.parts=s,this.string=s.join("."),this.depth=o,this.idName=u+this.string,this.isSimple=e.length===1&&!this.isScoped&&o===0,this.stringModeValue=this.string},PartialNameNode:function(e,t){n.call(this,t),this.type="PARTIAL_NAME",this.name=e.original},DataNode:function(e,t){n.call(this,t),this.type="DATA",this.id=e,this.stringModeValue=e.stringModeValue,this.idName="@"+e.stringModeValue},StringNode:function(e,t){n.call(this,t),this.type="STRING",this.original=this.string=this.stringModeValue=e},NumberNode:function(e,t){n.call(this,t),this.type="NUMBER",this.original=this.number=e,this.stringModeValue=Number(e)},BooleanNode:function(e,t){n.call(this,t),this.type="BOOLEAN",this.bool=e,this.stringModeValue=e==="true"},CommentNode:function(e,t){n.call(this,t),this.type="comment",this.comment=e,this.strip={inlineStandalone:!0}}};e["default"]=r}(n.AST,n.Exception),n.AST=n.AST["default"],function(e,t,n){"use strict";function i(){}function s(e,t,r){if(e==null||typeof e!="string"&&e.constructor!==r.AST.ProgramNode)throw new n("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e);t=t||{},"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var i=r.parse(e),s=(new r.Compiler).compile(i,t);return(new r.JavaScriptCompiler).compile(s,t)}function o(e,t,r){function s(){var n=r.parse(e),i=(new r.Compiler).compile(n,t),s=(new r.JavaScriptCompiler).compile(i,t,undefined,!0);return r.template(s)}if(e==null||typeof e!="string"&&e.constructor!==r.AST.ProgramNode)throw new n("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);t=t||{},"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var i,o=function(e,t){return i||(i=s()),i.call(this,e,t)};return o._setup=function(e){return i||(i=s()),i._setup(e)},o._child=function(e,t,n){return i||(i=s()),i._child(e,t,n)},o}function u(e,n){if(e===n)return!0;if(t(e)&&t(n)&&e.length===n.length){for(var r=0;r0&&(t+=", "+n.join(", "));for(var r in this.aliases)this.aliases.hasOwnProperty(r)&&(t+=", "+r+"="+this.aliases[r]);var i=["depth0","helpers","partials","data"];this.useDepths&&i.push("depths");var s=this.mergeSource(t);return e?(i.push(s),Function.apply(this,i)):"function("+i.join(",")+") {\n "+s+"}"},mergeSource:function(e){var t="",n,r=!this.forceBuffer,i;for(var s=0,o=this.source.length;sthis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;if(e.length){this.inlineStack=[];for(var t=0,n=e.length;t