From abfde8f545d6541dcab3f4fbd960ee6dbeb40ab3 Mon Sep 17 00:00:00 2001 From: "Suwart, Jan" Date: Sun, 10 Mar 2019 14:50:18 +0100 Subject: [PATCH 1/4] Enable setting sprite path via forRoot() in ngModule, update to node 10, update demo and readme, resolves #22 --- README.md | 59 +++++--------- docs/assets/sprites-secondary/sprite.svg | 43 ++++++++++ docs/main.js | 79 +++++++++++++++---- docs/main.js.map | 2 +- docs/styles.js | 2 +- docs/styles.js.map | 2 +- package-lock.json | 2 +- projects/icon-sprite/README.md | 59 +++++--------- .../src/lib/icon-sprite-config.model.ts | 3 + .../icon-sprite/src/lib/icon-sprite.module.ts | 18 ++++- .../src/lib/icon-sprite.service.spec.ts | 18 ++++- .../src/lib/icon-sprite.service.ts | 12 ++- src/app/app.component.html | 67 ++++++---------- src/app/app.component.scss | 9 +++ src/app/app.component.ts | 22 ++++-- src/app/app.module.ts | 4 +- src/assets/sprites-secondary/sprite.svg | 43 ++++++++++ src/styles.scss | 1 + 18 files changed, 279 insertions(+), 166 deletions(-) create mode 100644 docs/assets/sprites-secondary/sprite.svg create mode 100644 projects/icon-sprite/src/lib/icon-sprite-config.model.ts create mode 100644 src/assets/sprites-secondary/sprite.svg diff --git a/README.md b/README.md index 0166237..2e24b1f 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,9 @@ This library provides both a solution for generating SVG sprites and a [module]( ## Demo -![Demo gif animation](svg-icon-sprite-anim.gif) +Demo gif animation - - Try out the ng-svg-icon-sprite demo - +[Try out the ng-svg-icon-sprite demo](https://jannicz.github.io/ng-svg-icon-sprite/) ## Use Cases @@ -71,7 +69,7 @@ npm run generate:svg-sprite __Note: the fill and stroke properties are removed so the SVG can be filled via CSS. If don't need to apply color changes on your icons, go for the multi-color pattern [described below](#user-content-dealing-with-multi-color-svgs-containing-inline-styles)__ -Regardless of the method, the script will take all SVG icons from `src/app/assets/icons` and create a sprite SVG into +The script will take all SVG icons under `src/app/assets/icons` and create a sprite SVG into `src/app/assets/sprites` using the [svg symbols technique](https://css-tricks.com/svg-symbol-good-choice-icons/): ``` @@ -89,20 +87,19 @@ app Now you can include icons by using the `svg-icon-sprite` component directive: ```html - + +``` - +Having a dynamic icon name: - +```html +[src]="'assets/sprites/sprite.svg#' + iconName" ``` ## Options @@ -137,19 +134,6 @@ If you have another folder structure than above, you can pass both your input an svg2sprite sourcefolder destination/filename.svg ``` -### Custom Styling - -To access inner SVG properties like `fill` or `stroke`, you need to use Angular's `::ng-deep` selector in -the host component and select the `use` tag inside the SVG: - -```css -.host-component ::ng-deep svg.icon use { - fill: orange; -} -``` - -__Note: make sure your CSS selector is strong enough here__ - ### Scaling and Sizing If your SVG does not scale like expected (i.e. it is cropped or larger than desired) it might be lacking a `viewBox`. @@ -171,7 +155,7 @@ Still having trouble with scaling or sizing? Read [this article](https://css-tri ### Dealing with multi color SVGs containing inline styles -If you wish to combine the single-color icon pattern with SVGs that contain inline styles (i.e. multi-color) that should not be overridden by CSS, +If you wish use SVGs that contain inline styles (multi-color) that should not be overridden by CSS, you will have to provide a separate sprite file that keeps the stroke and fill attributes: ```json @@ -180,26 +164,19 @@ you will have to provide a separate sprite file that keeps the stroke and fill a } ``` -The generated sprite will preserve it's original styles, but you won't be able to style it via CSS, [see demo](https://jannicz.github.io/ng-svg-icon-sprite/#multicolor). +The generated sprite will preserve it's original styles, but you won't be able to style it via CSS ([demo](https://jannicz.github.io/ng-svg-icon-sprite/#multicolor)). ### Setting a default sprite path for all icons -If your app uses one main sprite source, you can set it's path via the icon sprite service: +If your app uses one sprite source, you can set it's path in your `@NgModule` imports array: ```javascript -// In your app.component import the service -import { IconSpriteService } from 'ng-svg-icon-sprite'; - -// Inject it -constructor(private iconSpriteService: IconSpriteService) {} - -// And set the path -ngOnInit() { - this.iconSpriteService.setPath('assets/sprites/sprite.svg'); -} +imports: [ + IconSpriteModule.forRoot({ path: 'assets/sprites/sprite.svg' }) +] ``` -[Like in the demo](https://jannicz.github.io/ng-svg-icon-sprite/#defaultpath), you can now leave out the path and just provide the icon name. +You can now leave out the path and just provide the icon name ([demo](https://jannicz.github.io/ng-svg-icon-sprite/#defaultpath)). ```html @@ -228,7 +205,7 @@ svg4everybody(); ## Accessibility In order to support screen readers and make the icons meaningful, you can use following patters: -- add a `title` with descriptive text ([see demo](https://jannicz.github.io/ng-svg-icon-sprite/#a11y)) +- add a `title` with descriptive text ([demo](https://jannicz.github.io/ng-svg-icon-sprite/#a11y)) - optionally reference the title node using `aria-labelledby=”icon-title”` - optionally set the node's `role` to image (`role=”img”`) @@ -247,8 +224,8 @@ Or use combinations of several methods to achieve better results, like described ## Compatibility -This library is optimized for Angular 7. For Angular 6 use [ng-svg-icon-sprite 1.2](https://www.npmjs.com/package/ng-svg-icon-sprite/v/1.2.1), -for Angular 4/5 use [ng-svg-icon-sprite 0.8](https://www.npmjs.com/package/ng-svg-icon-sprite/v/0.8.0). +This library is optimized for Angular 7. For Angular 6 use [v. 1.2](https://www.npmjs.com/package/ng-svg-icon-sprite/v/1.2.1), +for Angular 4/5 use [v. 0.8](https://www.npmjs.com/package/ng-svg-icon-sprite/v/0.8.0). ## Author & License - Jan Suwart | MIT License diff --git a/docs/assets/sprites-secondary/sprite.svg b/docs/assets/sprites-secondary/sprite.svg new file mode 100644 index 0000000..a86b0c5 --- /dev/null +++ b/docs/assets/sprites-secondary/sprite.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/main.js b/docs/main.js index c1373ea..ea6725b 100644 --- a/docs/main.js +++ b/docs/main.js @@ -4,7 +4,7 @@ /*!*************************************************************!*\ !*** ./dist/ng-svg-icon-sprite/fesm5/ng-svg-icon-sprite.js ***! \*************************************************************/ -/*! exports provided: IconSpriteService, IconSpriteComponent, IconSpriteModule, ɵa */ +/*! exports provided: IconSpriteService, IconSpriteComponent, IconSpriteModule, ɵa, ɵb */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -12,7 +12,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IconSpriteService", function() { return IconSpriteService; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IconSpriteComponent", function() { return IconSpriteComponent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IconSpriteModule", function() { return IconSpriteModule; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵa", function() { return IconSpriteDirective; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵa", function() { return IconSpriteConfig; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵb", function() { return IconSpriteDirective; }); /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); @@ -22,12 +23,24 @@ __webpack_require__.r(__webpack_exports__); * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ +var IconSpriteConfig = /** @class */ (function () { + function IconSpriteConfig() { + } + return IconSpriteConfig; +}()); + /** - * To set the sprite path (filename) globally for the app, when including the sprite - * component, the path can be then omitted in the [src] attribute string + * @fileoverview added by tsickle + * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc + */ +/** + * To access a global sprite path */ var IconSpriteService = /** @class */ (function () { - function IconSpriteService() { + function IconSpriteService(config) { + if (config) { + this.setPath(config.path); + } } /** * @param {?} path @@ -55,8 +68,10 @@ var IconSpriteService = /** @class */ (function () { },] } ]; /** @nocollapse */ - IconSpriteService.ctorParameters = function () { return []; }; - /** @nocollapse */ IconSpriteService.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["defineInjectable"])({ factory: function IconSpriteService_Factory() { return new IconSpriteService(); }, token: IconSpriteService, providedIn: "root" }); + IconSpriteService.ctorParameters = function () { return [ + { type: IconSpriteConfig, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }] } + ]; }; + /** @nocollapse */ IconSpriteService.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["defineInjectable"])({ factory: function IconSpriteService_Factory() { return new IconSpriteService(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(IconSpriteConfig, 8)); }, token: IconSpriteService, providedIn: "root" }); return IconSpriteService; }()); @@ -162,9 +177,29 @@ var IconSpriteDirective = /** @class */ (function () { * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ +/** + * Using forRoot({ path: 'filepath' }), this module can be provided as a + * singleton for the global application (including lazy loaded submodules). + */ var IconSpriteModule = /** @class */ (function () { function IconSpriteModule() { } + /** + * @param {?} config + * @return {?} + */ + IconSpriteModule.forRoot = /** + * @param {?} config + * @return {?} + */ + function (config) { + return { + ngModule: IconSpriteModule, + providers: [ + { provide: IconSpriteConfig, useValue: config } + ] + }; + }; IconSpriteModule.decorators = [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{ imports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"]], @@ -224,7 +259,7 @@ webpackEmptyAsyncContext.id = "./src/$$_lazy_route_resource lazy recursive"; /*! no static exports found */ /***/ (function(module, exports) { -module.exports = "
\n

SVG-Icon-Sprite Demo

\n\n

\n Angular package that provides both a solution for generating sprites and a component for including them.\n

\n\n

The Basics (reference, width and styling)

\n\n

To display the icons in original size match the [width] and [height] with the width/height of the equivalent SVG.

\n\n \n\n

\n\n

\n\n\n

Scaling (using CSS transform)

\n\n

Use this pattern if you want to change the size of the original SVG. Apply same rules as above, wrap the SVG into a div and size it using CSS transforms.

\n\n \n\n

Scaling (using viewBox)

\n\n This is an alternative to the CSS scaling method presented above. Scaling via viewBox is less consistent across browsers.\n The pattern depends on your SVG source file, whether it already contains a viewBox or not.\n The following example SVGs with an original size of 100x100px are scaled down by 50%.\n\n \n\n

Default sprite path (using the icon sprite service)

\n\n Set the sprite path in your environment.ts, import and inject the IconSpriteService and set the default path. Now you\n can invoke the component and simply pass the icon name as [src].\n\n \n\n\n

Manipulation (using HTML properties)

\n\n \n \n \n \n \n\n \n\n

Adding Custom SVG Attributes

\n\n \n\n Adding focusable=\"false\" will prevent browser focus on SVG element in IE11.\n\n

Accessible example (meaningful icon pattern)

\n\n \n\n Adding [title]=\"'Orange star'\" will render <title id=\"star_100x100-title\">Orange star</title> as the first child of the SVG node and serve as alternative text for screen readers.\n To improve support, you can additionally reference the title's node via 'aria-labelledby' using the title's generated id star_100x100-title and set the role to img.\n\n

Multicolor Icons

\n\n If you want to include an multicolor icon, you will have to provide it form a separate sprite file (where the fill and stroke attributes are not stripped).\n Remember that you will not be able to overwrite styles via CSS.\n\n \n\n

\n Report bugs or feature requests on Github Issues\n

\n\n \n\n

\n Copyright Jan Suwart, MIT license\n

\n
\n\n\n\n" +module.exports = "
\n

SVG-Icon-Sprite Demo

\n\n

The Basics (reference, width and styling)

\n\n

To display the icons in original size match the [width] and [height] with the width/height of the equivalent SVG.\n To access the inner SVG properties like fill or stroke use ::ng-deep

\n\n \n\n\n

Scaling (using CSS transform)

\n\n

Use this pattern if you want to change the size of the original SVG. Apply same rules as above, wrap the SVG into a div and size it using CSS transforms.

\n\n \n\n

Scaling (using viewBox)

\n\n This is an alternative to the CSS scaling method presented above. Scaling via viewBox is less consistent across browsers.\n The pattern depends on your SVG source file, whether it already contains a viewBox or not.\n The following example SVGs with an original size of 100x100px are scaled down by 50%.\n\n \n\n

Default sprite path (using the icon sprite service)

\n\n Set the sprite path in your environment.ts and set the default path using forRoot(). Now you\n can invoke the component and simply pass the plain icon name as [src].\n\n \n\n

\n Optional: to change the sprite path during runtime, inject the iconSpriteService anywhere and execute this.iconSpriteService.setPath('new-path.svg')\n Re-render all icon-components afterwards!\n  \n \n

\n\n

Manipulation (using dynamic icon path)

\n\n \n \n \n \n \n\n \n\n

Accessible example (meaningful icon pattern)

\n\n \n\n Adding [title]=\"'Orange star'\" will render <title id=\"star_100x100-title\">Orange star</title> as the first child of the SVG node and serve as alternative text for screen readers.\n To improve support, you can additionally reference the title's node via 'aria-labelledby' using the title's generated id star_100x100-title and set the role to img.\n\n

Multicolor Icons

\n\n If you want to include an multicolor icon, you will have to provide it form a separate sprite file (where the fill and stroke attributes are not stripped).\n Remember that you will not be able to overwrite styles via CSS.\n\n \n\n

\n Report bugs or feature requests on Github Issues\n

\n\n \n\n

\n Copyright Jan Suwart, MIT license\n

\n
\n" /***/ }), @@ -235,7 +270,7 @@ module.exports = "
\n

SVG-Icon-Sprite Demo\\n \\n {{title}}\\n \\n \\n\\n\\n\\n \\n {{title}}\\n \\n \\n\\n\\n\\n \\n {{title}}\\n \\n \\n\\n\\n\\n \\n {{title}}\\n \\n \\n\\n\",\n styles: [\":host svg,:host use{fill:currentColor}\"]\n }] }\n ];\n /** @nocollapse */\n IconSpriteComponent.ctorParameters = function () { return [\n { type: IconSpriteService }\n ]; };\n IconSpriteComponent.propDecorators = {\n src: [{ type: Input }],\n classes: [{ type: Input }],\n width: [{ type: Input }],\n height: [{ type: Input }],\n viewBox: [{ type: Input }],\n preserveAspectRatio: [{ type: Input }],\n attribute: [{ type: Input }],\n title: [{ type: Input }]\n };\n return IconSpriteComponent;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Set your own attribute key/value pairs on the generated SVG element, i.e. focusable=\"false\"\n */\nvar IconSpriteDirective = /** @class */ (function () {\n function IconSpriteDirective(renderer, el) {\n this.renderer = renderer;\n this.el = el;\n }\n /**\n * @return {?}\n */\n IconSpriteDirective.prototype.ngOnInit = /**\n * @return {?}\n */\n function () {\n var _this = this;\n if (Array.isArray(this.attribute[0])) {\n /** @type {?} */\n var attributeArr = (/** @type {?} */ (this.attribute));\n attributeArr.forEach(function (obj) {\n _this.renderer.setAttribute(_this.el.nativeElement, obj[0], obj[1] ? obj[1] : '');\n });\n }\n else {\n /** @type {?} */\n var attribute = (/** @type {?} */ (this.attribute));\n if (attribute[0]) {\n this.renderer.setAttribute(this.el.nativeElement, attribute[0], attribute[1] ? attribute[1] : '');\n }\n }\n };\n IconSpriteDirective.decorators = [\n { type: Directive, args: [{\n selector: '[svgIconSpriteAttr]'\n },] }\n ];\n /** @nocollapse */\n IconSpriteDirective.ctorParameters = function () { return [\n { type: Renderer2 },\n { type: ElementRef }\n ]; };\n IconSpriteDirective.propDecorators = {\n attribute: [{ type: Input }]\n };\n return IconSpriteDirective;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nvar IconSpriteModule = /** @class */ (function () {\n function IconSpriteModule() {\n }\n IconSpriteModule.decorators = [\n { type: NgModule, args: [{\n imports: [CommonModule],\n declarations: [\n IconSpriteComponent,\n IconSpriteDirective\n ],\n exports: [IconSpriteComponent]\n },] }\n ];\n return IconSpriteModule;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\nexport { IconSpriteService, IconSpriteComponent, IconSpriteModule, IconSpriteDirective as ɵa };\n\n//# sourceMappingURL=ng-svg-icon-sprite.js.map","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = \"./src/$$_lazy_route_resource lazy recursive\";","module.exports = \"
\\n

SVG-Icon-Sprite Demo

\\n\\n

\\n Angular package that provides both a solution for generating sprites and a component for including them.\\n

\\n\\n

The Basics (reference, width and styling)

\\n\\n

To display the icons in original size match the [width] and [height] with the width/height of the equivalent SVG.

\\n\\n
    \\n
  • \\n
    \\n \\n
    \\n
    <svg-icon-sprite [src]=\\\"'assets/sprites/sprite.svg#star_100x100'\\\" [width]=\\\"'100px'\\\"></svg-icon>\\n\\n.icon-example {{ '{' }}\\n  color: darkred;\\n{{ '}' }}
    \\n
  • \\n
  • \\n
    \\n \\n
    \\n
    <svg-icon-sprite [src]=\\\"'assets/sprites/sprite.svg#delete_70x70'\\\" [width]=\\\"'70px'\\\" [height]=\\\"'65px'\\\"></svg-icon>
    \\n
  • \\n
  • \\n
    \\n \\n
    \\n
    <svg-icon-sprite [src]=\\\"'assets/sprites/sprite.svg#star_100x100'\\\" [classes]=\\\"'css-styled-icon'\\\" [width]=\\\"'100px'\\\"></svg-icon>\\n\\n.container ::ng-deep svg.css-styled-icon {{ '{' }}\\n  use {{ '{' }}\\n    fill: orange;\\n    stroke: black;\\n  {{ '}' }}\\n{{ '}' }}
    \\n
  • \\n
\\n\\n

\\n\\n

\\n\\n\\n

Scaling (using CSS transform)

\\n\\n

Use this pattern if you want to change the size of the original SVG. Apply same rules as above, wrap the SVG into a div and size it using CSS transforms.

\\n\\n
    \\n
  • \\n
    \\n
    \\n \\n
    \\n
    \\n
    \\n.icon-scale-down {{ '{' }}\\n  // Scale down by 50%\\n  transform: scale(0.5);\\n{{ '}' }}\\n      
    \\n
  • \\n
  • \\n
    \\n
    \\n \\n
    \\n
    \\n
    \\n.icon-scale-up {{ '{' }}\\n  // Scale up by 500%\\n  transform: scale(5);\\n{{ '}' }}\\n      
    \\n
  • \\n
\\n\\n

Scaling (using viewBox)

\\n\\n This is an alternative to the CSS scaling method presented above. Scaling via viewBox is less consistent across browsers.\\n The pattern depends on your SVG source file, whether it already contains a viewBox or not.\\n The following example SVGs with an original size of 100x100px are scaled down by 50%.\\n\\n
    \\n
  • \\n
    \\n \\n
    \\n
    \\n<!-- SVG source lacks a viewBox -->\\n<svg-icon-sprite [src]=\\\"'assets/sprites/sprite.svg#star_100x100'\\\" [width]=\\\"'100px'\\\" [viewBox]=\\\"'-50 -50 200 200'\\\"></svg-icon>\\n      
    \\n
  • \\n
  • \\n
    \\n \\n
    \\n
    \\n<!-- SVG source contains a viewBox -->\\n<svg-icon-sprite [src]=\\\"'assets/sprites/sprite.svg#star_100x100_viewbox'\\\" [width]=\\\"'50px'\\\" [viewBox]=\\\"'0 0 100 100'\\\"></svg-icon>\\n      
    \\n
  • \\n
\\n\\n

Default sprite path (using the icon sprite service)

\\n\\n Set the sprite path in your environment.ts, import and inject the IconSpriteService and set the default path. Now you\\n can invoke the component and simply pass the icon name as [src].\\n\\n
    \\n
  • \\n
    \\n \\n
    \\n
    \\n
    \\nimport {{ '{' }} IconSpriteService {{ '}' }} from 'ng-svg-icon-sprite';\\nimport {{ '{' }} environment {{ '}' }} from '../environments/environment';\\n\\nexport class AppComponent implements OnInit {{ '{' }}\\n  private env = environment;\\n\\n  constructor(private iconSpriteService: IconSpriteService) {{ '{' }}}\\n\\n  ngOnInit() {{ '{' }}\\n    this.iconSpriteService.setPath(this.env.spritePath);\\n  {{ '}' }}\\n{{ '}' }}\\n
    \\n
    <svg-icon-sprite [src]=\\\"'star_100x100'\\\" [width]=\\\"width\\\"></svg-icon>
    \\n
    \\n
  • \\n
\\n\\n\\n

Manipulation (using HTML properties)

\\n\\n \\n \\n \\n \\n \\n\\n
    \\n
  • \\n
    \\n \\n
    \\n
    <svg-icon-sprite [src]=\\\"icon\\\" [width]=\\\"width\\\" [viewBox]=\\\"'0 0 100 100'\\\"></svg-icon>
    \\n
  • \\n
\\n\\n

Adding Custom SVG Attributes

\\n\\n
    \\n
  • \\n
    \\n \\n
    \\n
    <svg-icon-sprite [src]=\\\"'assets/sprites/sprite.svg#delete_70x70'\\\" [attribute]=\\\"['focusable', 'false']\\\"></svg-icon>
    \\n
  • \\n
\\n\\n Adding focusable=\\\"false\\\" will prevent browser focus on SVG element in IE11.\\n\\n

Accessible example (meaningful icon pattern)

\\n\\n
    \\n
  • \\n
    \\n \\n
    \\n
    \\n<svg-icon-sprite\\n      [src]=\\\"'assets/sprites/sprite.svg#star_100x100'\\\"\\n      [title]=\\\"'Orange star'\\\"\\n      [attribute]=\\\"[['aria-labelledby', 'star_100x100-title'], ['role', 'img']]\\\"\\n></svg-icon>\\n      
    \\n
  • \\n
\\n\\n Adding [title]=\\\"'Orange star'\\\" will render <title id=\\\"star_100x100-title\\\">Orange star</title> as the first child of the SVG node and serve as alternative text for screen readers.\\n To improve support, you can additionally reference the title's node via 'aria-labelledby' using the title's generated id star_100x100-title and set the role to img.\\n\\n

Multicolor Icons

\\n\\n If you want to include an multicolor icon, you will have to provide it form a separate sprite file (where the fill and stroke attributes are not stripped).\\n Remember that you will not be able to overwrite styles via CSS.\\n\\n
    \\n
  • \\n
    \\n \\n
    \\n
    <svg-icon-sprite [src]=\\\"'assets/sprites/image-sprite.svg#multicolor-image'\\\"></svg-icon>
    \\n
  • \\n
\\n\\n

\\n Report bugs or feature requests on Github Issues\\n

\\n\\n \\n\\n

\\n Copyright Jan Suwart, MIT license\\n

