From f8aca6af51278569eaeede6fef067da57d1e95eb Mon Sep 17 00:00:00 2001 From: Vlado Tesanovic Date: Sun, 22 May 2016 22:11:05 +0200 Subject: [PATCH] Angular rc.1 SystemJs builder --- .gitignore | 1 + LICENSE | 2 +- app.js | 15 ++++---- app/components/app.component.css | 2 +- app/components/app.component.html | 6 ++- app/components/app.component.ts | 14 +++++-- app/constants/ApplicationConstants.ts | 6 +-- app/main.ts | 10 +++-- bin/bundler.js | 16 ++++++++ package.json | 38 ++++++++++--------- public/css/style.css | 10 +++++ public/index.html | 13 +++++-- public/js/bundle.min.js | 16 ++++++++ public/{javascripts => js}/systemjs.config.js | 25 ++++-------- public/stylesheets/style.css | 8 ---- readme.md | 5 ++- routes/users.js | 4 +- tsconfig.json | 9 +---- typings.json | 7 ++-- 19 files changed, 127 insertions(+), 80 deletions(-) create mode 100644 bin/bundler.js create mode 100644 public/css/style.css create mode 100644 public/js/bundle.min.js rename public/{javascripts => js}/systemjs.config.js (67%) delete mode 100644 public/stylesheets/style.css diff --git a/.gitignore b/.gitignore index 8ec5123..0c2ee4c 100755 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ node_modules app/**/*.js +app/**/*.js.map typings npm-debug.log public/ng2 diff --git a/LICENSE b/LICENSE index d0d4964..f2fa12a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 Vlado Tesanovic +Copyright (c) 2016 Vlado Tesanovic Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/app.js b/app.js index 9300a28..a5964a9 100755 --- a/app.js +++ b/app.js @@ -9,21 +9,21 @@ var users = require('./routes/users'); var app = express(); -// view engine setup -// app.set('views', path.join(__dirname, 'views')); -// app.set('view engine', 'jade'); - // expose node_modules to client app app.use(express.static(__dirname + "/node_modules")); // uncomment after placing your favicon in /public -//app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))); +// app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))); app.use(logger('dev')); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); app.use(cookieParser()); + +// Do we need this? app.use(require('stylus').middleware(path.join(__dirname, 'public'))); + app.use(express.static(path.join(__dirname, 'public'))); +app.use(express.static(path.join(__dirname, 'app'))); app.use('/users', users); @@ -35,13 +35,12 @@ app.use(function(req, res, next) { }); // error handlers - // development error handler // will print stacktrace if (app.get('env') === 'development') { app.use(function(err, req, res, next) { res.status(err.status || 500); - res.render('error', { + res.json({ message: err.message, error: err }); @@ -52,7 +51,7 @@ if (app.get('env') === 'development') { // no stacktraces leaked to user app.use(function(err, req, res, next) { res.status(err.status || 500); - res.render('error', { + res.json({ message: err.message, error: {} }); diff --git a/app/components/app.component.css b/app/components/app.component.css index 3c47381..007e54f 100644 --- a/app/components/app.component.css +++ b/app/components/app.component.css @@ -1,5 +1,5 @@ h1 { color: white; - background: darkred; + background: darkgray; padding: 20px; } \ No newline at end of file diff --git a/app/components/app.component.html b/app/components/app.component.html index e5b1605..7ab2e97 100644 --- a/app/components/app.component.html +++ b/app/components/app.component.html @@ -1 +1,5 @@ -

My First {{name}} app

\ No newline at end of file +

My First {{name}} app

