{"version":3,"file":"intl-messageformat.min.js","sources":["../../../intl-messageformat-parser/lib/types.js","../../../intl-messageformat-parser/lib/parser.js","../../../intl-messageformat-parser/lib/normalize.js","../../../intl-messageformat-parser/lib/skeleton.js","../../../intl-messageformat-parser/lib/index.js","../../../intl-format-cache/lib/index.js","../../lib/formatters.js","../../lib/core.js"],"sourcesContent":["export var TYPE;\n(function (TYPE) {\n /**\n * Raw text\n */\n TYPE[TYPE[\"literal\"] = 0] = \"literal\";\n /**\n * Variable w/o any format, e.g `var` in `this is a {var}`\n */\n TYPE[TYPE[\"argument\"] = 1] = \"argument\";\n /**\n * Variable w/ number format\n */\n TYPE[TYPE[\"number\"] = 2] = \"number\";\n /**\n * Variable w/ date format\n */\n TYPE[TYPE[\"date\"] = 3] = \"date\";\n /**\n * Variable w/ time format\n */\n TYPE[TYPE[\"time\"] = 4] = \"time\";\n /**\n * Variable w/ select format\n */\n TYPE[TYPE[\"select\"] = 5] = \"select\";\n /**\n * Variable w/ plural format\n */\n TYPE[TYPE[\"plural\"] = 6] = \"plural\";\n /**\n * Only possible within plural argument.\n * This is the `#` symbol that will be substituted with the count.\n */\n TYPE[TYPE[\"pound\"] = 7] = \"pound\";\n})(TYPE || (TYPE = {}));\n/**\n * Type Guards\n */\nexport function isLiteralElement(el) {\n return el.type === TYPE.literal;\n}\nexport function isArgumentElement(el) {\n return el.type === TYPE.argument;\n}\nexport function isNumberElement(el) {\n return el.type === TYPE.number;\n}\nexport function isDateElement(el) {\n return el.type === TYPE.date;\n}\nexport function isTimeElement(el) {\n return el.type === TYPE.time;\n}\nexport function isSelectElement(el) {\n return el.type === TYPE.select;\n}\nexport function isPluralElement(el) {\n return el.type === TYPE.plural;\n}\nexport function isPoundElement(el) {\n return el.type === TYPE.pound;\n}\nexport function isNumberSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === 0 /* number */);\n}\nexport function isDateTimeSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === 1 /* dateTime */);\n}\nexport function createLiteralElement(value) {\n return {\n type: TYPE.literal,\n value: value,\n };\n}\nexport function createNumberElement(value, style) {\n return {\n type: TYPE.number,\n value: value,\n style: style,\n };\n}\n","// tslint:disable:only-arrow-functions\n// tslint:disable:object-literal-shorthand\n// tslint:disable:trailing-comma\n// tslint:disable:object-literal-sort-keys\n// tslint:disable:one-variable-per-declaration\n// tslint:disable:max-line-length\n// tslint:disable:no-consecutive-blank-lines\n// tslint:disable:align\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n// Generated by PEG.js v. 0.10.0 (ts-pegjs plugin v. 0.2.6 )\n//\n// https://pegjs.org/ https://github.com/metadevpro/ts-pegjs\nimport { TYPE, } from './types';\nvar SyntaxError = /** @class */ (function (_super) {\n __extends(SyntaxError, _super);\n function SyntaxError(message, expected, found, location) {\n var _this = _super.call(this) || this;\n _this.message = message;\n _this.expected = expected;\n _this.found = found;\n _this.location = location;\n _this.name = \"SyntaxError\";\n if (typeof Error.captureStackTrace === \"function\") {\n Error.captureStackTrace(_this, SyntaxError);\n }\n return _this;\n }\n SyntaxError.buildMessage = function (expected, found) {\n function hex(ch) {\n return ch.charCodeAt(0).toString(16).toUpperCase();\n }\n function literalEscape(s) {\n return s\n .replace(/\\\\/g, \"\\\\\\\\\")\n .replace(/\"/g, \"\\\\\\\"\")\n .replace(/\\0/g, \"\\\\0\")\n .replace(/\\t/g, \"\\\\t\")\n .replace(/\\n/g, \"\\\\n\")\n .replace(/\\r/g, \"\\\\r\")\n .replace(/[\\x00-\\x0F]/g, function (ch) { return \"\\\\x0\" + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function (ch) { return \"\\\\x\" + hex(ch); });\n }\n function classEscape(s) {\n return s\n .replace(/\\\\/g, \"\\\\\\\\\")\n .replace(/\\]/g, \"\\\\]\")\n .replace(/\\^/g, \"\\\\^\")\n .replace(/-/g, \"\\\\-\")\n .replace(/\\0/g, \"\\\\0\")\n .replace(/\\t/g, \"\\\\t\")\n .replace(/\\n/g, \"\\\\n\")\n .replace(/\\r/g, \"\\\\r\")\n .replace(/[\\x00-\\x0F]/g, function (ch) { return \"\\\\x0\" + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function (ch) { return \"\\\\x\" + hex(ch); });\n }\n function describeExpectation(expectation) {\n switch (expectation.type) {\n case \"literal\":\n return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n case \"class\":\n var escapedParts = expectation.parts.map(function (part) {\n return Array.isArray(part)\n ? classEscape(part[0]) + \"-\" + classEscape(part[1])\n : classEscape(part);\n });\n return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n case \"any\":\n return \"any character\";\n case \"end\":\n return \"end of input\";\n case \"other\":\n return expectation.description;\n }\n }\n function describeExpected(expected1) {\n var descriptions = expected1.map(describeExpectation);\n var i;\n var j;\n descriptions.sort();\n if (descriptions.length > 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n function describeFound(found1) {\n return found1 ? \"\\\"\" + literalEscape(found1) + \"\\\"\" : \"end of input\";\n }\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n };\n return SyntaxError;\n}(Error));\nexport { SyntaxError };\nfunction peg$parse(input, options) {\n options = options !== undefined ? options : {};\n var peg$FAILED = {};\n var peg$startRuleFunctions = { start: peg$parsestart };\n var peg$startRuleFunction = peg$parsestart;\n var peg$c0 = function (parts) {\n return parts.join('');\n };\n var peg$c1 = function (messageText) {\n return __assign({ type: TYPE.literal, value: messageText }, insertLocation());\n };\n var peg$c2 = \"#\";\n var peg$c3 = peg$literalExpectation(\"#\", false);\n var peg$c4 = function () {\n return __assign({ type: TYPE.pound }, insertLocation());\n };\n var peg$c5 = peg$otherExpectation(\"argumentElement\");\n var peg$c6 = \"{\";\n var peg$c7 = peg$literalExpectation(\"{\", false);\n var peg$c8 = \"}\";\n var peg$c9 = peg$literalExpectation(\"}\", false);\n var peg$c10 = function (value) {\n return __assign({ type: TYPE.argument, value: value }, insertLocation());\n };\n var peg$c11 = peg$otherExpectation(\"numberSkeletonId\");\n var peg$c12 = /^['\\/{}]/;\n var peg$c13 = peg$classExpectation([\"'\", \"/\", \"{\", \"}\"], false, false);\n var peg$c14 = peg$anyExpectation();\n var peg$c15 = peg$otherExpectation(\"numberSkeletonTokenOption\");\n var peg$c16 = \"/\";\n var peg$c17 = peg$literalExpectation(\"/\", false);\n var peg$c18 = function (option) { return option; };\n var peg$c19 = peg$otherExpectation(\"numberSkeletonToken\");\n var peg$c20 = function (stem, options) {\n return { stem: stem, options: options };\n };\n var peg$c21 = function (tokens) {\n return __assign({ type: 0 /* number */, tokens: tokens }, insertLocation());\n };\n var peg$c22 = \"::\";\n var peg$c23 = peg$literalExpectation(\"::\", false);\n var peg$c24 = function (skeleton) { return skeleton; };\n var peg$c25 = function () { messageCtx.push('numberArgStyle'); return true; };\n var peg$c26 = function (style) {\n messageCtx.pop();\n return style.replace(/\\s*$/, '');\n };\n var peg$c27 = \",\";\n var peg$c28 = peg$literalExpectation(\",\", false);\n var peg$c29 = \"number\";\n var peg$c30 = peg$literalExpectation(\"number\", false);\n var peg$c31 = function (value, type, style) {\n return __assign({ type: type === 'number' ? TYPE.number : type === 'date' ? TYPE.date : TYPE.time, style: style && style[2], value: value }, insertLocation());\n };\n var peg$c32 = \"'\";\n var peg$c33 = peg$literalExpectation(\"'\", false);\n var peg$c34 = /^[^']/;\n var peg$c35 = peg$classExpectation([\"'\"], true, false);\n var peg$c36 = /^[^a-zA-Z'{}]/;\n var peg$c37 = peg$classExpectation([[\"a\", \"z\"], [\"A\", \"Z\"], \"'\", \"{\", \"}\"], true, false);\n var peg$c38 = /^[a-zA-Z]/;\n var peg$c39 = peg$classExpectation([[\"a\", \"z\"], [\"A\", \"Z\"]], false, false);\n var peg$c40 = function (pattern) {\n return __assign({ type: 1 /* dateTime */, pattern: pattern }, insertLocation());\n };\n var peg$c41 = function () { messageCtx.push('dateOrTimeArgStyle'); return true; };\n var peg$c42 = \"date\";\n var peg$c43 = peg$literalExpectation(\"date\", false);\n var peg$c44 = \"time\";\n var peg$c45 = peg$literalExpectation(\"time\", false);\n var peg$c46 = \"plural\";\n var peg$c47 = peg$literalExpectation(\"plural\", false);\n var peg$c48 = \"selectordinal\";\n var peg$c49 = peg$literalExpectation(\"selectordinal\", false);\n var peg$c50 = \"offset:\";\n var peg$c51 = peg$literalExpectation(\"offset:\", false);\n var peg$c52 = function (value, pluralType, offset, options) {\n return __assign({ type: TYPE.plural, pluralType: pluralType === 'plural' ? 'cardinal' : 'ordinal', value: value, offset: offset ? offset[2] : 0, options: options.reduce(function (all, _a) {\n var id = _a.id, value = _a.value, optionLocation = _a.location;\n if (id in all) {\n error(\"Duplicate option \\\"\" + id + \"\\\" in plural element: \\\"\" + text() + \"\\\"\", location());\n }\n all[id] = {\n value: value,\n location: optionLocation\n };\n return all;\n }, {}) }, insertLocation());\n };\n var peg$c53 = \"select\";\n var peg$c54 = peg$literalExpectation(\"select\", false);\n var peg$c55 = function (value, options) {\n return __assign({ type: TYPE.select, value: value, options: options.reduce(function (all, _a) {\n var id = _a.id, value = _a.value, optionLocation = _a.location;\n if (id in all) {\n error(\"Duplicate option \\\"\" + id + \"\\\" in select element: \\\"\" + text() + \"\\\"\", location());\n }\n all[id] = {\n value: value,\n location: optionLocation\n };\n return all;\n }, {}) }, insertLocation());\n };\n var peg$c56 = \"=\";\n var peg$c57 = peg$literalExpectation(\"=\", false);\n var peg$c58 = function (id) { messageCtx.push('select'); return true; };\n var peg$c59 = function (id, value) {\n messageCtx.pop();\n return __assign({ id: id,\n value: value }, insertLocation());\n };\n var peg$c60 = function (id) { messageCtx.push('plural'); return true; };\n var peg$c61 = function (id, value) {\n messageCtx.pop();\n return __assign({ id: id,\n value: value }, insertLocation());\n };\n var peg$c62 = peg$otherExpectation(\"whitespace\");\n var peg$c63 = /^[\\t-\\r \\x85\\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]/;\n var peg$c64 = peg$classExpectation([[\"\\t\", \"\\r\"], \" \", \"\\x85\", \"\\xA0\", \"\\u1680\", [\"\\u2000\", \"\\u200A\"], \"\\u2028\", \"\\u2029\", \"\\u202F\", \"\\u205F\", \"\\u3000\"], false, false);\n var peg$c65 = peg$otherExpectation(\"syntax pattern\");\n var peg$c66 = /^[!-\\/:-@[-\\^`{-~\\xA1-\\xA7\\xA9\\xAB\\xAC\\xAE\\xB0\\xB1\\xB6\\xBB\\xBF\\xD7\\xF7\\u2010-\\u2027\\u2030-\\u203E\\u2041-\\u2053\\u2055-\\u205E\\u2190-\\u245F\\u2500-\\u2775\\u2794-\\u2BFF\\u2E00-\\u2E7F\\u3001-\\u3003\\u3008-\\u3020\\u3030\\uFD3E\\uFD3F\\uFE45\\uFE46]/;\n var peg$c67 = peg$classExpectation([[\"!\", \"/\"], [\":\", \"@\"], [\"[\", \"^\"], \"`\", [\"{\", \"~\"], [\"\\xA1\", \"\\xA7\"], \"\\xA9\", \"\\xAB\", \"\\xAC\", \"\\xAE\", \"\\xB0\", \"\\xB1\", \"\\xB6\", \"\\xBB\", \"\\xBF\", \"\\xD7\", \"\\xF7\", [\"\\u2010\", \"\\u2027\"], [\"\\u2030\", \"\\u203E\"], [\"\\u2041\", \"\\u2053\"], [\"\\u2055\", \"\\u205E\"], [\"\\u2190\", \"\\u245F\"], [\"\\u2500\", \"\\u2775\"], [\"\\u2794\", \"\\u2BFF\"], [\"\\u2E00\", \"\\u2E7F\"], [\"\\u3001\", \"\\u3003\"], [\"\\u3008\", \"\\u3020\"], \"\\u3030\", \"\\uFD3E\", \"\\uFD3F\", \"\\uFE45\", \"\\uFE46\"], false, false);\n var peg$c68 = peg$otherExpectation(\"optional whitespace\");\n var peg$c69 = peg$otherExpectation(\"number\");\n var peg$c70 = \"-\";\n var peg$c71 = peg$literalExpectation(\"-\", false);\n var peg$c72 = function (negative, num) {\n return num\n ? negative\n ? -num\n : num\n : 0;\n };\n var peg$c73 = peg$otherExpectation(\"apostrophe\");\n var peg$c74 = peg$otherExpectation(\"double apostrophes\");\n var peg$c75 = \"''\";\n var peg$c76 = peg$literalExpectation(\"''\", false);\n var peg$c77 = function () { return \"'\"; };\n var peg$c78 = function (escapedChar, quotedChars) {\n return escapedChar + quotedChars.replace(\"''\", \"'\");\n };\n var peg$c79 = function (x) {\n return (x !== '{' &&\n !(isInPluralOption() && x === '#') &&\n !(isNestedMessageText() && x === '}'));\n };\n var peg$c80 = \"\\n\";\n var peg$c81 = peg$literalExpectation(\"\\n\", false);\n var peg$c82 = function (x) {\n return x === '{' || x === '}' || (isInPluralOption() && x === '#');\n };\n var peg$c83 = peg$otherExpectation(\"argNameOrNumber\");\n var peg$c84 = peg$otherExpectation(\"argNumber\");\n var peg$c85 = \"0\";\n var peg$c86 = peg$literalExpectation(\"0\", false);\n var peg$c87 = function () { return 0; };\n var peg$c88 = /^[1-9]/;\n var peg$c89 = peg$classExpectation([[\"1\", \"9\"]], false, false);\n var peg$c90 = /^[0-9]/;\n var peg$c91 = peg$classExpectation([[\"0\", \"9\"]], false, false);\n var peg$c92 = function (digits) {\n return parseInt(digits.join(''), 10);\n };\n var peg$c93 = peg$otherExpectation(\"argName\");\n var peg$currPos = 0;\n var peg$savedPos = 0;\n var peg$posDetailsCache = [{ line: 1, column: 1 }];\n var peg$maxFailPos = 0;\n var peg$maxFailExpected = [];\n var peg$silentFails = 0;\n var peg$result;\n if (options.startRule !== undefined) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n function expected(description, location1) {\n location1 = location1 !== undefined\n ? location1\n : peg$computeLocation(peg$savedPos, peg$currPos);\n throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location1);\n }\n function error(message, location1) {\n location1 = location1 !== undefined\n ? location1\n : peg$computeLocation(peg$savedPos, peg$currPos);\n throw peg$buildSimpleError(message, location1);\n }\n function peg$literalExpectation(text1, ignoreCase) {\n return { type: \"literal\", text: text1, ignoreCase: ignoreCase };\n }\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos];\n var p;\n if (details) {\n return details;\n }\n else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n }\n else {\n details.column++;\n }\n p++;\n }\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n function peg$computeLocation(startPos, endPos) {\n var startPosDetails = peg$computePosDetails(startPos);\n var endPosDetails = peg$computePosDetails(endPos);\n return {\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n }\n function peg$fail(expected1) {\n if (peg$currPos < peg$maxFailPos) {\n return;\n }\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n peg$maxFailExpected.push(expected1);\n }\n function peg$buildSimpleError(message, location1) {\n return new SyntaxError(message, [], \"\", location1);\n }\n function peg$buildStructuredError(expected1, found, location1) {\n return new SyntaxError(SyntaxError.buildMessage(expected1, found), expected1, found, location1);\n }\n function peg$parsestart() {\n var s0;\n s0 = peg$parsemessage();\n return s0;\n }\n function peg$parsemessage() {\n var s0, s1;\n s0 = [];\n s1 = peg$parsemessageElement();\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n s1 = peg$parsemessageElement();\n }\n return s0;\n }\n function peg$parsemessageElement() {\n var s0;\n s0 = peg$parseliteralElement();\n if (s0 === peg$FAILED) {\n s0 = peg$parseargumentElement();\n if (s0 === peg$FAILED) {\n s0 = peg$parsesimpleFormatElement();\n if (s0 === peg$FAILED) {\n s0 = peg$parsepluralElement();\n if (s0 === peg$FAILED) {\n s0 = peg$parseselectElement();\n if (s0 === peg$FAILED) {\n s0 = peg$parsepoundElement();\n }\n }\n }\n }\n }\n return s0;\n }\n function peg$parsemessageText() {\n var s0, s1, s2;\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsedoubleApostrophes();\n if (s2 === peg$FAILED) {\n s2 = peg$parsequotedString();\n if (s2 === peg$FAILED) {\n s2 = peg$parseunquotedString();\n }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsedoubleApostrophes();\n if (s2 === peg$FAILED) {\n s2 = peg$parsequotedString();\n if (s2 === peg$FAILED) {\n s2 = peg$parseunquotedString();\n }\n }\n }\n }\n else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c0(s1);\n }\n s0 = s1;\n return s0;\n }\n function peg$parseliteralElement() {\n var s0, s1;\n s0 = peg$currPos;\n s1 = peg$parsemessageText();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c1(s1);\n }\n s0 = s1;\n return s0;\n }\n function peg$parsepoundElement() {\n var s0, s1;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 35) {\n s1 = peg$c2;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c3);\n }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c4();\n }\n s0 = s1;\n return s0;\n }\n function peg$parseargumentElement() {\n var s0, s1, s2, s3, s4, s5;\n peg$silentFails++;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 123) {\n s1 = peg$c6;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c7);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseargNameOrNumber();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s5 = peg$c8;\n peg$currPos++;\n }\n else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c9);\n }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c10(s3);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c5);\n }\n }\n return s0;\n }\n function peg$parsenumberSkeletonId() {\n var s0, s1, s2, s3, s4;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$currPos;\n s3 = peg$currPos;\n peg$silentFails++;\n s4 = peg$parsewhiteSpace();\n if (s4 === peg$FAILED) {\n if (peg$c12.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c13);\n }\n }\n }\n peg$silentFails--;\n if (s4 === peg$FAILED) {\n s3 = undefined;\n }\n else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c14);\n }\n }\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$currPos;\n s3 = peg$currPos;\n peg$silentFails++;\n s4 = peg$parsewhiteSpace();\n if (s4 === peg$FAILED) {\n if (peg$c12.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c13);\n }\n }\n }\n peg$silentFails--;\n if (s4 === peg$FAILED) {\n s3 = undefined;\n }\n else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c14);\n }\n }\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n }\n }\n else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n s0 = input.substring(s0, peg$currPos);\n }\n else {\n s0 = s1;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c11);\n }\n }\n return s0;\n }\n function peg$parsenumberSkeletonTokenOption() {\n var s0, s1, s2;\n peg$silentFails++;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 47) {\n s1 = peg$c16;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c17);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumberSkeletonId();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c18(s2);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c15);\n }\n }\n return s0;\n }\n function peg$parsenumberSkeletonToken() {\n var s0, s1, s2, s3, s4;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumberSkeletonId();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$parsenumberSkeletonTokenOption();\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$parsenumberSkeletonTokenOption();\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c20(s2, s3);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c19);\n }\n }\n return s0;\n }\n function peg$parsenumberSkeleton() {\n var s0, s1, s2;\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsenumberSkeletonToken();\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsenumberSkeletonToken();\n }\n }\n else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c21(s1);\n }\n s0 = s1;\n return s0;\n }\n function peg$parsenumberArgStyle() {\n var s0, s1, s2;\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c22) {\n s1 = peg$c22;\n peg$currPos += 2;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c23);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumberSkeleton();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c24(s2);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n peg$savedPos = peg$currPos;\n s1 = peg$c25();\n if (s1) {\n s1 = undefined;\n }\n else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsemessageText();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c26(s2);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n return s0;\n }\n function peg$parsenumberFormatElement() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 123) {\n s1 = peg$c6;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c7);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseargNameOrNumber();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c27;\n peg$currPos++;\n }\n else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c28);\n }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n if (input.substr(peg$currPos, 6) === peg$c29) {\n s7 = peg$c29;\n peg$currPos += 6;\n }\n else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c30);\n }\n }\n if (s7 !== peg$FAILED) {\n s8 = peg$parse_();\n if (s8 !== peg$FAILED) {\n s9 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s10 = peg$c27;\n peg$currPos++;\n }\n else {\n s10 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c28);\n }\n }\n if (s10 !== peg$FAILED) {\n s11 = peg$parse_();\n if (s11 !== peg$FAILED) {\n s12 = peg$parsenumberArgStyle();\n if (s12 !== peg$FAILED) {\n s10 = [s10, s11, s12];\n s9 = s10;\n }\n else {\n peg$currPos = s9;\n s9 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s9;\n s9 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s9;\n s9 = peg$FAILED;\n }\n if (s9 === peg$FAILED) {\n s9 = null;\n }\n if (s9 !== peg$FAILED) {\n s10 = peg$parse_();\n if (s10 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s11 = peg$c8;\n peg$currPos++;\n }\n else {\n s11 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c9);\n }\n }\n if (s11 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c31(s3, s7, s9);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parsedateTimeSkeletonLiteral() {\n var s0, s1, s2, s3;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 39) {\n s1 = peg$c32;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c33);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parsedoubleApostrophes();\n if (s3 === peg$FAILED) {\n if (peg$c34.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c35);\n }\n }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parsedoubleApostrophes();\n if (s3 === peg$FAILED) {\n if (peg$c34.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c35);\n }\n }\n }\n }\n }\n else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 39) {\n s3 = peg$c32;\n peg$currPos++;\n }\n else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c33);\n }\n }\n if (s3 !== peg$FAILED) {\n s1 = [s1, s2, s3];\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = [];\n s1 = peg$parsedoubleApostrophes();\n if (s1 === peg$FAILED) {\n if (peg$c36.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c37);\n }\n }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n s1 = peg$parsedoubleApostrophes();\n if (s1 === peg$FAILED) {\n if (peg$c36.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c37);\n }\n }\n }\n }\n }\n else {\n s0 = peg$FAILED;\n }\n }\n return s0;\n }\n function peg$parsedateTimeSkeletonPattern() {\n var s0, s1;\n s0 = [];\n if (peg$c38.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c39);\n }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c38.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c39);\n }\n }\n }\n }\n else {\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parsedateTimeSkeleton() {\n var s0, s1, s2, s3;\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = [];\n s3 = peg$parsedateTimeSkeletonLiteral();\n if (s3 === peg$FAILED) {\n s3 = peg$parsedateTimeSkeletonPattern();\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parsedateTimeSkeletonLiteral();\n if (s3 === peg$FAILED) {\n s3 = peg$parsedateTimeSkeletonPattern();\n }\n }\n }\n else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n s1 = input.substring(s1, peg$currPos);\n }\n else {\n s1 = s2;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c40(s1);\n }\n s0 = s1;\n return s0;\n }\n function peg$parsedateOrTimeArgStyle() {\n var s0, s1, s2;\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c22) {\n s1 = peg$c22;\n peg$currPos += 2;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c23);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsedateTimeSkeleton();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c24(s2);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n peg$savedPos = peg$currPos;\n s1 = peg$c41();\n if (s1) {\n s1 = undefined;\n }\n else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsemessageText();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c26(s2);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n return s0;\n }\n function peg$parsedateOrTimeFormatElement() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 123) {\n s1 = peg$c6;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c7);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseargNameOrNumber();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c27;\n peg$currPos++;\n }\n else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c28);\n }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n if (input.substr(peg$currPos, 4) === peg$c42) {\n s7 = peg$c42;\n peg$currPos += 4;\n }\n else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c43);\n }\n }\n if (s7 === peg$FAILED) {\n if (input.substr(peg$currPos, 4) === peg$c44) {\n s7 = peg$c44;\n peg$currPos += 4;\n }\n else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c45);\n }\n }\n }\n if (s7 !== peg$FAILED) {\n s8 = peg$parse_();\n if (s8 !== peg$FAILED) {\n s9 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s10 = peg$c27;\n peg$currPos++;\n }\n else {\n s10 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c28);\n }\n }\n if (s10 !== peg$FAILED) {\n s11 = peg$parse_();\n if (s11 !== peg$FAILED) {\n s12 = peg$parsedateOrTimeArgStyle();\n if (s12 !== peg$FAILED) {\n s10 = [s10, s11, s12];\n s9 = s10;\n }\n else {\n peg$currPos = s9;\n s9 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s9;\n s9 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s9;\n s9 = peg$FAILED;\n }\n if (s9 === peg$FAILED) {\n s9 = null;\n }\n if (s9 !== peg$FAILED) {\n s10 = peg$parse_();\n if (s10 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s11 = peg$c8;\n peg$currPos++;\n }\n else {\n s11 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c9);\n }\n }\n if (s11 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c31(s3, s7, s9);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parsesimpleFormatElement() {\n var s0;\n s0 = peg$parsenumberFormatElement();\n if (s0 === peg$FAILED) {\n s0 = peg$parsedateOrTimeFormatElement();\n }\n return s0;\n }\n function peg$parsepluralElement() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 123) {\n s1 = peg$c6;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c7);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseargNameOrNumber();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c27;\n peg$currPos++;\n }\n else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c28);\n }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n if (input.substr(peg$currPos, 6) === peg$c46) {\n s7 = peg$c46;\n peg$currPos += 6;\n }\n else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c47);\n }\n }\n if (s7 === peg$FAILED) {\n if (input.substr(peg$currPos, 13) === peg$c48) {\n s7 = peg$c48;\n peg$currPos += 13;\n }\n else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c49);\n }\n }\n }\n if (s7 !== peg$FAILED) {\n s8 = peg$parse_();\n if (s8 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s9 = peg$c27;\n peg$currPos++;\n }\n else {\n s9 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c28);\n }\n }\n if (s9 !== peg$FAILED) {\n s10 = peg$parse_();\n if (s10 !== peg$FAILED) {\n s11 = peg$currPos;\n if (input.substr(peg$currPos, 7) === peg$c50) {\n s12 = peg$c50;\n peg$currPos += 7;\n }\n else {\n s12 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c51);\n }\n }\n if (s12 !== peg$FAILED) {\n s13 = peg$parse_();\n if (s13 !== peg$FAILED) {\n s14 = peg$parsenumber();\n if (s14 !== peg$FAILED) {\n s12 = [s12, s13, s14];\n s11 = s12;\n }\n else {\n peg$currPos = s11;\n s11 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s11;\n s11 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s11;\n s11 = peg$FAILED;\n }\n if (s11 === peg$FAILED) {\n s11 = null;\n }\n if (s11 !== peg$FAILED) {\n s12 = peg$parse_();\n if (s12 !== peg$FAILED) {\n s13 = [];\n s14 = peg$parsepluralOption();\n if (s14 !== peg$FAILED) {\n while (s14 !== peg$FAILED) {\n s13.push(s14);\n s14 = peg$parsepluralOption();\n }\n }\n else {\n s13 = peg$FAILED;\n }\n if (s13 !== peg$FAILED) {\n s14 = peg$parse_();\n if (s14 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s15 = peg$c8;\n peg$currPos++;\n }\n else {\n s15 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c9);\n }\n }\n if (s15 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c52(s3, s7, s11, s13);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parseselectElement() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 123) {\n s1 = peg$c6;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c7);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseargNameOrNumber();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c27;\n peg$currPos++;\n }\n else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c28);\n }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n if (input.substr(peg$currPos, 6) === peg$c53) {\n s7 = peg$c53;\n peg$currPos += 6;\n }\n else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c54);\n }\n }\n if (s7 !== peg$FAILED) {\n s8 = peg$parse_();\n if (s8 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s9 = peg$c27;\n peg$currPos++;\n }\n else {\n s9 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c28);\n }\n }\n if (s9 !== peg$FAILED) {\n s10 = peg$parse_();\n if (s10 !== peg$FAILED) {\n s11 = [];\n s12 = peg$parseselectOption();\n if (s12 !== peg$FAILED) {\n while (s12 !== peg$FAILED) {\n s11.push(s12);\n s12 = peg$parseselectOption();\n }\n }\n else {\n s11 = peg$FAILED;\n }\n if (s11 !== peg$FAILED) {\n s12 = peg$parse_();\n if (s12 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s13 = peg$c8;\n peg$currPos++;\n }\n else {\n s13 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c9);\n }\n }\n if (s13 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c55(s3, s11);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parsepluralRuleSelectValue() {\n var s0, s1, s2, s3;\n s0 = peg$currPos;\n s1 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c56;\n peg$currPos++;\n }\n else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c57);\n }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parsenumber();\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n s0 = input.substring(s0, peg$currPos);\n }\n else {\n s0 = s1;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$parseargName();\n }\n return s0;\n }\n function peg$parseselectOption() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseargName();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 123) {\n s4 = peg$c6;\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c7);\n }\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = peg$currPos;\n s5 = peg$c58(s2);\n if (s5) {\n s5 = undefined;\n }\n else {\n s5 = peg$FAILED;\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parsemessage();\n if (s6 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s7 = peg$c8;\n peg$currPos++;\n }\n else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c9);\n }\n }\n if (s7 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c59(s2, s6);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parsepluralOption() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parsepluralRuleSelectValue();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 123) {\n s4 = peg$c6;\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c7);\n }\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = peg$currPos;\n s5 = peg$c60(s2);\n if (s5) {\n s5 = undefined;\n }\n else {\n s5 = peg$FAILED;\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parsemessage();\n if (s6 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s7 = peg$c8;\n peg$currPos++;\n }\n else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c9);\n }\n }\n if (s7 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c61(s2, s6);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parsewhiteSpace() {\n var s0, s1;\n peg$silentFails++;\n if (peg$c63.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c64);\n }\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c62);\n }\n }\n return s0;\n }\n function peg$parsepatternSyntax() {\n var s0, s1;\n peg$silentFails++;\n if (peg$c66.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c67);\n }\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c65);\n }\n }\n return s0;\n }\n function peg$parse_() {\n var s0, s1, s2;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsewhiteSpace();\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsewhiteSpace();\n }\n if (s1 !== peg$FAILED) {\n s0 = input.substring(s0, peg$currPos);\n }\n else {\n s0 = s1;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c68);\n }\n }\n return s0;\n }\n function peg$parsenumber() {\n var s0, s1, s2;\n peg$silentFails++;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 45) {\n s1 = peg$c70;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c71);\n }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseargNumber();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c72(s1, s2);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c69);\n }\n }\n return s0;\n }\n function peg$parseapostrophe() {\n var s0, s1;\n peg$silentFails++;\n if (input.charCodeAt(peg$currPos) === 39) {\n s0 = peg$c32;\n peg$currPos++;\n }\n else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c33);\n }\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c73);\n }\n }\n return s0;\n }\n function peg$parsedoubleApostrophes() {\n var s0, s1;\n peg$silentFails++;\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c75) {\n s1 = peg$c75;\n peg$currPos += 2;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c76);\n }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c77();\n }\n s0 = s1;\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c74);\n }\n }\n return s0;\n }\n function peg$parsequotedString() {\n var s0, s1, s2, s3, s4, s5;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 39) {\n s1 = peg$c32;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c33);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseescapedChar();\n if (s2 !== peg$FAILED) {\n s3 = peg$currPos;\n s4 = [];\n if (input.substr(peg$currPos, 2) === peg$c75) {\n s5 = peg$c75;\n peg$currPos += 2;\n }\n else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c76);\n }\n }\n if (s5 === peg$FAILED) {\n if (peg$c34.test(input.charAt(peg$currPos))) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c35);\n }\n }\n }\n while (s5 !== peg$FAILED) {\n s4.push(s5);\n if (input.substr(peg$currPos, 2) === peg$c75) {\n s5 = peg$c75;\n peg$currPos += 2;\n }\n else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c76);\n }\n }\n if (s5 === peg$FAILED) {\n if (peg$c34.test(input.charAt(peg$currPos))) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c35);\n }\n }\n }\n }\n if (s4 !== peg$FAILED) {\n s3 = input.substring(s3, peg$currPos);\n }\n else {\n s3 = s4;\n }\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 39) {\n s4 = peg$c32;\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c33);\n }\n }\n if (s4 === peg$FAILED) {\n s4 = null;\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c78(s2, s3);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parseunquotedString() {\n var s0, s1, s2, s3;\n s0 = peg$currPos;\n s1 = peg$currPos;\n if (input.length > peg$currPos) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c14);\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = peg$currPos;\n s3 = peg$c79(s2);\n if (s3) {\n s3 = undefined;\n }\n else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 === peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 10) {\n s1 = peg$c80;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c81);\n }\n }\n }\n if (s1 !== peg$FAILED) {\n s0 = input.substring(s0, peg$currPos);\n }\n else {\n s0 = s1;\n }\n return s0;\n }\n function peg$parseescapedChar() {\n var s0, s1, s2, s3;\n s0 = peg$currPos;\n s1 = peg$currPos;\n if (input.length > peg$currPos) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c14);\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = peg$currPos;\n s3 = peg$c82(s2);\n if (s3) {\n s3 = undefined;\n }\n else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n s0 = input.substring(s0, peg$currPos);\n }\n else {\n s0 = s1;\n }\n return s0;\n }\n function peg$parseargNameOrNumber() {\n var s0, s1;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = peg$parseargNumber();\n if (s1 === peg$FAILED) {\n s1 = peg$parseargName();\n }\n if (s1 !== peg$FAILED) {\n s0 = input.substring(s0, peg$currPos);\n }\n else {\n s0 = s1;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c83);\n }\n }\n return s0;\n }\n function peg$parseargNumber() {\n var s0, s1, s2, s3, s4;\n peg$silentFails++;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 48) {\n s1 = peg$c85;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c86);\n }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c87();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$currPos;\n if (peg$c88.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c89);\n }\n }\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c90.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c91);\n }\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c90.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c91);\n }\n }\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c92(s1);\n }\n s0 = s1;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c84);\n }\n }\n return s0;\n }\n function peg$parseargName() {\n var s0, s1, s2, s3, s4;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$currPos;\n s3 = peg$currPos;\n peg$silentFails++;\n s4 = peg$parsewhiteSpace();\n if (s4 === peg$FAILED) {\n s4 = peg$parsepatternSyntax();\n }\n peg$silentFails--;\n if (s4 === peg$FAILED) {\n s3 = undefined;\n }\n else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c14);\n }\n }\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$currPos;\n s3 = peg$currPos;\n peg$silentFails++;\n s4 = peg$parsewhiteSpace();\n if (s4 === peg$FAILED) {\n s4 = peg$parsepatternSyntax();\n }\n peg$silentFails--;\n if (s4 === peg$FAILED) {\n s3 = undefined;\n }\n else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c14);\n }\n }\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n }\n }\n else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n s0 = input.substring(s0, peg$currPos);\n }\n else {\n s0 = s1;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c93);\n }\n }\n return s0;\n }\n var messageCtx = ['root'];\n function isNestedMessageText() {\n return messageCtx.length > 1;\n }\n function isInPluralOption() {\n return messageCtx[messageCtx.length - 1] === 'plural';\n }\n function insertLocation() {\n return options && options.captureLocation ? {\n location: location()\n } : {};\n }\n peg$result = peg$startRuleFunction();\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n }\n else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length\n ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n : peg$computeLocation(peg$maxFailPos, peg$maxFailPos));\n }\n}\nexport var pegParse = peg$parse;\n","var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nimport { isPluralElement, isLiteralElement, isSelectElement, } from './types';\nimport { pegParse } from './parser';\nvar PLURAL_HASHTAG_REGEX = /(^|[^\\\\])#/g;\n/**\n * Whether to convert `#` in plural rule options\n * to `{var, number}`\n * @param el AST Element\n * @param pluralStack current plural stack\n */\nexport function normalizeHashtagInPlural(els) {\n els.forEach(function (el) {\n // If we're encountering a plural el\n if (!isPluralElement(el) && !isSelectElement(el)) {\n return;\n }\n // Go down the options and search for # in any literal element\n Object.keys(el.options).forEach(function (id) {\n var _a;\n var opt = el.options[id];\n // If we got a match, we have to split this\n // and inject a NumberElement in the middle\n var matchingLiteralElIndex = -1;\n var literalEl = undefined;\n for (var i = 0; i < opt.value.length; i++) {\n var el_1 = opt.value[i];\n if (isLiteralElement(el_1) && PLURAL_HASHTAG_REGEX.test(el_1.value)) {\n matchingLiteralElIndex = i;\n literalEl = el_1;\n break;\n }\n }\n if (literalEl) {\n var newValue = literalEl.value.replace(PLURAL_HASHTAG_REGEX, \"$1{\" + el.value + \", number}\");\n var newEls = pegParse(newValue);\n (_a = opt.value).splice.apply(_a, __spreadArrays([matchingLiteralElIndex, 1], newEls));\n }\n normalizeHashtagInPlural(opt.value);\n });\n });\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n/**\n * https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js\n * with some tweaks\n */\nvar DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;\n/**\n * Parse Date time skeleton into Intl.DateTimeFormatOptions\n * Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * @public\n * @param skeleton skeleton string\n */\nexport function parseDateTimeSkeleton(skeleton) {\n var result = {};\n skeleton.replace(DATE_TIME_REGEX, function (match) {\n var len = match.length;\n switch (match[0]) {\n // Era\n case 'G':\n result.era = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short';\n break;\n // Year\n case 'y':\n result.year = len === 2 ? '2-digit' : 'numeric';\n break;\n case 'Y':\n case 'u':\n case 'U':\n case 'r':\n throw new RangeError('`Y/u/U/r` (year) patterns are not supported, use `y` instead');\n // Quarter\n case 'q':\n case 'Q':\n throw new RangeError('`q/Q` (quarter) patterns are not supported');\n // Month\n case 'M':\n case 'L':\n result.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][len - 1];\n break;\n // Week\n case 'w':\n case 'W':\n throw new RangeError('`w/W` (week) patterns are not supported');\n case 'd':\n result.day = ['numeric', '2-digit'][len - 1];\n break;\n case 'D':\n case 'F':\n case 'g':\n throw new RangeError('`D/F/g` (day) patterns are not supported, use `d` instead');\n // Weekday\n case 'E':\n result.weekday = len === 4 ? 'short' : len === 5 ? 'narrow' : 'short';\n break;\n case 'e':\n if (len < 4) {\n throw new RangeError('`e..eee` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n case 'c':\n if (len < 4) {\n throw new RangeError('`c..ccc` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n // Period\n case 'a': // AM, PM\n result.hour12 = true;\n break;\n case 'b': // am, pm, noon, midnight\n case 'B': // flexible day periods\n throw new RangeError('`b/B` (period) patterns are not supported, use `a` instead');\n // Hour\n case 'h':\n result.hourCycle = 'h12';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'H':\n result.hourCycle = 'h23';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'K':\n result.hourCycle = 'h11';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'k':\n result.hourCycle = 'h24';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'j':\n case 'J':\n case 'C':\n throw new RangeError('`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead');\n // Minute\n case 'm':\n result.minute = ['numeric', '2-digit'][len - 1];\n break;\n // Second\n case 's':\n result.second = ['numeric', '2-digit'][len - 1];\n break;\n case 'S':\n case 'A':\n throw new RangeError('`S/A` (second) pattenrs are not supported, use `s` instead');\n // Zone\n case 'z': // 1..3, 4: specific non-location format\n result.timeZoneName = len < 4 ? 'short' : 'long';\n break;\n case 'Z': // 1..3, 4, 5: The ISO8601 varios formats\n case 'O': // 1, 4: miliseconds in day short, long\n case 'v': // 1, 4: generic non-location format\n case 'V': // 1, 2, 3, 4: time zone ID or city\n case 'X': // 1, 2, 3, 4: The ISO8601 varios formats\n case 'x': // 1, 2, 3, 4: The ISO8601 varios formats\n throw new RangeError('`Z/O/v/V/X/x` (timeZone) pattenrs are not supported, use `z` instead');\n }\n return '';\n });\n return result;\n}\nfunction icuUnitToEcma(unit) {\n return unit.replace(/^(.*?)-/, '');\n}\nvar FRACTION_PRECISION_REGEX = /^\\.(?:(0+)(\\+|#+)?)?$/g;\nvar SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\\+|#+)?$/g;\nfunction parseSignificantPrecision(str) {\n var result = {};\n str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {\n // @@@ case\n if (typeof g2 !== 'string') {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits = g1.length;\n }\n // @@@+ case\n else if (g2 === '+') {\n result.minimumSignificantDigits = g1.length;\n }\n // .### case\n else if (g1[0] === '#') {\n result.maximumSignificantDigits = g1.length;\n }\n // .@@## or .@@@ case\n else {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits =\n g1.length + (typeof g2 === 'string' ? g2.length : 0);\n }\n return '';\n });\n return result;\n}\nfunction parseSign(str) {\n switch (str) {\n case 'sign-auto':\n return {\n signDisplay: 'auto',\n };\n case 'sign-accounting':\n return {\n currencySign: 'accounting',\n };\n case 'sign-always':\n return {\n signDisplay: 'always',\n };\n case 'sign-accounting-always':\n return {\n signDisplay: 'always',\n currencySign: 'accounting',\n };\n case 'sign-except-zero':\n return {\n signDisplay: 'exceptZero',\n };\n case 'sign-accounting-except-zero':\n return {\n signDisplay: 'exceptZero',\n currencySign: 'accounting',\n };\n case 'sign-never':\n return {\n signDisplay: 'never',\n };\n }\n}\nfunction parseNotationOptions(opt) {\n var result = {};\n var signOpts = parseSign(opt);\n if (signOpts) {\n return signOpts;\n }\n return result;\n}\n/**\n * https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options\n */\nexport function convertNumberSkeletonToNumberFormatOptions(tokens) {\n var result = {};\n for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {\n var token = tokens_1[_i];\n switch (token.stem) {\n case 'percent':\n result.style = 'percent';\n continue;\n case 'currency':\n result.style = 'currency';\n result.currency = token.options[0];\n continue;\n case 'group-off':\n result.useGrouping = false;\n continue;\n case 'precision-integer':\n result.maximumFractionDigits = 0;\n continue;\n case 'measure-unit':\n result.style = 'unit';\n result.unit = icuUnitToEcma(token.options[0]);\n continue;\n case 'compact-short':\n result.notation = 'compact';\n result.compactDisplay = 'short';\n continue;\n case 'compact-long':\n result.notation = 'compact';\n result.compactDisplay = 'long';\n continue;\n case 'scientific':\n result = __assign(__assign(__assign({}, result), { notation: 'scientific' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'engineering':\n result = __assign(__assign(__assign({}, result), { notation: 'engineering' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'notation-simple':\n result.notation = 'standard';\n continue;\n // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h\n case 'unit-width-narrow':\n result.currencyDisplay = 'narrowSymbol';\n result.unitDisplay = 'narrow';\n continue;\n case 'unit-width-short':\n result.currencyDisplay = 'code';\n result.unitDisplay = 'short';\n continue;\n case 'unit-width-full-name':\n result.currencyDisplay = 'name';\n result.unitDisplay = 'long';\n continue;\n case 'unit-width-iso-code':\n result.currencyDisplay = 'symbol';\n continue;\n }\n // Precision\n // https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#fraction-precision\n if (FRACTION_PRECISION_REGEX.test(token.stem)) {\n if (token.options.length > 1) {\n throw new RangeError('Fraction-precision stems only accept a single optional option');\n }\n token.stem.replace(FRACTION_PRECISION_REGEX, function (match, g1, g2) {\n // precision-integer case\n if (match === '.') {\n result.maximumFractionDigits = 0;\n }\n // .000+ case\n else if (g2 === '+') {\n result.minimumFractionDigits = g2.length;\n }\n // .### case\n else if (g1[0] === '#') {\n result.maximumFractionDigits = g1.length;\n }\n // .00## or .000 case\n else {\n result.minimumFractionDigits = g1.length;\n result.maximumFractionDigits =\n g1.length + (typeof g2 === 'string' ? g2.length : 0);\n }\n return '';\n });\n if (token.options.length) {\n result = __assign(__assign({}, result), parseSignificantPrecision(token.options[0]));\n }\n continue;\n }\n if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {\n result = __assign(__assign({}, result), parseSignificantPrecision(token.stem));\n continue;\n }\n var signOpts = parseSign(token.stem);\n if (signOpts) {\n result = __assign(__assign({}, result), signOpts);\n }\n }\n return result;\n}\n","import { pegParse } from './parser';\nimport { normalizeHashtagInPlural } from './normalize';\nexport * from './types';\nexport * from './parser';\nexport * from './skeleton';\nexport function parse(input, opts) {\n var els = pegParse(input, opts);\n if (!opts || opts.normalizeHashtagInPlural !== false) {\n normalizeHashtagInPlural(els);\n }\n return els;\n}\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\n// -- Utilities ----------------------------------------------------------------\nfunction getCacheId(inputs) {\n return JSON.stringify(inputs.map(function (input) {\n return input && typeof input === 'object' ? orderedProps(input) : input;\n }));\n}\nfunction orderedProps(obj) {\n return Object.keys(obj)\n .sort()\n .map(function (k) {\n var _a;\n return (_a = {}, _a[k] = obj[k], _a);\n });\n}\nvar memoizeFormatConstructor = function (FormatConstructor, cache) {\n if (cache === void 0) { cache = {}; }\n return function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var cacheId = getCacheId(args);\n var format = cacheId && cache[cacheId];\n if (!format) {\n format = new ((_a = FormatConstructor).bind.apply(_a, __spreadArrays([void 0], args)))();\n if (cacheId) {\n cache[cacheId] = format;\n }\n }\n return format;\n };\n};\nexport default memoizeFormatConstructor;\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nimport { convertNumberSkeletonToNumberFormatOptions, isArgumentElement, isDateElement, isDateTimeSkeleton, isLiteralElement, isNumberElement, isNumberSkeleton, isPluralElement, isPoundElement, isSelectElement, isTimeElement, parseDateTimeSkeleton, } from 'intl-messageformat-parser';\nvar FormatError = /** @class */ (function (_super) {\n __extends(FormatError, _super);\n function FormatError(msg, variableId) {\n var _this = _super.call(this, msg) || this;\n _this.variableId = variableId;\n return _this;\n }\n return FormatError;\n}(Error));\nfunction mergeLiteral(parts) {\n if (parts.length < 2) {\n return parts;\n }\n return parts.reduce(function (all, part) {\n var lastPart = all[all.length - 1];\n if (!lastPart ||\n lastPart.type !== 0 /* literal */ ||\n part.type !== 0 /* literal */) {\n all.push(part);\n }\n else {\n lastPart.value += part.value;\n }\n return all;\n }, []);\n}\n// TODO(skeleton): add skeleton support\nexport function formatToParts(els, locales, formatters, formats, values, currentPluralValue, \n// For debugging\noriginalMessage) {\n // Hot path for straight simple msg translations\n if (els.length === 1 && isLiteralElement(els[0])) {\n return [\n {\n type: 0 /* literal */,\n value: els[0].value,\n },\n ];\n }\n var result = [];\n for (var _i = 0, els_1 = els; _i < els_1.length; _i++) {\n var el = els_1[_i];\n // Exit early for string parts.\n if (isLiteralElement(el)) {\n result.push({\n type: 0 /* literal */,\n value: el.value,\n });\n continue;\n }\n // TODO: should this part be literal type?\n // Replace `#` in plural rules with the actual numeric value.\n if (isPoundElement(el)) {\n if (typeof currentPluralValue === 'number') {\n result.push({\n type: 0 /* literal */,\n value: formatters.getNumberFormat(locales).format(currentPluralValue),\n });\n }\n continue;\n }\n var varName = el.value;\n // Enforce that all required values are provided by the caller.\n if (!(values && varName in values)) {\n throw new FormatError(\"The intl string context variable \\\"\" + varName + \"\\\" was not provided to the string \\\"\" + originalMessage + \"\\\"\");\n }\n var value = values[varName];\n if (isArgumentElement(el)) {\n if (!value || typeof value === 'string' || typeof value === 'number') {\n value =\n typeof value === 'string' || typeof value === 'number'\n ? String(value)\n : '';\n }\n result.push({\n type: 1 /* argument */,\n value: value,\n });\n continue;\n }\n // Recursively format plural and select parts' option — which can be a\n // nested pattern structure. The choosing of the option to use is\n // abstracted-by and delegated-to the part helper object.\n if (isDateElement(el)) {\n var style = typeof el.style === 'string' ? formats.date[el.style] : undefined;\n result.push({\n type: 0 /* literal */,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isTimeElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.time[el.style]\n : isDateTimeSkeleton(el.style)\n ? parseDateTimeSkeleton(el.style.pattern)\n : undefined;\n result.push({\n type: 0 /* literal */,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isNumberElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.number[el.style]\n : isNumberSkeleton(el.style)\n ? convertNumberSkeletonToNumberFormatOptions(el.style.tokens)\n : undefined;\n result.push({\n type: 0 /* literal */,\n value: formatters\n .getNumberFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isSelectElement(el)) {\n var opt = el.options[value] || el.options.other;\n if (!opt) {\n throw new RangeError(\"Invalid values for \\\"\" + el.value + \"\\\": \\\"\" + value + \"\\\". Options are \\\"\" + Object.keys(el.options).join('\", \"') + \"\\\"\");\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values));\n continue;\n }\n if (isPluralElement(el)) {\n var opt = el.options[\"=\" + value];\n if (!opt) {\n if (!Intl.PluralRules) {\n throw new FormatError(\"Intl.PluralRules is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-pluralrules\\\"\\n\");\n }\n var rule = formatters\n .getPluralRules(locales, { type: el.pluralType })\n .select(value - (el.offset || 0));\n opt = el.options[rule] || el.options.other;\n }\n if (!opt) {\n throw new RangeError(\"Invalid values for \\\"\" + el.value + \"\\\": \\\"\" + value + \"\\\". Options are \\\"\" + Object.keys(el.options).join('\", \"') + \"\\\"\");\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values, value - (el.offset || 0)));\n continue;\n }\n }\n return mergeLiteral(result);\n}\nexport function formatToString(els, locales, formatters, formats, values, \n// For debugging\noriginalMessage) {\n var parts = formatToParts(els, locales, formatters, formats, values, undefined, originalMessage);\n // Hot path for straight simple msg translations\n if (parts.length === 1) {\n return parts[0].value;\n }\n return parts.reduce(function (all, part) { return (all += part.value); }, '');\n}\n// Singleton\nvar domParser;\nvar TOKEN_DELIMITER = '@@';\nvar TOKEN_REGEX = /@@(\\d+_\\d+)@@/g;\nvar counter = 0;\nfunction generateId() {\n return Date.now() + \"_\" + ++counter;\n}\nfunction restoreRichPlaceholderMessage(text, objectParts) {\n return text\n .split(TOKEN_REGEX)\n .filter(Boolean)\n .map(function (c) { return (objectParts[c] != null ? objectParts[c] : c); })\n .reduce(function (all, c) {\n if (!all.length) {\n all.push(c);\n }\n else if (typeof c === 'string' &&\n typeof all[all.length - 1] === 'string') {\n all[all.length - 1] += c;\n }\n else {\n all.push(c);\n }\n return all;\n }, []);\n}\n/**\n * Not exhaustive, just for sanity check\n */\nvar SIMPLE_XML_REGEX = /(<([0-9a-zA-Z-_]*?)>(.*?)<\\/([0-9a-zA-Z-_]*?)>)|(<[0-9a-zA-Z-_]*?\\/>)/;\nvar TEMPLATE_ID = Date.now() + '@@';\nvar VOID_ELEMENTS = [\n 'area',\n 'base',\n 'br',\n 'col',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr',\n];\nfunction formatHTMLElement(el, objectParts, values) {\n var tagName = el.tagName;\n var outerHTML = el.outerHTML, textContent = el.textContent, childNodes = el.childNodes;\n // Regular text\n if (!tagName) {\n return restoreRichPlaceholderMessage(textContent || '', objectParts);\n }\n tagName = tagName.toLowerCase();\n var isVoidElement = ~VOID_ELEMENTS.indexOf(tagName);\n var formatFnOrValue = values[tagName];\n if (formatFnOrValue && isVoidElement) {\n throw new FormatError(tagName + \" is a self-closing tag and can not be used, please use another tag name.\");\n }\n if (!childNodes.length) {\n return [outerHTML];\n }\n var chunks = Array.prototype.slice.call(childNodes).reduce(function (all, child) {\n return all.concat(formatHTMLElement(child, objectParts, values));\n }, []);\n // Legacy HTML\n if (!formatFnOrValue) {\n return __spreadArrays([\"<\" + tagName + \">\"], chunks, [\"\" + tagName + \">\"]);\n }\n // HTML Tag replacement\n if (typeof formatFnOrValue === 'function') {\n return [formatFnOrValue.apply(void 0, chunks)];\n }\n return [formatFnOrValue];\n}\nexport function formatHTMLMessage(els, locales, formatters, formats, values, \n// For debugging\noriginalMessage) {\n var parts = formatToParts(els, locales, formatters, formats, values, undefined, originalMessage);\n var objectParts = {};\n var formattedMessage = parts.reduce(function (all, part) {\n if (part.type === 0 /* literal */) {\n return (all += part.value);\n }\n var id = generateId();\n objectParts[id] = part.value;\n return (all += \"\" + TOKEN_DELIMITER + id + TOKEN_DELIMITER);\n }, '');\n // Not designed to filter out aggressively\n if (!SIMPLE_XML_REGEX.test(formattedMessage)) {\n return restoreRichPlaceholderMessage(formattedMessage, objectParts);\n }\n if (!values) {\n throw new FormatError('Message has placeholders but no values was given');\n }\n if (typeof DOMParser === 'undefined') {\n throw new FormatError('Cannot format XML message without DOMParser');\n }\n if (!domParser) {\n domParser = new DOMParser();\n }\n var content = domParser\n .parseFromString(\"\" + formattedMessage + \"\", 'text/html')\n .getElementById(TEMPLATE_ID);\n if (!content) {\n throw new FormatError(\"Malformed HTML message \" + formattedMessage);\n }\n var tagsToFormat = Object.keys(values).filter(function (varName) { return !!content.getElementsByTagName(varName).length; });\n // No tags to format\n if (!tagsToFormat.length) {\n return restoreRichPlaceholderMessage(formattedMessage, objectParts);\n }\n var caseSensitiveTags = tagsToFormat.filter(function (tagName) { return tagName !== tagName.toLowerCase(); });\n if (caseSensitiveTags.length) {\n throw new FormatError(\"HTML tag must be lowercased but the following tags are not: \" + caseSensitiveTags.join(', '));\n }\n // We're doing this since top node is `` which does not have a formatter\n return Array.prototype.slice\n .call(content.childNodes)\n .reduce(function (all, child) { return all.concat(formatHTMLElement(child, objectParts, values)); }, []);\n}\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { parse } from 'intl-messageformat-parser';\nimport memoizeIntlConstructor from 'intl-format-cache';\nimport { formatToString, formatToParts, formatHTMLMessage, } from './formatters';\n// -- MessageFormat --------------------------------------------------------\nfunction mergeConfig(c1, c2) {\n if (!c2) {\n return c1;\n }\n return __assign(__assign(__assign({}, (c1 || {})), (c2 || {})), Object.keys(c1).reduce(function (all, k) {\n all[k] = __assign(__assign({}, c1[k]), (c2[k] || {}));\n return all;\n }, {}));\n}\nfunction mergeConfigs(defaultConfig, configs) {\n if (!configs) {\n return defaultConfig;\n }\n return Object.keys(defaultConfig).reduce(function (all, k) {\n all[k] = mergeConfig(defaultConfig[k], configs[k]);\n return all;\n }, __assign({}, defaultConfig));\n}\nexport function createDefaultFormatters(cache) {\n if (cache === void 0) { cache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n }; }\n return {\n getNumberFormat: memoizeIntlConstructor(Intl.NumberFormat, cache.number),\n getDateTimeFormat: memoizeIntlConstructor(Intl.DateTimeFormat, cache.dateTime),\n getPluralRules: memoizeIntlConstructor(Intl.PluralRules, cache.pluralRules),\n };\n}\nvar IntlMessageFormat = /** @class */ (function () {\n function IntlMessageFormat(message, locales, overrideFormats, opts) {\n var _this = this;\n if (locales === void 0) { locales = IntlMessageFormat.defaultLocale; }\n this.formatterCache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n };\n this.format = function (values) {\n return formatToString(_this.ast, _this.locales, _this.formatters, _this.formats, values, _this.message);\n };\n this.formatToParts = function (values) {\n return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, undefined, _this.message);\n };\n this.formatHTMLMessage = function (values) {\n return formatHTMLMessage(_this.ast, _this.locales, _this.formatters, _this.formats, values, _this.message);\n };\n this.resolvedOptions = function () { return ({\n locale: Intl.NumberFormat.supportedLocalesOf(_this.locales)[0],\n }); };\n this.getAst = function () { return _this.ast; };\n if (typeof message === 'string') {\n this.message = message;\n if (!IntlMessageFormat.__parse) {\n throw new TypeError('IntlMessageFormat.__parse must be set to process `message` of type `string`');\n }\n // Parse string messages into an AST.\n this.ast = IntlMessageFormat.__parse(message, {\n normalizeHashtagInPlural: false,\n });\n }\n else {\n this.ast = message;\n }\n if (!Array.isArray(this.ast)) {\n throw new TypeError('A message must be provided as a String or AST.');\n }\n // Creates a new object with the specified `formats` merged with the default\n // formats.\n this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);\n // Defined first because it's used to build the format pattern.\n this.locales = locales;\n this.formatters =\n (opts && opts.formatters) || createDefaultFormatters(this.formatterCache);\n }\n IntlMessageFormat.defaultLocale = new Intl.NumberFormat().resolvedOptions().locale;\n IntlMessageFormat.__parse = parse;\n // Default format options used as the prototype of the `formats` provided to the\n // constructor. These are used when constructing the internal Intl.NumberFormat\n // and Intl.DateTimeFormat instances.\n IntlMessageFormat.formats = {\n number: {\n currency: {\n style: 'currency',\n },\n percent: {\n style: 'percent',\n },\n },\n date: {\n short: {\n month: 'numeric',\n day: 'numeric',\n year: '2-digit',\n },\n medium: {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n },\n long: {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n full: {\n weekday: 'long',\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n },\n time: {\n short: {\n hour: 'numeric',\n minute: 'numeric',\n },\n medium: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n },\n long: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n full: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n },\n };\n return IntlMessageFormat;\n}());\nexport { IntlMessageFormat };\nexport default IntlMessageFormat;\n"],"names":["TYPE","isLiteralElement","el","type","literal","isSelectElement","select","isPluralElement","plural","extendStatics","_super","__extends","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__","this","constructor","prototype","create","__assign","assign","t","s","i","n","arguments","length","call","apply","SyntaxError","Error","buildMessage","expected","found","hex","ch","charCodeAt","toString","toUpperCase","literalEscape","replace","classEscape","describeExpectation","expectation","text","escapedParts","parts","map","part","isArray","inverted","description","expected1","j","descriptions","sort","slice","join","describeExpected","found1","message","location","_this","name","captureStackTrace","pegParse","input","options","undefined","peg$result","peg$FAILED","peg$startRuleFunctions","start","peg$parsestart","peg$startRuleFunction","peg$c0","peg$c1","messageText","value","insertLocation","peg$c2","peg$c3","peg$literalExpectation","peg$c4","pound","peg$c5","peg$otherExpectation","peg$c6","peg$c7","peg$c8","peg$c9","peg$c10","argument","peg$c11","peg$c12","peg$c13","peg$classExpectation","peg$c14","peg$c15","peg$c16","peg$c17","peg$c18","option","peg$c19","peg$c20","stem","peg$c21","tokens","peg$c22","peg$c23","peg$c24","skeleton","peg$c25","messageCtx","push","peg$c26","style","pop","peg$c27","peg$c28","peg$c29","peg$c30","peg$c31","number","date","time","peg$c32","peg$c33","peg$c34","peg$c35","peg$c36","peg$c37","peg$c38","peg$c39","peg$c40","pattern","peg$c41","peg$c42","peg$c43","peg$c44","peg$c45","peg$c46","peg$c47","peg$c48","peg$c49","peg$c50","peg$c51","peg$c52","pluralType","offset","reduce","all","_a","id","optionLocation","error","peg$c53","peg$c54","peg$c55","peg$c56","peg$c57","peg$c58","peg$c59","peg$c60","peg$c61","peg$c62","peg$c63","peg$c64","peg$c65","peg$c66","peg$c67","peg$c68","peg$c69","peg$c70","peg$c71","peg$c72","negative","num","peg$c74","peg$c75","peg$c76","peg$c77","peg$c78","escapedChar","quotedChars","peg$c79","x","isInPluralOption","peg$c80","peg$c81","peg$c82","peg$c83","peg$c84","peg$c85","peg$c86","peg$c87","peg$c88","peg$c89","peg$c90","peg$c91","peg$c92","digits","parseInt","peg$c93","peg$currPos","peg$savedPos","peg$posDetailsCache","line","column","peg$maxFailPos","peg$maxFailExpected","peg$silentFails","startRule","substring","peg$computeLocation","location1","peg$buildSimpleError","text1","ignoreCase","peg$computePosDetails","pos","details","startPos","endPos","startPosDetails","endPosDetails","end","peg$fail","peg$parsemessage","s0","s1","peg$parsemessageElement","peg$parsemessageText","peg$parseliteralElement","s2","s3","s5","peg$parse_","peg$parseargNameOrNumber","peg$parseargumentElement","s7","s9","s10","s11","s12","substr","peg$parsenumberSkeletonToken","peg$parsenumberSkeleton","peg$parsenumberArgStyle","peg$parsenumberFormatElement","peg$parsedateTimeSkeletonLiteral","peg$parsedateTimeSkeletonPattern","peg$parsedateTimeSkeleton","peg$parsedateOrTimeArgStyle","peg$parsedateOrTimeFormatElement","peg$parsesimpleFormatElement","s13","s14","s15","peg$parsenumber","peg$parsepluralOption","peg$parsepluralElement","peg$parseselectOption","peg$parseselectElement","peg$parsepoundElement","peg$parsedoubleApostrophes","peg$parsequotedString","peg$parseunquotedString","peg$parsenumberSkeletonId","s4","peg$parsewhiteSpace","test","charAt","peg$parsenumberSkeletonTokenOption","s6","peg$parseargName","peg$parsepluralRuleSelectValue","peg$parsepatternSyntax","peg$parseargNumber","peg$parseescapedChar","captureLocation","__spreadArrays","il","r","k","a","jl","PLURAL_HASHTAG_REGEX","DATE_TIME_REGEX","parseDateTimeSkeleton","result","match","len","era","year","RangeError","month","day","weekday","hour12","hourCycle","hour","minute","second","timeZoneName","FRACTION_PRECISION_REGEX","SIGNIFICANT_PRECISION_REGEX","parseSignificantPrecision","str","_","g1","g2","minimumSignificantDigits","maximumSignificantDigits","parseSign","signDisplay","currencySign","parseNotationOptions","opt","signOpts","convertNumberSkeletonToNumberFormatOptions","_i","tokens_1","token","currency","useGrouping","maximumFractionDigits","unit","notation","compactDisplay","currencyDisplay","unitDisplay","minimumFractionDigits","parse","opts","els","normalizeHashtagInPlural","forEach","keys","matchingLiteralElIndex","literalEl","el_1","newValue","newEls","splice","getCacheId","inputs","JSON","stringify","obj","orderedProps","domParser","memoizeFormatConstructor","FormatConstructor","cache","args","cacheId","format","bind","FormatError","msg","variableId","formatToParts","locales","formatters","formats","values","currentPluralValue","originalMessage","els_1","varName","other","Intl","PluralRules","rule","getPluralRules","getNumberFormat","getDateTimeFormat","String","lastPart","mergeLiteral","formatToString","TOKEN_DELIMITER","TOKEN_REGEX","counter","restoreRichPlaceholderMessage","objectParts","split","filter","Boolean","c","SIMPLE_XML_REGEX","TEMPLATE_ID","Date","now","VOID_ELEMENTS","formatHTMLMessage","formattedMessage","DOMParser","content","parseFromString","getElementById","tagsToFormat","getElementsByTagName","caseSensitiveTags","tagName","toLowerCase","childNodes","child","concat","formatHTMLElement","outerHTML","textContent","isVoidElement","indexOf","formatFnOrValue","chunks","mergeConfigs","defaultConfig","configs","c1","c2","mergeConfig","createDefaultFormatters","dateTime","pluralRules","memoizeIntlConstructor","NumberFormat","DateTimeFormat","IntlMessageFormat","defaultLocale","resolvedOptions","locale","__parse","percent","short","medium","long","full","overrideFormats","formatterCache","ast","supportedLocalesOf","getAst","TypeError"],"mappings":"8MAAO,IAAIA,GACAA,EAsCJ,SAASC,EAAiBC,GAC7B,OAAOA,EAAGC,OAASH,GAAKI,QAcrB,SAASC,EAAgBH,GAC5B,OAAOA,EAAGC,OAASH,GAAKM,OAErB,SAASC,EAAgBL,GAC5B,OAAOA,EAAGC,OAASH,GAAKQ,QAzDjBR,EAkCRA,KAASA,GAAO,KA9BVA,EAAc,QAAI,GAAK,UAI5BA,EAAKA,EAAe,SAAI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