\\n
\\n\\n\\n\\n\"","module.exports = \"@-webkit-keyframes mymove {\\n 0% {\\n -webkit-transform: translateX(0);\\n transform: translateX(0); }\\n 50% {\\n -webkit-transform: translateX(2px);\\n transform: translateX(2px); }\\n 75% {\\n -webkit-transform: translateX(0);\\n transform: translateX(0); }\\n 100% {\\n -webkit-transform: translateX(-2px);\\n transform: translateX(-2px); } }\\n\\n@keyframes mymove {\\n 0% {\\n -webkit-transform: translateX(0);\\n transform: translateX(0); }\\n 50% {\\n -webkit-transform: translateX(2px);\\n transform: translateX(2px); }\\n 75% {\\n -webkit-transform: translateX(0);\\n transform: translateX(0); }\\n 100% {\\n -webkit-transform: translateX(-2px);\\n transform: translateX(-2px); } }\\n\\n.icon-examples-1 {\\n color: darkred;\\n transition: -webkit-transform ease-in-out 0.2s;\\n transition: transform ease-in-out 0.2s;\\n transition: transform ease-in-out 0.2s, -webkit-transform ease-in-out 0.2s;\\n -webkit-transform-origin: center center;\\n -ms-transform-origin: center center;\\n transform-origin: center center; }\\n\\n.icon-examples-1:hover, .icon-examples-1:focus {\\n color: red;\\n -webkit-transform: rotate(12deg);\\n -ms-transform: rotate(12deg);\\n transform: rotate(12deg); }\\n\\n.icon-examples-2 {\\n color: darkgreen;\\n transition: color ease-in-out 0.4s; }\\n\\n.icon-examples-2:hover, .icon-examples-2:focus {\\n color: limegreen; }\\n\\n.icon-examples-3 {\\n transition: -webkit-transform ease-in-out 0.2s;\\n transition: transform ease-in-out 0.2s;\\n transition: transform ease-in-out 0.2s, -webkit-transform ease-in-out 0.2s;\\n -webkit-transform-origin: center center;\\n -ms-transform-origin: center center;\\n transform-origin: center center; }\\n\\n.icon-examples-3:hover, .icon-examples-3:focus {\\n -webkit-transform: scale(1.1);\\n -ms-transform: scale(1.1);\\n transform: scale(1.1); }\\n\\n.icon-examples-4 {\\n color: darkred; }\\n\\n.icon-examples-4:hover, .icon-examples-4:focus {\\n color: brown; }\\n\\n.icon-examples-5 {\\n color: darkorange;\\n transition: color ease-in-out 0.1s; }\\n\\n.icon-examples-5:hover, .icon-examples-5:focus {\\n color: darkgoldenrod; }\\n\\n.icon-scale-down {\\n -webkit-transform: scale(0.5);\\n -ms-transform: scale(0.5);\\n transform: scale(0.5); }\\n\\n.icon-scale-up {\\n -webkit-transform: scale(5);\\n -ms-transform: scale(5);\\n transform: scale(5); }\\n\\n.container ::ng-deep svg.css-styled-icon use {\\n fill: orange;\\n /* evergreen browser symbol styling */\\n stroke: black; }\\n\\n.icon-change-size ::ng-deep svg {\\n transition: all linear 0.2s;\\n -webkit-transform-origin: top center;\\n -ms-transform-origin: top center;\\n transform-origin: top center; }\\n\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9qYW4uc3V3YXJ0L1Byb2plY3RzL25nLXN2Zy1pY29uLXNwcml0ZS9zcmMvYXBwL2FwcC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFO0lBQU8saUNBQXdCO1lBQXhCLHlCQUF3QixFQUFBO0VBQy9CO0lBQU8sbUNBQTBCO1lBQTFCLDJCQUEwQixFQUFBO0VBQ2pDO0lBQU8saUNBQXdCO1lBQXhCLHlCQUF3QixFQUFBO0VBQy9CO0lBQU8sb0NBQTJCO1lBQTNCLDRCQUEyQixFQUFBLEVBQUE7O0FBSnBDO0VBQ0U7SUFBTyxpQ0FBd0I7WUFBeEIseUJBQXdCLEVBQUE7RUFDL0I7SUFBTyxtQ0FBMEI7WUFBMUIsMkJBQTBCLEVBQUE7RUFDakM7SUFBTyxpQ0FBd0I7WUFBeEIseUJBQXdCLEVBQUE7RUFDL0I7SUFBTyxvQ0FBMkI7WUFBM0IsNEJBQTJCLEVBQUEsRUFBQTs7QUFHcEM7RUFFRSxlQUFjO0VBQ2QsK0NBQXNDO0VBQXRDLHVDQUFzQztFQUF0QywyRUFBc0M7RUFDdEMsd0NBQStCO01BQS9CLG9DQUErQjtVQUEvQixnQ0FBK0IsRUFNaEM7O0FBVkQ7SUFPSSxXQUFVO0lBQ1YsaUNBQXdCO1FBQXhCLDZCQUF3QjtZQUF4Qix5QkFBd0IsRUFDekI7O0FBR0g7RUFDRSxpQkFBZ0I7RUFDaEIsbUNBQWtDLEVBS25DOztBQVBEO0lBS0ksaUJBQWdCLEVBQ2pCOztBQUdIO0VBQ0UsK0NBQXNDO0VBQXRDLHVDQUFzQztFQUF0QywyRUFBc0M7RUFDdEMsd0NB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lIFNWRyB2aWEgOjpuZy1kZWVwIHNlbGVjdG9yLCBkb2VzIG5vdCB3b3JrIGluIEZpcmVmb3hcbi5jb250YWluZXIge1xuICA6Om5nLWRlZXAge1xuICAgIHN2Zy5jc3Mtc3R5bGVkLWljb24ge1xuICAgICAgdXNlIHtcbiAgICAgICAgZmlsbDogb3JhbmdlOyAvKiBldmVyZ3JlZW4gYnJvd3NlciBzeW1ib2wgc3R5bGluZyAqL1xuICAgICAgICBzdHJva2U6IGJsYWNrO1xuICAgICAgfVxuICAgIH1cbiAgfVxufVxuXG4uaWNvbi1jaGFuZ2Utc2l6ZSB7XG4gIDo6bmctZGVlcCB7XG4gICAgc3ZnIHtcbiAgICAgIHRyYW5zaXRpb246IGFsbCBsaW5lYXIgMC4ycztcbiAgICAgIHRyYW5zZm9ybS1vcmlnaW46IHRvcCBjZW50ZXI7XG4gICAgfVxuICB9XG59XG4iXX0= */\"","import { Component, OnInit } from '@angular/core';\nimport { IconSpriteService } from 'ng-svg-icon-sprite';\nimport { environment } from '../environments/environment';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.scss']\n})\nexport class AppComponent implements OnInit {\n\n public icon = 'star_100x100_viewbox';\n public width = '100px';\n public color = 'red';\n private env = environment;\n\n constructor(\n // Optionally inject the icon sprite service to set the filename path globally\n private iconSpriteService: IconSpriteService\n ) {}\n\n ngOnInit() {\n this.iconSpriteService.setPath(this.env.spritePath);\n }\n\n changeIconPath(src) {\n this.icon = src.split('#')[1] === 'delete_70x70' ? 'star_100x100_viewbox' : 'delete_70x70';\n }\n\n changeIconSizePlus(width) {\n this.width = Number(width.replace('px', '')) + 15 + 'px';\n }\n\n changeIconSizeMinus(width) {\n this.width = Number(width.replace('px', '')) - 15 + 'px';\n }\n\n changeIconColor(color) {\n this.color = color;\n }\n}\n","import { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\n\nimport { AppComponent } from './app.component';\nimport { IconSpriteModule } from 'ng-svg-icon-sprite';\n\n\n@NgModule({\n declarations: [\n AppComponent\n ],\n imports: [\n BrowserModule,\n IconSpriteModule\n ],\n providers: [],\n bootstrap: [AppComponent]\n})\nexport class AppModule { }\n","// This file can be replaced during build by using the `fileReplacements` array.\n// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.\n// The list of file replacements can be found in `angular.json`.\n\nexport const environment = {\n production: false,\n spritePath: 'assets/sprites/sprite.svg'\n};\n\n/*\n * In development mode, for easier debugging, you can ignore zone related error\n * stack frames such as `zone.run`/`zoneDelegate.invokeTask` by importing the\n * below file. Don't forget to comment it out in production mode\n * because it will have a performance impact when errors are thrown\n */\n// import 'zone.js/dist/zone-error'; // Included with Angular CLI.\n","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n .catch(err => console.log(err));\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///./dist/ng-svg-icon-sprite/fesm5/ng-svg-icon-sprite.js","webpack:///./src/$_lazy_route_resource lazy namespace object","webpack:///./src/app/app.component.html","webpack:///./src/app/app.component.scss","webpack:///./src/app/app.component.ts","webpack:///./src/app/app.module.ts","webpack:///./src/environments/environment.ts","webpack:///./src/main.ts"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA+C;AAC8F;;AAE7I;AACA;AACA,cAAc,uEAAuE;AACrF;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,cAAc,uEAAuE;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,gBAAgB;AAChB;AACA;AACA,eAAe,EAAE;AACjB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;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R,CAAC;IAzCU,YAAY;QALxB,+DAAS,CAAC;YACT,QAAQ,EAAE,UAAU;YACpB,yFAAmC;;SAEpC,CAAC;+EAW6B,oEAAiB;OAVnC,YAAY,CA0CxB;IAAD,mBAAC;CAAA;AA1CwB;;;;;;;;;;;;;;;;;;;;;;ACRiC;AACjB;AACM;AACO;AACI;AAc1D;IAAA;IAAyB,CAAC;IAAb,SAAS;QAXrB,8DAAQ,CAAC;YACR,YAAY,EAAE;gBACZ,2DAAY;aACb;YACD,OAAO,EAAE;gBACP,uEAAa;gBACb,mEAAgB,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,qEAAW,CAAC,UAAU,EAAE,CAAC;aAC3D;YACD,SAAS,EAAE,EAAE;YACb,SAAS,EAAE,CAAC,2DAAY,CAAC;SAC1B,CAAC;OACW,SAAS,CAAI;IAAD,gBAAC;CAAA;AAAJ;;;;;;;;;;;;;AClBtB;AAAA;AAAA,gFAAgF;AAChF,2EAA2E;AAC3E,gEAAgE;AAEzD,IAAM,WAAW,GAAG;IACzB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,2BAA2B;CACxC,CAAC;AAEF;;;;;GAKG;AACH,mEAAmE;;;;;;;;;;;;;ACfnE;AAAA;AAAA;AAAA;AAAA;AAA+C;AAC4B;AAE9B;AACY;AAEzD,IAAI,qEAAW,CAAC,UAAU,EAAE;IAC1B,oEAAc,EAAE,CAAC;CAClB;AAED,gGAAsB,EAAE,CAAC,eAAe,CAAC,yDAAS,CAAC;KAChD,KAAK,CAAC,aAAG,IAAI,cAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAhB,CAAgB,CAAC,CAAC","file":"main.js","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Injectable, Optional, Directive, ElementRef, Renderer2, Input, Component, defineInjectable, inject, NgModule } from '@angular/core';\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nvar IconSpriteConfig = /** @class */ (function () {\n function IconSpriteConfig() {\n }\n return IconSpriteConfig;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * To access a global sprite path\n */\nvar IconSpriteService = /** @class */ (function () {\n function IconSpriteService(config) {\n if (config) {\n this.setPath(config.path);\n }\n }\n /**\n * @param {?} path\n * @return {?}\n */\n IconSpriteService.prototype.setPath = /**\n * @param {?} path\n * @return {?}\n */\n function (path) {\n this.spritePath = path;\n };\n /**\n * @return {?}\n */\n IconSpriteService.prototype.getPath = /**\n * @return {?}\n */\n function () {\n return this.spritePath;\n };\n IconSpriteService.decorators = [\n { type: Injectable, args: [{\n providedIn: 'root'\n },] }\n ];\n /** @nocollapse */\n IconSpriteService.ctorParameters = function () { return [\n { type: IconSpriteConfig, decorators: [{ type: Optional }] }\n ]; };\n /** @nocollapse */ IconSpriteService.ngInjectableDef = defineInjectable({ factory: function IconSpriteService_Factory() { return new IconSpriteService(inject(IconSpriteConfig, 8)); }, token: IconSpriteService, providedIn: \"root\" });\n return IconSpriteService;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nvar IconSpriteComponent = /** @class */ (function () {\n function IconSpriteComponent(iconSpriteService) {\n this.iconSpriteService = iconSpriteService;\n this.classes = 'icon';\n this.width = '100%';\n this.preserveAspectRatio = 'xMinYMax meet';\n }\n /**\n * @return {?}\n */\n IconSpriteComponent.prototype.ngOnInit = /**\n * @return {?}\n */\n function () {\n // If the src does not contain a # and a spritePath is set, concatenate it\n if (this.src && !this.src.includes('#') && this.iconSpriteService.spritePath) {\n this.src = this.iconSpriteService.getPath() + \"#\" + this.src;\n }\n };\n IconSpriteComponent.decorators = [\n { type: Component, args: [{\n selector: 'svg-icon-sprite',\n template: \"\\n \\n {{title}}\\n \\n \\n\\n\\n\\n \\n {{title}}\\n \\n \\n\\n\\n\\n \\n {{title}}\\n \\n \\n\\n\\n\\n \\n {{title}}\\n \\n \\n\\n\",\n styles: [\":host svg,:host use{fill:currentColor}\"]\n }] }\n ];\n /** @nocollapse */\n IconSpriteComponent.ctorParameters = function () { return [\n { type: IconSpriteService }\n ]; };\n IconSpriteComponent.propDecorators = {\n src: [{ type: Input }],\n classes: [{ type: Input }],\n width: [{ type: Input }],\n height: [{ type: Input }],\n viewBox: [{ type: Input }],\n preserveAspectRatio: [{ type: Input }],\n attribute: [{ type: Input }],\n title: [{ type: Input }]\n };\n return IconSpriteComponent;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Set your own attribute key/value pairs on the generated SVG element, i.e. focusable=\"false\"\n */\nvar IconSpriteDirective = /** @class */ (function () {\n function IconSpriteDirective(renderer, el) {\n this.renderer = renderer;\n this.el = el;\n }\n /**\n * @return {?}\n */\n IconSpriteDirective.prototype.ngOnInit = /**\n * @return {?}\n */\n function () {\n var _this = this;\n if (Array.isArray(this.attribute[0])) {\n /** @type {?} */\n var attributeArr = (/** @type {?} */ (this.attribute));\n attributeArr.forEach(function (obj) {\n _this.renderer.setAttribute(_this.el.nativeElement, obj[0], obj[1] ? obj[1] : '');\n });\n }\n else {\n /** @type {?} */\n var attribute = (/** @type {?} */ (this.attribute));\n if (attribute[0]) {\n this.renderer.setAttribute(this.el.nativeElement, attribute[0], attribute[1] ? attribute[1] : '');\n }\n }\n };\n IconSpriteDirective.decorators = [\n { type: Directive, args: [{\n selector: '[svgIconSpriteAttr]'\n },] }\n ];\n /** @nocollapse */\n IconSpriteDirective.ctorParameters = function () { return [\n { type: Renderer2 },\n { type: ElementRef }\n ]; };\n IconSpriteDirective.propDecorators = {\n attribute: [{ type: Input }]\n };\n return IconSpriteDirective;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Using forRoot({ path: 'filepath' }), this module can be provided as a\n * singleton for the global application (including lazy loaded submodules).\n */\nvar IconSpriteModule = /** @class */ (function () {\n function IconSpriteModule() {\n }\n /**\n * @param {?} config\n * @return {?}\n */\n IconSpriteModule.forRoot = /**\n * @param {?} config\n * @return {?}\n */\n function (config) {\n return {\n ngModule: IconSpriteModule,\n providers: [\n { provide: IconSpriteConfig, useValue: config }\n ]\n };\n };\n IconSpriteModule.decorators = [\n { type: NgModule, args: [{\n imports: [CommonModule],\n declarations: [\n IconSpriteComponent,\n IconSpriteDirective\n ],\n exports: [IconSpriteComponent]\n },] }\n ];\n return IconSpriteModule;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\nexport { IconSpriteService, IconSpriteComponent, IconSpriteModule, IconSpriteConfig as ɵa, IconSpriteDirective as ɵb };\n\n//# sourceMappingURL=ng-svg-icon-sprite.js.map","function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = \"./src/$$_lazy_route_resource lazy recursive\";","module.exports = \"
\\n

SVG-Icon-Sprite Demo

\\n\\n

The Basics (reference, width and styling)

\\n\\n

To display the icons in original size match the [width] and [height] with the width/height of the equivalent SVG.\\n To access the inner SVG properties like fill or stroke use ::ng-deep

\\n\\n
    \\n
  • \\n
    \\n \\n
    \\n
    <svg-icon-sprite [src]=\\\"'assets/sprites/sprite.svg#star_100x100'\\\" [width]=\\\"'100px'\\\"></svg-icon>\\n\\n.icon-example {{ '{' }}\\n  color: darkred;\\n{{ '}' }}
    \\n
  • \\n
  • \\n
    \\n \\n
    \\n
    <svg-icon-sprite [src]=\\\"'assets/sprites/sprite.svg#delete_70x70'\\\" [width]=\\\"'70px'\\\" [height]=\\\"'65px'\\\"></svg-icon>
    \\n
  • \\n
  • \\n
    \\n \\n
    \\n
    <svg-icon-sprite [src]=\\\"'assets/sprites/sprite.svg#star_100x100'\\\" [classes]=\\\"'css-styled-icon'\\\" [width]=\\\"'100px'\\\"></svg-icon>\\n\\n.container ::ng-deep svg.css-styled-icon {{ '{' }}\\n  use {{ '{' }}\\n    fill: orange;\\n    stroke: black;\\n  {{ '}' }}\\n{{ '}' }}
    \\n
  • \\n
\\n\\n\\n

Scaling (using CSS transform)

\\n\\n

Use this pattern if you want to change the size of the original SVG. Apply same rules as above, wrap the SVG into a div and size it using CSS transforms.

\\n\\n
    \\n
  • \\n
    \\n
    \\n \\n
    \\n
    \\n
    \\n.icon-scale-down {{ '{' }}\\n  // Scale down by 50%\\n  transform: scale(0.5);\\n{{ '}' }}\\n      
    \\n
  • \\n
  • \\n
    \\n
    \\n \\n
    \\n
    \\n
    \\n.icon-scale-up {{ '{' }}\\n  // Scale up by 500%\\n  transform: scale(5);\\n{{ '}' }}\\n      
    \\n
  • \\n
\\n\\n

Scaling (using viewBox)

\\n\\n This is an alternative to the CSS scaling method presented above. Scaling via viewBox is less consistent across browsers.\\n The pattern depends on your SVG source file, whether it already contains a viewBox or not.\\n The following example SVGs with an original size of 100x100px are scaled down by 50%.\\n\\n
    \\n
  • \\n
    \\n \\n
    \\n
    \\n<!-- SVG source lacks a viewBox -->\\n<svg-icon-sprite [src]=\\\"'assets/sprites/sprite.svg#star_100x100'\\\" [width]=\\\"'100px'\\\" [viewBox]=\\\"'-50 -50 200 200'\\\"></svg-icon>\\n      
    \\n
  • \\n
  • \\n
    \\n \\n
    \\n
    \\n<!-- SVG source contains a viewBox -->\\n<svg-icon-sprite [src]=\\\"'assets/sprites/sprite.svg#star_100x100_viewbox'\\\" [width]=\\\"'50px'\\\" [viewBox]=\\\"'0 0 100 100'\\\"></svg-icon>\\n      
    \\n
  • \\n
\\n\\n

Default sprite path (using the icon sprite service)

\\n\\n Set the sprite path in your environment.ts and set the default path using forRoot(). Now you\\n can invoke the component and simply pass the plain icon name as [src].\\n\\n
    \\n
  • \\n
    \\n \\n
    \\n
    \\n
    \\nimport {{ '{' }} IconSpriteModule {{ '}' }} from 'ng-svg-icon-sprite';\\nimport {{ '{' }} environment {{ '}' }} from '../environments/environment';\\n\\n@NgModule({{ '{' }}\\n  imports: [\\n    IconSpriteModule.forRoot({{ '{' }} path: environment.spritePath {{ '}' }})\\n
    \\n
    <svg-icon-sprite [src]=\\\"'star_100x100'\\\" [width]=\\\"width\\\"></svg-icon>
    \\n
    \\n
  • \\n
\\n\\n

\\n Optional: to change the sprite path during runtime, inject the iconSpriteService anywhere and execute this.iconSpriteService.setPath('new-path.svg')\\n Re-render all icon-components afterwards!\\n  \\n \\n

\\n\\n

Manipulation (using dynamic icon path)

\\n\\n \\n \\n \\n \\n \\n\\n
    \\n
  • \\n
    \\n \\n
    \\n
    <svg-icon-sprite [src]=\\\"icon\\\" [width]=\\\"width\\\" [viewBox]=\\\"'0 0 100 100'\\\"></svg-icon>
    \\n
  • \\n
\\n\\n

Accessible example (meaningful icon pattern)

\\n\\n
    \\n
  • \\n
    \\n \\n
    \\n
    \\n<svg-icon-sprite\\n      [src]=\\\"'star_100x100'\\\"\\n      [title]=\\\"'Orange star'\\\"\\n      [attribute]=\\\"[['aria-labelledby', 'star_100x100-title'], ['role', 'img']]\\\"\\n></svg-icon>\\n      
    \\n
  • \\n
\\n\\n Adding [title]=\\\"'Orange star'\\\" will render <title id=\\\"star_100x100-title\\\">Orange star</title> as the first child of the SVG node and serve as alternative text for screen readers.\\n To improve support, you can additionally reference the title's node via 'aria-labelledby' using the title's generated id star_100x100-title and set the role to img.\\n\\n

Multicolor Icons

\\n\\n If you want to include an multicolor icon, you will have to provide it form a separate sprite file (where the fill and stroke attributes are not stripped).\\n Remember that you will not be able to overwrite styles via CSS.\\n\\n
    \\n
  • \\n
    \\n \\n
    \\n
    <svg-icon-sprite [src]=\\\"'assets/sprites/image-sprite.svg#multicolor-image'\\\"></svg-icon>
    \\n
  • \\n
\\n\\n

\\n Report bugs or feature requests on Github Issues\\n

\\n\\n \\n\\n

\\n Copyright Jan Suwart, MIT license\\n

\\n
\\n\"","module.exports = \"@-webkit-keyframes mymove {\\n 0% {\\n -webkit-transform: translateX(0);\\n transform: translateX(0); }\\n 50% {\\n -webkit-transform: translateX(2px);\\n transform: translateX(2px); }\\n 75% {\\n -webkit-transform: translateX(0);\\n transform: translateX(0); }\\n 100% {\\n -webkit-transform: translateX(-2px);\\n transform: translateX(-2px); } }\\n\\n@keyframes mymove {\\n 0% {\\n -webkit-transform: translateX(0);\\n transform: translateX(0); }\\n 50% {\\n -webkit-transform: translateX(2px);\\n transform: translateX(2px); }\\n 75% {\\n -webkit-transform: translateX(0);\\n transform: translateX(0); }\\n 100% {\\n -webkit-transform: translateX(-2px);\\n transform: translateX(-2px); } }\\n\\n.icon-examples-1 {\\n color: darkred;\\n transition: -webkit-transform ease-in-out 0.2s;\\n transition: transform ease-in-out 0.2s;\\n transition: transform ease-in-out 0.2s, -webkit-transform ease-in-out 0.2s;\\n -webkit-transform-origin: center center;\\n -ms-transform-origin: center center;\\n transform-origin: center center; }\\n\\n.icon-examples-1:hover, .icon-examples-1:focus {\\n color: red;\\n -webkit-transform: rotate(12deg);\\n -ms-transform: rotate(12deg);\\n transform: rotate(12deg); }\\n\\n.icon-examples-2 {\\n color: darkgreen;\\n transition: color ease-in-out 0.4s; }\\n\\n.icon-examples-2:hover, .icon-examples-2:focus {\\n color: limegreen; }\\n\\n.icon-examples-3 {\\n transition: -webkit-transform ease-in-out 0.2s;\\n transition: transform ease-in-out 0.2s;\\n transition: transform ease-in-out 0.2s, -webkit-transform ease-in-out 0.2s;\\n -webkit-transform-origin: center center;\\n -ms-transform-origin: center center;\\n transform-origin: center center; }\\n\\n.icon-examples-3:hover, .icon-examples-3:focus {\\n -webkit-transform: scale(1.1);\\n -ms-transform: scale(1.1);\\n transform: scale(1.1); }\\n\\n.icon-examples-4 {\\n color: darkred; }\\n\\n.icon-examples-4:hover, .icon-examples-4:focus {\\n color: brown; }\\n\\n.icon-examples-5 {\\n color: darkorange;\\n transition: color ease-in-out 0.1s; }\\n\\n.icon-examples-5:hover, .icon-examples-5:focus {\\n color: darkgoldenrod; }\\n\\n.icon-examples-6 {\\n transition: -webkit-transform ease-in-out 0.1s;\\n transition: transform ease-in-out 0.1s;\\n transition: transform ease-in-out 0.1s, -webkit-transform ease-in-out 0.1s;\\n -webkit-transform-origin: center center;\\n -ms-transform-origin: center center;\\n transform-origin: center center; }\\n\\n.icon-examples-6:hover, .icon-examples-6:focus {\\n -webkit-transform: rotateY(30deg);\\n transform: rotateY(30deg); }\\n\\n.icon-scale-down {\\n -webkit-transform: scale(0.5);\\n -ms-transform: scale(0.5);\\n transform: scale(0.5); }\\n\\n.icon-scale-up {\\n -webkit-transform: scale(5);\\n -ms-transform: scale(5);\\n transform: scale(5); }\\n\\n.container ::ng-deep svg.css-styled-icon use {\\n fill: orange;\\n /* evergreen browser symbol styling */\\n stroke: black; }\\n\\n.icon-change-size ::ng-deep svg {\\n transition: all linear 0.2s;\\n -webkit-transform-origin: top center;\\n -ms-transform-origin: top center;\\n transform-origin: top center; }\\n\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9qYW4uc3V3YXJ0L1Byb2plY3RzL25nLXN2Zy1pY29uLXNwcml0ZS9zcmMvYXBwL2FwcC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFB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k7XG59XG5cbi5pY29uLXNjYWxlLXVwIHtcbiAgLy8gU2NhbGUgdXAgYnkgNTAwJVxuICB0cmFuc2Zvcm06IHNjYWxlKDUpO1xufVxuXG4vLyBBY2Nlc3MgdGhlIFNWRyB2aWEgOjpuZy1kZWVwIHNlbGVjdG9yLCBkb2VzIG5vdCB3b3JrIGluIEZpcmVmb3hcbi5jb250YWluZXIge1xuICA6Om5nLWRlZXAge1xuICAgIHN2Zy5jc3Mtc3R5bGVkLWljb24ge1xuICAgICAgdXNlIHtcbiAgICAgICAgZmlsbDogb3JhbmdlOyAvKiBldmVyZ3JlZW4gYnJvd3NlciBzeW1ib2wgc3R5bGluZyAqL1xuICAgICAgICBzdHJva2U6IGJsYWNrO1xuICAgICAgfVxuICAgIH1cbiAgfVxufVxuXG4uaWNvbi1jaGFuZ2Utc2l6ZSB7XG4gIDo6bmctZGVlcCB7XG4gICAgc3ZnIHtcbiAgICAgIHRyYW5zaXRpb246IGFsbCBsaW5lYXIgMC4ycztcbiAgICAgIHRyYW5zZm9ybS1vcmlnaW46IHRvcCBjZW50ZXI7XG4gICAgfVxuICB9XG59XG4iXX0= */\"","import { Component, OnInit } from '@angular/core';\nimport { IconSpriteService } from 'ng-svg-icon-sprite';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.scss']\n})\nexport class AppComponent implements OnInit {\n\n public icon = 'star_100x100_viewbox';\n public width = '100px';\n public color = 'red';\n public changed = false;\n public changeDone = false;\n\n constructor(\n // Optionally inject the icon sprite service to set path manually\n private iconSpriteService: IconSpriteService\n ) {}\n\n ngOnInit() {}\n\n changeIconPath(src) {\n this.icon = src.split('#')[1] === 'delete_70x70' ? 'star_100x100_viewbox' : 'delete_70x70';\n }\n\n changeIconSizePlus(width) {\n this.width = Number(width.replace('px', '')) + 15 + 'px';\n }\n\n changeIconSizeMinus(width) {\n this.width = Number(width.replace('px', '')) - 15 + 'px';\n }\n\n changeIconColor(color) {\n this.color = color;\n }\n\n // Optionally, change the default sprite path during runtime\n changeDefaultSpritePath() {\n this.changed = true;\n this.iconSpriteService.setPath('assets/sprites-secondary/sprite.svg');\n console.log('changeDefaultSpritePath', this.iconSpriteService.getPath());\n\n setTimeout(() => {\n // Demo purpose: force change detection to re-render\n this.changed = false;\n }, 0);\n }\n}\n","import { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\nimport { AppComponent } from './app.component';\nimport { IconSpriteModule } from 'ng-svg-icon-sprite';\nimport { environment } from '../environments/environment';\n\n\n@NgModule({\n declarations: [\n AppComponent\n ],\n imports: [\n BrowserModule,\n IconSpriteModule.forRoot({ path: environment.spritePath })\n ],\n providers: [],\n bootstrap: [AppComponent]\n})\nexport class AppModule { }\n","// This file can be replaced during build by using the `fileReplacements` array.\n// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.\n// The list of file replacements can be found in `angular.json`.\n\nexport const environment = {\n production: false,\n spritePath: 'assets/sprites/sprite.svg'\n};\n\n/*\n * In development mode, for easier debugging, you can ignore zone related error\n * stack frames such as `zone.run`/`zoneDelegate.invokeTask` by importing the\n * below file. Don't forget to comment it out in production mode\n * because it will have a performance impact when errors are thrown\n */\n// import 'zone.js/dist/zone-error'; // Included with Angular CLI.\n","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n .catch(err => console.log(err));\n"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/styles.js b/docs/styles.js index 9956ab9..e2a5fe3 100644 --- a/docs/styles.js +++ b/docs/styles.js @@ -7,7 +7,7 @@ /*! no static exports found */ /***/ (function(module, exports) { -module.exports = [[module.i, "html {\n margin: 0;\n padding: 0;\n box-sizing: border-box; }\n\nbody {\n font-family: Helvetica, Arial, sans-serif;\n font-size: 16px;\n line-height: 1.5;\n margin: 0;\n color: #24292e; }\n\n.container {\n max-width: 1200px;\n padding: 0 8% 0 8%;\n border-radius: 3px;\n margin-left: auto;\n margin-right: auto; }\n\nh1, h2, h3 {\n padding-bottom: 0.3em;\n border-bottom: 1px solid #ddd;\n font-weight: 600; }\n\nh1 {\n font-size: 2em; }\n\nh2 {\n font-size: 1.5em; }\n\nh3 {\n font-size: 1.25em; }\n\np {\n margin-top: 5px;\n margin-bottom: 15px; }\n\na {\n color: steelblue;\n text-decoration: none; }\n\nbutton, input, select {\n font-size: 14px;\n line-height: 1.5; }\n\nlabel {\n font-size: 85%;\n font-weight: 600; }\n\npre {\n padding: 10px;\n margin: 0;\n border: 1px solid #999;\n border-radius: 3px;\n font-size: 85%;\n line-height: 1.45;\n background-color: lightgoldenrodyellow;\n color: darkslategrey;\n font-family: Courier, monospace;\n overflow: auto; }\n\ncode {\n line-height: 1.45;\n background-color: lavender;\n font-family: Courier, monospace; }\n\nsmall {\n font-size: 80%;\n color: #555; }\n\nul.vertical {\n list-style: none;\n padding: 0; }\n\nul.vertical li {\n margin: 10px;\n display: -ms-flexbox;\n display: flex; }\n\nul.vertical li .icon-row {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: center;\n justify-content: center;\n width: 25%; }\n\nul.vertical li pre {\n width: 75%; }\n\nul.vertical li .pre-vertical {\n width: 75%;\n -ms-flex-direction: column;\n flex-direction: column; }\n\nul.vertical li .pre-vertical pre {\n width: auto;\n margin-bottom: 5px; }\n\nul.inline {\n list-style: none;\n padding: 0; }\n\nul.inline li {\n display: inline-block;\n padding: 30px; }\n\nul.inline li span {\n display: block; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9qYW4uc3V3YXJ0L1Byb2plY3RzL25nLXN2Zy1pY29uLXNwcml0ZS9zcmMvc3R5bGVzLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxVQUFTO0V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AgICB3aWR0aDogMjUlO1xuICAgICAgfVxuXG4gICAgICBwcmUge1xuICAgICAgICB3aWR0aDogNzUlO1xuICAgICAgfVxuXG4gICAgICAucHJlLXZlcnRpY2FsIHtcbiAgICAgICAgd2lkdGg6IDc1JTtcbiAgICAgICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcblxuICAgICAgICBwcmUge1xuICAgICAgICAgIHdpZHRoOiBhdXRvO1xuICAgICAgICAgIG1hcmdpbi1ib3R0b206IDVweDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfVxufVxuXG5cbnVsLmlubGluZSB7XG4gIGxpc3Qtc3R5bGU6IG5vbmU7XG4gIHBhZGRpbmc6IDA7XG59XG5cbnVsLmlubGluZSBsaSB7XG4gIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgcGFkZGluZzogMzBweDtcbn1cblxudWwuaW5saW5lIGxpIHNwYW4ge1xuICBkaXNwbGF5OiBibG9jaztcbn1cbiJdfQ== */", '', '']] +module.exports = [[module.i, "html {\n margin: 0;\n padding: 0;\n box-sizing: border-box; }\n\nbody {\n min-height: 1000px;\n font-family: Helvetica, Arial, sans-serif;\n font-size: 16px;\n line-height: 1.5;\n margin: 0;\n color: #24292e; }\n\n.container {\n max-width: 1200px;\n padding: 0 8% 0 8%;\n border-radius: 3px;\n margin-left: auto;\n margin-right: auto; }\n\nh1, h2, h3 {\n padding-bottom: 0.3em;\n border-bottom: 1px solid #ddd;\n font-weight: 600; }\n\nh1 {\n font-size: 2em; }\n\nh2 {\n font-size: 1.5em; }\n\nh3 {\n font-size: 1.25em; }\n\np {\n margin-top: 5px;\n margin-bottom: 15px; }\n\na {\n color: steelblue;\n text-decoration: none; }\n\nbutton, input, select {\n font-size: 14px;\n line-height: 1.5; }\n\nlabel {\n font-size: 85%;\n font-weight: 600; }\n\npre {\n padding: 10px;\n margin: 0;\n border: 1px solid #999;\n border-radius: 3px;\n font-size: 85%;\n line-height: 1.45;\n background-color: lightgoldenrodyellow;\n color: darkslategrey;\n font-family: Courier, monospace;\n overflow: auto; }\n\ncode {\n line-height: 1.45;\n background-color: lavender;\n font-family: Courier, monospace; }\n\nsmall {\n font-size: 80%;\n color: #555; }\n\nul.vertical {\n list-style: none;\n padding: 0; }\n\nul.vertical li {\n margin: 10px;\n display: -ms-flexbox;\n display: flex; }\n\nul.vertical li .icon-row {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: center;\n justify-content: center;\n width: 25%; }\n\nul.vertical li pre {\n width: 75%; }\n\nul.vertical li .pre-vertical {\n width: 75%;\n -ms-flex-direction: column;\n flex-direction: column; }\n\nul.vertical li .pre-vertical pre {\n width: auto;\n margin-bottom: 5px; }\n\nul.inline {\n list-style: none;\n padding: 0; }\n\nul.inline li {\n display: inline-block;\n padding: 30px; }\n\nul.inline li span {\n display: block; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9qYW4uc3V3YXJ0L1Byb2plY3RzL25nLXN2Zy1pY29uLXNwcml0ZS9zcmMvc3R5bGVzLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxVQUFTO0VBQ1QsV0FBVTtFQUNWLHVCQUFzQixFQUN2Qjs7QUFDRDtFQUNFLG1CQUFrQjtFQUNsQiwwQ0FBeUM7RUFDekMsZ0JBQWU7RUFDZixpQkFBZ0I7RUFDaEIsVUFBUztFQUNULGVBQWMsRUFDZjs7QUFDRDtFQUNFLGtCQUFpQjtFQUNqQixtQkFBa0I7RUFDbEIsbUJBQWtCO0VBQ2xCLGtCQUFpQjtFQUNqQixtQkFBa0IsRUFDbkI7O0FBQ0Q7RUFDRSxzQkFBcUI7RUFDckIsOEJBQTZCO0VBQzdCLGlCQUFnQixFQUNqQjs7QUFDRDtFQUNFLGVBQWMsRUFDZjs7QUFDRDtFQUNFLGlCQUFnQixFQUNqQjs7QUFDRDtFQUNFLGtCQUFpQixFQU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bnVsLmlubGluZSBsaSB7XG4gIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgcGFkZGluZzogMzBweDtcbn1cblxudWwuaW5saW5lIGxpIHNwYW4ge1xuICBkaXNwbGF5OiBibG9jaztcbn1cbiJdfQ== */", '', '']] /***/ }), diff --git a/docs/styles.js.map b/docs/styles.js.map index 45f11c3..9d24dcb 100644 --- a/docs/styles.js.map +++ b/docs/styles.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///./src/styles.scss","webpack:///./node_modules/style-loader/lib/addStyles.js","webpack:///./node_modules/style-loader/lib/urls.js","webpack:///./src/styles.scss?4266"],"names":[],"mappings":";;;;;;;;;AAAA,mBAAmB,QAAS,SAAS,cAAc,eAAe,2BAA2B,EAAE,UAAU,8CAA8C,oBAAoB,qBAAqB,cAAc,mBAAmB,EAAE,gBAAgB,sBAAsB,uBAAuB,uBAAuB,sBAAsB,uBAAuB,EAAE,gBAAgB,0BAA0B,kCAAkC,qBAAqB,EAAE,QAAQ,mBAAmB,EAAE,QAAQ,qBAAqB,EAAE,QAAQ,sBAAsB,EAAE,OAAO,oBAAoB,wBAAwB,EAAE,OAAO,qBAAqB,0BAA0B,EAAE,2BAA2B,oBAAoB,qBAAqB,EAAE,WAAW,mBAAmB,qBAAqB,EAAE,SAAS,kBAAkB,cAAc,2BAA2B,uBAAuB,mBAAmB,sBAAsB,2CAA2C,yBAAyB,oCAAoC,mBAAmB,EAAE,UAAU,sBAAsB,+BAA+B,oCAAoC,EAAE,WAAW,mBAAmB,gBAAgB,EAAE,iBAAiB,qBAAqB,eAAe,EAAE,oBAAoB,mBAAmB,2BAA2B,oBAAoB,EAAE,8BAA8B,6BAA6B,sBAAsB,8BAA8B,oCAAoC,mBAAmB,EAAE,wBAAwB,mBAAmB,EAAE,kCAAkC,mBAAmB,mCAAmC,mCAAmC,EAAE,sCAAsC,sBAAsB,6BAA6B,EAAE,eAAe,qBAAqB,eAAe,EAAE,kBAAkB,0BAA0B,kBAAkB,EAAE,uBAAuB,mBAAmB,EAAE,+CAA+C,61H;;;;;;;;;;;ACA/6D;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA,cAAc,mBAAO,CAAC,uDAAQ;;AAE9B;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,iBAAiB,mBAAmB;AACpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iBAAiB,sBAAsB;AACvC;;AAEA;AACA,mBAAmB,2BAA2B;;AAE9C;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,mBAAmB;AACnC;AACA;;AAEA;AACA;;AAEA,iBAAiB,2BAA2B;AAC5C;AACA;;AAEA,QAAQ,uBAAuB;AAC/B;AACA;AACA,GAAG;AACH;;AAEA,iBAAiB,uBAAuB;AACxC;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;;AAEA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd,kDAAkD,sBAAsB;AACxE;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA,KAAK,KAAwC,EAAE,EAE7C;;AAEF,QAAQ,sBAAiB;AACzB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD;AACvD;;AAEA,6BAA6B,mBAAmB;;AAEhD;;AAEA;;AAEA;AACA;;;;;;;;;;;;;AC9YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,WAAW,EAAE;AACrD,wCAAwC,WAAW,EAAE;;AAErD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,sCAAsC;AACtC,GAAG;AACH;AACA,8DAA8D;AAC9D;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;;;;;;;;;;;;ACvFA,cAAc,mBAAO,CAAC,4ZAA0N;;AAEhP,4CAA4C,QAAS;;AAErD;AACA;;;;AAIA,eAAe;;AAEf;AACA;;AAEA,aAAa,mBAAO,CAAC,mGAAgD;;AAErE;;AAEA,GAAG,KAAU,EAAE,E","file":"styles.js","sourcesContent":["module.exports = [[module.id, \"html {\\n margin: 0;\\n padding: 0;\\n box-sizing: border-box; }\\n\\nbody {\\n font-family: Helvetica, Arial, sans-serif;\\n font-size: 16px;\\n line-height: 1.5;\\n margin: 0;\\n color: #24292e; }\\n\\n.container {\\n max-width: 1200px;\\n padding: 0 8% 0 8%;\\n border-radius: 3px;\\n margin-left: auto;\\n margin-right: auto; }\\n\\nh1, h2, h3 {\\n padding-bottom: 0.3em;\\n border-bottom: 1px solid #ddd;\\n font-weight: 600; }\\n\\nh1 {\\n font-size: 2em; }\\n\\nh2 {\\n font-size: 1.5em; }\\n\\nh3 {\\n font-size: 1.25em; }\\n\\np {\\n margin-top: 5px;\\n margin-bottom: 15px; }\\n\\na {\\n color: steelblue;\\n text-decoration: none; }\\n\\nbutton, input, select {\\n font-size: 14px;\\n line-height: 1.5; }\\n\\nlabel {\\n font-size: 85%;\\n font-weight: 600; }\\n\\npre {\\n padding: 10px;\\n margin: 0;\\n border: 1px solid #999;\\n border-radius: 3px;\\n font-size: 85%;\\n line-height: 1.45;\\n background-color: lightgoldenrodyellow;\\n color: darkslategrey;\\n font-family: Courier, monospace;\\n overflow: auto; }\\n\\ncode {\\n line-height: 1.45;\\n background-color: lavender;\\n font-family: Courier, monospace; }\\n\\nsmall {\\n font-size: 80%;\\n color: #555; }\\n\\nul.vertical {\\n list-style: none;\\n padding: 0; }\\n\\nul.vertical li {\\n margin: 10px;\\n display: -ms-flexbox;\\n display: flex; }\\n\\nul.vertical li .icon-row {\\n display: -ms-flexbox;\\n display: flex;\\n -ms-flex-pack: center;\\n justify-content: center;\\n width: 25%; }\\n\\nul.vertical li pre {\\n width: 75%; }\\n\\nul.vertical li .pre-vertical {\\n width: 75%;\\n -ms-flex-direction: column;\\n flex-direction: column; }\\n\\nul.vertical li .pre-vertical pre {\\n width: auto;\\n margin-bottom: 5px; }\\n\\nul.inline {\\n list-style: none;\\n padding: 0; }\\n\\nul.inline li {\\n display: inline-block;\\n padding: 30px; }\\n\\nul.inline li span {\\n display: block; }\\n\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9qYW4uc3V3YXJ0L1Byb2plY3RzL25nLXN2Zy1pY29uLXNwcml0ZS9zcmMvc3R5bGVzLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxVQUFTO0VBQ1QsV0FBVTtFQUNWLHVCQUFzQixFQUN2Qjs7QUFDRDtFQUNFLDBDQUF5QztFQUN6QyxnQkFBZTtFQUNmLGlCQUFnQjtFQUNoQixVQUFTO0VBQ1QsZUFBYyxFQUNmOztBQUNEO0VBQ0Usa0JBQWlCO0VBQ2pCLG1CQUFrQjtFQUNsQixtQkFBa0I7RUFDbEIsa0JBQWlCO0VBQ2pCLG1CQUFrQixFQUNuQjs7QUFDRDtFQUNFLHNCQUFxQjtFQUNyQiw4QkFBNkI7RUFDN0IsaUJBQWdCLEVBQ2pCOztBQUNEO0VBQ0UsZUFBYyxFQUNmOztBQUNEO0VBQ0UsaUJBQWdCLEVBQ2pCOztBQUNEO0VBQ0Usa0JBQWlCLEVBQ2xCOztBQUNEO0VBQ0UsZ0JBQWU7RUFDZixvQkFBbUIsRUFDcEI7O0FBQ0Q7RUFDRSxpQkFBZ0I7RUFDaEIsc0JBQXFCLEVBQ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NwbGF5OiBibG9jaztcbn1cbiJdfQ== */\", '', '']]","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nvar stylesInDom = {};\n\nvar\tmemoize = function (fn) {\n\tvar memo;\n\n\treturn function () {\n\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\treturn memo;\n\t};\n};\n\nvar isOldIE = memoize(function () {\n\t// Test for IE <= 9 as proposed by Browserhacks\n\t// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n\t// Tests for existence of standard globals is to allow style-loader\n\t// to operate correctly into non-standard environments\n\t// @see https://github.com/webpack-contrib/style-loader/issues/177\n\treturn window && document && document.all && !window.atob;\n});\n\nvar getTarget = function (target, parent) {\n if (parent){\n return parent.querySelector(target);\n }\n return document.querySelector(target);\n};\n\nvar getElement = (function (fn) {\n\tvar memo = {};\n\n\treturn function(target, parent) {\n // If passing function in options, then use it for resolve \"head\" element.\n // Useful for Shadow Root style i.e\n // {\n // insertInto: function () { return document.querySelector(\"#foo\").shadowRoot }\n // }\n if (typeof target === 'function') {\n return target();\n }\n if (typeof memo[target] === \"undefined\") {\n\t\t\tvar styleTarget = getTarget.call(this, target, parent);\n\t\t\t// Special case to return head of iframe instead of iframe itself\n\t\t\tif (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n\t\t\t\ttry {\n\t\t\t\t\t// This will throw an exception if access to iframe is blocked\n\t\t\t\t\t// due to cross-origin restrictions\n\t\t\t\t\tstyleTarget = styleTarget.contentDocument.head;\n\t\t\t\t} catch(e) {\n\t\t\t\t\tstyleTarget = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmemo[target] = styleTarget;\n\t\t}\n\t\treturn memo[target]\n\t};\n})();\n\nvar singleton = null;\nvar\tsingletonCounter = 0;\nvar\tstylesInsertedAtTop = [];\n\nvar\tfixUrls = require(\"./urls\");\n\nmodule.exports = function(list, options) {\n\tif (typeof DEBUG !== \"undefined\" && DEBUG) {\n\t\tif (typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n\t}\n\n\toptions = options || {};\n\n\toptions.attrs = typeof options.attrs === \"object\" ? options.attrs : {};\n\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of \n \n\n could become:\n\n \n
\n \n
\n\n Note the use of @polyfill in the comment above a ShadowDOM specific style\n declaration. This is a directive to the styling shim to use the selector\n in comments in lieu of the next selector when running under polyfill.\n*/\nvar ShadowCss = /** @class */ (function () {\n function ShadowCss() {\n this.strictStyling = true;\n }\n /*\n * Shim some cssText with the given selector. Returns cssText that can\n * be included in the document via WebComponents.ShadowCSS.addCssToDocument(css).\n *\n * When strictStyling is true:\n * - selector is the attribute added to all elements inside the host,\n * - hostSelector is the attribute added to the host itself.\n */\n ShadowCss.prototype.shimCssText = function (cssText, selector, hostSelector) {\n if (hostSelector === void 0) { hostSelector = ''; }\n var commentsWithHash = extractCommentsWithHash(cssText);\n cssText = stripComments(cssText);\n cssText = this._insertDirectives(cssText);\n var scopedCssText = this._scopeCssText(cssText, selector, hostSelector);\n return __spread([scopedCssText], commentsWithHash).join('\\n');\n };\n ShadowCss.prototype._insertDirectives = function (cssText) {\n cssText = this._insertPolyfillDirectivesInCssText(cssText);\n return this._insertPolyfillRulesInCssText(cssText);\n };\n /*\n * Process styles to convert native ShadowDOM rules that will trip\n * up the css parser; we rely on decorating the stylesheet with inert rules.\n *\n * For example, we convert this rule:\n *\n * polyfill-next-selector { content: ':host menu-item'; }\n * ::content menu-item {\n *\n * to this:\n *\n * scopeName menu-item {\n *\n **/\n ShadowCss.prototype._insertPolyfillDirectivesInCssText = function (cssText) {\n // Difference with webcomponents.js: does not handle comments\n return cssText.replace(_cssContentNextSelectorRe, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n return m[2] + '{';\n });\n };\n /*\n * Process styles to add rules which will only apply under the polyfill\n *\n * For example, we convert this rule:\n *\n * polyfill-rule {\n * content: ':host menu-item';\n * ...\n * }\n *\n * to this:\n *\n * scopeName menu-item {...}\n *\n **/\n ShadowCss.prototype._insertPolyfillRulesInCssText = function (cssText) {\n // Difference with webcomponents.js: does not handle comments\n return cssText.replace(_cssContentRuleRe, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n var rule = m[0].replace(m[1], '').replace(m[2], '');\n return m[4] + rule;\n });\n };\n /* Ensure styles are scoped. Pseudo-scoping takes a rule like:\n *\n * .foo {... }\n *\n * and converts this to\n *\n * scopeName .foo { ... }\n */\n ShadowCss.prototype._scopeCssText = function (cssText, scopeSelector, hostSelector) {\n var unscopedRules = this._extractUnscopedRulesFromCssText(cssText);\n // replace :host and :host-context -shadowcsshost and -shadowcsshost respectively\n cssText = this._insertPolyfillHostInCssText(cssText);\n cssText = this._convertColonHost(cssText);\n cssText = this._convertColonHostContext(cssText);\n cssText = this._convertShadowDOMSelectors(cssText);\n if (scopeSelector) {\n cssText = this._scopeSelectors(cssText, scopeSelector, hostSelector);\n }\n cssText = cssText + '\\n' + unscopedRules;\n return cssText.trim();\n };\n /*\n * Process styles to add rules which will only apply under the polyfill\n * and do not process via CSSOM. (CSSOM is destructive to rules on rare\n * occasions, e.g. -webkit-calc on Safari.)\n * For example, we convert this rule:\n *\n * @polyfill-unscoped-rule {\n * content: 'menu-item';\n * ... }\n *\n * to this:\n *\n * menu-item {...}\n *\n **/\n ShadowCss.prototype._extractUnscopedRulesFromCssText = function (cssText) {\n // Difference with webcomponents.js: does not handle comments\n var r = '';\n var m;\n _cssContentUnscopedRuleRe.lastIndex = 0;\n while ((m = _cssContentUnscopedRuleRe.exec(cssText)) !== null) {\n var rule = m[0].replace(m[2], '').replace(m[1], m[4]);\n r += rule + '\\n\\n';\n }\n return r;\n };\n /*\n * convert a rule like :host(.foo) > .bar { }\n *\n * to\n *\n * .foo > .bar\n */\n ShadowCss.prototype._convertColonHost = function (cssText) {\n return this._convertColonRule(cssText, _cssColonHostRe, this._colonHostPartReplacer);\n };\n /*\n * convert a rule like :host-context(.foo) > .bar { }\n *\n * to\n *\n * .foo > .bar, .foo scopeName > .bar { }\n *\n * and\n *\n * :host-context(.foo:host) .bar { ... }\n *\n * to\n *\n * .foo .bar { ... }\n */\n ShadowCss.prototype._convertColonHostContext = function (cssText) {\n return this._convertColonRule(cssText, _cssColonHostContextRe, this._colonHostContextPartReplacer);\n };\n ShadowCss.prototype._convertColonRule = function (cssText, regExp, partReplacer) {\n // m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule\n return cssText.replace(regExp, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n if (m[2]) {\n var parts = m[2].split(',');\n var r = [];\n for (var i = 0; i < parts.length; i++) {\n var p = parts[i].trim();\n if (!p)\n break;\n r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));\n }\n return r.join(',');\n }\n else {\n return _polyfillHostNoCombinator + m[3];\n }\n });\n };\n ShadowCss.prototype._colonHostContextPartReplacer = function (host, part, suffix) {\n if (part.indexOf(_polyfillHost) > -1) {\n return this._colonHostPartReplacer(host, part, suffix);\n }\n else {\n return host + part + suffix + ', ' + part + ' ' + host + suffix;\n }\n };\n ShadowCss.prototype._colonHostPartReplacer = function (host, part, suffix) {\n return host + part.replace(_polyfillHost, '') + suffix;\n };\n /*\n * Convert combinators like ::shadow and pseudo-elements like ::content\n * by replacing with space.\n */\n ShadowCss.prototype._convertShadowDOMSelectors = function (cssText) {\n return _shadowDOMSelectorsRe.reduce(function (result, pattern) { return result.replace(pattern, ' '); }, cssText);\n };\n // change a selector like 'div' to 'name div'\n ShadowCss.prototype._scopeSelectors = function (cssText, scopeSelector, hostSelector) {\n var _this = this;\n return processRules(cssText, function (rule) {\n var selector = rule.selector;\n var content = rule.content;\n if (rule.selector[0] != '@') {\n selector =\n _this._scopeSelector(rule.selector, scopeSelector, hostSelector, _this.strictStyling);\n }\n else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') ||\n rule.selector.startsWith('@page') || rule.selector.startsWith('@document')) {\n content = _this._scopeSelectors(rule.content, scopeSelector, hostSelector);\n }\n return new CssRule(selector, content);\n });\n };\n ShadowCss.prototype._scopeSelector = function (selector, scopeSelector, hostSelector, strict) {\n var _this = this;\n return selector.split(',')\n .map(function (part) { return part.trim().split(_shadowDeepSelectors); })\n .map(function (deepParts) {\n var _a = __read(deepParts), shallowPart = _a[0], otherParts = _a.slice(1);\n var applyScope = function (shallowPart) {\n if (_this._selectorNeedsScoping(shallowPart, scopeSelector)) {\n return strict ?\n _this._applyStrictSelectorScope(shallowPart, scopeSelector, hostSelector) :\n _this._applySelectorScope(shallowPart, scopeSelector, hostSelector);\n }\n else {\n return shallowPart;\n }\n };\n return __spread([applyScope(shallowPart)], otherParts).join(' ');\n })\n .join(', ');\n };\n ShadowCss.prototype._selectorNeedsScoping = function (selector, scopeSelector) {\n var re = this._makeScopeMatcher(scopeSelector);\n return !re.test(selector);\n };\n ShadowCss.prototype._makeScopeMatcher = function (scopeSelector) {\n var lre = /\\[/g;\n var rre = /\\]/g;\n scopeSelector = scopeSelector.replace(lre, '\\\\[').replace(rre, '\\\\]');\n return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');\n };\n ShadowCss.prototype._applySelectorScope = function (selector, scopeSelector, hostSelector) {\n // Difference from webcomponents.js: scopeSelector could not be an array\n return this._applySimpleSelectorScope(selector, scopeSelector, hostSelector);\n };\n // scope via name and [is=name]\n ShadowCss.prototype._applySimpleSelectorScope = function (selector, scopeSelector, hostSelector) {\n // In Android browser, the lastIndex is not reset when the regex is used in String.replace()\n _polyfillHostRe.lastIndex = 0;\n if (_polyfillHostRe.test(selector)) {\n var replaceBy_1 = this.strictStyling ? \"[\" + hostSelector + \"]\" : scopeSelector;\n return selector\n .replace(_polyfillHostNoCombinatorRe, function (hnc, selector) {\n return selector.replace(/([^:]*)(:*)(.*)/, function (_, before, colon, after) {\n return before + replaceBy_1 + colon + after;\n });\n })\n .replace(_polyfillHostRe, replaceBy_1 + ' ');\n }\n return scopeSelector + ' ' + selector;\n };\n // return a selector with [name] suffix on each simple selector\n // e.g. .foo.bar > .zot becomes .foo[name].bar[name] > .zot[name] /** @internal */\n ShadowCss.prototype._applyStrictSelectorScope = function (selector, scopeSelector, hostSelector) {\n var _this = this;\n var isRe = /\\[is=([^\\]]*)\\]/g;\n scopeSelector = scopeSelector.replace(isRe, function (_) {\n var parts = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n parts[_i - 1] = arguments[_i];\n }\n return parts[0];\n });\n var attrName = '[' + scopeSelector + ']';\n var _scopeSelectorPart = function (p) {\n var scopedP = p.trim();\n if (!scopedP) {\n return '';\n }\n if (p.indexOf(_polyfillHostNoCombinator) > -1) {\n scopedP = _this._applySimpleSelectorScope(p, scopeSelector, hostSelector);\n }\n else {\n // remove :host since it should be unnecessary\n var t = p.replace(_polyfillHostRe, '');\n if (t.length > 0) {\n var matches = t.match(/([^:]*)(:*)(.*)/);\n if (matches) {\n scopedP = matches[1] + attrName + matches[2] + matches[3];\n }\n }\n }\n return scopedP;\n };\n var safeContent = new SafeSelector(selector);\n selector = safeContent.content();\n var scopedSelector = '';\n var startIndex = 0;\n var res;\n var sep = /( |>|\\+|~(?!=))\\s*/g;\n // If a selector appears before :host it should not be shimmed as it\n // matches on ancestor elements and not on elements in the host's shadow\n // `:host-context(div)` is transformed to\n // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`\n // the `div` is not part of the component in the 2nd selectors and should not be scoped.\n // Historically `component-tag:host` was matching the component so we also want to preserve\n // this behavior to avoid breaking legacy apps (it should not match).\n // The behavior should be:\n // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)\n // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a\n // `:host-context(tag)`)\n var hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;\n // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present\n var shouldScope = !hasHost;\n while ((res = sep.exec(selector)) !== null) {\n var separator = res[1];\n var part_1 = selector.slice(startIndex, res.index).trim();\n shouldScope = shouldScope || part_1.indexOf(_polyfillHostNoCombinator) > -1;\n var scopedPart = shouldScope ? _scopeSelectorPart(part_1) : part_1;\n scopedSelector += scopedPart + \" \" + separator + \" \";\n startIndex = sep.lastIndex;\n }\n var part = selector.substring(startIndex);\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;\n // replace the placeholders with their original values\n return safeContent.restore(scopedSelector);\n };\n ShadowCss.prototype._insertPolyfillHostInCssText = function (selector) {\n return selector.replace(_colonHostContextRe, _polyfillHostContext)\n .replace(_colonHostRe, _polyfillHost);\n };\n return ShadowCss;\n}());\nvar SafeSelector = /** @class */ (function () {\n function SafeSelector(selector) {\n var _this = this;\n this.placeholders = [];\n this.index = 0;\n // Replaces attribute selectors with placeholders.\n // The WS in [attr=\"va lue\"] would otherwise be interpreted as a selector separator.\n selector = selector.replace(/(\\[[^\\]]*\\])/g, function (_, keep) {\n var replaceBy = \"__ph-\" + _this.index + \"__\";\n _this.placeholders.push(keep);\n _this.index++;\n return replaceBy;\n });\n // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.\n // WS and \"+\" would otherwise be interpreted as selector separators.\n this._content = selector.replace(/(:nth-[-\\w]+)(\\([^)]+\\))/g, function (_, pseudo, exp) {\n var replaceBy = \"__ph-\" + _this.index + \"__\";\n _this.placeholders.push(exp);\n _this.index++;\n return pseudo + replaceBy;\n });\n }\n SafeSelector.prototype.restore = function (content) {\n var _this = this;\n return content.replace(/__ph-(\\d+)__/g, function (ph, index) { return _this.placeholders[+index]; });\n };\n SafeSelector.prototype.content = function () { return this._content; };\n return SafeSelector;\n}());\nvar _cssContentNextSelectorRe = /polyfill-next-selector[^}]*content:[\\s]*?(['\"])(.*?)\\1[;\\s]*}([^{]*?){/gim;\nvar _cssContentRuleRe = /(polyfill-rule)[^}]*(content:[\\s]*(['\"])(.*?)\\3)[;\\s]*[^}]*}/gim;\nvar _cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content:[\\s]*(['\"])(.*?)\\3)[;\\s]*[^}]*}/gim;\nvar _polyfillHost = '-shadowcsshost';\n// note: :host-context pre-processed to -shadowcsshostcontext.\nvar _polyfillHostContext = '-shadowcsscontext';\nvar _parenSuffix = ')(?:\\\\((' +\n '(?:\\\\([^)(]*\\\\)|[^)(]*)+?' +\n ')\\\\))?([^,{]*)';\nvar _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');\nvar _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');\nvar _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';\nvar _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\\s]*)/;\nvar _shadowDOMSelectorsRe = [\n /::shadow/g,\n /::content/g,\n // Deprecated selectors\n /\\/shadow-deep\\//g,\n /\\/shadow\\//g,\n];\n// The deep combinator is deprecated in the CSS spec\n// Support for `>>>`, `deep`, `::ng-deep` is then also deprecated and will be removed in the future.\n// see https://github.com/angular/angular/pull/17677\nvar _shadowDeepSelectors = /(?:>>>)|(?:\\/deep\\/)|(?:::ng-deep)/g;\nvar _selectorReSuffix = '([>\\\\s~+\\[.,{:][\\\\s\\\\S]*)?$';\nvar _polyfillHostRe = /-shadowcsshost/gim;\nvar _colonHostRe = /:host/gim;\nvar _colonHostContextRe = /:host-context/gim;\nvar _commentRe = /\\/\\*\\s*[\\s\\S]*?\\*\\//g;\nfunction stripComments(input) {\n return input.replace(_commentRe, '');\n}\nvar _commentWithHashRe = /\\/\\*\\s*#\\s*source(Mapping)?URL=[\\s\\S]+?\\*\\//g;\nfunction extractCommentsWithHash(input) {\n return input.match(_commentWithHashRe) || [];\n}\nvar _ruleRe = /(\\s*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))/g;\nvar _curlyRe = /([{}])/g;\nvar OPEN_CURLY = '{';\nvar CLOSE_CURLY = '}';\nvar BLOCK_PLACEHOLDER = '%BLOCK%';\nvar CssRule = /** @class */ (function () {\n function CssRule(selector, content) {\n this.selector = selector;\n this.content = content;\n }\n return CssRule;\n}());\nfunction processRules(input, ruleCallback) {\n var inputWithEscapedBlocks = escapeBlocks(input);\n var nextBlockIndex = 0;\n return inputWithEscapedBlocks.escapedString.replace(_ruleRe, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n var selector = m[2];\n var content = '';\n var suffix = m[4];\n var contentPrefix = '';\n if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {\n content = inputWithEscapedBlocks.blocks[nextBlockIndex++];\n suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);\n contentPrefix = '{';\n }\n var rule = ruleCallback(new CssRule(selector, content));\n return \"\" + m[1] + rule.selector + m[3] + contentPrefix + rule.content + suffix;\n });\n}\nvar StringWithEscapedBlocks = /** @class */ (function () {\n function StringWithEscapedBlocks(escapedString, blocks) {\n this.escapedString = escapedString;\n this.blocks = blocks;\n }\n return StringWithEscapedBlocks;\n}());\nfunction escapeBlocks(input) {\n var inputParts = input.split(_curlyRe);\n var resultParts = [];\n var escapedBlocks = [];\n var bracketCount = 0;\n var currentBlockParts = [];\n for (var partIndex = 0; partIndex < inputParts.length; partIndex++) {\n var part = inputParts[partIndex];\n if (part == CLOSE_CURLY) {\n bracketCount--;\n }\n if (bracketCount > 0) {\n currentBlockParts.push(part);\n }\n else {\n if (currentBlockParts.length > 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n currentBlockParts = [];\n }\n resultParts.push(part);\n }\n if (part == OPEN_CURLY) {\n bracketCount++;\n }\n }\n if (currentBlockParts.length > 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n }\n return new StringWithEscapedBlocks(resultParts.join(''), escapedBlocks);\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 */\nvar COMPONENT_VARIABLE = '%COMP%';\nvar HOST_ATTR = \"_nghost-\" + COMPONENT_VARIABLE;\nvar CONTENT_ATTR = \"_ngcontent-\" + COMPONENT_VARIABLE;\nvar StylesCompileDependency = /** @class */ (function () {\n function StylesCompileDependency(name, moduleUrl, setValue) {\n this.name = name;\n this.moduleUrl = moduleUrl;\n this.setValue = setValue;\n }\n return StylesCompileDependency;\n}());\nvar CompiledStylesheet = /** @class */ (function () {\n function CompiledStylesheet(outputCtx, stylesVar, dependencies, isShimmed, meta) {\n this.outputCtx = outputCtx;\n this.stylesVar = stylesVar;\n this.dependencies = dependencies;\n this.isShimmed = isShimmed;\n this.meta = meta;\n }\n return CompiledStylesheet;\n}());\nvar StyleCompiler = /** @class */ (function () {\n function StyleCompiler(_urlResolver) {\n this._urlResolver = _urlResolver;\n this._shadowCss = new ShadowCss();\n }\n StyleCompiler.prototype.compileComponent = function (outputCtx, comp) {\n var template = comp.template;\n return this._compileStyles(outputCtx, comp, new CompileStylesheetMetadata({\n styles: template.styles,\n styleUrls: template.styleUrls,\n moduleUrl: identifierModuleUrl(comp.type)\n }), this.needsStyleShim(comp), true);\n };\n StyleCompiler.prototype.compileStyles = function (outputCtx, comp, stylesheet, shim) {\n if (shim === void 0) { shim = this.needsStyleShim(comp); }\n return this._compileStyles(outputCtx, comp, stylesheet, shim, false);\n };\n StyleCompiler.prototype.needsStyleShim = function (comp) {\n return comp.template.encapsulation === ViewEncapsulation.Emulated;\n };\n StyleCompiler.prototype._compileStyles = function (outputCtx, comp, stylesheet, shim, isComponentStylesheet) {\n var _this = this;\n var styleExpressions = stylesheet.styles.map(function (plainStyle) { return literal(_this._shimIfNeeded(plainStyle, shim)); });\n var dependencies = [];\n stylesheet.styleUrls.forEach(function (styleUrl) {\n var exprIndex = styleExpressions.length;\n // Note: This placeholder will be filled later.\n styleExpressions.push(null);\n dependencies.push(new StylesCompileDependency(getStylesVarName(null), styleUrl, function (value) { return styleExpressions[exprIndex] = outputCtx.importExpr(value); }));\n });\n // styles variable contains plain strings and arrays of other styles arrays (recursive),\n // so we set its type to dynamic.\n var stylesVar = getStylesVarName(isComponentStylesheet ? comp : null);\n var stmt = variable(stylesVar)\n .set(literalArr(styleExpressions, new ArrayType(DYNAMIC_TYPE, [TypeModifier.Const])))\n .toDeclStmt(null, isComponentStylesheet ? [StmtModifier.Final] : [\n StmtModifier.Final, StmtModifier.Exported\n ]);\n outputCtx.statements.push(stmt);\n return new CompiledStylesheet(outputCtx, stylesVar, dependencies, shim, stylesheet);\n };\n StyleCompiler.prototype._shimIfNeeded = function (style, shim) {\n return shim ? this._shadowCss.shimCssText(style, CONTENT_ATTR, HOST_ATTR) : style;\n };\n return StyleCompiler;\n}());\nfunction getStylesVarName(component) {\n var result = \"styles\";\n if (component) {\n result += \"_\" + identifierName(component.type);\n }\n return result;\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 * Parses string representation of a style and converts it into object literal.\n *\n * @param value string representation of style as used in the `style` attribute in HTML.\n * Example: `color: red; height: auto`.\n * @returns an object literal. `{ color: 'red', height: 'auto'}`.\n */\nfunction parse(value) {\n var styles = {};\n var i = 0;\n var parenDepth = 0;\n var quote = 0 /* QuoteNone */;\n var valueStart = 0;\n var propStart = 0;\n var currentProp = null;\n var valueHasQuotes = false;\n while (i < value.length) {\n var token = value.charCodeAt(i++);\n switch (token) {\n case 40 /* OpenParen */:\n parenDepth++;\n break;\n case 41 /* CloseParen */:\n parenDepth--;\n break;\n case 39 /* QuoteSingle */:\n // valueStart needs to be there since prop values don't\n // have quotes in CSS\n valueHasQuotes = valueHasQuotes || valueStart > 0;\n if (quote === 0 /* QuoteNone */) {\n quote = 39 /* QuoteSingle */;\n }\n else if (quote === 39 /* QuoteSingle */ && value.charCodeAt(i - 1) !== 92 /* BackSlash */) {\n quote = 0 /* QuoteNone */;\n }\n break;\n case 34 /* QuoteDouble */:\n // same logic as above\n valueHasQuotes = valueHasQuotes || valueStart > 0;\n if (quote === 0 /* QuoteNone */) {\n quote = 34 /* QuoteDouble */;\n }\n else if (quote === 34 /* QuoteDouble */ && value.charCodeAt(i - 1) !== 92 /* BackSlash */) {\n quote = 0 /* QuoteNone */;\n }\n break;\n case 58 /* Colon */:\n if (!currentProp && parenDepth === 0 && quote === 0 /* QuoteNone */) {\n currentProp = hyphenate(value.substring(propStart, i - 1).trim());\n valueStart = i;\n }\n break;\n case 59 /* Semicolon */:\n if (currentProp && valueStart > 0 && parenDepth === 0 && quote === 0 /* QuoteNone */) {\n var styleVal = value.substring(valueStart, i - 1).trim();\n styles[currentProp] = valueHasQuotes ? stripUnnecessaryQuotes(styleVal) : styleVal;\n propStart = i;\n valueStart = 0;\n currentProp = null;\n valueHasQuotes = false;\n }\n break;\n }\n }\n if (currentProp && valueStart) {\n var styleVal = value.substr(valueStart).trim();\n styles[currentProp] = valueHasQuotes ? stripUnnecessaryQuotes(styleVal) : styleVal;\n }\n return styles;\n}\nfunction stripUnnecessaryQuotes(value) {\n var qS = value.charCodeAt(0);\n var qE = value.charCodeAt(value.length - 1);\n if (qS == qE && (qS == 39 /* QuoteSingle */ || qS == 34 /* QuoteDouble */)) {\n var tempValue = value.substring(1, value.length - 1);\n // special case to avoid using a multi-quoted string that was just chomped\n // (e.g. `font-family: \"Verdana\", \"sans-serif\"`)\n if (tempValue.indexOf('\\'') == -1 && tempValue.indexOf('\"') == -1) {\n value = tempValue;\n }\n }\n return value;\n}\nfunction hyphenate(value) {\n return value.replace(/[a-z][A-Z]/g, function (v) {\n return v.charAt(0) + '-' + v.charAt(1);\n }).toLowerCase();\n}\n\n/**\n * Produces creation/update instructions for all styling bindings (class and style)\n *\n * The builder class below handles producing instructions for the following cases:\n *\n * - Static style/class attributes (style=\"...\" and class=\"...\")\n * - Dynamic style/class map bindings ([style]=\"map\" and [class]=\"map|string\")\n * - Dynamic style/class property bindings ([style.prop]=\"exp\" and [class.name]=\"exp\")\n *\n * Due to the complex relationship of all of these cases, the instructions generated\n * for these attributes/properties/bindings must be done so in the correct order. The\n * order which these must be generated is as follows:\n *\n * if (createMode) {\n * elementStyling(...)\n * }\n * if (updateMode) {\n * elementStylingMap(...)\n * elementStyleProp(...)\n * elementClassProp(...)\n * elementStylingApp(...)\n * }\n *\n * The creation/update methods within the builder class produce these instructions.\n */\nvar StylingBuilder = /** @class */ (function () {\n function StylingBuilder(_elementIndexExpr, _directiveIndexExpr) {\n this._elementIndexExpr = _elementIndexExpr;\n this._directiveIndexExpr = _directiveIndexExpr;\n this.hasBindingsOrInitialValues = false;\n this._classMapInput = null;\n this._styleMapInput = null;\n this._singleStyleInputs = null;\n this._singleClassInputs = null;\n this._lastStylingInput = null;\n // maps are used instead of hash maps because a Map will\n // retain the ordering of the keys\n this._stylesIndex = new Map();\n this._classesIndex = new Map();\n this._initialStyleValues = {};\n this._initialClassValues = {};\n this._useDefaultSanitizer = false;\n this._applyFnRequired = false;\n }\n StylingBuilder.prototype.registerBoundInput = function (input) {\n // [attr.style] or [attr.class] are skipped in the code below,\n // they should not be treated as styling-based bindings since\n // they are intended to be written directly to the attr and\n // will therefore skip all style/class resolution that is present\n // with style=\"\", [style]=\"\" and [style.prop]=\"\", class=\"\",\n // [class.prop]=\"\". [class]=\"\" assignments\n var name = input.name;\n var binding = null;\n switch (input.type) {\n case 0 /* Property */:\n if (name == 'style') {\n binding = this.registerStyleInput(null, input.value, '', input.sourceSpan);\n }\n else if (isClassBinding(input.name)) {\n binding = this.registerClassInput(null, input.value, input.sourceSpan);\n }\n break;\n case 3 /* Style */:\n binding = this.registerStyleInput(input.name, input.value, input.unit, input.sourceSpan);\n break;\n case 2 /* Class */:\n binding = this.registerClassInput(input.name, input.value, input.sourceSpan);\n break;\n }\n return binding ? true : false;\n };\n StylingBuilder.prototype.registerStyleInput = function (propertyName, value, unit, sourceSpan) {\n var entry = { name: propertyName, unit: unit, value: value, sourceSpan: sourceSpan };\n if (propertyName) {\n (this._singleStyleInputs = this._singleStyleInputs || []).push(entry);\n this._useDefaultSanitizer = this._useDefaultSanitizer || isStyleSanitizable(propertyName);\n registerIntoMap(this._stylesIndex, propertyName);\n this.hasBindingsOrInitialValues = true;\n }\n else {\n this._useDefaultSanitizer = true;\n this._styleMapInput = entry;\n }\n this._lastStylingInput = entry;\n this.hasBindingsOrInitialValues = true;\n this._applyFnRequired = true;\n return entry;\n };\n StylingBuilder.prototype.registerClassInput = function (className, value, sourceSpan) {\n var entry = { name: className, value: value, sourceSpan: sourceSpan };\n if (className) {\n (this._singleClassInputs = this._singleClassInputs || []).push(entry);\n this.hasBindingsOrInitialValues = true;\n registerIntoMap(this._classesIndex, className);\n }\n else {\n this._classMapInput = entry;\n }\n this._lastStylingInput = entry;\n this.hasBindingsOrInitialValues = true;\n this._applyFnRequired = true;\n return entry;\n };\n StylingBuilder.prototype.registerStyleAttr = function (value) {\n var _this = this;\n this._initialStyleValues = parse(value);\n Object.keys(this._initialStyleValues).forEach(function (prop) {\n registerIntoMap(_this._stylesIndex, prop);\n _this.hasBindingsOrInitialValues = true;\n });\n };\n StylingBuilder.prototype.registerClassAttr = function (value) {\n var _this = this;\n this._initialClassValues = {};\n value.split(/\\s+/g).forEach(function (className) {\n _this._initialClassValues[className] = true;\n registerIntoMap(_this._classesIndex, className);\n _this.hasBindingsOrInitialValues = true;\n });\n };\n StylingBuilder.prototype._buildInitExpr = function (registry, initialValues) {\n var exprs = [];\n var nameAndValueExprs = [];\n // _c0 = [prop, prop2, prop3, ...]\n registry.forEach(function (value, key) {\n var keyLiteral = literal(key);\n exprs.push(keyLiteral);\n var initialValue = initialValues[key];\n if (initialValue) {\n nameAndValueExprs.push(keyLiteral, literal(initialValue));\n }\n });\n if (nameAndValueExprs.length) {\n // _c0 = [... MARKER ...]\n exprs.push(literal(1 /* VALUES_MODE */));\n // _c0 = [prop, VALUE, prop2, VALUE2, ...]\n exprs.push.apply(exprs, __spread(nameAndValueExprs));\n }\n return exprs.length ? literalArr(exprs) : null;\n };\n StylingBuilder.prototype.buildCreateLevelInstruction = function (sourceSpan, constantPool) {\n if (this.hasBindingsOrInitialValues) {\n var initialClasses = this._buildInitExpr(this._classesIndex, this._initialClassValues);\n var initialStyles = this._buildInitExpr(this._stylesIndex, this._initialStyleValues);\n // in the event that a [style] binding is used then sanitization will\n // always be imported because it is not possible to know ahead of time\n // whether style bindings will use or not use any sanitizable properties\n // that isStyleSanitizable() will detect\n var useSanitizer = this._useDefaultSanitizer;\n var params_1 = [];\n if (initialClasses) {\n // the template compiler handles initial class styling (e.g. class=\"foo\") values\n // in a special command called `elementClass` so that the initial class\n // can be processed during runtime. These initial class values are bound to\n // a constant because the inital class values do not change (since they're static).\n params_1.push(constantPool.getConstLiteral(initialClasses, true));\n }\n else if (initialStyles || useSanitizer) {\n // no point in having an extra `null` value unless there are follow-up params\n params_1.push(NULL_EXPR);\n }\n if (initialStyles) {\n // the template compiler handles initial style (e.g. style=\"foo\") values\n // in a special command called `elementStyle` so that the initial styles\n // can be processed during runtime. These initial styles values are bound to\n // a constant because the inital style values do not change (since they're static).\n params_1.push(constantPool.getConstLiteral(initialStyles, true));\n }\n else if (useSanitizer || this._directiveIndexExpr) {\n // no point in having an extra `null` value unless there are follow-up params\n params_1.push(NULL_EXPR);\n }\n if (useSanitizer || this._directiveIndexExpr) {\n params_1.push(useSanitizer ? importExpr(Identifiers$1.defaultStyleSanitizer) : NULL_EXPR);\n if (this._directiveIndexExpr) {\n params_1.push(this._directiveIndexExpr);\n }\n }\n return { sourceSpan: sourceSpan, reference: Identifiers$1.elementStyling, buildParams: function () { return params_1; } };\n }\n return null;\n };\n StylingBuilder.prototype._buildStylingMap = function (valueConverter) {\n var _this = this;\n if (this._classMapInput || this._styleMapInput) {\n var stylingInput = this._classMapInput || this._styleMapInput;\n // these values must be outside of the update block so that they can\n // be evaluted (the AST visit call) during creation time so that any\n // pipes can be picked up in time before the template is built\n var mapBasedClassValue_1 = this._classMapInput ? this._classMapInput.value.visit(valueConverter) : null;\n var mapBasedStyleValue_1 = this._styleMapInput ? this._styleMapInput.value.visit(valueConverter) : null;\n return {\n sourceSpan: stylingInput.sourceSpan,\n reference: Identifiers$1.elementStylingMap,\n buildParams: function (convertFn) {\n var params = [_this._elementIndexExpr];\n if (mapBasedClassValue_1) {\n params.push(convertFn(mapBasedClassValue_1));\n }\n else if (_this._styleMapInput) {\n params.push(NULL_EXPR);\n }\n if (mapBasedStyleValue_1) {\n params.push(convertFn(mapBasedStyleValue_1));\n }\n else if (_this._directiveIndexExpr) {\n params.push(NULL_EXPR);\n }\n if (_this._directiveIndexExpr) {\n params.push(_this._directiveIndexExpr);\n }\n return params;\n }\n };\n }\n return null;\n };\n StylingBuilder.prototype._buildSingleInputs = function (reference, inputs, mapIndex, allowUnits, valueConverter) {\n var _this = this;\n return inputs.map(function (input) {\n var bindingIndex = mapIndex.get(input.name);\n var value = input.value.visit(valueConverter);\n return {\n sourceSpan: input.sourceSpan,\n reference: reference,\n buildParams: function (convertFn) {\n var params = [_this._elementIndexExpr, literal(bindingIndex), convertFn(value)];\n if (allowUnits) {\n if (input.unit) {\n params.push(literal(input.unit));\n }\n else if (_this._directiveIndexExpr) {\n params.push(NULL_EXPR);\n }\n }\n if (_this._directiveIndexExpr) {\n params.push(_this._directiveIndexExpr);\n }\n return params;\n }\n };\n });\n };\n StylingBuilder.prototype._buildClassInputs = function (valueConverter) {\n if (this._singleClassInputs) {\n return this._buildSingleInputs(Identifiers$1.elementClassProp, this._singleClassInputs, this._classesIndex, false, valueConverter);\n }\n return [];\n };\n StylingBuilder.prototype._buildStyleInputs = function (valueConverter) {\n if (this._singleStyleInputs) {\n return this._buildSingleInputs(Identifiers$1.elementStyleProp, this._singleStyleInputs, this._stylesIndex, true, valueConverter);\n }\n return [];\n };\n StylingBuilder.prototype._buildApplyFn = function () {\n var _this = this;\n return {\n sourceSpan: this._lastStylingInput ? this._lastStylingInput.sourceSpan : null,\n reference: Identifiers$1.elementStylingApply,\n buildParams: function () {\n var params = [_this._elementIndexExpr];\n if (_this._directiveIndexExpr) {\n params.push(_this._directiveIndexExpr);\n }\n return params;\n }\n };\n };\n StylingBuilder.prototype.buildUpdateLevelInstructions = function (valueConverter) {\n var instructions = [];\n if (this.hasBindingsOrInitialValues) {\n var mapInstruction = this._buildStylingMap(valueConverter);\n if (mapInstruction) {\n instructions.push(mapInstruction);\n }\n instructions.push.apply(instructions, __spread(this._buildStyleInputs(valueConverter)));\n instructions.push.apply(instructions, __spread(this._buildClassInputs(valueConverter)));\n if (this._applyFnRequired) {\n instructions.push(this._buildApplyFn());\n }\n }\n return instructions;\n };\n return StylingBuilder;\n}());\nfunction isClassBinding(name) {\n return name == 'className' || name == 'class';\n}\nfunction registerIntoMap(map, key) {\n if (!map.has(key)) {\n map.set(key, map.size);\n }\n}\nfunction isStyleSanitizable(prop) {\n return prop === 'background-image' || prop === 'background' || prop === 'border-image' ||\n prop === 'filter' || prop === 'list-style' || prop === 'list-style-image';\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 */\nvar TokenType;\n(function (TokenType) {\n TokenType[TokenType[\"Character\"] = 0] = \"Character\";\n TokenType[TokenType[\"Identifier\"] = 1] = \"Identifier\";\n TokenType[TokenType[\"Keyword\"] = 2] = \"Keyword\";\n TokenType[TokenType[\"String\"] = 3] = \"String\";\n TokenType[TokenType[\"Operator\"] = 4] = \"Operator\";\n TokenType[TokenType[\"Number\"] = 5] = \"Number\";\n TokenType[TokenType[\"Error\"] = 6] = \"Error\";\n})(TokenType || (TokenType = {}));\nvar KEYWORDS = ['var', 'let', 'as', 'null', 'undefined', 'true', 'false', 'if', 'else', 'this'];\nvar Lexer = /** @class */ (function () {\n function Lexer() {\n }\n Lexer.prototype.tokenize = function (text) {\n var scanner = new _Scanner(text);\n var tokens = [];\n var token = scanner.scanToken();\n while (token != null) {\n tokens.push(token);\n token = scanner.scanToken();\n }\n return tokens;\n };\n return Lexer;\n}());\nvar Token = /** @class */ (function () {\n function Token(index, type, numValue, strValue) {\n this.index = index;\n this.type = type;\n this.numValue = numValue;\n this.strValue = strValue;\n }\n Token.prototype.isCharacter = function (code) {\n return this.type == TokenType.Character && this.numValue == code;\n };\n Token.prototype.isNumber = function () { return this.type == TokenType.Number; };\n Token.prototype.isString = function () { return this.type == TokenType.String; };\n Token.prototype.isOperator = function (operator) {\n return this.type == TokenType.Operator && this.strValue == operator;\n };\n Token.prototype.isIdentifier = function () { return this.type == TokenType.Identifier; };\n Token.prototype.isKeyword = function () { return this.type == TokenType.Keyword; };\n Token.prototype.isKeywordLet = function () { return this.type == TokenType.Keyword && this.strValue == 'let'; };\n Token.prototype.isKeywordAs = function () { return this.type == TokenType.Keyword && this.strValue == 'as'; };\n Token.prototype.isKeywordNull = function () { return this.type == TokenType.Keyword && this.strValue == 'null'; };\n Token.prototype.isKeywordUndefined = function () {\n return this.type == TokenType.Keyword && this.strValue == 'undefined';\n };\n Token.prototype.isKeywordTrue = function () { return this.type == TokenType.Keyword && this.strValue == 'true'; };\n Token.prototype.isKeywordFalse = function () { return this.type == TokenType.Keyword && this.strValue == 'false'; };\n Token.prototype.isKeywordThis = function () { return this.type == TokenType.Keyword && this.strValue == 'this'; };\n Token.prototype.isError = function () { return this.type == TokenType.Error; };\n Token.prototype.toNumber = function () { return this.type == TokenType.Number ? this.numValue : -1; };\n Token.prototype.toString = function () {\n switch (this.type) {\n case TokenType.Character:\n case TokenType.Identifier:\n case TokenType.Keyword:\n case TokenType.Operator:\n case TokenType.String:\n case TokenType.Error:\n return this.strValue;\n case TokenType.Number:\n return this.numValue.toString();\n default:\n return null;\n }\n };\n return Token;\n}());\nfunction newCharacterToken(index, code) {\n return new Token(index, TokenType.Character, code, String.fromCharCode(code));\n}\nfunction newIdentifierToken(index, text) {\n return new Token(index, TokenType.Identifier, 0, text);\n}\nfunction newKeywordToken(index, text) {\n return new Token(index, TokenType.Keyword, 0, text);\n}\nfunction newOperatorToken(index, text) {\n return new Token(index, TokenType.Operator, 0, text);\n}\nfunction newStringToken(index, text) {\n return new Token(index, TokenType.String, 0, text);\n}\nfunction newNumberToken(index, n) {\n return new Token(index, TokenType.Number, n, '');\n}\nfunction newErrorToken(index, message) {\n return new Token(index, TokenType.Error, 0, message);\n}\nvar EOF = new Token(-1, TokenType.Character, 0, '');\nvar _Scanner = /** @class */ (function () {\n function _Scanner(input) {\n this.input = input;\n this.peek = 0;\n this.index = -1;\n this.length = input.length;\n this.advance();\n }\n _Scanner.prototype.advance = function () {\n this.peek = ++this.index >= this.length ? $EOF : this.input.charCodeAt(this.index);\n };\n _Scanner.prototype.scanToken = function () {\n var input = this.input, length = this.length;\n var peek = this.peek, index = this.index;\n // Skip whitespace.\n while (peek <= $SPACE) {\n if (++index >= length) {\n peek = $EOF;\n break;\n }\n else {\n peek = input.charCodeAt(index);\n }\n }\n this.peek = peek;\n this.index = index;\n if (index >= length) {\n return null;\n }\n // Handle identifiers and numbers.\n if (isIdentifierStart(peek))\n return this.scanIdentifier();\n if (isDigit(peek))\n return this.scanNumber(index);\n var start = index;\n switch (peek) {\n case $PERIOD:\n this.advance();\n return isDigit(this.peek) ? this.scanNumber(start) :\n newCharacterToken(start, $PERIOD);\n case $LPAREN:\n case $RPAREN:\n case $LBRACE:\n case $RBRACE:\n case $LBRACKET:\n case $RBRACKET:\n case $COMMA:\n case $COLON:\n case $SEMICOLON:\n return this.scanCharacter(start, peek);\n case $SQ:\n case $DQ:\n return this.scanString();\n case $HASH:\n case $PLUS:\n case $MINUS:\n case $STAR:\n case $SLASH:\n case $PERCENT:\n case $CARET:\n return this.scanOperator(start, String.fromCharCode(peek));\n case $QUESTION:\n return this.scanComplexOperator(start, '?', $PERIOD, '.');\n case $LT:\n case $GT:\n return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, '=');\n case $BANG:\n case $EQ:\n return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, '=', $EQ, '=');\n case $AMPERSAND:\n return this.scanComplexOperator(start, '&', $AMPERSAND, '&');\n case $BAR:\n return this.scanComplexOperator(start, '|', $BAR, '|');\n case $NBSP:\n while (isWhitespace(this.peek))\n this.advance();\n return this.scanToken();\n }\n this.advance();\n return this.error(\"Unexpected character [\" + String.fromCharCode(peek) + \"]\", 0);\n };\n _Scanner.prototype.scanCharacter = function (start, code) {\n this.advance();\n return newCharacterToken(start, code);\n };\n _Scanner.prototype.scanOperator = function (start, str) {\n this.advance();\n return newOperatorToken(start, str);\n };\n /**\n * Tokenize a 2/3 char long operator\n *\n * @param start start index in the expression\n * @param one first symbol (always part of the operator)\n * @param twoCode code point for the second symbol\n * @param two second symbol (part of the operator when the second code point matches)\n * @param threeCode code point for the third symbol\n * @param three third symbol (part of the operator when provided and matches source expression)\n */\n _Scanner.prototype.scanComplexOperator = function (start, one, twoCode, two, threeCode, three) {\n this.advance();\n var str = one;\n if (this.peek == twoCode) {\n this.advance();\n str += two;\n }\n if (threeCode != null && this.peek == threeCode) {\n this.advance();\n str += three;\n }\n return newOperatorToken(start, str);\n };\n _Scanner.prototype.scanIdentifier = function () {\n var start = this.index;\n this.advance();\n while (isIdentifierPart(this.peek))\n this.advance();\n var str = this.input.substring(start, this.index);\n return KEYWORDS.indexOf(str) > -1 ? newKeywordToken(start, str) :\n newIdentifierToken(start, str);\n };\n _Scanner.prototype.scanNumber = function (start) {\n var simple = (this.index === start);\n this.advance(); // Skip initial digit.\n while (true) {\n if (isDigit(this.peek)) ;\n else if (this.peek == $PERIOD) {\n simple = false;\n }\n else if (isExponentStart(this.peek)) {\n this.advance();\n if (isExponentSign(this.peek))\n this.advance();\n if (!isDigit(this.peek))\n return this.error('Invalid exponent', -1);\n simple = false;\n }\n else {\n break;\n }\n this.advance();\n }\n var str = this.input.substring(start, this.index);\n var value = simple ? parseIntAutoRadix(str) : parseFloat(str);\n return newNumberToken(start, value);\n };\n _Scanner.prototype.scanString = function () {\n var start = this.index;\n var quote = this.peek;\n this.advance(); // Skip initial quote.\n var buffer = '';\n var marker = this.index;\n var input = this.input;\n while (this.peek != quote) {\n if (this.peek == $BACKSLASH) {\n buffer += input.substring(marker, this.index);\n this.advance();\n var unescapedCode = void 0;\n // Workaround for TS2.1-introduced type strictness\n this.peek = this.peek;\n if (this.peek == $u) {\n // 4 character hex code for unicode character.\n var hex = input.substring(this.index + 1, this.index + 5);\n if (/^[0-9a-f]+$/i.test(hex)) {\n unescapedCode = parseInt(hex, 16);\n }\n else {\n return this.error(\"Invalid unicode escape [\\\\u\" + hex + \"]\", 0);\n }\n for (var i = 0; i < 5; i++) {\n this.advance();\n }\n }\n else {\n unescapedCode = unescape(this.peek);\n this.advance();\n }\n buffer += String.fromCharCode(unescapedCode);\n marker = this.index;\n }\n else if (this.peek == $EOF) {\n return this.error('Unterminated quote', 0);\n }\n else {\n this.advance();\n }\n }\n var last = input.substring(marker, this.index);\n this.advance(); // Skip terminating quote.\n return newStringToken(start, buffer + last);\n };\n _Scanner.prototype.error = function (message, offset) {\n var position = this.index + offset;\n return newErrorToken(position, \"Lexer Error: \" + message + \" at column \" + position + \" in expression [\" + this.input + \"]\");\n };\n return _Scanner;\n}());\nfunction isIdentifierStart(code) {\n return ($a <= code && code <= $z) || ($A <= code && code <= $Z) ||\n (code == $_) || (code == $$);\n}\nfunction isIdentifier(input) {\n if (input.length == 0)\n return false;\n var scanner = new _Scanner(input);\n if (!isIdentifierStart(scanner.peek))\n return false;\n scanner.advance();\n while (scanner.peek !== $EOF) {\n if (!isIdentifierPart(scanner.peek))\n return false;\n scanner.advance();\n }\n return true;\n}\nfunction isIdentifierPart(code) {\n return isAsciiLetter(code) || isDigit(code) || (code == $_) ||\n (code == $$);\n}\nfunction isExponentStart(code) {\n return code == $e || code == $E;\n}\nfunction isExponentSign(code) {\n return code == $MINUS || code == $PLUS;\n}\nfunction isQuote(code) {\n return code === $SQ || code === $DQ || code === $BT;\n}\nfunction unescape(code) {\n switch (code) {\n case $n:\n return $LF;\n case $f:\n return $FF;\n case $r:\n return $CR;\n case $t:\n return $TAB;\n case $v:\n return $VTAB;\n default:\n return code;\n }\n}\nfunction parseIntAutoRadix(text) {\n var result = parseInt(text);\n if (isNaN(result)) {\n throw new Error('Invalid integer literal when parsing ' + text);\n }\n return result;\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 */\nfunction assertArrayOfStrings(identifier, value) {\n if (value == null) {\n return;\n }\n if (!Array.isArray(value)) {\n throw new Error(\"Expected '\" + identifier + \"' to be an array of strings.\");\n }\n for (var i = 0; i < value.length; i += 1) {\n if (typeof value[i] !== 'string') {\n throw new Error(\"Expected '\" + identifier + \"' to be an array of strings.\");\n }\n }\n}\nvar INTERPOLATION_BLACKLIST_REGEXPS = [\n /^\\s*$/,\n /[<>]/,\n /^[{}]$/,\n /&(#|[a-z])/i,\n /^\\/\\//,\n];\nfunction assertInterpolationSymbols(identifier, value) {\n if (value != null && !(Array.isArray(value) && value.length == 2)) {\n throw new Error(\"Expected '\" + identifier + \"' to be an array, [start, end].\");\n }\n else if (value != null) {\n var start_1 = value[0];\n var end_1 = value[1];\n // black list checking\n INTERPOLATION_BLACKLIST_REGEXPS.forEach(function (regexp) {\n if (regexp.test(start_1) || regexp.test(end_1)) {\n throw new Error(\"['\" + start_1 + \"', '\" + end_1 + \"'] contains unusable interpolation symbol.\");\n }\n });\n }\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 */\nvar InterpolationConfig = /** @class */ (function () {\n function InterpolationConfig(start, end) {\n this.start = start;\n this.end = end;\n }\n InterpolationConfig.fromArray = function (markers) {\n if (!markers) {\n return DEFAULT_INTERPOLATION_CONFIG;\n }\n assertInterpolationSymbols('interpolation', markers);\n return new InterpolationConfig(markers[0], markers[1]);\n };\n return InterpolationConfig;\n}());\nvar DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig('{{', '}}');\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 */\nvar SplitInterpolation = /** @class */ (function () {\n function SplitInterpolation(strings, expressions, offsets) {\n this.strings = strings;\n this.expressions = expressions;\n this.offsets = offsets;\n }\n return SplitInterpolation;\n}());\nvar TemplateBindingParseResult = /** @class */ (function () {\n function TemplateBindingParseResult(templateBindings, warnings, errors) {\n this.templateBindings = templateBindings;\n this.warnings = warnings;\n this.errors = errors;\n }\n return TemplateBindingParseResult;\n}());\nfunction _createInterpolateRegExp(config) {\n var pattern = escapeRegExp(config.start) + '([\\\\s\\\\S]*?)' + escapeRegExp(config.end);\n return new RegExp(pattern, 'g');\n}\nvar Parser = /** @class */ (function () {\n function Parser(_lexer) {\n this._lexer = _lexer;\n this.errors = [];\n }\n Parser.prototype.parseAction = function (input, location, interpolationConfig) {\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n this._checkNoInterpolation(input, location, interpolationConfig);\n var sourceToLex = this._stripComments(input);\n var tokens = this._lexer.tokenize(this._stripComments(input));\n var ast = new _ParseAST(input, location, tokens, sourceToLex.length, true, this.errors, input.length - sourceToLex.length)\n .parseChain();\n return new ASTWithSource(ast, input, location, this.errors);\n };\n Parser.prototype.parseBinding = function (input, location, interpolationConfig) {\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n var ast = this._parseBindingAst(input, location, interpolationConfig);\n return new ASTWithSource(ast, input, location, this.errors);\n };\n Parser.prototype.parseSimpleBinding = function (input, location, interpolationConfig) {\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n var ast = this._parseBindingAst(input, location, interpolationConfig);\n var errors = SimpleExpressionChecker.check(ast);\n if (errors.length > 0) {\n this._reportError(\"Host binding expression cannot contain \" + errors.join(' '), input, location);\n }\n return new ASTWithSource(ast, input, location, this.errors);\n };\n Parser.prototype._reportError = function (message, input, errLocation, ctxLocation) {\n this.errors.push(new ParserError(message, input, errLocation, ctxLocation));\n };\n Parser.prototype._parseBindingAst = function (input, location, interpolationConfig) {\n // Quotes expressions use 3rd-party expression language. We don't want to use\n // our lexer or parser for that, so we check for that ahead of time.\n var quote = this._parseQuote(input, location);\n if (quote != null) {\n return quote;\n }\n this._checkNoInterpolation(input, location, interpolationConfig);\n var sourceToLex = this._stripComments(input);\n var tokens = this._lexer.tokenize(sourceToLex);\n return new _ParseAST(input, location, tokens, sourceToLex.length, false, this.errors, input.length - sourceToLex.length)\n .parseChain();\n };\n Parser.prototype._parseQuote = function (input, location) {\n if (input == null)\n return null;\n var prefixSeparatorIndex = input.indexOf(':');\n if (prefixSeparatorIndex == -1)\n return null;\n var prefix = input.substring(0, prefixSeparatorIndex).trim();\n if (!isIdentifier(prefix))\n return null;\n var uninterpretedExpression = input.substring(prefixSeparatorIndex + 1);\n return new Quote(new ParseSpan(0, input.length), prefix, uninterpretedExpression, location);\n };\n Parser.prototype.parseTemplateBindings = function (tplKey, tplValue, location) {\n var tokens = this._lexer.tokenize(tplValue);\n return new _ParseAST(tplValue, location, tokens, tplValue.length, false, this.errors, 0)\n .parseTemplateBindings(tplKey);\n };\n Parser.prototype.parseInterpolation = function (input, location, interpolationConfig) {\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n var split = this.splitInterpolation(input, location, interpolationConfig);\n if (split == null)\n return null;\n var expressions = [];\n for (var i = 0; i < split.expressions.length; ++i) {\n var expressionText = split.expressions[i];\n var sourceToLex = this._stripComments(expressionText);\n var tokens = this._lexer.tokenize(sourceToLex);\n var ast = new _ParseAST(input, location, tokens, sourceToLex.length, false, this.errors, split.offsets[i] + (expressionText.length - sourceToLex.length))\n .parseChain();\n expressions.push(ast);\n }\n return new ASTWithSource(new Interpolation(new ParseSpan(0, input == null ? 0 : input.length), split.strings, expressions), input, location, this.errors);\n };\n Parser.prototype.splitInterpolation = function (input, location, interpolationConfig) {\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n var regexp = _createInterpolateRegExp(interpolationConfig);\n var parts = input.split(regexp);\n if (parts.length <= 1) {\n return null;\n }\n var strings = [];\n var expressions = [];\n var offsets = [];\n var offset = 0;\n for (var i = 0; i < parts.length; i++) {\n var part = parts[i];\n if (i % 2 === 0) {\n // fixed string\n strings.push(part);\n offset += part.length;\n }\n else if (part.trim().length > 0) {\n offset += interpolationConfig.start.length;\n expressions.push(part);\n offsets.push(offset);\n offset += part.length + interpolationConfig.end.length;\n }\n else {\n this._reportError('Blank expressions are not allowed in interpolated strings', input, \"at column \" + this._findInterpolationErrorColumn(parts, i, interpolationConfig) + \" in\", location);\n expressions.push('$implict');\n offsets.push(offset);\n }\n }\n return new SplitInterpolation(strings, expressions, offsets);\n };\n Parser.prototype.wrapLiteralPrimitive = function (input, location) {\n return new ASTWithSource(new LiteralPrimitive(new ParseSpan(0, input == null ? 0 : input.length), input), input, location, this.errors);\n };\n Parser.prototype._stripComments = function (input) {\n var i = this._commentStart(input);\n return i != null ? input.substring(0, i).trim() : input;\n };\n Parser.prototype._commentStart = function (input) {\n var outerQuote = null;\n for (var i = 0; i < input.length - 1; i++) {\n var char = input.charCodeAt(i);\n var nextChar = input.charCodeAt(i + 1);\n if (char === $SLASH && nextChar == $SLASH && outerQuote == null)\n return i;\n if (outerQuote === char) {\n outerQuote = null;\n }\n else if (outerQuote == null && isQuote(char)) {\n outerQuote = char;\n }\n }\n return null;\n };\n Parser.prototype._checkNoInterpolation = function (input, location, interpolationConfig) {\n var regexp = _createInterpolateRegExp(interpolationConfig);\n var parts = input.split(regexp);\n if (parts.length > 1) {\n this._reportError(\"Got interpolation (\" + interpolationConfig.start + interpolationConfig.end + \") where expression was expected\", input, \"at column \" + this._findInterpolationErrorColumn(parts, 1, interpolationConfig) + \" in\", location);\n }\n };\n Parser.prototype._findInterpolationErrorColumn = function (parts, partInErrIdx, interpolationConfig) {\n var errLocation = '';\n for (var j = 0; j < partInErrIdx; j++) {\n errLocation += j % 2 === 0 ?\n parts[j] :\n \"\" + interpolationConfig.start + parts[j] + interpolationConfig.end;\n }\n return errLocation.length;\n };\n return Parser;\n}());\nvar _ParseAST = /** @class */ (function () {\n function _ParseAST(input, location, tokens, inputLength, parseAction, errors, offset) {\n this.input = input;\n this.location = location;\n this.tokens = tokens;\n this.inputLength = inputLength;\n this.parseAction = parseAction;\n this.errors = errors;\n this.offset = offset;\n this.rparensExpected = 0;\n this.rbracketsExpected = 0;\n this.rbracesExpected = 0;\n this.index = 0;\n }\n _ParseAST.prototype.peek = function (offset) {\n var i = this.index + offset;\n return i < this.tokens.length ? this.tokens[i] : EOF;\n };\n Object.defineProperty(_ParseAST.prototype, \"next\", {\n get: function () { return this.peek(0); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ParseAST.prototype, \"inputIndex\", {\n get: function () {\n return (this.index < this.tokens.length) ? this.next.index + this.offset :\n this.inputLength + this.offset;\n },\n enumerable: true,\n configurable: true\n });\n _ParseAST.prototype.span = function (start) { return new ParseSpan(start, this.inputIndex); };\n _ParseAST.prototype.advance = function () { this.index++; };\n _ParseAST.prototype.optionalCharacter = function (code) {\n if (this.next.isCharacter(code)) {\n this.advance();\n return true;\n }\n else {\n return false;\n }\n };\n _ParseAST.prototype.peekKeywordLet = function () { return this.next.isKeywordLet(); };\n _ParseAST.prototype.peekKeywordAs = function () { return this.next.isKeywordAs(); };\n _ParseAST.prototype.expectCharacter = function (code) {\n if (this.optionalCharacter(code))\n return;\n this.error(\"Missing expected \" + String.fromCharCode(code));\n };\n _ParseAST.prototype.optionalOperator = function (op) {\n if (this.next.isOperator(op)) {\n this.advance();\n return true;\n }\n else {\n return false;\n }\n };\n _ParseAST.prototype.expectOperator = function (operator) {\n if (this.optionalOperator(operator))\n return;\n this.error(\"Missing expected operator \" + operator);\n };\n _ParseAST.prototype.expectIdentifierOrKeyword = function () {\n var n = this.next;\n if (!n.isIdentifier() && !n.isKeyword()) {\n this.error(\"Unexpected token \" + n + \", expected identifier or keyword\");\n return '';\n }\n this.advance();\n return n.toString();\n };\n _ParseAST.prototype.expectIdentifierOrKeywordOrString = function () {\n var n = this.next;\n if (!n.isIdentifier() && !n.isKeyword() && !n.isString()) {\n this.error(\"Unexpected token \" + n + \", expected identifier, keyword, or string\");\n return '';\n }\n this.advance();\n return n.toString();\n };\n _ParseAST.prototype.parseChain = function () {\n var exprs = [];\n var start = this.inputIndex;\n while (this.index < this.tokens.length) {\n var expr = this.parsePipe();\n exprs.push(expr);\n if (this.optionalCharacter($SEMICOLON)) {\n if (!this.parseAction) {\n this.error('Binding expression cannot contain chained expression');\n }\n while (this.optionalCharacter($SEMICOLON)) {\n } // read all semicolons\n }\n else if (this.index < this.tokens.length) {\n this.error(\"Unexpected token '\" + this.next + \"'\");\n }\n }\n if (exprs.length == 0)\n return new EmptyExpr(this.span(start));\n if (exprs.length == 1)\n return exprs[0];\n return new Chain(this.span(start), exprs);\n };\n _ParseAST.prototype.parsePipe = function () {\n var result = this.parseExpression();\n if (this.optionalOperator('|')) {\n if (this.parseAction) {\n this.error('Cannot have a pipe in an action expression');\n }\n do {\n var name_1 = this.expectIdentifierOrKeyword();\n var args = [];\n while (this.optionalCharacter($COLON)) {\n args.push(this.parseExpression());\n }\n result = new BindingPipe(this.span(result.span.start), result, name_1, args);\n } while (this.optionalOperator('|'));\n }\n return result;\n };\n _ParseAST.prototype.parseExpression = function () { return this.parseConditional(); };\n _ParseAST.prototype.parseConditional = function () {\n var start = this.inputIndex;\n var result = this.parseLogicalOr();\n if (this.optionalOperator('?')) {\n var yes = this.parsePipe();\n var no = void 0;\n if (!this.optionalCharacter($COLON)) {\n var end = this.inputIndex;\n var expression = this.input.substring(start, end);\n this.error(\"Conditional expression \" + expression + \" requires all 3 expressions\");\n no = new EmptyExpr(this.span(start));\n }\n else {\n no = this.parsePipe();\n }\n return new Conditional(this.span(start), result, yes, no);\n }\n else {\n return result;\n }\n };\n _ParseAST.prototype.parseLogicalOr = function () {\n // '||'\n var result = this.parseLogicalAnd();\n while (this.optionalOperator('||')) {\n var right = this.parseLogicalAnd();\n result = new Binary(this.span(result.span.start), '||', result, right);\n }\n return result;\n };\n _ParseAST.prototype.parseLogicalAnd = function () {\n // '&&'\n var result = this.parseEquality();\n while (this.optionalOperator('&&')) {\n var right = this.parseEquality();\n result = new Binary(this.span(result.span.start), '&&', result, right);\n }\n return result;\n };\n _ParseAST.prototype.parseEquality = function () {\n // '==','!=','===','!=='\n var result = this.parseRelational();\n while (this.next.type == TokenType.Operator) {\n var operator = this.next.strValue;\n switch (operator) {\n case '==':\n case '===':\n case '!=':\n case '!==':\n this.advance();\n var right = this.parseRelational();\n result = new Binary(this.span(result.span.start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n };\n _ParseAST.prototype.parseRelational = function () {\n // '<', '>', '<=', '>='\n var result = this.parseAdditive();\n while (this.next.type == TokenType.Operator) {\n var operator = this.next.strValue;\n switch (operator) {\n case '<':\n case '>':\n case '<=':\n case '>=':\n this.advance();\n var right = this.parseAdditive();\n result = new Binary(this.span(result.span.start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n };\n _ParseAST.prototype.parseAdditive = function () {\n // '+', '-'\n var result = this.parseMultiplicative();\n while (this.next.type == TokenType.Operator) {\n var operator = this.next.strValue;\n switch (operator) {\n case '+':\n case '-':\n this.advance();\n var right = this.parseMultiplicative();\n result = new Binary(this.span(result.span.start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n };\n _ParseAST.prototype.parseMultiplicative = function () {\n // '*', '%', '/'\n var result = this.parsePrefix();\n while (this.next.type == TokenType.Operator) {\n var operator = this.next.strValue;\n switch (operator) {\n case '*':\n case '%':\n case '/':\n this.advance();\n var right = this.parsePrefix();\n result = new Binary(this.span(result.span.start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n };\n _ParseAST.prototype.parsePrefix = function () {\n if (this.next.type == TokenType.Operator) {\n var start = this.inputIndex;\n var operator = this.next.strValue;\n var result = void 0;\n switch (operator) {\n case '+':\n this.advance();\n result = this.parsePrefix();\n return new Binary(this.span(start), '-', result, new LiteralPrimitive(new ParseSpan(start, start), 0));\n case '-':\n this.advance();\n result = this.parsePrefix();\n return new Binary(this.span(start), operator, new LiteralPrimitive(new ParseSpan(start, start), 0), result);\n case '!':\n this.advance();\n result = this.parsePrefix();\n return new PrefixNot(this.span(start), result);\n }\n }\n return this.parseCallChain();\n };\n _ParseAST.prototype.parseCallChain = function () {\n var result = this.parsePrimary();\n while (true) {\n if (this.optionalCharacter($PERIOD)) {\n result = this.parseAccessMemberOrMethodCall(result, false);\n }\n else if (this.optionalOperator('?.')) {\n result = this.parseAccessMemberOrMethodCall(result, true);\n }\n else if (this.optionalCharacter($LBRACKET)) {\n this.rbracketsExpected++;\n var key = this.parsePipe();\n this.rbracketsExpected--;\n this.expectCharacter($RBRACKET);\n if (this.optionalOperator('=')) {\n var value = this.parseConditional();\n result = new KeyedWrite(this.span(result.span.start), result, key, value);\n }\n else {\n result = new KeyedRead(this.span(result.span.start), result, key);\n }\n }\n else if (this.optionalCharacter($LPAREN)) {\n this.rparensExpected++;\n var args = this.parseCallArguments();\n this.rparensExpected--;\n this.expectCharacter($RPAREN);\n result = new FunctionCall(this.span(result.span.start), result, args);\n }\n else if (this.optionalOperator('!')) {\n result = new NonNullAssert(this.span(result.span.start), result);\n }\n else {\n return result;\n }\n }\n };\n _ParseAST.prototype.parsePrimary = function () {\n var start = this.inputIndex;\n if (this.optionalCharacter($LPAREN)) {\n this.rparensExpected++;\n var result = this.parsePipe();\n this.rparensExpected--;\n this.expectCharacter($RPAREN);\n return result;\n }\n else if (this.next.isKeywordNull()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), null);\n }\n else if (this.next.isKeywordUndefined()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), void 0);\n }\n else if (this.next.isKeywordTrue()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), true);\n }\n else if (this.next.isKeywordFalse()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), false);\n }\n else if (this.next.isKeywordThis()) {\n this.advance();\n return new ImplicitReceiver(this.span(start));\n }\n else if (this.optionalCharacter($LBRACKET)) {\n this.rbracketsExpected++;\n var elements = this.parseExpressionList($RBRACKET);\n this.rbracketsExpected--;\n this.expectCharacter($RBRACKET);\n return new LiteralArray(this.span(start), elements);\n }\n else if (this.next.isCharacter($LBRACE)) {\n return this.parseLiteralMap();\n }\n else if (this.next.isIdentifier()) {\n return this.parseAccessMemberOrMethodCall(new ImplicitReceiver(this.span(start)), false);\n }\n else if (this.next.isNumber()) {\n var value = this.next.toNumber();\n this.advance();\n return new LiteralPrimitive(this.span(start), value);\n }\n else if (this.next.isString()) {\n var literalValue = this.next.toString();\n this.advance();\n return new LiteralPrimitive(this.span(start), literalValue);\n }\n else if (this.index >= this.tokens.length) {\n this.error(\"Unexpected end of expression: \" + this.input);\n return new EmptyExpr(this.span(start));\n }\n else {\n this.error(\"Unexpected token \" + this.next);\n return new EmptyExpr(this.span(start));\n }\n };\n _ParseAST.prototype.parseExpressionList = function (terminator) {\n var result = [];\n if (!this.next.isCharacter(terminator)) {\n do {\n result.push(this.parsePipe());\n } while (this.optionalCharacter($COMMA));\n }\n return result;\n };\n _ParseAST.prototype.parseLiteralMap = function () {\n var keys = [];\n var values = [];\n var start = this.inputIndex;\n this.expectCharacter($LBRACE);\n if (!this.optionalCharacter($RBRACE)) {\n this.rbracesExpected++;\n do {\n var quoted = this.next.isString();\n var key = this.expectIdentifierOrKeywordOrString();\n keys.push({ key: key, quoted: quoted });\n this.expectCharacter($COLON);\n values.push(this.parsePipe());\n } while (this.optionalCharacter($COMMA));\n this.rbracesExpected--;\n this.expectCharacter($RBRACE);\n }\n return new LiteralMap(this.span(start), keys, values);\n };\n _ParseAST.prototype.parseAccessMemberOrMethodCall = function (receiver, isSafe) {\n if (isSafe === void 0) { isSafe = false; }\n var start = receiver.span.start;\n var id = this.expectIdentifierOrKeyword();\n if (this.optionalCharacter($LPAREN)) {\n this.rparensExpected++;\n var args = this.parseCallArguments();\n this.expectCharacter($RPAREN);\n this.rparensExpected--;\n var span = this.span(start);\n return isSafe ? new SafeMethodCall(span, receiver, id, args) :\n new MethodCall(span, receiver, id, args);\n }\n else {\n if (isSafe) {\n if (this.optionalOperator('=')) {\n this.error('The \\'?.\\' operator cannot be used in the assignment');\n return new EmptyExpr(this.span(start));\n }\n else {\n return new SafePropertyRead(this.span(start), receiver, id);\n }\n }\n else {\n if (this.optionalOperator('=')) {\n if (!this.parseAction) {\n this.error('Bindings cannot contain assignments');\n return new EmptyExpr(this.span(start));\n }\n var value = this.parseConditional();\n return new PropertyWrite(this.span(start), receiver, id, value);\n }\n else {\n return new PropertyRead(this.span(start), receiver, id);\n }\n }\n }\n };\n _ParseAST.prototype.parseCallArguments = function () {\n if (this.next.isCharacter($RPAREN))\n return [];\n var positionals = [];\n do {\n positionals.push(this.parsePipe());\n } while (this.optionalCharacter($COMMA));\n return positionals;\n };\n /**\n * An identifier, a keyword, a string with an optional `-` in between.\n */\n _ParseAST.prototype.expectTemplateBindingKey = function () {\n var result = '';\n var operatorFound = false;\n do {\n result += this.expectIdentifierOrKeywordOrString();\n operatorFound = this.optionalOperator('-');\n if (operatorFound) {\n result += '-';\n }\n } while (operatorFound);\n return result.toString();\n };\n // Parses the AST for ``\n _ParseAST.prototype.parseTemplateBindings = function (tplKey) {\n var firstBinding = true;\n var bindings = [];\n var warnings = [];\n do {\n var start = this.inputIndex;\n var rawKey = void 0;\n var key = void 0;\n var isVar = false;\n if (firstBinding) {\n rawKey = key = tplKey;\n firstBinding = false;\n }\n else {\n isVar = this.peekKeywordLet();\n if (isVar)\n this.advance();\n rawKey = this.expectTemplateBindingKey();\n key = isVar ? rawKey : tplKey + rawKey[0].toUpperCase() + rawKey.substring(1);\n this.optionalCharacter($COLON);\n }\n var name_2 = null;\n var expression = null;\n if (isVar) {\n if (this.optionalOperator('=')) {\n name_2 = this.expectTemplateBindingKey();\n }\n else {\n name_2 = '\\$implicit';\n }\n }\n else if (this.peekKeywordAs()) {\n this.advance(); // consume `as`\n name_2 = rawKey;\n key = this.expectTemplateBindingKey(); // read local var name\n isVar = true;\n }\n else if (this.next !== EOF && !this.peekKeywordLet()) {\n var start_1 = this.inputIndex;\n var ast = this.parsePipe();\n var source = this.input.substring(start_1 - this.offset, this.inputIndex - this.offset);\n expression = new ASTWithSource(ast, source, this.location, this.errors);\n }\n bindings.push(new TemplateBinding(this.span(start), key, isVar, name_2, expression));\n if (this.peekKeywordAs() && !isVar) {\n var letStart = this.inputIndex;\n this.advance(); // consume `as`\n var letName = this.expectTemplateBindingKey(); // read local var name\n bindings.push(new TemplateBinding(this.span(letStart), letName, true, key, null));\n }\n if (!this.optionalCharacter($SEMICOLON)) {\n this.optionalCharacter($COMMA);\n }\n } while (this.index < this.tokens.length);\n return new TemplateBindingParseResult(bindings, warnings, this.errors);\n };\n _ParseAST.prototype.error = function (message, index) {\n if (index === void 0) { index = null; }\n this.errors.push(new ParserError(message, this.input, this.locationText(index), this.location));\n this.skip();\n };\n _ParseAST.prototype.locationText = function (index) {\n if (index === void 0) { index = null; }\n if (index == null)\n index = this.index;\n return (index < this.tokens.length) ? \"at column \" + (this.tokens[index].index + 1) + \" in\" :\n \"at the end of the expression\";\n };\n // Error recovery should skip tokens until it encounters a recovery point. skip() treats\n // the end of input and a ';' as unconditionally a recovery point. It also treats ')',\n // '}' and ']' as conditional recovery points if one of calling productions is expecting\n // one of these symbols. This allows skip() to recover from errors such as '(a.) + 1' allowing\n // more of the AST to be retained (it doesn't skip any tokens as the ')' is retained because\n // of the '(' begins an '(' ')' production). The recovery points of grouping symbols\n // must be conditional as they must be skipped if none of the calling productions are not\n // expecting the closing token else we will never make progress in the case of an\n // extraneous group closing symbol (such as a stray ')'). This is not the case for ';' because\n // parseChain() is always the root production and it expects a ';'.\n // If a production expects one of these token it increments the corresponding nesting count,\n // and then decrements it just prior to checking if the token is in the input.\n _ParseAST.prototype.skip = function () {\n var n = this.next;\n while (this.index < this.tokens.length && !n.isCharacter($SEMICOLON) &&\n (this.rparensExpected <= 0 || !n.isCharacter($RPAREN)) &&\n (this.rbracesExpected <= 0 || !n.isCharacter($RBRACE)) &&\n (this.rbracketsExpected <= 0 || !n.isCharacter($RBRACKET))) {\n if (this.next.isError()) {\n this.errors.push(new ParserError(this.next.toString(), this.input, this.locationText(), this.location));\n }\n this.advance();\n n = this.next;\n }\n };\n return _ParseAST;\n}());\nvar SimpleExpressionChecker = /** @class */ (function () {\n function SimpleExpressionChecker() {\n this.errors = [];\n }\n SimpleExpressionChecker.check = function (ast) {\n var s = new SimpleExpressionChecker();\n ast.visit(s);\n return s.errors;\n };\n SimpleExpressionChecker.prototype.visitImplicitReceiver = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitInterpolation = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitLiteralPrimitive = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitPropertyRead = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitPropertyWrite = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitSafePropertyRead = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitMethodCall = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitSafeMethodCall = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitFunctionCall = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitLiteralArray = function (ast, context) { this.visitAll(ast.expressions); };\n SimpleExpressionChecker.prototype.visitLiteralMap = function (ast, context) { this.visitAll(ast.values); };\n SimpleExpressionChecker.prototype.visitBinary = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitPrefixNot = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitNonNullAssert = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitConditional = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitPipe = function (ast, context) { this.errors.push('pipes'); };\n SimpleExpressionChecker.prototype.visitKeyedRead = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitKeyedWrite = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitAll = function (asts) {\n var _this = this;\n return asts.map(function (node) { return node.visit(_this); });\n };\n SimpleExpressionChecker.prototype.visitChain = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitQuote = function (ast, context) { };\n return SimpleExpressionChecker;\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 path is an ordered set of elements. Typically a path is to a\n * particular offset in a source file. The head of the list is the top\n * most node. The tail is the node that contains the offset directly.\n *\n * For example, the expression `a + b + c` might have an ast that looks\n * like:\n * +\n * / \\\n * a +\n * / \\\n * b c\n *\n * The path to the node at offset 9 would be `['+' at 1-10, '+' at 7-10,\n * 'c' at 9-10]` and the path the node at offset 1 would be\n * `['+' at 1-10, 'a' at 1-2]`.\n */\nvar AstPath = /** @class */ (function () {\n function AstPath(path, position) {\n if (position === void 0) { position = -1; }\n this.path = path;\n this.position = position;\n }\n Object.defineProperty(AstPath.prototype, \"empty\", {\n get: function () { return !this.path || !this.path.length; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AstPath.prototype, \"head\", {\n get: function () { return this.path[0]; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AstPath.prototype, \"tail\", {\n get: function () { return this.path[this.path.length - 1]; },\n enumerable: true,\n configurable: true\n });\n AstPath.prototype.parentOf = function (node) {\n return node && this.path[this.path.indexOf(node) - 1];\n };\n AstPath.prototype.childOf = function (node) { return this.path[this.path.indexOf(node) + 1]; };\n AstPath.prototype.first = function (ctor) {\n for (var i = this.path.length - 1; i >= 0; i--) {\n var item = this.path[i];\n if (item instanceof ctor)\n return item;\n }\n };\n AstPath.prototype.push = function (node) { this.path.push(node); };\n AstPath.prototype.pop = function () { return this.path.pop(); };\n return AstPath;\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 */\nvar Text$2 = /** @class */ (function () {\n function Text(value, sourceSpan, i18n) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n }\n Text.prototype.visit = function (visitor, context) { return visitor.visitText(this, context); };\n return Text;\n}());\nvar Expansion = /** @class */ (function () {\n function Expansion(switchValue, type, cases, sourceSpan, switchValueSourceSpan, i18n) {\n this.switchValue = switchValue;\n this.type = type;\n this.cases = cases;\n this.sourceSpan = sourceSpan;\n this.switchValueSourceSpan = switchValueSourceSpan;\n this.i18n = i18n;\n }\n Expansion.prototype.visit = function (visitor, context) { return visitor.visitExpansion(this, context); };\n return Expansion;\n}());\nvar ExpansionCase = /** @class */ (function () {\n function ExpansionCase(value, expression, sourceSpan, valueSourceSpan, expSourceSpan) {\n this.value = value;\n this.expression = expression;\n this.sourceSpan = sourceSpan;\n this.valueSourceSpan = valueSourceSpan;\n this.expSourceSpan = expSourceSpan;\n }\n ExpansionCase.prototype.visit = function (visitor, context) { return visitor.visitExpansionCase(this, context); };\n return ExpansionCase;\n}());\nvar Attribute = /** @class */ (function () {\n function Attribute(name, value, sourceSpan, valueSpan, i18n) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.valueSpan = valueSpan;\n this.i18n = i18n;\n }\n Attribute.prototype.visit = function (visitor, context) { return visitor.visitAttribute(this, context); };\n return Attribute;\n}());\nvar Element = /** @class */ (function () {\n function Element(name, attrs, children, sourceSpan, startSourceSpan, endSourceSpan, i18n) {\n if (startSourceSpan === void 0) { startSourceSpan = null; }\n if (endSourceSpan === void 0) { endSourceSpan = null; }\n this.name = name;\n this.attrs = attrs;\n this.children = children;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n this.i18n = i18n;\n }\n Element.prototype.visit = function (visitor, context) { return visitor.visitElement(this, context); };\n return Element;\n}());\nvar Comment = /** @class */ (function () {\n function Comment(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n Comment.prototype.visit = function (visitor, context) { return visitor.visitComment(this, context); };\n return Comment;\n}());\nfunction visitAll(visitor, nodes, context) {\n if (context === void 0) { context = null; }\n var result = [];\n var visit = visitor.visit ?\n function (ast) { return visitor.visit(ast, context) || ast.visit(visitor, context); } :\n function (ast) { return ast.visit(visitor, context); };\n nodes.forEach(function (ast) {\n var astResult = visit(ast);\n if (astResult) {\n result.push(astResult);\n }\n });\n return result;\n}\nvar RecursiveVisitor = /** @class */ (function () {\n function RecursiveVisitor() {\n }\n RecursiveVisitor.prototype.visitElement = function (ast, context) {\n this.visitChildren(context, function (visit) {\n visit(ast.attrs);\n visit(ast.children);\n });\n };\n RecursiveVisitor.prototype.visitAttribute = function (ast, context) { };\n RecursiveVisitor.prototype.visitText = function (ast, context) { };\n RecursiveVisitor.prototype.visitComment = function (ast, context) { };\n RecursiveVisitor.prototype.visitExpansion = function (ast, context) {\n return this.visitChildren(context, function (visit) { visit(ast.cases); });\n };\n RecursiveVisitor.prototype.visitExpansionCase = function (ast, context) { };\n RecursiveVisitor.prototype.visitChildren = function (context, cb) {\n var results = [];\n var t = this;\n function visit(children) {\n if (children)\n results.push(visitAll(t, children, context));\n }\n cb(visit);\n return [].concat.apply([], results);\n };\n return RecursiveVisitor;\n}());\nfunction spanOf(ast) {\n var start = ast.sourceSpan.start.offset;\n var end = ast.sourceSpan.end.offset;\n if (ast instanceof Element) {\n if (ast.endSourceSpan) {\n end = ast.endSourceSpan.end.offset;\n }\n else if (ast.children && ast.children.length) {\n end = spanOf(ast.children[ast.children.length - 1]).end;\n }\n }\n return { start: start, end: end };\n}\nfunction findNode(nodes, position) {\n var path = [];\n var visitor = new /** @class */ (function (_super) {\n __extends(class_1, _super);\n function class_1() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n class_1.prototype.visit = function (ast, context) {\n var span = spanOf(ast);\n if (span.start <= position && position < span.end) {\n path.push(ast);\n }\n else {\n // Returning a value here will result in the children being skipped.\n return true;\n }\n };\n return class_1;\n }(RecursiveVisitor));\n visitAll(visitor, nodes);\n return new AstPath(path, position);\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 */\nvar TokenType$1;\n(function (TokenType) {\n TokenType[TokenType[\"TAG_OPEN_START\"] = 0] = \"TAG_OPEN_START\";\n TokenType[TokenType[\"TAG_OPEN_END\"] = 1] = \"TAG_OPEN_END\";\n TokenType[TokenType[\"TAG_OPEN_END_VOID\"] = 2] = \"TAG_OPEN_END_VOID\";\n TokenType[TokenType[\"TAG_CLOSE\"] = 3] = \"TAG_CLOSE\";\n TokenType[TokenType[\"TEXT\"] = 4] = \"TEXT\";\n TokenType[TokenType[\"ESCAPABLE_RAW_TEXT\"] = 5] = \"ESCAPABLE_RAW_TEXT\";\n TokenType[TokenType[\"RAW_TEXT\"] = 6] = \"RAW_TEXT\";\n TokenType[TokenType[\"COMMENT_START\"] = 7] = \"COMMENT_START\";\n TokenType[TokenType[\"COMMENT_END\"] = 8] = \"COMMENT_END\";\n TokenType[TokenType[\"CDATA_START\"] = 9] = \"CDATA_START\";\n TokenType[TokenType[\"CDATA_END\"] = 10] = \"CDATA_END\";\n TokenType[TokenType[\"ATTR_NAME\"] = 11] = \"ATTR_NAME\";\n TokenType[TokenType[\"ATTR_VALUE\"] = 12] = \"ATTR_VALUE\";\n TokenType[TokenType[\"DOC_TYPE\"] = 13] = \"DOC_TYPE\";\n TokenType[TokenType[\"EXPANSION_FORM_START\"] = 14] = \"EXPANSION_FORM_START\";\n TokenType[TokenType[\"EXPANSION_CASE_VALUE\"] = 15] = \"EXPANSION_CASE_VALUE\";\n TokenType[TokenType[\"EXPANSION_CASE_EXP_START\"] = 16] = \"EXPANSION_CASE_EXP_START\";\n TokenType[TokenType[\"EXPANSION_CASE_EXP_END\"] = 17] = \"EXPANSION_CASE_EXP_END\";\n TokenType[TokenType[\"EXPANSION_FORM_END\"] = 18] = \"EXPANSION_FORM_END\";\n TokenType[TokenType[\"EOF\"] = 19] = \"EOF\";\n})(TokenType$1 || (TokenType$1 = {}));\nvar Token$1 = /** @class */ (function () {\n function Token(type, parts, sourceSpan) {\n this.type = type;\n this.parts = parts;\n this.sourceSpan = sourceSpan;\n }\n return Token;\n}());\nvar TokenError = /** @class */ (function (_super) {\n __extends(TokenError, _super);\n function TokenError(errorMsg, tokenType, span) {\n var _this = _super.call(this, span, errorMsg) || this;\n _this.tokenType = tokenType;\n return _this;\n }\n return TokenError;\n}(ParseError));\nvar TokenizeResult = /** @class */ (function () {\n function TokenizeResult(tokens, errors) {\n this.tokens = tokens;\n this.errors = errors;\n }\n return TokenizeResult;\n}());\nfunction tokenize(source, url, getTagDefinition, tokenizeExpansionForms, interpolationConfig) {\n if (tokenizeExpansionForms === void 0) { tokenizeExpansionForms = false; }\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n return new _Tokenizer(new ParseSourceFile(source, url), getTagDefinition, tokenizeExpansionForms, interpolationConfig)\n .tokenize();\n}\nvar _CR_OR_CRLF_REGEXP = /\\r\\n?/g;\nfunction _unexpectedCharacterErrorMsg(charCode) {\n var char = charCode === $EOF ? 'EOF' : String.fromCharCode(charCode);\n return \"Unexpected character \\\"\" + char + \"\\\"\";\n}\nfunction _unknownEntityErrorMsg(entitySrc) {\n return \"Unknown entity \\\"\" + entitySrc + \"\\\" - use the \\\"&#;\\\" or \\\"&#x;\\\" syntax\";\n}\nvar _ControlFlowError = /** @class */ (function () {\n function _ControlFlowError(error) {\n this.error = error;\n }\n return _ControlFlowError;\n}());\n// See http://www.w3.org/TR/html51/syntax.html#writing\nvar _Tokenizer = /** @class */ (function () {\n /**\n * @param _file The html source\n * @param _getTagDefinition\n * @param _tokenizeIcu Whether to tokenize ICU messages (considered as text nodes when false)\n * @param _interpolationConfig\n */\n function _Tokenizer(_file, _getTagDefinition, _tokenizeIcu, _interpolationConfig) {\n if (_interpolationConfig === void 0) { _interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n this._file = _file;\n this._getTagDefinition = _getTagDefinition;\n this._tokenizeIcu = _tokenizeIcu;\n this._interpolationConfig = _interpolationConfig;\n // Note: this is always lowercase!\n this._peek = -1;\n this._nextPeek = -1;\n this._index = -1;\n this._line = 0;\n this._column = -1;\n this._expansionCaseStack = [];\n this._inInterpolation = false;\n this.tokens = [];\n this.errors = [];\n this._input = _file.content;\n this._length = _file.content.length;\n this._advance();\n }\n _Tokenizer.prototype._processCarriageReturns = function (content) {\n // http://www.w3.org/TR/html5/syntax.html#preprocessing-the-input-stream\n // In order to keep the original position in the source, we can not\n // pre-process it.\n // Instead CRs are processed right before instantiating the tokens.\n return content.replace(_CR_OR_CRLF_REGEXP, '\\n');\n };\n _Tokenizer.prototype.tokenize = function () {\n while (this._peek !== $EOF) {\n var start = this._getLocation();\n try {\n if (this._attemptCharCode($LT)) {\n if (this._attemptCharCode($BANG)) {\n if (this._attemptCharCode($LBRACKET)) {\n this._consumeCdata(start);\n }\n else if (this._attemptCharCode($MINUS)) {\n this._consumeComment(start);\n }\n else {\n this._consumeDocType(start);\n }\n }\n else if (this._attemptCharCode($SLASH)) {\n this._consumeTagClose(start);\n }\n else {\n this._consumeTagOpen(start);\n }\n }\n else if (!(this._tokenizeIcu && this._tokenizeExpansionForm())) {\n this._consumeText();\n }\n }\n catch (e) {\n if (e instanceof _ControlFlowError) {\n this.errors.push(e.error);\n }\n else {\n throw e;\n }\n }\n }\n this._beginToken(TokenType$1.EOF);\n this._endToken([]);\n return new TokenizeResult(mergeTextTokens(this.tokens), this.errors);\n };\n /**\n * @returns whether an ICU token has been created\n * @internal\n */\n _Tokenizer.prototype._tokenizeExpansionForm = function () {\n if (isExpansionFormStart(this._input, this._index, this._interpolationConfig)) {\n this._consumeExpansionFormStart();\n return true;\n }\n if (isExpansionCaseStart(this._peek) && this._isInExpansionForm()) {\n this._consumeExpansionCaseStart();\n return true;\n }\n if (this._peek === $RBRACE) {\n if (this._isInExpansionCase()) {\n this._consumeExpansionCaseEnd();\n return true;\n }\n if (this._isInExpansionForm()) {\n this._consumeExpansionFormEnd();\n return true;\n }\n }\n return false;\n };\n _Tokenizer.prototype._getLocation = function () {\n return new ParseLocation(this._file, this._index, this._line, this._column);\n };\n _Tokenizer.prototype._getSpan = function (start, end) {\n if (start === void 0) { start = this._getLocation(); }\n if (end === void 0) { end = this._getLocation(); }\n return new ParseSourceSpan(start, end);\n };\n _Tokenizer.prototype._beginToken = function (type, start) {\n if (start === void 0) { start = this._getLocation(); }\n this._currentTokenStart = start;\n this._currentTokenType = type;\n };\n _Tokenizer.prototype._endToken = function (parts, end) {\n if (end === void 0) { end = this._getLocation(); }\n var token = new Token$1(this._currentTokenType, parts, new ParseSourceSpan(this._currentTokenStart, end));\n this.tokens.push(token);\n this._currentTokenStart = null;\n this._currentTokenType = null;\n return token;\n };\n _Tokenizer.prototype._createError = function (msg, span) {\n if (this._isInExpansionForm()) {\n msg += \" (Do you have an unescaped \\\"{\\\" in your template? Use \\\"{{ '{' }}\\\") to escape it.)\";\n }\n var error = new TokenError(msg, this._currentTokenType, span);\n this._currentTokenStart = null;\n this._currentTokenType = null;\n return new _ControlFlowError(error);\n };\n _Tokenizer.prototype._advance = function () {\n if (this._index >= this._length) {\n throw this._createError(_unexpectedCharacterErrorMsg($EOF), this._getSpan());\n }\n if (this._peek === $LF) {\n this._line++;\n this._column = 0;\n }\n else if (this._peek !== $LF && this._peek !== $CR) {\n this._column++;\n }\n this._index++;\n this._peek = this._index >= this._length ? $EOF : this._input.charCodeAt(this._index);\n this._nextPeek =\n this._index + 1 >= this._length ? $EOF : this._input.charCodeAt(this._index + 1);\n };\n _Tokenizer.prototype._attemptCharCode = function (charCode) {\n if (this._peek === charCode) {\n this._advance();\n return true;\n }\n return false;\n };\n _Tokenizer.prototype._attemptCharCodeCaseInsensitive = function (charCode) {\n if (compareCharCodeCaseInsensitive(this._peek, charCode)) {\n this._advance();\n return true;\n }\n return false;\n };\n _Tokenizer.prototype._requireCharCode = function (charCode) {\n var location = this._getLocation();\n if (!this._attemptCharCode(charCode)) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan(location, location));\n }\n };\n _Tokenizer.prototype._attemptStr = function (chars) {\n var len = chars.length;\n if (this._index + len > this._length) {\n return false;\n }\n var initialPosition = this._savePosition();\n for (var i = 0; i < len; i++) {\n if (!this._attemptCharCode(chars.charCodeAt(i))) {\n // If attempting to parse the string fails, we want to reset the parser\n // to where it was before the attempt\n this._restorePosition(initialPosition);\n return false;\n }\n }\n return true;\n };\n _Tokenizer.prototype._attemptStrCaseInsensitive = function (chars) {\n for (var i = 0; i < chars.length; i++) {\n if (!this._attemptCharCodeCaseInsensitive(chars.charCodeAt(i))) {\n return false;\n }\n }\n return true;\n };\n _Tokenizer.prototype._requireStr = function (chars) {\n var location = this._getLocation();\n if (!this._attemptStr(chars)) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan(location));\n }\n };\n _Tokenizer.prototype._attemptCharCodeUntilFn = function (predicate) {\n while (!predicate(this._peek)) {\n this._advance();\n }\n };\n _Tokenizer.prototype._requireCharCodeUntilFn = function (predicate, len) {\n var start = this._getLocation();\n this._attemptCharCodeUntilFn(predicate);\n if (this._index - start.offset < len) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan(start, start));\n }\n };\n _Tokenizer.prototype._attemptUntilChar = function (char) {\n while (this._peek !== char) {\n this._advance();\n }\n };\n _Tokenizer.prototype._readChar = function (decodeEntities) {\n if (decodeEntities && this._peek === $AMPERSAND) {\n return this._decodeEntity();\n }\n else {\n var index = this._index;\n this._advance();\n return this._input[index];\n }\n };\n _Tokenizer.prototype._decodeEntity = function () {\n var start = this._getLocation();\n this._advance();\n if (this._attemptCharCode($HASH)) {\n var isHex = this._attemptCharCode($x) || this._attemptCharCode($X);\n var numberStart = this._getLocation().offset;\n this._attemptCharCodeUntilFn(isDigitEntityEnd);\n if (this._peek != $SEMICOLON) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan());\n }\n this._advance();\n var strNum = this._input.substring(numberStart, this._index - 1);\n try {\n var charCode = parseInt(strNum, isHex ? 16 : 10);\n return String.fromCharCode(charCode);\n }\n catch (e) {\n var entity = this._input.substring(start.offset + 1, this._index - 1);\n throw this._createError(_unknownEntityErrorMsg(entity), this._getSpan(start));\n }\n }\n else {\n var startPosition = this._savePosition();\n this._attemptCharCodeUntilFn(isNamedEntityEnd);\n if (this._peek != $SEMICOLON) {\n this._restorePosition(startPosition);\n return '&';\n }\n this._advance();\n var name_1 = this._input.substring(start.offset + 1, this._index - 1);\n var char = NAMED_ENTITIES[name_1];\n if (!char) {\n throw this._createError(_unknownEntityErrorMsg(name_1), this._getSpan(start));\n }\n return char;\n }\n };\n _Tokenizer.prototype._consumeRawText = function (decodeEntities, firstCharOfEnd, attemptEndRest) {\n var tagCloseStart;\n var textStart = this._getLocation();\n this._beginToken(decodeEntities ? TokenType$1.ESCAPABLE_RAW_TEXT : TokenType$1.RAW_TEXT, textStart);\n var parts = [];\n while (true) {\n tagCloseStart = this._getLocation();\n if (this._attemptCharCode(firstCharOfEnd) && attemptEndRest()) {\n break;\n }\n if (this._index > tagCloseStart.offset) {\n // add the characters consumed by the previous if statement to the output\n parts.push(this._input.substring(tagCloseStart.offset, this._index));\n }\n while (this._peek !== firstCharOfEnd) {\n parts.push(this._readChar(decodeEntities));\n }\n }\n return this._endToken([this._processCarriageReturns(parts.join(''))], tagCloseStart);\n };\n _Tokenizer.prototype._consumeComment = function (start) {\n var _this = this;\n this._beginToken(TokenType$1.COMMENT_START, start);\n this._requireCharCode($MINUS);\n this._endToken([]);\n var textToken = this._consumeRawText(false, $MINUS, function () { return _this._attemptStr('->'); });\n this._beginToken(TokenType$1.COMMENT_END, textToken.sourceSpan.end);\n this._endToken([]);\n };\n _Tokenizer.prototype._consumeCdata = function (start) {\n var _this = this;\n this._beginToken(TokenType$1.CDATA_START, start);\n this._requireStr('CDATA[');\n this._endToken([]);\n var textToken = this._consumeRawText(false, $RBRACKET, function () { return _this._attemptStr(']>'); });\n this._beginToken(TokenType$1.CDATA_END, textToken.sourceSpan.end);\n this._endToken([]);\n };\n _Tokenizer.prototype._consumeDocType = function (start) {\n this._beginToken(TokenType$1.DOC_TYPE, start);\n this._attemptUntilChar($GT);\n this._advance();\n this._endToken([this._input.substring(start.offset + 2, this._index - 1)]);\n };\n _Tokenizer.prototype._consumePrefixAndName = function () {\n var nameOrPrefixStart = this._index;\n var prefix = null;\n while (this._peek !== $COLON && !isPrefixEnd(this._peek)) {\n this._advance();\n }\n var nameStart;\n if (this._peek === $COLON) {\n this._advance();\n prefix = this._input.substring(nameOrPrefixStart, this._index - 1);\n nameStart = this._index;\n }\n else {\n nameStart = nameOrPrefixStart;\n }\n this._requireCharCodeUntilFn(isNameEnd, this._index === nameStart ? 1 : 0);\n var name = this._input.substring(nameStart, this._index);\n return [prefix, name];\n };\n _Tokenizer.prototype._consumeTagOpen = function (start) {\n var savedPos = this._savePosition();\n var tagName;\n var lowercaseTagName;\n try {\n if (!isAsciiLetter(this._peek)) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan());\n }\n var nameStart = this._index;\n this._consumeTagOpenStart(start);\n tagName = this._input.substring(nameStart, this._index);\n lowercaseTagName = tagName.toLowerCase();\n this._attemptCharCodeUntilFn(isNotWhitespace);\n while (this._peek !== $SLASH && this._peek !== $GT) {\n this._consumeAttributeName();\n this._attemptCharCodeUntilFn(isNotWhitespace);\n if (this._attemptCharCode($EQ)) {\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._consumeAttributeValue();\n }\n this._attemptCharCodeUntilFn(isNotWhitespace);\n }\n this._consumeTagOpenEnd();\n }\n catch (e) {\n if (e instanceof _ControlFlowError) {\n // When the start tag is invalid, assume we want a \"<\"\n this._restorePosition(savedPos);\n // Back to back text tokens are merged at the end\n this._beginToken(TokenType$1.TEXT, start);\n this._endToken(['<']);\n return;\n }\n throw e;\n }\n var contentTokenType = this._getTagDefinition(tagName).contentType;\n if (contentTokenType === TagContentType.RAW_TEXT) {\n this._consumeRawTextWithTagClose(lowercaseTagName, false);\n }\n else if (contentTokenType === TagContentType.ESCAPABLE_RAW_TEXT) {\n this._consumeRawTextWithTagClose(lowercaseTagName, true);\n }\n };\n _Tokenizer.prototype._consumeRawTextWithTagClose = function (lowercaseTagName, decodeEntities) {\n var _this = this;\n var textToken = this._consumeRawText(decodeEntities, $LT, function () {\n if (!_this._attemptCharCode($SLASH))\n return false;\n _this._attemptCharCodeUntilFn(isNotWhitespace);\n if (!_this._attemptStrCaseInsensitive(lowercaseTagName))\n return false;\n _this._attemptCharCodeUntilFn(isNotWhitespace);\n return _this._attemptCharCode($GT);\n });\n this._beginToken(TokenType$1.TAG_CLOSE, textToken.sourceSpan.end);\n this._endToken([null, lowercaseTagName]);\n };\n _Tokenizer.prototype._consumeTagOpenStart = function (start) {\n this._beginToken(TokenType$1.TAG_OPEN_START, start);\n var parts = this._consumePrefixAndName();\n this._endToken(parts);\n };\n _Tokenizer.prototype._consumeAttributeName = function () {\n this._beginToken(TokenType$1.ATTR_NAME);\n var prefixAndName = this._consumePrefixAndName();\n this._endToken(prefixAndName);\n };\n _Tokenizer.prototype._consumeAttributeValue = function () {\n this._beginToken(TokenType$1.ATTR_VALUE);\n var value;\n if (this._peek === $SQ || this._peek === $DQ) {\n var quoteChar = this._peek;\n this._advance();\n var parts = [];\n while (this._peek !== quoteChar) {\n parts.push(this._readChar(true));\n }\n value = parts.join('');\n this._advance();\n }\n else {\n var valueStart = this._index;\n this._requireCharCodeUntilFn(isNameEnd, 1);\n value = this._input.substring(valueStart, this._index);\n }\n this._endToken([this._processCarriageReturns(value)]);\n };\n _Tokenizer.prototype._consumeTagOpenEnd = function () {\n var tokenType = this._attemptCharCode($SLASH) ? TokenType$1.TAG_OPEN_END_VOID : TokenType$1.TAG_OPEN_END;\n this._beginToken(tokenType);\n this._requireCharCode($GT);\n this._endToken([]);\n };\n _Tokenizer.prototype._consumeTagClose = function (start) {\n this._beginToken(TokenType$1.TAG_CLOSE, start);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n var prefixAndName = this._consumePrefixAndName();\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._requireCharCode($GT);\n this._endToken(prefixAndName);\n };\n _Tokenizer.prototype._consumeExpansionFormStart = function () {\n this._beginToken(TokenType$1.EXPANSION_FORM_START, this._getLocation());\n this._requireCharCode($LBRACE);\n this._endToken([]);\n this._expansionCaseStack.push(TokenType$1.EXPANSION_FORM_START);\n this._beginToken(TokenType$1.RAW_TEXT, this._getLocation());\n var condition = this._readUntil($COMMA);\n this._endToken([condition], this._getLocation());\n this._requireCharCode($COMMA);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._beginToken(TokenType$1.RAW_TEXT, this._getLocation());\n var type = this._readUntil($COMMA);\n this._endToken([type], this._getLocation());\n this._requireCharCode($COMMA);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n };\n _Tokenizer.prototype._consumeExpansionCaseStart = function () {\n this._beginToken(TokenType$1.EXPANSION_CASE_VALUE, this._getLocation());\n var value = this._readUntil($LBRACE).trim();\n this._endToken([value], this._getLocation());\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._beginToken(TokenType$1.EXPANSION_CASE_EXP_START, this._getLocation());\n this._requireCharCode($LBRACE);\n this._endToken([], this._getLocation());\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._expansionCaseStack.push(TokenType$1.EXPANSION_CASE_EXP_START);\n };\n _Tokenizer.prototype._consumeExpansionCaseEnd = function () {\n this._beginToken(TokenType$1.EXPANSION_CASE_EXP_END, this._getLocation());\n this._requireCharCode($RBRACE);\n this._endToken([], this._getLocation());\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._expansionCaseStack.pop();\n };\n _Tokenizer.prototype._consumeExpansionFormEnd = function () {\n this._beginToken(TokenType$1.EXPANSION_FORM_END, this._getLocation());\n this._requireCharCode($RBRACE);\n this._endToken([]);\n this._expansionCaseStack.pop();\n };\n _Tokenizer.prototype._consumeText = function () {\n var start = this._getLocation();\n this._beginToken(TokenType$1.TEXT, start);\n var parts = [];\n do {\n if (this._interpolationConfig && this._attemptStr(this._interpolationConfig.start)) {\n parts.push(this._interpolationConfig.start);\n this._inInterpolation = true;\n }\n else if (this._interpolationConfig && this._inInterpolation &&\n this._attemptStr(this._interpolationConfig.end)) {\n parts.push(this._interpolationConfig.end);\n this._inInterpolation = false;\n }\n else {\n parts.push(this._readChar(true));\n }\n } while (!this._isTextEnd());\n this._endToken([this._processCarriageReturns(parts.join(''))]);\n };\n _Tokenizer.prototype._isTextEnd = function () {\n if (this._peek === $LT || this._peek === $EOF) {\n return true;\n }\n if (this._tokenizeIcu && !this._inInterpolation) {\n if (isExpansionFormStart(this._input, this._index, this._interpolationConfig)) {\n // start of an expansion form\n return true;\n }\n if (this._peek === $RBRACE && this._isInExpansionCase()) {\n // end of and expansion case\n return true;\n }\n }\n return false;\n };\n _Tokenizer.prototype._savePosition = function () {\n return [this._peek, this._index, this._column, this._line, this.tokens.length];\n };\n _Tokenizer.prototype._readUntil = function (char) {\n var start = this._index;\n this._attemptUntilChar(char);\n return this._input.substring(start, this._index);\n };\n _Tokenizer.prototype._restorePosition = function (position) {\n this._peek = position[0];\n this._index = position[1];\n this._column = position[2];\n this._line = position[3];\n var nbTokens = position[4];\n if (nbTokens < this.tokens.length) {\n // remove any extra tokens\n this.tokens = this.tokens.slice(0, nbTokens);\n }\n };\n _Tokenizer.prototype._isInExpansionCase = function () {\n return this._expansionCaseStack.length > 0 &&\n this._expansionCaseStack[this._expansionCaseStack.length - 1] ===\n TokenType$1.EXPANSION_CASE_EXP_START;\n };\n _Tokenizer.prototype._isInExpansionForm = function () {\n return this._expansionCaseStack.length > 0 &&\n this._expansionCaseStack[this._expansionCaseStack.length - 1] ===\n TokenType$1.EXPANSION_FORM_START;\n };\n return _Tokenizer;\n}());\nfunction isNotWhitespace(code) {\n return !isWhitespace(code) || code === $EOF;\n}\nfunction isNameEnd(code) {\n return isWhitespace(code) || code === $GT || code === $SLASH ||\n code === $SQ || code === $DQ || code === $EQ;\n}\nfunction isPrefixEnd(code) {\n return (code < $a || $z < code) && (code < $A || $Z < code) &&\n (code < $0 || code > $9);\n}\nfunction isDigitEntityEnd(code) {\n return code == $SEMICOLON || code == $EOF || !isAsciiHexDigit(code);\n}\nfunction isNamedEntityEnd(code) {\n return code == $SEMICOLON || code == $EOF || !isAsciiLetter(code);\n}\nfunction isExpansionFormStart(input, offset, interpolationConfig) {\n var isInterpolationStart = interpolationConfig ? input.indexOf(interpolationConfig.start, offset) == offset : false;\n return input.charCodeAt(offset) == $LBRACE && !isInterpolationStart;\n}\nfunction isExpansionCaseStart(peek) {\n return peek === $EQ || isAsciiLetter(peek) || isDigit(peek);\n}\nfunction compareCharCodeCaseInsensitive(code1, code2) {\n return toUpperCaseCharCode(code1) == toUpperCaseCharCode(code2);\n}\nfunction toUpperCaseCharCode(code) {\n return code >= $a && code <= $z ? code - $a + $A : code;\n}\nfunction mergeTextTokens(srcTokens) {\n var dstTokens = [];\n var lastDstToken = undefined;\n for (var i = 0; i < srcTokens.length; i++) {\n var token = srcTokens[i];\n if (lastDstToken && lastDstToken.type == TokenType$1.TEXT && token.type == TokenType$1.TEXT) {\n lastDstToken.parts[0] += token.parts[0];\n lastDstToken.sourceSpan.end = token.sourceSpan.end;\n }\n else {\n lastDstToken = token;\n dstTokens.push(lastDstToken);\n }\n }\n return dstTokens;\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 */\nvar TreeError = /** @class */ (function (_super) {\n __extends(TreeError, _super);\n function TreeError(elementName, span, msg) {\n var _this = _super.call(this, span, msg) || this;\n _this.elementName = elementName;\n return _this;\n }\n TreeError.create = function (elementName, span, msg) {\n return new TreeError(elementName, span, msg);\n };\n return TreeError;\n}(ParseError));\nvar ParseTreeResult = /** @class */ (function () {\n function ParseTreeResult(rootNodes, errors) {\n this.rootNodes = rootNodes;\n this.errors = errors;\n }\n return ParseTreeResult;\n}());\nvar Parser$1 = /** @class */ (function () {\n function Parser(getTagDefinition) {\n this.getTagDefinition = getTagDefinition;\n }\n Parser.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 tokensAndErrors = tokenize(source, url, this.getTagDefinition, parseExpansionForms, interpolationConfig);\n var treeAndErrors = new _TreeBuilder(tokensAndErrors.tokens, this.getTagDefinition).build();\n return new ParseTreeResult(treeAndErrors.rootNodes, tokensAndErrors.errors.concat(treeAndErrors.errors));\n };\n return Parser;\n}());\nvar _TreeBuilder = /** @class */ (function () {\n function _TreeBuilder(tokens, getTagDefinition) {\n this.tokens = tokens;\n this.getTagDefinition = getTagDefinition;\n this._index = -1;\n this._rootNodes = [];\n this._errors = [];\n this._elementStack = [];\n this._advance();\n }\n _TreeBuilder.prototype.build = function () {\n while (this._peek.type !== TokenType$1.EOF) {\n if (this._peek.type === TokenType$1.TAG_OPEN_START) {\n this._consumeStartTag(this._advance());\n }\n else if (this._peek.type === TokenType$1.TAG_CLOSE) {\n this._consumeEndTag(this._advance());\n }\n else if (this._peek.type === TokenType$1.CDATA_START) {\n this._closeVoidElement();\n this._consumeCdata(this._advance());\n }\n else if (this._peek.type === TokenType$1.COMMENT_START) {\n this._closeVoidElement();\n this._consumeComment(this._advance());\n }\n else if (this._peek.type === TokenType$1.TEXT || this._peek.type === TokenType$1.RAW_TEXT ||\n this._peek.type === TokenType$1.ESCAPABLE_RAW_TEXT) {\n this._closeVoidElement();\n this._consumeText(this._advance());\n }\n else if (this._peek.type === TokenType$1.EXPANSION_FORM_START) {\n this._consumeExpansion(this._advance());\n }\n else {\n // Skip all other tokens...\n this._advance();\n }\n }\n return new ParseTreeResult(this._rootNodes, this._errors);\n };\n _TreeBuilder.prototype._advance = function () {\n var prev = this._peek;\n if (this._index < this.tokens.length - 1) {\n // Note: there is always an EOF token at the end\n this._index++;\n }\n this._peek = this.tokens[this._index];\n return prev;\n };\n _TreeBuilder.prototype._advanceIf = function (type) {\n if (this._peek.type === type) {\n return this._advance();\n }\n return null;\n };\n _TreeBuilder.prototype._consumeCdata = function (startToken) {\n this._consumeText(this._advance());\n this._advanceIf(TokenType$1.CDATA_END);\n };\n _TreeBuilder.prototype._consumeComment = function (token) {\n var text = this._advanceIf(TokenType$1.RAW_TEXT);\n this._advanceIf(TokenType$1.COMMENT_END);\n var value = text != null ? text.parts[0].trim() : null;\n this._addToParent(new Comment(value, token.sourceSpan));\n };\n _TreeBuilder.prototype._consumeExpansion = function (token) {\n var switchValue = this._advance();\n var type = this._advance();\n var cases = [];\n // read =\n while (this._peek.type === TokenType$1.EXPANSION_CASE_VALUE) {\n var expCase = this._parseExpansionCase();\n if (!expCase)\n return; // error\n cases.push(expCase);\n }\n // read the final }\n if (this._peek.type !== TokenType$1.EXPANSION_FORM_END) {\n this._errors.push(TreeError.create(null, this._peek.sourceSpan, \"Invalid ICU message. Missing '}'.\"));\n return;\n }\n var sourceSpan = new ParseSourceSpan(token.sourceSpan.start, this._peek.sourceSpan.end);\n this._addToParent(new Expansion(switchValue.parts[0], type.parts[0], cases, sourceSpan, switchValue.sourceSpan));\n this._advance();\n };\n _TreeBuilder.prototype._parseExpansionCase = function () {\n var value = this._advance();\n // read {\n if (this._peek.type !== TokenType$1.EXPANSION_CASE_EXP_START) {\n this._errors.push(TreeError.create(null, this._peek.sourceSpan, \"Invalid ICU message. Missing '{'.\"));\n return null;\n }\n // read until }\n var start = this._advance();\n var exp = this._collectExpansionExpTokens(start);\n if (!exp)\n return null;\n var end = this._advance();\n exp.push(new Token$1(TokenType$1.EOF, [], end.sourceSpan));\n // parse everything in between { and }\n var parsedExp = new _TreeBuilder(exp, this.getTagDefinition).build();\n if (parsedExp.errors.length > 0) {\n this._errors = this._errors.concat(parsedExp.errors);\n return null;\n }\n var sourceSpan = new ParseSourceSpan(value.sourceSpan.start, end.sourceSpan.end);\n var expSourceSpan = new ParseSourceSpan(start.sourceSpan.start, end.sourceSpan.end);\n return new ExpansionCase(value.parts[0], parsedExp.rootNodes, sourceSpan, value.sourceSpan, expSourceSpan);\n };\n _TreeBuilder.prototype._collectExpansionExpTokens = function (start) {\n var exp = [];\n var expansionFormStack = [TokenType$1.EXPANSION_CASE_EXP_START];\n while (true) {\n if (this._peek.type === TokenType$1.EXPANSION_FORM_START ||\n this._peek.type === TokenType$1.EXPANSION_CASE_EXP_START) {\n expansionFormStack.push(this._peek.type);\n }\n if (this._peek.type === TokenType$1.EXPANSION_CASE_EXP_END) {\n if (lastOnStack(expansionFormStack, TokenType$1.EXPANSION_CASE_EXP_START)) {\n expansionFormStack.pop();\n if (expansionFormStack.length == 0)\n return exp;\n }\n else {\n this._errors.push(TreeError.create(null, start.sourceSpan, \"Invalid ICU message. Missing '}'.\"));\n return null;\n }\n }\n if (this._peek.type === TokenType$1.EXPANSION_FORM_END) {\n if (lastOnStack(expansionFormStack, TokenType$1.EXPANSION_FORM_START)) {\n expansionFormStack.pop();\n }\n else {\n this._errors.push(TreeError.create(null, start.sourceSpan, \"Invalid ICU message. Missing '}'.\"));\n return null;\n }\n }\n if (this._peek.type === TokenType$1.EOF) {\n this._errors.push(TreeError.create(null, start.sourceSpan, \"Invalid ICU message. Missing '}'.\"));\n return null;\n }\n exp.push(this._advance());\n }\n };\n _TreeBuilder.prototype._consumeText = function (token) {\n var text = token.parts[0];\n if (text.length > 0 && text[0] == '\\n') {\n var parent_1 = this._getParentElement();\n if (parent_1 != null && parent_1.children.length == 0 &&\n this.getTagDefinition(parent_1.name).ignoreFirstLf) {\n text = text.substring(1);\n }\n }\n if (text.length > 0) {\n this._addToParent(new Text$2(text, token.sourceSpan));\n }\n };\n _TreeBuilder.prototype._closeVoidElement = function () {\n var el = this._getParentElement();\n if (el && this.getTagDefinition(el.name).isVoid) {\n this._elementStack.pop();\n }\n };\n _TreeBuilder.prototype._consumeStartTag = function (startTagToken) {\n var prefix = startTagToken.parts[0];\n var name = startTagToken.parts[1];\n var attrs = [];\n while (this._peek.type === TokenType$1.ATTR_NAME) {\n attrs.push(this._consumeAttr(this._advance()));\n }\n var fullName = this._getElementFullName(prefix, name, this._getParentElement());\n var selfClosing = false;\n // Note: There could have been a tokenizer error\n // so that we don't get a token for the end tag...\n if (this._peek.type === TokenType$1.TAG_OPEN_END_VOID) {\n this._advance();\n selfClosing = true;\n var tagDef = this.getTagDefinition(fullName);\n if (!(tagDef.canSelfClose || getNsPrefix(fullName) !== null || tagDef.isVoid)) {\n this._errors.push(TreeError.create(fullName, startTagToken.sourceSpan, \"Only void and foreign elements can be self closed \\\"\" + startTagToken.parts[1] + \"\\\"\"));\n }\n }\n else if (this._peek.type === TokenType$1.TAG_OPEN_END) {\n this._advance();\n selfClosing = false;\n }\n var end = this._peek.sourceSpan.start;\n var span = new ParseSourceSpan(startTagToken.sourceSpan.start, end);\n var el = new Element(fullName, attrs, [], span, span, undefined);\n this._pushElement(el);\n if (selfClosing) {\n this._popElement(fullName);\n el.endSourceSpan = span;\n }\n };\n _TreeBuilder.prototype._pushElement = function (el) {\n var parentEl = this._getParentElement();\n if (parentEl && this.getTagDefinition(parentEl.name).isClosedByChild(el.name)) {\n this._elementStack.pop();\n }\n var tagDef = this.getTagDefinition(el.name);\n var _a = this._getParentElementSkippingContainers(), parent = _a.parent, container = _a.container;\n if (parent && tagDef.requireExtraParent(parent.name)) {\n var newParent = new Element(tagDef.parentToAdd, [], [], el.sourceSpan, el.startSourceSpan, el.endSourceSpan);\n this._insertBeforeContainer(parent, container, newParent);\n }\n this._addToParent(el);\n this._elementStack.push(el);\n };\n _TreeBuilder.prototype._consumeEndTag = function (endTagToken) {\n var fullName = this._getElementFullName(endTagToken.parts[0], endTagToken.parts[1], this._getParentElement());\n if (this._getParentElement()) {\n this._getParentElement().endSourceSpan = endTagToken.sourceSpan;\n }\n if (this.getTagDefinition(fullName).isVoid) {\n this._errors.push(TreeError.create(fullName, endTagToken.sourceSpan, \"Void elements do not have end tags \\\"\" + endTagToken.parts[1] + \"\\\"\"));\n }\n else if (!this._popElement(fullName)) {\n var errMsg = \"Unexpected closing tag \\\"\" + fullName + \"\\\". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags\";\n this._errors.push(TreeError.create(fullName, endTagToken.sourceSpan, errMsg));\n }\n };\n _TreeBuilder.prototype._popElement = function (fullName) {\n for (var stackIndex = this._elementStack.length - 1; stackIndex >= 0; stackIndex--) {\n var el = this._elementStack[stackIndex];\n if (el.name == fullName) {\n this._elementStack.splice(stackIndex, this._elementStack.length - stackIndex);\n return true;\n }\n if (!this.getTagDefinition(el.name).closedByParent) {\n return false;\n }\n }\n return false;\n };\n _TreeBuilder.prototype._consumeAttr = function (attrName) {\n var fullName = mergeNsAndName(attrName.parts[0], attrName.parts[1]);\n var end = attrName.sourceSpan.end;\n var value = '';\n var valueSpan = undefined;\n if (this._peek.type === TokenType$1.ATTR_VALUE) {\n var valueToken = this._advance();\n value = valueToken.parts[0];\n end = valueToken.sourceSpan.end;\n valueSpan = valueToken.sourceSpan;\n }\n return new Attribute(fullName, value, new ParseSourceSpan(attrName.sourceSpan.start, end), valueSpan);\n };\n _TreeBuilder.prototype._getParentElement = function () {\n return this._elementStack.length > 0 ? this._elementStack[this._elementStack.length - 1] : null;\n };\n /**\n * Returns the parent in the DOM and the container.\n *\n * `` elements are skipped as they are not rendered as DOM element.\n */\n _TreeBuilder.prototype._getParentElementSkippingContainers = function () {\n var container = null;\n for (var i = this._elementStack.length - 1; i >= 0; i--) {\n if (!isNgContainer(this._elementStack[i].name)) {\n return { parent: this._elementStack[i], container: container };\n }\n container = this._elementStack[i];\n }\n return { parent: null, container: container };\n };\n _TreeBuilder.prototype._addToParent = function (node) {\n var parent = this._getParentElement();\n if (parent != null) {\n parent.children.push(node);\n }\n else {\n this._rootNodes.push(node);\n }\n };\n /**\n * Insert a node between the parent and the container.\n * When no container is given, the node is appended as a child of the parent.\n * Also updates the element stack accordingly.\n *\n * @internal\n */\n _TreeBuilder.prototype._insertBeforeContainer = function (parent, container, node) {\n if (!container) {\n this._addToParent(node);\n this._elementStack.push(node);\n }\n else {\n if (parent) {\n // replace the container with the new node in the children\n var index = parent.children.indexOf(container);\n parent.children[index] = node;\n }\n else {\n this._rootNodes.push(node);\n }\n node.children.push(container);\n this._elementStack.splice(this._elementStack.indexOf(container), 0, node);\n }\n };\n _TreeBuilder.prototype._getElementFullName = function (prefix, localName, parentElement) {\n if (prefix == null) {\n prefix = this.getTagDefinition(localName).implicitNamespacePrefix;\n if (prefix == null && parentElement != null) {\n prefix = getNsPrefix(parentElement.name);\n }\n }\n return mergeNsAndName(prefix, localName);\n };\n return _TreeBuilder;\n}());\nfunction lastOnStack(stack, element) {\n return stack.length > 0 && stack[stack.length - 1] === element;\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 */\nvar HtmlParser = /** @class */ (function (_super) {\n __extends(HtmlParser, _super);\n function HtmlParser() {\n return _super.call(this, getHtmlTagDefinition) || this;\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 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 */\nvar PRESERVE_WS_ATTR_NAME = 'ngPreserveWhitespaces';\nvar SKIP_WS_TRIM_TAGS = new Set(['pre', 'template', 'textarea', 'script', 'style']);\n// Equivalent to \\s with \\u00a0 (non-breaking space) excluded.\n// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\nvar WS_CHARS = ' \\f\\n\\r\\t\\v\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff';\nvar NO_WS_REGEXP = new RegExp(\"[^\" + WS_CHARS + \"]\");\nvar WS_REPLACE_REGEXP = new RegExp(\"[\" + WS_CHARS + \"]{2,}\", 'g');\nfunction hasPreserveWhitespacesAttr(attrs) {\n return attrs.some(function (attr) { return attr.name === PRESERVE_WS_ATTR_NAME; });\n}\n/**\n * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see:\n * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32\n * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character\n * and later on replaced by a space. We are re-implementing the same idea here.\n */\nfunction replaceNgsp(value) {\n // lexer is replacing the &ngsp; pseudo-entity with NGSP_UNICODE\n return value.replace(new RegExp(NGSP_UNICODE, 'g'), ' ');\n}\n/**\n * This visitor can walk HTML parse tree and remove / trim text nodes using the following rules:\n * - consider spaces, tabs and new lines as whitespace characters;\n * - drop text nodes consisting of whitespace characters only;\n * - for all other text nodes replace consecutive whitespace characters with one space;\n * - convert &ngsp; pseudo-entity to a single space;\n *\n * Removal and trimming of whitespaces have positive performance impact (less code to generate\n * while compiling templates, faster view creation). At the same time it can be \"destructive\"\n * in some cases (whitespaces can influence layout). Because of the potential of breaking layout\n * this visitor is not activated by default in Angular 5 and people need to explicitly opt-in for\n * whitespace removal. The default option for whitespace removal will be revisited in Angular 6\n * and might be changed to \"on\" by default.\n */\nvar WhitespaceVisitor = /** @class */ (function () {\n function WhitespaceVisitor() {\n }\n WhitespaceVisitor.prototype.visitElement = function (element, context) {\n if (SKIP_WS_TRIM_TAGS.has(element.name) || hasPreserveWhitespacesAttr(element.attrs)) {\n // don't descent into elements where we need to preserve whitespaces\n // but still visit all attributes to eliminate one used as a market to preserve WS\n return new Element(element.name, visitAll(this, element.attrs), element.children, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n }\n return new Element(element.name, element.attrs, visitAll(this, element.children), element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n);\n };\n WhitespaceVisitor.prototype.visitAttribute = function (attribute, context) {\n return attribute.name !== PRESERVE_WS_ATTR_NAME ? attribute : null;\n };\n WhitespaceVisitor.prototype.visitText = function (text, context) {\n var isNotBlank = text.value.match(NO_WS_REGEXP);\n if (isNotBlank) {\n return new Text$2(replaceNgsp(text.value).replace(WS_REPLACE_REGEXP, ' '), text.sourceSpan, text.i18n);\n }\n return null;\n };\n WhitespaceVisitor.prototype.visitComment = function (comment, context) { return comment; };\n WhitespaceVisitor.prototype.visitExpansion = function (expansion, context) { return expansion; };\n WhitespaceVisitor.prototype.visitExpansionCase = function (expansionCase, context) { return expansionCase; };\n return WhitespaceVisitor;\n}());\nfunction removeWhitespaces(htmlAstWithErrors) {\n return new ParseTreeResult(visitAll(new WhitespaceVisitor(), htmlAstWithErrors.rootNodes), htmlAstWithErrors.errors);\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// =================================================================================================\n// =========== S T O P - S T O P - S T O P - S T O P - S T O P - S T O P ===========\n// =================================================================================================\n// =================================================================================================\n//\n// DO NOT EDIT THIS LIST OF SECURITY SENSITIVE PROPERTIES WITHOUT A SECURITY REVIEW!\n// Reach out to mprobst for details.\n//\n// =================================================================================================\n/** Map from tagName|propertyName SecurityContext. Properties applying to all tags use '*'. */\nvar _SECURITY_SCHEMA;\nfunction SECURITY_SCHEMA() {\n if (!_SECURITY_SCHEMA) {\n _SECURITY_SCHEMA = {};\n // Case is insignificant below, all element and attribute names are lower-cased for lookup.\n registerContext(SecurityContext.HTML, [\n 'iframe|srcdoc',\n '*|innerHTML',\n '*|outerHTML',\n ]);\n registerContext(SecurityContext.STYLE, ['*|style']);\n // NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them.\n registerContext(SecurityContext.URL, [\n '*|formAction', 'area|href', 'area|ping', 'audio|src', 'a|href',\n 'a|ping', 'blockquote|cite', 'body|background', 'del|cite', 'form|action',\n 'img|src', 'img|srcset', 'input|src', 'ins|cite', 'q|cite',\n 'source|src', 'source|srcset', 'track|src', 'video|poster', 'video|src',\n ]);\n registerContext(SecurityContext.RESOURCE_URL, [\n 'applet|code',\n 'applet|codebase',\n 'base|href',\n 'embed|src',\n 'frame|src',\n 'head|profile',\n 'html|manifest',\n 'iframe|src',\n 'link|href',\n 'media|src',\n 'object|codebase',\n 'object|data',\n 'script|src',\n ]);\n }\n return _SECURITY_SCHEMA;\n}\nfunction registerContext(ctx, specs) {\n var e_1, _a;\n try {\n for (var specs_1 = __values(specs), specs_1_1 = specs_1.next(); !specs_1_1.done; specs_1_1 = specs_1.next()) {\n var spec = specs_1_1.value;\n _SECURITY_SCHEMA[spec.toLowerCase()] = ctx;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (specs_1_1 && !specs_1_1.done && (_a = specs_1.return)) _a.call(specs_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\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 */\nvar ElementSchemaRegistry = /** @class */ (function () {\n function ElementSchemaRegistry() {\n }\n return ElementSchemaRegistry;\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 */\nvar BOOLEAN = 'boolean';\nvar NUMBER = 'number';\nvar STRING = 'string';\nvar OBJECT = 'object';\n/**\n * This array represents the DOM schema. It encodes inheritance, properties, and events.\n *\n * ## Overview\n *\n * Each line represents one kind of element. The `element_inheritance` and properties are joined\n * using `element_inheritance|properties` syntax.\n *\n * ## Element Inheritance\n *\n * The `element_inheritance` can be further subdivided as `element1,element2,...^parentElement`.\n * Here the individual elements are separated by `,` (commas). Every element in the list\n * has identical properties.\n *\n * An `element` may inherit additional properties from `parentElement` If no `^parentElement` is\n * specified then `\"\"` (blank) element is assumed.\n *\n * NOTE: The blank element inherits from root `[Element]` element, the super element of all\n * elements.\n *\n * NOTE an element prefix such as `:svg:` has no special meaning to the schema.\n *\n * ## Properties\n *\n * Each element has a set of properties separated by `,` (commas). Each property can be prefixed\n * by a special character designating its type:\n *\n * - (no prefix): property is a string.\n * - `*`: property represents an event.\n * - `!`: property is a boolean.\n * - `#`: property is a number.\n * - `%`: property is an object.\n *\n * ## Query\n *\n * The class creates an internal squas representation which allows to easily answer the query of\n * if a given property exist on a given element.\n *\n * NOTE: We don't yet support querying for types or events.\n * NOTE: This schema is auto extracted from `schema_extractor.ts` located in the test folder,\n * see dom_element_schema_registry_spec.ts\n */\n// =================================================================================================\n// =================================================================================================\n// =========== S T O P - S T O P - S T O P - S T O P - S T O P - S T O P ===========\n// =================================================================================================\n// =================================================================================================\n//\n// DO NOT EDIT THIS DOM SCHEMA WITHOUT A SECURITY REVIEW!\n//\n// Newly added properties must be security reviewed and assigned an appropriate SecurityContext in\n// dom_security_schema.ts. Reach out to mprobst & rjamet for details.\n//\n// =================================================================================================\nvar SCHEMA = [\n '[Element]|textContent,%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop,slot' +\n /* added manually to avoid breaking changes */\n ',*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored',\n '[HTMLElement]^[Element]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate',\n 'abbr,address,article,aside,b,bdi,bdo,cite,code,dd,dfn,dt,em,figcaption,figure,footer,header,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate',\n 'media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,src,%srcObject,#volume',\n ':svg:^[HTMLElement]|*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex',\n ':svg:graphics^:svg:|',\n ':svg:animation^:svg:|*begin,*end,*repeat',\n ':svg:geometry^:svg:|',\n ':svg:componentTransferFunction^:svg:|',\n ':svg:gradient^:svg:|',\n ':svg:textContent^:svg:graphics|',\n ':svg:textPositioning^:svg:textContent|',\n 'a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,rev,search,shape,target,text,type,username',\n 'area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,search,shape,target,username',\n 'audio^media|',\n 'br^[HTMLElement]|clear',\n 'base^[HTMLElement]|href,target',\n 'body^[HTMLElement]|aLink,background,bgColor,link,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink',\n 'button^[HTMLElement]|!autofocus,!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value',\n 'canvas^[HTMLElement]|#height,#width',\n 'content^[HTMLElement]|select',\n 'dl^[HTMLElement]|!compact',\n 'datalist^[HTMLElement]|',\n 'details^[HTMLElement]|!open',\n 'dialog^[HTMLElement]|!open,returnValue',\n 'dir^[HTMLElement]|!compact',\n 'div^[HTMLElement]|align',\n 'embed^[HTMLElement]|align,height,name,src,type,width',\n 'fieldset^[HTMLElement]|!disabled,name',\n 'font^[HTMLElement]|color,face,size',\n 'form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target',\n 'frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src',\n 'frameset^[HTMLElement]|cols,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows',\n 'hr^[HTMLElement]|align,color,!noShade,size,width',\n 'head^[HTMLElement]|',\n 'h1,h2,h3,h4,h5,h6^[HTMLElement]|align',\n 'html^[HTMLElement]|version',\n 'iframe^[HTMLElement]|align,!allowFullscreen,frameBorder,height,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width',\n 'img^[HTMLElement]|align,alt,border,%crossOrigin,#height,#hspace,!isMap,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width',\n 'input^[HTMLElement]|accept,align,alt,autocapitalize,autocomplete,!autofocus,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width',\n 'li^[HTMLElement]|type,#value',\n 'label^[HTMLElement]|htmlFor',\n 'legend^[HTMLElement]|align',\n 'link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type',\n 'map^[HTMLElement]|name',\n 'marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width',\n 'menu^[HTMLElement]|!compact',\n 'meta^[HTMLElement]|content,httpEquiv,name,scheme',\n 'meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value',\n 'ins,del^[HTMLElement]|cite,dateTime',\n 'ol^[HTMLElement]|!compact,!reversed,#start,type',\n 'object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width',\n 'optgroup^[HTMLElement]|!disabled,label',\n 'option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value',\n 'output^[HTMLElement]|defaultValue,%htmlFor,name,value',\n 'p^[HTMLElement]|align',\n 'param^[HTMLElement]|name,type,value,valueType',\n 'picture^[HTMLElement]|',\n 'pre^[HTMLElement]|#width',\n 'progress^[HTMLElement]|#max,#value',\n 'q,blockquote,cite^[HTMLElement]|',\n 'script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type',\n 'select^[HTMLElement]|!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value',\n 'shadow^[HTMLElement]|',\n 'slot^[HTMLElement]|name',\n 'source^[HTMLElement]|media,sizes,src,srcset,type',\n 'span^[HTMLElement]|',\n 'style^[HTMLElement]|!disabled,media,type',\n 'caption^[HTMLElement]|align',\n 'th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width',\n 'col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width',\n 'table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width',\n 'tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign',\n 'tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign',\n 'template^[HTMLElement]|',\n 'textarea^[HTMLElement]|autocapitalize,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap',\n 'title^[HTMLElement]|text',\n 'track^[HTMLElement]|!default,kind,label,src,srclang',\n 'ul^[HTMLElement]|!compact,type',\n 'unknown^[HTMLElement]|',\n 'video^media|#height,poster,#width',\n ':svg:a^:svg:graphics|',\n ':svg:animate^:svg:animation|',\n ':svg:animateMotion^:svg:animation|',\n ':svg:animateTransform^:svg:animation|',\n ':svg:circle^:svg:geometry|',\n ':svg:clipPath^:svg:graphics|',\n ':svg:defs^:svg:graphics|',\n ':svg:desc^:svg:|',\n ':svg:discard^:svg:|',\n ':svg:ellipse^:svg:geometry|',\n ':svg:feBlend^:svg:|',\n ':svg:feColorMatrix^:svg:|',\n ':svg:feComponentTransfer^:svg:|',\n ':svg:feComposite^:svg:|',\n ':svg:feConvolveMatrix^:svg:|',\n ':svg:feDiffuseLighting^:svg:|',\n ':svg:feDisplacementMap^:svg:|',\n ':svg:feDistantLight^:svg:|',\n ':svg:feDropShadow^:svg:|',\n ':svg:feFlood^:svg:|',\n ':svg:feFuncA^:svg:componentTransferFunction|',\n ':svg:feFuncB^:svg:componentTransferFunction|',\n ':svg:feFuncG^:svg:componentTransferFunction|',\n ':svg:feFuncR^:svg:componentTransferFunction|',\n ':svg:feGaussianBlur^:svg:|',\n ':svg:feImage^:svg:|',\n ':svg:feMerge^:svg:|',\n ':svg:feMergeNode^:svg:|',\n ':svg:feMorphology^:svg:|',\n ':svg:feOffset^:svg:|',\n ':svg:fePointLight^:svg:|',\n ':svg:feSpecularLighting^:svg:|',\n ':svg:feSpotLight^:svg:|',\n ':svg:feTile^:svg:|',\n ':svg:feTurbulence^:svg:|',\n ':svg:filter^:svg:|',\n ':svg:foreignObject^:svg:graphics|',\n ':svg:g^:svg:graphics|',\n ':svg:image^:svg:graphics|',\n ':svg:line^:svg:geometry|',\n ':svg:linearGradient^:svg:gradient|',\n ':svg:mpath^:svg:|',\n ':svg:marker^:svg:|',\n ':svg:mask^:svg:|',\n ':svg:metadata^:svg:|',\n ':svg:path^:svg:geometry|',\n ':svg:pattern^:svg:|',\n ':svg:polygon^:svg:geometry|',\n ':svg:polyline^:svg:geometry|',\n ':svg:radialGradient^:svg:gradient|',\n ':svg:rect^:svg:geometry|',\n ':svg:svg^:svg:graphics|#currentScale,#zoomAndPan',\n ':svg:script^:svg:|type',\n ':svg:set^:svg:animation|',\n ':svg:stop^:svg:|',\n ':svg:style^:svg:|!disabled,media,title,type',\n ':svg:switch^:svg:graphics|',\n ':svg:symbol^:svg:|',\n ':svg:tspan^:svg:textPositioning|',\n ':svg:text^:svg:textPositioning|',\n ':svg:textPath^:svg:textContent|',\n ':svg:title^:svg:|',\n ':svg:use^:svg:graphics|',\n ':svg:view^:svg:|#zoomAndPan',\n 'data^[HTMLElement]|value',\n 'keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name',\n 'menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default',\n 'summary^[HTMLElement]|',\n 'time^[HTMLElement]|dateTime',\n ':svg:cursor^:svg:|',\n];\nvar _ATTR_TO_PROP = {\n 'class': 'className',\n 'for': 'htmlFor',\n 'formaction': 'formAction',\n 'innerHtml': 'innerHTML',\n 'readonly': 'readOnly',\n 'tabindex': 'tabIndex',\n};\nvar DomElementSchemaRegistry = /** @class */ (function (_super) {\n __extends(DomElementSchemaRegistry, _super);\n function DomElementSchemaRegistry() {\n var _this = _super.call(this) || this;\n _this._schema = {};\n SCHEMA.forEach(function (encodedType) {\n var type = {};\n var _a = __read(encodedType.split('|'), 2), strType = _a[0], strProperties = _a[1];\n var properties = strProperties.split(',');\n var _b = __read(strType.split('^'), 2), typeNames = _b[0], superName = _b[1];\n typeNames.split(',').forEach(function (tag) { return _this._schema[tag.toLowerCase()] = type; });\n var superType = superName && _this._schema[superName.toLowerCase()];\n if (superType) {\n Object.keys(superType).forEach(function (prop) { type[prop] = superType[prop]; });\n }\n properties.forEach(function (property) {\n if (property.length > 0) {\n switch (property[0]) {\n case '*':\n // We don't yet support events.\n // If ever allowing to bind to events, GO THROUGH A SECURITY REVIEW, allowing events\n // will\n // almost certainly introduce bad XSS vulnerabilities.\n // type[property.substring(1)] = EVENT;\n break;\n case '!':\n type[property.substring(1)] = BOOLEAN;\n break;\n case '#':\n type[property.substring(1)] = NUMBER;\n break;\n case '%':\n type[property.substring(1)] = OBJECT;\n break;\n default:\n type[property] = STRING;\n }\n }\n });\n });\n return _this;\n }\n DomElementSchemaRegistry.prototype.hasProperty = function (tagName, propName, schemaMetas) {\n if (schemaMetas.some(function (schema) { return schema.name === NO_ERRORS_SCHEMA.name; })) {\n return true;\n }\n if (tagName.indexOf('-') > -1) {\n if (isNgContainer(tagName) || isNgContent(tagName)) {\n return false;\n }\n if (schemaMetas.some(function (schema) { return schema.name === CUSTOM_ELEMENTS_SCHEMA.name; })) {\n // Can't tell now as we don't know which properties a custom element will get\n // once it is instantiated\n return true;\n }\n }\n var elementProperties = this._schema[tagName.toLowerCase()] || this._schema['unknown'];\n return !!elementProperties[propName];\n };\n DomElementSchemaRegistry.prototype.hasElement = function (tagName, schemaMetas) {\n if (schemaMetas.some(function (schema) { return schema.name === NO_ERRORS_SCHEMA.name; })) {\n return true;\n }\n if (tagName.indexOf('-') > -1) {\n if (isNgContainer(tagName) || isNgContent(tagName)) {\n return true;\n }\n if (schemaMetas.some(function (schema) { return schema.name === CUSTOM_ELEMENTS_SCHEMA.name; })) {\n // Allow any custom elements\n return true;\n }\n }\n return !!this._schema[tagName.toLowerCase()];\n };\n /**\n * securityContext returns the security context for the given property on the given DOM tag.\n *\n * Tag and property name are statically known and cannot change at runtime, i.e. it is not\n * possible to bind a value into a changing attribute or tag name.\n *\n * The filtering is white list based. All attributes in the schema above are assumed to have the\n * 'NONE' security context, i.e. that they are safe inert string values. Only specific well known\n * attack vectors are assigned their appropriate context.\n */\n DomElementSchemaRegistry.prototype.securityContext = function (tagName, propName, isAttribute) {\n if (isAttribute) {\n // NB: For security purposes, use the mapped property name, not the attribute name.\n propName = this.getMappedPropName(propName);\n }\n // Make sure comparisons are case insensitive, so that case differences between attribute and\n // property names do not have a security impact.\n tagName = tagName.toLowerCase();\n propName = propName.toLowerCase();\n var ctx = SECURITY_SCHEMA()[tagName + '|' + propName];\n if (ctx) {\n return ctx;\n }\n ctx = SECURITY_SCHEMA()['*|' + propName];\n return ctx ? ctx : SecurityContext.NONE;\n };\n DomElementSchemaRegistry.prototype.getMappedPropName = function (propName) { return _ATTR_TO_PROP[propName] || propName; };\n DomElementSchemaRegistry.prototype.getDefaultComponentElementName = function () { return 'ng-component'; };\n DomElementSchemaRegistry.prototype.validateProperty = function (name) {\n if (name.toLowerCase().startsWith('on')) {\n var msg = \"Binding to event property '\" + name + \"' is disallowed for security reasons, \" +\n (\"please use (\" + name.slice(2) + \")=...\") +\n (\"\\nIf '\" + name + \"' is a directive input, make sure the directive is imported by the\") +\n \" current module.\";\n return { error: true, msg: msg };\n }\n else {\n return { error: false };\n }\n };\n DomElementSchemaRegistry.prototype.validateAttribute = function (name) {\n if (name.toLowerCase().startsWith('on')) {\n var msg = \"Binding to event attribute '\" + name + \"' is disallowed for security reasons, \" +\n (\"please use (\" + name.slice(2) + \")=...\");\n return { error: true, msg: msg };\n }\n else {\n return { error: false };\n }\n };\n DomElementSchemaRegistry.prototype.allKnownElementNames = function () { return Object.keys(this._schema); };\n DomElementSchemaRegistry.prototype.normalizeAnimationStyleProperty = function (propName) {\n return dashCaseToCamelCase(propName);\n };\n DomElementSchemaRegistry.prototype.normalizeAnimationStyleValue = function (camelCaseProp, userProvidedProp, val) {\n var unit = '';\n var strVal = val.toString().trim();\n var errorMsg = null;\n if (_isPixelDimensionStyle(camelCaseProp) && val !== 0 && val !== '0') {\n if (typeof val === 'number') {\n unit = 'px';\n }\n else {\n var valAndSuffixMatch = val.match(/^[+-]?[\\d\\.]+([a-z]*)$/);\n if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {\n errorMsg = \"Please provide a CSS unit value for \" + userProvidedProp + \":\" + val;\n }\n }\n }\n return { error: errorMsg, value: strVal + unit };\n };\n return DomElementSchemaRegistry;\n}(ElementSchemaRegistry));\nfunction _isPixelDimensionStyle(prop) {\n switch (prop) {\n case 'width':\n case 'height':\n case 'minWidth':\n case 'minHeight':\n case 'maxWidth':\n case 'maxHeight':\n case 'left':\n case 'top':\n case 'bottom':\n case 'right':\n case 'fontSize':\n case 'outlineWidth':\n case 'outlineOffset':\n case 'paddingTop':\n case 'paddingLeft':\n case 'paddingBottom':\n case 'paddingRight':\n case 'marginTop':\n case 'marginLeft':\n case 'marginBottom':\n case 'marginRight':\n case 'borderRadius':\n case 'borderWidth':\n case 'borderTopWidth':\n case 'borderLeftWidth':\n case 'borderRightWidth':\n case 'borderBottomWidth':\n case 'textIndent':\n return true;\n default:\n return false;\n }\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 */\nvar PROPERTY_PARTS_SEPARATOR = '.';\nvar ATTRIBUTE_PREFIX = 'attr';\nvar CLASS_PREFIX = 'class';\nvar STYLE_PREFIX = 'style';\nvar ANIMATE_PROP_PREFIX = 'animate-';\n/**\n * Parses bindings in templates and in the directive host area.\n */\nvar BindingParser = /** @class */ (function () {\n function BindingParser(_exprParser, _interpolationConfig, _schemaRegistry, pipes, errors) {\n this._exprParser = _exprParser;\n this._interpolationConfig = _interpolationConfig;\n this._schemaRegistry = _schemaRegistry;\n this.errors = errors;\n this.pipesByName = null;\n this._usedPipes = new Map();\n // When the `pipes` parameter is `null`, do not check for used pipes\n // This is used in IVY when we might not know the available pipes at compile time\n if (pipes) {\n var pipesByName_1 = new Map();\n pipes.forEach(function (pipe) { return pipesByName_1.set(pipe.name, pipe); });\n this.pipesByName = pipesByName_1;\n }\n }\n BindingParser.prototype.getUsedPipes = function () { return Array.from(this._usedPipes.values()); };\n BindingParser.prototype.createBoundHostProperties = function (dirMeta, sourceSpan) {\n var _this = this;\n if (dirMeta.hostProperties) {\n var boundProps_1 = [];\n Object.keys(dirMeta.hostProperties).forEach(function (propName) {\n var expression = dirMeta.hostProperties[propName];\n if (typeof expression === 'string') {\n _this.parsePropertyBinding(propName, expression, true, sourceSpan, [], boundProps_1);\n }\n else {\n _this._reportError(\"Value of the host property binding \\\"\" + propName + \"\\\" needs to be a string representing an expression but got \\\"\" + expression + \"\\\" (\" + typeof expression + \")\", sourceSpan);\n }\n });\n return boundProps_1;\n }\n return null;\n };\n BindingParser.prototype.createDirectiveHostPropertyAsts = function (dirMeta, elementSelector, sourceSpan) {\n var _this = this;\n var boundProps = this.createBoundHostProperties(dirMeta, sourceSpan);\n return boundProps &&\n boundProps.map(function (prop) { return _this.createBoundElementProperty(elementSelector, prop); });\n };\n BindingParser.prototype.createDirectiveHostEventAsts = function (dirMeta, sourceSpan) {\n var _this = this;\n if (dirMeta.hostListeners) {\n var targetEvents_1 = [];\n Object.keys(dirMeta.hostListeners).forEach(function (propName) {\n var expression = dirMeta.hostListeners[propName];\n if (typeof expression === 'string') {\n _this.parseEvent(propName, expression, sourceSpan, [], targetEvents_1);\n }\n else {\n _this._reportError(\"Value of the host listener \\\"\" + propName + \"\\\" needs to be a string representing an expression but got \\\"\" + expression + \"\\\" (\" + typeof expression + \")\", sourceSpan);\n }\n });\n return targetEvents_1;\n }\n return null;\n };\n BindingParser.prototype.parseInterpolation = function (value, sourceSpan) {\n var sourceInfo = sourceSpan.start.toString();\n try {\n var ast = this._exprParser.parseInterpolation(value, sourceInfo, this._interpolationConfig);\n if (ast)\n this._reportExpressionParserErrors(ast.errors, sourceSpan);\n this._checkPipes(ast, sourceSpan);\n return ast;\n }\n catch (e) {\n this._reportError(\"\" + e, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo);\n }\n };\n // Parse an inline template binding. ie `\">`\n BindingParser.prototype.parseInlineTemplateBinding = function (tplKey, tplValue, sourceSpan, targetMatchableAttrs, targetProps, targetVars) {\n var bindings = this._parseTemplateBindings(tplKey, tplValue, sourceSpan);\n for (var i = 0; i < bindings.length; i++) {\n var binding = bindings[i];\n if (binding.keyIsVar) {\n targetVars.push(new ParsedVariable(binding.key, binding.name, sourceSpan));\n }\n else if (binding.expression) {\n this._parsePropertyAst(binding.key, binding.expression, sourceSpan, targetMatchableAttrs, targetProps);\n }\n else {\n targetMatchableAttrs.push([binding.key, '']);\n this.parseLiteralAttr(binding.key, null, sourceSpan, targetMatchableAttrs, targetProps);\n }\n }\n };\n BindingParser.prototype._parseTemplateBindings = function (tplKey, tplValue, sourceSpan) {\n var _this = this;\n var sourceInfo = sourceSpan.start.toString();\n try {\n var bindingsResult = this._exprParser.parseTemplateBindings(tplKey, tplValue, sourceInfo);\n this._reportExpressionParserErrors(bindingsResult.errors, sourceSpan);\n bindingsResult.templateBindings.forEach(function (binding) {\n if (binding.expression) {\n _this._checkPipes(binding.expression, sourceSpan);\n }\n });\n bindingsResult.warnings.forEach(function (warning) { _this._reportError(warning, sourceSpan, ParseErrorLevel.WARNING); });\n return bindingsResult.templateBindings;\n }\n catch (e) {\n this._reportError(\"\" + e, sourceSpan);\n return [];\n }\n };\n BindingParser.prototype.parseLiteralAttr = function (name, value, sourceSpan, targetMatchableAttrs, targetProps) {\n if (isAnimationLabel(name)) {\n name = name.substring(1);\n if (value) {\n this._reportError(\"Assigning animation triggers via @prop=\\\"exp\\\" attributes with an expression is invalid.\" +\n \" Use property bindings (e.g. [@prop]=\\\"exp\\\") or use an attribute without a value (e.g. @prop) instead.\", sourceSpan, ParseErrorLevel.ERROR);\n }\n this._parseAnimation(name, value, sourceSpan, targetMatchableAttrs, targetProps);\n }\n else {\n targetProps.push(new ParsedProperty(name, this._exprParser.wrapLiteralPrimitive(value, ''), ParsedPropertyType.LITERAL_ATTR, sourceSpan));\n }\n };\n BindingParser.prototype.parsePropertyBinding = function (name, expression, isHost, sourceSpan, targetMatchableAttrs, targetProps) {\n var isAnimationProp = false;\n if (name.startsWith(ANIMATE_PROP_PREFIX)) {\n isAnimationProp = true;\n name = name.substring(ANIMATE_PROP_PREFIX.length);\n }\n else if (isAnimationLabel(name)) {\n isAnimationProp = true;\n name = name.substring(1);\n }\n if (isAnimationProp) {\n this._parseAnimation(name, expression, sourceSpan, targetMatchableAttrs, targetProps);\n }\n else {\n this._parsePropertyAst(name, this._parseBinding(expression, isHost, sourceSpan), sourceSpan, targetMatchableAttrs, targetProps);\n }\n };\n BindingParser.prototype.parsePropertyInterpolation = function (name, value, sourceSpan, targetMatchableAttrs, targetProps) {\n var expr = this.parseInterpolation(value, sourceSpan);\n if (expr) {\n this._parsePropertyAst(name, expr, sourceSpan, targetMatchableAttrs, targetProps);\n return true;\n }\n return false;\n };\n BindingParser.prototype._parsePropertyAst = function (name, ast, sourceSpan, targetMatchableAttrs, targetProps) {\n targetMatchableAttrs.push([name, ast.source]);\n targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.DEFAULT, sourceSpan));\n };\n BindingParser.prototype._parseAnimation = function (name, expression, sourceSpan, targetMatchableAttrs, targetProps) {\n // This will occur when a @trigger is not paired with an expression.\n // For animations it is valid to not have an expression since */void\n // states will be applied by angular when the element is attached/detached\n var ast = this._parseBinding(expression || 'undefined', false, sourceSpan);\n targetMatchableAttrs.push([name, ast.source]);\n targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.ANIMATION, sourceSpan));\n };\n BindingParser.prototype._parseBinding = function (value, isHostBinding, sourceSpan) {\n var sourceInfo = (sourceSpan && sourceSpan.start || '(unknown)').toString();\n try {\n var ast = isHostBinding ?\n this._exprParser.parseSimpleBinding(value, sourceInfo, this._interpolationConfig) :\n this._exprParser.parseBinding(value, sourceInfo, this._interpolationConfig);\n if (ast)\n this._reportExpressionParserErrors(ast.errors, sourceSpan);\n this._checkPipes(ast, sourceSpan);\n return ast;\n }\n catch (e) {\n this._reportError(\"\" + e, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo);\n }\n };\n BindingParser.prototype.createBoundElementProperty = function (elementSelector, boundProp) {\n if (boundProp.isAnimation) {\n return new BoundElementProperty(boundProp.name, 4 /* Animation */, SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan);\n }\n var unit = null;\n var bindingType = undefined;\n var boundPropertyName = null;\n var parts = boundProp.name.split(PROPERTY_PARTS_SEPARATOR);\n var securityContexts = undefined;\n // Check check for special cases (prefix style, attr, class)\n if (parts.length > 1) {\n if (parts[0] == ATTRIBUTE_PREFIX) {\n boundPropertyName = parts[1];\n this._validatePropertyOrAttributeName(boundPropertyName, boundProp.sourceSpan, true);\n securityContexts = calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, boundPropertyName, true);\n var nsSeparatorIdx = boundPropertyName.indexOf(':');\n if (nsSeparatorIdx > -1) {\n var ns = boundPropertyName.substring(0, nsSeparatorIdx);\n var name_1 = boundPropertyName.substring(nsSeparatorIdx + 1);\n boundPropertyName = mergeNsAndName(ns, name_1);\n }\n bindingType = 1 /* Attribute */;\n }\n else if (parts[0] == CLASS_PREFIX) {\n boundPropertyName = parts[1];\n bindingType = 2 /* Class */;\n securityContexts = [SecurityContext.NONE];\n }\n else if (parts[0] == STYLE_PREFIX) {\n unit = parts.length > 2 ? parts[2] : null;\n boundPropertyName = parts[1];\n bindingType = 3 /* Style */;\n securityContexts = [SecurityContext.STYLE];\n }\n }\n // If not a special case, use the full property name\n if (boundPropertyName === null) {\n boundPropertyName = this._schemaRegistry.getMappedPropName(boundProp.name);\n securityContexts = calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, boundPropertyName, false);\n bindingType = 0 /* Property */;\n this._validatePropertyOrAttributeName(boundPropertyName, boundProp.sourceSpan, false);\n }\n return new BoundElementProperty(boundPropertyName, bindingType, securityContexts[0], boundProp.expression, unit, boundProp.sourceSpan);\n };\n BindingParser.prototype.parseEvent = function (name, expression, sourceSpan, targetMatchableAttrs, targetEvents) {\n if (isAnimationLabel(name)) {\n name = name.substr(1);\n this._parseAnimationEvent(name, expression, sourceSpan, targetEvents);\n }\n else {\n this._parseRegularEvent(name, expression, sourceSpan, targetMatchableAttrs, targetEvents);\n }\n };\n BindingParser.prototype._parseAnimationEvent = function (name, expression, sourceSpan, targetEvents) {\n var matches = splitAtPeriod(name, [name, '']);\n var eventName = matches[0];\n var phase = matches[1].toLowerCase();\n if (phase) {\n switch (phase) {\n case 'start':\n case 'done':\n var ast = this._parseAction(expression, sourceSpan);\n targetEvents.push(new ParsedEvent(eventName, phase, 1 /* Animation */, ast, sourceSpan));\n break;\n default:\n this._reportError(\"The provided animation output phase value \\\"\" + phase + \"\\\" for \\\"@\" + eventName + \"\\\" is not supported (use start or done)\", sourceSpan);\n break;\n }\n }\n else {\n this._reportError(\"The animation trigger output event (@\" + eventName + \") is missing its phase value name (start or done are currently supported)\", sourceSpan);\n }\n };\n BindingParser.prototype._parseRegularEvent = function (name, expression, sourceSpan, targetMatchableAttrs, targetEvents) {\n // long format: 'target: eventName'\n var _a = __read(splitAtColon(name, [null, name]), 2), target = _a[0], eventName = _a[1];\n var ast = this._parseAction(expression, sourceSpan);\n targetMatchableAttrs.push([name, ast.source]);\n targetEvents.push(new ParsedEvent(eventName, target, 0 /* Regular */, ast, sourceSpan));\n // Don't detect directives for event names for now,\n // so don't add the event name to the matchableAttrs\n };\n BindingParser.prototype._parseAction = function (value, sourceSpan) {\n var sourceInfo = (sourceSpan && sourceSpan.start || '(unknown').toString();\n try {\n var ast = this._exprParser.parseAction(value, sourceInfo, this._interpolationConfig);\n if (ast) {\n this._reportExpressionParserErrors(ast.errors, sourceSpan);\n }\n if (!ast || ast.ast instanceof EmptyExpr) {\n this._reportError(\"Empty expressions are not allowed\", sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo);\n }\n this._checkPipes(ast, sourceSpan);\n return ast;\n }\n catch (e) {\n this._reportError(\"\" + e, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo);\n }\n };\n BindingParser.prototype._reportError = function (message, sourceSpan, level) {\n if (level === void 0) { level = ParseErrorLevel.ERROR; }\n this.errors.push(new ParseError(sourceSpan, message, level));\n };\n BindingParser.prototype._reportExpressionParserErrors = function (errors, sourceSpan) {\n var e_1, _a;\n try {\n for (var errors_1 = __values(errors), errors_1_1 = errors_1.next(); !errors_1_1.done; errors_1_1 = errors_1.next()) {\n var error$$1 = errors_1_1.value;\n this._reportError(error$$1.message, sourceSpan);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (errors_1_1 && !errors_1_1.done && (_a = errors_1.return)) _a.call(errors_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n };\n // Make sure all the used pipes are known in `this.pipesByName`\n BindingParser.prototype._checkPipes = function (ast, sourceSpan) {\n var _this = this;\n if (ast && this.pipesByName) {\n var collector = new PipeCollector();\n ast.visit(collector);\n collector.pipes.forEach(function (ast, pipeName) {\n var pipeMeta = _this.pipesByName.get(pipeName);\n if (!pipeMeta) {\n _this._reportError(\"The pipe '\" + pipeName + \"' could not be found\", new ParseSourceSpan(sourceSpan.start.moveBy(ast.span.start), sourceSpan.start.moveBy(ast.span.end)));\n }\n else {\n _this._usedPipes.set(pipeName, pipeMeta);\n }\n });\n }\n };\n /**\n * @param propName the name of the property / attribute\n * @param sourceSpan\n * @param isAttr true when binding to an attribute\n */\n BindingParser.prototype._validatePropertyOrAttributeName = function (propName, sourceSpan, isAttr) {\n var report = isAttr ? this._schemaRegistry.validateAttribute(propName) :\n this._schemaRegistry.validateProperty(propName);\n if (report.error) {\n this._reportError(report.msg, sourceSpan, ParseErrorLevel.ERROR);\n }\n };\n return BindingParser;\n}());\nvar PipeCollector = /** @class */ (function (_super) {\n __extends(PipeCollector, _super);\n function PipeCollector() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.pipes = new Map();\n return _this;\n }\n PipeCollector.prototype.visitPipe = function (ast, context) {\n this.pipes.set(ast.name, ast);\n ast.exp.visit(this);\n this.visitAll(ast.args, context);\n return null;\n };\n return PipeCollector;\n}(RecursiveAstVisitor$1));\nfunction isAnimationLabel(name) {\n return name[0] == '@';\n}\nfunction calcPossibleSecurityContexts(registry, selector, propName, isAttribute) {\n var ctxs = [];\n CssSelector.parse(selector).forEach(function (selector) {\n var elementNames = selector.element ? [selector.element] : registry.allKnownElementNames();\n var notElementNames = new Set(selector.notSelectors.filter(function (selector) { return selector.isElementSelector(); })\n .map(function (selector) { return selector.element; }));\n var possibleElementNames = elementNames.filter(function (elementName) { return !notElementNames.has(elementName); });\n ctxs.push.apply(ctxs, __spread(possibleElementNames.map(function (elementName) { return registry.securityContext(elementName, propName, isAttribute); })));\n });\n return ctxs.length === 0 ? [SecurityContext.NONE] : Array.from(new Set(ctxs)).sort();\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 */\nvar Text$3 = /** @class */ (function () {\n function Text(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n Text.prototype.visit = function (visitor) { return visitor.visitText(this); };\n return Text;\n}());\nvar BoundText = /** @class */ (function () {\n function BoundText(value, sourceSpan, i18n) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n }\n BoundText.prototype.visit = function (visitor) { return visitor.visitBoundText(this); };\n return BoundText;\n}());\nvar TextAttribute = /** @class */ (function () {\n function TextAttribute(name, value, sourceSpan, valueSpan, i18n) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.valueSpan = valueSpan;\n this.i18n = i18n;\n }\n TextAttribute.prototype.visit = function (visitor) { return visitor.visitTextAttribute(this); };\n return TextAttribute;\n}());\nvar BoundAttribute = /** @class */ (function () {\n function BoundAttribute(name, type, securityContext, value, unit, sourceSpan, i18n) {\n this.name = name;\n this.type = type;\n this.securityContext = securityContext;\n this.value = value;\n this.unit = unit;\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n }\n BoundAttribute.fromBoundElementProperty = function (prop, i18n) {\n return new BoundAttribute(prop.name, prop.type, prop.securityContext, prop.value, prop.unit, prop.sourceSpan, i18n);\n };\n BoundAttribute.prototype.visit = function (visitor) { return visitor.visitBoundAttribute(this); };\n return BoundAttribute;\n}());\nvar BoundEvent = /** @class */ (function () {\n function BoundEvent(name, handler, target, phase, sourceSpan) {\n this.name = name;\n this.handler = handler;\n this.target = target;\n this.phase = phase;\n this.sourceSpan = sourceSpan;\n }\n BoundEvent.fromParsedEvent = function (event) {\n var target = event.type === 0 /* Regular */ ? event.targetOrPhase : null;\n var phase = event.type === 1 /* Animation */ ? event.targetOrPhase : null;\n return new BoundEvent(event.name, event.handler, target, phase, event.sourceSpan);\n };\n BoundEvent.prototype.visit = function (visitor) { return visitor.visitBoundEvent(this); };\n return BoundEvent;\n}());\nvar Element$1 = /** @class */ (function () {\n function Element(name, attributes, inputs, outputs, children, references, sourceSpan, startSourceSpan, endSourceSpan, i18n) {\n this.name = name;\n this.attributes = attributes;\n this.inputs = inputs;\n this.outputs = outputs;\n this.children = children;\n this.references = references;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n this.i18n = i18n;\n }\n Element.prototype.visit = function (visitor) { return visitor.visitElement(this); };\n return Element;\n}());\nvar Template = /** @class */ (function () {\n function Template(attributes, inputs, outputs, children, references, variables, sourceSpan, startSourceSpan, endSourceSpan, i18n) {\n this.attributes = attributes;\n this.inputs = inputs;\n this.outputs = outputs;\n this.children = children;\n this.references = references;\n this.variables = variables;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n this.i18n = i18n;\n }\n Template.prototype.visit = function (visitor) { return visitor.visitTemplate(this); };\n return Template;\n}());\nvar Content = /** @class */ (function () {\n function Content(selectorIndex, attributes, sourceSpan, i18n) {\n this.selectorIndex = selectorIndex;\n this.attributes = attributes;\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n }\n Content.prototype.visit = function (visitor) { return visitor.visitContent(this); };\n return Content;\n}());\nvar Variable = /** @class */ (function () {\n function Variable(name, value, sourceSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n Variable.prototype.visit = function (visitor) { return visitor.visitVariable(this); };\n return Variable;\n}());\nvar Reference = /** @class */ (function () {\n function Reference(name, value, sourceSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n Reference.prototype.visit = function (visitor) { return visitor.visitReference(this); };\n return Reference;\n}());\nvar Icu$1 = /** @class */ (function () {\n function Icu(vars, placeholders, sourceSpan, i18n) {\n this.vars = vars;\n this.placeholders = placeholders;\n this.sourceSpan = sourceSpan;\n this.i18n = i18n;\n }\n Icu.prototype.visit = function (visitor) { return visitor.visitIcu(this); };\n return Icu;\n}());\nfunction visitAll$1(visitor, nodes) {\n var e_1, _a, e_2, _b;\n var result = [];\n if (visitor.visit) {\n try {\n for (var nodes_1 = __values(nodes), nodes_1_1 = nodes_1.next(); !nodes_1_1.done; nodes_1_1 = nodes_1.next()) {\n var node = nodes_1_1.value;\n var newNode = visitor.visit(node) || node.visit(visitor);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (nodes_1_1 && !nodes_1_1.done && (_a = nodes_1.return)) _a.call(nodes_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else {\n try {\n for (var nodes_2 = __values(nodes), nodes_2_1 = nodes_2.next(); !nodes_2_1.done; nodes_2_1 = nodes_2.next()) {\n var node = nodes_2_1.value;\n var newNode = node.visit(visitor);\n if (newNode) {\n result.push(newNode);\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (nodes_2_1 && !nodes_2_1.done && (_b = nodes_2.return)) _b.call(nodes_2);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n return result;\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 */\nvar StyleWithImports = /** @class */ (function () {\n function StyleWithImports(style, styleUrls) {\n this.style = style;\n this.styleUrls = styleUrls;\n }\n return StyleWithImports;\n}());\nfunction isStyleUrlResolvable(url) {\n if (url == null || url.length === 0 || url[0] == '/')\n return false;\n var schemeMatch = url.match(URL_WITH_SCHEMA_REGEXP);\n return schemeMatch === null || schemeMatch[1] == 'package' || schemeMatch[1] == 'asset';\n}\n/**\n * Rewrites stylesheets by resolving and removing the @import urls that\n * are either relative or don't have a `package:` scheme\n */\nfunction extractStyleUrls(resolver, baseUrl, cssText) {\n var foundUrls = [];\n var modifiedCssText = cssText.replace(CSS_STRIPPABLE_COMMENT_REGEXP, '')\n .replace(CSS_IMPORT_REGEXP, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n var url = m[1] || m[2];\n if (!isStyleUrlResolvable(url)) {\n // Do not attempt to resolve non-package absolute URLs with URI\n // scheme\n return m[0];\n }\n foundUrls.push(resolver.resolve(baseUrl, url));\n return '';\n });\n return new StyleWithImports(modifiedCssText, foundUrls);\n}\nvar CSS_IMPORT_REGEXP = /@import\\s+(?:url\\()?\\s*(?:(?:['\"]([^'\"]*))|([^;\\)\\s]*))[^;]*;?/g;\nvar CSS_STRIPPABLE_COMMENT_REGEXP = /\\/\\*(?!#\\s*(?:sourceURL|sourceMappingURL)=)[\\s\\S]+?\\*\\//g;\nvar URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;\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 */\nvar NG_CONTENT_SELECT_ATTR = 'select';\nvar LINK_ELEMENT = 'link';\nvar LINK_STYLE_REL_ATTR = 'rel';\nvar LINK_STYLE_HREF_ATTR = 'href';\nvar LINK_STYLE_REL_VALUE = 'stylesheet';\nvar STYLE_ELEMENT = 'style';\nvar SCRIPT_ELEMENT = 'script';\nvar NG_NON_BINDABLE_ATTR = 'ngNonBindable';\nvar NG_PROJECT_AS = 'ngProjectAs';\nfunction preparseElement(ast) {\n var selectAttr = null;\n var hrefAttr = null;\n var relAttr = null;\n var nonBindable = false;\n var projectAs = '';\n ast.attrs.forEach(function (attr) {\n var lcAttrName = attr.name.toLowerCase();\n if (lcAttrName == NG_CONTENT_SELECT_ATTR) {\n selectAttr = attr.value;\n }\n else if (lcAttrName == LINK_STYLE_HREF_ATTR) {\n hrefAttr = attr.value;\n }\n else if (lcAttrName == LINK_STYLE_REL_ATTR) {\n relAttr = attr.value;\n }\n else if (attr.name == NG_NON_BINDABLE_ATTR) {\n nonBindable = true;\n }\n else if (attr.name == NG_PROJECT_AS) {\n if (attr.value.length > 0) {\n projectAs = attr.value;\n }\n }\n });\n selectAttr = normalizeNgContentSelect(selectAttr);\n var nodeName = ast.name.toLowerCase();\n var type = PreparsedElementType.OTHER;\n if (isNgContent(nodeName)) {\n type = PreparsedElementType.NG_CONTENT;\n }\n else if (nodeName == STYLE_ELEMENT) {\n type = PreparsedElementType.STYLE;\n }\n else if (nodeName == SCRIPT_ELEMENT) {\n type = PreparsedElementType.SCRIPT;\n }\n else if (nodeName == LINK_ELEMENT && relAttr == LINK_STYLE_REL_VALUE) {\n type = PreparsedElementType.STYLESHEET;\n }\n return new PreparsedElement(type, selectAttr, hrefAttr, nonBindable, projectAs);\n}\nvar PreparsedElementType;\n(function (PreparsedElementType) {\n PreparsedElementType[PreparsedElementType[\"NG_CONTENT\"] = 0] = \"NG_CONTENT\";\n PreparsedElementType[PreparsedElementType[\"STYLE\"] = 1] = \"STYLE\";\n PreparsedElementType[PreparsedElementType[\"STYLESHEET\"] = 2] = \"STYLESHEET\";\n PreparsedElementType[PreparsedElementType[\"SCRIPT\"] = 3] = \"SCRIPT\";\n PreparsedElementType[PreparsedElementType[\"OTHER\"] = 4] = \"OTHER\";\n})(PreparsedElementType || (PreparsedElementType = {}));\nvar PreparsedElement = /** @class */ (function () {\n function PreparsedElement(type, selectAttr, hrefAttr, nonBindable, projectAs) {\n this.type = type;\n this.selectAttr = selectAttr;\n this.hrefAttr = hrefAttr;\n this.nonBindable = nonBindable;\n this.projectAs = projectAs;\n }\n return PreparsedElement;\n}());\nfunction normalizeNgContentSelect(selectAttr) {\n if (selectAttr === null || selectAttr.length === 0) {\n return '*';\n }\n return selectAttr;\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 */\nvar BIND_NAME_REGEXP = /^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.+))|\\[\\(([^\\)]+)\\)\\]|\\[([^\\]]+)\\]|\\(([^\\)]+)\\))$/;\n// Group 1 = \"bind-\"\nvar KW_BIND_IDX = 1;\n// Group 2 = \"let-\"\nvar KW_LET_IDX = 2;\n// Group 3 = \"ref-/#\"\nvar KW_REF_IDX = 3;\n// Group 4 = \"on-\"\nvar KW_ON_IDX = 4;\n// Group 5 = \"bindon-\"\nvar KW_BINDON_IDX = 5;\n// Group 6 = \"@\"\nvar KW_AT_IDX = 6;\n// Group 7 = the identifier after \"bind-\", \"let-\", \"ref-/#\", \"on-\", \"bindon-\" or \"@\"\nvar IDENT_KW_IDX = 7;\n// Group 8 = identifier inside [()]\nvar IDENT_BANANA_BOX_IDX = 8;\n// Group 9 = identifier inside []\nvar IDENT_PROPERTY_IDX = 9;\n// Group 10 = identifier inside ()\nvar IDENT_EVENT_IDX = 10;\nvar TEMPLATE_ATTR_PREFIX = '*';\n// Default selector used by `` if none specified\nvar DEFAULT_CONTENT_SELECTOR = '*';\nfunction htmlAstToRender3Ast(htmlNodes, bindingParser) {\n var transformer = new HtmlAstToIvyAst(bindingParser);\n var ivyNodes = visitAll(transformer, htmlNodes);\n // Errors might originate in either the binding parser or the html to ivy transformer\n var allErrors = bindingParser.errors.concat(transformer.errors);\n var errors = allErrors.filter(function (e) { return e.level === ParseErrorLevel.ERROR; });\n if (errors.length > 0) {\n var errorString = errors.join('\\n');\n throw syntaxError(\"Template parse errors:\\n\" + errorString, errors);\n }\n return {\n nodes: ivyNodes,\n errors: allErrors,\n ngContentSelectors: transformer.ngContentSelectors,\n hasNgContent: transformer.hasNgContent,\n };\n}\nvar HtmlAstToIvyAst = /** @class */ (function () {\n function HtmlAstToIvyAst(bindingParser) {\n this.bindingParser = bindingParser;\n this.errors = [];\n // Selectors for the `ng-content` tags. Only non `*` selectors are recorded here\n this.ngContentSelectors = [];\n // Any `` in the template ?\n this.hasNgContent = false;\n }\n // HTML visitor\n HtmlAstToIvyAst.prototype.visitElement = function (element) {\n var _this = this;\n var e_1, _a;\n var preparsedElement = preparseElement(element);\n if (preparsedElement.type === PreparsedElementType.SCRIPT ||\n preparsedElement.type === PreparsedElementType.STYLE) {\n // Skipping