+ +
Response from server: /users
+
{{ ( users | async)?.name }}
+
{{ ( users | async)?.last }}
\ No newline at end of file diff --git a/app/components/app.component.ts b/app/components/app.component.ts index 7dc88ff..9a8d456 100755 --- a/app/components/app.component.ts +++ b/app/components/app.component.ts @@ -1,11 +1,17 @@ -import {Component} from '@angular/core'; -import { ApplicationConstants } from '../constants/ApplicationConstants'; +import { Component } from '@angular/core'; +import { Http } from "@angular/http"; +import 'rxjs/add/operator/map'; @Component({ selector: 'my-app', - templateUrl: ApplicationConstants.BASE_TEMPLATE_PATH + 'components/app.component.html', - styleUrls: [ApplicationConstants.BASE_TEMPLATE_PATH + 'components/app.component.css'] + templateUrl: 'components/app.component.html', + styleUrls: ['components/app.component.css'] }) export class AppComponent { name: string = "Angular 2 on Express"; + users: {}; + + constructor(http: Http) { + this.users = http.get("/users").map(data => data.json()); + } } \ No newline at end of file diff --git a/app/constants/ApplicationConstants.ts b/app/constants/ApplicationConstants.ts index 38d378e..3d949f8 100755 --- a/app/constants/ApplicationConstants.ts +++ b/app/constants/ApplicationConstants.ts @@ -1,5 +1,5 @@ export class ApplicationConstants { - - public static get BASE_TEMPLATE_PATH(): string { return 'ng2/'; } - + public static get BASE_TEMPLATE_PATH(): string { + return 'ng2/'; + } } \ No newline at end of file diff --git a/app/main.ts b/app/main.ts index 8b7dd9a..7e4c38e 100644 --- a/app/main.ts +++ b/app/main.ts @@ -1,4 +1,8 @@ -import {bootstrap} from '@angular/platform-browser-dynamic'; -import {AppComponent} from './components/app.component' +import { bootstrap } from '@angular/platform-browser-dynamic'; +import { AppComponent } from './components/app.component' +import { Type } from '@angular/core'; +import { HTTP_PROVIDERS } from "@angular/http"; -bootstrap(AppComponent); \ No newline at end of file +bootstrap(AppComponent, [ + HTTP_PROVIDERS +]); \ No newline at end of file diff --git a/bin/bundler.js b/bin/bundler.js new file mode 100644 index 0000000..7dd4a32 --- /dev/null +++ b/bin/bundler.js @@ -0,0 +1,16 @@ +var SystemBuilder = require('systemjs-builder'); +var argv = require('yargs').argv; +var builder = new SystemBuilder(); + +builder.loadConfig('./public/js/systemjs.config.js') + .then(function(){ + var outputFile = argv.prod ? './public/js/bundle.min.js' : './public/js/bundle.js'; + return builder.buildStatic('app', outputFile, { + minify: argv.prod, + mangle: argv.prod, + rollup: argv.prod + }); + }) + .then(function() { + console.log('bundle built successfully!'); + }); \ No newline at end of file diff --git a/package.json b/package.json index 76520d9..bb29a3d 100644 --- a/package.json +++ b/package.json @@ -4,38 +4,42 @@ "private": true, "scripts": { "start": "concurrently \"tsc -w\" \"node ./bin/www\" ", - "postinstall": "typings install && tsc" + "postinstall": "typings install && tsc && npm run bundle:prod", + "tsc": "tsc", + "tsc:w": "tsc -w", + "typings": "typings install", + "bundle": "node bin/bundler.js", + "bundle:prod": "node bin/bundler.js --prod" }, "dependencies": { "body-parser": "~1.13.2", "cookie-parser": "~1.3.5", "debug": "~2.2.0", "express": "~4.13.1", - "jade": "~1.11.0", "morgan": "~1.6.1", "serve-favicon": "~2.3.0", "stylus": "0.42.3", - "@angular/common": "2.0.0-rc.1", - "@angular/compiler": "2.0.0-rc.1", - "@angular/core": "2.0.0-rc.1", - "@angular/http": "2.0.0-rc.1", - "@angular/platform-browser": "2.0.0-rc.1", - "@angular/platform-browser-dynamic": "2.0.0-rc.1", - "@angular/router": "2.0.0-rc.1", - "@angular/router-deprecated": "2.0.0-rc.1", - "@angular/upgrade": "2.0.0-rc.1", - + "@angular/common": "2.0.0-rc.1", + "@angular/compiler": "2.0.0-rc.1", + "@angular/core": "2.0.0-rc.1", + "@angular/http": "2.0.0-rc.1", + "@angular/platform-browser": "2.0.0-rc.1", + "@angular/platform-browser-dynamic": "2.0.0-rc.1", + "@angular/router": "2.0.0-rc.1", + "@angular/router-deprecated": "2.0.0-rc.1", + "@angular/upgrade": "2.0.0-rc.1", "systemjs": "0.19.27", "core-js": "^2.4.0", "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-beta.6", "zone.js": "^0.6.6", - - "angular2-in-memory-web-api": "0.0.9", - "typings": "^0.6.8", - "typescript": "^1.8.0" + "angular2-in-memory-web-api": "0.0.9" }, "devDependencies": { - "concurrently": "^2.0.0" + "concurrently": "^2.0.0", + "systemjs-builder": "^0.15.17", + "typescript": "^1.8.10", + "typings": "^0.8.1", + "yargs": "^4.7.1" } } diff --git a/public/css/style.css b/public/css/style.css new file mode 100644 index 0000000..c5a90f6 --- /dev/null +++ b/public/css/style.css @@ -0,0 +1,10 @@ +@import url(https://fonts.googleapis.com/css?family=Source+Code+Pro); + +body { + padding: 50px; + font-family: 'Source Code Pro', serif; +} + +a { + color: #00B7FF; +} diff --git a/public/index.html b/public/index.html index 8bbee24..2b5fc4a 100755 --- a/public/index.html +++ b/public/index.html @@ -3,7 +3,7 @@ Angular 2 QuickStart - + @@ -11,8 +11,11 @@ + Loading... + + + diff --git a/public/js/bundle.min.js b/public/js/bundle.min.js new file mode 100644 index 0000000..1210b21 --- /dev/null +++ b/public/js/bundle.min.js @@ -0,0 +1,16 @@ +!function(a){function b(a,b,e){return 4===arguments.length?c.apply(this,arguments):void d(a,{declarative:!0,deps:b,declare:e})}function c(a,b,c,e){d(a,{declarative:!1,deps:b,executingRequire:c,execute:e})}function d(a,b){b.name=a,a in o||(o[a]=b),b.normalizedDeps=b.deps}function e(a,b){if(b[a.groupIndex]=b[a.groupIndex]||[],-1==p.call(b[a.groupIndex],a)){b[a.groupIndex].push(a);for(var c=0,d=a.normalizedDeps.length;d>c;c++){var f=a.normalizedDeps[c],g=o[f];if(g&&!g.evaluated){var h=a.groupIndex+(g.declarative!=a.declarative);if(void 0===g.groupIndex||g.groupIndex=0;f--){for(var g=c[f],i=0;if;f++){var h=c.importers[f];if(!h.locked)for(var i=0;if;f++){var j,k=b.normalizedDeps[f],l=o[k],m=t[k];m?j=m.exports:l&&!l.declarative?j=l.esModule:l?(h(l),m=l.module,j=m.exports):j=n(k),m&&m.importers?(m.importers.push(c),c.dependencies.push(m)):c.dependencies.push(null),c.setters[f]&&c.setters[f](j)}}}function i(a){var b,c=o[a];if(c)c.declarative?m(a,[]):c.evaluated||j(c),b=c.module.exports;else if(b=n(a),!b)throw new Error("Unable to load dependency "+a+".");return(!c||c.declarative)&&b&&b.__useDefault?b["default"]:b}function j(b){if(!b.module){var c={},d=b.module={exports:c,id:b.name};if(!b.executingRequire)for(var e=0,f=b.normalizedDeps.length;f>e;e++){var g=b.normalizedDeps[e],h=o[g];h&&j(h)}b.evaluated=!0;var l=b.execute.call(a,function(a){for(var c=0,d=b.deps.length;d>c;c++)if(b.deps[c]==a)return i(b.normalizedDeps[c]);throw new TypeError("Module "+a+" not declared as a dependency.")},c,d);l&&(d.exports=l),c=d.exports,c&&c.__esModule?b.esModule=c:b.esModule=k(c)}}function k(b){var c={};if(("object"==typeof b||"function"==typeof b)&&b!==a)if(q)for(var d in b)"default"!==d&&l(c,b,d);else{var e=b&&b.hasOwnProperty;for(var d in b)"default"===d||e&&!b.hasOwnProperty(d)||(c[d]=b[d])}return c["default"]=b,s(c,"__useDefault",{value:!0}),c}function l(a,b,c){try{var d;(d=Object.getOwnPropertyDescriptor(b,c))&&s(a,c,d)}catch(e){return a[c]=b[c],!1}}function m(b,c){var d=o[b];if(d&&!d.evaluated&&d.declarative){c.push(b);for(var e=0,f=d.normalizedDeps.length;f>e;e++){var g=d.normalizedDeps[e];-1==p.call(c,g)&&(o[g]?m(g,c):n(g))}d.evaluated||(d.evaluated=!0,d.module.execute.call(a))}}function n(a){if(v[a])return v[a];if("@node/"==a.substr(0,6))return u(a.substr(6));var b=o[a];if(!b)throw"Module "+a+" not present.";return f(a),m(a,[]),o[a]=void 0,b.declarative&&s(b.module.exports,"__esModule",{value:!0}),v[a]=b.declarative?b.module.exports:b.esModule}var o={},p=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},q=!0;try{Object.getOwnPropertyDescriptor({a:0},"a")}catch(r){q=!1}var s;!function(){try{Object.defineProperty({},"a",{})&&(s=Object.defineProperty)}catch(a){s=function(a,b,c){try{a[b]=c.value||c.get.call(a)}catch(d){}}}}();var t={},u="undefined"!=typeof System&&System._nodeRequire||"undefined"!=typeof require&&require.resolve&&"undefined"!=typeof process&&require,v={"@empty":{}};return function(a,d,e,f){return function(g){g(function(g){for(var h={_nodeRequire:u,register:b,registerDynamic:c,get:n,set:function(a,b){v[a]=b},newModule:function(a){return a}},i=0;i1)for(var i=1;ib;b++)if(this[b]===a)return b;return-1},h=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,i="(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])",j="\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)",k=/\(([^\)]*)\)/,l=/^\s+|\s+$/g,m={};e.amd={};var n={isBundle:!1,anonDefine:null};f.amdDefine=e,f.amdRequire=d}("undefined"!=typeof self?self:global),function(){var e=a.amdDefine,f=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};!function(a,f){"object"==typeof c&&"undefined"!=typeof d?f(c,b("@angular/core"),b("rxjs/Subject"),b("rxjs/observable/PromiseObservable"),b("rxjs/operator/toPromise"),b("rxjs/Observable")):"function"==typeof e&&e.amd?e("2",["exports","3","4","5","6","7"],f):f((a.ng=a.ng||{},a.ng.compiler=a.ng.compiler||{}),a.ng.core,a.Rx,a.Rx,a.Rx.Observable.prototype,a.Rx)}(this,function(a,b,c,d,e,g){"use strict";function h(){return Uc}function i(a){return void 0!==a&&null!==a}function j(a){return void 0===a||null===a}function k(a){return"boolean"==typeof a}function l(a){return"number"==typeof a}function m(a){return"string"==typeof a}function n(a){return"object"==typeof a&&null!==a}function o(a){return n(a)&&Object.getPrototypeOf(a)===Vc}function p(a){return Array.isArray(a)}function q(){}function r(a){if("string"==typeof a)return a;if(void 0===a||null===a)return""+a;if(a.name)return a.name;if(a.overriddenName)return a.overriddenName;var b=a.toString(),c=b.indexOf("\n");return-1===c?b:b.substring(0,c)}function s(a){return a}function t(a,b){return a[b]}function u(a){return j(a)?null:a}function v(a){return j(a)?!1:a}function w(a){return null!==a&&("function"==typeof a||"object"==typeof a)}function x(a,b,c,d){var e=c+"\nreturn "+b+"\n//# sourceURL="+a,f=[],g=[];for(var h in d)f.push(h),g.push(d[h]);return(new(Function.bind.apply(Function,[void 0].concat(f.concat(e))))).apply(void 0,g)}function y(a){return!w(a)}function z(a,b,c){void 0===c&&(c=null);var d=[];return b.forEach(function(b){var e=b.visit(a,c);i(e)&&d.push(e)}),d}function A(a,b){if(i(a))for(var c=0;c=Je&&Oe>=a||a==Gf}function J(a){return a>=uf&&Cf>=a||a>=lf&&nf>=a||a==sf||a==Se}function K(a){if(0==a.length)return!1;var b=new If(a);if(!J(b.peek))return!1;for(b.advance();b.peek!==Ie;){if(!L(b.peek))return!1;b.advance()}return!0}function L(a){return a>=uf&&Cf>=a||a>=lf&&nf>=a||a>=jf&&kf>=a||a==sf||a==Se}function M(a){return a>=jf&&kf>=a}function N(a){return a==vf||a==mf}function O(a){return a==_e||a==Ze}function P(a){return a===Ve||a===Qe||a===tf}function Q(a){switch(a){case xf:return Ke;case wf:return Me;case yf:return Ne;case zf:return Je;case Bf:return Le;default:return a}}function R(a,b,c){void 0===c&&(c=null);var d=[];return b.forEach(function(b){var e=b.visit(a,c);i(e)&&d.push(e)}),d}function S(a){var b=fg[a.toLowerCase()];return i(b)?b:gg}function T(a){if("@"!=a[0])return[null,a];var b=$c.firstMatch(hg,a);return[b[1],b[2]]}function U(a){return T(a)[0]}function V(a,b){return i(a)?"@"+a+":"+b:b}function W(a,b,c){return void 0===c&&(c=!1),new Ug(new $f(a,b),c).tokenize()}function X(a){var b=a===lg?"EOF":Wc.fromCharCode(a);return'Unexpected character "'+b+'"'}function Y(a){return'Unknown entity "'+a+'" - use the "&#;" or "&#x;" syntax'}function Z(a){return!$(a)||a===lg}function $(a){return a>=mg&&pg>=a||a===Rg}function _(a){return $(a)||a===Dg||a===wg||a===ug||a===rg||a===Cg}function aa(a){return(Ng>a||a>Pg)&&(Jg>a||a>Mg)&&(xg>a||a>zg)}function ba(a){return a==yg||a==lg||!fa(a)}function ca(a){return a==yg||a==lg||!ea(a)}function da(a,b){return a===Gg&&b!=Gg}function ea(a){return a>=Ng&&Pg>=a||a>=Jg&&Mg>=a}function fa(a){return a>=Ng&&Og>=a||a>=Jg&&Kg>=a||a>=xg&&zg>=a}function ga(a,b){return ha(a)==ha(b)}function ha(a){return a>=Ng&&Pg>=a?a-Ng+Jg:a}function ia(a){for(var b,c=[],d=0;d0&&a[a.length-1]===b}function la(a){var b=null,c=null,d=null,e=!1,f=null;a.attrs.forEach(function(a){var g=a.name.toLowerCase();g==eh?b=a.value:g==ih?c=a.value:g==hh?d=a.value:a.name==mh?e=!0:a.name==nh&&a.value.length>0&&(f=a.value)}),b=ma(b);var g=a.name.toLowerCase(),h=Yg.OTHER;return T(g)[1]==fh?h=Yg.NG_CONTENT:g==kh?h=Yg.STYLE:g==lh?h=Yg.SCRIPT:g==gh&&d==jh&&(h=Yg.STYLESHEET),new oh(h,b,c,e,f)}function ma(a){return j(a)||0===a.length?"*":a}function na(a){if(j(a)||0===a.length||"/"==a[0])return!1;var b=$c.firstMatch(rh,a);return j(b)||"package"==b[1]||"asset"==b[1]}function oa(a,b,c){var d=[],e=Wc.replaceAllMapped(c,qh,function(c){var e=i(c[1])?c[1]:c[2];return na(e)?(d.push(a.resolve(b,e)),""):c[0]});return new ph(e,d)}function pa(a){return Wc.replaceAllMapped(a,th,function(a){return"-"+a[1].toLowerCase()})}function qa(a,b){var c=Wc.split(a.trim(),/\s*:\s*/g);return c.length>1?c:b}function ra(a){return Wc.replaceAll(a,/\W/g,"_")}function sa(a,b,c){return p(a)?b.visitArray(a,c):o(a)?b.visitStringMap(a,c):j(a)||y(a)?b.visitPrimitive(a,c):b.visitOther(a,c)}function ta(a,b,c){return void 0===b&&(b=null),void 0===c&&(c="src"),Rc?null==b?"asset:angular2/"+a+"/"+a+".dart":"asset:angular2/lib/"+a+"/src/"+b+".dart":null==b?"asset:@angular/lib/"+a+"/index":"asset:@angular/lib/"+a+"/src/"+b}function ua(){return new xh(vh)}function va(a){var b=xa(a);return b&&b[yh.Scheme]||""}function wa(a,b,c,d,e,f,g){var h=[];return i(a)&&h.push(a+":"),i(c)&&(h.push("//"),i(b)&&h.push(b+"@"),h.push(c),i(d)&&h.push(":"+d)),i(e)&&h.push(e),i(f)&&h.push("?"+f),i(g)&&h.push("#"+g),h.join("")}function xa(a){return $c.firstMatch(zh,a)}function ya(a){if("/"==a)return"/";for(var b="/"==a[0]?"/":"",c="/"===a[a.length-1]?"/":"",d=a.split("/"),e=[],f=0,g=0;g0?e.pop():f++;break;default:e.push(h)}}if(""==b){for(;f-- >0;)e.unshift("..");0===e.length&&e.push(".")}return b+e.join("/")+c}function za(a){var b=a[yh.Path];return b=j(b)?"":ya(b),a[yh.Path]=b,wa(a[yh.Scheme],a[yh.UserInfo],a[yh.Domain],a[yh.Port],b,a[yh.QueryData],a[yh.Fragment])}function Aa(a,b){var c=xa(encodeURI(b)),d=xa(a);if(i(c[yh.Scheme]))return za(c);c[yh.Scheme]=d[yh.Scheme];for(var e=yh.Scheme;e<=yh.Port;e++)j(c[e])&&(c[e]=d[e]);if("/"==c[yh.Path][0])return za(c);var f=d[yh.Path];j(f)&&(f="/");var g=f.lastIndexOf("/");return f=f.substring(0,g+1)+c[yh.Path],c[yh.Path]=f,za(c)}function Ba(a){return Oh[a["class"]](a)}function Ca(a,c){var d=ah.parse(c)[0].getMatchingElementTemplate();return Mh.create({type:new Jh({runtime:Object,name:a.name+"_Host",moduleUrl:a.moduleUrl,isHost:!0}),template:new Lh({template:d,templateUrl:"",styles:[],styleUrls:[],ngContentSelectors:[]}),changeDetection:b.ChangeDetectionStrategy.Default,inputs:[],outputs:[],host:{},lifecycleHooks:[],isComponent:!0,selector:"*",providers:[],viewProviders:[],queries:[],viewQueries:[]})}function Da(a,b){return j(a)?null:a.map(function(a){return Fa(a,b)})}function Ea(a){return j(a)?null:a.map(Ga)}function Fa(a,b){return p(a)?Da(a,b):m(a)||j(a)||k(a)||l(a)?a:b(a)}function Ga(a){return p(a)?Ea(a):m(a)||j(a)||k(a)||l(a)?a:a.toJson()}function Ha(a){return i(a)?a:[]}function Ia(a){return new Hh({identifier:a})}function Ja(a,b){var c=b.useExisting,d=b.useValue,e=b.deps;return new Fh({token:a.token,useClass:a.useClass,useExisting:c,useFactory:a.useFactory,useValue:d,deps:e,multi:a.multi})}function Ka(a,b){var c=b.eager,d=b.providers;return new md(a.token,a.multiProvider,a.eager||c,d,a.providerType,a.sourceSpan)}function La(a,b,c,d){return void 0===d&&(d=null),j(d)&&(d=[]),i(a)&&a.forEach(function(a){if(p(a))La(a,b,c,d);else{var e;a instanceof Fh?e=a:a instanceof Jh?e=new Fh({token:new Hh({identifier:a}),useClass:a}):c.push(new ui("Unknown provider type "+a,b)),i(e)&&d.push(e)}}),d}function Ma(b,c,d){var e=new Ih;b.forEach(function(b){var f=new Fh({token:new Hh({identifier:b.type}),useClass:b.type});Na([f],b.isComponent?a.ProviderAstType.Component:a.ProviderAstType.Directive,!0,c,d,e)});var f=b.filter(function(a){return a.isComponent}).concat(b.filter(function(a){return!a.isComponent}));return f.forEach(function(b){Na(La(b.providers,c,d),a.ProviderAstType.PublicService,!1,c,d,e),Na(La(b.viewProviders,c,d),a.ProviderAstType.PrivateService,!1,c,d,e)}),e}function Na(a,b,c,d,e,f){a.forEach(function(a){var g=f.get(a.token);i(g)&&g.multiProvider!==a.multi&&e.push(new ui("Mixing multi and non multi provider is not possible for token "+g.token.name,d)),j(g)?(g=new md(a.token,a.multi,c,[a],b,d),f.add(a.token,g)):(a.multi||de.clear(g.providers),g.providers.push(a))})}function Oa(a){var b=new Ih;return i(a.viewQueries)&&a.viewQueries.forEach(function(a){return Qa(b,a)}),a.type.diDeps.forEach(function(a){i(a.viewQuery)&&Qa(b,a.viewQuery)}),b}function Pa(a){var b=new Ih;return a.forEach(function(a){i(a.queries)&&a.queries.forEach(function(a){return Qa(b,a)}),a.type.diDeps.forEach(function(a){i(a.query)&&Qa(b,a.query)})}),b}function Qa(a,b){b.selectors.forEach(function(c){var d=a.get(c);j(d)&&(d=[],a.add(c,d)),d.push(b)})}function Ra(a){return Wc.split(a.trim(),/\s+/g)}function Sa(a,b){var c=new ah,d=T(a)[1];c.setElement(d);for(var e=0;e0;c||b.push(a)}),b}function Ua(a,b,c){var d=new Wj(a,b);return c.visitExpression(d,null)}function Va(a){var b=new Xj;return b.visitAllStatements(a,null),b.varNames}function Wa(a,b){return void 0===b&&(b=null),new kj(a,b)}function Xa(a,b){return void 0===b&&(b=null),new tj(a,null,b)}function Ya(a,b,c){return void 0===b&&(b=null),void 0===c&&(c=null),i(a)?new _i(a,b,c):null}function Za(a,b){return void 0===b&&(b=null),new sj(a,b)}function $a(a,b){return void 0===b&&(b=null),new Cj(a,b)}function _a(a,b){return void 0===b&&(b=null),new Dj(a,b)}function ab(a){return new vj(a)}function bb(a,b,c){return void 0===c&&(c=null),new yj(a,b,c)}function cb(a){return a.dependencies.forEach(function(a){a.factoryPlaceholder.moduleUrl=eb(a.comp)}),a.statements}function db(a,b){var c=hb(a)[1];return b.dependencies.forEach(function(a){a.valuePlaceholder.moduleUrl=fb(a.moduleUrl,a.isShimmed,c)}),b.statements}function eb(a){var b=hb(a.type.moduleUrl);return b[0]+".ngfactory"+b[1]}function fb(a,b,c){return b?a+".shim"+c:""+a+c}function gb(a){if(!a.isComponent)throw new ge("Could not compile '"+a.type.name+"' because it is not a component.")}function hb(a){var b=a.lastIndexOf(".");return-1!==b?[a.substring(0,b),a.substring(b)]:[a,""]}function ib(a){return Wc.replaceAllMapped(a,uk,function(a){return""})}function jb(a,b){var c=kb(a),d=0;return Wc.replaceAllMapped(c.escapedString,vk,function(a){var e=a[2],f="",g=a[4],h="";i(a[4])&&a[4].startsWith("{"+zk)&&(f=c.blocks[d++],g=a[4].substring(zk.length+1),h="{");var j=b(new Ak(e,f));return""+a[1]+j.selector+a[3]+h+j.content+g})}function kb(a){for(var b=Wc.split(a,wk),c=[],d=[],e=0,f=[],g=0;g0?f.push(h):(f.length>0&&(d.push(f.join("")),c.push(zk),f=[]),c.push(h)),h==xk&&e++}return f.length>0&&(d.push(f.join("")),c.push(zk)),new Bk(c.join(""),d)}function lb(a){var b="styles";return i(a)&&(b+="_"+a.type.name),b}function mb(a,b){if(j(b))return Gj;var c=t(a.runtime,b);return Xa(new Dh({name:a.name+"."+c,moduleUrl:a.moduleUrl,runtime:b}))}function nb(a,b,c){if(b===c)return a;for(var d=Ej,e=b;e!==c&&i(e.declarationElement.view);)e=e.declarationElement.view,d=d.prop("parent");if(e!==c)throw new ge("Internal error: Could not calculate a property in a parent view: "+a);if(a instanceof Aj){var f=a;(c.fields.some(function(a){return a.name==f.name})||c.getters.some(function(a){return a.name==f.name}))&&(d=d.cast(c.classType))}return Ua(Ej.name,d,a)}function ob(a,b){var c=[qb(a)];return b&&c.push(Gj),Ej.prop("parentInjector").callMethod("get",c)}function pb(a,b){return"viewFactory_"+a.type.name+b}function qb(a){return i(a.value)?Za(a.value):a.identifierIsInstance?Xa(a.identifier).instantiate([],Ya(a.identifier,[],[Li.Const])):Xa(a.identifier)}function rb(a){for(var b=[],c=$a([]),d=0;d0&&(c=c.callMethod(jj.ConcatArray,[$a(b)]),b=[]),c=c.callMethod(jj.ConcatArray,[e])):b.push(e)}return b.length>0&&(c=c.callMethod(jj.ConcatArray,[$a(b)])),c}function sb(a,b,c,d){d.fields.push(new Nj(c.name,null));var e=b0?Za(a).lowerEquals(Pk.requestNodeIndex).and(Pk.requestNodeIndex.lowerEquals(Za(a+b))):Za(a).identical(Pk.requestNodeIndex),new Rj(Pk.token.identical(qb(c.token)).and(e),[new Lj(d)])}function yb(a,b,c,d,e,f){var g,h,i=f.view;if(d?(g=$a(c),h=new aj(cj)):(g=c[0],h=c[0].type),j(h)&&(h=cj),e)i.fields.push(new Nj(a,h)),i.createMethod.addStmt(Ej.prop(a).set(g).toStmt());else{var k="_"+a;i.fields.push(new Nj(k,h));var l=new Wk(i);l.resetDebugInfo(f.nodeIndex,f.sourceAst),l.addStmt(new Rj(Ej.prop(k).isBlank(),[Ej.prop(k).set(g).toStmt()])),l.addStmt(new Lj(Ej.prop(k))),i.getters.push(new Pj(a,l.finish(),h))}return Ej.prop(a)}function zb(a){return sa(a,new $k,null)}function Ab(a,b){for(var c=null,d=a.pipeMetas.length-1;d>=0;d--){var e=a.pipeMetas[d];if(e.name==b){c=e;break}}if(j(c))throw new ge("Illegal state: Could not find pipe "+b+" although the parser should have detected this error!");return c}function Bb(a,b){return b>0?yd.EMBEDDED:a.type.isHost?yd.HOST:yd.COMPONENT}function Cb(a,b,c){var d=new il(a,c);return z(d,b,a.declarationElement.isNull()?a.declarationElement:a.declarationElement.parent),d.nestedViewCount}function Db(a,b){a.afterNodes(),Ib(a,b),a.nodes.forEach(function(a){a instanceof Yk&&a.hasEmbeddedView&&Db(a.embeddedView,b)})}function Eb(a,b){var c={};return ce.forEach(a,function(a,b){c[b]=a}),b.forEach(function(a){ce.forEach(a.hostAttributes,function(a,b){var d=c[b];c[b]=i(d)?Gb(b,d,a):a})}),Hb(c)}function Fb(a){var b={};return a.forEach(function(a){b[a.name]=a.value}),b}function Gb(a,b,c){return a==dl||a==el?b+" "+c:c}function Hb(a){var b=[];ce.forEach(a,function(a,c){b.push([c,a])}),de.sort(b,function(a,b){return Wc.compare(a[0],b[0])});var c=[];return b.forEach(function(a){c.push([a[0],a[1]])}),c}function Ib(a,b){var c=Gj;a.genConfig.genDebugInfo&&(c=Wa("nodeDebugInfos_"+a.component.type.name+a.viewIndex),b.push(c.set($a(a.nodes.map(Jb),new aj(new _i(ti.StaticNodeDebugInfo),[Li.Const]))).toDeclStmt(null,[oj.Final])));var d=Wa("renderType_"+a.component.type.name);0===a.viewIndex&&b.push(d.set(Gj).toDeclStmt(Ya(ti.RenderComponentType)));var e=Kb(a,d,c);b.push(e),b.push(Lb(a,e,d))}function Jb(a){var b=a instanceof Yk?a:null,c=[],d=Gj,e=[];return i(b)&&(c=b.getProviderTokens(),i(b.component)&&(d=qb(Ia(b.component.type))),ce.forEach(b.referenceTokens,function(a,b){e.push([b,i(a)?qb(a):Gj])})),Xa(ti.StaticNodeDebugInfo).instantiate([$a(c,new aj(cj,[Li.Const])),d,_a(e,new bj(cj,[Li.Const]))],Ya(ti.StaticNodeDebugInfo,null,[Li.Const]))}function Kb(a,b,c){var d=[new xj(Mk.viewUtils.name,Ya(ti.ViewUtils)),new xj(Mk.parentInjector.name,Ya(ti.Injector)),new xj(Mk.declarationEl.name,Ya(ti.AppElement))],e=[Wa(a.className),b,Ik.fromValue(a.viewType),Mk.viewUtils,Mk.parentInjector,Mk.declarationEl,Lk.fromValue(Qb(a))];a.genConfig.genDebugInfo&&e.push(c);var f=new Oj(null,d,[Fj.callFn(e).toStmt()]),g=[new Oj("createInternal",[new xj(gl.name,fj)],Mb(a),Ya(ti.AppElement)),new Oj("injectorGetInternal",[new xj(Pk.token.name,cj),new xj(Pk.requestNodeIndex.name,ej),new xj(Pk.notFoundResult.name,cj)],Ob(a.injectorGetMethod.finish(),Pk.notFoundResult),cj),new Oj("detectChangesInternal",[new xj(Qk.throwOnChange.name,dj)],Nb(a)),new Oj("dirtyParentQueriesInternal",[],a.dirtyParentQueriesMethod.finish()),new Oj("destroyInternal",[],a.destroyMethod.finish())].concat(a.eventHandlerMethods),h=a.genConfig.genDebugInfo?ti.DebugAppView:ti.AppView,i=new Qj(a.className,Xa(h,[Pb(a)]),a.fields,a.getters,f,g.filter(function(a){return a.body.length>0}));return i}function Lb(a,b,c){var d,e=[new xj(Mk.viewUtils.name,Ya(ti.ViewUtils)),new xj(Mk.parentInjector.name,Ya(ti.Injector)),new xj(Mk.declarationEl.name,Ya(ti.AppElement))],f=[];return d=a.component.template.templateUrl==a.component.type.moduleUrl?a.component.type.moduleUrl+" class "+a.component.type.name+" - inline template":a.component.template.templateUrl,0===a.viewIndex&&(f=[new Rj(c.identical(Gj),[c.set(Mk.viewUtils.callMethod("createRenderComponentType",[Za(d),Za(a.component.template.ngContentSelectors.length),Jk.fromValue(a.component.template.encapsulation),a.styles])).toStmt()])]),bb(e,f.concat([new Lj(Wa(b.name).instantiate(b.constructorMethod.params.map(function(a){return Wa(a.name)})))]),Ya(ti.AppView,[Pb(a)])).toDeclStmt(a.viewFactory.name,[oj.Final])}function Mb(a){var b=Gj,c=[];a.viewType===yd.COMPONENT&&(b=Nk.renderer.callMethod("createViewRoot",[Ej.prop("declarationAppElement").prop("nativeElement")]),c=[fl.set(b).toDeclStmt(Ya(a.genConfig.renderTypes.renderNode),[oj.Final])]);var d;return d=a.viewType===yd.HOST?a.nodes[0].appElement:Gj,c.concat(a.createMethod.finish()).concat([Ej.callMethod("init",[rb(a.rootNodesOrAppElements),$a(a.nodes.map(function(a){return a.renderNode})),$a(a.disposables),$a(a.subscriptions)]).toStmt(),new Lj(d)])}function Nb(a){var b=[];if(a.detectChangesInInputsMethod.isEmpty()&&a.updateContentQueriesMethod.isEmpty()&&a.afterContentLifecycleCallbacksMethod.isEmpty()&&a.detectChangesRenderPropertiesMethod.isEmpty()&&a.updateViewQueriesMethod.isEmpty()&&a.afterViewLifecycleCallbacksMethod.isEmpty())return b;de.addAll(b,a.detectChangesInInputsMethod.finish()),b.push(Ej.callMethod("detectContentChildrenChanges",[Qk.throwOnChange]).toStmt());var c=a.updateContentQueriesMethod.finish().concat(a.afterContentLifecycleCallbacksMethod.finish());c.length>0&&b.push(new Rj(ab(Qk.throwOnChange),c)),de.addAll(b,a.detectChangesRenderPropertiesMethod.finish()),b.push(Ej.callMethod("detectViewChildrenChanges",[Qk.throwOnChange]).toStmt());var d=a.updateViewQueriesMethod.finish().concat(a.afterViewLifecycleCallbacksMethod.finish());d.length>0&&b.push(new Rj(ab(Qk.throwOnChange),d));var e=[],f=Va(b);return fe.has(f,Qk.changed.name)&&e.push(Qk.changed.set(Za(!0)).toDeclStmt(dj)),fe.has(f,Qk.changes.name)&&e.push(Qk.changes.set(Gj).toDeclStmt(new bj(Ya(ti.SimpleChange)))),fe.has(f,Qk.valUnwrapper.name)&&e.push(Qk.valUnwrapper.set(Xa(ti.ValueUnwrapper).instantiate([])).toDeclStmt(null,[oj.Final])),e.concat(b)}function Ob(a,b){return a.length>0?a.concat([new Lj(b)]):a}function Pb(a){return a.viewType===yd.COMPONENT?Ya(a.component.type):cj}function Qb(a){var c;return c=a.viewType===yd.COMPONENT?pd(a.component.changeDetection)?b.ChangeDetectionStrategy.CheckAlways:b.ChangeDetectionStrategy.CheckOnce:b.ChangeDetectionStrategy.CheckAlways}function Rb(a,b,c,d){var e=new ll(a,b,d),f=c.visit(e,Rk.Expression);return new kl(f,e.needsValueUnwrapper)}function Sb(a,b,c){var d=new ll(a,b,null),e=[];return Wb(c.visit(d,Rk.Statement),e),e}function Tb(a,b){if(a!==Rk.Statement)throw new ge("Expected a statement, but saw "+b)}function Ub(a,b){if(a!==Rk.Expression)throw new ge("Expected an expression, but saw "+b)}function Vb(a,b){return a===Rk.Statement?b.toStmt():b}function Wb(a,b){p(a)?a.forEach(function(a){return Wb(a,b)}):b.push(a)}function Xb(a){return Ej.prop("_expr_"+a)}function Yb(a){return Wa("currVal_"+a)}function Zb(a,b,c,d,e,f,g){var h=Rb(a,e,d,Qk.valUnwrapper);if(!j(h.expression)){if(a.fields.push(new Nj(c.name,null,[oj.Private])),a.createMethod.addStmt(Ej.prop(c.name).set(Xa(ti.uninitialized)).toStmt()),h.needsValueUnwrapper){var i=Qk.valUnwrapper.callMethod("reset",[]).toStmt();g.addStmt(i)}g.addStmt(b.set(h.expression).toDeclStmt(null,[oj.Final]));var k=Xa(ti.checkBinding).callFn([Qk.throwOnChange,c,b]);h.needsValueUnwrapper&&(k=Qk.valUnwrapper.prop("hasWrappedValue").or(k)),g.addStmt(new Rj(k,f.concat([Ej.prop(c.name).set(b).toStmt()])))}}function $b(a,b,c){var d=c.bindings.length;c.bindings.push(new ml(b,a));var e=Yb(d),f=Xb(d);c.detectChangesRenderPropertiesMethod.resetDebugInfo(b.nodeIndex,a),Zb(c,e,f,a.value,c.componentContext,[Ej.prop("renderer").callMethod("setText",[b.renderNode,e]).toStmt()],c.detectChangesRenderPropertiesMethod)}function _b(b,c,d){var e=d.view,f=d.renderNode;b.forEach(function(b){var g=e.bindings.length;e.bindings.push(new ml(d,b)),e.detectChangesRenderPropertiesMethod.resetDebugInfo(d.nodeIndex,b);var h,j=Xb(g),k=Yb(g),l=ac(b,k),m=[];switch(b.type){case a.PropertyBindingType.Property:h="setElementProperty",e.genConfig.logBindingUpdate&&m.push(ec(f,b.name,k));break;case a.PropertyBindingType.Attribute:h="setElementAttribute",l=l.isBlank().conditional(Gj,l.callMethod("toString",[]));break;case a.PropertyBindingType.Class:h="setElementClass";break;case a.PropertyBindingType.Style:h="setElementStyle";var n=l.callMethod("toString",[]);i(b.unit)&&(n=n.plus(Za(b.unit))),l=l.isBlank().conditional(Gj,n)}m.push(Ej.prop("renderer").callMethod(h,[f,Za(b.name),l]).toStmt()),Zb(e,k,j,b.value,c,m,e.detectChangesRenderPropertiesMethod)})}function ac(a,b){var c;switch(a.securityContext){case Ld.NONE:return b;case Ld.HTML:c="HTML";break;case Ld.STYLE:c="STYLE";break;case Ld.SCRIPT:c="SCRIPT";break;case Ld.URL:c="URL";break;case Ld.RESOURCE_URL:c="RESOURCE_URL";break;default:throw new Error("internal error, unexpected SecurityContext "+a.securityContext+".")}var d=Nk.viewUtils.prop("sanitizer"),e=[Xa(ti.SecurityContext).prop(c),b];return d.callMethod("sanitize",e)}function bc(a,b){_b(a,b.view.componentContext,b)}function cc(a,b,c){_b(a.hostProperties,b,c)}function dc(a,b,c){if(0!==a.inputs.length){var d=c.view,e=d.detectChangesInInputsMethod;e.resetDebugInfo(c.nodeIndex,c.sourceAst);var f=a.directive.lifecycleHooks,g=-1!==f.indexOf(sd.OnChanges),h=a.directive.isComponent&&!pd(a.directive.changeDetection);g&&e.addStmt(Qk.changes.set(Gj).toStmt()),h&&e.addStmt(Qk.changed.set(Za(!1)).toStmt()),a.inputs.forEach(function(a){var f=d.bindings.length;d.bindings.push(new ml(c,a)),e.resetDebugInfo(c.nodeIndex,a);var i=Xb(f),j=Yb(f),k=[b.prop(a.directiveName).set(j).toStmt()];g&&(k.push(new Rj(Qk.changes.identical(Gj),[Qk.changes.set(_a([],new bj(Ya(ti.SimpleChange)))).toStmt()])),k.push(Qk.changes.key(Za(a.directiveName)).set(Xa(ti.SimpleChange).instantiate([i,j])).toStmt())),h&&k.push(Qk.changed.set(Za(!0)).toStmt()),d.genConfig.logBindingUpdate&&k.push(ec(c.renderNode,a.directiveName,j)),Zb(d,j,i,a.value,d.componentContext,k,e)}),h&&e.addStmt(new Rj(Qk.changed,[c.appElement.prop("componentView").callMethod("markAsCheckOnce",[]).toStmt()]))}}function ec(a,b,c){return Ej.prop("renderer").callMethod("setBindingDebugInfo",[a,Za("ng-reflect-"+pa(b)),c.isBlank().conditional(Gj,c.callMethod("toString",[]))]).toStmt()}function fc(a,b,c){var d=[];return a.forEach(function(a){c.view.bindings.push(new ml(c,a));var b=nl.getOrCreate(c,a.target,a.name,d);b.addAction(a,null,null)}),de.forEachWithIndex(b,function(a,b){var e=c.directiveInstances[b];a.hostEvents.forEach(function(b){c.view.bindings.push(new ml(c,b));var f=nl.getOrCreate(c,b.target,b.name,d);f.addAction(b,a.directive,e)})}),d.forEach(function(a){return a.finishMethod()}),d}function gc(a,b,c){ce.forEach(a.directive.outputs,function(a,d){c.filter(function(b){return b.eventName==a}).forEach(function(a){a.listenToDirective(b,d)})})}function hc(a){a.forEach(function(a){return a.listenToRenderer()})}function ic(a){return a instanceof Kj?a.expr:a instanceof Lj?a.value:null}function jc(a){return Wc.replaceAll(a,/[^a-zA-Z_]/g,"_")}function kc(a,b,c){var d=c.view,e=d.detectChangesInInputsMethod,f=a.directive.lifecycleHooks;-1!==f.indexOf(sd.OnChanges)&&a.inputs.length>0&&e.addStmt(new Rj(Qk.changes.notIdentical(Gj),[b.callMethod("ngOnChanges",[Qk.changes]).toStmt()])),-1!==f.indexOf(sd.OnInit)&&e.addStmt(new Rj(ol.and(pl),[b.callMethod("ngOnInit",[]).toStmt()])),-1!==f.indexOf(sd.DoCheck)&&e.addStmt(new Rj(pl,[b.callMethod("ngDoCheck",[]).toStmt()]))}function lc(a,b,c){var d=c.view,e=a.lifecycleHooks,f=d.afterContentLifecycleCallbacksMethod;f.resetDebugInfo(c.nodeIndex,c.sourceAst),-1!==e.indexOf(sd.AfterContentInit)&&f.addStmt(new Rj(ol,[b.callMethod("ngAfterContentInit",[]).toStmt()])),-1!==e.indexOf(sd.AfterContentChecked)&&f.addStmt(b.callMethod("ngAfterContentChecked",[]).toStmt())}function mc(a,b,c){var d=c.view,e=a.lifecycleHooks,f=d.afterViewLifecycleCallbacksMethod;f.resetDebugInfo(c.nodeIndex,c.sourceAst),-1!==e.indexOf(sd.AfterViewInit)&&f.addStmt(new Rj(ol,[b.callMethod("ngAfterViewInit",[]).toStmt()])), +-1!==e.indexOf(sd.AfterViewChecked)&&f.addStmt(b.callMethod("ngAfterViewChecked",[]).toStmt())}function nc(a,b,c){var d=c.view.destroyMethod;d.resetDebugInfo(c.nodeIndex,c.sourceAst),-1!==a.lifecycleHooks.indexOf(sd.OnDestroy)&&d.addStmt(b.callMethod("ngOnDestroy",[]).toStmt())}function oc(a,b,c){var d=c.destroyMethod;-1!==a.lifecycleHooks.indexOf(sd.OnDestroy)&&d.addStmt(b.callMethod("ngOnDestroy",[]).toStmt())}function pc(a,b){var c=new ql(a);z(c,b),a.pipes.forEach(function(a){oc(a.meta,a.instance,a.view)})}function qc(a){return a instanceof b.DirectiveMetadata}function rc(a){return a instanceof b.PipeMetadata}function sc(a,b){if(!(b instanceof Tc))return!1;var c=b.prototype;switch(a){case sd.AfterContentInit:return!!c.ngAfterContentInit;case sd.AfterContentChecked:return!!c.ngAfterContentChecked;case sd.AfterViewInit:return!!c.ngAfterViewInit;case sd.AfterViewChecked:return!!c.ngAfterViewChecked;case sd.OnChanges:return!!c.ngOnChanges;case sd.DoCheck:return!!c.ngDoCheck;case sd.OnDestroy:return!!c.ngOnDestroy;case sd.OnInit:return!!c.ngOnInit;default:return!1}}function tc(a,b){if(h()&&!j(b)){if(!p(b))throw new ge("Expected '"+a+"' to be an array of strings.");for(var c=0;c0?d:"package:"+d+sh}return a.importUri(b)}function Bc(a){return sa(a,new Al,null)}function Cc(a,b){if(j(a))return null;var c=Wc.replaceAllMapped(a,Bl,function(a){return"$"==a[0]?b?"\\$":"$":"\n"==a[0]?"\\n":"\r"==a[0]?"\\r":"\\"+a[0]});return"'"+c+"'"}function Dc(a){for(var b="",c=0;a>c;c++)b+=" ";return b}function Ec(a,b,c){var d=new Il,e=Fl.createRoot([c]);return d.visitAllStatements(b,e),x(a,c,e.toSource(),d.getArgs())}function Fc(a){var b,c=new Kl(Jl),d=Fl.createRoot([]);return b=p(a)?a:[a],b.forEach(function(a){if(a instanceof Hj)a.visitStatement(c,d);else if(a instanceof ij)a.visitExpression(c,d);else{if(!(a instanceof Yi))throw new ge("Don't know how to print debug info for "+a);a.visitType(c,d)}}),d.toSource()}function Gc(a){if(a instanceof Kj){var b=a.expr;if(b instanceof qj){var c=b.fn;if(c instanceof kj&&c.builtin===hj.Super)return b}}return null}function Hc(a){return i(a)&&a.hasModifier(Li.Const)}function Ic(a){var b,c=new Ml(Ll),d=Fl.createRoot([]);return b=p(a)?a:[a],b.forEach(function(a){if(a instanceof Hj)a.visitStatement(c,d);else if(a instanceof ij)a.visitExpression(c,d);else{if(!(a instanceof Yi))throw new ge("Don't know how to print debug info for "+a);a.visitType(c,d)}}),d.toSource()}function Jc(a,b,c){var d=a.concat([new Lj(Wa(b))]),e=new Ol(null,null,null,null,new Map,new Map,new Map,new Map,c),f=new Rl,g=f.visitAllStatements(d,e);return i(g)?g.value:null}function Kc(a){return Rc?a instanceof Nl:i(a)&&i(a.props)&&i(a.getters)&&i(a.methods)}function Lc(a,b,c,d,e){for(var f=d.createChildWihtLocalVars(),g=0;g=0&&a[d]==b;d--)c--;a=a.substring(0,c)}return a},a.replace=function(a,b,c){return a.replace(b,c)},a.replaceAll=function(a,b,c){return a.replace(b,c)},a.slice=function(a,b,c){return void 0===b&&(b=0),void 0===c&&(c=null),a.slice(b,null===c?void 0:c)},a.replaceAllMapped=function(a,b,c){return a.replace(b,function(){for(var a=[],b=0;ba?-1:a>b?1:0},a}(),Xc=function(){function a(a){void 0===a&&(a=[]),this.parts=a}return a.prototype.add=function(a){this.parts.push(a)},a.prototype.toString=function(){return this.parts.join("")},a}(),Yc=function(a){function b(b){a.call(this),this.message=b}return f(b,a),b.prototype.toString=function(){return this.message},b}(Error),Zc=function(){function a(){}return a.toFixed=function(a,b){return a.toFixed(b)},a.equal=function(a,b){return a===b},a.parseIntAutoRadix=function(a){var b=parseInt(a);if(isNaN(b))throw new Yc("Invalid integer literal when parsing "+a);return b},a.parseInt=function(a,b){if(10==b){if(/^(\-|\+)?[0-9]+$/.test(a))return parseInt(a,b)}else if(16==b){if(/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(a))return parseInt(a,b)}else{var c=parseInt(a,b);if(!isNaN(c))return c}throw new Yc("Invalid integer literal when parsing "+a+" in base "+b)},a.parseFloat=function(a){return parseFloat(a)},Object.defineProperty(a,"NaN",{get:function(){return NaN},enumerable:!0,configurable:!0}),a.isNaN=function(a){return isNaN(a)},a.isInteger=function(a){return Number.isInteger(a)},a}(),$c=function(){function a(){}return a.create=function(a,b){return void 0===b&&(b=""),b=b.replace(/g/g,""),new Sc.RegExp(a,b+"g")},a.firstMatch=function(a,b){return a.lastIndex=0,a.exec(b)},a.test=function(a,b){return a.lastIndex=0,a.test(b)},a.matcher=function(a,b){return a.lastIndex=0,{re:a,input:b}},a.replaceAll=function(a,b,c){var d=a.exec(b),e="";a.lastIndex=0;for(var f=0;d;)e+=b.substring(f,d.index),e+=c(d),f=d.index+d[0].length,a.lastIndex=f,d=a.exec(b);return e+=b.substring(f)},a}(),_c=function(){function a(){}return a.next=function(a){return a.re.exec(a.input)},a}(),ad=function(){function a(){}return a.apply=function(a,b){return a.apply(null,b)},a}(),bd=function(){function a(a,b,c){this.value=a,this.ngContentIndex=b,this.sourceSpan=c}return a.prototype.visit=function(a,b){return a.visitText(this,b)},a}(),cd=function(){function a(a,b,c){this.value=a,this.ngContentIndex=b,this.sourceSpan=c}return a.prototype.visit=function(a,b){return a.visitBoundText(this,b)},a}(),dd=function(){function a(a,b,c){this.name=a,this.value=b,this.sourceSpan=c}return a.prototype.visit=function(a,b){return a.visitAttr(this,b)},a}(),ed=function(){function a(a,b,c,d,e,f){this.name=a,this.type=b,this.securityContext=c,this.value=d,this.unit=e,this.sourceSpan=f}return a.prototype.visit=function(a,b){return a.visitElementProperty(this,b)},a}(),fd=function(){function a(a,b,c,d){this.name=a,this.target=b,this.handler=c,this.sourceSpan=d}return a.prototype.visit=function(a,b){return a.visitEvent(this,b)},Object.defineProperty(a.prototype,"fullName",{get:function(){return i(this.target)?this.target+":"+this.name:this.name},enumerable:!0,configurable:!0}),a}(),gd=function(){function a(a,b,c){this.name=a,this.value=b,this.sourceSpan=c}return a.prototype.visit=function(a,b){return a.visitReference(this,b)},a}(),hd=function(){function a(a,b,c){this.name=a,this.value=b,this.sourceSpan=c}return a.prototype.visit=function(a,b){return a.visitVariable(this,b)},a}(),id=function(){function a(a,b,c,d,e,f,g,h,i,j,k){this.name=a,this.attrs=b,this.inputs=c,this.outputs=d,this.references=e,this.directives=f,this.providers=g,this.hasViewContainer=h,this.children=i,this.ngContentIndex=j,this.sourceSpan=k}return a.prototype.visit=function(a,b){return a.visitElement(this,b)},a}(),jd=function(){function a(a,b,c,d,e,f,g,h,i,j){this.attrs=a,this.outputs=b,this.references=c,this.variables=d,this.directives=e,this.providers=f,this.hasViewContainer=g,this.children=h,this.ngContentIndex=i,this.sourceSpan=j}return a.prototype.visit=function(a,b){return a.visitEmbeddedTemplate(this,b)},a}(),kd=function(){function a(a,b,c,d){this.directiveName=a,this.templateName=b,this.value=c,this.sourceSpan=d}return a.prototype.visit=function(a,b){return a.visitDirectiveProperty(this,b)},a}(),ld=function(){function a(a,b,c,d,e){this.directive=a,this.inputs=b,this.hostProperties=c,this.hostEvents=d,this.sourceSpan=e}return a.prototype.visit=function(a,b){return a.visitDirective(this,b)},a}(),md=function(){function a(a,b,c,d,e,f){this.token=a,this.multiProvider=b,this.eager=c,this.providers=d,this.providerType=e,this.sourceSpan=f}return a.prototype.visit=function(a,b){return null},a}();a.ProviderAstType,function(a){a[a.PublicService=0]="PublicService",a[a.PrivateService=1]="PrivateService",a[a.Component=2]="Component",a[a.Directive=3]="Directive",a[a.Builtin=4]="Builtin"}(a.ProviderAstType||(a.ProviderAstType={}));var nd=function(){function a(a,b,c){this.index=a,this.ngContentIndex=b,this.sourceSpan=c}return a.prototype.visit=function(a,b){return a.visitNgContent(this,b)},a}();a.PropertyBindingType,function(a){a[a.Property=0]="Property",a[a.Attribute=1]="Attribute",a[a.Class=2]="Class",a[a.Style=3]="Style"}(a.PropertyBindingType||(a.PropertyBindingType={}));var od,pd=b.__core_private__.isDefaultChangeDetectionStrategy,qd=b.__core_private__.ChangeDetectorState,rd=b.__core_private__.CHANGE_DETECTION_STRATEGY_VALUES,sd=b.__core_private__.LifecycleHooks,td=b.__core_private__.LIFECYCLE_HOOKS_VALUES,ud=b.__core_private__.ReflectorReader,vd=b.__core_private__.AppElement,wd=b.__core_private__.AppView,xd=b.__core_private__.DebugAppView,yd=b.__core_private__.ViewType,zd=b.__core_private__.MAX_INTERPOLATION_VALUES,Ad=b.__core_private__.checkBinding,Bd=b.__core_private__.flattenNestedViewRenderNodes,Cd=b.__core_private__.interpolate,Dd=b.__core_private__.ViewUtils,Ed=b.__core_private__.VIEW_ENCAPSULATION_VALUES,Fd=b.__core_private__.DebugContext,Gd=b.__core_private__.StaticNodeDebugInfo,Hd=b.__core_private__.devModeEqual,Id=b.__core_private__.uninitialized,Jd=b.__core_private__.ValueUnwrapper,Kd=b.__core_private__.TemplateRef_,Ld=b.__core_private__.SecurityContext,Md=b.__core_private__.createProvider,Nd=b.__core_private__.isProviderLiteral,Od=b.__core_private__.EMPTY_ARRAY,Pd=b.__core_private__.EMPTY_MAP,Qd=b.__core_private__.pureProxy1,Rd=b.__core_private__.pureProxy2,Sd=b.__core_private__.pureProxy3,Td=b.__core_private__.pureProxy4,Ud=b.__core_private__.pureProxy5,Vd=b.__core_private__.pureProxy6,Wd=b.__core_private__.pureProxy7,Xd=b.__core_private__.pureProxy8,Yd=b.__core_private__.pureProxy9,Zd=b.__core_private__.pureProxy10,$d=b.__core_private__.castByValue,_d=b.__core_private__.Console,ae=Sc.Map,be=Sc.Set,ce=(function(){try{if(1===new ae([[1,2]]).size)return function(a){return new ae(a)}}catch(a){}return function(a){for(var b=new ae,c=0;c-1?(a.splice(c,1),!0):!1},a.clear=function(a){a.length=0},a.isEmpty=function(a){return 0==a.length},a.fill=function(a,b,c,d){void 0===c&&(c=0),void 0===d&&(d=null),a.fill(b,c,null===d?a.length:d)},a.equals=function(a,b){if(a.length!=b.length)return!1;for(var c=0;cd&&(c=f,d=g)}}return c},a.flatten=function(a){var b=[];return A(a,b),b},a.addAll=function(a,b){for(var c=0;c=this.length?Ie:Wc.charCodeAt(this.input,this.index)},a.prototype.scanToken=function(){for(var a=this.input,b=this.length,c=this.peek,d=this.index;Oe>=c;){if(++d>=b){c=Ie;break}c=Wc.charCodeAt(a,d)}if(this.peek=c,this.index=d,d>=b)return null;if(J(c))return this.scanIdentifier();if(M(c))return this.scanNumber(d);var e=d;switch(c){case af:return this.advance(),M(this.peek)?this.scanNumber(e):C(e,af);case We:case Xe:case Df:case Ff:case of:case qf:case $e:case cf:case df:return this.scanCharacter(e,c);case Ve:case Qe:return this.scanString();case Re:case Ze:case _e:case Ye:case bf:case Te:case rf:return this.scanOperator(e,Wc.fromCharCode(c));case hf:return this.scanComplexOperator(e,"?",af,".");case ef:case gf:return this.scanComplexOperator(e,Wc.fromCharCode(c),ff,"=");case Pe:case ff:return this.scanComplexOperator(e,Wc.fromCharCode(c),ff,"=",ff,"=");case Ue:return this.scanComplexOperator(e,"&",Ue,"&");case Ef:return this.scanComplexOperator(e,"|",Ef,"|");case Gf:for(;I(this.peek);)this.advance();return this.scanToken()}return this.error("Unexpected character ["+Wc.fromCharCode(c)+"]",0),null},a.prototype.scanCharacter=function(a,b){return this.advance(),C(a,b)},a.prototype.scanOperator=function(a,b){return this.advance(),F(a,b)},a.prototype.scanComplexOperator=function(a,b,c,d,e,f){this.advance();var g=b;return this.peek==c&&(this.advance(),g+=d),i(e)&&this.peek==e&&(this.advance(),g+=f),F(a,g)},a.prototype.scanIdentifier=function(){var a=this.index;for(this.advance();L(this.peek);)this.advance();var b=this.input.substring(a,this.index);return fe.has(Jf,b)?E(a,b):D(a,b)},a.prototype.scanNumber=function(a){var b=this.index===a;for(this.advance();;){if(M(this.peek));else if(this.peek==af)b=!1;else{if(!N(this.peek))break;this.advance(),O(this.peek)&&this.advance(),M(this.peek)||this.error("Invalid exponent",-1),b=!1}this.advance()}var c=this.input.substring(a,this.index),d=b?Zc.parseIntAutoRadix(c):Zc.parseFloat(c);return H(a,d)},a.prototype.scanString=function(){var a=this.index,b=this.peek;this.advance();for(var c,d=this.index,e=this.input;this.peek!=b;)if(this.peek==pf){null==c&&(c=new Xc),c.add(e.substring(d,this.index)),this.advance();var f;if(this.peek==Af){var g=e.substring(this.index+1,this.index+5);try{f=Zc.parseInt(g,16)}catch(h){this.error("Invalid unicode escape [\\u"+g+"]",0)}for(var i=0;5>i;i++)this.advance()}else f=Q(this.peek),this.advance();c.add(Wc.fromCharCode(f)),d=this.index}else this.peek==Ie?this.error("Unterminated quote",0):this.advance();var j=e.substring(d,this.index);this.advance();var k=j;return null!=c&&(c.add(j),k=c.toString()),G(a,k)},a.prototype.error=function(a,b){var c=this.index+b;throw new Hf("Lexer Error: "+a+" at column "+c+" in expression ["+this.input+"]")},a}(),Jf=(fe.createFromList(["+","-","*","/","%","^","=","==","!=","===","!==","<",">","<=",">=","&&","||","&","|","!","?","#","?."]),fe.createFromList(["var","let","null","undefined","true","false","if","else"])),Kf=new ke,Lf=/\{\{([\s\S]*?)\}\}/g,Mf=function(a){function b(b,c,d,e){a.call(this,"Parser Error: "+b+" "+d+" ["+c+"] in "+e)}return f(b,a),b}(ge),Nf=function(){function a(a,b){this.strings=a,this.expressions=b}return a}(),Of=function(){function a(a,b){this.templateBindings=a,this.warnings=b}return a}(),Pf=function(){function a(a){this._lexer=a}return a.prototype.parseAction=function(a,b){this._checkNoInterpolation(a,b);var c=this._lexer.tokenize(this._stripComments(a)),d=new Rf(a,b,c,!0).parseChain();return new Ce(d,a,b)},a.prototype.parseBinding=function(a,b){var c=this._parseBindingAst(a,b);return new Ce(c,a,b)},a.prototype.parseSimpleBinding=function(a,b){var c=this._parseBindingAst(a,b);if(!Sf.check(c))throw new Mf("Host binding expression can only contain field access and constants",a,b);return new Ce(c,a,b)},a.prototype._parseBindingAst=function(a,b){var c=this._parseQuote(a,b);if(i(c))return c;this._checkNoInterpolation(a,b);var d=this._lexer.tokenize(this._stripComments(a));return new Rf(a,b,d,!1).parseChain()},a.prototype._parseQuote=function(a,b){if(j(a))return null;var c=a.indexOf(":");if(-1==c)return null;var d=a.substring(0,c).trim();if(!K(d))return null;var e=a.substring(c+1);return new ie(d,e,b)},a.prototype.parseTemplateBindings=function(a,b){var c=this._lexer.tokenize(a);return new Rf(a,b,c,!1).parseTemplateBindings()},a.prototype.parseInterpolation=function(a,b){var c=this.splitInterpolation(a,b);if(null==c)return null;for(var d=[],e=0;e0))throw new Mf("Blank expressions are not allowed in interpolated strings",a,"at column "+this._findInterpolationErrorColumn(c,f)+" in",b);e.push(g)}}return new Nf(d,e)},a.prototype.wrapLiteralPrimitive=function(a,b){return new Ce(new te(a),a,b)},a.prototype._stripComments=function(a){var b=this._commentStart(a);return i(b)?a.substring(0,b).trim():a},a.prototype._commentStart=function(a){for(var b=null,c=0;c1)throw new Mf("Got interpolation ({{}}) where expression was expected",a,"at column "+this._findInterpolationErrorColumn(c,1)+" in",b)},a.prototype._findInterpolationErrorColumn=function(a,b){for(var c="",d=0;b>d;d++)c+=d%2===0?a[d]:"{{"+a[d]+"}}";return c.length},a}();Pf.decorators=[{type:b.Injectable}],Pf.ctorParameters=[{type:Fe}];var Qf,Rf=function(){function a(a,b,c,d){this.input=a,this.location=b,this.tokens=c,this.parseAction=d,this.index=0}return a.prototype.peek=function(a){var b=this.index+a;return b"))a=new xe(">",a,this.parseAdditive());else if(this.optionalOperator("<="))a=new xe("<=",a,this.parseAdditive());else{if(!this.optionalOperator(">="))return a;a=new xe(">=",a,this.parseAdditive())}},a.prototype.parseAdditive=function(){for(var a=this.parseMultiplicative();;)if(this.optionalOperator("+"))a=new xe("+",a,this.parseMultiplicative());else{if(!this.optionalOperator("-"))return a;a=new xe("-",a,this.parseMultiplicative())}},a.prototype.parseMultiplicative=function(){for(var a=this.parsePrefix();;)if(this.optionalOperator("*"))a=new xe("*",a,this.parsePrefix());else if(this.optionalOperator("%"))a=new xe("%",a,this.parsePrefix());else{if(!this.optionalOperator("/"))return a;a=new xe("/",a,this.parsePrefix())}},a.prototype.parsePrefix=function(){return this.optionalOperator("+")?this.parsePrefix():this.optionalOperator("-")?new xe("-",new te(0),this.parsePrefix()):this.optionalOperator("!")?new ye(this.parsePrefix()):this.parseCallChain()},a.prototype.parseCallChain=function(){for(var a=this.parsePrimary();;)if(this.optionalCharacter(af))a=this.parseAccessMemberOrMethodCall(a,!1);else if(this.optionalOperator("?."))a=this.parseAccessMemberOrMethodCall(a,!0);else if(this.optionalCharacter(of)){var b=this.parsePipe();if(this.expectCharacter(qf),this.optionalOperator("=")){var c=this.parseConditional();a=new re(a,b,c)}else a=new qe(a,b)}else{if(!this.optionalCharacter(We))return a;var d=this.parseCallArguments();this.expectCharacter(Xe),a=new Be(a,d)}},a.prototype.parsePrimary=function(){if(this.optionalCharacter(We)){var a=this.parsePipe();return this.expectCharacter(Xe),a}if(this.next.isKeywordNull()||this.next.isKeywordUndefined())return this.advance(),new te(null);if(this.next.isKeywordTrue())return this.advance(),new te(!0);if(this.next.isKeywordFalse())return this.advance(),new te(!1);if(this.optionalCharacter(of)){var b=this.parseExpressionList(qf);return this.expectCharacter(qf),new ue(b)}if(this.next.isCharacter(Df))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(Kf,!1);if(this.next.isNumber()){var c=this.next.toNumber();return this.advance(),new te(c)}if(this.next.isString()){var d=this.next.toString();return this.advance(),new te(d)}throw this.index>=this.tokens.length?this.error("Unexpected end of expression: "+this.input):this.error("Unexpected token "+this.next),new ge("Fell through all cases in parsePrimary")},a.prototype.parseExpressionList=function(a){var b=[];if(!this.next.isCharacter(a))do b.push(this.parsePipe());while(this.optionalCharacter($e));return b},a.prototype.parseLiteralMap=function(){var a=[],b=[];if(this.expectCharacter(Df),!this.optionalCharacter(Ff)){do{var c=this.expectIdentifierOrKeywordOrString();a.push(c),this.expectCharacter(cf),b.push(this.parsePipe())}while(this.optionalCharacter($e));this.expectCharacter(Ff)}return new ve(a,b)},a.prototype.parseAccessMemberOrMethodCall=function(a,b){void 0===b&&(b=!1);var c=this.expectIdentifierOrKeyword();if(this.optionalCharacter(We)){var d=this.parseCallArguments();return this.expectCharacter(Xe),b?new Ae(a,c,d):new ze(a,c,d)}if(!b){if(this.optionalOperator("=")){this.parseAction||this.error("Bindings cannot contain assignments");var e=this.parseConditional();return new oe(a,c,e)}return new ne(a,c)}return this.optionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),null):new pe(a,c)},a.prototype.parseCallArguments=function(){if(this.next.isCharacter(Xe))return[];var a=[];do a.push(this.parsePipe());while(this.optionalCharacter($e));return a},a.prototype.parseBlockContent=function(){this.parseAction||this.error("Binding expression cannot contain chained expression");for(var a=[];this.indexa.length-1&&(b=a.length-1);for(var c=b,d=0,e=0;100>d&&b>0&&(b--,d++,"\n"!=a[b]||3!=++e););for(d=0,e=0;100>d&&c]"+a.substring(this.span.start.offset,c+1);return this.msg+' ("'+f+'"): '+this.span.start},a}(),cg={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",alefsym:"ℵ",Alpha:"Α",alpha:"α",amp:"&",and:"∧",ang:"∠",apos:"'",Aring:"Å",aring:"å",asymp:"≈",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",bdquo:"„",Beta:"Β",beta:"β",brvbar:"¦",bull:"•",cap:"∩",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",Chi:"Χ",chi:"χ",circ:"ˆ",clubs:"♣",cong:"≅",copy:"©",crarr:"↵",cup:"∪",curren:"¤",dagger:"†",Dagger:"‡",darr:"↓",dArr:"⇓",deg:"°",Delta:"Δ",delta:"δ",diams:"♦",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",empty:"∅",emsp:" ",ensp:" ",Epsilon:"Ε",epsilon:"ε",equiv:"≡",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",exist:"∃",fnof:"ƒ",forall:"∀",frac12:"½",frac14:"¼",frac34:"¾",frasl:"⁄",Gamma:"Γ",gamma:"γ",ge:"≥",gt:">",harr:"↔",hArr:"⇔",hearts:"♥",hellip:"…",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",image:"ℑ",infin:"∞","int":"∫",Iota:"Ι",iota:"ι",iquest:"¿",isin:"∈",Iuml:"Ï",iuml:"ï",Kappa:"Κ",kappa:"κ",Lambda:"Λ",lambda:"λ",lang:"⟨",laquo:"«",larr:"←",lArr:"⇐",lceil:"⌈",ldquo:"“",le:"≤",lfloor:"⌊",lowast:"∗",loz:"◊",lrm:"‎",lsaquo:"‹",lsquo:"‘",lt:"<",macr:"¯",mdash:"—",micro:"µ",middot:"·",minus:"−",Mu:"Μ",mu:"μ",nabla:"∇",nbsp:" ",ndash:"–",ne:"≠",ni:"∋",not:"¬",notin:"∉",nsub:"⊄",Ntilde:"Ñ",ntilde:"ñ",Nu:"Ν",nu:"ν",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",OElig:"Œ",oelig:"œ",Ograve:"Ò",ograve:"ò",oline:"‾",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",oplus:"⊕",or:"∨",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",otimes:"⊗",Ouml:"Ö",ouml:"ö",para:"¶",permil:"‰",perp:"⊥",Phi:"Φ",phi:"φ",Pi:"Π",pi:"π",piv:"ϖ",plusmn:"±",pound:"£",prime:"′",Prime:"″",prod:"∏",prop:"∝",Psi:"Ψ",psi:"ψ",quot:'"',radic:"√",rang:"⟩",raquo:"»",rarr:"→",rArr:"⇒",rceil:"⌉",rdquo:"”",real:"ℜ",reg:"®",rfloor:"⌋",Rho:"Ρ",rho:"ρ",rlm:"‏",rsaquo:"›",rsquo:"’",sbquo:"‚",Scaron:"Š",scaron:"š",sdot:"⋅",sect:"§",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sim:"∼",spades:"♠",sub:"⊂",sube:"⊆",sum:"∑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supe:"⊇",szlig:"ß",Tau:"Τ",tau:"τ",there4:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thinsp:" ",THORN:"Þ",thorn:"þ",tilde:"˜",times:"×",trade:"™",Uacute:"Ú",uacute:"ú",uarr:"↑",uArr:"⇑",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",Uuml:"Ü",uuml:"ü",weierp:"℘",Xi:"Ξ",xi:"ξ",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ",Yuml:"Ÿ",Zeta:"Ζ",zeta:"ζ",zwj:"‍",zwnj:"‌"};!function(a){a[a.RAW_TEXT=0]="RAW_TEXT",a[a.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",a[a.PARSABLE_DATA=2]="PARSABLE_DATA"}(ag||(ag={}));var dg,eg=function(){function a(a){var b=this,c=void 0===a?{}:a,d=c.closedByChildren,e=c.requiredParents,f=c.implicitNamespacePrefix,g=c.contentType,h=c.closedByParent,j=c.isVoid,k=c.ignoreFirstLf;this.closedByChildren={},this.closedByParent=!1,i(d)&&d.length>0&&d.forEach(function(a){return b.closedByChildren[a]=!0}),this.isVoid=v(j),this.closedByParent=v(h)||this.isVoid,i(e)&&e.length>0&&(this.requiredParents={},this.parentToAdd=e[0],e.forEach(function(a){return b.requiredParents[a]=!0})),this.implicitNamespacePrefix=f,this.contentType=i(g)?g:ag.PARSABLE_DATA,this.ignoreFirstLf=v(k)}return a.prototype.requireExtraParent=function(a){if(j(this.requiredParents))return!1;if(j(a))return!0;var b=a.toLowerCase();return 1!=this.requiredParents[b]&&"template"!=b},a.prototype.isClosedByChild=function(a){return this.isVoid||v(this.closedByChildren[a.toLowerCase()])},a}(),fg={base:new eg({isVoid:!0}),meta:new eg({isVoid:!0}),area:new eg({isVoid:!0}),embed:new eg({isVoid:!0}),link:new eg({isVoid:!0}),img:new eg({isVoid:!0}),input:new eg({isVoid:!0}),param:new eg({isVoid:!0}),hr:new eg({isVoid:!0}),br:new eg({isVoid:!0}),source:new eg({isVoid:!0}),track:new eg({isVoid:!0}),wbr:new eg({isVoid:!0}),p:new eg({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new eg({closedByChildren:["tbody","tfoot"]}),tbody:new eg({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new eg({closedByChildren:["tbody"],closedByParent:!0}),tr:new eg({closedByChildren:["tr"],requiredParents:["tbody","tfoot","thead"],closedByParent:!0}),td:new eg({closedByChildren:["td","th"],closedByParent:!0}),th:new eg({closedByChildren:["td","th"],closedByParent:!0}),col:new eg({requiredParents:["colgroup"],isVoid:!0}),svg:new eg({implicitNamespacePrefix:"svg"}),math:new eg({implicitNamespacePrefix:"math"}),li:new eg({closedByChildren:["li"],closedByParent:!0}),dt:new eg({closedByChildren:["dt","dd"]}),dd:new eg({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new eg({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new eg({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new eg({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new eg({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new eg({closedByChildren:["optgroup"],closedByParent:!0}),option:new eg({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new eg({ignoreFirstLf:!0}),listing:new eg({ignoreFirstLf:!0}),style:new eg({contentType:ag.RAW_TEXT}),script:new eg({contentType:ag.RAW_TEXT}),title:new eg({contentType:ag.ESCAPABLE_RAW_TEXT}),textarea:new eg({contentType:ag.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})},gg=new eg,hg=/^@([^:]+):(.+)/g;!function(a){a[a.TAG_OPEN_START=0]="TAG_OPEN_START",a[a.TAG_OPEN_END=1]="TAG_OPEN_END",a[a.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",a[a.TAG_CLOSE=3]="TAG_CLOSE",a[a.TEXT=4]="TEXT",a[a.ESCAPABLE_RAW_TEXT=5]="ESCAPABLE_RAW_TEXT",a[a.RAW_TEXT=6]="RAW_TEXT",a[a.COMMENT_START=7]="COMMENT_START",a[a.COMMENT_END=8]="COMMENT_END",a[a.CDATA_START=9]="CDATA_START",a[a.CDATA_END=10]="CDATA_END",a[a.ATTR_NAME=11]="ATTR_NAME",a[a.ATTR_VALUE=12]="ATTR_VALUE",a[a.DOC_TYPE=13]="DOC_TYPE",a[a.EXPANSION_FORM_START=14]="EXPANSION_FORM_START",a[a.EXPANSION_CASE_VALUE=15]="EXPANSION_CASE_VALUE",a[a.EXPANSION_CASE_EXP_START=16]="EXPANSION_CASE_EXP_START",a[a.EXPANSION_CASE_EXP_END=17]="EXPANSION_CASE_EXP_END",a[a.EXPANSION_FORM_END=18]="EXPANSION_FORM_END",a[a.EOF=19]="EOF"}(dg||(dg={}));var ig=function(){function a(a,b,c){this.type=a,this.parts=b,this.sourceSpan=c}return a}(),jg=function(a){function b(b,c,d){a.call(this,d,b),this.tokenType=c}return f(b,a),b}(bg),kg=function(){function a(a,b){this.tokens=a,this.errors=b}return a}(),lg=0,mg=9,ng=10,og=13,pg=32,qg=33,rg=34,sg=35,tg=38,ug=39,vg=45,wg=47,xg=48,yg=59,zg=57,Ag=58,Bg=60,Cg=61,Dg=62,Eg=91,Fg=93,Gg=123,Hg=125,Ig=44,Jg=65,Kg=70,Lg=88,Mg=90,Ng=97,Og=102,Pg=122,Qg=120,Rg=160,Sg=/\r\n?/g,Tg=function(){function a(a){this.error=a}return a}(),Ug=function(){function a(a,b){this.file=a,this.tokenizeExpansionForms=b,this.peek=-1,this.nextPeek=-1,this.index=-1,this.line=0,this.column=-1,this.expansionCaseStack=[],this.tokens=[],this.errors=[],this.input=a.content,this.length=a.content.length,this._advance()}return a.prototype._processCarriageReturns=function(a){return Wc.replaceAll(a,Sg,"\n")},a.prototype.tokenize=function(){for(;this.peek!==lg;){var a=this._getLocation();try{this._attemptCharCode(Bg)?this._attemptCharCode(qg)?this._attemptCharCode(Eg)?this._consumeCdata(a):this._attemptCharCode(vg)?this._consumeComment(a):this._consumeDocType(a):this._attemptCharCode(wg)?this._consumeTagClose(a):this._consumeTagOpen(a):da(this.peek,this.nextPeek)&&this.tokenizeExpansionForms?this._consumeExpansionFormStart():this.peek===Cg&&this.tokenizeExpansionForms?this._consumeExpansionCaseStart():this.peek===Hg&&this.isInExpansionCase()&&this.tokenizeExpansionForms?this._consumeExpansionCaseEnd():this.peek===Hg&&this.isInExpansionForm()&&this.tokenizeExpansionForms?this._consumeExpansionFormEnd():this._consumeText()}catch(b){if(!(b instanceof Tg))throw b;this.errors.push(b.error)}}return this._beginToken(dg.EOF),this._endToken([]),new kg(ia(this.tokens),this.errors)},a.prototype._getLocation=function(){return new Zf(this.file,this.index,this.line,this.column)},a.prototype._getSpan=function(a,b){return j(a)&&(a=this._getLocation()),j(b)&&(b=this._getLocation()),new _f(a,b)},a.prototype._beginToken=function(a,b){void 0===b&&(b=null),j(b)&&(b=this._getLocation()),this.currentTokenStart=b,this.currentTokenType=a},a.prototype._endToken=function(a,b){void 0===b&&(b=null),j(b)&&(b=this._getLocation());var c=new ig(this.currentTokenType,a,new _f(this.currentTokenStart,b));return this.tokens.push(c),this.currentTokenStart=null,this.currentTokenType=null,c},a.prototype._createError=function(a,b){var c=new jg(a,this.currentTokenType,b);return this.currentTokenStart=null,this.currentTokenType=null,new Tg(c)},a.prototype._advance=function(){if(this.index>=this.length)throw this._createError(X(lg),this._getSpan());this.peek===ng?(this.line++,this.column=0):this.peek!==ng&&this.peek!==og&&this.column++,this.index++,this.peek=this.index>=this.length?lg:Wc.charCodeAt(this.input,this.index),this.nextPeek=this.index+1>=this.length?lg:Wc.charCodeAt(this.input,this.index+1)},a.prototype._attemptCharCode=function(a){return this.peek===a?(this._advance(),!0):!1},a.prototype._attemptCharCodeCaseInsensitive=function(a){return ga(this.peek,a)?(this._advance(),!0):!1},a.prototype._requireCharCode=function(a){var b=this._getLocation();if(!this._attemptCharCode(a))throw this._createError(X(this.peek),this._getSpan(b,b))},a.prototype._attemptStr=function(a){for(var b=0;bd.offset&&f.push(this.input.substring(d.offset,this.index));this.peek!==b;)f.push(this._readChar(a))}return this._endToken([this._processCarriageReturns(f.join(""))],d)},a.prototype._consumeComment=function(a){var b=this;this._beginToken(dg.COMMENT_START,a),this._requireCharCode(vg),this._endToken([]);var c=this._consumeRawText(!1,vg,function(){return b._attemptStr("->")});this._beginToken(dg.COMMENT_END,c.sourceSpan.end),this._endToken([])},a.prototype._consumeCdata=function(a){var b=this;this._beginToken(dg.CDATA_START,a),this._requireStr("CDATA["),this._endToken([]);var c=this._consumeRawText(!1,Fg,function(){return b._attemptStr("]>")});this._beginToken(dg.CDATA_END,c.sourceSpan.end),this._endToken([])},a.prototype._consumeDocType=function(a){this._beginToken(dg.DOC_TYPE,a),this._attemptUntilChar(Dg),this._advance(),this._endToken([this.input.substring(a.offset+2,this.index-1)])},a.prototype._consumePrefixAndName=function(){for(var a=this.index,b=null;this.peek!==Ag&&!aa(this.peek);)this._advance();var c;this.peek===Ag?(this._advance(),b=this.input.substring(a,this.index-1),c=this.index):c=a,this._requireCharCodeUntilFn(_,this.index===c?1:0);var d=this.input.substring(c,this.index);return[b,d]},a.prototype._consumeTagOpen=function(a){var b,c=this._savePosition();try{if(!ea(this.peek))throw this._createError(X(this.peek),this._getSpan());var d=this.index;for(this._consumeTagOpenStart(a),b=this.input.substring(d,this.index).toLowerCase(),this._attemptCharCodeUntilFn(Z);this.peek!==wg&&this.peek!==Dg;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(Z),this._attemptCharCode(Cg)&&(this._attemptCharCodeUntilFn(Z),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(Z);this._consumeTagOpenEnd()}catch(e){if(e instanceof Tg)return this._restorePosition(c),this._beginToken(dg.TEXT,a),void this._endToken(["<"]);throw e}var f=S(b).contentType;f===ag.RAW_TEXT?this._consumeRawTextWithTagClose(b,!1):f===ag.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(b,!0)},a.prototype._consumeRawTextWithTagClose=function(a,b){var c=this,d=this._consumeRawText(b,Bg,function(){return c._attemptCharCode(wg)?(c._attemptCharCodeUntilFn(Z),c._attemptStrCaseInsensitive(a)?(c._attemptCharCodeUntilFn(Z),!!c._attemptCharCode(Dg)):!1):!1});this._beginToken(dg.TAG_CLOSE,d.sourceSpan.end),this._endToken([null,a])},a.prototype._consumeTagOpenStart=function(a){this._beginToken(dg.TAG_OPEN_START,a);var b=this._consumePrefixAndName();this._endToken(b)},a.prototype._consumeAttributeName=function(){this._beginToken(dg.ATTR_NAME);var a=this._consumePrefixAndName();this._endToken(a)},a.prototype._consumeAttributeValue=function(){this._beginToken(dg.ATTR_VALUE);var a;if(this.peek===ug||this.peek===rg){var b=this.peek;this._advance();for(var c=[];this.peek!==b;)c.push(this._readChar(!0));a=c.join(""),this._advance()}else{var d=this.index;this._requireCharCodeUntilFn(_,1),a=this.input.substring(d,this.index)}this._endToken([this._processCarriageReturns(a)])},a.prototype._consumeTagOpenEnd=function(){var a=this._attemptCharCode(wg)?dg.TAG_OPEN_END_VOID:dg.TAG_OPEN_END;this._beginToken(a),this._requireCharCode(Dg),this._endToken([])},a.prototype._consumeTagClose=function(a){this._beginToken(dg.TAG_CLOSE,a),this._attemptCharCodeUntilFn(Z);var b;b=this._consumePrefixAndName(),this._attemptCharCodeUntilFn(Z),this._requireCharCode(Dg),this._endToken(b)},a.prototype._consumeExpansionFormStart=function(){this._beginToken(dg.EXPANSION_FORM_START,this._getLocation()),this._requireCharCode(Gg),this._endToken([]),this._beginToken(dg.RAW_TEXT,this._getLocation());var a=this._readUntil(Ig);this._endToken([a],this._getLocation()),this._requireCharCode(Ig),this._attemptCharCodeUntilFn(Z),this._beginToken(dg.RAW_TEXT,this._getLocation());var b=this._readUntil(Ig);this._endToken([b],this._getLocation()),this._requireCharCode(Ig),this._attemptCharCodeUntilFn(Z),this.expansionCaseStack.push(dg.EXPANSION_FORM_START)},a.prototype._consumeExpansionCaseStart=function(){this._requireCharCode(Cg),this._beginToken(dg.EXPANSION_CASE_VALUE,this._getLocation());var a=this._readUntil(Gg).trim();this._endToken([a],this._getLocation()),this._attemptCharCodeUntilFn(Z),this._beginToken(dg.EXPANSION_CASE_EXP_START,this._getLocation()),this._requireCharCode(Gg),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(Z),this.expansionCaseStack.push(dg.EXPANSION_CASE_EXP_START)},a.prototype._consumeExpansionCaseEnd=function(){this._beginToken(dg.EXPANSION_CASE_EXP_END,this._getLocation()),this._requireCharCode(Hg),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(Z),this.expansionCaseStack.pop()},a.prototype._consumeExpansionFormEnd=function(){this._beginToken(dg.EXPANSION_FORM_END,this._getLocation()),this._requireCharCode(Hg),this._endToken([]),this.expansionCaseStack.pop()},a.prototype._consumeText=function(){var a=this._getLocation();this._beginToken(dg.TEXT,a);var b=[],c=!1;for(this.peek===Gg&&this.nextPeek===Gg?(b.push(this._readChar(!0)),b.push(this._readChar(!0)),c=!0):b.push(this._readChar(!0));!this.isTextEnd(c);)this.peek===Gg&&this.nextPeek===Gg?(b.push(this._readChar(!0)),b.push(this._readChar(!0)),c=!0):this.peek===Hg&&this.nextPeek===Hg&&c?(b.push(this._readChar(!0)),b.push(this._readChar(!0)),c=!1):b.push(this._readChar(!0));this._endToken([this._processCarriageReturns(b.join(""))])},a.prototype.isTextEnd=function(a){if(this.peek===Bg||this.peek===lg)return!0;if(this.tokenizeExpansionForms){if(da(this.peek,this.nextPeek))return!0;if(this.peek===Hg&&!a&&(this.isInExpansionCase()||this.isInExpansionForm()))return!0}return!1},a.prototype._savePosition=function(){return[this.peek,this.index,this.column,this.line,this.tokens.length]},a.prototype._readUntil=function(a){var b=this.index;return this._attemptUntilChar(a),this.input.substring(b,this.index)},a.prototype._restorePosition=function(a){this.peek=a[0],this.index=a[1],this.column=a[2],this.line=a[3];var b=a[4];b0&&this.expansionCaseStack[this.expansionCaseStack.length-1]===dg.EXPANSION_CASE_EXP_START},a.prototype.isInExpansionForm=function(){return this.expansionCaseStack.length>0&&this.expansionCaseStack[this.expansionCaseStack.length-1]===dg.EXPANSION_FORM_START},a}(),Vg=function(a){function b(b,c,d){a.call(this,c,d),this.elementName=b}return f(b,a),b.create=function(a,c,d){return new b(a,c,d)},b}(bg),Wg=function(){function a(a,b){this.rootNodes=a,this.errors=b}return a}(),Xg=function(){function a(){}return a.prototype.parse=function(a,b,c){void 0===c&&(c=!1);var d=W(a,b,c),e=new Zg(d.tokens).build();return new Wg(e.rootNodes,d.errors.concat(e.errors))},a}();Xg.decorators=[{type:b.Injectable}];var Yg,Zg=function(){function a(a){this.tokens=a,this.index=-1,this.rootNodes=[],this.errors=[],this.elementStack=[],this._advance()}return a.prototype.build=function(){for(;this.peek.type!==dg.EOF;)this.peek.type===dg.TAG_OPEN_START?this._consumeStartTag(this._advance()):this.peek.type===dg.TAG_CLOSE?this._consumeEndTag(this._advance()):this.peek.type===dg.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this.peek.type===dg.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this.peek.type===dg.TEXT||this.peek.type===dg.RAW_TEXT||this.peek.type===dg.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this.peek.type===dg.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance();return new Wg(this.rootNodes,this.errors)},a.prototype._advance=function(){var a=this.peek;return this.index0)return this.errors=this.errors.concat(f.errors),null;var g=new _f(b.sourceSpan.start,e.sourceSpan.end),h=new _f(c.sourceSpan.start,e.sourceSpan.end);return new Vf(b.parts[0],f.rootNodes,g,b.sourceSpan,h)},a.prototype._collectExpansionExpTokens=function(a){for(var b=[],c=[dg.EXPANSION_CASE_EXP_START];;){if(this.peek.type!==dg.EXPANSION_FORM_START&&this.peek.type!==dg.EXPANSION_CASE_EXP_START||c.push(this.peek.type),this.peek.type===dg.EXPANSION_CASE_EXP_END){if(!ka(c,dg.EXPANSION_CASE_EXP_START))return this.errors.push(Vg.create(null,a.sourceSpan,"Invalid expansion form. Missing '}'.")),null;if(c.pop(),0==c.length)return b}if(this.peek.type===dg.EXPANSION_FORM_END){if(!ka(c,dg.EXPANSION_FORM_START))return this.errors.push(Vg.create(null,a.sourceSpan,"Invalid expansion form. Missing '}'.")),null;c.pop()}if(this.peek.type===dg.EOF)return this.errors.push(Vg.create(null,a.sourceSpan,"Invalid expansion form. Missing '}'.")),null;b.push(this._advance())}},a.prototype._consumeText=function(a){var b=a.parts[0];if(b.length>0&&"\n"==b[0]){var c=this._getParentElement();i(c)&&0==c.children.length&&S(c.name).ignoreFirstLf&&(b=b.substring(1))}b.length>0&&this._addToParent(new Tf(b,a.sourceSpan))},a.prototype._closeVoidElement=function(){if(this.elementStack.length>0){var a=de.last(this.elementStack);S(a.name).isVoid&&this.elementStack.pop()}},a.prototype._consumeStartTag=function(a){for(var b=a.parts[0],c=a.parts[1],d=[];this.peek.type===dg.ATTR_NAME;)d.push(this._consumeAttr(this._advance())); +var e=ja(b,c,this._getParentElement()),f=!1;this.peek.type===dg.TAG_OPEN_END_VOID?(this._advance(),f=!0,null!=U(e)||S(e).isVoid||this.errors.push(Vg.create(e,a.sourceSpan,'Only void and foreign elements can be self closed "'+a.parts[1]+'"'))):this.peek.type===dg.TAG_OPEN_END&&(this._advance(),f=!1);var g=this.peek.sourceSpan.start,h=new _f(a.sourceSpan.start,g),i=new Xf(e,d,[],h,h,null);this._pushElement(i),f&&(this._popElement(e),i.endSourceSpan=h)},a.prototype._pushElement=function(a){if(this.elementStack.length>0){var b=de.last(this.elementStack);S(b.name).isClosedByChild(a.name)&&this.elementStack.pop()}var c=S(a.name),b=this._getParentElement();if(c.requireExtraParent(i(b)?b.name:null)){var d=new Xf(c.parentToAdd,[],[a],a.sourceSpan,a.startSourceSpan,a.endSourceSpan);this._addToParent(d),this.elementStack.push(d),this.elementStack.push(a)}else this._addToParent(a),this.elementStack.push(a)},a.prototype._consumeEndTag=function(a){var b=ja(a.parts[0],a.parts[1],this._getParentElement());this._getParentElement().endSourceSpan=a.sourceSpan,S(b).isVoid?this.errors.push(Vg.create(b,a.sourceSpan,'Void elements do not have end tags "'+a.parts[1]+'"')):this._popElement(b)||this.errors.push(Vg.create(b,a.sourceSpan,'Unexpected closing tag "'+a.parts[1]+'"'))},a.prototype._popElement=function(a){for(var b=this.elementStack.length-1;b>=0;b--){var c=this.elementStack[b];if(c.name==a)return de.splice(this.elementStack,b,this.elementStack.length-b),!0;if(!S(c.name).closedByParent)return!1}return!1},a.prototype._consumeAttr=function(a){var b=V(a.parts[0],a.parts[1]),c=a.sourceSpan.end,d="";if(this.peek.type===dg.ATTR_VALUE){var e=this._advance();d=e.parts[0],c=e.sourceSpan.end}return new Wf(b,d,new _f(a.sourceSpan.start,c))},a.prototype._getParentElement=function(){return this.elementStack.length>0?de.last(this.elementStack):null},a.prototype._addToParent=function(a){var b=this._getParentElement();i(b)?b.children.push(a):this.rootNodes.push(a)},a}(),$g="",_g=$c.create("(\\:not\\()|([-\\w]+)|(?:\\.([-\\w]+))|(?:\\[([-\\w*]+)(?:=([^\\]]*))?\\])|(\\))|(\\s*,\\s*)"),ah=function(){function a(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}return a.parse=function(b){for(var c,d=[],e=function(a,b){b.notSelectors.length>0&&j(b.element)&&de.isEmpty(b.classNames)&&de.isEmpty(b.attrs)&&(b.element="*"),a.push(b)},f=new a,g=$c.matcher(_g,b),h=f,k=!1;i(c=_c.next(g));){if(i(c[1])){if(k)throw new ge("Nesting :not is not allowed in a selector");k=!0,h=new a,f.notSelectors.push(h)}if(i(c[2])&&h.setElement(c[2]),i(c[3])&&h.addClassName(c[3]),i(c[4])&&h.addAttribute(c[4],c[5]),i(c[6])&&(k=!1,h=f),i(c[7])){if(k)throw new ge("Multiple selectors in :not are not supported");e(d,f),f=h=new a}}return e(d,f),d},a.prototype.isElementSelector=function(){return i(this.element)&&de.isEmpty(this.classNames)&&de.isEmpty(this.attrs)&&0===this.notSelectors.length},a.prototype.setElement=function(a){void 0===a&&(a=null),this.element=a},a.prototype.getMatchingElementTemplate=function(){for(var a=i(this.element)?this.element:"div",b=this.classNames.length>0?' class="'+this.classNames.join(" ")+'"':"",c="",d=0;d"},a.prototype.addAttribute=function(a,b){void 0===b&&(b=$g),this.attrs.push(a),b=i(b)?b.toLowerCase():$g,this.attrs.push(b)},a.prototype.addClassName=function(a){this.classNames.push(a.toLowerCase())},a.prototype.toString=function(){var a="";if(i(this.element)&&(a+=this.element),i(this.classNames))for(var b=0;b0&&(a+="="+d),a+="]"}return this.notSelectors.forEach(function(b){return a+=":not("+b+")"}),a},a}(),bh=function(){function a(){this._elementMap=new ae,this._elementPartialMap=new ae,this._classMap=new ae,this._classPartialMap=new ae,this._attrValueMap=new ae,this._attrValuePartialMap=new ae,this._listContexts=[]}return a.createNotMatcher=function(b){var c=new a;return c.addSelectables(b,null),c},a.prototype.addSelectables=function(a,b){var c=null;a.length>1&&(c=new ch(a),this._listContexts.push(c));for(var d=0;d0&&(j(this.listContext)||!this.listContext.alreadyMatched)){var d=bh.createNotMatcher(this.notSelectors);c=!d.match(a,null)}return c&&i(b)&&(j(this.listContext)||!this.listContext.alreadyMatched)&&(i(this.listContext)&&(this.listContext.alreadyMatched=!0),b(this.selector,this.cbContext)),c},a}(),eh="select",fh="ng-content",gh="link",hh="rel",ih="href",jh="stylesheet",kh="style",lh="script",mh="ngNonBindable",nh="ngProjectAs";!function(a){a[a.NG_CONTENT=0]="NG_CONTENT",a[a.STYLE=1]="STYLE",a[a.STYLESHEET=2]="STYLESHEET",a[a.SCRIPT=3]="SCRIPT",a[a.OTHER=4]="OTHER"}(Yg||(Yg={}));var oh=function(){function a(a,b,c,d,e){this.type=a,this.selectAttr=b,this.hrefAttr=c,this.nonBindable=d,this.projectAs=e}return a}(),ph=function(){function a(a,b){this.style=a,this.styleUrls=b}return a}(),qh=/@import\s+(?:url\()?\s*(?:(?:['"]([^'"]*))|([^;\)\s]*))[^;]*;?/g,rh=/^([a-zA-Z\-\+\.]+):/g,sh=Rc?".dart":"",th=/([A-Z])/g,uh=function(){function a(){}return a.prototype.visitArray=function(a,b){var c=this;return a.map(function(a){return sa(a,c,b)})},a.prototype.visitStringMap=function(a,b){var c=this,d={};return ce.forEach(a,function(a,e){d[e]=sa(a,c,b)}),d},a.prototype.visitPrimitive=function(a,b){return a},a.prototype.visitOther=function(a,b){return a},a}(),vh="asset:",wh={provide:b.PACKAGE_ROOT_URL,useValue:"/"},xh=function(){function a(a){void 0===a&&(a=null),this._packagePrefix=a}return a.prototype.resolve=function(a,b){var c=b;i(a)&&a.length>0&&(c=Aa(a,c));var d=xa(c),e=this._packagePrefix;if(i(e)&&i(d)&&"package"==d[yh.Scheme]){var f=d[yh.Path];if(this._packagePrefix!==vh)return e=Wc.stripRight(e,"/"),f=Wc.stripLeft(f,"/"),e+"/"+f;var g=f.split(/\//);c="asset:"+g[0]+"/lib/"+g.slice(1).join("/")}return c},a}();xh.decorators=[{type:b.Injectable}],xh.ctorParameters=[{type:void 0,decorators:[{type:b.Inject,args:[b.PACKAGE_ROOT_URL]}]}];var yh,zh=$c.create("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");!function(a){a[a.Scheme=1]="Scheme",a[a.UserInfo=2]="UserInfo",a[a.Domain=3]="Domain",a[a.Port=4]="Port",a[a.Path=5]="Path",a[a.QueryData=6]="QueryData",a[a.Fragment=7]="Fragment"}(yh||(yh={}));var Ah=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))$/g,Bh=function(){function a(){}return Object.defineProperty(a.prototype,"identifier",{get:function(){return B()},enumerable:!0,configurable:!0}),a}(),Ch=function(a){function b(){a.apply(this,arguments)}return f(b,a),Object.defineProperty(b.prototype,"type",{get:function(){return B()},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"identifier",{get:function(){return B()},enumerable:!0,configurable:!0}),b}(Bh),Dh=function(){function a(a){var b=void 0===a?{}:a,c=b.runtime,d=b.name,e=b.moduleUrl,f=b.prefix,g=b.value;this.runtime=c,this.name=d,this.prefix=f,this.moduleUrl=e,this.value=g}return a.fromJson=function(b){var c=p(b.value)?Da(b.value,Ba):Fa(b.value,Ba);return new a({name:b.name,prefix:b.prefix,moduleUrl:b.moduleUrl,value:c})},a.prototype.toJson=function(){var a=p(this.value)?Ea(this.value):Ga(this.value);return{"class":"Identifier",name:this.name,moduleUrl:this.moduleUrl,prefix:this.prefix,value:a}},Object.defineProperty(a.prototype,"identifier",{get:function(){return this},enumerable:!0,configurable:!0}),a}(),Eh=function(){function a(a){var b=void 0===a?{}:a,c=b.isAttribute,d=b.isSelf,e=b.isHost,f=b.isSkipSelf,g=b.isOptional,h=b.isValue,i=b.query,j=b.viewQuery,k=b.token,l=b.value;this.isAttribute=v(c),this.isSelf=v(d),this.isHost=v(e),this.isSkipSelf=v(f),this.isOptional=v(g),this.isValue=v(h),this.query=i,this.viewQuery=j,this.token=k,this.value=l}return a.fromJson=function(b){return new a({token:Fa(b.token,Hh.fromJson),query:Fa(b.query,Kh.fromJson),viewQuery:Fa(b.viewQuery,Kh.fromJson),value:b.value,isAttribute:b.isAttribute,isSelf:b.isSelf,isHost:b.isHost,isSkipSelf:b.isSkipSelf,isOptional:b.isOptional,isValue:b.isValue})},a.prototype.toJson=function(){return{token:Ga(this.token),query:Ga(this.query),viewQuery:Ga(this.viewQuery),value:this.value,isAttribute:this.isAttribute,isSelf:this.isSelf,isHost:this.isHost,isSkipSelf:this.isSkipSelf,isOptional:this.isOptional,isValue:this.isValue}},a}(),Fh=function(){function a(a){var b=a.token,c=a.useClass,d=a.useValue,e=a.useExisting,f=a.useFactory,g=a.deps,h=a.multi;this.token=b,this.useClass=c,this.useValue=d,this.useExisting=e,this.useFactory=f,this.deps=u(g),this.multi=v(h)}return a.fromJson=function(b){return new a({token:Fa(b.token,Hh.fromJson),useClass:Fa(b.useClass,Jh.fromJson),useExisting:Fa(b.useExisting,Hh.fromJson),useValue:Fa(b.useValue,Dh.fromJson),useFactory:Fa(b.useFactory,Gh.fromJson),multi:b.multi,deps:Da(b.deps,Eh.fromJson)})},a.prototype.toJson=function(){return{"class":"Provider",token:Ga(this.token),useClass:Ga(this.useClass),useExisting:Ga(this.useExisting),useValue:Ga(this.useValue),useFactory:Ga(this.useFactory),multi:this.multi,deps:Ea(this.deps)}},a}(),Gh=function(){function a(a){var b=a.runtime,c=a.name,d=a.moduleUrl,e=a.prefix,f=a.diDeps,g=a.value;this.runtime=b,this.name=c,this.prefix=e,this.moduleUrl=d,this.diDeps=Ha(f),this.value=g}return Object.defineProperty(a.prototype,"identifier",{get:function(){return this},enumerable:!0,configurable:!0}),a.fromJson=function(b){return new a({name:b.name,prefix:b.prefix,moduleUrl:b.moduleUrl,value:b.value,diDeps:Da(b.diDeps,Eh.fromJson)})},a.prototype.toJson=function(){return{"class":"Factory",name:this.name,prefix:this.prefix,moduleUrl:this.moduleUrl,value:this.value,diDeps:Ea(this.diDeps)}},a}(),Hh=function(){function a(a){var b=a.value,c=a.identifier,d=a.identifierIsInstance;this.value=b,this.identifier=c,this.identifierIsInstance=v(d)}return a.fromJson=function(b){return new a({value:b.value,identifier:Fa(b.identifier,Dh.fromJson),identifierIsInstance:b.identifierIsInstance})},a.prototype.toJson=function(){return{value:this.value,identifier:Ga(this.identifier),identifierIsInstance:this.identifierIsInstance}},Object.defineProperty(a.prototype,"runtimeCacheKey",{get:function(){return i(this.identifier)?this.identifier.runtime:this.value},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"assetCacheKey",{get:function(){return i(this.identifier)?i(this.identifier.moduleUrl)&&i(va(this.identifier.moduleUrl))?this.identifier.name+"|"+this.identifier.moduleUrl+"|"+this.identifierIsInstance:null:this.value},enumerable:!0,configurable:!0}),a.prototype.equalsTo=function(a){var b=this.runtimeCacheKey,c=this.assetCacheKey;return i(b)&&b==a.runtimeCacheKey||i(c)&&c==a.assetCacheKey},Object.defineProperty(a.prototype,"name",{get:function(){return i(this.value)?ra(this.value):this.identifier.name},enumerable:!0,configurable:!0}),a}(),Ih=function(){function a(){this._valueMap=new Map,this._values=[]}return a.prototype.add=function(a,b){var c=this.get(a);if(i(c))throw new ge("Can only add to a TokenMap! Token: "+a.name);this._values.push(b);var d=a.runtimeCacheKey;i(d)&&this._valueMap.set(d,b);var e=a.assetCacheKey;i(e)&&this._valueMap.set(e,b)},a.prototype.get=function(a){var b,c=a.runtimeCacheKey,d=a.assetCacheKey;return i(c)&&(b=this._valueMap.get(c)),j(b)&&i(d)&&(b=this._valueMap.get(d)),b},a.prototype.values=function(){return this._values},Object.defineProperty(a.prototype,"size",{get:function(){return this._values.length},enumerable:!0,configurable:!0}),a}(),Jh=function(){function a(a){var b=void 0===a?{}:a,c=b.runtime,d=b.name,e=b.moduleUrl,f=b.prefix,g=b.isHost,h=b.value,i=b.diDeps;this.runtime=c,this.name=d,this.moduleUrl=e,this.prefix=f,this.isHost=v(g),this.value=h,this.diDeps=Ha(i)}return a.fromJson=function(b){return new a({name:b.name,moduleUrl:b.moduleUrl,prefix:b.prefix,isHost:b.isHost,value:b.value,diDeps:Da(b.diDeps,Eh.fromJson)})},Object.defineProperty(a.prototype,"identifier",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"type",{get:function(){return this},enumerable:!0,configurable:!0}),a.prototype.toJson=function(){return{"class":"Type",name:this.name,moduleUrl:this.moduleUrl,prefix:this.prefix,isHost:this.isHost,value:this.value,diDeps:Ea(this.diDeps)}},a}(),Kh=function(){function a(a){var b=void 0===a?{}:a,c=b.selectors,d=b.descendants,e=b.first,f=b.propertyName,g=b.read;this.selectors=c,this.descendants=v(d),this.first=v(e),this.propertyName=f,this.read=g}return a.fromJson=function(b){return new a({selectors:Da(b.selectors,Hh.fromJson),descendants:b.descendants,first:b.first,propertyName:b.propertyName,read:Fa(b.read,Hh.fromJson)})},a.prototype.toJson=function(){return{selectors:Ea(this.selectors),descendants:this.descendants,first:this.first,propertyName:this.propertyName,read:Ga(this.read)}},a}(),Lh=function(){function a(a){var c=void 0===a?{}:a,d=c.encapsulation,e=c.template,f=c.templateUrl,g=c.styles,h=c.styleUrls,j=c.ngContentSelectors;this.encapsulation=i(d)?d:b.ViewEncapsulation.Emulated,this.template=e,this.templateUrl=f,this.styles=i(g)?g:[],this.styleUrls=i(h)?h:[],this.ngContentSelectors=i(j)?j:[]}return a.fromJson=function(b){return new a({encapsulation:i(b.encapsulation)?Ed[b.encapsulation]:b.encapsulation,template:b.template,templateUrl:b.templateUrl,styles:b.styles,styleUrls:b.styleUrls,ngContentSelectors:b.ngContentSelectors})},a.prototype.toJson=function(){return{encapsulation:i(this.encapsulation)?s(this.encapsulation):this.encapsulation,template:this.template,templateUrl:this.templateUrl,styles:this.styles,styleUrls:this.styleUrls,ngContentSelectors:this.ngContentSelectors}},a}(),Mh=function(){function a(a){var b=void 0===a?{}:a,c=b.type,d=b.isComponent,e=b.selector,f=b.exportAs,g=b.changeDetection,h=b.inputs,i=b.outputs,j=b.hostListeners,k=b.hostProperties,l=b.hostAttributes,m=b.lifecycleHooks,n=b.providers,o=b.viewProviders,p=b.queries,q=b.viewQueries,r=b.template;this.type=c,this.isComponent=d,this.selector=e,this.exportAs=f,this.changeDetection=g,this.inputs=h,this.outputs=i,this.hostListeners=j,this.hostProperties=k,this.hostAttributes=l,this.lifecycleHooks=Ha(m),this.providers=Ha(n),this.viewProviders=Ha(o),this.queries=Ha(p),this.viewQueries=Ha(q),this.template=r}return a.create=function(b){var c=void 0===b?{}:b,d=c.type,e=c.isComponent,f=c.selector,g=c.exportAs,h=c.changeDetection,k=c.inputs,l=c.outputs,m=c.host,n=c.lifecycleHooks,o=c.providers,p=c.viewProviders,q=c.queries,r=c.viewQueries,s=c.template,t={},u={},w={};i(m)&&ce.forEach(m,function(a,b){var c=$c.firstMatch(Ah,b);j(c)?w[b]=a:i(c[1])?u[c[1]]=a:i(c[2])&&(t[c[2]]=a)});var x={};i(k)&&k.forEach(function(a){var b=qa(a,[a,a]);x[b[0]]=b[1]});var y={};return i(l)&&l.forEach(function(a){var b=qa(a,[a,a]);y[b[0]]=b[1]}),new a({type:d,isComponent:v(e),selector:f,exportAs:g,changeDetection:h,inputs:x,outputs:y,hostListeners:t,hostProperties:u,hostAttributes:w,lifecycleHooks:i(n)?n:[],providers:o,viewProviders:p,queries:q,viewQueries:r,template:s})},Object.defineProperty(a.prototype,"identifier",{get:function(){return this.type},enumerable:!0,configurable:!0}),a.fromJson=function(b){return new a({isComponent:b.isComponent,selector:b.selector,exportAs:b.exportAs,type:i(b.type)?Jh.fromJson(b.type):b.type,changeDetection:i(b.changeDetection)?rd[b.changeDetection]:b.changeDetection,inputs:b.inputs,outputs:b.outputs,hostListeners:b.hostListeners,hostProperties:b.hostProperties,hostAttributes:b.hostAttributes,lifecycleHooks:b.lifecycleHooks.map(function(a){return td[a]}),template:i(b.template)?Lh.fromJson(b.template):b.template,providers:Da(b.providers,Ba),viewProviders:Da(b.viewProviders,Ba),queries:Da(b.queries,Kh.fromJson),viewQueries:Da(b.viewQueries,Kh.fromJson)})},a.prototype.toJson=function(){return{"class":"Directive",isComponent:this.isComponent,selector:this.selector,exportAs:this.exportAs,type:i(this.type)?this.type.toJson():this.type,changeDetection:i(this.changeDetection)?s(this.changeDetection):this.changeDetection,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,lifecycleHooks:this.lifecycleHooks.map(function(a){return s(a)}),template:i(this.template)?this.template.toJson():this.template,providers:Ea(this.providers),viewProviders:Ea(this.viewProviders),queries:Ea(this.queries),viewQueries:Ea(this.viewQueries)}},a}(),Nh=function(){function a(a){var b=void 0===a?{}:a,c=b.type,d=b.name,e=b.pure,f=b.lifecycleHooks;this.type=c,this.name=d,this.pure=v(e),this.lifecycleHooks=Ha(f)}return Object.defineProperty(a.prototype,"identifier",{get:function(){return this.type},enumerable:!0,configurable:!0}),a.fromJson=function(b){return new a({type:i(b.type)?Jh.fromJson(b.type):b.type,name:b.name,pure:b.pure})},a.prototype.toJson=function(){return{"class":"Pipe",type:i(this.type)?this.type.toJson():null,name:this.name,pure:this.pure}},a}(),Oh={Directive:Mh.fromJson,Pipe:Nh.fromJson,Type:Jh.fromJson,Provider:Fh.fromJson,Identifier:Dh.fromJson,Factory:Gh.fromJson},Ph=ta("core","linker/view"),Qh=ta("core","linker/view_utils"),Rh=ta("core","change_detection/change_detection"),Sh=Dd,Th=wd,Uh=xd,Vh=Fd,Wh=vd,Xh=b.ElementRef,Yh=b.ViewContainerRef,Zh=b.ChangeDetectorRef,$h=b.RenderComponentType,_h=b.QueryList,ai=b.TemplateRef,bi=Kd,ci=Jd,di=b.Injector,ei=b.ViewEncapsulation,fi=yd,gi=b.ChangeDetectionStrategy,hi=Gd,ii=b.Renderer,ji=b.SimpleChange,ki=Id,li=qd,mi=Bd,ni=Hd,oi=Cd,pi=Ad,qi=$d,ri=Od,si=Pd,ti=function(){function a(){}return a}();ti.ViewUtils=new Dh({name:"ViewUtils",moduleUrl:ta("core","linker/view_utils"),runtime:Sh}),ti.AppView=new Dh({name:"AppView",moduleUrl:Ph,runtime:Th}),ti.DebugAppView=new Dh({name:"DebugAppView",moduleUrl:Ph,runtime:Uh}),ti.AppElement=new Dh({name:"AppElement",moduleUrl:ta("core","linker/element"),runtime:Wh}),ti.ElementRef=new Dh({name:"ElementRef",moduleUrl:ta("core","linker/element_ref"),runtime:Xh}),ti.ViewContainerRef=new Dh({name:"ViewContainerRef",moduleUrl:ta("core","linker/view_container_ref"),runtime:Yh}),ti.ChangeDetectorRef=new Dh({name:"ChangeDetectorRef",moduleUrl:ta("core","change_detection/change_detector_ref"),runtime:Zh}),ti.RenderComponentType=new Dh({name:"RenderComponentType",moduleUrl:ta("core","render/api"),runtime:$h}),ti.QueryList=new Dh({name:"QueryList",moduleUrl:ta("core","linker/query_list"),runtime:_h}),ti.TemplateRef=new Dh({name:"TemplateRef",moduleUrl:ta("core","linker/template_ref"),runtime:ai}),ti.TemplateRef_=new Dh({name:"TemplateRef_",moduleUrl:ta("core","linker/template_ref"),runtime:bi}),ti.ValueUnwrapper=new Dh({name:"ValueUnwrapper",moduleUrl:Rh,runtime:ci}),ti.Injector=new Dh({name:"Injector",moduleUrl:ta("core","di/injector"),runtime:di}),ti.ViewEncapsulation=new Dh({name:"ViewEncapsulation",moduleUrl:ta("core","metadata/view"),runtime:ei}),ti.ViewType=new Dh({name:"ViewType",moduleUrl:ta("core","linker/view_type"),runtime:fi}),ti.ChangeDetectionStrategy=new Dh({name:"ChangeDetectionStrategy",moduleUrl:Rh,runtime:gi}),ti.StaticNodeDebugInfo=new Dh({name:"StaticNodeDebugInfo",moduleUrl:ta("core","linker/debug_context"),runtime:hi}),ti.DebugContext=new Dh({name:"DebugContext",moduleUrl:ta("core","linker/debug_context"),runtime:Vh}),ti.Renderer=new Dh({name:"Renderer",moduleUrl:ta("core","render/api"),runtime:ii}),ti.SimpleChange=new Dh({name:"SimpleChange",moduleUrl:Rh,runtime:ji}),ti.uninitialized=new Dh({name:"uninitialized",moduleUrl:Rh,runtime:ki}),ti.ChangeDetectorState=new Dh({name:"ChangeDetectorState",moduleUrl:Rh,runtime:li}),ti.checkBinding=new Dh({name:"checkBinding",moduleUrl:Qh,runtime:pi}),ti.flattenNestedViewRenderNodes=new Dh({name:"flattenNestedViewRenderNodes",moduleUrl:Qh,runtime:mi}),ti.devModeEqual=new Dh({name:"devModeEqual",moduleUrl:Rh,runtime:ni}),ti.interpolate=new Dh({name:"interpolate",moduleUrl:Qh,runtime:oi}),ti.castByValue=new Dh({name:"castByValue",moduleUrl:Qh,runtime:qi}),ti.EMPTY_ARRAY=new Dh({name:"EMPTY_ARRAY",moduleUrl:Qh,runtime:ri}),ti.EMPTY_MAP=new Dh({name:"EMPTY_MAP",moduleUrl:Qh,runtime:si}),ti.pureProxies=[null,new Dh({name:"pureProxy1",moduleUrl:Qh,runtime:Qd}),new Dh({name:"pureProxy2",moduleUrl:Qh,runtime:Rd}),new Dh({name:"pureProxy3",moduleUrl:Qh,runtime:Sd}),new Dh({name:"pureProxy4",moduleUrl:Qh,runtime:Td}),new Dh({name:"pureProxy5",moduleUrl:Qh,runtime:Ud}),new Dh({name:"pureProxy6",moduleUrl:Qh,runtime:Vd}),new Dh({name:"pureProxy7",moduleUrl:Qh,runtime:Wd}),new Dh({name:"pureProxy8",moduleUrl:Qh,runtime:Xd}),new Dh({name:"pureProxy9",moduleUrl:Qh,runtime:Yd}),new Dh({name:"pureProxy10",moduleUrl:Qh,runtime:Zd})],ti.SecurityContext=new Dh({name:"SecurityContext",moduleUrl:ta("core","security"),runtime:Ld});var ui=function(a){function b(b,c){a.call(this,c,b)}return f(b,a),b}(bg),vi=function(){function a(a,b){var c=this;this.component=a,this.sourceSpan=b,this.errors=[],this.viewQueries=Oa(a),this.viewProviders=new Ih,La(a.viewProviders,b,this.errors).forEach(function(a){j(c.viewProviders.get(a.token))&&c.viewProviders.add(a.token,!0)})}return a}(),wi=function(){function b(a,b,c,d,e,f,g){var h=this;this._viewContext=a,this._parent=b,this._isViewRoot=c,this._directiveAsts=d,this._sourceSpan=g,this._transformedProviders=new Ih,this._seenProviders=new Ih,this._hasViewContainer=!1,this._attrs={},e.forEach(function(a){return h._attrs[a.name]=a.value});var j=d.map(function(a){return a.directive});this._allProviders=Ma(j,g,a.errors),this._contentQueries=Pa(j);var k=new Ih;this._allProviders.values().forEach(function(a){h._addQueryReadsTo(a.token,k)}),f.forEach(function(a){h._addQueryReadsTo(new Hh({value:a.name}),k)}),i(k.get(Ia(ti.ViewContainerRef)))&&(this._hasViewContainer=!0),this._allProviders.values().forEach(function(a){var b=a.eager||i(k.get(a.token));b&&h._getOrCreateLocalProvider(a.providerType,a.token,!0)})}return b.prototype.afterElement=function(){var a=this;this._allProviders.values().forEach(function(b){a._getOrCreateLocalProvider(b.providerType,b.token,!1)})},Object.defineProperty(b.prototype,"transformProviders",{get:function(){return this._transformedProviders.values()},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"transformedDirectiveAsts",{get:function(){var a=this._transformedProviders.values().map(function(a){return a.token.identifier}),b=de.clone(this._directiveAsts);return de.sort(b,function(b,c){return a.indexOf(b.directive.type)-a.indexOf(c.directive.type)}),b},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"transformedHasViewContainer",{get:function(){return this._hasViewContainer},enumerable:!0,configurable:!0}),b.prototype._addQueryReadsTo=function(a,b){this._getQueriesFor(a).forEach(function(c){var d=i(c.read)?c.read:a;j(b.get(d))&&b.add(d,!0)})},b.prototype._getQueriesFor=function(a){for(var b,c=[],d=this,e=0;null!==d;)b=d._contentQueries.get(a),i(b)&&de.addAll(c,b.filter(function(a){return a.descendants||1>=e})),d._directiveAsts.length>0&&e++,d=d._parent;return b=this._viewContext.viewQueries.get(a),i(b)&&de.addAll(c,b),c},b.prototype._getOrCreateLocalProvider=function(b,c,d){var e=this,f=this._allProviders.get(c);if(j(f)||(b===a.ProviderAstType.Directive||b===a.ProviderAstType.PublicService)&&f.providerType===a.ProviderAstType.PrivateService||(b===a.ProviderAstType.PrivateService||b===a.ProviderAstType.PublicService)&&f.providerType===a.ProviderAstType.Builtin)return null;var g=this._transformedProviders.get(c);if(i(g))return g;if(i(this._seenProviders.get(c)))return this._viewContext.errors.push(new ui("Cannot instantiate cyclic dependency! "+c.name,this._sourceSpan)),null;this._seenProviders.add(c,!0);var h=f.providers.map(function(a){var b,c=a.useValue,g=a.useExisting;if(i(a.useExisting)){var h=e._getDependency(f.providerType,new Eh({token:a.useExisting}),d);i(h.token)?g=h.token:(g=null,c=h.value)}else if(i(a.useFactory)){var j=i(a.deps)?a.deps:a.useFactory.diDeps;b=j.map(function(a){return e._getDependency(f.providerType,a,d)})}else if(i(a.useClass)){var j=i(a.deps)?a.deps:a.useClass.diDeps;b=j.map(function(a){return e._getDependency(f.providerType,a,d)})}return Ja(a,{useExisting:g,useValue:c,deps:b})});return g=Ka(f,{eager:d,providers:h}),this._transformedProviders.add(c,g),g},b.prototype._getLocalDependency=function(b,c,d){if(void 0===d&&(d=null),c.isAttribute){var e=this._attrs[c.token.value];return new Eh({isValue:!0,value:u(e)})}if(i(c.query)||i(c.viewQuery))return c;if(i(c.token)){if(b===a.ProviderAstType.Directive||b===a.ProviderAstType.Component){if(c.token.equalsTo(Ia(ti.Renderer))||c.token.equalsTo(Ia(ti.ElementRef))||c.token.equalsTo(Ia(ti.ChangeDetectorRef))||c.token.equalsTo(Ia(ti.TemplateRef)))return c;c.token.equalsTo(Ia(ti.ViewContainerRef))&&(this._hasViewContainer=!0)}if(c.token.equalsTo(Ia(ti.Injector)))return c;if(i(this._getOrCreateLocalProvider(b,c.token,d)))return c}return null},b.prototype._getDependency=function(b,c,d){void 0===d&&(d=null);var e=this,f=d,g=null;if(c.isSkipSelf||(g=this._getLocalDependency(b,c,d)),c.isSelf)j(g)&&c.isOptional&&(g=new Eh({isValue:!0,value:null}));else{for(;j(g)&&i(e._parent);){var h=e;e=e._parent,h._isViewRoot&&(f=!1),g=e._getLocalDependency(a.ProviderAstType.PublicService,c,f)}j(g)&&(g=!c.isHost||this._viewContext.component.type.isHost||Ia(this._viewContext.component.type).equalsTo(c.token)||i(this._viewContext.viewProviders.get(c.token))?c:c.isOptional?g=new Eh({isValue:!0,value:null}):null)}return j(g)&&this._viewContext.errors.push(new ui("No provider for "+c.token.name,this._sourceSpan)),g},b}(),xi=/^(?:(?:(?:(bind-)|(var-)|(let-)|(ref-|#)|(on-)|(bindon-))(.+))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/g,yi="template",zi="template",Ai="*",Bi="class",Ci=".",Di="attr",Ei="class",Fi="style",Gi=ah.parse("*")[0],Hi=new b.OpaqueToken("TemplateTransforms"),Ii=function(a){function b(b,c,d){a.call(this,c,b,d)}return f(b,a),b}(bg),Ji=function(){function a(a,b){this.templateAst=a,this.errors=b}return a}(),Ki=function(){function a(a,b,c,d,e){this._exprParser=a,this._schemaRegistry=b,this._htmlParser=c,this._console=d,this.transforms=e}return a.prototype.parse=function(a,b,c,d,e){var f=this.tryParse(a,b,c,d,e),g=f.errors.filter(function(a){return a.level===Qf.WARNING}),h=f.errors.filter(function(a){return a.level===Qf.FATAL});if(g.length>0&&this._console.warn("Template parse warnings:\n"+g.join("\n")),h.length>0){var i=h.join("\n");throw new ge("Template parse errors:\n"+i)}return f.templateAst},a.prototype.tryParse=function(a,b,c,d,e){var f,g=this._htmlParser.parse(b,e),h=g.errors;if(g.rootNodes.length>0){var j=Ta(c),k=Ta(d),l=new vi(a,g.rootNodes[0].sourceSpan),m=new Mi(l,j,k,this._exprParser,this._schemaRegistry);f=R(m,g.rootNodes,Ri),h=h.concat(m.errors).concat(l.errors)}else f=[];return h.length>0?new Ji(f,h):(i(this.transforms)&&this.transforms.forEach(function(a){f=z(a,f)}),new Ji(f,h))},a}();Ki.decorators=[{type:b.Injectable}],Ki.ctorParameters=[{type:Pf},{type:Qc},{type:Xg},{type:_d},{type:void 0,decorators:[{type:b.Optional},{type:b.Inject,args:[Hi]}]}];var Li,Mi=function(){function b(a,b,c,d,e){var f=this;this.providerViewContext=a,this._exprParser=d,this._schemaRegistry=e,this.errors=[],this.directivesIndex=new Map,this.ngContentCount=0,this.selectorMatcher=new bh,de.forEachWithIndex(b,function(a,b){var c=ah.parse(a.selector);f.selectorMatcher.addSelectables(c,a),f.directivesIndex.set(a,b)}),this.pipesByName=new Map,c.forEach(function(a){return f.pipesByName.set(a.name,a)})}return b.prototype._reportError=function(a,b,c){void 0===c&&(c=Qf.FATAL),this.errors.push(new Ii(a,b,c))},b.prototype._parseInterpolation=function(a,b){var c=b.start.toString();try{var d=this._exprParser.parseInterpolation(a,c);if(this._checkPipes(d,b),i(d)&&d.ast.expressions.length>zd)throw new ge("Only support at most "+zd+" interpolation values!");return d}catch(e){return this._reportError(""+e,b),this._exprParser.wrapLiteralPrimitive("ERROR",c)}},b.prototype._parseAction=function(a,b){var c=b.start.toString();try{var d=this._exprParser.parseAction(a,c);return this._checkPipes(d,b),d}catch(e){return this._reportError(""+e,b),this._exprParser.wrapLiteralPrimitive("ERROR",c)}},b.prototype._parseBinding=function(a,b){var c=b.start.toString();try{var d=this._exprParser.parseBinding(a,c);return this._checkPipes(d,b),d}catch(e){return this._reportError(""+e,b),this._exprParser.wrapLiteralPrimitive("ERROR",c)}},b.prototype._parseTemplateBindings=function(a,b){var c=this,d=b.start.toString();try{var e=this._exprParser.parseTemplateBindings(a,d);return e.templateBindings.forEach(function(a){i(a.expression)&&c._checkPipes(a.expression,b)}),e.warnings.forEach(function(a){c._reportError(a,b,Qf.WARNING)}),e.templateBindings}catch(f){return this._reportError(""+f,b),[]}},b.prototype._checkPipes=function(a,b){var c=this;if(i(a)){var d=new Ti;a.visit(d),d.pipes.forEach(function(a){c.pipesByName.has(a)||c._reportError("The pipe '"+a+"' could not be found",b)})}},b.prototype.visitExpansion=function(a,b){return null},b.prototype.visitExpansionCase=function(a,b){return null},b.prototype.visitText=function(a,b){var c=b.findNgContentIndex(Gi),d=this._parseInterpolation(a.value,a.sourceSpan);return i(d)?new cd(d,c,a.sourceSpan):new bd(a.value,c,a.sourceSpan)},b.prototype.visitAttr=function(a,b){return new dd(a.name,a.value,a.sourceSpan)},b.prototype.visitComment=function(a,b){return null},b.prototype.visitElement=function(a,b){var c=this,d=a.name,e=la(a);if(e.type===Yg.SCRIPT||e.type===Yg.STYLE)return null;if(e.type===Yg.STYLESHEET&&na(e.hrefAttr))return null;var f=[],g=[],h=[],j=[],k=[],l=[],m=[],n=[],o=!1,p=[],q=T(d.toLowerCase())[1],r=q==yi;a.attrs.forEach(function(a){var b=c._parseAttr(r,a,f,g,k,h,j),d=c._parseInlineTemplateBinding(a,m,l,n);b||d||(p.push(c.visitAttr(a,null)),f.push([a.name,a.value])), +d&&(o=!0)});var s=Sa(d,f),t=this._parseDirectives(this.selectorMatcher,s),u=[],v=this._createDirectiveAsts(r,a.name,t,g,h,a.sourceSpan,u),w=this._createElementPropertyAsts(a.name,g,v),x=b.isTemplateElement||o,y=new wi(this.providerViewContext,b.providerContext,x,v,p,u,a.sourceSpan),z=R(e.nonBindable?Si:this,a.children,Qi.create(r,v,r?b.providerContext:y));y.afterElement();var A,B=i(e.projectAs)?ah.parse(e.projectAs)[0]:s,C=b.findNgContentIndex(B);if(e.type===Yg.NG_CONTENT)i(a.children)&&a.children.length>0&&this._reportError(" element cannot have content. must be immediately followed by ",a.sourceSpan),A=new nd(this.ngContentCount++,o?null:C,a.sourceSpan);else if(r)this._assertAllEventsPublishedByDirectives(v,k),this._assertNoComponentsNorElementBindingsOnTemplate(v,w,a.sourceSpan),A=new jd(p,k,u,j,y.transformedDirectiveAsts,y.transformProviders,y.transformedHasViewContainer,z,o?null:C,a.sourceSpan);else{this._assertOnlyOneComponent(v,a.sourceSpan);var D=o?null:b.findNgContentIndex(B);A=new id(d,p,w,k,u,y.transformedDirectiveAsts,y.transformProviders,y.transformedHasViewContainer,z,o?null:D,a.sourceSpan)}if(o){var E=Sa(yi,m),F=this._parseDirectives(this.selectorMatcher,E),G=this._createDirectiveAsts(!0,a.name,F,l,[],a.sourceSpan,[]),H=this._createElementPropertyAsts(a.name,l,G);this._assertNoComponentsNorElementBindingsOnTemplate(G,H,a.sourceSpan);var I=new wi(this.providerViewContext,b.providerContext,b.isTemplateElement,G,[],[],a.sourceSpan);I.afterElement(),A=new jd([],[],[],n,I.transformedDirectiveAsts,I.transformProviders,I.transformedHasViewContainer,[A],C,a.sourceSpan)}return A},b.prototype._parseInlineTemplateBinding=function(a,b,c,d){var e=null;if(a.name==zi)e=a.value;else if(a.name.startsWith(Ai)){var f=a.name.substring(Ai.length);e=0==a.value.length?f:f+" "+a.value}if(i(e)){for(var g=this._parseTemplateBindings(e,a.sourceSpan),h=0;h elements is deprecated. Use "let-" instead!',b.sourceSpan,Qf.WARNING),this._parseVariable(m,j,b.sourceSpan,g)):(this._reportError('"var-" on non