diff --git a/images/favicon.ico b/images/favicon.ico new file mode 100644 index 00000000..eed7bc9f Binary files /dev/null and b/images/favicon.ico differ diff --git a/index.html b/index.html index e1ca0cca..0897d5c9 100644 --- a/index.html +++ b/index.html @@ -2,10 +2,11 @@
-
+ *
+ * @param {Number} the `n` of times, items emitted by source Observable should be skipped.
+ * @return {Observable} an Observable that skips values emitted by the source Observable.
+ *
+ * @method skip
+ * @owner Observable
+ */
+ function skip(total) {
+ return this.lift(new SkipOperator(total));
+ }
+ exports.skip = skip;
+ var SkipOperator = (function () {
+ function SkipOperator(total) {
+ this.total = total;
+ }
+ SkipOperator.prototype.call = function (subscriber, source) {
+ return source._subscribe(new SkipSubscriber(subscriber, this.total));
+ };
+ return SkipOperator;
+ }());
+ /**
+ * We need this JSDoc comment for affecting ESDoc.
+ * @ignore
+ * @extends {Ignored}
+ */
+ var SkipSubscriber = (function (_super) {
+ __extends(SkipSubscriber, _super);
+ function SkipSubscriber(destination, total) {
+ _super.call(this, destination);
+ this.total = total;
+ this.count = 0;
+ }
+ SkipSubscriber.prototype._next = function (x) {
+ if (++this.count > this.total) {
+ this.destination.next(x);
+ }
+ };
+ return SkipSubscriber;
+ }(Subscriber_1.Subscriber));
+ //# sourceMappingURL=skip.js.map
+
/***/ },
/* 374 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
- var MulticastObservable_1 = __webpack_require__(375);
- var ConnectableObservable_1 = __webpack_require__(376);
+ var EmptyObservable_1 = __webpack_require__(343);
+ exports.empty = EmptyObservable_1.EmptyObservable.create;
+ //# sourceMappingURL=empty.js.map
+
+/***/ },
+/* 375 */
+/***/ function(module, exports, __webpack_require__) {
+
+ "use strict";
+ var multicast_1 = __webpack_require__(376);
+ var Subject_1 = __webpack_require__(314);
+ function shareSubjectFactory() {
+ return new Subject_1.Subject();
+ }
+ /**
+ * Returns a new Observable that multicasts (shares) the original Observable. As long as there is at least one
+ * Subscriber this Observable will be subscribed and emitting data. When all subscribers have unsubscribed it will
+ * unsubscribe from the source Observable. Because the Observable is multicasting it makes the stream `hot`.
+ * This is an alias for .publish().refCount().
+ *
+ *
+ *
+ * @return {Observable
- *
- * @param {Number} the `n` of times, items emitted by source Observable should be skipped.
- * @return {Observable} an Observable that skips values emitted by the source Observable.
- *
- * @method skip
- * @owner Observable
- */
- function skip(total) {
- return this.lift(new SkipOperator(total));
- }
- exports.skip = skip;
- var SkipOperator = (function () {
- function SkipOperator(total) {
- this.total = total;
- }
- SkipOperator.prototype.call = function (subscriber, source) {
- return source._subscribe(new SkipSubscriber(subscriber, this.total));
- };
- return SkipOperator;
- }());
- /**
- * We need this JSDoc comment for affecting ESDoc.
- * @ignore
- * @extends {Ignored}
- */
- var SkipSubscriber = (function (_super) {
- __extends(SkipSubscriber, _super);
- function SkipSubscriber(destination, total) {
- _super.call(this, destination);
- this.total = total;
- this.count = 0;
- }
- SkipSubscriber.prototype._next = function (x) {
- if (++this.count > this.total) {
- this.destination.next(x);
- }
- };
- return SkipSubscriber;
- }(Subscriber_1.Subscriber));
- //# sourceMappingURL=skip.js.map
-
-/***/ },
-/* 378 */
-/***/ function(module, exports, __webpack_require__) {
-
- "use strict";
- var EmptyObservable_1 = __webpack_require__(343);
- exports.empty = EmptyObservable_1.EmptyObservable.create;
- //# sourceMappingURL=empty.js.map
-
/***/ },
/* 379 */
-/***/ function(module, exports, __webpack_require__) {
-
- "use strict";
- var multicast_1 = __webpack_require__(374);
- var Subject_1 = __webpack_require__(314);
- function shareSubjectFactory() {
- return new Subject_1.Subject();
- }
- /**
- * Returns a new Observable that multicasts (shares) the original Observable. As long as there is at least one
- * Subscriber this Observable will be subscribed and emitting data. When all subscribers have unsubscribed it will
- * unsubscribe from the source Observable. Because the Observable is multicasting it makes the stream `hot`.
- * This is an alias for .publish().refCount().
- *
- *
- *
- * @return {Observable
- *
- * Like
- * [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce),
- * `reduce` applies an `accumulator` function against an accumulation and each
- * value of the source Observable (from the past) to reduce it to a single
- * value, emitted on the output Observable. Note that `reduce` will only emit
- * one value, only when the source Observable completes. It is equivalent to
- * applying operator {@link scan} followed by operator {@link last}.
- *
- * Returns an Observable that applies a specified `accumulator` function to each
- * item emitted by the source Observable. If a `seed` value is specified, then
- * that value will be used as the initial value for the accumulator. If no seed
- * value is specified, the first item of the source is used as the seed.
- *
- * @example
- *
- * Joins every Observable emitted by the source (a higher-order Observable), in
- * a serial fashion. It subscribes to each inner Observable only after the
- * previous inner Observable has completed, and merges all of their values into
- * the returned observable.
- *
- * __Warning:__ If the source Observable emits Observables quickly and
- * endlessly, and the inner Observables it emits generally complete slower than
- * the source emits, you can run into memory issues as the incoming Observables
- * collect in an unbounded buffer.
- *
- * Note: `concatAll` is equivalent to `mergeAll` with concurrency parameter set
- * to `1`.
- *
- * @example
+ *
+ * Like
+ * [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce),
+ * `reduce` applies an `accumulator` function against an accumulation and each
+ * value of the source Observable (from the past) to reduce it to a single
+ * value, emitted on the output Observable. Note that `reduce` will only emit
+ * one value, only when the source Observable completes. It is equivalent to
+ * applying operator {@link scan} followed by operator {@link last}.
+ *
+ * Returns an Observable that applies a specified `accumulator` function to each
+ * item emitted by the source Observable. If a `seed` value is specified, then
+ * that value will be used as the initial value for the accumulator. If no seed
+ * value is specified, the first item of the source is used as the seed.
+ *
+ * @example
+ *
+ * Joins every Observable emitted by the source (a higher-order Observable), in
+ * a serial fashion. It subscribes to each inner Observable only after the
+ * previous inner Observable has completed, and merges all of their values into
+ * the returned observable.
+ *
+ * __Warning:__ If the source Observable emits Observables quickly and
+ * endlessly, and the inner Observables it emits generally complete slower than
+ * the source emits, you can run into memory issues as the incoming Observables
+ * collect in an unbounded buffer.
+ *
+ * Note: `concatAll` is equivalent to `mergeAll` with concurrency parameter set
+ * to `1`.
+ *
+ * @example
+ *
+ * `combineLatest` combines the values from this Observable with values from
+ * Observables passed as arguments. This is done by subscribing to each
+ * Observable, in order, and collecting an array of each of the most recent
+ * values any time any of the input Observables emits, then either taking that
+ * array and passing it as arguments to an optional `project` function and
+ * emitting the return value of that, or just emitting the array of recent
+ * values directly if there is no `project` function.
+ *
+ * @example \r\n {{ keymap.description }}\r\n
\r\n
- *
- * `combineLatest` combines the values from this Observable with values from
- * Observables passed as arguments. This is done by subscribing to each
- * Observable, in order, and collecting an array of each of the most recent
- * values any time any of the input Observables emits, then either taking that
- * array and passing it as arguments to an optional `project` function and
- * emitting the return value of that, or just emitting the array of recent
- * values directly if there is no `project` function.
- *
- * @example \r\n {{ keymap.description }}\r\n
\r\nPress this key along with mouse movement/scrolling to accelerate/decelerate the speed of the action.
\r\nYou can set the multiplier in the settings.
\r\nUse negative values to move down or left from current position.
\r\nUse negative values to move down or left from current position.
\r\nInput the text you want to type with this macro action.
\r\n \r\n
+ *
+ * Returns a mirrored Observable of the source Observable, but modified so that
+ * the provided Observer is called to perform a side effect for every value,
+ * error, and completion emitted by the source. Any errors that are thrown in
+ * the aforementioned Observer or handlers are safely sent down the error path
+ * of the output Observable.
+ *
+ * This operator is useful for debugging your Observables for the correct values
+ * or performing other side effects.
+ *
+ * Note: this is different to a `subscribe` on the Observable. If the Observable
+ * returned by `do` is not subscribed, the side effects specified by the
+ * Observer will never happen. `do` therefore simply spies on existing
+ * execution, it does not trigger an execution to happen like `subscribe` does.
+ *
+ * @example \r\n {{ item.name }}: {{ item.value }}\r\n
\r\nPress this key along with mouse movement/scrolling to accelerate/decelerate the speed of the action.
\r\nYou can set the multiplier in link to setting.
\r\nUse negative values to move down or left from current position.
\r\nUse negative values to move down or left from current position.
\r\nInput the text you want to type with this macro action.
\r\n \r\n\r\n {{ item.name }}: {{ item.value }}\r\n
\r\n
- *
- * Returns a mirrored Observable of the source Observable, but modified so that
- * the provided Observer is called to perform a side effect for every value,
- * error, and completion emitted by the source. Any errors that are thrown in
- * the aforementioned Observer or handlers are safely sent down the error path
- * of the output Observable.
- *
- * This operator is useful for debugging your Observables for the correct values
- * or performing other side effects.
- *
- * Note: this is different to a `subscribe` on the Observable. If the Observable
- * returned by `do` is not subscribed, the side effects specified by the
- * Observer will never happen. `do` therefore simply spies on existing
- * execution, it does not trigger an execution to happen like `subscribe` does.
- *
- * @example {ICU message}
` would produce two messages:\n * - one for the content with meaning and description,\n * - another one for the ICU message.\n *\n * In this case the last message is discarded as it contains less information (the AST is\n * otherwise identical).\n *\n * Note that we should still keep messages extracted from attributes inside the section (ie in the\n * ICU message here)\n */\n _Visitor.prototype._closeTranslatableSection = function (node, directChildren) {\n if (!this._isInTranslatableSection) {\n this._reportError(node, 'Unexpected section end');\n return;\n }\n var startIndex = this._msgCountAtSectionStart;\n var significantChildren = directChildren.reduce(function (count, node) { return count + (node instanceof Comment ? 0 : 1); }, 0);\n if (significantChildren == 1) {\n for (var i = this._messages.length - 1; i >= startIndex; i--) {\n var ast = this._messages[i].nodes;\n if (!(ast.length == 1 && ast[0] instanceof Text$1)) {\n this._messages.splice(i, 1);\n break;\n }\n }\n }\n this._msgCountAtSectionStart = void 0;\n };\n _Visitor.prototype._reportError = function (node, msg) {\n this._errors.push(new I18nError(node.sourceSpan, msg));\n };\n return _Visitor;\n }());\n function _isOpeningComment(n) {\n return n instanceof Comment && n.value && n.value.startsWith('i18n');\n }\n function _isClosingComment(n) {\n return n instanceof Comment && n.value && n.value === '/i18n';\n }\n function _getI18nAttr(p) {\n return p.attrs.find(function (attr) { return attr.name === _I18N_ATTR; }) || null;\n }\n function _splitMeaningAndDesc(i18n) {\n if (!i18n)\n return ['', ''];\n var pipeIndex = i18n.indexOf('|');\n return pipeIndex == -1 ? ['', i18n] : [i18n.slice(0, pipeIndex), i18n.slice(pipeIndex + 1)];\n }\n\n /**\n * A container for message extracted from the templates.\n */\n var MessageBundle = (function () {\n function MessageBundle(_htmlParser, _implicitTags, _implicitAttrs) {\n this._htmlParser = _htmlParser;\n this._implicitTags = _implicitTags;\n this._implicitAttrs = _implicitAttrs;\n this._messageMap = {};\n }\n MessageBundle.prototype.updateFromTemplate = function (html, url, interpolationConfig) {\n var _this = this;\n var htmlParserResult = this._htmlParser.parse(html, url, true, interpolationConfig);\n if (htmlParserResult.errors.length) {\n return htmlParserResult.errors;\n }\n var i18nParserResult = extractMessages(htmlParserResult.rootNodes, interpolationConfig, this._implicitTags, this._implicitAttrs);\n if (i18nParserResult.errors.length) {\n return i18nParserResult.errors;\n }\n i18nParserResult.messages.forEach(function (message) { _this._messageMap[digestMessage(message)] = message; });\n };\n MessageBundle.prototype.getMessageMap = function () { return this._messageMap; };\n MessageBundle.prototype.write = function (serializer) { return serializer.write(this._messageMap); };\n return MessageBundle;\n }());\n\n var XmlTagDefinition = (function () {\n function XmlTagDefinition() {\n this.closedByParent = false;\n this.contentType = TagContentType.PARSABLE_DATA;\n this.isVoid = false;\n this.ignoreFirstLf = false;\n this.canSelfClose = true;\n }\n XmlTagDefinition.prototype.requireExtraParent = function (currentParent) { return false; };\n XmlTagDefinition.prototype.isClosedByChild = function (name) { return false; };\n return XmlTagDefinition;\n }());\n var _TAG_DEFINITION = new XmlTagDefinition();\n function getXmlTagDefinition(tagName) {\n return _TAG_DEFINITION;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var __extends$7 = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n var XmlParser = (function (_super) {\n __extends$7(XmlParser, _super);\n function XmlParser() {\n _super.call(this, getXmlTagDefinition);\n }\n XmlParser.prototype.parse = function (source, url, parseExpansionForms) {\n if (parseExpansionForms === void 0) { parseExpansionForms = false; }\n return _super.prototype.parse.call(this, source, url, parseExpansionForms, null);\n };\n return XmlParser;\n }(Parser$1));\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // Generate a map of placeholder to content indexed by message ids\n function extractPlaceholders(messageBundle) {\n var messageMap = messageBundle.getMessageMap();\n var placeholders = {};\n Object.keys(messageMap).forEach(function (msgId) {\n placeholders[msgId] = messageMap[msgId].placeholders;\n });\n return placeholders;\n }\n // Generate a map of placeholder to message ids indexed by message ids\n function extractPlaceholderToIds(messageBundle) {\n var messageMap = messageBundle.getMessageMap();\n var placeholderToIds = {};\n Object.keys(messageMap).forEach(function (msgId) {\n placeholderToIds[msgId] = messageMap[msgId].placeholderToMsgIds;\n });\n return placeholderToIds;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var __extends$8 = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n var _Visitor$1 = (function () {\n function _Visitor() {\n }\n _Visitor.prototype.visitTag = function (tag) {\n var _this = this;\n var strAttrs = this._serializeAttributes(tag.attrs);\n if (tag.children.length == 0) {\n return \"<\" + tag.name + strAttrs + \"/>\";\n }\n var strChildren = tag.children.map(function (node) { return node.visit(_this); });\n return \"<\" + tag.name + strAttrs + \">\" + strChildren.join('') + \"\" + tag.name + \">\";\n };\n _Visitor.prototype.visitText = function (text) { return text.value; };\n _Visitor.prototype.visitDeclaration = function (decl) {\n return \"\";\n };\n _Visitor.prototype._serializeAttributes = function (attrs) {\n var strAttrs = Object.keys(attrs).map(function (name) { return (name + \"=\\\"\" + attrs[name] + \"\\\"\"); }).join(' ');\n return strAttrs.length > 0 ? ' ' + strAttrs : '';\n };\n _Visitor.prototype.visitDoctype = function (doctype) {\n return \"\";\n };\n return _Visitor;\n }());\n var _visitor = new _Visitor$1();\n function serialize(nodes) {\n return nodes.map(function (node) { return node.visit(_visitor); }).join('');\n }\n var Declaration = (function () {\n function Declaration(unescapedAttrs) {\n var _this = this;\n this.attrs = {};\n Object.keys(unescapedAttrs).forEach(function (k) {\n _this.attrs[k] = _escapeXml(unescapedAttrs[k]);\n });\n }\n Declaration.prototype.visit = function (visitor) { return visitor.visitDeclaration(this); };\n return Declaration;\n }());\n var Doctype = (function () {\n function Doctype(rootTag, dtd) {\n this.rootTag = rootTag;\n this.dtd = dtd;\n }\n ;\n Doctype.prototype.visit = function (visitor) { return visitor.visitDoctype(this); };\n return Doctype;\n }());\n var Tag = (function () {\n function Tag(name, unescapedAttrs, children) {\n var _this = this;\n if (unescapedAttrs === void 0) { unescapedAttrs = {}; }\n if (children === void 0) { children = []; }\n this.name = name;\n this.children = children;\n this.attrs = {};\n Object.keys(unescapedAttrs).forEach(function (k) {\n _this.attrs[k] = _escapeXml(unescapedAttrs[k]);\n });\n }\n Tag.prototype.visit = function (visitor) { return visitor.visitTag(this); };\n return Tag;\n }());\n var Text$2 = (function () {\n function Text(unescapedValue) {\n this.value = _escapeXml(unescapedValue);\n }\n ;\n Text.prototype.visit = function (visitor) { return visitor.visitText(this); };\n return Text;\n }());\n var CR = (function (_super) {\n __extends$8(CR, _super);\n function CR(ws) {\n if (ws === void 0) { ws = 0; }\n _super.call(this, \"\\n\" + new Array(ws + 1).join(' '));\n }\n return CR;\n }(Text$2));\n var _ESCAPED_CHARS = [\n [/&/g, '&'],\n [/\"/g, '"'],\n [/'/g, '''],\n [//g, '>'],\n ];\n function _escapeXml(text) {\n return _ESCAPED_CHARS.reduce(function (text, entry) { return text.replace(entry[0], entry[1]); }, text);\n }\n\n var _VERSION = '1.2';\n var _XMLNS = 'urn:oasis:names:tc:xliff:document:1.2';\n // TODO(vicb): make this a param (s/_/-/)\n var _SOURCE_LANG = 'en';\n var _PLACEHOLDER_TAG = 'x';\n var _SOURCE_TAG = 'source';\n var _TARGET_TAG = 'target';\n var _UNIT_TAG = 'trans-unit';\n // http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html\n // http://docs.oasis-open.org/xliff/v1.2/xliff-profile-html/xliff-profile-html-1.2.html\n var Xliff = (function () {\n function Xliff(_htmlParser, _interpolationConfig) {\n this._htmlParser = _htmlParser;\n this._interpolationConfig = _interpolationConfig;\n }\n Xliff.prototype.write = function (messageMap) {\n var visitor = new _WriteVisitor();\n var transUnits = [];\n Object.keys(messageMap).forEach(function (id) {\n var message = messageMap[id];\n var transUnit = new Tag(_UNIT_TAG, { id: id, datatype: 'html' });\n transUnit.children.push(new CR(8), new Tag(_SOURCE_TAG, {}, visitor.serialize(message.nodes)), new CR(8), new Tag(_TARGET_TAG));\n if (message.description) {\n transUnit.children.push(new CR(8), new Tag('note', { priority: '1', from: 'description' }, [new Text$2(message.description)]));\n }\n if (message.meaning) {\n transUnit.children.push(new CR(8), new Tag('note', { priority: '1', from: 'meaning' }, [new Text$2(message.meaning)]));\n }\n transUnit.children.push(new CR(6));\n transUnits.push(new CR(6), transUnit);\n });\n var body = new Tag('body', {}, transUnits.concat([new CR(4)]));\n var file = new Tag('file', { 'source-language': _SOURCE_LANG, datatype: 'plaintext', original: 'ng2.template' }, [new CR(4), body, new CR(2)]);\n var xliff = new Tag('xliff', { version: _VERSION, xmlns: _XMLNS }, [new CR(2), file, new CR()]);\n return serialize([\n new Declaration({ version: '1.0', encoding: 'UTF-8' }), new CR(), xliff, new CR()\n ]);\n };\n Xliff.prototype.load = function (content, url, messageBundle) {\n var _this = this;\n // Parse the xtb file into xml nodes\n var result = new XmlParser().parse(content, url);\n if (result.errors.length) {\n throw new Error(\"xtb parse errors:\\n\" + result.errors.join('\\n'));\n }\n // Replace the placeholders, messages are now string\n var _a = new _LoadVisitor().parse(result.rootNodes, messageBundle), messages = _a.messages, errors = _a.errors;\n if (errors.length) {\n throw new Error(\"xtb parse errors:\\n\" + errors.join('\\n'));\n }\n // Convert the string messages to html ast\n // TODO(vicb): map error message back to the original message in xtb\n var messageMap = {};\n var parseErrors = [];\n Object.keys(messages).forEach(function (id) {\n var res = _this._htmlParser.parse(messages[id], url, true, _this._interpolationConfig);\n parseErrors.push.apply(parseErrors, res.errors);\n messageMap[id] = res.rootNodes;\n });\n if (parseErrors.length) {\n throw new Error(\"xtb parse errors:\\n\" + parseErrors.join('\\n'));\n }\n return messageMap;\n };\n return Xliff;\n }());\n var _WriteVisitor = (function () {\n function _WriteVisitor() {\n }\n _WriteVisitor.prototype.visitText = function (text, context) { return [new Text$2(text.value)]; };\n _WriteVisitor.prototype.visitContainer = function (container, context) {\n var _this = this;\n var nodes = [];\n container.children.forEach(function (node) { return nodes.push.apply(nodes, node.visit(_this)); });\n return nodes;\n };\n _WriteVisitor.prototype.visitIcu = function (icu, context) {\n if (this._isInIcu) {\n // nested ICU is not supported\n throw new Error('xliff does not support nested ICU messages');\n }\n this._isInIcu = true;\n // TODO(vicb): support ICU messages\n // https://lists.oasis-open.org/archives/xliff/201201/msg00028.html\n // http://docs.oasis-open.org/xliff/v1.2/xliff-profile-po/xliff-profile-po-1.2-cd02.html\n var nodes = [];\n this._isInIcu = false;\n return nodes;\n };\n _WriteVisitor.prototype.visitTagPlaceholder = function (ph, context) {\n var ctype = getCtypeForTag(ph.tag);\n var startTagPh = new Tag(_PLACEHOLDER_TAG, { id: ph.startName, ctype: ctype });\n if (ph.isVoid) {\n // void tags have no children nor closing tags\n return [startTagPh];\n }\n var closeTagPh = new Tag(_PLACEHOLDER_TAG, { id: ph.closeName, ctype: ctype });\n return [startTagPh].concat(this.serialize(ph.children), [closeTagPh]);\n };\n _WriteVisitor.prototype.visitPlaceholder = function (ph, context) {\n return [new Tag(_PLACEHOLDER_TAG, { id: ph.name })];\n };\n _WriteVisitor.prototype.visitIcuPlaceholder = function (ph, context) {\n return [new Tag(_PLACEHOLDER_TAG, { id: ph.name })];\n };\n _WriteVisitor.prototype.serialize = function (nodes) {\n var _this = this;\n this._isInIcu = false;\n return ListWrapper.flatten(nodes.map(function (node) { return node.visit(_this); }));\n };\n return _WriteVisitor;\n }());\n // TODO(vicb): add error management (structure)\n // TODO(vicb): factorize (xtb) ?\n var _LoadVisitor = (function () {\n function _LoadVisitor() {\n }\n _LoadVisitor.prototype.parse = function (nodes, messageBundle) {\n var _this = this;\n this._messageNodes = [];\n this._translatedMessages = {};\n this._msgId = '';\n this._target = [];\n this._errors = [];\n // Find all messages\n visitAll(this, nodes, null);\n var messageMap = messageBundle.getMessageMap();\n var placeholders = extractPlaceholders(messageBundle);\n var placeholderToIds = extractPlaceholderToIds(messageBundle);\n this._messageNodes\n .filter(function (message) {\n // Remove any messages that is not present in the source message bundle.\n return messageMap.hasOwnProperty(message[0]);\n })\n .sort(function (a, b) {\n // Because there could be no ICU placeholders inside an ICU message,\n // we do not need to take into account the `placeholderToMsgIds` of the referenced\n // messages, those would always be empty\n // TODO(vicb): overkill - create 2 buckets and [...woDeps, ...wDeps].process()\n if (Object.keys(messageMap[a[0]].placeholderToMsgIds).length == 0) {\n return -1;\n }\n if (Object.keys(messageMap[b[0]].placeholderToMsgIds).length == 0) {\n return 1;\n }\n return 0;\n })\n .forEach(function (message) {\n var id = message[0];\n _this._placeholders = placeholders[id] || {};\n _this._placeholderToIds = placeholderToIds[id] || {};\n // TODO(vicb): make sure there is no `_TRANSLATIONS_TAG` nor `_TRANSLATION_TAG`\n _this._translatedMessages[id] = visitAll(_this, message[1]).join('');\n });\n return { messages: this._translatedMessages, errors: this._errors };\n };\n _LoadVisitor.prototype.visitElement = function (element, context) {\n switch (element.name) {\n case _UNIT_TAG:\n this._target = null;\n var msgId = element.attrs.find(function (attr) { return attr.name === 'id'; });\n if (!msgId) {\n this._addError(element, \"<\" + _UNIT_TAG + \"> misses the \\\"id\\\" attribute\");\n }\n else {\n this._msgId = msgId.value;\n }\n visitAll(this, element.children, null);\n if (this._msgId !== null) {\n this._messageNodes.push([this._msgId, this._target]);\n }\n break;\n case _SOURCE_TAG:\n // ignore source message\n break;\n case _TARGET_TAG:\n this._target = element.children;\n break;\n case _PLACEHOLDER_TAG:\n var idAttr = element.attrs.find(function (attr) { return attr.name === 'id'; });\n if (!idAttr) {\n this._addError(element, \"<\" + _PLACEHOLDER_TAG + \"> misses the \\\"id\\\" attribute\");\n }\n else {\n var id = idAttr.value;\n if (this._placeholders.hasOwnProperty(id)) {\n return this._placeholders[id];\n }\n if (this._placeholderToIds.hasOwnProperty(id) &&\n this._translatedMessages.hasOwnProperty(this._placeholderToIds[id])) {\n return this._translatedMessages[this._placeholderToIds[id]];\n }\n // TODO(vicb): better error message for when\n // !this._translatedMessages.hasOwnProperty(this._placeholderToIds[id])\n this._addError(element, \"The placeholder \\\"\" + id + \"\\\" does not exists in the source message\");\n }\n break;\n default:\n visitAll(this, element.children, null);\n }\n };\n _LoadVisitor.prototype.visitAttribute = function (attribute, context) {\n throw new Error('unreachable code');\n };\n _LoadVisitor.prototype.visitText = function (text, context) { return text.value; };\n _LoadVisitor.prototype.visitComment = function (comment, context) { return ''; };\n _LoadVisitor.prototype.visitExpansion = function (expansion, context) {\n throw new Error('unreachable code');\n };\n _LoadVisitor.prototype.visitExpansionCase = function (expansionCase, context) {\n throw new Error('unreachable code');\n };\n _LoadVisitor.prototype._addError = function (node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n };\n return _LoadVisitor;\n }());\n function getCtypeForTag(tag) {\n switch (tag.toLowerCase()) {\n case 'br':\n return 'lb';\n case 'img':\n return 'image';\n default:\n return \"x-\" + tag;\n }\n }\n\n var _MESSAGES_TAG = 'messagebundle';\n var _MESSAGE_TAG = 'msg';\n var _PLACEHOLDER_TAG$1 = 'ph';\n var _EXEMPLE_TAG = 'ex';\n var _DOCTYPE = \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\";\n var Xmb = (function () {\n function Xmb() {\n }\n Xmb.prototype.write = function (messageMap) {\n var visitor = new _Visitor$2();\n var rootNode = new Tag(_MESSAGES_TAG);\n Object.keys(messageMap).forEach(function (id) {\n var message = messageMap[id];\n var attrs = { id: id };\n if (message.description) {\n attrs['desc'] = message.description;\n }\n if (message.meaning) {\n attrs['meaning'] = message.meaning;\n }\n rootNode.children.push(new CR(2), new Tag(_MESSAGE_TAG, attrs, visitor.serialize(message.nodes)));\n });\n rootNode.children.push(new CR());\n return serialize([\n new Declaration({ version: '1.0', encoding: 'UTF-8' }),\n new CR(),\n new Doctype(_MESSAGES_TAG, _DOCTYPE),\n new CR(),\n rootNode,\n new CR(),\n ]);\n };\n Xmb.prototype.load = function (content, url, messageBundle) {\n throw new Error('Unsupported');\n };\n return Xmb;\n }());\n var _Visitor$2 = (function () {\n function _Visitor() {\n }\n _Visitor.prototype.visitText = function (text, context) { return [new Text$2(text.value)]; };\n _Visitor.prototype.visitContainer = function (container, context) {\n var _this = this;\n var nodes = [];\n container.children.forEach(function (node) { return nodes.push.apply(nodes, node.visit(_this)); });\n return nodes;\n };\n _Visitor.prototype.visitIcu = function (icu, context) {\n var _this = this;\n var nodes = [new Text$2(\"{\" + icu.expression + \", \" + icu.type + \", \")];\n Object.keys(icu.cases).forEach(function (c) {\n nodes.push.apply(nodes, [new Text$2(c + \" {\")].concat(icu.cases[c].visit(_this), [new Text$2(\"} \")]));\n });\n nodes.push(new Text$2(\"}\"));\n return nodes;\n };\n _Visitor.prototype.visitTagPlaceholder = function (ph, context) {\n var startEx = new Tag(_EXEMPLE_TAG, {}, [new Text$2(\"<\" + ph.tag + \">\")]);\n var startTagPh = new Tag(_PLACEHOLDER_TAG$1, { name: ph.startName }, [startEx]);\n if (ph.isVoid) {\n // void tags have no children nor closing tags\n return [startTagPh];\n }\n var closeEx = new Tag(_EXEMPLE_TAG, {}, [new Text$2(\"\" + ph.tag + \">\")]);\n var closeTagPh = new Tag(_PLACEHOLDER_TAG$1, { name: ph.closeName }, [closeEx]);\n return [startTagPh].concat(this.serialize(ph.children), [closeTagPh]);\n };\n _Visitor.prototype.visitPlaceholder = function (ph, context) {\n return [new Tag(_PLACEHOLDER_TAG$1, { name: ph.name })];\n };\n _Visitor.prototype.visitIcuPlaceholder = function (ph, context) {\n return [new Tag(_PLACEHOLDER_TAG$1, { name: ph.name })];\n };\n _Visitor.prototype.serialize = function (nodes) {\n var _this = this;\n return ListWrapper.flatten(nodes.map(function (node) { return node.visit(_this); }));\n };\n return _Visitor;\n }());\n\n var _TRANSLATIONS_TAG = 'translationbundle';\n var _TRANSLATION_TAG = 'translation';\n var _PLACEHOLDER_TAG$2 = 'ph';\n var Xtb = (function () {\n function Xtb(_htmlParser, _interpolationConfig) {\n this._htmlParser = _htmlParser;\n this._interpolationConfig = _interpolationConfig;\n }\n Xtb.prototype.write = function (messageMap) { throw new Error('Unsupported'); };\n Xtb.prototype.load = function (content, url, messageBundle) {\n var _this = this;\n // Parse the xtb file into xml nodes\n var result = new XmlParser().parse(content, url);\n if (result.errors.length) {\n throw new Error(\"xtb parse errors:\\n\" + result.errors.join('\\n'));\n }\n // Replace the placeholders, messages are now string\n var _a = new _Visitor$3().parse(result.rootNodes, messageBundle), messages = _a.messages, errors = _a.errors;\n if (errors.length) {\n throw new Error(\"xtb parse errors:\\n\" + errors.join('\\n'));\n }\n // Convert the string messages to html ast\n // TODO(vicb): map error message back to the original message in xtb\n var messageMap = {};\n var parseErrors = [];\n Object.keys(messages).forEach(function (id) {\n var res = _this._htmlParser.parse(messages[id], url, true, _this._interpolationConfig);\n parseErrors.push.apply(parseErrors, res.errors);\n messageMap[id] = res.rootNodes;\n });\n if (parseErrors.length) {\n throw new Error(\"xtb parse errors:\\n\" + parseErrors.join('\\n'));\n }\n return messageMap;\n };\n return Xtb;\n }());\n var _Visitor$3 = (function () {\n function _Visitor() {\n }\n _Visitor.prototype.parse = function (nodes, messageBundle) {\n var _this = this;\n this._messageNodes = [];\n this._translatedMessages = {};\n this._bundleDepth = 0;\n this._translationDepth = 0;\n this._errors = [];\n // Find all messages\n visitAll(this, nodes, null);\n var messageMap = messageBundle.getMessageMap();\n var placeholders = extractPlaceholders(messageBundle);\n var placeholderToIds = extractPlaceholderToIds(messageBundle);\n this._messageNodes\n .filter(function (message) {\n // Remove any messages that is not present in the source message bundle.\n return messageMap.hasOwnProperty(message[0]);\n })\n .sort(function (a, b) {\n // Because there could be no ICU placeholders inside an ICU message,\n // we do not need to take into account the `placeholderToMsgIds` of the referenced\n // messages, those would always be empty\n // TODO(vicb): overkill - create 2 buckets and [...woDeps, ...wDeps].process()\n if (Object.keys(messageMap[a[0]].placeholderToMsgIds).length == 0) {\n return -1;\n }\n if (Object.keys(messageMap[b[0]].placeholderToMsgIds).length == 0) {\n return 1;\n }\n return 0;\n })\n .forEach(function (message) {\n var id = message[0];\n _this._placeholders = placeholders[id] || {};\n _this._placeholderToIds = placeholderToIds[id] || {};\n // TODO(vicb): make sure there is no `_TRANSLATIONS_TAG` nor `_TRANSLATION_TAG`\n _this._translatedMessages[id] = visitAll(_this, message[1]).join('');\n });\n return { messages: this._translatedMessages, errors: this._errors };\n };\n _Visitor.prototype.visitElement = function (element, context) {\n switch (element.name) {\n case _TRANSLATIONS_TAG:\n this._bundleDepth++;\n if (this._bundleDepth > 1) {\n this._addError(element, \"<\" + _TRANSLATIONS_TAG + \"> elements can not be nested\");\n }\n visitAll(this, element.children, null);\n this._bundleDepth--;\n break;\n case _TRANSLATION_TAG:\n this._translationDepth++;\n if (this._translationDepth > 1) {\n this._addError(element, \"<\" + _TRANSLATION_TAG + \"> elements can not be nested\");\n }\n var idAttr = element.attrs.find(function (attr) { return attr.name === 'id'; });\n if (!idAttr) {\n this._addError(element, \"<\" + _TRANSLATION_TAG + \"> misses the \\\"id\\\" attribute\");\n }\n else {\n // ICU placeholders are reference to other messages.\n // The referenced message might not have been decoded yet.\n // We need to have all messages available to make sure deps are decoded first.\n // TODO(vicb): report an error on duplicate id\n this._messageNodes.push([idAttr.value, element.children]);\n }\n this._translationDepth--;\n break;\n case _PLACEHOLDER_TAG$2:\n var nameAttr = element.attrs.find(function (attr) { return attr.name === 'name'; });\n if (!nameAttr) {\n this._addError(element, \"<\" + _PLACEHOLDER_TAG$2 + \"> misses the \\\"name\\\" attribute\");\n }\n else {\n var name_1 = nameAttr.value;\n if (this._placeholders.hasOwnProperty(name_1)) {\n return this._placeholders[name_1];\n }\n if (this._placeholderToIds.hasOwnProperty(name_1) &&\n this._translatedMessages.hasOwnProperty(this._placeholderToIds[name_1])) {\n return this._translatedMessages[this._placeholderToIds[name_1]];\n }\n // TODO(vicb): better error message for when\n // !this._translatedMessages.hasOwnProperty(this._placeholderToIds[name])\n this._addError(element, \"The placeholder \\\"\" + name_1 + \"\\\" does not exists in the source message\");\n }\n break;\n default:\n this._addError(element, 'Unexpected tag');\n }\n };\n _Visitor.prototype.visitAttribute = function (attribute, context) {\n throw new Error('unreachable code');\n };\n _Visitor.prototype.visitText = function (text, context) { return text.value; };\n _Visitor.prototype.visitComment = function (comment, context) { return ''; };\n _Visitor.prototype.visitExpansion = function (expansion, context) {\n var _this = this;\n var strCases = expansion.cases.map(function (c) { return c.visit(_this, null); });\n return \"{\" + expansion.switchValue + \", \" + expansion.type + \", strCases.join(' ')}\";\n };\n _Visitor.prototype.visitExpansionCase = function (expansionCase, context) {\n return expansionCase.value + \" {\" + visitAll(this, expansionCase.expression, null) + \"}\";\n };\n _Visitor.prototype._addError = function (node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n };\n return _Visitor;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * A container for translated messages\n */\n var TranslationBundle = (function () {\n function TranslationBundle(_messageMap) {\n if (_messageMap === void 0) { _messageMap = {}; }\n this._messageMap = _messageMap;\n }\n TranslationBundle.load = function (content, url, messageBundle, serializer) {\n return new TranslationBundle(serializer.load(content, url, messageBundle));\n };\n TranslationBundle.prototype.get = function (id) { return this._messageMap[id]; };\n TranslationBundle.prototype.has = function (id) { return id in this._messageMap; };\n return TranslationBundle;\n }());\n\n var I18NHtmlParser = (function () {\n // TODO(vicb): transB.load() should not need a msgB & add transB.resolve(msgB,\n // interpolationConfig)\n // TODO(vicb): remove the interpolationConfig from the Xtb serializer\n function I18NHtmlParser(_htmlParser, _translations, _translationsFormat) {\n this._htmlParser = _htmlParser;\n this._translations = _translations;\n this._translationsFormat = _translationsFormat;\n }\n I18NHtmlParser.prototype.parse = function (source, url, parseExpansionForms, interpolationConfig) {\n if (parseExpansionForms === void 0) { parseExpansionForms = false; }\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n var parseResult = this._htmlParser.parse(source, url, parseExpansionForms, interpolationConfig);\n if (!this._translations || this._translations === '') {\n // Do not enable i18n when no translation bundle is provided\n return parseResult;\n }\n // TODO(vicb): add support for implicit tags / attributes\n var messageBundle = new MessageBundle(this._htmlParser, [], {});\n var errors = messageBundle.updateFromTemplate(source, url, interpolationConfig);\n if (errors && errors.length) {\n return new ParseTreeResult(parseResult.rootNodes, parseResult.errors.concat(errors));\n }\n var serializer = this._createSerializer(interpolationConfig);\n var translationBundle = TranslationBundle.load(this._translations, url, messageBundle, serializer);\n return mergeTranslations(parseResult.rootNodes, translationBundle, interpolationConfig, [], {});\n };\n I18NHtmlParser.prototype._createSerializer = function (interpolationConfig) {\n var format = (this._translationsFormat || 'xlf').toLowerCase();\n switch (format) {\n case 'xmb':\n return new Xmb();\n case 'xtb':\n return new Xtb(this._htmlParser, interpolationConfig);\n case 'xliff':\n case 'xlf':\n default:\n return new Xliff(this._htmlParser, interpolationConfig);\n }\n };\n return I18NHtmlParser;\n }());\n\n var isDefaultChangeDetectionStrategy = _angular_core.__core_private__.isDefaultChangeDetectionStrategy;\n var ChangeDetectorStatus = _angular_core.__core_private__.ChangeDetectorStatus;\n var LifecycleHooks = _angular_core.__core_private__.LifecycleHooks;\n var LIFECYCLE_HOOKS_VALUES = _angular_core.__core_private__.LIFECYCLE_HOOKS_VALUES;\n var ReflectorReader = _angular_core.__core_private__.ReflectorReader;\n var AppElement = _angular_core.__core_private__.AppElement;\n var CodegenComponentFactoryResolver = _angular_core.__core_private__.CodegenComponentFactoryResolver;\n var AppView = _angular_core.__core_private__.AppView;\n var DebugAppView = _angular_core.__core_private__.DebugAppView;\n var NgModuleInjector = _angular_core.__core_private__.NgModuleInjector;\n var registerModuleFactory = _angular_core.__core_private__.registerModuleFactory;\n var ViewType = _angular_core.__core_private__.ViewType;\n var MAX_INTERPOLATION_VALUES = _angular_core.__core_private__.MAX_INTERPOLATION_VALUES;\n var checkBinding = _angular_core.__core_private__.checkBinding;\n var flattenNestedViewRenderNodes = _angular_core.__core_private__.flattenNestedViewRenderNodes;\n var interpolate = _angular_core.__core_private__.interpolate;\n var ViewUtils = _angular_core.__core_private__.ViewUtils;\n var DebugContext = _angular_core.__core_private__.DebugContext;\n var StaticNodeDebugInfo = _angular_core.__core_private__.StaticNodeDebugInfo;\n var devModeEqual = _angular_core.__core_private__.devModeEqual;\n var UNINITIALIZED = _angular_core.__core_private__.UNINITIALIZED;\n var ValueUnwrapper = _angular_core.__core_private__.ValueUnwrapper;\n var TemplateRef_ = _angular_core.__core_private__.TemplateRef_;\n var EMPTY_ARRAY = _angular_core.__core_private__.EMPTY_ARRAY;\n var EMPTY_MAP = _angular_core.__core_private__.EMPTY_MAP;\n var pureProxy1 = _angular_core.__core_private__.pureProxy1;\n var pureProxy2 = _angular_core.__core_private__.pureProxy2;\n var pureProxy3 = _angular_core.__core_private__.pureProxy3;\n var pureProxy4 = _angular_core.__core_private__.pureProxy4;\n var pureProxy5 = _angular_core.__core_private__.pureProxy5;\n var pureProxy6 = _angular_core.__core_private__.pureProxy6;\n var pureProxy7 = _angular_core.__core_private__.pureProxy7;\n var pureProxy8 = _angular_core.__core_private__.pureProxy8;\n var pureProxy9 = _angular_core.__core_private__.pureProxy9;\n var pureProxy10 = _angular_core.__core_private__.pureProxy10;\n var castByValue = _angular_core.__core_private__.castByValue;\n var Console = _angular_core.__core_private__.Console;\n var reflector = _angular_core.__core_private__.reflector;\n var Reflector = _angular_core.__core_private__.Reflector;\n var ReflectionCapabilities = _angular_core.__core_private__.ReflectionCapabilities;\n var NoOpAnimationPlayer = _angular_core.__core_private__.NoOpAnimationPlayer;\n var AnimationSequencePlayer = _angular_core.__core_private__.AnimationSequencePlayer;\n var AnimationGroupPlayer = _angular_core.__core_private__.AnimationGroupPlayer;\n var AnimationKeyframe = _angular_core.__core_private__.AnimationKeyframe;\n var AnimationStyles = _angular_core.__core_private__.AnimationStyles;\n var ANY_STATE = _angular_core.__core_private__.ANY_STATE;\n var DEFAULT_STATE = _angular_core.__core_private__.DEFAULT_STATE;\n var EMPTY_ANIMATION_STATE = _angular_core.__core_private__.EMPTY_STATE;\n var FILL_STYLE_FLAG = _angular_core.__core_private__.FILL_STYLE_FLAG;\n var prepareFinalAnimationStyles = _angular_core.__core_private__.prepareFinalAnimationStyles;\n var balanceAnimationKeyframes = _angular_core.__core_private__.balanceAnimationKeyframes;\n var clearStyles = _angular_core.__core_private__.clearStyles;\n var collectAndResolveStyles = _angular_core.__core_private__.collectAndResolveStyles;\n var renderStyles = _angular_core.__core_private__.renderStyles;\n var ComponentStillLoadingError = _angular_core.__core_private__.ComponentStillLoadingError;\n\n var APP_VIEW_MODULE_URL = assetUrl('core', 'linker/view');\n var VIEW_UTILS_MODULE_URL = assetUrl('core', 'linker/view_utils');\n var CD_MODULE_URL = assetUrl('core', 'change_detection/change_detection');\n var ANIMATION_STYLE_UTIL_ASSET_URL = assetUrl('core', 'animation/animation_style_util');\n var Identifiers = (function () {\n function Identifiers() {\n }\n Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS = {\n name: 'ANALYZE_FOR_ENTRY_COMPONENTS',\n moduleUrl: assetUrl('core', 'metadata/di'),\n runtime: _angular_core.ANALYZE_FOR_ENTRY_COMPONENTS\n };\n Identifiers.ViewUtils = {\n name: 'ViewUtils',\n moduleUrl: assetUrl('core', 'linker/view_utils'),\n runtime: ViewUtils\n };\n Identifiers.AppView = { name: 'AppView', moduleUrl: APP_VIEW_MODULE_URL, runtime: AppView };\n Identifiers.DebugAppView = {\n name: 'DebugAppView',\n moduleUrl: APP_VIEW_MODULE_URL,\n runtime: DebugAppView\n };\n Identifiers.AppElement = {\n name: 'AppElement',\n moduleUrl: assetUrl('core', 'linker/element'),\n runtime: AppElement\n };\n Identifiers.ElementRef = {\n name: 'ElementRef',\n moduleUrl: assetUrl('core', 'linker/element_ref'),\n runtime: _angular_core.ElementRef\n };\n Identifiers.ViewContainerRef = {\n name: 'ViewContainerRef',\n moduleUrl: assetUrl('core', 'linker/view_container_ref'),\n runtime: _angular_core.ViewContainerRef\n };\n Identifiers.ChangeDetectorRef = {\n name: 'ChangeDetectorRef',\n moduleUrl: assetUrl('core', 'change_detection/change_detector_ref'),\n runtime: _angular_core.ChangeDetectorRef\n };\n Identifiers.RenderComponentType = {\n name: 'RenderComponentType',\n moduleUrl: assetUrl('core', 'render/api'),\n runtime: _angular_core.RenderComponentType\n };\n Identifiers.QueryList = {\n name: 'QueryList',\n moduleUrl: assetUrl('core', 'linker/query_list'),\n runtime: _angular_core.QueryList\n };\n Identifiers.TemplateRef = {\n name: 'TemplateRef',\n moduleUrl: assetUrl('core', 'linker/template_ref'),\n runtime: _angular_core.TemplateRef\n };\n Identifiers.TemplateRef_ = {\n name: 'TemplateRef_',\n moduleUrl: assetUrl('core', 'linker/template_ref'),\n runtime: TemplateRef_\n };\n Identifiers.CodegenComponentFactoryResolver = {\n name: 'CodegenComponentFactoryResolver',\n moduleUrl: assetUrl('core', 'linker/component_factory_resolver'),\n runtime: CodegenComponentFactoryResolver\n };\n Identifiers.ComponentFactoryResolver = {\n name: 'ComponentFactoryResolver',\n moduleUrl: assetUrl('core', 'linker/component_factory_resolver'),\n runtime: _angular_core.ComponentFactoryResolver\n };\n Identifiers.ComponentFactory = {\n name: 'ComponentFactory',\n runtime: _angular_core.ComponentFactory,\n moduleUrl: assetUrl('core', 'linker/component_factory')\n };\n Identifiers.NgModuleFactory = {\n name: 'NgModuleFactory',\n runtime: _angular_core.NgModuleFactory,\n moduleUrl: assetUrl('core', 'linker/ng_module_factory')\n };\n Identifiers.NgModuleInjector = {\n name: 'NgModuleInjector',\n runtime: NgModuleInjector,\n moduleUrl: assetUrl('core', 'linker/ng_module_factory')\n };\n Identifiers.RegisterModuleFactoryFn = {\n name: 'registerModuleFactory',\n runtime: registerModuleFactory,\n moduleUrl: assetUrl('core', 'linker/ng_module_factory_loader')\n };\n Identifiers.ValueUnwrapper = { name: 'ValueUnwrapper', moduleUrl: CD_MODULE_URL, runtime: ValueUnwrapper };\n Identifiers.Injector = {\n name: 'Injector',\n moduleUrl: assetUrl('core', 'di/injector'),\n runtime: _angular_core.Injector\n };\n Identifiers.ViewEncapsulation = {\n name: 'ViewEncapsulation',\n moduleUrl: assetUrl('core', 'metadata/view'),\n runtime: _angular_core.ViewEncapsulation\n };\n Identifiers.ViewType = {\n name: 'ViewType',\n moduleUrl: assetUrl('core', 'linker/view_type'),\n runtime: ViewType\n };\n Identifiers.ChangeDetectionStrategy = {\n name: 'ChangeDetectionStrategy',\n moduleUrl: CD_MODULE_URL,\n runtime: _angular_core.ChangeDetectionStrategy\n };\n Identifiers.StaticNodeDebugInfo = {\n name: 'StaticNodeDebugInfo',\n moduleUrl: assetUrl('core', 'linker/debug_context'),\n runtime: StaticNodeDebugInfo\n };\n Identifiers.DebugContext = {\n name: 'DebugContext',\n moduleUrl: assetUrl('core', 'linker/debug_context'),\n runtime: DebugContext\n };\n Identifiers.Renderer = {\n name: 'Renderer',\n moduleUrl: assetUrl('core', 'render/api'),\n runtime: _angular_core.Renderer\n };\n Identifiers.SimpleChange = { name: 'SimpleChange', moduleUrl: CD_MODULE_URL, runtime: _angular_core.SimpleChange };\n Identifiers.UNINITIALIZED = { name: 'UNINITIALIZED', moduleUrl: CD_MODULE_URL, runtime: UNINITIALIZED };\n Identifiers.ChangeDetectorStatus = {\n name: 'ChangeDetectorStatus',\n moduleUrl: CD_MODULE_URL,\n runtime: ChangeDetectorStatus\n };\n Identifiers.checkBinding = {\n name: 'checkBinding',\n moduleUrl: VIEW_UTILS_MODULE_URL,\n runtime: checkBinding\n };\n Identifiers.flattenNestedViewRenderNodes = {\n name: 'flattenNestedViewRenderNodes',\n moduleUrl: VIEW_UTILS_MODULE_URL,\n runtime: flattenNestedViewRenderNodes\n };\n Identifiers.devModeEqual = { name: 'devModeEqual', moduleUrl: CD_MODULE_URL, runtime: devModeEqual };\n Identifiers.interpolate = {\n name: 'interpolate',\n moduleUrl: VIEW_UTILS_MODULE_URL,\n runtime: interpolate\n };\n Identifiers.castByValue = {\n name: 'castByValue',\n moduleUrl: VIEW_UTILS_MODULE_URL,\n runtime: castByValue\n };\n Identifiers.EMPTY_ARRAY = {\n name: 'EMPTY_ARRAY',\n moduleUrl: VIEW_UTILS_MODULE_URL,\n runtime: EMPTY_ARRAY\n };\n Identifiers.EMPTY_MAP = { name: 'EMPTY_MAP', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: EMPTY_MAP };\n Identifiers.pureProxies = [\n null,\n { name: 'pureProxy1', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: pureProxy1 },\n { name: 'pureProxy2', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: pureProxy2 },\n { name: 'pureProxy3', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: pureProxy3 },\n { name: 'pureProxy4', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: pureProxy4 },\n { name: 'pureProxy5', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: pureProxy5 },\n { name: 'pureProxy6', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: pureProxy6 },\n { name: 'pureProxy7', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: pureProxy7 },\n { name: 'pureProxy8', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: pureProxy8 },\n { name: 'pureProxy9', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: pureProxy9 },\n { name: 'pureProxy10', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: pureProxy10 },\n ];\n Identifiers.SecurityContext = {\n name: 'SecurityContext',\n moduleUrl: assetUrl('core', 'security'),\n runtime: _angular_core.SecurityContext,\n };\n Identifiers.AnimationKeyframe = {\n name: 'AnimationKeyframe',\n moduleUrl: assetUrl('core', 'animation/animation_keyframe'),\n runtime: AnimationKeyframe\n };\n Identifiers.AnimationStyles = {\n name: 'AnimationStyles',\n moduleUrl: assetUrl('core', 'animation/animation_styles'),\n runtime: AnimationStyles\n };\n Identifiers.NoOpAnimationPlayer = {\n name: 'NoOpAnimationPlayer',\n moduleUrl: assetUrl('core', 'animation/animation_player'),\n runtime: NoOpAnimationPlayer\n };\n Identifiers.AnimationGroupPlayer = {\n name: 'AnimationGroupPlayer',\n moduleUrl: assetUrl('core', 'animation/animation_group_player'),\n runtime: AnimationGroupPlayer\n };\n Identifiers.AnimationSequencePlayer = {\n name: 'AnimationSequencePlayer',\n moduleUrl: assetUrl('core', 'animation/animation_sequence_player'),\n runtime: AnimationSequencePlayer\n };\n Identifiers.prepareFinalAnimationStyles = {\n name: 'prepareFinalAnimationStyles',\n moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL,\n runtime: prepareFinalAnimationStyles\n };\n Identifiers.balanceAnimationKeyframes = {\n name: 'balanceAnimationKeyframes',\n moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL,\n runtime: balanceAnimationKeyframes\n };\n Identifiers.clearStyles = {\n name: 'clearStyles',\n moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL,\n runtime: clearStyles\n };\n Identifiers.renderStyles = {\n name: 'renderStyles',\n moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL,\n runtime: renderStyles\n };\n Identifiers.collectAndResolveStyles = {\n name: 'collectAndResolveStyles',\n moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL,\n runtime: collectAndResolveStyles\n };\n Identifiers.LOCALE_ID = {\n name: 'LOCALE_ID',\n moduleUrl: assetUrl('core', 'i18n/tokens'),\n runtime: _angular_core.LOCALE_ID\n };\n Identifiers.TRANSLATIONS_FORMAT = {\n name: 'TRANSLATIONS_FORMAT',\n moduleUrl: assetUrl('core', 'i18n/tokens'),\n runtime: _angular_core.TRANSLATIONS_FORMAT\n };\n return Identifiers;\n }());\n function resolveIdentifier(identifier) {\n return new CompileIdentifierMetadata({\n name: identifier.name,\n moduleUrl: identifier.moduleUrl,\n reference: reflector.resolveIdentifier(identifier.name, identifier.moduleUrl, identifier.runtime)\n });\n }\n function identifierToken(identifier) {\n return new CompileTokenMetadata({ identifier: identifier });\n }\n function resolveIdentifierToken(identifier) {\n return identifierToken(resolveIdentifier(identifier));\n }\n function resolveEnumIdentifier(enumType, name) {\n var resolvedEnum = reflector.resolveEnum(enumType.reference, name);\n return new CompileIdentifierMetadata({ name: enumType.name + \".\" + name, moduleUrl: enumType.moduleUrl, reference: resolvedEnum });\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var __extends$9 = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n var HtmlParser = (function (_super) {\n __extends$9(HtmlParser, _super);\n function HtmlParser() {\n _super.call(this, getHtmlTagDefinition);\n }\n HtmlParser.prototype.parse = function (source, url, parseExpansionForms, interpolationConfig) {\n if (parseExpansionForms === void 0) { parseExpansionForms = false; }\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n return _super.prototype.parse.call(this, source, url, parseExpansionForms, interpolationConfig);\n };\n HtmlParser.decorators = [\n { type: _angular_core.Injectable },\n ];\n /** @nocollapse */\n HtmlParser.ctorParameters = [];\n return HtmlParser;\n }(Parser$1));\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var __extends$10 = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n // http://cldr.unicode.org/index/cldr-spec/plural-rules\n var PLURAL_CASES = ['zero', 'one', 'two', 'few', 'many', 'other'];\n /**\n * Expands special forms into elements.\n *\n * For example,\n *\n * ```\n * { messages.length, plural,\n * =0 {zero}\n * =1 {one}\n * other {more than one}\n * }\n * ```\n *\n * will be expanded into\n *\n * ```\n *