From 239c820d3c0eaec42f4b36eeb565dffe282a9948 Mon Sep 17 00:00:00 2001 From: Chris Sullins Date: Sun, 9 Nov 2014 17:33:48 -0800 Subject: [PATCH] Add emblem.js v0.3.8 --- ajax/libs/emblem/0.3.18/emblem.js | 7068 +++++++++++++++++++++++++ ajax/libs/emblem/0.3.18/emblem.min.js | 2 + ajax/libs/emblem/package.json | 36 + 3 files changed, 7106 insertions(+) create mode 100644 ajax/libs/emblem/0.3.18/emblem.js create mode 100644 ajax/libs/emblem/0.3.18/emblem.min.js create mode 100644 ajax/libs/emblem/package.json diff --git a/ajax/libs/emblem/0.3.18/emblem.js b/ajax/libs/emblem/0.3.18/emblem.js new file mode 100644 index 000000000..9b912e67e --- /dev/null +++ b/ajax/libs/emblem/0.3.18/emblem.js @@ -0,0 +1,7068 @@ +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 1 ? arguments[1] : {}, + + peg$startRuleFunctions = { start: peg$parsestart }, + peg$startRuleFunction = peg$parsestart, + + peg$c0 = null, + peg$c1 = "", + peg$c2 = function(c) {return c;}, + peg$c3 = function(c, i) { + return createProgramNode(c, i || []); + }, + peg$c4 = "=", + peg$c5 = "\"=\"", + peg$c6 = "else", + peg$c7 = "\"else\"", + peg$c8 = [], + peg$c9 = function(statements) { + // Coalesce all adjacent ContentNodes into one. + + var compressedStatements = []; + var buffer = []; + + for(var i = 0; i < statements.length; ++i) { + var nodes = statements[i]; + + for(var j = 0; j < nodes.length; ++j) { + var node = nodes[j] + if(node.type === "content") { + if(node.string) { + // Ignore empty strings (comments). + buffer.push(node.string); + } + continue; + } + + // Flush content if present. + if(buffer.length) { + compressedStatements.push(new AST.ContentNode(buffer.join(''))); + buffer = []; + } + compressedStatements.push(node); + } + } + + if(buffer.length) { + compressedStatements.push(new AST.ContentNode(buffer.join(''))); + } + + return compressedStatements; + }, + peg$c10 = "BeginStatement", + peg$c11 = "ContentStatement", + peg$c12 = function() { return []; }, + peg$c13 = ">", + peg$c14 = "\">\"", + peg$c15 = function(n, params) { + return [new AST.PartialNode(n, params[0])]; + }, + peg$c16 = /^[a-zA-Z0-9_$-\/]/, + peg$c17 = "[a-zA-Z0-9_$-\\/]", + peg$c18 = function(s) { return new AST.PartialNameNode(new AST.StringNode(s)); }, + peg$c19 = function(m) { + return [m]; + }, + peg$c20 = "/", + peg$c21 = "\"/\"", + peg$c22 = /^[A-Z]/, + peg$c23 = "[A-Z]", + peg$c24 = function(ret) { + // TODO make this configurable + var defaultCapitalizedHelper = 'view'; + + if(ret.mustache) { + // Block. Modify inner MustacheNode and return. + + // Make sure a suffix modifier hasn't already been applied. + var ch = ret.mustache.id.string.charAt(0); + if(!IS_EMBER || !ch.match(/[A-Z]/)) return ret; + + ret.mustache = unshiftParam(ret.mustache, defaultCapitalizedHelper); + return ret; + } else { + + // Make sure a suffix modifier hasn't already been applied. + var ch = ret.id.string.charAt(0); + if(!IS_EMBER || !ch.match(/[A-Z]/)) return ret; + + return unshiftParam(ret, defaultCapitalizedHelper); + } + }, + peg$c25 = " ", + peg$c26 = "\" \"", + peg$c27 = function(ret, multilineContent) { + if(multilineContent) { + multilineContent = multilineContent[1]; + for(var i = 0, len = multilineContent.length; i < len; ++i) { + ret.push(new AST.ContentNode(' ')); + ret = ret.concat(multilineContent[i]); + } + } + return ret; + }, + peg$c28 = function(c) { return c; }, + peg$c29 = function(m) { return [m]; }, + peg$c30 = "]", + peg$c31 = "\"]\"", + peg$c32 = function(h) { return h;}, + peg$c33 = function(h, nested) { + // h is [[open tag content], closing tag ContentNode] + var ret = h[0]; + if(nested) { ret = ret.concat(nested); } + + // Push the closing tag ContentNode if it exists (self-closing if not) + if(h[1]) { ret.push(h[1]); } + + return ret; + }, + peg$c34 = function(mustacheNode, nestedContentProgramNode) { + + if (!nestedContentProgramNode) { + return mustacheNode; + } + + var close = mustacheNode.id; + if (use11AST) { + close.path = mustacheNode.id; + close.strip = { + left: false, + right: false + }; + } + var block = new AST.BlockNode(mustacheNode, nestedContentProgramNode, nestedContentProgramNode.inverse, close); + + block.path = mustacheNode.id; + return block; + }, + peg$c35 = ": ", + peg$c36 = "\": \"", + peg$c37 = function(statements) { return createProgramNode(statements, []); }, + peg$c38 = function(block) {return block && block[2]; }, + peg$c39 = function(block) { + return block; + }, + peg$c40 = function(e, ret) { + var mustache = ret.mustache || ret; + mustache.escaped = e; + return ret; + }, + peg$c41 = "[", + peg$c42 = "\"[\"", + peg$c43 = function(isPartial, sexpr) { + if(isPartial) { + var n = new AST.PartialNameNode(new AST.StringNode(sexpr.id.string)); + return new AST.PartialNode(n, sexpr.params[0]); + } + + var mustacheNode; + if (useSexprNodes) { + mustacheNode = createMustacheNode(sexpr, null, true); + } else { + mustacheNode = createMustacheNode([sexpr.id].concat(sexpr.params), sexpr.hash, true); + } + + var tm = sexpr.id._emblemSuffixModifier; + if(tm === '!') { + return unshiftParam(mustacheNode, 'unbound'); + } else if(tm === '?') { + return unshiftParam(mustacheNode, 'if'); + } else if(tm === '^') { + return unshiftParam(mustacheNode, 'unless'); + } + return mustacheNode; + }, + peg$c44 = " [", + peg$c45 = "\" [\"", + peg$c46 = function(path, params, hash) { return parseSexpr(path, params, hash) }, + peg$c47 = function(t) { return ['tagName', t]; }, + peg$c48 = function(i) { return ['elementId', i]; }, + peg$c49 = function(c) { return ['class', c]; }, + peg$c50 = function(a) { + return a; + }, + peg$c51 = function(id, classes) { return [id, classes]; }, + peg$c52 = function(classes) { return [null, classes]; }, + peg$c53 = function(p) { return p; }, + peg$c54 = function(a) { return a; }, + peg$c55 = function(h) { return new AST.HashNode(h); }, + peg$c56 = "PathIdent", + peg$c57 = "..", + peg$c58 = "\"..\"", + peg$c59 = ".", + peg$c60 = "\".\"", + peg$c61 = /^[a-zA-Z0-9_$\-!?\^@]/, + peg$c62 = "[a-zA-Z0-9_$\\-!?\\^@]", + peg$c63 = function(s) { return s; }, + peg$c64 = /^[^\]]/, + peg$c65 = "[^\\]]", + peg$c66 = function(segmentLiteral) { return segmentLiteral; }, + peg$c67 = "Key", + peg$c68 = ":", + peg$c69 = "\":\"", + peg$c70 = function(h) { return [h[0], h[2]]; }, + peg$c71 = function(h) { return [h[0], h[2]];}, + peg$c72 = function(s) { s.isHelper = true; return s; }, + peg$c73 = function(s, p) { return { part: p, separator: s }; }, + peg$c74 = function(first, tail) { + var ret = [{ part: first }]; + for(var i = 0; i < tail.length; ++i) { + ret.push(tail[i]); + } + return ret; + }, + peg$c75 = "PathSeparator", + peg$c76 = /^[\/.]/, + peg$c77 = "[\\/.]", + peg$c78 = function(v) { + var last = v[v.length - 1]; + + // Support for data keywords that are prefixed with @ in the each + // block helper such as @index, @key, @first, @last + if (last.part.charAt(0) === '@') { + last.part = last.part.slice(1); + var idNode = new AST.IdNode(v); + var dataNode = new AST.DataNode(idNode); + return dataNode; + } + + var match; + var suffixModifier; + if(match = last.part.match(/[!\?\^]$/)) { + suffixModifier = match[0]; + last.part = last.part.slice(0, -1); + } + + var idNode = new AST.IdNode(v); + idNode._emblemSuffixModifier = suffixModifier; + + return idNode; + }, + peg$c79 = function(v) { return new AST.StringNode(v); }, + peg$c80 = function(v) { return new AST.IntegerNode(v); }, + peg$c81 = function(v) { return new AST.BooleanNode(v); }, + peg$c82 = "Boolean", + peg$c83 = "true", + peg$c84 = "\"true\"", + peg$c85 = "false", + peg$c86 = "\"false\"", + peg$c87 = "Integer", + peg$c88 = "-", + peg$c89 = "\"-\"", + peg$c90 = /^[0-9]/, + peg$c91 = "[0-9]", + peg$c92 = function(s) { return parseInt(s); }, + peg$c93 = "\"", + peg$c94 = "\"\\\"\"", + peg$c95 = "'", + peg$c96 = "\"'\"", + peg$c97 = function(p) { return p[1]; }, + peg$c98 = /^[^"}]/, + peg$c99 = "[^\"}]", + peg$c100 = /^[^'}]/, + peg$c101 = "[^'}]", + peg$c102 = /^[A-Za-z]/, + peg$c103 = "[A-Za-z]", + peg$c104 = function(ind, nodes, w) { + nodes.unshift(new AST.ContentNode(ind)); + + for(var i = 0; i < w.length; ++i) { + nodes.push(new AST.ContentNode(ind)); + nodes = nodes.concat(w[i]); + nodes.push("\n"); + } + return nodes; + }, + peg$c105 = /^[|`']/, + peg$c106 = "[|`']", + peg$c107 = "<", + peg$c108 = "\"<\"", + peg$c109 = function() { return '<'; }, + peg$c110 = function(s, nodes, indentedNodes) { + if(nodes.length || !indentedNodes) { + nodes.push("\n"); + } + + if(indentedNodes) { + indentedNodes = indentedNodes[1]; + for(var i = 0; i < indentedNodes.length; ++i) { + /*nodes.push(new AST.ContentNode("#"));*/ + nodes = nodes.concat(indentedNodes[i]); + nodes.push("\n"); + } + } + + var ret = []; + var strip = s !== '`'; + for(var i = 0; i < nodes.length; ++i) { + var node = nodes[i]; + if(node == "\n") { + if(!strip) { + ret.push(new AST.ContentNode("\n")); + } + } else { + ret.push(node); + } + } + + if(s === "'") { + ret.push(new AST.ContentNode(" ")); + } + return ret; + }, + peg$c111 = function(first, tail) { + return textNodesResult(first, tail); + }, + peg$c112 = function(first, tail) { return textNodesResult(first, tail); }, + peg$c113 = "{", + peg$c114 = "\"{\"", + peg$c115 = /^[^}]/, + peg$c116 = "[^}]", + peg$c117 = function(text) { + // Force interpretation as mustache. + // TODO: change to just parse with a specific rule? + text = "=" + text; + return Emblem.parse(text).statements[0]; + }, + peg$c118 = function(m) { m.escaped = true; return m; }, + peg$c119 = function(m) { m.escaped = false; return m; }, + peg$c120 = function(a) { return new AST.ContentNode(a); }, + peg$c121 = "any character", + peg$c122 = "SingleMustacheOpen", + peg$c123 = "DoubleMustacheOpen", + peg$c124 = "{{", + peg$c125 = "\"{{\"", + peg$c126 = "TripleMustacheOpen", + peg$c127 = "{{{", + peg$c128 = "\"{{{\"", + peg$c129 = "SingleMustacheClose", + peg$c130 = "}", + peg$c131 = "\"}\"", + peg$c132 = "DoubleMustacheClose", + peg$c133 = "}}", + peg$c134 = "\"}}\"", + peg$c135 = "TripleMustacheClose", + peg$c136 = "}}}", + peg$c137 = "\"}}}\"", + peg$c138 = "SubexpressionOpen", + peg$c139 = "(", + peg$c140 = "\"(\"", + peg$c141 = "SubexpressionClose", + peg$c142 = ")", + peg$c143 = "\")\"", + peg$c144 = "InterpolationOpen", + peg$c145 = "#{", + peg$c146 = "\"#{\"", + peg$c147 = "InterpolationClose", + peg$c148 = "==", + peg$c149 = "\"==\"", + peg$c150 = function() { return false; }, + peg$c151 = function() { return true; }, + peg$c152 = function(h, s) { return h || s; }, + peg$c153 = function(h, inTagMustaches, fullAttributes) { + return parseInHtml(h, inTagMustaches, fullAttributes) + }, + peg$c154 = function(s) { return { shorthand: s, id: true}; }, + peg$c155 = function(s) { return { shorthand: s }; }, + peg$c156 = function(shorthands) { + var id, classes = []; + for(var i = 0, len = shorthands.length; i < len; ++i) { + var shorthand = shorthands[i]; + if(shorthand.id) { + id = shorthand.shorthand; + } else { + classes.push(shorthand.shorthand); + } + } + + return [id, classes]; + }, + peg$c157 = function(a) { + if (a.length) { + return [new AST.ContentNode(' ')].concat(a); + } else { + return []; + } + }, + peg$c158 = /^[A-Za-z.0-9_\-]/, + peg$c159 = "[A-Za-z.0-9_\\-]", + peg$c160 = function(id) { return createMustacheNode([id], null, true); }, + peg$c161 = function(event, mustacheNode) { + // Replace the IdNode with a StringNode to prevent unquoted action deprecation warnings + mustacheNode.id = new AST.StringNode(mustacheNode.id.string); + + // Unshift the action helper and augment the hash + return [unshiftParam(mustacheNode, 'action', [['on', new AST.StringNode(event)]])]; + }, + peg$c162 = function(key, boolValue) { + if (boolValue === 'true') { + return [ new AST.ContentNode(key) ]; + } else { + return []; + } + }, + peg$c163 = function(value) { return value.replace(/ *$/, ''); }, + peg$c164 = "!", + peg$c165 = "\"!\"", + peg$c166 = function(key, value) { return IS_EMBER; }, + peg$c167 = function(key, value) { + var hashNode = new AST.HashNode([[key, new AST.StringNode(value)]]); + var params = [new AST.IdNode([{part: 'bind-attr'}])]; + var mustacheNode = createMustacheNode(params, hashNode); + + return [mustacheNode]; + }, + peg$c168 = function(key, id) { + var mustacheNode = createMustacheNode([id], null, true); + + if(IS_EMBER && id._emblemSuffixModifier === '!') { + mustacheNode = unshiftParam(mustacheNode, 'unbound'); + } + + return [ + new AST.ContentNode(key + '=' + '"'), + mustacheNode, + new AST.ContentNode('"'), + ]; + }, + peg$c169 = function(key, nodes) { + var result = [ new AST.ContentNode(key + '=' + '"') ].concat(nodes); + return result.concat([new AST.ContentNode('"')]); + }, + peg$c170 = "_", + peg$c171 = "\"_\"", + peg$c172 = "%", + peg$c173 = "\"%\"", + peg$c174 = "#", + peg$c175 = "\"#\"", + peg$c176 = function(c) { return c;}, + peg$c177 = "CSSIdentifier", + peg$c178 = /^[_a-zA-Z0-9\-]/, + peg$c179 = "[_a-zA-Z0-9\\-]", + peg$c180 = /^[_a-zA-Z]/, + peg$c181 = "[_a-zA-Z]", + peg$c182 = /^[\x80-\xFF]/, + peg$c183 = "[\\x80-\\xFF]", + peg$c184 = "KnownHTMLTagName", + peg$c185 = function(t) { return !!KNOWN_TAGS[t]; }, + peg$c186 = function(t) { return t; }, + peg$c187 = "a JS event", + peg$c188 = function(t) { return !!KNOWN_EVENTS[t]; }, + peg$c189 = "INDENT", + peg$c190 = "\uEFEF", + peg$c191 = "\"\\uEFEF\"", + peg$c192 = function() { return ''; }, + peg$c193 = "DEDENT", + peg$c194 = "\uEFFE", + peg$c195 = "\"\\uEFFE\"", + peg$c196 = "Unmatched DEDENT", + peg$c197 = "\uEFEE", + peg$c198 = "\"\\uEFEE\"", + peg$c199 = "LineEnd", + peg$c200 = "\r", + peg$c201 = "\"\\r\"", + peg$c202 = "\uEFFF", + peg$c203 = "\"\\uEFFF\"", + peg$c204 = "\n", + peg$c205 = "\"\\n\"", + peg$c206 = "ANYDEDENT", + peg$c207 = "RequiredWhitespace", + peg$c208 = "OptionalWhitespace", + peg$c209 = "InlineWhitespace", + peg$c210 = /^[ \t]/, + peg$c211 = "[ \\t]", + + peg$currPos = 0, + peg$reportedPos = 0, + peg$cachedPos = 0, + peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }, + peg$maxFailPos = 0, + peg$maxFailExpected = [], + peg$silentFails = 0, + + peg$result; + + if ("startRule" in options) { + if (!(options.startRule in peg$startRuleFunctions)) { + throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); + } + + peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; + } + + function text() { + return input.substring(peg$reportedPos, peg$currPos); + } + + function offset() { + return peg$reportedPos; + } + + function line() { + return peg$computePosDetails(peg$reportedPos).line; + } + + function column() { + return peg$computePosDetails(peg$reportedPos).column; + } + + function peg$computePosDetails(pos) { + function advance(details, startPos, endPos) { + var p, ch; + + for (p = startPos; p < endPos; p++) { + ch = input.charAt(p); + if (ch === "\n") { + if (!details.seenCR) { details.line++; } + details.column = 1; + details.seenCR = false; + } else if (ch === "\r" || ch === "\u2028" || ch === "\u2029") { + details.line++; + details.column = 1; + details.seenCR = true; + } else { + details.column++; + details.seenCR = false; + } + } + } + + if (peg$cachedPos !== pos) { + if (peg$cachedPos > pos) { + peg$cachedPos = 0; + peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }; + } + advance(peg$cachedPosDetails, peg$cachedPos, pos); + peg$cachedPos = pos; + } + + return peg$cachedPosDetails; + } + + function peg$fail(expected) { + if (peg$currPos < peg$maxFailPos) { return; } + + if (peg$currPos > peg$maxFailPos) { + peg$maxFailPos = peg$currPos; + peg$maxFailExpected = []; + } + + peg$maxFailExpected.push(expected); + } + + function peg$cleanupExpected(expected) { + var i = 0; + + expected.sort(); + + while (i < expected.length) { + if (expected[i - 1] === expected[i]) { + expected.splice(i, 1); + } else { + i++; + } + } + } + + function peg$parsestart() { + var s0; + + s0 = peg$parseinvertibleContent(); + + return s0; + } + + function peg$parseinvertibleContent() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8; + + s0 = peg$currPos; + s1 = peg$parsecontent(); + if (s1 !== null) { + s2 = peg$currPos; + s3 = peg$parseDEDENT(); + if (s3 !== null) { + s4 = peg$parseelse(); + if (s4 !== null) { + s5 = peg$parse_(); + if (s5 !== null) { + s6 = peg$parseTERM(); + if (s6 !== null) { + s7 = peg$parseindentation(); + if (s7 !== null) { + s8 = peg$parsecontent(); + if (s8 !== null) { + peg$reportedPos = s2; + s3 = peg$c2(s8); + if (s3 === null) { + peg$currPos = s2; + s2 = s3; + } else { + s2 = s3; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + if (s2 === null) { + s2 = peg$c1; + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c3(s1, s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseelse() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 61) { + s2 = peg$c4; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c5); } + } + if (s2 !== null) { + s3 = peg$parse_(); + if (s3 !== null) { + s2 = [s2, s3]; + s1 = s2; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + } else { + peg$currPos = s1; + s1 = peg$c0; + } + if (s1 === null) { + s1 = peg$c1; + } + if (s1 !== null) { + if (input.substr(peg$currPos, 4) === peg$c6) { + s2 = peg$c6; + peg$currPos += 4; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c7); } + } + if (s2 !== null) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsecontent() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parsestatement(); + while (s2 !== null) { + s1.push(s2); + s2 = peg$parsestatement(); + } + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c9(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + + return s0; + } + + function peg$parsestatement() { + var s0, s1; + + peg$silentFails++; + s0 = peg$parseblankLine(); + if (s0 === null) { + s0 = peg$parsecomment(); + if (s0 === null) { + s0 = peg$parsecontentStatement(); + } + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c10); } + } + + return s0; + } + + function peg$parsecontentStatement() { + var s0, s1; + + peg$silentFails++; + s0 = peg$parselegacyPartialInvocation(); + if (s0 === null) { + s0 = peg$parsehtmlElement(); + if (s0 === null) { + s0 = peg$parsetextLine(); + if (s0 === null) { + s0 = peg$parsemustache(); + } + } + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c11); } + } + + return s0; + } + + function peg$parseblankLine() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== null) { + s2 = peg$parseTERM(); + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c12(); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parselegacyPartialInvocation() { + var s0, s1, s2, s3, s4, s5, s6; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 62) { + s1 = peg$c13; + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c14); } + } + if (s1 !== null) { + s2 = peg$parse_(); + if (s2 !== null) { + s3 = peg$parselegacyPartialName(); + if (s3 !== null) { + s4 = []; + s5 = peg$parseinMustacheParam(); + while (s5 !== null) { + s4.push(s5); + s5 = peg$parseinMustacheParam(); + } + if (s4 !== null) { + s5 = peg$parse_(); + if (s5 !== null) { + s6 = peg$parseTERM(); + if (s6 !== null) { + peg$reportedPos = s0; + s1 = peg$c15(s3, s4); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parselegacyPartialName() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$currPos; + s2 = []; + if (peg$c16.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c17); } + } + if (s3 !== null) { + while (s3 !== null) { + s2.push(s3); + if (peg$c16.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c17); } + } + } + } else { + s2 = peg$c0; + } + if (s2 !== null) { + s2 = input.substring(s1, peg$currPos); + } + s1 = s2; + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c18(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + + return s0; + } + + function peg$parsemustache() { + var s0, s1; + + s0 = peg$currPos; + s1 = peg$parseexplicitMustache(); + if (s1 === null) { + s1 = peg$parselineStartingMustache(); + } + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c19(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + + return s0; + } + + function peg$parsecommentContent() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parselineContent(); + if (s1 !== null) { + s2 = peg$parseTERM(); + if (s2 !== null) { + s3 = []; + s4 = peg$currPos; + s5 = peg$parseindentation(); + if (s5 !== null) { + s6 = []; + s7 = peg$parsecommentContent(); + if (s7 !== null) { + while (s7 !== null) { + s6.push(s7); + s7 = peg$parsecommentContent(); + } + } else { + s6 = peg$c0; + } + if (s6 !== null) { + s7 = peg$parseanyDedent(); + if (s7 !== null) { + s5 = [s5, s6, s7]; + s4 = s5; + } else { + peg$currPos = s4; + s4 = peg$c0; + } + } else { + peg$currPos = s4; + s4 = peg$c0; + } + } else { + peg$currPos = s4; + s4 = peg$c0; + } + while (s4 !== null) { + s3.push(s4); + s4 = peg$currPos; + s5 = peg$parseindentation(); + if (s5 !== null) { + s6 = []; + s7 = peg$parsecommentContent(); + if (s7 !== null) { + while (s7 !== null) { + s6.push(s7); + s7 = peg$parsecommentContent(); + } + } else { + s6 = peg$c0; + } + if (s6 !== null) { + s7 = peg$parseanyDedent(); + if (s7 !== null) { + s5 = [s5, s6, s7]; + s4 = s5; + } else { + peg$currPos = s4; + s4 = peg$c0; + } + } else { + peg$currPos = s4; + s4 = peg$c0; + } + } else { + peg$currPos = s4; + s4 = peg$c0; + } + } + if (s3 !== null) { + peg$reportedPos = s0; + s1 = peg$c12(); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsecomment() { + var s0, s1, s2; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 47) { + s1 = peg$c20; + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c21); } + } + if (s1 !== null) { + s2 = peg$parsecommentContent(); + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c12(); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseinlineComment() { + var s0, s1, s2; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 47) { + s1 = peg$c20; + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c21); } + } + if (s1 !== null) { + s2 = peg$parselineContent(); + if (s2 !== null) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parselineStartingMustache() { + var s0; + + s0 = peg$parsecapitalizedLineStarterMustache(); + if (s0 === null) { + s0 = peg$parsemustacheOrBlock(); + } + + return s0; + } + + function peg$parsecapitalizedLineStarterMustache() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + if (peg$c22.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c23); } + } + peg$silentFails--; + if (s2 !== null) { + peg$currPos = s1; + s1 = peg$c1; + } else { + s1 = peg$c0; + } + if (s1 !== null) { + s2 = peg$parsemustacheOrBlock(); + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c24(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsehtmlNestedTextNodes() { + var s0, s1, s2, s3, s4, s5, s6; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 32) { + s1 = peg$c25; + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c26); } + } + if (s1 !== null) { + s2 = peg$parsetextNodes(); + if (s2 !== null) { + s3 = peg$currPos; + s4 = peg$parseindentation(); + if (s4 !== null) { + s5 = []; + s6 = peg$parsewhitespaceableTextNodes(); + if (s6 !== null) { + while (s6 !== null) { + s5.push(s6); + s6 = peg$parsewhitespaceableTextNodes(); + } + } else { + s5 = peg$c0; + } + if (s5 !== null) { + s6 = peg$parseDEDENT(); + if (s6 !== null) { + s4 = [s4, s5, s6]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$c0; + } + } else { + peg$currPos = s3; + s3 = peg$c0; + } + } else { + peg$currPos = s3; + s3 = peg$c0; + } + if (s3 === null) { + s3 = peg$c1; + } + if (s3 !== null) { + peg$reportedPos = s0; + s1 = peg$c27(s2, s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseindentedContent() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseblankLine(); + while (s2 !== null) { + s1.push(s2); + s2 = peg$parseblankLine(); + } + if (s1 !== null) { + s2 = peg$parseindentation(); + if (s2 !== null) { + s3 = peg$parsecontent(); + if (s3 !== null) { + s4 = peg$parseDEDENT(); + if (s4 !== null) { + peg$reportedPos = s0; + s1 = peg$c28(s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseunindentedContent() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseblankLine(); + while (s2 !== null) { + s1.push(s2); + s2 = peg$parseblankLine(); + } + if (s1 !== null) { + s2 = peg$parsecontent(); + if (s2 !== null) { + s3 = peg$parseDEDENT(); + if (s3 !== null) { + peg$reportedPos = s0; + s1 = peg$c28(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsehtmlTerminator() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$parsecolonContent(); + if (s0 === null) { + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== null) { + s2 = peg$parseexplicitMustache(); + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c29(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + if (s0 === null) { + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== null) { + s2 = peg$parseinlineComment(); + if (s2 === null) { + s2 = peg$c1; + } + if (s2 !== null) { + s3 = peg$parseTERM(); + if (s3 !== null) { + s4 = peg$parseindentedContent(); + if (s4 === null) { + s4 = peg$c1; + } + if (s4 !== null) { + peg$reportedPos = s0; + s1 = peg$c28(s4); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + if (s0 === null) { + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== null) { + s2 = peg$parseinlineComment(); + if (s2 === null) { + s2 = peg$c1; + } + if (s2 !== null) { + if (input.charCodeAt(peg$currPos) === 93) { + s3 = peg$c30; + peg$currPos++; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c31); } + } + if (s3 !== null) { + s4 = peg$parseTERM(); + if (s4 !== null) { + s5 = peg$parseunindentedContent(); + if (s5 === null) { + s5 = peg$c1; + } + if (s5 !== null) { + peg$reportedPos = s0; + s1 = peg$c28(s5); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + if (s0 === null) { + s0 = peg$currPos; + s1 = peg$parsehtmlNestedTextNodes(); + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c32(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } + } + } + } + + return s0; + } + + function peg$parsehtmlElement() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$parseinHtmlTag(); + if (s1 !== null) { + s2 = peg$parsehtmlTerminator(); + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c33(s1, s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsemustacheOrBlock() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$parseinMustache(); + if (s1 !== null) { + s2 = peg$parse_(); + if (s2 !== null) { + s3 = peg$parseinlineComment(); + if (s3 === null) { + s3 = peg$c1; + } + if (s3 !== null) { + s4 = peg$parsemustacheNestedContent(); + if (s4 !== null) { + peg$reportedPos = s0; + s1 = peg$c34(s1, s4); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseinvertibleContent() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; + + s0 = peg$currPos; + s1 = peg$parsecontent(); + if (s1 !== null) { + s2 = peg$currPos; + s3 = peg$parseDEDENT(); + if (s3 !== null) { + s4 = peg$parseelse(); + if (s4 !== null) { + s5 = peg$parse_(); + if (s5 !== null) { + s6 = peg$parseTERM(); + if (s6 !== null) { + s7 = []; + s8 = peg$parseblankLine(); + while (s8 !== null) { + s7.push(s8); + s8 = peg$parseblankLine(); + } + if (s7 !== null) { + s8 = peg$parseindentation(); + if (s8 !== null) { + s9 = peg$parsecontent(); + if (s9 !== null) { + peg$reportedPos = s2; + s3 = peg$c2(s9); + if (s3 === null) { + peg$currPos = s2; + s2 = s3; + } else { + s2 = s3; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + if (s2 === null) { + s2 = peg$c1; + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c3(s1, s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsecolonContent() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c35) { + s1 = peg$c35; + peg$currPos += 2; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c36); } + } + if (s1 !== null) { + s2 = peg$parse_(); + if (s2 !== null) { + s3 = peg$parsecontentStatement(); + if (s3 !== null) { + peg$reportedPos = s0; + s1 = peg$c28(s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsemustacheNestedContent() { + var s0, s1, s2, s3, s4, s5, s6; + + s0 = peg$currPos; + s1 = peg$parsecolonContent(); + if (s1 === null) { + s1 = peg$parsetextLine(); + } + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c37(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + if (s0 === null) { + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== null) { + if (input.charCodeAt(peg$currPos) === 93) { + s2 = peg$c30; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c31); } + } + if (s2 !== null) { + s3 = peg$parseTERM(); + if (s3 !== null) { + s4 = peg$parsecolonContent(); + if (s4 === null) { + s4 = peg$parsetextLine(); + } + if (s4 !== null) { + s5 = peg$parseDEDENT(); + if (s5 !== null) { + peg$reportedPos = s0; + s1 = peg$c37(s4); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + if (s0 === null) { + s0 = peg$currPos; + s1 = peg$parseTERM(); + if (s1 !== null) { + s2 = peg$currPos; + s3 = []; + s4 = peg$parseblankLine(); + while (s4 !== null) { + s3.push(s4); + s4 = peg$parseblankLine(); + } + if (s3 !== null) { + s4 = peg$parseindentation(); + if (s4 !== null) { + s5 = peg$parseinvertibleContent(); + if (s5 !== null) { + s6 = peg$parseDEDENT(); + if (s6 !== null) { + s3 = [s3, s4, s5, s6]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + if (s2 === null) { + s2 = peg$c1; + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c38(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + if (s0 === null) { + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== null) { + if (input.charCodeAt(peg$currPos) === 93) { + s2 = peg$c30; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c31); } + } + if (s2 !== null) { + s3 = peg$parseTERM(); + if (s3 !== null) { + s4 = peg$parseinvertibleContent(); + if (s4 !== null) { + s5 = peg$parseDEDENT(); + if (s5 !== null) { + peg$reportedPos = s0; + s1 = peg$c39(s4); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } + } + } + + return s0; + } + + function peg$parseexplicitMustache() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$parseequalSign(); + if (s1 !== null) { + s2 = peg$parsemustacheOrBlock(); + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c40(s1, s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseinMustache() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 62) { + s1 = peg$c13; + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c14); } + } + if (s1 === null) { + s1 = peg$c1; + } + if (s1 !== null) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 91) { + s4 = peg$c41; + peg$currPos++; + } else { + s4 = null; + if (peg$silentFails === 0) { peg$fail(peg$c42); } + } + if (s4 !== null) { + s5 = peg$parseTERM(); + if (s5 !== null) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$c0; + } + } else { + peg$currPos = s3; + s3 = peg$c0; + } + peg$silentFails--; + if (s3 === null) { + s2 = peg$c1; + } else { + peg$currPos = s2; + s2 = peg$c0; + } + if (s2 !== null) { + s3 = peg$parse_(); + if (s3 !== null) { + s4 = peg$parsesexpr(); + if (s4 !== null) { + peg$reportedPos = s0; + s1 = peg$c43(s1, s4); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsesexpr() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; + + s0 = peg$currPos; + s1 = peg$parsepathIdNode(); + if (s1 !== null) { + s2 = peg$currPos; + peg$silentFails++; + if (input.substr(peg$currPos, 2) === peg$c44) { + s3 = peg$c44; + peg$currPos += 2; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c45); } + } + peg$silentFails--; + if (s3 === null) { + s2 = peg$c1; + } else { + peg$currPos = s2; + s2 = peg$c0; + } + if (s2 !== null) { + s3 = []; + s4 = peg$parseinMustacheParam(); + while (s4 !== null) { + s3.push(s4); + s4 = peg$parseinMustacheParam(); + } + if (s3 !== null) { + s4 = peg$parsehash(); + if (s4 === null) { + s4 = peg$c1; + } + if (s4 !== null) { + peg$reportedPos = s0; + s1 = peg$c46(s1, s3, s4); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + if (s0 === null) { + s0 = peg$currPos; + s1 = peg$parsepathIdNode(); + if (s1 !== null) { + s2 = peg$parse_(); + if (s2 !== null) { + if (input.charCodeAt(peg$currPos) === 91) { + s3 = peg$c41; + peg$currPos++; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c42); } + } + if (s3 !== null) { + s4 = peg$parse_(); + if (s4 !== null) { + s5 = []; + s6 = peg$parseTERM(); + while (s6 !== null) { + s5.push(s6); + s6 = peg$parseTERM(); + } + if (s5 !== null) { + s6 = []; + s7 = peg$parseINDENT(); + while (s7 !== null) { + s6.push(s7); + s7 = peg$parseINDENT(); + } + if (s6 !== null) { + s7 = peg$parse_(); + if (s7 !== null) { + s8 = []; + s9 = peg$parseinMustacheBracketedParam(); + while (s9 !== null) { + s8.push(s9); + s9 = peg$parseinMustacheBracketedParam(); + } + if (s8 !== null) { + s9 = peg$parsebracketedHash(); + if (s9 === null) { + s9 = peg$c1; + } + if (s9 !== null) { + peg$reportedPos = s0; + s1 = peg$c46(s1, s8, s9); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } + + return s0; + } + + function peg$parsehtmlMustacheAttribute() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== null) { + s2 = peg$currPos; + s3 = peg$parsetagNameShorthand(); + if (s3 !== null) { + peg$reportedPos = s2; + s3 = peg$c47(s3); + } + if (s3 === null) { + peg$currPos = s2; + s2 = s3; + } else { + s2 = s3; + } + if (s2 === null) { + s2 = peg$currPos; + s3 = peg$parseidShorthand(); + if (s3 !== null) { + peg$reportedPos = s2; + s3 = peg$c48(s3); + } + if (s3 === null) { + peg$currPos = s2; + s2 = s3; + } else { + s2 = s3; + } + if (s2 === null) { + s2 = peg$currPos; + s3 = peg$parseclassShorthand(); + if (s3 !== null) { + peg$reportedPos = s2; + s3 = peg$c49(s3); + } + if (s3 === null) { + peg$currPos = s2; + s2 = s3; + } else { + s2 = s3; + } + } + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c50(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseshorthandAttributes() { + var s0; + + s0 = peg$parseattributesAtLeastID(); + if (s0 === null) { + s0 = peg$parseattributesAtLeastClass(); + } + + return s0; + } + + function peg$parseattributesAtLeastID() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parseidShorthand(); + if (s1 !== null) { + s2 = []; + s3 = peg$parseclassShorthand(); + while (s3 !== null) { + s2.push(s3); + s3 = peg$parseclassShorthand(); + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c51(s1, s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseattributesAtLeastClass() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseclassShorthand(); + if (s2 !== null) { + while (s2 !== null) { + s1.push(s2); + s2 = peg$parseclassShorthand(); + } + } else { + s1 = peg$c0; + } + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c52(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + + return s0; + } + + function peg$parseinMustacheParam() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parsehtmlMustacheAttribute(); + if (s1 === null) { + s1 = peg$currPos; + s2 = peg$parse__(); + if (s2 !== null) { + s3 = peg$parseparam(); + if (s3 !== null) { + peg$reportedPos = s1; + s2 = peg$c53(s3); + if (s2 === null) { + peg$currPos = s1; + s1 = s2; + } else { + s1 = s2; + } + } else { + peg$currPos = s1; + s1 = peg$c0; + } + } else { + peg$currPos = s1; + s1 = peg$c0; + } + } + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c54(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + + return s0; + } + + function peg$parseinMustacheBracketedParam() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$parsehtmlMustacheAttribute(); + if (s1 === null) { + s1 = peg$currPos; + s2 = peg$parseparam(); + if (s2 !== null) { + s3 = []; + s4 = peg$parseTERM(); + while (s4 !== null) { + s3.push(s4); + s4 = peg$parseTERM(); + } + if (s3 !== null) { + peg$reportedPos = s1; + s2 = peg$c53(s2); + if (s2 === null) { + peg$currPos = s1; + s1 = s2; + } else { + s1 = s2; + } + } else { + peg$currPos = s1; + s1 = peg$c0; + } + } else { + peg$currPos = s1; + s1 = peg$c0; + } + } + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c54(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + + return s0; + } + + function peg$parsehash() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parsehashSegment(); + if (s2 !== null) { + while (s2 !== null) { + s1.push(s2); + s2 = peg$parsehashSegment(); + } + } else { + s1 = peg$c0; + } + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c55(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + + return s0; + } + + function peg$parsebracketedHash() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseINDENT(); + while (s2 !== null) { + s1.push(s2); + s2 = peg$parseINDENT(); + } + if (s1 !== null) { + s2 = []; + if (input.charCodeAt(peg$currPos) === 32) { + s3 = peg$c25; + peg$currPos++; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c26); } + } + while (s3 !== null) { + s2.push(s3); + if (input.charCodeAt(peg$currPos) === 32) { + s3 = peg$c25; + peg$currPos++; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c26); } + } + } + if (s2 !== null) { + s3 = []; + s4 = peg$parsebracketedHashSegment(); + if (s4 !== null) { + while (s4 !== null) { + s3.push(s4); + s4 = peg$parsebracketedHashSegment(); + } + } else { + s3 = peg$c0; + } + if (s3 !== null) { + peg$reportedPos = s0; + s1 = peg$c55(s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsepathIdent() { + var s0, s1, s2, s3, s4; + + peg$silentFails++; + if (input.substr(peg$currPos, 2) === peg$c57) { + s0 = peg$c57; + peg$currPos += 2; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c58); } + } + if (s0 === null) { + if (input.charCodeAt(peg$currPos) === 46) { + s0 = peg$c59; + peg$currPos++; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c60); } + } + if (s0 === null) { + s0 = peg$currPos; + s1 = peg$currPos; + s2 = []; + if (peg$c61.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c62); } + } + if (s3 !== null) { + while (s3 !== null) { + s2.push(s3); + if (peg$c61.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c62); } + } + } + } else { + s2 = peg$c0; + } + if (s2 !== null) { + s2 = input.substring(s1, peg$currPos); + } + s1 = s2; + if (s1 !== null) { + s2 = peg$currPos; + peg$silentFails++; + if (input.charCodeAt(peg$currPos) === 61) { + s3 = peg$c4; + peg$currPos++; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c5); } + } + peg$silentFails--; + if (s3 === null) { + s2 = peg$c1; + } else { + peg$currPos = s2; + s2 = peg$c0; + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c63(s1); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + if (s0 === null) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 91) { + s1 = peg$c41; + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c42); } + } + if (s1 !== null) { + s2 = peg$currPos; + s3 = []; + if (peg$c64.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = null; + if (peg$silentFails === 0) { peg$fail(peg$c65); } + } + while (s4 !== null) { + s3.push(s4); + if (peg$c64.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = null; + if (peg$silentFails === 0) { peg$fail(peg$c65); } + } + } + if (s3 !== null) { + s3 = input.substring(s2, peg$currPos); + } + s2 = s3; + if (s2 !== null) { + if (input.charCodeAt(peg$currPos) === 93) { + s3 = peg$c30; + peg$currPos++; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c31); } + } + if (s3 !== null) { + peg$reportedPos = s0; + s1 = peg$c66(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } + } + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c56); } + } + + return s0; + } + + function peg$parsekey() { + var s0, s1, s2; + + peg$silentFails++; + s0 = peg$currPos; + s1 = []; + s2 = peg$parsenmchar(); + if (s2 === null) { + if (input.charCodeAt(peg$currPos) === 58) { + s2 = peg$c68; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c69); } + } + } + while (s2 !== null) { + s1.push(s2); + s2 = peg$parsenmchar(); + if (s2 === null) { + if (input.charCodeAt(peg$currPos) === 58) { + s2 = peg$c68; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c69); } + } + } + } + if (s1 !== null) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c67); } + } + + return s0; + } + + function peg$parsehashSegment() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parse__(); + if (s1 !== null) { + s2 = peg$currPos; + s3 = peg$parsekey(); + if (s3 !== null) { + if (input.charCodeAt(peg$currPos) === 61) { + s4 = peg$c4; + peg$currPos++; + } else { + s4 = null; + if (peg$silentFails === 0) { peg$fail(peg$c5); } + } + if (s4 !== null) { + s5 = peg$parseparam(); + if (s5 !== null) { + s3 = [s3, s4, s5]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c70(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsebracketedHashSegment() { + var s0, s1, s2, s3, s4, s5, s6; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseINDENT(); + while (s2 !== null) { + s1.push(s2); + s2 = peg$parseINDENT(); + } + if (s1 !== null) { + s2 = peg$parse_(); + if (s2 !== null) { + s3 = peg$currPos; + s4 = peg$parsekey(); + if (s4 !== null) { + if (input.charCodeAt(peg$currPos) === 61) { + s5 = peg$c4; + peg$currPos++; + } else { + s5 = null; + if (peg$silentFails === 0) { peg$fail(peg$c5); } + } + if (s5 !== null) { + s6 = peg$parseparam(); + if (s6 !== null) { + s4 = [s4, s5, s6]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$c0; + } + } else { + peg$currPos = s3; + s3 = peg$c0; + } + } else { + peg$currPos = s3; + s3 = peg$c0; + } + if (s3 !== null) { + s4 = []; + s5 = peg$parseTERM(); + while (s5 !== null) { + s4.push(s5); + s5 = peg$parseTERM(); + } + if (s4 !== null) { + peg$reportedPos = s0; + s1 = peg$c71(s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseparam() { + var s0, s1, s2, s3; + + s0 = peg$parsebooleanNode(); + if (s0 === null) { + s0 = peg$parseintegerNode(); + if (s0 === null) { + s0 = peg$parsepathIdNode(); + if (s0 === null) { + s0 = peg$parsestringNode(); + if (s0 === null) { + s0 = peg$currPos; + s1 = peg$parsesexprOpen(); + if (s1 !== null) { + s2 = peg$parsesexpr(); + if (s2 !== null) { + s3 = peg$parsesexprClose(); + if (s3 !== null) { + peg$reportedPos = s0; + s1 = peg$c72(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } + } + } + } + + return s0; + } + + function peg$parsepath() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parsepathIdent(); + if (s1 !== null) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parseseperator(); + if (s4 !== null) { + s5 = peg$parsepathIdent(); + if (s5 !== null) { + peg$reportedPos = s3; + s4 = peg$c73(s4, s5); + if (s4 === null) { + peg$currPos = s3; + s3 = s4; + } else { + s3 = s4; + } + } else { + peg$currPos = s3; + s3 = peg$c0; + } + } else { + peg$currPos = s3; + s3 = peg$c0; + } + while (s3 !== null) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parseseperator(); + if (s4 !== null) { + s5 = peg$parsepathIdent(); + if (s5 !== null) { + peg$reportedPos = s3; + s4 = peg$c73(s4, s5); + if (s4 === null) { + peg$currPos = s3; + s3 = s4; + } else { + s3 = s4; + } + } else { + peg$currPos = s3; + s3 = peg$c0; + } + } else { + peg$currPos = s3; + s3 = peg$c0; + } + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c74(s1, s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseseperator() { + var s0, s1; + + peg$silentFails++; + if (peg$c76.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c77); } + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c75); } + } + + return s0; + } + + function peg$parsepathIdNode() { + var s0, s1; + + s0 = peg$currPos; + s1 = peg$parsepath(); + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c78(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + + return s0; + } + + function peg$parsestringNode() { + var s0, s1; + + s0 = peg$currPos; + s1 = peg$parsestring(); + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c79(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + + return s0; + } + + function peg$parseintegerNode() { + var s0, s1; + + s0 = peg$currPos; + s1 = peg$parseinteger(); + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c80(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + + return s0; + } + + function peg$parsebooleanNode() { + var s0, s1; + + s0 = peg$currPos; + s1 = peg$parseboolean(); + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c81(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + + return s0; + } + + function peg$parseboolean() { + var s0, s1; + + peg$silentFails++; + if (input.substr(peg$currPos, 4) === peg$c83) { + s0 = peg$c83; + peg$currPos += 4; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c84); } + } + if (s0 === null) { + if (input.substr(peg$currPos, 5) === peg$c85) { + s0 = peg$c85; + peg$currPos += 5; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c86); } + } + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c82); } + } + + return s0; + } + + function peg$parseinteger() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$currPos; + s2 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 45) { + s3 = peg$c88; + peg$currPos++; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c89); } + } + if (s3 === null) { + s3 = peg$c1; + } + if (s3 !== null) { + s4 = []; + if (peg$c90.test(input.charAt(peg$currPos))) { + s5 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s5 = null; + if (peg$silentFails === 0) { peg$fail(peg$c91); } + } + if (s5 !== null) { + while (s5 !== null) { + s4.push(s5); + if (peg$c90.test(input.charAt(peg$currPos))) { + s5 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s5 = null; + if (peg$silentFails === 0) { peg$fail(peg$c91); } + } + } + } else { + s4 = peg$c0; + } + if (s4 !== null) { + s3 = [s3, s4]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + if (s2 !== null) { + s2 = input.substring(s1, peg$currPos); + } + s1 = s2; + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c92(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c87); } + } + + return s0; + } + + function peg$parsestring() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 34) { + s2 = peg$c93; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c94); } + } + if (s2 !== null) { + s3 = peg$parsehashDoubleQuoteStringValue(); + if (s3 !== null) { + if (input.charCodeAt(peg$currPos) === 34) { + s4 = peg$c93; + peg$currPos++; + } else { + s4 = null; + if (peg$silentFails === 0) { peg$fail(peg$c94); } + } + if (s4 !== null) { + s2 = [s2, s3, s4]; + s1 = s2; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + } else { + peg$currPos = s1; + s1 = peg$c0; + } + } else { + peg$currPos = s1; + s1 = peg$c0; + } + if (s1 === null) { + s1 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 39) { + s2 = peg$c95; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c96); } + } + if (s2 !== null) { + s3 = peg$parsehashSingleQuoteStringValue(); + if (s3 !== null) { + if (input.charCodeAt(peg$currPos) === 39) { + s4 = peg$c95; + peg$currPos++; + } else { + s4 = null; + if (peg$silentFails === 0) { peg$fail(peg$c96); } + } + if (s4 !== null) { + s2 = [s2, s3, s4]; + s1 = s2; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + } else { + peg$currPos = s1; + s1 = peg$c0; + } + } else { + peg$currPos = s1; + s1 = peg$c0; + } + } + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c97(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + + return s0; + } + + function peg$parsehashDoubleQuoteStringValue() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = []; + s2 = peg$currPos; + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parseTERM(); + peg$silentFails--; + if (s4 === null) { + s3 = peg$c1; + } else { + peg$currPos = s3; + s3 = peg$c0; + } + if (s3 !== null) { + if (peg$c98.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = null; + if (peg$silentFails === 0) { peg$fail(peg$c99); } + } + if (s4 !== null) { + s3 = [s3, s4]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + while (s2 !== null) { + s1.push(s2); + s2 = peg$currPos; + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parseTERM(); + peg$silentFails--; + if (s4 === null) { + s3 = peg$c1; + } else { + peg$currPos = s3; + s3 = peg$c0; + } + if (s3 !== null) { + if (peg$c98.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = null; + if (peg$silentFails === 0) { peg$fail(peg$c99); } + } + if (s4 !== null) { + s3 = [s3, s4]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } + if (s1 !== null) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + + return s0; + } + + function peg$parsehashSingleQuoteStringValue() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = []; + s2 = peg$currPos; + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parseTERM(); + peg$silentFails--; + if (s4 === null) { + s3 = peg$c1; + } else { + peg$currPos = s3; + s3 = peg$c0; + } + if (s3 !== null) { + if (peg$c100.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = null; + if (peg$silentFails === 0) { peg$fail(peg$c101); } + } + if (s4 !== null) { + s3 = [s3, s4]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + while (s2 !== null) { + s1.push(s2); + s2 = peg$currPos; + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parseTERM(); + peg$silentFails--; + if (s4 === null) { + s3 = peg$c1; + } else { + peg$currPos = s3; + s3 = peg$c0; + } + if (s3 !== null) { + if (peg$c100.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = null; + if (peg$silentFails === 0) { peg$fail(peg$c101); } + } + if (s4 !== null) { + s3 = [s3, s4]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } else { + peg$currPos = s2; + s2 = peg$c0; + } + } + if (s1 !== null) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + + return s0; + } + + function peg$parsealpha() { + var s0; + + if (peg$c102.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c103); } + } + + return s0; + } + + function peg$parsewhitespaceableTextNodes() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$parseindentation(); + if (s1 !== null) { + s2 = peg$parsetextNodes(); + if (s2 !== null) { + s3 = []; + s4 = peg$parsewhitespaceableTextNodes(); + while (s4 !== null) { + s3.push(s4); + s4 = peg$parsewhitespaceableTextNodes(); + } + if (s3 !== null) { + s4 = peg$parseanyDedent(); + if (s4 !== null) { + peg$reportedPos = s0; + s1 = peg$c104(s1, s2, s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + if (s0 === null) { + s0 = peg$parsetextNodes(); + } + + return s0; + } + + function peg$parsetextLineStart() { + var s0, s1, s2; + + s0 = peg$currPos; + if (peg$c105.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c106); } + } + if (s1 !== null) { + if (input.charCodeAt(peg$currPos) === 32) { + s2 = peg$c25; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c26); } + } + if (s2 === null) { + s2 = peg$c1; + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c63(s1); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + if (s0 === null) { + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + if (input.charCodeAt(peg$currPos) === 60) { + s2 = peg$c107; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c108); } + } + peg$silentFails--; + if (s2 !== null) { + peg$currPos = s1; + s1 = peg$c1; + } else { + s1 = peg$c0; + } + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c109(); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } + + return s0; + } + + function peg$parsetextLine() { + var s0, s1, s2, s3, s4, s5, s6; + + s0 = peg$currPos; + s1 = peg$parsetextLineStart(); + if (s1 !== null) { + s2 = peg$parsetextNodes(); + if (s2 !== null) { + s3 = peg$currPos; + s4 = peg$parseindentation(); + if (s4 !== null) { + s5 = []; + s6 = peg$parsewhitespaceableTextNodes(); + while (s6 !== null) { + s5.push(s6); + s6 = peg$parsewhitespaceableTextNodes(); + } + if (s5 !== null) { + s6 = peg$parseDEDENT(); + if (s6 !== null) { + s4 = [s4, s5, s6]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$c0; + } + } else { + peg$currPos = s3; + s3 = peg$c0; + } + } else { + peg$currPos = s3; + s3 = peg$c0; + } + if (s3 === null) { + s3 = peg$c1; + } + if (s3 !== null) { + peg$reportedPos = s0; + s1 = peg$c110(s1, s2, s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsetextNodes() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parsepreMustacheText(); + if (s1 === null) { + s1 = peg$c1; + } + if (s1 !== null) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parserawMustache(); + if (s4 !== null) { + s5 = peg$parsepreMustacheText(); + if (s5 === null) { + s5 = peg$c1; + } + if (s5 !== null) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$c0; + } + } else { + peg$currPos = s3; + s3 = peg$c0; + } + while (s3 !== null) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parserawMustache(); + if (s4 !== null) { + s5 = peg$parsepreMustacheText(); + if (s5 === null) { + s5 = peg$c1; + } + if (s5 !== null) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$c0; + } + } else { + peg$currPos = s3; + s3 = peg$c0; + } + } + if (s2 !== null) { + s3 = peg$parseTERM(); + if (s3 !== null) { + peg$reportedPos = s0; + s1 = peg$c111(s1, s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseattributeTextNodes() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 34) { + s1 = peg$c93; + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c94); } + } + if (s1 !== null) { + s2 = peg$parseattributeTextNodesInner(); + if (s2 !== null) { + if (input.charCodeAt(peg$currPos) === 34) { + s3 = peg$c93; + peg$currPos++; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c94); } + } + if (s3 !== null) { + peg$reportedPos = s0; + s1 = peg$c54(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + if (s0 === null) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 39) { + s1 = peg$c95; + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c96); } + } + if (s1 !== null) { + s2 = peg$parseattributeTextNodesInnerSingle(); + if (s2 !== null) { + if (input.charCodeAt(peg$currPos) === 39) { + s3 = peg$c95; + peg$currPos++; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c96); } + } + if (s3 !== null) { + peg$reportedPos = s0; + s1 = peg$c54(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } + + return s0; + } + + function peg$parseattributeTextNodesInner() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parsepreAttrMustacheText(); + if (s1 === null) { + s1 = peg$c1; + } + if (s1 !== null) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parserawMustache(); + if (s4 !== null) { + s5 = peg$parsepreAttrMustacheText(); + if (s5 === null) { + s5 = peg$c1; + } + if (s5 !== null) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$c0; + } + } else { + peg$currPos = s3; + s3 = peg$c0; + } + while (s3 !== null) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parserawMustache(); + if (s4 !== null) { + s5 = peg$parsepreAttrMustacheText(); + if (s5 === null) { + s5 = peg$c1; + } + if (s5 !== null) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$c0; + } + } else { + peg$currPos = s3; + s3 = peg$c0; + } + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c112(s1, s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseattributeTextNodesInnerSingle() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parsepreAttrMustacheTextSingle(); + if (s1 === null) { + s1 = peg$c1; + } + if (s1 !== null) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parserawMustache(); + if (s4 !== null) { + s5 = peg$parsepreAttrMustacheTextSingle(); + if (s5 === null) { + s5 = peg$c1; + } + if (s5 !== null) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$c0; + } + } else { + peg$currPos = s3; + s3 = peg$c0; + } + while (s3 !== null) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parserawMustache(); + if (s4 !== null) { + s5 = peg$parsepreAttrMustacheTextSingle(); + if (s5 === null) { + s5 = peg$c1; + } + if (s5 !== null) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$c0; + } + } else { + peg$currPos = s3; + s3 = peg$c0; + } + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c112(s1, s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parserawMustache() { + var s0; + + s0 = peg$parserawMustacheUnescaped(); + if (s0 === null) { + s0 = peg$parserawMustacheEscaped(); + } + + return s0; + } + + function peg$parserecursivelyParsedMustacheContent() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + if (input.charCodeAt(peg$currPos) === 123) { + s2 = peg$c113; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c114); } + } + peg$silentFails--; + if (s2 === null) { + s1 = peg$c1; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + if (s1 !== null) { + s2 = peg$currPos; + s3 = []; + if (peg$c115.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = null; + if (peg$silentFails === 0) { peg$fail(peg$c116); } + } + while (s4 !== null) { + s3.push(s4); + if (peg$c115.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = null; + if (peg$silentFails === 0) { peg$fail(peg$c116); } + } + } + if (s3 !== null) { + s3 = input.substring(s2, peg$currPos); + } + s2 = s3; + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c117(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parserawMustacheEscaped() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parsedoubleOpen(); + if (s1 !== null) { + s2 = peg$parse_(); + if (s2 !== null) { + s3 = peg$parserecursivelyParsedMustacheContent(); + if (s3 !== null) { + s4 = peg$parse_(); + if (s4 !== null) { + s5 = peg$parsedoubleClose(); + if (s5 !== null) { + peg$reportedPos = s0; + s1 = peg$c118(s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + if (s0 === null) { + s0 = peg$currPos; + s1 = peg$parsehashStacheOpen(); + if (s1 !== null) { + s2 = peg$parse_(); + if (s2 !== null) { + s3 = peg$parserecursivelyParsedMustacheContent(); + if (s3 !== null) { + s4 = peg$parse_(); + if (s4 !== null) { + s5 = peg$parsehashStacheClose(); + if (s5 !== null) { + peg$reportedPos = s0; + s1 = peg$c118(s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } + + return s0; + } + + function peg$parserawMustacheUnescaped() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parsetripleOpen(); + if (s1 !== null) { + s2 = peg$parse_(); + if (s2 !== null) { + s3 = peg$parserecursivelyParsedMustacheContent(); + if (s3 !== null) { + s4 = peg$parse_(); + if (s4 !== null) { + s5 = peg$parsetripleClose(); + if (s5 !== null) { + peg$reportedPos = s0; + s1 = peg$c119(s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsepreAttrMustacheText() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$currPos; + s2 = []; + s3 = peg$parsepreAttrMustacheUnit(); + if (s3 !== null) { + while (s3 !== null) { + s2.push(s3); + s3 = peg$parsepreAttrMustacheUnit(); + } + } else { + s2 = peg$c0; + } + if (s2 !== null) { + s2 = input.substring(s1, peg$currPos); + } + s1 = s2; + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c120(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + + return s0; + } + + function peg$parsepreAttrMustacheTextSingle() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$currPos; + s2 = []; + s3 = peg$parsepreAttrMustacheUnitSingle(); + if (s3 !== null) { + while (s3 !== null) { + s2.push(s3); + s3 = peg$parsepreAttrMustacheUnitSingle(); + } + } else { + s2 = peg$c0; + } + if (s2 !== null) { + s2 = input.substring(s1, peg$currPos); + } + s1 = s2; + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c120(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + + return s0; + } + + function peg$parsepreAttrMustacheUnit() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parsenonMustacheUnit(); + if (s2 === null) { + if (input.charCodeAt(peg$currPos) === 34) { + s2 = peg$c93; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c94); } + } + } + peg$silentFails--; + if (s2 === null) { + s1 = peg$c1; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + if (s1 !== null) { + if (input.length > peg$currPos) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c121); } + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c28(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsepreAttrMustacheUnitSingle() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parsenonMustacheUnit(); + if (s2 === null) { + if (input.charCodeAt(peg$currPos) === 39) { + s2 = peg$c95; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c96); } + } + } + peg$silentFails--; + if (s2 === null) { + s1 = peg$c1; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + if (s1 !== null) { + if (input.length > peg$currPos) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c121); } + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c28(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsepreMustacheText() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$currPos; + s2 = []; + s3 = peg$parsepreMustacheUnit(); + if (s3 !== null) { + while (s3 !== null) { + s2.push(s3); + s3 = peg$parsepreMustacheUnit(); + } + } else { + s2 = peg$c0; + } + if (s2 !== null) { + s2 = input.substring(s1, peg$currPos); + } + s1 = s2; + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c120(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + + return s0; + } + + function peg$parsepreMustacheUnit() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parsenonMustacheUnit(); + peg$silentFails--; + if (s2 === null) { + s1 = peg$c1; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + if (s1 !== null) { + if (input.length > peg$currPos) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c121); } + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c28(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsenonMustacheUnit() { + var s0; + + s0 = peg$parsetripleOpen(); + if (s0 === null) { + s0 = peg$parsedoubleOpen(); + if (s0 === null) { + s0 = peg$parsehashStacheOpen(); + if (s0 === null) { + s0 = peg$parseanyDedent(); + if (s0 === null) { + s0 = peg$parseTERM(); + } + } + } + } + + return s0; + } + + function peg$parserawMustacheSingle() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parsesingleOpen(); + if (s1 !== null) { + s2 = peg$parse_(); + if (s2 !== null) { + s3 = peg$parserecursivelyParsedMustacheContent(); + if (s3 !== null) { + s4 = peg$parse_(); + if (s4 !== null) { + s5 = peg$parsesingleClose(); + if (s5 !== null) { + peg$reportedPos = s0; + s1 = peg$c118(s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseinTagMustache() { + var s0; + + s0 = peg$parserawMustacheSingle(); + if (s0 === null) { + s0 = peg$parserawMustacheUnescaped(); + if (s0 === null) { + s0 = peg$parserawMustacheEscaped(); + } + } + + return s0; + } + + function peg$parsesingleOpen() { + var s0, s1; + + peg$silentFails++; + if (input.charCodeAt(peg$currPos) === 123) { + s0 = peg$c113; + peg$currPos++; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c114); } + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c122); } + } + + return s0; + } + + function peg$parsedoubleOpen() { + var s0, s1; + + peg$silentFails++; + if (input.substr(peg$currPos, 2) === peg$c124) { + s0 = peg$c124; + peg$currPos += 2; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c125); } + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c123); } + } + + return s0; + } + + function peg$parsetripleOpen() { + var s0, s1; + + peg$silentFails++; + if (input.substr(peg$currPos, 3) === peg$c127) { + s0 = peg$c127; + peg$currPos += 3; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c128); } + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c126); } + } + + return s0; + } + + function peg$parsesingleClose() { + var s0, s1; + + peg$silentFails++; + if (input.charCodeAt(peg$currPos) === 125) { + s0 = peg$c130; + peg$currPos++; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c131); } + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c129); } + } + + return s0; + } + + function peg$parsedoubleClose() { + var s0, s1; + + peg$silentFails++; + if (input.substr(peg$currPos, 2) === peg$c133) { + s0 = peg$c133; + peg$currPos += 2; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c134); } + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c132); } + } + + return s0; + } + + function peg$parsetripleClose() { + var s0, s1; + + peg$silentFails++; + if (input.substr(peg$currPos, 3) === peg$c136) { + s0 = peg$c136; + peg$currPos += 3; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c137); } + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c135); } + } + + return s0; + } + + function peg$parsesexprOpen() { + var s0, s1; + + peg$silentFails++; + if (input.charCodeAt(peg$currPos) === 40) { + s0 = peg$c139; + peg$currPos++; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c140); } + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c138); } + } + + return s0; + } + + function peg$parsesexprClose() { + var s0, s1; + + peg$silentFails++; + if (input.charCodeAt(peg$currPos) === 41) { + s0 = peg$c142; + peg$currPos++; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c143); } + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c141); } + } + + return s0; + } + + function peg$parsehashStacheOpen() { + var s0, s1; + + peg$silentFails++; + if (input.substr(peg$currPos, 2) === peg$c145) { + s0 = peg$c145; + peg$currPos += 2; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c146); } + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c144); } + } + + return s0; + } + + function peg$parsehashStacheClose() { + var s0, s1; + + peg$silentFails++; + if (input.charCodeAt(peg$currPos) === 125) { + s0 = peg$c130; + peg$currPos++; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c131); } + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c147); } + } + + return s0; + } + + function peg$parseequalSign() { + var s0, s1, s2; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c148) { + s1 = peg$c148; + peg$currPos += 2; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c149); } + } + if (s1 !== null) { + if (input.charCodeAt(peg$currPos) === 32) { + s2 = peg$c25; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c26); } + } + if (s2 === null) { + s2 = peg$c1; + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c150(); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + if (s0 === null) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 61) { + s1 = peg$c4; + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c5); } + } + if (s1 !== null) { + if (input.charCodeAt(peg$currPos) === 32) { + s2 = peg$c25; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c26); } + } + if (s2 === null) { + s2 = peg$c1; + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c151(); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } + + return s0; + } + + function peg$parsehtmlStart() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$parsehtmlTagName(); + if (s1 === null) { + s1 = peg$c1; + } + if (s1 !== null) { + s2 = peg$parseshorthandAttributes(); + if (s2 === null) { + s2 = peg$c1; + } + if (s2 !== null) { + if (input.charCodeAt(peg$currPos) === 47) { + s3 = peg$c20; + peg$currPos++; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c21); } + } + if (s3 === null) { + s3 = peg$c1; + } + if (s3 !== null) { + peg$reportedPos = peg$currPos; + s4 = peg$c152(s1, s2); + if (s4) { + s4 = peg$c1; + } else { + s4 = peg$c0; + } + if (s4 !== null) { + s1 = [s1, s2, s3, s4]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseinHtmlTag() { + var s0, s1, s2, s3, s4, s5, s6; + + s0 = peg$currPos; + s1 = peg$parsehtmlStart(); + if (s1 !== null) { + if (input.substr(peg$currPos, 2) === peg$c44) { + s2 = peg$c44; + peg$currPos += 2; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c45); } + } + if (s2 !== null) { + s3 = []; + s4 = peg$parseTERM(); + while (s4 !== null) { + s3.push(s4); + s4 = peg$parseTERM(); + } + if (s3 !== null) { + s4 = []; + s5 = peg$parseinTagMustache(); + while (s5 !== null) { + s4.push(s5); + s5 = peg$parseinTagMustache(); + } + if (s4 !== null) { + s5 = []; + s6 = peg$parsebracketedAttribute(); + if (s6 !== null) { + while (s6 !== null) { + s5.push(s6); + s6 = peg$parsebracketedAttribute(); + } + } else { + s5 = peg$c0; + } + if (s5 !== null) { + peg$reportedPos = s0; + s1 = peg$c153(s1, s4, s5); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + if (s0 === null) { + s0 = peg$currPos; + s1 = peg$parsehtmlStart(); + if (s1 !== null) { + s2 = []; + s3 = peg$parseinTagMustache(); + while (s3 !== null) { + s2.push(s3); + s3 = peg$parseinTagMustache(); + } + if (s2 !== null) { + s3 = []; + s4 = peg$parsefullAttribute(); + while (s4 !== null) { + s3.push(s4); + s4 = peg$parsefullAttribute(); + } + if (s3 !== null) { + peg$reportedPos = s0; + s1 = peg$c153(s1, s2, s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } + + return s0; + } + + function peg$parseshorthandAttributes() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = []; + s2 = peg$currPos; + s3 = peg$parseidShorthand(); + if (s3 !== null) { + peg$reportedPos = s2; + s3 = peg$c154(s3); + } + if (s3 === null) { + peg$currPos = s2; + s2 = s3; + } else { + s2 = s3; + } + if (s2 === null) { + s2 = peg$currPos; + s3 = peg$parseclassShorthand(); + if (s3 !== null) { + peg$reportedPos = s2; + s3 = peg$c155(s3); + } + if (s3 === null) { + peg$currPos = s2; + s2 = s3; + } else { + s2 = s3; + } + } + if (s2 !== null) { + while (s2 !== null) { + s1.push(s2); + s2 = peg$currPos; + s3 = peg$parseidShorthand(); + if (s3 !== null) { + peg$reportedPos = s2; + s3 = peg$c154(s3); + } + if (s3 === null) { + peg$currPos = s2; + s2 = s3; + } else { + s2 = s3; + } + if (s2 === null) { + s2 = peg$currPos; + s3 = peg$parseclassShorthand(); + if (s3 !== null) { + peg$reportedPos = s2; + s3 = peg$c155(s3); + } + if (s3 === null) { + peg$currPos = s2; + s2 = s3; + } else { + s2 = s3; + } + } + } + } else { + s1 = peg$c0; + } + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c156(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + + return s0; + } + + function peg$parsefullAttribute() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + if (input.charCodeAt(peg$currPos) === 32) { + s2 = peg$c25; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c26); } + } + if (s2 !== null) { + while (s2 !== null) { + s1.push(s2); + if (input.charCodeAt(peg$currPos) === 32) { + s2 = peg$c25; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c26); } + } + } + } else { + s1 = peg$c0; + } + if (s1 !== null) { + s2 = peg$parseactionAttribute(); + if (s2 === null) { + s2 = peg$parsebooleanAttribute(); + if (s2 === null) { + s2 = peg$parseboundAttribute(); + if (s2 === null) { + s2 = peg$parserawMustacheAttribute(); + if (s2 === null) { + s2 = peg$parsenormalAttribute(); + } + } + } + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c157(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsebracketedAttribute() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseINDENT(); + while (s2 !== null) { + s1.push(s2); + s2 = peg$parseINDENT(); + } + if (s1 !== null) { + s2 = []; + if (input.charCodeAt(peg$currPos) === 32) { + s3 = peg$c25; + peg$currPos++; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c26); } + } + while (s3 !== null) { + s2.push(s3); + if (input.charCodeAt(peg$currPos) === 32) { + s3 = peg$c25; + peg$currPos++; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c26); } + } + } + if (s2 !== null) { + s3 = peg$parseactionAttribute(); + if (s3 === null) { + s3 = peg$parsebooleanAttribute(); + if (s3 === null) { + s3 = peg$parseboundAttribute(); + if (s3 === null) { + s3 = peg$parserawMustacheAttribute(); + if (s3 === null) { + s3 = peg$parsenormalAttribute(); + } + } + } + } + if (s3 !== null) { + s4 = []; + s5 = peg$parseTERM(); + while (s5 !== null) { + s4.push(s5); + s5 = peg$parseTERM(); + } + if (s4 !== null) { + peg$reportedPos = s0; + s1 = peg$c157(s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseboundAttributeValueChar() { + var s0; + + if (peg$c158.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c159); } + } + if (s0 === null) { + s0 = peg$parsenonSeparatorColon(); + } + + return s0; + } + + function peg$parseactionValue() { + var s0, s1; + + s0 = peg$parsequotedActionValue(); + if (s0 === null) { + s0 = peg$currPos; + s1 = peg$parsepathIdNode(); + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c160(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } + + return s0; + } + + function peg$parsequotedActionValue() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 34) { + s2 = peg$c93; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c94); } + } + if (s2 !== null) { + s3 = peg$parseinMustache(); + if (s3 !== null) { + if (input.charCodeAt(peg$currPos) === 34) { + s4 = peg$c93; + peg$currPos++; + } else { + s4 = null; + if (peg$silentFails === 0) { peg$fail(peg$c94); } + } + if (s4 !== null) { + s2 = [s2, s3, s4]; + s1 = s2; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + } else { + peg$currPos = s1; + s1 = peg$c0; + } + } else { + peg$currPos = s1; + s1 = peg$c0; + } + if (s1 === null) { + s1 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 39) { + s2 = peg$c95; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c96); } + } + if (s2 !== null) { + s3 = peg$parseinMustache(); + if (s3 !== null) { + if (input.charCodeAt(peg$currPos) === 39) { + s4 = peg$c95; + peg$currPos++; + } else { + s4 = null; + if (peg$silentFails === 0) { peg$fail(peg$c96); } + } + if (s4 !== null) { + s2 = [s2, s3, s4]; + s1 = s2; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + } else { + peg$currPos = s1; + s1 = peg$c0; + } + } else { + peg$currPos = s1; + s1 = peg$c0; + } + } + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c97(s1); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + + return s0; + } + + function peg$parseactionAttribute() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parseknownEvent(); + if (s1 !== null) { + if (input.charCodeAt(peg$currPos) === 61) { + s2 = peg$c4; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c5); } + } + if (s2 !== null) { + s3 = peg$parseactionValue(); + if (s3 !== null) { + peg$reportedPos = s0; + s1 = peg$c161(s1, s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsebooleanAttribute() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parsekey(); + if (s1 !== null) { + if (input.charCodeAt(peg$currPos) === 61) { + s2 = peg$c4; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c5); } + } + if (s2 !== null) { + if (input.substr(peg$currPos, 4) === peg$c83) { + s3 = peg$c83; + peg$currPos += 4; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c84); } + } + if (s3 === null) { + if (input.substr(peg$currPos, 5) === peg$c85) { + s3 = peg$c85; + peg$currPos += 5; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c86); } + } + } + if (s3 !== null) { + peg$reportedPos = s0; + s1 = peg$c162(s1, s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseboundAttributeValue() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c113; + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c114); } + } + if (s1 !== null) { + s2 = peg$parse_(); + if (s2 !== null) { + s3 = peg$currPos; + s4 = []; + s5 = peg$parseboundAttributeValueChar(); + if (s5 === null) { + if (input.charCodeAt(peg$currPos) === 32) { + s5 = peg$c25; + peg$currPos++; + } else { + s5 = null; + if (peg$silentFails === 0) { peg$fail(peg$c26); } + } + } + if (s5 !== null) { + while (s5 !== null) { + s4.push(s5); + s5 = peg$parseboundAttributeValueChar(); + if (s5 === null) { + if (input.charCodeAt(peg$currPos) === 32) { + s5 = peg$c25; + peg$currPos++; + } else { + s5 = null; + if (peg$silentFails === 0) { peg$fail(peg$c26); } + } + } + } + } else { + s4 = peg$c0; + } + if (s4 !== null) { + s4 = input.substring(s3, peg$currPos); + } + s3 = s4; + if (s3 !== null) { + s4 = peg$parse_(); + if (s4 !== null) { + if (input.charCodeAt(peg$currPos) === 125) { + s5 = peg$c130; + peg$currPos++; + } else { + s5 = null; + if (peg$silentFails === 0) { peg$fail(peg$c131); } + } + if (s5 !== null) { + peg$reportedPos = s0; + s1 = peg$c163(s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + if (s0 === null) { + s0 = peg$currPos; + s1 = []; + s2 = peg$parseboundAttributeValueChar(); + if (s2 !== null) { + while (s2 !== null) { + s1.push(s2); + s2 = peg$parseboundAttributeValueChar(); + } + } else { + s1 = peg$c0; + } + if (s1 !== null) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + } + + return s0; + } + + function peg$parseboundAttribute() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parsekey(); + if (s1 !== null) { + if (input.charCodeAt(peg$currPos) === 61) { + s2 = peg$c4; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c5); } + } + if (s2 !== null) { + s3 = peg$parseboundAttributeValue(); + if (s3 !== null) { + s4 = peg$currPos; + peg$silentFails++; + if (input.charCodeAt(peg$currPos) === 33) { + s5 = peg$c164; + peg$currPos++; + } else { + s5 = null; + if (peg$silentFails === 0) { peg$fail(peg$c165); } + } + peg$silentFails--; + if (s5 === null) { + s4 = peg$c1; + } else { + peg$currPos = s4; + s4 = peg$c0; + } + if (s4 !== null) { + peg$reportedPos = peg$currPos; + s5 = peg$c166(s1, s3); + if (s5) { + s5 = peg$c1; + } else { + s5 = peg$c0; + } + if (s5 !== null) { + peg$reportedPos = s0; + s1 = peg$c167(s1, s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parserawMustacheAttribute() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parsekey(); + if (s1 !== null) { + if (input.charCodeAt(peg$currPos) === 61) { + s2 = peg$c4; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c5); } + } + if (s2 !== null) { + s3 = peg$parsepathIdNode(); + if (s3 !== null) { + peg$reportedPos = s0; + s1 = peg$c168(s1, s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsenormalAttribute() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parsekey(); + if (s1 !== null) { + if (input.charCodeAt(peg$currPos) === 61) { + s2 = peg$c4; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c5); } + } + if (s2 !== null) { + s3 = peg$parseattributeTextNodes(); + if (s3 !== null) { + peg$reportedPos = s0; + s1 = peg$c169(s1, s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseattributeName() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseattributeChar(); + while (s2 !== null) { + s1.push(s2); + s2 = peg$parseattributeChar(); + } + if (s1 !== null) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + + return s0; + } + + function peg$parseattributeChar() { + var s0; + + s0 = peg$parsealpha(); + if (s0 === null) { + if (peg$c90.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c91); } + } + if (s0 === null) { + if (input.charCodeAt(peg$currPos) === 95) { + s0 = peg$c170; + peg$currPos++; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c171); } + } + if (s0 === null) { + if (input.charCodeAt(peg$currPos) === 45) { + s0 = peg$c88; + peg$currPos++; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c89); } + } + } + } + } + + return s0; + } + + function peg$parsetagNameShorthand() { + var s0, s1, s2; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 37) { + s1 = peg$c172; + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c173); } + } + if (s1 !== null) { + s2 = peg$parsecssIdentifier(); + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c28(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseidShorthand() { + var s0, s1, s2; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 35) { + s1 = peg$c174; + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c175); } + } + if (s1 !== null) { + s2 = peg$parsecssIdentifier(); + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c176(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseclassShorthand() { + var s0, s1, s2; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 46) { + s1 = peg$c59; + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c60); } + } + if (s1 !== null) { + s2 = peg$parsecssIdentifier(); + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c28(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsecssIdentifier() { + var s0, s1; + + peg$silentFails++; + s0 = peg$parseident(); + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c177); } + } + + return s0; + } + + function peg$parseident() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parsenmchar(); + if (s2 !== null) { + while (s2 !== null) { + s1.push(s2); + s2 = peg$parsenmchar(); + } + } else { + s1 = peg$c0; + } + if (s1 !== null) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + + return s0; + } + + function peg$parsenmchar() { + var s0; + + if (peg$c178.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c179); } + } + if (s0 === null) { + s0 = peg$parsenonascii(); + } + + return s0; + } + + function peg$parsenmstart() { + var s0; + + if (peg$c180.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c181); } + } + if (s0 === null) { + s0 = peg$parsenonascii(); + } + + return s0; + } + + function peg$parsenonascii() { + var s0; + + if (peg$c182.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c183); } + } + + return s0; + } + + function peg$parsetagString() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parsetagChar(); + if (s2 !== null) { + while (s2 !== null) { + s1.push(s2); + s2 = peg$parsetagChar(); + } + } else { + s1 = peg$c0; + } + if (s1 !== null) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + + return s0; + } + + function peg$parsehtmlTagName() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 37) { + s1 = peg$c172; + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c173); } + } + if (s1 !== null) { + s2 = peg$parse_(); + if (s2 !== null) { + s3 = peg$parsetagString(); + if (s3 !== null) { + peg$reportedPos = s0; + s1 = peg$c63(s3); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + if (s0 === null) { + s0 = peg$parseknownTagName(); + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c184); } + } + + return s0; + } + + function peg$parseknownTagName() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$parsetagString(); + if (s1 !== null) { + peg$reportedPos = peg$currPos; + s2 = peg$c185(s1); + if (s2) { + s2 = peg$c1; + } else { + s2 = peg$c0; + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c186(s1); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parsetagChar() { + var s0; + + if (peg$c178.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c179); } + } + if (s0 === null) { + s0 = peg$parsenonSeparatorColon(); + } + + return s0; + } + + function peg$parsenonSeparatorColon() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 58) { + s1 = peg$c68; + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c69); } + } + if (s1 !== null) { + s2 = peg$currPos; + peg$silentFails++; + if (input.charCodeAt(peg$currPos) === 32) { + s3 = peg$c25; + peg$currPos++; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c26); } + } + peg$silentFails--; + if (s3 === null) { + s2 = peg$c1; + } else { + peg$currPos = s2; + s2 = peg$c0; + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c28(s1); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseknownEvent() { + var s0, s1, s2; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parsetagString(); + if (s1 !== null) { + peg$reportedPos = peg$currPos; + s2 = peg$c188(s1); + if (s2) { + s2 = peg$c1; + } else { + s2 = peg$c0; + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c186(s1); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c187); } + } + + return s0; + } + + function peg$parseindentation() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$parseINDENT(); + if (s1 !== null) { + s2 = peg$parse__(); + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c63(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseINDENT() { + var s0, s1; + + peg$silentFails++; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 61423) { + s1 = peg$c190; + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c191); } + } + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c192(); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c189); } + } + + return s0; + } + + function peg$parseDEDENT() { + var s0, s1; + + peg$silentFails++; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 61438) { + s1 = peg$c194; + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c195); } + } + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c192(); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c193); } + } + + return s0; + } + + function peg$parseUNMATCHED_DEDENT() { + var s0, s1; + + peg$silentFails++; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 61422) { + s1 = peg$c197; + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c198); } + } + if (s1 !== null) { + peg$reportedPos = s0; + s1 = peg$c192(); + } + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c196); } + } + + return s0; + } + + function peg$parseTERM() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 13) { + s1 = peg$c200; + peg$currPos++; + } else { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c201); } + } + if (s1 === null) { + s1 = peg$c1; + } + if (s1 !== null) { + if (input.charCodeAt(peg$currPos) === 61439) { + s2 = peg$c202; + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c203); } + } + if (s2 !== null) { + if (input.charCodeAt(peg$currPos) === 10) { + s3 = peg$c204; + peg$currPos++; + } else { + s3 = null; + if (peg$silentFails === 0) { peg$fail(peg$c205); } + } + if (s3 !== null) { + peg$reportedPos = s0; + s1 = peg$c150(); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c199); } + } + + return s0; + } + + function peg$parseanyDedent() { + var s0, s1; + + peg$silentFails++; + s0 = peg$parseDEDENT(); + if (s0 === null) { + s0 = peg$parseUNMATCHED_DEDENT(); + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c206); } + } + + return s0; + } + + function peg$parse__() { + var s0, s1, s2; + + peg$silentFails++; + s0 = peg$currPos; + s1 = []; + s2 = peg$parsewhitespace(); + if (s2 !== null) { + while (s2 !== null) { + s1.push(s2); + s2 = peg$parsewhitespace(); + } + } else { + s1 = peg$c0; + } + if (s1 !== null) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c207); } + } + + return s0; + } + + function peg$parse_() { + var s0, s1; + + peg$silentFails++; + s0 = []; + s1 = peg$parsewhitespace(); + while (s1 !== null) { + s0.push(s1); + s1 = peg$parsewhitespace(); + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c208); } + } + + return s0; + } + + function peg$parsewhitespace() { + var s0, s1; + + peg$silentFails++; + if (peg$c210.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = null; + if (peg$silentFails === 0) { peg$fail(peg$c211); } + } + peg$silentFails--; + if (s0 === null) { + s1 = null; + if (peg$silentFails === 0) { peg$fail(peg$c209); } + } + + return s0; + } + + function peg$parselineChar() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parseINDENT(); + if (s2 === null) { + s2 = peg$parseDEDENT(); + if (s2 === null) { + s2 = peg$parseTERM(); + } + } + peg$silentFails--; + if (s2 === null) { + s1 = peg$c1; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + if (s1 !== null) { + if (input.length > peg$currPos) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = null; + if (peg$silentFails === 0) { peg$fail(peg$c121); } + } + if (s2 !== null) { + peg$reportedPos = s0; + s1 = peg$c28(s2); + if (s1 === null) { + peg$currPos = s0; + s0 = s1; + } else { + s0 = s1; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parselineContent() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parselineChar(); + while (s2 !== null) { + s1.push(s2); + s2 = peg$parselineChar(); + } + if (s1 !== null) { + s1 = input.substring(s0, peg$currPos); + } + s0 = s1; + + return s0; + } + + + var handlebarsVariant = Emblem.handlebarsVariant; + var IS_EMBER = handlebarsVariant.JavaScriptCompiler.prototype.namespace === "Ember.Handlebars"; + var AST = handlebarsVariant.AST; + + var SELF_CLOSING_TAG = { + area: true, + base: true, + br: true, + col: true, + command: true, + embed: true, + hr: true, + img: true, + input: true, + keygen: true, + link: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true + }; + var KNOWN_TAGS = { + figcaption: true, blockquote: true, plaintext: true, textarea: true, progress: true, + optgroup: true, noscript: true, noframes: true, frameset: true, fieldset: true, + datalist: true, colgroup: true, basefont: true, summary: true, section: true, + marquee: true, listing: true, isindex: true, details: true, command: true, + caption: true, bgsound: true, article: true, address: true, acronym: true, + strong: true, strike: true, spacer: true, source: true, select: true, + script: true, output: true, option: true, object: true, legend: true, + keygen: true, iframe: true, hgroup: true, header: true, footer: true, + figure: true, center: true, canvas: true, button: true, applet: true, video: true, + track: true, title: true, thead: true, tfoot: true, tbody: true, table: true, + style: true, small: true, param: true, meter: true, label: true, input: true, + frame: true, embed: true, blink: true, audio: true, aside: true, time: true, + span: true, samp: true, ruby: true, nobr: true, meta: true, menu: true, + mark: true, main: true, link: true, html: true, head: true, form: true, + font: true, data: true, code: true, cite: true, body: true, base: true, + area: true, abbr: true, xmp: true, wbr: true, 'var': true, sup: true, + sub: true, pre: true, nav: true, map: true, kbd: true, ins: true, + img: true, div: true, dir: true, dfn: true, del: true, col: true, + big: true, bdo: true, bdi: true, ul: true, tt: true, tr: true, th: true, td: true, + rt: true, rp: true, ol: true, li: true, hr: true, h6: true, h5: true, h4: true, + h3: true, h2: true, h1: true, em: true, dt: true, dl: true, dd: true, br: true, + u: true, s: true, q: true, p: true, i: true, b: true, a: true + }; + + var KNOWN_EVENTS = { + "touchStart": true, "touchMove": true, "touchEnd": true, "touchCancel": true, + "keyDown": true, "keyUp": true, "keyPress": true, "mouseDown": true, "mouseUp": true, + "contextMenu": true, "click": true, "doubleClick": true, "mouseMove": true, + "focusIn": true, "focusOut": true, "mouseEnter": true, "mouseLeave": true, + "submit": true, "input": true, "change": true, "dragStart": true, + "drag": true, "dragEnter": true, "dragLeave": true, + "dragOver": true, "drop": true, "dragEnd": true + }; + + // Ridiculous that we have to do this, but PEG doesn't + // support unmatched closing braces in JS code, + // so we have to construct. + var closeBrace = String.fromCharCode(125); + var twoBrace = closeBrace + closeBrace; + var threeBrace = twoBrace + closeBrace; + + var use11AST = handlebarsVariant.VERSION.slice(0, 3) >= 1.1; + var useSexprNodes = handlebarsVariant.VERSION.slice(0, 3) >= 1.3; + + function createMustacheNode(params, hash, escaped) { + if (use11AST) { + var open = escaped ? twoBrace : threeBrace; + return new AST.MustacheNode(params, hash, open, { left: false, right: false }); + } else { + // old style + return new AST.MustacheNode(params, hash, !escaped); + } + } + + function createProgramNode(statements, inverse) { + if (use11AST) { + return new AST.ProgramNode(statements, { left: false, right: false}, inverse, null); + } else { + return new AST.ProgramNode(statements, inverse); + } + } + + // Returns a new MustacheNode with a new preceding param (id). + function unshiftParam(mustacheNode, helperName, newHashPairs) { + + var hash = mustacheNode.hash; + + // Merge hash. + if(newHashPairs) { + hash = hash || new AST.HashNode([]); + + for(var i = 0; i < newHashPairs.length; ++i) { + hash.pairs.push(newHashPairs[i]); + } + } + + var params = [mustacheNode.id].concat(mustacheNode.params); + params.unshift(new AST.IdNode([{ part: helperName}])); + return createMustacheNode(params, hash, mustacheNode.escaped); + } + + function textNodesResult(first, tail) { + var ret = []; + if(first) { ret.push(first); } + for(var i = 0; i < tail.length; ++i) { + var t = tail[i]; + ret.push(t[0]); + if(t[1]) { ret.push(t[1]); } + } + return ret; + } + + // Only for debugging use. + function log(msg) { + handlebarsVariant.log(9, msg); + } + function parseSexpr(path, params, hash){ + var actualParams = []; + var attrs = {}; + var hasAttrs = false; + + // Convert shorthand html attributes (e.g. % = tagName, . = class, etc) + for(var i = 0; i < params.length; ++i) { + var p = params[i]; + var attrKey = p[0]; + if(attrKey == 'tagName' || attrKey == 'elementId' || attrKey == 'class') { + hasAttrs = true; + attrs[attrKey] = attrs[attrKey] || []; + attrs[attrKey].push(p[1]); + } else { + actualParams.push(p); + } + } + + if(hasAttrs) { + hash = hash || new AST.HashNode([]); + for(var k in attrs) { + if(!attrs.hasOwnProperty(k)) continue; + hash.pairs.push([k, new AST.StringNode(attrs[k].join(' '))]); + } + } + + actualParams.unshift(path); + + if (useSexprNodes) { + return new AST.SexprNode(actualParams, hash); + } else { + // Stub a sexpr-like node for backwards compatibility with pre-1.3 AST. + return { + id: actualParams[0], + params: actualParams.slice(1), + hash: hash + }; + } + } + function parseInHtml(h, inTagMustaches, fullAttributes) { + + var tagName = h[0] || 'div', + shorthandAttributes = h[1] || [], + id = shorthandAttributes[0], + classes = shorthandAttributes[1] || [], + tagOpenContent = [], + updateMustacheNode; + + updateMustacheNode = function (node) { + var pairs, pair, stringNode, original; + if (!classes.length) { + return; + } + if (!node.id || node.id.string !== 'bind-attr') { + return; + } + if (node.hash && node.hash.pairs && (pairs = node.hash.pairs)) { + for (var i2 in pairs) { + if (!pairs.hasOwnProperty(i2)) { continue; } + pair = pairs[i2]; + if (pair && pair[0] === 'class' && pair[1] instanceof AST.StringNode) { + stringNode = pair[1]; + original = stringNode.original; + stringNode.original = stringNode.string = stringNode.stringModeValue = ':' + classes.join(' :') + ' ' + original; + classes = []; + } + } + } + }; + + tagOpenContent.push(new AST.ContentNode('<' + tagName)); + + if(id) { + tagOpenContent.push(new AST.ContentNode(' id="' + id + '"')); + } + + // Pad in tag mustaches with spaces. + for(var i = 0; i < inTagMustaches.length; ++i) { + // Check if given mustache node has class bindings and prepend shorthand classes + updateMustacheNode(inTagMustaches[i]); + tagOpenContent.push(new AST.ContentNode(' ')); + tagOpenContent.push(inTagMustaches[i]); + } + for(var i = 0; i < fullAttributes.length; ++i) { + for (var i2 in fullAttributes[i]) { + if (fullAttributes[i][i2] instanceof AST.MustacheNode) { + updateMustacheNode(fullAttributes[i][i2]); + } + } + if (classes.length) { + var isClassAttr = fullAttributes[i][1] && fullAttributes[i][1].string === 'class="'; + + // Check if attribute is class attribute and has content + if (isClassAttr && fullAttributes[i].length === 4) { + if (fullAttributes[i][2].type == 'mustache') { + var mustacheNode, classesContent, hash, params; + // If class was mustache binding, transform attribute into bind-attr MustacheNode + // In case of 'div.shorthand class=varBinding' will transform into '
')); + return [tagOpenContent]; + } else { + + tagOpenContent.push(new AST.ContentNode('>')); + + return [tagOpenContent, new AST.ContentNode('')]; + } + } + + + peg$result = peg$startRuleFunction(); + + if (peg$result !== null && peg$currPos === input.length) { + return peg$result; + } else { + peg$cleanupExpected(peg$maxFailExpected); + peg$reportedPos = Math.max(peg$currPos, peg$maxFailPos); + + throw new SyntaxError( + peg$maxFailExpected, + peg$reportedPos < input.length ? input.charAt(peg$reportedPos) : null, + peg$reportedPos, + peg$computePosDetails(peg$reportedPos).line, + peg$computePosDetails(peg$reportedPos).column + ); + } + } + + return { + SyntaxError: SyntaxError, + parse : parse + }; +})(); + +module.exports = Emblem.Parser; + +},{"./emblem":3}],5:[function(require,module,exports){ +var Emblem, Preprocessor, StringScanner; + +StringScanner = require('StringScanner'); + +Emblem = require('./emblem'); + +Emblem.Preprocessor = Preprocessor = (function() { + var DEDENT, INDENT, TERM, UNMATCHED_DEDENT, anyWhitespaceAndNewlinesTouchingEOF, any_whitespaceFollowedByNewlines_, processInput, ws; + + ws = '\\t\\x0B\\f \\xA0\\u1680\\u180E\\u2000-\\u200A\\u202F\\u205F\\u3000\\uFEFF'; + + INDENT = '\uEFEF'; + + DEDENT = '\uEFFE'; + + UNMATCHED_DEDENT = '\uEFEE'; + + TERM = '\uEFFF'; + + anyWhitespaceAndNewlinesTouchingEOF = RegExp("[" + ws + "\\r?\\n]*$"); + + any_whitespaceFollowedByNewlines_ = RegExp("(?:[" + ws + "]*\\r?\\n)+"); + + function Preprocessor() { + this.base = null; + this.indents = []; + this.context = []; + this.context.peek = function() { + if (this.length) { + return this[this.length - 1]; + } else { + return null; + } + }; + this.context.err = function(c) { + throw new Error("Unexpected " + c); + }; + this.output = ''; + this.context.observe = function(c) { + var top; + top = this.peek(); + switch (c) { + case INDENT: + this.push(c); + break; + case DEDENT: + if (top !== INDENT) { + this.err(c); + } + this.pop(); + break; + case '\r': + if (top !== '/') { + this.err(c); + } + this.pop(); + break; + case '\n': + if (top !== '/') { + this.err(c); + } + this.pop(); + break; + case '/': + this.push(c); + break; + case 'end-\\': + if (top !== '\\') { + this.err(c); + } + this.pop(); + break; + default: + throw new Error("undefined token observed: " + c); + } + return this; + }; + if (this.StringScanner) { + this.ss = new this.StringScanner(''); + } else if (Emblem.StringScanner) { + this.ss = new Emblem.StringScanner(''); + } else { + this.ss = new StringScanner(''); + } + } + + Preprocessor.prototype.p = function(s) { + if (s) { + this.output += s; + } + return s; + }; + + Preprocessor.prototype.scan = function(r) { + return this.p(this.ss.scan(r)); + }; + + Preprocessor.prototype.discard = function(r) { + return this.ss.scan(r); + }; + + processInput = function(isEnd) { + return function(data) { + var b, d, indent, s; + if (!isEnd) { + this.ss.concat(data); + this.discard(any_whitespaceFollowedByNewlines_); + } + while (!this.ss.eos()) { + switch (this.context.peek()) { + case null: + case INDENT: + if (this.ss.bol() || this.discard(any_whitespaceFollowedByNewlines_)) { + if (this.discard(RegExp("[" + ws + "]*\\r?\\n"))) { + this.p("" + TERM + "\n"); + continue; + } + if (this.base != null) { + if ((this.discard(this.base)) == null) { + throw new Error("inconsistent base indentation"); + } + } else { + b = this.discard(RegExp("[" + ws + "]*")); + this.base = RegExp("" + b); + } + if (this.indents.length === 0) { + if (this.ss.check(RegExp("[" + ws + "]+"))) { + this.p(INDENT); + this.context.observe(INDENT); + this.indents.push(this.scan(RegExp("([" + ws + "]+)"))); + } + } else { + indent = this.indents[this.indents.length - 1]; + if (d = this.ss.check(RegExp("(" + indent + ")"))) { + this.discard(d); + if (this.ss.check(RegExp("([" + ws + "]+)"))) { + this.p(INDENT); + this.context.observe(INDENT); + this.indents.push(d + this.scan(RegExp("([" + ws + "]+)"))); + } + } else { + while (this.indents.length) { + indent = this.indents[this.indents.length - 1]; + if (this.discard(RegExp("(?:" + indent + ")"))) { + break; + } + this.context.observe(DEDENT); + this.p(DEDENT); + this.indents.pop(); + } + if (s = this.discard(RegExp("[" + ws + "]+"))) { + this.output = this.output.slice(0, -1); + this.output += UNMATCHED_DEDENT; + this.p(INDENT); + this.context.observe(INDENT); + this.indents.push(s); + } + } + } + } + this.scan(/[^\r\n]+/); + if (this.discard(/\r?\n/)) { + this.p("" + TERM + "\n"); + } + } + } + if (isEnd) { + this.scan(anyWhitespaceAndNewlinesTouchingEOF); + while (this.context.length && INDENT === this.context.peek()) { + this.context.observe(DEDENT); + this.p(DEDENT); + } + if (this.context.length) { + throw new Error('Unclosed ' + (this.context.peek()) + ' at EOF'); + } + } + }; + }; + + Preprocessor.prototype.processData = processInput(false); + + Preprocessor.prototype.processEnd = processInput(true); + + Preprocessor.processSync = function(input) { + var pre; + input += "\n"; + pre = new Preprocessor; + pre.processData(input); + pre.processEnd(); + return pre.output; + }; + + return Preprocessor; + +})(); + +},{"./emblem":3,"StringScanner":6}],6:[function(require,module,exports){ +(function() { + var StringScanner; + StringScanner = (function() { + function StringScanner(str) { + this.str = str != null ? str : ''; + this.str = '' + this.str; + this.pos = 0; + this.lastMatch = { + reset: function() { + this.str = null; + this.captures = []; + return this; + } + }.reset(); + this; + } + StringScanner.prototype.bol = function() { + return this.pos <= 0 || (this.str[this.pos - 1] === "\n"); + }; + StringScanner.prototype.captures = function() { + return this.lastMatch.captures; + }; + StringScanner.prototype.check = function(pattern) { + var matches; + if (this.str.substr(this.pos).search(pattern) !== 0) { + this.lastMatch.reset(); + return null; + } + matches = this.str.substr(this.pos).match(pattern); + this.lastMatch.str = matches[0]; + this.lastMatch.captures = matches.slice(1); + return this.lastMatch.str; + }; + StringScanner.prototype.checkUntil = function(pattern) { + var matches, patternPos; + patternPos = this.str.substr(this.pos).search(pattern); + if (patternPos < 0) { + this.lastMatch.reset(); + return null; + } + matches = this.str.substr(this.pos + patternPos).match(pattern); + this.lastMatch.captures = matches.slice(1); + return this.lastMatch.str = this.str.substr(this.pos, patternPos) + matches[0]; + }; + StringScanner.prototype.clone = function() { + var clone, prop, value, _ref; + clone = new this.constructor(this.str); + clone.pos = this.pos; + clone.lastMatch = {}; + _ref = this.lastMatch; + for (prop in _ref) { + value = _ref[prop]; + clone.lastMatch[prop] = value; + } + return clone; + }; + StringScanner.prototype.concat = function(str) { + this.str += str; + return this; + }; + StringScanner.prototype.eos = function() { + return this.pos === this.str.length; + }; + StringScanner.prototype.exists = function(pattern) { + var matches, patternPos; + patternPos = this.str.substr(this.pos).search(pattern); + if (patternPos < 0) { + this.lastMatch.reset(); + return null; + } + matches = this.str.substr(this.pos + patternPos).match(pattern); + this.lastMatch.str = matches[0]; + this.lastMatch.captures = matches.slice(1); + return patternPos; + }; + StringScanner.prototype.getch = function() { + return this.scan(/./); + }; + StringScanner.prototype.match = function() { + return this.lastMatch.str; + }; + StringScanner.prototype.matches = function(pattern) { + this.check(pattern); + return this.matchSize(); + }; + StringScanner.prototype.matched = function() { + return this.lastMatch.str != null; + }; + StringScanner.prototype.matchSize = function() { + if (this.matched()) { + return this.match().length; + } else { + return null; + } + }; + StringScanner.prototype.peek = function(len) { + return this.str.substr(this.pos, len); + }; + StringScanner.prototype.pointer = function() { + return this.pos; + }; + StringScanner.prototype.setPointer = function(pos) { + pos = +pos; + if (pos < 0) { + pos = 0; + } + if (pos > this.str.length) { + pos = this.str.length; + } + return this.pos = pos; + }; + StringScanner.prototype.reset = function() { + this.lastMatch.reset(); + this.pos = 0; + return this; + }; + StringScanner.prototype.rest = function() { + return this.str.substr(this.pos); + }; + StringScanner.prototype.scan = function(pattern) { + var chk; + chk = this.check(pattern); + if (chk != null) { + this.pos += chk.length; + } + return chk; + }; + StringScanner.prototype.scanUntil = function(pattern) { + var chk; + chk = this.checkUntil(pattern); + if (chk != null) { + this.pos += chk.length; + } + return chk; + }; + StringScanner.prototype.skip = function(pattern) { + this.scan(pattern); + return this.matchSize(); + }; + StringScanner.prototype.skipUntil = function(pattern) { + this.scanUntil(pattern); + return this.matchSize(); + }; + StringScanner.prototype.string = function() { + return this.str; + }; + StringScanner.prototype.terminate = function() { + this.pos = this.str.length; + this.lastMatch.reset(); + return this; + }; + StringScanner.prototype.toString = function() { + return "# 8 ? "" + (this.str.substr(0, 5)) + "..." : this.str)) + ">"; + }; + return StringScanner; + })(); + StringScanner.prototype.beginningOfLine = StringScanner.prototype.bol; + StringScanner.prototype.clear = StringScanner.prototype.terminate; + StringScanner.prototype.dup = StringScanner.prototype.clone; + StringScanner.prototype.endOfString = StringScanner.prototype.eos; + StringScanner.prototype.exist = StringScanner.prototype.exists; + StringScanner.prototype.getChar = StringScanner.prototype.getch; + StringScanner.prototype.position = StringScanner.prototype.pointer; + StringScanner.StringScanner = StringScanner; + module.exports = StringScanner; +}).call(this); + +},{}]},{},[3]) \ No newline at end of file diff --git a/ajax/libs/emblem/0.3.18/emblem.min.js b/ajax/libs/emblem/0.3.18/emblem.min.js new file mode 100644 index 000000000..1510653df --- /dev/null +++ b/ajax/libs/emblem/0.3.18/emblem.min.js @@ -0,0 +1,2 @@ +!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;ge;e++)f=a.charAt(e),"\n"===f?(b.seenCR||b.line++,b.column=1,b.seenCR=!1):"\r"===f||"\u2028"===f||"\u2029"===f?(b.line++,b.column=1,b.seenCR=!0):(b.column++,b.seenCR=!1)}return sg!==b&&(sg>b&&(sg=0,tg={line:1,column:1,seenCR:!1}),c(tg,sg,b),sg=b),tg}function e(a){ug>qg||(qg>ug&&(ug=qg,vg=[]),vg.push(a))}function f(a){var b=0;for(a.sort();bqg?(d=a.charAt(qg),qg++):(d=null,0===wg&&e(Ke)),null!==d?(rg=b,c=_c(d),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)):(qg=b,b=Ac),b}function qb(){var b,c,d;return b=qg,c=qg,wg++,d=tb(),null===d&&(39===a.charCodeAt(qg)?(d=me,qg++):(d=null,0===wg&&e(ne))),wg--,null===d?c=Bc:(qg=c,c=Ac),null!==c?(a.length>qg?(d=a.charAt(qg),qg++):(d=null,0===wg&&e(Ke)),null!==d?(rg=b,c=_c(d),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)):(qg=b,b=Ac),b}function rb(){var b,c,d,e;if(b=qg,c=qg,d=[],e=sb(),null!==e)for(;null!==e;)d.push(e),e=sb();else d=Ac;return null!==d&&(d=a.substring(c,qg)),c=d,null!==c&&(rg=b,c=Je(c)),null===c?(qg=b,b=c):b=c,b}function sb(){var b,c,d;return b=qg,c=qg,wg++,d=tb(),wg--,null===d?c=Bc:(qg=c,c=Ac),null!==c?(a.length>qg?(d=a.charAt(qg),qg++):(d=null,0===wg&&e(Ke)),null!==d?(rg=b,c=_c(d),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)):(qg=b,b=Ac),b}function tb(){var a;return a=yb(),null===a&&(a=xb(),null===a&&(a=Eb(),null===a&&(a=kc(),null===a&&(a=jc())))),a}function ub(){var a,b,c,d,e,f;return a=qg,b=wb(),null!==b?(c=mc(),null!==c?(d=kb(),null!==d?(e=mc(),null!==e?(f=zb(),null!==f?(rg=a,b=He(d),null===b?(qg=a,a=b):a=b):(qg=a,a=Ac)):(qg=a,a=Ac)):(qg=a,a=Ac)):(qg=a,a=Ac)):(qg=a,a=Ac),a}function vb(){var a;return a=ub(),null===a&&(a=mb(),null===a&&(a=lb())),a}function wb(){var b,c;return wg++,123===a.charCodeAt(qg)?(b=Ce,qg++):(b=null,0===wg&&e(De)),wg--,null===b&&(c=null,0===wg&&e(Le)),b}function xb(){var b,c;return wg++,a.substr(qg,2)===Ne?(b=Ne,qg+=2):(b=null,0===wg&&e(Oe)),wg--,null===b&&(c=null,0===wg&&e(Me)),b}function yb(){var b,c;return wg++,a.substr(qg,3)===Qe?(b=Qe,qg+=3):(b=null,0===wg&&e(Re)),wg--,null===b&&(c=null,0===wg&&e(Pe)),b}function zb(){var b,c;return wg++,125===a.charCodeAt(qg)?(b=Te,qg++):(b=null,0===wg&&e(Ue)),wg--,null===b&&(c=null,0===wg&&e(Se)),b}function Ab(){var b,c;return wg++,a.substr(qg,2)===We?(b=We,qg+=2):(b=null,0===wg&&e(Xe)),wg--,null===b&&(c=null,0===wg&&e(Ve)),b}function Bb(){var b,c;return wg++,a.substr(qg,3)===Ze?(b=Ze,qg+=3):(b=null,0===wg&&e($e)),wg--,null===b&&(c=null,0===wg&&e(Ye)),b}function Cb(){var b,c;return wg++,40===a.charCodeAt(qg)?(b=af,qg++):(b=null,0===wg&&e(bf)),wg--,null===b&&(c=null,0===wg&&e(_e)),b}function Db(){var b,c;return wg++,41===a.charCodeAt(qg)?(b=df,qg++):(b=null,0===wg&&e(ef)),wg--,null===b&&(c=null,0===wg&&e(cf)),b}function Eb(){var b,c;return wg++,a.substr(qg,2)===gf?(b=gf,qg+=2):(b=null,0===wg&&e(hf)),wg--,null===b&&(c=null,0===wg&&e(ff)),b}function Fb(){var b,c;return wg++,125===a.charCodeAt(qg)?(b=Te,qg++):(b=null,0===wg&&e(Ue)),wg--,null===b&&(c=null,0===wg&&e(jf)),b}function Gb(){var b,c,d;return b=qg,a.substr(qg,2)===kf?(c=kf,qg+=2):(c=null,0===wg&&e(lf)),null!==c?(32===a.charCodeAt(qg)?(d=Yc,qg++):(d=null,0===wg&&e(Zc)),null===d&&(d=Bc),null!==d?(rg=b,c=mf(),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)):(qg=b,b=Ac),null===b&&(b=qg,61===a.charCodeAt(qg)?(c=Ec,qg++):(c=null,0===wg&&e(Fc)),null!==c?(32===a.charCodeAt(qg)?(d=Yc,qg++):(d=null,0===wg&&e(Zc)),null===d&&(d=Bc),null!==d?(rg=b,c=nf(),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)):(qg=b,b=Ac)),b}function Hb(){var b,c,d,f,g;return b=qg,c=ac(),null===c&&(c=Bc),null!==c?(d=H(),null===d&&(d=Bc),null!==d?(47===a.charCodeAt(qg)?(f=Tc,qg++):(f=null,0===wg&&e(Uc)),null===f&&(f=Bc),null!==f?(rg=qg,g=of(c,d),g=g?Bc:Ac,null!==g?(c=[c,d,f,g],b=c):(qg=b,b=Ac)):(qg=b,b=Ac)):(qg=b,b=Ac)):(qg=b,b=Ac),b}function Ib(){var b,c,d,f,g,h,i;if(b=qg,c=Hb(),null!==c)if(a.substr(qg,2)===pd?(d=pd,qg+=2):(d=null,0===wg&&e(qd)),null!==d){for(f=[],g=jc();null!==g;)f.push(g),g=jc();if(null!==f){for(g=[],h=vb();null!==h;)g.push(h),h=vb();if(null!==g){if(h=[],i=Kb(),null!==i)for(;null!==i;)h.push(i),i=Kb();else h=Ac;null!==h?(rg=b,c=pf(c,g,h),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)}else qg=b,b=Ac}else qg=b,b=Ac}else qg=b,b=Ac;else qg=b,b=Ac;if(null===b)if(b=qg,c=Hb(),null!==c){for(d=[],f=vb();null!==f;)d.push(f),f=vb();if(null!==d){for(f=[],g=Jb();null!==g;)f.push(g),g=Jb();null!==f?(rg=b,c=pf(c,d,f),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)}else qg=b,b=Ac}else qg=b,b=Ac;return b}function H(){var a,b,c,d;if(a=qg,b=[],c=qg,d=Vb(),null!==d&&(rg=c,d=qf(d)),null===d?(qg=c,c=d):c=d,null===c&&(c=qg,d=Wb(),null!==d&&(rg=c,d=rf(d)),null===d?(qg=c,c=d):c=d),null!==c)for(;null!==c;)b.push(c),c=qg,d=Vb(),null!==d&&(rg=c,d=qf(d)),null===d?(qg=c,c=d):c=d,null===c&&(c=qg,d=Wb(),null!==d&&(rg=c,d=rf(d)),null===d?(qg=c,c=d):c=d);else b=Ac;return null!==b&&(rg=a,b=sf(b)),null===b?(qg=a,a=b):a=b,a}function Jb(){var b,c,d;if(b=qg,c=[],32===a.charCodeAt(qg)?(d=Yc,qg++):(d=null,0===wg&&e(Zc)),null!==d)for(;null!==d;)c.push(d),32===a.charCodeAt(qg)?(d=Yc,qg++):(d=null,0===wg&&e(Zc));else c=Ac;return null!==c?(d=Ob(),null===d&&(d=Pb(),null===d&&(d=Rb(),null===d&&(d=Sb(),null===d&&(d=Tb())))),null!==d?(rg=b,c=tf(d),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)):(qg=b,b=Ac),b}function Kb(){var b,c,d,f,g,h;for(b=qg,c=[],d=gc();null!==d;)c.push(d),d=gc();if(null!==c){for(d=[],32===a.charCodeAt(qg)?(f=Yc,qg++):(f=null,0===wg&&e(Zc));null!==f;)d.push(f),32===a.charCodeAt(qg)?(f=Yc,qg++):(f=null,0===wg&&e(Zc));if(null!==d)if(f=Ob(),null===f&&(f=Pb(),null===f&&(f=Rb(),null===f&&(f=Sb(),null===f&&(f=Tb())))),null!==f){for(g=[],h=jc();null!==h;)g.push(h),h=jc();null!==g?(rg=b,c=tf(f),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)}else qg=b,b=Ac;else qg=b,b=Ac}else qg=b,b=Ac;return b}function Lb(){var b;return uf.test(a.charAt(qg))?(b=a.charAt(qg),qg++):(b=null,0===wg&&e(vf)),null===b&&(b=dc()),b}function Mb(){var a,b;return a=Nb(),null===a&&(a=qg,b=V(),null!==b&&(rg=a,b=wf(b)),null===b?(qg=a,a=b):a=b),a}function Nb(){var b,c,d,f,g;return b=qg,c=qg,34===a.charCodeAt(qg)?(d=ke,qg++):(d=null,0===wg&&e(le)),null!==d?(f=E(),null!==f?(34===a.charCodeAt(qg)?(g=ke,qg++):(g=null,0===wg&&e(le)),null!==g?(d=[d,f,g],c=d):(qg=c,c=Ac)):(qg=c,c=Ac)):(qg=c,c=Ac),null===c&&(c=qg,39===a.charCodeAt(qg)?(d=me,qg++):(d=null,0===wg&&e(ne)),null!==d?(f=E(),null!==f?(39===a.charCodeAt(qg)?(g=me,qg++):(g=null,0===wg&&e(ne)),null!==g?(d=[d,f,g],c=d):(qg=c,c=Ac)):(qg=c,c=Ac)):(qg=c,c=Ac)),null!==c&&(rg=b,c=oe(c)),null===c?(qg=b,b=c):b=c,b}function Ob(){var b,c,d,f;return b=qg,c=ec(),null!==c?(61===a.charCodeAt(qg)?(d=Ec,qg++):(d=null,0===wg&&e(Fc)),null!==d?(f=Mb(),null!==f?(rg=b,c=xf(c,f),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)):(qg=b,b=Ac)):(qg=b,b=Ac),b}function Pb(){var b,c,d,f;return b=qg,c=P(),null!==c?(61===a.charCodeAt(qg)?(d=Ec,qg++):(d=null,0===wg&&e(Fc)),null!==d?(a.substr(qg,4)===ae?(f=ae,qg+=4):(f=null,0===wg&&e(be)),null===f&&(a.substr(qg,5)===ce?(f=ce,qg+=5):(f=null,0===wg&&e(de))),null!==f?(rg=b,c=yf(c,f),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)):(qg=b,b=Ac)):(qg=b,b=Ac),b}function Qb(){var b,c,d,f,g,h;if(b=qg,123===a.charCodeAt(qg)?(c=Ce,qg++):(c=null,0===wg&&e(De)),null!==c)if(d=mc(),null!==d){if(f=qg,g=[],h=Lb(),null===h&&(32===a.charCodeAt(qg)?(h=Yc,qg++):(h=null,0===wg&&e(Zc))),null!==h)for(;null!==h;)g.push(h),h=Lb(),null===h&&(32===a.charCodeAt(qg)?(h=Yc,qg++):(h=null,0===wg&&e(Zc)));else g=Ac;null!==g&&(g=a.substring(f,qg)),f=g,null!==f?(g=mc(),null!==g?(125===a.charCodeAt(qg)?(h=Te,qg++):(h=null,0===wg&&e(Ue)),null!==h?(rg=b,c=zf(f),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)):(qg=b,b=Ac)):(qg=b,b=Ac)}else qg=b,b=Ac;else qg=b,b=Ac;if(null===b){if(b=qg,c=[],d=Lb(),null!==d)for(;null!==d;)c.push(d),d=Lb();else c=Ac;null!==c&&(c=a.substring(b,qg)),b=c}return b}function Rb(){var b,c,d,f,g,h;return b=qg,c=P(),null!==c?(61===a.charCodeAt(qg)?(d=Ec,qg++):(d=null,0===wg&&e(Fc)),null!==d?(f=Qb(),null!==f?(g=qg,wg++,33===a.charCodeAt(qg)?(h=Af,qg++):(h=null,0===wg&&e(Bf)),wg--,null===h?g=Bc:(qg=g,g=Ac),null!==g?(rg=qg,h=Cf(c,f),h=h?Bc:Ac,null!==h?(rg=b,c=Df(c,f),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)):(qg=b,b=Ac)):(qg=b,b=Ac)):(qg=b,b=Ac)):(qg=b,b=Ac),b}function Sb(){var b,c,d,f;return b=qg,c=P(),null!==c?(61===a.charCodeAt(qg)?(d=Ec,qg++):(d=null,0===wg&&e(Fc)),null!==d?(f=V(),null!==f?(rg=b,c=Ef(c,f),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)):(qg=b,b=Ac)):(qg=b,b=Ac),b}function Tb(){var b,c,d,f;return b=qg,c=P(),null!==c?(61===a.charCodeAt(qg)?(d=Ec,qg++):(d=null,0===wg&&e(Fc)),null!==d?(f=gb(),null!==f?(rg=b,c=Ff(c,f),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)):(qg=b,b=Ac)):(qg=b,b=Ac),b}function Ub(){var b,c,d;return b=qg,37===a.charCodeAt(qg)?(c=Gf,qg++):(c=null,0===wg&&e(Hf)),null!==c?(d=Xb(),null!==d?(rg=b,c=_c(d),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)):(qg=b,b=Ac),b +}function Vb(){var b,c,d;return b=qg,35===a.charCodeAt(qg)?(c=If,qg++):(c=null,0===wg&&e(Jf)),null!==c?(d=Xb(),null!==d?(rg=b,c=Kf(d),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)):(qg=b,b=Ac),b}function Wb(){var b,c,d;return b=qg,46===a.charCodeAt(qg)?(c=Ed,qg++):(c=null,0===wg&&e(Fd)),null!==c?(d=Xb(),null!==d?(rg=b,c=_c(d),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)):(qg=b,b=Ac),b}function Xb(){var a,b;return wg++,a=Yb(),wg--,null===a&&(b=null,0===wg&&e(Lf)),a}function Yb(){var b,c,d;if(b=qg,c=[],d=Zb(),null!==d)for(;null!==d;)c.push(d),d=Zb();else c=Ac;return null!==c&&(c=a.substring(b,qg)),b=c}function Zb(){var b;return Mf.test(a.charAt(qg))?(b=a.charAt(qg),qg++):(b=null,0===wg&&e(Nf)),null===b&&(b=$b()),b}function $b(){var b;return Of.test(a.charAt(qg))?(b=a.charAt(qg),qg++):(b=null,0===wg&&e(Pf)),b}function _b(){var b,c,d;if(b=qg,c=[],d=cc(),null!==d)for(;null!==d;)c.push(d),d=cc();else c=Ac;return null!==c&&(c=a.substring(b,qg)),b=c}function ac(){var b,c,d,f;return wg++,b=qg,37===a.charCodeAt(qg)?(c=Gf,qg++):(c=null,0===wg&&e(Hf)),null!==c?(d=mc(),null!==d?(f=_b(),null!==f?(rg=b,c=Id(f),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)):(qg=b,b=Ac)):(qg=b,b=Ac),null===b&&(b=bc()),wg--,null===b&&(c=null,0===wg&&e(Qf)),b}function bc(){var a,b,c;return a=qg,b=_b(),null!==b?(rg=qg,c=Rf(b),c=c?Bc:Ac,null!==c?(rg=a,b=Sf(b),null===b?(qg=a,a=b):a=b):(qg=a,a=Ac)):(qg=a,a=Ac),a}function cc(){var b;return Mf.test(a.charAt(qg))?(b=a.charAt(qg),qg++):(b=null,0===wg&&e(Nf)),null===b&&(b=dc()),b}function dc(){var b,c,d,f;return b=qg,58===a.charCodeAt(qg)?(c=Nd,qg++):(c=null,0===wg&&e(Od)),null!==c?(d=qg,wg++,32===a.charCodeAt(qg)?(f=Yc,qg++):(f=null,0===wg&&e(Zc)),wg--,null===f?d=Bc:(qg=d,d=Ac),null!==d?(rg=b,c=_c(c),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)):(qg=b,b=Ac),b}function ec(){var a,b,c;return wg++,a=qg,b=_b(),null!==b?(rg=qg,c=Uf(b),c=c?Bc:Ac,null!==c?(rg=a,b=Sf(b),null===b?(qg=a,a=b):a=b):(qg=a,a=Ac)):(qg=a,a=Ac),wg--,null===a&&(b=null,0===wg&&e(Tf)),a}function fc(){var a,b,c;return a=qg,b=gc(),null!==b?(c=lc(),null!==c?(rg=a,b=Id(c),null===b?(qg=a,a=b):a=b):(qg=a,a=Ac)):(qg=a,a=Ac),a}function gc(){var b,c;return wg++,b=qg,61423===a.charCodeAt(qg)?(c=Wf,qg++):(c=null,0===wg&&e(Xf)),null!==c&&(rg=b,c=Yf()),null===c?(qg=b,b=c):b=c,wg--,null===b&&(c=null,0===wg&&e(Vf)),b}function hc(){var b,c;return wg++,b=qg,61438===a.charCodeAt(qg)?(c=$f,qg++):(c=null,0===wg&&e(_f)),null!==c&&(rg=b,c=Yf()),null===c?(qg=b,b=c):b=c,wg--,null===b&&(c=null,0===wg&&e(Zf)),b}function ic(){var b,c;return wg++,b=qg,61422===a.charCodeAt(qg)?(c=bg,qg++):(c=null,0===wg&&e(cg)),null!==c&&(rg=b,c=Yf()),null===c?(qg=b,b=c):b=c,wg--,null===b&&(c=null,0===wg&&e(ag)),b}function jc(){var b,c,d,f;return wg++,b=qg,13===a.charCodeAt(qg)?(c=eg,qg++):(c=null,0===wg&&e(fg)),null===c&&(c=Bc),null!==c?(61439===a.charCodeAt(qg)?(d=gg,qg++):(d=null,0===wg&&e(hg)),null!==d?(10===a.charCodeAt(qg)?(f=ig,qg++):(f=null,0===wg&&e(jg)),null!==f?(rg=b,c=mf(),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)):(qg=b,b=Ac)):(qg=b,b=Ac),wg--,null===b&&(c=null,0===wg&&e(dg)),b}function kc(){var a,b;return wg++,a=hc(),null===a&&(a=ic()),wg--,null===a&&(b=null,0===wg&&e(kg)),a}function lc(){var b,c,d;if(wg++,b=qg,c=[],d=nc(),null!==d)for(;null!==d;)c.push(d),d=nc();else c=Ac;return null!==c&&(c=a.substring(b,qg)),b=c,wg--,null===b&&(c=null,0===wg&&e(lg)),b}function mc(){var a,b;for(wg++,a=[],b=nc();null!==b;)a.push(b),b=nc();return wg--,null===a&&(b=null,0===wg&&e(mg)),a}function nc(){var b,c;return wg++,og.test(a.charAt(qg))?(b=a.charAt(qg),qg++):(b=null,0===wg&&e(pg)),wg--,null===b&&(c=null,0===wg&&e(ng)),b}function oc(){var b,c,d;return b=qg,c=qg,wg++,d=gc(),null===d&&(d=hc(),null===d&&(d=jc())),wg--,null===d?c=Bc:(qg=c,c=Ac),null!==c?(a.length>qg?(d=a.charAt(qg),qg++):(d=null,0===wg&&e(Ke)),null!==d?(rg=b,c=_c(d),null===c?(qg=b,b=c):b=c):(qg=b,b=Ac)):(qg=b,b=Ac),b}function pc(){var b,c,d;for(b=qg,c=[],d=oc();null!==d;)c.push(d),d=oc();return null!==c&&(c=a.substring(b,qg)),b=c}function qc(a,b,c){if(Gg){var d=c?Eg:Fg;return new zg.MustacheNode(a,b,d,{left:!1,right:!1})}return new zg.MustacheNode(a,b,!c)}function rc(a,b){return Gg?new zg.ProgramNode(a,{left:!1,right:!1},b,null):new zg.ProgramNode(a,b)}function sc(a,b,c){var d=a.hash;if(c){d=d||new zg.HashNode([]);for(var e=0;e")),[i]):(i.push(new zg.ContentNode(">")),[i,new zg.ContentNode("")])}var wc,xc=arguments.length>1?arguments[1]:{},yc={start:g},zc=g,Ac=null,Bc="",Cc=function(a){return a},Dc=function(a,b){return rc(a,b||[])},Ec="=",Fc='"="',Gc="else",Hc='"else"',Ic=function(a){for(var b=[],c=[],d=0;d",Nc='">"',Oc=function(a,b){return[new zg.PartialNode(a,b[0])]},Pc=/^[a-zA-Z0-9_$-\/]/,Qc="[a-zA-Z0-9_$-\\/]",Rc=function(a){return new zg.PartialNameNode(new zg.StringNode(a))},Sc=function(a){return[a]},Tc="/",Uc='"/"',Vc=/^[A-Z]/,Wc="[A-Z]",Xc=function(a){var b="view";if(a.mustache){var c=a.mustache.id.string.charAt(0);return yg&&c.match(/[A-Z]/)?(a.mustache=sc(a.mustache,b),a):a}var c=a.id.string.charAt(0);return yg&&c.match(/[A-Z]/)?sc(a,b):a},Yc=" ",Zc='" "',$c=function(a,b){if(b){b=b[1];for(var c=0,d=b.length;d>c;++c)a.push(new zg.ContentNode(" ")),a=a.concat(b[c])}return a},_c=function(a){return a},ad=function(a){return[a]},bd="]",cd='"]"',dd=function(a){return a},ed=function(a,b){var c=a[0];return b&&(c=c.concat(b)),a[1]&&c.push(a[1]),c},fd=function(a,b){if(!b)return a;var c=a.id;Gg&&(c.path=a.id,c.strip={left:!1,right:!1});var d=new zg.BlockNode(a,b,b.inverse,c);return d.path=a.id,d},gd=": ",hd='": "',id=function(a){return rc(a,[])},jd=function(a){return a&&a[2]},kd=function(a){return a},ld=function(a,b){var c=b.mustache||b;return c.escaped=a,b},md="[",nd='"["',od=function(a,b){if(a){var c=new zg.PartialNameNode(new zg.StringNode(b.id.string));return new zg.PartialNode(c,b.params[0])}var d;d=Hg?qc(b,null,!0):qc([b.id].concat(b.params),b.hash,!0);var e=b.id._emblemSuffixModifier;return"!"===e?sc(d,"unbound"):"?"===e?sc(d,"if"):"^"===e?sc(d,"unless"):d},pd=" [",qd='" ["',rd=function(a,b,c){return uc(a,b,c)},sd=function(a){return["tagName",a]},td=function(a){return["elementId",a]},ud=function(a){return["class",a]},vd=function(a){return a},wd=function(a,b){return[a,b]},xd=function(a){return[null,a]},yd=function(a){return a},zd=function(a){return a},Ad=function(a){return new zg.HashNode(a)},Bd="PathIdent",Cd="..",Dd='".."',Ed=".",Fd='"."',Gd=/^[a-zA-Z0-9_$\-!?\^@]/,Hd="[a-zA-Z0-9_$\\-!?\\^@]",Id=function(a){return a},Jd=/^[^\]]/,Kd="[^\\]]",Ld=function(a){return a},Md="Key",Nd=":",Od='":"',Pd=function(a){return[a[0],a[2]]},Qd=function(a){return[a[0],a[2]]},Rd=function(a){return a.isHelper=!0,a},Sd=function(a,b){return{part:b,separator:a}},Td=function(a,b){for(var c=[{part:a}],d=0;dd;++d){var f=a[d];f.id?b=f.shorthand:c.push(f.shorthand)}return[b,c]},tf=function(a){return a.length?[new zg.ContentNode(" ")].concat(a):[]},uf=/^[A-Za-z.0-9_\-]/,vf="[A-Za-z.0-9_\\-]",wf=function(a){return qc([a],null,!0)},xf=function(a,b){return b.id=new zg.StringNode(b.id.string),[sc(b,"action",[["on",new zg.StringNode(a)]])]},yf=function(a,b){return"true"===b?[new zg.ContentNode(a)]:[]},zf=function(a){return a.replace(/ *$/,"")},Af="!",Bf='"!"',Cf=function(){return yg},Df=function(a,b){var c=new zg.HashNode([[a,new zg.StringNode(b)]]),d=[new zg.IdNode([{part:"bind-attr"}])],e=qc(d,c);return[e]},Ef=function(a,b){var c=qc([b],null,!0);return yg&&"!"===b._emblemSuffixModifier&&(c=sc(c,"unbound")),[new zg.ContentNode(a+'="'),c,new zg.ContentNode('"')]},Ff=function(a,b){var c=[new zg.ContentNode(a+'="')].concat(b);return c.concat([new zg.ContentNode('"')])},Gf="%",Hf='"%"',If="#",Jf='"#"',Kf=function(a){return a},Lf="CSSIdentifier",Mf=/^[_a-zA-Z0-9\-]/,Nf="[_a-zA-Z0-9\\-]",Of=/^[\x80-\xFF]/,Pf="[\\x80-\\xFF]",Qf="KnownHTMLTagName",Rf=function(a){return!!Bg[a]},Sf=function(a){return a},Tf="a JS event",Uf=function(a){return!!Cg[a]},Vf="INDENT",Wf="\uefef",Xf='"\\uEFEF"',Yf=function(){return""},Zf="DEDENT",$f="\ueffe",_f='"\\uEFFE"',ag="Unmatched DEDENT",bg="\uefee",cg='"\\uEFEE"',dg="LineEnd",eg="\r",fg='"\\r"',gg="\uefff",hg='"\\uEFFF"',ig="\n",jg='"\\n"',kg="ANYDEDENT",lg="RequiredWhitespace",mg="OptionalWhitespace",ng="InlineWhitespace",og=/^[ \t]/,pg="[ \\t]",qg=0,rg=0,sg=0,tg={line:1,column:1,seenCR:!1},ug=0,vg=[],wg=0;if("startRule"in xc){if(!(xc.startRule in yc))throw new Error("Can't start parsing from rule \""+xc.startRule+'".');zc=yc[xc.startRule]}var xg=c.handlebarsVariant,yg="Ember.Handlebars"===xg.JavaScriptCompiler.prototype.namespace,zg=xg.AST,Ag={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Bg={figcaption:!0,blockquote:!0,plaintext:!0,textarea:!0,progress:!0,optgroup:!0,noscript:!0,noframes:!0,frameset:!0,fieldset:!0,datalist:!0,colgroup:!0,basefont:!0,summary:!0,section:!0,marquee:!0,listing:!0,isindex:!0,details:!0,command:!0,caption:!0,bgsound:!0,article:!0,address:!0,acronym:!0,strong:!0,strike:!0,spacer:!0,source:!0,select:!0,script:!0,output:!0,option:!0,object:!0,legend:!0,keygen:!0,iframe:!0,hgroup:!0,header:!0,footer:!0,figure:!0,center:!0,canvas:!0,button:!0,applet:!0,video:!0,track:!0,title:!0,thead:!0,tfoot:!0,tbody:!0,table:!0,style:!0,small:!0,param:!0,meter:!0,label:!0,input:!0,frame:!0,embed:!0,blink:!0,audio:!0,aside:!0,time:!0,span:!0,samp:!0,ruby:!0,nobr:!0,meta:!0,menu:!0,mark:!0,main:!0,link:!0,html:!0,head:!0,form:!0,font:!0,data:!0,code:!0,cite:!0,body:!0,base:!0,area:!0,abbr:!0,xmp:!0,wbr:!0,"var":!0,sup:!0,sub:!0,pre:!0,nav:!0,map:!0,kbd:!0,ins:!0,img:!0,div:!0,dir:!0,dfn:!0,del:!0,col:!0,big:!0,bdo:!0,bdi:!0,ul:!0,tt:!0,tr:!0,th:!0,td:!0,rt:!0,rp:!0,ol:!0,li:!0,hr:!0,h6:!0,h5:!0,h4:!0,h3:!0,h2:!0,h1:!0,em:!0,dt:!0,dl:!0,dd:!0,br:!0,u:!0,s:!0,q:!0,p:!0,i:!0,b:!0,a:!0},Cg={touchStart:!0,touchMove:!0,touchEnd:!0,touchCancel:!0,keyDown:!0,keyUp:!0,keyPress:!0,mouseDown:!0,mouseUp:!0,contextMenu:!0,click:!0,doubleClick:!0,mouseMove:!0,focusIn:!0,focusOut:!0,mouseEnter:!0,mouseLeave:!0,submit:!0,input:!0,change:!0,dragStart:!0,drag:!0,dragEnter:!0,dragLeave:!0,dragOver:!0,drop:!0,dragEnd:!0},Dg=String.fromCharCode(125),Eg=Dg+Dg,Fg=Eg+Dg,Gg=xg.VERSION.slice(0,3)>=1.1,Hg=xg.VERSION.slice(0,3)>=1.3;if(wc=zc(),null!==wc&&qg===a.length)return wc;throw f(vg),rg=Math.max(qg,ug),new b(vg,rgc?(this.lastMatch.reset(),null):(b=this.str.substr(this.pos+c).match(a),this.lastMatch.captures=b.slice(1),this.lastMatch.str=this.str.substr(this.pos,c)+b[0])},a.prototype.clone=function(){var a,b,c,d;a=new this.constructor(this.str),a.pos=this.pos,a.lastMatch={},d=this.lastMatch;for(b in d)c=d[b],a.lastMatch[b]=c;return a},a.prototype.concat=function(a){return this.str+=a,this},a.prototype.eos=function(){return this.pos===this.str.length},a.prototype.exists=function(a){var b,c;return c=this.str.substr(this.pos).search(a),0>c?(this.lastMatch.reset(),null):(b=this.str.substr(this.pos+c).match(a),this.lastMatch.str=b[0],this.lastMatch.captures=b.slice(1),c)},a.prototype.getch=function(){return this.scan(/./)},a.prototype.match=function(){return this.lastMatch.str},a.prototype.matches=function(a){return this.check(a),this.matchSize()},a.prototype.matched=function(){return null!=this.lastMatch.str},a.prototype.matchSize=function(){return this.matched()?this.match().length:null},a.prototype.peek=function(a){return this.str.substr(this.pos,a)},a.prototype.pointer=function(){return this.pos},a.prototype.setPointer=function(a){return a=+a,0>a&&(a=0),a>this.str.length&&(a=this.str.length),this.pos=a},a.prototype.reset=function(){return this.lastMatch.reset(),this.pos=0,this},a.prototype.rest=function(){return this.str.substr(this.pos)},a.prototype.scan=function(a){var b;return b=this.check(a),null!=b&&(this.pos+=b.length),b},a.prototype.scanUntil=function(a){var b;return b=this.checkUntil(a),null!=b&&(this.pos+=b.length),b},a.prototype.skip=function(a){return this.scan(a),this.matchSize()},a.prototype.skipUntil=function(a){return this.scanUntil(a),this.matchSize()},a.prototype.string=function(){return this.str},a.prototype.terminate=function(){return this.pos=this.str.length,this.lastMatch.reset(),this},a.prototype.toString=function(){return"#8?""+this.str.substr(0,5)+"...":this.str))+">"},a}(),a.prototype.beginningOfLine=a.prototype.bol,a.prototype.clear=a.prototype.terminate,a.prototype.dup=a.prototype.clone,a.prototype.endOfString=a.prototype.eos,a.prototype.exist=a.prototype.exists,a.prototype.getChar=a.prototype.getch,a.prototype.position=a.prototype.pointer,a.StringScanner=a,b.exports=a}).call(this)},{}]},{},[3]); \ No newline at end of file diff --git a/ajax/libs/emblem/package.json b/ajax/libs/emblem/package.json new file mode 100644 index 000000000..566e075df --- /dev/null +++ b/ajax/libs/emblem/package.json @@ -0,0 +1,36 @@ +{ + "name": "emblem", + "filename": "emblem.min.js", + "version": "0.3.18", + "description": "Ember-friendly, indented syntax alternative for Handlebars.js", + "homepage": "http://emblemjs.com/", + "keywords": [ + "ember", + "handlebars", + "template", + "html", + "indentation" + ], + "maintainers": [ + { + "name": "Emblem.js", + "web": "http://emblemjs.com/" + } + ], + "repositories": [ + { + "type": "git", + "url": "https://github.com/machty/emblem.js" + } + ], + "npmName": "emblem", + "npmFileMap": [ + { + "basePath": "/dist/", + "files": [ + "emblem.js", + "emblem.min.js" + ] + } + ] +}