intermediate-component-sa 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app.server.js +7 -0
- package/client/css/main.css +1 -0
- package/{src/client → client}/index.html +6 -40
- package/client/js/app.js +1 -0
- package/client/js/shims.js +17 -0
- package/{src/client → client}/tsconfig.json +0 -0
- package/package.json +75 -340
- package/{src/server/config/app.config.ts → server/config/app.config.js} +47 -57
- package/server/config/jwt.config.js +4 -0
- package/{src/server/config/logger.config.ts → server/config/logger.config.js} +142 -161
- package/server/config/mssql.config.js +32 -0
- package/server/config/redis.config.js +8 -0
- package/server/config/server.config.js +12 -0
- package/server/config/templates.config.js +23 -0
- package/server/crypt.js +29 -0
- package/server/customRequest.js +370 -0
- package/server/index.js +125 -0
- package/server/interfaces/cleaner.interface.js +2 -0
- package/server/interfaces/supervisor.interface.js +2 -0
- package/{src/server/routes-centralized.ts → server/routes-centralized.js} +37 -36
- package/server/routes.js +7 -0
- package/server/services/index.js +8 -0
- package/server/services/routes.service.js +18 -0
- package/server/shared/file-manager.js +616 -0
- package/server/shared/http.shared.js +39 -0
- package/server/shared/promises.shared.js +14 -0
- package/server/shared/security.shared.js +52 -0
- package/{src/server → server}/ssl/star_inconcertcc_com.key +0 -0
- package/{src/server → server}/ssl/star_inconcertcc_com.pem +0 -0
- package/CHANGELOG.md +0 -11
- package/README.md +0 -1
- package/build-dev.bat +0 -2
- package/build-prod-aot.bat +0 -2
- package/build-prod-rollup-aot.bat +0 -2
- package/build-prod.bat +0 -2
- package/config.ts +0 -4
- package/gulpfile.ts +0 -172
- package/index.js +0 -12
- package/karma.conf.js +0 -124
- package/postgrator-test.json +0 -9
- package/postgrator.json +0 -9
- package/src/app.server.ts +0 -4
- package/src/client/app/app.component.ts +0 -37
- package/src/client/app/app.html +0 -6
- package/src/client/app/app.module.ts +0 -36
- package/src/client/app/app.routing.ts +0 -7
- package/src/client/app/hot_loader_main.ts +0 -14
- package/src/client/app/main-aot.ts +0 -8
- package/src/client/app/main.ts +0 -8
- package/src/client/app/rxjs-operators.ts +0 -15
- package/src/server/config/jwt.config.ts +0 -4
- package/src/server/config/mssql.config.ts +0 -30
- package/src/server/config/redis.config.ts +0 -10
- package/src/server/config/server.config.ts +0 -20
- package/src/server/config/templates.config.ts +0 -41
- package/src/server/crypt.ts +0 -37
- package/src/server/customRequest.ts +0 -609
- package/src/server/index.ts +0 -231
- package/src/server/interfaces/cleaner.interface.ts +0 -3
- package/src/server/interfaces/supervisor.interface.ts +0 -3
- package/src/server/routes.ts +0 -6
- package/src/server/services/index.ts +0 -10
- package/src/server/services/routes.service.ts +0 -11
- package/src/server/shared/file-manager.ts +0 -1007
- package/src/server/shared/http.shared.ts +0 -49
- package/src/server/shared/promises.shared.ts +0 -13
- package/src/server/shared/security.shared.ts +0 -90
- package/src/server/tsconfig.json +0 -38
- package/tools/build.js.prod.ts +0 -40
- package/tools/config/project.config.ts +0 -718
- package/tools/config.ts +0 -4
- package/tools/database/SchemaZen.exe +0 -0
- package/tools/database/generate-all-data-scripts.bat +0 -32
- package/tools/database/generate-database-scripts.bat +0 -36
- package/tools/debug.ts +0 -17
- package/tools/env/base.ts +0 -8
- package/tools/env/dev.ts +0 -9
- package/tools/env/env-config.interface.ts +0 -1
- package/tools/env/prod.ts +0 -10
- package/tools/manual_typings/project/sample.package.d.ts +0 -3
- package/tools/manual_typings/seed/angular2-hot-loader.d.ts +0 -9
- package/tools/manual_typings/seed/autoprefixer.d.ts +0 -13
- package/tools/manual_typings/seed/colorguard.d.ts +0 -15
- package/tools/manual_typings/seed/connect-livereload.d.ts +0 -5
- package/tools/manual_typings/seed/cssnano.d.ts +0 -18
- package/tools/manual_typings/seed/doiuse.d.ts +0 -16
- package/tools/manual_typings/seed/express-history-api-fallback.d.ts +0 -18
- package/tools/manual_typings/seed/istream.d.ts +0 -10
- package/tools/manual_typings/seed/karma.d.ts +0 -12
- package/tools/manual_typings/seed/merge-stream.d.ts +0 -8
- package/tools/manual_typings/seed/open.d.ts +0 -8
- package/tools/manual_typings/seed/postcss-reporter.d.ts +0 -20
- package/tools/manual_typings/seed/slash.d.ts +0 -5
- package/tools/manual_typings/seed/stylelint.d.ts +0 -16
- package/tools/manual_typings/seed/systemjs-builder.d.ts +0 -10
- package/tools/manual_typings/seed/tildify.d.ts +0 -5
- package/tools/manual_typings/seed/tiny-lr.d.ts +0 -10
- package/tools/manual_typings/seed/walk.d.ts +0 -10
- package/tools/scripts/install.speech-analytic.sh +0 -35
- package/tools/tasks/build.app.server.ts +0 -57
- package/tools/tasks/build.assets.dev.ts +0 -19
- package/tools/tasks/build.assets.prod.ts +0 -31
- package/tools/tasks/build.bundles.app.aot.ts +0 -31
- package/tools/tasks/build.bundles.app.rollup.aot.ts +0 -101
- package/tools/tasks/build.bundles.app.ts +0 -31
- package/tools/tasks/build.bundles.ts +0 -45
- package/tools/tasks/build.database.scripts.runner.ts +0 -137
- package/tools/tasks/build.database.scripts.ts +0 -27
- package/tools/tasks/build.flags.ts +0 -9
- package/tools/tasks/build.fonts.ts +0 -9
- package/tools/tasks/build.html_css.ts +0 -126
- package/tools/tasks/build.index.dev.ts +0 -68
- package/tools/tasks/build.index.prod.ts +0 -64
- package/tools/tasks/build.js.dev.ts +0 -66
- package/tools/tasks/build.js.prod.aot.ts +0 -44
- package/tools/tasks/build.js.prod.rollup.aot.ts +0 -50
- package/tools/tasks/build.js.prod.ts +0 -40
- package/tools/tasks/build.packages.prod.ts +0 -19
- package/tools/tasks/build.server.dev.ts +0 -59
- package/tools/tasks/build.server.prod.ts +0 -31
- package/tools/tasks/build.server.statics.ts +0 -24
- package/tools/tasks/build.skins.ts +0 -51
- package/tools/tasks/build.sme.prod.aot.ts +0 -6
- package/tools/tasks/build.sme.prod.rollup.aot.ts +0 -6
- package/tools/tasks/build.sme.prod.ts +0 -6
- package/tools/tasks/build.tar.prod.ts +0 -17
- package/tools/tasks/build.test.database.scripts.ts +0 -52
- package/tools/tasks/clean.dev.ts +0 -7
- package/tools/tasks/clean.prod.ts +0 -7
- package/tools/tasks/compile.ahead.prod.ts +0 -65
- package/tools/tasks/copy.client.js.prod.rollup.aot.ts +0 -33
- package/tools/tasks/copy.client.js.prod.ts +0 -18
- package/tools/tasks/copy.server.assets.ts +0 -38
- package/tools/tasks/copy.server.js.prod.ts +0 -16
- package/tools/tasks/css-lint.ts +0 -58
- package/tools/tasks/e2e.ts +0 -32
- package/tools/tasks/karma.run.ts +0 -18
- package/tools/tasks/karma.watch.ts +0 -9
- package/tools/tasks/minify.server.statics.ts +0 -52
- package/tools/tasks/server.prod.ts +0 -6
- package/tools/tasks/server.start.ts +0 -6
- package/tools/tasks/test.database.ts +0 -6
- package/tools/tasks/transpile.bundles.rollup.aot.ts +0 -43
- package/tools/tasks/tslint.ts +0 -64
- package/tools/tasks/watch.file.changes.dev.ts +0 -37
- package/tools/tasks/watch.key.press.dev.ts +0 -116
- package/tools/tasks/webdriver.ts +0 -6
- package/tools/utils/project/sample_util.ts +0 -18
- package/tools/utils/project.utils.ts +0 -4
- package/tools/utils/seed/build_optimizer.ts +0 -26
- package/tools/utils/seed/clean.ts +0 -35
- package/tools/utils/seed/code_change_tools.ts +0 -38
- package/tools/utils/seed/karma.start.ts +0 -10
- package/tools/utils/seed/server.ts +0 -43
- package/tools/utils/seed/sme.ts +0 -51
- package/tools/utils/seed/tasks_tools.ts +0 -70
- package/tools/utils/seed/template_locals.ts +0 -64
- package/tools/utils/seed/tsproject.ts +0 -25
- package/tools/utils/seed.utils.ts +0 -11
- package/tools/utils.ts +0 -5
- package/tsconfig.json +0 -33
- package/tslint.json +0 -120
- package/utils.ts +0 -5
package/client/js/app.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e){function t(e){Object.defineProperty(this,e,{enumerable:!0,get:function(){return this[v][e]}})}function r(e){if("undefined"!=typeof System&&System.isModule?System.isModule(e):"[object Module]"===Object.prototype.toString.call(e))return e;var t={default:e,__useDefault:e};if(e&&e.__esModule)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return new o(t)}function o(e){Object.defineProperty(this,v,{value:e}),Object.keys(e).forEach(t,this)}function n(e){return"@node/"===e.substr(0,6)?c(e,r(m(e.substr(6))),{}):p[e]}function u(e){var t=n(e);if(!t)throw new Error('Module "'+e+'" expected, but not contained in build.');if(t.module)return t.module;var r=t.linkRecord;return i(t,r),a(t,r,[]),t.module}function i(e,t){if(!t.depLoads){t.declare&&d(e,t),t.depLoads=[];for(var r=0;r<t.deps.length;r++){var o=n(t.deps[r]);t.depLoads.push(o),o.linkRecord&&i(o,o.linkRecord);var u=t.setters&&t.setters[r];u&&(u(o.module||o.linkRecord.moduleObj),o.importerSetters.push(u))}return e}}function d(t,r){var o=r.moduleObj,n=t.importerSetters,u=!1,i=r.declare.call(e,function(e,t){if(!u){if("object"==typeof e)for(var r in e)"__useDefault"!==r&&(o[r]=e[r]);else o[e]=t;u=!0;for(var i=0;i<n.length;i++)n[i](o);return u=!1,t}},{id:t.key});"function"!=typeof i?(r.setters=i.setters,r.execute=i.execute):(r.setters=[],r.execute=i)}function l(e,t,r){return p[e]={key:e,module:void 0,importerSetters:[],linkRecord:{deps:t,depLoads:void 0,declare:r,setters:void 0,execute:void 0,moduleObj:{}}}}function f(e,t,r,o){var n={};return p[e]={key:e,module:void 0,importerSetters:[],linkRecord:{deps:t,depLoads:void 0,declare:void 0,execute:o,executingRequire:r,moduleObj:{default:n,__useDefault:n},setters:void 0}}}function s(e,t,r){return function(o){for(var n=0;n<e.length;n++)if(e[n]===o){var u,i=t[n],d=i.linkRecord;return u=d?-1===r.indexOf(i)?a(i,d,r):d.moduleObj:i.module,"__useDefault"in u?u.__useDefault:u}}}function a(t,r,n){if(n.push(t),t.module)return t.module;if(r.setters){for(var i=0;i<r.deps.length;i++){var d=r.depLoads[i],l=d.linkRecord;l&&-1===n.indexOf(d)&&a(d,l,l.setters?n:[])}r.execute.call(y)}else{var f={id:t.key},c=r.moduleObj;Object.defineProperty(f,"exports",{configurable:!0,set:function(e){c.default=c.__useDefault=e},get:function(){return c.__useDefault}});var p=s(r.deps,r.depLoads,n);if(!r.executingRequire)for(var i=0;i<r.deps.length;i++)p(r.deps[i]);var v=r.execute.call(e,p,c.__useDefault,f);void 0!==v&&(c.default=c.__useDefault=v);var m=c.__useDefault;if(m&&m.__esModule)for(var b in m)Object.hasOwnProperty.call(m,b)&&(c[b]=m[b])}var f=t.module=new o(r.moduleObj);if(!r.setters)for(var i=0;i<t.importerSetters.length;i++)t.importerSetters[i](f);return f}function c(e,t){return p[e]={key:e,module:t,importerSetters:[],linkRecord:void 0}}var p={},v="undefined"!=typeof Symbol?Symbol():"@@baseObject";o.prototype=Object.create(null),"undefined"!=typeof Symbol&&Symbol.toStringTag&&(o.prototype[Symbol.toStringTag]="Module");var m="undefined"!=typeof System&&System._nodeRequire||"undefined"!=typeof require&&void 0!==require.resolve&&"undefined"!=typeof process&&process.platform&&require,y={};return Object.freeze&&Object.freeze(y),function(e,t,n,i){return function(d){d(function(d){var s={_nodeRequire:m,register:l,registerDynamic:f,registry:{get:function(e){return p[e].module},set:c},newModule:function(e){return new o(e)}};c("@empty",new o({}));for(var a=0;a<t.length;a++)c(t[a],r(arguments[a],{}));i(s);var v=u(e[0]);if(e.length>1)for(var a=1;a<e.length;a++)u(e[a]);return n?v.__useDefault:(v instanceof o&&Object.defineProperty(v,"__esModule",{value:!0}),v)})}}}("undefined"!=typeof self?self:"undefined"!=typeof global?global:this)(["a"],[],!0,function($__System){var require=this.require,exports=this.exports,module=this.module;!function(global,factory){"object"==typeof exports&&void 0!==module?factory(exports,require("@angular/core")):$__System.registerDynamic("b",["c"],!1,function($__require,$__exports,$__module){return"function"==typeof factory?factory.call($__exports,$__exports,$__require("c")):factory})}(0,function(exports,_angular_core){"use strict";function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}function templateVisitAll(visitor,asts,context){void 0===context&&(context=null);var result=[],visit=visitor.visit?function(ast){return visitor.visit(ast,context)||ast.visit(visitor,context)}:function(ast){return ast.visit(visitor,context)};return asts.forEach(function(ast){var astResult=visit(ast);astResult&&result.push(astResult)}),result}function splitNsName(elementName){if(":"!=elementName[0])return[null,elementName];var colonIndex=elementName.indexOf(":",1);if(-1==colonIndex)throw new Error('Unsupported format "'+elementName+'" expecting ":namespace:name"');return[elementName.slice(1,colonIndex),elementName.slice(colonIndex+1)]}function isNgContainer(tagName){return"ng-container"===splitNsName(tagName)[1]}function isNgContent(tagName){return"ng-content"===splitNsName(tagName)[1]}function isNgTemplate(tagName){return"ng-template"===splitNsName(tagName)[1]}function getNsPrefix(fullName){return null===fullName?null:splitNsName(fullName)[0]}function mergeNsAndName(prefix,localName){return prefix?":"+prefix+":"+localName:localName}function getHtmlTagDefinition(tagName){return TAG_DEFINITIONS[tagName.toLowerCase()]||_DEFAULT_TAG_DEFINITION}function dashCaseToCamelCase(input){return input.replace(DASH_CASE_REGEXP,function(){for(var m=[],_i=0;_i<arguments.length;_i++)m[_i]=arguments[_i];return m[1].toUpperCase()})}function splitAtColon(input,defaultValues){return _splitAt(input,":",defaultValues)}function splitAtPeriod(input,defaultValues){return _splitAt(input,".",defaultValues)}function _splitAt(input,character,defaultValues){var characterIndex=input.indexOf(character);return-1==characterIndex?defaultValues:[input.slice(0,characterIndex).trim(),input.slice(characterIndex+1).trim()]}function visitValue(value,visitor,context){return Array.isArray(value)?visitor.visitArray(value,context):isStrictStringMap(value)?visitor.visitStringMap(value,context):null==value||"string"==typeof value||"number"==typeof value||"boolean"==typeof value?visitor.visitPrimitive(value,context):visitor.visitOther(value,context)}function isDefined(val){return null!==val&&void 0!==val}function noUndefined(val){return void 0===val?null:val}function syntaxError(msg){var error=Error(msg);return error[ERROR_SYNTAX_ERROR]=!0,error}function isSyntaxError(error){return error[ERROR_SYNTAX_ERROR]}function escapeRegExp(s){return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function isStrictStringMap(obj){return"object"==typeof obj&&null!==obj&&Object.getPrototypeOf(obj)===STRING_MAP_PROTO}function utf8Encode(str){for(var encoded="",index=0;index<str.length;index++){var codePoint=str.charCodeAt(index);if(codePoint>=55296&&codePoint<=56319&&str.length>index+1){var low=str.charCodeAt(index+1);low>=56320&&low<=57343&&(index++,codePoint=(codePoint-55296<<10)+low-56320+65536)}codePoint<=127?encoded+=String.fromCharCode(codePoint):codePoint<=2047?encoded+=String.fromCharCode(codePoint>>6&31|192,63&codePoint|128):codePoint<=65535?encoded+=String.fromCharCode(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128):codePoint<=2097151&&(encoded+=String.fromCharCode(codePoint>>18&7|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128))}return encoded}function _sanitizeIdentifier(name){return name.replace(/\W/g,"_")}function identifierName(compileIdentifier){if(!compileIdentifier||!compileIdentifier.reference)return null;var ref=compileIdentifier.reference;if(ref instanceof StaticSymbol)return ref.name;if(ref.__anonymousType)return ref.__anonymousType;var identifier=_angular_core.ɵstringify(ref);return identifier.indexOf("(")>=0?(identifier="anonymous_"+_anonymousTypeIndex++,ref.__anonymousType=identifier):identifier=_sanitizeIdentifier(identifier),identifier}function identifierModuleUrl(compileIdentifier){var ref=compileIdentifier.reference;return ref instanceof StaticSymbol?ref.filePath:"./"+_angular_core.ɵstringify(ref)}function viewClassName(compType,embeddedTemplateIndex){return"View_"+identifierName({reference:compType})+"_"+embeddedTemplateIndex}function rendererTypeName(compType){return"RenderType_"+identifierName({reference:compType})}function hostViewClassName(compType){return"HostView_"+identifierName({reference:compType})}function dirWrapperClassName(dirType){return"Wrapper_"+identifierName({reference:dirType})}function componentFactoryName(compType){return identifierName({reference:compType})+"NgFactory"}function tokenName(token){return null!=token.value?_sanitizeIdentifier(token.value):identifierName(token.identifier)}function tokenReference(token){return null!=token.identifier?token.identifier.reference:token.value}function createHostComponentMeta(hostTypeReference,compMeta,hostViewType){var template=CssSelector.parse(compMeta.selector)[0].getMatchingElementTemplate();return CompileDirectiveMetadata.create({isHost:!0,type:{reference:hostTypeReference,diDeps:[],lifecycleHooks:[]},template:new CompileTemplateMetadata({encapsulation:_angular_core.ViewEncapsulation.None,template:template,templateUrl:"",styles:[],styleUrls:[],ngContentSelectors:[],animations:[],isInline:!0,externalStylesheets:[],interpolation:null}),exportAs:null,changeDetection:_angular_core.ChangeDetectionStrategy.Default,inputs:[],outputs:[],host:{},isComponent:!0,selector:"*",providers:[],viewProviders:[],queries:[],viewQueries:[],componentViewType:hostViewType,rendererType:{id:"__Host__",encapsulation:_angular_core.ViewEncapsulation.None,styles:[],data:{}},entryComponents:[],componentFactory:null})}function _normalizeArray(obj){return obj||[]}function flatten(list){return list.reduce(function(flat,item){var flatItem=Array.isArray(item)?flatten(item):item;return flat.concat(flatItem)},[])}function sourceUrl(url){return url.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/,"ng:///")}function templateSourceUrl(ngModuleType,compMeta,templateMeta){var url;return url=templateMeta.isInline?compMeta.type.reference instanceof StaticSymbol?compMeta.type.reference.filePath+"."+compMeta.type.reference.name+".html":identifierName(ngModuleType)+"/"+identifierName(compMeta.type)+".html":templateMeta.templateUrl,sourceUrl(url)}function sharedStylesheetJitUrl(meta,id){var pathParts=meta.moduleUrl.split(/\/\\/g);return sourceUrl("css/"+id+pathParts[pathParts.length-1]+".ngstyle.js")}function ngModuleJitUrl(moduleMeta){return sourceUrl(identifierName(moduleMeta.type)+"/module.ngfactory.js")}function templateJitUrl(ngModuleType,compMeta){return sourceUrl(identifierName(ngModuleType)+"/"+identifierName(compMeta.type)+".ngfactory.js")}function visitAstChildren(ast,visitor,context){function visit(ast){visitor.visit&&visitor.visit(ast,context)||ast.visit(visitor,context)}function visitAll(asts){asts.forEach(visit)}ast.visit({visitBinary:function(ast){visit(ast.left),visit(ast.right)},visitChain:function(ast){visitAll(ast.expressions)},visitConditional:function(ast){visit(ast.condition),visit(ast.trueExp),visit(ast.falseExp)},visitFunctionCall:function(ast){ast.target&&visit(ast.target),visitAll(ast.args)},visitImplicitReceiver:function(ast){},visitInterpolation:function(ast){visitAll(ast.expressions)},visitKeyedRead:function(ast){visit(ast.obj),visit(ast.key)},visitKeyedWrite:function(ast){visit(ast.obj),visit(ast.key),visit(ast.obj)},visitLiteralArray:function(ast){visitAll(ast.expressions)},visitLiteralMap:function(ast){},visitLiteralPrimitive:function(ast){},visitMethodCall:function(ast){visit(ast.receiver),visitAll(ast.args)},visitPipe:function(ast){visit(ast.exp),visitAll(ast.args)},visitPrefixNot:function(ast){visit(ast.expression)},visitNonNullAssert:function(ast){visit(ast.expression)},visitPropertyRead:function(ast){visit(ast.receiver)},visitPropertyWrite:function(ast){visit(ast.receiver),visit(ast.value)},visitQuote:function(ast){},visitSafeMethodCall:function(ast){visit(ast.receiver),visitAll(ast.args)},visitSafePropertyRead:function(ast){visit(ast.receiver)}})}function isWhitespace(code){return code>=$TAB&&code<=$SPACE||code==$NBSP}function isDigit(code){return $0<=code&&code<=$9}function isAsciiLetter(code){return code>=$a&&code<=$z||code>=$A&&code<=$Z}function isAsciiHexDigit(code){return code>=$a&&code<=$f||code>=$A&&code<=$F||isDigit(code)}function CompilerInjectable(){return function(x){return x}}function assertArrayOfStrings(identifier,value){if(_angular_core.isDevMode()&&null!=value){if(!Array.isArray(value))throw new Error("Expected '"+identifier+"' to be an array of strings.");for(var i=0;i<value.length;i+=1)if("string"!=typeof value[i])throw new Error("Expected '"+identifier+"' to be an array of strings.")}}function assertInterpolationSymbols(identifier,value){if(!(null==value||Array.isArray(value)&&2==value.length))throw new Error("Expected '"+identifier+"' to be an array, [start, end].");if(_angular_core.isDevMode()&&null!=value){var start_1=value[0],end_1=value[1];INTERPOLATION_BLACKLIST_REGEXPS.forEach(function(regexp){if(regexp.test(start_1)||regexp.test(end_1))throw new Error("['"+start_1+"', '"+end_1+"'] contains unusable interpolation symbol.")})}}function newCharacterToken(index,code){return new Token(index,TokenType.Character,code,String.fromCharCode(code))}function newIdentifierToken(index,text){return new Token(index,TokenType.Identifier,0,text)}function newKeywordToken(index,text){return new Token(index,TokenType.Keyword,0,text)}function newOperatorToken(index,text){return new Token(index,TokenType.Operator,0,text)}function newStringToken(index,text){return new Token(index,TokenType.String,0,text)}function newNumberToken(index,n){return new Token(index,TokenType.Number,n,"")}function newErrorToken(index,message){return new Token(index,TokenType.Error,0,message)}function isIdentifierStart(code){return $a<=code&&code<=$z||$A<=code&&code<=$Z||code==$_||code==$$}function isIdentifier(input){if(0==input.length)return!1;var scanner=new _Scanner(input);if(!isIdentifierStart(scanner.peek))return!1;for(scanner.advance();scanner.peek!==$EOF;){if(!isIdentifierPart(scanner.peek))return!1;scanner.advance()}return!0}function isIdentifierPart(code){return isAsciiLetter(code)||isDigit(code)||code==$_||code==$$}function isExponentStart(code){return code==$e||code==$E}function isExponentSign(code){return code==$MINUS||code==$PLUS}function isQuote(code){return code===$SQ||code===$DQ||code===$BT}function unescape(code){switch(code){case $n:return $LF;case $f:return $FF;case $r:return $CR;case $t:return $TAB;case $v:return $VTAB;default:return code}}function parseIntAutoRadix(text){var result=parseInt(text);if(isNaN(result))throw new Error("Invalid integer literal when parsing "+text);return result}function _createInterpolateRegExp(config){var pattern=escapeRegExp(config.start)+"([\\s\\S]*?)"+escapeRegExp(config.end);return new RegExp(pattern,"g")}function typeSourceSpan(kind,type){var moduleUrl=identifierModuleUrl(type),sourceFileName=null!=moduleUrl?"in "+kind+" "+identifierName(type)+" in "+moduleUrl:"in "+kind+" "+identifierName(type),sourceFile=new ParseSourceFile("",sourceFileName);return new ParseSourceSpan(new ParseLocation(sourceFile,-1,-1,-1),new ParseLocation(sourceFile,-1,-1,-1))}function visitAll(visitor,nodes,context){void 0===context&&(context=null);var result=[],visit=visitor.visit?function(ast){return visitor.visit(ast,context)||ast.visit(visitor,context)}:function(ast){return ast.visit(visitor,context)};return nodes.forEach(function(ast){var astResult=visit(ast);astResult&&result.push(astResult)}),result}function spanOf(ast){var start=ast.sourceSpan.start.offset,end=ast.sourceSpan.end.offset;return ast instanceof Element&&(ast.endSourceSpan?end=ast.endSourceSpan.end.offset:ast.children&&ast.children.length&&(end=spanOf(ast.children[ast.children.length-1]).end)),{start:start,end:end}}function findNode(nodes,position){var path=[];return visitAll(new(function(_super){function class_1(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(class_1,_super),class_1.prototype.visit=function(ast,context){var span=spanOf(ast);if(!(span.start<=position&&position<span.end))return!0;path.push(ast)},class_1}(RecursiveVisitor)),nodes),new AstPath(path,position)}function tokenize(source,url,getTagDefinition,tokenizeExpansionForms,interpolationConfig){return void 0===tokenizeExpansionForms&&(tokenizeExpansionForms=!1),void 0===interpolationConfig&&(interpolationConfig=DEFAULT_INTERPOLATION_CONFIG),new _Tokenizer(new ParseSourceFile(source,url),getTagDefinition,tokenizeExpansionForms,interpolationConfig).tokenize()}function _unexpectedCharacterErrorMsg(charCode){return'Unexpected character "'+(charCode===$EOF?"EOF":String.fromCharCode(charCode))+'"'}function _unknownEntityErrorMsg(entitySrc){return'Unknown entity "'+entitySrc+'" - use the "&#<decimal>;" or "&#x<hex>;" syntax'}function isNotWhitespace(code){return!isWhitespace(code)||code===$EOF}function isNameEnd(code){return isWhitespace(code)||code===$GT||code===$SLASH||code===$SQ||code===$DQ||code===$EQ}function isPrefixEnd(code){return(code<$a||$z<code)&&(code<$A||$Z<code)&&(code<$0||code>$9)}function isDigitEntityEnd(code){return code==$SEMICOLON||code==$EOF||!isAsciiHexDigit(code)}function isNamedEntityEnd(code){return code==$SEMICOLON||code==$EOF||!isAsciiLetter(code)}function isExpansionFormStart(input,offset,interpolationConfig){var isInterpolationStart=!!interpolationConfig&&input.indexOf(interpolationConfig.start,offset)==offset;return input.charCodeAt(offset)==$LBRACE&&!isInterpolationStart}function isExpansionCaseStart(peek){return peek===$EQ||isAsciiLetter(peek)}function compareCharCodeCaseInsensitive(code1,code2){return toUpperCaseCharCode(code1)==toUpperCaseCharCode(code2)}function toUpperCaseCharCode(code){return code>=$a&&code<=$z?code-$a+$A:code}function mergeTextTokens(srcTokens){for(var dstTokens=[],lastDstToken=void 0,i=0;i<srcTokens.length;i++){var token=srcTokens[i];lastDstToken&&lastDstToken.type==TokenType$1.TEXT&&token.type==TokenType$1.TEXT?(lastDstToken.parts[0]+=token.parts[0],lastDstToken.sourceSpan.end=token.sourceSpan.end):(lastDstToken=token,dstTokens.push(lastDstToken))}return dstTokens}function lastOnStack(stack,element){return stack.length>0&&stack[stack.length-1]===element}function digest(message){return message.id||sha1(serializeNodes(message.nodes).join("")+"["+message.meaning+"]")}function decimalDigest(message){if(message.id)return message.id;var visitor=new _SerializerIgnoreIcuExpVisitor;return computeMsgId(message.nodes.map(function(a){return a.visit(visitor,null)}).join(""),message.meaning)}function serializeNodes(nodes){return nodes.map(function(a){return a.visit(serializerVisitor,null)})}function sha1(str){var utf8=utf8Encode(str),words32=stringToWords32(utf8,Endian.Big),len=8*utf8.length,w=new Array(80),_a=[1732584193,4023233417,2562383102,271733878,3285377520],a=_a[0],b=_a[1],c=_a[2],d=_a[3],e=_a[4];words32[len>>5]|=128<<24-len%32,words32[15+(len+64>>9<<4)]=len;for(var i=0;i<words32.length;i+=16){for(var _b=[a,b,c,d,e],h0=_b[0],h1=_b[1],h2=_b[2],h3=_b[3],h4=_b[4],j=0;j<80;j++){w[j]=j<16?words32[i+j]:rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16],1);var _c=fk(j,b,c,d),f=_c[0],k=_c[1],temp=[rol32(a,5),f,e,k,w[j]].reduce(add32);_d=[d,c,rol32(b,30),a,temp],e=_d[0],d=_d[1],c=_d[2],b=_d[3],a=_d[4]}_e=[add32(a,h0),add32(b,h1),add32(c,h2),add32(d,h3),add32(e,h4)],a=_e[0],b=_e[1],c=_e[2],d=_e[3],e=_e[4]}return byteStringToHexString(words32ToByteString([a,b,c,d,e]));var _d,_e}function fk(index,b,c,d){return index<20?[b&c|~b&d,1518500249]:index<40?[b^c^d,1859775393]:index<60?[b&c|b&d|c&d,2400959708]:[b^c^d,3395469782]}function fingerprint(str){var utf8=utf8Encode(str),_a=[hash32(utf8,0),hash32(utf8,102072)],hi=_a[0],lo=_a[1];return 0!=hi||0!=lo&&1!=lo||(hi^=319790063,lo^=-1801410264),[hi,lo]}function computeMsgId(msg,meaning){var _a=fingerprint(msg),hi=_a[0],lo=_a[1];if(meaning){var _b=fingerprint(meaning),him=_b[0],lom=_b[1];_c=add64(rol64([hi,lo],1),[him,lom]),hi=_c[0],lo=_c[1]}return byteStringToDecString(words32ToByteString([2147483647&hi,lo]));var _c}function hash32(str,c){var i,_a=[2654435769,2654435769],a=_a[0],b=_a[1],len=str.length;for(i=0;i+12<=len;i+=12)a=add32(a,wordAt(str,i,Endian.Little)),b=add32(b,wordAt(str,i+4,Endian.Little)),c=add32(c,wordAt(str,i+8,Endian.Little)),_b=mix([a,b,c]),a=_b[0],b=_b[1],c=_b[2];return a=add32(a,wordAt(str,i,Endian.Little)),b=add32(b,wordAt(str,i+4,Endian.Little)),c=add32(c,len),c=add32(c,wordAt(str,i+8,Endian.Little)<<8),mix([a,b,c])[2];var _b}function mix(_a){var a=_a[0],b=_a[1],c=_a[2];return a=sub32(a,b),a=sub32(a,c),a^=c>>>13,b=sub32(b,c),b=sub32(b,a),b^=a<<8,c=sub32(c,a),c=sub32(c,b),c^=b>>>13,a=sub32(a,b),a=sub32(a,c),a^=c>>>12,b=sub32(b,c),b=sub32(b,a),b^=a<<16,c=sub32(c,a),c=sub32(c,b),c^=b>>>5,a=sub32(a,b),a=sub32(a,c),a^=c>>>3,b=sub32(b,c),b=sub32(b,a),b^=a<<10,c=sub32(c,a),c=sub32(c,b),c^=b>>>15,[a,b,c]}function add32(a,b){return add32to64(a,b)[1]}function add32to64(a,b){var low=(65535&a)+(65535&b),high=(a>>>16)+(b>>>16)+(low>>>16);return[high>>>16,high<<16|65535&low]}function add64(_a,_b){var ah=_a[0],al=_a[1],bh=_b[0],bl=_b[1],_c=add32to64(al,bl),carry=_c[0],l=_c[1];return[add32(add32(ah,bh),carry),l]}function sub32(a,b){var low=(65535&a)-(65535&b);return(a>>16)-(b>>16)+(low>>16)<<16|65535&low}function rol32(a,count){return a<<count|a>>>32-count}function rol64(_a,count){var hi=_a[0],lo=_a[1];return[hi<<count|lo>>>32-count,lo<<count|hi>>>32-count]}function stringToWords32(str,endian){for(var words32=Array(str.length+3>>>2),i=0;i<words32.length;i++)words32[i]=wordAt(str,4*i,endian);return words32}function byteAt(str,index){return index>=str.length?0:255&str.charCodeAt(index)}function wordAt(str,index,endian){var word=0;if(endian===Endian.Big)for(var i=0;i<4;i++)word+=byteAt(str,index+i)<<24-8*i;else for(var i=0;i<4;i++)word+=byteAt(str,index+i)<<8*i;return word}function words32ToByteString(words32){return words32.reduce(function(str,word){return str+word32ToByteString(word)},"")}function word32ToByteString(word){for(var str="",i=0;i<4;i++)str+=String.fromCharCode(word>>>8*(3-i)&255);return str}function byteStringToHexString(str){for(var hex="",i=0;i<str.length;i++){var b=byteAt(str,i);hex+=(b>>>4).toString(16)+(15&b).toString(16)}return hex.toLowerCase()}function byteStringToDecString(str){for(var decimal="",toThePower="1",i=str.length-1;i>=0;i--)decimal=addBigInt(decimal,numberTimesBigInt(byteAt(str,i),toThePower)),toThePower=numberTimesBigInt(256,toThePower);return decimal.split("").reverse().join("")}function addBigInt(x,y){for(var sum="",len=Math.max(x.length,y.length),i=0,carry=0;i<len||carry;i++){var tmpSum=carry+ +(x[i]||0)+ +(y[i]||0);tmpSum>=10?(carry=1,sum+=tmpSum-10):(carry=0,sum+=tmpSum)}return sum}function numberTimesBigInt(num,b){for(var product="",bToThePower=b;0!==num;num>>>=1)1&num&&(product=addBigInt(product,bToThePower)),bToThePower=addBigInt(bToThePower,bToThePower);return product}function createI18nMessageFactory(interpolationConfig){var visitor=new _I18nVisitor(_expParser,interpolationConfig);return function(nodes,meaning,description,id){return visitor.toI18nMessage(nodes,meaning,description,id)}}function _extractPlaceholderName(input){return input.split(_CUSTOM_PH_EXP)[2]}function extractMessages(nodes,interpolationConfig,implicitTags,implicitAttrs){return new _Visitor(implicitTags,implicitAttrs).extract(nodes,interpolationConfig)}function mergeTranslations(nodes,translations,interpolationConfig,implicitTags,implicitAttrs){return new _Visitor(implicitTags,implicitAttrs).merge(nodes,translations,interpolationConfig)}function _isOpeningComment(n){return!!(n instanceof Comment&&n.value&&n.value.startsWith("i18n"))}function _isClosingComment(n){return!!(n instanceof Comment&&n.value&&"/i18n"===n.value)}function _getI18nAttr(p){return p.attrs.find(function(attr){return attr.name===_I18N_ATTR})||null}function _parseMessageMeta(i18n){if(!i18n)return{meaning:"",description:"",id:""};var idIndex=i18n.indexOf(ID_SEPARATOR),descIndex=i18n.indexOf(MEANING_SEPARATOR),_a=idIndex>-1?[i18n.slice(0,idIndex),i18n.slice(idIndex+2)]:[i18n,""],meaningAndDesc=_a[0],id=_a[1],_b=descIndex>-1?[meaningAndDesc.slice(0,descIndex),meaningAndDesc.slice(descIndex+1)]:["",meaningAndDesc];return{meaning:_b[0],description:_b[1],id:id}}function getXmlTagDefinition(tagName){return _TAG_DEFINITION}function serialize(nodes){return nodes.map(function(node){return node.visit(_visitor)}).join("")}function _escapeXml(text){return _ESCAPED_CHARS.reduce(function(text,entry){return text.replace(entry[0],entry[1])},text)}function getCtypeForTag(tag){switch(tag.toLowerCase()){case"br":return"lb";case"img":return"image";default:return"x-"+tag}}function getTypeForTag(tag){switch(tag.toLowerCase()){case"br":case"b":case"i":case"u":return"fmt";case"img":return"image";case"a":return"link";default:return"other"}}function digest$1(message){return decimalDigest(message)}function toPublicName(internalName){return internalName.toUpperCase().replace(/[^A-Z0-9_]/g,"_")}function createLazyProperty(messages,id,valueFn){Object.defineProperty(messages,id,{configurable:!0,enumerable:!0,get:function(){var value=valueFn();return Object.defineProperty(messages,id,{enumerable:!0,value:value}),value},set:function(_){throw new Error("Could not overwrite an XTB translation")}})}function createSerializer(format){switch(format=(format||"xlf").toLowerCase()){case"xmb":return new Xmb;case"xtb":return new Xtb;case"xliff2":case"xlf2":return new Xliff2;case"xliff":case"xlf":default:return new Xliff}}function createTokenForReference(reference){return{identifier:{reference:reference}}}function createTokenForExternalReference(reflector,reference){return createTokenForReference(reflector.resolveExternalReference(reference))}function expandNodes(nodes){var expander=new _Expander;return new ExpansionResult(visitAll(expander,nodes),expander.isExpanded,expander.errors)}function _expandPluralForm(ast,errors){var children=ast.cases.map(function(c){-1!=PLURAL_CASES.indexOf(c.value)||c.value.match(/^=\d+$/)||errors.push(new ExpansionError(c.valueSourceSpan,'Plural cases should be "=<number>" or one of '+PLURAL_CASES.join(", ")));var expansionResult=expandNodes(c.expression);return errors.push.apply(errors,expansionResult.errors),new Element("ng-template",[new Attribute$1("ngPluralCase",""+c.value,c.valueSourceSpan)],expansionResult.nodes,c.sourceSpan,c.sourceSpan,c.sourceSpan)}),switchAttr=new Attribute$1("[ngPlural]",ast.switchValue,ast.switchValueSourceSpan);return new Element("ng-container",[switchAttr],children,ast.sourceSpan,ast.sourceSpan,ast.sourceSpan)}function _expandDefaultForm(ast,errors){var children=ast.cases.map(function(c){var expansionResult=expandNodes(c.expression);return errors.push.apply(errors,expansionResult.errors),"other"===c.value?new Element("ng-template",[new Attribute$1("ngSwitchDefault","",c.valueSourceSpan)],expansionResult.nodes,c.sourceSpan,c.sourceSpan,c.sourceSpan):new Element("ng-template",[new Attribute$1("ngSwitchCase",""+c.value,c.valueSourceSpan)],expansionResult.nodes,c.sourceSpan,c.sourceSpan,c.sourceSpan)}),switchAttr=new Attribute$1("[ngSwitch]",ast.switchValue,ast.switchValueSourceSpan);return new Element("ng-container",[switchAttr],children,ast.sourceSpan,ast.sourceSpan,ast.sourceSpan)}function _transformProvider(provider,_a){var useExisting=_a.useExisting,useValue=_a.useValue,deps=_a.deps;return{token:provider.token,useClass:provider.useClass,useExisting:useExisting,useFactory:provider.useFactory,useValue:useValue,deps:deps,multi:provider.multi}}function _transformProviderAst(provider,_a){var eager=_a.eager,providers=_a.providers;return new ProviderAst(provider.token,provider.multiProvider,provider.eager||eager,providers,provider.providerType,provider.lifecycleHooks,provider.sourceSpan)}function _resolveProvidersFromDirectives(directives,sourceSpan,targetErrors){var providersByToken=new Map;return directives.forEach(function(directive){_resolveProviders([{token:{identifier:directive.type},useClass:directive.type}],directive.isComponent?ProviderAstType.Component:ProviderAstType.Directive,!0,sourceSpan,targetErrors,providersByToken)}),directives.filter(function(dir){return dir.isComponent}).concat(directives.filter(function(dir){return!dir.isComponent})).forEach(function(directive){_resolveProviders(directive.providers,ProviderAstType.PublicService,!1,sourceSpan,targetErrors,providersByToken),_resolveProviders(directive.viewProviders,ProviderAstType.PrivateService,!1,sourceSpan,targetErrors,providersByToken)}),providersByToken}function _resolveProviders(providers,providerType,eager,sourceSpan,targetErrors,targetProvidersByToken){providers.forEach(function(provider){var resolvedProvider=targetProvidersByToken.get(tokenReference(provider.token));if(null!=resolvedProvider&&!!resolvedProvider.multiProvider!=!!provider.multi&&targetErrors.push(new ProviderError("Mixing multi and non multi provider is not possible for token "+tokenName(resolvedProvider.token),sourceSpan)),resolvedProvider)provider.multi||(resolvedProvider.providers.length=0),resolvedProvider.providers.push(provider);else{var lifecycleHooks=provider.token.identifier&&provider.token.identifier.lifecycleHooks?provider.token.identifier.lifecycleHooks:[],isUseValue=!(provider.useClass||provider.useExisting||provider.useFactory);resolvedProvider=new ProviderAst(provider.token,!!provider.multi,eager||isUseValue,[provider],providerType,lifecycleHooks,sourceSpan),targetProvidersByToken.set(tokenReference(provider.token),resolvedProvider)}})}function _getViewQueries(component){var viewQueryId=1,viewQueries=new Map;return component.viewQueries&&component.viewQueries.forEach(function(query){return _addQueryToTokenMap(viewQueries,{meta:query,queryId:viewQueryId++})}),viewQueries}function _getContentQueries(contentQueryStartId,directives){var contentQueryId=contentQueryStartId,contentQueries=new Map;return directives.forEach(function(directive,directiveIndex){directive.queries&&directive.queries.forEach(function(query){return _addQueryToTokenMap(contentQueries,{meta:query,queryId:contentQueryId++})})}),contentQueries}function _addQueryToTokenMap(map,query){query.meta.selectors.forEach(function(token){var entry=map.get(tokenReference(token));entry||(entry=[],map.set(tokenReference(token),entry)),entry.push(query)})}function isStyleUrlResolvable(url){if(null==url||0===url.length||"/"==url[0])return!1;var schemeMatch=url.match(URL_WITH_SCHEMA_REGEXP);return null===schemeMatch||"package"==schemeMatch[1]||"asset"==schemeMatch[1]}function extractStyleUrls(resolver,baseUrl,cssText){var foundUrls=[],modifiedCssText=cssText.replace(CSS_COMMENT_REGEXP,"").replace(CSS_IMPORT_REGEXP,function(){for(var m=[],_i=0;_i<arguments.length;_i++)m[_i]=arguments[_i];var url=m[1]||m[2];return isStyleUrlResolvable(url)?(foundUrls.push(resolver.resolve(baseUrl,url)),""):m[0]});return new StyleWithImports(modifiedCssText,foundUrls)}function _isAnimationLabel(name){return"@"==name[0]}function calcPossibleSecurityContexts(registry,selector,propName,isAttribute){var ctxs=[];return CssSelector.parse(selector).forEach(function(selector){var elementNames=selector.element?[selector.element]:registry.allKnownElementNames(),notElementNames=new Set(selector.notSelectors.filter(function(selector){return selector.isElementSelector()}).map(function(selector){return selector.element})),possibleElementNames=elementNames.filter(function(elementName){return!notElementNames.has(elementName)});ctxs.push.apply(ctxs,possibleElementNames.map(function(elementName){return registry.securityContext(elementName,propName,isAttribute)}))}),0===ctxs.length?[_angular_core.SecurityContext.NONE]:Array.from(new Set(ctxs)).sort()}function preparseElement(ast){var selectAttr=null,hrefAttr=null,relAttr=null,nonBindable=!1,projectAs=null;ast.attrs.forEach(function(attr){var lcAttrName=attr.name.toLowerCase();lcAttrName==NG_CONTENT_SELECT_ATTR?selectAttr=attr.value:lcAttrName==LINK_STYLE_HREF_ATTR?hrefAttr=attr.value:lcAttrName==LINK_STYLE_REL_ATTR?relAttr=attr.value:attr.name==NG_NON_BINDABLE_ATTR?nonBindable=!0:attr.name==NG_PROJECT_AS&&attr.value.length>0&&(projectAs=attr.value)}),selectAttr=normalizeNgContentSelect(selectAttr);var nodeName=ast.name.toLowerCase(),type=PreparsedElementType.OTHER;return isNgContent(nodeName)?type=PreparsedElementType.NG_CONTENT:nodeName==STYLE_ELEMENT?type=PreparsedElementType.STYLE:nodeName==SCRIPT_ELEMENT?type=PreparsedElementType.SCRIPT:nodeName==LINK_ELEMENT&&relAttr==LINK_STYLE_REL_VALUE&&(type=PreparsedElementType.STYLESHEET),new PreparsedElement(type,selectAttr,hrefAttr,nonBindable,projectAs)}function normalizeNgContentSelect(selectAttr){return null===selectAttr||0===selectAttr.length?"*":selectAttr}function warnOnlyOnce(warnings){return function(error){return-1===warnings.indexOf(error.msg)||(warningCounts[error.msg]=(warningCounts[error.msg]||0)+1,warningCounts[error.msg]<=1)}}function splitClasses(classAttrValue){return classAttrValue.trim().split(/\s+/g)}function createElementCssSelector(elementName,attributes){var cssSelector=new CssSelector,elNameNoNs=splitNsName(elementName)[1];cssSelector.setElement(elNameNoNs);for(var i=0;i<attributes.length;i++){var attrName=attributes[i][0],attrNameNoNs=splitNsName(attrName)[1],attrValue=attributes[i][1];if(cssSelector.addAttribute(attrNameNoNs,attrValue),attrName.toLowerCase()==CLASS_ATTR){splitClasses(attrValue).forEach(function(className){return cssSelector.addClassName(className)})}}return cssSelector}function _isEmptyTextNode(node){return node instanceof Text&&0==node.value.trim().length}function removeSummaryDuplicates(items){var map=new Map;return items.forEach(function(item){map.get(item.type.reference)||map.set(item.type.reference,item)}),Array.from(map.values())}function isEmptyExpression(ast){return ast instanceof ASTWithSource&&(ast=ast.ast),ast instanceof EmptyExpr}function isTemplate(el,enableLegacyTemplate,reportDeprecation){if(isNgTemplate(el.name))return!0;var tagNoNs=splitNsName(el.name)[1];return!(tagNoNs.toLowerCase()!==TEMPLATE_ELEMENT||!enableLegacyTemplate||tagNoNs.toLowerCase()!==TEMPLATE_ELEMENT)&&(reportDeprecation(TEMPLATE_ELEMENT_DEPRECATION_WARNING,el.sourceSpan),!0)}function createUrlResolverWithoutPackagePrefix(){return new UrlResolver}function createOfflineCompileUrlResolver(){return new UrlResolver(".")}function getUrlScheme(url){var match=_split(url);return match&&match[_ComponentIndex.Scheme]||""}function _buildFromEncodedParts(opt_scheme,opt_userInfo,opt_domain,opt_port,opt_path,opt_queryData,opt_fragment){var out=[];return null!=opt_scheme&&out.push(opt_scheme+":"),null!=opt_domain&&(out.push("//"),null!=opt_userInfo&&out.push(opt_userInfo+"@"),out.push(opt_domain),null!=opt_port&&out.push(":"+opt_port)),null!=opt_path&&out.push(opt_path),null!=opt_queryData&&out.push("?"+opt_queryData),null!=opt_fragment&&out.push("#"+opt_fragment),out.join("")}function _split(uri){return uri.match(_splitRe)}function _removeDotSegments(path){if("/"==path)return"/";for(var leadingSlash="/"==path[0]?"/":"",trailingSlash="/"===path[path.length-1]?"/":"",segments=path.split("/"),out=[],up=0,pos=0;pos<segments.length;pos++){var segment=segments[pos];switch(segment){case"":case".":break;case"..":out.length>0?out.pop():up++;break;default:out.push(segment)}}if(""==leadingSlash){for(;up-- >0;)out.unshift("..");0===out.length&&out.push(".")}return leadingSlash+out.join("/")+trailingSlash}function _joinAndCanonicalizePath(parts){var path=parts[_ComponentIndex.Path];return path=null==path?"":_removeDotSegments(path),parts[_ComponentIndex.Path]=path,_buildFromEncodedParts(parts[_ComponentIndex.Scheme],parts[_ComponentIndex.UserInfo],parts[_ComponentIndex.Domain],parts[_ComponentIndex.Port],path,parts[_ComponentIndex.QueryData],parts[_ComponentIndex.Fragment])}function _resolveUrl(base,url){var parts=_split(encodeURI(url)),baseParts=_split(base);if(null!=parts[_ComponentIndex.Scheme])return _joinAndCanonicalizePath(parts);parts[_ComponentIndex.Scheme]=baseParts[_ComponentIndex.Scheme];for(var i=_ComponentIndex.Scheme;i<=_ComponentIndex.Port;i++)null==parts[i]&&(parts[i]=baseParts[i]);if("/"==parts[_ComponentIndex.Path][0])return _joinAndCanonicalizePath(parts);var path=baseParts[_ComponentIndex.Path];null==path&&(path="/");var index=path.lastIndexOf("/");return path=path.substring(0,index+1)+parts[_ComponentIndex.Path],parts[_ComponentIndex.Path]=path,_joinAndCanonicalizePath(parts)}function isDirectiveMetadata(type){return type instanceof _angular_core.Directive}function findLast(arr,condition){for(var i=arr.length-1;i>=0;i--)if(condition(arr[i]))return arr[i];return null}function ngfactoryFilePath(filePath,forceSourceFile){void 0===forceSourceFile&&(forceSourceFile=!1);var urlWithSuffix=splitTypescriptSuffix(filePath,forceSourceFile);return urlWithSuffix[0]+".ngfactory"+urlWithSuffix[1]}function stripGeneratedFileSuffix(filePath){return filePath.replace(GENERATED_FILE,".")}function isGeneratedFile(filePath){return GENERATED_FILE.test(filePath)}function splitTypescriptSuffix(path,forceSourceFile){if(void 0===forceSourceFile&&(forceSourceFile=!1),path.endsWith(".d.ts"))return[path.slice(0,-5),forceSourceFile?".ts":".d.ts"];var lastDot=path.lastIndexOf(".");return-1!==lastDot?[path.substring(0,lastDot),path.substring(lastDot)]:[path,""]}function summaryFileName(fileName){return fileName.replace(STRIP_SRC_FILE_SUFFIXES,"")+".ngsummary.json"}function summaryForJitFileName(fileName,forceSourceFile){void 0===forceSourceFile&&(forceSourceFile=!1);var urlWithSuffix=splitTypescriptSuffix(stripGeneratedFileSuffix(fileName),forceSourceFile);return urlWithSuffix[0]+".ngsummary"+urlWithSuffix[1]}function stripSummaryForJitFileSuffix(filePath){return filePath.replace(JIT_SUMMARY_FILE,".")}function summaryForJitName(symbolName){return symbolName+"NgSummary"}function stripSummaryForJitNameSuffix(symbolName){return symbolName.replace(JIT_SUMMARY_NAME,"")}function hasLifecycleHook(reflector,hook,token){return reflector.hasLifecycleHook(token,getHookName(hook))}function getAllLifecycleHooks(reflector,token){return LIFECYCLE_HOOKS_VALUES.filter(function(hook){return hasLifecycleHook(reflector,hook,token)})}function getHookName(hook){switch(hook){case LifecycleHooks.OnInit:return"ngOnInit";case LifecycleHooks.OnDestroy:return"ngOnDestroy";case LifecycleHooks.DoCheck:return"ngDoCheck";case LifecycleHooks.OnChanges:return"ngOnChanges";case LifecycleHooks.AfterContentInit:return"ngAfterContentInit";case LifecycleHooks.AfterContentChecked:return"ngAfterContentChecked";case LifecycleHooks.AfterViewInit:return"ngAfterViewInit";case LifecycleHooks.AfterViewChecked:return"ngAfterViewChecked"}}function _isNgModuleMetadata(obj){return obj instanceof _angular_core.NgModule}function _isPipeMetadata(type){return type instanceof _angular_core.Pipe}function flattenArray(tree,out){if(void 0===out&&(out=[]),tree)for(var i=0;i<tree.length;i++){var item=_angular_core.resolveForwardRef(tree[i]);Array.isArray(item)?flattenArray(item,out):out.push(item)}return out}function dedupeArray(array){return array?Array.from(new Set(array)):[]}function flattenAndDedupeArray(tree){return dedupeArray(flattenArray(tree))}function isValidType(value){return value instanceof StaticSymbol||value instanceof _angular_core.Type}function extractIdentifiers(value,targetIdentifiers){visitValue(value,new _CompileValueConverter,targetIdentifiers)}function stringifyType(type){return type instanceof StaticSymbol?type.name+" in "+type.filePath:_angular_core.ɵstringify(type)}function componentStillLoadingError(compType){var error=Error("Can't compile synchronously as "+_angular_core.ɵstringify(compType)+" is still being loaded!");return error[_angular_core.ɵERROR_COMPONENT_TYPE]=compType,error}function findReadVarNames(stmts){var visitor=new _ReadVarVisitor;return visitor.visitAllStatements(stmts,null),visitor.varNames}function applySourceSpanToStatementIfNeeded(stmt,sourceSpan){if(!sourceSpan)return stmt;var transformer=new _ApplySourceSpanTransformer(sourceSpan);return stmt.visitStatement(transformer,null)}function applySourceSpanToExpressionIfNeeded(expr,sourceSpan){if(!sourceSpan)return expr;var transformer=new _ApplySourceSpanTransformer(sourceSpan);return expr.visitExpression(transformer,null)}function variable(name,type,sourceSpan){return new ReadVarExpr(name,type,sourceSpan)}function importExpr(id,typeParams,sourceSpan){return void 0===typeParams&&(typeParams=null),new ExternalExpr(id,null,typeParams,sourceSpan)}function importType(id,typeParams,typeModifiers){return void 0===typeParams&&(typeParams=null),void 0===typeModifiers&&(typeModifiers=null),null!=id?expressionType(importExpr(id,typeParams,null),typeModifiers):null}function expressionType(expr,typeModifiers){return void 0===typeModifiers&&(typeModifiers=null),null!=expr?new ExpressionType(expr,typeModifiers):null}function literalArr(values,type,sourceSpan){return new LiteralArrayExpr(values,type,sourceSpan)}function literalMap(values,type){return void 0===type&&(type=null),new LiteralMapExpr(values.map(function(e){return new LiteralMapEntry(e.key,e.value,e.quoted)}),type,null)}function not(expr,sourceSpan){return new NotExpr(expr,sourceSpan)}function assertNotNull(expr,sourceSpan){return new AssertNotNull(expr,sourceSpan)}function fn(params,body,type,sourceSpan){return new FunctionExpr(params,body,type,sourceSpan)}function literal(value,type,sourceSpan){return new LiteralExpr(value,type,sourceSpan)}function convertValueToOutputAst(ctx,value,type){return void 0===type&&(type=null),visitValue(value,new _ValueOutputAstTransformer(ctx),type)}function providerDef(ctx,providerAst){var flags=0;providerAst.eager||(flags|=4096),providerAst.providerType===ProviderAstType.PrivateService&&(flags|=8192),providerAst.lifecycleHooks.forEach(function(lifecycleHook){lifecycleHook!==LifecycleHooks.OnDestroy&&providerAst.providerType!==ProviderAstType.Directive&&providerAst.providerType!==ProviderAstType.Component||(flags|=lifecycleHookToNodeFlag(lifecycleHook))});var _a=providerAst.multiProvider?multiProviderDef(ctx,flags,providerAst.providers):singleProviderDef(ctx,flags,providerAst.providerType,providerAst.providers[0]);return{providerExpr:_a.providerExpr,flags:_a.flags,depsExpr:_a.depsExpr,tokenExpr:tokenExpr(ctx,providerAst.token)}}function multiProviderDef(ctx,flags,providers){function convertDeps(providerIndex,deps){return deps.map(function(dep,depIndex){var paramName="p"+providerIndex+"_"+depIndex;return allParams.push(new FnParam(paramName,DYNAMIC_TYPE)),allDepDefs.push(depDef(ctx,dep)),variable(paramName)})}var allDepDefs=[],allParams=[],exprs=providers.map(function(provider,providerIndex){var expr;if(provider.useClass){var depExprs=convertDeps(providerIndex,provider.deps||provider.useClass.diDeps);expr=ctx.importExpr(provider.useClass.reference).instantiate(depExprs)}else if(provider.useFactory){var depExprs=convertDeps(providerIndex,provider.deps||provider.useFactory.diDeps);expr=ctx.importExpr(provider.useFactory.reference).callFn(depExprs)}else if(provider.useExisting){var depExprs=convertDeps(providerIndex,[{token:provider.useExisting}]);expr=depExprs[0]}else expr=convertValueToOutputAst(ctx,provider.useValue);return expr});return{providerExpr:fn(allParams,[new ReturnStatement(literalArr(exprs))],INFERRED_TYPE),flags:1024|flags,depsExpr:literalArr(allDepDefs)}}function singleProviderDef(ctx,flags,providerType,providerMeta){var providerExpr,deps;return providerType===ProviderAstType.Directive||providerType===ProviderAstType.Component?(providerExpr=ctx.importExpr(providerMeta.useClass.reference),flags|=16384,deps=providerMeta.deps||providerMeta.useClass.diDeps):providerMeta.useClass?(providerExpr=ctx.importExpr(providerMeta.useClass.reference),flags|=512,deps=providerMeta.deps||providerMeta.useClass.diDeps):providerMeta.useFactory?(providerExpr=ctx.importExpr(providerMeta.useFactory.reference),flags|=1024,deps=providerMeta.deps||providerMeta.useFactory.diDeps):providerMeta.useExisting?(providerExpr=NULL_EXPR,flags|=2048,deps=[{token:providerMeta.useExisting}]):(providerExpr=convertValueToOutputAst(ctx,providerMeta.useValue),flags|=256,deps=[]),{providerExpr:providerExpr,flags:flags,depsExpr:literalArr(deps.map(function(dep){return depDef(ctx,dep)}))}}function tokenExpr(ctx,tokenMeta){return tokenMeta.identifier?ctx.importExpr(tokenMeta.identifier.reference):literal(tokenMeta.value)}function depDef(ctx,dep){var expr=dep.isValue?convertValueToOutputAst(ctx,dep.value):tokenExpr(ctx,dep.token),flags=0;return dep.isSkipSelf&&(flags|=1),dep.isOptional&&(flags|=2),dep.isValue&&(flags|=8),0===flags?expr:literalArr([literal(flags),expr])}function lifecycleHookToNodeFlag(lifecycleHook){var nodeFlag=0;switch(lifecycleHook){case LifecycleHooks.AfterContentChecked:nodeFlag=2097152;break;case LifecycleHooks.AfterContentInit:nodeFlag=1048576;break;case LifecycleHooks.AfterViewChecked:nodeFlag=8388608;break;case LifecycleHooks.AfterViewInit:nodeFlag=4194304;break;case LifecycleHooks.DoCheck:nodeFlag=262144;break;case LifecycleHooks.OnChanges:nodeFlag=524288;break;case LifecycleHooks.OnDestroy:nodeFlag=131072;break;case LifecycleHooks.OnInit:nodeFlag=65536}return nodeFlag}function componentFactoryResolverProviderDef(reflector,ctx,flags,entryComponents){var entryComponentFactories=entryComponents.map(function(entryComponent){return ctx.importExpr(entryComponent.componentFactory)}),token=createTokenForExternalReference(reflector,Identifiers.ComponentFactoryResolver),classMeta={diDeps:[{isValue:!0,value:literalArr(entryComponentFactories)},{token:token,isSkipSelf:!0,isOptional:!0},{token:createTokenForExternalReference(reflector,Identifiers.NgModuleRef)}],lifecycleHooks:[],reference:reflector.resolveExternalReference(Identifiers.CodegenComponentFactoryResolver)},_a=singleProviderDef(ctx,flags,ProviderAstType.PrivateService,{token:token,multi:!1,useClass:classMeta});return{providerExpr:_a.providerExpr,flags:_a.flags,depsExpr:_a.depsExpr,tokenExpr:tokenExpr(ctx,token)}}function toBase64String(value){var b64="";value=utf8Encode(value);for(var i=0;i<value.length;){var i1=value.charCodeAt(i++),i2=value.charCodeAt(i++),i3=value.charCodeAt(i++);b64+=toBase64Digit(i1>>2),b64+=toBase64Digit((3&i1)<<4|(isNaN(i2)?0:i2>>4)),b64+=isNaN(i2)?"=":toBase64Digit((15&i2)<<2|i3>>6),b64+=isNaN(i2)||isNaN(i3)?"=":toBase64Digit(63&i3)}return b64}function toBase64VLQ(value){value=value<0?1+(-value<<1):value<<1;var out="";do{var digit=31&value;value>>=5,value>0&&(digit|=32),out+=toBase64Digit(digit)}while(value>0);return out}function toBase64Digit(value){if(value<0||value>=64)throw new Error("Can only encode value in the range [0, 63]");return B64_DIGITS[value]}function escapeIdentifier(input,escapeDollar,alwaysQuote){if(void 0===alwaysQuote&&(alwaysQuote=!0),null==input)return null;var body=input.replace(_SINGLE_QUOTE_ESCAPE_STRING_RE,function(){for(var match=[],_i=0;_i<arguments.length;_i++)match[_i]=arguments[_i];return"$"==match[0]?escapeDollar?"\\$":"$":"\n"==match[0]?"\\n":"\r"==match[0]?"\\r":"\\"+match[0]});return alwaysQuote||!_LEGAL_IDENTIFIER_RE.test(body)?"'"+body+"'":body}function _createIndent(count){for(var res="",i=0;i<count;i++)res+=_INDENT_WITH;return res}function debugOutputAstAsTypeScript(ast){var converter=new _TsEmitterVisitor,ctx=EmitterVisitorContext.createRoot();return(Array.isArray(ast)?ast:[ast]).forEach(function(ast){if(ast instanceof Statement)ast.visitStatement(converter,ctx);else if(ast instanceof Expression)ast.visitExpression(converter,ctx);else{if(!(ast instanceof Type$1))throw new Error("Don't know how to print debug info for "+ast);ast.visitType(converter,ctx)}}),ctx.toSource()}function registerContext(ctx,specs){for(var _i=0,specs_1=specs;_i<specs_1.length;_i++){var spec=specs_1[_i];SECURITY_SCHEMA[spec.toLowerCase()]=ctx}}function _isPixelDimensionStyle(prop){switch(prop){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}function stripComments(input){return input.replace(_commentRe,"")}function extractSourceMappingUrl(input){var matcher=input.match(_sourceMappingUrlRe);return matcher?matcher[0]:""}function processRules(input,ruleCallback){var inputWithEscapedBlocks=escapeBlocks(input),nextBlockIndex=0;return inputWithEscapedBlocks.escapedString.replace(_ruleRe,function(){for(var m=[],_i=0;_i<arguments.length;_i++)m[_i]=arguments[_i];var selector=m[2],content="",suffix=m[4],contentPrefix="";suffix&&suffix.startsWith("{"+BLOCK_PLACEHOLDER)&&(content=inputWithEscapedBlocks.blocks[nextBlockIndex++],suffix=suffix.substring(BLOCK_PLACEHOLDER.length+1),contentPrefix="{");var rule=ruleCallback(new CssRule(selector,content));return""+m[1]+rule.selector+m[3]+contentPrefix+rule.content+suffix})}function escapeBlocks(input){for(var inputParts=input.split(_curlyRe),resultParts=[],escapedBlocks=[],bracketCount=0,currentBlockParts=[],partIndex=0;partIndex<inputParts.length;partIndex++){var part=inputParts[partIndex];part==CLOSE_CURLY&&bracketCount--,bracketCount>0?currentBlockParts.push(part):(currentBlockParts.length>0&&(escapedBlocks.push(currentBlockParts.join("")),resultParts.push(BLOCK_PLACEHOLDER),currentBlockParts=[]),resultParts.push(part)),part==OPEN_CURLY&&bracketCount++}return currentBlockParts.length>0&&(escapedBlocks.push(currentBlockParts.join("")),resultParts.push(BLOCK_PLACEHOLDER)),new StringWithEscapedBlocks(resultParts.join(""),escapedBlocks)}function getStylesVarName(component){var result="styles";return component&&(result+="_"+identifierName(component.type)),result}function convertActionBinding(localResolver,implicitReceiver,action,bindingId){localResolver||(localResolver=new DefaultLocalResolver);var actionWithoutBuiltins=convertPropertyBindingBuiltins({createLiteralArrayConverter:function(argCount){return function(args){return literalArr(args)}},createLiteralMapConverter:function(keys){return function(values){return literalMap(keys.map(function(k,i){return{key:k.key,value:values[i],quoted:k.quoted}}))}},createPipeConverter:function(name){throw new Error("Illegal State: Actions are not allowed to contain pipes. Pipe: "+name)}},action),visitor=new _AstToIrVisitor(localResolver,implicitReceiver,bindingId),actionStmts=[];flattenStatements(actionWithoutBuiltins.visit(visitor,_Mode.Statement),actionStmts),prependTemporaryDecls(visitor.temporaryCount,bindingId,actionStmts);var lastIndex=actionStmts.length-1,preventDefaultVar=null;if(lastIndex>=0){var lastStatement=actionStmts[lastIndex],returnExpr=convertStmtIntoExpression(lastStatement);returnExpr&&(preventDefaultVar=createPreventDefaultVar(bindingId),actionStmts[lastIndex]=preventDefaultVar.set(returnExpr.cast(DYNAMIC_TYPE).notIdentical(literal(!1))).toDeclStmt(null,[StmtModifier.Final]))}return new ConvertActionBindingResult(actionStmts,preventDefaultVar)}function convertPropertyBindingBuiltins(converterFactory,ast){return convertBuiltins(converterFactory,ast)}function convertPropertyBinding(localResolver,implicitReceiver,expressionWithoutBuiltins,bindingId){localResolver||(localResolver=new DefaultLocalResolver);var currValExpr=createCurrValueExpr(bindingId),stmts=[],visitor=new _AstToIrVisitor(localResolver,implicitReceiver,bindingId),outputExpr=expressionWithoutBuiltins.visit(visitor,_Mode.Expression);if(visitor.temporaryCount)for(var i=0;i<visitor.temporaryCount;i++)stmts.push(temporaryDeclaration(bindingId,i));return stmts.push(currValExpr.set(outputExpr).toDeclStmt(null,[StmtModifier.Final])),new ConvertPropertyBindingResult(stmts,currValExpr)}function convertBuiltins(converterFactory,ast){var visitor=new _BuiltinAstConverter(converterFactory);return ast.visit(visitor)}function temporaryName(bindingId,temporaryNumber){return"tmp_"+bindingId+"_"+temporaryNumber}function temporaryDeclaration(bindingId,temporaryNumber){return new DeclareVarStmt(temporaryName(bindingId,temporaryNumber),NULL_EXPR)}function prependTemporaryDecls(temporaryCount,bindingId,statements){for(var i=temporaryCount-1;i>=0;i--)statements.unshift(temporaryDeclaration(bindingId,i))}function ensureStatementMode(mode,ast){if(mode!==_Mode.Statement)throw new Error("Expected a statement, but saw "+ast)}function ensureExpressionMode(mode,ast){if(mode!==_Mode.Expression)throw new Error("Expected an expression, but saw "+ast)}function convertToStatementIfNeeded(mode,expr){return mode===_Mode.Statement?expr.toStmt():expr}function flattenStatements(arg,output){Array.isArray(arg)?arg.forEach(function(entry){return flattenStatements(entry,output)}):output.push(arg)}function createCurrValueExpr(bindingId){return variable("currVal_"+bindingId)}function createPreventDefaultVar(bindingId){return variable("pd_"+bindingId)}function convertStmtIntoExpression(stmt){return stmt instanceof ExpressionStatement?stmt.expr:stmt instanceof ReturnStatement?stmt.value:null}function needsAdditionalRootNode(astNodes){var lastAstNode=astNodes[astNodes.length-1];return lastAstNode instanceof EmbeddedTemplateAst?lastAstNode.hasViewContainer:lastAstNode instanceof ElementAst?isNgContainer(lastAstNode.name)&&lastAstNode.children.length?needsAdditionalRootNode(lastAstNode.children):lastAstNode.hasViewContainer:lastAstNode instanceof NgContentAst}function elementBindingDef(inputAst,dirAst){switch(inputAst.type){case PropertyBindingType.Attribute:return literalArr([literal(1),literal(inputAst.name),literal(inputAst.securityContext)]);case PropertyBindingType.Property:return literalArr([literal(8),literal(inputAst.name),literal(inputAst.securityContext)]);case PropertyBindingType.Animation:return literalArr([literal(8|(dirAst&&dirAst.directive.isComponent?32:16)),literal("@"+inputAst.name),literal(inputAst.securityContext)]);case PropertyBindingType.Class:return literalArr([literal(2),literal(inputAst.name),NULL_EXPR]);case PropertyBindingType.Style:return literalArr([literal(4),literal(inputAst.name),literal(inputAst.unit)])}}function fixedAttrsDef(elementAst){var mapResult=Object.create(null);return elementAst.attrs.forEach(function(attrAst){mapResult[attrAst.name]=attrAst.value}),elementAst.directives.forEach(function(dirAst){Object.keys(dirAst.directive.hostAttributes).forEach(function(name){var value=dirAst.directive.hostAttributes[name],prevValue=mapResult[name];mapResult[name]=null!=prevValue?mergeAttributeValue(name,prevValue,value):value})}),literalArr(Object.keys(mapResult).sort().map(function(attrName){return literalArr([literal(attrName),literal(mapResult[attrName])])}))}function mergeAttributeValue(attrName,attrValue1,attrValue2){return attrName==CLASS_ATTR$1||attrName==STYLE_ATTR?attrValue1+" "+attrValue2:attrValue2}function callCheckStmt(nodeIndex,exprs){return exprs.length>10?CHECK_VAR.callFn([VIEW_VAR,literal(nodeIndex),literal(1),literalArr(exprs)]):CHECK_VAR.callFn([VIEW_VAR,literal(nodeIndex),literal(0)].concat(exprs))}function callUnwrapValue(nodeIndex,bindingIdx,expr){return importExpr(Identifiers.unwrapValue).callFn([VIEW_VAR,literal(nodeIndex),literal(bindingIdx),expr])}function findStaticQueryIds(nodes,result){return void 0===result&&(result=new Map),nodes.forEach(function(node){var staticQueryIds=new Set,dynamicQueryIds=new Set,queryMatches=void 0;node instanceof ElementAst?(findStaticQueryIds(node.children,result),node.children.forEach(function(child){var childData=result.get(child);childData.staticQueryIds.forEach(function(queryId){return staticQueryIds.add(queryId)}),childData.dynamicQueryIds.forEach(function(queryId){return dynamicQueryIds.add(queryId)})}),queryMatches=node.queryMatches):node instanceof EmbeddedTemplateAst&&(findStaticQueryIds(node.children,result),node.children.forEach(function(child){var childData=result.get(child);childData.staticQueryIds.forEach(function(queryId){return dynamicQueryIds.add(queryId)}),childData.dynamicQueryIds.forEach(function(queryId){return dynamicQueryIds.add(queryId)})}),queryMatches=node.queryMatches),queryMatches&&queryMatches.forEach(function(match){return staticQueryIds.add(match.queryId)}),dynamicQueryIds.forEach(function(queryId){return staticQueryIds.delete(queryId)}),result.set(node,{staticQueryIds:staticQueryIds,dynamicQueryIds:dynamicQueryIds})}),result}function staticViewQueryIds(nodeStaticQueryIds){var staticQueryIds=new Set,dynamicQueryIds=new Set;return Array.from(nodeStaticQueryIds.values()).forEach(function(entry){entry.staticQueryIds.forEach(function(queryId){return staticQueryIds.add(queryId)}),entry.dynamicQueryIds.forEach(function(queryId){return dynamicQueryIds.add(queryId)})}),dynamicQueryIds.forEach(function(queryId){return staticQueryIds.delete(queryId)}),{staticQueryIds:staticQueryIds,dynamicQueryIds:dynamicQueryIds}}function elementEventNameAndTarget(eventAst,dirAst){return eventAst.isAnimation?{name:"@"+eventAst.name+"."+eventAst.phase,target:dirAst&&dirAst.directive.isComponent?"component":null}:eventAst}function calcStaticDynamicQueryFlags(queryIds,queryId,isFirst){var flags=0;return!isFirst||!queryIds.staticQueryIds.has(queryId)&&queryIds.dynamicQueryIds.has(queryId)?flags|=536870912:flags|=268435456,flags}function toTypeScript(file,preamble){if(void 0===preamble&&(preamble=""),!file.stmts)throw new Error("Illegal state: No stmts present on GeneratedFile "+file.genFileUrl);return(new TypeScriptEmitter).emitStatements(sourceUrl(file.srcFileUrl),file.genFileUrl,file.stmts,preamble)}function serializeSummaries(forJitCtx,summaryResolver,symbolResolver,symbols,types){var toJsonSerializer=new ToJsonSerializer(symbolResolver,summaryResolver),forJitSerializer=new ForJitSerializer(forJitCtx,symbolResolver);symbols.forEach(function(resolvedSymbol){return toJsonSerializer.addOrMergeSummary({symbol:resolvedSymbol.symbol,metadata:resolvedSymbol.metadata})});for(var processedIndex=0;processedIndex<toJsonSerializer.symbols.length;processedIndex++){var symbol=toJsonSerializer.symbols[processedIndex];if(summaryResolver.isLibraryFile(symbol.filePath)){var summary=summaryResolver.resolveSummary(symbol);if(!summary){var resolvedSymbol=symbolResolver.resolveSymbol(symbol);resolvedSymbol&&(summary={symbol:resolvedSymbol.symbol,metadata:resolvedSymbol.metadata})}summary&&(summary.type&&forJitSerializer.addLibType(summary.type),toJsonSerializer.addOrMergeSummary(summary))}}types.forEach(function(_a){var summary=_a.summary,metadata=_a.metadata;if(forJitSerializer.addSourceType(summary,metadata),toJsonSerializer.addOrMergeSummary({symbol:summary.type.reference,metadata:null,type:summary}),summary.summaryKind===CompileSummaryKind.NgModule){var ngModuleSummary=summary;ngModuleSummary.exportedDirectives.concat(ngModuleSummary.exportedPipes).forEach(function(id){var symbol=id.reference;if(summaryResolver.isLibraryFile(symbol.filePath)){var summary_1=summaryResolver.resolveSummary(symbol);summary_1&&toJsonSerializer.addOrMergeSummary(summary_1)}})}});var _a=toJsonSerializer.serialize(),json=_a.json,exportAs=_a.exportAs;return forJitSerializer.serialize(exportAs),{json:json,exportAs:exportAs}}function deserializeSummaries(symbolCache,json){return new FromJsonDeserializer(symbolCache).deserialize(json)}function createForJitStub(outputCtx,reference){return createSummaryForJitFunction(outputCtx,reference,NULL_EXPR)}function createSummaryForJitFunction(outputCtx,reference,value){var fnName=summaryForJitName(reference.name);outputCtx.statements.push(fn([],[new ReturnStatement(value)],new ArrayType(DYNAMIC_TYPE)).toDeclStmt(fnName,[StmtModifier.Final,StmtModifier.Exported]))}function _resolveStyleStatements(symbolResolver,compileResult,needsShim,fileSuffix){compileResult.dependencies.forEach(function(dep){dep.setValue(symbolResolver.getStaticSymbol(_stylesModuleUrl(dep.moduleUrl,needsShim,fileSuffix),dep.name))})}function _stylesModuleUrl(stylesheetUrl,shim,suffix){return stylesheetUrl+(shim?".shim":"")+".ngstyle"+suffix}function analyzeNgModules(programStaticSymbols,host,metadataResolver){var _a=_createNgModules(programStaticSymbols,host,metadataResolver);return _analyzeNgModules(programStaticSymbols,_a.ngModules,_a.symbolsMissingModule,metadataResolver)}function analyzeAndValidateNgModules(programStaticSymbols,host,metadataResolver){var result=analyzeNgModules(programStaticSymbols,host,metadataResolver);if(result.symbolsMissingModule&&result.symbolsMissingModule.length){throw syntaxError(result.symbolsMissingModule.map(function(s){return"Cannot determine the module for class "+s.name+" in "+s.filePath+"! Add "+s.name+" to the NgModule to fix it."}).join("\n"))}return result}function _analyzeNgModules(programSymbols,ngModuleMetas,symbolsMissingModule,metadataResolver){var moduleMetasByRef=new Map;ngModuleMetas.forEach(function(ngModule){return moduleMetasByRef.set(ngModule.type.reference,ngModule)});var ngModuleByPipeOrDirective=new Map,ngModulesByFile=new Map,ngDirectivesByFile=new Map,ngPipesByFile=new Map,ngInjectablesByFile=new Map,filePaths=new Set;programSymbols.forEach(function(symbol){var filePath=symbol.filePath;filePaths.add(filePath),metadataResolver.isInjectable(symbol)&&ngInjectablesByFile.set(filePath,(ngInjectablesByFile.get(filePath)||[]).concat(symbol))}),ngModuleMetas.forEach(function(ngModuleMeta){var srcFileUrl=ngModuleMeta.type.reference.filePath;filePaths.add(srcFileUrl),ngModulesByFile.set(srcFileUrl,(ngModulesByFile.get(srcFileUrl)||[]).concat(ngModuleMeta.type.reference)),ngModuleMeta.declaredDirectives.forEach(function(dirIdentifier){var fileUrl=dirIdentifier.reference.filePath;filePaths.add(fileUrl),ngDirectivesByFile.set(fileUrl,(ngDirectivesByFile.get(fileUrl)||[]).concat(dirIdentifier.reference)),ngModuleByPipeOrDirective.set(dirIdentifier.reference,ngModuleMeta)}),ngModuleMeta.declaredPipes.forEach(function(pipeIdentifier){var fileUrl=pipeIdentifier.reference.filePath;filePaths.add(fileUrl),ngPipesByFile.set(fileUrl,(ngPipesByFile.get(fileUrl)||[]).concat(pipeIdentifier.reference)),ngModuleByPipeOrDirective.set(pipeIdentifier.reference,ngModuleMeta)})});var files=[];return filePaths.forEach(function(srcUrl){var directives=ngDirectivesByFile.get(srcUrl)||[],pipes=ngPipesByFile.get(srcUrl)||[],ngModules=ngModulesByFile.get(srcUrl)||[],injectables=ngInjectablesByFile.get(srcUrl)||[];files.push({srcUrl:srcUrl,directives:directives,pipes:pipes,ngModules:ngModules,injectables:injectables})}),{ngModuleByPipeOrDirective:ngModuleByPipeOrDirective,files:files,ngModules:ngModuleMetas,symbolsMissingModule:symbolsMissingModule}}function extractProgramSymbols(staticSymbolResolver,files,host){var staticSymbols=[];return files.filter(function(fileName){return host.isSourceFile(fileName)}).forEach(function(sourceFile){staticSymbolResolver.getSymbolsOf(sourceFile).forEach(function(symbol){var resolvedSymbol=staticSymbolResolver.resolveSymbol(symbol),symbolMeta=resolvedSymbol.metadata;symbolMeta&&"error"!=symbolMeta.__symbolic&&staticSymbols.push(resolvedSymbol.symbol)})}),staticSymbols}function _createNgModules(programStaticSymbols,host,metadataResolver){var ngModules=new Map,programPipesAndDirectives=[],ngModulePipesAndDirective=new Set,addNgModule=function(staticSymbol){if(ngModules.has(staticSymbol)||!host.isSourceFile(staticSymbol.filePath))return!1;var ngModule=metadataResolver.getNgModuleMetadata(staticSymbol,!1);return ngModule&&(ngModules.set(ngModule.type.reference,ngModule),ngModule.declaredDirectives.forEach(function(dir){return ngModulePipesAndDirective.add(dir.reference)}),ngModule.declaredPipes.forEach(function(pipe){return ngModulePipesAndDirective.add(pipe.reference)}),ngModule.transitiveModule.modules.forEach(function(modMeta){return addNgModule(modMeta.reference)})),!!ngModule};programStaticSymbols.forEach(function(staticSymbol){addNgModule(staticSymbol)||!metadataResolver.isDirective(staticSymbol)&&!metadataResolver.isPipe(staticSymbol)||programPipesAndDirectives.push(staticSymbol)});var symbolsMissingModule=programPipesAndDirectives.filter(function(s){return!ngModulePipesAndDirective.has(s)});return{ngModules:Array.from(ngModules.values()),symbolsMissingModule:symbolsMissingModule}}function shouldIgnore(value){return value&&"ignore"==value.__symbolic}function expandedMessage(error){switch(error.message){case"Reference to non-exported class":if(error.context&&error.context.className)return"Reference to a non-exported class "+error.context.className+". Consider exporting the class";break;case"Variable not initialized":return"Only initialized variables and constants can be referenced because the value of this variable is needed by the template compiler";case"Destructuring not supported":return"Referencing an exported destructured variable or constant is not supported by the template compiler. Consider simplifying this to avoid destructuring";case"Could not resolve type":if(error.context&&error.context.typeName)return"Could not resolve type "+error.context.typeName;break;case"Function call not supported":return(error.context&&error.context.name?"Calling function '"+error.context.name+"', f":"F")+"unction calls are not supported. Consider replacing the function or lambda with a reference to an exported function";case"Reference to a local symbol":if(error.context&&error.context.name)return"Reference to a local (non-exported) symbol '"+error.context.name+"'. Consider exporting the symbol"}return error.message}function produceErrorMessage(error){return"Error encountered resolving symbol values statically. "+expandedMessage(error)}function mapStringMap(input,transform){if(!input)return{};var result={};return Object.keys(input).forEach(function(key){var value=transform(input[key],key);shouldIgnore(value)||(HIDDEN_KEY.test(key)?Object.defineProperty(result,key,{enumerable:!1,configurable:!0,value:value}):result[key]=value)}),result}function isPrimitive(o){return null===o||"function"!=typeof o&&"object"!=typeof o}function positionalError(message,fileName,line,column){var result=new Error(message);return result.fileName=fileName,result.line=line,result.column=column,result}function unescapeIdentifier(identifier){return identifier.startsWith("___")?identifier.substr(1):identifier}function createAotCompiler(compilerHost,options){var translations=options.translations||"",urlResolver=createOfflineCompileUrlResolver(),symbolCache=new StaticSymbolCache,summaryResolver=new AotSummaryResolver(compilerHost,symbolCache),symbolResolver=new StaticSymbolResolver(compilerHost,symbolCache,summaryResolver),staticReflector=new StaticReflector(summaryResolver,symbolResolver),console=new _angular_core.ɵConsole,htmlParser=new I18NHtmlParser(new HtmlParser,translations,options.i18nFormat,options.missingTranslation,console),config=new CompilerConfig({defaultEncapsulation:_angular_core.ViewEncapsulation.Emulated,useJit:!1,enableLegacyTemplate:!1!==options.enableLegacyTemplate,missingTranslation:options.missingTranslation}),normalizer=new DirectiveNormalizer({get:function(url){return compilerHost.loadResource(url)}},urlResolver,htmlParser,config),expressionParser=new Parser(new Lexer),elementSchemaRegistry=new DomElementSchemaRegistry,tmplParser=new TemplateParser(config,staticReflector,expressionParser,elementSchemaRegistry,htmlParser,console,[]),resolver=new CompileMetadataResolver(config,new NgModuleResolver(staticReflector),new DirectiveResolver(staticReflector),new PipeResolver(staticReflector),summaryResolver,elementSchemaRegistry,normalizer,console,symbolCache,staticReflector),viewCompiler=new ViewCompiler(config,staticReflector,elementSchemaRegistry);return{compiler:new AotCompiler(config,compilerHost,staticReflector,resolver,tmplParser,new StyleCompiler(urlResolver),viewCompiler,new NgModuleCompiler(staticReflector),new TypeScriptEmitter,summaryResolver,options.locale||null,options.i18nFormat||null,options.enableSummariesForJit||null,symbolResolver),reflector:staticReflector}}function interpretStatements(statements){var ctx=new _ExecutionContext(null,null,null,new Map);(new StatementInterpreter).visitAllStatements(statements,ctx);var result={};return ctx.exports.forEach(function(exportName){result[exportName]=ctx.vars.get(exportName)}),result}function _executeFunctionStatements(varNames,varValues,statements,ctx,visitor){for(var childCtx=ctx.createChildWihtLocalVars(),i=0;i<varNames.length;i++)childCtx.vars.set(varNames[i],varValues[i]);var result=visitor.visitAllStatements(statements,childCtx);return result?result.value:null}function createDynamicClass(_classStmt,_ctx,_visitor){var propertyDescriptors={};_classStmt.getters.forEach(function(getter){propertyDescriptors[getter.name]={configurable:!1,get:function(){var instanceCtx=new _ExecutionContext(_ctx,this,_classStmt.name,_ctx.vars);return _executeFunctionStatements([],[],getter.body,instanceCtx,_visitor)}}}),_classStmt.methods.forEach(function(method){var paramNames=method.params.map(function(param){return param.name});propertyDescriptors[method.name]={writable:!1,configurable:!1,value:function(){for(var args=[],_i=0;_i<arguments.length;_i++)args[_i]=arguments[_i];var instanceCtx=new _ExecutionContext(_ctx,this,_classStmt.name,_ctx.vars);return _executeFunctionStatements(paramNames,args,method.body,instanceCtx,_visitor)}}});var ctorParamNames=_classStmt.constructorMethod.params.map(function(param){return param.name}),ctor=function(){for(var _this=this,args=[],_i=0;_i<arguments.length;_i++)args[_i]=arguments[_i];var instanceCtx=new _ExecutionContext(_ctx,this,_classStmt.name,_ctx.vars);_classStmt.fields.forEach(function(field){_this[field.name]=void 0}),_executeFunctionStatements(ctorParamNames,args,_classStmt.constructorMethod.body,instanceCtx,_visitor)},superClass=_classStmt.parent?_classStmt.parent.visitExpression(_visitor,_ctx):Object;return ctor.prototype=Object.create(superClass.prototype,propertyDescriptors),ctor}function _declareFn(varNames,statements,ctx,visitor){return function(){for(var args=[],_i=0;_i<arguments.length;_i++)args[_i]=arguments[_i];return _executeFunctionStatements(varNames,args,statements,ctx,visitor)}}function evalExpression(sourceUrl$$1,ctx,vars){var fnBody=ctx.toSource()+"\n//# sourceURL="+sourceUrl$$1,fnArgNames=[],fnArgValues=[];for(var argName in vars)fnArgNames.push(argName),fnArgValues.push(vars[argName]);if(_angular_core.isDevMode()){var emptyFn=(new(Function.bind.apply(Function,[void 0].concat(fnArgNames.concat("return null;"))))).toString(),headerLines=emptyFn.slice(0,emptyFn.indexOf("return null;")).split("\n").length-1;fnBody+="\n"+ctx.toSourceMapGenerator(sourceUrl$$1,sourceUrl$$1,headerLines).toJsComment()}return(new(Function.bind.apply(Function,[void 0].concat(fnArgNames.concat(fnBody))))).apply(void 0,fnArgValues)}function jitStatements(sourceUrl$$1,statements){var converter=new JitEmitterVisitor,ctx=EmitterVisitorContext.createRoot();return converter.visitAllStatements(statements,ctx),converter.createReturnStmt(ctx),evalExpression(sourceUrl$$1,ctx,converter.getArgs())}function assertComponent(meta){if(!meta.isComponent)throw new Error("Could not compile '"+identifierName(meta.type)+"' because it is not a component.")}function flattenSummaries(fn$$1,out){return void 0===out&&(out=[]),fn$$1().forEach(function(entry){"function"==typeof entry?flattenSummaries(entry,out):out.push(entry)}),out}function createOutputContext(){return{statements:[],genFilePath:"",importExpr:function(symbol){return importExpr({name:identifierName(symbol),moduleName:null,runtime:symbol})}}}function _mergeOptions(optionsArr){return{useJit:_lastDefined(optionsArr.map(function(options){return options.useJit})),defaultEncapsulation:_lastDefined(optionsArr.map(function(options){return options.defaultEncapsulation})),providers:_mergeArrays(optionsArr.map(function(options){return options.providers})),missingTranslation:_lastDefined(optionsArr.map(function(options){return options.missingTranslation})),enableLegacyTemplate:_lastDefined(optionsArr.map(function(options){return options.enableLegacyTemplate}))}}function _lastDefined(args){for(var i=args.length-1;i>=0;i--)if(void 0!==args[i])return args[i]}function _mergeArrays(parts){var result=[];return parts.forEach(function(part){return part&&result.push.apply(result,part)}),result}var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])},VERSION=new _angular_core.Version("4.2.6"),TextAst=function(){function TextAst(value,ngContentIndex,sourceSpan){this.value=value,this.ngContentIndex=ngContentIndex,this.sourceSpan=sourceSpan}return TextAst.prototype.visit=function(visitor,context){return visitor.visitText(this,context)},TextAst}(),BoundTextAst=function(){function BoundTextAst(value,ngContentIndex,sourceSpan){this.value=value,this.ngContentIndex=ngContentIndex,this.sourceSpan=sourceSpan}return BoundTextAst.prototype.visit=function(visitor,context){return visitor.visitBoundText(this,context)},BoundTextAst}(),AttrAst=function(){function AttrAst(name,value,sourceSpan){this.name=name,this.value=value,this.sourceSpan=sourceSpan}return AttrAst.prototype.visit=function(visitor,context){return visitor.visitAttr(this,context)},AttrAst}(),BoundElementPropertyAst=function(){function BoundElementPropertyAst(name,type,securityContext,value,unit,sourceSpan){this.name=name,this.type=type,this.securityContext=securityContext,this.value=value,this.unit=unit,this.sourceSpan=sourceSpan}return BoundElementPropertyAst.prototype.visit=function(visitor,context){return visitor.visitElementProperty(this,context)},Object.defineProperty(BoundElementPropertyAst.prototype,"isAnimation",{get:function(){return this.type===PropertyBindingType.Animation},enumerable:!0,configurable:!0}),BoundElementPropertyAst}(),BoundEventAst=function(){function BoundEventAst(name,target,phase,handler,sourceSpan){this.name=name,this.target=target,this.phase=phase,this.handler=handler,this.sourceSpan=sourceSpan}return BoundEventAst.calcFullName=function(name,target,phase){return target?target+":"+name:phase?"@"+name+"."+phase:name},BoundEventAst.prototype.visit=function(visitor,context){return visitor.visitEvent(this,context)},Object.defineProperty(BoundEventAst.prototype,"fullName",{get:function(){return BoundEventAst.calcFullName(this.name,this.target,this.phase)},enumerable:!0,configurable:!0}),Object.defineProperty(BoundEventAst.prototype,"isAnimation",{get:function(){return!!this.phase},enumerable:!0,configurable:!0}),BoundEventAst}(),ReferenceAst=function(){function ReferenceAst(name,value,sourceSpan){this.name=name,this.value=value,this.sourceSpan=sourceSpan}return ReferenceAst.prototype.visit=function(visitor,context){return visitor.visitReference(this,context)},ReferenceAst}(),VariableAst=function(){function VariableAst(name,value,sourceSpan){this.name=name,this.value=value,this.sourceSpan=sourceSpan}return VariableAst.prototype.visit=function(visitor,context){return visitor.visitVariable(this,context)},VariableAst}(),ElementAst=function(){function ElementAst(name,attrs,inputs,outputs,references,directives,providers,hasViewContainer,queryMatches,children,ngContentIndex,sourceSpan,endSourceSpan){this.name=name,this.attrs=attrs,this.inputs=inputs,this.outputs=outputs,this.references=references,this.directives=directives,this.providers=providers,this.hasViewContainer=hasViewContainer,this.queryMatches=queryMatches,this.children=children,this.ngContentIndex=ngContentIndex,this.sourceSpan=sourceSpan,this.endSourceSpan=endSourceSpan}return ElementAst.prototype.visit=function(visitor,context){return visitor.visitElement(this,context)},ElementAst}(),EmbeddedTemplateAst=function(){function EmbeddedTemplateAst(attrs,outputs,references,variables,directives,providers,hasViewContainer,queryMatches,children,ngContentIndex,sourceSpan){this.attrs=attrs,this.outputs=outputs,this.references=references,this.variables=variables,this.directives=directives,this.providers=providers,this.hasViewContainer=hasViewContainer,this.queryMatches=queryMatches,this.children=children,this.ngContentIndex=ngContentIndex,this.sourceSpan=sourceSpan}return EmbeddedTemplateAst.prototype.visit=function(visitor,context){return visitor.visitEmbeddedTemplate(this,context)},EmbeddedTemplateAst}(),BoundDirectivePropertyAst=function(){function BoundDirectivePropertyAst(directiveName,templateName,value,sourceSpan){this.directiveName=directiveName,this.templateName=templateName,this.value=value,this.sourceSpan=sourceSpan}return BoundDirectivePropertyAst.prototype.visit=function(visitor,context){return visitor.visitDirectiveProperty(this,context)},BoundDirectivePropertyAst}(),DirectiveAst=function(){function DirectiveAst(directive,inputs,hostProperties,hostEvents,contentQueryStartId,sourceSpan){this.directive=directive,this.inputs=inputs,this.hostProperties=hostProperties,this.hostEvents=hostEvents,this.contentQueryStartId=contentQueryStartId,this.sourceSpan=sourceSpan}return DirectiveAst.prototype.visit=function(visitor,context){return visitor.visitDirective(this,context)},DirectiveAst}(),ProviderAst=function(){function ProviderAst(token,multiProvider,eager,providers,providerType,lifecycleHooks,sourceSpan){this.token=token,this.multiProvider=multiProvider,this.eager=eager,this.providers=providers,this.providerType=providerType,this.lifecycleHooks=lifecycleHooks,this.sourceSpan=sourceSpan}return ProviderAst.prototype.visit=function(visitor,context){return null},ProviderAst}(),ProviderAstType={};ProviderAstType.PublicService=0,ProviderAstType.PrivateService=1,ProviderAstType.Component=2,ProviderAstType.Directive=3,ProviderAstType.Builtin=4,ProviderAstType[ProviderAstType.PublicService]="PublicService",ProviderAstType[ProviderAstType.PrivateService]="PrivateService",ProviderAstType[ProviderAstType.Component]="Component",ProviderAstType[ProviderAstType.Directive]="Directive",ProviderAstType[ProviderAstType.Builtin]="Builtin";var NgContentAst=function(){function NgContentAst(index,ngContentIndex,sourceSpan){this.index=index,this.ngContentIndex=ngContentIndex,this.sourceSpan=sourceSpan}return NgContentAst.prototype.visit=function(visitor,context){return visitor.visitNgContent(this,context)},NgContentAst}(),PropertyBindingType={};PropertyBindingType.Property=0,PropertyBindingType.Attribute=1,PropertyBindingType.Class=2,PropertyBindingType.Style=3,PropertyBindingType.Animation=4,PropertyBindingType[PropertyBindingType.Property]="Property",PropertyBindingType[PropertyBindingType.Attribute]="Attribute",PropertyBindingType[PropertyBindingType.Class]="Class",PropertyBindingType[PropertyBindingType.Style]="Style",PropertyBindingType[PropertyBindingType.Animation]="Animation";var NullTemplateVisitor=function(){function NullTemplateVisitor(){}return NullTemplateVisitor.prototype.visitNgContent=function(ast,context){},NullTemplateVisitor.prototype.visitEmbeddedTemplate=function(ast,context){},NullTemplateVisitor.prototype.visitElement=function(ast,context){},NullTemplateVisitor.prototype.visitReference=function(ast,context){},NullTemplateVisitor.prototype.visitVariable=function(ast,context){},NullTemplateVisitor.prototype.visitEvent=function(ast,context){},NullTemplateVisitor.prototype.visitElementProperty=function(ast,context){},NullTemplateVisitor.prototype.visitAttr=function(ast,context){},NullTemplateVisitor.prototype.visitBoundText=function(ast,context){},NullTemplateVisitor.prototype.visitText=function(ast,context){},NullTemplateVisitor.prototype.visitDirective=function(ast,context){},NullTemplateVisitor.prototype.visitDirectiveProperty=function(ast,context){},NullTemplateVisitor}(),RecursiveTemplateAstVisitor=function(_super){function RecursiveTemplateAstVisitor(){return _super.call(this)||this}return __extends(RecursiveTemplateAstVisitor,_super),RecursiveTemplateAstVisitor.prototype.visitEmbeddedTemplate=function(ast,context){return this.visitChildren(context,function(visit){visit(ast.attrs),visit(ast.references),visit(ast.variables),visit(ast.directives),visit(ast.providers),visit(ast.children)})},RecursiveTemplateAstVisitor.prototype.visitElement=function(ast,context){return this.visitChildren(context,function(visit){visit(ast.attrs),visit(ast.inputs),visit(ast.outputs),visit(ast.references),visit(ast.directives),visit(ast.providers),visit(ast.children)})},RecursiveTemplateAstVisitor.prototype.visitDirective=function(ast,context){return this.visitChildren(context,function(visit){visit(ast.inputs),visit(ast.hostProperties),visit(ast.hostEvents)})},RecursiveTemplateAstVisitor.prototype.visitChildren=function(context,cb){function visit(children){children&&children.length&&results.push(templateVisitAll(t,children,context))}var results=[],t=this;return cb(visit),[].concat.apply([],results)},RecursiveTemplateAstVisitor}(NullTemplateVisitor),StaticSymbol=function(){function StaticSymbol(filePath,name,members){this.filePath=filePath,this.name=name,this.members=members}return StaticSymbol.prototype.assertNoMembers=function(){if(this.members.length)throw new Error("Illegal state: symbol without members expected, but got "+JSON.stringify(this)+".")},StaticSymbol}(),StaticSymbolCache=function(){function StaticSymbolCache(){this.cache=new Map}return StaticSymbolCache.prototype.get=function(declarationFile,name,members){members=members||[];var memberSuffix=members.length?"."+members.join("."):"",key='"'+declarationFile+'".'+name+memberSuffix,result=this.cache.get(key);return result||(result=new StaticSymbol(declarationFile,name,members),this.cache.set(key,result)),result},StaticSymbolCache}(),TagContentType={};TagContentType.RAW_TEXT=0,TagContentType.ESCAPABLE_RAW_TEXT=1,TagContentType.PARSABLE_DATA=2,TagContentType[TagContentType.RAW_TEXT]="RAW_TEXT",TagContentType[TagContentType.ESCAPABLE_RAW_TEXT]="ESCAPABLE_RAW_TEXT",TagContentType[TagContentType.PARSABLE_DATA]="PARSABLE_DATA";var NAMED_ENTITIES={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:""},HtmlTagDefinition=function(){function HtmlTagDefinition(_a){var _b=void 0===_a?{}:_a,closedByChildren=_b.closedByChildren,requiredParents=_b.requiredParents,implicitNamespacePrefix=_b.implicitNamespacePrefix,_c=_b.contentType,contentType=void 0===_c?TagContentType.PARSABLE_DATA:_c,_d=_b.closedByParent,closedByParent=void 0!==_d&&_d,_e=_b.isVoid,isVoid=void 0!==_e&&_e,_f=_b.ignoreFirstLf,ignoreFirstLf=void 0!==_f&&_f,_this=this;this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,closedByChildren&&closedByChildren.length>0&&closedByChildren.forEach(function(tagName){return _this.closedByChildren[tagName]=!0}),this.isVoid=isVoid,this.closedByParent=closedByParent||isVoid,requiredParents&&requiredParents.length>0&&(this.requiredParents={},this.parentToAdd=requiredParents[0],requiredParents.forEach(function(tagName){return _this.requiredParents[tagName]=!0})),this.implicitNamespacePrefix=implicitNamespacePrefix||null,this.contentType=contentType,this.ignoreFirstLf=ignoreFirstLf}return HtmlTagDefinition.prototype.requireExtraParent=function(currentParent){if(!this.requiredParents)return!1;if(!currentParent)return!0;var lcParent=currentParent.toLowerCase();return!("template"===lcParent||"ng-template"===currentParent)&&1!=this.requiredParents[lcParent]},HtmlTagDefinition.prototype.isClosedByChild=function(name){return this.isVoid||name.toLowerCase()in this.closedByChildren},HtmlTagDefinition}(),TAG_DEFINITIONS={base:new HtmlTagDefinition({isVoid:!0}),meta:new HtmlTagDefinition({isVoid:!0}),area:new HtmlTagDefinition({isVoid:!0}),embed:new HtmlTagDefinition({isVoid:!0}),link:new HtmlTagDefinition({isVoid:!0}),img:new HtmlTagDefinition({isVoid:!0}),input:new HtmlTagDefinition({isVoid:!0}),param:new HtmlTagDefinition({isVoid:!0}),hr:new HtmlTagDefinition({isVoid:!0}),br:new HtmlTagDefinition({isVoid:!0}),source:new HtmlTagDefinition({isVoid:!0}),track:new HtmlTagDefinition({isVoid:!0}),wbr:new HtmlTagDefinition({isVoid:!0}),p:new HtmlTagDefinition({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 HtmlTagDefinition({closedByChildren:["tbody","tfoot"]}),tbody:new HtmlTagDefinition({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new HtmlTagDefinition({closedByChildren:["tbody"],closedByParent:!0}),tr:new HtmlTagDefinition({closedByChildren:["tr"],requiredParents:["tbody","tfoot","thead"],closedByParent:!0}),td:new HtmlTagDefinition({closedByChildren:["td","th"],closedByParent:!0}),th:new HtmlTagDefinition({closedByChildren:["td","th"],closedByParent:!0}),col:new HtmlTagDefinition({requiredParents:["colgroup"],isVoid:!0}),svg:new HtmlTagDefinition({implicitNamespacePrefix:"svg"}),math:new HtmlTagDefinition({implicitNamespacePrefix:"math"}),li:new HtmlTagDefinition({closedByChildren:["li"],closedByParent:!0}),dt:new HtmlTagDefinition({closedByChildren:["dt","dd"]}),dd:new HtmlTagDefinition({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new HtmlTagDefinition({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new HtmlTagDefinition({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new HtmlTagDefinition({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new HtmlTagDefinition({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new HtmlTagDefinition({closedByChildren:["optgroup"],closedByParent:!0}),option:new HtmlTagDefinition({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new HtmlTagDefinition({ignoreFirstLf:!0}),listing:new HtmlTagDefinition({ignoreFirstLf:!0}),style:new HtmlTagDefinition({contentType:TagContentType.RAW_TEXT}),script:new HtmlTagDefinition({contentType:TagContentType.RAW_TEXT}),title:new HtmlTagDefinition({contentType:TagContentType.ESCAPABLE_RAW_TEXT}),textarea:new HtmlTagDefinition({contentType:TagContentType.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})},_DEFAULT_TAG_DEFINITION=new HtmlTagDefinition,_SELECTOR_REGEXP=new RegExp("(\\:not\\()|([-\\w]+)|(?:\\.([-\\w]+))|(?:\\[([-.\\w*]+)(?:=([\"']?)([^\\]\"']*)\\5)?\\])|(\\))|(\\s*,\\s*)","g"),CssSelector=function(){function CssSelector(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}return CssSelector.parse=function(selector){var match,results=[],_addResult=function(res,cssSel){cssSel.notSelectors.length>0&&!cssSel.element&&0==cssSel.classNames.length&&0==cssSel.attrs.length&&(cssSel.element="*"),res.push(cssSel)},cssSelector=new CssSelector,current=cssSelector,inNot=!1;for(_SELECTOR_REGEXP.lastIndex=0;match=_SELECTOR_REGEXP.exec(selector);){if(match[1]){if(inNot)throw new Error("Nesting :not is not allowed in a selector");inNot=!0,current=new CssSelector,cssSelector.notSelectors.push(current)}if(match[2]&¤t.setElement(match[2]),match[3]&¤t.addClassName(match[3]),match[4]&¤t.addAttribute(match[4],match[6]),match[7]&&(inNot=!1,current=cssSelector),match[8]){if(inNot)throw new Error("Multiple selectors in :not are not supported");_addResult(results,cssSelector),cssSelector=current=new CssSelector}}return _addResult(results,cssSelector),results},CssSelector.prototype.isElementSelector=function(){return this.hasElementSelector()&&0==this.classNames.length&&0==this.attrs.length&&0===this.notSelectors.length},CssSelector.prototype.hasElementSelector=function(){return!!this.element},CssSelector.prototype.setElement=function(element){void 0===element&&(element=null),this.element=element},CssSelector.prototype.getMatchingElementTemplate=function(){for(var tagName=this.element||"div",classAttr=this.classNames.length>0?' class="'+this.classNames.join(" ")+'"':"",attrs="",i=0;i<this.attrs.length;i+=2){attrs+=" "+this.attrs[i]+(""!==this.attrs[i+1]?'="'+this.attrs[i+1]+'"':"")}return getHtmlTagDefinition(tagName).isVoid?"<"+tagName+classAttr+attrs+"/>":"<"+tagName+classAttr+attrs+"></"+tagName+">"},CssSelector.prototype.addAttribute=function(name,value){void 0===value&&(value=""),this.attrs.push(name,value&&value.toLowerCase()||"")},CssSelector.prototype.addClassName=function(name){this.classNames.push(name.toLowerCase())},CssSelector.prototype.toString=function(){var res=this.element||"";if(this.classNames&&this.classNames.forEach(function(klass){return res+="."+klass}),this.attrs)for(var i=0;i<this.attrs.length;i+=2){var name=this.attrs[i],value=this.attrs[i+1];res+="["+name+(value?"="+value:"")+"]"}return this.notSelectors.forEach(function(notSelector){return res+=":not("+notSelector+")"}),res},CssSelector}(),SelectorMatcher=function(){function SelectorMatcher(){this._elementMap=new Map,this._elementPartialMap=new Map,this._classMap=new Map,this._classPartialMap=new Map,this._attrValueMap=new Map,this._attrValuePartialMap=new Map,this._listContexts=[]}return SelectorMatcher.createNotMatcher=function(notSelectors){var notMatcher=new SelectorMatcher;return notMatcher.addSelectables(notSelectors,null),notMatcher},SelectorMatcher.prototype.addSelectables=function(cssSelectors,callbackCtxt){var listContext=null;cssSelectors.length>1&&(listContext=new SelectorListContext(cssSelectors),this._listContexts.push(listContext));for(var i=0;i<cssSelectors.length;i++)this._addSelectable(cssSelectors[i],callbackCtxt,listContext)},SelectorMatcher.prototype._addSelectable=function(cssSelector,callbackCtxt,listContext){var matcher=this,element=cssSelector.element,classNames=cssSelector.classNames,attrs=cssSelector.attrs,selectable=new SelectorContext(cssSelector,callbackCtxt,listContext);if(element){var isTerminal=0===attrs.length&&0===classNames.length;isTerminal?this._addTerminal(matcher._elementMap,element,selectable):matcher=this._addPartial(matcher._elementPartialMap,element)}if(classNames)for(var i=0;i<classNames.length;i++){var isTerminal=0===attrs.length&&i===classNames.length-1,className=classNames[i];isTerminal?this._addTerminal(matcher._classMap,className,selectable):matcher=this._addPartial(matcher._classPartialMap,className)}if(attrs)for(var i=0;i<attrs.length;i+=2){var isTerminal=i===attrs.length-2,name=attrs[i],value=attrs[i+1];if(isTerminal){var terminalMap=matcher._attrValueMap,terminalValuesMap=terminalMap.get(name);terminalValuesMap||(terminalValuesMap=new Map,terminalMap.set(name,terminalValuesMap)),this._addTerminal(terminalValuesMap,value,selectable)}else{var partialMap=matcher._attrValuePartialMap,partialValuesMap=partialMap.get(name);partialValuesMap||(partialValuesMap=new Map,partialMap.set(name,partialValuesMap)),matcher=this._addPartial(partialValuesMap,value)}}},SelectorMatcher.prototype._addTerminal=function(map,name,selectable){var terminalList=map.get(name);terminalList||(terminalList=[],map.set(name,terminalList)),terminalList.push(selectable)},SelectorMatcher.prototype._addPartial=function(map,name){var matcher=map.get(name);return matcher||(matcher=new SelectorMatcher,map.set(name,matcher)),matcher},SelectorMatcher.prototype.match=function(cssSelector,matchedCallback){for(var result=!1,element=cssSelector.element,classNames=cssSelector.classNames,attrs=cssSelector.attrs,i=0;i<this._listContexts.length;i++)this._listContexts[i].alreadyMatched=!1;if(result=this._matchTerminal(this._elementMap,element,cssSelector,matchedCallback)||result,result=this._matchPartial(this._elementPartialMap,element,cssSelector,matchedCallback)||result,classNames)for(var i=0;i<classNames.length;i++){var className=classNames[i];result=this._matchTerminal(this._classMap,className,cssSelector,matchedCallback)||result,result=this._matchPartial(this._classPartialMap,className,cssSelector,matchedCallback)||result}if(attrs)for(var i=0;i<attrs.length;i+=2){var name=attrs[i],value=attrs[i+1],terminalValuesMap=this._attrValueMap.get(name);value&&(result=this._matchTerminal(terminalValuesMap,"",cssSelector,matchedCallback)||result),result=this._matchTerminal(terminalValuesMap,value,cssSelector,matchedCallback)||result;var partialValuesMap=this._attrValuePartialMap.get(name);value&&(result=this._matchPartial(partialValuesMap,"",cssSelector,matchedCallback)||result),result=this._matchPartial(partialValuesMap,value,cssSelector,matchedCallback)||result}return result},SelectorMatcher.prototype._matchTerminal=function(map,name,cssSelector,matchedCallback){if(!map||"string"!=typeof name)return!1;var selectables=map.get(name)||[],starSelectables=map.get("*");if(starSelectables&&(selectables=selectables.concat(starSelectables)),0===selectables.length)return!1;for(var selectable,result=!1,i=0;i<selectables.length;i++)selectable=selectables[i],result=selectable.finalize(cssSelector,matchedCallback)||result;return result},SelectorMatcher.prototype._matchPartial=function(map,name,cssSelector,matchedCallback){if(!map||"string"!=typeof name)return!1;var nestedSelector=map.get(name);return!!nestedSelector&&nestedSelector.match(cssSelector,matchedCallback)},SelectorMatcher}(),SelectorListContext=function(){function SelectorListContext(selectors){this.selectors=selectors,this.alreadyMatched=!1}return SelectorListContext}(),SelectorContext=function(){function SelectorContext(selector,cbContext,listContext){this.selector=selector,this.cbContext=cbContext,this.listContext=listContext,this.notSelectors=selector.notSelectors}return SelectorContext.prototype.finalize=function(cssSelector,callback){var result=!0;if(this.notSelectors.length>0&&(!this.listContext||!this.listContext.alreadyMatched)){result=!SelectorMatcher.createNotMatcher(this.notSelectors).match(cssSelector,null)}return!result||!callback||this.listContext&&this.listContext.alreadyMatched||(this.listContext&&(this.listContext.alreadyMatched=!0),callback(this.selector,this.cbContext)),result},SelectorContext}(),MODULE_SUFFIX="",DASH_CASE_REGEXP=/-+([a-z0-9])/g,ValueTransformer=function(){function ValueTransformer(){}return ValueTransformer.prototype.visitArray=function(arr,context){var _this=this;return arr.map(function(value){return visitValue(value,_this,context)})},ValueTransformer.prototype.visitStringMap=function(map,context){var _this=this,result={};return Object.keys(map).forEach(function(key){result[key]=visitValue(map[key],_this,context)}),result},ValueTransformer.prototype.visitPrimitive=function(value,context){return value},ValueTransformer.prototype.visitOther=function(value,context){return value},ValueTransformer}(),SyncAsync={assertSync:function(value){if(_angular_core.ɵisPromise(value))throw new Error("Illegal state: value cannot be a promise");return value},then:function(value,cb){return _angular_core.ɵisPromise(value)?value.then(cb):cb(value)},all:function(syncAsyncValues){return syncAsyncValues.some(_angular_core.ɵisPromise)?Promise.all(syncAsyncValues):syncAsyncValues}},ERROR_SYNTAX_ERROR="ngSyntaxError",STRING_MAP_PROTO=Object.getPrototypeOf({}),HOST_REG_EXP=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/,CompileAnimationEntryMetadata=function(){function CompileAnimationEntryMetadata(name,definitions){void 0===name&&(name=null),void 0===definitions&&(definitions=null),this.name=name,this.definitions=definitions}return CompileAnimationEntryMetadata}(),CompileAnimationStateMetadata=function(){function CompileAnimationStateMetadata(){}return CompileAnimationStateMetadata}(),CompileAnimationStateDeclarationMetadata=function(_super){function CompileAnimationStateDeclarationMetadata(stateNameExpr,styles){var _this=_super.call(this)||this;return _this.stateNameExpr=stateNameExpr,_this.styles=styles,_this}return __extends(CompileAnimationStateDeclarationMetadata,_super),CompileAnimationStateDeclarationMetadata}(CompileAnimationStateMetadata),CompileAnimationStateTransitionMetadata=function(_super){function CompileAnimationStateTransitionMetadata(stateChangeExpr,steps){var _this=_super.call(this)||this;return _this.stateChangeExpr=stateChangeExpr,_this.steps=steps,_this}return __extends(CompileAnimationStateTransitionMetadata,_super),CompileAnimationStateTransitionMetadata}(CompileAnimationStateMetadata),CompileAnimationMetadata=function(){function CompileAnimationMetadata(){}return CompileAnimationMetadata}(),CompileAnimationKeyframesSequenceMetadata=function(_super){function CompileAnimationKeyframesSequenceMetadata(steps){void 0===steps&&(steps=[]);var _this=_super.call(this)||this;return _this.steps=steps,_this}return __extends(CompileAnimationKeyframesSequenceMetadata,_super),CompileAnimationKeyframesSequenceMetadata}(CompileAnimationMetadata),CompileAnimationStyleMetadata=function(_super){function CompileAnimationStyleMetadata(offset,styles){void 0===styles&&(styles=null);var _this=_super.call(this)||this;return _this.offset=offset,_this.styles=styles,_this}return __extends(CompileAnimationStyleMetadata,_super),CompileAnimationStyleMetadata}(CompileAnimationMetadata),CompileAnimationAnimateMetadata=function(_super){function CompileAnimationAnimateMetadata(timings,styles){void 0===timings&&(timings=0),void 0===styles&&(styles=null);var _this=_super.call(this)||this;return _this.timings=timings,_this.styles=styles,_this}return __extends(CompileAnimationAnimateMetadata,_super),CompileAnimationAnimateMetadata}(CompileAnimationMetadata),CompileAnimationWithStepsMetadata=function(_super){function CompileAnimationWithStepsMetadata(steps){void 0===steps&&(steps=null);var _this=_super.call(this)||this;return _this.steps=steps,_this}return __extends(CompileAnimationWithStepsMetadata,_super),CompileAnimationWithStepsMetadata}(CompileAnimationMetadata),CompileAnimationSequenceMetadata=function(_super){function CompileAnimationSequenceMetadata(steps){return void 0===steps&&(steps=null),_super.call(this,steps)||this}return __extends(CompileAnimationSequenceMetadata,_super),CompileAnimationSequenceMetadata}(CompileAnimationWithStepsMetadata),CompileAnimationGroupMetadata=function(_super){function CompileAnimationGroupMetadata(steps){return void 0===steps&&(steps=null),_super.call(this,steps)||this}return __extends(CompileAnimationGroupMetadata,_super),CompileAnimationGroupMetadata}(CompileAnimationWithStepsMetadata),_anonymousTypeIndex=0,CompileSummaryKind={};CompileSummaryKind.Pipe=0,CompileSummaryKind.Directive=1,CompileSummaryKind.NgModule=2,CompileSummaryKind.Injectable=3,CompileSummaryKind[CompileSummaryKind.Pipe]="Pipe",CompileSummaryKind[CompileSummaryKind.Directive]="Directive",CompileSummaryKind[CompileSummaryKind.NgModule]="NgModule",CompileSummaryKind[CompileSummaryKind.Injectable]="Injectable";var CompileStylesheetMetadata=function(){function CompileStylesheetMetadata(_a){var _b=void 0===_a?{}:_a,moduleUrl=_b.moduleUrl,styles=_b.styles,styleUrls=_b.styleUrls;this.moduleUrl=moduleUrl||null,this.styles=_normalizeArray(styles),this.styleUrls=_normalizeArray(styleUrls)}return CompileStylesheetMetadata}(),CompileTemplateMetadata=function(){function CompileTemplateMetadata(_a){var encapsulation=_a.encapsulation,template=_a.template,templateUrl=_a.templateUrl,styles=_a.styles,styleUrls=_a.styleUrls,externalStylesheets=_a.externalStylesheets,animations=_a.animations,ngContentSelectors=_a.ngContentSelectors,interpolation=_a.interpolation,isInline=_a.isInline;if(this.encapsulation=encapsulation,this.template=template,this.templateUrl=templateUrl,this.styles=_normalizeArray(styles),this.styleUrls=_normalizeArray(styleUrls),this.externalStylesheets=_normalizeArray(externalStylesheets),this.animations=animations?flatten(animations):[],this.ngContentSelectors=ngContentSelectors||[],interpolation&&2!=interpolation.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=interpolation,this.isInline=isInline}return CompileTemplateMetadata.prototype.toSummary=function(){return{animations:this.animations.map(function(anim){return anim.name}),ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation}},CompileTemplateMetadata}(),CompileDirectiveMetadata=function(){function CompileDirectiveMetadata(_a){var isHost=_a.isHost,type=_a.type,isComponent=_a.isComponent,selector=_a.selector,exportAs=_a.exportAs,changeDetection=_a.changeDetection,inputs=_a.inputs,outputs=_a.outputs,hostListeners=_a.hostListeners,hostProperties=_a.hostProperties,hostAttributes=_a.hostAttributes,providers=_a.providers,viewProviders=_a.viewProviders,queries=_a.queries,viewQueries=_a.viewQueries,entryComponents=_a.entryComponents,template=_a.template,componentViewType=_a.componentViewType,rendererType=_a.rendererType,componentFactory=_a.componentFactory;this.isHost=!!isHost,this.type=type,this.isComponent=isComponent,this.selector=selector,this.exportAs=exportAs,this.changeDetection=changeDetection,this.inputs=inputs,this.outputs=outputs,this.hostListeners=hostListeners,this.hostProperties=hostProperties,this.hostAttributes=hostAttributes,this.providers=_normalizeArray(providers),this.viewProviders=_normalizeArray(viewProviders),this.queries=_normalizeArray(queries),this.viewQueries=_normalizeArray(viewQueries),this.entryComponents=_normalizeArray(entryComponents),this.template=template,this.componentViewType=componentViewType,this.rendererType=rendererType,this.componentFactory=componentFactory}return CompileDirectiveMetadata.create=function(_a){var isHost=_a.isHost,type=_a.type,isComponent=_a.isComponent,selector=_a.selector,exportAs=_a.exportAs,changeDetection=_a.changeDetection,inputs=_a.inputs,outputs=_a.outputs,host=_a.host,providers=_a.providers,viewProviders=_a.viewProviders,queries=_a.queries,viewQueries=_a.viewQueries,entryComponents=_a.entryComponents,template=_a.template,componentViewType=_a.componentViewType,rendererType=_a.rendererType,componentFactory=_a.componentFactory,hostListeners={},hostProperties={},hostAttributes={};null!=host&&Object.keys(host).forEach(function(key){var value=host[key],matches=key.match(HOST_REG_EXP);null===matches?hostAttributes[key]=value:null!=matches[1]?hostProperties[matches[1]]=value:null!=matches[2]&&(hostListeners[matches[2]]=value)});var inputsMap={};null!=inputs&&inputs.forEach(function(bindConfig){var parts=splitAtColon(bindConfig,[bindConfig,bindConfig]);inputsMap[parts[0]]=parts[1]});var outputsMap={};return null!=outputs&&outputs.forEach(function(bindConfig){var parts=splitAtColon(bindConfig,[bindConfig,bindConfig]);outputsMap[parts[0]]=parts[1]}),new CompileDirectiveMetadata({isHost:isHost,type:type,isComponent:!!isComponent,selector:selector,exportAs:exportAs,changeDetection:changeDetection,inputs:inputsMap,outputs:outputsMap,hostListeners:hostListeners,hostProperties:hostProperties,hostAttributes:hostAttributes,providers:providers,viewProviders:viewProviders,queries:queries,viewQueries:viewQueries,entryComponents:entryComponents,template:template,componentViewType:componentViewType,rendererType:rendererType,componentFactory:componentFactory})},CompileDirectiveMetadata.prototype.toSummary=function(){return{summaryKind:CompileSummaryKind.Directive,type:this.type,isComponent:this.isComponent,selector:this.selector,exportAs:this.exportAs,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,providers:this.providers,viewProviders:this.viewProviders,queries:this.queries,viewQueries:this.viewQueries,entryComponents:this.entryComponents,changeDetection:this.changeDetection,template:this.template&&this.template.toSummary(),componentViewType:this.componentViewType,rendererType:this.rendererType,componentFactory:this.componentFactory}},CompileDirectiveMetadata}(),CompilePipeMetadata=function(){function CompilePipeMetadata(_a){var type=_a.type,name=_a.name,pure=_a.pure;this.type=type,this.name=name,this.pure=!!pure}return CompilePipeMetadata.prototype.toSummary=function(){return{summaryKind:CompileSummaryKind.Pipe,type:this.type,name:this.name,pure:this.pure}},CompilePipeMetadata}(),CompileNgModuleMetadata=function(){function CompileNgModuleMetadata(_a){var type=_a.type,providers=_a.providers,declaredDirectives=_a.declaredDirectives,exportedDirectives=_a.exportedDirectives,declaredPipes=_a.declaredPipes,exportedPipes=_a.exportedPipes,entryComponents=_a.entryComponents,bootstrapComponents=_a.bootstrapComponents,importedModules=_a.importedModules,exportedModules=_a.exportedModules,schemas=_a.schemas,transitiveModule=_a.transitiveModule,id=_a.id;this.type=type||null,this.declaredDirectives=_normalizeArray(declaredDirectives),this.exportedDirectives=_normalizeArray(exportedDirectives),this.declaredPipes=_normalizeArray(declaredPipes),this.exportedPipes=_normalizeArray(exportedPipes),this.providers=_normalizeArray(providers),this.entryComponents=_normalizeArray(entryComponents),this.bootstrapComponents=_normalizeArray(bootstrapComponents),this.importedModules=_normalizeArray(importedModules),this.exportedModules=_normalizeArray(exportedModules),this.schemas=_normalizeArray(schemas),this.id=id||null,this.transitiveModule=transitiveModule||null}return CompileNgModuleMetadata.prototype.toSummary=function(){var module=this.transitiveModule;return{summaryKind:CompileSummaryKind.NgModule,type:this.type,entryComponents:module.entryComponents,providers:module.providers,modules:module.modules,exportedDirectives:module.exportedDirectives,exportedPipes:module.exportedPipes}},CompileNgModuleMetadata}(),TransitiveCompileNgModuleMetadata=function(){function TransitiveCompileNgModuleMetadata(){this.directivesSet=new Set,this.directives=[],this.exportedDirectivesSet=new Set,this.exportedDirectives=[],this.pipesSet=new Set,this.pipes=[],this.exportedPipesSet=new Set,this.exportedPipes=[],this.modulesSet=new Set,this.modules=[],this.entryComponentsSet=new Set,this.entryComponents=[],this.providers=[]}return TransitiveCompileNgModuleMetadata.prototype.addProvider=function(provider,module){this.providers.push({provider:provider,module:module})},TransitiveCompileNgModuleMetadata.prototype.addDirective=function(id){this.directivesSet.has(id.reference)||(this.directivesSet.add(id.reference),this.directives.push(id))},TransitiveCompileNgModuleMetadata.prototype.addExportedDirective=function(id){this.exportedDirectivesSet.has(id.reference)||(this.exportedDirectivesSet.add(id.reference),this.exportedDirectives.push(id))},TransitiveCompileNgModuleMetadata.prototype.addPipe=function(id){this.pipesSet.has(id.reference)||(this.pipesSet.add(id.reference),this.pipes.push(id))},TransitiveCompileNgModuleMetadata.prototype.addExportedPipe=function(id){this.exportedPipesSet.has(id.reference)||(this.exportedPipesSet.add(id.reference),this.exportedPipes.push(id))},TransitiveCompileNgModuleMetadata.prototype.addModule=function(id){this.modulesSet.has(id.reference)||(this.modulesSet.add(id.reference),this.modules.push(id))},TransitiveCompileNgModuleMetadata.prototype.addEntryComponent=function(ec){this.entryComponentsSet.has(ec.componentType)||(this.entryComponentsSet.add(ec.componentType),this.entryComponents.push(ec))},TransitiveCompileNgModuleMetadata}(),ProviderMeta=function(){function ProviderMeta(token,_a){var useClass=_a.useClass,useValue=_a.useValue,useExisting=_a.useExisting,useFactory=_a.useFactory,deps=_a.deps,multi=_a.multi;this.token=token,this.useClass=useClass||null,this.useValue=useValue,this.useExisting=useExisting,this.useFactory=useFactory||null,this.dependencies=deps||null,this.multi=!!multi}return ProviderMeta}(),CompileReflector=function(){function CompileReflector(){}return CompileReflector.prototype.parameters=function(typeOrFunc){},CompileReflector.prototype.annotations=function(typeOrFunc){},CompileReflector.prototype.propMetadata=function(typeOrFunc){},CompileReflector.prototype.hasLifecycleHook=function(type,lcProperty){},CompileReflector.prototype.componentModuleUrl=function(type,cmpMetadata){},CompileReflector.prototype.resolveExternalReference=function(ref){},CompileReflector}(),CompilerConfig=function(){function CompilerConfig(_a){var _b=void 0===_a?{}:_a,_c=_b.defaultEncapsulation,defaultEncapsulation=void 0===_c?_angular_core.ViewEncapsulation.Emulated:_c,_d=_b.useJit,useJit=void 0===_d||_d,missingTranslation=_b.missingTranslation,enableLegacyTemplate=_b.enableLegacyTemplate;this.defaultEncapsulation=defaultEncapsulation,this.useJit=!!useJit,this.missingTranslation=missingTranslation||null,this.enableLegacyTemplate=!1!==enableLegacyTemplate}return CompilerConfig}(),ParserError=function(){function ParserError(message,input,errLocation,ctxLocation){this.input=input,this.errLocation=errLocation,this.ctxLocation=ctxLocation,this.message="Parser Error: "+message+" "+errLocation+" ["+input+"] in "+ctxLocation}return ParserError}(),ParseSpan=function(){function ParseSpan(start,end){this.start=start,this.end=end}return ParseSpan}(),AST=function(){function AST(span){this.span=span}return AST.prototype.visit=function(visitor,context){return void 0===context&&(context=null),null},AST.prototype.toString=function(){return"AST"},AST}(),Quote=function(_super){function Quote(span,prefix,uninterpretedExpression,location){var _this=_super.call(this,span)||this;return _this.prefix=prefix,_this.uninterpretedExpression=uninterpretedExpression,_this.location=location,_this}return __extends(Quote,_super),Quote.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitQuote(this,context)},Quote.prototype.toString=function(){return"Quote"},Quote}(AST),EmptyExpr=function(_super){function EmptyExpr(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(EmptyExpr,_super),EmptyExpr.prototype.visit=function(visitor,context){void 0===context&&(context=null)},EmptyExpr}(AST),ImplicitReceiver=function(_super){function ImplicitReceiver(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(ImplicitReceiver,_super),ImplicitReceiver.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitImplicitReceiver(this,context)},ImplicitReceiver}(AST),Chain=function(_super){function Chain(span,expressions){var _this=_super.call(this,span)||this;return _this.expressions=expressions,_this}return __extends(Chain,_super),Chain.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitChain(this,context)},Chain}(AST),Conditional=function(_super){function Conditional(span,condition,trueExp,falseExp){var _this=_super.call(this,span)||this;return _this.condition=condition,_this.trueExp=trueExp,_this.falseExp=falseExp,_this}return __extends(Conditional,_super),Conditional.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitConditional(this,context)},Conditional}(AST),PropertyRead=function(_super){function PropertyRead(span,receiver,name){var _this=_super.call(this,span)||this;return _this.receiver=receiver,_this.name=name,_this}return __extends(PropertyRead,_super),PropertyRead.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitPropertyRead(this,context)},PropertyRead}(AST),PropertyWrite=function(_super){function PropertyWrite(span,receiver,name,value){var _this=_super.call(this,span)||this;return _this.receiver=receiver,_this.name=name,_this.value=value,_this}return __extends(PropertyWrite,_super),PropertyWrite.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitPropertyWrite(this,context)},PropertyWrite}(AST),SafePropertyRead=function(_super){function SafePropertyRead(span,receiver,name){var _this=_super.call(this,span)||this;return _this.receiver=receiver,_this.name=name,_this}return __extends(SafePropertyRead,_super),SafePropertyRead.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitSafePropertyRead(this,context)},SafePropertyRead}(AST),KeyedRead=function(_super){function KeyedRead(span,obj,key){var _this=_super.call(this,span)||this;return _this.obj=obj,_this.key=key,_this}return __extends(KeyedRead,_super),KeyedRead.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitKeyedRead(this,context)},KeyedRead}(AST),KeyedWrite=function(_super){function KeyedWrite(span,obj,key,value){var _this=_super.call(this,span)||this;return _this.obj=obj,_this.key=key,_this.value=value,_this}return __extends(KeyedWrite,_super),KeyedWrite.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitKeyedWrite(this,context)},KeyedWrite}(AST),BindingPipe=function(_super){function BindingPipe(span,exp,name,args){var _this=_super.call(this,span)||this;return _this.exp=exp,_this.name=name,_this.args=args,_this}return __extends(BindingPipe,_super),BindingPipe.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitPipe(this,context)},BindingPipe}(AST),LiteralPrimitive=function(_super){function LiteralPrimitive(span,value){var _this=_super.call(this,span)||this;return _this.value=value,_this}return __extends(LiteralPrimitive,_super),LiteralPrimitive.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitLiteralPrimitive(this,context)},LiteralPrimitive}(AST),LiteralArray=function(_super){function LiteralArray(span,expressions){var _this=_super.call(this,span)||this;return _this.expressions=expressions,_this}return __extends(LiteralArray,_super),LiteralArray.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitLiteralArray(this,context)},LiteralArray}(AST),LiteralMap=function(_super){function LiteralMap(span,keys,values){var _this=_super.call(this,span)||this;return _this.keys=keys,_this.values=values,_this}return __extends(LiteralMap,_super),LiteralMap.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitLiteralMap(this,context)},LiteralMap}(AST),Interpolation=function(_super){function Interpolation(span,strings,expressions){var _this=_super.call(this,span)||this;return _this.strings=strings,_this.expressions=expressions,_this}return __extends(Interpolation,_super),Interpolation.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitInterpolation(this,context)},Interpolation}(AST),Binary=function(_super){function Binary(span,operation,left,right){var _this=_super.call(this,span)||this;return _this.operation=operation,_this.left=left,_this.right=right,_this}return __extends(Binary,_super),Binary.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitBinary(this,context)},Binary}(AST),PrefixNot=function(_super){function PrefixNot(span,expression){var _this=_super.call(this,span)||this;return _this.expression=expression,_this}return __extends(PrefixNot,_super),PrefixNot.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitPrefixNot(this,context)},PrefixNot}(AST),NonNullAssert=function(_super){function NonNullAssert(span,expression){var _this=_super.call(this,span)||this;return _this.expression=expression,_this}return __extends(NonNullAssert,_super),NonNullAssert.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitNonNullAssert(this,context)},NonNullAssert}(AST),MethodCall=function(_super){function MethodCall(span,receiver,name,args){var _this=_super.call(this,span)||this;return _this.receiver=receiver,_this.name=name,_this.args=args,_this}return __extends(MethodCall,_super),MethodCall.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitMethodCall(this,context)},MethodCall}(AST),SafeMethodCall=function(_super){function SafeMethodCall(span,receiver,name,args){var _this=_super.call(this,span)||this;return _this.receiver=receiver,_this.name=name,_this.args=args,_this}return __extends(SafeMethodCall,_super),SafeMethodCall.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitSafeMethodCall(this,context)},SafeMethodCall}(AST),FunctionCall=function(_super){function FunctionCall(span,target,args){var _this=_super.call(this,span)||this;return _this.target=target,_this.args=args,_this}return __extends(FunctionCall,_super),FunctionCall.prototype.visit=function(visitor,context){return void 0===context&&(context=null),visitor.visitFunctionCall(this,context)},FunctionCall}(AST),ASTWithSource=function(_super){function ASTWithSource(ast,source,location,errors){var _this=_super.call(this,new ParseSpan(0,null==source?0:source.length))||this;return _this.ast=ast,_this.source=source,_this.location=location,_this.errors=errors,_this}return __extends(ASTWithSource,_super),ASTWithSource.prototype.visit=function(visitor,context){return void 0===context&&(context=null),this.ast.visit(visitor,context)},ASTWithSource.prototype.toString=function(){return this.source+" in "+this.location},ASTWithSource}(AST),TemplateBinding=function(){function TemplateBinding(span,key,keyIsVar,name,expression){this.span=span,this.key=key,this.keyIsVar=keyIsVar,this.name=name,this.expression=expression}return TemplateBinding}(),NullAstVisitor=function(){function NullAstVisitor(){}return NullAstVisitor.prototype.visitBinary=function(ast,context){},NullAstVisitor.prototype.visitChain=function(ast,context){},NullAstVisitor.prototype.visitConditional=function(ast,context){},NullAstVisitor.prototype.visitFunctionCall=function(ast,context){},NullAstVisitor.prototype.visitImplicitReceiver=function(ast,context){},NullAstVisitor.prototype.visitInterpolation=function(ast,context){},NullAstVisitor.prototype.visitKeyedRead=function(ast,context){},NullAstVisitor.prototype.visitKeyedWrite=function(ast,context){},NullAstVisitor.prototype.visitLiteralArray=function(ast,context){},NullAstVisitor.prototype.visitLiteralMap=function(ast,context){},NullAstVisitor.prototype.visitLiteralPrimitive=function(ast,context){},NullAstVisitor.prototype.visitMethodCall=function(ast,context){},NullAstVisitor.prototype.visitPipe=function(ast,context){},NullAstVisitor.prototype.visitPrefixNot=function(ast,context){},NullAstVisitor.prototype.visitNonNullAssert=function(ast,context){},NullAstVisitor.prototype.visitPropertyRead=function(ast,context){},NullAstVisitor.prototype.visitPropertyWrite=function(ast,context){},NullAstVisitor.prototype.visitQuote=function(ast,context){},NullAstVisitor.prototype.visitSafeMethodCall=function(ast,context){},NullAstVisitor.prototype.visitSafePropertyRead=function(ast,context){},NullAstVisitor}(),RecursiveAstVisitor=function(){function RecursiveAstVisitor(){}return RecursiveAstVisitor.prototype.visitBinary=function(ast,context){return ast.left.visit(this),ast.right.visit(this),null},RecursiveAstVisitor.prototype.visitChain=function(ast,context){return this.visitAll(ast.expressions,context)},RecursiveAstVisitor.prototype.visitConditional=function(ast,context){return ast.condition.visit(this),ast.trueExp.visit(this),ast.falseExp.visit(this),null},RecursiveAstVisitor.prototype.visitPipe=function(ast,context){return ast.exp.visit(this),this.visitAll(ast.args,context),null},RecursiveAstVisitor.prototype.visitFunctionCall=function(ast,context){return ast.target.visit(this),this.visitAll(ast.args,context),null},RecursiveAstVisitor.prototype.visitImplicitReceiver=function(ast,context){return null},RecursiveAstVisitor.prototype.visitInterpolation=function(ast,context){return this.visitAll(ast.expressions,context)},RecursiveAstVisitor.prototype.visitKeyedRead=function(ast,context){return ast.obj.visit(this),ast.key.visit(this),null},RecursiveAstVisitor.prototype.visitKeyedWrite=function(ast,context){return ast.obj.visit(this),ast.key.visit(this),ast.value.visit(this),null},RecursiveAstVisitor.prototype.visitLiteralArray=function(ast,context){return this.visitAll(ast.expressions,context)},RecursiveAstVisitor.prototype.visitLiteralMap=function(ast,context){return this.visitAll(ast.values,context)},RecursiveAstVisitor.prototype.visitLiteralPrimitive=function(ast,context){return null},RecursiveAstVisitor.prototype.visitMethodCall=function(ast,context){return ast.receiver.visit(this),this.visitAll(ast.args,context)},RecursiveAstVisitor.prototype.visitPrefixNot=function(ast,context){return ast.expression.visit(this),null},RecursiveAstVisitor.prototype.visitNonNullAssert=function(ast,context){return ast.expression.visit(this),null},RecursiveAstVisitor.prototype.visitPropertyRead=function(ast,context){return ast.receiver.visit(this),null},RecursiveAstVisitor.prototype.visitPropertyWrite=function(ast,context){return ast.receiver.visit(this),ast.value.visit(this),null},RecursiveAstVisitor.prototype.visitSafePropertyRead=function(ast,context){return ast.receiver.visit(this),null},RecursiveAstVisitor.prototype.visitSafeMethodCall=function(ast,context){return ast.receiver.visit(this),this.visitAll(ast.args,context)},RecursiveAstVisitor.prototype.visitAll=function(asts,context){var _this=this;return asts.forEach(function(ast){return ast.visit(_this,context)}),null},RecursiveAstVisitor.prototype.visitQuote=function(ast,context){return null},RecursiveAstVisitor}(),AstTransformer=function(){function AstTransformer(){}return AstTransformer.prototype.visitImplicitReceiver=function(ast,context){return ast},AstTransformer.prototype.visitInterpolation=function(ast,context){return new Interpolation(ast.span,ast.strings,this.visitAll(ast.expressions))},AstTransformer.prototype.visitLiteralPrimitive=function(ast,context){return new LiteralPrimitive(ast.span,ast.value)},AstTransformer.prototype.visitPropertyRead=function(ast,context){return new PropertyRead(ast.span,ast.receiver.visit(this),ast.name)},AstTransformer.prototype.visitPropertyWrite=function(ast,context){return new PropertyWrite(ast.span,ast.receiver.visit(this),ast.name,ast.value.visit(this))},AstTransformer.prototype.visitSafePropertyRead=function(ast,context){return new SafePropertyRead(ast.span,ast.receiver.visit(this),ast.name)},AstTransformer.prototype.visitMethodCall=function(ast,context){return new MethodCall(ast.span,ast.receiver.visit(this),ast.name,this.visitAll(ast.args))},AstTransformer.prototype.visitSafeMethodCall=function(ast,context){return new SafeMethodCall(ast.span,ast.receiver.visit(this),ast.name,this.visitAll(ast.args))},AstTransformer.prototype.visitFunctionCall=function(ast,context){return new FunctionCall(ast.span,ast.target.visit(this),this.visitAll(ast.args))},AstTransformer.prototype.visitLiteralArray=function(ast,context){return new LiteralArray(ast.span,this.visitAll(ast.expressions))},AstTransformer.prototype.visitLiteralMap=function(ast,context){return new LiteralMap(ast.span,ast.keys,this.visitAll(ast.values))},AstTransformer.prototype.visitBinary=function(ast,context){return new Binary(ast.span,ast.operation,ast.left.visit(this),ast.right.visit(this))},AstTransformer.prototype.visitPrefixNot=function(ast,context){return new PrefixNot(ast.span,ast.expression.visit(this))},AstTransformer.prototype.visitNonNullAssert=function(ast,context){return new NonNullAssert(ast.span,ast.expression.visit(this))},AstTransformer.prototype.visitConditional=function(ast,context){return new Conditional(ast.span,ast.condition.visit(this),ast.trueExp.visit(this),ast.falseExp.visit(this))},AstTransformer.prototype.visitPipe=function(ast,context){return new BindingPipe(ast.span,ast.exp.visit(this),ast.name,this.visitAll(ast.args))},AstTransformer.prototype.visitKeyedRead=function(ast,context){return new KeyedRead(ast.span,ast.obj.visit(this),ast.key.visit(this))},AstTransformer.prototype.visitKeyedWrite=function(ast,context){return new KeyedWrite(ast.span,ast.obj.visit(this),ast.key.visit(this),ast.value.visit(this))},AstTransformer.prototype.visitAll=function(asts){for(var res=new Array(asts.length),i=0;i<asts.length;++i)res[i]=asts[i].visit(this);return res},AstTransformer.prototype.visitChain=function(ast,context){return new Chain(ast.span,this.visitAll(ast.expressions))},AstTransformer.prototype.visitQuote=function(ast,context){return new Quote(ast.span,ast.prefix,ast.uninterpretedExpression,ast.location)},AstTransformer}(),$EOF=0,$TAB=9,$LF=10,$VTAB=11,$FF=12,$CR=13,$SPACE=32,$BANG=33,$DQ=34,$HASH=35,$$=36,$PERCENT=37,$AMPERSAND=38,$SQ=39,$LPAREN=40,$RPAREN=41,$STAR=42,$PLUS=43,$COMMA=44,$MINUS=45,$PERIOD=46,$SLASH=47,$COLON=58,$SEMICOLON=59,$LT=60,$EQ=61,$GT=62,$QUESTION=63,$0=48,$9=57,$A=65,$E=69,$F=70,$X=88,$Z=90,$LBRACKET=91,$BACKSLASH=92,$RBRACKET=93,$CARET=94,$_=95,$a=97,$e=101,$f=102,$n=110,$r=114,$t=116,$u=117,$v=118,$x=120,$z=122,$LBRACE=123,$BAR=124,$RBRACE=125,$NBSP=160,$BT=96,INTERPOLATION_BLACKLIST_REGEXPS=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//],InterpolationConfig=function(){function InterpolationConfig(start,end){this.start=start,this.end=end}return InterpolationConfig.fromArray=function(markers){return markers?(assertInterpolationSymbols("interpolation",markers),new InterpolationConfig(markers[0],markers[1])):DEFAULT_INTERPOLATION_CONFIG},InterpolationConfig}(),DEFAULT_INTERPOLATION_CONFIG=new InterpolationConfig("{{","}}"),TokenType={};TokenType.Character=0,TokenType.Identifier=1,TokenType.Keyword=2,TokenType.String=3,TokenType.Operator=4,TokenType.Number=5,TokenType.Error=6,TokenType[TokenType.Character]="Character",TokenType[TokenType.Identifier]="Identifier",TokenType[TokenType.Keyword]="Keyword",TokenType[TokenType.String]="String",TokenType[TokenType.Operator]="Operator",TokenType[TokenType.Number]="Number",TokenType[TokenType.Error]="Error";var KEYWORDS=["var","let","as","null","undefined","true","false","if","else","this"],Lexer=function(){function Lexer(){}return Lexer.prototype.tokenize=function(text){for(var scanner=new _Scanner(text),tokens=[],token=scanner.scanToken();null!=token;)tokens.push(token),token=scanner.scanToken();return tokens},Lexer}();Lexer.decorators=[{type:CompilerInjectable}],Lexer.ctorParameters=function(){return[]};var Token=function(){function Token(index,type,numValue,strValue){this.index=index,this.type=type,this.numValue=numValue,this.strValue=strValue}return Token.prototype.isCharacter=function(code){return this.type==TokenType.Character&&this.numValue==code},Token.prototype.isNumber=function(){return this.type==TokenType.Number},Token.prototype.isString=function(){return this.type==TokenType.String},Token.prototype.isOperator=function(operater){return this.type==TokenType.Operator&&this.strValue==operater},Token.prototype.isIdentifier=function(){return this.type==TokenType.Identifier},Token.prototype.isKeyword=function(){return this.type==TokenType.Keyword},Token.prototype.isKeywordLet=function(){return this.type==TokenType.Keyword&&"let"==this.strValue},Token.prototype.isKeywordAs=function(){return this.type==TokenType.Keyword&&"as"==this.strValue},Token.prototype.isKeywordNull=function(){return this.type==TokenType.Keyword&&"null"==this.strValue},Token.prototype.isKeywordUndefined=function(){return this.type==TokenType.Keyword&&"undefined"==this.strValue},Token.prototype.isKeywordTrue=function(){return this.type==TokenType.Keyword&&"true"==this.strValue},Token.prototype.isKeywordFalse=function(){return this.type==TokenType.Keyword&&"false"==this.strValue},Token.prototype.isKeywordThis=function(){return this.type==TokenType.Keyword&&"this"==this.strValue},Token.prototype.isError=function(){return this.type==TokenType.Error},Token.prototype.toNumber=function(){return this.type==TokenType.Number?this.numValue:-1},Token.prototype.toString=function(){switch(this.type){case TokenType.Character:case TokenType.Identifier:case TokenType.Keyword:case TokenType.Operator:case TokenType.String:case TokenType.Error:return this.strValue;case TokenType.Number:return this.numValue.toString();default:return null}},Token}(),EOF=new Token(-1,TokenType.Character,0,""),_Scanner=function(){function _Scanner(input){this.input=input,this.peek=0,this.index=-1,this.length=input.length,this.advance()}return _Scanner.prototype.advance=function(){this.peek=++this.index>=this.length?$EOF:this.input.charCodeAt(this.index)},_Scanner.prototype.scanToken=function(){for(var input=this.input,length=this.length,peek=this.peek,index=this.index;peek<=$SPACE;){if(++index>=length){peek=$EOF;break}peek=input.charCodeAt(index)}if(this.peek=peek,this.index=index,index>=length)return null;if(isIdentifierStart(peek))return this.scanIdentifier();if(isDigit(peek))return this.scanNumber(index);var start=index;switch(peek){case $PERIOD:return this.advance(),isDigit(this.peek)?this.scanNumber(start):newCharacterToken(start,$PERIOD);case $LPAREN:case $RPAREN:case $LBRACE:case $RBRACE:case $LBRACKET:case $RBRACKET:case $COMMA:case $COLON:case $SEMICOLON:return this.scanCharacter(start,peek);case $SQ:case $DQ:return this.scanString();case $HASH:case $PLUS:case $MINUS:case $STAR:case $SLASH:case $PERCENT:case $CARET:return this.scanOperator(start,String.fromCharCode(peek));case $QUESTION:return this.scanComplexOperator(start,"?",$PERIOD,".");case $LT:case $GT:return this.scanComplexOperator(start,String.fromCharCode(peek),$EQ,"=");case $BANG:case $EQ:return this.scanComplexOperator(start,String.fromCharCode(peek),$EQ,"=",$EQ,"=");case $AMPERSAND:return this.scanComplexOperator(start,"&",$AMPERSAND,"&");case $BAR:return this.scanComplexOperator(start,"|",$BAR,"|");case $NBSP:for(;isWhitespace(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error("Unexpected character ["+String.fromCharCode(peek)+"]",0)},_Scanner.prototype.scanCharacter=function(start,code){return this.advance(),newCharacterToken(start,code)},_Scanner.prototype.scanOperator=function(start,str){return this.advance(),newOperatorToken(start,str)},_Scanner.prototype.scanComplexOperator=function(start,one,twoCode,two,threeCode,three){this.advance();var str=one;return this.peek==twoCode&&(this.advance(),str+=two),null!=threeCode&&this.peek==threeCode&&(this.advance(),str+=three),newOperatorToken(start,str)},_Scanner.prototype.scanIdentifier=function(){var start=this.index;for(this.advance();isIdentifierPart(this.peek);)this.advance();var str=this.input.substring(start,this.index);return KEYWORDS.indexOf(str)>-1?newKeywordToken(start,str):newIdentifierToken(start,str)},_Scanner.prototype.scanNumber=function(start){var simple=this.index===start;for(this.advance();;){if(isDigit(this.peek));else if(this.peek==$PERIOD)simple=!1;else{if(!isExponentStart(this.peek))break;if(this.advance(),isExponentSign(this.peek)&&this.advance(),!isDigit(this.peek))return this.error("Invalid exponent",-1);simple=!1}this.advance()}var str=this.input.substring(start,this.index);return newNumberToken(start,simple?parseIntAutoRadix(str):parseFloat(str))},_Scanner.prototype.scanString=function(){var start=this.index,quote=this.peek;this.advance();for(var buffer="",marker=this.index,input=this.input;this.peek!=quote;)if(this.peek==$BACKSLASH){buffer+=input.substring(marker,this.index),this.advance();var unescapedCode=void 0;if(this.peek=this.peek,this.peek==$u){var hex=input.substring(this.index+1,this.index+5);if(!/^[0-9a-f]+$/i.test(hex))return this.error("Invalid unicode escape [\\u"+hex+"]",0);unescapedCode=parseInt(hex,16);for(var i=0;i<5;i++)this.advance()}else unescapedCode=unescape(this.peek),this.advance();buffer+=String.fromCharCode(unescapedCode),marker=this.index}else{if(this.peek==$EOF)return this.error("Unterminated quote",0);this.advance()}var last=input.substring(marker,this.index);return this.advance(),newStringToken(start,buffer+last)},_Scanner.prototype.error=function(message,offset){var position=this.index+offset;return newErrorToken(position,"Lexer Error: "+message+" at column "+position+" in expression ["+this.input+"]")},_Scanner}(),SplitInterpolation=function(){function SplitInterpolation(strings,expressions,offsets){this.strings=strings,this.expressions=expressions,this.offsets=offsets}return SplitInterpolation}(),TemplateBindingParseResult=function(){function TemplateBindingParseResult(templateBindings,warnings,errors){this.templateBindings=templateBindings,this.warnings=warnings,this.errors=errors}return TemplateBindingParseResult}(),Parser=function(){function Parser(_lexer){this._lexer=_lexer,this.errors=[]}return Parser.prototype.parseAction=function(input,location,interpolationConfig){void 0===interpolationConfig&&(interpolationConfig=DEFAULT_INTERPOLATION_CONFIG),this._checkNoInterpolation(input,location,interpolationConfig);var sourceToLex=this._stripComments(input),tokens=this._lexer.tokenize(this._stripComments(input)),ast=new _ParseAST(input,location,tokens,sourceToLex.length,!0,this.errors,input.length-sourceToLex.length).parseChain();return new ASTWithSource(ast,input,location,this.errors)},Parser.prototype.parseBinding=function(input,location,interpolationConfig){void 0===interpolationConfig&&(interpolationConfig=DEFAULT_INTERPOLATION_CONFIG);var ast=this._parseBindingAst(input,location,interpolationConfig);return new ASTWithSource(ast,input,location,this.errors)},Parser.prototype.parseSimpleBinding=function(input,location,interpolationConfig){void 0===interpolationConfig&&(interpolationConfig=DEFAULT_INTERPOLATION_CONFIG);var ast=this._parseBindingAst(input,location,interpolationConfig),errors=SimpleExpressionChecker.check(ast);return errors.length>0&&this._reportError("Host binding expression cannot contain "+errors.join(" "),input,location),new ASTWithSource(ast,input,location,this.errors)},Parser.prototype._reportError=function(message,input,errLocation,ctxLocation){this.errors.push(new ParserError(message,input,errLocation,ctxLocation))},Parser.prototype._parseBindingAst=function(input,location,interpolationConfig){var quote=this._parseQuote(input,location);if(null!=quote)return quote;this._checkNoInterpolation(input,location,interpolationConfig);var sourceToLex=this._stripComments(input),tokens=this._lexer.tokenize(sourceToLex);return new _ParseAST(input,location,tokens,sourceToLex.length,!1,this.errors,input.length-sourceToLex.length).parseChain()},Parser.prototype._parseQuote=function(input,location){if(null==input)return null;var prefixSeparatorIndex=input.indexOf(":");if(-1==prefixSeparatorIndex)return null;var prefix=input.substring(0,prefixSeparatorIndex).trim();if(!isIdentifier(prefix))return null;var uninterpretedExpression=input.substring(prefixSeparatorIndex+1);return new Quote(new ParseSpan(0,input.length),prefix,uninterpretedExpression,location)},Parser.prototype.parseTemplateBindings=function(prefixToken,input,location){var tokens=this._lexer.tokenize(input);if(prefixToken){var prefixTokens=this._lexer.tokenize(prefixToken).map(function(t){return t.index=0,t});tokens.unshift.apply(tokens,prefixTokens)}return new _ParseAST(input,location,tokens,input.length,!1,this.errors,0).parseTemplateBindings()},Parser.prototype.parseInterpolation=function(input,location,interpolationConfig){void 0===interpolationConfig&&(interpolationConfig=DEFAULT_INTERPOLATION_CONFIG);var split=this.splitInterpolation(input,location,interpolationConfig);if(null==split)return null;for(var expressions=[],i=0;i<split.expressions.length;++i){var expressionText=split.expressions[i],sourceToLex=this._stripComments(expressionText),tokens=this._lexer.tokenize(sourceToLex),ast=new _ParseAST(input,location,tokens,sourceToLex.length,!1,this.errors,split.offsets[i]+(expressionText.length-sourceToLex.length)).parseChain();expressions.push(ast)}return new ASTWithSource(new Interpolation(new ParseSpan(0,null==input?0:input.length),split.strings,expressions),input,location,this.errors)},Parser.prototype.splitInterpolation=function(input,location,interpolationConfig){void 0===interpolationConfig&&(interpolationConfig=DEFAULT_INTERPOLATION_CONFIG);var regexp=_createInterpolateRegExp(interpolationConfig),parts=input.split(regexp);if(parts.length<=1)return null;for(var strings=[],expressions=[],offsets=[],offset=0,i=0;i<parts.length;i++){var part=parts[i];i%2==0?(strings.push(part),offset+=part.length):part.trim().length>0?(offset+=interpolationConfig.start.length,expressions.push(part),offsets.push(offset),offset+=part.length+interpolationConfig.end.length):(this._reportError("Blank expressions are not allowed in interpolated strings",input,"at column "+this._findInterpolationErrorColumn(parts,i,interpolationConfig)+" in",location),expressions.push("$implict"),offsets.push(offset))}return new SplitInterpolation(strings,expressions,offsets)},Parser.prototype.wrapLiteralPrimitive=function(input,location){return new ASTWithSource(new LiteralPrimitive(new ParseSpan(0,null==input?0:input.length),input),input,location,this.errors)},Parser.prototype._stripComments=function(input){var i=this._commentStart(input);return null!=i?input.substring(0,i).trim():input},Parser.prototype._commentStart=function(input){for(var outerQuote=null,i=0;i<input.length-1;i++){var char=input.charCodeAt(i),nextChar=input.charCodeAt(i+1);if(char===$SLASH&&nextChar==$SLASH&&null==outerQuote)return i;outerQuote===char?outerQuote=null:null==outerQuote&&isQuote(char)&&(outerQuote=char)}return null},Parser.prototype._checkNoInterpolation=function(input,location,interpolationConfig){var regexp=_createInterpolateRegExp(interpolationConfig),parts=input.split(regexp);parts.length>1&&this._reportError("Got interpolation ("+interpolationConfig.start+interpolationConfig.end+") where expression was expected",input,"at column "+this._findInterpolationErrorColumn(parts,1,interpolationConfig)+" in",location)},Parser.prototype._findInterpolationErrorColumn=function(parts,partInErrIdx,interpolationConfig){for(var errLocation="",j=0;j<partInErrIdx;j++)errLocation+=j%2==0?parts[j]:""+interpolationConfig.start+parts[j]+interpolationConfig.end;return errLocation.length},Parser}();Parser.decorators=[{type:CompilerInjectable}],Parser.ctorParameters=function(){return[{type:Lexer}]};var _ParseAST=function(){function _ParseAST(input,location,tokens,inputLength,parseAction,errors,offset){this.input=input,this.location=location,this.tokens=tokens,this.inputLength=inputLength,this.parseAction=parseAction,this.errors=errors,this.offset=offset,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.index=0}return _ParseAST.prototype.peek=function(offset){var i=this.index+offset;return i<this.tokens.length?this.tokens[i]:EOF},Object.defineProperty(_ParseAST.prototype,"next",{get:function(){return this.peek(0)},enumerable:!0,configurable:!0}),Object.defineProperty(_ParseAST.prototype,"inputIndex",{get:function(){return this.index<this.tokens.length?this.next.index+this.offset:this.inputLength+this.offset},enumerable:!0,configurable:!0}),_ParseAST.prototype.span=function(start){return new ParseSpan(start,this.inputIndex)},_ParseAST.prototype.advance=function(){this.index++},_ParseAST.prototype.optionalCharacter=function(code){return!!this.next.isCharacter(code)&&(this.advance(),!0)},_ParseAST.prototype.peekKeywordLet=function(){return this.next.isKeywordLet()},_ParseAST.prototype.peekKeywordAs=function(){return this.next.isKeywordAs()},_ParseAST.prototype.expectCharacter=function(code){this.optionalCharacter(code)||this.error("Missing expected "+String.fromCharCode(code))},_ParseAST.prototype.optionalOperator=function(op){return!!this.next.isOperator(op)&&(this.advance(),!0)},_ParseAST.prototype.expectOperator=function(operator){this.optionalOperator(operator)||this.error("Missing expected operator "+operator)},_ParseAST.prototype.expectIdentifierOrKeyword=function(){var n=this.next;return n.isIdentifier()||n.isKeyword()?(this.advance(),n.toString()):(this.error("Unexpected token "+n+", expected identifier or keyword"),"")},_ParseAST.prototype.expectIdentifierOrKeywordOrString=function(){var n=this.next;return n.isIdentifier()||n.isKeyword()||n.isString()?(this.advance(),n.toString()):(this.error("Unexpected token "+n+", expected identifier, keyword, or string"),"")},_ParseAST.prototype.parseChain=function(){for(var exprs=[],start=this.inputIndex;this.index<this.tokens.length;){var expr=this.parsePipe();if(exprs.push(expr),this.optionalCharacter($SEMICOLON))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.optionalCharacter($SEMICOLON););else this.index<this.tokens.length&&this.error("Unexpected token '"+this.next+"'")}return 0==exprs.length?new EmptyExpr(this.span(start)):1==exprs.length?exprs[0]:new Chain(this.span(start),exprs)},_ParseAST.prototype.parsePipe=function(){var result=this.parseExpression();if(this.optionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{for(var name=this.expectIdentifierOrKeyword(),args=[];this.optionalCharacter($COLON);)args.push(this.parseExpression());result=new BindingPipe(this.span(result.span.start),result,name,args)}while(this.optionalOperator("|"))}return result},_ParseAST.prototype.parseExpression=function(){return this.parseConditional()},_ParseAST.prototype.parseConditional=function(){var start=this.inputIndex,result=this.parseLogicalOr();if(this.optionalOperator("?")){var yes=this.parsePipe(),no=void 0;if(this.optionalCharacter($COLON))no=this.parsePipe();else{var end=this.inputIndex,expression=this.input.substring(start,end);this.error("Conditional expression "+expression+" requires all 3 expressions"),no=new EmptyExpr(this.span(start))}return new Conditional(this.span(start),result,yes,no)}return result},_ParseAST.prototype.parseLogicalOr=function(){for(var result=this.parseLogicalAnd();this.optionalOperator("||");){var right=this.parseLogicalAnd();result=new Binary(this.span(result.span.start),"||",result,right)}return result},_ParseAST.prototype.parseLogicalAnd=function(){for(var result=this.parseEquality();this.optionalOperator("&&");){var right=this.parseEquality();result=new Binary(this.span(result.span.start),"&&",result,right)}return result},_ParseAST.prototype.parseEquality=function(){for(var result=this.parseRelational();this.next.type==TokenType.Operator;){var operator=this.next.strValue;switch(operator){case"==":case"===":case"!=":case"!==":this.advance();var right=this.parseRelational();result=new Binary(this.span(result.span.start),operator,result,right);continue}break}return result},_ParseAST.prototype.parseRelational=function(){for(var result=this.parseAdditive();this.next.type==TokenType.Operator;){var operator=this.next.strValue;switch(operator){case"<":case">":case"<=":case">=":this.advance();var right=this.parseAdditive();result=new Binary(this.span(result.span.start),operator,result,right);continue}break}return result},_ParseAST.prototype.parseAdditive=function(){for(var result=this.parseMultiplicative();this.next.type==TokenType.Operator;){var operator=this.next.strValue;switch(operator){case"+":case"-":this.advance();var right=this.parseMultiplicative();result=new Binary(this.span(result.span.start),operator,result,right);continue}break}return result},_ParseAST.prototype.parseMultiplicative=function(){for(var result=this.parsePrefix();this.next.type==TokenType.Operator;){var operator=this.next.strValue;switch(operator){case"*":case"%":case"/":this.advance();var right=this.parsePrefix();result=new Binary(this.span(result.span.start),operator,result,right);continue}break}return result},_ParseAST.prototype.parsePrefix=function(){if(this.next.type==TokenType.Operator){var start=this.inputIndex,operator=this.next.strValue,result=void 0;switch(operator){case"+":return this.advance(),this.parsePrefix();case"-":return this.advance(),result=this.parsePrefix(),new Binary(this.span(start),operator,new LiteralPrimitive(new ParseSpan(start,start),0),result);case"!":return this.advance(),result=this.parsePrefix(),new PrefixNot(this.span(start),result)}}return this.parseCallChain()},_ParseAST.prototype.parseCallChain=function(){for(var result=this.parsePrimary();;)if(this.optionalCharacter($PERIOD))result=this.parseAccessMemberOrMethodCall(result,!1);else if(this.optionalOperator("?."))result=this.parseAccessMemberOrMethodCall(result,!0);else if(this.optionalCharacter($LBRACKET)){this.rbracketsExpected++;var key=this.parsePipe();if(this.rbracketsExpected--,this.expectCharacter($RBRACKET),this.optionalOperator("=")){var value=this.parseConditional();result=new KeyedWrite(this.span(result.span.start),result,key,value)}else result=new KeyedRead(this.span(result.span.start),result,key)}else if(this.optionalCharacter($LPAREN)){this.rparensExpected++;var args=this.parseCallArguments();this.rparensExpected--,this.expectCharacter($RPAREN),result=new FunctionCall(this.span(result.span.start),result,args)}else{if(!this.optionalOperator("!"))return result;result=new NonNullAssert(this.span(result.span.start),result)}},_ParseAST.prototype.parsePrimary=function(){var start=this.inputIndex;if(this.optionalCharacter($LPAREN)){this.rparensExpected++;var result=this.parsePipe();return this.rparensExpected--,this.expectCharacter($RPAREN),result}if(this.next.isKeywordNull())return this.advance(),new LiteralPrimitive(this.span(start),null);if(this.next.isKeywordUndefined())return this.advance(),new LiteralPrimitive(this.span(start),void 0);if(this.next.isKeywordTrue())return this.advance(),new LiteralPrimitive(this.span(start),!0);if(this.next.isKeywordFalse())return this.advance(),new LiteralPrimitive(this.span(start),!1);if(this.next.isKeywordThis())return this.advance(),new ImplicitReceiver(this.span(start));if(this.optionalCharacter($LBRACKET)){this.rbracketsExpected++;var elements=this.parseExpressionList($RBRACKET);return this.rbracketsExpected--,this.expectCharacter($RBRACKET),new LiteralArray(this.span(start),elements)}if(this.next.isCharacter($LBRACE))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new ImplicitReceiver(this.span(start)),!1);if(this.next.isNumber()){var value=this.next.toNumber();return this.advance(),new LiteralPrimitive(this.span(start),value)}if(this.next.isString()){var literalValue=this.next.toString();return this.advance(),new LiteralPrimitive(this.span(start),literalValue)}return this.index>=this.tokens.length?(this.error("Unexpected end of expression: "+this.input),new EmptyExpr(this.span(start))):(this.error("Unexpected token "+this.next),new EmptyExpr(this.span(start)))},_ParseAST.prototype.parseExpressionList=function(terminator){var result=[];if(!this.next.isCharacter(terminator))do{result.push(this.parsePipe())}while(this.optionalCharacter($COMMA));return result},_ParseAST.prototype.parseLiteralMap=function(){var keys=[],values=[],start=this.inputIndex;if(this.expectCharacter($LBRACE),!this.optionalCharacter($RBRACE)){this.rbracesExpected++;do{var quoted=this.next.isString(),key=this.expectIdentifierOrKeywordOrString();keys.push({key:key,quoted:quoted}),this.expectCharacter($COLON),values.push(this.parsePipe())}while(this.optionalCharacter($COMMA));this.rbracesExpected--,this.expectCharacter($RBRACE)}return new LiteralMap(this.span(start),keys,values)},_ParseAST.prototype.parseAccessMemberOrMethodCall=function(receiver,isSafe){void 0===isSafe&&(isSafe=!1);var start=receiver.span.start,id=this.expectIdentifierOrKeyword();if(this.optionalCharacter($LPAREN)){this.rparensExpected++;var args=this.parseCallArguments();this.expectCharacter($RPAREN),this.rparensExpected--;var span=this.span(start);return isSafe?new SafeMethodCall(span,receiver,id,args):new MethodCall(span,receiver,id,args)}if(isSafe)return this.optionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new EmptyExpr(this.span(start))):new SafePropertyRead(this.span(start),receiver,id);if(this.optionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new EmptyExpr(this.span(start));var value=this.parseConditional();return new PropertyWrite(this.span(start),receiver,id,value)}return new PropertyRead(this.span(start),receiver,id)},_ParseAST.prototype.parseCallArguments=function(){if(this.next.isCharacter($RPAREN))return[];var positionals=[];do{positionals.push(this.parsePipe())}while(this.optionalCharacter($COMMA));return positionals},_ParseAST.prototype.expectTemplateBindingKey=function(){var result="",operatorFound=!1;do{result+=this.expectIdentifierOrKeywordOrString(),(operatorFound=this.optionalOperator("-"))&&(result+="-")}while(operatorFound);return result.toString()},_ParseAST.prototype.parseTemplateBindings=function(){for(var bindings=[],prefix=null,warnings=[];this.index<this.tokens.length;){var start=this.inputIndex,keyIsVar=this.peekKeywordLet();keyIsVar&&this.advance();var rawKey=this.expectTemplateBindingKey(),key=rawKey;keyIsVar||(null==prefix?prefix=key:key=prefix+key[0].toUpperCase()+key.substring(1)),this.optionalCharacter($COLON);var name=null,expression=null;if(keyIsVar)name=this.optionalOperator("=")?this.expectTemplateBindingKey():"$implicit";else if(this.peekKeywordAs()){var letStart=this.inputIndex;this.advance(),name=rawKey,key=this.expectTemplateBindingKey(),keyIsVar=!0}else if(this.next!==EOF&&!this.peekKeywordLet()){var start_2=this.inputIndex,ast=this.parsePipe(),source=this.input.substring(start_2-this.offset,this.inputIndex-this.offset);expression=new ASTWithSource(ast,source,this.location,this.errors)}if(bindings.push(new TemplateBinding(this.span(start),key,keyIsVar,name,expression)),this.peekKeywordAs()&&!keyIsVar){var letStart=this.inputIndex;this.advance();var letName=this.expectTemplateBindingKey();bindings.push(new TemplateBinding(this.span(letStart),letName,!0,key,null))}this.optionalCharacter($SEMICOLON)||this.optionalCharacter($COMMA)}return new TemplateBindingParseResult(bindings,warnings,this.errors)},_ParseAST.prototype.error=function(message,index){void 0===index&&(index=null),this.errors.push(new ParserError(message,this.input,this.locationText(index),this.location)),this.skip()},_ParseAST.prototype.locationText=function(index){return void 0===index&&(index=null),null==index&&(index=this.index),index<this.tokens.length?"at column "+(this.tokens[index].index+1)+" in":"at the end of the expression"},_ParseAST.prototype.skip=function(){for(var n=this.next;this.index<this.tokens.length&&!n.isCharacter($SEMICOLON)&&(this.rparensExpected<=0||!n.isCharacter($RPAREN))&&(this.rbracesExpected<=0||!n.isCharacter($RBRACE))&&(this.rbracketsExpected<=0||!n.isCharacter($RBRACKET));)this.next.isError()&&this.errors.push(new ParserError(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),n=this.next},_ParseAST}(),SimpleExpressionChecker=function(){function SimpleExpressionChecker(){this.errors=[]}return SimpleExpressionChecker.check=function(ast){var s=new SimpleExpressionChecker;return ast.visit(s),s.errors},SimpleExpressionChecker.prototype.visitImplicitReceiver=function(ast,context){},SimpleExpressionChecker.prototype.visitInterpolation=function(ast,context){},SimpleExpressionChecker.prototype.visitLiteralPrimitive=function(ast,context){},SimpleExpressionChecker.prototype.visitPropertyRead=function(ast,context){},SimpleExpressionChecker.prototype.visitPropertyWrite=function(ast,context){},SimpleExpressionChecker.prototype.visitSafePropertyRead=function(ast,context){},SimpleExpressionChecker.prototype.visitMethodCall=function(ast,context){},SimpleExpressionChecker.prototype.visitSafeMethodCall=function(ast,context){},SimpleExpressionChecker.prototype.visitFunctionCall=function(ast,context){},SimpleExpressionChecker.prototype.visitLiteralArray=function(ast,context){this.visitAll(ast.expressions)},SimpleExpressionChecker.prototype.visitLiteralMap=function(ast,context){this.visitAll(ast.values)},SimpleExpressionChecker.prototype.visitBinary=function(ast,context){},SimpleExpressionChecker.prototype.visitPrefixNot=function(ast,context){},SimpleExpressionChecker.prototype.visitNonNullAssert=function(ast,context){},SimpleExpressionChecker.prototype.visitConditional=function(ast,context){},SimpleExpressionChecker.prototype.visitPipe=function(ast,context){this.errors.push("pipes")},SimpleExpressionChecker.prototype.visitKeyedRead=function(ast,context){},SimpleExpressionChecker.prototype.visitKeyedWrite=function(ast,context){},SimpleExpressionChecker.prototype.visitAll=function(asts){var _this=this;return asts.map(function(node){return node.visit(_this)})},SimpleExpressionChecker.prototype.visitChain=function(ast,context){},SimpleExpressionChecker.prototype.visitQuote=function(ast,context){},SimpleExpressionChecker}(),ParseLocation=function(){function ParseLocation(file,offset,line,col){this.file=file,this.offset=offset,this.line=line,this.col=col}return ParseLocation.prototype.toString=function(){return null!=this.offset?this.file.url+"@"+this.line+":"+this.col:this.file.url},ParseLocation.prototype.moveBy=function(delta){for(var source=this.file.content,len=source.length,offset=this.offset,line=this.line,col=this.col;offset>0&&delta<0;){offset--,delta++;var ch=source.charCodeAt(offset);if(ch==$LF){line--;var priorLine=source.substr(0,offset-1).lastIndexOf(String.fromCharCode($LF));col=priorLine>0?offset-priorLine:offset}else col--}for(;offset<len&&delta>0;){var ch=source.charCodeAt(offset);offset++,delta--,ch==$LF?(line++,col=0):col++}return new ParseLocation(this.file,offset,line,col)},ParseLocation.prototype.getContext=function(maxChars,maxLines){var content=this.file.content,startOffset=this.offset;if(null!=startOffset){startOffset>content.length-1&&(startOffset=content.length-1);for(var endOffset=startOffset,ctxChars=0,ctxLines=0;ctxChars<maxChars&&startOffset>0&&(startOffset--,ctxChars++,"\n"!=content[startOffset]||++ctxLines!=maxLines););for(ctxChars=0,ctxLines=0;ctxChars<maxChars&&endOffset<content.length-1&&(endOffset++,ctxChars++,"\n"!=content[endOffset]||++ctxLines!=maxLines););return{before:content.substring(startOffset,this.offset),after:content.substring(this.offset,endOffset+1)}}return null},ParseLocation}(),ParseSourceFile=function(){function ParseSourceFile(content,url){this.content=content,this.url=url}return ParseSourceFile}(),ParseSourceSpan=function(){function ParseSourceSpan(start,end,details){void 0===details&&(details=null),this.start=start,this.end=end,this.details=details}return ParseSourceSpan.prototype.toString=function(){return this.start.file.content.substring(this.start.offset,this.end.offset)},ParseSourceSpan}(),ParseErrorLevel={};ParseErrorLevel.WARNING=0,ParseErrorLevel.ERROR=1,ParseErrorLevel[ParseErrorLevel.WARNING]="WARNING",ParseErrorLevel[ParseErrorLevel.ERROR]="ERROR";var ParseError=function(){function ParseError(span,msg,level){void 0===level&&(level=ParseErrorLevel.ERROR),this.span=span,this.msg=msg,this.level=level}return ParseError.prototype.toString=function(){var ctx=this.span.start.getContext(100,3),contextStr=ctx?' ("'+ctx.before+"["+ParseErrorLevel[this.level]+" ->]"+ctx.after+'")':"",details=this.span.details?", "+this.span.details:"";return""+this.msg+contextStr+": "+this.span.start+details},ParseError}(),AstPath=function(){function AstPath(path,position){void 0===position&&(position=-1),this.path=path,this.position=position}return Object.defineProperty(AstPath.prototype,"empty",{get:function(){return!this.path||!this.path.length},enumerable:!0,configurable:!0}),Object.defineProperty(AstPath.prototype,"head",{get:function(){return this.path[0]},enumerable:!0,configurable:!0}),Object.defineProperty(AstPath.prototype,"tail",{get:function(){return this.path[this.path.length-1]},enumerable:!0,configurable:!0}),AstPath.prototype.parentOf=function(node){return node&&this.path[this.path.indexOf(node)-1]},AstPath.prototype.childOf=function(node){return this.path[this.path.indexOf(node)+1]},AstPath.prototype.first=function(ctor){for(var i=this.path.length-1;i>=0;i--){var item=this.path[i];if(item instanceof ctor)return item}},AstPath.prototype.push=function(node){this.path.push(node)},AstPath.prototype.pop=function(){return this.path.pop()},AstPath}(),Text=function(){function Text(value,sourceSpan){this.value=value,this.sourceSpan=sourceSpan}return Text.prototype.visit=function(visitor,context){return visitor.visitText(this,context)},Text}(),Expansion=function(){function Expansion(switchValue,type,cases,sourceSpan,switchValueSourceSpan){this.switchValue=switchValue,this.type=type,this.cases=cases,this.sourceSpan=sourceSpan,this.switchValueSourceSpan=switchValueSourceSpan}return Expansion.prototype.visit=function(visitor,context){return visitor.visitExpansion(this,context)},Expansion}(),ExpansionCase=function(){function ExpansionCase(value,expression,sourceSpan,valueSourceSpan,expSourceSpan){this.value=value,this.expression=expression,this.sourceSpan=sourceSpan,this.valueSourceSpan=valueSourceSpan,this.expSourceSpan=expSourceSpan}return ExpansionCase.prototype.visit=function(visitor,context){return visitor.visitExpansionCase(this,context)},ExpansionCase}(),Attribute$1=function(){function Attribute$1(name,value,sourceSpan,valueSpan){this.name=name,this.value=value,this.sourceSpan=sourceSpan,this.valueSpan=valueSpan}return Attribute$1.prototype.visit=function(visitor,context){return visitor.visitAttribute(this,context)},Attribute$1}(),Element=function(){function Element(name,attrs,children,sourceSpan,startSourceSpan,endSourceSpan){void 0===startSourceSpan&&(startSourceSpan=null),void 0===endSourceSpan&&(endSourceSpan=null),this.name=name,this.attrs=attrs,this.children=children,this.sourceSpan=sourceSpan,this.startSourceSpan=startSourceSpan,this.endSourceSpan=endSourceSpan}return Element.prototype.visit=function(visitor,context){return visitor.visitElement(this,context)},Element}(),Comment=function(){function Comment(value,sourceSpan){this.value=value,this.sourceSpan=sourceSpan}return Comment.prototype.visit=function(visitor,context){return visitor.visitComment(this,context)},Comment}(),RecursiveVisitor=function(){function RecursiveVisitor(){}return RecursiveVisitor.prototype.visitElement=function(ast,context){this.visitChildren(context,function(visit){visit(ast.attrs),visit(ast.children)})},RecursiveVisitor.prototype.visitAttribute=function(ast,context){},RecursiveVisitor.prototype.visitText=function(ast,context){},RecursiveVisitor.prototype.visitComment=function(ast,context){},RecursiveVisitor.prototype.visitExpansion=function(ast,context){return this.visitChildren(context,function(visit){visit(ast.cases)})},RecursiveVisitor.prototype.visitExpansionCase=function(ast,context){},RecursiveVisitor.prototype.visitChildren=function(context,cb){function visit(children){children&&results.push(visitAll(t,children,context))}var results=[],t=this;return cb(visit),[].concat.apply([],results)},RecursiveVisitor}(),TokenType$1={};TokenType$1.TAG_OPEN_START=0,TokenType$1.TAG_OPEN_END=1,TokenType$1.TAG_OPEN_END_VOID=2,TokenType$1.TAG_CLOSE=3,TokenType$1.TEXT=4,TokenType$1.ESCAPABLE_RAW_TEXT=5,TokenType$1.RAW_TEXT=6,TokenType$1.COMMENT_START=7,TokenType$1.COMMENT_END=8,TokenType$1.CDATA_START=9,TokenType$1.CDATA_END=10,TokenType$1.ATTR_NAME=11,TokenType$1.ATTR_VALUE=12,TokenType$1.DOC_TYPE=13,TokenType$1.EXPANSION_FORM_START=14,TokenType$1.EXPANSION_CASE_VALUE=15,TokenType$1.EXPANSION_CASE_EXP_START=16,TokenType$1.EXPANSION_CASE_EXP_END=17,TokenType$1.EXPANSION_FORM_END=18,TokenType$1.EOF=19,TokenType$1[TokenType$1.TAG_OPEN_START]="TAG_OPEN_START",TokenType$1[TokenType$1.TAG_OPEN_END]="TAG_OPEN_END",TokenType$1[TokenType$1.TAG_OPEN_END_VOID]="TAG_OPEN_END_VOID",TokenType$1[TokenType$1.TAG_CLOSE]="TAG_CLOSE",TokenType$1[TokenType$1.TEXT]="TEXT",TokenType$1[TokenType$1.ESCAPABLE_RAW_TEXT]="ESCAPABLE_RAW_TEXT",TokenType$1[TokenType$1.RAW_TEXT]="RAW_TEXT",TokenType$1[TokenType$1.COMMENT_START]="COMMENT_START",TokenType$1[TokenType$1.COMMENT_END]="COMMENT_END",TokenType$1[TokenType$1.CDATA_START]="CDATA_START",TokenType$1[TokenType$1.CDATA_END]="CDATA_END",TokenType$1[TokenType$1.ATTR_NAME]="ATTR_NAME",TokenType$1[TokenType$1.ATTR_VALUE]="ATTR_VALUE",TokenType$1[TokenType$1.DOC_TYPE]="DOC_TYPE",TokenType$1[TokenType$1.EXPANSION_FORM_START]="EXPANSION_FORM_START",TokenType$1[TokenType$1.EXPANSION_CASE_VALUE]="EXPANSION_CASE_VALUE",TokenType$1[TokenType$1.EXPANSION_CASE_EXP_START]="EXPANSION_CASE_EXP_START",TokenType$1[TokenType$1.EXPANSION_CASE_EXP_END]="EXPANSION_CASE_EXP_END",TokenType$1[TokenType$1.EXPANSION_FORM_END]="EXPANSION_FORM_END",TokenType$1[TokenType$1.EOF]="EOF";var Token$1=function(){function Token$1(type,parts,sourceSpan){this.type=type,this.parts=parts,this.sourceSpan=sourceSpan}return Token$1}(),TokenError=function(_super){function TokenError(errorMsg,tokenType,span){var _this=_super.call(this,span,errorMsg)||this;return _this.tokenType=tokenType,_this}return __extends(TokenError,_super),TokenError}(ParseError),TokenizeResult=function(){function TokenizeResult(tokens,errors){this.tokens=tokens,this.errors=errors}return TokenizeResult}(),_CR_OR_CRLF_REGEXP=/\r\n?/g,_ControlFlowError=function(){function _ControlFlowError(error){this.error=error}return _ControlFlowError}(),_Tokenizer=function(){function _Tokenizer(_file,_getTagDefinition,_tokenizeIcu,_interpolationConfig){void 0===_interpolationConfig&&(_interpolationConfig=DEFAULT_INTERPOLATION_CONFIG),this._file=_file,this._getTagDefinition=_getTagDefinition,this._tokenizeIcu=_tokenizeIcu,this._interpolationConfig=_interpolationConfig,this._peek=-1,this._nextPeek=-1,this._index=-1,this._line=0,this._column=-1,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this._input=_file.content,this._length=_file.content.length,this._advance()}return _Tokenizer.prototype._processCarriageReturns=function(content){return content.replace(_CR_OR_CRLF_REGEXP,"\n")},_Tokenizer.prototype.tokenize=function(){for(;this._peek!==$EOF;){var start=this._getLocation();try{this._attemptCharCode($LT)?this._attemptCharCode($BANG)?this._attemptCharCode($LBRACKET)?this._consumeCdata(start):this._attemptCharCode($MINUS)?this._consumeComment(start):this._consumeDocType(start):this._attemptCharCode($SLASH)?this._consumeTagClose(start):this._consumeTagOpen(start):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){if(!(e instanceof _ControlFlowError))throw e;this.errors.push(e.error)}}return this._beginToken(TokenType$1.EOF),this._endToken([]),new TokenizeResult(mergeTextTokens(this.tokens),this.errors)},_Tokenizer.prototype._tokenizeExpansionForm=function(){if(isExpansionFormStart(this._input,this._index,this._interpolationConfig))return this._consumeExpansionFormStart(),!0;if(isExpansionCaseStart(this._peek)&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._peek===$RBRACE){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1},_Tokenizer.prototype._getLocation=function(){return new ParseLocation(this._file,this._index,this._line,this._column)},_Tokenizer.prototype._getSpan=function(start,end){return void 0===start&&(start=this._getLocation()),void 0===end&&(end=this._getLocation()),new ParseSourceSpan(start,end)},_Tokenizer.prototype._beginToken=function(type,start){void 0===start&&(start=this._getLocation()),this._currentTokenStart=start,this._currentTokenType=type},_Tokenizer.prototype._endToken=function(parts,end){void 0===end&&(end=this._getLocation());var token=new Token$1(this._currentTokenType,parts,new ParseSourceSpan(this._currentTokenStart,end));return this.tokens.push(token),this._currentTokenStart=null,this._currentTokenType=null,token},_Tokenizer.prototype._createError=function(msg,span){this._isInExpansionForm()&&(msg+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');var error=new TokenError(msg,this._currentTokenType,span);return this._currentTokenStart=null,this._currentTokenType=null,new _ControlFlowError(error)},_Tokenizer.prototype._advance=function(){if(this._index>=this._length)throw this._createError(_unexpectedCharacterErrorMsg($EOF),this._getSpan());this._peek===$LF?(this._line++,this._column=0):this._peek!==$LF&&this._peek!==$CR&&this._column++,this._index++,this._peek=this._index>=this._length?$EOF:this._input.charCodeAt(this._index),this._nextPeek=this._index+1>=this._length?$EOF:this._input.charCodeAt(this._index+1)},_Tokenizer.prototype._attemptCharCode=function(charCode){return this._peek===charCode&&(this._advance(),!0)},_Tokenizer.prototype._attemptCharCodeCaseInsensitive=function(charCode){return!!compareCharCodeCaseInsensitive(this._peek,charCode)&&(this._advance(),!0)},_Tokenizer.prototype._requireCharCode=function(charCode){var location=this._getLocation();if(!this._attemptCharCode(charCode))throw this._createError(_unexpectedCharacterErrorMsg(this._peek),this._getSpan(location,location))},_Tokenizer.prototype._attemptStr=function(chars){var len=chars.length;if(this._index+len>this._length)return!1;for(var initialPosition=this._savePosition(),i=0;i<len;i++)if(!this._attemptCharCode(chars.charCodeAt(i)))return this._restorePosition(initialPosition),!1;return!0},_Tokenizer.prototype._attemptStrCaseInsensitive=function(chars){for(var i=0;i<chars.length;i++)if(!this._attemptCharCodeCaseInsensitive(chars.charCodeAt(i)))return!1;return!0},_Tokenizer.prototype._requireStr=function(chars){var location=this._getLocation();if(!this._attemptStr(chars))throw this._createError(_unexpectedCharacterErrorMsg(this._peek),this._getSpan(location))},_Tokenizer.prototype._attemptCharCodeUntilFn=function(predicate){for(;!predicate(this._peek);)this._advance()},_Tokenizer.prototype._requireCharCodeUntilFn=function(predicate,len){var start=this._getLocation();if(this._attemptCharCodeUntilFn(predicate),this._index-start.offset<len)throw this._createError(_unexpectedCharacterErrorMsg(this._peek),this._getSpan(start,start))},_Tokenizer.prototype._attemptUntilChar=function(char){for(;this._peek!==char;)this._advance()},_Tokenizer.prototype._readChar=function(decodeEntities){if(decodeEntities&&this._peek===$AMPERSAND)return this._decodeEntity();var index=this._index;return this._advance(),this._input[index]},_Tokenizer.prototype._decodeEntity=function(){var start=this._getLocation();if(this._advance(),!this._attemptCharCode($HASH)){var startPosition=this._savePosition();if(this._attemptCharCodeUntilFn(isNamedEntityEnd),this._peek!=$SEMICOLON)return this._restorePosition(startPosition),"&";this._advance();var name=this._input.substring(start.offset+1,this._index-1),char=NAMED_ENTITIES[name];if(!char)throw this._createError(_unknownEntityErrorMsg(name),this._getSpan(start));return char}var isHex=this._attemptCharCode($x)||this._attemptCharCode($X),numberStart=this._getLocation().offset;if(this._attemptCharCodeUntilFn(isDigitEntityEnd),this._peek!=$SEMICOLON)throw this._createError(_unexpectedCharacterErrorMsg(this._peek),this._getSpan());this._advance();var strNum=this._input.substring(numberStart,this._index-1);try{var charCode=parseInt(strNum,isHex?16:10);return String.fromCharCode(charCode)}catch(e){var entity=this._input.substring(start.offset+1,this._index-1);throw this._createError(_unknownEntityErrorMsg(entity),this._getSpan(start))}},_Tokenizer.prototype._consumeRawText=function(decodeEntities,firstCharOfEnd,attemptEndRest){var tagCloseStart,textStart=this._getLocation();this._beginToken(decodeEntities?TokenType$1.ESCAPABLE_RAW_TEXT:TokenType$1.RAW_TEXT,textStart);for(var parts=[];;){if(tagCloseStart=this._getLocation(),this._attemptCharCode(firstCharOfEnd)&&attemptEndRest())break;for(this._index>tagCloseStart.offset&&parts.push(this._input.substring(tagCloseStart.offset,this._index));this._peek!==firstCharOfEnd;)parts.push(this._readChar(decodeEntities))}return this._endToken([this._processCarriageReturns(parts.join(""))],tagCloseStart)},_Tokenizer.prototype._consumeComment=function(start){var _this=this;this._beginToken(TokenType$1.COMMENT_START,start),this._requireCharCode($MINUS),this._endToken([]);var textToken=this._consumeRawText(!1,$MINUS,function(){return _this._attemptStr("->")});this._beginToken(TokenType$1.COMMENT_END,textToken.sourceSpan.end),this._endToken([])},_Tokenizer.prototype._consumeCdata=function(start){var _this=this;this._beginToken(TokenType$1.CDATA_START,start),this._requireStr("CDATA["),this._endToken([]);var textToken=this._consumeRawText(!1,$RBRACKET,function(){return _this._attemptStr("]>")});this._beginToken(TokenType$1.CDATA_END,textToken.sourceSpan.end),this._endToken([])},_Tokenizer.prototype._consumeDocType=function(start){this._beginToken(TokenType$1.DOC_TYPE,start),this._attemptUntilChar($GT),this._advance(),this._endToken([this._input.substring(start.offset+2,this._index-1)])},_Tokenizer.prototype._consumePrefixAndName=function(){for(var nameOrPrefixStart=this._index,prefix=null;this._peek!==$COLON&&!isPrefixEnd(this._peek);)this._advance();var nameStart;return this._peek===$COLON?(this._advance(),prefix=this._input.substring(nameOrPrefixStart,this._index-1),nameStart=this._index):nameStart=nameOrPrefixStart,this._requireCharCodeUntilFn(isNameEnd,this._index===nameStart?1:0),[prefix,this._input.substring(nameStart,this._index)]},_Tokenizer.prototype._consumeTagOpen=function(start){var tagName,lowercaseTagName,savedPos=this._savePosition();try{if(!isAsciiLetter(this._peek))throw this._createError(_unexpectedCharacterErrorMsg(this._peek),this._getSpan());var nameStart=this._index;for(this._consumeTagOpenStart(start),tagName=this._input.substring(nameStart,this._index),lowercaseTagName=tagName.toLowerCase(),this._attemptCharCodeUntilFn(isNotWhitespace);this._peek!==$SLASH&&this._peek!==$GT;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(isNotWhitespace),this._attemptCharCode($EQ)&&(this._attemptCharCodeUntilFn(isNotWhitespace),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(isNotWhitespace);this._consumeTagOpenEnd()}catch(e){if(e instanceof _ControlFlowError)return this._restorePosition(savedPos),this._beginToken(TokenType$1.TEXT,start),void this._endToken(["<"]);throw e}var contentTokenType=this._getTagDefinition(tagName).contentType;contentTokenType===TagContentType.RAW_TEXT?this._consumeRawTextWithTagClose(lowercaseTagName,!1):contentTokenType===TagContentType.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(lowercaseTagName,!0)},_Tokenizer.prototype._consumeRawTextWithTagClose=function(lowercaseTagName,decodeEntities){var _this=this,textToken=this._consumeRawText(decodeEntities,$LT,function(){return!!_this._attemptCharCode($SLASH)&&(_this._attemptCharCodeUntilFn(isNotWhitespace),!!_this._attemptStrCaseInsensitive(lowercaseTagName)&&(_this._attemptCharCodeUntilFn(isNotWhitespace),_this._attemptCharCode($GT)))});this._beginToken(TokenType$1.TAG_CLOSE,textToken.sourceSpan.end),this._endToken([null,lowercaseTagName])},_Tokenizer.prototype._consumeTagOpenStart=function(start){this._beginToken(TokenType$1.TAG_OPEN_START,start);var parts=this._consumePrefixAndName();this._endToken(parts)},_Tokenizer.prototype._consumeAttributeName=function(){this._beginToken(TokenType$1.ATTR_NAME);var prefixAndName=this._consumePrefixAndName();this._endToken(prefixAndName)},_Tokenizer.prototype._consumeAttributeValue=function(){this._beginToken(TokenType$1.ATTR_VALUE);var value;if(this._peek===$SQ||this._peek===$DQ){var quoteChar=this._peek;this._advance();for(var parts=[];this._peek!==quoteChar;)parts.push(this._readChar(!0));value=parts.join(""),this._advance()}else{var valueStart=this._index;this._requireCharCodeUntilFn(isNameEnd,1),value=this._input.substring(valueStart,this._index)}this._endToken([this._processCarriageReturns(value)])},_Tokenizer.prototype._consumeTagOpenEnd=function(){var tokenType=this._attemptCharCode($SLASH)?TokenType$1.TAG_OPEN_END_VOID:TokenType$1.TAG_OPEN_END;this._beginToken(tokenType),this._requireCharCode($GT),this._endToken([])},_Tokenizer.prototype._consumeTagClose=function(start){this._beginToken(TokenType$1.TAG_CLOSE,start),this._attemptCharCodeUntilFn(isNotWhitespace);var prefixAndName=this._consumePrefixAndName();this._attemptCharCodeUntilFn(isNotWhitespace),this._requireCharCode($GT),this._endToken(prefixAndName)},_Tokenizer.prototype._consumeExpansionFormStart=function(){this._beginToken(TokenType$1.EXPANSION_FORM_START,this._getLocation()),this._requireCharCode($LBRACE),this._endToken([]),this._expansionCaseStack.push(TokenType$1.EXPANSION_FORM_START),this._beginToken(TokenType$1.RAW_TEXT,this._getLocation());var condition=this._readUntil($COMMA);this._endToken([condition],this._getLocation()),this._requireCharCode($COMMA),this._attemptCharCodeUntilFn(isNotWhitespace),this._beginToken(TokenType$1.RAW_TEXT,this._getLocation());var type=this._readUntil($COMMA);this._endToken([type],this._getLocation()),this._requireCharCode($COMMA),this._attemptCharCodeUntilFn(isNotWhitespace)},_Tokenizer.prototype._consumeExpansionCaseStart=function(){this._beginToken(TokenType$1.EXPANSION_CASE_VALUE,this._getLocation());var value=this._readUntil($LBRACE).trim();this._endToken([value],this._getLocation()),this._attemptCharCodeUntilFn(isNotWhitespace),this._beginToken(TokenType$1.EXPANSION_CASE_EXP_START,this._getLocation()),this._requireCharCode($LBRACE),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(isNotWhitespace),this._expansionCaseStack.push(TokenType$1.EXPANSION_CASE_EXP_START)},_Tokenizer.prototype._consumeExpansionCaseEnd=function(){this._beginToken(TokenType$1.EXPANSION_CASE_EXP_END,this._getLocation()),this._requireCharCode($RBRACE),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(isNotWhitespace),this._expansionCaseStack.pop()},_Tokenizer.prototype._consumeExpansionFormEnd=function(){this._beginToken(TokenType$1.EXPANSION_FORM_END,this._getLocation()),this._requireCharCode($RBRACE),this._endToken([]),this._expansionCaseStack.pop()},_Tokenizer.prototype._consumeText=function(){var start=this._getLocation();this._beginToken(TokenType$1.TEXT,start);var parts=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(parts.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(parts.push(this._interpolationConfig.end),this._inInterpolation=!1):parts.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(parts.join(""))])},_Tokenizer.prototype._isTextEnd=function(){if(this._peek===$LT||this._peek===$EOF)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(isExpansionFormStart(this._input,this._index,this._interpolationConfig))return!0;if(this._peek===$RBRACE&&this._isInExpansionCase())return!0}return!1},_Tokenizer.prototype._savePosition=function(){return[this._peek,this._index,this._column,this._line,this.tokens.length]},_Tokenizer.prototype._readUntil=function(char){var start=this._index;return this._attemptUntilChar(char),this._input.substring(start,this._index)},_Tokenizer.prototype._restorePosition=function(position){this._peek=position[0],this._index=position[1],this._column=position[2],this._line=position[3];var nbTokens=position[4];nbTokens<this.tokens.length&&(this.tokens=this.tokens.slice(0,nbTokens))},_Tokenizer.prototype._isInExpansionCase=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===TokenType$1.EXPANSION_CASE_EXP_START},_Tokenizer.prototype._isInExpansionForm=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===TokenType$1.EXPANSION_FORM_START},_Tokenizer}(),TreeError=function(_super){function TreeError(elementName,span,msg){var _this=_super.call(this,span,msg)||this;return _this.elementName=elementName,_this}return __extends(TreeError,_super),TreeError.create=function(elementName,span,msg){return new TreeError(elementName,span,msg)},TreeError}(ParseError),ParseTreeResult=function(){function ParseTreeResult(rootNodes,errors){this.rootNodes=rootNodes,this.errors=errors}return ParseTreeResult}(),Parser$1=function(){function Parser$1(getTagDefinition){this.getTagDefinition=getTagDefinition}return Parser$1.prototype.parse=function(source,url,parseExpansionForms,interpolationConfig){void 0===parseExpansionForms&&(parseExpansionForms=!1),void 0===interpolationConfig&&(interpolationConfig=DEFAULT_INTERPOLATION_CONFIG);var tokensAndErrors=tokenize(source,url,this.getTagDefinition,parseExpansionForms,interpolationConfig),treeAndErrors=new _TreeBuilder(tokensAndErrors.tokens,this.getTagDefinition).build();return new ParseTreeResult(treeAndErrors.rootNodes,tokensAndErrors.errors.concat(treeAndErrors.errors))},Parser$1}(),_TreeBuilder=function(){function _TreeBuilder(tokens,getTagDefinition){this.tokens=tokens,this.getTagDefinition=getTagDefinition,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}return _TreeBuilder.prototype.build=function(){for(;this._peek.type!==TokenType$1.EOF;)this._peek.type===TokenType$1.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===TokenType$1.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===TokenType$1.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===TokenType$1.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===TokenType$1.TEXT||this._peek.type===TokenType$1.RAW_TEXT||this._peek.type===TokenType$1.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===TokenType$1.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance();return new ParseTreeResult(this._rootNodes,this._errors)},_TreeBuilder.prototype._advance=function(){var prev=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],prev},_TreeBuilder.prototype._advanceIf=function(type){return this._peek.type===type?this._advance():null},_TreeBuilder.prototype._consumeCdata=function(startToken){this._consumeText(this._advance()),this._advanceIf(TokenType$1.CDATA_END)},_TreeBuilder.prototype._consumeComment=function(token){var text=this._advanceIf(TokenType$1.RAW_TEXT);this._advanceIf(TokenType$1.COMMENT_END);var value=null!=text?text.parts[0].trim():null;this._addToParent(new Comment(value,token.sourceSpan))},_TreeBuilder.prototype._consumeExpansion=function(token){for(var switchValue=this._advance(),type=this._advance(),cases=[];this._peek.type===TokenType$1.EXPANSION_CASE_VALUE;){var expCase=this._parseExpansionCase();if(!expCase)return;cases.push(expCase)}if(this._peek.type!==TokenType$1.EXPANSION_FORM_END)return void this._errors.push(TreeError.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."));var sourceSpan=new ParseSourceSpan(token.sourceSpan.start,this._peek.sourceSpan.end);this._addToParent(new Expansion(switchValue.parts[0],type.parts[0],cases,sourceSpan,switchValue.sourceSpan)),this._advance()},_TreeBuilder.prototype._parseExpansionCase=function(){var value=this._advance();if(this._peek.type!==TokenType$1.EXPANSION_CASE_EXP_START)return this._errors.push(TreeError.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;var start=this._advance(),exp=this._collectExpansionExpTokens(start);if(!exp)return null;var end=this._advance();exp.push(new Token$1(TokenType$1.EOF,[],end.sourceSpan));var parsedExp=new _TreeBuilder(exp,this.getTagDefinition).build();if(parsedExp.errors.length>0)return this._errors=this._errors.concat(parsedExp.errors),null;var sourceSpan=new ParseSourceSpan(value.sourceSpan.start,end.sourceSpan.end),expSourceSpan=new ParseSourceSpan(start.sourceSpan.start,end.sourceSpan.end);return new ExpansionCase(value.parts[0],parsedExp.rootNodes,sourceSpan,value.sourceSpan,expSourceSpan)},_TreeBuilder.prototype._collectExpansionExpTokens=function(start){for(var exp=[],expansionFormStack=[TokenType$1.EXPANSION_CASE_EXP_START];;){if(this._peek.type!==TokenType$1.EXPANSION_FORM_START&&this._peek.type!==TokenType$1.EXPANSION_CASE_EXP_START||expansionFormStack.push(this._peek.type),this._peek.type===TokenType$1.EXPANSION_CASE_EXP_END){if(!lastOnStack(expansionFormStack,TokenType$1.EXPANSION_CASE_EXP_START))return this._errors.push(TreeError.create(null,start.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(expansionFormStack.pop(),0==expansionFormStack.length)return exp}if(this._peek.type===TokenType$1.EXPANSION_FORM_END){if(!lastOnStack(expansionFormStack,TokenType$1.EXPANSION_FORM_START))return this._errors.push(TreeError.create(null,start.sourceSpan,"Invalid ICU message. Missing '}'.")),null;expansionFormStack.pop()}if(this._peek.type===TokenType$1.EOF)return this._errors.push(TreeError.create(null,start.sourceSpan,"Invalid ICU message. Missing '}'.")),null;exp.push(this._advance())}},_TreeBuilder.prototype._consumeText=function(token){var text=token.parts[0];if(text.length>0&&"\n"==text[0]){var parent=this._getParentElement();null!=parent&&0==parent.children.length&&this.getTagDefinition(parent.name).ignoreFirstLf&&(text=text.substring(1))}text.length>0&&this._addToParent(new Text(text,token.sourceSpan))},_TreeBuilder.prototype._closeVoidElement=function(){if(this._elementStack.length>0){var el=this._elementStack[this._elementStack.length-1];this.getTagDefinition(el.name).isVoid&&this._elementStack.pop()}},_TreeBuilder.prototype._consumeStartTag=function(startTagToken){for(var prefix=startTagToken.parts[0],name=startTagToken.parts[1],attrs=[];this._peek.type===TokenType$1.ATTR_NAME;)attrs.push(this._consumeAttr(this._advance()));var fullName=this._getElementFullName(prefix,name,this._getParentElement()),selfClosing=!1;if(this._peek.type===TokenType$1.TAG_OPEN_END_VOID){this._advance(),selfClosing=!0;var tagDef=this.getTagDefinition(fullName);tagDef.canSelfClose||null!==getNsPrefix(fullName)||tagDef.isVoid||this._errors.push(TreeError.create(fullName,startTagToken.sourceSpan,'Only void and foreign elements can be self closed "'+startTagToken.parts[1]+'"'))}else this._peek.type===TokenType$1.TAG_OPEN_END&&(this._advance(),selfClosing=!1);var end=this._peek.sourceSpan.start,span=new ParseSourceSpan(startTagToken.sourceSpan.start,end),el=new Element(fullName,attrs,[],span,span,void 0);this._pushElement(el),selfClosing&&(this._popElement(fullName),el.endSourceSpan=span)},_TreeBuilder.prototype._pushElement=function(el){if(this._elementStack.length>0){var parentEl=this._elementStack[this._elementStack.length-1];this.getTagDefinition(parentEl.name).isClosedByChild(el.name)&&this._elementStack.pop()}var tagDef=this.getTagDefinition(el.name),_a=this._getParentElementSkippingContainers(),parent=_a.parent,container=_a.container;if(parent&&tagDef.requireExtraParent(parent.name)){var newParent=new Element(tagDef.parentToAdd,[],[],el.sourceSpan,el.startSourceSpan,el.endSourceSpan);this._insertBeforeContainer(parent,container,newParent)}this._addToParent(el),this._elementStack.push(el)},_TreeBuilder.prototype._consumeEndTag=function(endTagToken){var fullName=this._getElementFullName(endTagToken.parts[0],endTagToken.parts[1],this._getParentElement());if(this._getParentElement()&&(this._getParentElement().endSourceSpan=endTagToken.sourceSpan),this.getTagDefinition(fullName).isVoid)this._errors.push(TreeError.create(fullName,endTagToken.sourceSpan,'Void elements do not have end tags "'+endTagToken.parts[1]+'"'));else if(!this._popElement(fullName)){var errMsg='Unexpected closing tag "'+fullName+'". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags';this._errors.push(TreeError.create(fullName,endTagToken.sourceSpan,errMsg))}},_TreeBuilder.prototype._popElement=function(fullName){for(var stackIndex=this._elementStack.length-1;stackIndex>=0;stackIndex--){var el=this._elementStack[stackIndex];if(el.name==fullName)return this._elementStack.splice(stackIndex,this._elementStack.length-stackIndex),!0;if(!this.getTagDefinition(el.name).closedByParent)return!1}return!1},_TreeBuilder.prototype._consumeAttr=function(attrName){var fullName=mergeNsAndName(attrName.parts[0],attrName.parts[1]),end=attrName.sourceSpan.end,value="",valueSpan=void 0;if(this._peek.type===TokenType$1.ATTR_VALUE){var valueToken=this._advance();value=valueToken.parts[0],end=valueToken.sourceSpan.end,valueSpan=valueToken.sourceSpan}return new Attribute$1(fullName,value,new ParseSourceSpan(attrName.sourceSpan.start,end),valueSpan)},_TreeBuilder.prototype._getParentElement=function(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null},_TreeBuilder.prototype._getParentElementSkippingContainers=function(){for(var container=null,i=this._elementStack.length-1;i>=0;i--){if(!isNgContainer(this._elementStack[i].name))return{parent:this._elementStack[i],container:container};container=this._elementStack[i]}return{parent:this._elementStack[this._elementStack.length-1],container:container}},_TreeBuilder.prototype._addToParent=function(node){var parent=this._getParentElement();null!=parent?parent.children.push(node):this._rootNodes.push(node)},_TreeBuilder.prototype._insertBeforeContainer=function(parent,container,node){if(container){if(parent){var index=parent.children.indexOf(container);parent.children[index]=node}else this._rootNodes.push(node);node.children.push(container),this._elementStack.splice(this._elementStack.indexOf(container),0,node)}else this._addToParent(node),this._elementStack.push(node)},_TreeBuilder.prototype._getElementFullName=function(prefix,localName,parentElement){return null==prefix&&null==(prefix=this.getTagDefinition(localName).implicitNamespacePrefix)&&null!=parentElement&&(prefix=getNsPrefix(parentElement.name)),mergeNsAndName(prefix,localName)},_TreeBuilder}(),_SerializerVisitor=function(){function _SerializerVisitor(){}return _SerializerVisitor.prototype.visitText=function(text,context){return text.value},_SerializerVisitor.prototype.visitContainer=function(container,context){var _this=this;return"["+container.children.map(function(child){return child.visit(_this)}).join(", ")+"]"},_SerializerVisitor.prototype.visitIcu=function(icu,context){var _this=this,strCases=Object.keys(icu.cases).map(function(k){return k+" {"+icu.cases[k].visit(_this)+"}"});return"{"+icu.expression+", "+icu.type+", "+strCases.join(", ")+"}"},_SerializerVisitor.prototype.visitTagPlaceholder=function(ph,context){var _this=this;return ph.isVoid?'<ph tag name="'+ph.startName+'"/>':'<ph tag name="'+ph.startName+'">'+ph.children.map(function(child){return child.visit(_this)}).join(", ")+'</ph name="'+ph.closeName+'">'},_SerializerVisitor.prototype.visitPlaceholder=function(ph,context){return ph.value?'<ph name="'+ph.name+'">'+ph.value+"</ph>":'<ph name="'+ph.name+'"/>'},_SerializerVisitor.prototype.visitIcuPlaceholder=function(ph,context){return'<ph icu name="'+ph.name+'">'+ph.value.visit(this)+"</ph>"},_SerializerVisitor}(),serializerVisitor=new _SerializerVisitor,_SerializerIgnoreIcuExpVisitor=function(_super){function _SerializerIgnoreIcuExpVisitor(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(_SerializerIgnoreIcuExpVisitor,_super),_SerializerIgnoreIcuExpVisitor.prototype.visitIcu=function(icu,context){var _this=this,strCases=Object.keys(icu.cases).map(function(k){return k+" {"+icu.cases[k].visit(_this)+"}"});return"{"+icu.type+", "+strCases.join(", ")+"}"},_SerializerIgnoreIcuExpVisitor}(_SerializerVisitor),Endian={};Endian.Little=0,Endian.Big=1,Endian[Endian.Little]="Little",Endian[Endian.Big]="Big";var Message=function(){function Message(nodes,placeholders,placeholderToMessage,meaning,description,id){this.nodes=nodes,this.placeholders=placeholders,this.placeholderToMessage=placeholderToMessage,this.meaning=meaning,this.description=description,this.id=id,nodes.length?this.sources=[{filePath:nodes[0].sourceSpan.start.file.url,startLine:nodes[0].sourceSpan.start.line+1,startCol:nodes[0].sourceSpan.start.col+1,endLine:nodes[nodes.length-1].sourceSpan.end.line+1,endCol:nodes[0].sourceSpan.start.col+1}]:this.sources=[]}return Message}(),Text$1=function(){function Text$1(value,sourceSpan){this.value=value,this.sourceSpan=sourceSpan}return Text$1.prototype.visit=function(visitor,context){return visitor.visitText(this,context)},Text$1}(),Container=function(){function Container(children,sourceSpan){this.children=children,this.sourceSpan=sourceSpan}return Container.prototype.visit=function(visitor,context){return visitor.visitContainer(this,context)},Container}(),Icu=function(){function Icu(expression,type,cases,sourceSpan){this.expression=expression,this.type=type,this.cases=cases,this.sourceSpan=sourceSpan}return Icu.prototype.visit=function(visitor,context){return visitor.visitIcu(this,context)},Icu}(),TagPlaceholder=function(){function TagPlaceholder(tag,attrs,startName,closeName,children,isVoid,sourceSpan){this.tag=tag,this.attrs=attrs,this.startName=startName,this.closeName=closeName,this.children=children,this.isVoid=isVoid,this.sourceSpan=sourceSpan}return TagPlaceholder.prototype.visit=function(visitor,context){return visitor.visitTagPlaceholder(this,context)},TagPlaceholder}(),Placeholder=function(){function Placeholder(value,name,sourceSpan){this.value=value,this.name=name,this.sourceSpan=sourceSpan}return Placeholder.prototype.visit=function(visitor,context){return visitor.visitPlaceholder(this,context)},Placeholder}(),IcuPlaceholder=function(){function IcuPlaceholder(value,name,sourceSpan){this.value=value,this.name=name,this.sourceSpan=sourceSpan}return IcuPlaceholder.prototype.visit=function(visitor,context){return visitor.visitIcuPlaceholder(this,context)},IcuPlaceholder}(),CloneVisitor=function(){function CloneVisitor(){}return CloneVisitor.prototype.visitText=function(text,context){return new Text$1(text.value,text.sourceSpan)},CloneVisitor.prototype.visitContainer=function(container,context){var _this=this,children=container.children.map(function(n){return n.visit(_this,context)});return new Container(children,container.sourceSpan)},CloneVisitor.prototype.visitIcu=function(icu,context){var _this=this,cases={};Object.keys(icu.cases).forEach(function(key){return cases[key]=icu.cases[key].visit(_this,context)});var msg=new Icu(icu.expression,icu.type,cases,icu.sourceSpan);return msg.expressionPlaceholder=icu.expressionPlaceholder,msg},CloneVisitor.prototype.visitTagPlaceholder=function(ph,context){var _this=this,children=ph.children.map(function(n){return n.visit(_this,context)});return new TagPlaceholder(ph.tag,ph.attrs,ph.startName,ph.closeName,children,ph.isVoid,ph.sourceSpan)},CloneVisitor.prototype.visitPlaceholder=function(ph,context){return new Placeholder(ph.value,ph.name,ph.sourceSpan)},CloneVisitor.prototype.visitIcuPlaceholder=function(ph,context){return new IcuPlaceholder(ph.value,ph.name,ph.sourceSpan)},CloneVisitor}(),RecurseVisitor=function(){function RecurseVisitor(){}return RecurseVisitor.prototype.visitText=function(text,context){},RecurseVisitor.prototype.visitContainer=function(container,context){var _this=this;container.children.forEach(function(child){return child.visit(_this)})},RecurseVisitor.prototype.visitIcu=function(icu,context){var _this=this;Object.keys(icu.cases).forEach(function(k){icu.cases[k].visit(_this)})},RecurseVisitor.prototype.visitTagPlaceholder=function(ph,context){var _this=this;ph.children.forEach(function(child){return child.visit(_this)})},RecurseVisitor.prototype.visitPlaceholder=function(ph,context){},RecurseVisitor.prototype.visitIcuPlaceholder=function(ph,context){},RecurseVisitor}(),TAG_TO_PLACEHOLDER_NAMES={A:"LINK",B:"BOLD_TEXT",BR:"LINE_BREAK",EM:"EMPHASISED_TEXT",H1:"HEADING_LEVEL1",H2:"HEADING_LEVEL2",H3:"HEADING_LEVEL3",H4:"HEADING_LEVEL4",H5:"HEADING_LEVEL5",H6:"HEADING_LEVEL6",HR:"HORIZONTAL_RULE",I:"ITALIC_TEXT",LI:"LIST_ITEM",LINK:"MEDIA_LINK",OL:"ORDERED_LIST",P:"PARAGRAPH",Q:"QUOTATION",S:"STRIKETHROUGH_TEXT",SMALL:"SMALL_TEXT",SUB:"SUBSTRIPT",SUP:"SUPERSCRIPT",TBODY:"TABLE_BODY",TD:"TABLE_CELL",TFOOT:"TABLE_FOOTER",TH:"TABLE_HEADER_CELL",THEAD:"TABLE_HEADER",TR:"TABLE_ROW",TT:"MONOSPACED_TEXT",U:"UNDERLINED_TEXT",UL:"UNORDERED_LIST"},PlaceholderRegistry=function(){function PlaceholderRegistry(){this._placeHolderNameCounts={},this._signatureToName={}}return PlaceholderRegistry.prototype.getStartTagPlaceholderName=function(tag,attrs,isVoid){var signature=this._hashTag(tag,attrs,isVoid);if(this._signatureToName[signature])return this._signatureToName[signature];var upperTag=tag.toUpperCase(),baseName=TAG_TO_PLACEHOLDER_NAMES[upperTag]||"TAG_"+upperTag,name=this._generateUniqueName(isVoid?baseName:"START_"+baseName);return this._signatureToName[signature]=name,name},PlaceholderRegistry.prototype.getCloseTagPlaceholderName=function(tag){var signature=this._hashClosingTag(tag);if(this._signatureToName[signature])return this._signatureToName[signature];var upperTag=tag.toUpperCase(),baseName=TAG_TO_PLACEHOLDER_NAMES[upperTag]||"TAG_"+upperTag,name=this._generateUniqueName("CLOSE_"+baseName);return this._signatureToName[signature]=name,name},PlaceholderRegistry.prototype.getPlaceholderName=function(name,content){var upperName=name.toUpperCase(),signature="PH: "+upperName+"="+content;if(this._signatureToName[signature])return this._signatureToName[signature];var uniqueName=this._generateUniqueName(upperName);return this._signatureToName[signature]=uniqueName,uniqueName},PlaceholderRegistry.prototype.getUniquePlaceholder=function(name){return this._generateUniqueName(name.toUpperCase())},PlaceholderRegistry.prototype._hashTag=function(tag,attrs,isVoid){return"<"+tag+Object.keys(attrs).sort().map(function(name){return" "+name+"="+attrs[name]}).join("")+(isVoid?"/>":"></"+tag+">")},PlaceholderRegistry.prototype._hashClosingTag=function(tag){return this._hashTag("/"+tag,{},!1)},PlaceholderRegistry.prototype._generateUniqueName=function(base){if(!this._placeHolderNameCounts.hasOwnProperty(base))return this._placeHolderNameCounts[base]=1,base;var id=this._placeHolderNameCounts[base];return this._placeHolderNameCounts[base]=id+1,base+"_"+id},PlaceholderRegistry}(),_expParser=new Parser(new Lexer),_I18nVisitor=function(){function _I18nVisitor(_expressionParser,_interpolationConfig){this._expressionParser=_expressionParser,this._interpolationConfig=_interpolationConfig}return _I18nVisitor.prototype.toI18nMessage=function(nodes,meaning,description,id){this._isIcu=1==nodes.length&&nodes[0]instanceof Expansion,this._icuDepth=0,this._placeholderRegistry=new PlaceholderRegistry,this._placeholderToContent={},this._placeholderToMessage={};var i18nodes=visitAll(this,nodes,{});return new Message(i18nodes,this._placeholderToContent,this._placeholderToMessage,meaning,description,id)},_I18nVisitor.prototype.visitElement=function(el,context){var children=visitAll(this,el.children),attrs={};el.attrs.forEach(function(attr){attrs[attr.name]=attr.value});var isVoid=getHtmlTagDefinition(el.name).isVoid,startPhName=this._placeholderRegistry.getStartTagPlaceholderName(el.name,attrs,isVoid);this._placeholderToContent[startPhName]=el.sourceSpan.toString();var closePhName="";return isVoid||(closePhName=this._placeholderRegistry.getCloseTagPlaceholderName(el.name),this._placeholderToContent[closePhName]="</"+el.name+">"),new TagPlaceholder(el.name,attrs,startPhName,closePhName,children,isVoid,el.sourceSpan)},_I18nVisitor.prototype.visitAttribute=function(attribute,context){return this._visitTextWithInterpolation(attribute.value,attribute.sourceSpan)},_I18nVisitor.prototype.visitText=function(text,context){return this._visitTextWithInterpolation(text.value,text.sourceSpan)},_I18nVisitor.prototype.visitComment=function(comment,context){return null},_I18nVisitor.prototype.visitExpansion=function(icu,context){var _this=this;this._icuDepth++;var i18nIcuCases={},i18nIcu=new Icu(icu.switchValue,icu.type,i18nIcuCases,icu.sourceSpan);if(icu.cases.forEach(function(caze){i18nIcuCases[caze.value]=new Container(caze.expression.map(function(node){return node.visit(_this,{})}),caze.expSourceSpan)}),this._icuDepth--,this._isIcu||this._icuDepth>0){var expPh=this._placeholderRegistry.getUniquePlaceholder("VAR_"+icu.type);return i18nIcu.expressionPlaceholder=expPh,this._placeholderToContent[expPh]=icu.switchValue,i18nIcu}var phName=this._placeholderRegistry.getPlaceholderName("ICU",icu.sourceSpan.toString()),visitor=new _I18nVisitor(this._expressionParser,this._interpolationConfig);return this._placeholderToMessage[phName]=visitor.toI18nMessage([icu],"","",""),new IcuPlaceholder(i18nIcu,phName,icu.sourceSpan)},_I18nVisitor.prototype.visitExpansionCase=function(icuCase,context){throw new Error("Unreachable code")},_I18nVisitor.prototype._visitTextWithInterpolation=function(text,sourceSpan){var splitInterpolation=this._expressionParser.splitInterpolation(text,sourceSpan.start.toString(),this._interpolationConfig);if(!splitInterpolation)return new Text$1(text,sourceSpan);for(var nodes=[],container=new Container(nodes,sourceSpan),_a=this._interpolationConfig,sDelimiter=_a.start,eDelimiter=_a.end,i=0;i<splitInterpolation.strings.length-1;i++){var expression=splitInterpolation.expressions[i],baseName=_extractPlaceholderName(expression)||"INTERPOLATION",phName=this._placeholderRegistry.getPlaceholderName(baseName,expression);splitInterpolation.strings[i].length&&nodes.push(new Text$1(splitInterpolation.strings[i],sourceSpan)),nodes.push(new Placeholder(expression,phName,sourceSpan)),this._placeholderToContent[phName]=sDelimiter+expression+eDelimiter}var lastStringIdx=splitInterpolation.strings.length-1;return splitInterpolation.strings[lastStringIdx].length&&nodes.push(new Text$1(splitInterpolation.strings[lastStringIdx],sourceSpan)),container},_I18nVisitor}(),_CUSTOM_PH_EXP=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g,I18nError=function(_super){function I18nError(span,msg){return _super.call(this,span,msg)||this}return __extends(I18nError,_super),I18nError}(ParseError),_I18N_ATTR="i18n",_I18N_ATTR_PREFIX="i18n-",_I18N_COMMENT_PREFIX_REGEXP=/^i18n:?/,MEANING_SEPARATOR="|",ID_SEPARATOR="@@",ExtractionResult=function(){function ExtractionResult(messages,errors){this.messages=messages,this.errors=errors}return ExtractionResult}(),_VisitorMode={};_VisitorMode.Extract=0,_VisitorMode.Merge=1,_VisitorMode[_VisitorMode.Extract]="Extract",_VisitorMode[_VisitorMode.Merge]="Merge";var _Visitor=function(){function _Visitor(_implicitTags,_implicitAttrs){this._implicitTags=_implicitTags,this._implicitAttrs=_implicitAttrs}return _Visitor.prototype.extract=function(nodes,interpolationConfig){var _this=this;return this._init(_VisitorMode.Extract,interpolationConfig),nodes.forEach(function(node){return node.visit(_this,null)}),this._inI18nBlock&&this._reportError(nodes[nodes.length-1],"Unclosed block"),new ExtractionResult(this._messages,this._errors)},_Visitor.prototype.merge=function(nodes,translations,interpolationConfig){this._init(_VisitorMode.Merge,interpolationConfig),this._translations=translations;var wrapper=new Element("wrapper",[],nodes,void 0,void 0,void 0),translatedNode=wrapper.visit(this,null);return this._inI18nBlock&&this._reportError(nodes[nodes.length-1],"Unclosed block"),new ParseTreeResult(translatedNode.children,this._errors)},_Visitor.prototype.visitExpansionCase=function(icuCase,context){var expression=visitAll(this,icuCase.expression,context);if(this._mode===_VisitorMode.Merge)return new ExpansionCase(icuCase.value,expression,icuCase.sourceSpan,icuCase.valueSourceSpan,icuCase.expSourceSpan)},_Visitor.prototype.visitExpansion=function(icu,context){this._mayBeAddBlockChildren(icu);var wasInIcu=this._inIcu;this._inIcu||(this._isInTranslatableSection&&this._addMessage([icu]),this._inIcu=!0);var cases=visitAll(this,icu.cases,context);return this._mode===_VisitorMode.Merge&&(icu=new Expansion(icu.switchValue,icu.type,cases,icu.sourceSpan,icu.switchValueSourceSpan)),this._inIcu=wasInIcu,icu},_Visitor.prototype.visitComment=function(comment,context){var isOpening=_isOpeningComment(comment);if(isOpening&&this._isInTranslatableSection)return void this._reportError(comment,"Could not start a block inside a translatable section");var isClosing=_isClosingComment(comment);if(isClosing&&!this._inI18nBlock)return void this._reportError(comment,"Trying to close an unopened block");if(!this._inI18nNode&&!this._inIcu)if(this._inI18nBlock){if(isClosing){if(this._depth==this._blockStartDepth){this._closeTranslatableSection(comment,this._blockChildren),this._inI18nBlock=!1;var message=this._addMessage(this._blockChildren,this._blockMeaningAndDesc),nodes=this._translateMessage(comment,message);return visitAll(this,nodes)}return void this._reportError(comment,"I18N blocks should not cross element boundaries")}}else isOpening&&(this._inI18nBlock=!0,this._blockStartDepth=this._depth,this._blockChildren=[],this._blockMeaningAndDesc=comment.value.replace(_I18N_COMMENT_PREFIX_REGEXP,"").trim(),this._openTranslatableSection(comment))},_Visitor.prototype.visitText=function(text,context){return this._isInTranslatableSection&&this._mayBeAddBlockChildren(text),text},_Visitor.prototype.visitElement=function(el,context){var _this=this;this._mayBeAddBlockChildren(el),this._depth++;var wasInI18nNode=this._inI18nNode,wasInImplicitNode=this._inImplicitNode,childNodes=[],translatedChildNodes=void 0,i18nAttr=_getI18nAttr(el),i18nMeta=i18nAttr?i18nAttr.value:"",isImplicit=this._implicitTags.some(function(tag){return el.name===tag})&&!this._inIcu&&!this._isInTranslatableSection,isTopLevelImplicit=!wasInImplicitNode&&isImplicit;if(this._inImplicitNode=wasInImplicitNode||isImplicit,this._isInTranslatableSection||this._inIcu)(i18nAttr||isTopLevelImplicit)&&this._reportError(el,"Could not mark an element as translatable inside a translatable section"),this._mode==_VisitorMode.Extract&&visitAll(this,el.children);else{if(i18nAttr||isTopLevelImplicit){this._inI18nNode=!0;var message=this._addMessage(el.children,i18nMeta);translatedChildNodes=this._translateMessage(el,message)}if(this._mode==_VisitorMode.Extract){var isTranslatable=i18nAttr||isTopLevelImplicit;isTranslatable&&this._openTranslatableSection(el),visitAll(this,el.children),isTranslatable&&this._closeTranslatableSection(el,el.children)}}if(this._mode===_VisitorMode.Merge){(translatedChildNodes||el.children).forEach(function(child){var visited=child.visit(_this,context);visited&&!_this._isInTranslatableSection&&(childNodes=childNodes.concat(visited))})}if(this._visitAttributesOf(el),this._depth--,this._inI18nNode=wasInI18nNode,this._inImplicitNode=wasInImplicitNode,this._mode===_VisitorMode.Merge){var translatedAttrs=this._translateAttributes(el);return new Element(el.name,translatedAttrs,childNodes,el.sourceSpan,el.startSourceSpan,el.endSourceSpan)}return null},_Visitor.prototype.visitAttribute=function(attribute,context){throw new Error("unreachable code")},_Visitor.prototype._init=function(mode,interpolationConfig){this._mode=mode,this._inI18nBlock=!1,this._inI18nNode=!1,this._depth=0,this._inIcu=!1,this._msgCountAtSectionStart=void 0,this._errors=[],this._messages=[],this._inImplicitNode=!1,this._createI18nMessage=createI18nMessageFactory(interpolationConfig)},_Visitor.prototype._visitAttributesOf=function(el){var _this=this,explicitAttrNameToValue={},implicitAttrNames=this._implicitAttrs[el.name]||[];el.attrs.filter(function(attr){return attr.name.startsWith(_I18N_ATTR_PREFIX)}).forEach(function(attr){return explicitAttrNameToValue[attr.name.slice(_I18N_ATTR_PREFIX.length)]=attr.value}),el.attrs.forEach(function(attr){attr.name in explicitAttrNameToValue?_this._addMessage([attr],explicitAttrNameToValue[attr.name]):implicitAttrNames.some(function(name){return attr.name===name})&&_this._addMessage([attr])})},_Visitor.prototype._addMessage=function(ast,msgMeta){if(0==ast.length||1==ast.length&&ast[0]instanceof Attribute$1&&!ast[0].value)return null;var _a=_parseMessageMeta(msgMeta),meaning=_a.meaning,description=_a.description,id=_a.id,message=this._createI18nMessage(ast,meaning,description,id);return this._messages.push(message),message},_Visitor.prototype._translateMessage=function(el,message){if(message&&this._mode===_VisitorMode.Merge){var nodes=this._translations.get(message);if(nodes)return nodes;this._reportError(el,'Translation unavailable for message id="'+this._translations.digest(message)+'"')}return[]},_Visitor.prototype._translateAttributes=function(el){var _this=this,attributes=el.attrs,i18nParsedMessageMeta={};attributes.forEach(function(attr){attr.name.startsWith(_I18N_ATTR_PREFIX)&&(i18nParsedMessageMeta[attr.name.slice(_I18N_ATTR_PREFIX.length)]=_parseMessageMeta(attr.value))});var translatedAttributes=[];return attributes.forEach(function(attr){if(attr.name!==_I18N_ATTR&&!attr.name.startsWith(_I18N_ATTR_PREFIX))if(attr.value&&""!=attr.value&&i18nParsedMessageMeta.hasOwnProperty(attr.name)){var _a=i18nParsedMessageMeta[attr.name],meaning=_a.meaning,description=_a.description,id=_a.id,message=_this._createI18nMessage([attr],meaning,description,id),nodes=_this._translations.get(message);if(nodes)if(0==nodes.length)translatedAttributes.push(new Attribute$1(attr.name,"",attr.sourceSpan));else if(nodes[0]instanceof Text){var value=nodes[0].value;translatedAttributes.push(new Attribute$1(attr.name,value,attr.sourceSpan))}else _this._reportError(el,'Unexpected translation for attribute "'+attr.name+'" (id="'+(id||_this._translations.digest(message))+'")');else _this._reportError(el,'Translation unavailable for attribute "'+attr.name+'" (id="'+(id||_this._translations.digest(message))+'")')}else translatedAttributes.push(attr)}),translatedAttributes},_Visitor.prototype._mayBeAddBlockChildren=function(node){this._inI18nBlock&&!this._inIcu&&this._depth==this._blockStartDepth&&this._blockChildren.push(node)},_Visitor.prototype._openTranslatableSection=function(node){this._isInTranslatableSection?this._reportError(node,"Unexpected section start"):this._msgCountAtSectionStart=this._messages.length},Object.defineProperty(_Visitor.prototype,"_isInTranslatableSection",{get:function(){return void 0!==this._msgCountAtSectionStart},enumerable:!0,configurable:!0}),_Visitor.prototype._closeTranslatableSection=function(node,directChildren){if(!this._isInTranslatableSection)return void this._reportError(node,"Unexpected section end");var startIndex=this._msgCountAtSectionStart;if(1==directChildren.reduce(function(count,node){return count+(node instanceof Comment?0:1)},0))for(var i=this._messages.length-1;i>=startIndex;i--){var ast=this._messages[i].nodes;if(!(1==ast.length&&ast[0]instanceof Text$1)){this._messages.splice(i,1);break}}this._msgCountAtSectionStart=void 0},_Visitor.prototype._reportError=function(node,msg){this._errors.push(new I18nError(node.sourceSpan,msg))},_Visitor}(),XmlTagDefinition=function(){function XmlTagDefinition(){this.closedByParent=!1,this.contentType=TagContentType.PARSABLE_DATA,this.isVoid=!1,this.ignoreFirstLf=!1,this.canSelfClose=!0}return XmlTagDefinition.prototype.requireExtraParent=function(currentParent){return!1},XmlTagDefinition.prototype.isClosedByChild=function(name){return!1},XmlTagDefinition}(),_TAG_DEFINITION=new XmlTagDefinition,XmlParser=function(_super){function XmlParser(){return _super.call(this,getXmlTagDefinition)||this}return __extends(XmlParser,_super),XmlParser.prototype.parse=function(source,url,parseExpansionForms){return void 0===parseExpansionForms&&(parseExpansionForms=!1),_super.prototype.parse.call(this,source,url,parseExpansionForms)},XmlParser}(Parser$1),Serializer=function(){function Serializer(){}return Serializer.prototype.write=function(messages,locale){},Serializer.prototype.load=function(content,url){},Serializer.prototype.digest=function(message){},Serializer.prototype.createNameMapper=function(message){return null},Serializer}(),SimplePlaceholderMapper=function(_super){function SimplePlaceholderMapper(message,mapName){var _this=_super.call(this)||this;return _this.mapName=mapName,_this.internalToPublic={},_this.publicToNextId={},_this.publicToInternal={},message.nodes.forEach(function(node){return node.visit(_this)}),_this}return __extends(SimplePlaceholderMapper,_super),SimplePlaceholderMapper.prototype.toPublicName=function(internalName){return this.internalToPublic.hasOwnProperty(internalName)?this.internalToPublic[internalName]:null},SimplePlaceholderMapper.prototype.toInternalName=function(publicName){return this.publicToInternal.hasOwnProperty(publicName)?this.publicToInternal[publicName]:null},SimplePlaceholderMapper.prototype.visitText=function(text,context){return null},SimplePlaceholderMapper.prototype.visitTagPlaceholder=function(ph,context){this.visitPlaceholderName(ph.startName),_super.prototype.visitTagPlaceholder.call(this,ph,context),this.visitPlaceholderName(ph.closeName)},SimplePlaceholderMapper.prototype.visitPlaceholder=function(ph,context){this.visitPlaceholderName(ph.name)},SimplePlaceholderMapper.prototype.visitIcuPlaceholder=function(ph,context){this.visitPlaceholderName(ph.name)},SimplePlaceholderMapper.prototype.visitPlaceholderName=function(internalName){if(internalName&&!this.internalToPublic.hasOwnProperty(internalName)){var publicName=this.mapName(internalName);if(this.publicToInternal.hasOwnProperty(publicName)){var nextId=this.publicToNextId[publicName];this.publicToNextId[publicName]=nextId+1,publicName=publicName+"_"+nextId}else this.publicToNextId[publicName]=1;this.internalToPublic[internalName]=publicName,this.publicToInternal[publicName]=internalName}},SimplePlaceholderMapper}(RecurseVisitor),_Visitor$1=function(){function _Visitor$1(){}return _Visitor$1.prototype.visitTag=function(tag){var _this=this,strAttrs=this._serializeAttributes(tag.attrs);if(0==tag.children.length)return"<"+tag.name+strAttrs+"/>";var strChildren=tag.children.map(function(node){return node.visit(_this)});return"<"+tag.name+strAttrs+">"+strChildren.join("")+"</"+tag.name+">"},_Visitor$1.prototype.visitText=function(text){return text.value},_Visitor$1.prototype.visitDeclaration=function(decl){return"<?xml"+this._serializeAttributes(decl.attrs)+" ?>"},_Visitor$1.prototype._serializeAttributes=function(attrs){var strAttrs=Object.keys(attrs).map(function(name){return name+'="'+attrs[name]+'"'}).join(" ");return strAttrs.length>0?" "+strAttrs:""},_Visitor$1.prototype.visitDoctype=function(doctype){return"<!DOCTYPE "+doctype.rootTag+" [\n"+doctype.dtd+"\n]>"},_Visitor$1}(),_visitor=new _Visitor$1,Declaration=function(){function Declaration(unescapedAttrs){var _this=this;this.attrs={},Object.keys(unescapedAttrs).forEach(function(k){_this.attrs[k]=_escapeXml(unescapedAttrs[k])})}return Declaration.prototype.visit=function(visitor){return visitor.visitDeclaration(this)},Declaration}(),Doctype=function(){function Doctype(rootTag,dtd){this.rootTag=rootTag,this.dtd=dtd}return Doctype.prototype.visit=function(visitor){return visitor.visitDoctype(this)},Doctype}(),Tag=function(){function Tag(name,unescapedAttrs,children){void 0===unescapedAttrs&&(unescapedAttrs={}),void 0===children&&(children=[]);var _this=this;this.name=name,this.children=children,this.attrs={},Object.keys(unescapedAttrs).forEach(function(k){_this.attrs[k]=_escapeXml(unescapedAttrs[k])})}return Tag.prototype.visit=function(visitor){return visitor.visitTag(this)},Tag}(),Text$2=function(){function Text$2(unescapedValue){this.value=_escapeXml(unescapedValue)}return Text$2.prototype.visit=function(visitor){return visitor.visitText(this)},Text$2}(),CR=function(_super){function CR(ws){return void 0===ws&&(ws=0),_super.call(this,"\n"+new Array(ws+1).join(" "))||this}return __extends(CR,_super),CR}(Text$2),_ESCAPED_CHARS=[[/&/g,"&"],[/"/g,"""],[/'/g,"'"],[/</g,"<"],[/>/g,">"]],_VERSION="1.2",_XMLNS="urn:oasis:names:tc:xliff:document:1.2",_DEFAULT_SOURCE_LANG="en",_PLACEHOLDER_TAG="x",_FILE_TAG="file",_SOURCE_TAG="source",_TARGET_TAG="target",_UNIT_TAG="trans-unit",_CONTEXT_GROUP_TAG="context-group",_CONTEXT_TAG="context",Xliff=function(_super){function Xliff(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(Xliff,_super),Xliff.prototype.write=function(messages,locale){var visitor=new _WriteVisitor,transUnits=[];messages.forEach(function(message){var contextTags=[];message.sources.forEach(function(source){var contextGroupTag=new Tag(_CONTEXT_GROUP_TAG,{purpose:"location"});contextGroupTag.children.push(new CR(10),new Tag(_CONTEXT_TAG,{"context-type":"sourcefile"},[new Text$2(source.filePath)]),new CR(10),new Tag(_CONTEXT_TAG,{"context-type":"linenumber"},[new Text$2(""+source.startLine)]),new CR(8)),contextTags.push(new CR(8),contextGroupTag)});var transUnit=new Tag(_UNIT_TAG,{id:message.id,datatype:"html"});(_a=transUnit.children).push.apply(_a,[new CR(8),new Tag(_SOURCE_TAG,{},visitor.serialize(message.nodes)),new CR(8),new Tag(_TARGET_TAG)].concat(contextTags)),message.description&&transUnit.children.push(new CR(8),new Tag("note",{priority:"1",from:"description"},[new Text$2(message.description)])),message.meaning&&transUnit.children.push(new CR(8),new Tag("note",{priority:"1",from:"meaning"},[new Text$2(message.meaning)])),transUnit.children.push(new CR(6)),transUnits.push(new CR(6),transUnit);var _a});var body=new Tag("body",{},transUnits.concat([new CR(4)])),file=new Tag("file",{"source-language":locale||_DEFAULT_SOURCE_LANG,datatype:"plaintext",original:"ng2.template"},[new CR(4),body,new CR(2)]),xliff=new Tag("xliff",{version:_VERSION,xmlns:_XMLNS},[new CR(2),file,new CR]);return serialize([new Declaration({version:"1.0",encoding:"UTF-8"}),new CR,xliff,new CR])},Xliff.prototype.load=function(content,url){var xliffParser=new XliffParser,_a=xliffParser.parse(content,url),locale=_a.locale,msgIdToHtml=_a.msgIdToHtml,errors=_a.errors,i18nNodesByMsgId={},converter=new XmlToI18n;if(Object.keys(msgIdToHtml).forEach(function(msgId){var _a=converter.convert(msgIdToHtml[msgId],url),i18nNodes=_a.i18nNodes,e=_a.errors;errors.push.apply(errors,e),i18nNodesByMsgId[msgId]=i18nNodes}),errors.length)throw new Error("xliff parse errors:\n"+errors.join("\n"));return{locale:locale,i18nNodesByMsgId:i18nNodesByMsgId}},Xliff.prototype.digest=function(message){return digest(message)},Xliff}(Serializer),_WriteVisitor=function(){function _WriteVisitor(){}return _WriteVisitor.prototype.visitText=function(text,context){return[new Text$2(text.value)]},_WriteVisitor.prototype.visitContainer=function(container,context){var _this=this,nodes=[];return container.children.forEach(function(node){return nodes.push.apply(nodes,node.visit(_this))}),nodes},_WriteVisitor.prototype.visitIcu=function(icu,context){var _this=this,nodes=[new Text$2("{"+icu.expressionPlaceholder+", "+icu.type+", ")];return Object.keys(icu.cases).forEach(function(c){nodes.push.apply(nodes,[new Text$2(c+" {")].concat(icu.cases[c].visit(_this),[new Text$2("} ")]))}),nodes.push(new Text$2("}")),nodes},_WriteVisitor.prototype.visitTagPlaceholder=function(ph,context){var ctype=getCtypeForTag(ph.tag),startTagPh=new Tag(_PLACEHOLDER_TAG,{id:ph.startName,ctype:ctype});if(ph.isVoid)return[startTagPh];var closeTagPh=new Tag(_PLACEHOLDER_TAG,{id:ph.closeName,ctype:ctype});return[startTagPh].concat(this.serialize(ph.children),[closeTagPh])},_WriteVisitor.prototype.visitPlaceholder=function(ph,context){return[new Tag(_PLACEHOLDER_TAG,{id:ph.name})]},_WriteVisitor.prototype.visitIcuPlaceholder=function(ph,context){return[new Tag(_PLACEHOLDER_TAG,{id:ph.name})]},_WriteVisitor.prototype.serialize=function(nodes){var _this=this;return[].concat.apply([],nodes.map(function(node){return node.visit(_this)}))},_WriteVisitor}(),XliffParser=function(){function XliffParser(){this._locale=null}return XliffParser.prototype.parse=function(xliff,url){this._unitMlString=null,this._msgIdToHtml={};var xml=(new XmlParser).parse(xliff,url,!1);return this._errors=xml.errors,visitAll(this,xml.rootNodes,null),{msgIdToHtml:this._msgIdToHtml,errors:this._errors,locale:this._locale}},XliffParser.prototype.visitElement=function(element,context){switch(element.name){case _UNIT_TAG:this._unitMlString=null;var idAttr=element.attrs.find(function(attr){return"id"===attr.name});if(idAttr){var id=idAttr.value;this._msgIdToHtml.hasOwnProperty(id)?this._addError(element,"Duplicated translations for msg "+id):(visitAll(this,element.children,null),"string"==typeof this._unitMlString?this._msgIdToHtml[id]=this._unitMlString:this._addError(element,"Message "+id+" misses a translation"))}else this._addError(element,"<"+_UNIT_TAG+'> misses the "id" attribute');break;case _SOURCE_TAG:break;case _TARGET_TAG:var innerTextStart=element.startSourceSpan.end.offset,innerTextEnd=element.endSourceSpan.start.offset,content=element.startSourceSpan.start.file.content,innerText=content.slice(innerTextStart,innerTextEnd);this._unitMlString=innerText;break;case _FILE_TAG:var localeAttr=element.attrs.find(function(attr){return"target-language"===attr.name});localeAttr&&(this._locale=localeAttr.value),visitAll(this,element.children,null);break;default:visitAll(this,element.children,null)}},XliffParser.prototype.visitAttribute=function(attribute,context){},XliffParser.prototype.visitText=function(text,context){},XliffParser.prototype.visitComment=function(comment,context){},XliffParser.prototype.visitExpansion=function(expansion,context){},XliffParser.prototype.visitExpansionCase=function(expansionCase,context){},XliffParser.prototype._addError=function(node,message){this._errors.push(new I18nError(node.sourceSpan,message))},XliffParser}(),XmlToI18n=function(){function XmlToI18n(){}return XmlToI18n.prototype.convert=function(message,url){var xmlIcu=(new XmlParser).parse(message,url,!0);return this._errors=xmlIcu.errors,{i18nNodes:this._errors.length>0||0==xmlIcu.rootNodes.length?[]:visitAll(this,xmlIcu.rootNodes),errors:this._errors}},XmlToI18n.prototype.visitText=function(text,context){return new Text$1(text.value,text.sourceSpan)},XmlToI18n.prototype.visitElement=function(el,context){if(el.name===_PLACEHOLDER_TAG){var nameAttr=el.attrs.find(function(attr){return"id"===attr.name});if(nameAttr)return new Placeholder("",nameAttr.value,el.sourceSpan);this._addError(el,"<"+_PLACEHOLDER_TAG+'> misses the "id" attribute')}else this._addError(el,"Unexpected tag");return null},XmlToI18n.prototype.visitExpansion=function(icu,context){var caseMap={};return visitAll(this,icu.cases).forEach(function(c){caseMap[c.value]=new Container(c.nodes,icu.sourceSpan)}),new Icu(icu.switchValue,icu.type,caseMap,icu.sourceSpan)},XmlToI18n.prototype.visitExpansionCase=function(icuCase,context){return{value:icuCase.value,nodes:visitAll(this,icuCase.expression)}},XmlToI18n.prototype.visitComment=function(comment,context){},XmlToI18n.prototype.visitAttribute=function(attribute,context){},XmlToI18n.prototype._addError=function(node,message){this._errors.push(new I18nError(node.sourceSpan,message))},XmlToI18n}(),_VERSION$1="2.0",_XMLNS$1="urn:oasis:names:tc:xliff:document:2.0",_DEFAULT_SOURCE_LANG$1="en",_PLACEHOLDER_TAG$1="ph",_PLACEHOLDER_SPANNING_TAG="pc",_XLIFF_TAG="xliff",_SOURCE_TAG$1="source",_TARGET_TAG$1="target",_UNIT_TAG$1="unit",Xliff2=function(_super){function Xliff2(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(Xliff2,_super),Xliff2.prototype.write=function(messages,locale){var visitor=new _WriteVisitor$1,units=[];messages.forEach(function(message){var unit=new Tag(_UNIT_TAG$1,{id:message.id}),notes=new Tag("notes");(message.description||message.meaning)&&(message.description&¬es.children.push(new CR(8),new Tag("note",{category:"description"},[new Text$2(message.description)])),message.meaning&¬es.children.push(new CR(8),new Tag("note",{category:"meaning"},[new Text$2(message.meaning)]))),message.sources.forEach(function(source){notes.children.push(new CR(8),new Tag("note",{category:"location"},[new Text$2(source.filePath+":"+source.startLine+(source.endLine!==source.startLine?","+source.endLine:""))]))}),notes.children.push(new CR(6)),unit.children.push(new CR(6),notes);var segment=new Tag("segment");segment.children.push(new CR(8),new Tag(_SOURCE_TAG$1,{},visitor.serialize(message.nodes)),new CR(6)),unit.children.push(new CR(6),segment,new CR(4)),units.push(new CR(4),unit)});var file=new Tag("file",{original:"ng.template",id:"ngi18n"},units.concat([new CR(2)])),xliff=new Tag(_XLIFF_TAG,{version:_VERSION$1,xmlns:_XMLNS$1,srcLang:locale||_DEFAULT_SOURCE_LANG$1},[new CR(2),file,new CR]);return serialize([new Declaration({version:"1.0",encoding:"UTF-8"}),new CR,xliff,new CR])},Xliff2.prototype.load=function(content,url){var xliff2Parser=new Xliff2Parser,_a=xliff2Parser.parse(content,url),locale=_a.locale,msgIdToHtml=_a.msgIdToHtml,errors=_a.errors,i18nNodesByMsgId={},converter=new XmlToI18n$1;if(Object.keys(msgIdToHtml).forEach(function(msgId){var _a=converter.convert(msgIdToHtml[msgId],url),i18nNodes=_a.i18nNodes,e=_a.errors;errors.push.apply(errors,e),i18nNodesByMsgId[msgId]=i18nNodes}),errors.length)throw new Error("xliff2 parse errors:\n"+errors.join("\n"));return{locale:locale,i18nNodesByMsgId:i18nNodesByMsgId}},Xliff2.prototype.digest=function(message){return decimalDigest(message)},Xliff2}(Serializer),_WriteVisitor$1=function(){function _WriteVisitor$1(){}return _WriteVisitor$1.prototype.visitText=function(text,context){return[new Text$2(text.value)]},_WriteVisitor$1.prototype.visitContainer=function(container,context){var _this=this,nodes=[];return container.children.forEach(function(node){return nodes.push.apply(nodes,node.visit(_this))}),nodes},_WriteVisitor$1.prototype.visitIcu=function(icu,context){var _this=this,nodes=[new Text$2("{"+icu.expressionPlaceholder+", "+icu.type+", ")];return Object.keys(icu.cases).forEach(function(c){nodes.push.apply(nodes,[new Text$2(c+" {")].concat(icu.cases[c].visit(_this),[new Text$2("} ")]))}),nodes.push(new Text$2("}")),nodes},_WriteVisitor$1.prototype.visitTagPlaceholder=function(ph,context){var _this=this,type=getTypeForTag(ph.tag);if(ph.isVoid){return[new Tag(_PLACEHOLDER_TAG$1,{id:(this._nextPlaceholderId++).toString(),equiv:ph.startName,type:type,disp:"<"+ph.tag+"/>"})]}var tagPc=new Tag(_PLACEHOLDER_SPANNING_TAG,{id:(this._nextPlaceholderId++).toString(),equivStart:ph.startName,equivEnd:ph.closeName,type:type,dispStart:"<"+ph.tag+">",dispEnd:"</"+ph.tag+">"}),nodes=[].concat.apply([],ph.children.map(function(node){return node.visit(_this)}));return nodes.length?nodes.forEach(function(node){return tagPc.children.push(node)}):tagPc.children.push(new Text$2("")),[tagPc]},_WriteVisitor$1.prototype.visitPlaceholder=function(ph,context){return[new Tag(_PLACEHOLDER_TAG$1,{id:(this._nextPlaceholderId++).toString(),equiv:ph.name,disp:"{{"+ph.value+"}}"})]},_WriteVisitor$1.prototype.visitIcuPlaceholder=function(ph,context){return[new Tag(_PLACEHOLDER_TAG$1,{id:(this._nextPlaceholderId++).toString()})]},_WriteVisitor$1.prototype.serialize=function(nodes){var _this=this;return this._nextPlaceholderId=0,[].concat.apply([],nodes.map(function(node){return node.visit(_this)}))},_WriteVisitor$1}(),Xliff2Parser=function(){function Xliff2Parser(){this._locale=null}return Xliff2Parser.prototype.parse=function(xliff,url){this._unitMlString=null,this._msgIdToHtml={};var xml=(new XmlParser).parse(xliff,url,!1);return this._errors=xml.errors,visitAll(this,xml.rootNodes,null),{msgIdToHtml:this._msgIdToHtml,errors:this._errors,locale:this._locale}},Xliff2Parser.prototype.visitElement=function(element,context){switch(element.name){case _UNIT_TAG$1:this._unitMlString=null;var idAttr=element.attrs.find(function(attr){return"id"===attr.name});if(idAttr){var id=idAttr.value;this._msgIdToHtml.hasOwnProperty(id)?this._addError(element,"Duplicated translations for msg "+id):(visitAll(this,element.children,null),"string"==typeof this._unitMlString?this._msgIdToHtml[id]=this._unitMlString:this._addError(element,"Message "+id+" misses a translation"))}else this._addError(element,"<"+_UNIT_TAG$1+'> misses the "id" attribute');break;case _SOURCE_TAG$1:break;case _TARGET_TAG$1:var innerTextStart=element.startSourceSpan.end.offset,innerTextEnd=element.endSourceSpan.start.offset,content=element.startSourceSpan.start.file.content,innerText=content.slice(innerTextStart,innerTextEnd);this._unitMlString=innerText;break;case _XLIFF_TAG:var localeAttr=element.attrs.find(function(attr){return"trgLang"===attr.name});localeAttr&&(this._locale=localeAttr.value);var versionAttr=element.attrs.find(function(attr){return"version"===attr.name});if(versionAttr){var version=versionAttr.value;"2.0"!==version?this._addError(element,"The XLIFF file version "+version+" is not compatible with XLIFF 2.0 serializer"):visitAll(this,element.children,null)}break;default:visitAll(this,element.children,null)}},Xliff2Parser.prototype.visitAttribute=function(attribute,context){},Xliff2Parser.prototype.visitText=function(text,context){},Xliff2Parser.prototype.visitComment=function(comment,context){},Xliff2Parser.prototype.visitExpansion=function(expansion,context){},Xliff2Parser.prototype.visitExpansionCase=function(expansionCase,context){},Xliff2Parser.prototype._addError=function(node,message){this._errors.push(new I18nError(node.sourceSpan,message))},Xliff2Parser}(),XmlToI18n$1=function(){function XmlToI18n$1(){}return XmlToI18n$1.prototype.convert=function(message,url){var xmlIcu=(new XmlParser).parse(message,url,!0);return this._errors=xmlIcu.errors,{i18nNodes:this._errors.length>0||0==xmlIcu.rootNodes.length?[]:[].concat.apply([],visitAll(this,xmlIcu.rootNodes)),errors:this._errors}},XmlToI18n$1.prototype.visitText=function(text,context){return new Text$1(text.value,text.sourceSpan)},XmlToI18n$1.prototype.visitElement=function(el,context){var _this=this;switch(el.name){case _PLACEHOLDER_TAG$1:var nameAttr=el.attrs.find(function(attr){return"equiv"===attr.name});if(nameAttr)return[new Placeholder("",nameAttr.value,el.sourceSpan)];this._addError(el,"<"+_PLACEHOLDER_TAG$1+'> misses the "equiv" attribute');break;case _PLACEHOLDER_SPANNING_TAG:var startAttr=el.attrs.find(function(attr){return"equivStart"===attr.name}),endAttr=el.attrs.find(function(attr){return"equivEnd"===attr.name});if(startAttr){if(endAttr){var startId=startAttr.value,endId=endAttr.value,nodes=[];return nodes.concat.apply(nodes,[new Placeholder("",startId,el.sourceSpan)].concat(el.children.map(function(node){return node.visit(_this,null)}),[new Placeholder("",endId,el.sourceSpan)]))}this._addError(el,"<"+_PLACEHOLDER_TAG$1+'> misses the "equivEnd" attribute')}else this._addError(el,"<"+_PLACEHOLDER_TAG$1+'> misses the "equivStart" attribute');break;default:this._addError(el,"Unexpected tag")}return null},XmlToI18n$1.prototype.visitExpansion=function(icu,context){var caseMap={};return visitAll(this,icu.cases).forEach(function(c){caseMap[c.value]=new Container(c.nodes,icu.sourceSpan)}),new Icu(icu.switchValue,icu.type,caseMap,icu.sourceSpan)},XmlToI18n$1.prototype.visitExpansionCase=function(icuCase,context){return{value:icuCase.value,nodes:[].concat.apply([],visitAll(this,icuCase.expression))}},XmlToI18n$1.prototype.visitComment=function(comment,context){},XmlToI18n$1.prototype.visitAttribute=function(attribute,context){},XmlToI18n$1.prototype._addError=function(node,message){this._errors.push(new I18nError(node.sourceSpan,message))},XmlToI18n$1}(),_MESSAGES_TAG="messagebundle",_MESSAGE_TAG="msg",_PLACEHOLDER_TAG$2="ph",_EXEMPLE_TAG="ex",_SOURCE_TAG$2="source",_DOCTYPE='<!ELEMENT messagebundle (msg)*>\n<!ATTLIST messagebundle class CDATA #IMPLIED>\n\n<!ELEMENT msg (#PCDATA|ph|source)*>\n<!ATTLIST msg id CDATA #IMPLIED>\n<!ATTLIST msg seq CDATA #IMPLIED>\n<!ATTLIST msg name CDATA #IMPLIED>\n<!ATTLIST msg desc CDATA #IMPLIED>\n<!ATTLIST msg meaning CDATA #IMPLIED>\n<!ATTLIST msg obsolete (obsolete) #IMPLIED>\n<!ATTLIST msg xml:space (default|preserve) "default">\n<!ATTLIST msg is_hidden CDATA #IMPLIED>\n\n<!ELEMENT source (#PCDATA)>\n\n<!ELEMENT ph (#PCDATA|ex)*>\n<!ATTLIST ph name CDATA #REQUIRED>\n\n<!ELEMENT ex (#PCDATA)>',Xmb=function(_super){function Xmb(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(Xmb,_super),Xmb.prototype.write=function(messages,locale){var exampleVisitor=new ExampleVisitor,visitor=new _Visitor$2,rootNode=new Tag(_MESSAGES_TAG);return messages.forEach(function(message){var attrs={id:message.id};message.description&&(attrs.desc=message.description),message.meaning&&(attrs.meaning=message.meaning);var sourceTags=[];message.sources.forEach(function(source){sourceTags.push(new Tag(_SOURCE_TAG$2,{},[new Text$2(source.filePath+":"+source.startLine+(source.endLine!==source.startLine?","+source.endLine:""))]))}),rootNode.children.push(new CR(2),new Tag(_MESSAGE_TAG,attrs,sourceTags.concat(visitor.serialize(message.nodes))))}),rootNode.children.push(new CR),serialize([new Declaration({version:"1.0",encoding:"UTF-8"}),new CR,new Doctype(_MESSAGES_TAG,_DOCTYPE),new CR,exampleVisitor.addDefaultExamples(rootNode),new CR])},Xmb.prototype.load=function(content,url){throw new Error("Unsupported")},Xmb.prototype.digest=function(message){return digest$1(message)},Xmb.prototype.createNameMapper=function(message){return new SimplePlaceholderMapper(message,toPublicName)},Xmb}(Serializer),_Visitor$2=function(){function _Visitor$2(){}return _Visitor$2.prototype.visitText=function(text,context){return[new Text$2(text.value)]},_Visitor$2.prototype.visitContainer=function(container,context){var _this=this,nodes=[];return container.children.forEach(function(node){return nodes.push.apply(nodes,node.visit(_this))}),nodes},_Visitor$2.prototype.visitIcu=function(icu,context){var _this=this,nodes=[new Text$2("{"+icu.expressionPlaceholder+", "+icu.type+", ")];return Object.keys(icu.cases).forEach(function(c){nodes.push.apply(nodes,[new Text$2(c+" {")].concat(icu.cases[c].visit(_this),[new Text$2("} ")]))}),nodes.push(new Text$2("}")),nodes},_Visitor$2.prototype.visitTagPlaceholder=function(ph,context){var startEx=new Tag(_EXEMPLE_TAG,{},[new Text$2("<"+ph.tag+">")]),startTagPh=new Tag(_PLACEHOLDER_TAG$2,{name:ph.startName},[startEx]);if(ph.isVoid)return[startTagPh];var closeEx=new Tag(_EXEMPLE_TAG,{},[new Text$2("</"+ph.tag+">")]),closeTagPh=new Tag(_PLACEHOLDER_TAG$2,{name:ph.closeName},[closeEx]);return[startTagPh].concat(this.serialize(ph.children),[closeTagPh])},_Visitor$2.prototype.visitPlaceholder=function(ph,context){return[new Tag(_PLACEHOLDER_TAG$2,{name:ph.name})]},_Visitor$2.prototype.visitIcuPlaceholder=function(ph,context){return[new Tag(_PLACEHOLDER_TAG$2,{name:ph.name})]},_Visitor$2.prototype.serialize=function(nodes){var _this=this;return[].concat.apply([],nodes.map(function(node){return node.visit(_this)}))},_Visitor$2}(),ExampleVisitor=function(){function ExampleVisitor(){}return ExampleVisitor.prototype.addDefaultExamples=function(node){return node.visit(this),node},ExampleVisitor.prototype.visitTag=function(tag){var _this=this;if(tag.name===_PLACEHOLDER_TAG$2){if(!tag.children||0==tag.children.length){var exText=new Text$2(tag.attrs.name||"...");tag.children=[new Tag(_EXEMPLE_TAG,{},[exText])]}}else tag.children&&tag.children.forEach(function(node){return node.visit(_this)})},ExampleVisitor.prototype.visitText=function(text){},ExampleVisitor.prototype.visitDeclaration=function(decl){},ExampleVisitor.prototype.visitDoctype=function(doctype){},ExampleVisitor}(),_TRANSLATIONS_TAG="translationbundle",_TRANSLATION_TAG="translation",_PLACEHOLDER_TAG$3="ph",Xtb=function(_super){function Xtb(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(Xtb,_super),Xtb.prototype.write=function(messages,locale){throw new Error("Unsupported")},Xtb.prototype.load=function(content,url){var xtbParser=new XtbParser,_a=xtbParser.parse(content,url),locale=_a.locale,msgIdToHtml=_a.msgIdToHtml,errors=_a.errors,i18nNodesByMsgId={},converter=new XmlToI18n$2;if(Object.keys(msgIdToHtml).forEach(function(msgId){createLazyProperty(i18nNodesByMsgId,msgId,function(){var _a=converter.convert(msgIdToHtml[msgId],url),i18nNodes=_a.i18nNodes,errors=_a.errors;if(errors.length)throw new Error("xtb parse errors:\n"+errors.join("\n"));return i18nNodes})}),errors.length)throw new Error("xtb parse errors:\n"+errors.join("\n"));return{locale:locale,i18nNodesByMsgId:i18nNodesByMsgId}},Xtb.prototype.digest=function(message){return digest$1(message)},Xtb.prototype.createNameMapper=function(message){return new SimplePlaceholderMapper(message,toPublicName)},Xtb}(Serializer),XtbParser=function(){function XtbParser(){this._locale=null}return XtbParser.prototype.parse=function(xtb,url){this._bundleDepth=0,this._msgIdToHtml={};var xml=(new XmlParser).parse(xtb,url,!1);return this._errors=xml.errors,visitAll(this,xml.rootNodes),{msgIdToHtml:this._msgIdToHtml,errors:this._errors,locale:this._locale}},XtbParser.prototype.visitElement=function(element,context){switch(element.name){case _TRANSLATIONS_TAG:this._bundleDepth++,this._bundleDepth>1&&this._addError(element,"<"+_TRANSLATIONS_TAG+"> elements can not be nested");var langAttr=element.attrs.find(function(attr){return"lang"===attr.name});langAttr&&(this._locale=langAttr.value),visitAll(this,element.children,null),this._bundleDepth--;break;case _TRANSLATION_TAG:var idAttr=element.attrs.find(function(attr){return"id"===attr.name});if(idAttr){var id=idAttr.value;if(this._msgIdToHtml.hasOwnProperty(id))this._addError(element,"Duplicated translations for msg "+id);else{var innerTextStart=element.startSourceSpan.end.offset,innerTextEnd=element.endSourceSpan.start.offset,content=element.startSourceSpan.start.file.content,innerText=content.slice(innerTextStart,innerTextEnd);this._msgIdToHtml[id]=innerText}}else this._addError(element,"<"+_TRANSLATION_TAG+'> misses the "id" attribute');break;default:this._addError(element,"Unexpected tag")}},XtbParser.prototype.visitAttribute=function(attribute,context){},XtbParser.prototype.visitText=function(text,context){},XtbParser.prototype.visitComment=function(comment,context){},XtbParser.prototype.visitExpansion=function(expansion,context){},XtbParser.prototype.visitExpansionCase=function(expansionCase,context){},XtbParser.prototype._addError=function(node,message){this._errors.push(new I18nError(node.sourceSpan,message))},XtbParser}(),XmlToI18n$2=function(){function XmlToI18n$2(){}return XmlToI18n$2.prototype.convert=function(message,url){var xmlIcu=(new XmlParser).parse(message,url,!0);return this._errors=xmlIcu.errors,{i18nNodes:this._errors.length>0||0==xmlIcu.rootNodes.length?[]:visitAll(this,xmlIcu.rootNodes),errors:this._errors}},XmlToI18n$2.prototype.visitText=function(text,context){return new Text$1(text.value,text.sourceSpan)},XmlToI18n$2.prototype.visitExpansion=function(icu,context){var caseMap={};return visitAll(this,icu.cases).forEach(function(c){caseMap[c.value]=new Container(c.nodes,icu.sourceSpan)}),new Icu(icu.switchValue,icu.type,caseMap,icu.sourceSpan)},XmlToI18n$2.prototype.visitExpansionCase=function(icuCase,context){return{value:icuCase.value,nodes:visitAll(this,icuCase.expression)}},XmlToI18n$2.prototype.visitElement=function(el,context){if(el.name===_PLACEHOLDER_TAG$3){var nameAttr=el.attrs.find(function(attr){return"name"===attr.name});if(nameAttr)return new Placeholder("",nameAttr.value,el.sourceSpan);this._addError(el,"<"+_PLACEHOLDER_TAG$3+'> misses the "name" attribute')}else this._addError(el,"Unexpected tag");return null},XmlToI18n$2.prototype.visitComment=function(comment,context){},XmlToI18n$2.prototype.visitAttribute=function(attribute,context){},XmlToI18n$2.prototype._addError=function(node,message){this._errors.push(new I18nError(node.sourceSpan,message))},XmlToI18n$2}(),HtmlParser=function(_super){function HtmlParser(){return _super.call(this,getHtmlTagDefinition)||this}return __extends(HtmlParser,_super),HtmlParser.prototype.parse=function(source,url,parseExpansionForms,interpolationConfig){return void 0===parseExpansionForms&&(parseExpansionForms=!1),void 0===interpolationConfig&&(interpolationConfig=DEFAULT_INTERPOLATION_CONFIG),_super.prototype.parse.call(this,source,url,parseExpansionForms,interpolationConfig)},HtmlParser}(Parser$1);HtmlParser.decorators=[{type:CompilerInjectable}],HtmlParser.ctorParameters=function(){return[]};var TranslationBundle=function(){function TranslationBundle(_i18nNodesByMsgId,locale,digest,mapperFactory,missingTranslationStrategy,console){void 0===_i18nNodesByMsgId&&(_i18nNodesByMsgId={}),void 0===missingTranslationStrategy&&(missingTranslationStrategy=_angular_core.MissingTranslationStrategy.Warning),this._i18nNodesByMsgId=_i18nNodesByMsgId,this.digest=digest,this.mapperFactory=mapperFactory,this._i18nToHtml=new I18nToHtmlVisitor(_i18nNodesByMsgId,locale,digest,mapperFactory,missingTranslationStrategy,console)}return TranslationBundle.load=function(content,url,serializer,missingTranslationStrategy,console){var _a=serializer.load(content,url),locale=_a.locale;return new TranslationBundle(_a.i18nNodesByMsgId,locale,function(m){return serializer.digest(m)},function(m){return serializer.createNameMapper(m)},missingTranslationStrategy,console)},TranslationBundle.prototype.get=function(srcMsg){var html=this._i18nToHtml.convert(srcMsg);if(html.errors.length)throw new Error(html.errors.join("\n"));return html.nodes},TranslationBundle.prototype.has=function(srcMsg){return this.digest(srcMsg)in this._i18nNodesByMsgId},TranslationBundle}(),I18nToHtmlVisitor=function(){function I18nToHtmlVisitor(_i18nNodesByMsgId,_locale,_digest,_mapperFactory,_missingTranslationStrategy,_console){void 0===_i18nNodesByMsgId&&(_i18nNodesByMsgId={}),this._i18nNodesByMsgId=_i18nNodesByMsgId,this._locale=_locale,this._digest=_digest,this._mapperFactory=_mapperFactory,this._missingTranslationStrategy=_missingTranslationStrategy,this._console=_console,this._contextStack=[],this._errors=[]}return I18nToHtmlVisitor.prototype.convert=function(srcMsg){this._contextStack.length=0,this._errors.length=0;var text=this._convertToText(srcMsg),url=srcMsg.nodes[0].sourceSpan.start.file.url,html=(new HtmlParser).parse(text,url,!0);return{nodes:html.rootNodes,errors:this._errors.concat(html.errors)}},I18nToHtmlVisitor.prototype.visitText=function(text,context){return text.value},I18nToHtmlVisitor.prototype.visitContainer=function(container,context){var _this=this;return container.children.map(function(n){return n.visit(_this)}).join("")},I18nToHtmlVisitor.prototype.visitIcu=function(icu,context){var _this=this,cases=Object.keys(icu.cases).map(function(k){return k+" {"+icu.cases[k].visit(_this)+"}"});return"{"+(this._srcMsg.placeholders.hasOwnProperty(icu.expression)?this._srcMsg.placeholders[icu.expression]:icu.expression)+", "+icu.type+", "+cases.join(" ")+"}"},I18nToHtmlVisitor.prototype.visitPlaceholder=function(ph,context){var phName=this._mapper(ph.name);return this._srcMsg.placeholders.hasOwnProperty(phName)?this._srcMsg.placeholders[phName]:this._srcMsg.placeholderToMessage.hasOwnProperty(phName)?this._convertToText(this._srcMsg.placeholderToMessage[phName]):(this._addError(ph,'Unknown placeholder "'+ph.name+'"'),"")},I18nToHtmlVisitor.prototype.visitTagPlaceholder=function(ph,context){var _this=this,tag=""+ph.tag,attrs=Object.keys(ph.attrs).map(function(name){return name+'="'+ph.attrs[name]+'"'}).join(" ");return ph.isVoid?"<"+tag+" "+attrs+"/>":"<"+tag+" "+attrs+">"+ph.children.map(function(c){return c.visit(_this)}).join("")+"</"+tag+">"},I18nToHtmlVisitor.prototype.visitIcuPlaceholder=function(ph,context){return this._convertToText(this._srcMsg.placeholderToMessage[ph.name])},I18nToHtmlVisitor.prototype._convertToText=function(srcMsg){var nodes,_this=this,id=this._digest(srcMsg),mapper=this._mapperFactory?this._mapperFactory(srcMsg):null;if(this._contextStack.push({msg:this._srcMsg,mapper:this._mapper}),this._srcMsg=srcMsg,this._i18nNodesByMsgId.hasOwnProperty(id))nodes=this._i18nNodesByMsgId[id],this._mapper=function(name){return mapper?mapper.toInternalName(name):name};else{if(this._missingTranslationStrategy===_angular_core.MissingTranslationStrategy.Error){var ctx=this._locale?' for locale "'+this._locale+'"':"";this._addError(srcMsg.nodes[0],'Missing translation for message "'+id+'"'+ctx)}else if(this._console&&this._missingTranslationStrategy===_angular_core.MissingTranslationStrategy.Warning){var ctx=this._locale?' for locale "'+this._locale+'"':"";this._console.warn('Missing translation for message "'+id+'"'+ctx)}nodes=srcMsg.nodes,this._mapper=function(name){return name}}var text=nodes.map(function(node){return node.visit(_this)}).join(""),context=this._contextStack.pop();return this._srcMsg=context.msg,this._mapper=context.mapper,text},I18nToHtmlVisitor.prototype._addError=function(el,msg){this._errors.push(new I18nError(el.sourceSpan,msg))},I18nToHtmlVisitor}(),I18NHtmlParser=function(){function I18NHtmlParser(_htmlParser,translations,translationsFormat,missingTranslation,console){if(void 0===missingTranslation&&(missingTranslation=_angular_core.MissingTranslationStrategy.Warning),this._htmlParser=_htmlParser,translations){var serializer=createSerializer(translationsFormat);this._translationBundle=TranslationBundle.load(translations,"i18n",serializer,missingTranslation,console)}else this._translationBundle=new TranslationBundle({},null,digest,void 0,missingTranslation,console)}return I18NHtmlParser.prototype.parse=function(source,url,parseExpansionForms,interpolationConfig){void 0===parseExpansionForms&&(parseExpansionForms=!1),void 0===interpolationConfig&&(interpolationConfig=DEFAULT_INTERPOLATION_CONFIG);var parseResult=this._htmlParser.parse(source,url,parseExpansionForms,interpolationConfig);return parseResult.errors.length?new ParseTreeResult(parseResult.rootNodes,parseResult.errors):mergeTranslations(parseResult.rootNodes,this._translationBundle,interpolationConfig,[],{})},I18NHtmlParser}(),CORE="@angular/core",Identifiers=function(){function Identifiers(){}return Identifiers}();Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS={name:"ANALYZE_FOR_ENTRY_COMPONENTS",moduleName:CORE,runtime:_angular_core.ANALYZE_FOR_ENTRY_COMPONENTS},Identifiers.ElementRef={name:"ElementRef",moduleName:CORE,runtime:_angular_core.ElementRef},Identifiers.NgModuleRef={name:"NgModuleRef",moduleName:CORE,runtime:_angular_core.NgModuleRef},Identifiers.ViewContainerRef={name:"ViewContainerRef",moduleName:CORE,runtime:_angular_core.ViewContainerRef},Identifiers.ChangeDetectorRef={name:"ChangeDetectorRef",moduleName:CORE,runtime:_angular_core.ChangeDetectorRef},Identifiers.QueryList={name:"QueryList",moduleName:CORE,runtime:_angular_core.QueryList},Identifiers.TemplateRef={name:"TemplateRef",moduleName:CORE,runtime:_angular_core.TemplateRef},Identifiers.CodegenComponentFactoryResolver={name:"ɵCodegenComponentFactoryResolver",moduleName:CORE,runtime:_angular_core.ɵCodegenComponentFactoryResolver},Identifiers.ComponentFactoryResolver={name:"ComponentFactoryResolver",moduleName:CORE,runtime:_angular_core.ComponentFactoryResolver},Identifiers.ComponentFactory={name:"ComponentFactory",moduleName:CORE,runtime:_angular_core.ComponentFactory},Identifiers.ComponentRef={name:"ComponentRef",moduleName:CORE,runtime:_angular_core.ComponentRef},Identifiers.NgModuleFactory={name:"NgModuleFactory",moduleName:CORE,runtime:_angular_core.NgModuleFactory},Identifiers.createModuleFactory={name:"ɵcmf",moduleName:CORE,runtime:_angular_core.ɵcmf},Identifiers.moduleDef={name:"ɵmod",moduleName:CORE,runtime:_angular_core.ɵmod},Identifiers.moduleProviderDef={name:"ɵmpd",moduleName:CORE,runtime:_angular_core.ɵmpd},Identifiers.RegisterModuleFactoryFn={name:"ɵregisterModuleFactory",moduleName:CORE,runtime:_angular_core.ɵregisterModuleFactory},Identifiers.Injector={name:"Injector",moduleName:CORE,runtime:_angular_core.Injector},Identifiers.ViewEncapsulation={name:"ViewEncapsulation",moduleName:CORE,runtime:_angular_core.ViewEncapsulation},Identifiers.ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:CORE,runtime:_angular_core.ChangeDetectionStrategy},Identifiers.SecurityContext={name:"SecurityContext",moduleName:CORE,runtime:_angular_core.SecurityContext},Identifiers.LOCALE_ID={name:"LOCALE_ID",moduleName:CORE,runtime:_angular_core.LOCALE_ID},Identifiers.TRANSLATIONS_FORMAT={name:"TRANSLATIONS_FORMAT",moduleName:CORE,runtime:_angular_core.TRANSLATIONS_FORMAT},Identifiers.inlineInterpolate={name:"ɵinlineInterpolate",moduleName:CORE,runtime:_angular_core.ɵinlineInterpolate},Identifiers.interpolate={name:"ɵinterpolate",moduleName:CORE,runtime:_angular_core.ɵinterpolate},Identifiers.EMPTY_ARRAY={name:"ɵEMPTY_ARRAY",moduleName:CORE,runtime:_angular_core.ɵEMPTY_ARRAY},Identifiers.EMPTY_MAP={name:"ɵEMPTY_MAP",moduleName:CORE,runtime:_angular_core.ɵEMPTY_MAP},Identifiers.Renderer={name:"Renderer",moduleName:CORE,runtime:_angular_core.Renderer},Identifiers.viewDef={name:"ɵvid",moduleName:CORE,runtime:_angular_core.ɵvid},Identifiers.elementDef={name:"ɵeld",moduleName:CORE,runtime:_angular_core.ɵeld},Identifiers.anchorDef={name:"ɵand",moduleName:CORE,runtime:_angular_core.ɵand},Identifiers.textDef={name:"ɵted",moduleName:CORE,runtime:_angular_core.ɵted},Identifiers.directiveDef={name:"ɵdid",moduleName:CORE,runtime:_angular_core.ɵdid},Identifiers.providerDef={name:"ɵprd",moduleName:CORE,runtime:_angular_core.ɵprd},Identifiers.queryDef={name:"ɵqud",moduleName:CORE,runtime:_angular_core.ɵqud},Identifiers.pureArrayDef={name:"ɵpad",moduleName:CORE,runtime:_angular_core.ɵpad},Identifiers.pureObjectDef={name:"ɵpod",moduleName:CORE,runtime:_angular_core.ɵpod},Identifiers.purePipeDef={name:"ɵppd",moduleName:CORE,runtime:_angular_core.ɵppd},Identifiers.pipeDef={name:"ɵpid",moduleName:CORE,runtime:_angular_core.ɵpid},Identifiers.nodeValue={name:"ɵnov",moduleName:CORE,runtime:_angular_core.ɵnov},Identifiers.ngContentDef={name:"ɵncd",moduleName:CORE,runtime:_angular_core.ɵncd},Identifiers.unwrapValue={name:"ɵunv",moduleName:CORE,runtime:_angular_core.ɵunv},Identifiers.createRendererType2={name:"ɵcrt",moduleName:CORE,runtime:_angular_core.ɵcrt},Identifiers.RendererType2={name:"RendererType2",moduleName:CORE,runtime:null},Identifiers.ViewDefinition={name:"ɵViewDefinition",moduleName:CORE,runtime:null},Identifiers.createComponentFactory={name:"ɵccf",moduleName:CORE,runtime:_angular_core.ɵccf};var PLURAL_CASES=["zero","one","two","few","many","other"],ExpansionResult=function(){function ExpansionResult(nodes,expanded,errors){this.nodes=nodes,this.expanded=expanded,this.errors=errors}return ExpansionResult}(),ExpansionError=function(_super){function ExpansionError(span,errorMsg){return _super.call(this,span,errorMsg)||this}return __extends(ExpansionError,_super),ExpansionError}(ParseError),_Expander=function(){function _Expander(){this.isExpanded=!1,this.errors=[]}return _Expander.prototype.visitElement=function(element,context){return new Element(element.name,element.attrs,visitAll(this,element.children),element.sourceSpan,element.startSourceSpan,element.endSourceSpan)},_Expander.prototype.visitAttribute=function(attribute,context){return attribute},_Expander.prototype.visitText=function(text,context){return text},_Expander.prototype.visitComment=function(comment,context){return comment},_Expander.prototype.visitExpansion=function(icu,context){return this.isExpanded=!0,"plural"==icu.type?_expandPluralForm(icu,this.errors):_expandDefaultForm(icu,this.errors)},_Expander.prototype.visitExpansionCase=function(icuCase,context){throw new Error("Should not be reached")},_Expander}(),ProviderError=function(_super){function ProviderError(message,span){return _super.call(this,span,message)||this}return __extends(ProviderError,_super),ProviderError}(ParseError),ProviderViewContext=function(){function ProviderViewContext(reflector,component){var _this=this;this.reflector=reflector,this.component=component,this.errors=[],this.viewQueries=_getViewQueries(component),this.viewProviders=new Map,component.viewProviders.forEach(function(provider){null==_this.viewProviders.get(tokenReference(provider.token))&&_this.viewProviders.set(tokenReference(provider.token),!0)})}return ProviderViewContext}(),ProviderElementContext=function(){function ProviderElementContext(viewContext,_parent,_isViewRoot,_directiveAsts,attrs,refs,isTemplate,contentQueryStartId,_sourceSpan){var _this=this;this.viewContext=viewContext,this._parent=_parent,this._isViewRoot=_isViewRoot,this._directiveAsts=_directiveAsts,this._sourceSpan=_sourceSpan,this._transformedProviders=new Map,this._seenProviders=new Map,this._hasViewContainer=!1,this._queriedTokens=new Map,this._attrs={},attrs.forEach(function(attrAst){return _this._attrs[attrAst.name]=attrAst.value});var directivesMeta=_directiveAsts.map(function(directiveAst){return directiveAst.directive});if(this._allProviders=_resolveProvidersFromDirectives(directivesMeta,_sourceSpan,viewContext.errors),this._contentQueries=_getContentQueries(contentQueryStartId,directivesMeta),Array.from(this._allProviders.values()).forEach(function(provider){_this._addQueryReadsTo(provider.token,provider.token,_this._queriedTokens)}),isTemplate){var templateRefId=createTokenForExternalReference(this.viewContext.reflector,Identifiers.TemplateRef);this._addQueryReadsTo(templateRefId,templateRefId,this._queriedTokens)}refs.forEach(function(refAst){var defaultQueryValue=refAst.value||createTokenForExternalReference(_this.viewContext.reflector,Identifiers.ElementRef);_this._addQueryReadsTo({value:refAst.name},defaultQueryValue,_this._queriedTokens)}),this._queriedTokens.get(this.viewContext.reflector.resolveExternalReference(Identifiers.ViewContainerRef))&&(this._hasViewContainer=!0),Array.from(this._allProviders.values()).forEach(function(provider){(provider.eager||_this._queriedTokens.get(tokenReference(provider.token)))&&_this._getOrCreateLocalProvider(provider.providerType,provider.token,!0)})}return ProviderElementContext.prototype.afterElement=function(){var _this=this;Array.from(this._allProviders.values()).forEach(function(provider){_this._getOrCreateLocalProvider(provider.providerType,provider.token,!1)})},Object.defineProperty(ProviderElementContext.prototype,"transformProviders",{get:function(){var lazyProviders=[],eagerProviders=[];return this._transformedProviders.forEach(function(provider){provider.eager?eagerProviders.push(provider):lazyProviders.push(provider)}),lazyProviders.concat(eagerProviders)},enumerable:!0,configurable:!0}),Object.defineProperty(ProviderElementContext.prototype,"transformedDirectiveAsts",{get:function(){var sortedProviderTypes=this.transformProviders.map(function(provider){return provider.token.identifier}),sortedDirectives=this._directiveAsts.slice();return sortedDirectives.sort(function(dir1,dir2){return sortedProviderTypes.indexOf(dir1.directive.type)-sortedProviderTypes.indexOf(dir2.directive.type)}),sortedDirectives},enumerable:!0,configurable:!0}),Object.defineProperty(ProviderElementContext.prototype,"transformedHasViewContainer",{get:function(){return this._hasViewContainer},enumerable:!0,configurable:!0}),Object.defineProperty(ProviderElementContext.prototype,"queryMatches",{get:function(){var allMatches=[];return this._queriedTokens.forEach(function(matches){allMatches.push.apply(allMatches,matches)}),allMatches},enumerable:!0,configurable:!0}),ProviderElementContext.prototype._addQueryReadsTo=function(token,defaultValue,queryReadTokens){this._getQueriesFor(token).forEach(function(query){var queryValue=query.meta.read||defaultValue,tokenRef=tokenReference(queryValue),queryMatches=queryReadTokens.get(tokenRef);queryMatches||(queryMatches=[],queryReadTokens.set(tokenRef,queryMatches)),queryMatches.push({queryId:query.queryId,value:queryValue})})},ProviderElementContext.prototype._getQueriesFor=function(token){for(var queries,result=[],currentEl=this,distance=0;null!==currentEl;)queries=currentEl._contentQueries.get(tokenReference(token)),queries&&result.push.apply(result,queries.filter(function(query){return query.meta.descendants||distance<=1})),currentEl._directiveAsts.length>0&&distance++,currentEl=currentEl._parent;return queries=this.viewContext.viewQueries.get(tokenReference(token)),queries&&result.push.apply(result,queries),result},ProviderElementContext.prototype._getOrCreateLocalProvider=function(requestingProviderType,token,eager){var _this=this,resolvedProvider=this._allProviders.get(tokenReference(token));if(!resolvedProvider||(requestingProviderType===ProviderAstType.Directive||requestingProviderType===ProviderAstType.PublicService)&&resolvedProvider.providerType===ProviderAstType.PrivateService||(requestingProviderType===ProviderAstType.PrivateService||requestingProviderType===ProviderAstType.PublicService)&&resolvedProvider.providerType===ProviderAstType.Builtin)return null;var transformedProviderAst=this._transformedProviders.get(tokenReference(token));if(transformedProviderAst)return transformedProviderAst;if(null!=this._seenProviders.get(tokenReference(token)))return this.viewContext.errors.push(new ProviderError("Cannot instantiate cyclic dependency! "+tokenName(token),this._sourceSpan)),null;this._seenProviders.set(tokenReference(token),!0);var transformedProviders=resolvedProvider.providers.map(function(provider){var transformedUseValue=provider.useValue,transformedUseExisting=provider.useExisting,transformedDeps=void 0;if(null!=provider.useExisting){var existingDiDep=_this._getDependency(resolvedProvider.providerType,{token:provider.useExisting},eager);null!=existingDiDep.token?transformedUseExisting=existingDiDep.token:(transformedUseExisting=null,transformedUseValue=existingDiDep.value)}else if(provider.useFactory){var deps=provider.deps||provider.useFactory.diDeps;transformedDeps=deps.map(function(dep){return _this._getDependency(resolvedProvider.providerType,dep,eager)})}else if(provider.useClass){var deps=provider.deps||provider.useClass.diDeps;transformedDeps=deps.map(function(dep){return _this._getDependency(resolvedProvider.providerType,dep,eager)})}return _transformProvider(provider,{useExisting:transformedUseExisting,useValue:transformedUseValue,deps:transformedDeps})});return transformedProviderAst=_transformProviderAst(resolvedProvider,{eager:eager,providers:transformedProviders}),this._transformedProviders.set(tokenReference(token),transformedProviderAst),transformedProviderAst},ProviderElementContext.prototype._getLocalDependency=function(requestingProviderType,dep,eager){if(void 0===eager&&(eager=!1),dep.isAttribute){var attrValue=this._attrs[dep.token.value];return{isValue:!0,value:null==attrValue?null:attrValue}}if(null!=dep.token){if(requestingProviderType===ProviderAstType.Directive||requestingProviderType===ProviderAstType.Component){if(tokenReference(dep.token)===this.viewContext.reflector.resolveExternalReference(Identifiers.Renderer)||tokenReference(dep.token)===this.viewContext.reflector.resolveExternalReference(Identifiers.ElementRef)||tokenReference(dep.token)===this.viewContext.reflector.resolveExternalReference(Identifiers.ChangeDetectorRef)||tokenReference(dep.token)===this.viewContext.reflector.resolveExternalReference(Identifiers.TemplateRef))return dep;tokenReference(dep.token)===this.viewContext.reflector.resolveExternalReference(Identifiers.ViewContainerRef)&&(this._hasViewContainer=!0)}if(tokenReference(dep.token)===this.viewContext.reflector.resolveExternalReference(Identifiers.Injector))return dep;if(null!=this._getOrCreateLocalProvider(requestingProviderType,dep.token,eager))return dep}return null},ProviderElementContext.prototype._getDependency=function(requestingProviderType,dep,eager){void 0===eager&&(eager=!1);var currElement=this,currEager=eager,result=null;if(dep.isSkipSelf||(result=this._getLocalDependency(requestingProviderType,dep,eager)),dep.isSelf)!result&&dep.isOptional&&(result={isValue:!0,value:null});else{for(;!result&&currElement._parent;){var prevElement=currElement;currElement=currElement._parent,prevElement._isViewRoot&&(currEager=!1),result=currElement._getLocalDependency(ProviderAstType.PublicService,dep,currEager)}result||(result=!dep.isHost||this.viewContext.component.isHost||this.viewContext.component.type.reference===tokenReference(dep.token)||null!=this.viewContext.viewProviders.get(tokenReference(dep.token))?dep:dep.isOptional?result={isValue:!0,value:null}:null)}return result||this.viewContext.errors.push(new ProviderError("No provider for "+tokenName(dep.token),this._sourceSpan)),result},ProviderElementContext}(),NgModuleProviderAnalyzer=function(){function NgModuleProviderAnalyzer(reflector,ngModule,extraProviders,sourceSpan){var _this=this;this.reflector=reflector,this._transformedProviders=new Map,this._seenProviders=new Map,this._errors=[],this._allProviders=new Map,ngModule.transitiveModule.modules.forEach(function(ngModuleType){_resolveProviders([{token:{identifier:ngModuleType},useClass:ngModuleType}],ProviderAstType.PublicService,!0,sourceSpan,_this._errors,_this._allProviders)}),_resolveProviders(ngModule.transitiveModule.providers.map(function(entry){return entry.provider}).concat(extraProviders),ProviderAstType.PublicService,!1,sourceSpan,this._errors,this._allProviders)}return NgModuleProviderAnalyzer.prototype.parse=function(){var _this=this;if(Array.from(this._allProviders.values()).forEach(function(provider){_this._getOrCreateLocalProvider(provider.token,provider.eager)}),this._errors.length>0){var errorString=this._errors.join("\n");throw new Error("Provider parse errors:\n"+errorString)}var lazyProviders=[],eagerProviders=[];return this._transformedProviders.forEach(function(provider){provider.eager?eagerProviders.push(provider):lazyProviders.push(provider)}),lazyProviders.concat(eagerProviders)},NgModuleProviderAnalyzer.prototype._getOrCreateLocalProvider=function(token,eager){var _this=this,resolvedProvider=this._allProviders.get(tokenReference(token));if(!resolvedProvider)return null;var transformedProviderAst=this._transformedProviders.get(tokenReference(token));if(transformedProviderAst)return transformedProviderAst;if(null!=this._seenProviders.get(tokenReference(token)))return this._errors.push(new ProviderError("Cannot instantiate cyclic dependency! "+tokenName(token),resolvedProvider.sourceSpan)),null;this._seenProviders.set(tokenReference(token),!0);var transformedProviders=resolvedProvider.providers.map(function(provider){var transformedUseValue=provider.useValue,transformedUseExisting=provider.useExisting,transformedDeps=void 0;if(null!=provider.useExisting){var existingDiDep=_this._getDependency({token:provider.useExisting},eager,resolvedProvider.sourceSpan);null!=existingDiDep.token?transformedUseExisting=existingDiDep.token:(transformedUseExisting=null,transformedUseValue=existingDiDep.value)}else if(provider.useFactory){var deps=provider.deps||provider.useFactory.diDeps;transformedDeps=deps.map(function(dep){return _this._getDependency(dep,eager,resolvedProvider.sourceSpan)})}else if(provider.useClass){var deps=provider.deps||provider.useClass.diDeps;transformedDeps=deps.map(function(dep){return _this._getDependency(dep,eager,resolvedProvider.sourceSpan)})}return _transformProvider(provider,{useExisting:transformedUseExisting,useValue:transformedUseValue,deps:transformedDeps})});return transformedProviderAst=_transformProviderAst(resolvedProvider,{eager:eager,providers:transformedProviders}),this._transformedProviders.set(tokenReference(token),transformedProviderAst),transformedProviderAst},NgModuleProviderAnalyzer.prototype._getDependency=function(dep,eager,requestorSourceSpan){void 0===eager&&(eager=!1);var foundLocal=!1;dep.isSkipSelf||null==dep.token||(tokenReference(dep.token)===this.reflector.resolveExternalReference(Identifiers.Injector)||tokenReference(dep.token)===this.reflector.resolveExternalReference(Identifiers.ComponentFactoryResolver)?foundLocal=!0:null!=this._getOrCreateLocalProvider(dep.token,eager)&&(foundLocal=!0));var result=dep;return dep.isSelf&&!foundLocal&&(dep.isOptional?result={isValue:!0,value:null}:this._errors.push(new ProviderError("No provider for "+tokenName(dep.token),requestorSourceSpan))),result},NgModuleProviderAnalyzer}(),ElementSchemaRegistry=function(){function ElementSchemaRegistry(){}return ElementSchemaRegistry.prototype.hasProperty=function(tagName,propName,schemaMetas){},ElementSchemaRegistry.prototype.hasElement=function(tagName,schemaMetas){},ElementSchemaRegistry.prototype.securityContext=function(elementName,propName,isAttribute){},ElementSchemaRegistry.prototype.allKnownElementNames=function(){},ElementSchemaRegistry.prototype.getMappedPropName=function(propName){},ElementSchemaRegistry.prototype.getDefaultComponentElementName=function(){},ElementSchemaRegistry.prototype.validateProperty=function(name){},ElementSchemaRegistry.prototype.validateAttribute=function(name){},ElementSchemaRegistry.prototype.normalizeAnimationStyleProperty=function(propName){},ElementSchemaRegistry.prototype.normalizeAnimationStyleValue=function(camelCaseProp,userProvidedProp,val){},ElementSchemaRegistry}(),StyleWithImports=function(){function StyleWithImports(style$$1,styleUrls){this.style=style$$1,this.styleUrls=styleUrls}return StyleWithImports}(),CSS_IMPORT_REGEXP=/@import\s+(?:url\()?\s*(?:(?:['"]([^'"]*))|([^;\)\s]*))[^;]*;?/g,CSS_COMMENT_REGEXP=/\/\*.+?\*\//g,URL_WITH_SCHEMA_REGEXP=/^([^:/?#]+):/,PROPERTY_PARTS_SEPARATOR=".",ATTRIBUTE_PREFIX="attr",CLASS_PREFIX="class",STYLE_PREFIX="style",ANIMATE_PROP_PREFIX="animate-",BoundPropertyType={};BoundPropertyType.DEFAULT=0,BoundPropertyType.LITERAL_ATTR=1,BoundPropertyType.ANIMATION=2,BoundPropertyType[BoundPropertyType.DEFAULT]="DEFAULT",BoundPropertyType[BoundPropertyType.LITERAL_ATTR]="LITERAL_ATTR",BoundPropertyType[BoundPropertyType.ANIMATION]="ANIMATION";var BoundProperty=function(){function BoundProperty(name,expression,type,sourceSpan){this.name=name,this.expression=expression,this.type=type,this.sourceSpan=sourceSpan}return Object.defineProperty(BoundProperty.prototype,"isLiteral",{get:function(){return this.type===BoundPropertyType.LITERAL_ATTR},enumerable:!0,configurable:!0}),Object.defineProperty(BoundProperty.prototype,"isAnimation",{get:function(){return this.type===BoundPropertyType.ANIMATION},enumerable:!0,configurable:!0}),BoundProperty}(),BindingParser=function(){function BindingParser(_exprParser,_interpolationConfig,_schemaRegistry,pipes,_targetErrors){var _this=this;this._exprParser=_exprParser,this._interpolationConfig=_interpolationConfig,this._schemaRegistry=_schemaRegistry,this._targetErrors=_targetErrors,this.pipesByName=new Map,this._usedPipes=new Map,pipes.forEach(function(pipe){return _this.pipesByName.set(pipe.name,pipe)})}return BindingParser.prototype.getUsedPipes=function(){return Array.from(this._usedPipes.values())},BindingParser.prototype.createDirectiveHostPropertyAsts=function(dirMeta,elementSelector,sourceSpan){var _this=this;if(dirMeta.hostProperties){var boundProps_1=[];return Object.keys(dirMeta.hostProperties).forEach(function(propName){var expression=dirMeta.hostProperties[propName];"string"==typeof expression?_this.parsePropertyBinding(propName,expression,!0,sourceSpan,[],boundProps_1):_this._reportError('Value of the host property binding "'+propName+'" needs to be a string representing an expression but got "'+expression+'" ('+typeof expression+")",sourceSpan)}),boundProps_1.map(function(prop){return _this.createElementPropertyAst(elementSelector,prop)})}return null},BindingParser.prototype.createDirectiveHostEventAsts=function(dirMeta,sourceSpan){var _this=this;if(dirMeta.hostListeners){var targetEventAsts_1=[];return Object.keys(dirMeta.hostListeners).forEach(function(propName){var expression=dirMeta.hostListeners[propName];"string"==typeof expression?_this.parseEvent(propName,expression,sourceSpan,[],targetEventAsts_1):_this._reportError('Value of the host listener "'+propName+'" needs to be a string representing an expression but got "'+expression+'" ('+typeof expression+")",sourceSpan)}),targetEventAsts_1}return null},BindingParser.prototype.parseInterpolation=function(value,sourceSpan){var sourceInfo=sourceSpan.start.toString();try{var ast=this._exprParser.parseInterpolation(value,sourceInfo,this._interpolationConfig);return ast&&this._reportExpressionParserErrors(ast.errors,sourceSpan),this._checkPipes(ast,sourceSpan),ast}catch(e){return this._reportError(""+e,sourceSpan),this._exprParser.wrapLiteralPrimitive("ERROR",sourceInfo)}},BindingParser.prototype.parseInlineTemplateBinding=function(prefixToken,value,sourceSpan,targetMatchableAttrs,targetProps,targetVars){for(var bindings=this._parseTemplateBindings(prefixToken,value,sourceSpan),i=0;i<bindings.length;i++){var binding=bindings[i];binding.keyIsVar?targetVars.push(new VariableAst(binding.key,binding.name,sourceSpan)):binding.expression?this._parsePropertyAst(binding.key,binding.expression,sourceSpan,targetMatchableAttrs,targetProps):(targetMatchableAttrs.push([binding.key,""]),this.parseLiteralAttr(binding.key,null,sourceSpan,targetMatchableAttrs,targetProps))}},BindingParser.prototype._parseTemplateBindings=function(prefixToken,value,sourceSpan){var _this=this,sourceInfo=sourceSpan.start.toString();try{var bindingsResult=this._exprParser.parseTemplateBindings(prefixToken,value,sourceInfo);return this._reportExpressionParserErrors(bindingsResult.errors,sourceSpan),bindingsResult.templateBindings.forEach(function(binding){binding.expression&&_this._checkPipes(binding.expression,sourceSpan)}),bindingsResult.warnings.forEach(function(warning){_this._reportError(warning,sourceSpan,ParseErrorLevel.WARNING)}),bindingsResult.templateBindings}catch(e){return this._reportError(""+e,sourceSpan),[]}},BindingParser.prototype.parseLiteralAttr=function(name,value,sourceSpan,targetMatchableAttrs,targetProps){_isAnimationLabel(name)?(name=name.substring(1),value&&this._reportError('Assigning animation triggers via @prop="exp" attributes with an expression is invalid. Use property bindings (e.g. [@prop]="exp") or use an attribute without a value (e.g. @prop) instead.',sourceSpan,ParseErrorLevel.ERROR),this._parseAnimation(name,value,sourceSpan,targetMatchableAttrs,targetProps)):targetProps.push(new BoundProperty(name,this._exprParser.wrapLiteralPrimitive(value,""),BoundPropertyType.LITERAL_ATTR,sourceSpan))},BindingParser.prototype.parsePropertyBinding=function(name,expression,isHost,sourceSpan,targetMatchableAttrs,targetProps){var isAnimationProp=!1;name.startsWith(ANIMATE_PROP_PREFIX)?(isAnimationProp=!0,name=name.substring(ANIMATE_PROP_PREFIX.length)):_isAnimationLabel(name)&&(isAnimationProp=!0,name=name.substring(1)),isAnimationProp?this._parseAnimation(name,expression,sourceSpan,targetMatchableAttrs,targetProps):this._parsePropertyAst(name,this._parseBinding(expression,isHost,sourceSpan),sourceSpan,targetMatchableAttrs,targetProps)},BindingParser.prototype.parsePropertyInterpolation=function(name,value,sourceSpan,targetMatchableAttrs,targetProps){var expr=this.parseInterpolation(value,sourceSpan);return!!expr&&(this._parsePropertyAst(name,expr,sourceSpan,targetMatchableAttrs,targetProps),!0)},BindingParser.prototype._parsePropertyAst=function(name,ast,sourceSpan,targetMatchableAttrs,targetProps){targetMatchableAttrs.push([name,ast.source]),targetProps.push(new BoundProperty(name,ast,BoundPropertyType.DEFAULT,sourceSpan))},BindingParser.prototype._parseAnimation=function(name,expression,sourceSpan,targetMatchableAttrs,targetProps){var ast=this._parseBinding(expression||"null",!1,sourceSpan);targetMatchableAttrs.push([name,ast.source]),targetProps.push(new BoundProperty(name,ast,BoundPropertyType.ANIMATION,sourceSpan))},BindingParser.prototype._parseBinding=function(value,isHostBinding,sourceSpan){var sourceInfo=sourceSpan.start.toString();try{var ast=isHostBinding?this._exprParser.parseSimpleBinding(value,sourceInfo,this._interpolationConfig):this._exprParser.parseBinding(value,sourceInfo,this._interpolationConfig);return ast&&this._reportExpressionParserErrors(ast.errors,sourceSpan),this._checkPipes(ast,sourceSpan),ast}catch(e){return this._reportError(""+e,sourceSpan),this._exprParser.wrapLiteralPrimitive("ERROR",sourceInfo)}},BindingParser.prototype.createElementPropertyAst=function(elementSelector,boundProp){if(boundProp.isAnimation)return new BoundElementPropertyAst(boundProp.name,PropertyBindingType.Animation,_angular_core.SecurityContext.NONE,boundProp.expression,null,boundProp.sourceSpan);var unit=null,bindingType=void 0,boundPropertyName=null,parts=boundProp.name.split(PROPERTY_PARTS_SEPARATOR),securityContexts=void 0;if(parts.length>1)if(parts[0]==ATTRIBUTE_PREFIX){boundPropertyName=parts[1],this._validatePropertyOrAttributeName(boundPropertyName,boundProp.sourceSpan,!0),securityContexts=calcPossibleSecurityContexts(this._schemaRegistry,elementSelector,boundPropertyName,!0);var nsSeparatorIdx=boundPropertyName.indexOf(":");if(nsSeparatorIdx>-1){var ns=boundPropertyName.substring(0,nsSeparatorIdx),name=boundPropertyName.substring(nsSeparatorIdx+1);boundPropertyName=mergeNsAndName(ns,name)}bindingType=PropertyBindingType.Attribute}else parts[0]==CLASS_PREFIX?(boundPropertyName=parts[1],bindingType=PropertyBindingType.Class,securityContexts=[_angular_core.SecurityContext.NONE]):parts[0]==STYLE_PREFIX&&(unit=parts.length>2?parts[2]:null,boundPropertyName=parts[1],bindingType=PropertyBindingType.Style,securityContexts=[_angular_core.SecurityContext.STYLE]);return null===boundPropertyName&&(boundPropertyName=this._schemaRegistry.getMappedPropName(boundProp.name),securityContexts=calcPossibleSecurityContexts(this._schemaRegistry,elementSelector,boundPropertyName,!1),bindingType=PropertyBindingType.Property,this._validatePropertyOrAttributeName(boundPropertyName,boundProp.sourceSpan,!1)),new BoundElementPropertyAst(boundPropertyName,bindingType,securityContexts[0],boundProp.expression,unit,boundProp.sourceSpan)},BindingParser.prototype.parseEvent=function(name,expression,sourceSpan,targetMatchableAttrs,targetEvents){_isAnimationLabel(name)?(name=name.substr(1),this._parseAnimationEvent(name,expression,sourceSpan,targetEvents)):this._parseEvent(name,expression,sourceSpan,targetMatchableAttrs,targetEvents)},BindingParser.prototype._parseAnimationEvent=function(name,expression,sourceSpan,targetEvents){var matches=splitAtPeriod(name,[name,""]),eventName=matches[0],phase=matches[1].toLowerCase();if(phase)switch(phase){case"start":case"done":var ast=this._parseAction(expression,sourceSpan);targetEvents.push(new BoundEventAst(eventName,null,phase,ast,sourceSpan));break;default:this._reportError('The provided animation output phase value "'+phase+'" for "@'+eventName+'" is not supported (use start or done)',sourceSpan)}else this._reportError("The animation trigger output event (@"+eventName+") is missing its phase value name (start or done are currently supported)",sourceSpan)},BindingParser.prototype._parseEvent=function(name,expression,sourceSpan,targetMatchableAttrs,targetEvents){var _a=splitAtColon(name,[null,name]),target=_a[0],eventName=_a[1],ast=this._parseAction(expression,sourceSpan);targetMatchableAttrs.push([name,ast.source]),targetEvents.push(new BoundEventAst(eventName,target,null,ast,sourceSpan))},BindingParser.prototype._parseAction=function(value,sourceSpan){var sourceInfo=sourceSpan.start.toString();try{var ast=this._exprParser.parseAction(value,sourceInfo,this._interpolationConfig);return ast&&this._reportExpressionParserErrors(ast.errors,sourceSpan),!ast||ast.ast instanceof EmptyExpr?(this._reportError("Empty expressions are not allowed",sourceSpan),this._exprParser.wrapLiteralPrimitive("ERROR",sourceInfo)):(this._checkPipes(ast,sourceSpan),ast)}catch(e){return this._reportError(""+e,sourceSpan),this._exprParser.wrapLiteralPrimitive("ERROR",sourceInfo)}},BindingParser.prototype._reportError=function(message,sourceSpan,level){void 0===level&&(level=ParseErrorLevel.ERROR),this._targetErrors.push(new ParseError(sourceSpan,message,level))},BindingParser.prototype._reportExpressionParserErrors=function(errors,sourceSpan){for(var _i=0,errors_1=errors;_i<errors_1.length;_i++){var error=errors_1[_i];this._reportError(error.message,sourceSpan)}},BindingParser.prototype._checkPipes=function(ast,sourceSpan){var _this=this;if(ast){var collector=new PipeCollector;ast.visit(collector),collector.pipes.forEach(function(ast,pipeName){var pipeMeta=_this.pipesByName.get(pipeName);pipeMeta?_this._usedPipes.set(pipeName,pipeMeta):_this._reportError("The pipe '"+pipeName+"' could not be found",new ParseSourceSpan(sourceSpan.start.moveBy(ast.span.start),sourceSpan.start.moveBy(ast.span.end)))})}},BindingParser.prototype._validatePropertyOrAttributeName=function(propName,sourceSpan,isAttr){var report=isAttr?this._schemaRegistry.validateAttribute(propName):this._schemaRegistry.validateProperty(propName);report.error&&this._reportError(report.msg,sourceSpan,ParseErrorLevel.ERROR)},BindingParser}(),PipeCollector=function(_super){function PipeCollector(){var _this=_super.apply(this,arguments)||this;return _this.pipes=new Map,_this}return __extends(PipeCollector,_super),PipeCollector.prototype.visitPipe=function(ast,context){return this.pipes.set(ast.name,ast),ast.exp.visit(this),this.visitAll(ast.args,context),null},PipeCollector}(RecursiveAstVisitor),NG_CONTENT_SELECT_ATTR="select",LINK_ELEMENT="link",LINK_STYLE_REL_ATTR="rel",LINK_STYLE_HREF_ATTR="href",LINK_STYLE_REL_VALUE="stylesheet",STYLE_ELEMENT="style",SCRIPT_ELEMENT="script",NG_NON_BINDABLE_ATTR="ngNonBindable",NG_PROJECT_AS="ngProjectAs",PreparsedElementType={};PreparsedElementType.NG_CONTENT=0,PreparsedElementType.STYLE=1,PreparsedElementType.STYLESHEET=2,PreparsedElementType.SCRIPT=3,PreparsedElementType.OTHER=4,PreparsedElementType[PreparsedElementType.NG_CONTENT]="NG_CONTENT",PreparsedElementType[PreparsedElementType.STYLE]="STYLE",PreparsedElementType[PreparsedElementType.STYLESHEET]="STYLESHEET",PreparsedElementType[PreparsedElementType.SCRIPT]="SCRIPT",PreparsedElementType[PreparsedElementType.OTHER]="OTHER";var PreparsedElement=function(){function PreparsedElement(type,selectAttr,hrefAttr,nonBindable,projectAs){this.type=type,this.selectAttr=selectAttr,this.hrefAttr=hrefAttr,this.nonBindable=nonBindable,this.projectAs=projectAs}return PreparsedElement}(),BIND_NAME_REGEXP=/^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.+))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/,KW_BIND_IDX=1,KW_LET_IDX=2,KW_REF_IDX=3,KW_ON_IDX=4,KW_BINDON_IDX=5,KW_AT_IDX=6,IDENT_KW_IDX=7,IDENT_BANANA_BOX_IDX=8,IDENT_PROPERTY_IDX=9,IDENT_EVENT_IDX=10,TEMPLATE_ELEMENT="template",TEMPLATE_ATTR="template",TEMPLATE_ATTR_PREFIX="*",CLASS_ATTR="class",TEXT_CSS_SELECTOR=CssSelector.parse("*")[0],TEMPLATE_ELEMENT_DEPRECATION_WARNING="The <template> element is deprecated. Use <ng-template> instead",TEMPLATE_ATTR_DEPRECATION_WARNING="The template attribute is deprecated. Use an ng-template element instead.",warningCounts={},TEMPLATE_TRANSFORMS=new _angular_core.InjectionToken("TemplateTransforms"),TemplateParseError=function(_super){function TemplateParseError(message,span,level){return _super.call(this,span,message,level)||this}return __extends(TemplateParseError,_super),TemplateParseError}(ParseError),TemplateParseResult=function(){function TemplateParseResult(templateAst,usedPipes,errors){this.templateAst=templateAst,this.usedPipes=usedPipes,this.errors=errors}return TemplateParseResult}(),TemplateParser=function(){function TemplateParser(_config,_reflector,_exprParser,_schemaRegistry,_htmlParser,_console,transforms){this._config=_config,this._reflector=_reflector,this._exprParser=_exprParser,this._schemaRegistry=_schemaRegistry,this._htmlParser=_htmlParser,this._console=_console,this.transforms=transforms}return TemplateParser.prototype.parse=function(component,template,directives,pipes,schemas,templateUrl){var result=this.tryParse(component,template,directives,pipes,schemas,templateUrl),warnings=result.errors.filter(function(error){return error.level===ParseErrorLevel.WARNING}).filter(warnOnlyOnce([TEMPLATE_ATTR_DEPRECATION_WARNING,TEMPLATE_ELEMENT_DEPRECATION_WARNING])),errors=result.errors.filter(function(error){return error.level===ParseErrorLevel.ERROR});if(warnings.length>0&&this._console.warn("Template parse warnings:\n"+warnings.join("\n")),errors.length>0){throw syntaxError("Template parse errors:\n"+errors.join("\n"))}return{template:result.templateAst,pipes:result.usedPipes}},TemplateParser.prototype.tryParse=function(component,template,directives,pipes,schemas,templateUrl){return this.tryParseHtml(this.expandHtml(this._htmlParser.parse(template,templateUrl,!0,this.getInterpolationConfig(component))),component,directives,pipes,schemas)},TemplateParser.prototype.tryParseHtml=function(htmlAstWithErrors,component,directives,pipes,schemas){var result,errors=htmlAstWithErrors.errors,usedPipes=[];if(htmlAstWithErrors.rootNodes.length>0){var uniqDirectives=removeSummaryDuplicates(directives),uniqPipes=removeSummaryDuplicates(pipes),providerViewContext=new ProviderViewContext(this._reflector,component),interpolationConfig=void 0;component.template&&component.template.interpolation&&(interpolationConfig={start:component.template.interpolation[0],end:component.template.interpolation[1]});var bindingParser=new BindingParser(this._exprParser,interpolationConfig,this._schemaRegistry,uniqPipes,errors),parseVisitor=new TemplateParseVisitor(this._reflector,this._config,providerViewContext,uniqDirectives,bindingParser,this._schemaRegistry,schemas,errors);result=visitAll(parseVisitor,htmlAstWithErrors.rootNodes,EMPTY_ELEMENT_CONTEXT),errors.push.apply(errors,providerViewContext.errors),usedPipes.push.apply(usedPipes,bindingParser.getUsedPipes())}else result=[];return this._assertNoReferenceDuplicationOnTemplate(result,errors),errors.length>0?new TemplateParseResult(result,usedPipes,errors):(this.transforms&&this.transforms.forEach(function(transform){result=templateVisitAll(transform,result)}),new TemplateParseResult(result,usedPipes,errors))},TemplateParser.prototype.expandHtml=function(htmlAstWithErrors,forced){void 0===forced&&(forced=!1);var errors=htmlAstWithErrors.errors;if(0==errors.length||forced){var expandedHtmlAst=expandNodes(htmlAstWithErrors.rootNodes);errors.push.apply(errors,expandedHtmlAst.errors),htmlAstWithErrors=new ParseTreeResult(expandedHtmlAst.nodes,errors)}return htmlAstWithErrors},TemplateParser.prototype.getInterpolationConfig=function(component){if(component.template)return InterpolationConfig.fromArray(component.template.interpolation)},TemplateParser.prototype._assertNoReferenceDuplicationOnTemplate=function(result,errors){var existingReferences=[];result.filter(function(element){return!!element.references}).forEach(function(element){return element.references.forEach(function(reference){var name=reference.name;if(existingReferences.indexOf(name)<0)existingReferences.push(name);else{var error=new TemplateParseError('Reference "#'+name+'" is defined several times',reference.sourceSpan,ParseErrorLevel.ERROR);errors.push(error)}})})},TemplateParser}();TemplateParser.decorators=[{type:CompilerInjectable}],TemplateParser.ctorParameters=function(){return[{type:CompilerConfig},{type:CompileReflector},{type:Parser},{type:ElementSchemaRegistry},{type:I18NHtmlParser},{type:_angular_core.ɵConsole},{type:Array,decorators:[{type:_angular_core.Optional},{type:_angular_core.Inject,args:[TEMPLATE_TRANSFORMS]}]}]};var TemplateParseVisitor=function(){function TemplateParseVisitor(reflector,config,providerViewContext,directives,_bindingParser,_schemaRegistry,_schemas,_targetErrors){var _this=this;this.reflector=reflector,this.config=config,this.providerViewContext=providerViewContext,this._bindingParser=_bindingParser,this._schemaRegistry=_schemaRegistry,this._schemas=_schemas,this._targetErrors=_targetErrors,this.selectorMatcher=new SelectorMatcher,this.directivesIndex=new Map,this.ngContentCount=0,this.contentQueryStartId=providerViewContext.component.viewQueries.length+1,directives.forEach(function(directive,index){var selector=CssSelector.parse(directive.selector);_this.selectorMatcher.addSelectables(selector,directive),_this.directivesIndex.set(directive,index)})}return TemplateParseVisitor.prototype.visitExpansion=function(expansion,context){return null},TemplateParseVisitor.prototype.visitExpansionCase=function(expansionCase,context){return null},TemplateParseVisitor.prototype.visitText=function(text,parent){var ngContentIndex=parent.findNgContentIndex(TEXT_CSS_SELECTOR),expr=this._bindingParser.parseInterpolation(text.value,text.sourceSpan);return expr?new BoundTextAst(expr,ngContentIndex,text.sourceSpan):new TextAst(text.value,ngContentIndex,text.sourceSpan)},TemplateParseVisitor.prototype.visitAttribute=function(attribute,context){return new AttrAst(attribute.name,attribute.value,attribute.sourceSpan)},TemplateParseVisitor.prototype.visitComment=function(comment,context){return null},TemplateParseVisitor.prototype.visitElement=function(element,parent){var _this=this,queryStartIndex=this.contentQueryStartId,nodeName=element.name,preparsedElement=preparseElement(element);if(preparsedElement.type===PreparsedElementType.SCRIPT||preparsedElement.type===PreparsedElementType.STYLE)return null;if(preparsedElement.type===PreparsedElementType.STYLESHEET&&isStyleUrlResolvable(preparsedElement.hrefAttr))return null;var matchableAttrs=[],elementOrDirectiveProps=[],elementOrDirectiveRefs=[],elementVars=[],events=[],templateElementOrDirectiveProps=[],templateMatchableAttrs=[],templateElementVars=[],hasInlineTemplates=!1,attrs=[],isTemplateElement=isTemplate(element,this.config.enableLegacyTemplate,function(m,span){return _this._reportError(m,span,ParseErrorLevel.WARNING)});element.attrs.forEach(function(attr){var templateBindingsSource,prefixToken,hasBinding=_this._parseAttr(isTemplateElement,attr,matchableAttrs,elementOrDirectiveProps,events,elementOrDirectiveRefs,elementVars),normalizedName=_this._normalizeAttributeName(attr.name);_this.config.enableLegacyTemplate&&normalizedName==TEMPLATE_ATTR?(_this._reportError(TEMPLATE_ATTR_DEPRECATION_WARNING,attr.sourceSpan,ParseErrorLevel.WARNING),templateBindingsSource=attr.value):normalizedName.startsWith(TEMPLATE_ATTR_PREFIX)&&(templateBindingsSource=attr.value,prefixToken=normalizedName.substring(TEMPLATE_ATTR_PREFIX.length)+":");var hasTemplateBinding=null!=templateBindingsSource;hasTemplateBinding&&(hasInlineTemplates&&_this._reportError("Can't have multiple template bindings on one element. Use only one attribute named 'template' or prefixed with *",attr.sourceSpan),hasInlineTemplates=!0,_this._bindingParser.parseInlineTemplateBinding(prefixToken,templateBindingsSource,attr.sourceSpan,templateMatchableAttrs,templateElementOrDirectiveProps,templateElementVars)),hasBinding||hasTemplateBinding||(attrs.push(_this.visitAttribute(attr,null)),matchableAttrs.push([attr.name,attr.value]))});var elementCssSelector=createElementCssSelector(nodeName,matchableAttrs),_a=this._parseDirectives(this.selectorMatcher,elementCssSelector),directiveMetas=_a.directives,matchElement=_a.matchElement,references=[],boundDirectivePropNames=new Set,directiveAsts=this._createDirectiveAsts(isTemplateElement,element.name,directiveMetas,elementOrDirectiveProps,elementOrDirectiveRefs,element.sourceSpan,references,boundDirectivePropNames),elementProps=this._createElementPropertyAsts(element.name,elementOrDirectiveProps,boundDirectivePropNames),isViewRoot=parent.isTemplateElement||hasInlineTemplates,providerContext=new ProviderElementContext(this.providerViewContext,parent.providerContext,isViewRoot,directiveAsts,attrs,references,isTemplateElement,queryStartIndex,element.sourceSpan),children=visitAll(preparsedElement.nonBindable?NON_BINDABLE_VISITOR:this,element.children,ElementContext.create(isTemplateElement,directiveAsts,isTemplateElement?parent.providerContext:providerContext));providerContext.afterElement();var parsedElement,projectionSelector=null!=preparsedElement.projectAs?CssSelector.parse(preparsedElement.projectAs)[0]:elementCssSelector,ngContentIndex=parent.findNgContentIndex(projectionSelector);if(preparsedElement.type===PreparsedElementType.NG_CONTENT)element.children&&!element.children.every(_isEmptyTextNode)&&this._reportError("<ng-content> element cannot have content.",element.sourceSpan),parsedElement=new NgContentAst(this.ngContentCount++,hasInlineTemplates?null:ngContentIndex,element.sourceSpan);else if(isTemplateElement)this._assertAllEventsPublishedByDirectives(directiveAsts,events),this._assertNoComponentsNorElementBindingsOnTemplate(directiveAsts,elementProps,element.sourceSpan),parsedElement=new EmbeddedTemplateAst(attrs,events,references,elementVars,providerContext.transformedDirectiveAsts,providerContext.transformProviders,providerContext.transformedHasViewContainer,providerContext.queryMatches,children,hasInlineTemplates?null:ngContentIndex,element.sourceSpan);else{this._assertElementExists(matchElement,element),this._assertOnlyOneComponent(directiveAsts,element.sourceSpan);var ngContentIndex_1=hasInlineTemplates?null:parent.findNgContentIndex(projectionSelector);parsedElement=new ElementAst(nodeName,attrs,elementProps,events,references,providerContext.transformedDirectiveAsts,providerContext.transformProviders,providerContext.transformedHasViewContainer,providerContext.queryMatches,children,hasInlineTemplates?null:ngContentIndex_1,element.sourceSpan,element.endSourceSpan||null)}if(hasInlineTemplates){var templateQueryStartIndex=this.contentQueryStartId,templateSelector=createElementCssSelector(TEMPLATE_ELEMENT,templateMatchableAttrs),templateDirectiveMetas=this._parseDirectives(this.selectorMatcher,templateSelector).directives,templateBoundDirectivePropNames=new Set,templateDirectiveAsts=this._createDirectiveAsts(!0,element.name,templateDirectiveMetas,templateElementOrDirectiveProps,[],element.sourceSpan,[],templateBoundDirectivePropNames),templateElementProps=this._createElementPropertyAsts(element.name,templateElementOrDirectiveProps,templateBoundDirectivePropNames);this._assertNoComponentsNorElementBindingsOnTemplate(templateDirectiveAsts,templateElementProps,element.sourceSpan);var templateProviderContext=new ProviderElementContext(this.providerViewContext,parent.providerContext,parent.isTemplateElement,templateDirectiveAsts,[],[],!0,templateQueryStartIndex,element.sourceSpan);templateProviderContext.afterElement(),parsedElement=new EmbeddedTemplateAst([],[],[],templateElementVars,templateProviderContext.transformedDirectiveAsts,templateProviderContext.transformProviders,templateProviderContext.transformedHasViewContainer,templateProviderContext.queryMatches,[parsedElement],ngContentIndex,element.sourceSpan)}return parsedElement},TemplateParseVisitor.prototype._parseAttr=function(isTemplateElement,attr,targetMatchableAttrs,targetProps,targetEvents,targetRefs,targetVars){var name=this._normalizeAttributeName(attr.name),value=attr.value,srcSpan=attr.sourceSpan,bindParts=name.match(BIND_NAME_REGEXP),hasBinding=!1;if(null!==bindParts)if(hasBinding=!0,null!=bindParts[KW_BIND_IDX])this._bindingParser.parsePropertyBinding(bindParts[IDENT_KW_IDX],value,!1,srcSpan,targetMatchableAttrs,targetProps);else if(bindParts[KW_LET_IDX])if(isTemplateElement){var identifier=bindParts[IDENT_KW_IDX];this._parseVariable(identifier,value,srcSpan,targetVars)}else this._reportError('"let-" is only supported on template elements.',srcSpan);else if(bindParts[KW_REF_IDX]){var identifier=bindParts[IDENT_KW_IDX];this._parseReference(identifier,value,srcSpan,targetRefs)}else bindParts[KW_ON_IDX]?this._bindingParser.parseEvent(bindParts[IDENT_KW_IDX],value,srcSpan,targetMatchableAttrs,targetEvents):bindParts[KW_BINDON_IDX]?(this._bindingParser.parsePropertyBinding(bindParts[IDENT_KW_IDX],value,!1,srcSpan,targetMatchableAttrs,targetProps),this._parseAssignmentEvent(bindParts[IDENT_KW_IDX],value,srcSpan,targetMatchableAttrs,targetEvents)):bindParts[KW_AT_IDX]?this._bindingParser.parseLiteralAttr(name,value,srcSpan,targetMatchableAttrs,targetProps):bindParts[IDENT_BANANA_BOX_IDX]?(this._bindingParser.parsePropertyBinding(bindParts[IDENT_BANANA_BOX_IDX],value,!1,srcSpan,targetMatchableAttrs,targetProps),this._parseAssignmentEvent(bindParts[IDENT_BANANA_BOX_IDX],value,srcSpan,targetMatchableAttrs,targetEvents)):bindParts[IDENT_PROPERTY_IDX]?this._bindingParser.parsePropertyBinding(bindParts[IDENT_PROPERTY_IDX],value,!1,srcSpan,targetMatchableAttrs,targetProps):bindParts[IDENT_EVENT_IDX]&&this._bindingParser.parseEvent(bindParts[IDENT_EVENT_IDX],value,srcSpan,targetMatchableAttrs,targetEvents);else hasBinding=this._bindingParser.parsePropertyInterpolation(name,value,srcSpan,targetMatchableAttrs,targetProps);return hasBinding||this._bindingParser.parseLiteralAttr(name,value,srcSpan,targetMatchableAttrs,targetProps),hasBinding},TemplateParseVisitor.prototype._normalizeAttributeName=function(attrName){return/^data-/i.test(attrName)?attrName.substring(5):attrName},TemplateParseVisitor.prototype._parseVariable=function(identifier,value,sourceSpan,targetVars){identifier.indexOf("-")>-1&&this._reportError('"-" is not allowed in variable names',sourceSpan),targetVars.push(new VariableAst(identifier,value,sourceSpan))},TemplateParseVisitor.prototype._parseReference=function(identifier,value,sourceSpan,targetRefs){identifier.indexOf("-")>-1&&this._reportError('"-" is not allowed in reference names',sourceSpan),targetRefs.push(new ElementOrDirectiveRef(identifier,value,sourceSpan))},TemplateParseVisitor.prototype._parseAssignmentEvent=function(name,expression,sourceSpan,targetMatchableAttrs,targetEvents){this._bindingParser.parseEvent(name+"Change",expression+"=$event",sourceSpan,targetMatchableAttrs,targetEvents)},TemplateParseVisitor.prototype._parseDirectives=function(selectorMatcher,elementCssSelector){var _this=this,directives=new Array(this.directivesIndex.size),matchElement=!1;return selectorMatcher.match(elementCssSelector,function(selector,directive){directives[_this.directivesIndex.get(directive)]=directive,matchElement=matchElement||selector.hasElementSelector()}),{directives:directives.filter(function(dir){return!!dir}),matchElement:matchElement}},TemplateParseVisitor.prototype._createDirectiveAsts=function(isTemplateElement,elementName,directives,props,elementOrDirectiveRefs,elementSourceSpan,targetReferences,targetBoundDirectivePropNames){var _this=this,matchedReferences=new Set,component=null,directiveAsts=directives.map(function(directive){var sourceSpan=new ParseSourceSpan(elementSourceSpan.start,elementSourceSpan.end,"Directive "+identifierName(directive.type));directive.isComponent&&(component=directive);var directiveProperties=[],hostProperties=_this._bindingParser.createDirectiveHostPropertyAsts(directive,elementName,sourceSpan);hostProperties=_this._checkPropertiesInSchema(elementName,hostProperties);var hostEvents=_this._bindingParser.createDirectiveHostEventAsts(directive,sourceSpan);_this._createDirectivePropertyAsts(directive.inputs,props,directiveProperties,targetBoundDirectivePropNames),elementOrDirectiveRefs.forEach(function(elOrDirRef){(0===elOrDirRef.value.length&&directive.isComponent||directive.exportAs==elOrDirRef.value)&&(targetReferences.push(new ReferenceAst(elOrDirRef.name,createTokenForReference(directive.type.reference),elOrDirRef.sourceSpan)),matchedReferences.add(elOrDirRef.name))});var contentQueryStartId=_this.contentQueryStartId;return _this.contentQueryStartId+=directive.queries.length,new DirectiveAst(directive,directiveProperties,hostProperties,hostEvents,contentQueryStartId,sourceSpan)});return elementOrDirectiveRefs.forEach(function(elOrDirRef){if(elOrDirRef.value.length>0)matchedReferences.has(elOrDirRef.name)||_this._reportError('There is no directive with "exportAs" set to "'+elOrDirRef.value+'"',elOrDirRef.sourceSpan);else if(!component){var refToken=null;isTemplateElement&&(refToken=createTokenForExternalReference(_this.reflector,Identifiers.TemplateRef)),targetReferences.push(new ReferenceAst(elOrDirRef.name,refToken,elOrDirRef.sourceSpan))}}),directiveAsts},TemplateParseVisitor.prototype._createDirectivePropertyAsts=function(directiveProperties,boundProps,targetBoundDirectiveProps,targetBoundDirectivePropNames){if(directiveProperties){var boundPropsByName_1=new Map;boundProps.forEach(function(boundProp){var prevValue=boundPropsByName_1.get(boundProp.name);prevValue&&!prevValue.isLiteral||boundPropsByName_1.set(boundProp.name,boundProp)}),Object.keys(directiveProperties).forEach(function(dirProp){var elProp=directiveProperties[dirProp],boundProp=boundPropsByName_1.get(elProp);boundProp&&(targetBoundDirectivePropNames.add(boundProp.name),isEmptyExpression(boundProp.expression)||targetBoundDirectiveProps.push(new BoundDirectivePropertyAst(dirProp,boundProp.name,boundProp.expression,boundProp.sourceSpan)))})}},TemplateParseVisitor.prototype._createElementPropertyAsts=function(elementName,props,boundDirectivePropNames){var _this=this,boundElementProps=[];return props.forEach(function(prop){prop.isLiteral||boundDirectivePropNames.has(prop.name)||boundElementProps.push(_this._bindingParser.createElementPropertyAst(elementName,prop))}),this._checkPropertiesInSchema(elementName,boundElementProps)},TemplateParseVisitor.prototype._findComponentDirectives=function(directives){return directives.filter(function(directive){return directive.directive.isComponent})},TemplateParseVisitor.prototype._findComponentDirectiveNames=function(directives){return this._findComponentDirectives(directives).map(function(directive){return identifierName(directive.directive.type)})},TemplateParseVisitor.prototype._assertOnlyOneComponent=function(directives,sourceSpan){var componentTypeNames=this._findComponentDirectiveNames(directives);componentTypeNames.length>1&&this._reportError("More than one component matched on this element.\nMake sure that only one component's selector can match a given element.\nConflicting components: "+componentTypeNames.join(","),sourceSpan)},TemplateParseVisitor.prototype._assertElementExists=function(matchElement,element){var elName=element.name.replace(/^:xhtml:/,"");if(!matchElement&&!this._schemaRegistry.hasElement(elName,this._schemas)){var errorMsg="'"+elName+"' is not a known element:\n";errorMsg+="1. If '"+elName+"' is an Angular component, then verify that it is part of this module.\n",elName.indexOf("-")>-1?errorMsg+="2. If '"+elName+"' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.":errorMsg+="2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.",this._reportError(errorMsg,element.sourceSpan)}},TemplateParseVisitor.prototype._assertNoComponentsNorElementBindingsOnTemplate=function(directives,elementProps,sourceSpan){var _this=this,componentTypeNames=this._findComponentDirectiveNames(directives);componentTypeNames.length>0&&this._reportError("Components on an embedded template: "+componentTypeNames.join(","),sourceSpan),elementProps.forEach(function(prop){_this._reportError("Property binding "+prop.name+' not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations".',sourceSpan)})},TemplateParseVisitor.prototype._assertAllEventsPublishedByDirectives=function(directives,events){var _this=this,allDirectiveEvents=new Set;directives.forEach(function(directive){Object.keys(directive.directive.outputs).forEach(function(k){var eventName=directive.directive.outputs[k];allDirectiveEvents.add(eventName)})}),events.forEach(function(event){null==event.target&&allDirectiveEvents.has(event.name)||_this._reportError("Event binding "+event.fullName+' not emitted by any directive on an embedded template. Make sure that the event name is spelled correctly and all directives are listed in the "@NgModule.declarations".',event.sourceSpan)})},TemplateParseVisitor.prototype._checkPropertiesInSchema=function(elementName,boundProps){var _this=this;return boundProps.filter(function(boundProp){if(boundProp.type===PropertyBindingType.Property&&!_this._schemaRegistry.hasProperty(elementName,boundProp.name,_this._schemas)){var errorMsg="Can't bind to '"+boundProp.name+"' since it isn't a known property of '"+elementName+"'.";elementName.startsWith("ng-")?errorMsg+="\n1. If '"+boundProp.name+"' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.\n2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.":elementName.indexOf("-")>-1&&(errorMsg+="\n1. If '"+elementName+"' is an Angular component and it has '"+boundProp.name+"' input, then verify that it is part of this module.\n2. If '"+elementName+"' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.\n3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component."),_this._reportError(errorMsg,boundProp.sourceSpan)}return!isEmptyExpression(boundProp.value)})},TemplateParseVisitor.prototype._reportError=function(message,sourceSpan,level){void 0===level&&(level=ParseErrorLevel.ERROR),this._targetErrors.push(new ParseError(sourceSpan,message,level))},TemplateParseVisitor}(),NonBindableVisitor=function(){function NonBindableVisitor(){}return NonBindableVisitor.prototype.visitElement=function(ast,parent){var preparsedElement=preparseElement(ast);if(preparsedElement.type===PreparsedElementType.SCRIPT||preparsedElement.type===PreparsedElementType.STYLE||preparsedElement.type===PreparsedElementType.STYLESHEET)return null;var attrNameAndValues=ast.attrs.map(function(attr){return[attr.name,attr.value]}),selector=createElementCssSelector(ast.name,attrNameAndValues),ngContentIndex=parent.findNgContentIndex(selector),children=visitAll(this,ast.children,EMPTY_ELEMENT_CONTEXT);return new ElementAst(ast.name,visitAll(this,ast.attrs),[],[],[],[],[],!1,[],children,ngContentIndex,ast.sourceSpan,ast.endSourceSpan)},NonBindableVisitor.prototype.visitComment=function(comment,context){return null},NonBindableVisitor.prototype.visitAttribute=function(attribute,context){return new AttrAst(attribute.name,attribute.value,attribute.sourceSpan)},NonBindableVisitor.prototype.visitText=function(text,parent){var ngContentIndex=parent.findNgContentIndex(TEXT_CSS_SELECTOR);return new TextAst(text.value,ngContentIndex,text.sourceSpan)},NonBindableVisitor.prototype.visitExpansion=function(expansion,context){return expansion},NonBindableVisitor.prototype.visitExpansionCase=function(expansionCase,context){return expansionCase},NonBindableVisitor}(),ElementOrDirectiveRef=function(){function ElementOrDirectiveRef(name,value,sourceSpan){this.name=name,this.value=value,this.sourceSpan=sourceSpan}return ElementOrDirectiveRef}(),ElementContext=function(){function ElementContext(isTemplateElement,_ngContentIndexMatcher,_wildcardNgContentIndex,providerContext){this.isTemplateElement=isTemplateElement,this._ngContentIndexMatcher=_ngContentIndexMatcher,this._wildcardNgContentIndex=_wildcardNgContentIndex,this.providerContext=providerContext}return ElementContext.create=function(isTemplateElement,directives,providerContext){var matcher=new SelectorMatcher,wildcardNgContentIndex=null,component=directives.find(function(directive){return directive.directive.isComponent});if(component)for(var ngContentSelectors=component.directive.template.ngContentSelectors,i=0;i<ngContentSelectors.length;i++){var selector=ngContentSelectors[i];"*"===selector?wildcardNgContentIndex=i:matcher.addSelectables(CssSelector.parse(ngContentSelectors[i]),i)}return new ElementContext(isTemplateElement,matcher,wildcardNgContentIndex,providerContext)},ElementContext.prototype.findNgContentIndex=function(selector){var ngContentIndices=[];return this._ngContentIndexMatcher.match(selector,function(selector,ngContentIndex){ngContentIndices.push(ngContentIndex)}),ngContentIndices.sort(),null!=this._wildcardNgContentIndex&&ngContentIndices.push(this._wildcardNgContentIndex),ngContentIndices.length>0?ngContentIndices[0]:null},ElementContext}(),EMPTY_ELEMENT_CONTEXT=new ElementContext(!0,new SelectorMatcher,null,null),NON_BINDABLE_VISITOR=new NonBindableVisitor,ResourceLoader=function(){function ResourceLoader(){}return ResourceLoader.prototype.get=function(url){return""},ResourceLoader}(),DEFAULT_PACKAGE_URL_PROVIDER={provide:_angular_core.PACKAGE_ROOT_URL,useValue:"/"},UrlResolver=function(){function UrlResolver(_packagePrefix){void 0===_packagePrefix&&(_packagePrefix=null),this._packagePrefix=_packagePrefix}return UrlResolver.prototype.resolve=function(baseUrl,url){var resolvedUrl=url;null!=baseUrl&&baseUrl.length>0&&(resolvedUrl=_resolveUrl(baseUrl,resolvedUrl));var resolvedParts=_split(resolvedUrl),prefix=this._packagePrefix;if(null!=prefix&&null!=resolvedParts&&"package"==resolvedParts[_ComponentIndex.Scheme]){var path=resolvedParts[_ComponentIndex.Path];return prefix=prefix.replace(/\/+$/,""),path=path.replace(/^\/+/,""),prefix+"/"+path}return resolvedUrl},UrlResolver}();UrlResolver.decorators=[{type:CompilerInjectable}],UrlResolver.ctorParameters=function(){return[{type:void 0,decorators:[{type:_angular_core.Inject,args:[_angular_core.PACKAGE_ROOT_URL]}]}]};var _splitRe=new RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"),_ComponentIndex={};_ComponentIndex.Scheme=1,_ComponentIndex.UserInfo=2,_ComponentIndex.Domain=3,_ComponentIndex.Port=4,_ComponentIndex.Path=5,_ComponentIndex.QueryData=6,_ComponentIndex.Fragment=7,_ComponentIndex[_ComponentIndex.Scheme]="Scheme",_ComponentIndex[_ComponentIndex.UserInfo]="UserInfo",_ComponentIndex[_ComponentIndex.Domain]="Domain",_ComponentIndex[_ComponentIndex.Port]="Port",_ComponentIndex[_ComponentIndex.Path]="Path",_ComponentIndex[_ComponentIndex.QueryData]="QueryData",_ComponentIndex[_ComponentIndex.Fragment]="Fragment";var DirectiveNormalizer=function(){function DirectiveNormalizer(_resourceLoader,_urlResolver,_htmlParser,_config){this._resourceLoader=_resourceLoader,this._urlResolver=_urlResolver,this._htmlParser=_htmlParser,this._config=_config,this._resourceLoaderCache=new Map}return DirectiveNormalizer.prototype.clearCache=function(){this._resourceLoaderCache.clear()},DirectiveNormalizer.prototype.clearCacheFor=function(normalizedDirective){var _this=this;if(normalizedDirective.isComponent){var template=normalizedDirective.template;this._resourceLoaderCache.delete(template.templateUrl),template.externalStylesheets.forEach(function(stylesheet){_this._resourceLoaderCache.delete(stylesheet.moduleUrl)})}},DirectiveNormalizer.prototype._fetch=function(url){var result=this._resourceLoaderCache.get(url);return result||(result=this._resourceLoader.get(url),this._resourceLoaderCache.set(url,result)),result},DirectiveNormalizer.prototype.normalizeTemplate=function(prenormData){var _this=this;if(isDefined(prenormData.template)){if(isDefined(prenormData.templateUrl))throw syntaxError("'"+_angular_core.ɵstringify(prenormData.componentType)+"' component cannot define both template and templateUrl");if("string"!=typeof prenormData.template)throw syntaxError("The template specified for component "+_angular_core.ɵstringify(prenormData.componentType)+" is not a string")}else{if(!isDefined(prenormData.templateUrl))throw syntaxError("No template specified for component "+_angular_core.ɵstringify(prenormData.componentType));if("string"!=typeof prenormData.templateUrl)throw syntaxError("The templateUrl specified for component "+_angular_core.ɵstringify(prenormData.componentType)+" is not a string")}return SyncAsync.then(this.normalizeTemplateOnly(prenormData),function(result){return _this.normalizeExternalStylesheets(result)})},DirectiveNormalizer.prototype.normalizeTemplateOnly=function(prenomData){var template,templateUrl,_this=this;return null!=prenomData.template?(template=prenomData.template,templateUrl=prenomData.moduleUrl):(templateUrl=this._urlResolver.resolve(prenomData.moduleUrl,prenomData.templateUrl),template=this._fetch(templateUrl)),SyncAsync.then(template,function(template){return _this.normalizeLoadedTemplate(prenomData,template,templateUrl)})},DirectiveNormalizer.prototype.normalizeLoadedTemplate=function(prenormData,template,templateAbsUrl){var isInline=!!prenormData.template,interpolationConfig=InterpolationConfig.fromArray(prenormData.interpolation),rootNodesAndErrors=this._htmlParser.parse(template,templateSourceUrl({reference:prenormData.ngModuleType},{type:{reference:prenormData.componentType}},{isInline:isInline,templateUrl:templateAbsUrl}),!0,interpolationConfig);if(rootNodesAndErrors.errors.length>0){throw syntaxError("Template parse errors:\n"+rootNodesAndErrors.errors.join("\n"))}var templateMetadataStyles=this.normalizeStylesheet(new CompileStylesheetMetadata({styles:prenormData.styles,styleUrls:prenormData.styleUrls,moduleUrl:prenormData.moduleUrl})),visitor=new TemplatePreparseVisitor;visitAll(visitor,rootNodesAndErrors.rootNodes);var templateStyles=this.normalizeStylesheet(new CompileStylesheetMetadata({styles:visitor.styles,styleUrls:visitor.styleUrls,moduleUrl:templateAbsUrl})),encapsulation=prenormData.encapsulation;null==encapsulation&&(encapsulation=this._config.defaultEncapsulation);var styles=templateMetadataStyles.styles.concat(templateStyles.styles),styleUrls=templateMetadataStyles.styleUrls.concat(templateStyles.styleUrls);return encapsulation===_angular_core.ViewEncapsulation.Emulated&&0===styles.length&&0===styleUrls.length&&(encapsulation=_angular_core.ViewEncapsulation.None),new CompileTemplateMetadata({encapsulation:encapsulation,template:template,templateUrl:templateAbsUrl,styles:styles,styleUrls:styleUrls,ngContentSelectors:visitor.ngContentSelectors,animations:prenormData.animations,interpolation:prenormData.interpolation,isInline:isInline,externalStylesheets:[]})},DirectiveNormalizer.prototype.normalizeExternalStylesheets=function(templateMeta){return SyncAsync.then(this._loadMissingExternalStylesheets(templateMeta.styleUrls),function(externalStylesheets){return new CompileTemplateMetadata({encapsulation:templateMeta.encapsulation,template:templateMeta.template,templateUrl:templateMeta.templateUrl,styles:templateMeta.styles,styleUrls:templateMeta.styleUrls,externalStylesheets:externalStylesheets,ngContentSelectors:templateMeta.ngContentSelectors,animations:templateMeta.animations,interpolation:templateMeta.interpolation,isInline:templateMeta.isInline})})},DirectiveNormalizer.prototype._loadMissingExternalStylesheets=function(styleUrls,loadedStylesheets){var _this=this;return void 0===loadedStylesheets&&(loadedStylesheets=new Map),SyncAsync.then(SyncAsync.all(styleUrls.filter(function(styleUrl){return!loadedStylesheets.has(styleUrl)}).map(function(styleUrl){return SyncAsync.then(_this._fetch(styleUrl),function(loadedStyle){var stylesheet=_this.normalizeStylesheet(new CompileStylesheetMetadata({styles:[loadedStyle],moduleUrl:styleUrl}));return loadedStylesheets.set(styleUrl,stylesheet),_this._loadMissingExternalStylesheets(stylesheet.styleUrls,loadedStylesheets)})})),function(_){return Array.from(loadedStylesheets.values())})},DirectiveNormalizer.prototype.normalizeStylesheet=function(stylesheet){var _this=this,moduleUrl=stylesheet.moduleUrl,allStyleUrls=stylesheet.styleUrls.filter(isStyleUrlResolvable).map(function(url){return _this._urlResolver.resolve(moduleUrl,url)}),allStyles=stylesheet.styles.map(function(style$$1){var styleWithImports=extractStyleUrls(_this._urlResolver,moduleUrl,style$$1);return allStyleUrls.push.apply(allStyleUrls,styleWithImports.styleUrls),styleWithImports.style});return new CompileStylesheetMetadata({styles:allStyles,styleUrls:allStyleUrls,moduleUrl:moduleUrl})},DirectiveNormalizer}();DirectiveNormalizer.decorators=[{type:CompilerInjectable}],DirectiveNormalizer.ctorParameters=function(){return[{type:ResourceLoader},{type:UrlResolver},{type:HtmlParser},{type:CompilerConfig}]};var TemplatePreparseVisitor=function(){function TemplatePreparseVisitor(){this.ngContentSelectors=[],this.styles=[],this.styleUrls=[],this.ngNonBindableStackCount=0}return TemplatePreparseVisitor.prototype.visitElement=function(ast,context){var preparsedElement=preparseElement(ast);switch(preparsedElement.type){case PreparsedElementType.NG_CONTENT:0===this.ngNonBindableStackCount&&this.ngContentSelectors.push(preparsedElement.selectAttr);break;case PreparsedElementType.STYLE:var textContent_1="";ast.children.forEach(function(child){child instanceof Text&&(textContent_1+=child.value)}),this.styles.push(textContent_1);break;case PreparsedElementType.STYLESHEET:this.styleUrls.push(preparsedElement.hrefAttr)}return preparsedElement.nonBindable&&this.ngNonBindableStackCount++,visitAll(this,ast.children),preparsedElement.nonBindable&&this.ngNonBindableStackCount--,null},TemplatePreparseVisitor.prototype.visitExpansion=function(ast,context){visitAll(this,ast.cases)},TemplatePreparseVisitor.prototype.visitExpansionCase=function(ast,context){visitAll(this,ast.expression)},TemplatePreparseVisitor.prototype.visitComment=function(ast,context){return null},TemplatePreparseVisitor.prototype.visitAttribute=function(ast,context){return null},TemplatePreparseVisitor.prototype.visitText=function(ast,context){return null},TemplatePreparseVisitor}(),DirectiveResolver=function(){function DirectiveResolver(_reflector){this._reflector=_reflector}return DirectiveResolver.prototype.isDirective=function(type){var typeMetadata=this._reflector.annotations(_angular_core.resolveForwardRef(type));return typeMetadata&&typeMetadata.some(isDirectiveMetadata)},DirectiveResolver.prototype.resolve=function(type,throwIfNotFound){void 0===throwIfNotFound&&(throwIfNotFound=!0);var typeMetadata=this._reflector.annotations(_angular_core.resolveForwardRef(type));if(typeMetadata){var metadata=findLast(typeMetadata,isDirectiveMetadata);if(metadata){var propertyMetadata=this._reflector.propMetadata(type);return this._mergeWithPropertyMetadata(metadata,propertyMetadata,type)}}if(throwIfNotFound)throw new Error("No Directive annotation found on "+_angular_core.ɵstringify(type));return null},DirectiveResolver.prototype._mergeWithPropertyMetadata=function(dm,propertyMetadata,directiveType){var inputs=[],outputs=[],host={},queries={};return Object.keys(propertyMetadata).forEach(function(propName){var input=findLast(propertyMetadata[propName],function(a){return a instanceof _angular_core.Input});input&&(input.bindingPropertyName?inputs.push(propName+": "+input.bindingPropertyName):inputs.push(propName));var output=findLast(propertyMetadata[propName],function(a){return a instanceof _angular_core.Output});output&&(output.bindingPropertyName?outputs.push(propName+": "+output.bindingPropertyName):outputs.push(propName)),propertyMetadata[propName].filter(function(a){return a&&a instanceof _angular_core.HostBinding}).forEach(function(hostBinding){if(hostBinding.hostPropertyName){var startWith=hostBinding.hostPropertyName[0];if("("===startWith)throw new Error("@HostBinding can not bind to events. Use @HostListener instead.");if("["===startWith)throw new Error("@HostBinding parameter should be a property name, 'class.<name>', or 'attr.<name>'.");host["["+hostBinding.hostPropertyName+"]"]=propName}else host["["+propName+"]"]=propName}),propertyMetadata[propName].filter(function(a){return a&&a instanceof _angular_core.HostListener}).forEach(function(hostListener){var args=hostListener.args||[];host["("+hostListener.eventName+")"]=propName+"("+args.join(",")+")"});var query=findLast(propertyMetadata[propName],function(a){return a instanceof _angular_core.Query});query&&(queries[propName]=query)}),this._merge(dm,inputs,outputs,host,queries,directiveType)},DirectiveResolver.prototype._extractPublicName=function(def){return splitAtColon(def,[null,def])[1].trim()},DirectiveResolver.prototype._dedupeBindings=function(bindings){for(var names=new Set,reversedResult=[],i=bindings.length-1;i>=0;i--){var binding=bindings[i],name=this._extractPublicName(binding);names.has(name)||(names.add(name),reversedResult.push(binding))}return reversedResult.reverse()},DirectiveResolver.prototype._merge=function(directive,inputs,outputs,host,queries,directiveType){var mergedInputs=this._dedupeBindings(directive.inputs?directive.inputs.concat(inputs):inputs),mergedOutputs=this._dedupeBindings(directive.outputs?directive.outputs.concat(outputs):outputs),mergedHost=directive.host?Object.assign({},directive.host,host):host,mergedQueries=directive.queries?Object.assign({},directive.queries,queries):queries;return directive instanceof _angular_core.Component?new _angular_core.Component({selector:directive.selector,inputs:mergedInputs,outputs:mergedOutputs,host:mergedHost,exportAs:directive.exportAs,moduleId:directive.moduleId,queries:mergedQueries,changeDetection:directive.changeDetection,providers:directive.providers,viewProviders:directive.viewProviders,entryComponents:directive.entryComponents,template:directive.template,templateUrl:directive.templateUrl,styles:directive.styles,styleUrls:directive.styleUrls,encapsulation:directive.encapsulation,animations:directive.animations,interpolation:directive.interpolation}):new _angular_core.Directive({selector:directive.selector,inputs:mergedInputs,outputs:mergedOutputs,host:mergedHost,exportAs:directive.exportAs,queries:mergedQueries,providers:directive.providers})},DirectiveResolver}();DirectiveResolver.decorators=[{type:CompilerInjectable}],DirectiveResolver.ctorParameters=function(){return[{type:CompileReflector}]};var STRIP_SRC_FILE_SUFFIXES=/(\.ts|\.d\.ts|\.js|\.jsx|\.tsx)$/,GENERATED_FILE=/\.ngfactory\.|\.ngsummary\./,JIT_SUMMARY_FILE=/\.ngsummary\./,JIT_SUMMARY_NAME=/NgSummary$/,LifecycleHooks={};LifecycleHooks.OnInit=0,LifecycleHooks.OnDestroy=1,LifecycleHooks.DoCheck=2,LifecycleHooks.OnChanges=3,LifecycleHooks.AfterContentInit=4,LifecycleHooks.AfterContentChecked=5,LifecycleHooks.AfterViewInit=6,LifecycleHooks.AfterViewChecked=7,LifecycleHooks[LifecycleHooks.OnInit]="OnInit",LifecycleHooks[LifecycleHooks.OnDestroy]="OnDestroy",LifecycleHooks[LifecycleHooks.DoCheck]="DoCheck",LifecycleHooks[LifecycleHooks.OnChanges]="OnChanges",LifecycleHooks[LifecycleHooks.AfterContentInit]="AfterContentInit",LifecycleHooks[LifecycleHooks.AfterContentChecked]="AfterContentChecked",LifecycleHooks[LifecycleHooks.AfterViewInit]="AfterViewInit",LifecycleHooks[LifecycleHooks.AfterViewChecked]="AfterViewChecked";var LIFECYCLE_HOOKS_VALUES=[LifecycleHooks.OnInit,LifecycleHooks.OnDestroy,LifecycleHooks.DoCheck,LifecycleHooks.OnChanges,LifecycleHooks.AfterContentInit,LifecycleHooks.AfterContentChecked,LifecycleHooks.AfterViewInit,LifecycleHooks.AfterViewChecked],NgModuleResolver=function(){function NgModuleResolver(_reflector){this._reflector=_reflector}return NgModuleResolver.prototype.isNgModule=function(type){return this._reflector.annotations(type).some(_isNgModuleMetadata)},NgModuleResolver.prototype.resolve=function(type,throwIfNotFound){void 0===throwIfNotFound&&(throwIfNotFound=!0);var ngModuleMeta=findLast(this._reflector.annotations(type),_isNgModuleMetadata);if(ngModuleMeta)return ngModuleMeta;if(throwIfNotFound)throw new Error("No NgModule metadata found for '"+_angular_core.ɵstringify(type)+"'.");return null},NgModuleResolver}();NgModuleResolver.decorators=[{type:CompilerInjectable}],NgModuleResolver.ctorParameters=function(){return[{type:CompileReflector}]};var PipeResolver=function(){function PipeResolver(_reflector){this._reflector=_reflector}return PipeResolver.prototype.isPipe=function(type){var typeMetadata=this._reflector.annotations(_angular_core.resolveForwardRef(type));return typeMetadata&&typeMetadata.some(_isPipeMetadata)},PipeResolver.prototype.resolve=function(type,throwIfNotFound){void 0===throwIfNotFound&&(throwIfNotFound=!0);var metas=this._reflector.annotations(_angular_core.resolveForwardRef(type));if(metas){var annotation=findLast(metas,_isPipeMetadata);if(annotation)return annotation}if(throwIfNotFound)throw new Error("No Pipe decorator found on "+_angular_core.ɵstringify(type));return null},PipeResolver}();PipeResolver.decorators=[{type:CompilerInjectable}],PipeResolver.ctorParameters=function(){return[{type:CompileReflector}]};var SummaryResolver=function(){function SummaryResolver(){}return SummaryResolver.prototype.isLibraryFile=function(fileName){},SummaryResolver.prototype.getLibraryFileName=function(fileName){},SummaryResolver.prototype.resolveSummary=function(reference){},SummaryResolver.prototype.getSymbolsOf=function(filePath){},SummaryResolver.prototype.getImportAs=function(reference){},SummaryResolver.prototype.addSummary=function(summary){},SummaryResolver}(),JitSummaryResolver=function(){function JitSummaryResolver(){this._summaries=new Map}return JitSummaryResolver.prototype.isLibraryFile=function(fileName){return!1},JitSummaryResolver.prototype.getLibraryFileName=function(fileName){return null},JitSummaryResolver.prototype.resolveSummary=function(reference){return this._summaries.get(reference)||null},JitSummaryResolver.prototype.getSymbolsOf=function(filePath){return[]},JitSummaryResolver.prototype.getImportAs=function(reference){return reference},JitSummaryResolver.prototype.addSummary=function(summary){this._summaries.set(summary.symbol,summary)},JitSummaryResolver}();JitSummaryResolver.decorators=[{type:CompilerInjectable}],JitSummaryResolver.ctorParameters=function(){return[]};var ERROR_COLLECTOR_TOKEN=new _angular_core.InjectionToken("ErrorCollector"),CompileMetadataResolver=function(){function CompileMetadataResolver(_config,_ngModuleResolver,_directiveResolver,_pipeResolver,_summaryResolver,_schemaRegistry,_directiveNormalizer,_console,_staticSymbolCache,_reflector,_errorCollector){this._config=_config,this._ngModuleResolver=_ngModuleResolver,this._directiveResolver=_directiveResolver,this._pipeResolver=_pipeResolver,this._summaryResolver=_summaryResolver,this._schemaRegistry=_schemaRegistry,this._directiveNormalizer=_directiveNormalizer,this._console=_console,this._staticSymbolCache=_staticSymbolCache,this._reflector=_reflector,this._errorCollector=_errorCollector,this._nonNormalizedDirectiveCache=new Map,this._directiveCache=new Map,this._summaryCache=new Map,this._pipeCache=new Map,this._ngModuleCache=new Map,this._ngModuleOfTypes=new Map}return CompileMetadataResolver.prototype.getReflector=function(){return this._reflector},CompileMetadataResolver.prototype.clearCacheFor=function(type){var dirMeta=this._directiveCache.get(type);this._directiveCache.delete(type),this._nonNormalizedDirectiveCache.delete(type),this._summaryCache.delete(type),this._pipeCache.delete(type),this._ngModuleOfTypes.delete(type),this._ngModuleCache.clear(),dirMeta&&this._directiveNormalizer.clearCacheFor(dirMeta)},CompileMetadataResolver.prototype.clearCache=function(){this._directiveCache.clear(),this._nonNormalizedDirectiveCache.clear(),this._summaryCache.clear(),this._pipeCache.clear(),this._ngModuleCache.clear(),this._ngModuleOfTypes.clear(),this._directiveNormalizer.clearCache()},CompileMetadataResolver.prototype._createProxyClass=function(baseType,name){var delegate=null,proxyClass=function(){if(!delegate)throw new Error("Illegal state: Class "+name+" for type "+_angular_core.ɵstringify(baseType)+" is not compiled yet!");return delegate.apply(this,arguments)};return proxyClass.setDelegate=function(d){delegate=d,proxyClass.prototype=d.prototype},proxyClass.overriddenName=name,proxyClass},CompileMetadataResolver.prototype.getGeneratedClass=function(dirType,name){return dirType instanceof StaticSymbol?this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath),name):this._createProxyClass(dirType,name)},CompileMetadataResolver.prototype.getComponentViewClass=function(dirType){return this.getGeneratedClass(dirType,viewClassName(dirType,0))},CompileMetadataResolver.prototype.getHostComponentViewClass=function(dirType){return this.getGeneratedClass(dirType,hostViewClassName(dirType))},CompileMetadataResolver.prototype.getHostComponentType=function(dirType){var name=identifierName({reference:dirType})+"_Host";if(dirType instanceof StaticSymbol)return this._staticSymbolCache.get(dirType.filePath,name);var HostClass=function(){};return HostClass.overriddenName=name,HostClass},CompileMetadataResolver.prototype.getRendererType=function(dirType){return dirType instanceof StaticSymbol?this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath),rendererTypeName(dirType)):{}},CompileMetadataResolver.prototype.getComponentFactory=function(selector,dirType,inputs,outputs){if(dirType instanceof StaticSymbol)return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath),componentFactoryName(dirType));var hostView=this.getHostComponentViewClass(dirType);return _angular_core.ɵccf(selector,dirType,hostView,inputs,outputs,[])},CompileMetadataResolver.prototype.initComponentFactory=function(factory,ngContentSelectors){factory instanceof StaticSymbol||(_a=factory.ngContentSelectors).push.apply(_a,ngContentSelectors);var _a},CompileMetadataResolver.prototype._loadSummary=function(type,kind){var typeSummary=this._summaryCache.get(type);if(!typeSummary){var summary=this._summaryResolver.resolveSummary(type);typeSummary=summary?summary.type:null,this._summaryCache.set(type,typeSummary||null)}return typeSummary&&typeSummary.summaryKind===kind?typeSummary:null},CompileMetadataResolver.prototype.loadDirectiveMetadata=function(ngModuleType,directiveType,isSync){var _this=this;if(this._directiveCache.has(directiveType))return null;directiveType=_angular_core.resolveForwardRef(directiveType);var _a=this.getNonNormalizedDirectiveMetadata(directiveType),annotation=_a.annotation,metadata=_a.metadata,createDirectiveMetadata=function(templateMetadata){var normalizedDirMeta=new CompileDirectiveMetadata({isHost:!1,type:metadata.type,isComponent:metadata.isComponent,selector:metadata.selector,exportAs:metadata.exportAs,changeDetection:metadata.changeDetection,inputs:metadata.inputs,outputs:metadata.outputs,hostListeners:metadata.hostListeners,hostProperties:metadata.hostProperties,hostAttributes:metadata.hostAttributes,providers:metadata.providers,viewProviders:metadata.viewProviders,queries:metadata.queries,viewQueries:metadata.viewQueries,entryComponents:metadata.entryComponents,componentViewType:metadata.componentViewType,rendererType:metadata.rendererType,componentFactory:metadata.componentFactory,template:templateMetadata});return templateMetadata&&_this.initComponentFactory(metadata.componentFactory,templateMetadata.ngContentSelectors),_this._directiveCache.set(directiveType,normalizedDirMeta),_this._summaryCache.set(directiveType,normalizedDirMeta.toSummary()),null};if(metadata.isComponent){var template=metadata.template,templateMeta=this._directiveNormalizer.normalizeTemplate({ngModuleType:ngModuleType,componentType:directiveType,moduleUrl:this._reflector.componentModuleUrl(directiveType,annotation),encapsulation:template.encapsulation,template:template.template,templateUrl:template.templateUrl,styles:template.styles,styleUrls:template.styleUrls,animations:template.animations,interpolation:template.interpolation});return _angular_core.ɵisPromise(templateMeta)&&isSync?(this._reportError(componentStillLoadingError(directiveType),directiveType),null):SyncAsync.then(templateMeta,createDirectiveMetadata)}return createDirectiveMetadata(null),null},CompileMetadataResolver.prototype.getNonNormalizedDirectiveMetadata=function(directiveType){var _this=this;if(!(directiveType=_angular_core.resolveForwardRef(directiveType)))return null;var cacheEntry=this._nonNormalizedDirectiveCache.get(directiveType);if(cacheEntry)return cacheEntry;var dirMeta=this._directiveResolver.resolve(directiveType,!1);if(!dirMeta)return null;var nonNormalizedTemplateMetadata=void 0;if(dirMeta instanceof _angular_core.Component){assertArrayOfStrings("styles",dirMeta.styles),assertArrayOfStrings("styleUrls",dirMeta.styleUrls),assertInterpolationSymbols("interpolation",dirMeta.interpolation);var animations=dirMeta.animations;nonNormalizedTemplateMetadata=new CompileTemplateMetadata({encapsulation:noUndefined(dirMeta.encapsulation),template:noUndefined(dirMeta.template),templateUrl:noUndefined(dirMeta.templateUrl),styles:dirMeta.styles||[],styleUrls:dirMeta.styleUrls||[],animations:animations||[],interpolation:noUndefined(dirMeta.interpolation),isInline:!!dirMeta.template,externalStylesheets:[],ngContentSelectors:[]})}var changeDetectionStrategy=null,viewProviders=[],entryComponentMetadata=[],selector=dirMeta.selector;dirMeta instanceof _angular_core.Component?(changeDetectionStrategy=dirMeta.changeDetection,dirMeta.viewProviders&&(viewProviders=this._getProvidersMetadata(dirMeta.viewProviders,entryComponentMetadata,'viewProviders for "'+stringifyType(directiveType)+'"',[],directiveType)),dirMeta.entryComponents&&(entryComponentMetadata=flattenAndDedupeArray(dirMeta.entryComponents).map(function(type){return _this._getEntryComponentMetadata(type)}).concat(entryComponentMetadata)),selector||(selector=this._schemaRegistry.getDefaultComponentElementName())):selector||(this._reportError(syntaxError("Directive "+stringifyType(directiveType)+" has no selector, please add it!"),directiveType),selector="error");var providers=[];null!=dirMeta.providers&&(providers=this._getProvidersMetadata(dirMeta.providers,entryComponentMetadata,'providers for "'+stringifyType(directiveType)+'"',[],directiveType));var queries=[],viewQueries=[];null!=dirMeta.queries&&(queries=this._getQueriesMetadata(dirMeta.queries,!1,directiveType),viewQueries=this._getQueriesMetadata(dirMeta.queries,!0,directiveType));var metadata=CompileDirectiveMetadata.create({isHost:!1,selector:selector,exportAs:noUndefined(dirMeta.exportAs),isComponent:!!nonNormalizedTemplateMetadata,type:this._getTypeMetadata(directiveType),template:nonNormalizedTemplateMetadata,changeDetection:changeDetectionStrategy,inputs:dirMeta.inputs||[],outputs:dirMeta.outputs||[],host:dirMeta.host||{},providers:providers||[],viewProviders:viewProviders||[],queries:queries||[],viewQueries:viewQueries||[],entryComponents:entryComponentMetadata,componentViewType:nonNormalizedTemplateMetadata?this.getComponentViewClass(directiveType):null,rendererType:nonNormalizedTemplateMetadata?this.getRendererType(directiveType):null,componentFactory:null});return nonNormalizedTemplateMetadata&&(metadata.componentFactory=this.getComponentFactory(selector,directiveType,metadata.inputs,metadata.outputs)),cacheEntry={metadata:metadata,annotation:dirMeta},this._nonNormalizedDirectiveCache.set(directiveType,cacheEntry),cacheEntry},CompileMetadataResolver.prototype.getDirectiveMetadata=function(directiveType){var dirMeta=this._directiveCache.get(directiveType);return dirMeta||this._reportError(syntaxError("Illegal state: getDirectiveMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Directive "+stringifyType(directiveType)+"."),directiveType),dirMeta},CompileMetadataResolver.prototype.getDirectiveSummary=function(dirType){var dirSummary=this._loadSummary(dirType,CompileSummaryKind.Directive);return dirSummary||this._reportError(syntaxError("Illegal state: Could not load the summary for directive "+stringifyType(dirType)+"."),dirType),dirSummary},CompileMetadataResolver.prototype.isDirective=function(type){return!!this._loadSummary(type,CompileSummaryKind.Directive)||this._directiveResolver.isDirective(type)},CompileMetadataResolver.prototype.isPipe=function(type){return!!this._loadSummary(type,CompileSummaryKind.Pipe)||this._pipeResolver.isPipe(type)},CompileMetadataResolver.prototype.isNgModule=function(type){return!!this._loadSummary(type,CompileSummaryKind.NgModule)||this._ngModuleResolver.isNgModule(type)},CompileMetadataResolver.prototype.getNgModuleSummary=function(moduleType){var moduleSummary=this._loadSummary(moduleType,CompileSummaryKind.NgModule);if(!moduleSummary){var moduleMeta=this.getNgModuleMetadata(moduleType,!1);moduleSummary=moduleMeta?moduleMeta.toSummary():null,moduleSummary&&this._summaryCache.set(moduleType,moduleSummary)}return moduleSummary},CompileMetadataResolver.prototype.loadNgModuleDirectiveAndPipeMetadata=function(moduleType,isSync,throwIfNotFound){var _this=this;void 0===throwIfNotFound&&(throwIfNotFound=!0);var ngModule=this.getNgModuleMetadata(moduleType,throwIfNotFound),loading=[];return ngModule&&(ngModule.declaredDirectives.forEach(function(id){var promise=_this.loadDirectiveMetadata(moduleType,id.reference,isSync);promise&&loading.push(promise)}),ngModule.declaredPipes.forEach(function(id){return _this._loadPipeMetadata(id.reference)})),Promise.all(loading)},CompileMetadataResolver.prototype.getNgModuleMetadata=function(moduleType,throwIfNotFound){var _this=this;void 0===throwIfNotFound&&(throwIfNotFound=!0),moduleType=_angular_core.resolveForwardRef(moduleType);var compileMeta=this._ngModuleCache.get(moduleType);if(compileMeta)return compileMeta;var meta=this._ngModuleResolver.resolve(moduleType,throwIfNotFound);if(!meta)return null;var declaredDirectives=[],exportedNonModuleIdentifiers=[],declaredPipes=[],importedModules=[],exportedModules=[],providers=[],entryComponents=[],bootstrapComponents=[],schemas=[];meta.imports&&flattenAndDedupeArray(meta.imports).forEach(function(importedType){var importedModuleType=void 0;if(isValidType(importedType))importedModuleType=importedType;else if(importedType&&importedType.ngModule){var moduleWithProviders=importedType;importedModuleType=moduleWithProviders.ngModule,moduleWithProviders.providers&&providers.push.apply(providers,_this._getProvidersMetadata(moduleWithProviders.providers,entryComponents,"provider for the NgModule '"+stringifyType(importedModuleType)+"'",[],importedType))}if(!importedModuleType)return void _this._reportError(syntaxError("Unexpected value '"+stringifyType(importedType)+"' imported by the module '"+stringifyType(moduleType)+"'"),moduleType);if(!_this._checkSelfImport(moduleType,importedModuleType)){var importedModuleSummary=_this.getNgModuleSummary(importedModuleType);if(!importedModuleSummary)return void _this._reportError(syntaxError("Unexpected "+_this._getTypeDescriptor(importedType)+" '"+stringifyType(importedType)+"' imported by the module '"+stringifyType(moduleType)+"'. Please add a @NgModule annotation."),moduleType);importedModules.push(importedModuleSummary)}}),meta.exports&&flattenAndDedupeArray(meta.exports).forEach(function(exportedType){if(!isValidType(exportedType))return void _this._reportError(syntaxError("Unexpected value '"+stringifyType(exportedType)+"' exported by the module '"+stringifyType(moduleType)+"'"),moduleType);var exportedModuleSummary=_this.getNgModuleSummary(exportedType);exportedModuleSummary?exportedModules.push(exportedModuleSummary):exportedNonModuleIdentifiers.push(_this._getIdentifierMetadata(exportedType))});var transitiveModule=this._getTransitiveNgModuleMetadata(importedModules,exportedModules);meta.declarations&&flattenAndDedupeArray(meta.declarations).forEach(function(declaredType){if(!isValidType(declaredType))return void _this._reportError(syntaxError("Unexpected value '"+stringifyType(declaredType)+"' declared by the module '"+stringifyType(moduleType)+"'"),moduleType);var declaredIdentifier=_this._getIdentifierMetadata(declaredType);if(_this.isDirective(declaredType))transitiveModule.addDirective(declaredIdentifier),declaredDirectives.push(declaredIdentifier),_this._addTypeToModule(declaredType,moduleType);else{if(!_this.isPipe(declaredType))return void _this._reportError(syntaxError("Unexpected "+_this._getTypeDescriptor(declaredType)+" '"+stringifyType(declaredType)+"' declared by the module '"+stringifyType(moduleType)+"'. Please add a @Pipe/@Directive/@Component annotation."),moduleType);transitiveModule.addPipe(declaredIdentifier),transitiveModule.pipes.push(declaredIdentifier),declaredPipes.push(declaredIdentifier),_this._addTypeToModule(declaredType,moduleType)}});var exportedDirectives=[],exportedPipes=[];return exportedNonModuleIdentifiers.forEach(function(exportedId){if(transitiveModule.directivesSet.has(exportedId.reference))exportedDirectives.push(exportedId),transitiveModule.addExportedDirective(exportedId);else{if(!transitiveModule.pipesSet.has(exportedId.reference))return void _this._reportError(syntaxError("Can't export "+_this._getTypeDescriptor(exportedId.reference)+" "+stringifyType(exportedId.reference)+" from "+stringifyType(moduleType)+" as it was neither declared nor imported!"),moduleType);exportedPipes.push(exportedId),transitiveModule.addExportedPipe(exportedId)}}),meta.providers&&providers.push.apply(providers,this._getProvidersMetadata(meta.providers,entryComponents,"provider for the NgModule '"+stringifyType(moduleType)+"'",[],moduleType)),meta.entryComponents&&entryComponents.push.apply(entryComponents,flattenAndDedupeArray(meta.entryComponents).map(function(type){return _this._getEntryComponentMetadata(type)})),meta.bootstrap&&flattenAndDedupeArray(meta.bootstrap).forEach(function(type){if(!isValidType(type))return void _this._reportError(syntaxError("Unexpected value '"+stringifyType(type)+"' used in the bootstrap property of module '"+stringifyType(moduleType)+"'"),moduleType);bootstrapComponents.push(_this._getIdentifierMetadata(type))}),entryComponents.push.apply(entryComponents,bootstrapComponents.map(function(type){return _this._getEntryComponentMetadata(type.reference)})),meta.schemas&&schemas.push.apply(schemas,flattenAndDedupeArray(meta.schemas)),compileMeta=new CompileNgModuleMetadata({type:this._getTypeMetadata(moduleType),providers:providers,entryComponents:entryComponents,bootstrapComponents:bootstrapComponents,schemas:schemas,declaredDirectives:declaredDirectives,exportedDirectives:exportedDirectives,declaredPipes:declaredPipes,exportedPipes:exportedPipes,importedModules:importedModules,exportedModules:exportedModules,transitiveModule:transitiveModule,id:meta.id||null}),entryComponents.forEach(function(id){return transitiveModule.addEntryComponent(id)}),providers.forEach(function(provider){return transitiveModule.addProvider(provider,compileMeta.type)}),transitiveModule.addModule(compileMeta.type),this._ngModuleCache.set(moduleType,compileMeta),compileMeta},CompileMetadataResolver.prototype._checkSelfImport=function(moduleType,importedModuleType){return moduleType===importedModuleType&&(this._reportError(syntaxError("'"+stringifyType(moduleType)+"' module can't import itself"),moduleType),!0)},CompileMetadataResolver.prototype._getTypeDescriptor=function(type){return this.isDirective(type)?"directive":this.isPipe(type)?"pipe":this.isNgModule(type)?"module":type.provide?"provider":"value"},CompileMetadataResolver.prototype._addTypeToModule=function(type,moduleType){var oldModule=this._ngModuleOfTypes.get(type);if(oldModule&&oldModule!==moduleType)return void this._reportError(syntaxError("Type "+stringifyType(type)+" is part of the declarations of 2 modules: "+stringifyType(oldModule)+" and "+stringifyType(moduleType)+"! Please consider moving "+stringifyType(type)+" to a higher module that imports "+stringifyType(oldModule)+" and "+stringifyType(moduleType)+". You can also create a new NgModule that exports and includes "+stringifyType(type)+" then import that NgModule in "+stringifyType(oldModule)+" and "+stringifyType(moduleType)+"."),moduleType);this._ngModuleOfTypes.set(type,moduleType)},CompileMetadataResolver.prototype._getTransitiveNgModuleMetadata=function(importedModules,exportedModules){var result=new TransitiveCompileNgModuleMetadata,modulesByToken=new Map;return importedModules.concat(exportedModules).forEach(function(modSummary){modSummary.modules.forEach(function(mod){return result.addModule(mod)}),modSummary.entryComponents.forEach(function(comp){return result.addEntryComponent(comp)});var addedTokens=new Set;modSummary.providers.forEach(function(entry){var tokenRef=tokenReference(entry.provider.token),prevModules=modulesByToken.get(tokenRef);prevModules||(prevModules=new Set,modulesByToken.set(tokenRef,prevModules));var moduleRef=entry.module.reference;!addedTokens.has(tokenRef)&&prevModules.has(moduleRef)||(prevModules.add(moduleRef),addedTokens.add(tokenRef),result.addProvider(entry.provider,entry.module))})}),exportedModules.forEach(function(modSummary){modSummary.exportedDirectives.forEach(function(id){return result.addExportedDirective(id)}),modSummary.exportedPipes.forEach(function(id){return result.addExportedPipe(id)})}),importedModules.forEach(function(modSummary){modSummary.exportedDirectives.forEach(function(id){return result.addDirective(id)}),modSummary.exportedPipes.forEach(function(id){return result.addPipe(id)})}),result},CompileMetadataResolver.prototype._getIdentifierMetadata=function(type){return type=_angular_core.resolveForwardRef(type),{reference:type}},CompileMetadataResolver.prototype.isInjectable=function(type){return this._reflector.annotations(type).some(function(ann){return ann.constructor===_angular_core.Injectable})},CompileMetadataResolver.prototype.getInjectableSummary=function(type){return{summaryKind:CompileSummaryKind.Injectable,type:this._getTypeMetadata(type,null,!1)}},CompileMetadataResolver.prototype._getInjectableMetadata=function(type,dependencies){void 0===dependencies&&(dependencies=null);var typeSummary=this._loadSummary(type,CompileSummaryKind.Injectable);return typeSummary?typeSummary.type:this._getTypeMetadata(type,dependencies)},CompileMetadataResolver.prototype._getTypeMetadata=function(type,dependencies,throwOnUnknownDeps){void 0===dependencies&&(dependencies=null),void 0===throwOnUnknownDeps&&(throwOnUnknownDeps=!0);var identifier=this._getIdentifierMetadata(type);return{reference:identifier.reference,diDeps:this._getDependenciesMetadata(identifier.reference,dependencies,throwOnUnknownDeps),lifecycleHooks:getAllLifecycleHooks(this._reflector,identifier.reference)}},CompileMetadataResolver.prototype._getFactoryMetadata=function(factory,dependencies){return void 0===dependencies&&(dependencies=null),factory=_angular_core.resolveForwardRef(factory),{reference:factory,diDeps:this._getDependenciesMetadata(factory,dependencies)}},CompileMetadataResolver.prototype.getPipeMetadata=function(pipeType){var pipeMeta=this._pipeCache.get(pipeType);return pipeMeta||this._reportError(syntaxError("Illegal state: getPipeMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Pipe "+stringifyType(pipeType)+"."),pipeType),pipeMeta||null},CompileMetadataResolver.prototype.getPipeSummary=function(pipeType){var pipeSummary=this._loadSummary(pipeType,CompileSummaryKind.Pipe);return pipeSummary||this._reportError(syntaxError("Illegal state: Could not load the summary for pipe "+stringifyType(pipeType)+"."),pipeType),pipeSummary},CompileMetadataResolver.prototype.getOrLoadPipeMetadata=function(pipeType){var pipeMeta=this._pipeCache.get(pipeType);return pipeMeta||(pipeMeta=this._loadPipeMetadata(pipeType)),pipeMeta},CompileMetadataResolver.prototype._loadPipeMetadata=function(pipeType){pipeType=_angular_core.resolveForwardRef(pipeType);var pipeAnnotation=this._pipeResolver.resolve(pipeType),pipeMeta=new CompilePipeMetadata({type:this._getTypeMetadata(pipeType),name:pipeAnnotation.name,pure:!!pipeAnnotation.pure});return this._pipeCache.set(pipeType,pipeMeta),this._summaryCache.set(pipeType,pipeMeta.toSummary()),pipeMeta},CompileMetadataResolver.prototype._getDependenciesMetadata=function(typeOrFunc,dependencies,throwOnUnknownDeps){var _this=this;void 0===throwOnUnknownDeps&&(throwOnUnknownDeps=!0);var hasUnknownDeps=!1,params=dependencies||this._reflector.parameters(typeOrFunc)||[],dependenciesMetadata=params.map(function(param){var isAttribute=!1,isHost=!1,isSelf=!1,isSkipSelf=!1,isOptional=!1,token=null;return Array.isArray(param)?param.forEach(function(paramEntry){paramEntry instanceof _angular_core.Host?isHost=!0:paramEntry instanceof _angular_core.Self?isSelf=!0:paramEntry instanceof _angular_core.SkipSelf?isSkipSelf=!0:paramEntry instanceof _angular_core.Optional?isOptional=!0:paramEntry instanceof _angular_core.Attribute?(isAttribute=!0,token=paramEntry.attributeName):paramEntry instanceof _angular_core.Inject?token=paramEntry.token:paramEntry instanceof _angular_core.InjectionToken?token=paramEntry:isValidType(paramEntry)&&null==token&&(token=paramEntry)}):token=param,null==token?(hasUnknownDeps=!0,null):{isAttribute:isAttribute,isHost:isHost,isSelf:isSelf,isSkipSelf:isSkipSelf,isOptional:isOptional,token:_this._getTokenMetadata(token)}});if(hasUnknownDeps){var depsTokens=dependenciesMetadata.map(function(dep){return dep?stringifyType(dep.token):"?"}).join(", "),message="Can't resolve all parameters for "+stringifyType(typeOrFunc)+": ("+depsTokens+").";throwOnUnknownDeps?this._reportError(syntaxError(message),typeOrFunc):this._console.warn("Warning: "+message+" This will become an error in Angular v5.x")}return dependenciesMetadata},CompileMetadataResolver.prototype._getTokenMetadata=function(token){token=_angular_core.resolveForwardRef(token);return"string"==typeof token?{value:token}:{identifier:{reference:token}}},CompileMetadataResolver.prototype._getProvidersMetadata=function(providers,targetEntryComponents,debugInfo,compileProviders,type){var _this=this;return void 0===compileProviders&&(compileProviders=[]),providers.forEach(function(provider,providerIdx){if(Array.isArray(provider))_this._getProvidersMetadata(provider,targetEntryComponents,debugInfo,compileProviders);else{provider=_angular_core.resolveForwardRef(provider);var providerMeta=void 0;if(provider&&"object"==typeof provider&&provider.hasOwnProperty("provide"))_this._validateProvider(provider),providerMeta=new ProviderMeta(provider.provide,provider);else{if(!isValidType(provider)){if(void 0===provider)return void _this._reportError(syntaxError("Encountered undefined provider! Usually this means you have a circular dependencies (might be caused by using 'barrel' index.ts files."));var providersInfo=providers.reduce(function(soFar,seenProvider,seenProviderIdx){return seenProviderIdx<providerIdx?soFar.push(""+stringifyType(seenProvider)):seenProviderIdx==providerIdx?soFar.push("?"+stringifyType(seenProvider)+"?"):seenProviderIdx==providerIdx+1&&soFar.push("..."),soFar},[]).join(", ");return void _this._reportError(syntaxError("Invalid "+(debugInfo||"provider")+" - only instances of Provider and Type are allowed, got: ["+providersInfo+"]"),type)}providerMeta=new ProviderMeta(provider,{useClass:provider})}providerMeta.token===_this._reflector.resolveExternalReference(Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS)?targetEntryComponents.push.apply(targetEntryComponents,_this._getEntryComponentsFromProvider(providerMeta,type)):compileProviders.push(_this.getProviderMetadata(providerMeta))}}),compileProviders},CompileMetadataResolver.prototype._validateProvider=function(provider){provider.hasOwnProperty("useClass")&&null==provider.useClass&&this._reportError(syntaxError("Invalid provider for "+stringifyType(provider.provide)+". useClass cannot be "+provider.useClass+".\n Usually it happens when:\n 1. There's a circular dependency (might be caused by using index.ts (barrel) files).\n 2. Class was used before it was declared. Use forwardRef in this case."))},CompileMetadataResolver.prototype._getEntryComponentsFromProvider=function(provider,type){var _this=this,components=[],collectedIdentifiers=[];return provider.useFactory||provider.useExisting||provider.useClass?(this._reportError(syntaxError("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports useValue!"),type),[]):provider.multi?(extractIdentifiers(provider.useValue,collectedIdentifiers),collectedIdentifiers.forEach(function(identifier){var entry=_this._getEntryComponentMetadata(identifier.reference,!1);entry&&components.push(entry)}),components):(this._reportError(syntaxError("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports 'multi = true'!"),type),[])},CompileMetadataResolver.prototype._getEntryComponentMetadata=function(dirType,throwIfNotFound){void 0===throwIfNotFound&&(throwIfNotFound=!0);var dirMeta=this.getNonNormalizedDirectiveMetadata(dirType);if(dirMeta&&dirMeta.metadata.isComponent)return{componentType:dirType,componentFactory:dirMeta.metadata.componentFactory};var dirSummary=this._loadSummary(dirType,CompileSummaryKind.Directive);if(dirSummary&&dirSummary.isComponent)return{componentType:dirType,componentFactory:dirSummary.componentFactory};if(throwIfNotFound)throw syntaxError(dirType.name+" cannot be used as an entry component.");return null},CompileMetadataResolver.prototype.getProviderMetadata=function(provider){var compileDeps=void 0,compileTypeMetadata=null,compileFactoryMetadata=null,token=this._getTokenMetadata(provider.token);return provider.useClass?(compileTypeMetadata=this._getInjectableMetadata(provider.useClass,provider.dependencies),compileDeps=compileTypeMetadata.diDeps,provider.token===provider.useClass&&(token={identifier:compileTypeMetadata})):provider.useFactory&&(compileFactoryMetadata=this._getFactoryMetadata(provider.useFactory,provider.dependencies),compileDeps=compileFactoryMetadata.diDeps),{token:token,useClass:compileTypeMetadata,useValue:provider.useValue,useFactory:compileFactoryMetadata,useExisting:provider.useExisting?this._getTokenMetadata(provider.useExisting):void 0,deps:compileDeps,multi:provider.multi}},CompileMetadataResolver.prototype._getQueriesMetadata=function(queries,isViewQuery,directiveType){var _this=this,res=[];return Object.keys(queries).forEach(function(propertyName){var query=queries[propertyName];query.isViewQuery===isViewQuery&&res.push(_this._getQueryMetadata(query,propertyName,directiveType))}),res},CompileMetadataResolver.prototype._queryVarBindings=function(selector){return selector.split(/\s*,\s*/)},CompileMetadataResolver.prototype._getQueryMetadata=function(q,propertyName,typeOrFunc){var selectors,_this=this;return"string"==typeof q.selector?selectors=this._queryVarBindings(q.selector).map(function(varName){return _this._getTokenMetadata(varName)}):q.selector?selectors=[this._getTokenMetadata(q.selector)]:(this._reportError(syntaxError("Can't construct a query for the property \""+propertyName+'" of "'+stringifyType(typeOrFunc)+"\" since the query selector wasn't defined."),typeOrFunc),selectors=[]),{selectors:selectors,first:q.first,descendants:q.descendants,propertyName:propertyName,read:q.read?this._getTokenMetadata(q.read):null}},CompileMetadataResolver.prototype._reportError=function(error,type,otherType){if(!this._errorCollector)throw error;this._errorCollector(error,type),otherType&&this._errorCollector(error,otherType)},CompileMetadataResolver}();CompileMetadataResolver.decorators=[{type:CompilerInjectable}],CompileMetadataResolver.ctorParameters=function(){return[{type:CompilerConfig},{type:NgModuleResolver},{type:DirectiveResolver},{type:PipeResolver},{type:SummaryResolver},{type:ElementSchemaRegistry},{type:DirectiveNormalizer},{type:_angular_core.ɵConsole},{type:StaticSymbolCache,decorators:[{type:_angular_core.Optional}]},{type:CompileReflector},{type:void 0,decorators:[{type:_angular_core.Optional},{type:_angular_core.Inject,args:[ERROR_COLLECTOR_TOKEN]}]}]};var _CompileValueConverter=function(_super){function _CompileValueConverter(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(_CompileValueConverter,_super),_CompileValueConverter.prototype.visitOther=function(value,targetIdentifiers){targetIdentifiers.push({reference:value})},_CompileValueConverter}(ValueTransformer),TypeModifier={};TypeModifier.Const=0,TypeModifier[TypeModifier.Const]="Const";var Type$1=function(){function Type$1(modifiers){void 0===modifiers&&(modifiers=null),this.modifiers=modifiers,modifiers||(this.modifiers=[])}return Type$1.prototype.visitType=function(visitor,context){},Type$1.prototype.hasModifier=function(modifier){return-1!==this.modifiers.indexOf(modifier)},Type$1}(),BuiltinTypeName={};BuiltinTypeName.Dynamic=0,BuiltinTypeName.Bool=1,BuiltinTypeName.String=2,BuiltinTypeName.Int=3,BuiltinTypeName.Number=4,BuiltinTypeName.Function=5,BuiltinTypeName.Inferred=6,BuiltinTypeName[BuiltinTypeName.Dynamic]="Dynamic",BuiltinTypeName[BuiltinTypeName.Bool]="Bool",BuiltinTypeName[BuiltinTypeName.String]="String",BuiltinTypeName[BuiltinTypeName.Int]="Int",BuiltinTypeName[BuiltinTypeName.Number]="Number",BuiltinTypeName[BuiltinTypeName.Function]="Function",BuiltinTypeName[BuiltinTypeName.Inferred]="Inferred";var BuiltinType=function(_super){function BuiltinType(name,modifiers){void 0===modifiers&&(modifiers=null);var _this=_super.call(this,modifiers)||this;return _this.name=name,_this}return __extends(BuiltinType,_super),BuiltinType.prototype.visitType=function(visitor,context){return visitor.visitBuiltintType(this,context)},BuiltinType}(Type$1),ExpressionType=function(_super){function ExpressionType(value,modifiers){void 0===modifiers&&(modifiers=null);var _this=_super.call(this,modifiers)||this;return _this.value=value,_this}return __extends(ExpressionType,_super),ExpressionType.prototype.visitType=function(visitor,context){return visitor.visitExpressionType(this,context)},ExpressionType}(Type$1),ArrayType=function(_super){function ArrayType(of,modifiers){void 0===modifiers&&(modifiers=null);var _this=_super.call(this,modifiers)||this;return _this.of=of,_this}return __extends(ArrayType,_super),ArrayType.prototype.visitType=function(visitor,context){return visitor.visitArrayType(this,context)},ArrayType}(Type$1),MapType=function(_super){function MapType(valueType,modifiers){void 0===modifiers&&(modifiers=null);var _this=_super.call(this,modifiers)||this;return _this.valueType=valueType||null,_this}return __extends(MapType,_super),MapType.prototype.visitType=function(visitor,context){return visitor.visitMapType(this,context)},MapType}(Type$1),DYNAMIC_TYPE=new BuiltinType(BuiltinTypeName.Dynamic),INFERRED_TYPE=new BuiltinType(BuiltinTypeName.Inferred),BOOL_TYPE=new BuiltinType(BuiltinTypeName.Bool),BinaryOperator=(new BuiltinType(BuiltinTypeName.Int),new BuiltinType(BuiltinTypeName.Number),new BuiltinType(BuiltinTypeName.String),new BuiltinType(BuiltinTypeName.Function),{});BinaryOperator.Equals=0,BinaryOperator.NotEquals=1,BinaryOperator.Identical=2,BinaryOperator.NotIdentical=3,BinaryOperator.Minus=4,BinaryOperator.Plus=5,BinaryOperator.Divide=6,BinaryOperator.Multiply=7,BinaryOperator.Modulo=8,BinaryOperator.And=9,BinaryOperator.Or=10,BinaryOperator.Lower=11,BinaryOperator.LowerEquals=12,BinaryOperator.Bigger=13,BinaryOperator.BiggerEquals=14,BinaryOperator[BinaryOperator.Equals]="Equals",BinaryOperator[BinaryOperator.NotEquals]="NotEquals",BinaryOperator[BinaryOperator.Identical]="Identical",BinaryOperator[BinaryOperator.NotIdentical]="NotIdentical",BinaryOperator[BinaryOperator.Minus]="Minus",BinaryOperator[BinaryOperator.Plus]="Plus",BinaryOperator[BinaryOperator.Divide]="Divide",BinaryOperator[BinaryOperator.Multiply]="Multiply",BinaryOperator[BinaryOperator.Modulo]="Modulo",BinaryOperator[BinaryOperator.And]="And",BinaryOperator[BinaryOperator.Or]="Or",BinaryOperator[BinaryOperator.Lower]="Lower",BinaryOperator[BinaryOperator.LowerEquals]="LowerEquals",BinaryOperator[BinaryOperator.Bigger]="Bigger",BinaryOperator[BinaryOperator.BiggerEquals]="BiggerEquals";var Expression=function(){function Expression(type,sourceSpan){this.type=type||null,this.sourceSpan=sourceSpan||null}return Expression.prototype.visitExpression=function(visitor,context){},Expression.prototype.prop=function(name,sourceSpan){return new ReadPropExpr(this,name,null,sourceSpan)},Expression.prototype.key=function(index,type,sourceSpan){return new ReadKeyExpr(this,index,type,sourceSpan)},Expression.prototype.callMethod=function(name,params,sourceSpan){return new InvokeMethodExpr(this,name,params,null,sourceSpan)},Expression.prototype.callFn=function(params,sourceSpan){return new InvokeFunctionExpr(this,params,null,sourceSpan)},Expression.prototype.instantiate=function(params,type,sourceSpan){return new InstantiateExpr(this,params,type,sourceSpan)},Expression.prototype.conditional=function(trueCase,falseCase,sourceSpan){return void 0===falseCase&&(falseCase=null),new ConditionalExpr(this,trueCase,falseCase,null,sourceSpan)},Expression.prototype.equals=function(rhs,sourceSpan){return new BinaryOperatorExpr(BinaryOperator.Equals,this,rhs,null,sourceSpan)},Expression.prototype.notEquals=function(rhs,sourceSpan){return new BinaryOperatorExpr(BinaryOperator.NotEquals,this,rhs,null,sourceSpan)},Expression.prototype.identical=function(rhs,sourceSpan){return new BinaryOperatorExpr(BinaryOperator.Identical,this,rhs,null,sourceSpan)},Expression.prototype.notIdentical=function(rhs,sourceSpan){return new BinaryOperatorExpr(BinaryOperator.NotIdentical,this,rhs,null,sourceSpan)},Expression.prototype.minus=function(rhs,sourceSpan){return new BinaryOperatorExpr(BinaryOperator.Minus,this,rhs,null,sourceSpan)},Expression.prototype.plus=function(rhs,sourceSpan){return new BinaryOperatorExpr(BinaryOperator.Plus,this,rhs,null,sourceSpan)},Expression.prototype.divide=function(rhs,sourceSpan){return new BinaryOperatorExpr(BinaryOperator.Divide,this,rhs,null,sourceSpan)},Expression.prototype.multiply=function(rhs,sourceSpan){return new BinaryOperatorExpr(BinaryOperator.Multiply,this,rhs,null,sourceSpan)},Expression.prototype.modulo=function(rhs,sourceSpan){return new BinaryOperatorExpr(BinaryOperator.Modulo,this,rhs,null,sourceSpan)},Expression.prototype.and=function(rhs,sourceSpan){return new BinaryOperatorExpr(BinaryOperator.And,this,rhs,null,sourceSpan)},Expression.prototype.or=function(rhs,sourceSpan){return new BinaryOperatorExpr(BinaryOperator.Or,this,rhs,null,sourceSpan)},Expression.prototype.lower=function(rhs,sourceSpan){return new BinaryOperatorExpr(BinaryOperator.Lower,this,rhs,null,sourceSpan)},Expression.prototype.lowerEquals=function(rhs,sourceSpan){return new BinaryOperatorExpr(BinaryOperator.LowerEquals,this,rhs,null,sourceSpan)},Expression.prototype.bigger=function(rhs,sourceSpan){return new BinaryOperatorExpr(BinaryOperator.Bigger,this,rhs,null,sourceSpan)},Expression.prototype.biggerEquals=function(rhs,sourceSpan){return new BinaryOperatorExpr(BinaryOperator.BiggerEquals,this,rhs,null,sourceSpan)},Expression.prototype.isBlank=function(sourceSpan){return this.equals(TYPED_NULL_EXPR,sourceSpan)},Expression.prototype.cast=function(type,sourceSpan){return new CastExpr(this,type,sourceSpan)},Expression.prototype.toStmt=function(){return new ExpressionStatement(this,null)},Expression}(),BuiltinVar={};BuiltinVar.This=0,BuiltinVar.Super=1,BuiltinVar.CatchError=2,BuiltinVar.CatchStack=3,BuiltinVar[BuiltinVar.This]="This",BuiltinVar[BuiltinVar.Super]="Super",BuiltinVar[BuiltinVar.CatchError]="CatchError",BuiltinVar[BuiltinVar.CatchStack]="CatchStack";var ReadVarExpr=function(_super){function ReadVarExpr(name,type,sourceSpan){var _this=_super.call(this,type,sourceSpan)||this;return"string"==typeof name?(_this.name=name,_this.builtin=null):(_this.name=null,_this.builtin=name),_this}return __extends(ReadVarExpr,_super),ReadVarExpr.prototype.visitExpression=function(visitor,context){return visitor.visitReadVarExpr(this,context)},ReadVarExpr.prototype.set=function(value){if(!this.name)throw new Error("Built in variable "+this.builtin+" can not be assigned to.");return new WriteVarExpr(this.name,value,null,this.sourceSpan)},ReadVarExpr}(Expression),WriteVarExpr=function(_super){function WriteVarExpr(name,value,type,sourceSpan){var _this=_super.call(this,type||value.type,sourceSpan)||this;return _this.name=name,_this.value=value,_this}return __extends(WriteVarExpr,_super),WriteVarExpr.prototype.visitExpression=function(visitor,context){return visitor.visitWriteVarExpr(this,context)},WriteVarExpr.prototype.toDeclStmt=function(type,modifiers){return new DeclareVarStmt(this.name,this.value,type,modifiers,this.sourceSpan)},WriteVarExpr}(Expression),WriteKeyExpr=function(_super){function WriteKeyExpr(receiver,index,value,type,sourceSpan){var _this=_super.call(this,type||value.type,sourceSpan)||this;return _this.receiver=receiver,_this.index=index,_this.value=value,_this}return __extends(WriteKeyExpr,_super),WriteKeyExpr.prototype.visitExpression=function(visitor,context){return visitor.visitWriteKeyExpr(this,context)},WriteKeyExpr}(Expression),WritePropExpr=function(_super){function WritePropExpr(receiver,name,value,type,sourceSpan){var _this=_super.call(this,type||value.type,sourceSpan)||this;return _this.receiver=receiver,_this.name=name,_this.value=value,_this}return __extends(WritePropExpr,_super),WritePropExpr.prototype.visitExpression=function(visitor,context){return visitor.visitWritePropExpr(this,context)},WritePropExpr}(Expression),BuiltinMethod={};BuiltinMethod.ConcatArray=0,BuiltinMethod.SubscribeObservable=1,BuiltinMethod.Bind=2,BuiltinMethod[BuiltinMethod.ConcatArray]="ConcatArray",BuiltinMethod[BuiltinMethod.SubscribeObservable]="SubscribeObservable",BuiltinMethod[BuiltinMethod.Bind]="Bind";var InvokeMethodExpr=function(_super){function InvokeMethodExpr(receiver,method,args,type,sourceSpan){var _this=_super.call(this,type,sourceSpan)||this;return _this.receiver=receiver,_this.args=args,"string"==typeof method?(_this.name=method,_this.builtin=null):(_this.name=null,_this.builtin=method),_this}return __extends(InvokeMethodExpr,_super),InvokeMethodExpr.prototype.visitExpression=function(visitor,context){return visitor.visitInvokeMethodExpr(this,context)},InvokeMethodExpr}(Expression),InvokeFunctionExpr=function(_super){function InvokeFunctionExpr(fn,args,type,sourceSpan){var _this=_super.call(this,type,sourceSpan)||this;return _this.fn=fn,_this.args=args,_this}return __extends(InvokeFunctionExpr,_super),InvokeFunctionExpr.prototype.visitExpression=function(visitor,context){return visitor.visitInvokeFunctionExpr(this,context)},InvokeFunctionExpr}(Expression),InstantiateExpr=function(_super){function InstantiateExpr(classExpr,args,type,sourceSpan){var _this=_super.call(this,type,sourceSpan)||this;return _this.classExpr=classExpr,_this.args=args,_this}return __extends(InstantiateExpr,_super),InstantiateExpr.prototype.visitExpression=function(visitor,context){return visitor.visitInstantiateExpr(this,context)},InstantiateExpr}(Expression),LiteralExpr=function(_super){function LiteralExpr(value,type,sourceSpan){var _this=_super.call(this,type,sourceSpan)||this;return _this.value=value,_this}return __extends(LiteralExpr,_super),LiteralExpr.prototype.visitExpression=function(visitor,context){return visitor.visitLiteralExpr(this,context)},LiteralExpr}(Expression),ExternalExpr=function(_super){function ExternalExpr(value,type,typeParams,sourceSpan){void 0===typeParams&&(typeParams=null);var _this=_super.call(this,type,sourceSpan)||this;return _this.value=value,_this.typeParams=typeParams,_this}return __extends(ExternalExpr,_super),ExternalExpr.prototype.visitExpression=function(visitor,context){return visitor.visitExternalExpr(this,context)},ExternalExpr}(Expression),ExternalReference=function(){function ExternalReference(moduleName,name,runtime){this.moduleName=moduleName,this.name=name,this.runtime=runtime}return ExternalReference}(),ConditionalExpr=function(_super){function ConditionalExpr(condition,trueCase,falseCase,type,sourceSpan){void 0===falseCase&&(falseCase=null);var _this=_super.call(this,type||trueCase.type,sourceSpan)||this;return _this.condition=condition,_this.falseCase=falseCase,_this.trueCase=trueCase,_this}return __extends(ConditionalExpr,_super),ConditionalExpr.prototype.visitExpression=function(visitor,context){return visitor.visitConditionalExpr(this,context)},ConditionalExpr}(Expression),NotExpr=function(_super){function NotExpr(condition,sourceSpan){var _this=_super.call(this,BOOL_TYPE,sourceSpan)||this;return _this.condition=condition,_this}return __extends(NotExpr,_super),NotExpr.prototype.visitExpression=function(visitor,context){return visitor.visitNotExpr(this,context)},NotExpr}(Expression),AssertNotNull=function(_super){function AssertNotNull(condition,sourceSpan){var _this=_super.call(this,condition.type,sourceSpan)||this;return _this.condition=condition,_this}return __extends(AssertNotNull,_super),AssertNotNull.prototype.visitExpression=function(visitor,context){return visitor.visitAssertNotNullExpr(this,context)},AssertNotNull}(Expression),CastExpr=function(_super){function CastExpr(value,type,sourceSpan){var _this=_super.call(this,type,sourceSpan)||this;return _this.value=value,_this}return __extends(CastExpr,_super),CastExpr.prototype.visitExpression=function(visitor,context){return visitor.visitCastExpr(this,context)},CastExpr}(Expression),FnParam=function(){function FnParam(name,type){void 0===type&&(type=null),this.name=name,this.type=type}return FnParam}(),FunctionExpr=function(_super){function FunctionExpr(params,statements,type,sourceSpan){var _this=_super.call(this,type,sourceSpan)||this;return _this.params=params,_this.statements=statements,_this}return __extends(FunctionExpr,_super),FunctionExpr.prototype.visitExpression=function(visitor,context){return visitor.visitFunctionExpr(this,context)},FunctionExpr.prototype.toDeclStmt=function(name,modifiers){return void 0===modifiers&&(modifiers=null),new DeclareFunctionStmt(name,this.params,this.statements,this.type,modifiers,this.sourceSpan)},FunctionExpr}(Expression),BinaryOperatorExpr=function(_super){function BinaryOperatorExpr(operator,lhs,rhs,type,sourceSpan){var _this=_super.call(this,type||lhs.type,sourceSpan)||this;return _this.operator=operator,_this.rhs=rhs,_this.lhs=lhs,_this}return __extends(BinaryOperatorExpr,_super),BinaryOperatorExpr.prototype.visitExpression=function(visitor,context){return visitor.visitBinaryOperatorExpr(this,context)},BinaryOperatorExpr}(Expression),ReadPropExpr=function(_super){function ReadPropExpr(receiver,name,type,sourceSpan){var _this=_super.call(this,type,sourceSpan)||this;return _this.receiver=receiver,_this.name=name,_this}return __extends(ReadPropExpr,_super),ReadPropExpr.prototype.visitExpression=function(visitor,context){return visitor.visitReadPropExpr(this,context)},ReadPropExpr.prototype.set=function(value){return new WritePropExpr(this.receiver,this.name,value,null,this.sourceSpan)},ReadPropExpr}(Expression),ReadKeyExpr=function(_super){function ReadKeyExpr(receiver,index,type,sourceSpan){var _this=_super.call(this,type,sourceSpan)||this;return _this.receiver=receiver,_this.index=index,_this}return __extends(ReadKeyExpr,_super),ReadKeyExpr.prototype.visitExpression=function(visitor,context){return visitor.visitReadKeyExpr(this,context)},ReadKeyExpr.prototype.set=function(value){return new WriteKeyExpr(this.receiver,this.index,value,null,this.sourceSpan)},ReadKeyExpr}(Expression),LiteralArrayExpr=function(_super){function LiteralArrayExpr(entries,type,sourceSpan){var _this=_super.call(this,type,sourceSpan)||this;return _this.entries=entries,_this}return __extends(LiteralArrayExpr,_super),LiteralArrayExpr.prototype.visitExpression=function(visitor,context){return visitor.visitLiteralArrayExpr(this,context)},LiteralArrayExpr}(Expression),LiteralMapEntry=function(){function LiteralMapEntry(key,value,quoted){this.key=key,this.value=value,this.quoted=quoted}return LiteralMapEntry}(),LiteralMapExpr=function(_super){function LiteralMapExpr(entries,type,sourceSpan){var _this=_super.call(this,type,sourceSpan)||this;return _this.entries=entries,_this.valueType=null,type&&(_this.valueType=type.valueType),_this}return __extends(LiteralMapExpr,_super),LiteralMapExpr.prototype.visitExpression=function(visitor,context){return visitor.visitLiteralMapExpr(this,context)},LiteralMapExpr}(Expression),CommaExpr=function(_super){function CommaExpr(parts,sourceSpan){var _this=_super.call(this,parts[parts.length-1].type,sourceSpan)||this;return _this.parts=parts,_this}return __extends(CommaExpr,_super),CommaExpr.prototype.visitExpression=function(visitor,context){return visitor.visitCommaExpr(this,context)},CommaExpr}(Expression),NULL_EXPR=(new ReadVarExpr(BuiltinVar.This,null,null),new ReadVarExpr(BuiltinVar.Super,null,null),new ReadVarExpr(BuiltinVar.CatchError,null,null),new ReadVarExpr(BuiltinVar.CatchStack,null,null),new LiteralExpr(null,null,null)),TYPED_NULL_EXPR=new LiteralExpr(null,INFERRED_TYPE,null),StmtModifier={};StmtModifier.Final=0,StmtModifier.Private=1,StmtModifier.Exported=2,StmtModifier[StmtModifier.Final]="Final",StmtModifier[StmtModifier.Private]="Private",StmtModifier[StmtModifier.Exported]="Exported";var Statement=function(){function Statement(modifiers,sourceSpan){this.modifiers=modifiers||[],this.sourceSpan=sourceSpan||null}return Statement.prototype.visitStatement=function(visitor,context){},Statement.prototype.hasModifier=function(modifier){return-1!==this.modifiers.indexOf(modifier)},Statement}(),DeclareVarStmt=function(_super){function DeclareVarStmt(name,value,type,modifiers,sourceSpan){void 0===modifiers&&(modifiers=null);var _this=_super.call(this,modifiers,sourceSpan)||this;return _this.name=name,_this.value=value,_this.type=type||value.type,_this}return __extends(DeclareVarStmt,_super),DeclareVarStmt.prototype.visitStatement=function(visitor,context){return visitor.visitDeclareVarStmt(this,context)},DeclareVarStmt}(Statement),DeclareFunctionStmt=function(_super){function DeclareFunctionStmt(name,params,statements,type,modifiers,sourceSpan){void 0===modifiers&&(modifiers=null);var _this=_super.call(this,modifiers,sourceSpan)||this;return _this.name=name,_this.params=params,_this.statements=statements,_this.type=type||null,_this}return __extends(DeclareFunctionStmt,_super),DeclareFunctionStmt.prototype.visitStatement=function(visitor,context){return visitor.visitDeclareFunctionStmt(this,context)},DeclareFunctionStmt}(Statement),ExpressionStatement=function(_super){function ExpressionStatement(expr,sourceSpan){var _this=_super.call(this,null,sourceSpan)||this;return _this.expr=expr,_this}return __extends(ExpressionStatement,_super),ExpressionStatement.prototype.visitStatement=function(visitor,context){return visitor.visitExpressionStmt(this,context)},ExpressionStatement}(Statement),ReturnStatement=function(_super){function ReturnStatement(value,sourceSpan){var _this=_super.call(this,null,sourceSpan)||this;return _this.value=value,_this}return __extends(ReturnStatement,_super),ReturnStatement.prototype.visitStatement=function(visitor,context){return visitor.visitReturnStmt(this,context)},ReturnStatement}(Statement),AbstractClassPart=function(){function AbstractClassPart(type,modifiers){this.modifiers=modifiers,modifiers||(this.modifiers=[]),this.type=type||null}return AbstractClassPart.prototype.hasModifier=function(modifier){return-1!==this.modifiers.indexOf(modifier)},AbstractClassPart}(),ClassMethod=function(_super){function ClassMethod(name,params,body,type,modifiers){void 0===modifiers&&(modifiers=null);var _this=_super.call(this,type,modifiers)||this;return _this.name=name,_this.params=params,_this.body=body,_this}return __extends(ClassMethod,_super),ClassMethod}(AbstractClassPart),ClassGetter=function(_super){function ClassGetter(name,body,type,modifiers){void 0===modifiers&&(modifiers=null);var _this=_super.call(this,type,modifiers)||this;return _this.name=name,_this.body=body,_this}return __extends(ClassGetter,_super),ClassGetter}(AbstractClassPart),ClassStmt=function(_super){function ClassStmt(name,parent,fields,getters,constructorMethod,methods,modifiers,sourceSpan){void 0===modifiers&&(modifiers=null);var _this=_super.call(this,modifiers,sourceSpan)||this;return _this.name=name,_this.parent=parent,_this.fields=fields,_this.getters=getters,_this.constructorMethod=constructorMethod,_this.methods=methods,_this}return __extends(ClassStmt,_super),ClassStmt.prototype.visitStatement=function(visitor,context){return visitor.visitDeclareClassStmt(this,context)},ClassStmt}(Statement),IfStmt=function(_super){function IfStmt(condition,trueCase,falseCase,sourceSpan){void 0===falseCase&&(falseCase=[]);var _this=_super.call(this,null,sourceSpan)||this;return _this.condition=condition,_this.trueCase=trueCase,_this.falseCase=falseCase,_this}return __extends(IfStmt,_super),IfStmt.prototype.visitStatement=function(visitor,context){return visitor.visitIfStmt(this,context)},IfStmt}(Statement),CommentStmt=function(_super){function CommentStmt(comment,sourceSpan){var _this=_super.call(this,null,sourceSpan)||this;return _this.comment=comment,_this}return __extends(CommentStmt,_super),CommentStmt.prototype.visitStatement=function(visitor,context){return visitor.visitCommentStmt(this,context)},CommentStmt}(Statement),TryCatchStmt=function(_super){function TryCatchStmt(bodyStmts,catchStmts,sourceSpan){var _this=_super.call(this,null,sourceSpan)||this;return _this.bodyStmts=bodyStmts,_this.catchStmts=catchStmts,_this}return __extends(TryCatchStmt,_super),TryCatchStmt.prototype.visitStatement=function(visitor,context){return visitor.visitTryCatchStmt(this,context)},TryCatchStmt}(Statement),ThrowStmt=function(_super){function ThrowStmt(error,sourceSpan){var _this=_super.call(this,null,sourceSpan)||this;return _this.error=error,_this}return __extends(ThrowStmt,_super),ThrowStmt.prototype.visitStatement=function(visitor,context){return visitor.visitThrowStmt(this,context)},ThrowStmt}(Statement),AstTransformer$1=function(){function AstTransformer$1(){}return AstTransformer$1.prototype.transformExpr=function(expr,context){return expr},AstTransformer$1.prototype.transformStmt=function(stmt,context){return stmt},AstTransformer$1.prototype.visitReadVarExpr=function(ast,context){return this.transformExpr(ast,context)},AstTransformer$1.prototype.visitWriteVarExpr=function(expr,context){return this.transformExpr(new WriteVarExpr(expr.name,expr.value.visitExpression(this,context),expr.type,expr.sourceSpan),context)},AstTransformer$1.prototype.visitWriteKeyExpr=function(expr,context){return this.transformExpr(new WriteKeyExpr(expr.receiver.visitExpression(this,context),expr.index.visitExpression(this,context),expr.value.visitExpression(this,context),expr.type,expr.sourceSpan),context)},AstTransformer$1.prototype.visitWritePropExpr=function(expr,context){return this.transformExpr(new WritePropExpr(expr.receiver.visitExpression(this,context),expr.name,expr.value.visitExpression(this,context),expr.type,expr.sourceSpan),context)},AstTransformer$1.prototype.visitInvokeMethodExpr=function(ast,context){var method=ast.builtin||ast.name;return this.transformExpr(new InvokeMethodExpr(ast.receiver.visitExpression(this,context),method,this.visitAllExpressions(ast.args,context),ast.type,ast.sourceSpan),context)},AstTransformer$1.prototype.visitInvokeFunctionExpr=function(ast,context){return this.transformExpr(new InvokeFunctionExpr(ast.fn.visitExpression(this,context),this.visitAllExpressions(ast.args,context),ast.type,ast.sourceSpan),context)},AstTransformer$1.prototype.visitInstantiateExpr=function(ast,context){return this.transformExpr(new InstantiateExpr(ast.classExpr.visitExpression(this,context),this.visitAllExpressions(ast.args,context),ast.type,ast.sourceSpan),context)},AstTransformer$1.prototype.visitLiteralExpr=function(ast,context){return this.transformExpr(ast,context)},AstTransformer$1.prototype.visitExternalExpr=function(ast,context){return this.transformExpr(ast,context)},AstTransformer$1.prototype.visitConditionalExpr=function(ast,context){return this.transformExpr(new ConditionalExpr(ast.condition.visitExpression(this,context),ast.trueCase.visitExpression(this,context),ast.falseCase.visitExpression(this,context),ast.type,ast.sourceSpan),context)},AstTransformer$1.prototype.visitNotExpr=function(ast,context){return this.transformExpr(new NotExpr(ast.condition.visitExpression(this,context),ast.sourceSpan),context)},AstTransformer$1.prototype.visitAssertNotNullExpr=function(ast,context){return this.transformExpr(new AssertNotNull(ast.condition.visitExpression(this,context),ast.sourceSpan),context)},AstTransformer$1.prototype.visitCastExpr=function(ast,context){return this.transformExpr(new CastExpr(ast.value.visitExpression(this,context),ast.type,ast.sourceSpan),context)},AstTransformer$1.prototype.visitFunctionExpr=function(ast,context){return this.transformExpr(new FunctionExpr(ast.params,this.visitAllStatements(ast.statements,context),ast.type,ast.sourceSpan),context)},AstTransformer$1.prototype.visitBinaryOperatorExpr=function(ast,context){return this.transformExpr(new BinaryOperatorExpr(ast.operator,ast.lhs.visitExpression(this,context),ast.rhs.visitExpression(this,context),ast.type,ast.sourceSpan),context)},AstTransformer$1.prototype.visitReadPropExpr=function(ast,context){return this.transformExpr(new ReadPropExpr(ast.receiver.visitExpression(this,context),ast.name,ast.type,ast.sourceSpan),context)},AstTransformer$1.prototype.visitReadKeyExpr=function(ast,context){return this.transformExpr(new ReadKeyExpr(ast.receiver.visitExpression(this,context),ast.index.visitExpression(this,context),ast.type,ast.sourceSpan),context)},AstTransformer$1.prototype.visitLiteralArrayExpr=function(ast,context){return this.transformExpr(new LiteralArrayExpr(this.visitAllExpressions(ast.entries,context),ast.type,ast.sourceSpan),context)},AstTransformer$1.prototype.visitLiteralMapExpr=function(ast,context){var _this=this,entries=ast.entries.map(function(entry){return new LiteralMapEntry(entry.key,entry.value.visitExpression(_this,context),entry.quoted)}),mapType=new MapType(ast.valueType,null);return this.transformExpr(new LiteralMapExpr(entries,mapType,ast.sourceSpan),context)},AstTransformer$1.prototype.visitCommaExpr=function(ast,context){return this.transformExpr(new CommaExpr(this.visitAllExpressions(ast.parts,context),ast.sourceSpan),context)},AstTransformer$1.prototype.visitAllExpressions=function(exprs,context){var _this=this;return exprs.map(function(expr){return expr.visitExpression(_this,context)})},AstTransformer$1.prototype.visitDeclareVarStmt=function(stmt,context){return this.transformStmt(new DeclareVarStmt(stmt.name,stmt.value.visitExpression(this,context),stmt.type,stmt.modifiers,stmt.sourceSpan),context)},AstTransformer$1.prototype.visitDeclareFunctionStmt=function(stmt,context){return this.transformStmt(new DeclareFunctionStmt(stmt.name,stmt.params,this.visitAllStatements(stmt.statements,context),stmt.type,stmt.modifiers,stmt.sourceSpan),context)},AstTransformer$1.prototype.visitExpressionStmt=function(stmt,context){return this.transformStmt(new ExpressionStatement(stmt.expr.visitExpression(this,context),stmt.sourceSpan),context)},AstTransformer$1.prototype.visitReturnStmt=function(stmt,context){return this.transformStmt(new ReturnStatement(stmt.value.visitExpression(this,context),stmt.sourceSpan),context)},AstTransformer$1.prototype.visitDeclareClassStmt=function(stmt,context){var _this=this,parent=stmt.parent.visitExpression(this,context),getters=stmt.getters.map(function(getter){return new ClassGetter(getter.name,_this.visitAllStatements(getter.body,context),getter.type,getter.modifiers)}),ctorMethod=stmt.constructorMethod&&new ClassMethod(stmt.constructorMethod.name,stmt.constructorMethod.params,this.visitAllStatements(stmt.constructorMethod.body,context),stmt.constructorMethod.type,stmt.constructorMethod.modifiers),methods=stmt.methods.map(function(method){return new ClassMethod(method.name,method.params,_this.visitAllStatements(method.body,context),method.type,method.modifiers)});return this.transformStmt(new ClassStmt(stmt.name,parent,stmt.fields,getters,ctorMethod,methods,stmt.modifiers,stmt.sourceSpan),context)},AstTransformer$1.prototype.visitIfStmt=function(stmt,context){return this.transformStmt(new IfStmt(stmt.condition.visitExpression(this,context),this.visitAllStatements(stmt.trueCase,context),this.visitAllStatements(stmt.falseCase,context),stmt.sourceSpan),context)},AstTransformer$1.prototype.visitTryCatchStmt=function(stmt,context){return this.transformStmt(new TryCatchStmt(this.visitAllStatements(stmt.bodyStmts,context),this.visitAllStatements(stmt.catchStmts,context),stmt.sourceSpan),context)},AstTransformer$1.prototype.visitThrowStmt=function(stmt,context){return this.transformStmt(new ThrowStmt(stmt.error.visitExpression(this,context),stmt.sourceSpan),context)},AstTransformer$1.prototype.visitCommentStmt=function(stmt,context){return this.transformStmt(stmt,context)},AstTransformer$1.prototype.visitAllStatements=function(stmts,context){var _this=this;return stmts.map(function(stmt){return stmt.visitStatement(_this,context)})},AstTransformer$1}(),RecursiveAstVisitor$1=function(){function RecursiveAstVisitor$1(){}return RecursiveAstVisitor$1.prototype.visitReadVarExpr=function(ast,context){return ast},RecursiveAstVisitor$1.prototype.visitWriteVarExpr=function(expr,context){return expr.value.visitExpression(this,context),expr},RecursiveAstVisitor$1.prototype.visitWriteKeyExpr=function(expr,context){return expr.receiver.visitExpression(this,context),expr.index.visitExpression(this,context),expr.value.visitExpression(this,context),expr},RecursiveAstVisitor$1.prototype.visitWritePropExpr=function(expr,context){return expr.receiver.visitExpression(this,context),expr.value.visitExpression(this,context),expr},RecursiveAstVisitor$1.prototype.visitInvokeMethodExpr=function(ast,context){return ast.receiver.visitExpression(this,context),this.visitAllExpressions(ast.args,context),ast},RecursiveAstVisitor$1.prototype.visitInvokeFunctionExpr=function(ast,context){return ast.fn.visitExpression(this,context),this.visitAllExpressions(ast.args,context),ast},RecursiveAstVisitor$1.prototype.visitInstantiateExpr=function(ast,context){return ast.classExpr.visitExpression(this,context),this.visitAllExpressions(ast.args,context),ast},RecursiveAstVisitor$1.prototype.visitLiteralExpr=function(ast,context){return ast},RecursiveAstVisitor$1.prototype.visitExternalExpr=function(ast,context){return ast},RecursiveAstVisitor$1.prototype.visitConditionalExpr=function(ast,context){return ast.condition.visitExpression(this,context),ast.trueCase.visitExpression(this,context),ast.falseCase.visitExpression(this,context),ast},RecursiveAstVisitor$1.prototype.visitNotExpr=function(ast,context){return ast.condition.visitExpression(this,context),ast},RecursiveAstVisitor$1.prototype.visitAssertNotNullExpr=function(ast,context){return ast.condition.visitExpression(this,context),ast},RecursiveAstVisitor$1.prototype.visitCastExpr=function(ast,context){return ast.value.visitExpression(this,context),ast},RecursiveAstVisitor$1.prototype.visitFunctionExpr=function(ast,context){return this.visitAllStatements(ast.statements,context),ast},RecursiveAstVisitor$1.prototype.visitBinaryOperatorExpr=function(ast,context){return ast.lhs.visitExpression(this,context),ast.rhs.visitExpression(this,context),ast},RecursiveAstVisitor$1.prototype.visitReadPropExpr=function(ast,context){return ast.receiver.visitExpression(this,context),ast},RecursiveAstVisitor$1.prototype.visitReadKeyExpr=function(ast,context){return ast.receiver.visitExpression(this,context),ast.index.visitExpression(this,context),ast},RecursiveAstVisitor$1.prototype.visitLiteralArrayExpr=function(ast,context){return this.visitAllExpressions(ast.entries,context),ast},RecursiveAstVisitor$1.prototype.visitLiteralMapExpr=function(ast,context){var _this=this;return ast.entries.forEach(function(entry){return entry.value.visitExpression(_this,context)}),ast},RecursiveAstVisitor$1.prototype.visitCommaExpr=function(ast,context){this.visitAllExpressions(ast.parts,context)},RecursiveAstVisitor$1.prototype.visitAllExpressions=function(exprs,context){var _this=this;exprs.forEach(function(expr){return expr.visitExpression(_this,context)})},RecursiveAstVisitor$1.prototype.visitDeclareVarStmt=function(stmt,context){return stmt.value.visitExpression(this,context),stmt},RecursiveAstVisitor$1.prototype.visitDeclareFunctionStmt=function(stmt,context){return this.visitAllStatements(stmt.statements,context),stmt},RecursiveAstVisitor$1.prototype.visitExpressionStmt=function(stmt,context){return stmt.expr.visitExpression(this,context),stmt},RecursiveAstVisitor$1.prototype.visitReturnStmt=function(stmt,context){return stmt.value.visitExpression(this,context),stmt},RecursiveAstVisitor$1.prototype.visitDeclareClassStmt=function(stmt,context){var _this=this;return stmt.parent.visitExpression(this,context),stmt.getters.forEach(function(getter){return _this.visitAllStatements(getter.body,context)}),stmt.constructorMethod&&this.visitAllStatements(stmt.constructorMethod.body,context),stmt.methods.forEach(function(method){return _this.visitAllStatements(method.body,context)}),stmt},RecursiveAstVisitor$1.prototype.visitIfStmt=function(stmt,context){return stmt.condition.visitExpression(this,context),this.visitAllStatements(stmt.trueCase,context),this.visitAllStatements(stmt.falseCase,context),stmt},RecursiveAstVisitor$1.prototype.visitTryCatchStmt=function(stmt,context){return this.visitAllStatements(stmt.bodyStmts,context),this.visitAllStatements(stmt.catchStmts,context),stmt},RecursiveAstVisitor$1.prototype.visitThrowStmt=function(stmt,context){return stmt.error.visitExpression(this,context),stmt},RecursiveAstVisitor$1.prototype.visitCommentStmt=function(stmt,context){return stmt},RecursiveAstVisitor$1.prototype.visitAllStatements=function(stmts,context){var _this=this;stmts.forEach(function(stmt){return stmt.visitStatement(_this,context)})},RecursiveAstVisitor$1}(),_ReadVarVisitor=function(_super){function _ReadVarVisitor(){var _this=_super.apply(this,arguments)||this;return _this.varNames=new Set,_this}return __extends(_ReadVarVisitor,_super),_ReadVarVisitor.prototype.visitDeclareFunctionStmt=function(stmt,context){return stmt},_ReadVarVisitor.prototype.visitDeclareClassStmt=function(stmt,context){return stmt},_ReadVarVisitor.prototype.visitReadVarExpr=function(ast,context){return ast.name&&this.varNames.add(ast.name),null},_ReadVarVisitor}(RecursiveAstVisitor$1),_ApplySourceSpanTransformer=function(_super){function _ApplySourceSpanTransformer(sourceSpan){var _this=_super.call(this)||this;return _this.sourceSpan=sourceSpan,_this}return __extends(_ApplySourceSpanTransformer,_super),_ApplySourceSpanTransformer.prototype._clone=function(obj){var clone=Object.create(obj.constructor.prototype);for(var prop in obj)clone[prop]=obj[prop];return clone},_ApplySourceSpanTransformer.prototype.transformExpr=function(expr,context){return expr.sourceSpan||(expr=this._clone(expr),expr.sourceSpan=this.sourceSpan),expr},_ApplySourceSpanTransformer.prototype.transformStmt=function(stmt,context){return stmt.sourceSpan||(stmt=this._clone(stmt),stmt.sourceSpan=this.sourceSpan),stmt},_ApplySourceSpanTransformer}(AstTransformer$1),QUOTED_KEYS="$quoted$",_ValueOutputAstTransformer=function(){function _ValueOutputAstTransformer(ctx){this.ctx=ctx}return _ValueOutputAstTransformer.prototype.visitArray=function(arr,type){var _this=this;return literalArr(arr.map(function(value){return visitValue(value,_this,null)}),type)},_ValueOutputAstTransformer.prototype.visitStringMap=function(map,type){var _this=this,entries=[],quotedSet=new Set(map&&map[QUOTED_KEYS]);return Object.keys(map).forEach(function(key){entries.push(new LiteralMapEntry(key,visitValue(map[key],_this,null),quotedSet.has(key)))}),new LiteralMapExpr(entries,type)},_ValueOutputAstTransformer.prototype.visitPrimitive=function(value,type){return literal(value,type)},_ValueOutputAstTransformer.prototype.visitOther=function(value,type){return value instanceof Expression?value:this.ctx.importExpr(value)},_ValueOutputAstTransformer}(),NgModuleCompileResult=function(){function NgModuleCompileResult(ngModuleFactoryVar){this.ngModuleFactoryVar=ngModuleFactoryVar}return NgModuleCompileResult}(),LOG_VAR=variable("_l"),NgModuleCompiler=function(){function NgModuleCompiler(reflector){this.reflector=reflector}return NgModuleCompiler.prototype.compile=function(ctx,ngModuleMeta,extraProviders){var sourceSpan=typeSourceSpan("NgModule",ngModuleMeta.type),entryComponentFactories=ngModuleMeta.transitiveModule.entryComponents,bootstrapComponents=ngModuleMeta.bootstrapComponents,providerParser=new NgModuleProviderAnalyzer(this.reflector,ngModuleMeta,extraProviders,sourceSpan),providerDefs=[componentFactoryResolverProviderDef(this.reflector,ctx,0,entryComponentFactories)].concat(providerParser.parse().map(function(provider){return providerDef(ctx,provider)})).map(function(_a){var providerExpr=_a.providerExpr,depsExpr=_a.depsExpr,flags=_a.flags,tokenExpr=_a.tokenExpr;return importExpr(Identifiers.moduleProviderDef).callFn([literal(flags),tokenExpr,providerExpr,depsExpr])}),ngModuleDef=importExpr(Identifiers.moduleDef).callFn([literalArr(providerDefs)]),ngModuleDefFactory=fn([new FnParam(LOG_VAR.name)],[new ReturnStatement(ngModuleDef)],INFERRED_TYPE),ngModuleFactoryVar=identifierName(ngModuleMeta.type)+"NgFactory";if(this._createNgModuleFactory(ctx,ngModuleMeta.type.reference,importExpr(Identifiers.createModuleFactory).callFn([ctx.importExpr(ngModuleMeta.type.reference),literalArr(bootstrapComponents.map(function(id){return ctx.importExpr(id.reference)})),ngModuleDefFactory])),ngModuleMeta.id){var registerFactoryStmt=importExpr(Identifiers.RegisterModuleFactoryFn).callFn([literal(ngModuleMeta.id),variable(ngModuleFactoryVar)]).toStmt();ctx.statements.push(registerFactoryStmt)}return new NgModuleCompileResult(ngModuleFactoryVar)},NgModuleCompiler.prototype.createStub=function(ctx,ngModuleReference){this._createNgModuleFactory(ctx,ngModuleReference,NULL_EXPR)},NgModuleCompiler.prototype._createNgModuleFactory=function(ctx,reference,value){var ngModuleFactoryVar=identifierName({reference:reference})+"NgFactory",ngModuleFactoryStmt=variable(ngModuleFactoryVar).set(value).toDeclStmt(importType(Identifiers.NgModuleFactory,[expressionType(ctx.importExpr(reference))],[TypeModifier.Const]),[StmtModifier.Final,StmtModifier.Exported]);ctx.statements.push(ngModuleFactoryStmt)},NgModuleCompiler}();NgModuleCompiler.decorators=[{type:CompilerInjectable}],NgModuleCompiler.ctorParameters=function(){return[{type:CompileReflector}]};var VERSION$1=3,JS_B64_PREFIX="# sourceMappingURL=data:application/json;base64,",SourceMapGenerator=function(){function SourceMapGenerator(file){void 0===file&&(file=null),this.file=file,this.sourcesContent=new Map,this.lines=[],this.lastCol0=0,this.hasMappings=!1}return SourceMapGenerator.prototype.addSource=function(url,content){return void 0===content&&(content=null),this.sourcesContent.has(url)||this.sourcesContent.set(url,content),this},SourceMapGenerator.prototype.addLine=function(){return this.lines.push([]),this.lastCol0=0,this},SourceMapGenerator.prototype.addMapping=function(col0,sourceUrl,sourceLine0,sourceCol0){if(!this.currentLine)throw new Error("A line must be added before mappings can be added");if(null!=sourceUrl&&!this.sourcesContent.has(sourceUrl))throw new Error('Unknown source file "'+sourceUrl+'"');if(null==col0)throw new Error("The column in the generated code must be provided");if(col0<this.lastCol0)throw new Error("Mapping should be added in output order");if(sourceUrl&&(null==sourceLine0||null==sourceCol0))throw new Error("The source location must be provided when a source url is provided");return this.hasMappings=!0,this.lastCol0=col0,this.currentLine.push({col0:col0,sourceUrl:sourceUrl,sourceLine0:sourceLine0,sourceCol0:sourceCol0}),this},Object.defineProperty(SourceMapGenerator.prototype,"currentLine",{get:function(){return this.lines.slice(-1)[0]},enumerable:!0,configurable:!0}),SourceMapGenerator.prototype.toJSON=function(){var _this=this;if(!this.hasMappings)return null;var sourcesIndex=new Map,sources=[],sourcesContent=[];Array.from(this.sourcesContent.keys()).forEach(function(url,i){sourcesIndex.set(url,i),sources.push(url),sourcesContent.push(_this.sourcesContent.get(url)||null)});var mappings="",lastCol0=0,lastSourceIndex=0,lastSourceLine0=0,lastSourceCol0=0;return this.lines.forEach(function(segments){lastCol0=0,mappings+=segments.map(function(segment){var segAsStr=toBase64VLQ(segment.col0-lastCol0);return lastCol0=segment.col0,null!=segment.sourceUrl&&(segAsStr+=toBase64VLQ(sourcesIndex.get(segment.sourceUrl)-lastSourceIndex),lastSourceIndex=sourcesIndex.get(segment.sourceUrl),segAsStr+=toBase64VLQ(segment.sourceLine0-lastSourceLine0),lastSourceLine0=segment.sourceLine0,segAsStr+=toBase64VLQ(segment.sourceCol0-lastSourceCol0),lastSourceCol0=segment.sourceCol0),segAsStr}).join(","),mappings+=";"}),mappings=mappings.slice(0,-1),{file:this.file||"",version:VERSION$1,sourceRoot:"",sources:sources,sourcesContent:sourcesContent,mappings:mappings}},SourceMapGenerator.prototype.toJsComment=function(){return this.hasMappings?"//"+JS_B64_PREFIX+toBase64String(JSON.stringify(this,null,0)):""},SourceMapGenerator}(),B64_DIGITS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_SINGLE_QUOTE_ESCAPE_STRING_RE=/'|\\|\n|\r|\$/g,_LEGAL_IDENTIFIER_RE=/^[$A-Z_][0-9A-Z_$]*$/i,_INDENT_WITH=" ",CATCH_ERROR_VAR$1=variable("error",null,null),CATCH_STACK_VAR$1=variable("stack",null,null),_EmittedLine=function(){function _EmittedLine(indent){this.indent=indent,this.partsLength=0,this.parts=[],this.srcSpans=[]}return _EmittedLine}(),EmitterVisitorContext=function(){function EmitterVisitorContext(_indent){this._indent=_indent,this._classes=[],this._preambleLineCount=0,this._lines=[new _EmittedLine(_indent)]}return EmitterVisitorContext.createRoot=function(){return new EmitterVisitorContext(0)},Object.defineProperty(EmitterVisitorContext.prototype,"_currentLine",{get:function(){return this._lines[this._lines.length-1]},enumerable:!0,configurable:!0}),EmitterVisitorContext.prototype.println=function(from,lastPart){void 0===lastPart&&(lastPart=""),this.print(from||null,lastPart,!0)},EmitterVisitorContext.prototype.lineIsEmpty=function(){return 0===this._currentLine.parts.length},EmitterVisitorContext.prototype.lineLength=function(){return this._currentLine.indent*_INDENT_WITH.length+this._currentLine.partsLength},EmitterVisitorContext.prototype.print=function(from,part,newLine){void 0===newLine&&(newLine=!1),part.length>0&&(this._currentLine.parts.push(part),this._currentLine.partsLength+=part.length,this._currentLine.srcSpans.push(from&&from.sourceSpan||null)),newLine&&this._lines.push(new _EmittedLine(this._indent))},EmitterVisitorContext.prototype.removeEmptyLastLine=function(){this.lineIsEmpty()&&this._lines.pop()},EmitterVisitorContext.prototype.incIndent=function(){this._indent++,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)},EmitterVisitorContext.prototype.decIndent=function(){this._indent--,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)},EmitterVisitorContext.prototype.pushClass=function(clazz){this._classes.push(clazz)},EmitterVisitorContext.prototype.popClass=function(){return this._classes.pop()},Object.defineProperty(EmitterVisitorContext.prototype,"currentClass",{get:function(){return this._classes.length>0?this._classes[this._classes.length-1]:null},enumerable:!0,configurable:!0}),EmitterVisitorContext.prototype.toSource=function(){return this.sourceLines.map(function(l){return l.parts.length>0?_createIndent(l.indent)+l.parts.join(""):""}).join("\n")},EmitterVisitorContext.prototype.toSourceMapGenerator=function(sourceFilePath,genFilePath,startsAtLine){void 0===startsAtLine&&(startsAtLine=0);for(var map=new SourceMapGenerator(genFilePath),firstOffsetMapped=!1,mapFirstOffsetIfNeeded=function(){firstOffsetMapped||(map.addSource(sourceFilePath," ").addMapping(0,sourceFilePath,0,0),firstOffsetMapped=!0)},i=0;i<startsAtLine;i++)map.addLine(),mapFirstOffsetIfNeeded();return this.sourceLines.forEach(function(line,lineIdx){map.addLine();for(var spans=line.srcSpans,parts=line.parts,col0=line.indent*_INDENT_WITH.length,spanIdx=0;spanIdx<spans.length&&!spans[spanIdx];)col0+=parts[spanIdx].length,spanIdx++;for(spanIdx<spans.length&&0===lineIdx&&0===col0?firstOffsetMapped=!0:mapFirstOffsetIfNeeded();spanIdx<spans.length;){var span=spans[spanIdx],source=span.start.file,sourceLine=span.start.line,sourceCol=span.start.col;for(map.addSource(source.url,source.content).addMapping(col0,source.url,sourceLine,sourceCol),col0+=parts[spanIdx].length,spanIdx++;spanIdx<spans.length&&(span===spans[spanIdx]||!spans[spanIdx]);)col0+=parts[spanIdx].length,spanIdx++}}),map},EmitterVisitorContext.prototype.setPreambleLineCount=function(count){return this._preambleLineCount=count},EmitterVisitorContext.prototype.spanOf=function(line,column){var emittedLine=this._lines[line-this._preambleLineCount];if(emittedLine)for(var columnsLeft=column-emittedLine.indent,partIndex=0;partIndex<emittedLine.parts.length;partIndex++){var part=emittedLine.parts[partIndex];if(part.length>columnsLeft)return emittedLine.srcSpans[partIndex];columnsLeft-=part.length}return null},Object.defineProperty(EmitterVisitorContext.prototype,"sourceLines",{get:function(){return this._lines.length&&0===this._lines[this._lines.length-1].parts.length?this._lines.slice(0,-1):this._lines},enumerable:!0,configurable:!0}),EmitterVisitorContext}(),AbstractEmitterVisitor=function(){function AbstractEmitterVisitor(_escapeDollarInStrings){this._escapeDollarInStrings=_escapeDollarInStrings}return AbstractEmitterVisitor.prototype.visitExpressionStmt=function(stmt,ctx){return stmt.expr.visitExpression(this,ctx),ctx.println(stmt,";"),null},AbstractEmitterVisitor.prototype.visitReturnStmt=function(stmt,ctx){return ctx.print(stmt,"return "),stmt.value.visitExpression(this,ctx),ctx.println(stmt,";"),null},AbstractEmitterVisitor.prototype.visitCastExpr=function(ast,context){},AbstractEmitterVisitor.prototype.visitDeclareClassStmt=function(stmt,ctx){},AbstractEmitterVisitor.prototype.visitIfStmt=function(stmt,ctx){ctx.print(stmt,"if ("),stmt.condition.visitExpression(this,ctx),ctx.print(stmt,") {");var hasElseCase=null!=stmt.falseCase&&stmt.falseCase.length>0;return stmt.trueCase.length<=1&&!hasElseCase?(ctx.print(stmt," "),this.visitAllStatements(stmt.trueCase,ctx),ctx.removeEmptyLastLine(),ctx.print(stmt," ")):(ctx.println(),ctx.incIndent(),this.visitAllStatements(stmt.trueCase,ctx),ctx.decIndent(),hasElseCase&&(ctx.println(stmt,"} else {"),ctx.incIndent(),this.visitAllStatements(stmt.falseCase,ctx),ctx.decIndent())),ctx.println(stmt,"}"),null},AbstractEmitterVisitor.prototype.visitTryCatchStmt=function(stmt,ctx){},AbstractEmitterVisitor.prototype.visitThrowStmt=function(stmt,ctx){return ctx.print(stmt,"throw "),stmt.error.visitExpression(this,ctx),ctx.println(stmt,";"),null},AbstractEmitterVisitor.prototype.visitCommentStmt=function(stmt,ctx){return stmt.comment.split("\n").forEach(function(line){ctx.println(stmt,"// "+line)}),null},AbstractEmitterVisitor.prototype.visitDeclareVarStmt=function(stmt,ctx){},AbstractEmitterVisitor.prototype.visitWriteVarExpr=function(expr,ctx){var lineWasEmpty=ctx.lineIsEmpty();return lineWasEmpty||ctx.print(expr,"("),ctx.print(expr,expr.name+" = "),expr.value.visitExpression(this,ctx),lineWasEmpty||ctx.print(expr,")"),null},AbstractEmitterVisitor.prototype.visitWriteKeyExpr=function(expr,ctx){var lineWasEmpty=ctx.lineIsEmpty();return lineWasEmpty||ctx.print(expr,"("),expr.receiver.visitExpression(this,ctx),ctx.print(expr,"["),expr.index.visitExpression(this,ctx),ctx.print(expr,"] = "),expr.value.visitExpression(this,ctx),lineWasEmpty||ctx.print(expr,")"),null},AbstractEmitterVisitor.prototype.visitWritePropExpr=function(expr,ctx){var lineWasEmpty=ctx.lineIsEmpty();return lineWasEmpty||ctx.print(expr,"("),expr.receiver.visitExpression(this,ctx),ctx.print(expr,"."+expr.name+" = "),expr.value.visitExpression(this,ctx),lineWasEmpty||ctx.print(expr,")"),null},AbstractEmitterVisitor.prototype.visitInvokeMethodExpr=function(expr,ctx){expr.receiver.visitExpression(this,ctx);var name=expr.name;return null!=expr.builtin&&null==(name=this.getBuiltinMethodName(expr.builtin))?null:(ctx.print(expr,"."+name+"("),this.visitAllExpressions(expr.args,ctx,","),ctx.print(expr,")"),null)},AbstractEmitterVisitor.prototype.getBuiltinMethodName=function(method){},AbstractEmitterVisitor.prototype.visitInvokeFunctionExpr=function(expr,ctx){return expr.fn.visitExpression(this,ctx),ctx.print(expr,"("),this.visitAllExpressions(expr.args,ctx,","),ctx.print(expr,")"),null},AbstractEmitterVisitor.prototype.visitReadVarExpr=function(ast,ctx){var varName=ast.name;if(null!=ast.builtin)switch(ast.builtin){case BuiltinVar.Super:varName="super";break;case BuiltinVar.This:varName="this";break;case BuiltinVar.CatchError:varName=CATCH_ERROR_VAR$1.name;break;case BuiltinVar.CatchStack:varName=CATCH_STACK_VAR$1.name;break;default:throw new Error("Unknown builtin variable "+ast.builtin)}return ctx.print(ast,varName),null},AbstractEmitterVisitor.prototype.visitInstantiateExpr=function(ast,ctx){return ctx.print(ast,"new "),ast.classExpr.visitExpression(this,ctx),ctx.print(ast,"("),this.visitAllExpressions(ast.args,ctx,","),ctx.print(ast,")"),null},AbstractEmitterVisitor.prototype.visitLiteralExpr=function(ast,ctx){var value=ast.value;return"string"==typeof value?ctx.print(ast,escapeIdentifier(value,this._escapeDollarInStrings)):ctx.print(ast,""+value),null},AbstractEmitterVisitor.prototype.visitExternalExpr=function(ast,ctx){},AbstractEmitterVisitor.prototype.visitConditionalExpr=function(ast,ctx){return ctx.print(ast,"("),ast.condition.visitExpression(this,ctx),ctx.print(ast,"? "),ast.trueCase.visitExpression(this,ctx),ctx.print(ast,": "),ast.falseCase.visitExpression(this,ctx),ctx.print(ast,")"),null},AbstractEmitterVisitor.prototype.visitNotExpr=function(ast,ctx){return ctx.print(ast,"!"),ast.condition.visitExpression(this,ctx),null},AbstractEmitterVisitor.prototype.visitAssertNotNullExpr=function(ast,ctx){return ast.condition.visitExpression(this,ctx),null},AbstractEmitterVisitor.prototype.visitFunctionExpr=function(ast,ctx){},AbstractEmitterVisitor.prototype.visitDeclareFunctionStmt=function(stmt,context){},AbstractEmitterVisitor.prototype.visitBinaryOperatorExpr=function(ast,ctx){var opStr;switch(ast.operator){case BinaryOperator.Equals:opStr="==";break;case BinaryOperator.Identical:opStr="===";break;case BinaryOperator.NotEquals:opStr="!=";break;case BinaryOperator.NotIdentical:opStr="!==";break;case BinaryOperator.And:opStr="&&";break;case BinaryOperator.Or:opStr="||";break;case BinaryOperator.Plus:opStr="+";break;case BinaryOperator.Minus:opStr="-";break;case BinaryOperator.Divide:opStr="/";break;case BinaryOperator.Multiply:opStr="*";break;case BinaryOperator.Modulo:opStr="%";break;case BinaryOperator.Lower:opStr="<";break;case BinaryOperator.LowerEquals:opStr="<=";break;case BinaryOperator.Bigger:opStr=">";break;case BinaryOperator.BiggerEquals:opStr=">=";break;default:throw new Error("Unknown operator "+ast.operator)}return ctx.print(ast,"("),ast.lhs.visitExpression(this,ctx),ctx.print(ast," "+opStr+" "),ast.rhs.visitExpression(this,ctx),ctx.print(ast,")"),null},AbstractEmitterVisitor.prototype.visitReadPropExpr=function(ast,ctx){return ast.receiver.visitExpression(this,ctx),ctx.print(ast,"."),ctx.print(ast,ast.name),null},AbstractEmitterVisitor.prototype.visitReadKeyExpr=function(ast,ctx){return ast.receiver.visitExpression(this,ctx),ctx.print(ast,"["),ast.index.visitExpression(this,ctx),ctx.print(ast,"]"),null},AbstractEmitterVisitor.prototype.visitLiteralArrayExpr=function(ast,ctx){return ctx.print(ast,"["),this.visitAllExpressions(ast.entries,ctx,","),ctx.print(ast,"]"),null},AbstractEmitterVisitor.prototype.visitLiteralMapExpr=function(ast,ctx){var _this=this;return ctx.print(ast,"{"),this.visitAllObjects(function(entry){ctx.print(ast,escapeIdentifier(entry.key,_this._escapeDollarInStrings,entry.quoted)+":"),entry.value.visitExpression(_this,ctx)},ast.entries,ctx,","),ctx.print(ast,"}"),null},AbstractEmitterVisitor.prototype.visitCommaExpr=function(ast,ctx){return ctx.print(ast,"("),this.visitAllExpressions(ast.parts,ctx,","),ctx.print(ast,")"),null},AbstractEmitterVisitor.prototype.visitAllExpressions=function(expressions,ctx,separator){var _this=this;this.visitAllObjects(function(expr){return expr.visitExpression(_this,ctx)},expressions,ctx,separator)},AbstractEmitterVisitor.prototype.visitAllObjects=function(handler,expressions,ctx,separator){for(var incrementedIndent=!1,i=0;i<expressions.length;i++)i>0&&(ctx.lineLength()>80?(ctx.print(null,separator,!0),incrementedIndent||(ctx.incIndent(),ctx.incIndent(),incrementedIndent=!0)):ctx.print(null,separator,!1)),handler(expressions[i]);incrementedIndent&&(ctx.decIndent(),ctx.decIndent())},AbstractEmitterVisitor.prototype.visitAllStatements=function(statements,ctx){var _this=this;statements.forEach(function(stmt){return stmt.visitStatement(_this,ctx)})},AbstractEmitterVisitor}(),TypeScriptEmitter=function(){function TypeScriptEmitter(){}return TypeScriptEmitter.prototype.emitStatementsAndContext=function(srcFilePath,genFilePath,stmts,preamble,emitSourceMaps){void 0===preamble&&(preamble=""),void 0===emitSourceMaps&&(emitSourceMaps=!0);var converter=new _TsEmitterVisitor,ctx=EmitterVisitorContext.createRoot();converter.visitAllStatements(stmts,ctx);var preambleLines=preamble?preamble.split("\n"):[];converter.reexports.forEach(function(reexports,exportedModuleName){var reexportsCode=reexports.map(function(reexport){return reexport.name+" as "+reexport.as}).join(",");preambleLines.push("export {"+reexportsCode+"} from '"+exportedModuleName+"';")}),converter.importsWithPrefixes.forEach(function(prefix,importedModuleName){preambleLines.push("import * as "+prefix+" from '"+importedModuleName+"';")});var sm=emitSourceMaps?ctx.toSourceMapGenerator(srcFilePath,genFilePath,preambleLines.length).toJsComment():"",lines=preambleLines.concat([ctx.toSource(),sm]);return sm&&lines.push(""),ctx.setPreambleLineCount(preambleLines.length),{sourceText:lines.join("\n"),context:ctx}},TypeScriptEmitter.prototype.emitStatements=function(srcFilePath,genFilePath,stmts,preamble){return void 0===preamble&&(preamble=""),this.emitStatementsAndContext(srcFilePath,genFilePath,stmts,preamble).sourceText},TypeScriptEmitter}(),_TsEmitterVisitor=function(_super){function _TsEmitterVisitor(){var _this=_super.call(this,!1)||this;return _this.typeExpression=0,_this.importsWithPrefixes=new Map,_this.reexports=new Map,_this}return __extends(_TsEmitterVisitor,_super),_TsEmitterVisitor.prototype.visitType=function(t,ctx,defaultType){void 0===defaultType&&(defaultType="any"),t?(this.typeExpression++,t.visitType(this,ctx),this.typeExpression--):ctx.print(null,defaultType)},_TsEmitterVisitor.prototype.visitLiteralExpr=function(ast,ctx){var value=ast.value;return null==value&&ast.type!=INFERRED_TYPE?(ctx.print(ast,"("+value+" as any)"),null):_super.prototype.visitLiteralExpr.call(this,ast,ctx)},_TsEmitterVisitor.prototype.visitLiteralArrayExpr=function(ast,ctx){0===ast.entries.length&&ctx.print(ast,"(");var result=_super.prototype.visitLiteralArrayExpr.call(this,ast,ctx);return 0===ast.entries.length&&ctx.print(ast," as any[])"),result},_TsEmitterVisitor.prototype.visitExternalExpr=function(ast,ctx){return this._visitIdentifier(ast.value,ast.typeParams,ctx),null},_TsEmitterVisitor.prototype.visitAssertNotNullExpr=function(ast,ctx){var result=_super.prototype.visitAssertNotNullExpr.call(this,ast,ctx);return ctx.print(ast,"!"),result},_TsEmitterVisitor.prototype.visitDeclareVarStmt=function(stmt,ctx){if(stmt.hasModifier(StmtModifier.Exported)&&stmt.value instanceof ExternalExpr&&!stmt.type){var _a=stmt.value.value,name=_a.name,moduleName=_a.moduleName;if(moduleName){var reexports=this.reexports.get(moduleName);return reexports||(reexports=[],this.reexports.set(moduleName,reexports)),reexports.push({name:name,as:stmt.name}),null}}return stmt.hasModifier(StmtModifier.Exported)&&ctx.print(stmt,"export "),stmt.hasModifier(StmtModifier.Final)?ctx.print(stmt,"const"):ctx.print(stmt,"var"),ctx.print(stmt," "+stmt.name),this._printColonType(stmt.type,ctx),ctx.print(stmt," = "),stmt.value.visitExpression(this,ctx),ctx.println(stmt,";"),null},_TsEmitterVisitor.prototype.visitCastExpr=function(ast,ctx){return ctx.print(ast,"(<"),ast.type.visitType(this,ctx),ctx.print(ast,">"),ast.value.visitExpression(this,ctx),ctx.print(ast,")"),null},_TsEmitterVisitor.prototype.visitInstantiateExpr=function(ast,ctx){return ctx.print(ast,"new "),this.typeExpression++,ast.classExpr.visitExpression(this,ctx),this.typeExpression--,ctx.print(ast,"("),this.visitAllExpressions(ast.args,ctx,","),ctx.print(ast,")"),null},_TsEmitterVisitor.prototype.visitDeclareClassStmt=function(stmt,ctx){var _this=this;return ctx.pushClass(stmt),stmt.hasModifier(StmtModifier.Exported)&&ctx.print(stmt,"export "),ctx.print(stmt,"class "+stmt.name),null!=stmt.parent&&(ctx.print(stmt," extends "),this.typeExpression++,stmt.parent.visitExpression(this,ctx),this.typeExpression--),ctx.println(stmt," {"),ctx.incIndent(),stmt.fields.forEach(function(field){return _this._visitClassField(field,ctx)}),null!=stmt.constructorMethod&&this._visitClassConstructor(stmt,ctx),stmt.getters.forEach(function(getter){return _this._visitClassGetter(getter,ctx)}),stmt.methods.forEach(function(method){return _this._visitClassMethod(method,ctx)}),ctx.decIndent(),ctx.println(stmt,"}"),ctx.popClass(),null},_TsEmitterVisitor.prototype._visitClassField=function(field,ctx){field.hasModifier(StmtModifier.Private)&&ctx.print(null,"/*private*/ "),ctx.print(null,field.name),this._printColonType(field.type,ctx),ctx.println(null,";")},_TsEmitterVisitor.prototype._visitClassGetter=function(getter,ctx){getter.hasModifier(StmtModifier.Private)&&ctx.print(null,"private "),ctx.print(null,"get "+getter.name+"()"),this._printColonType(getter.type,ctx),ctx.println(null," {"),ctx.incIndent(),this.visitAllStatements(getter.body,ctx),ctx.decIndent(),ctx.println(null,"}")},_TsEmitterVisitor.prototype._visitClassConstructor=function(stmt,ctx){ctx.print(stmt,"constructor("),this._visitParams(stmt.constructorMethod.params,ctx),ctx.println(stmt,") {"),ctx.incIndent(),this.visitAllStatements(stmt.constructorMethod.body,ctx),ctx.decIndent(),ctx.println(stmt,"}")},_TsEmitterVisitor.prototype._visitClassMethod=function(method,ctx){method.hasModifier(StmtModifier.Private)&&ctx.print(null,"private "),ctx.print(null,method.name+"("),this._visitParams(method.params,ctx),ctx.print(null,")"),this._printColonType(method.type,ctx,"void"),ctx.println(null," {"),ctx.incIndent(),this.visitAllStatements(method.body,ctx),ctx.decIndent(),ctx.println(null,"}")},_TsEmitterVisitor.prototype.visitFunctionExpr=function(ast,ctx){return ctx.print(ast,"("),this._visitParams(ast.params,ctx),ctx.print(ast,")"),this._printColonType(ast.type,ctx,"void"),ctx.println(ast," => {"),ctx.incIndent(),this.visitAllStatements(ast.statements,ctx),ctx.decIndent(),ctx.print(ast,"}"),null},_TsEmitterVisitor.prototype.visitDeclareFunctionStmt=function(stmt,ctx){return stmt.hasModifier(StmtModifier.Exported)&&ctx.print(stmt,"export "),ctx.print(stmt,"function "+stmt.name+"("),this._visitParams(stmt.params,ctx),ctx.print(stmt,")"),this._printColonType(stmt.type,ctx,"void"),ctx.println(stmt," {"),ctx.incIndent(),this.visitAllStatements(stmt.statements,ctx),ctx.decIndent(),ctx.println(stmt,"}"),null},_TsEmitterVisitor.prototype.visitTryCatchStmt=function(stmt,ctx){ctx.println(stmt,"try {"),ctx.incIndent(),this.visitAllStatements(stmt.bodyStmts,ctx),ctx.decIndent(),ctx.println(stmt,"} catch ("+CATCH_ERROR_VAR$1.name+") {"),ctx.incIndent();var catchStmts=[CATCH_STACK_VAR$1.set(CATCH_ERROR_VAR$1.prop("stack",null)).toDeclStmt(null,[StmtModifier.Final])].concat(stmt.catchStmts);return this.visitAllStatements(catchStmts,ctx),ctx.decIndent(),ctx.println(stmt,"}"),null},_TsEmitterVisitor.prototype.visitBuiltintType=function(type,ctx){var typeStr;switch(type.name){case BuiltinTypeName.Bool:typeStr="boolean";break;case BuiltinTypeName.Dynamic:typeStr="any";break;case BuiltinTypeName.Function:typeStr="Function";break;case BuiltinTypeName.Number:case BuiltinTypeName.Int:typeStr="number";break;case BuiltinTypeName.String:typeStr="string";break;default:throw new Error("Unsupported builtin type "+type.name)}return ctx.print(null,typeStr),null},_TsEmitterVisitor.prototype.visitExpressionType=function(ast,ctx){return ast.value.visitExpression(this,ctx),null},_TsEmitterVisitor.prototype.visitArrayType=function(type,ctx){return this.visitType(type.of,ctx),ctx.print(null,"[]"),null},_TsEmitterVisitor.prototype.visitMapType=function(type,ctx){return ctx.print(null,"{[key: string]:"),this.visitType(type.valueType,ctx),ctx.print(null,"}"),null},_TsEmitterVisitor.prototype.getBuiltinMethodName=function(method){var name;switch(method){case BuiltinMethod.ConcatArray:name="concat";break;case BuiltinMethod.SubscribeObservable:name="subscribe";break;case BuiltinMethod.Bind:name="bind";break;default:throw new Error("Unknown builtin method: "+method)}return name},_TsEmitterVisitor.prototype._visitParams=function(params,ctx){var _this=this;this.visitAllObjects(function(param){ctx.print(null,param.name),_this._printColonType(param.type,ctx)},params,ctx,",")},_TsEmitterVisitor.prototype._visitIdentifier=function(value,typeParams,ctx){var _this=this,name=value.name,moduleName=value.moduleName;if(moduleName){var prefix=this.importsWithPrefixes.get(moduleName);null==prefix&&(prefix="i"+this.importsWithPrefixes.size,this.importsWithPrefixes.set(moduleName,prefix)),ctx.print(null,prefix+".")}if(ctx.print(null,name),this.typeExpression>0){(typeParams||[]).length>0&&(ctx.print(null,"<"),this.visitAllObjects(function(type){return type.visitType(_this,ctx)},typeParams,ctx,","),ctx.print(null,">"))}},_TsEmitterVisitor.prototype._printColonType=function(type,ctx,defaultType){type!==INFERRED_TYPE&&(ctx.print(null,":"),this.visitType(type,ctx,defaultType))},_TsEmitterVisitor}(AbstractEmitterVisitor),SECURITY_SCHEMA={};registerContext(_angular_core.SecurityContext.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),registerContext(_angular_core.SecurityContext.STYLE,["*|style"]),registerContext(_angular_core.SecurityContext.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","img|srcset","input|src","ins|cite","q|cite","source|src","source|srcset","track|src","video|poster","video|src"]),registerContext(_angular_core.SecurityContext.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"]);var BOOLEAN="boolean",NUMBER="number",STRING="string",OBJECT="object",SCHEMA=["[Element]|textContent,%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop","[HTMLElement]^[Element]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*beforecopy,*beforecut,*beforepaste,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*message,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*paste,*pause,*play,*playing,*progress,*ratechange,*reset,*resize,*scroll,*search,*seeked,*seeking,*select,*selectstart,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate","abbr,address,article,aside,b,bdi,bdo,cite,code,dd,dfn,dt,em,figcaption,figure,footer,header,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*beforecopy,*beforecut,*beforepaste,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*message,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*paste,*pause,*play,*playing,*progress,*ratechange,*reset,*resize,*scroll,*search,*seeked,*seeking,*select,*selectstart,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate","media^[HTMLElement]|!autoplay,!controls,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,#playbackRate,preload,src,%srcObject,#volume",":svg:^[HTMLElement]|*abort,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!autofocus,!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,!allowFullscreen,frameBorder,height,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,#height,#hspace,!isMap,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocapitalize,autocomplete,!autofocus,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","keygen^[HTMLElement]|!autofocus,challenge,!disabled,keytype,name","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type","select^[HTMLElement]|!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","shadow^[HTMLElement]|","source^[HTMLElement]|media,sizes,src,srcset,type","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocapitalize,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|#height,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:cursor^:svg:|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime"],_ATTR_TO_PROP={class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},DomElementSchemaRegistry=function(_super){function DomElementSchemaRegistry(){var _this=_super.call(this)||this;return _this._schema={},SCHEMA.forEach(function(encodedType){var type={},_a=encodedType.split("|"),strType=_a[0],strProperties=_a[1],properties=strProperties.split(","),_b=strType.split("^"),typeNames=_b[0],superName=_b[1];typeNames.split(",").forEach(function(tag){return _this._schema[tag.toLowerCase()]=type});var superType=superName&&_this._schema[superName.toLowerCase()];superType&&Object.keys(superType).forEach(function(prop){type[prop]=superType[prop]}),properties.forEach(function(property){if(property.length>0)switch(property[0]){case"*":break;case"!":type[property.substring(1)]=BOOLEAN;break;case"#":type[property.substring(1)]=NUMBER;break;case"%":type[property.substring(1)]=OBJECT;break;default:type[property]=STRING}})}),_this}return __extends(DomElementSchemaRegistry,_super),DomElementSchemaRegistry.prototype.hasProperty=function(tagName,propName,schemaMetas){if(schemaMetas.some(function(schema){return schema.name===_angular_core.NO_ERRORS_SCHEMA.name}))return!0;if(tagName.indexOf("-")>-1){if(isNgContainer(tagName)||isNgContent(tagName))return!1;if(schemaMetas.some(function(schema){return schema.name===_angular_core.CUSTOM_ELEMENTS_SCHEMA.name}))return!0}return!!(this._schema[tagName.toLowerCase()]||this._schema.unknown)[propName]},DomElementSchemaRegistry.prototype.hasElement=function(tagName,schemaMetas){if(schemaMetas.some(function(schema){return schema.name===_angular_core.NO_ERRORS_SCHEMA.name}))return!0;if(tagName.indexOf("-")>-1){if(isNgContainer(tagName)||isNgContent(tagName))return!0;if(schemaMetas.some(function(schema){return schema.name===_angular_core.CUSTOM_ELEMENTS_SCHEMA.name}))return!0}return!!this._schema[tagName.toLowerCase()]},DomElementSchemaRegistry.prototype.securityContext=function(tagName,propName,isAttribute){isAttribute&&(propName=this.getMappedPropName(propName)),tagName=tagName.toLowerCase(),propName=propName.toLowerCase();var ctx=SECURITY_SCHEMA[tagName+"|"+propName];return ctx||((ctx=SECURITY_SCHEMA["*|"+propName])||_angular_core.SecurityContext.NONE)},DomElementSchemaRegistry.prototype.getMappedPropName=function(propName){return _ATTR_TO_PROP[propName]||propName},DomElementSchemaRegistry.prototype.getDefaultComponentElementName=function(){return"ng-component"},DomElementSchemaRegistry.prototype.validateProperty=function(name){if(name.toLowerCase().startsWith("on")){return{error:!0,msg:"Binding to event property '"+name+"' is disallowed for security reasons, please use ("+name.slice(2)+")=...\nIf '"+name+"' is a directive input, make sure the directive is imported by the current module."}}return{error:!1}},DomElementSchemaRegistry.prototype.validateAttribute=function(name){if(name.toLowerCase().startsWith("on")){return{error:!0,msg:"Binding to event attribute '"+name+"' is disallowed for security reasons, please use ("+name.slice(2)+")=..."}}return{error:!1}},DomElementSchemaRegistry.prototype.allKnownElementNames=function(){return Object.keys(this._schema)},DomElementSchemaRegistry.prototype.normalizeAnimationStyleProperty=function(propName){return dashCaseToCamelCase(propName)},DomElementSchemaRegistry.prototype.normalizeAnimationStyleValue=function(camelCaseProp,userProvidedProp,val){var unit="",strVal=val.toString().trim(),errorMsg=null;if(_isPixelDimensionStyle(camelCaseProp)&&0!==val&&"0"!==val)if("number"==typeof val)unit="px";else{var valAndSuffixMatch=val.match(/^[+-]?[\d\.]+([a-z]*)$/);valAndSuffixMatch&&0==valAndSuffixMatch[1].length&&(errorMsg="Please provide a CSS unit value for "+userProvidedProp+":"+val)}return{error:errorMsg,value:strVal+unit}},DomElementSchemaRegistry}(ElementSchemaRegistry);DomElementSchemaRegistry.decorators=[{type:CompilerInjectable}],DomElementSchemaRegistry.ctorParameters=function(){return[]};var ShadowCss=function(){function ShadowCss(){this.strictStyling=!0}return ShadowCss.prototype.shimCssText=function(cssText,selector,hostSelector){void 0===hostSelector&&(hostSelector="");var sourceMappingUrl=extractSourceMappingUrl(cssText);return cssText=stripComments(cssText),cssText=this._insertDirectives(cssText),this._scopeCssText(cssText,selector,hostSelector)+sourceMappingUrl},ShadowCss.prototype._insertDirectives=function(cssText){return cssText=this._insertPolyfillDirectivesInCssText(cssText),this._insertPolyfillRulesInCssText(cssText)},ShadowCss.prototype._insertPolyfillDirectivesInCssText=function(cssText){return cssText.replace(_cssContentNextSelectorRe,function(){for(var m=[],_i=0;_i<arguments.length;_i++)m[_i]=arguments[_i];return m[2]+"{"})},ShadowCss.prototype._insertPolyfillRulesInCssText=function(cssText){return cssText.replace(_cssContentRuleRe,function(){for(var m=[],_i=0;_i<arguments.length;_i++)m[_i]=arguments[_i];var rule=m[0].replace(m[1],"").replace(m[2],"");return m[4]+rule})},ShadowCss.prototype._scopeCssText=function(cssText,scopeSelector,hostSelector){var unscopedRules=this._extractUnscopedRulesFromCssText(cssText);return cssText=this._insertPolyfillHostInCssText(cssText),cssText=this._convertColonHost(cssText),cssText=this._convertColonHostContext(cssText),cssText=this._convertShadowDOMSelectors(cssText),scopeSelector&&(cssText=this._scopeSelectors(cssText,scopeSelector,hostSelector)),cssText=cssText+"\n"+unscopedRules,cssText.trim()},ShadowCss.prototype._extractUnscopedRulesFromCssText=function(cssText){var m,r="";for(_cssContentUnscopedRuleRe.lastIndex=0;null!==(m=_cssContentUnscopedRuleRe.exec(cssText));){r+=m[0].replace(m[2],"").replace(m[1],m[4])+"\n\n"}return r},ShadowCss.prototype._convertColonHost=function(cssText){return this._convertColonRule(cssText,_cssColonHostRe,this._colonHostPartReplacer)},ShadowCss.prototype._convertColonHostContext=function(cssText){return this._convertColonRule(cssText,_cssColonHostContextRe,this._colonHostContextPartReplacer)},ShadowCss.prototype._convertColonRule=function(cssText,regExp,partReplacer){return cssText.replace(regExp,function(){for(var m=[],_i=0;_i<arguments.length;_i++)m[_i]=arguments[_i];if(m[2]){for(var parts=m[2].split(","),r=[],i=0;i<parts.length;i++){var p=parts[i].trim();if(!p)break;r.push(partReplacer(_polyfillHostNoCombinator,p,m[3]))}return r.join(",")}return _polyfillHostNoCombinator+m[3]})},ShadowCss.prototype._colonHostContextPartReplacer=function(host,part,suffix){return part.indexOf(_polyfillHost)>-1?this._colonHostPartReplacer(host,part,suffix):host+part+suffix+", "+part+" "+host+suffix},ShadowCss.prototype._colonHostPartReplacer=function(host,part,suffix){return host+part.replace(_polyfillHost,"")+suffix},ShadowCss.prototype._convertShadowDOMSelectors=function(cssText){return _shadowDOMSelectorsRe.reduce(function(result,pattern){return result.replace(pattern," ")},cssText)},ShadowCss.prototype._scopeSelectors=function(cssText,scopeSelector,hostSelector){var _this=this;return processRules(cssText,function(rule){var selector=rule.selector,content=rule.content;return"@"!=rule.selector[0]?selector=_this._scopeSelector(rule.selector,scopeSelector,hostSelector,_this.strictStyling):(rule.selector.startsWith("@media")||rule.selector.startsWith("@supports")||rule.selector.startsWith("@page")||rule.selector.startsWith("@document"))&&(content=_this._scopeSelectors(rule.content,scopeSelector,hostSelector)),new CssRule(selector,content)})},ShadowCss.prototype._scopeSelector=function(selector,scopeSelector,hostSelector,strict){var _this=this;return selector.split(",").map(function(part){return part.trim().split(_shadowDeepSelectors)}).map(function(deepParts){var shallowPart=deepParts[0],otherParts=deepParts.slice(1);return[function(shallowPart){return _this._selectorNeedsScoping(shallowPart,scopeSelector)?strict?_this._applyStrictSelectorScope(shallowPart,scopeSelector,hostSelector):_this._applySelectorScope(shallowPart,scopeSelector,hostSelector):shallowPart}(shallowPart)].concat(otherParts).join(" ")}).join(", ")},ShadowCss.prototype._selectorNeedsScoping=function(selector,scopeSelector){return!this._makeScopeMatcher(scopeSelector).test(selector)},ShadowCss.prototype._makeScopeMatcher=function(scopeSelector){var lre=/\[/g,rre=/\]/g;return scopeSelector=scopeSelector.replace(lre,"\\[").replace(rre,"\\]"),new RegExp("^("+scopeSelector+")"+_selectorReSuffix,"m")},ShadowCss.prototype._applySelectorScope=function(selector,scopeSelector,hostSelector){return this._applySimpleSelectorScope(selector,scopeSelector,hostSelector)},ShadowCss.prototype._applySimpleSelectorScope=function(selector,scopeSelector,hostSelector){if(_polyfillHostRe.lastIndex=0,_polyfillHostRe.test(selector)){var replaceBy_1=this.strictStyling?"["+hostSelector+"]":scopeSelector;return selector.replace(_polyfillHostNoCombinatorRe,function(hnc,selector){return selector.replace(/([^:]*)(:*)(.*)/,function(_,before,colon,after){return before+replaceBy_1+colon+after})}).replace(_polyfillHostRe,replaceBy_1+" ")}return scopeSelector+" "+selector},ShadowCss.prototype._applyStrictSelectorScope=function(selector,scopeSelector,hostSelector){var _this=this,isRe=/\[is=([^\]]*)\]/g;scopeSelector=scopeSelector.replace(isRe,function(_){for(var parts=[],_i=1;_i<arguments.length;_i++)parts[_i-1]=arguments[_i];return parts[0]});var attrName="["+scopeSelector+"]",_scopeSelectorPart=function(p){var scopedP=p.trim();if(!scopedP)return"";if(p.indexOf(_polyfillHostNoCombinator)>-1)scopedP=_this._applySimpleSelectorScope(p,scopeSelector,hostSelector);else{var t=p.replace(_polyfillHostRe,"");if(t.length>0){var matches=t.match(/([^:]*)(:*)(.*)/);matches&&(scopedP=matches[1]+attrName+matches[2]+matches[3])}}return scopedP},safeContent=new SafeSelector(selector);selector=safeContent.content();for(var res,scopedSelector="",startIndex=0,sep=/( |>|\+|~(?!=))\s*/g,scopeAfter=selector.indexOf(_polyfillHostNoCombinator);null!==(res=sep.exec(selector));){var separator=res[1],part=selector.slice(startIndex,res.index).trim();scopedSelector+=(startIndex>=scopeAfter?_scopeSelectorPart(part):part)+" "+separator+" ",startIndex=sep.lastIndex}return scopedSelector+=_scopeSelectorPart(selector.substring(startIndex)),safeContent.restore(scopedSelector)},ShadowCss.prototype._insertPolyfillHostInCssText=function(selector){return selector.replace(_colonHostContextRe,_polyfillHostContext).replace(_colonHostRe,_polyfillHost)},ShadowCss}(),SafeSelector=function(){function SafeSelector(selector){var _this=this;this.placeholders=[],this.index=0,selector=selector.replace(/(\[[^\]]*\])/g,function(_,keep){var replaceBy="__ph-"+_this.index+"__";return _this.placeholders.push(keep),_this.index++,replaceBy}),this._content=selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g,function(_,pseudo,exp){var replaceBy="__ph-"+_this.index+"__";return _this.placeholders.push(exp),_this.index++,pseudo+replaceBy})}return SafeSelector.prototype.restore=function(content){var _this=this;return content.replace(/__ph-(\d+)__/g,function(ph,index){return _this.placeholders[+index]})},SafeSelector.prototype.content=function(){return this._content},SafeSelector}(),_cssContentNextSelectorRe=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,_cssContentRuleRe=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,_cssContentUnscopedRuleRe=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,_polyfillHost="-shadowcsshost",_polyfillHostContext="-shadowcsscontext",_parenSuffix=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",_cssColonHostRe=new RegExp("("+_polyfillHost+_parenSuffix,"gim"),_cssColonHostContextRe=new RegExp("("+_polyfillHostContext+_parenSuffix,"gim"),_polyfillHostNoCombinator=_polyfillHost+"-no-combinator",_polyfillHostNoCombinatorRe=/-shadowcsshost-no-combinator([^\s]*)/,_shadowDOMSelectorsRe=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],_shadowDeepSelectors=/(?:>>>)|(?:\/deep\/)/g,_selectorReSuffix="([>\\s~+[.,{:][\\s\\S]*)?$",_polyfillHostRe=/-shadowcsshost/gim,_colonHostRe=/:host/gim,_colonHostContextRe=/:host-context/gim,_commentRe=/\/\*\s*[\s\S]*?\*\//g,_sourceMappingUrlRe=/\/\*\s*#\s*sourceMappingURL=[\s\S]+?\*\//,_ruleRe=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,_curlyRe=/([{}])/g,OPEN_CURLY="{",CLOSE_CURLY="}",BLOCK_PLACEHOLDER="%BLOCK%",CssRule=function(){function CssRule(selector,content){this.selector=selector,this.content=content}return CssRule}(),StringWithEscapedBlocks=function(){function StringWithEscapedBlocks(escapedString,blocks){this.escapedString=escapedString,this.blocks=blocks}return StringWithEscapedBlocks}(),COMPONENT_VARIABLE="%COMP%",HOST_ATTR="_nghost-"+COMPONENT_VARIABLE,CONTENT_ATTR="_ngcontent-"+COMPONENT_VARIABLE,StylesCompileDependency=function(){function StylesCompileDependency(name,moduleUrl,setValue){this.name=name,this.moduleUrl=moduleUrl,this.setValue=setValue}return StylesCompileDependency}(),CompiledStylesheet=function(){function CompiledStylesheet(outputCtx,stylesVar,dependencies,isShimmed,meta){this.outputCtx=outputCtx,this.stylesVar=stylesVar,this.dependencies=dependencies,this.isShimmed=isShimmed,this.meta=meta}return CompiledStylesheet}(),StyleCompiler=function(){function StyleCompiler(_urlResolver){this._urlResolver=_urlResolver,this._shadowCss=new ShadowCss}return StyleCompiler.prototype.compileComponent=function(outputCtx,comp){var template=comp.template;return this._compileStyles(outputCtx,comp,new CompileStylesheetMetadata({styles:template.styles,styleUrls:template.styleUrls,moduleUrl:identifierModuleUrl(comp.type)}),!0)},StyleCompiler.prototype.compileStyles=function(outputCtx,comp,stylesheet){return this._compileStyles(outputCtx,comp,stylesheet,!1)},StyleCompiler.prototype.needsStyleShim=function(comp){return comp.template.encapsulation===_angular_core.ViewEncapsulation.Emulated},StyleCompiler.prototype._compileStyles=function(outputCtx,comp,stylesheet,isComponentStylesheet){var _this=this,shim=this.needsStyleShim(comp),styleExpressions=stylesheet.styles.map(function(plainStyle){return literal(_this._shimIfNeeded(plainStyle,shim))}),dependencies=[];stylesheet.styleUrls.forEach(function(styleUrl){var exprIndex=styleExpressions.length;styleExpressions.push(null),dependencies.push(new StylesCompileDependency(getStylesVarName(null),styleUrl,function(value){return styleExpressions[exprIndex]=outputCtx.importExpr(value)}))});var stylesVar=getStylesVarName(isComponentStylesheet?comp:null),stmt=variable(stylesVar).set(literalArr(styleExpressions,new ArrayType(DYNAMIC_TYPE,[TypeModifier.Const]))).toDeclStmt(null,isComponentStylesheet?[StmtModifier.Final]:[StmtModifier.Final,StmtModifier.Exported]);return outputCtx.statements.push(stmt),new CompiledStylesheet(outputCtx,stylesVar,dependencies,shim,stylesheet)},StyleCompiler.prototype._shimIfNeeded=function(style$$1,shim){return shim?this._shadowCss.shimCssText(style$$1,CONTENT_ATTR,HOST_ATTR):style$$1},StyleCompiler}();StyleCompiler.decorators=[{type:CompilerInjectable}],StyleCompiler.ctorParameters=function(){return[{type:UrlResolver}]};var EventHandlerVars=function(){function EventHandlerVars(){}return EventHandlerVars}();EventHandlerVars.event=variable("$event");var ConvertActionBindingResult=function(){function ConvertActionBindingResult(stmts,allowDefault){this.stmts=stmts,this.allowDefault=allowDefault}return ConvertActionBindingResult}(),ConvertPropertyBindingResult=function(){function ConvertPropertyBindingResult(stmts,currValExpr){this.stmts=stmts,this.currValExpr=currValExpr}return ConvertPropertyBindingResult}(),_Mode={};_Mode.Statement=0,_Mode.Expression=1,_Mode[_Mode.Statement]="Statement",_Mode[_Mode.Expression]="Expression";var _BuiltinAstConverter=function(_super){function _BuiltinAstConverter(_converterFactory){var _this=_super.call(this)||this;return _this._converterFactory=_converterFactory,_this}return __extends(_BuiltinAstConverter,_super),_BuiltinAstConverter.prototype.visitPipe=function(ast,context){var _this=this,args=[ast.exp].concat(ast.args).map(function(ast){return ast.visit(_this,context)});return new BuiltinFunctionCall(ast.span,args,this._converterFactory.createPipeConverter(ast.name,args.length))},_BuiltinAstConverter.prototype.visitLiteralArray=function(ast,context){var _this=this,args=ast.expressions.map(function(ast){return ast.visit(_this,context)});return new BuiltinFunctionCall(ast.span,args,this._converterFactory.createLiteralArrayConverter(ast.expressions.length))},_BuiltinAstConverter.prototype.visitLiteralMap=function(ast,context){var _this=this,args=ast.values.map(function(ast){return ast.visit(_this,context)});return new BuiltinFunctionCall(ast.span,args,this._converterFactory.createLiteralMapConverter(ast.keys))},_BuiltinAstConverter}(AstTransformer),_AstToIrVisitor=function(){function _AstToIrVisitor(_localResolver,_implicitReceiver,bindingId){this._localResolver=_localResolver,this._implicitReceiver=_implicitReceiver,this.bindingId=bindingId,this._nodeMap=new Map,this._resultMap=new Map,this._currentTemporary=0,this.temporaryCount=0}return _AstToIrVisitor.prototype.visitBinary=function(ast,mode){var op;switch(ast.operation){case"+":op=BinaryOperator.Plus;break;case"-":op=BinaryOperator.Minus;break;case"*":op=BinaryOperator.Multiply;break;case"/":op=BinaryOperator.Divide;break;case"%":op=BinaryOperator.Modulo;break;case"&&":op=BinaryOperator.And;break;case"||":op=BinaryOperator.Or;break;case"==":op=BinaryOperator.Equals;break;case"!=":op=BinaryOperator.NotEquals;break;case"===":op=BinaryOperator.Identical;break;case"!==":op=BinaryOperator.NotIdentical;break;case"<":op=BinaryOperator.Lower;break;case">":op=BinaryOperator.Bigger;break;case"<=":op=BinaryOperator.LowerEquals;break;case">=":op=BinaryOperator.BiggerEquals;break;default:throw new Error("Unsupported operation "+ast.operation)}return convertToStatementIfNeeded(mode,new BinaryOperatorExpr(op,this._visit(ast.left,_Mode.Expression),this._visit(ast.right,_Mode.Expression)))},_AstToIrVisitor.prototype.visitChain=function(ast,mode){return ensureStatementMode(mode,ast),this.visitAll(ast.expressions,mode)},_AstToIrVisitor.prototype.visitConditional=function(ast,mode){return convertToStatementIfNeeded(mode,this._visit(ast.condition,_Mode.Expression).conditional(this._visit(ast.trueExp,_Mode.Expression),this._visit(ast.falseExp,_Mode.Expression)))},_AstToIrVisitor.prototype.visitPipe=function(ast,mode){throw new Error("Illegal state: Pipes should have been converted into functions. Pipe: "+ast.name)},_AstToIrVisitor.prototype.visitFunctionCall=function(ast,mode){var fnResult,convertedArgs=this.visitAll(ast.args,_Mode.Expression);return fnResult=ast instanceof BuiltinFunctionCall?ast.converter(convertedArgs):this._visit(ast.target,_Mode.Expression).callFn(convertedArgs),convertToStatementIfNeeded(mode,fnResult)},_AstToIrVisitor.prototype.visitImplicitReceiver=function(ast,mode){return ensureExpressionMode(mode,ast),this._implicitReceiver},_AstToIrVisitor.prototype.visitInterpolation=function(ast,mode){ensureExpressionMode(mode,ast);for(var args=[literal(ast.expressions.length)],i=0;i<ast.strings.length-1;i++)args.push(literal(ast.strings[i])),args.push(this._visit(ast.expressions[i],_Mode.Expression));return args.push(literal(ast.strings[ast.strings.length-1])),ast.expressions.length<=9?importExpr(Identifiers.inlineInterpolate).callFn(args):importExpr(Identifiers.interpolate).callFn([args[0],literalArr(args.slice(1))])},_AstToIrVisitor.prototype.visitKeyedRead=function(ast,mode){var leftMostSafe=this.leftMostSafeNode(ast);return leftMostSafe?this.convertSafeAccess(ast,leftMostSafe,mode):convertToStatementIfNeeded(mode,this._visit(ast.obj,_Mode.Expression).key(this._visit(ast.key,_Mode.Expression)))},_AstToIrVisitor.prototype.visitKeyedWrite=function(ast,mode){var obj=this._visit(ast.obj,_Mode.Expression),key=this._visit(ast.key,_Mode.Expression),value=this._visit(ast.value,_Mode.Expression);return convertToStatementIfNeeded(mode,obj.key(key).set(value))},_AstToIrVisitor.prototype.visitLiteralArray=function(ast,mode){throw new Error("Illegal State: literal arrays should have been converted into functions")},_AstToIrVisitor.prototype.visitLiteralMap=function(ast,mode){throw new Error("Illegal State: literal maps should have been converted into functions")},_AstToIrVisitor.prototype.visitLiteralPrimitive=function(ast,mode){return convertToStatementIfNeeded(mode,literal(ast.value))},_AstToIrVisitor.prototype._getLocal=function(name){return this._localResolver.getLocal(name)},_AstToIrVisitor.prototype.visitMethodCall=function(ast,mode){var leftMostSafe=this.leftMostSafeNode(ast);if(leftMostSafe)return this.convertSafeAccess(ast,leftMostSafe,mode);var args=this.visitAll(ast.args,_Mode.Expression),result=null,receiver=this._visit(ast.receiver,_Mode.Expression);if(receiver===this._implicitReceiver){var varExpr=this._getLocal(ast.name);varExpr&&(result=varExpr.callFn(args))}return null==result&&(result=receiver.callMethod(ast.name,args)),convertToStatementIfNeeded(mode,result)},_AstToIrVisitor.prototype.visitPrefixNot=function(ast,mode){return convertToStatementIfNeeded(mode,not(this._visit(ast.expression,_Mode.Expression)))},_AstToIrVisitor.prototype.visitNonNullAssert=function(ast,mode){return convertToStatementIfNeeded(mode,assertNotNull(this._visit(ast.expression,_Mode.Expression)))},_AstToIrVisitor.prototype.visitPropertyRead=function(ast,mode){var leftMostSafe=this.leftMostSafeNode(ast);if(leftMostSafe)return this.convertSafeAccess(ast,leftMostSafe,mode);var result=null,receiver=this._visit(ast.receiver,_Mode.Expression);return receiver===this._implicitReceiver&&(result=this._getLocal(ast.name)),null==result&&(result=receiver.prop(ast.name)),convertToStatementIfNeeded(mode,result)},_AstToIrVisitor.prototype.visitPropertyWrite=function(ast,mode){var receiver=this._visit(ast.receiver,_Mode.Expression);if(receiver===this._implicitReceiver){if(this._getLocal(ast.name))throw new Error("Cannot assign to a reference or variable!")}return convertToStatementIfNeeded(mode,receiver.prop(ast.name).set(this._visit(ast.value,_Mode.Expression)))},_AstToIrVisitor.prototype.visitSafePropertyRead=function(ast,mode){return this.convertSafeAccess(ast,this.leftMostSafeNode(ast),mode)},_AstToIrVisitor.prototype.visitSafeMethodCall=function(ast,mode){return this.convertSafeAccess(ast,this.leftMostSafeNode(ast),mode)},_AstToIrVisitor.prototype.visitAll=function(asts,mode){var _this=this;return asts.map(function(ast){return _this._visit(ast,mode)})},_AstToIrVisitor.prototype.visitQuote=function(ast,mode){throw new Error("Quotes are not supported for evaluation!\n Statement: "+ast.uninterpretedExpression+" located at "+ast.location)},_AstToIrVisitor.prototype._visit=function(ast,mode){var result=this._resultMap.get(ast);return result||(this._nodeMap.get(ast)||ast).visit(this,mode)},_AstToIrVisitor.prototype.convertSafeAccess=function(ast,leftMostSafe,mode){var guardedExpression=this._visit(leftMostSafe.receiver,_Mode.Expression),temporary=void 0;this.needsTemporary(leftMostSafe.receiver)&&(temporary=this.allocateTemporary(),guardedExpression=temporary.set(guardedExpression),this._resultMap.set(leftMostSafe.receiver,temporary));var condition=guardedExpression.isBlank();leftMostSafe instanceof SafeMethodCall?this._nodeMap.set(leftMostSafe,new MethodCall(leftMostSafe.span,leftMostSafe.receiver,leftMostSafe.name,leftMostSafe.args)):this._nodeMap.set(leftMostSafe,new PropertyRead(leftMostSafe.span,leftMostSafe.receiver,leftMostSafe.name));var access=this._visit(ast,_Mode.Expression);return this._nodeMap.delete(leftMostSafe),temporary&&this.releaseTemporary(temporary),convertToStatementIfNeeded(mode,condition.conditional(literal(null),access))},_AstToIrVisitor.prototype.leftMostSafeNode=function(ast){var _this=this,visit=function(visitor,ast){return(_this._nodeMap.get(ast)||ast).visit(visitor)};return ast.visit({visitBinary:function(ast){return null},visitChain:function(ast){return null},visitConditional:function(ast){return null},visitFunctionCall:function(ast){return null},visitImplicitReceiver:function(ast){return null},visitInterpolation:function(ast){return null},visitKeyedRead:function(ast){return visit(this,ast.obj)},visitKeyedWrite:function(ast){return null},visitLiteralArray:function(ast){return null},visitLiteralMap:function(ast){return null},visitLiteralPrimitive:function(ast){return null},visitMethodCall:function(ast){return visit(this,ast.receiver)},visitPipe:function(ast){return null},visitPrefixNot:function(ast){return null},visitNonNullAssert:function(ast){return null},visitPropertyRead:function(ast){return visit(this,ast.receiver)},visitPropertyWrite:function(ast){return null},visitQuote:function(ast){return null},visitSafeMethodCall:function(ast){return visit(this,ast.receiver)||ast},visitSafePropertyRead:function(ast){return visit(this,ast.receiver)||ast}})},_AstToIrVisitor.prototype.needsTemporary=function(ast){var _this=this,visit=function(visitor,ast){return ast&&(_this._nodeMap.get(ast)||ast).visit(visitor)},visitSome=function(visitor,ast){return ast.some(function(ast){return visit(visitor,ast)})};return ast.visit({visitBinary:function(ast){return visit(this,ast.left)||visit(this,ast.right)},visitChain:function(ast){return!1},visitConditional:function(ast){return visit(this,ast.condition)||visit(this,ast.trueExp)||visit(this,ast.falseExp)},visitFunctionCall:function(ast){return!0},visitImplicitReceiver:function(ast){return!1},visitInterpolation:function(ast){return visitSome(this,ast.expressions)},visitKeyedRead:function(ast){return!1},visitKeyedWrite:function(ast){return!1},visitLiteralArray:function(ast){return!0},visitLiteralMap:function(ast){return!0},visitLiteralPrimitive:function(ast){return!1},visitMethodCall:function(ast){return!0},visitPipe:function(ast){return!0},visitPrefixNot:function(ast){return visit(this,ast.expression)},visitNonNullAssert:function(ast){return visit(this,ast.expression)},visitPropertyRead:function(ast){return!1},visitPropertyWrite:function(ast){return!1},visitQuote:function(ast){return!1},visitSafeMethodCall:function(ast){return!0},visitSafePropertyRead:function(ast){return!1}})},_AstToIrVisitor.prototype.allocateTemporary=function(){var tempNumber=this._currentTemporary++;return this.temporaryCount=Math.max(this._currentTemporary,this.temporaryCount),new ReadVarExpr(temporaryName(this.bindingId,tempNumber))},_AstToIrVisitor.prototype.releaseTemporary=function(temporary){if(this._currentTemporary--,temporary.name!=temporaryName(this.bindingId,this._currentTemporary))throw new Error("Temporary "+temporary.name+" released out of order")},_AstToIrVisitor}(),DefaultLocalResolver=function(){function DefaultLocalResolver(){}return DefaultLocalResolver.prototype.getLocal=function(name){return name===EventHandlerVars.event.name?EventHandlerVars.event:null},DefaultLocalResolver}(),BuiltinFunctionCall=function(_super){function BuiltinFunctionCall(span,args,converter){var _this=_super.call(this,span,null,args)||this;return _this.args=args,_this.converter=converter,_this}return __extends(BuiltinFunctionCall,_super),BuiltinFunctionCall}(FunctionCall),CLASS_ATTR$1="class",STYLE_ATTR="style",IMPLICIT_TEMPLATE_VAR="$implicit",ViewCompileResult=function(){function ViewCompileResult(viewClassVar,rendererTypeVar){this.viewClassVar=viewClassVar,this.rendererTypeVar=rendererTypeVar}return ViewCompileResult}(),ViewCompiler=function(){function ViewCompiler(_config,_reflector,_schemaRegistry){this._config=_config,this._reflector=_reflector,this._schemaRegistry=_schemaRegistry}return ViewCompiler.prototype.compileComponent=function(outputCtx,component,template,styles,usedPipes){var _this=this,embeddedViewCount=0,staticQueryIds=findStaticQueryIds(template),renderComponentVarName=void 0;if(!component.isHost){var template_1=component.template,customRenderData=[];template_1.animations&&template_1.animations.length&&customRenderData.push(new LiteralMapEntry("animation",convertValueToOutputAst(outputCtx,template_1.animations),!0));var renderComponentVar=variable(rendererTypeName(component.type.reference));renderComponentVarName=renderComponentVar.name,outputCtx.statements.push(renderComponentVar.set(importExpr(Identifiers.createRendererType2).callFn([new LiteralMapExpr([new LiteralMapEntry("encapsulation",literal(template_1.encapsulation),!1),new LiteralMapEntry("styles",styles,!1),new LiteralMapEntry("data",new LiteralMapExpr(customRenderData),!1)])])).toDeclStmt(importType(Identifiers.RendererType2),[StmtModifier.Final,StmtModifier.Exported]))}var viewBuilderFactory=function(parent){var embeddedViewIndex=embeddedViewCount++;return new ViewBuilder(_this._reflector,outputCtx,parent,component,embeddedViewIndex,usedPipes,staticQueryIds,viewBuilderFactory)},visitor=viewBuilderFactory(null);return visitor.visitAll([],template),(_a=outputCtx.statements).push.apply(_a,visitor.build()),new ViewCompileResult(visitor.viewName,renderComponentVarName);var _a},ViewCompiler}();ViewCompiler.decorators=[{type:CompilerInjectable}],ViewCompiler.ctorParameters=function(){return[{type:CompilerConfig},{type:CompileReflector},{type:ElementSchemaRegistry}]};var LOG_VAR$1=variable("_l"),VIEW_VAR=variable("_v"),CHECK_VAR=variable("_ck"),COMP_VAR=variable("_co"),EVENT_NAME_VAR=variable("en"),ALLOW_DEFAULT_VAR=variable("ad"),ViewBuilder=function(){function ViewBuilder(reflector,outputCtx,parent,component,embeddedViewIndex,usedPipes,staticQueryIds,viewBuilderFactory){this.reflector=reflector,this.outputCtx=outputCtx,this.parent=parent,this.component=component,this.embeddedViewIndex=embeddedViewIndex,this.usedPipes=usedPipes,this.staticQueryIds=staticQueryIds,this.viewBuilderFactory=viewBuilderFactory,this.nodes=[],this.purePipeNodeIndices=Object.create(null),this.refNodeIndices=Object.create(null),this.variables=[],this.children=[],this.compType=this.embeddedViewIndex>0?DYNAMIC_TYPE:expressionType(outputCtx.importExpr(this.component.type.reference))}return Object.defineProperty(ViewBuilder.prototype,"viewName",{get:function(){return viewClassName(this.component.type.reference,this.embeddedViewIndex)},enumerable:!0,configurable:!0}),ViewBuilder.prototype.visitAll=function(variables,astNodes){var _this=this;if(this.variables=variables,this.parent||this.usedPipes.forEach(function(pipe){pipe.pure&&(_this.purePipeNodeIndices[pipe.name]=_this._createPipe(null,pipe))}),!this.parent){var queryIds_1=staticViewQueryIds(this.staticQueryIds);this.component.viewQueries.forEach(function(query,queryIndex){var queryId=queryIndex+1,bindingType=query.first?0:1,flags=134217728|calcStaticDynamicQueryFlags(queryIds_1,queryId,query.first);_this.nodes.push(function(){return{sourceSpan:null,nodeFlags:flags,nodeDef:importExpr(Identifiers.queryDef).callFn([literal(flags),literal(queryId),new LiteralMapExpr([new LiteralMapEntry(query.propertyName,literal(bindingType),!1)])])}})})}templateVisitAll(this,astNodes),this.parent&&(0===astNodes.length||needsAdditionalRootNode(astNodes))&&this.nodes.push(function(){return{sourceSpan:null,nodeFlags:1,nodeDef:importExpr(Identifiers.anchorDef).callFn([literal(0),NULL_EXPR,NULL_EXPR,literal(0)])}})},ViewBuilder.prototype.build=function(targetStatements){void 0===targetStatements&&(targetStatements=[]),this.children.forEach(function(child){return child.build(targetStatements)});var _a=this._createNodeExpressions(),updateRendererStmts=_a.updateRendererStmts,updateDirectivesStmts=_a.updateDirectivesStmts,nodeDefExprs=_a.nodeDefExprs,updateRendererFn=this._createUpdateFn(updateRendererStmts),updateDirectivesFn=this._createUpdateFn(updateDirectivesStmts),viewFlags=0;this.parent||this.component.changeDetection!==_angular_core.ChangeDetectionStrategy.OnPush||(viewFlags|=2);var viewFactory=new DeclareFunctionStmt(this.viewName,[new FnParam(LOG_VAR$1.name)],[new ReturnStatement(importExpr(Identifiers.viewDef).callFn([literal(viewFlags),literalArr(nodeDefExprs),updateDirectivesFn,updateRendererFn]))],importType(Identifiers.ViewDefinition),0===this.embeddedViewIndex?[StmtModifier.Exported]:[]);return targetStatements.push(viewFactory),targetStatements},ViewBuilder.prototype._createUpdateFn=function(updateStmts){var updateFn;if(updateStmts.length>0){var preStmts=[];!this.component.isHost&&findReadVarNames(updateStmts).has(COMP_VAR.name)&&preStmts.push(COMP_VAR.set(VIEW_VAR.prop("component")).toDeclStmt(this.compType)),updateFn=fn([new FnParam(CHECK_VAR.name,INFERRED_TYPE),new FnParam(VIEW_VAR.name,INFERRED_TYPE)],preStmts.concat(updateStmts),INFERRED_TYPE)}else updateFn=NULL_EXPR;return updateFn},ViewBuilder.prototype.visitNgContent=function(ast,context){this.nodes.push(function(){return{sourceSpan:ast.sourceSpan,nodeFlags:8,nodeDef:importExpr(Identifiers.ngContentDef).callFn([literal(ast.ngContentIndex),literal(ast.index)])}})},ViewBuilder.prototype.visitText=function(ast,context){this.nodes.push(function(){return{sourceSpan:ast.sourceSpan,nodeFlags:2,nodeDef:importExpr(Identifiers.textDef).callFn([literal(ast.ngContentIndex),literalArr([literal(ast.value)])])}})},ViewBuilder.prototype.visitBoundText=function(ast,context){var _this=this,nodeIndex=this.nodes.length;this.nodes.push(null);var astWithSource=ast.value,inter=astWithSource.ast,updateRendererExpressions=inter.expressions.map(function(expr,bindingIndex){return _this._preprocessUpdateExpression({nodeIndex:nodeIndex,bindingIndex:bindingIndex,sourceSpan:ast.sourceSpan,context:COMP_VAR,value:expr})});this.nodes[nodeIndex]=function(){return{sourceSpan:ast.sourceSpan,nodeFlags:2,nodeDef:importExpr(Identifiers.textDef).callFn([literal(ast.ngContentIndex),literalArr(inter.strings.map(function(s){return literal(s)}))]),updateRenderer:updateRendererExpressions}}},ViewBuilder.prototype.visitEmbeddedTemplate=function(ast,context){var _this=this,nodeIndex=this.nodes.length;this.nodes.push(null);var _a=this._visitElementOrTemplate(nodeIndex,ast),flags=_a.flags,queryMatchesExpr=_a.queryMatchesExpr,hostEvents=_a.hostEvents,childVisitor=this.viewBuilderFactory(this);this.children.push(childVisitor),childVisitor.visitAll(ast.variables,ast.children);var childCount=this.nodes.length-nodeIndex-1;this.nodes[nodeIndex]=function(){return{sourceSpan:ast.sourceSpan,nodeFlags:1|flags,nodeDef:importExpr(Identifiers.anchorDef).callFn([literal(flags),queryMatchesExpr,literal(ast.ngContentIndex),literal(childCount),_this._createElementHandleEventFn(nodeIndex,hostEvents),variable(childVisitor.viewName)])}}},ViewBuilder.prototype.visitElement=function(ast,context){var _this=this,nodeIndex=this.nodes.length;this.nodes.push(null);var elName=isNgContainer(ast.name)?null:ast.name,_a=this._visitElementOrTemplate(nodeIndex,ast),flags=_a.flags,usedEvents=_a.usedEvents,queryMatchesExpr=_a.queryMatchesExpr,dirHostBindings=_a.hostBindings,hostEvents=_a.hostEvents,inputDefs=[],updateRendererExpressions=[],outputDefs=[];if(elName){var hostBindings=ast.inputs.map(function(inputAst){return{context:COMP_VAR,inputAst:inputAst,dirAst:null}}).concat(dirHostBindings);hostBindings.length&&(updateRendererExpressions=hostBindings.map(function(hostBinding,bindingIndex){return _this._preprocessUpdateExpression({context:hostBinding.context,nodeIndex:nodeIndex,bindingIndex:bindingIndex,sourceSpan:hostBinding.inputAst.sourceSpan,value:hostBinding.inputAst.value})}),inputDefs=hostBindings.map(function(hostBinding){return elementBindingDef(hostBinding.inputAst,hostBinding.dirAst)})),outputDefs=usedEvents.map(function(_a){var target=_a[0],eventName=_a[1];return literalArr([literal(target),literal(eventName)])})}templateVisitAll(this,ast.children);var childCount=this.nodes.length-nodeIndex-1,compAst=ast.directives.find(function(dirAst){return dirAst.directive.isComponent}),compRendererType=NULL_EXPR,compView=NULL_EXPR;compAst&&(compView=this.outputCtx.importExpr(compAst.directive.componentViewType),compRendererType=this.outputCtx.importExpr(compAst.directive.rendererType)),this.nodes[nodeIndex]=function(){return{sourceSpan:ast.sourceSpan,nodeFlags:1|flags,nodeDef:importExpr(Identifiers.elementDef).callFn([literal(flags),queryMatchesExpr,literal(ast.ngContentIndex),literal(childCount),literal(elName),elName?fixedAttrsDef(ast):NULL_EXPR,inputDefs.length?literalArr(inputDefs):NULL_EXPR,outputDefs.length?literalArr(outputDefs):NULL_EXPR,_this._createElementHandleEventFn(nodeIndex,hostEvents),compView,compRendererType]),updateRenderer:updateRendererExpressions}}},ViewBuilder.prototype._visitElementOrTemplate=function(nodeIndex,ast){var _this=this,flags=0;ast.hasViewContainer&&(flags|=16777216);var usedEvents=new Map;ast.outputs.forEach(function(event){var _a=elementEventNameAndTarget(event,null),name=_a.name,target=_a.target;usedEvents.set(_angular_core.ɵelementEventFullName(target,name),[target,name])}),ast.directives.forEach(function(dirAst){dirAst.hostEvents.forEach(function(event){var _a=elementEventNameAndTarget(event,dirAst),name=_a.name,target=_a.target;usedEvents.set(_angular_core.ɵelementEventFullName(target,name),[target,name])})});var hostBindings=[],hostEvents=[];this._visitComponentFactoryResolverProvider(ast.directives),ast.providers.forEach(function(providerAst,providerIndex){var dirAst=void 0,dirIndex=void 0;if(ast.directives.forEach(function(localDirAst,i){localDirAst.directive.type.reference===tokenReference(providerAst.token)&&(dirAst=localDirAst,dirIndex=i)}),dirAst){var _a=_this._visitDirective(providerAst,dirAst,dirIndex,nodeIndex,ast.references,ast.queryMatches,usedEvents,_this.staticQueryIds.get(ast)),dirHostBindings=_a.hostBindings,dirHostEvents=_a.hostEvents;hostBindings.push.apply(hostBindings,dirHostBindings),hostEvents.push.apply(hostEvents,dirHostEvents)}else _this._visitProvider(providerAst,ast.queryMatches)});var queryMatchExprs=[];return ast.queryMatches.forEach(function(match){var valueType=void 0;tokenReference(match.value)===_this.reflector.resolveExternalReference(Identifiers.ElementRef)?valueType=0:tokenReference(match.value)===_this.reflector.resolveExternalReference(Identifiers.ViewContainerRef)?valueType=3:tokenReference(match.value)===_this.reflector.resolveExternalReference(Identifiers.TemplateRef)&&(valueType=2),null!=valueType&&queryMatchExprs.push(literalArr([literal(match.queryId),literal(valueType)]))}),ast.references.forEach(function(ref){var valueType=void 0;ref.value?tokenReference(ref.value)===_this.reflector.resolveExternalReference(Identifiers.TemplateRef)&&(valueType=2):valueType=1,null!=valueType&&(_this.refNodeIndices[ref.name]=nodeIndex,queryMatchExprs.push(literalArr([literal(ref.name),literal(valueType)])))}),ast.outputs.forEach(function(outputAst){hostEvents.push({context:COMP_VAR,eventAst:outputAst,dirAst:null})}),{flags:flags,usedEvents:Array.from(usedEvents.values()),queryMatchesExpr:queryMatchExprs.length?literalArr(queryMatchExprs):NULL_EXPR,hostBindings:hostBindings,hostEvents:hostEvents}},ViewBuilder.prototype._visitDirective=function(providerAst,dirAst,directiveIndex,elementNodeIndex,refs,queryMatches,usedEvents,queryIds){var _this=this,nodeIndex=this.nodes.length;this.nodes.push(null),dirAst.directive.queries.forEach(function(query,queryIndex){var queryId=dirAst.contentQueryStartId+queryIndex,flags=67108864|calcStaticDynamicQueryFlags(queryIds,queryId,query.first),bindingType=query.first?0:1;_this.nodes.push(function(){return{sourceSpan:dirAst.sourceSpan,nodeFlags:flags,nodeDef:importExpr(Identifiers.queryDef).callFn([literal(flags),literal(queryId),new LiteralMapExpr([new LiteralMapEntry(query.propertyName,literal(bindingType),!1)])])}})});var childCount=this.nodes.length-nodeIndex-1,_a=this._visitProviderOrDirective(providerAst,queryMatches),flags=_a.flags,queryMatchExprs=_a.queryMatchExprs,providerExpr=_a.providerExpr,depsExpr=_a.depsExpr;refs.forEach(function(ref){ref.value&&tokenReference(ref.value)===tokenReference(providerAst.token)&&(_this.refNodeIndices[ref.name]=nodeIndex,queryMatchExprs.push(literalArr([literal(ref.name),literal(4)])))}),dirAst.directive.isComponent&&(flags|=32768);var inputDefs=dirAst.inputs.map(function(inputAst,inputIndex){var mapValue=literalArr([literal(inputIndex),literal(inputAst.directiveName)]);return new LiteralMapEntry(inputAst.directiveName,mapValue,!1)}),outputDefs=[],dirMeta=dirAst.directive;Object.keys(dirMeta.outputs).forEach(function(propName){var eventName=dirMeta.outputs[propName];usedEvents.has(eventName)&&outputDefs.push(new LiteralMapEntry(propName,literal(eventName),!1))});var updateDirectiveExpressions=[];(dirAst.inputs.length||(327680&flags)>0)&&(updateDirectiveExpressions=dirAst.inputs.map(function(input,bindingIndex){return _this._preprocessUpdateExpression({nodeIndex:nodeIndex,bindingIndex:bindingIndex,sourceSpan:input.sourceSpan,context:COMP_VAR,value:input.value})}));var dirContextExpr=importExpr(Identifiers.nodeValue).callFn([VIEW_VAR,literal(nodeIndex)]),hostBindings=dirAst.hostProperties.map(function(inputAst){return{context:dirContextExpr,dirAst:dirAst,inputAst:inputAst}}),hostEvents=dirAst.hostEvents.map(function(hostEventAst){return{context:dirContextExpr,eventAst:hostEventAst,dirAst:dirAst}});return this.nodes[nodeIndex]=function(){return{sourceSpan:dirAst.sourceSpan,nodeFlags:16384|flags,nodeDef:importExpr(Identifiers.directiveDef).callFn([literal(flags),queryMatchExprs.length?literalArr(queryMatchExprs):NULL_EXPR,literal(childCount),providerExpr,depsExpr,inputDefs.length?new LiteralMapExpr(inputDefs):NULL_EXPR,outputDefs.length?new LiteralMapExpr(outputDefs):NULL_EXPR]),updateDirectives:updateDirectiveExpressions,directive:dirAst.directive.type}},{hostBindings:hostBindings,hostEvents:hostEvents}},ViewBuilder.prototype._visitProvider=function(providerAst,queryMatches){this._addProviderNode(this._visitProviderOrDirective(providerAst,queryMatches))},ViewBuilder.prototype._visitComponentFactoryResolverProvider=function(directives){var componentDirMeta=directives.find(function(dirAst){return dirAst.directive.isComponent});if(componentDirMeta&&componentDirMeta.directive.entryComponents.length){var _a=componentFactoryResolverProviderDef(this.reflector,this.outputCtx,8192,componentDirMeta.directive.entryComponents),providerExpr=_a.providerExpr,depsExpr=_a.depsExpr,flags=_a.flags,tokenExpr_1=_a.tokenExpr;this._addProviderNode({providerExpr:providerExpr,depsExpr:depsExpr,flags:flags,tokenExpr:tokenExpr_1,queryMatchExprs:[],sourceSpan:componentDirMeta.sourceSpan})}},ViewBuilder.prototype._addProviderNode=function(data){this.nodes.length;this.nodes.push(function(){return{sourceSpan:data.sourceSpan,nodeFlags:data.flags,nodeDef:importExpr(Identifiers.providerDef).callFn([literal(data.flags),data.queryMatchExprs.length?literalArr(data.queryMatchExprs):NULL_EXPR,data.tokenExpr,data.providerExpr,data.depsExpr])}})},ViewBuilder.prototype._visitProviderOrDirective=function(providerAst,queryMatches){var flags=0,queryMatchExprs=[];queryMatches.forEach(function(match){tokenReference(match.value)===tokenReference(providerAst.token)&&queryMatchExprs.push(literalArr([literal(match.queryId),literal(4)]))});var _a=providerDef(this.outputCtx,providerAst),providerExpr=_a.providerExpr,depsExpr=_a.depsExpr,providerFlags=_a.flags,tokenExpr=_a.tokenExpr;return{flags:flags|providerFlags,queryMatchExprs:queryMatchExprs,providerExpr:providerExpr,depsExpr:depsExpr,tokenExpr:tokenExpr,sourceSpan:providerAst.sourceSpan}},ViewBuilder.prototype.getLocal=function(name){if(name==EventHandlerVars.event.name)return EventHandlerVars.event;for(var currViewExpr=VIEW_VAR,currBuilder=this;currBuilder;currBuilder=currBuilder.parent,currViewExpr=currViewExpr.prop("parent").cast(DYNAMIC_TYPE)){var refNodeIndex=currBuilder.refNodeIndices[name];if(null!=refNodeIndex)return importExpr(Identifiers.nodeValue).callFn([currViewExpr,literal(refNodeIndex)]);var varAst=currBuilder.variables.find(function(varAst){return varAst.name===name});if(varAst){var varValue=varAst.value||IMPLICIT_TEMPLATE_VAR;return currViewExpr.prop("context").prop(varValue)}}return null},ViewBuilder.prototype.createLiteralArrayConverter=function(sourceSpan,argCount){if(0===argCount){var valueExpr_1=importExpr(Identifiers.EMPTY_ARRAY);return function(){return valueExpr_1}}var nodeIndex=this.nodes.length;return this.nodes.push(function(){return{sourceSpan:sourceSpan,nodeFlags:32,nodeDef:importExpr(Identifiers.pureArrayDef).callFn([literal(argCount)])}}),function(args){return callCheckStmt(nodeIndex,args)}},ViewBuilder.prototype.createLiteralMapConverter=function(sourceSpan,keys){if(0===keys.length){var valueExpr_2=importExpr(Identifiers.EMPTY_MAP);return function(){return valueExpr_2}}var map=literalMap(keys.map(function(e,i){return Object.assign({},e,{value:literal(i)})})),nodeIndex=this.nodes.length;return this.nodes.push(function(){return{sourceSpan:sourceSpan,nodeFlags:64,nodeDef:importExpr(Identifiers.pureObjectDef).callFn([map])}}),function(args){return callCheckStmt(nodeIndex,args)}},ViewBuilder.prototype.createPipeConverter=function(expression,name,argCount){var pipe=this.usedPipes.find(function(pipeSummary){return pipeSummary.name===name});if(pipe.pure){var nodeIndex_1=this.nodes.length;this.nodes.push(function(){return{sourceSpan:expression.sourceSpan,nodeFlags:128,nodeDef:importExpr(Identifiers.purePipeDef).callFn([literal(argCount)])}});for(var compViewExpr=VIEW_VAR,compBuilder=this;compBuilder.parent;)compBuilder=compBuilder.parent,compViewExpr=compViewExpr.prop("parent").cast(DYNAMIC_TYPE);var pipeNodeIndex=compBuilder.purePipeNodeIndices[name],pipeValueExpr_1=importExpr(Identifiers.nodeValue).callFn([compViewExpr,literal(pipeNodeIndex)]);return function(args){return callUnwrapValue(expression.nodeIndex,expression.bindingIndex,callCheckStmt(nodeIndex_1,[pipeValueExpr_1].concat(args)))}}var nodeIndex=this._createPipe(expression.sourceSpan,pipe),nodeValueExpr_1=importExpr(Identifiers.nodeValue).callFn([VIEW_VAR,literal(nodeIndex)]);return function(args){return callUnwrapValue(expression.nodeIndex,expression.bindingIndex,nodeValueExpr_1.callMethod("transform",args))}},ViewBuilder.prototype._createPipe=function(sourceSpan,pipe){var _this=this,nodeIndex=this.nodes.length,flags=0;pipe.type.lifecycleHooks.forEach(function(lifecycleHook){lifecycleHook===LifecycleHooks.OnDestroy&&(flags|=lifecycleHookToNodeFlag(lifecycleHook))});var depExprs=pipe.type.diDeps.map(function(diDep){return depDef(_this.outputCtx,diDep)});return this.nodes.push(function(){return{sourceSpan:sourceSpan,nodeFlags:16,nodeDef:importExpr(Identifiers.pipeDef).callFn([literal(flags),_this.outputCtx.importExpr(pipe.type.reference),literalArr(depExprs)])}}),nodeIndex},ViewBuilder.prototype._preprocessUpdateExpression=function(expression){var _this=this;return{nodeIndex:expression.nodeIndex,bindingIndex:expression.bindingIndex,sourceSpan:expression.sourceSpan,context:expression.context,value:convertPropertyBindingBuiltins({createLiteralArrayConverter:function(argCount){return _this.createLiteralArrayConverter(expression.sourceSpan,argCount)},createLiteralMapConverter:function(keys){return _this.createLiteralMapConverter(expression.sourceSpan,keys)},createPipeConverter:function(name,argCount){return _this.createPipeConverter(expression,name,argCount)}},expression.value)}},ViewBuilder.prototype._createNodeExpressions=function(){function createUpdateStatements(nodeIndex,sourceSpan,expressions,allowEmptyExprs){var updateStmts=[],exprs=expressions.map(function(_a){var sourceSpan=_a.sourceSpan,context=_a.context,value=_a.value,bindingId=""+updateBindingCount++,nameResolver=context===COMP_VAR?self:null,_b=convertPropertyBinding(nameResolver,context,value,bindingId),stmts=_b.stmts,currValExpr=_b.currValExpr;return updateStmts.push.apply(updateStmts,stmts.map(function(stmt){return applySourceSpanToStatementIfNeeded(stmt,sourceSpan)})),applySourceSpanToExpressionIfNeeded(currValExpr,sourceSpan)});return(expressions.length||allowEmptyExprs)&&updateStmts.push(applySourceSpanToStatementIfNeeded(callCheckStmt(nodeIndex,exprs).toStmt(),sourceSpan)),updateStmts}var self=this,updateBindingCount=0,updateRendererStmts=[],updateDirectivesStmts=[],nodeDefExprs=this.nodes.map(function(factory,nodeIndex){var _a=factory(),nodeDef=_a.nodeDef,nodeFlags=_a.nodeFlags,updateDirectives=_a.updateDirectives,updateRenderer=_a.updateRenderer,sourceSpan=_a.sourceSpan;return updateRenderer&&updateRendererStmts.push.apply(updateRendererStmts,createUpdateStatements(nodeIndex,sourceSpan,updateRenderer,!1)),updateDirectives&&updateDirectivesStmts.push.apply(updateDirectivesStmts,createUpdateStatements(nodeIndex,sourceSpan,updateDirectives,(327680&nodeFlags)>0)),applySourceSpanToExpressionIfNeeded(3&nodeFlags?new CommaExpr([LOG_VAR$1.callFn([]).callFn([]),nodeDef]):nodeDef,sourceSpan)});return{updateRendererStmts:updateRendererStmts,updateDirectivesStmts:updateDirectivesStmts,nodeDefExprs:nodeDefExprs}},ViewBuilder.prototype._createElementHandleEventFn=function(nodeIndex,handlers){var _this=this,handleEventStmts=[],handleEventBindingCount=0;handlers.forEach(function(_a){var context=_a.context,eventAst=_a.eventAst,dirAst=_a.dirAst,bindingId=""+handleEventBindingCount++,nameResolver=context===COMP_VAR?_this:null,_b=convertActionBinding(nameResolver,context,eventAst.handler,bindingId),stmts=_b.stmts,allowDefault=_b.allowDefault,trueStmts=stmts;allowDefault&&trueStmts.push(ALLOW_DEFAULT_VAR.set(allowDefault.and(ALLOW_DEFAULT_VAR)).toStmt());var _c=elementEventNameAndTarget(eventAst,dirAst),eventTarget=_c.target,eventName=_c.name,fullEventName=_angular_core.ɵelementEventFullName(eventTarget,eventName);handleEventStmts.push(applySourceSpanToStatementIfNeeded(new IfStmt(literal(fullEventName).identical(EVENT_NAME_VAR),trueStmts),eventAst.sourceSpan))});var handleEventFn;if(handleEventStmts.length>0){var preStmts=[ALLOW_DEFAULT_VAR.set(literal(!0)).toDeclStmt(BOOL_TYPE)];!this.component.isHost&&findReadVarNames(handleEventStmts).has(COMP_VAR.name)&&preStmts.push(COMP_VAR.set(VIEW_VAR.prop("component")).toDeclStmt(this.compType)),handleEventFn=fn([new FnParam(VIEW_VAR.name,INFERRED_TYPE),new FnParam(EVENT_NAME_VAR.name,INFERRED_TYPE),new FnParam(EventHandlerVars.event.name,INFERRED_TYPE)],preStmts.concat(handleEventStmts,[new ReturnStatement(ALLOW_DEFAULT_VAR)]),INFERRED_TYPE)}else handleEventFn=NULL_EXPR;return handleEventFn},ViewBuilder.prototype.visitDirective=function(ast,context){},ViewBuilder.prototype.visitDirectiveProperty=function(ast,context){},ViewBuilder.prototype.visitReference=function(ast,context){},ViewBuilder.prototype.visitVariable=function(ast,context){},ViewBuilder.prototype.visitEvent=function(ast,context){},ViewBuilder.prototype.visitElementProperty=function(ast,context){},ViewBuilder.prototype.visitAttr=function(ast,context){},ViewBuilder}(),GeneratedFile=function(){function GeneratedFile(srcFileUrl,genFileUrl,sourceOrStmts){this.srcFileUrl=srcFileUrl,this.genFileUrl=genFileUrl,"string"==typeof sourceOrStmts?(this.source=sourceOrStmts,this.stmts=null):(this.source=null,this.stmts=sourceOrStmts)}return GeneratedFile}(),ToJsonSerializer=function(_super){function ToJsonSerializer(symbolResolver,summaryResolver){var _this=_super.call(this)||this;return _this.symbolResolver=symbolResolver,_this.summaryResolver=summaryResolver,_this.symbols=[],_this.indexBySymbol=new Map,_this.processedSummaryBySymbol=new Map,_this.processedSummaries=[],_this}return __extends(ToJsonSerializer,_super),ToJsonSerializer.prototype.addOrMergeSummary=function(summary){var symbolMeta=summary.metadata;if(symbolMeta&&"class"===symbolMeta.__symbolic){var clone_1={};Object.keys(symbolMeta).forEach(function(propName){"decorators"!==propName&&(clone_1[propName]=symbolMeta[propName])}),symbolMeta=clone_1}var processedSummary=this.processedSummaryBySymbol.get(summary.symbol);processedSummary||(processedSummary=this.processValue({symbol:summary.symbol}),this.processedSummaries.push(processedSummary),this.processedSummaryBySymbol.set(summary.symbol,processedSummary)),null==processedSummary.metadata&&null!=symbolMeta&&(processedSummary.metadata=this.processValue(symbolMeta)),null==processedSummary.type&&null!=summary.type&&(processedSummary.type=this.processValue(summary.type))},ToJsonSerializer.prototype.serialize=function(){var _this=this,exportAs=[];return{json:JSON.stringify({summaries:this.processedSummaries,symbols:this.symbols.map(function(symbol,index){symbol.assertNoMembers();var importAs=void 0;return _this.summaryResolver.isLibraryFile(symbol.filePath)&&(importAs=symbol.name+"_"+index,exportAs.push({symbol:symbol,exportAs:importAs})),{__symbol:index,name:symbol.name,filePath:_this.summaryResolver.getLibraryFileName(symbol.filePath),importAs:importAs}})}),exportAs:exportAs}},ToJsonSerializer.prototype.processValue=function(value){return visitValue(value,this,null)},ToJsonSerializer.prototype.visitOther=function(value,context){if(value instanceof StaticSymbol){var baseSymbol=this.symbolResolver.getStaticSymbol(value.filePath,value.name),index=this.indexBySymbol.get(baseSymbol);return null==index&&(index=this.indexBySymbol.size,this.indexBySymbol.set(baseSymbol,index),this.symbols.push(baseSymbol)),{__symbol:index,members:value.members}}},ToJsonSerializer}(ValueTransformer),ForJitSerializer=function(){function ForJitSerializer(outputCtx,symbolResolver){this.outputCtx=outputCtx,this.symbolResolver=symbolResolver,this.data=new Map}return ForJitSerializer.prototype.addSourceType=function(summary,metadata){this.data.set(summary.type.reference,{summary:summary,metadata:metadata,isLibrary:!1})},ForJitSerializer.prototype.addLibType=function(summary){this.data.set(summary.type.reference,{summary:summary,metadata:null,isLibrary:!0})},ForJitSerializer.prototype.serialize=function(exportAs){var _this=this,ngModuleSymbols=new Set;Array.from(this.data.values()).forEach(function(_a){var summary=_a.summary,metadata=_a.metadata,isLibrary=_a.isLibrary;if(summary.summaryKind===CompileSummaryKind.NgModule){ngModuleSymbols.add(summary.type.reference);summary.modules.forEach(function(mod){ngModuleSymbols.add(mod.reference)})}if(!isLibrary){summaryForJitName(summary.type.reference.name);createSummaryForJitFunction(_this.outputCtx,summary.type.reference,_this.serializeSummaryWithDeps(summary,metadata))}}),exportAs.forEach(function(entry){var symbol=entry.symbol;if(ngModuleSymbols.has(symbol)){var jitExportAsName=summaryForJitName(entry.exportAs);_this.outputCtx.statements.push(variable(jitExportAsName).set(_this.serializeSummaryRef(symbol)).toDeclStmt(null,[StmtModifier.Exported]))}})},ForJitSerializer.prototype.serializeSummaryWithDeps=function(summary,metadata){var _this=this,expressions=[this.serializeSummary(summary)],providers=[];if(metadata instanceof CompileNgModuleMetadata)expressions.push.apply(expressions,metadata.declaredDirectives.concat(metadata.declaredPipes).map(function(type){return type.reference}).concat(metadata.transitiveModule.modules.map(function(type){return type.reference}).filter(function(ref){return ref!==metadata.type.reference})).map(function(ref){return _this.serializeSummaryRef(ref)})),providers=metadata.providers;else if(summary.summaryKind===CompileSummaryKind.Directive){var dirSummary=summary;providers=dirSummary.providers.concat(dirSummary.viewProviders)}return expressions.push.apply(expressions,providers.filter(function(provider){return!!provider.useClass}).map(function(provider){return _this.serializeSummary({summaryKind:CompileSummaryKind.Injectable,type:provider.useClass})})),literalArr(expressions)},ForJitSerializer.prototype.serializeSummaryRef=function(typeSymbol){var jitImportedSymbol=this.symbolResolver.getStaticSymbol(summaryForJitFileName(typeSymbol.filePath),summaryForJitName(typeSymbol.name));return this.outputCtx.importExpr(jitImportedSymbol)},ForJitSerializer.prototype.serializeSummary=function(data){var outputCtx=this.outputCtx;return visitValue(data,new(function(){function Transformer(){}return Transformer.prototype.visitArray=function(arr,context){var _this=this;return literalArr(arr.map(function(entry){return visitValue(entry,_this,context)}))},Transformer.prototype.visitStringMap=function(map,context){var _this=this;return new LiteralMapExpr(Object.keys(map).map(function(key){return new LiteralMapEntry(key,visitValue(map[key],_this,context),!1)}))},Transformer.prototype.visitPrimitive=function(value,context){return literal(value)},Transformer.prototype.visitOther=function(value,context){if(value instanceof StaticSymbol)return outputCtx.importExpr(value);throw new Error("Illegal State: Encountered value "+value)},Transformer}()),null)},ForJitSerializer}(),FromJsonDeserializer=function(_super){function FromJsonDeserializer(symbolCache){var _this=_super.call(this)||this;return _this.symbolCache=symbolCache,_this}return __extends(FromJsonDeserializer,_super),FromJsonDeserializer.prototype.deserialize=function(json){var _this=this,data=JSON.parse(json),importAs=[];return this.symbols=[],data.symbols.forEach(function(serializedSymbol){var symbol=_this.symbolCache.get(serializedSymbol.filePath,serializedSymbol.name);_this.symbols.push(symbol),serializedSymbol.importAs&&importAs.push({symbol:symbol,importAs:serializedSymbol.importAs})}),{summaries:visitValue(data.summaries,this,null),importAs:importAs}},FromJsonDeserializer.prototype.visitStringMap=function(map,context){if("__symbol"in map){var baseSymbol=this.symbols[map.__symbol],members=map.members;return members.length?this.symbolCache.get(baseSymbol.filePath,baseSymbol.name,members):baseSymbol}return _super.prototype.visitStringMap.call(this,map,context)},FromJsonDeserializer}(ValueTransformer),AotCompiler=function(){function AotCompiler(_config,_host,_reflector,_metadataResolver,_templateParser,_styleCompiler,_viewCompiler,_ngModuleCompiler,_outputEmitter,_summaryResolver,_localeId,_translationFormat,_enableSummariesForJit,_symbolResolver){this._config=_config,this._host=_host,this._reflector=_reflector,this._metadataResolver=_metadataResolver,this._templateParser=_templateParser,this._styleCompiler=_styleCompiler,this._viewCompiler=_viewCompiler,this._ngModuleCompiler=_ngModuleCompiler,this._outputEmitter=_outputEmitter,this._summaryResolver=_summaryResolver,this._localeId=_localeId,this._translationFormat=_translationFormat,this._enableSummariesForJit=_enableSummariesForJit,this._symbolResolver=_symbolResolver}return AotCompiler.prototype.clearCache=function(){this._metadataResolver.clearCache()},AotCompiler.prototype.analyzeModulesSync=function(rootFiles){var _this=this,programSymbols=extractProgramSymbols(this._symbolResolver,rootFiles,this._host),analyzeResult=analyzeAndValidateNgModules(programSymbols,this._host,this._metadataResolver);return analyzeResult.ngModules.forEach(function(ngModule){return _this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference,!0)}),analyzeResult},AotCompiler.prototype.analyzeModulesAsync=function(rootFiles){var _this=this,programSymbols=extractProgramSymbols(this._symbolResolver,rootFiles,this._host),analyzeResult=analyzeAndValidateNgModules(programSymbols,this._host,this._metadataResolver);return Promise.all(analyzeResult.ngModules.map(function(ngModule){return _this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference,!1)})).then(function(){return analyzeResult})},AotCompiler.prototype.emitAllStubs=function(analyzeResult){var _this=this;return flatten(analyzeResult.files.map(function(file){return _this._compileStubFile(file.srcUrl,file.directives,file.ngModules)}))},AotCompiler.prototype.emitAllImpls=function(analyzeResult){var _this=this,ngModuleByPipeOrDirective=analyzeResult.ngModuleByPipeOrDirective;return flatten(analyzeResult.files.map(function(file){return _this._compileImplFile(file.srcUrl,ngModuleByPipeOrDirective,file.directives,file.pipes,file.ngModules,file.injectables)}))},AotCompiler.prototype._compileStubFile=function(srcFileUrl,directives,ngModules){var _this=this,fileSuffix=splitTypescriptSuffix(srcFileUrl,!0)[1],generatedFiles=[],ngFactoryOutputCtx=this._createOutputContext(ngfactoryFilePath(srcFileUrl,!0)),jitSummaryOutputCtx=this._createOutputContext(summaryForJitFileName(srcFileUrl,!0));return ngModules.forEach(function(ngModuleReference){_this._ngModuleCompiler.createStub(ngFactoryOutputCtx,ngModuleReference),createForJitStub(jitSummaryOutputCtx,ngModuleReference)}),generatedFiles.push(this._codegenSourceModule(srcFileUrl,ngFactoryOutputCtx)),generatedFiles.push(this._codegenSourceModule(srcFileUrl,jitSummaryOutputCtx)),directives.forEach(function(dirType){var compMeta=_this._metadataResolver.getDirectiveMetadata(dirType);compMeta.isComponent&&compMeta.template.externalStylesheets.forEach(function(stylesheetMeta){generatedFiles.push(_this._codegenSourceModule(stylesheetMeta.moduleUrl,_this._createOutputContext(_stylesModuleUrl(stylesheetMeta.moduleUrl,_this._styleCompiler.needsStyleShim(compMeta),fileSuffix))))})}),generatedFiles},AotCompiler.prototype._compileImplFile=function(srcFileUrl,ngModuleByPipeOrDirective,directives,pipes,ngModules,injectables){var _this=this,fileSuffix=splitTypescriptSuffix(srcFileUrl,!0)[1],generatedFiles=[],outputCtx=this._createOutputContext(ngfactoryFilePath(srcFileUrl,!0));if(generatedFiles.push.apply(generatedFiles,this._createSummary(srcFileUrl,directives,pipes,ngModules,injectables,outputCtx)),ngModules.forEach(function(ngModuleType){return _this._compileModule(outputCtx,ngModuleType)}),directives.forEach(function(dirType){var compMeta=_this._metadataResolver.getDirectiveMetadata(dirType);if(compMeta.isComponent){var ngModule=ngModuleByPipeOrDirective.get(dirType);if(!ngModule)throw new Error("Internal Error: cannot determine the module for component "+identifierName(compMeta.type)+"!");var componentStylesheet=_this._styleCompiler.compileComponent(outputCtx,compMeta);compMeta.template.externalStylesheets.forEach(function(stylesheetMeta){generatedFiles.push(_this._codegenStyles(stylesheetMeta.moduleUrl,compMeta,stylesheetMeta,fileSuffix))});_this._compileComponent(outputCtx,compMeta,ngModule,ngModule.transitiveModule.directives,componentStylesheet,fileSuffix);_this._compileComponentFactory(outputCtx,compMeta,ngModule,fileSuffix)}}),outputCtx.statements.length>0){var srcModule=this._codegenSourceModule(srcFileUrl,outputCtx);generatedFiles.unshift(srcModule)}return generatedFiles},AotCompiler.prototype._createSummary=function(srcFileUrl,directives,pipes,ngModules,injectables,ngFactoryCtx){var _this=this,symbolSummaries=this._symbolResolver.getSymbolsOf(srcFileUrl).map(function(symbol){return _this._symbolResolver.resolveSymbol(symbol)}),typeData=ngModules.map(function(ref){return{summary:_this._metadataResolver.getNgModuleSummary(ref),metadata:_this._metadataResolver.getNgModuleMetadata(ref)}}).concat(directives.map(function(ref){return{summary:_this._metadataResolver.getDirectiveSummary(ref),metadata:_this._metadataResolver.getDirectiveMetadata(ref)}}),pipes.map(function(ref){return{summary:_this._metadataResolver.getPipeSummary(ref),metadata:_this._metadataResolver.getPipeMetadata(ref)}}),injectables.map(function(ref){return{summary:_this._metadataResolver.getInjectableSummary(ref),metadata:_this._metadataResolver.getInjectableSummary(ref).type}})),forJitOutputCtx=this._createOutputContext(summaryForJitFileName(srcFileUrl,!0)),_a=serializeSummaries(forJitOutputCtx,this._summaryResolver,this._symbolResolver,symbolSummaries,typeData),json=_a.json;_a.exportAs.forEach(function(entry){ngFactoryCtx.statements.push(variable(entry.exportAs).set(ngFactoryCtx.importExpr(entry.symbol)).toDeclStmt(null,[StmtModifier.Exported]))});var summaryJson=new GeneratedFile(srcFileUrl,summaryFileName(srcFileUrl),json);return this._enableSummariesForJit?[summaryJson,this._codegenSourceModule(srcFileUrl,forJitOutputCtx)]:[summaryJson]},AotCompiler.prototype._compileModule=function(outputCtx,ngModuleType){var ngModule=this._metadataResolver.getNgModuleMetadata(ngModuleType),providers=[];this._localeId&&providers.push({token:createTokenForExternalReference(this._reflector,Identifiers.LOCALE_ID),useValue:this._localeId}),this._translationFormat&&providers.push({token:createTokenForExternalReference(this._reflector,Identifiers.TRANSLATIONS_FORMAT),useValue:this._translationFormat}),this._ngModuleCompiler.compile(outputCtx,ngModule,providers)},AotCompiler.prototype._compileComponentFactory=function(outputCtx,compMeta,ngModule,fileSuffix){var hostType=this._metadataResolver.getHostComponentType(compMeta.type.reference),hostMeta=createHostComponentMeta(hostType,compMeta,this._metadataResolver.getHostComponentViewClass(hostType)),hostViewFactoryVar=this._compileComponent(outputCtx,hostMeta,ngModule,[compMeta.type],null,fileSuffix).viewClassVar,compFactoryVar=componentFactoryName(compMeta.type.reference),inputsExprs=[];for(var propName in compMeta.inputs){var templateName=compMeta.inputs[propName];inputsExprs.push(new LiteralMapEntry(propName,literal(templateName),!1))}var outputsExprs=[];for(var propName in compMeta.outputs){var templateName=compMeta.outputs[propName];outputsExprs.push(new LiteralMapEntry(propName,literal(templateName),!1))}outputCtx.statements.push(variable(compFactoryVar).set(importExpr(Identifiers.createComponentFactory).callFn([literal(compMeta.selector),outputCtx.importExpr(compMeta.type.reference),variable(hostViewFactoryVar),new LiteralMapExpr(inputsExprs),new LiteralMapExpr(outputsExprs),literalArr(compMeta.template.ngContentSelectors.map(function(selector){return literal(selector)}))])).toDeclStmt(importType(Identifiers.ComponentFactory,[expressionType(outputCtx.importExpr(compMeta.type.reference))],[TypeModifier.Const]),[StmtModifier.Final,StmtModifier.Exported]))},AotCompiler.prototype._compileComponent=function(outputCtx,compMeta,ngModule,directiveIdentifiers,componentStyles,fileSuffix){var _this=this,directives=directiveIdentifiers.map(function(dir){return _this._metadataResolver.getDirectiveSummary(dir.reference)}),pipes=ngModule.transitiveModule.pipes.map(function(pipe){return _this._metadataResolver.getPipeSummary(pipe.reference)}),_a=this._templateParser.parse(compMeta,compMeta.template.template,directives,pipes,ngModule.schemas,templateSourceUrl(ngModule.type,compMeta,compMeta.template)),parsedTemplate=_a.template,usedPipes=_a.pipes,stylesExpr=componentStyles?variable(componentStyles.stylesVar):literalArr([]),viewResult=this._viewCompiler.compileComponent(outputCtx,compMeta,parsedTemplate,stylesExpr,usedPipes);return componentStyles&&_resolveStyleStatements(this._symbolResolver,componentStyles,this._styleCompiler.needsStyleShim(compMeta),fileSuffix),viewResult},AotCompiler.prototype._createOutputContext=function(genFilePath){var _this=this;return{statements:[],genFilePath:genFilePath,importExpr:function(symbol,typeParams){if(void 0===typeParams&&(typeParams=null),!(symbol instanceof StaticSymbol))throw new Error("Internal error: unknown identifier "+JSON.stringify(symbol));var arity=_this._symbolResolver.getTypeArity(symbol)||0,_a=_this._symbolResolver.getImportAs(symbol)||symbol,filePath=_a.filePath,name=_a.name,members=_a.members,importModule=_this._symbolResolver.fileNameToModuleName(filePath,genFilePath),selfReference=_this._symbolResolver.fileNameToModuleName(genFilePath,genFilePath),moduleName=importModule===selfReference?null:importModule,suppliedTypeParams=typeParams||[],missingTypeParamsCount=arity-suppliedTypeParams.length,allTypeParams=suppliedTypeParams.concat(new Array(missingTypeParamsCount).fill(DYNAMIC_TYPE));return members.reduce(function(expr,memberName){return expr.prop(memberName)},importExpr(new ExternalReference(moduleName,name,null),allTypeParams))}}},AotCompiler.prototype._codegenStyles=function(srcFileUrl,compMeta,stylesheetMetadata,fileSuffix){var outputCtx=this._createOutputContext(_stylesModuleUrl(stylesheetMetadata.moduleUrl,this._styleCompiler.needsStyleShim(compMeta),fileSuffix)),compiledStylesheet=this._styleCompiler.compileStyles(outputCtx,compMeta,stylesheetMetadata);return _resolveStyleStatements(this._symbolResolver,compiledStylesheet,this._styleCompiler.needsStyleShim(compMeta),fileSuffix),this._codegenSourceModule(srcFileUrl,outputCtx)},AotCompiler.prototype._codegenSourceModule=function(srcFileUrl,ctx){return new GeneratedFile(srcFileUrl,ctx.genFilePath,ctx.statements)},AotCompiler}(),ANGULAR_CORE="@angular/core",HIDDEN_KEY=/^\$.*\$$/,IGNORE={__symbolic:"ignore"},StaticReflector=function(){function StaticReflector(summaryResolver,symbolResolver,knownMetadataClasses,knownMetadataFunctions,errorRecorder){void 0===knownMetadataClasses&&(knownMetadataClasses=[]),void 0===knownMetadataFunctions&&(knownMetadataFunctions=[]);var _this=this;this.summaryResolver=summaryResolver,this.symbolResolver=symbolResolver,this.errorRecorder=errorRecorder,this.annotationCache=new Map,this.propertyCache=new Map,this.parameterCache=new Map,this.methodCache=new Map,this.conversionMap=new Map,this.annotationForParentClassWithSummaryKind=new Map,this.annotationNames=new Map,this.initializeConversionMap(),knownMetadataClasses.forEach(function(kc){return _this._registerDecoratorOrConstructor(_this.getStaticSymbol(kc.filePath,kc.name),kc.ctor)}),knownMetadataFunctions.forEach(function(kf){return _this._registerFunction(_this.getStaticSymbol(kf.filePath,kf.name),kf.fn)}),this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.Directive,[_angular_core.Directive,_angular_core.Component]),this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.Pipe,[_angular_core.Pipe]),this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.NgModule,[_angular_core.NgModule]),this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.Injectable,[_angular_core.Injectable,_angular_core.Pipe,_angular_core.Directive,_angular_core.Component,_angular_core.NgModule]),this.annotationNames.set(_angular_core.Directive,"Directive"),this.annotationNames.set(_angular_core.Component,"Component"),this.annotationNames.set(_angular_core.Pipe,"Pipe"),this.annotationNames.set(_angular_core.NgModule,"NgModule"),this.annotationNames.set(_angular_core.Injectable,"Injectable")}return StaticReflector.prototype.componentModuleUrl=function(typeOrFunc){var staticSymbol=this.findSymbolDeclaration(typeOrFunc);return this.symbolResolver.getResourcePath(staticSymbol)},StaticReflector.prototype.resolveExternalReference=function(ref){var importSymbol=this.getStaticSymbol(ref.moduleName,ref.name),rootSymbol=this.findDeclaration(ref.moduleName,ref.name);return importSymbol!=rootSymbol&&this.symbolResolver.recordImportAs(rootSymbol,importSymbol),rootSymbol},StaticReflector.prototype.findDeclaration=function(moduleUrl,name,containingFile){return this.findSymbolDeclaration(this.symbolResolver.getSymbolByModule(moduleUrl,name,containingFile))},StaticReflector.prototype.findSymbolDeclaration=function(symbol){var resolvedSymbol=this.symbolResolver.resolveSymbol(symbol);return resolvedSymbol&&resolvedSymbol.metadata instanceof StaticSymbol?this.findSymbolDeclaration(resolvedSymbol.metadata):symbol},StaticReflector.prototype.annotations=function(type){var _this=this,annotations=this.annotationCache.get(type);if(!annotations){annotations=[];var classMetadata=this.getTypeMetadata(type),parentType=this.findParentType(type,classMetadata);if(parentType){var parentAnnotations=this.annotations(parentType);annotations.push.apply(annotations,parentAnnotations)}var ownAnnotations_1=[];if(classMetadata.decorators&&(ownAnnotations_1=this.simplify(type,classMetadata.decorators),annotations.push.apply(annotations,ownAnnotations_1)),parentType&&!this.summaryResolver.isLibraryFile(type.filePath)&&this.summaryResolver.isLibraryFile(parentType.filePath)){var summary=this.summaryResolver.resolveSummary(parentType);if(summary&&summary.type){var requiredAnnotationTypes=this.annotationForParentClassWithSummaryKind.get(summary.type.summaryKind);requiredAnnotationTypes.some(function(requiredType){return ownAnnotations_1.some(function(ann){return ann instanceof requiredType})})||this.reportError(syntaxError("Class "+type.name+" in "+type.filePath+" extends from a "+CompileSummaryKind[summary.type.summaryKind]+" in another compilation unit without duplicating the decorator. Please add a "+requiredAnnotationTypes.map(function(type){return _this.annotationNames.get(type)}).join(" or ")+" decorator to the class."),type)}}this.annotationCache.set(type,annotations.filter(function(ann){return!!ann}))}return annotations},StaticReflector.prototype.propMetadata=function(type){var _this=this,propMetadata=this.propertyCache.get(type);if(!propMetadata){var classMetadata=this.getTypeMetadata(type);propMetadata={};var parentType=this.findParentType(type,classMetadata);if(parentType){var parentPropMetadata_1=this.propMetadata(parentType);Object.keys(parentPropMetadata_1).forEach(function(parentProp){propMetadata[parentProp]=parentPropMetadata_1[parentProp]})}var members_1=classMetadata.members||{};Object.keys(members_1).forEach(function(propName){var propData=members_1[propName],prop=propData.find(function(a){return"property"==a.__symbolic||"method"==a.__symbolic}),decorators=[];propMetadata[propName]&&decorators.push.apply(decorators,propMetadata[propName]),propMetadata[propName]=decorators,prop&&prop.decorators&&decorators.push.apply(decorators,_this.simplify(type,prop.decorators))}),this.propertyCache.set(type,propMetadata)}return propMetadata},StaticReflector.prototype.parameters=function(type){var _this=this;if(!(type instanceof StaticSymbol))return this.reportError(new Error("parameters received "+JSON.stringify(type)+" which is not a StaticSymbol"),type),[];try{var parameters_1=this.parameterCache.get(type);if(!parameters_1){var classMetadata=this.getTypeMetadata(type),parentType=this.findParentType(type,classMetadata),members=classMetadata?classMetadata.members:null,ctorData=members?members.__ctor__:null;if(ctorData){var ctor=ctorData.find(function(a){return"constructor"==a.__symbolic}),rawParameterTypes=ctor.parameters||[],parameterDecorators_1=this.simplify(type,ctor.parameterDecorators||[]);parameters_1=[],rawParameterTypes.forEach(function(rawParamType,index){var nestedResult=[],paramType=_this.trySimplify(type,rawParamType);paramType&&nestedResult.push(paramType);var decorators=parameterDecorators_1?parameterDecorators_1[index]:null;decorators&&nestedResult.push.apply(nestedResult,decorators),parameters_1.push(nestedResult)})}else parentType&&(parameters_1=this.parameters(parentType));parameters_1||(parameters_1=[]),this.parameterCache.set(type,parameters_1)}return parameters_1}catch(e){throw console.error("Failed on type "+JSON.stringify(type)+" with error "+e),e}},StaticReflector.prototype._methodNames=function(type){var methodNames=this.methodCache.get(type);if(!methodNames){var classMetadata=this.getTypeMetadata(type);methodNames={};var parentType=this.findParentType(type,classMetadata);if(parentType){var parentMethodNames_1=this._methodNames(parentType);Object.keys(parentMethodNames_1).forEach(function(parentProp){methodNames[parentProp]=parentMethodNames_1[parentProp]})}var members_2=classMetadata.members||{};Object.keys(members_2).forEach(function(propName){var propData=members_2[propName],isMethod=propData.some(function(a){return"method"==a.__symbolic});methodNames[propName]=methodNames[propName]||isMethod}),this.methodCache.set(type,methodNames)}return methodNames},StaticReflector.prototype.findParentType=function(type,classMetadata){var parentType=this.trySimplify(type,classMetadata.extends);if(parentType instanceof StaticSymbol)return parentType},StaticReflector.prototype.hasLifecycleHook=function(type,lcProperty){type instanceof StaticSymbol||this.reportError(new Error("hasLifecycleHook received "+JSON.stringify(type)+" which is not a StaticSymbol"),type);try{return!!this._methodNames(type)[lcProperty]}catch(e){throw console.error("Failed on type "+JSON.stringify(type)+" with error "+e),e}},StaticReflector.prototype._registerDecoratorOrConstructor=function(type,ctor){this.conversionMap.set(type,function(context,args){return new(ctor.bind.apply(ctor,[void 0].concat(args)))})},StaticReflector.prototype._registerFunction=function(type,fn){this.conversionMap.set(type,function(context,args){return fn.apply(void 0,args)})},StaticReflector.prototype.initializeConversionMap=function(){this.injectionToken=this.findDeclaration(ANGULAR_CORE,"InjectionToken"),this.opaqueToken=this.findDeclaration(ANGULAR_CORE,"OpaqueToken"),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"Host"),_angular_core.Host),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"Injectable"),_angular_core.Injectable),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"Self"),_angular_core.Self),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"SkipSelf"),_angular_core.SkipSelf),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"Inject"),_angular_core.Inject),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"Optional"),_angular_core.Optional),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"Attribute"),_angular_core.Attribute),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"ContentChild"),_angular_core.ContentChild),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"ContentChildren"),_angular_core.ContentChildren),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"ViewChild"),_angular_core.ViewChild),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"ViewChildren"),_angular_core.ViewChildren),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"Input"),_angular_core.Input),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"Output"),_angular_core.Output),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"Pipe"),_angular_core.Pipe),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"HostBinding"),_angular_core.HostBinding),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"HostListener"),_angular_core.HostListener),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"Directive"),_angular_core.Directive),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"Component"),_angular_core.Component),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"NgModule"),_angular_core.NgModule),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"Host"),_angular_core.Host),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"Self"),_angular_core.Self),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"SkipSelf"),_angular_core.SkipSelf),this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE,"Optional"),_angular_core.Optional),this._registerFunction(this.findDeclaration(ANGULAR_CORE,"trigger"),_angular_core.trigger),this._registerFunction(this.findDeclaration(ANGULAR_CORE,"state"),_angular_core.state),this._registerFunction(this.findDeclaration(ANGULAR_CORE,"transition"),_angular_core.transition),this._registerFunction(this.findDeclaration(ANGULAR_CORE,"style"),_angular_core.style),this._registerFunction(this.findDeclaration(ANGULAR_CORE,"animate"),_angular_core.animate),this._registerFunction(this.findDeclaration(ANGULAR_CORE,"keyframes"),_angular_core.keyframes),this._registerFunction(this.findDeclaration(ANGULAR_CORE,"sequence"),_angular_core.sequence),this._registerFunction(this.findDeclaration(ANGULAR_CORE,"group"),_angular_core.group)},StaticReflector.prototype.getStaticSymbol=function(declarationFile,name,members){return this.symbolResolver.getStaticSymbol(declarationFile,name,members)},StaticReflector.prototype.reportError=function(error,context,path){if(!this.errorRecorder)throw error;this.errorRecorder(error,context&&context.filePath||path)},StaticReflector.prototype.trySimplify=function(context,value){var originalRecorder=this.errorRecorder;this.errorRecorder=function(error,fileName){};var result=this.simplify(context,value);return this.errorRecorder=originalRecorder,result},StaticReflector.prototype.simplify=function(context,value){function simplifyInContext(context,value,depth){function resolveReferenceValue(staticSymbol){var resolvedSymbol=self.symbolResolver.resolveSymbol(staticSymbol);return resolvedSymbol?resolvedSymbol.metadata:null}function simplifyCall(functionSymbol,targetFunction,args){if(targetFunction&&"function"==targetFunction.__symbolic){if(calling.get(functionSymbol))throw new Error("Recursion not supported");calling.set(functionSymbol,!0);try{var value_1=targetFunction.value;if(value_1&&(0!=depth||"error"!=value_1.__symbolic)){var parameters=targetFunction.parameters,defaults=targetFunction.defaults;args=args.map(function(arg){return simplifyInContext(context,arg,depth+1)}).map(function(arg){return shouldIgnore(arg)?void 0:arg}),defaults&&defaults.length>args.length&&args.push.apply(args,defaults.slice(args.length).map(function(value){return simplify(value)}));for(var functionScope=BindingScope.build(),i=0;i<parameters.length;i++)functionScope.define(parameters[i],args[i]);var result_1,oldScope=scope;try{scope=functionScope.done(),result_1=simplifyInContext(functionSymbol,value_1,depth+1)}finally{scope=oldScope}return result_1}}finally{calling.delete(functionSymbol)}}return 0===depth?IGNORE:simplify({__symbolic:"error",message:"Function call not supported",context:functionSymbol})}function simplify(expression){if(isPrimitive(expression))return expression;if(expression instanceof Array){for(var result_2=[],_i=0,_a=expression;_i<_a.length;_i++){var item=_a[_i];if(item&&"spread"===item.__symbolic){var spreadArray=simplify(item.expression);if(Array.isArray(spreadArray)){for(var _b=0,spreadArray_1=spreadArray;_b<spreadArray_1.length;_b++){var spreadItem=spreadArray_1[_b];result_2.push(spreadItem)}continue}}var value_2=simplify(item);shouldIgnore(value_2)||result_2.push(value_2)}return result_2}if(expression instanceof StaticSymbol){if(expression===self.injectionToken||expression===self.opaqueToken||self.conversionMap.has(expression))return expression;var staticSymbol=expression,declarationValue=resolveReferenceValue(staticSymbol);return declarationValue?simplifyInContext(staticSymbol,declarationValue,depth+1):staticSymbol}if(expression){if(expression.__symbolic){var staticSymbol=void 0;switch(expression.__symbolic){case"binop":var left=simplify(expression.left);if(shouldIgnore(left))return left;var right=simplify(expression.right);if(shouldIgnore(right))return right;switch(expression.operator){case"&&":return left&&right;case"||":return left||right;case"|":return left|right;case"^":return left^right;case"&":return left&right;case"==":return left==right;case"!=":return left!=right;case"===":return left===right;case"!==":return left!==right;case"<":return left<right;case">":return left>right;case"<=":return left<=right;case">=":return left>=right;case"<<":return left<<right;case">>":return left>>right;case"+":return left+right;case"-":return left-right;case"*":return left*right;case"/":return left/right;case"%":return left%right}return null;case"if":return simplify(simplify(expression.condition)?expression.thenExpression:expression.elseExpression);case"pre":var operand=simplify(expression.operand);if(shouldIgnore(operand))return operand;switch(expression.operator){case"+":return operand;case"-":return-operand;case"!":return!operand;case"~":return~operand}return null;case"index":var indexTarget=simplify(expression.expression),index=simplify(expression.index);return indexTarget&&isPrimitive(index)?indexTarget[index]:null;case"select":var member=expression.member,selectContext=context,selectTarget=simplify(expression.expression);if(selectTarget instanceof StaticSymbol){var members=selectTarget.members.concat(member);selectContext=self.getStaticSymbol(selectTarget.filePath,selectTarget.name,members);var declarationValue=resolveReferenceValue(selectContext);return declarationValue?simplifyInContext(selectContext,declarationValue,depth+1):selectContext}return selectTarget&&isPrimitive(member)?simplifyInContext(selectContext,selectTarget[member],depth+1):null;case"reference":var name=expression.name,localValue=scope.resolve(name);if(localValue!=BindingScope.missing)return localValue;break;case"class":case"function":return context;case"new":case"call":if((staticSymbol=simplifyInContext(context,expression.expression,depth+1))instanceof StaticSymbol){if(staticSymbol===self.injectionToken||staticSymbol===self.opaqueToken)return context;var argExpressions=expression.arguments||[],converter=self.conversionMap.get(staticSymbol);if(converter){var args=argExpressions.map(function(arg){return simplifyInContext(context,arg,depth+1)}).map(function(arg){return shouldIgnore(arg)?void 0:arg});return converter(context,args)}return simplifyCall(staticSymbol,resolveReferenceValue(staticSymbol),argExpressions)}return IGNORE;case"error":var message=produceErrorMessage(expression);return expression.line?(message=message+" (position "+(expression.line+1)+":"+(expression.character+1)+" in the original .ts file)",self.reportError(positionalError(message,context.filePath,expression.line,expression.character),context)):self.reportError(new Error(message),context),IGNORE;case"ignore":return expression}return null}return mapStringMap(expression,function(value,name){return simplify(value)})}return IGNORE}try{return simplify(value)}catch(e){var members=context.members.length?"."+context.members.join("."):"",message=e.message+", resolving symbol "+context.name+members+" in "+context.filePath;if(e.fileName)throw positionalError(message,e.fileName,e.line,e.column);throw syntaxError(message)}}var _this=this,self=this,scope=BindingScope.empty,calling=new Map,recordedSimplifyInContext=function(context,value,depth){try{return simplifyInContext(context,value,depth)}catch(e){_this.reportError(e,context)}},result=this.errorRecorder?recordedSimplifyInContext(context,value,0):simplifyInContext(context,value,0);if(!shouldIgnore(result))return result},StaticReflector.prototype.getTypeMetadata=function(type){var resolvedSymbol=this.symbolResolver.resolveSymbol(type);return resolvedSymbol&&resolvedSymbol.metadata?resolvedSymbol.metadata:{__symbolic:"class"}},StaticReflector}(),BindingScope=function(){function BindingScope(){}return BindingScope.prototype.resolve=function(name){},BindingScope.build=function(){var current=new Map;return{define:function(name,value){return current.set(name,value),this},done:function(){return current.size>0?new PopulatedScope(current):BindingScope.empty}}},BindingScope}();BindingScope.missing={},BindingScope.empty={resolve:function(name){return BindingScope.missing}};var PopulatedScope=function(_super){function PopulatedScope(bindings){var _this=_super.call(this)||this;return _this.bindings=bindings,_this}return __extends(PopulatedScope,_super),PopulatedScope.prototype.resolve=function(name){return this.bindings.has(name)?this.bindings.get(name):BindingScope.missing},PopulatedScope}(BindingScope),ResolvedStaticSymbol=function(){function ResolvedStaticSymbol(symbol,metadata){this.symbol=symbol,this.metadata=metadata}return ResolvedStaticSymbol}(),SUPPORTED_SCHEMA_VERSION=3,StaticSymbolResolver=function(){function StaticSymbolResolver(host,staticSymbolCache,summaryResolver,errorRecorder){this.host=host,this.staticSymbolCache=staticSymbolCache,this.summaryResolver=summaryResolver,this.errorRecorder=errorRecorder,this.metadataCache=new Map,this.resolvedSymbols=new Map,this.resolvedFilePaths=new Set,this.importAs=new Map,this.symbolResourcePaths=new Map,this.symbolFromFile=new Map,this.knownFileNameToModuleNames=new Map}return StaticSymbolResolver.prototype.resolveSymbol=function(staticSymbol){if(staticSymbol.members.length>0)return this._resolveSymbolMembers(staticSymbol);var result=this.resolvedSymbols.get(staticSymbol);return result||((result=this._resolveSymbolFromSummary(staticSymbol))?result:(this._createSymbolsOf(staticSymbol.filePath),result=this.resolvedSymbols.get(staticSymbol)))},StaticSymbolResolver.prototype.getImportAs=function(staticSymbol){if(staticSymbol.members.length){var baseSymbol=this.getStaticSymbol(staticSymbol.filePath,staticSymbol.name),baseImportAs=this.getImportAs(baseSymbol);return baseImportAs?this.getStaticSymbol(baseImportAs.filePath,baseImportAs.name,staticSymbol.members):null}var summarizedFileName=stripSummaryForJitFileSuffix(staticSymbol.filePath);if(summarizedFileName!==staticSymbol.filePath){var summarizedName=stripSummaryForJitNameSuffix(staticSymbol.name),baseSymbol=this.getStaticSymbol(summarizedFileName,summarizedName,staticSymbol.members),baseImportAs=this.getImportAs(baseSymbol);return baseImportAs?this.getStaticSymbol(summaryForJitFileName(baseImportAs.filePath),summaryForJitName(baseImportAs.name),baseSymbol.members):null}var result=this.summaryResolver.getImportAs(staticSymbol);return result||(result=this.importAs.get(staticSymbol)),result},StaticSymbolResolver.prototype.getResourcePath=function(staticSymbol){return this.symbolResourcePaths.get(staticSymbol)||staticSymbol.filePath},StaticSymbolResolver.prototype.getTypeArity=function(staticSymbol){if(isGeneratedFile(staticSymbol.filePath))return null;for(var resolvedSymbol=this.resolveSymbol(staticSymbol);resolvedSymbol&&resolvedSymbol.metadata instanceof StaticSymbol;)resolvedSymbol=this.resolveSymbol(resolvedSymbol.metadata);return resolvedSymbol&&resolvedSymbol.metadata&&resolvedSymbol.metadata.arity||null},StaticSymbolResolver.prototype.fileNameToModuleName=function(importedFilePath,containingFilePath){return this.knownFileNameToModuleNames.get(importedFilePath)||this.host.fileNameToModuleName(importedFilePath,containingFilePath)},StaticSymbolResolver.prototype.recordImportAs=function(sourceSymbol,targetSymbol){sourceSymbol.assertNoMembers(),targetSymbol.assertNoMembers(),this.importAs.set(sourceSymbol,targetSymbol)},StaticSymbolResolver.prototype.invalidateFile=function(fileName){this.metadataCache.delete(fileName),this.resolvedFilePaths.delete(fileName);var symbols=this.symbolFromFile.get(fileName);if(symbols){this.symbolFromFile.delete(fileName);for(var _i=0,symbols_1=symbols;_i<symbols_1.length;_i++){var symbol=symbols_1[_i];this.resolvedSymbols.delete(symbol),this.importAs.delete(symbol),this.symbolResourcePaths.delete(symbol)}}},StaticSymbolResolver.prototype._resolveSymbolMembers=function(staticSymbol){var members=staticSymbol.members,baseResolvedSymbol=this.resolveSymbol(this.getStaticSymbol(staticSymbol.filePath,staticSymbol.name));if(!baseResolvedSymbol)return null;var baseMetadata=baseResolvedSymbol.metadata;if(baseMetadata instanceof StaticSymbol)return new ResolvedStaticSymbol(staticSymbol,this.getStaticSymbol(baseMetadata.filePath,baseMetadata.name,members));if(!baseMetadata||"class"!==baseMetadata.__symbolic){for(var value=baseMetadata,i=0;i<members.length&&value;i++)value=value[members[i]];return new ResolvedStaticSymbol(staticSymbol,value)}return baseMetadata.statics&&1===members.length?new ResolvedStaticSymbol(staticSymbol,baseMetadata.statics[members[0]]):null},StaticSymbolResolver.prototype._resolveSymbolFromSummary=function(staticSymbol){var summary=this.summaryResolver.resolveSummary(staticSymbol);return summary?new ResolvedStaticSymbol(staticSymbol,summary.metadata):null},StaticSymbolResolver.prototype.getStaticSymbol=function(declarationFile,name,members){return this.staticSymbolCache.get(declarationFile,name,members)},StaticSymbolResolver.prototype.getSymbolsOf=function(filePath){var symbols=new Set(this.summaryResolver.getSymbolsOf(filePath));return this._createSymbolsOf(filePath),this.resolvedSymbols.forEach(function(resolvedSymbol){resolvedSymbol.symbol.filePath===filePath&&symbols.add(resolvedSymbol.symbol)}),Array.from(symbols)},StaticSymbolResolver.prototype._createSymbolsOf=function(filePath){var _this=this;if(!this.resolvedFilePaths.has(filePath)){this.resolvedFilePaths.add(filePath);var resolvedSymbols=[],metadata=this.getModuleMetadata(filePath);if(metadata.importAs&&this.knownFileNameToModuleNames.set(filePath,metadata.importAs),metadata.metadata){var topLevelSymbolNames_1=new Set(Object.keys(metadata.metadata).map(unescapeIdentifier)),origins_1=metadata.origins||{};Object.keys(metadata.metadata).forEach(function(metadataKey){var symbolMeta=metadata.metadata[metadataKey],name=unescapeIdentifier(metadataKey),symbol=_this.getStaticSymbol(filePath,name),origin=origins_1.hasOwnProperty(metadataKey)&&origins_1[metadataKey];if(origin){var originFilePath=_this.resolveModule(origin,filePath);originFilePath?_this.symbolResourcePaths.set(symbol,originFilePath):_this.reportError(new Error("Couldn't resolve original symbol for "+origin+" from "+filePath))}resolvedSymbols.push(_this.createResolvedSymbol(symbol,filePath,topLevelSymbolNames_1,symbolMeta))})}if(metadata.exports)for(var _loop_1=function(moduleExport){if(moduleExport.export)moduleExport.export.forEach(function(exportSymbol){var symbolName;symbolName="string"==typeof exportSymbol?exportSymbol:exportSymbol.as,symbolName=unescapeIdentifier(symbolName);var symName=symbolName;"string"!=typeof exportSymbol&&(symName=unescapeIdentifier(exportSymbol.name));var resolvedModule=_this.resolveModule(moduleExport.from,filePath);if(resolvedModule){var targetSymbol=_this.getStaticSymbol(resolvedModule,symName),sourceSymbol=_this.getStaticSymbol(filePath,symbolName);resolvedSymbols.push(_this.createExport(sourceSymbol,targetSymbol))}});else{var resolvedModule=this_1.resolveModule(moduleExport.from,filePath);if(resolvedModule){this_1.getSymbolsOf(resolvedModule).forEach(function(targetSymbol){var sourceSymbol=_this.getStaticSymbol(filePath,targetSymbol.name);resolvedSymbols.push(_this.createExport(sourceSymbol,targetSymbol))})}}},this_1=this,_i=0,_a=metadata.exports;_i<_a.length;_i++){var moduleExport=_a[_i];_loop_1(moduleExport)}resolvedSymbols.forEach(function(resolvedSymbol){return _this.resolvedSymbols.set(resolvedSymbol.symbol,resolvedSymbol)}),this.symbolFromFile.set(filePath,resolvedSymbols.map(function(resolvedSymbol){return resolvedSymbol.symbol}))}},StaticSymbolResolver.prototype.createResolvedSymbol=function(sourceSymbol,topLevelPath,topLevelSymbolNames,metadata){if(this.summaryResolver.isLibraryFile(sourceSymbol.filePath)&&metadata&&"class"===metadata.__symbolic){var transformedMeta_1={__symbolic:"class",arity:metadata.arity};return new ResolvedStaticSymbol(sourceSymbol,transformedMeta_1)}var self=this,ReferenceTransformer=function(_super){function ReferenceTransformer(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(ReferenceTransformer,_super),ReferenceTransformer.prototype.visitStringMap=function(map,functionParams){var symbolic=map.__symbolic;if("function"===symbolic){var oldLen=functionParams.length;functionParams.push.apply(functionParams,map.parameters||[]);var result=_super.prototype.visitStringMap.call(this,map,functionParams);return functionParams.length=oldLen,result}if("reference"!==symbolic)return _super.prototype.visitStringMap.call(this,map,functionParams);var module_1=map.module,name=map.name?unescapeIdentifier(map.name):map.name;if(!name)return null;var filePath=void 0;return module_1?(filePath=self.resolveModule(module_1,sourceSymbol.filePath),filePath?self.getStaticSymbol(filePath,name):{__symbolic:"error",message:"Could not resolve "+module_1+" relative to "+sourceSymbol.filePath+"."}):functionParams.indexOf(name)>=0?{__symbolic:"reference",name:name}:topLevelSymbolNames.has(name)?self.getStaticSymbol(topLevelPath,name):void 0},ReferenceTransformer}(ValueTransformer),transformedMeta=visitValue(metadata,new ReferenceTransformer,[]);return transformedMeta instanceof StaticSymbol?this.createExport(sourceSymbol,transformedMeta):new ResolvedStaticSymbol(sourceSymbol,transformedMeta)},StaticSymbolResolver.prototype.createExport=function(sourceSymbol,targetSymbol){return sourceSymbol.assertNoMembers(),targetSymbol.assertNoMembers(),this.summaryResolver.isLibraryFile(sourceSymbol.filePath)&&this.importAs.set(targetSymbol,this.getImportAs(sourceSymbol)||sourceSymbol),new ResolvedStaticSymbol(sourceSymbol,targetSymbol)},StaticSymbolResolver.prototype.reportError=function(error,context,path){if(!this.errorRecorder)throw error;this.errorRecorder(error,context&&context.filePath||path)},StaticSymbolResolver.prototype.getModuleMetadata=function(module){var moduleMetadata=this.metadataCache.get(module);if(!moduleMetadata){var moduleMetadatas=this.host.getMetadataFor(module);if(moduleMetadatas){var maxVersion_1=-1;moduleMetadatas.forEach(function(md){md.version>maxVersion_1&&(maxVersion_1=md.version,moduleMetadata=md)})}if(moduleMetadata||(moduleMetadata={__symbolic:"module",version:SUPPORTED_SCHEMA_VERSION,module:module,metadata:{}}),moduleMetadata.version!=SUPPORTED_SCHEMA_VERSION){var errorMessage=2==moduleMetadata.version?"Unsupported metadata version "+moduleMetadata.version+" for module "+module+". This module should be compiled with a newer version of ngc":"Metadata version mismatch for module "+module+", found version "+moduleMetadata.version+", expected "+SUPPORTED_SCHEMA_VERSION;this.reportError(new Error(errorMessage))}this.metadataCache.set(module,moduleMetadata)}return moduleMetadata},StaticSymbolResolver.prototype.getSymbolByModule=function(module,symbolName,containingFile){var filePath=this.resolveModule(module,containingFile);return filePath?this.getStaticSymbol(filePath,symbolName):(this.reportError(new Error("Could not resolve module "+module+(containingFile?" relative to $ {\n containingFile\n } ":""))),this.getStaticSymbol("ERROR:"+module,symbolName))},StaticSymbolResolver.prototype.resolveModule=function(module,containingFile){try{return this.host.moduleNameToFileName(module,containingFile)}catch(e){console.error("Could not resolve module '"+module+"' relative to file "+containingFile),this.reportError(e,void 0,containingFile)}return null},StaticSymbolResolver}(),AotSummaryResolver=function(){function AotSummaryResolver(host,staticSymbolCache){this.host=host,this.staticSymbolCache=staticSymbolCache,this.summaryCache=new Map,this.loadedFilePaths=new Set,this.importAs=new Map}return AotSummaryResolver.prototype.isLibraryFile=function(filePath){return!this.host.isSourceFile(stripGeneratedFileSuffix(filePath))},AotSummaryResolver.prototype.getLibraryFileName=function(filePath){return this.host.getOutputFileName(filePath)},AotSummaryResolver.prototype.resolveSummary=function(staticSymbol){staticSymbol.assertNoMembers();var summary=this.summaryCache.get(staticSymbol);return summary||(this._loadSummaryFile(staticSymbol.filePath),summary=this.summaryCache.get(staticSymbol)),summary},AotSummaryResolver.prototype.getSymbolsOf=function(filePath){return this._loadSummaryFile(filePath),Array.from(this.summaryCache.keys()).filter(function(symbol){return symbol.filePath===filePath})},AotSummaryResolver.prototype.getImportAs=function(staticSymbol){return staticSymbol.assertNoMembers(),this.importAs.get(staticSymbol)},AotSummaryResolver.prototype.addSummary=function(summary){this.summaryCache.set(summary.symbol,summary)},AotSummaryResolver.prototype._loadSummaryFile=function(filePath){var _this=this;if(!this.loadedFilePaths.has(filePath)&&(this.loadedFilePaths.add(filePath),this.isLibraryFile(filePath))){var summaryFilePath=summaryFileName(filePath),json=void 0;try{json=this.host.loadSummary(summaryFilePath)}catch(e){throw console.error("Error loading summary file "+summaryFilePath),e}if(json){var _a=deserializeSummaries(this.staticSymbolCache,json),summaries=_a.summaries,importAs=_a.importAs;summaries.forEach(function(summary){return _this.summaryCache.set(summary.symbol,summary)}),importAs.forEach(function(importAs){_this.importAs.set(importAs.symbol,_this.staticSymbolCache.get(ngfactoryFilePath(filePath),importAs.importAs))})}}},AotSummaryResolver}(),_ExecutionContext=function(){function _ExecutionContext(parent,instance,className,vars){this.parent=parent,this.instance=instance,this.className=className,this.vars=vars,this.exports=[]}return _ExecutionContext.prototype.createChildWihtLocalVars=function(){return new _ExecutionContext(this,this.instance,this.className,new Map)},_ExecutionContext}(),ReturnValue=function(){function ReturnValue(value){this.value=value}return ReturnValue}(),StatementInterpreter=function(){function StatementInterpreter(){}return StatementInterpreter.prototype.debugAst=function(ast){return debugOutputAstAsTypeScript(ast)},StatementInterpreter.prototype.visitDeclareVarStmt=function(stmt,ctx){return ctx.vars.set(stmt.name,stmt.value.visitExpression(this,ctx)),stmt.hasModifier(StmtModifier.Exported)&&ctx.exports.push(stmt.name),null},StatementInterpreter.prototype.visitWriteVarExpr=function(expr,ctx){for(var value=expr.value.visitExpression(this,ctx),currCtx=ctx;null!=currCtx;){if(currCtx.vars.has(expr.name))return currCtx.vars.set(expr.name,value),value;currCtx=currCtx.parent}throw new Error("Not declared variable "+expr.name)},StatementInterpreter.prototype.visitReadVarExpr=function(ast,ctx){var varName=ast.name;if(null!=ast.builtin)switch(ast.builtin){case BuiltinVar.Super:return ctx.instance.__proto__;case BuiltinVar.This:return ctx.instance;case BuiltinVar.CatchError:varName=CATCH_ERROR_VAR$2;break;case BuiltinVar.CatchStack:varName=CATCH_STACK_VAR$2;break;default:throw new Error("Unknown builtin variable "+ast.builtin)}for(var currCtx=ctx;null!=currCtx;){if(currCtx.vars.has(varName))return currCtx.vars.get(varName);currCtx=currCtx.parent}throw new Error("Not declared variable "+varName)},StatementInterpreter.prototype.visitWriteKeyExpr=function(expr,ctx){var receiver=expr.receiver.visitExpression(this,ctx),index=expr.index.visitExpression(this,ctx),value=expr.value.visitExpression(this,ctx);return receiver[index]=value,value},StatementInterpreter.prototype.visitWritePropExpr=function(expr,ctx){var receiver=expr.receiver.visitExpression(this,ctx),value=expr.value.visitExpression(this,ctx);return receiver[expr.name]=value,value},StatementInterpreter.prototype.visitInvokeMethodExpr=function(expr,ctx){var result,receiver=expr.receiver.visitExpression(this,ctx),args=this.visitAllExpressions(expr.args,ctx);if(null!=expr.builtin)switch(expr.builtin){case BuiltinMethod.ConcatArray:result=receiver.concat.apply(receiver,args);break;case BuiltinMethod.SubscribeObservable:result=receiver.subscribe({next:args[0]});break;case BuiltinMethod.Bind:result=receiver.bind.apply(receiver,args);break;default:throw new Error("Unknown builtin method "+expr.builtin)}else result=receiver[expr.name].apply(receiver,args);return result},StatementInterpreter.prototype.visitInvokeFunctionExpr=function(stmt,ctx){var args=this.visitAllExpressions(stmt.args,ctx),fnExpr=stmt.fn;return fnExpr instanceof ReadVarExpr&&fnExpr.builtin===BuiltinVar.Super?(ctx.instance.constructor.prototype.constructor.apply(ctx.instance,args),null):stmt.fn.visitExpression(this,ctx).apply(null,args)},StatementInterpreter.prototype.visitReturnStmt=function(stmt,ctx){return new ReturnValue(stmt.value.visitExpression(this,ctx))},StatementInterpreter.prototype.visitDeclareClassStmt=function(stmt,ctx){var clazz=createDynamicClass(stmt,ctx,this);return ctx.vars.set(stmt.name,clazz),stmt.hasModifier(StmtModifier.Exported)&&ctx.exports.push(stmt.name),null},StatementInterpreter.prototype.visitExpressionStmt=function(stmt,ctx){return stmt.expr.visitExpression(this,ctx)},StatementInterpreter.prototype.visitIfStmt=function(stmt,ctx){return stmt.condition.visitExpression(this,ctx)?this.visitAllStatements(stmt.trueCase,ctx):null!=stmt.falseCase?this.visitAllStatements(stmt.falseCase,ctx):null},StatementInterpreter.prototype.visitTryCatchStmt=function(stmt,ctx){try{return this.visitAllStatements(stmt.bodyStmts,ctx)}catch(e){var childCtx=ctx.createChildWihtLocalVars();return childCtx.vars.set(CATCH_ERROR_VAR$2,e),childCtx.vars.set(CATCH_STACK_VAR$2,e.stack),this.visitAllStatements(stmt.catchStmts,childCtx)}},StatementInterpreter.prototype.visitThrowStmt=function(stmt,ctx){throw stmt.error.visitExpression(this,ctx)},StatementInterpreter.prototype.visitCommentStmt=function(stmt,context){return null},StatementInterpreter.prototype.visitInstantiateExpr=function(ast,ctx){var args=this.visitAllExpressions(ast.args,ctx),clazz=ast.classExpr.visitExpression(this,ctx);return new(clazz.bind.apply(clazz,[void 0].concat(args)))},StatementInterpreter.prototype.visitLiteralExpr=function(ast,ctx){return ast.value},StatementInterpreter.prototype.visitExternalExpr=function(ast,ctx){return ast.value.runtime},StatementInterpreter.prototype.visitConditionalExpr=function(ast,ctx){return ast.condition.visitExpression(this,ctx)?ast.trueCase.visitExpression(this,ctx):null!=ast.falseCase?ast.falseCase.visitExpression(this,ctx):null},StatementInterpreter.prototype.visitNotExpr=function(ast,ctx){return!ast.condition.visitExpression(this,ctx)},StatementInterpreter.prototype.visitAssertNotNullExpr=function(ast,ctx){return ast.condition.visitExpression(this,ctx)},StatementInterpreter.prototype.visitCastExpr=function(ast,ctx){return ast.value.visitExpression(this,ctx)},StatementInterpreter.prototype.visitFunctionExpr=function(ast,ctx){return _declareFn(ast.params.map(function(param){return param.name}),ast.statements,ctx,this)},StatementInterpreter.prototype.visitDeclareFunctionStmt=function(stmt,ctx){var paramNames=stmt.params.map(function(param){return param.name});return ctx.vars.set(stmt.name,_declareFn(paramNames,stmt.statements,ctx,this)),stmt.hasModifier(StmtModifier.Exported)&&ctx.exports.push(stmt.name),null},StatementInterpreter.prototype.visitBinaryOperatorExpr=function(ast,ctx){var _this=this,lhs=function(){return ast.lhs.visitExpression(_this,ctx)},rhs=function(){return ast.rhs.visitExpression(_this,ctx)};switch(ast.operator){case BinaryOperator.Equals:return lhs()==rhs();case BinaryOperator.Identical:return lhs()===rhs();case BinaryOperator.NotEquals:return lhs()!=rhs();case BinaryOperator.NotIdentical:return lhs()!==rhs();case BinaryOperator.And:return lhs()&&rhs();case BinaryOperator.Or:return lhs()||rhs();case BinaryOperator.Plus:return lhs()+rhs();case BinaryOperator.Minus:return lhs()-rhs();case BinaryOperator.Divide:return lhs()/rhs();case BinaryOperator.Multiply:return lhs()*rhs();case BinaryOperator.Modulo:return lhs()%rhs();case BinaryOperator.Lower:return lhs()<rhs();case BinaryOperator.LowerEquals:return lhs()<=rhs();case BinaryOperator.Bigger:return lhs()>rhs();case BinaryOperator.BiggerEquals:return lhs()>=rhs();default:throw new Error("Unknown operator "+ast.operator)}},StatementInterpreter.prototype.visitReadPropExpr=function(ast,ctx){return ast.receiver.visitExpression(this,ctx)[ast.name]},StatementInterpreter.prototype.visitReadKeyExpr=function(ast,ctx){return ast.receiver.visitExpression(this,ctx)[ast.index.visitExpression(this,ctx)]},StatementInterpreter.prototype.visitLiteralArrayExpr=function(ast,ctx){return this.visitAllExpressions(ast.entries,ctx)},StatementInterpreter.prototype.visitLiteralMapExpr=function(ast,ctx){var _this=this,result={};return ast.entries.forEach(function(entry){return result[entry.key]=entry.value.visitExpression(_this,ctx)}),result},StatementInterpreter.prototype.visitCommaExpr=function(ast,context){var values=this.visitAllExpressions(ast.parts,context);return values[values.length-1]},StatementInterpreter.prototype.visitAllExpressions=function(expressions,ctx){var _this=this;return expressions.map(function(expr){return expr.visitExpression(_this,ctx)})},StatementInterpreter.prototype.visitAllStatements=function(statements,ctx){for(var i=0;i<statements.length;i++){var stmt=statements[i],val=stmt.visitStatement(this,ctx);if(val instanceof ReturnValue)return val}return null},StatementInterpreter}(),CATCH_ERROR_VAR$2="error",CATCH_STACK_VAR$2="stack",AbstractJsEmitterVisitor=function(_super){function AbstractJsEmitterVisitor(){return _super.call(this,!1)||this}return __extends(AbstractJsEmitterVisitor,_super),AbstractJsEmitterVisitor.prototype.visitDeclareClassStmt=function(stmt,ctx){var _this=this;return ctx.pushClass(stmt),this._visitClassConstructor(stmt,ctx),null!=stmt.parent&&(ctx.print(stmt,stmt.name+".prototype = Object.create("),stmt.parent.visitExpression(this,ctx),ctx.println(stmt,".prototype);")),stmt.getters.forEach(function(getter){return _this._visitClassGetter(stmt,getter,ctx)}),stmt.methods.forEach(function(method){return _this._visitClassMethod(stmt,method,ctx)}),ctx.popClass(),null},AbstractJsEmitterVisitor.prototype._visitClassConstructor=function(stmt,ctx){ctx.print(stmt,"function "+stmt.name+"("),null!=stmt.constructorMethod&&this._visitParams(stmt.constructorMethod.params,ctx),ctx.println(stmt,") {"),ctx.incIndent(),null!=stmt.constructorMethod&&stmt.constructorMethod.body.length>0&&(ctx.println(stmt,"var self = this;"),this.visitAllStatements(stmt.constructorMethod.body,ctx)),ctx.decIndent(),ctx.println(stmt,"}")},AbstractJsEmitterVisitor.prototype._visitClassGetter=function(stmt,getter,ctx){ctx.println(stmt,"Object.defineProperty("+stmt.name+".prototype, '"+getter.name+"', { get: function() {"),ctx.incIndent(),getter.body.length>0&&(ctx.println(stmt,"var self = this;"),this.visitAllStatements(getter.body,ctx)),ctx.decIndent(),ctx.println(stmt,"}});")},AbstractJsEmitterVisitor.prototype._visitClassMethod=function(stmt,method,ctx){ctx.print(stmt,stmt.name+".prototype."+method.name+" = function("),this._visitParams(method.params,ctx),ctx.println(stmt,") {"),ctx.incIndent(),method.body.length>0&&(ctx.println(stmt,"var self = this;"),this.visitAllStatements(method.body,ctx)),ctx.decIndent(),ctx.println(stmt,"};")},AbstractJsEmitterVisitor.prototype.visitReadVarExpr=function(ast,ctx){if(ast.builtin===BuiltinVar.This)ctx.print(ast,"self");else{if(ast.builtin===BuiltinVar.Super)throw new Error("'super' needs to be handled at a parent ast node, not at the variable level!");_super.prototype.visitReadVarExpr.call(this,ast,ctx)}return null},AbstractJsEmitterVisitor.prototype.visitDeclareVarStmt=function(stmt,ctx){return ctx.print(stmt,"var "+stmt.name+" = "),stmt.value.visitExpression(this,ctx),ctx.println(stmt,";"),null},AbstractJsEmitterVisitor.prototype.visitCastExpr=function(ast,ctx){return ast.value.visitExpression(this,ctx),null},AbstractJsEmitterVisitor.prototype.visitInvokeFunctionExpr=function(expr,ctx){var fnExpr=expr.fn;return fnExpr instanceof ReadVarExpr&&fnExpr.builtin===BuiltinVar.Super?(ctx.currentClass.parent.visitExpression(this,ctx),ctx.print(expr,".call(this"),expr.args.length>0&&(ctx.print(expr,", "),this.visitAllExpressions(expr.args,ctx,",")),ctx.print(expr,")")):_super.prototype.visitInvokeFunctionExpr.call(this,expr,ctx),null},AbstractJsEmitterVisitor.prototype.visitFunctionExpr=function(ast,ctx){return ctx.print(ast,"function("),this._visitParams(ast.params,ctx),ctx.println(ast,") {"),ctx.incIndent(),this.visitAllStatements(ast.statements,ctx),ctx.decIndent(),ctx.print(ast,"}"),null},AbstractJsEmitterVisitor.prototype.visitDeclareFunctionStmt=function(stmt,ctx){return ctx.print(stmt,"function "+stmt.name+"("),this._visitParams(stmt.params,ctx),ctx.println(stmt,") {"),ctx.incIndent(),this.visitAllStatements(stmt.statements,ctx),ctx.decIndent(),ctx.println(stmt,"}"),null},AbstractJsEmitterVisitor.prototype.visitTryCatchStmt=function(stmt,ctx){ctx.println(stmt,"try {"),ctx.incIndent(),this.visitAllStatements(stmt.bodyStmts,ctx),ctx.decIndent(),ctx.println(stmt,"} catch ("+CATCH_ERROR_VAR$1.name+") {"),ctx.incIndent();var catchStmts=[CATCH_STACK_VAR$1.set(CATCH_ERROR_VAR$1.prop("stack")).toDeclStmt(null,[StmtModifier.Final])].concat(stmt.catchStmts);return this.visitAllStatements(catchStmts,ctx),ctx.decIndent(),ctx.println(stmt,"}"),null},AbstractJsEmitterVisitor.prototype._visitParams=function(params,ctx){this.visitAllObjects(function(param){return ctx.print(null,param.name)},params,ctx,",")},AbstractJsEmitterVisitor.prototype.getBuiltinMethodName=function(method){var name;switch(method){case BuiltinMethod.ConcatArray:name="concat";break;case BuiltinMethod.SubscribeObservable:name="subscribe";break;case BuiltinMethod.Bind:name="bind";break;default:throw new Error("Unknown builtin method: "+method)}return name},AbstractJsEmitterVisitor}(AbstractEmitterVisitor),JitEmitterVisitor=function(_super){function JitEmitterVisitor(){var _this=_super.apply(this,arguments)||this;return _this._evalArgNames=[],_this._evalArgValues=[],_this._evalExportedVars=[],_this}return __extends(JitEmitterVisitor,_super),JitEmitterVisitor.prototype.createReturnStmt=function(ctx){new ReturnStatement(new LiteralMapExpr(this._evalExportedVars.map(function(resultVar){return new LiteralMapEntry(resultVar,variable(resultVar),!1)}))).visitStatement(this,ctx)},JitEmitterVisitor.prototype.getArgs=function(){for(var result={},i=0;i<this._evalArgNames.length;i++)result[this._evalArgNames[i]]=this._evalArgValues[i];return result},JitEmitterVisitor.prototype.visitExternalExpr=function(ast,ctx){var value=ast.value.runtime,id=this._evalArgValues.indexOf(value);if(-1===id){id=this._evalArgValues.length,this._evalArgValues.push(value);var name=identifierName({reference:ast.value.runtime})||"val";this._evalArgNames.push("jit_"+name+id)}return ctx.print(ast,this._evalArgNames[id]),null},JitEmitterVisitor.prototype.visitDeclareVarStmt=function(stmt,ctx){return stmt.hasModifier(StmtModifier.Exported)&&this._evalExportedVars.push(stmt.name),_super.prototype.visitDeclareVarStmt.call(this,stmt,ctx)},JitEmitterVisitor.prototype.visitDeclareFunctionStmt=function(stmt,ctx){return stmt.hasModifier(StmtModifier.Exported)&&this._evalExportedVars.push(stmt.name),_super.prototype.visitDeclareFunctionStmt.call(this,stmt,ctx)},JitEmitterVisitor.prototype.visitDeclareClassStmt=function(stmt,ctx){return stmt.hasModifier(StmtModifier.Exported)&&this._evalExportedVars.push(stmt.name),_super.prototype.visitDeclareClassStmt.call(this,stmt,ctx)},JitEmitterVisitor}(AbstractJsEmitterVisitor),JitCompiler=function(){function JitCompiler(_injector,_metadataResolver,_templateParser,_styleCompiler,_viewCompiler,_ngModuleCompiler,_summaryResolver,_compilerConfig,_console){this._injector=_injector,this._metadataResolver=_metadataResolver,this._templateParser=_templateParser,this._styleCompiler=_styleCompiler,this._viewCompiler=_viewCompiler,this._ngModuleCompiler=_ngModuleCompiler,this._summaryResolver=_summaryResolver,this._compilerConfig=_compilerConfig,this._console=_console,this._compiledTemplateCache=new Map,this._compiledHostTemplateCache=new Map,this._compiledDirectiveWrapperCache=new Map,this._compiledNgModuleCache=new Map,this._sharedStylesheetCount=0}return Object.defineProperty(JitCompiler.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),JitCompiler.prototype.compileModuleSync=function(moduleType){return SyncAsync.assertSync(this._compileModuleAndComponents(moduleType,!0))},JitCompiler.prototype.compileModuleAsync=function(moduleType){return Promise.resolve(this._compileModuleAndComponents(moduleType,!1))},JitCompiler.prototype.compileModuleAndAllComponentsSync=function(moduleType){return SyncAsync.assertSync(this._compileModuleAndAllComponents(moduleType,!0))},JitCompiler.prototype.compileModuleAndAllComponentsAsync=function(moduleType){return Promise.resolve(this._compileModuleAndAllComponents(moduleType,!1))},JitCompiler.prototype.getNgContentSelectors=function(component){this._console.warn("Compiler.getNgContentSelectors is deprecated. Use ComponentFactory.ngContentSelectors instead!");var template=this._compiledTemplateCache.get(component);if(!template)throw new Error("The component "+_angular_core.ɵstringify(component)+" is not yet compiled!");return template.compMeta.template.ngContentSelectors},JitCompiler.prototype.getComponentFactory=function(component){return this._metadataResolver.getDirectiveSummary(component).componentFactory},JitCompiler.prototype.loadAotSummaries=function(summaries){var _this=this;this.clearCache(),flattenSummaries(summaries).forEach(function(summary){_this._summaryResolver.addSummary({symbol:summary.type.reference,metadata:null,type:summary})})},JitCompiler.prototype.hasAotSummary=function(ref){return!!this._summaryResolver.resolveSummary(ref)},JitCompiler.prototype._filterJitIdentifiers=function(ids){var _this=this;return ids.map(function(mod){return mod.reference}).filter(function(ref){return!_this.hasAotSummary(ref)})},JitCompiler.prototype._compileModuleAndComponents=function(moduleType,isSync){var _this=this;return SyncAsync.then(this._loadModules(moduleType,isSync),function(){return _this._compileComponents(moduleType,null),_this._compileModule(moduleType)})},JitCompiler.prototype._compileModuleAndAllComponents=function(moduleType,isSync){var _this=this;return SyncAsync.then(this._loadModules(moduleType,isSync),function(){var componentFactories=[];return _this._compileComponents(moduleType,componentFactories),new _angular_core.ModuleWithComponentFactories(_this._compileModule(moduleType),componentFactories)})},JitCompiler.prototype._loadModules=function(mainModule,isSync){var _this=this,loading=[],mainNgModule=this._metadataResolver.getNgModuleMetadata(mainModule);return this._filterJitIdentifiers(mainNgModule.transitiveModule.modules).forEach(function(nestedNgModule){var moduleMeta=_this._metadataResolver.getNgModuleMetadata(nestedNgModule);_this._filterJitIdentifiers(moduleMeta.declaredDirectives).forEach(function(ref){var promise=_this._metadataResolver.loadDirectiveMetadata(moduleMeta.type.reference,ref,isSync);promise&&loading.push(promise)}),_this._filterJitIdentifiers(moduleMeta.declaredPipes).forEach(function(ref){return _this._metadataResolver.getOrLoadPipeMetadata(ref)})}),SyncAsync.all(loading)},JitCompiler.prototype._compileModule=function(moduleType){var _this=this,ngModuleFactory=this._compiledNgModuleCache.get(moduleType);if(!ngModuleFactory){var moduleMeta_1=this._metadataResolver.getNgModuleMetadata(moduleType),extraProviders=[this._metadataResolver.getProviderMetadata(new ProviderMeta(_angular_core.Compiler,{useFactory:function(){return new ModuleBoundCompiler(_this,moduleMeta_1.type.reference)}}))],outputCtx=createOutputContext(),compileResult=this._ngModuleCompiler.compile(outputCtx,moduleMeta_1,extraProviders);ngModuleFactory=this._compilerConfig.useJit?jitStatements(ngModuleJitUrl(moduleMeta_1),outputCtx.statements)[compileResult.ngModuleFactoryVar]:interpretStatements(outputCtx.statements)[compileResult.ngModuleFactoryVar],this._compiledNgModuleCache.set(moduleMeta_1.type.reference,ngModuleFactory)}return ngModuleFactory},JitCompiler.prototype._compileComponents=function(mainModule,allComponentFactories){var _this=this,ngModule=this._metadataResolver.getNgModuleMetadata(mainModule),moduleByJitDirective=new Map,templates=new Set,transJitModules=this._filterJitIdentifiers(ngModule.transitiveModule.modules);transJitModules.forEach(function(localMod){var localModuleMeta=_this._metadataResolver.getNgModuleMetadata(localMod);_this._filterJitIdentifiers(localModuleMeta.declaredDirectives).forEach(function(dirRef){moduleByJitDirective.set(dirRef,localModuleMeta);var dirMeta=_this._metadataResolver.getDirectiveMetadata(dirRef);if(dirMeta.isComponent&&(templates.add(_this._createCompiledTemplate(dirMeta,localModuleMeta)),allComponentFactories)){var template=_this._createCompiledHostTemplate(dirMeta.type.reference,localModuleMeta);templates.add(template),allComponentFactories.push(dirMeta.componentFactory)}})}),transJitModules.forEach(function(localMod){var localModuleMeta=_this._metadataResolver.getNgModuleMetadata(localMod);_this._filterJitIdentifiers(localModuleMeta.declaredDirectives).forEach(function(dirRef){var dirMeta=_this._metadataResolver.getDirectiveMetadata(dirRef);dirMeta.isComponent&&dirMeta.entryComponents.forEach(function(entryComponentType){var moduleMeta=moduleByJitDirective.get(entryComponentType.componentType);templates.add(_this._createCompiledHostTemplate(entryComponentType.componentType,moduleMeta))})}),localModuleMeta.entryComponents.forEach(function(entryComponentType){if(!_this.hasAotSummary(entryComponentType.componentType.reference)){var moduleMeta=moduleByJitDirective.get(entryComponentType.componentType);templates.add(_this._createCompiledHostTemplate(entryComponentType.componentType,moduleMeta))}})}),templates.forEach(function(template){return _this._compileTemplate(template)})},JitCompiler.prototype.clearCacheFor=function(type){this._compiledNgModuleCache.delete(type),this._metadataResolver.clearCacheFor(type),this._compiledHostTemplateCache.delete(type),this._compiledTemplateCache.get(type)&&this._compiledTemplateCache.delete(type)},JitCompiler.prototype.clearCache=function(){this._metadataResolver.clearCache(),this._compiledTemplateCache.clear(),this._compiledHostTemplateCache.clear(),this._compiledNgModuleCache.clear()},JitCompiler.prototype._createCompiledHostTemplate=function(compType,ngModule){if(!ngModule)throw new Error("Component "+_angular_core.ɵstringify(compType)+" is not part of any NgModule or the module has not been imported into your module.");var compiledTemplate=this._compiledHostTemplateCache.get(compType);if(!compiledTemplate){var compMeta=this._metadataResolver.getDirectiveMetadata(compType);assertComponent(compMeta);var componentFactory=compMeta.componentFactory,hostClass=this._metadataResolver.getHostComponentType(compType),hostMeta=createHostComponentMeta(hostClass,compMeta,_angular_core.ɵgetComponentViewDefinitionFactory(componentFactory));compiledTemplate=new CompiledTemplate(!0,compMeta.type,hostMeta,ngModule,[compMeta.type]),this._compiledHostTemplateCache.set(compType,compiledTemplate)}return compiledTemplate},JitCompiler.prototype._createCompiledTemplate=function(compMeta,ngModule){var compiledTemplate=this._compiledTemplateCache.get(compMeta.type.reference);return compiledTemplate||(assertComponent(compMeta),compiledTemplate=new CompiledTemplate(!1,compMeta.type,compMeta,ngModule,ngModule.transitiveModule.directives),this._compiledTemplateCache.set(compMeta.type.reference,compiledTemplate)),compiledTemplate},JitCompiler.prototype._compileTemplate=function(template){var _this=this;if(!template.isCompiled){var compMeta=template.compMeta,externalStylesheetsByModuleUrl=new Map,outputContext=createOutputContext(),componentStylesheet=this._styleCompiler.compileComponent(outputContext,compMeta);compMeta.template.externalStylesheets.forEach(function(stylesheetMeta){var compiledStylesheet=_this._styleCompiler.compileStyles(createOutputContext(),compMeta,stylesheetMeta);externalStylesheetsByModuleUrl.set(stylesheetMeta.moduleUrl,compiledStylesheet)}),this._resolveStylesCompileResult(componentStylesheet,externalStylesheetsByModuleUrl);var evalResult,directives=template.directives.map(function(dir){return _this._metadataResolver.getDirectiveSummary(dir.reference)}),pipes=template.ngModule.transitiveModule.pipes.map(function(pipe){return _this._metadataResolver.getPipeSummary(pipe.reference)}),_a=this._templateParser.parse(compMeta,compMeta.template.template,directives,pipes,template.ngModule.schemas,templateSourceUrl(template.ngModule.type,template.compMeta,template.compMeta.template)),parsedTemplate=_a.template,usedPipes=_a.pipes,compileResult=this._viewCompiler.compileComponent(outputContext,compMeta,parsedTemplate,variable(componentStylesheet.stylesVar),usedPipes);evalResult=this._compilerConfig.useJit?jitStatements(templateJitUrl(template.ngModule.type,template.compMeta),outputContext.statements):interpretStatements(outputContext.statements);var viewClass=evalResult[compileResult.viewClassVar],rendererType=evalResult[compileResult.rendererTypeVar];template.compiled(viewClass,rendererType)}},JitCompiler.prototype._resolveStylesCompileResult=function(result,externalStylesheetsByModuleUrl){var _this=this;result.dependencies.forEach(function(dep,i){var nestedCompileResult=externalStylesheetsByModuleUrl.get(dep.moduleUrl),nestedStylesArr=_this._resolveAndEvalStylesCompileResult(nestedCompileResult,externalStylesheetsByModuleUrl);dep.setValue(nestedStylesArr)})},JitCompiler.prototype._resolveAndEvalStylesCompileResult=function(result,externalStylesheetsByModuleUrl){return this._resolveStylesCompileResult(result,externalStylesheetsByModuleUrl),this._compilerConfig.useJit?jitStatements(sharedStylesheetJitUrl(result.meta,this._sharedStylesheetCount++),result.outputCtx.statements)[result.stylesVar]:interpretStatements(result.outputCtx.statements)[result.stylesVar]},JitCompiler}();JitCompiler.decorators=[{type:CompilerInjectable}],JitCompiler.ctorParameters=function(){return[{type:_angular_core.Injector},{type:CompileMetadataResolver},{type:TemplateParser},{type:StyleCompiler},{type:ViewCompiler},{type:NgModuleCompiler},{type:SummaryResolver},{type:CompilerConfig},{type:_angular_core.ɵConsole}]};var CompiledTemplate=function(){function CompiledTemplate(isHost,compType,compMeta,ngModule,directives){this.isHost=isHost,this.compType=compType,this.compMeta=compMeta,this.ngModule=ngModule,this.directives=directives,this._viewClass=null,this.isCompiled=!1}return CompiledTemplate.prototype.compiled=function(viewClass,rendererType){this._viewClass=viewClass,this.compMeta.componentViewType.setDelegate(viewClass);for(var prop in rendererType)this.compMeta.rendererType[prop]=rendererType[prop];this.isCompiled=!0},CompiledTemplate}(),ModuleBoundCompiler=function(){function ModuleBoundCompiler(_delegate,_ngModule){this._delegate=_delegate,this._ngModule=_ngModule}return Object.defineProperty(ModuleBoundCompiler.prototype,"_injector",{get:function(){return this._delegate.injector},enumerable:!0,configurable:!0}),ModuleBoundCompiler.prototype.compileModuleSync=function(moduleType){return this._delegate.compileModuleSync(moduleType)},ModuleBoundCompiler.prototype.compileModuleAsync=function(moduleType){return this._delegate.compileModuleAsync(moduleType)},ModuleBoundCompiler.prototype.compileModuleAndAllComponentsSync=function(moduleType){return this._delegate.compileModuleAndAllComponentsSync(moduleType)},ModuleBoundCompiler.prototype.compileModuleAndAllComponentsAsync=function(moduleType){return this._delegate.compileModuleAndAllComponentsAsync(moduleType)},ModuleBoundCompiler.prototype.getNgContentSelectors=function(component){return this._delegate.getNgContentSelectors(component)},ModuleBoundCompiler.prototype.clearCache=function(){this._delegate.clearCache()},ModuleBoundCompiler.prototype.clearCacheFor=function(type){this._delegate.clearCacheFor(type)},ModuleBoundCompiler}(),MessageBundle=function(){function MessageBundle(_htmlParser,_implicitTags,_implicitAttrs,_locale){void 0===_locale&&(_locale=null),this._htmlParser=_htmlParser,this._implicitTags=_implicitTags,this._implicitAttrs=_implicitAttrs,this._locale=_locale,this._messages=[]}return MessageBundle.prototype.updateFromTemplate=function(html,url,interpolationConfig){var htmlParserResult=this._htmlParser.parse(html,url,!0,interpolationConfig);if(htmlParserResult.errors.length)return htmlParserResult.errors;var i18nParserResult=extractMessages(htmlParserResult.rootNodes,interpolationConfig,this._implicitTags,this._implicitAttrs);return i18nParserResult.errors.length?i18nParserResult.errors:((_a=this._messages).push.apply(_a,i18nParserResult.messages),[]);var _a},MessageBundle.prototype.getMessages=function(){return this._messages},MessageBundle.prototype.write=function(serializer,filterSources){var messages={},mapperVisitor=new MapPlaceholderNames;this._messages.forEach(function(message){var id=serializer.digest(message);messages.hasOwnProperty(id)?(_a=messages[id].sources).push.apply(_a,message.sources):messages[id]=message;var _a});var msgList=Object.keys(messages).map(function(id){var mapper=serializer.createNameMapper(messages[id]),src=messages[id],nodes=mapper?mapperVisitor.convert(src.nodes,mapper):src.nodes,transformedMessage=new Message(nodes,{},{},src.meaning,src.description,id);return transformedMessage.sources=src.sources,filterSources&&transformedMessage.sources.forEach(function(source){return source.filePath=filterSources(source.filePath)}),transformedMessage});return serializer.write(msgList,this._locale)},MessageBundle}(),MapPlaceholderNames=function(_super){function MapPlaceholderNames(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(MapPlaceholderNames,_super),MapPlaceholderNames.prototype.convert=function(nodes,mapper){var _this=this;return mapper?nodes.map(function(n){return n.visit(_this,mapper)}):nodes},MapPlaceholderNames.prototype.visitTagPlaceholder=function(ph,mapper){var _this=this,startName=mapper.toPublicName(ph.startName),closeName=ph.closeName?mapper.toPublicName(ph.closeName):ph.closeName,children=ph.children.map(function(n){return n.visit(_this,mapper)});return new TagPlaceholder(ph.tag,ph.attrs,startName,closeName,children,ph.isVoid,ph.sourceSpan)},MapPlaceholderNames.prototype.visitPlaceholder=function(ph,mapper){return new Placeholder(ph.value,mapper.toPublicName(ph.name),ph.sourceSpan)},MapPlaceholderNames.prototype.visitIcuPlaceholder=function(ph,mapper){return new IcuPlaceholder(ph.value,mapper.toPublicName(ph.name),ph.sourceSpan)},MapPlaceholderNames}(CloneVisitor),Extractor=function(){function Extractor(host,staticSymbolResolver,messageBundle,metadataResolver){this.host=host,this.staticSymbolResolver=staticSymbolResolver,this.messageBundle=messageBundle,this.metadataResolver=metadataResolver}return Extractor.prototype.extract=function(rootFiles){var _this=this,programSymbols=extractProgramSymbols(this.staticSymbolResolver,rootFiles,this.host),_a=analyzeAndValidateNgModules(programSymbols,this.host,this.metadataResolver),files=_a.files,ngModules=_a.ngModules;return Promise.all(ngModules.map(function(ngModule){return _this.metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference,!1)})).then(function(){var errors=[];if(files.forEach(function(file){var compMetas=[];file.directives.forEach(function(directiveType){var dirMeta=_this.metadataResolver.getDirectiveMetadata(directiveType);dirMeta&&dirMeta.isComponent&&compMetas.push(dirMeta)}),compMetas.forEach(function(compMeta){var html=compMeta.template.template,interpolationConfig=InterpolationConfig.fromArray(compMeta.template.interpolation);errors.push.apply(errors,_this.messageBundle.updateFromTemplate(html,file.srcUrl,interpolationConfig))})}),errors.length)throw new Error(errors.map(function(e){return e.toString()}).join("\n"));return _this.messageBundle})},Extractor.create=function(host,locale){var htmlParser=new HtmlParser,urlResolver=createOfflineCompileUrlResolver(),symbolCache=new StaticSymbolCache,summaryResolver=new AotSummaryResolver(host,symbolCache),staticSymbolResolver=new StaticSymbolResolver(host,symbolCache,summaryResolver),staticReflector=new StaticReflector(summaryResolver,staticSymbolResolver),config=new CompilerConfig({defaultEncapsulation:_angular_core.ViewEncapsulation.Emulated,useJit:!1}),normalizer=new DirectiveNormalizer({get:function(url){return host.loadResource(url)}},urlResolver,htmlParser,config),elementSchemaRegistry=new DomElementSchemaRegistry,resolver=new CompileMetadataResolver(config,new NgModuleResolver(staticReflector),new DirectiveResolver(staticReflector),new PipeResolver(staticReflector),summaryResolver,elementSchemaRegistry,normalizer,new _angular_core.ɵConsole,symbolCache,staticReflector),messageBundle=new MessageBundle(htmlParser,[],{},locale);return{extractor:new Extractor(host,staticSymbolResolver,messageBundle,resolver),staticReflector:staticReflector}},Extractor}(),JitReflector=function(){function JitReflector(){this.reflectionCapabilities=new _angular_core.ɵReflectionCapabilities}return JitReflector.prototype.componentModuleUrl=function(type,cmpMetadata){var moduleId=cmpMetadata.moduleId;if("string"==typeof moduleId){return getUrlScheme(moduleId)?moduleId:"package:"+moduleId+MODULE_SUFFIX}if(null!==moduleId&&void 0!==moduleId)throw syntaxError('moduleId should be a string in "'+_angular_core.ɵstringify(type)+"\". See https://goo.gl/wIDDiL for more information.\nIf you're using Webpack you should inline the template and the styles, see https://goo.gl/X2J8zc.");return"./"+_angular_core.ɵstringify(type)},JitReflector.prototype.parameters=function(typeOrFunc){return this.reflectionCapabilities.parameters(typeOrFunc)},JitReflector.prototype.annotations=function(typeOrFunc){return this.reflectionCapabilities.annotations(typeOrFunc)},JitReflector.prototype.propMetadata=function(typeOrFunc){return this.reflectionCapabilities.propMetadata(typeOrFunc)},JitReflector.prototype.hasLifecycleHook=function(type,lcProperty){return this.reflectionCapabilities.hasLifecycleHook(type,lcProperty)},JitReflector.prototype.resolveExternalReference=function(ref){return ref.runtime},JitReflector}(),_NO_RESOURCE_LOADER={get:function(url){throw new Error("No ResourceLoader implementation has been provided. Can't read the url \""+url+'"')}},baseHtmlParser=new _angular_core.InjectionToken("HtmlParser"),COMPILER_PROVIDERS=[{provide:CompileReflector,useValue:new JitReflector},{provide:ResourceLoader,useValue:_NO_RESOURCE_LOADER},JitSummaryResolver,{provide:SummaryResolver,useExisting:JitSummaryResolver},_angular_core.ɵConsole,Lexer,Parser,{provide:baseHtmlParser,useClass:HtmlParser},{provide:I18NHtmlParser,useFactory:function(parser,translations,format,config,console){translations=translations||"";var missingTranslation=translations?config.missingTranslation:_angular_core.MissingTranslationStrategy.Ignore;return new I18NHtmlParser(parser,translations,format,missingTranslation,console)},deps:[baseHtmlParser,[new _angular_core.Optional,new _angular_core.Inject(_angular_core.TRANSLATIONS)],[new _angular_core.Optional,new _angular_core.Inject(_angular_core.TRANSLATIONS_FORMAT)],[CompilerConfig],[_angular_core.ɵConsole]]},{provide:HtmlParser,useExisting:I18NHtmlParser},TemplateParser,DirectiveNormalizer,CompileMetadataResolver,DEFAULT_PACKAGE_URL_PROVIDER,StyleCompiler,ViewCompiler,NgModuleCompiler,{provide:CompilerConfig,useValue:new CompilerConfig},JitCompiler,{provide:_angular_core.Compiler,useExisting:JitCompiler},DomElementSchemaRegistry,{provide:ElementSchemaRegistry,useExisting:DomElementSchemaRegistry},UrlResolver,DirectiveResolver,PipeResolver,NgModuleResolver],JitCompilerFactory=function(){function JitCompilerFactory(defaultOptions){var compilerOptions={useDebug:_angular_core.isDevMode(),useJit:!0,defaultEncapsulation:_angular_core.ViewEncapsulation.Emulated,missingTranslation:_angular_core.MissingTranslationStrategy.Warning,enableLegacyTemplate:!0};this._defaultOptions=[compilerOptions].concat(defaultOptions)}return JitCompilerFactory.prototype.createCompiler=function(options){void 0===options&&(options=[]);var opts=_mergeOptions(this._defaultOptions.concat(options));return _angular_core.ReflectiveInjector.resolveAndCreate([COMPILER_PROVIDERS,{provide:CompilerConfig,useFactory:function(){return new CompilerConfig({useJit:opts.useJit,defaultEncapsulation:opts.defaultEncapsulation,missingTranslation:opts.missingTranslation,enableLegacyTemplate:opts.enableLegacyTemplate})},deps:[]},opts.providers]).get(_angular_core.Compiler)},JitCompilerFactory}();JitCompilerFactory.decorators=[{type:CompilerInjectable}],JitCompilerFactory.ctorParameters=function(){return[{type:Array,decorators:[{type:_angular_core.Inject,args:[_angular_core.COMPILER_OPTIONS]}]}]};var platformCoreDynamic=_angular_core.createPlatformFactory(_angular_core.platformCore,"coreDynamic",[{provide:_angular_core.COMPILER_OPTIONS,useValue:{},multi:!0},{provide:_angular_core.CompilerFactory,useClass:JitCompilerFactory}]);exports.VERSION=VERSION,exports.TEMPLATE_TRANSFORMS=TEMPLATE_TRANSFORMS,exports.CompilerConfig=CompilerConfig,exports.JitCompiler=JitCompiler,exports.DirectiveResolver=DirectiveResolver,exports.PipeResolver=PipeResolver,exports.NgModuleResolver=NgModuleResolver,exports.DEFAULT_INTERPOLATION_CONFIG=DEFAULT_INTERPOLATION_CONFIG,exports.InterpolationConfig=InterpolationConfig,exports.NgModuleCompiler=NgModuleCompiler,exports.AssertNotNull=AssertNotNull,exports.BinaryOperator=BinaryOperator,exports.BinaryOperatorExpr=BinaryOperatorExpr,exports.BuiltinMethod=BuiltinMethod,exports.BuiltinVar=BuiltinVar,exports.CastExpr=CastExpr,exports.ClassStmt=ClassStmt,exports.CommaExpr=CommaExpr,exports.CommentStmt=CommentStmt,exports.ConditionalExpr=ConditionalExpr,exports.DeclareFunctionStmt=DeclareFunctionStmt,exports.DeclareVarStmt=DeclareVarStmt,exports.ExpressionStatement=ExpressionStatement,exports.ExternalExpr=ExternalExpr,exports.ExternalReference=ExternalReference,exports.FunctionExpr=FunctionExpr,exports.IfStmt=IfStmt,exports.InstantiateExpr=InstantiateExpr,exports.InvokeFunctionExpr=InvokeFunctionExpr,exports.InvokeMethodExpr=InvokeMethodExpr,exports.LiteralArrayExpr=LiteralArrayExpr,exports.LiteralExpr=LiteralExpr,exports.LiteralMapExpr=LiteralMapExpr,exports.NotExpr=NotExpr,exports.ReadKeyExpr=ReadKeyExpr,exports.ReadPropExpr=ReadPropExpr,exports.ReadVarExpr=ReadVarExpr,exports.ReturnStatement=ReturnStatement,exports.ThrowStmt=ThrowStmt,exports.TryCatchStmt=TryCatchStmt,exports.WriteKeyExpr=WriteKeyExpr,exports.WritePropExpr=WritePropExpr,exports.WriteVarExpr=WriteVarExpr,exports.StmtModifier=StmtModifier,exports.Statement=Statement,exports.EmitterVisitorContext=EmitterVisitorContext,exports.ViewCompiler=ViewCompiler,exports.isSyntaxError=isSyntaxError,exports.syntaxError=syntaxError,exports.TextAst=TextAst,exports.BoundTextAst=BoundTextAst,exports.AttrAst=AttrAst,exports.BoundElementPropertyAst=BoundElementPropertyAst,exports.BoundEventAst=BoundEventAst,exports.ReferenceAst=ReferenceAst,exports.VariableAst=VariableAst,exports.ElementAst=ElementAst,exports.EmbeddedTemplateAst=EmbeddedTemplateAst,exports.BoundDirectivePropertyAst=BoundDirectivePropertyAst,exports.DirectiveAst=DirectiveAst,exports.ProviderAst=ProviderAst,exports.ProviderAstType=ProviderAstType,exports.NgContentAst=NgContentAst,exports.PropertyBindingType=PropertyBindingType,exports.NullTemplateVisitor=NullTemplateVisitor,exports.RecursiveTemplateAstVisitor=RecursiveTemplateAstVisitor,exports.templateVisitAll=templateVisitAll,exports.CompileAnimationEntryMetadata=CompileAnimationEntryMetadata,exports.CompileAnimationStateMetadata=CompileAnimationStateMetadata,exports.CompileAnimationStateDeclarationMetadata=CompileAnimationStateDeclarationMetadata,exports.CompileAnimationStateTransitionMetadata=CompileAnimationStateTransitionMetadata,exports.CompileAnimationMetadata=CompileAnimationMetadata,exports.CompileAnimationKeyframesSequenceMetadata=CompileAnimationKeyframesSequenceMetadata,exports.CompileAnimationStyleMetadata=CompileAnimationStyleMetadata,exports.CompileAnimationAnimateMetadata=CompileAnimationAnimateMetadata,exports.CompileAnimationWithStepsMetadata=CompileAnimationWithStepsMetadata,exports.CompileAnimationSequenceMetadata=CompileAnimationSequenceMetadata,exports.CompileAnimationGroupMetadata=CompileAnimationGroupMetadata,exports.identifierName=identifierName,exports.identifierModuleUrl=identifierModuleUrl,exports.viewClassName=viewClassName,exports.rendererTypeName=rendererTypeName,exports.hostViewClassName=hostViewClassName,exports.dirWrapperClassName=dirWrapperClassName,exports.componentFactoryName=componentFactoryName,exports.CompileSummaryKind=CompileSummaryKind,exports.tokenName=tokenName,exports.tokenReference=tokenReference,exports.CompileStylesheetMetadata=CompileStylesheetMetadata,exports.CompileTemplateMetadata=CompileTemplateMetadata,exports.CompileDirectiveMetadata=CompileDirectiveMetadata,exports.createHostComponentMeta=createHostComponentMeta,exports.CompilePipeMetadata=CompilePipeMetadata,exports.CompileNgModuleMetadata=CompileNgModuleMetadata,exports.TransitiveCompileNgModuleMetadata=TransitiveCompileNgModuleMetadata,exports.ProviderMeta=ProviderMeta,exports.flatten=flatten,exports.sourceUrl=sourceUrl,exports.templateSourceUrl=templateSourceUrl,exports.sharedStylesheetJitUrl=sharedStylesheetJitUrl,exports.ngModuleJitUrl=ngModuleJitUrl,exports.templateJitUrl=templateJitUrl,exports.createAotCompiler=createAotCompiler,exports.AotCompiler=AotCompiler,exports.analyzeNgModules=analyzeNgModules,exports.analyzeAndValidateNgModules=analyzeAndValidateNgModules,exports.extractProgramSymbols=extractProgramSymbols,exports.GeneratedFile=GeneratedFile,exports.toTypeScript=toTypeScript,exports.StaticReflector=StaticReflector,exports.StaticSymbol=StaticSymbol,exports.StaticSymbolCache=StaticSymbolCache,exports.ResolvedStaticSymbol=ResolvedStaticSymbol,exports.StaticSymbolResolver=StaticSymbolResolver,exports.unescapeIdentifier=unescapeIdentifier,exports.AotSummaryResolver=AotSummaryResolver,exports.AstPath=AstPath,exports.SummaryResolver=SummaryResolver,exports.JitSummaryResolver=JitSummaryResolver,exports.COMPILER_PROVIDERS=COMPILER_PROVIDERS,exports.JitCompilerFactory=JitCompilerFactory,exports.platformCoreDynamic=platformCoreDynamic,exports.JitReflector=JitReflector,exports.CompileReflector=CompileReflector,exports.createUrlResolverWithoutPackagePrefix=createUrlResolverWithoutPackagePrefix,exports.createOfflineCompileUrlResolver=createOfflineCompileUrlResolver,exports.DEFAULT_PACKAGE_URL_PROVIDER=DEFAULT_PACKAGE_URL_PROVIDER,exports.UrlResolver=UrlResolver,exports.getUrlScheme=getUrlScheme,exports.ResourceLoader=ResourceLoader,exports.ElementSchemaRegistry=ElementSchemaRegistry,exports.Extractor=Extractor,exports.I18NHtmlParser=I18NHtmlParser,exports.MessageBundle=MessageBundle,exports.Serializer=Serializer,exports.Xliff=Xliff,exports.Xliff2=Xliff2,exports.Xmb=Xmb,exports.Xtb=Xtb,exports.DirectiveNormalizer=DirectiveNormalizer,exports.ParserError=ParserError,exports.ParseSpan=ParseSpan,exports.AST=AST,exports.Quote=Quote,exports.EmptyExpr=EmptyExpr,exports.ImplicitReceiver=ImplicitReceiver,exports.Chain=Chain,exports.Conditional=Conditional,exports.PropertyRead=PropertyRead,exports.PropertyWrite=PropertyWrite,exports.SafePropertyRead=SafePropertyRead,exports.KeyedRead=KeyedRead,exports.KeyedWrite=KeyedWrite,exports.BindingPipe=BindingPipe,exports.LiteralPrimitive=LiteralPrimitive,exports.LiteralArray=LiteralArray,exports.LiteralMap=LiteralMap,exports.Interpolation=Interpolation,exports.Binary=Binary,exports.PrefixNot=PrefixNot,exports.NonNullAssert=NonNullAssert,exports.MethodCall=MethodCall,exports.SafeMethodCall=SafeMethodCall,exports.FunctionCall=FunctionCall,exports.ASTWithSource=ASTWithSource,exports.TemplateBinding=TemplateBinding,exports.NullAstVisitor=NullAstVisitor,exports.RecursiveAstVisitor=RecursiveAstVisitor,exports.AstTransformer=AstTransformer,exports.visitAstChildren=visitAstChildren,exports.TokenType=TokenType,exports.Lexer=Lexer,exports.Token=Token,exports.EOF=EOF,exports.isIdentifier=isIdentifier,exports.isQuote=isQuote,exports.SplitInterpolation=SplitInterpolation,exports.TemplateBindingParseResult=TemplateBindingParseResult,exports.Parser=Parser,exports._ParseAST=_ParseAST,exports.ERROR_COLLECTOR_TOKEN=ERROR_COLLECTOR_TOKEN,exports.CompileMetadataResolver=CompileMetadataResolver,exports.Text=Text,exports.Expansion=Expansion,exports.ExpansionCase=ExpansionCase,exports.Attribute=Attribute$1,exports.Element=Element,exports.Comment=Comment,exports.visitAll=visitAll,exports.RecursiveVisitor=RecursiveVisitor,exports.findNode=findNode,exports.ParseTreeResult=ParseTreeResult,exports.TreeError=TreeError,exports.HtmlParser=HtmlParser,exports.HtmlTagDefinition=HtmlTagDefinition,exports.getHtmlTagDefinition=getHtmlTagDefinition,exports.TagContentType=TagContentType,exports.splitNsName=splitNsName,exports.isNgContainer=isNgContainer,exports.isNgContent=isNgContent;exports.isNgTemplate=isNgTemplate,exports.getNsPrefix=getNsPrefix,exports.mergeNsAndName=mergeNsAndName,exports.NAMED_ENTITIES=NAMED_ENTITIES,exports.debugOutputAstAsTypeScript=debugOutputAstAsTypeScript,exports.TypeScriptEmitter=TypeScriptEmitter,exports.ParseLocation=ParseLocation,exports.ParseSourceFile=ParseSourceFile,exports.ParseSourceSpan=ParseSourceSpan,exports.ParseErrorLevel=ParseErrorLevel,exports.ParseError=ParseError,exports.typeSourceSpan=typeSourceSpan,exports.DomElementSchemaRegistry=DomElementSchemaRegistry,exports.CssSelector=CssSelector,exports.SelectorMatcher=SelectorMatcher,exports.SelectorListContext=SelectorListContext,exports.SelectorContext=SelectorContext,exports.StylesCompileDependency=StylesCompileDependency,exports.CompiledStylesheet=CompiledStylesheet,exports.StyleCompiler=StyleCompiler,exports.TemplateParseError=TemplateParseError,exports.TemplateParseResult=TemplateParseResult,exports.TemplateParser=TemplateParser,exports.splitClasses=splitClasses,exports.createElementCssSelector=createElementCssSelector,exports.removeSummaryDuplicates=removeSummaryDuplicates,Object.defineProperty(exports,"__esModule",{value:!0})}),function(global,factory){"object"==typeof exports&&void 0!==module?factory(exports,require("@angular/compiler"),require("@angular/core"),require("@angular/common"),require("@angular/platform-browser")):$__System.registerDynamic("d",["b","c","e","f"],!1,function($__require,$__exports,$__module){return"function"==typeof factory?factory.call($__exports,$__exports,$__require("b"),$__require("c"),$__require("e"),$__require("f")):factory})}(0,function(exports,_angular_compiler,_angular_core,_angular_common,_angular_platformBrowser){"use strict";function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])},ResourceLoaderImpl=function(_super){function ResourceLoaderImpl(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(ResourceLoaderImpl,_super),ResourceLoaderImpl.prototype.get=function(url){var resolve,reject,promise=new Promise(function(res,rej){resolve=res,reject=rej}),xhr=new XMLHttpRequest;return xhr.open("GET",url,!0),xhr.responseType="text",xhr.onload=function(){var response=xhr.response||xhr.responseText,status=1223===xhr.status?204:xhr.status;0===status&&(status=response?200:0),200<=status&&status<=300?resolve(response):reject("Failed to load "+url)},xhr.onerror=function(){reject("Failed to load "+url)},xhr.send(),promise},ResourceLoaderImpl}(_angular_compiler.ResourceLoader);ResourceLoaderImpl.decorators=[{type:_angular_core.Injectable}],ResourceLoaderImpl.ctorParameters=function(){return[]};var INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS=[_angular_platformBrowser.ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS,{provide:_angular_core.COMPILER_OPTIONS,useValue:{providers:[{provide:_angular_compiler.ResourceLoader,useClass:ResourceLoaderImpl}]},multi:!0},{provide:_angular_core.PLATFORM_ID,useValue:_angular_common.ɵPLATFORM_BROWSER_ID}],CachedResourceLoader=function(_super){function CachedResourceLoader(){var _this=_super.call(this)||this;if(_this._cache=_angular_core.ɵglobal.$templateCache,null==_this._cache)throw new Error("CachedResourceLoader: Template cache was not found in $templateCache.");return _this}return __extends(CachedResourceLoader,_super),CachedResourceLoader.prototype.get=function(url){return this._cache.hasOwnProperty(url)?Promise.resolve(this._cache[url]):Promise.reject("CachedResourceLoader: Did not find cached template for "+url)},CachedResourceLoader}(_angular_compiler.ResourceLoader),VERSION=new _angular_core.Version("4.2.6"),RESOURCE_CACHE_PROVIDER=[{provide:_angular_compiler.ResourceLoader,useClass:CachedResourceLoader}],platformBrowserDynamic=_angular_core.createPlatformFactory(_angular_compiler.platformCoreDynamic,"browserDynamic",INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS);exports.RESOURCE_CACHE_PROVIDER=RESOURCE_CACHE_PROVIDER,exports.platformBrowserDynamic=platformBrowserDynamic,exports.VERSION=VERSION,exports.ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS=INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,exports.ɵResourceLoaderImpl=ResourceLoaderImpl,Object.defineProperty(exports,"__esModule",{value:!0})}),function(global,factory){"object"==typeof exports&&void 0!==module?factory(exports,require("@angular/core")):$__System.registerDynamic("e",["c"],!1,function($__require,$__exports,$__module){return"function"==typeof factory?factory.call($__exports,$__exports,$__require("c")):factory})}(0,function(exports,_angular_core){"use strict";function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}function _stripBaseHref(baseHref,url){return baseHref&&url.startsWith(baseHref)?url.substring(baseHref.length):url}function _stripIndexHtml(url){return url.replace(/\/index.html$/,"")}function getPluralCategory(value,cases,ngLocalization){var key="="+value;if(cases.indexOf(key)>-1)return key;if(key=ngLocalization.getPluralCategory(value),cases.indexOf(key)>-1)return key;if(cases.indexOf("other")>-1)return"other";throw new Error('No plural message found for value "'+value+'"')}function getPluralCase(locale,nLike){"string"==typeof nLike&&(nLike=parseInt(nLike,10));var n=nLike,nDecimal=n.toString().replace(/^[^.]*\.?/,""),i=Math.floor(Math.abs(n)),v=nDecimal.length,f=parseInt(nDecimal,10),t=parseInt(n.toString().replace(/^[^.]*\.?|0+$/g,""),10)||0;switch(locale.split("-")[0].toLowerCase()){case"af":case"asa":case"az":case"bem":case"bez":case"bg":case"brx":case"ce":case"cgg":case"chr":case"ckb":case"ee":case"el":case"eo":case"es":case"eu":case"fo":case"fur":case"gsw":case"ha":case"haw":case"hu":case"jgo":case"jmc":case"ka":case"kk":case"kkj":case"kl":case"ks":case"ksb":case"ky":case"lb":case"lg":case"mas":case"mgo":case"ml":case"mn":case"nb":case"nd":case"ne":case"nn":case"nnh":case"nyn":case"om":case"or":case"os":case"ps":case"rm":case"rof":case"rwk":case"saq":case"seh":case"sn":case"so":case"sq":case"ta":case"te":case"teo":case"tk":case"tr":case"ug":case"uz":case"vo":case"vun":case"wae":case"xog":return 1===n?Plural.One:Plural.Other;case"ak":case"ln":case"mg":case"pa":case"ti":return n===Math.floor(n)&&n>=0&&n<=1?Plural.One:Plural.Other;case"am":case"as":case"bn":case"fa":case"gu":case"hi":case"kn":case"mr":case"zu":return 0===i||1===n?Plural.One:Plural.Other;case"ar":return 0===n?Plural.Zero:1===n?Plural.One:2===n?Plural.Two:n%100===Math.floor(n%100)&&n%100>=3&&n%100<=10?Plural.Few:n%100===Math.floor(n%100)&&n%100>=11&&n%100<=99?Plural.Many:Plural.Other;case"ast":case"ca":case"de":case"en":case"et":case"fi":case"fy":case"gl":case"it":case"nl":case"sv":case"sw":case"ur":case"yi":return 1===i&&0===v?Plural.One:Plural.Other;case"be":return n%10==1&&n%100!=11?Plural.One:n%10===Math.floor(n%10)&&n%10>=2&&n%10<=4&&!(n%100>=12&&n%100<=14)?Plural.Few:n%10==0||n%10===Math.floor(n%10)&&n%10>=5&&n%10<=9||n%100===Math.floor(n%100)&&n%100>=11&&n%100<=14?Plural.Many:Plural.Other;case"br":return n%10==1&&n%100!=11&&n%100!=71&&n%100!=91?Plural.One:n%10==2&&n%100!=12&&n%100!=72&&n%100!=92?Plural.Two:n%10===Math.floor(n%10)&&(n%10>=3&&n%10<=4||n%10==9)&&!(n%100>=10&&n%100<=19||n%100>=70&&n%100<=79||n%100>=90&&n%100<=99)?Plural.Few:0!==n&&n%1e6==0?Plural.Many:Plural.Other;case"bs":case"hr":case"sr":return 0===v&&i%10==1&&i%100!=11||f%10==1&&f%100!=11?Plural.One:0===v&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)||f%10===Math.floor(f%10)&&f%10>=2&&f%10<=4&&!(f%100>=12&&f%100<=14)?Plural.Few:Plural.Other;case"cs":case"sk":return 1===i&&0===v?Plural.One:i===Math.floor(i)&&i>=2&&i<=4&&0===v?Plural.Few:0!==v?Plural.Many:Plural.Other;case"cy":return 0===n?Plural.Zero:1===n?Plural.One:2===n?Plural.Two:3===n?Plural.Few:6===n?Plural.Many:Plural.Other;case"da":return 1===n||0!==t&&(0===i||1===i)?Plural.One:Plural.Other;case"dsb":case"hsb":return 0===v&&i%100==1||f%100==1?Plural.One:0===v&&i%100==2||f%100==2?Plural.Two:0===v&&i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||f%100===Math.floor(f%100)&&f%100>=3&&f%100<=4?Plural.Few:Plural.Other;case"ff":case"fr":case"hy":case"kab":return 0===i||1===i?Plural.One:Plural.Other;case"fil":return 0===v&&(1===i||2===i||3===i)||0===v&&i%10!=4&&i%10!=6&&i%10!=9||0!==v&&f%10!=4&&f%10!=6&&f%10!=9?Plural.One:Plural.Other;case"ga":return 1===n?Plural.One:2===n?Plural.Two:n===Math.floor(n)&&n>=3&&n<=6?Plural.Few:n===Math.floor(n)&&n>=7&&n<=10?Plural.Many:Plural.Other;case"gd":return 1===n||11===n?Plural.One:2===n||12===n?Plural.Two:n===Math.floor(n)&&(n>=3&&n<=10||n>=13&&n<=19)?Plural.Few:Plural.Other;case"gv":return 0===v&&i%10==1?Plural.One:0===v&&i%10==2?Plural.Two:0!==v||i%100!=0&&i%100!=20&&i%100!=40&&i%100!=60&&i%100!=80?0!==v?Plural.Many:Plural.Other:Plural.Few;case"he":return 1===i&&0===v?Plural.One:2===i&&0===v?Plural.Two:0!==v||n>=0&&n<=10||n%10!=0?Plural.Other:Plural.Many;case"is":return 0===t&&i%10==1&&i%100!=11||0!==t?Plural.One:Plural.Other;case"ksh":return 0===n?Plural.Zero:1===n?Plural.One:Plural.Other;case"kw":case"naq":case"se":case"smn":return 1===n?Plural.One:2===n?Plural.Two:Plural.Other;case"lag":return 0===n?Plural.Zero:0!==i&&1!==i||0===n?Plural.Other:Plural.One;case"lt":return n%10!=1||n%100>=11&&n%100<=19?n%10===Math.floor(n%10)&&n%10>=2&&n%10<=9&&!(n%100>=11&&n%100<=19)?Plural.Few:0!==f?Plural.Many:Plural.Other:Plural.One;case"lv":case"prg":return n%10==0||n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19||2===v&&f%100===Math.floor(f%100)&&f%100>=11&&f%100<=19?Plural.Zero:n%10==1&&n%100!=11||2===v&&f%10==1&&f%100!=11||2!==v&&f%10==1?Plural.One:Plural.Other;case"mk":return 0===v&&i%10==1||f%10==1?Plural.One:Plural.Other;case"mt":return 1===n?Plural.One:0===n||n%100===Math.floor(n%100)&&n%100>=2&&n%100<=10?Plural.Few:n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19?Plural.Many:Plural.Other;case"pl":return 1===i&&0===v?Plural.One:0===v&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)?Plural.Few:0===v&&1!==i&&i%10===Math.floor(i%10)&&i%10>=0&&i%10<=1||0===v&&i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||0===v&&i%100===Math.floor(i%100)&&i%100>=12&&i%100<=14?Plural.Many:Plural.Other;case"pt":return n===Math.floor(n)&&n>=0&&n<=2&&2!==n?Plural.One:Plural.Other;case"ro":return 1===i&&0===v?Plural.One:0!==v||0===n||1!==n&&n%100===Math.floor(n%100)&&n%100>=1&&n%100<=19?Plural.Few:Plural.Other;case"ru":case"uk":return 0===v&&i%10==1&&i%100!=11?Plural.One:0===v&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)?Plural.Few:0===v&&i%10==0||0===v&&i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||0===v&&i%100===Math.floor(i%100)&&i%100>=11&&i%100<=14?Plural.Many:Plural.Other;case"shi":return 0===i||1===n?Plural.One:n===Math.floor(n)&&n>=2&&n<=10?Plural.Few:Plural.Other;case"si":return 0===n||1===n||0===i&&1===f?Plural.One:Plural.Other;case"sl":return 0===v&&i%100==1?Plural.One:0===v&&i%100==2?Plural.Two:0===v&&i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||0!==v?Plural.Few:Plural.Other;case"tzm":return n===Math.floor(n)&&n>=0&&n<=1||n===Math.floor(n)&&n>=11&&n<=99?Plural.One:Plural.Other;default:return Plural.Other}}function getTypeNameForDebugging(type){return type.name||typeof type}function invalidPipeArgumentError(type,value){return Error("InvalidPipeArgument: '"+value+"' for pipe '"+_angular_core.ɵstringify(type)+"'")}function titleCaseWord(word){return word?word[0].toUpperCase()+word.substr(1).toLowerCase():word}function digitModifier(inner){return function(date,locale){var result=inner(date,locale);return 1==result.length?"0"+result:result}}function hourClockExtractor(inner){return function(date,locale){return inner(date,locale).split(" ")[1]}}function hourExtractor(inner){return function(date,locale){return inner(date,locale).split(" ")[0]}}function intlDateFormat(date,locale,options){return new Intl.DateTimeFormat(locale,options).format(date).replace(/[\u200e\u200f]/g,"")}function timeZoneGetter(timezone){var options={hour:"2-digit",hour12:!1,timeZoneName:timezone};return function(date,locale){var result=intlDateFormat(date,locale,options);return result?result.substring(3):""}}function hour12Modify(options,value){return options.hour12=value,options}function digitCondition(prop,len){var result={};return result[prop]=2===len?"2-digit":"numeric",result}function nameCondition(prop,len){var result={};return result[prop]=len<4?len>1?"short":"narrow":"long",result}function combine(options){return options.reduce(function(merged,opt){return Object.assign({},merged,opt)},{})}function datePartGetterFactory(ret){return function(date,locale){return intlDateFormat(date,locale,ret)}}function dateFormatter(format,date,locale){var fn=PATTERN_ALIASES[format];if(fn)return fn(date,locale);var cacheKey=format,parts=DATE_FORMATTER_CACHE.get(cacheKey);if(!parts){parts=[];var match=void 0;DATE_FORMATS_SPLIT.exec(format);for(var _format=format;_format;)match=DATE_FORMATS_SPLIT.exec(_format),match?(parts=parts.concat(match.slice(1)),_format=parts.pop()):(parts.push(_format),_format=null);DATE_FORMATTER_CACHE.set(cacheKey,parts)}return parts.reduce(function(text,part){var fn=DATE_FORMATS[part];return text+(fn?fn(date,locale):partToTime(part))},"")}function partToTime(part){return"''"===part?"'":part.replace(/(^'|'$)/g,"").replace(/''/g,"'")}function formatNumber(pipe,locale,value,style,digits,currency,currencyAsSymbol){if(void 0===currency&&(currency=null),void 0===currencyAsSymbol&&(currencyAsSymbol=!1),null==value)return null;if("number"!=typeof(value="string"==typeof value&&isNumeric(value)?+value:value))throw invalidPipeArgumentError(pipe,value);var minInt=void 0,minFraction=void 0,maxFraction=void 0;if(style!==NumberFormatStyle.Currency&&(minInt=1,minFraction=0,maxFraction=3),digits){var parts=digits.match(_NUMBER_FORMAT_REGEXP);if(null===parts)throw new Error(digits+" is not a valid digit info for number pipes");null!=parts[1]&&(minInt=parseIntAutoRadix(parts[1])),null!=parts[3]&&(minFraction=parseIntAutoRadix(parts[3])),null!=parts[5]&&(maxFraction=parseIntAutoRadix(parts[5]))}return NumberFormatter.format(value,locale,style,{minimumIntegerDigits:minInt,minimumFractionDigits:minFraction,maximumFractionDigits:maxFraction,currency:currency,currencyAsSymbol:currencyAsSymbol})}function parseIntAutoRadix(text){var result=parseInt(text);if(isNaN(result))throw new Error("Invalid integer literal when parsing "+text);return result}function isNumeric(value){return!isNaN(value-parseFloat(value))}function isBlank(obj){return null==obj||""===obj}function isDate(obj){return obj instanceof Date&&!isNaN(obj.valueOf())}function isoStringToDate(match){var date=new Date(0),tzHour=0,tzMin=0,dateSetter=match[8]?date.setUTCFullYear:date.setFullYear,timeSetter=match[8]?date.setUTCHours:date.setHours;match[9]&&(tzHour=toInt(match[9]+match[10]),tzMin=toInt(match[9]+match[11])),dateSetter.call(date,toInt(match[1]),toInt(match[2])-1,toInt(match[3]));var h=toInt(match[4]||"0")-tzHour,m=toInt(match[5]||"0")-tzMin,s=toInt(match[6]||"0"),ms=Math.round(1e3*parseFloat("0."+(match[7]||0)));return timeSetter.call(date,h,m,s,ms),date}function toInt(str){return parseInt(str,10)}function isPlatformBrowser(platformId){return platformId===PLATFORM_BROWSER_ID}function isPlatformServer(platformId){return platformId===PLATFORM_SERVER_ID}function isPlatformWorkerApp(platformId){return platformId===PLATFORM_WORKER_APP_ID}function isPlatformWorkerUi(platformId){return platformId===PLATFORM_WORKER_UI_ID}var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])},PlatformLocation=function(){function PlatformLocation(){}return PlatformLocation.prototype.getBaseHrefFromDOM=function(){},PlatformLocation.prototype.onPopState=function(fn){},PlatformLocation.prototype.onHashChange=function(fn){},PlatformLocation.prototype.pathname=function(){},PlatformLocation.prototype.search=function(){},PlatformLocation.prototype.hash=function(){},PlatformLocation.prototype.replaceState=function(state,title,url){},PlatformLocation.prototype.pushState=function(state,title,url){},PlatformLocation.prototype.forward=function(){},PlatformLocation.prototype.back=function(){},PlatformLocation}(),LOCATION_INITIALIZED=new _angular_core.InjectionToken("Location Initialized"),LocationStrategy=function(){function LocationStrategy(){}return LocationStrategy.prototype.path=function(includeHash){},LocationStrategy.prototype.prepareExternalUrl=function(internal){},LocationStrategy.prototype.pushState=function(state,title,url,queryParams){},LocationStrategy.prototype.replaceState=function(state,title,url,queryParams){},LocationStrategy.prototype.forward=function(){},LocationStrategy.prototype.back=function(){},LocationStrategy.prototype.onPopState=function(fn){},LocationStrategy.prototype.getBaseHref=function(){},LocationStrategy}(),APP_BASE_HREF=new _angular_core.InjectionToken("appBaseHref"),Location=function(){function Location(platformStrategy){var _this=this;this._subject=new _angular_core.EventEmitter,this._platformStrategy=platformStrategy;var browserBaseHref=this._platformStrategy.getBaseHref();this._baseHref=Location.stripTrailingSlash(_stripIndexHtml(browserBaseHref)),this._platformStrategy.onPopState(function(ev){_this._subject.emit({url:_this.path(!0),pop:!0,type:ev.type})})}return Location.prototype.path=function(includeHash){return void 0===includeHash&&(includeHash=!1),this.normalize(this._platformStrategy.path(includeHash))},Location.prototype.isCurrentPathEqualTo=function(path,query){return void 0===query&&(query=""),this.path()==this.normalize(path+Location.normalizeQueryParams(query))},Location.prototype.normalize=function(url){return Location.stripTrailingSlash(_stripBaseHref(this._baseHref,_stripIndexHtml(url)))},Location.prototype.prepareExternalUrl=function(url){return url&&"/"!==url[0]&&(url="/"+url),this._platformStrategy.prepareExternalUrl(url)},Location.prototype.go=function(path,query){void 0===query&&(query=""),this._platformStrategy.pushState(null,"",path,query)},Location.prototype.replaceState=function(path,query){void 0===query&&(query=""),this._platformStrategy.replaceState(null,"",path,query)},Location.prototype.forward=function(){this._platformStrategy.forward()},Location.prototype.back=function(){this._platformStrategy.back()},Location.prototype.subscribe=function(onNext,onThrow,onReturn){return this._subject.subscribe({next:onNext,error:onThrow,complete:onReturn})},Location.normalizeQueryParams=function(params){return params&&"?"!==params[0]?"?"+params:params},Location.joinWithSlash=function(start,end){if(0==start.length)return end;if(0==end.length)return start;var slashes=0;return start.endsWith("/")&&slashes++,end.startsWith("/")&&slashes++,2==slashes?start+end.substring(1):1==slashes?start+end:start+"/"+end},Location.stripTrailingSlash=function(url){var match=url.match(/#|\?|$/),pathEndIdx=match&&match.index||url.length,droppedSlashIdx=pathEndIdx-("/"===url[pathEndIdx-1]?1:0);return url.slice(0,droppedSlashIdx)+url.slice(pathEndIdx)},Location}();Location.decorators=[{type:_angular_core.Injectable}],Location.ctorParameters=function(){return[{type:LocationStrategy}]};var HashLocationStrategy=function(_super){function HashLocationStrategy(_platformLocation,_baseHref){var _this=_super.call(this)||this;return _this._platformLocation=_platformLocation,_this._baseHref="",null!=_baseHref&&(_this._baseHref=_baseHref),_this}return __extends(HashLocationStrategy,_super),HashLocationStrategy.prototype.onPopState=function(fn){this._platformLocation.onPopState(fn),this._platformLocation.onHashChange(fn)},HashLocationStrategy.prototype.getBaseHref=function(){return this._baseHref},HashLocationStrategy.prototype.path=function(includeHash){void 0===includeHash&&(includeHash=!1);var path=this._platformLocation.hash;return null==path&&(path="#"),path.length>0?path.substring(1):path},HashLocationStrategy.prototype.prepareExternalUrl=function(internal){var url=Location.joinWithSlash(this._baseHref,internal);return url.length>0?"#"+url:url},HashLocationStrategy.prototype.pushState=function(state,title,path,queryParams){var url=this.prepareExternalUrl(path+Location.normalizeQueryParams(queryParams));0==url.length&&(url=this._platformLocation.pathname),this._platformLocation.pushState(state,title,url)},HashLocationStrategy.prototype.replaceState=function(state,title,path,queryParams){var url=this.prepareExternalUrl(path+Location.normalizeQueryParams(queryParams));0==url.length&&(url=this._platformLocation.pathname),this._platformLocation.replaceState(state,title,url)},HashLocationStrategy.prototype.forward=function(){this._platformLocation.forward()},HashLocationStrategy.prototype.back=function(){this._platformLocation.back()},HashLocationStrategy}(LocationStrategy);HashLocationStrategy.decorators=[{type:_angular_core.Injectable}],HashLocationStrategy.ctorParameters=function(){return[{type:PlatformLocation},{type:void 0,decorators:[{type:_angular_core.Optional},{type:_angular_core.Inject,args:[APP_BASE_HREF]}]}]};var PathLocationStrategy=function(_super){function PathLocationStrategy(_platformLocation,href){var _this=_super.call(this)||this;if(_this._platformLocation=_platformLocation,null==href&&(href=_this._platformLocation.getBaseHrefFromDOM()),null==href)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");return _this._baseHref=href,_this}return __extends(PathLocationStrategy,_super),PathLocationStrategy.prototype.onPopState=function(fn){this._platformLocation.onPopState(fn),this._platformLocation.onHashChange(fn)},PathLocationStrategy.prototype.getBaseHref=function(){return this._baseHref},PathLocationStrategy.prototype.prepareExternalUrl=function(internal){return Location.joinWithSlash(this._baseHref,internal)},PathLocationStrategy.prototype.path=function(includeHash){void 0===includeHash&&(includeHash=!1);var pathname=this._platformLocation.pathname+Location.normalizeQueryParams(this._platformLocation.search),hash=this._platformLocation.hash;return hash&&includeHash?""+pathname+hash:pathname},PathLocationStrategy.prototype.pushState=function(state,title,url,queryParams){var externalUrl=this.prepareExternalUrl(url+Location.normalizeQueryParams(queryParams));this._platformLocation.pushState(state,title,externalUrl)},PathLocationStrategy.prototype.replaceState=function(state,title,url,queryParams){var externalUrl=this.prepareExternalUrl(url+Location.normalizeQueryParams(queryParams));this._platformLocation.replaceState(state,title,externalUrl)},PathLocationStrategy.prototype.forward=function(){this._platformLocation.forward()},PathLocationStrategy.prototype.back=function(){this._platformLocation.back()},PathLocationStrategy}(LocationStrategy);PathLocationStrategy.decorators=[{type:_angular_core.Injectable}],PathLocationStrategy.ctorParameters=function(){return[{type:PlatformLocation},{type:void 0,decorators:[{type:_angular_core.Optional},{type:_angular_core.Inject,args:[APP_BASE_HREF]}]}]};var NgLocalization=function(){function NgLocalization(){}return NgLocalization.prototype.getPluralCategory=function(value){},NgLocalization}(),NgLocaleLocalization=function(_super){function NgLocaleLocalization(locale){var _this=_super.call(this)||this;return _this.locale=locale,_this}return __extends(NgLocaleLocalization,_super),NgLocaleLocalization.prototype.getPluralCategory=function(value){switch(getPluralCase(this.locale,value)){case Plural.Zero:return"zero";case Plural.One:return"one";case Plural.Two:return"two";case Plural.Few:return"few";case Plural.Many:return"many";default:return"other"}},NgLocaleLocalization}(NgLocalization);NgLocaleLocalization.decorators=[{type:_angular_core.Injectable}],NgLocaleLocalization.ctorParameters=function(){return[{type:void 0,decorators:[{type:_angular_core.Inject,args:[_angular_core.LOCALE_ID]}]}]};var Plural={};Plural.Zero=0,Plural.One=1,Plural.Two=2,Plural.Few=3,Plural.Many=4,Plural.Other=5,Plural[Plural.Zero]="Zero",Plural[Plural.One]="One",Plural[Plural.Two]="Two",Plural[Plural.Few]="Few",Plural[Plural.Many]="Many",Plural[Plural.Other]="Other";var NgClass=function(){function NgClass(_iterableDiffers,_keyValueDiffers,_ngEl,_renderer){this._iterableDiffers=_iterableDiffers,this._keyValueDiffers=_keyValueDiffers,this._ngEl=_ngEl,this._renderer=_renderer,this._initialClasses=[]}return Object.defineProperty(NgClass.prototype,"klass",{set:function(v){this._applyInitialClasses(!0),this._initialClasses="string"==typeof v?v.split(/\s+/):[],this._applyInitialClasses(!1),this._applyClasses(this._rawClass,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(NgClass.prototype,"ngClass",{set:function(v){this._cleanupClasses(this._rawClass),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof v?v.split(/\s+/):v,this._rawClass&&(_angular_core.ɵisListLikeIterable(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())},enumerable:!0,configurable:!0}),NgClass.prototype.ngDoCheck=function(){if(this._iterableDiffer){var iterableChanges=this._iterableDiffer.diff(this._rawClass);iterableChanges&&this._applyIterableChanges(iterableChanges)}else if(this._keyValueDiffer){var keyValueChanges=this._keyValueDiffer.diff(this._rawClass);keyValueChanges&&this._applyKeyValueChanges(keyValueChanges)}},NgClass.prototype._cleanupClasses=function(rawClassVal){this._applyClasses(rawClassVal,!0),this._applyInitialClasses(!1)},NgClass.prototype._applyKeyValueChanges=function(changes){var _this=this;changes.forEachAddedItem(function(record){return _this._toggleClass(record.key,record.currentValue)}),changes.forEachChangedItem(function(record){return _this._toggleClass(record.key,record.currentValue)}),changes.forEachRemovedItem(function(record){record.previousValue&&_this._toggleClass(record.key,!1)})},NgClass.prototype._applyIterableChanges=function(changes){var _this=this;changes.forEachAddedItem(function(record){if("string"!=typeof record.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+_angular_core.ɵstringify(record.item));_this._toggleClass(record.item,!0)}),changes.forEachRemovedItem(function(record){return _this._toggleClass(record.item,!1)})},NgClass.prototype._applyInitialClasses=function(isCleanup){var _this=this;this._initialClasses.forEach(function(klass){return _this._toggleClass(klass,!isCleanup)})},NgClass.prototype._applyClasses=function(rawClassVal,isCleanup){var _this=this;rawClassVal&&(Array.isArray(rawClassVal)||rawClassVal instanceof Set?rawClassVal.forEach(function(klass){return _this._toggleClass(klass,!isCleanup)}):Object.keys(rawClassVal).forEach(function(klass){null!=rawClassVal[klass]&&_this._toggleClass(klass,!isCleanup)}))},NgClass.prototype._toggleClass=function(klass,enabled){var _this=this;(klass=klass.trim())&&klass.split(/\s+/g).forEach(function(klass){_this._renderer.setElementClass(_this._ngEl.nativeElement,klass,!!enabled)})},NgClass}();NgClass.decorators=[{type:_angular_core.Directive,args:[{selector:"[ngClass]"}]}],NgClass.ctorParameters=function(){return[{type:_angular_core.IterableDiffers},{type:_angular_core.KeyValueDiffers},{type:_angular_core.ElementRef},{type:_angular_core.Renderer}]},NgClass.propDecorators={klass:[{type:_angular_core.Input,args:["class"]}],ngClass:[{type:_angular_core.Input}]};var NgComponentOutlet=function(){function NgComponentOutlet(_viewContainerRef){this._viewContainerRef=_viewContainerRef,this._componentRef=null,this._moduleRef=null}return NgComponentOutlet.prototype.ngOnChanges=function(changes){if(this._viewContainerRef.clear(),this._componentRef=null,this.ngComponentOutlet){var elInjector=this.ngComponentOutletInjector||this._viewContainerRef.parentInjector;if(changes.ngComponentOutletNgModuleFactory)if(this._moduleRef&&this._moduleRef.destroy(),this.ngComponentOutletNgModuleFactory){var parentModule=elInjector.get(_angular_core.NgModuleRef);this._moduleRef=this.ngComponentOutletNgModuleFactory.create(parentModule.injector)}else this._moduleRef=null;var componentFactoryResolver=this._moduleRef?this._moduleRef.componentFactoryResolver:elInjector.get(_angular_core.ComponentFactoryResolver),componentFactory=componentFactoryResolver.resolveComponentFactory(this.ngComponentOutlet);this._componentRef=this._viewContainerRef.createComponent(componentFactory,this._viewContainerRef.length,elInjector,this.ngComponentOutletContent)}},NgComponentOutlet.prototype.ngOnDestroy=function(){this._moduleRef&&this._moduleRef.destroy()},NgComponentOutlet}();NgComponentOutlet.decorators=[{type:_angular_core.Directive,args:[{selector:"[ngComponentOutlet]"}]}],NgComponentOutlet.ctorParameters=function(){return[{type:_angular_core.ViewContainerRef}]},NgComponentOutlet.propDecorators={ngComponentOutlet:[{type:_angular_core.Input}],ngComponentOutletInjector:[{type:_angular_core.Input}],ngComponentOutletContent:[{type:_angular_core.Input}],ngComponentOutletNgModuleFactory:[{type:_angular_core.Input}]};var NgForOfContext=function(){function NgForOfContext($implicit,ngForOf,index,count){this.$implicit=$implicit,this.ngForOf=ngForOf,this.index=index,this.count=count}return Object.defineProperty(NgForOfContext.prototype,"first",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(NgForOfContext.prototype,"last",{get:function(){return this.index===this.count-1},enumerable:!0,configurable:!0}),Object.defineProperty(NgForOfContext.prototype,"even",{get:function(){return this.index%2==0},enumerable:!0,configurable:!0}),Object.defineProperty(NgForOfContext.prototype,"odd",{get:function(){return!this.even},enumerable:!0,configurable:!0}),NgForOfContext}(),NgForOf=function(){function NgForOf(_viewContainer,_template,_differs){this._viewContainer=_viewContainer,this._template=_template,this._differs=_differs,this._differ=null}return Object.defineProperty(NgForOf.prototype,"ngForTrackBy",{get:function(){return this._trackByFn},set:function(fn){_angular_core.isDevMode()&&null!=fn&&"function"!=typeof fn&&console&&console.warn&&console.warn("trackBy must be a function, but received "+JSON.stringify(fn)+". See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information."),this._trackByFn=fn},enumerable:!0,configurable:!0}),Object.defineProperty(NgForOf.prototype,"ngForTemplate",{set:function(value){value&&(this._template=value)},enumerable:!0,configurable:!0}),NgForOf.prototype.ngOnChanges=function(changes){if("ngForOf"in changes){var value=changes.ngForOf.currentValue;if(!this._differ&&value)try{this._differ=this._differs.find(value).create(this.ngForTrackBy)}catch(e){throw new Error("Cannot find a differ supporting object '"+value+"' of type '"+getTypeNameForDebugging(value)+"'. NgFor only supports binding to Iterables such as Arrays.")}}},NgForOf.prototype.ngDoCheck=function(){if(this._differ){var changes=this._differ.diff(this.ngForOf);changes&&this._applyChanges(changes)}},NgForOf.prototype._applyChanges=function(changes){var _this=this,insertTuples=[];changes.forEachOperation(function(item,adjustedPreviousIndex,currentIndex){if(null==item.previousIndex){var view=_this._viewContainer.createEmbeddedView(_this._template,new NgForOfContext(null,_this.ngForOf,-1,-1),currentIndex),tuple=new RecordViewTuple(item,view);insertTuples.push(tuple)}else if(null==currentIndex)_this._viewContainer.remove(adjustedPreviousIndex);else{var view=_this._viewContainer.get(adjustedPreviousIndex);_this._viewContainer.move(view,currentIndex);var tuple=new RecordViewTuple(item,view);insertTuples.push(tuple)}});for(var i=0;i<insertTuples.length;i++)this._perViewChange(insertTuples[i].view,insertTuples[i].record);for(var i=0,ilen=this._viewContainer.length;i<ilen;i++){var viewRef=this._viewContainer.get(i);viewRef.context.index=i,viewRef.context.count=ilen}changes.forEachIdentityChange(function(record){_this._viewContainer.get(record.currentIndex).context.$implicit=record.item})},NgForOf.prototype._perViewChange=function(view,record){view.context.$implicit=record.item},NgForOf}();NgForOf.decorators=[{type:_angular_core.Directive,args:[{selector:"[ngFor][ngForOf]"}]}],NgForOf.ctorParameters=function(){return[{type:_angular_core.ViewContainerRef},{type:_angular_core.TemplateRef},{type:_angular_core.IterableDiffers}]},NgForOf.propDecorators={ngForOf:[{type:_angular_core.Input}],ngForTrackBy:[{type:_angular_core.Input}],ngForTemplate:[{type:_angular_core.Input}]};var RecordViewTuple=function(){function RecordViewTuple(record,view){this.record=record,this.view=view}return RecordViewTuple}(),NgFor=NgForOf,NgIf=function(){function NgIf(_viewContainer,templateRef){this._viewContainer=_viewContainer,this._context=new NgIfContext,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=templateRef}return Object.defineProperty(NgIf.prototype,"ngIf",{set:function(condition){this._context.$implicit=this._context.ngIf=condition,this._updateView()},enumerable:!0,configurable:!0}),Object.defineProperty(NgIf.prototype,"ngIfThen",{set:function(templateRef){this._thenTemplateRef=templateRef,this._thenViewRef=null,this._updateView()},enumerable:!0,configurable:!0}),Object.defineProperty(NgIf.prototype,"ngIfElse",{set:function(templateRef){this._elseTemplateRef=templateRef,this._elseViewRef=null,this._updateView()},enumerable:!0,configurable:!0}),NgIf.prototype._updateView=function(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))},NgIf}();NgIf.decorators=[{type:_angular_core.Directive,args:[{selector:"[ngIf]"}]}],NgIf.ctorParameters=function(){return[{type:_angular_core.ViewContainerRef},{type:_angular_core.TemplateRef}]},NgIf.propDecorators={ngIf:[{type:_angular_core.Input}],ngIfThen:[{type:_angular_core.Input}],ngIfElse:[{type:_angular_core.Input}]};var NgIfContext=function(){function NgIfContext(){this.$implicit=null,this.ngIf=null}return NgIfContext}(),SwitchView=function(){function SwitchView(_viewContainerRef,_templateRef){this._viewContainerRef=_viewContainerRef,this._templateRef=_templateRef,this._created=!1}return SwitchView.prototype.create=function(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)},SwitchView.prototype.destroy=function(){this._created=!1,this._viewContainerRef.clear()},SwitchView.prototype.enforceState=function(created){created&&!this._created?this.create():!created&&this._created&&this.destroy()},SwitchView}(),NgSwitch=function(){function NgSwitch(){this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}return Object.defineProperty(NgSwitch.prototype,"ngSwitch",{set:function(newValue){this._ngSwitch=newValue,0===this._caseCount&&this._updateDefaultCases(!0)},enumerable:!0,configurable:!0}),NgSwitch.prototype._addCase=function(){return this._caseCount++},NgSwitch.prototype._addDefault=function(view){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(view)},NgSwitch.prototype._matchCase=function(value){var matched=value==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||matched,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),matched},NgSwitch.prototype._updateDefaultCases=function(useDefault){if(this._defaultViews&&useDefault!==this._defaultUsed){this._defaultUsed=useDefault;for(var i=0;i<this._defaultViews.length;i++){this._defaultViews[i].enforceState(useDefault)}}},NgSwitch}();NgSwitch.decorators=[{type:_angular_core.Directive,args:[{selector:"[ngSwitch]"}]}],NgSwitch.ctorParameters=function(){return[]},NgSwitch.propDecorators={ngSwitch:[{type:_angular_core.Input}]};var NgSwitchCase=function(){function NgSwitchCase(viewContainer,templateRef,ngSwitch){this.ngSwitch=ngSwitch,ngSwitch._addCase(),this._view=new SwitchView(viewContainer,templateRef)}return NgSwitchCase.prototype.ngDoCheck=function(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))},NgSwitchCase}();NgSwitchCase.decorators=[{type:_angular_core.Directive,args:[{selector:"[ngSwitchCase]"}]}],NgSwitchCase.ctorParameters=function(){return[{type:_angular_core.ViewContainerRef},{type:_angular_core.TemplateRef},{type:NgSwitch,decorators:[{type:_angular_core.Host}]}]},NgSwitchCase.propDecorators={ngSwitchCase:[{type:_angular_core.Input}]};var NgSwitchDefault=function(){function NgSwitchDefault(viewContainer,templateRef,ngSwitch){ngSwitch._addDefault(new SwitchView(viewContainer,templateRef))}return NgSwitchDefault}();NgSwitchDefault.decorators=[{type:_angular_core.Directive,args:[{selector:"[ngSwitchDefault]"}]}],NgSwitchDefault.ctorParameters=function(){return[{type:_angular_core.ViewContainerRef},{type:_angular_core.TemplateRef},{type:NgSwitch,decorators:[{type:_angular_core.Host}]}]};var NgPlural=function(){function NgPlural(_localization){this._localization=_localization,this._caseViews={}}return Object.defineProperty(NgPlural.prototype,"ngPlural",{set:function(value){this._switchValue=value,this._updateView()},enumerable:!0,configurable:!0}),NgPlural.prototype.addCase=function(value,switchView){this._caseViews[value]=switchView},NgPlural.prototype._updateView=function(){this._clearViews();var cases=Object.keys(this._caseViews),key=getPluralCategory(this._switchValue,cases,this._localization);this._activateView(this._caseViews[key])},NgPlural.prototype._clearViews=function(){this._activeView&&this._activeView.destroy()},NgPlural.prototype._activateView=function(view){view&&(this._activeView=view,this._activeView.create())},NgPlural}();NgPlural.decorators=[{type:_angular_core.Directive,args:[{selector:"[ngPlural]"}]}],NgPlural.ctorParameters=function(){return[{type:NgLocalization}]},NgPlural.propDecorators={ngPlural:[{type:_angular_core.Input}]};var NgPluralCase=function(){function NgPluralCase(value,template,viewContainer,ngPlural){this.value=value;var isANumber=!isNaN(Number(value));ngPlural.addCase(isANumber?"="+value:value,new SwitchView(viewContainer,template))}return NgPluralCase}();NgPluralCase.decorators=[{type:_angular_core.Directive,args:[{selector:"[ngPluralCase]"}]}],NgPluralCase.ctorParameters=function(){return[{type:void 0,decorators:[{type:_angular_core.Attribute,args:["ngPluralCase"]}]},{type:_angular_core.TemplateRef},{type:_angular_core.ViewContainerRef},{type:NgPlural,decorators:[{type:_angular_core.Host}]}]};var NgStyle=function(){function NgStyle(_differs,_ngEl,_renderer){this._differs=_differs,this._ngEl=_ngEl,this._renderer=_renderer}return Object.defineProperty(NgStyle.prototype,"ngStyle",{set:function(v){this._ngStyle=v,!this._differ&&v&&(this._differ=this._differs.find(v).create())},enumerable:!0,configurable:!0}),NgStyle.prototype.ngDoCheck=function(){if(this._differ){var changes=this._differ.diff(this._ngStyle);changes&&this._applyChanges(changes)}},NgStyle.prototype._applyChanges=function(changes){var _this=this;changes.forEachRemovedItem(function(record){return _this._setStyle(record.key,null)}),changes.forEachAddedItem(function(record){return _this._setStyle(record.key,record.currentValue)}),changes.forEachChangedItem(function(record){return _this._setStyle(record.key,record.currentValue)})},NgStyle.prototype._setStyle=function(nameAndUnit,value){var _a=nameAndUnit.split("."),name=_a[0],unit=_a[1];value=null!=value&&unit?""+value+unit:value,this._renderer.setElementStyle(this._ngEl.nativeElement,name,value)},NgStyle}();NgStyle.decorators=[{type:_angular_core.Directive,args:[{selector:"[ngStyle]"}]}],NgStyle.ctorParameters=function(){return[{type:_angular_core.KeyValueDiffers},{type:_angular_core.ElementRef},{type:_angular_core.Renderer}]},NgStyle.propDecorators={ngStyle:[{type:_angular_core.Input}]};var NgTemplateOutlet=function(){function NgTemplateOutlet(_viewContainerRef){this._viewContainerRef=_viewContainerRef}return Object.defineProperty(NgTemplateOutlet.prototype,"ngOutletContext",{set:function(context){this.ngTemplateOutletContext=context},enumerable:!0,configurable:!0}),NgTemplateOutlet.prototype.ngOnChanges=function(changes){this._viewRef&&this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._viewRef)),this.ngTemplateOutlet&&(this._viewRef=this._viewContainerRef.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext))},NgTemplateOutlet}();NgTemplateOutlet.decorators=[{type:_angular_core.Directive,args:[{selector:"[ngTemplateOutlet]"}]}],NgTemplateOutlet.ctorParameters=function(){return[{type:_angular_core.ViewContainerRef}]},NgTemplateOutlet.propDecorators={ngTemplateOutletContext:[{type:_angular_core.Input}],ngTemplateOutlet:[{type:_angular_core.Input}],ngOutletContext:[{type:_angular_core.Input}]};var COMMON_DIRECTIVES=[NgClass,NgComponentOutlet,NgForOf,NgIf,NgTemplateOutlet,NgStyle,NgSwitch,NgSwitchCase,NgSwitchDefault,NgPlural,NgPluralCase],ObservableStrategy=function(){function ObservableStrategy(){}return ObservableStrategy.prototype.createSubscription=function(async,updateLatestValue){return async.subscribe({next:updateLatestValue,error:function(e){throw e}})},ObservableStrategy.prototype.dispose=function(subscription){subscription.unsubscribe()},ObservableStrategy.prototype.onDestroy=function(subscription){subscription.unsubscribe()},ObservableStrategy}(),PromiseStrategy=function(){function PromiseStrategy(){}return PromiseStrategy.prototype.createSubscription=function(async,updateLatestValue){return async.then(updateLatestValue,function(e){throw e})},PromiseStrategy.prototype.dispose=function(subscription){},PromiseStrategy.prototype.onDestroy=function(subscription){},PromiseStrategy}(),_promiseStrategy=new PromiseStrategy,_observableStrategy=new ObservableStrategy,AsyncPipe=function(){function AsyncPipe(_ref){this._ref=_ref,this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null,this._strategy=null}return AsyncPipe.prototype.ngOnDestroy=function(){this._subscription&&this._dispose()},AsyncPipe.prototype.transform=function(obj){return this._obj?obj!==this._obj?(this._dispose(),this.transform(obj)):this._latestValue===this._latestReturnedValue?this._latestReturnedValue:(this._latestReturnedValue=this._latestValue,_angular_core.WrappedValue.wrap(this._latestValue)):(obj&&this._subscribe(obj),this._latestReturnedValue=this._latestValue,this._latestValue)},AsyncPipe.prototype._subscribe=function(obj){var _this=this;this._obj=obj,this._strategy=this._selectStrategy(obj),this._subscription=this._strategy.createSubscription(obj,function(value){return _this._updateLatestValue(obj,value)})},AsyncPipe.prototype._selectStrategy=function(obj){if(_angular_core.ɵisPromise(obj))return _promiseStrategy;if(_angular_core.ɵisObservable(obj))return _observableStrategy;throw invalidPipeArgumentError(AsyncPipe,obj)},AsyncPipe.prototype._dispose=function(){this._strategy.dispose(this._subscription),this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null},AsyncPipe.prototype._updateLatestValue=function(async,value){async===this._obj&&(this._latestValue=value,this._ref.markForCheck())},AsyncPipe}();AsyncPipe.decorators=[{type:_angular_core.Pipe,args:[{name:"async",pure:!1}]}],AsyncPipe.ctorParameters=function(){return[{type:_angular_core.ChangeDetectorRef}]};var LowerCasePipe=function(){function LowerCasePipe(){}return LowerCasePipe.prototype.transform=function(value){if(!value)return value;if("string"!=typeof value)throw invalidPipeArgumentError(LowerCasePipe,value);return value.toLowerCase()},LowerCasePipe}();LowerCasePipe.decorators=[{type:_angular_core.Pipe,args:[{name:"lowercase"}]}],LowerCasePipe.ctorParameters=function(){return[]};var TitleCasePipe=function(){function TitleCasePipe(){}return TitleCasePipe.prototype.transform=function(value){if(!value)return value;if("string"!=typeof value)throw invalidPipeArgumentError(TitleCasePipe,value);return value.split(/\b/g).map(function(word){return titleCaseWord(word)}).join("")},TitleCasePipe}();TitleCasePipe.decorators=[{type:_angular_core.Pipe,args:[{name:"titlecase"}]}],TitleCasePipe.ctorParameters=function(){return[]};var UpperCasePipe=function(){function UpperCasePipe(){}return UpperCasePipe.prototype.transform=function(value){if(!value)return value;if("string"!=typeof value)throw invalidPipeArgumentError(UpperCasePipe,value);return value.toUpperCase()},UpperCasePipe}();UpperCasePipe.decorators=[{type:_angular_core.Pipe,args:[{name:"uppercase"}]}],UpperCasePipe.ctorParameters=function(){return[]};var NumberFormatStyle={};NumberFormatStyle.Decimal=0,NumberFormatStyle.Percent=1,NumberFormatStyle.Currency=2,NumberFormatStyle[NumberFormatStyle.Decimal]="Decimal",NumberFormatStyle[NumberFormatStyle.Percent]="Percent",NumberFormatStyle[NumberFormatStyle.Currency]="Currency";var NumberFormatter=function(){function NumberFormatter(){}return NumberFormatter.format=function(num,locale,style,opts){void 0===opts&&(opts={});var minimumIntegerDigits=opts.minimumIntegerDigits,minimumFractionDigits=opts.minimumFractionDigits,maximumFractionDigits=opts.maximumFractionDigits,currency=opts.currency,_a=opts.currencyAsSymbol,currencyAsSymbol=void 0!==_a&&_a,options={minimumIntegerDigits:minimumIntegerDigits,minimumFractionDigits:minimumFractionDigits,maximumFractionDigits:maximumFractionDigits,style:NumberFormatStyle[style].toLowerCase()};return style==NumberFormatStyle.Currency&&(options.currency="string"==typeof currency?currency:void 0,options.currencyDisplay=currencyAsSymbol?"symbol":"code"),new Intl.NumberFormat(locale,options).format(num)},NumberFormatter}(),DATE_FORMATS_SPLIT=/((?:[^yMLdHhmsazZEwGjJ']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|J+|j+|m+|s+|a|z|Z|G+|w+))(.*)/,PATTERN_ALIASES={yMMMdjms:datePartGetterFactory(combine([digitCondition("year",1),nameCondition("month",3),digitCondition("day",1),digitCondition("hour",1),digitCondition("minute",1),digitCondition("second",1)])),yMdjm:datePartGetterFactory(combine([digitCondition("year",1),digitCondition("month",1),digitCondition("day",1),digitCondition("hour",1),digitCondition("minute",1)])),yMMMMEEEEd:datePartGetterFactory(combine([digitCondition("year",1),nameCondition("month",4),nameCondition("weekday",4),digitCondition("day",1)])),yMMMMd:datePartGetterFactory(combine([digitCondition("year",1),nameCondition("month",4),digitCondition("day",1)])),yMMMd:datePartGetterFactory(combine([digitCondition("year",1),nameCondition("month",3),digitCondition("day",1)])),yMd:datePartGetterFactory(combine([digitCondition("year",1),digitCondition("month",1),digitCondition("day",1)])),jms:datePartGetterFactory(combine([digitCondition("hour",1),digitCondition("second",1),digitCondition("minute",1)])),jm:datePartGetterFactory(combine([digitCondition("hour",1),digitCondition("minute",1)]))},DATE_FORMATS={yyyy:datePartGetterFactory(digitCondition("year",4)),yy:datePartGetterFactory(digitCondition("year",2)),y:datePartGetterFactory(digitCondition("year",1)),MMMM:datePartGetterFactory(nameCondition("month",4)),MMM:datePartGetterFactory(nameCondition("month",3)),MM:datePartGetterFactory(digitCondition("month",2)),M:datePartGetterFactory(digitCondition("month",1)),LLLL:datePartGetterFactory(nameCondition("month",4)),L:datePartGetterFactory(nameCondition("month",1)),dd:datePartGetterFactory(digitCondition("day",2)),d:datePartGetterFactory(digitCondition("day",1)),HH:digitModifier(hourExtractor(datePartGetterFactory(hour12Modify(digitCondition("hour",2),!1)))),H:hourExtractor(datePartGetterFactory(hour12Modify(digitCondition("hour",1),!1))),hh:digitModifier(hourExtractor(datePartGetterFactory(hour12Modify(digitCondition("hour",2),!0)))),h:hourExtractor(datePartGetterFactory(hour12Modify(digitCondition("hour",1),!0))),jj:datePartGetterFactory(digitCondition("hour",2)),j:datePartGetterFactory(digitCondition("hour",1)),mm:digitModifier(datePartGetterFactory(digitCondition("minute",2))),m:datePartGetterFactory(digitCondition("minute",1)),ss:digitModifier(datePartGetterFactory(digitCondition("second",2))),s:datePartGetterFactory(digitCondition("second",1)),sss:datePartGetterFactory(digitCondition("second",3)),EEEE:datePartGetterFactory(nameCondition("weekday",4)),EEE:datePartGetterFactory(nameCondition("weekday",3)),EE:datePartGetterFactory(nameCondition("weekday",2)),E:datePartGetterFactory(nameCondition("weekday",1)),a:hourClockExtractor(datePartGetterFactory(hour12Modify(digitCondition("hour",1),!0))),Z:timeZoneGetter("short"),z:timeZoneGetter("long"),ww:datePartGetterFactory({}),w:datePartGetterFactory({}),G:datePartGetterFactory(nameCondition("era",1)),GG:datePartGetterFactory(nameCondition("era",2)),GGG:datePartGetterFactory(nameCondition("era",3)),GGGG:datePartGetterFactory(nameCondition("era",4))},DATE_FORMATTER_CACHE=new Map,DateFormatter=function(){function DateFormatter(){}return DateFormatter.format=function(date,locale,pattern){return dateFormatter(pattern,date,locale)},DateFormatter}(),_NUMBER_FORMAT_REGEXP=/^(\d+)?\.((\d+)(-(\d+))?)?$/,DecimalPipe=function(){function DecimalPipe(_locale){this._locale=_locale}return DecimalPipe.prototype.transform=function(value,digits){return formatNumber(DecimalPipe,this._locale,value,NumberFormatStyle.Decimal,digits)},DecimalPipe}();DecimalPipe.decorators=[{type:_angular_core.Pipe,args:[{name:"number"}]}],DecimalPipe.ctorParameters=function(){return[{type:void 0,decorators:[{type:_angular_core.Inject,args:[_angular_core.LOCALE_ID]}]}]};var PercentPipe=function(){function PercentPipe(_locale){this._locale=_locale}return PercentPipe.prototype.transform=function(value,digits){return formatNumber(PercentPipe,this._locale,value,NumberFormatStyle.Percent,digits)},PercentPipe}();PercentPipe.decorators=[{type:_angular_core.Pipe,args:[{name:"percent"}]}],PercentPipe.ctorParameters=function(){return[{type:void 0,decorators:[{type:_angular_core.Inject,args:[_angular_core.LOCALE_ID]}]}]};var CurrencyPipe=function(){function CurrencyPipe(_locale){this._locale=_locale}return CurrencyPipe.prototype.transform=function(value,currencyCode,symbolDisplay,digits){return void 0===currencyCode&&(currencyCode="USD"),void 0===symbolDisplay&&(symbolDisplay=!1),formatNumber(CurrencyPipe,this._locale,value,NumberFormatStyle.Currency,digits,currencyCode,symbolDisplay)},CurrencyPipe}();CurrencyPipe.decorators=[{type:_angular_core.Pipe,args:[{name:"currency"}]}],CurrencyPipe.ctorParameters=function(){return[{type:void 0,decorators:[{type:_angular_core.Inject,args:[_angular_core.LOCALE_ID]}]}]};var ISO8601_DATE_REGEX=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,DatePipe=function(){function DatePipe(_locale){this._locale=_locale}return DatePipe.prototype.transform=function(value,pattern){void 0===pattern&&(pattern="mediumDate");var date;if(isBlank(value)||value!==value)return null;if("string"==typeof value&&(value=value.trim()),isDate(value))date=value;else if(isNumeric(value))date=new Date(parseFloat(value));else if("string"==typeof value&&/^(\d{4}-\d{1,2}-\d{1,2})$/.test(value)){var _a=value.split("-").map(function(val){return parseInt(val,10)}),y=_a[0],m=_a[1],d=_a[2];date=new Date(y,m-1,d)}else date=new Date(value);if(!isDate(date)){var match=void 0;if("string"!=typeof value||!(match=value.match(ISO8601_DATE_REGEX)))throw invalidPipeArgumentError(DatePipe,value);date=isoStringToDate(match)}return DateFormatter.format(date,this._locale,DatePipe._ALIASES[pattern]||pattern)},DatePipe}();DatePipe._ALIASES={medium:"yMMMdjms",short:"yMdjm",fullDate:"yMMMMEEEEd",longDate:"yMMMMd",mediumDate:"yMMMd",shortDate:"yMd",mediumTime:"jms",shortTime:"jm"},DatePipe.decorators=[{type:_angular_core.Pipe,args:[{name:"date",pure:!0}]}],DatePipe.ctorParameters=function(){return[{type:void 0,decorators:[{type:_angular_core.Inject,args:[_angular_core.LOCALE_ID]}]}]};var _INTERPOLATION_REGEXP=/#/g,I18nPluralPipe=function(){function I18nPluralPipe(_localization){this._localization=_localization}return I18nPluralPipe.prototype.transform=function(value,pluralMap){if(null==value)return"";if("object"!=typeof pluralMap||null===pluralMap)throw invalidPipeArgumentError(I18nPluralPipe,pluralMap);return pluralMap[getPluralCategory(value,Object.keys(pluralMap),this._localization)].replace(_INTERPOLATION_REGEXP,value.toString())},I18nPluralPipe}();I18nPluralPipe.decorators=[{type:_angular_core.Pipe,args:[{name:"i18nPlural",pure:!0}]}],I18nPluralPipe.ctorParameters=function(){return[{type:NgLocalization}]};var I18nSelectPipe=function(){function I18nSelectPipe(){}return I18nSelectPipe.prototype.transform=function(value,mapping){if(null==value)return"";if("object"!=typeof mapping||"string"!=typeof value)throw invalidPipeArgumentError(I18nSelectPipe,mapping);return mapping.hasOwnProperty(value)?mapping[value]:mapping.hasOwnProperty("other")?mapping.other:""},I18nSelectPipe}();I18nSelectPipe.decorators=[{type:_angular_core.Pipe,args:[{name:"i18nSelect",pure:!0}]}],I18nSelectPipe.ctorParameters=function(){return[]};var JsonPipe=function(){function JsonPipe(){}return JsonPipe.prototype.transform=function(value){return JSON.stringify(value,null,2)},JsonPipe}();JsonPipe.decorators=[{type:_angular_core.Pipe,args:[{name:"json",pure:!1}]}],JsonPipe.ctorParameters=function(){return[]};var SlicePipe=function(){function SlicePipe(){}return SlicePipe.prototype.transform=function(value,start,end){if(null==value)return value;if(!this.supports(value))throw invalidPipeArgumentError(SlicePipe,value);return value.slice(start,end)},SlicePipe.prototype.supports=function(obj){return"string"==typeof obj||Array.isArray(obj)},SlicePipe}();SlicePipe.decorators=[{type:_angular_core.Pipe,args:[{name:"slice",pure:!1}]}],SlicePipe.ctorParameters=function(){return[]};var COMMON_PIPES=[AsyncPipe,UpperCasePipe,LowerCasePipe,JsonPipe,SlicePipe,DecimalPipe,PercentPipe,TitleCasePipe,CurrencyPipe,DatePipe,I18nPluralPipe,I18nSelectPipe],CommonModule=function(){function CommonModule(){}return CommonModule}();CommonModule.decorators=[{type:_angular_core.NgModule,args:[{declarations:[COMMON_DIRECTIVES,COMMON_PIPES],exports:[COMMON_DIRECTIVES,COMMON_PIPES],providers:[{provide:NgLocalization,useClass:NgLocaleLocalization}]}]}],CommonModule.ctorParameters=function(){return[]};var DOCUMENT=new _angular_core.InjectionToken("DocumentToken"),PLATFORM_BROWSER_ID="browser",PLATFORM_SERVER_ID="server",PLATFORM_WORKER_APP_ID="browserWorkerApp",PLATFORM_WORKER_UI_ID="browserWorkerUi",VERSION=new _angular_core.Version("4.2.6");exports.NgLocaleLocalization=NgLocaleLocalization,exports.NgLocalization=NgLocalization,exports.CommonModule=CommonModule,exports.NgClass=NgClass,exports.NgFor=NgFor,exports.NgForOf=NgForOf,exports.NgForOfContext=NgForOfContext,exports.NgIf=NgIf,exports.NgIfContext=NgIfContext,exports.NgPlural=NgPlural,exports.NgPluralCase=NgPluralCase,exports.NgStyle=NgStyle,exports.NgSwitch=NgSwitch,exports.NgSwitchCase=NgSwitchCase,exports.NgSwitchDefault=NgSwitchDefault,exports.NgTemplateOutlet=NgTemplateOutlet,exports.NgComponentOutlet=NgComponentOutlet,exports.DOCUMENT=DOCUMENT,exports.AsyncPipe=AsyncPipe,exports.DatePipe=DatePipe,exports.I18nPluralPipe=I18nPluralPipe,exports.I18nSelectPipe=I18nSelectPipe,exports.JsonPipe=JsonPipe,exports.LowerCasePipe=LowerCasePipe,exports.CurrencyPipe=CurrencyPipe,exports.DecimalPipe=DecimalPipe,exports.PercentPipe=PercentPipe,exports.SlicePipe=SlicePipe,exports.UpperCasePipe=UpperCasePipe,exports.TitleCasePipe=TitleCasePipe,exports.ɵPLATFORM_BROWSER_ID=PLATFORM_BROWSER_ID,exports.ɵPLATFORM_SERVER_ID=PLATFORM_SERVER_ID,exports.ɵPLATFORM_WORKER_APP_ID=PLATFORM_WORKER_APP_ID,exports.ɵPLATFORM_WORKER_UI_ID=PLATFORM_WORKER_UI_ID,exports.isPlatformBrowser=isPlatformBrowser,exports.isPlatformServer=isPlatformServer,exports.isPlatformWorkerApp=isPlatformWorkerApp,exports.isPlatformWorkerUi=isPlatformWorkerUi,exports.VERSION=VERSION,exports.PlatformLocation=PlatformLocation,exports.LOCATION_INITIALIZED=LOCATION_INITIALIZED,exports.LocationStrategy=LocationStrategy,exports.APP_BASE_HREF=APP_BASE_HREF,exports.HashLocationStrategy=HashLocationStrategy,exports.PathLocationStrategy=PathLocationStrategy,exports.Location=Location,exports.ɵa=COMMON_DIRECTIVES,exports.ɵb=COMMON_PIPES,Object.defineProperty(exports,"__esModule",{value:!0})}),$__System.registerDynamic("10",["11"],!0,function($__require,exports,module){"use strict";var __extends=(this||self,exports&&exports.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),Observable_1=$__require("11"),ScalarObservable=function(_super){function ScalarObservable(value,scheduler){_super.call(this),this.value=value,this.scheduler=scheduler,this._isScalar=!0,scheduler&&(this._isScalar=!1)}return __extends(ScalarObservable,_super),ScalarObservable.create=function(value,scheduler){return new ScalarObservable(value,scheduler)},ScalarObservable.dispatch=function(state){var done=state.done,value=state.value,subscriber=state.subscriber;if(done)return void subscriber.complete();subscriber.next(value),subscriber.closed||(state.done=!0,this.schedule(state))},ScalarObservable.prototype._subscribe=function(subscriber){var value=this.value,scheduler=this.scheduler;if(scheduler)return scheduler.schedule(ScalarObservable.dispatch,0,{done:!1,value:value,subscriber:subscriber});subscriber.next(value),subscriber.closed||subscriber.complete()},ScalarObservable}(Observable_1.Observable);exports.ScalarObservable=ScalarObservable}),$__System.registerDynamic("12",["11"],!0,function($__require,exports,module){"use strict";var __extends=(this||self,exports&&exports.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),Observable_1=$__require("11"),EmptyObservable=function(_super){function EmptyObservable(scheduler){_super.call(this),this.scheduler=scheduler}return __extends(EmptyObservable,_super),EmptyObservable.create=function(scheduler){return new EmptyObservable(scheduler)},EmptyObservable.dispatch=function(arg){arg.subscriber.complete()},EmptyObservable.prototype._subscribe=function(subscriber){var scheduler=this.scheduler;if(scheduler)return scheduler.schedule(EmptyObservable.dispatch,0,{subscriber:subscriber});subscriber.complete()},EmptyObservable}(Observable_1.Observable);exports.EmptyObservable=EmptyObservable}),$__System.registerDynamic("13",["11","10","12","14"],!0,function($__require,exports,module){"use strict";var __extends=(this||self,exports&&exports.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),Observable_1=$__require("11"),ScalarObservable_1=$__require("10"),EmptyObservable_1=$__require("12"),isScheduler_1=$__require("14"),ArrayObservable=function(_super){function ArrayObservable(array,scheduler){_super.call(this),this.array=array,this.scheduler=scheduler,scheduler||1!==array.length||(this._isScalar=!0,this.value=array[0])}return __extends(ArrayObservable,_super),ArrayObservable.create=function(array,scheduler){return new ArrayObservable(array,scheduler)},ArrayObservable.of=function(){for(var array=[],_i=0;_i<arguments.length;_i++)array[_i-0]=arguments[_i];var scheduler=array[array.length-1];isScheduler_1.isScheduler(scheduler)?array.pop():scheduler=null;var len=array.length;return len>1?new ArrayObservable(array,scheduler):1===len?new ScalarObservable_1.ScalarObservable(array[0],scheduler):new EmptyObservable_1.EmptyObservable(scheduler)},ArrayObservable.dispatch=function(state){var array=state.array,index=state.index,count=state.count,subscriber=state.subscriber;if(index>=count)return void subscriber.complete();subscriber.next(array[index]),subscriber.closed||(state.index=index+1,this.schedule(state))},ArrayObservable.prototype._subscribe=function(subscriber){var array=this.array,count=array.length,scheduler=this.scheduler;if(scheduler)return scheduler.schedule(ArrayObservable.dispatch,0,{array:array,index:0,count:count,subscriber:subscriber});for(var i=0;i<count&&!subscriber.closed;i++)subscriber.next(array[i]);subscriber.complete()},ArrayObservable}(Observable_1.Observable);exports.ArrayObservable=ArrayObservable}),$__System.registerDynamic("15",["16"],!0,function($__require,exports,module){"use strict";var __extends=(this||self,exports&&exports.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),Subscriber_1=$__require("16"),OuterSubscriber=function(_super){function OuterSubscriber(){_super.apply(this,arguments)}return __extends(OuterSubscriber,_super),OuterSubscriber.prototype.notifyNext=function(outerValue,innerValue,outerIndex,innerIndex,innerSub){this.destination.next(innerValue)},OuterSubscriber.prototype.notifyError=function(error,innerSub){this.destination.error(error)},OuterSubscriber.prototype.notifyComplete=function(innerSub){this.destination.complete()},OuterSubscriber}(Subscriber_1.Subscriber);exports.OuterSubscriber=OuterSubscriber}),$__System.registerDynamic("17",[],!0,function($__require,exports,module){"use strict";this||self;exports.isArrayLike=function(x){return x&&"number"==typeof x.length}}),$__System.registerDynamic("18",[],!0,function($__require,exports,module){"use strict";function isPromise(value){return value&&"function"!=typeof value.subscribe&&"function"==typeof value.then}this||self;exports.isPromise=isPromise}),$__System.registerDynamic("19",["1a"],!0,function($__require,exports,module){"use strict";function symbolIteratorPonyfill(root){var Symbol=root.Symbol;if("function"==typeof Symbol)return Symbol.iterator||(Symbol.iterator=Symbol("iterator polyfill")),Symbol.iterator;var Set_1=root.Set;if(Set_1&&"function"==typeof(new Set_1)["@@iterator"])return"@@iterator";var Map_1=root.Map;if(Map_1)for(var keys=Object.getOwnPropertyNames(Map_1.prototype),i=0;i<keys.length;++i){var key=keys[i];if("entries"!==key&&"size"!==key&&Map_1.prototype[key]===Map_1.prototype.entries)return key}return"@@iterator"}var root_1=(this||self,$__require("1a"));exports.symbolIteratorPonyfill=symbolIteratorPonyfill,exports.iterator=symbolIteratorPonyfill(root_1.root),exports.$$iterator=exports.iterator}),$__System.registerDynamic("1b",["16"],!0,function($__require,exports,module){"use strict";var __extends=(this||self,exports&&exports.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),Subscriber_1=$__require("16"),InnerSubscriber=function(_super){function InnerSubscriber(parent,outerValue,outerIndex){_super.call(this),this.parent=parent,this.outerValue=outerValue,this.outerIndex=outerIndex,this.index=0}return __extends(InnerSubscriber,_super),InnerSubscriber.prototype._next=function(value){this.parent.notifyNext(this.outerValue,value,this.outerIndex,this.index++,this)},InnerSubscriber.prototype._error=function(error){this.parent.notifyError(error,this),this.unsubscribe()},InnerSubscriber.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},InnerSubscriber}(Subscriber_1.Subscriber);exports.InnerSubscriber=InnerSubscriber}),$__System.registerDynamic("1c",["1a","17","18","1d","11","19","1b","1e"],!0,function($__require,exports,module){"use strict";function subscribeToResult(outerSubscriber,result,outerValue,outerIndex){var destination=new InnerSubscriber_1.InnerSubscriber(outerSubscriber,outerValue,outerIndex);if(destination.closed)return null;if(result instanceof Observable_1.Observable)return result._isScalar?(destination.next(result.value),destination.complete(),null):result.subscribe(destination);if(isArrayLike_1.isArrayLike(result)){for(var i=0,len=result.length;i<len&&!destination.closed;i++)destination.next(result[i]);destination.closed||destination.complete()}else{if(isPromise_1.isPromise(result))return result.then(function(value){destination.closed||(destination.next(value),destination.complete())},function(err){return destination.error(err)}).then(null,function(err){root_1.root.setTimeout(function(){throw err})}),destination;if(result&&"function"==typeof result[iterator_1.iterator])for(var iterator=result[iterator_1.iterator]();;){var item=iterator.next();if(item.done){destination.complete();break}if(destination.next(item.value),destination.closed)break}else if(result&&"function"==typeof result[observable_1.observable]){var obs=result[observable_1.observable]();if("function"==typeof obs.subscribe)return obs.subscribe(new InnerSubscriber_1.InnerSubscriber(outerSubscriber,outerValue,outerIndex));destination.error(new TypeError("Provided object does not correctly implement Symbol.observable"))}else{var value=isObject_1.isObject(result)?"an invalid object":"'"+result+"'",msg="You provided "+value+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.";destination.error(new TypeError(msg))}}return null}var root_1=(this||self,$__require("1a")),isArrayLike_1=$__require("17"),isPromise_1=$__require("18"),isObject_1=$__require("1d"),Observable_1=$__require("11"),iterator_1=$__require("19"),InnerSubscriber_1=$__require("1b"),observable_1=$__require("1e");exports.subscribeToResult=subscribeToResult}),$__System.registerDynamic("1f",["15","1c"],!0,function($__require,exports,module){"use strict";function mergeAll(concurrent){return void 0===concurrent&&(concurrent=Number.POSITIVE_INFINITY),this.lift(new MergeAllOperator(concurrent))}var __extends=(this||self,exports&&exports.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),OuterSubscriber_1=$__require("15"),subscribeToResult_1=$__require("1c");exports.mergeAll=mergeAll;var MergeAllOperator=function(){function MergeAllOperator(concurrent){this.concurrent=concurrent}return MergeAllOperator.prototype.call=function(observer,source){return source.subscribe(new MergeAllSubscriber(observer,this.concurrent))},MergeAllOperator}();exports.MergeAllOperator=MergeAllOperator;var MergeAllSubscriber=function(_super){function MergeAllSubscriber(destination,concurrent){_super.call(this,destination),this.concurrent=concurrent,this.hasCompleted=!1,this.buffer=[],this.active=0}return __extends(MergeAllSubscriber,_super),MergeAllSubscriber.prototype._next=function(observable){this.active<this.concurrent?(this.active++,this.add(subscribeToResult_1.subscribeToResult(this,observable))):this.buffer.push(observable)},MergeAllSubscriber.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},MergeAllSubscriber.prototype.notifyComplete=function(innerSub){var buffer=this.buffer;this.remove(innerSub),this.active--,buffer.length>0?this._next(buffer.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},MergeAllSubscriber}(OuterSubscriber_1.OuterSubscriber);exports.MergeAllSubscriber=MergeAllSubscriber}),$__System.registerDynamic("14",[],!0,function($__require,exports,module){"use strict";function isScheduler(value){return value&&"function"==typeof value.schedule}this||self;exports.isScheduler=isScheduler}),$__System.registerDynamic("20",["11","13","1f","14"],!0,function($__require,exports,module){"use strict";function merge(){for(var observables=[],_i=0;_i<arguments.length;_i++)observables[_i-0]=arguments[_i];return this.lift.call(mergeStatic.apply(void 0,[this].concat(observables)))}function mergeStatic(){for(var observables=[],_i=0;_i<arguments.length;_i++)observables[_i-0]=arguments[_i];var concurrent=Number.POSITIVE_INFINITY,scheduler=null,last=observables[observables.length-1];return isScheduler_1.isScheduler(last)?(scheduler=observables.pop(),observables.length>1&&"number"==typeof observables[observables.length-1]&&(concurrent=observables.pop())):"number"==typeof last&&(concurrent=observables.pop()),null===scheduler&&1===observables.length&&observables[0]instanceof Observable_1.Observable?observables[0]:new ArrayObservable_1.ArrayObservable(observables,scheduler).lift(new mergeAll_1.MergeAllOperator(concurrent))}var Observable_1=(this||self,$__require("11")),ArrayObservable_1=$__require("13"),mergeAll_1=$__require("1f"),isScheduler_1=$__require("14");exports.merge=merge,exports.mergeStatic=mergeStatic}),$__System.registerDynamic("21",["20"],!0,function($__require,exports,module){"use strict";var merge_1=(this||self,$__require("20"));exports.merge=merge_1.mergeStatic}),$__System.registerDynamic("22",["23","11","16","24"],!0,function($__require,exports,module){"use strict";var __extends=(this||self,exports&&exports.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),Subject_1=$__require("23"),Observable_1=$__require("11"),Subscriber_1=$__require("16"),Subscription_1=$__require("24"),ConnectableObservable=function(_super){function ConnectableObservable(source,subjectFactory){_super.call(this),this.source=source,this.subjectFactory=subjectFactory,this._refCount=0,this._isComplete=!1}return __extends(ConnectableObservable,_super),ConnectableObservable.prototype._subscribe=function(subscriber){return this.getSubject().subscribe(subscriber)},ConnectableObservable.prototype.getSubject=function(){var subject=this._subject;return subject&&!subject.isStopped||(this._subject=this.subjectFactory()),this._subject},ConnectableObservable.prototype.connect=function(){var connection=this._connection;return connection||(this._isComplete=!1,connection=this._connection=new Subscription_1.Subscription,connection.add(this.source.subscribe(new ConnectableSubscriber(this.getSubject(),this))),connection.closed?(this._connection=null,connection=Subscription_1.Subscription.EMPTY):this._connection=connection),connection},ConnectableObservable.prototype.refCount=function(){return this.lift(new RefCountOperator(this))},ConnectableObservable}(Observable_1.Observable);exports.ConnectableObservable=ConnectableObservable;var connectableProto=ConnectableObservable.prototype;exports.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:connectableProto._subscribe},_isComplete:{value:connectableProto._isComplete,writable:!0},getSubject:{value:connectableProto.getSubject},connect:{value:connectableProto.connect},refCount:{value:connectableProto.refCount}};var ConnectableSubscriber=function(_super){function ConnectableSubscriber(destination,connectable){_super.call(this,destination),this.connectable=connectable}return __extends(ConnectableSubscriber,_super),ConnectableSubscriber.prototype._error=function(err){this._unsubscribe(),_super.prototype._error.call(this,err)},ConnectableSubscriber.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),_super.prototype._complete.call(this)},ConnectableSubscriber.prototype._unsubscribe=function(){var connectable=this.connectable;if(connectable){this.connectable=null;var connection=connectable._connection;connectable._refCount=0,connectable._subject=null,connectable._connection=null,connection&&connection.unsubscribe()}},ConnectableSubscriber}(Subject_1.SubjectSubscriber),RefCountOperator=function(){function RefCountOperator(connectable){this.connectable=connectable}return RefCountOperator.prototype.call=function(subscriber,source){var connectable=this.connectable;connectable._refCount++;var refCounter=new RefCountSubscriber(subscriber,connectable),subscription=source.subscribe(refCounter);return refCounter.closed||(refCounter.connection=connectable.connect()),subscription},RefCountOperator}(),RefCountSubscriber=function(_super){function RefCountSubscriber(destination,connectable){_super.call(this,destination),this.connectable=connectable}return __extends(RefCountSubscriber,_super),RefCountSubscriber.prototype._unsubscribe=function(){var connectable=this.connectable;if(!connectable)return void(this.connection=null);this.connectable=null;var refCount=connectable._refCount;if(refCount<=0)return void(this.connection=null);if(connectable._refCount=refCount-1,refCount>1)return void(this.connection=null);var connection=this.connection,sharedConnection=connectable._connection;this.connection=null,!sharedConnection||connection&&sharedConnection!==connection||sharedConnection.unsubscribe()},RefCountSubscriber}(Subscriber_1.Subscriber)}),$__System.registerDynamic("25",["22"],!0,function($__require,exports,module){"use strict";function multicast(subjectOrSubjectFactory,selector){var subjectFactory;if(subjectFactory="function"==typeof subjectOrSubjectFactory?subjectOrSubjectFactory:function(){return subjectOrSubjectFactory},"function"==typeof selector)return this.lift(new MulticastOperator(subjectFactory,selector));var connectable=Object.create(this,ConnectableObservable_1.connectableObservableDescriptor);return connectable.source=this,connectable.subjectFactory=subjectFactory,connectable}var ConnectableObservable_1=(this||self,$__require("22"));exports.multicast=multicast;var MulticastOperator=function(){function MulticastOperator(subjectFactory,selector){this.subjectFactory=subjectFactory,this.selector=selector}return MulticastOperator.prototype.call=function(subscriber,source){var selector=this.selector,subject=this.subjectFactory(),subscription=selector(subject).subscribe(subscriber);return subscription.add(source.subscribe(subject)),subscription},MulticastOperator}();exports.MulticastOperator=MulticastOperator}),$__System.registerDynamic("26",["25","23"],!0,function($__require,exports,module){"use strict";function shareSubjectFactory(){return new Subject_1.Subject}function share(){return multicast_1.multicast.call(this,shareSubjectFactory).refCount()}var multicast_1=(this||self,$__require("25")),Subject_1=$__require("23");exports.share=share}),$__System.registerDynamic("27",["16","28","29"],!0,function($__require,exports,module){"use strict";function toSubscriber(nextOrObserver,error,complete){if(nextOrObserver){if(nextOrObserver instanceof Subscriber_1.Subscriber)return nextOrObserver;if(nextOrObserver[rxSubscriber_1.rxSubscriber])return nextOrObserver[rxSubscriber_1.rxSubscriber]()}return nextOrObserver||error||complete?new Subscriber_1.Subscriber(nextOrObserver,error,complete):new Subscriber_1.Subscriber(Observer_1.empty)}var Subscriber_1=(this||self,$__require("16")),rxSubscriber_1=$__require("28"),Observer_1=$__require("29");exports.toSubscriber=toSubscriber}),$__System.registerDynamic("1e",["1a"],!0,function($__require,exports,module){"use strict";function getSymbolObservable(context){var $$observable,Symbol=context.Symbol;return"function"==typeof Symbol?Symbol.observable?$$observable=Symbol.observable:($$observable=Symbol("observable"),Symbol.observable=$$observable):$$observable="@@observable",$$observable}var root_1=(this||self,$__require("1a"));exports.getSymbolObservable=getSymbolObservable,exports.observable=getSymbolObservable(root_1.root),exports.$$observable=exports.observable}),$__System.registerDynamic("11",["1a","27","1e"],!0,function($__require,exports,module){"use strict";var root_1=(this||self,$__require("1a")),toSubscriber_1=$__require("27"),observable_1=$__require("1e"),Observable=function(){function Observable(subscribe){this._isScalar=!1,subscribe&&(this._subscribe=subscribe)}return Observable.prototype.lift=function(operator){var observable=new Observable;return observable.source=this,observable.operator=operator,observable},Observable.prototype.subscribe=function(observerOrNext,error,complete){var operator=this.operator,sink=toSubscriber_1.toSubscriber(observerOrNext,error,complete);if(operator?operator.call(sink,this.source):sink.add(this.source?this._subscribe(sink):this._trySubscribe(sink)),sink.syncErrorThrowable&&(sink.syncErrorThrowable=!1,sink.syncErrorThrown))throw sink.syncErrorValue;return sink},Observable.prototype._trySubscribe=function(sink){try{return this._subscribe(sink)}catch(err){sink.syncErrorThrown=!0,sink.syncErrorValue=err,sink.error(err)}},Observable.prototype.forEach=function(next,PromiseCtor){var _this=this;if(PromiseCtor||(root_1.root.Rx&&root_1.root.Rx.config&&root_1.root.Rx.config.Promise?PromiseCtor=root_1.root.Rx.config.Promise:root_1.root.Promise&&(PromiseCtor=root_1.root.Promise)),!PromiseCtor)throw new Error("no Promise impl found");return new PromiseCtor(function(resolve,reject){var subscription;subscription=_this.subscribe(function(value){if(subscription)try{next(value)}catch(err){reject(err),subscription.unsubscribe()}else next(value)},reject,resolve)})},Observable.prototype._subscribe=function(subscriber){return this.source.subscribe(subscriber)},Observable.prototype[observable_1.observable]=function(){return this},Observable.create=function(subscribe){return new Observable(subscribe)},Observable}();exports.Observable=Observable}),$__System.registerDynamic("29",[],!0,function($__require,exports,module){"use strict";this||self;exports.empty={closed:!0,next:function(value){},error:function(err){throw err},complete:function(){}}}),$__System.registerDynamic("16",["2a","24","29","28"],!0,function($__require,exports,module){"use strict";var __extends=(this||self,exports&&exports.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),isFunction_1=$__require("2a"),Subscription_1=$__require("24"),Observer_1=$__require("29"),rxSubscriber_1=$__require("28"),Subscriber=function(_super){function Subscriber(destinationOrNext,error,complete){switch(_super.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=Observer_1.empty;break;case 1:if(!destinationOrNext){this.destination=Observer_1.empty;break}if("object"==typeof destinationOrNext){destinationOrNext instanceof Subscriber?(this.destination=destinationOrNext,this.destination.add(this)):(this.syncErrorThrowable=!0,this.destination=new SafeSubscriber(this,destinationOrNext));break}default:this.syncErrorThrowable=!0,this.destination=new SafeSubscriber(this,destinationOrNext,error,complete)}}return __extends(Subscriber,_super),Subscriber.prototype[rxSubscriber_1.rxSubscriber]=function(){return this},Subscriber.create=function(next,error,complete){var subscriber=new Subscriber(next,error,complete);return subscriber.syncErrorThrowable=!1,subscriber},Subscriber.prototype.next=function(value){this.isStopped||this._next(value)},Subscriber.prototype.error=function(err){this.isStopped||(this.isStopped=!0,this._error(err))},Subscriber.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},Subscriber.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,_super.prototype.unsubscribe.call(this))},Subscriber.prototype._next=function(value){this.destination.next(value)},Subscriber.prototype._error=function(err){this.destination.error(err),this.unsubscribe()},Subscriber.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},Subscriber.prototype._unsubscribeAndRecycle=function(){var _a=this,_parent=_a._parent,_parents=_a._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=_parent,this._parents=_parents,this},Subscriber}(Subscription_1.Subscription);exports.Subscriber=Subscriber;var SafeSubscriber=function(_super){function SafeSubscriber(_parentSubscriber,observerOrNext,error,complete){_super.call(this),this._parentSubscriber=_parentSubscriber;var next,context=this;isFunction_1.isFunction(observerOrNext)?next=observerOrNext:observerOrNext&&(next=observerOrNext.next,error=observerOrNext.error,complete=observerOrNext.complete,observerOrNext!==Observer_1.empty&&(context=Object.create(observerOrNext),isFunction_1.isFunction(context.unsubscribe)&&this.add(context.unsubscribe.bind(context)),context.unsubscribe=this.unsubscribe.bind(this))),this._context=context,this._next=next,this._error=error,this._complete=complete}return __extends(SafeSubscriber,_super),SafeSubscriber.prototype.next=function(value){if(!this.isStopped&&this._next){var _parentSubscriber=this._parentSubscriber;_parentSubscriber.syncErrorThrowable?this.__tryOrSetError(_parentSubscriber,this._next,value)&&this.unsubscribe():this.__tryOrUnsub(this._next,value)}},SafeSubscriber.prototype.error=function(err){if(!this.isStopped){var _parentSubscriber=this._parentSubscriber;if(this._error)_parentSubscriber.syncErrorThrowable?(this.__tryOrSetError(_parentSubscriber,this._error,err),this.unsubscribe()):(this.__tryOrUnsub(this._error,err),this.unsubscribe());else{if(!_parentSubscriber.syncErrorThrowable)throw this.unsubscribe(),err;_parentSubscriber.syncErrorValue=err,_parentSubscriber.syncErrorThrown=!0,this.unsubscribe()}}},SafeSubscriber.prototype.complete=function(){var _this=this;if(!this.isStopped){var _parentSubscriber=this._parentSubscriber;if(this._complete){var wrappedComplete=function(){return _this._complete.call(_this._context)};_parentSubscriber.syncErrorThrowable?(this.__tryOrSetError(_parentSubscriber,wrappedComplete),this.unsubscribe()):(this.__tryOrUnsub(wrappedComplete),this.unsubscribe())}else this.unsubscribe()}},SafeSubscriber.prototype.__tryOrUnsub=function(fn,value){try{fn.call(this._context,value)}catch(err){throw this.unsubscribe(),err}},SafeSubscriber.prototype.__tryOrSetError=function(parent,fn,value){try{fn.call(this._context,value)}catch(err){return parent.syncErrorValue=err,parent.syncErrorThrown=!0,!0}return!1},SafeSubscriber.prototype._unsubscribe=function(){var _parentSubscriber=this._parentSubscriber;this._context=null,this._parentSubscriber=null,_parentSubscriber.unsubscribe()},SafeSubscriber}(Subscriber)}),$__System.registerDynamic("2b",[],!0,function($__require,exports,module){"use strict";var __extends=(this||self,exports&&exports.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),ObjectUnsubscribedError=function(_super){function ObjectUnsubscribedError(){var err=_super.call(this,"object unsubscribed");this.name=err.name="ObjectUnsubscribedError",this.stack=err.stack,this.message=err.message}return __extends(ObjectUnsubscribedError,_super),ObjectUnsubscribedError}(Error);exports.ObjectUnsubscribedError=ObjectUnsubscribedError}),$__System.registerDynamic("2c",[],!0,function($__require,exports,module){"use strict";this||self;exports.isArray=Array.isArray||function(x){return x&&"number"==typeof x.length}}),$__System.registerDynamic("1d",[],!0,function($__require,exports,module){"use strict";function isObject(x){return null!=x&&"object"==typeof x}this||self;exports.isObject=isObject}),$__System.registerDynamic("2a",[],!0,function($__require,exports,module){"use strict";function isFunction(x){return"function"==typeof x}this||self;exports.isFunction=isFunction}),$__System.registerDynamic("2d",["2e"],!0,function($__require,exports,module){"use strict";function tryCatcher(){try{return tryCatchTarget.apply(this,arguments)}catch(e){return errorObject_1.errorObject.e=e,errorObject_1.errorObject}}function tryCatch(fn){return tryCatchTarget=fn,tryCatcher}var tryCatchTarget,errorObject_1=(this||self,$__require("2e"));exports.tryCatch=tryCatch}),$__System.registerDynamic("2e",[],!0,function($__require,exports,module){"use strict";this||self;exports.errorObject={e:{}}}),$__System.registerDynamic("2f",[],!0,function($__require,exports,module){"use strict";var __extends=(this||self,exports&&exports.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),UnsubscriptionError=function(_super){function UnsubscriptionError(errors){_super.call(this),this.errors=errors;var err=Error.call(this,errors?errors.length+" errors occurred during unsubscription:\n "+errors.map(function(err,i){return i+1+") "+err.toString()}).join("\n "):"");this.name=err.name="UnsubscriptionError",this.stack=err.stack,this.message=err.message}return __extends(UnsubscriptionError,_super),UnsubscriptionError}(Error);exports.UnsubscriptionError=UnsubscriptionError}),$__System.registerDynamic("24",["2c","1d","2a","2d","2e","2f"],!0,function($__require,exports,module){"use strict";function flattenUnsubscriptionErrors(errors){return errors.reduce(function(errs,err){return errs.concat(err instanceof UnsubscriptionError_1.UnsubscriptionError?err.errors:err)},[])}var isArray_1=(this||self,$__require("2c")),isObject_1=$__require("1d"),isFunction_1=$__require("2a"),tryCatch_1=$__require("2d"),errorObject_1=$__require("2e"),UnsubscriptionError_1=$__require("2f"),Subscription=function(){function Subscription(unsubscribe){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,unsubscribe&&(this._unsubscribe=unsubscribe)}return Subscription.prototype.unsubscribe=function(){var errors,hasErrors=!1;if(!this.closed){var _a=this,_parent=_a._parent,_parents=_a._parents,_unsubscribe=_a._unsubscribe,_subscriptions=_a._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var index=-1,len=_parents?_parents.length:0;_parent;)_parent.remove(this),_parent=++index<len&&_parents[index]||null;if(isFunction_1.isFunction(_unsubscribe)){var trial=tryCatch_1.tryCatch(_unsubscribe).call(this);trial===errorObject_1.errorObject&&(hasErrors=!0,errors=errors||(errorObject_1.errorObject.e instanceof UnsubscriptionError_1.UnsubscriptionError?flattenUnsubscriptionErrors(errorObject_1.errorObject.e.errors):[errorObject_1.errorObject.e]))}if(isArray_1.isArray(_subscriptions))for(index=-1,len=_subscriptions.length;++index<len;){var sub=_subscriptions[index];if(isObject_1.isObject(sub)){var trial=tryCatch_1.tryCatch(sub.unsubscribe).call(sub);if(trial===errorObject_1.errorObject){hasErrors=!0,errors=errors||[];var err=errorObject_1.errorObject.e;err instanceof UnsubscriptionError_1.UnsubscriptionError?errors=errors.concat(flattenUnsubscriptionErrors(err.errors)):errors.push(err)}}}if(hasErrors)throw new UnsubscriptionError_1.UnsubscriptionError(errors)}},Subscription.prototype.add=function(teardown){if(!teardown||teardown===Subscription.EMPTY)return Subscription.EMPTY;if(teardown===this)return this;var subscription=teardown;switch(typeof teardown){case"function":subscription=new Subscription(teardown);case"object":if(subscription.closed||"function"!=typeof subscription.unsubscribe)return subscription;if(this.closed)return subscription.unsubscribe(),subscription;if("function"!=typeof subscription._addParent){var tmp=subscription;subscription=new Subscription,subscription._subscriptions=[tmp]}break;default:throw new Error("unrecognized teardown "+teardown+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(subscription),subscription._addParent(this),subscription},Subscription.prototype.remove=function(subscription){var subscriptions=this._subscriptions;if(subscriptions){var subscriptionIndex=subscriptions.indexOf(subscription);-1!==subscriptionIndex&&subscriptions.splice(subscriptionIndex,1)}},Subscription.prototype._addParent=function(parent){var _a=this,_parent=_a._parent,_parents=_a._parents;_parent&&_parent!==parent?_parents?-1===_parents.indexOf(parent)&&_parents.push(parent):this._parents=[parent]:this._parent=parent},Subscription.EMPTY=function(empty){return empty.closed=!0,empty}(new Subscription),Subscription}();exports.Subscription=Subscription}),$__System.registerDynamic("30",["24"],!0,function($__require,exports,module){"use strict";var __extends=(this||self,exports&&exports.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),Subscription_1=$__require("24"),SubjectSubscription=function(_super){function SubjectSubscription(subject,subscriber){_super.call(this),this.subject=subject,this.subscriber=subscriber,this.closed=!1}return __extends(SubjectSubscription,_super),SubjectSubscription.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var subject=this.subject,observers=subject.observers;if(this.subject=null,observers&&0!==observers.length&&!subject.isStopped&&!subject.closed){var subscriberIndex=observers.indexOf(this.subscriber);-1!==subscriberIndex&&observers.splice(subscriberIndex,1)}}},SubjectSubscription}(Subscription_1.Subscription);exports.SubjectSubscription=SubjectSubscription}),$__System.registerDynamic("1a",[],!0,function($__require,exports,module){"use strict";var global=this||self,__window="undefined"!=typeof window&&window,__self="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,__global=void 0!==global&&global,_root=__window||__global||__self;exports.root=_root,function(){if(!_root)throw new Error("RxJS could not find any global context (window, self, global)")}()}),$__System.registerDynamic("28",["1a"],!0,function($__require,exports,module){"use strict";var root_1=(this||self,$__require("1a")),Symbol=root_1.root.Symbol;exports.rxSubscriber="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("rxSubscriber"):"@@rxSubscriber",exports.$$rxSubscriber=exports.rxSubscriber}),$__System.registerDynamic("23",["11","16","24","2b","30","28"],!0,function($__require,exports,module){"use strict";var __extends=(this||self,exports&&exports.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),Observable_1=$__require("11"),Subscriber_1=$__require("16"),Subscription_1=$__require("24"),ObjectUnsubscribedError_1=$__require("2b"),SubjectSubscription_1=$__require("30"),rxSubscriber_1=$__require("28"),SubjectSubscriber=function(_super){function SubjectSubscriber(destination){_super.call(this,destination),this.destination=destination}return __extends(SubjectSubscriber,_super),SubjectSubscriber}(Subscriber_1.Subscriber);exports.SubjectSubscriber=SubjectSubscriber;var Subject=function(_super){function Subject(){_super.call(this),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}return __extends(Subject,_super),Subject.prototype[rxSubscriber_1.rxSubscriber]=function(){return new SubjectSubscriber(this)},Subject.prototype.lift=function(operator){var subject=new AnonymousSubject(this,this);return subject.operator=operator,subject},Subject.prototype.next=function(value){if(this.closed)throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError;if(!this.isStopped)for(var observers=this.observers,len=observers.length,copy=observers.slice(),i=0;i<len;i++)copy[i].next(value)},Subject.prototype.error=function(err){if(this.closed)throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=err,this.isStopped=!0;for(var observers=this.observers,len=observers.length,copy=observers.slice(),i=0;i<len;i++)copy[i].error(err);this.observers.length=0},Subject.prototype.complete=function(){if(this.closed)throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError;this.isStopped=!0;for(var observers=this.observers,len=observers.length,copy=observers.slice(),i=0;i<len;i++)copy[i].complete();this.observers.length=0},Subject.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},Subject.prototype._trySubscribe=function(subscriber){if(this.closed)throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError;return _super.prototype._trySubscribe.call(this,subscriber)},Subject.prototype._subscribe=function(subscriber){if(this.closed)throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError;return this.hasError?(subscriber.error(this.thrownError),Subscription_1.Subscription.EMPTY):this.isStopped?(subscriber.complete(),Subscription_1.Subscription.EMPTY):(this.observers.push(subscriber),new SubjectSubscription_1.SubjectSubscription(this,subscriber))},Subject.prototype.asObservable=function(){var observable=new Observable_1.Observable;return observable.source=this,observable},Subject.create=function(destination,source){return new AnonymousSubject(destination,source)},Subject}(Observable_1.Observable);exports.Subject=Subject;var AnonymousSubject=function(_super){function AnonymousSubject(destination,source){_super.call(this),this.destination=destination,this.source=source}return __extends(AnonymousSubject,_super),AnonymousSubject.prototype.next=function(value){var destination=this.destination;destination&&destination.next&&destination.next(value)},AnonymousSubject.prototype.error=function(err){var destination=this.destination;destination&&destination.error&&this.destination.error(err)},AnonymousSubject.prototype.complete=function(){var destination=this.destination;destination&&destination.complete&&this.destination.complete()},AnonymousSubject.prototype._subscribe=function(subscriber){return this.source?this.source.subscribe(subscriber):Subscription_1.Subscription.EMPTY},AnonymousSubject}(Subject);exports.AnonymousSubject=AnonymousSubject}),function(global,factory){"object"==typeof exports&&void 0!==module?factory(exports,require("rxjs/Observable"),require("rxjs/observable/merge"),require("rxjs/operator/share"),require("rxjs/Subject")):$__System.registerDynamic("c",["11","21","26","23"],!1,function($__require,$__exports,$__module){return"function"==typeof factory?factory.call($__exports,$__exports,$__require("11"),$__require("21"),$__require("26"),$__require("23")):factory})}(0,function(exports,rxjs_Observable,rxjs_observable_merge,rxjs_operator_share,rxjs_Subject){"use strict";function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}function getSymbolIterator(){if(!_symbolIterator){var Symbol=_global.Symbol;if(Symbol&&Symbol.iterator)_symbolIterator=Symbol.iterator;else for(var keys=Object.getOwnPropertyNames(Map.prototype),i=0;i<keys.length;++i){var key=keys[i];"entries"!==key&&"size"!==key&&Map.prototype[key]===Map.prototype.entries&&(_symbolIterator=key)}}return _symbolIterator}function scheduleMicroTask(fn){Zone.current.scheduleMicroTask("scheduleMicrotask",fn)}function looseIdentical(a,b){return a===b||"number"==typeof a&&"number"==typeof b&&isNaN(a)&&isNaN(b)}function stringify(token){if("string"==typeof token)return token;if(null==token)return""+token;if(token.overriddenName)return""+token.overriddenName;if(token.name)return""+token.name;var res=token.toString();if(null==res)return""+res;var newLineIndex=res.indexOf("\n");return-1===newLineIndex?res:res.substring(0,newLineIndex)}function extractAnnotation(annotation){return"function"==typeof annotation&&annotation.hasOwnProperty("annotation")&&(annotation=annotation.annotation),annotation}function applyParams(fnOrArray,key){if(fnOrArray===Object||fnOrArray===String||fnOrArray===Function||fnOrArray===Number||fnOrArray===Array)throw new Error("Can not use native "+stringify(fnOrArray)+" as constructor");if("function"==typeof fnOrArray)return fnOrArray;if(Array.isArray(fnOrArray)){var annotations=fnOrArray,annoLength=annotations.length-1,fn=fnOrArray[annoLength];if("function"!=typeof fn)throw new Error("Last position of Class method array must be Function in key "+key+" was '"+stringify(fn)+"'");if(annoLength!=fn.length)throw new Error("Number of annotations ("+annoLength+") does not match number of arguments ("+fn.length+") in the function: "+stringify(fn));for(var paramsAnnotations=[],i=0,ii=annotations.length-1;i<ii;i++){var paramAnnotations=[];paramsAnnotations.push(paramAnnotations);var annotation=annotations[i];if(Array.isArray(annotation))for(var j=0;j<annotation.length;j++)paramAnnotations.push(extractAnnotation(annotation[j]));else"function"==typeof annotation?paramAnnotations.push(extractAnnotation(annotation)):paramAnnotations.push(annotation)}return Reflect$1.defineMetadata("parameters",paramsAnnotations,fn),fn}throw new Error("Only Function or Array is supported in Class definition for key '"+key+"' is '"+stringify(fnOrArray)+"'")}function Class(clsDef){var constructor=applyParams(clsDef.hasOwnProperty("constructor")?clsDef.constructor:void 0,"constructor"),proto=constructor.prototype;if(clsDef.hasOwnProperty("extends")){if("function"!=typeof clsDef.extends)throw new Error("Class definition 'extends' property must be a constructor function was: "+stringify(clsDef.extends));constructor.prototype=proto=Object.create(clsDef.extends.prototype)}for(var key in clsDef)"extends"!==key&&"prototype"!==key&&clsDef.hasOwnProperty(key)&&(proto[key]=applyParams(clsDef[key],key));this&&this.annotations instanceof Array&&Reflect$1.defineMetadata("annotations",this.annotations,constructor);var constructorName=constructor.name;return constructorName&&"constructor"!==constructorName||(constructor.overriddenName="class"+_nextClassId++),constructor}function makeDecorator(name,props,parentClass,chainFn){function DecoratorFactory(objOrType){if(!Reflect$1||!Reflect$1.getOwnMetadata)throw"reflect-metadata shim is required when using class decorators";if(this instanceof DecoratorFactory)return metaCtor.call(this,objOrType),this;var annotationInstance=new DecoratorFactory(objOrType),chainAnnotation="function"==typeof this&&Array.isArray(this.annotations)?this.annotations:[];chainAnnotation.push(annotationInstance);var TypeDecorator=function(cls){var annotations=Reflect$1.getOwnMetadata("annotations",cls)||[];return annotations.push(annotationInstance),Reflect$1.defineMetadata("annotations",annotations,cls),cls};return TypeDecorator.annotations=chainAnnotation,TypeDecorator.Class=Class,chainFn&&chainFn(TypeDecorator),TypeDecorator}var metaCtor=makeMetadataCtor(props);return parentClass&&(DecoratorFactory.prototype=Object.create(parentClass.prototype)),DecoratorFactory.prototype.toString=function(){return"@"+name},DecoratorFactory.annotationCls=DecoratorFactory,DecoratorFactory}function makeMetadataCtor(props){return function(){for(var args=[],_i=0;_i<arguments.length;_i++)args[_i]=arguments[_i];if(props){var values=props.apply(void 0,args);for(var propName in values)this[propName]=values[propName]}}}function makeParamDecorator(name,props,parentClass){function ParamDecoratorFactory(){function ParamDecorator(cls,unusedKey,index){for(var parameters=Reflect$1.getOwnMetadata("parameters",cls)||[];parameters.length<=index;)parameters.push(null);return parameters[index]=parameters[index]||[],parameters[index].push(annotationInstance),Reflect$1.defineMetadata("parameters",parameters,cls),cls}for(var args=[],_i=0;_i<arguments.length;_i++)args[_i]=arguments[_i];if(this instanceof ParamDecoratorFactory)return metaCtor.apply(this,args),this;var annotationInstance=new(ParamDecoratorFactory.bind.apply(ParamDecoratorFactory,[void 0].concat(args)));return ParamDecorator.annotation=annotationInstance,ParamDecorator}var metaCtor=makeMetadataCtor(props);return parentClass&&(ParamDecoratorFactory.prototype=Object.create(parentClass.prototype)),ParamDecoratorFactory.prototype.toString=function(){return"@"+name},ParamDecoratorFactory.annotationCls=ParamDecoratorFactory,ParamDecoratorFactory}function makePropDecorator(name,props,parentClass){function PropDecoratorFactory(){for(var args=[],_i=0;_i<arguments.length;_i++)args[_i]=arguments[_i];if(this instanceof PropDecoratorFactory)return metaCtor.apply(this,args),this;var decoratorInstance=new(PropDecoratorFactory.bind.apply(PropDecoratorFactory,[void 0].concat(args)));return function(target,name){var meta=Reflect$1.getOwnMetadata("propMetadata",target.constructor)||{};meta[name]=meta.hasOwnProperty(name)&&meta[name]||[],meta[name].unshift(decoratorInstance),Reflect$1.defineMetadata("propMetadata",meta,target.constructor)}}var metaCtor=makeMetadataCtor(props);return parentClass&&(PropDecoratorFactory.prototype=Object.create(parentClass.prototype)),PropDecoratorFactory.prototype.toString=function(){return"@"+name},PropDecoratorFactory.annotationCls=PropDecoratorFactory,PropDecoratorFactory}function isDefaultChangeDetectionStrategy(changeDetectionStrategy){return null==changeDetectionStrategy||changeDetectionStrategy===ChangeDetectionStrategy.Default}function forwardRef(forwardRefFn){return forwardRefFn.__forward_ref__=forwardRef,forwardRefFn.toString=function(){return stringify(this())},forwardRefFn}function resolveForwardRef(type){return"function"==typeof type&&type.hasOwnProperty("__forward_ref__")&&type.__forward_ref__===forwardRef?type():type}function getDebugContext(error){return error[ERROR_DEBUG_CONTEXT]}function getOriginalError(error){return error[ERROR_ORIGINAL_ERROR]}function getErrorLogger(error){return error[ERROR_LOGGER]||defaultErrorLogger}function defaultErrorLogger(console){for(var values=[],_i=1;_i<arguments.length;_i++)values[_i-1]=arguments[_i];console.error.apply(console,values)}function wrappedError(message,originalError){var msg=message+" caused by: "+(originalError instanceof Error?originalError.message:originalError),error=Error(msg);return error[ERROR_ORIGINAL_ERROR]=originalError,error}function findFirstClosedCycle(keys){for(var res=[],i=0;i<keys.length;++i){if(res.indexOf(keys[i])>-1)return res.push(keys[i]),res;res.push(keys[i])}return res}function constructResolvingPath(keys){if(keys.length>1){return" ("+findFirstClosedCycle(keys.slice().reverse()).map(function(k){return stringify(k.token)}).join(" -> ")+")"}return""}function injectionError(injector,key,constructResolvingMessage,originalError){var keys=[key],errMsg=constructResolvingMessage(keys),error=originalError?wrappedError(errMsg,originalError):Error(errMsg);return error.addKey=addKey,error.keys=keys,error.injectors=[injector],error.constructResolvingMessage=constructResolvingMessage,error[ERROR_ORIGINAL_ERROR]=originalError,error}function addKey(injector,key){this.injectors.push(injector),this.keys.push(key),this.message=this.constructResolvingMessage(this.keys)}function noProviderError(injector,key){return injectionError(injector,key,function(keys){return"No provider for "+stringify(keys[0].token)+"!"+constructResolvingPath(keys)})}function cyclicDependencyError(injector,key){return injectionError(injector,key,function(keys){return"Cannot instantiate cyclic dependency!"+constructResolvingPath(keys)})}function instantiationError(injector,originalException,originalStack,key){return injectionError(injector,key,function(keys){var first=stringify(keys[0].token);return originalException.message+": Error during instantiation of "+first+"!"+constructResolvingPath(keys)+"."},originalException)}function invalidProviderError(provider){return Error("Invalid provider - only instances of Provider and Type are allowed, got: "+provider)}function noAnnotationError(typeOrFunc,params){for(var signature=[],i=0,ii=params.length;i<ii;i++){var parameter=params[i];parameter&&0!=parameter.length?signature.push(parameter.map(stringify).join(" ")):signature.push("?")}return Error("Cannot resolve all parameters for '"+stringify(typeOrFunc)+"'("+signature.join(", ")+"). Make sure that all the parameters are decorated with Inject or have valid type annotations and that '"+stringify(typeOrFunc)+"' is decorated with Injectable.")}function outOfBoundsError(index){return Error("Index "+index+" is out-of-bounds.")}function mixingMultiProvidersWithRegularProvidersError(provider1,provider2){return Error("Cannot mix multi providers and regular providers, got: "+provider1+" "+provider2)}function isType(v){return"function"==typeof v}function convertTsickleDecoratorIntoMetadata(decoratorInvocations){return decoratorInvocations?decoratorInvocations.map(function(decoratorInvocation){var decoratorType=decoratorInvocation.type,annotationCls=decoratorType.annotationCls,annotationArgs=decoratorInvocation.args?decoratorInvocation.args:[];return new(annotationCls.bind.apply(annotationCls,[void 0].concat(annotationArgs)))}):[]}function getParentCtor(ctor){var parentProto=Object.getPrototypeOf(ctor.prototype);return(parentProto?parentProto.constructor:null)||Object}function resolveReflectiveFactory(provider){var factoryFn,resolvedDeps;if(provider.useClass){var useClass=resolveForwardRef(provider.useClass);factoryFn=reflector.factory(useClass),resolvedDeps=_dependenciesFor(useClass)}else provider.useExisting?(factoryFn=function(aliasInstance){return aliasInstance},resolvedDeps=[ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))]):provider.useFactory?(factoryFn=provider.useFactory,resolvedDeps=constructDependencies(provider.useFactory,provider.deps)):(factoryFn=function(){return provider.useValue},resolvedDeps=_EMPTY_LIST);return new ResolvedReflectiveFactory(factoryFn,resolvedDeps)}function resolveReflectiveProvider(provider){return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide),[resolveReflectiveFactory(provider)],provider.multi||!1)}function resolveReflectiveProviders(providers){var normalized=_normalizeProviders(providers,[]),resolved=normalized.map(resolveReflectiveProvider),resolvedProviderMap=mergeResolvedReflectiveProviders(resolved,new Map);return Array.from(resolvedProviderMap.values())}function mergeResolvedReflectiveProviders(providers,normalizedProvidersMap){for(var i=0;i<providers.length;i++){var provider=providers[i],existing=normalizedProvidersMap.get(provider.key.id);if(existing){if(provider.multiProvider!==existing.multiProvider)throw mixingMultiProvidersWithRegularProvidersError(existing,provider);if(provider.multiProvider)for(var j=0;j<provider.resolvedFactories.length;j++)existing.resolvedFactories.push(provider.resolvedFactories[j]);else normalizedProvidersMap.set(provider.key.id,provider)}else{var resolvedProvider=void 0;resolvedProvider=provider.multiProvider?new ResolvedReflectiveProvider_(provider.key,provider.resolvedFactories.slice(),provider.multiProvider):provider,normalizedProvidersMap.set(provider.key.id,resolvedProvider)}}return normalizedProvidersMap}function _normalizeProviders(providers,res){return providers.forEach(function(b){if(b instanceof Type)res.push({provide:b,useClass:b});else if(b&&"object"==typeof b&&void 0!==b.provide)res.push(b);else{if(!(b instanceof Array))throw invalidProviderError(b);_normalizeProviders(b,res)}}),res}function constructDependencies(typeOrFunc,dependencies){if(dependencies){var params_1=dependencies.map(function(t){return[t]});return dependencies.map(function(t){return _extractToken(typeOrFunc,t,params_1)})}return _dependenciesFor(typeOrFunc)}function _dependenciesFor(typeOrFunc){var params=reflector.parameters(typeOrFunc);if(!params)return[];if(params.some(function(p){return null==p}))throw noAnnotationError(typeOrFunc,params);return params.map(function(p){return _extractToken(typeOrFunc,p,params)})}function _extractToken(typeOrFunc,metadata,params){var token=null,optional=!1;if(!Array.isArray(metadata))return metadata instanceof Inject?_createDependency(metadata.token,optional,null):_createDependency(metadata,optional,null);for(var visibility=null,i=0;i<metadata.length;++i){var paramMetadata=metadata[i];paramMetadata instanceof Type?token=paramMetadata:paramMetadata instanceof Inject?token=paramMetadata.token:paramMetadata instanceof Optional?optional=!0:paramMetadata instanceof Self||paramMetadata instanceof SkipSelf?visibility=paramMetadata:paramMetadata instanceof InjectionToken&&(token=paramMetadata)}if(null!=(token=resolveForwardRef(token)))return _createDependency(token,optional,visibility);throw noAnnotationError(typeOrFunc,params)}function _createDependency(token,optional,visibility){return new ReflectiveDependency(ReflectiveKey.get(token),optional,visibility)}function _mapProviders(injector,fn){for(var res=new Array(injector._providers.length),i=0;i<injector._providers.length;++i)res[i]=fn(injector.getProviderAtIndex(i));return res}function isPromise(obj){return!!obj&&"function"==typeof obj.then}function isObservable(obj){return!!obj&&"function"==typeof obj.subscribe}function _appIdRandomProviderFactory(){return""+_randomChar()+_randomChar()+_randomChar()}function _randomChar(){return String.fromCharCode(97+Math.floor(25*Math.random()))}function _throwError(){throw new Error("Runtime compiler is not loaded")}function noComponentFactoryError(component){var error=Error("No component factory found for "+stringify(component)+". Did you add it to @NgModule.entryComponents?");return error[ERROR_COMPONENT]=component,error}function detectWTF(){var wtf=_global.wtf;return!(!wtf||!(trace=wtf.trace))&&(events=trace.events,!0)}function createScope$1(signature,flags){return void 0===flags&&(flags=null),events.createScope(signature,flags)}function leave(scope,returnValue){return trace.leaveScope(scope,returnValue),returnValue}function startTimeRange(rangeType,action){return trace.beginTimeRange(rangeType,action)}function endTimeRange(range){trace.endTimeRange(range)}function noopScope(arg0,arg1){return null}function checkStable(zone){if(0==zone._nesting&&!zone.hasPendingMicrotasks&&!zone.isStable)try{zone._nesting++,zone.onMicrotaskEmpty.emit(null)}finally{if(zone._nesting--,!zone.hasPendingMicrotasks)try{zone.runOutsideAngular(function(){return zone.onStable.emit(null)})}finally{zone.isStable=!0}}}function forkInnerZoneWithAngularBehavior(zone){zone._inner=zone._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:function(delegate,current,target,task,applyThis,applyArgs){try{return onEnter(zone),delegate.invokeTask(target,task,applyThis,applyArgs)}finally{onLeave(zone)}},onInvoke:function(delegate,current,target,callback,applyThis,applyArgs,source){try{return onEnter(zone),delegate.invoke(target,callback,applyThis,applyArgs,source)}finally{onLeave(zone)}},onHasTask:function(delegate,current,target,hasTaskState){delegate.hasTask(target,hasTaskState),current===target&&("microTask"==hasTaskState.change?(zone.hasPendingMicrotasks=hasTaskState.microTask,checkStable(zone)):"macroTask"==hasTaskState.change&&(zone.hasPendingMacrotasks=hasTaskState.macroTask))},onHandleError:function(delegate,current,target,error){return delegate.handleError(target,error),zone.onError.emit(error),!1}})}function onEnter(zone){zone._nesting++,zone.isStable&&(zone.isStable=!1,zone.onUnstable.emit(null))}function onLeave(zone){zone._nesting--,checkStable(zone)}function setTestabilityGetter(getter){_testabilityGetter=getter}function enableProdMode(){if(_runModeLocked)throw new Error("Cannot enable prod mode after platform setup.");_devMode=!1}function isDevMode(){return _runModeLocked=!0,_devMode}function createPlatform(injector){if(_platform&&!_platform.destroyed&&!_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");_platform=injector.get(PlatformRef);var inits=injector.get(PLATFORM_INITIALIZER,null);return inits&&inits.forEach(function(init){return init()}),_platform}function createPlatformFactory(parentPlatformFactory,name,providers){void 0===providers&&(providers=[]);var marker=new InjectionToken("Platform: "+name);return function(extraProviders){void 0===extraProviders&&(extraProviders=[]);var platform=getPlatform();return platform&&!platform.injector.get(ALLOW_MULTIPLE_PLATFORMS,!1)||(parentPlatformFactory?parentPlatformFactory(providers.concat(extraProviders).concat({provide:marker,useValue:!0})):createPlatform(ReflectiveInjector.resolveAndCreate(providers.concat(extraProviders).concat({provide:marker,useValue:!0})))),assertPlatform(marker)}}function assertPlatform(requiredToken){var platform=getPlatform();if(!platform)throw new Error("No platform exists!");if(!platform.injector.get(requiredToken,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return platform}function destroyPlatform(){_platform&&!_platform.destroyed&&_platform.destroy()}function getPlatform(){return _platform&&!_platform.destroyed?_platform:null}function _callAndReportToErrorHandler(errorHandler,callback){try{var result=callback();return isPromise(result)?result.catch(function(e){throw errorHandler.handleError(e),e}):result}catch(e){throw errorHandler.handleError(e),e}}function remove(list,el){var index=list.indexOf(el);index>-1&&list.splice(index,1)}function registerModuleFactory(id,factory){var existing=moduleFactories.get(id);if(existing)throw new Error("Duplicate module registered for "+id+" - "+existing.moduleType.name+" vs "+factory.moduleType.name);moduleFactories.set(id,factory)}function getModuleFactory(id){var factory=moduleFactories.get(id);if(!factory)throw new Error("No module with ID "+id+" loaded");return factory}function flatten(list){return list.reduce(function(flat,item){var flatItem=Array.isArray(item)?flatten(item):item;return flat.concat(flatItem)},[])}function checkNotEmpty(value,modulePath,exportName){if(!value)throw new Error("Cannot find '"+exportName+"' in '"+modulePath+"'");return value}function asNativeElements(debugEls){return debugEls.map(function(el){return el.nativeElement})}function _queryElementChildren(element,predicate,matches){element.childNodes.forEach(function(node){node instanceof DebugElement&&(predicate(node)&&matches.push(node),_queryElementChildren(node,predicate,matches))})}function _queryNodeChildren(parentNode,predicate,matches){parentNode instanceof DebugElement&&parentNode.childNodes.forEach(function(node){predicate(node)&&matches.push(node),node instanceof DebugElement&&_queryNodeChildren(node,predicate,matches)})}function getDebugNode(nativeNode){return _nativeNodeToDebugNode.get(nativeNode)||null}function indexDebugNode(node){_nativeNodeToDebugNode.set(node.nativeNode,node)}function removeDebugNodeFromIndex(node){_nativeNodeToDebugNode.delete(node.nativeNode)}function devModeEqual(a,b){var isListLikeIterableA=isListLikeIterable(a),isListLikeIterableB=isListLikeIterable(b);if(isListLikeIterableA&&isListLikeIterableB)return areIterablesEqual(a,b,devModeEqual);var isAObject=a&&("object"==typeof a||"function"==typeof a),isBObject=b&&("object"==typeof b||"function"==typeof b);return!(isListLikeIterableA||!isAObject||isListLikeIterableB||!isBObject)||looseIdentical(a,b)}function isListLikeIterable(obj){return!!isJsObject(obj)&&(Array.isArray(obj)||!(obj instanceof Map)&&getSymbolIterator()in obj)}function areIterablesEqual(a,b,comparator){for(var iterator1=a[getSymbolIterator()](),iterator2=b[getSymbolIterator()]();;){var item1=iterator1.next(),item2=iterator2.next();if(item1.done&&item2.done)return!0;if(item1.done||item2.done)return!1;if(!comparator(item1.value,item2.value))return!1}}function iterateListLike(obj,fn){if(Array.isArray(obj))for(var i=0;i<obj.length;i++)fn(obj[i]);else for(var iterator=obj[getSymbolIterator()](),item=void 0;!(item=iterator.next()).done;)fn(item.value)}function isJsObject(o){return null!==o&&("function"==typeof o||"object"==typeof o)}function getPreviousIndex(item,addRemoveOffset,moveOffsets){var previousIndex=item.previousIndex;if(null===previousIndex)return previousIndex;var moveOffset=0;return moveOffsets&&previousIndex<moveOffsets.length&&(moveOffset=moveOffsets[previousIndex]),previousIndex+addRemoveOffset+moveOffset}function getTypeNameForDebugging(type){return type.name||typeof type}function _reflector(){return reflector}function _iterableDiffersFactory(){return defaultIterableDiffers}function _keyValueDiffersFactory(){return defaultKeyValueDiffers}function _localeFactory(locale){return locale||"en-US"}function asTextData(view,index){return view.nodes[index]}function asElementData(view,index){return view.nodes[index]}function asProviderData(view,index){return view.nodes[index]}function asPureExpressionData(view,index){return view.nodes[index]}function asQueryList(view,index){return view.nodes[index]}function expressionChangedAfterItHasBeenCheckedError(context,oldValue,currValue,isFirstCheck){var msg="ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '"+oldValue+"'. Current value: '"+currValue+"'.";return isFirstCheck&&(msg+=" It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?"),viewDebugError(msg,context)}function viewWrappedDebugError(err,context){return err instanceof Error||(err=new Error(err.toString())),_addDebugContext(err,context),err}function viewDebugError(msg,context){var err=new Error(msg);return _addDebugContext(err,context),err}function _addDebugContext(err,context){err[ERROR_DEBUG_CONTEXT]=context,err[ERROR_LOGGER]=context.logError.bind(context)}function isViewDebugError(err){return!!getDebugContext(err)}function viewDestroyedError(action){return new Error("ViewDestroyedError: Attempt to use a destroyed view: "+action)}function tokenKey(token){var key=_tokenKeyCache.get(token);return key||(key=stringify(token)+"_"+_tokenKeyCache.size,_tokenKeyCache.set(token,key)),key}function unwrapValue(view,nodeIdx,bindingIdx,value){if(value instanceof WrappedValue){value=value.wrapped;var globalBindingIdx=view.def.nodes[nodeIdx].bindingIndex+bindingIdx,oldValue=view.oldValues[globalBindingIdx];oldValue instanceof WrappedValue&&(oldValue=oldValue.wrapped),view.oldValues[globalBindingIdx]=new WrappedValue(oldValue)}return value}function createRendererType2(values){return{id:UNDEFINED_RENDERER_TYPE_ID,styles:values.styles,encapsulation:values.encapsulation,data:values.data}}function resolveRendererType2(type){if(type&&type.id===UNDEFINED_RENDERER_TYPE_ID){var isFilled=null!=type.encapsulation&&type.encapsulation!==ViewEncapsulation.None||type.styles.length||Object.keys(type.data).length;type.id=isFilled?"c"+_renderCompCount++:EMPTY_RENDERER_TYPE_ID}return type&&type.id===EMPTY_RENDERER_TYPE_ID&&(type=null),type||null}function checkBinding(view,def,bindingIdx,value){var oldValues=view.oldValues;return!(!(2&view.state)&&looseIdentical(oldValues[def.bindingIndex+bindingIdx],value))}function checkAndUpdateBinding(view,def,bindingIdx,value){return!!checkBinding(view,def,bindingIdx,value)&&(view.oldValues[def.bindingIndex+bindingIdx]=value,!0)}function checkBindingNoChanges(view,def,bindingIdx,value){var oldValue=view.oldValues[def.bindingIndex+bindingIdx];if(1&view.state||!devModeEqual(oldValue,value))throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view,def.index),oldValue,value,0!=(1&view.state))}function markParentViewsForCheck(view){for(var currView=view;currView;)2&currView.def.flags&&(currView.state|=8),currView=currView.viewContainerParent||currView.parent}function markParentViewsForCheckProjectedViews(view,endView){for(var currView=view;currView&&currView!==endView;)currView.state|=64,currView=currView.viewContainerParent||currView.parent}function dispatchEvent(view,nodeIndex,eventName,event){return markParentViewsForCheck(33554432&view.def.nodes[nodeIndex].flags?asElementData(view,nodeIndex).componentView:view),Services.handleEvent(view,nodeIndex,eventName,event)}function declaredViewContainer(view){if(view.parent){return asElementData(view.parent,view.parentNodeDef.index)}return null}function viewParentEl(view){return view.parent?view.parentNodeDef.parent:null}function renderNode(view,def){switch(201347067&def.flags){case 1:return asElementData(view,def.index).renderElement;case 2:return asTextData(view,def.index).renderText}}function elementEventFullName(target,name){return target?target+":"+name:name}function isComponentView(view){return!!view.parent&&!!(32768&view.parentNodeDef.flags)}function isEmbeddedView(view){return!(!view.parent||32768&view.parentNodeDef.flags)}function filterQueryId(queryId){return 1<<queryId%32}function splitMatchedQueriesDsl(matchedQueriesDsl){var matchedQueries={},matchedQueryIds=0,references={};return matchedQueriesDsl&&matchedQueriesDsl.forEach(function(_a){var queryId=_a[0],valueType=_a[1];"number"==typeof queryId?(matchedQueries[queryId]=valueType,matchedQueryIds|=filterQueryId(queryId)):references[queryId]=valueType}),{matchedQueries:matchedQueries,references:references,matchedQueryIds:matchedQueryIds}}function splitDepsDsl(deps){return deps.map(function(value){var token,flags;return Array.isArray(value)?(flags=value[0],token=value[1]):(flags=0,token=value),{flags:flags,token:token,tokenKey:tokenKey(token)}})}function getParentRenderElement(view,renderHost,def){var renderParent=def.renderParent;return renderParent?0==(1&renderParent.flags)||0==(33554432&renderParent.flags)||renderParent.element.componentRendererType&&renderParent.element.componentRendererType.encapsulation===ViewEncapsulation.Native?asElementData(view,def.renderParent.index).renderElement:void 0:renderHost}function resolveDefinition(factory){var value=DEFINITION_CACHE.get(factory);return value||(value=factory(function(){return NOOP}),value.factory=factory,DEFINITION_CACHE.set(factory,value)),value}function rootRenderNodes(view){var renderNodes=[];return visitRootRenderNodes(view,0,void 0,void 0,renderNodes),renderNodes}function visitRootRenderNodes(view,action,parentNode,nextSibling,target){3===action&&(parentNode=view.renderer.parentNode(renderNode(view,view.def.lastRenderRootNode))),visitSiblingRenderNodes(view,action,0,view.def.nodes.length-1,parentNode,nextSibling,target)}function visitSiblingRenderNodes(view,action,startIndex,endIndex,parentNode,nextSibling,target){for(var i=startIndex;i<=endIndex;i++){var nodeDef=view.def.nodes[i];11&nodeDef.flags&&visitRenderNode(view,nodeDef,action,parentNode,nextSibling,target),i+=nodeDef.childCount}}function visitProjectedRenderNodes(view,ngContentIndex,action,parentNode,nextSibling,target){for(var compView=view;compView&&!isComponentView(compView);)compView=compView.parent;for(var hostView=compView.parent,hostElDef=viewParentEl(compView),startIndex=hostElDef.index+1,endIndex=hostElDef.index+hostElDef.childCount,i=startIndex;i<=endIndex;i++){var nodeDef=hostView.def.nodes[i];nodeDef.ngContentIndex===ngContentIndex&&visitRenderNode(hostView,nodeDef,action,parentNode,nextSibling,target),i+=nodeDef.childCount}if(!hostView.parent){var projectedNodes=view.root.projectableNodes[ngContentIndex];if(projectedNodes)for(var i=0;i<projectedNodes.length;i++)execRenderNodeAction(view,projectedNodes[i],action,parentNode,nextSibling,target)}}function visitRenderNode(view,nodeDef,action,parentNode,nextSibling,target){if(8&nodeDef.flags)visitProjectedRenderNodes(view,nodeDef.ngContent.index,action,parentNode,nextSibling,target);else{var rn=renderNode(view,nodeDef);if(3===action&&33554432&nodeDef.flags&&48&nodeDef.bindingFlags){if(16&nodeDef.bindingFlags&&execRenderNodeAction(view,rn,action,parentNode,nextSibling,target),32&nodeDef.bindingFlags){var compView=asElementData(view,nodeDef.index).componentView;execRenderNodeAction(compView,rn,action,parentNode,nextSibling,target)}}else execRenderNodeAction(view,rn,action,parentNode,nextSibling,target);if(16777216&nodeDef.flags)for(var embeddedViews=asElementData(view,nodeDef.index).viewContainer._embeddedViews,k=0;k<embeddedViews.length;k++)visitRootRenderNodes(embeddedViews[k],action,parentNode,nextSibling,target);1&nodeDef.flags&&!nodeDef.element.name&&visitSiblingRenderNodes(view,action,nodeDef.index+1,nodeDef.index+nodeDef.childCount,parentNode,nextSibling,target)}}function execRenderNodeAction(view,renderNode,action,parentNode,nextSibling,target){var renderer=view.renderer;switch(action){case 1:renderer.appendChild(parentNode,renderNode);break;case 2:renderer.insertBefore(parentNode,renderNode,nextSibling);break;case 3:renderer.removeChild(parentNode,renderNode);break;case 0:target.push(renderNode)}}function splitNamespace(name){if(":"===name[0]){var match=name.match(NS_PREFIX_RE);return[match[1],match[2]]}return["",name]}function calcBindingFlags(bindings){for(var flags=0,i=0;i<bindings.length;i++)flags|=bindings[i].flags;return flags}function interpolate(valueCount,constAndInterp){for(var result="",i=0;i<2*valueCount;i+=2)result=result+constAndInterp[i]+_toStringWithNull(constAndInterp[i+1]);return result+constAndInterp[2*valueCount]}function inlineInterpolate(valueCount,c0,a1,c1,a2,c2,a3,c3,a4,c4,a5,c5,a6,c6,a7,c7,a8,c8,a9,c9){switch(valueCount){case 1:return c0+_toStringWithNull(a1)+c1;case 2:return c0+_toStringWithNull(a1)+c1+_toStringWithNull(a2)+c2;case 3:return c0+_toStringWithNull(a1)+c1+_toStringWithNull(a2)+c2+_toStringWithNull(a3)+c3;case 4:return c0+_toStringWithNull(a1)+c1+_toStringWithNull(a2)+c2+_toStringWithNull(a3)+c3+_toStringWithNull(a4)+c4;case 5:return c0+_toStringWithNull(a1)+c1+_toStringWithNull(a2)+c2+_toStringWithNull(a3)+c3+_toStringWithNull(a4)+c4+_toStringWithNull(a5)+c5;case 6:return c0+_toStringWithNull(a1)+c1+_toStringWithNull(a2)+c2+_toStringWithNull(a3)+c3+_toStringWithNull(a4)+c4+_toStringWithNull(a5)+c5+_toStringWithNull(a6)+c6;case 7:return c0+_toStringWithNull(a1)+c1+_toStringWithNull(a2)+c2+_toStringWithNull(a3)+c3+_toStringWithNull(a4)+c4+_toStringWithNull(a5)+c5+_toStringWithNull(a6)+c6+_toStringWithNull(a7)+c7;case 8:return c0+_toStringWithNull(a1)+c1+_toStringWithNull(a2)+c2+_toStringWithNull(a3)+c3+_toStringWithNull(a4)+c4+_toStringWithNull(a5)+c5+_toStringWithNull(a6)+c6+_toStringWithNull(a7)+c7+_toStringWithNull(a8)+c8;case 9:return c0+_toStringWithNull(a1)+c1+_toStringWithNull(a2)+c2+_toStringWithNull(a3)+c3+_toStringWithNull(a4)+c4+_toStringWithNull(a5)+c5+_toStringWithNull(a6)+c6+_toStringWithNull(a7)+c7+_toStringWithNull(a8)+c8+_toStringWithNull(a9)+c9;default:throw new Error("Does not support more than 9 expressions")}}function _toStringWithNull(v){return null!=v?v.toString():""}function anchorDef(flags,matchedQueriesDsl,ngContentIndex,childCount,handleEvent,templateFactory){flags|=1;var _a=splitMatchedQueriesDsl(matchedQueriesDsl),matchedQueries=_a.matchedQueries,references=_a.references;return{index:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,flags:flags,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:matchedQueries,matchedQueryIds:_a.matchedQueryIds,references:references,ngContentIndex:ngContentIndex,childCount:childCount,bindings:[],bindingFlags:0,outputs:[],element:{ns:null,name:null,attrs:null,template:templateFactory?resolveDefinition(templateFactory):null,componentProvider:null,componentView:null,componentRendererType:null,publicProviders:null,allProviders:null,handleEvent:handleEvent||NOOP},provider:null,text:null,query:null,ngContent:null}}function elementDef(flags,matchedQueriesDsl,ngContentIndex,childCount,namespaceAndName,fixedAttrs,bindings,outputs,handleEvent,componentView,componentRendererType){void 0===fixedAttrs&&(fixedAttrs=[]),handleEvent||(handleEvent=NOOP);var _a=splitMatchedQueriesDsl(matchedQueriesDsl),matchedQueries=_a.matchedQueries,references=_a.references,matchedQueryIds=_a.matchedQueryIds,ns=null,name=null;namespaceAndName&&(_b=splitNamespace(namespaceAndName),ns=_b[0],name=_b[1]),bindings=bindings||[];for(var bindingDefs=new Array(bindings.length),i=0;i<bindings.length;i++){var _c=bindings[i],bindingFlags=_c[0],namespaceAndName_1=_c[1],suffixOrSecurityContext=_c[2],_d=splitNamespace(namespaceAndName_1),ns_1=_d[0],name_1=_d[1],securityContext=void 0,suffix=void 0;switch(15&bindingFlags){case 4:suffix=suffixOrSecurityContext;break;case 1:case 8:securityContext=suffixOrSecurityContext}bindingDefs[i]={flags:bindingFlags,ns:ns_1,name:name_1,nonMinifiedName:name_1,securityContext:securityContext,suffix:suffix}}outputs=outputs||[];for(var outputDefs=new Array(outputs.length),i=0;i<outputs.length;i++){var _e=outputs[i],target=_e[0],eventName=_e[1];outputDefs[i]={type:0,target:target,eventName:eventName,propName:null}}fixedAttrs=fixedAttrs||[];var attrs=fixedAttrs.map(function(_a){var namespaceAndName=_a[0],value=_a[1],_b=splitNamespace(namespaceAndName);return[_b[0],_b[1],value]});return componentRendererType=resolveRendererType2(componentRendererType),componentView&&(flags|=33554432),flags|=1,{index:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,flags:flags,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:matchedQueries,matchedQueryIds:matchedQueryIds,references:references,ngContentIndex:ngContentIndex,childCount:childCount,bindings:bindingDefs,bindingFlags:calcBindingFlags(bindingDefs),outputs:outputDefs,element:{ns:ns,name:name,attrs:attrs,template:null,componentProvider:null,componentView:componentView||null,componentRendererType:componentRendererType,publicProviders:null,allProviders:null,handleEvent:handleEvent||NOOP},provider:null,text:null,query:null,ngContent:null};var _b}function createElement(view,renderHost,def){var el,elDef=def.element,rootSelectorOrNode=view.root.selectorOrNode,renderer=view.renderer;if(view.parent||!rootSelectorOrNode){el=elDef.name?renderer.createElement(elDef.name,elDef.ns):renderer.createComment("");var parentEl=getParentRenderElement(view,renderHost,def);parentEl&&renderer.appendChild(parentEl,el)}else el=renderer.selectRootElement(rootSelectorOrNode);if(elDef.attrs)for(var i=0;i<elDef.attrs.length;i++){var _a=elDef.attrs[i],ns=_a[0],name=_a[1],value=_a[2];renderer.setAttribute(el,name,value,ns)}return el}function listenToElementOutputs(view,compView,def,el){for(var i=0;i<def.outputs.length;i++){var output=def.outputs[i],handleEventClosure=renderEventHandlerClosure(view,def.index,elementEventFullName(output.target,output.eventName)),listenTarget=output.target,listenerView=view;"component"===output.target&&(listenTarget=null,listenerView=compView);var disposable=listenerView.renderer.listen(listenTarget||el,output.eventName,handleEventClosure);view.disposables[def.outputIndex+i]=disposable}}function renderEventHandlerClosure(view,index,eventName){return function(event){try{return dispatchEvent(view,index,eventName,event)}catch(e){view.root.errorHandler.handleError(e)}}}function checkAndUpdateElementInline(view,def,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9){var bindLen=def.bindings.length,changed=!1;return bindLen>0&&checkAndUpdateElementValue(view,def,0,v0)&&(changed=!0),bindLen>1&&checkAndUpdateElementValue(view,def,1,v1)&&(changed=!0),bindLen>2&&checkAndUpdateElementValue(view,def,2,v2)&&(changed=!0),bindLen>3&&checkAndUpdateElementValue(view,def,3,v3)&&(changed=!0),bindLen>4&&checkAndUpdateElementValue(view,def,4,v4)&&(changed=!0),bindLen>5&&checkAndUpdateElementValue(view,def,5,v5)&&(changed=!0),bindLen>6&&checkAndUpdateElementValue(view,def,6,v6)&&(changed=!0),bindLen>7&&checkAndUpdateElementValue(view,def,7,v7)&&(changed=!0),bindLen>8&&checkAndUpdateElementValue(view,def,8,v8)&&(changed=!0),bindLen>9&&checkAndUpdateElementValue(view,def,9,v9)&&(changed=!0),changed}function checkAndUpdateElementDynamic(view,def,values){for(var changed=!1,i=0;i<values.length;i++)checkAndUpdateElementValue(view,def,i,values[i])&&(changed=!0);return changed}function checkAndUpdateElementValue(view,def,bindingIdx,value){if(!checkAndUpdateBinding(view,def,bindingIdx,value))return!1;var binding=def.bindings[bindingIdx],elData=asElementData(view,def.index),renderNode$$1=elData.renderElement,name=binding.name;switch(15&binding.flags){case 1:setElementAttribute(view,binding,renderNode$$1,binding.ns,name,value);break;case 2:setElementClass(view,renderNode$$1,name,value);break;case 4:setElementStyle(view,binding,renderNode$$1,name,value);break;case 8:setElementProperty(33554432&def.flags&&32&binding.flags?elData.componentView:view,binding,renderNode$$1,name,value)}return!0}function setElementAttribute(view,binding,renderNode$$1,ns,name,value){var securityContext=binding.securityContext,renderValue=securityContext?view.root.sanitizer.sanitize(securityContext,value):value;renderValue=null!=renderValue?renderValue.toString():null;var renderer=view.renderer;null!=value?renderer.setAttribute(renderNode$$1,name,renderValue,ns):renderer.removeAttribute(renderNode$$1,name,ns)}function setElementClass(view,renderNode$$1,name,value){var renderer=view.renderer;value?renderer.addClass(renderNode$$1,name):renderer.removeClass(renderNode$$1,name)}function setElementStyle(view,binding,renderNode$$1,name,value){var renderValue=view.root.sanitizer.sanitize(SecurityContext.STYLE,value);if(null!=renderValue){renderValue=renderValue.toString();var unit=binding.suffix;null!=unit&&(renderValue+=unit)}else renderValue=null;var renderer=view.renderer;null!=renderValue?renderer.setStyle(renderNode$$1,name,renderValue):renderer.removeStyle(renderNode$$1,name)}function setElementProperty(view,binding,renderNode$$1,name,value){var securityContext=binding.securityContext,renderValue=securityContext?view.root.sanitizer.sanitize(securityContext,value):value;view.renderer.setProperty(renderNode$$1,name,renderValue)}function moduleProvideDef(flags,token,value,deps){return{index:-1,deps:splitDepsDsl(deps),flags:flags,token:token,value:value}}function moduleDef(providers){for(var providersByKey={},i=0;i<providers.length;i++){var provider=providers[i];provider.index=i,providersByKey[tokenKey(provider.token)]=provider}return{factory:null,providersByKey:providersByKey,providers:providers}}function initNgModule(data){for(var def=data._def,providers=data._providers=new Array(def.providers.length),i=0;i<def.providers.length;i++){var provDef=def.providers[i];providers[i]=4096&provDef.flags?NOT_CREATED$1:_createProviderInstance$1(data,provDef)}}function resolveNgModuleDep(data,depDef,notFoundValue){if(void 0===notFoundValue&&(notFoundValue=Injector.THROW_IF_NOT_FOUND),8&depDef.flags)return depDef.token;if(2&depDef.flags&&(notFoundValue=null),1&depDef.flags)return data._parent.get(depDef.token,notFoundValue);var tokenKey$$1=depDef.tokenKey;switch(tokenKey$$1){case InjectorRefTokenKey$1:case NgModuleRefTokenKey:return data}var providerDef=data._def.providersByKey[tokenKey$$1];if(providerDef){var providerInstance=data._providers[providerDef.index];return providerInstance===NOT_CREATED$1&&(providerInstance=data._providers[providerDef.index]=_createProviderInstance$1(data,providerDef)),providerInstance}return data._parent.get(depDef.token,notFoundValue)}function _createProviderInstance$1(ngModule,providerDef){var injectable;switch(201347067&providerDef.flags){case 512:injectable=_createClass(ngModule,providerDef.value,providerDef.deps);break;case 1024:injectable=_callFactory(ngModule,providerDef.value,providerDef.deps);break;case 2048:injectable=resolveNgModuleDep(ngModule,providerDef.deps[0]);break;case 256:injectable=providerDef.value}return injectable}function _createClass(ngModule,ctor,deps){var injectable,len=deps.length;switch(len){case 0:injectable=new ctor;break;case 1:injectable=new ctor(resolveNgModuleDep(ngModule,deps[0]));break;case 2:injectable=new ctor(resolveNgModuleDep(ngModule,deps[0]),resolveNgModuleDep(ngModule,deps[1]));break;case 3:injectable=new ctor(resolveNgModuleDep(ngModule,deps[0]),resolveNgModuleDep(ngModule,deps[1]),resolveNgModuleDep(ngModule,deps[2]));break;default:for(var depValues=new Array(len),i=0;i<len;i++)depValues[i]=resolveNgModuleDep(ngModule,deps[i]);injectable=new(ctor.bind.apply(ctor,[void 0].concat(depValues)))}return injectable}function _callFactory(ngModule,factory,deps){var injectable,len=deps.length;switch(len){case 0:injectable=factory();break;case 1:injectable=factory(resolveNgModuleDep(ngModule,deps[0]));break;case 2:injectable=factory(resolveNgModuleDep(ngModule,deps[0]),resolveNgModuleDep(ngModule,deps[1]));break;case 3:injectable=factory(resolveNgModuleDep(ngModule,deps[0]),resolveNgModuleDep(ngModule,deps[1]),resolveNgModuleDep(ngModule,deps[2]));break;default:for(var depValues=Array(len),i=0;i<len;i++)depValues[i]=resolveNgModuleDep(ngModule,deps[i]);injectable=factory.apply(void 0,depValues)}return injectable}function callNgModuleLifecycle(ngModule,lifecycles){for(var def=ngModule._def,i=0;i<def.providers.length;i++){if(131072&def.providers[i].flags){var instance=ngModule._providers[i];instance&&instance!==NOT_CREATED$1&&instance.ngOnDestroy()}}}function attachEmbeddedView(parentView,elementData,viewIndex,view){var embeddedViews=elementData.viewContainer._embeddedViews;null!==viewIndex&&void 0!==viewIndex||(viewIndex=embeddedViews.length),view.viewContainerParent=parentView,addToArray(embeddedViews,viewIndex,view),attachProjectedView(elementData,view),Services.dirtyParentQueries(view),renderAttachEmbeddedView(elementData,viewIndex>0?embeddedViews[viewIndex-1]:null,view)}function attachProjectedView(vcElementData,view){var dvcElementData=declaredViewContainer(view);if(dvcElementData&&dvcElementData!==vcElementData&&!(16&view.state)){view.state|=16;var projectedViews=dvcElementData.template._projectedViews;projectedViews||(projectedViews=dvcElementData.template._projectedViews=[]),projectedViews.push(view),markNodeAsProjectedTemplate(view.parent.def,view.parentNodeDef)}}function markNodeAsProjectedTemplate(viewDef,nodeDef){if(!(4&nodeDef.flags)){viewDef.nodeFlags|=4,nodeDef.flags|=4;for(var parentNodeDef=nodeDef.parent;parentNodeDef;)parentNodeDef.childFlags|=4,parentNodeDef=parentNodeDef.parent}}function detachEmbeddedView(elementData,viewIndex){var embeddedViews=elementData.viewContainer._embeddedViews;if((null==viewIndex||viewIndex>=embeddedViews.length)&&(viewIndex=embeddedViews.length-1),viewIndex<0)return null;var view=embeddedViews[viewIndex];return view.viewContainerParent=null,removeFromArray(embeddedViews,viewIndex),Services.dirtyParentQueries(view),renderDetachView(view),view}function detachProjectedView(view){if(16&view.state){var dvcElementData=declaredViewContainer(view);if(dvcElementData){var projectedViews=dvcElementData.template._projectedViews;projectedViews&&(removeFromArray(projectedViews,projectedViews.indexOf(view)),Services.dirtyParentQueries(view))}}}function moveEmbeddedView(elementData,oldViewIndex,newViewIndex){var embeddedViews=elementData.viewContainer._embeddedViews,view=embeddedViews[oldViewIndex];return removeFromArray(embeddedViews,oldViewIndex),null==newViewIndex&&(newViewIndex=embeddedViews.length),addToArray(embeddedViews,newViewIndex,view),Services.dirtyParentQueries(view),renderDetachView(view),renderAttachEmbeddedView(elementData,newViewIndex>0?embeddedViews[newViewIndex-1]:null,view),view}function renderAttachEmbeddedView(elementData,prevView,view){var prevRenderNode=prevView?renderNode(prevView,prevView.def.lastRenderRootNode):elementData.renderElement;visitRootRenderNodes(view,2,view.renderer.parentNode(prevRenderNode),view.renderer.nextSibling(prevRenderNode),void 0)}function renderDetachView(view){visitRootRenderNodes(view,3,null,null,void 0)}function addToArray(arr,index,value){index>=arr.length?arr.push(value):arr.splice(index,0,value)}function removeFromArray(arr,index){index>=arr.length-1?arr.pop():arr.splice(index,1)}function createComponentFactory(selector,componentType,viewDefFactory,inputs,outputs,ngContentSelectors){return new ComponentFactory_(selector,componentType,viewDefFactory,inputs,outputs,ngContentSelectors)}function getComponentViewDefinitionFactory(componentFactory){return componentFactory.viewDefFactory}function createViewContainerData(view,elDef,elData){return new ViewContainerRef_(view,elDef,elData)}function createChangeDetectorRef(view){return new ViewRef_(view)}function createTemplateData(view,def){return new TemplateRef_(view,def)}function createInjector(view,elDef){return new Injector_(view,elDef)}function nodeValue(view,index){var def=view.def.nodes[index];if(1&def.flags){var elData=asElementData(view,def.index);return def.element.template?elData.template:elData.renderElement}if(2&def.flags)return asTextData(view,def.index).renderText;if(20240&def.flags)return asProviderData(view,def.index).instance;throw new Error("Illegal state: read nodeValue for node index "+index)}function createRendererV1(view){return new RendererAdapter(view.renderer)}function createNgModuleRef(moduleType,parent,bootstrapComponents,def){return new NgModuleRef_(moduleType,parent,bootstrapComponents,def)}function directiveDef(flags,matchedQueries,childCount,ctor,deps,props,outputs){var bindings=[];if(props)for(var prop in props){var _a=props[prop],bindingIndex=_a[0],nonMinifiedName=_a[1];bindings[bindingIndex]={flags:8,name:prop,nonMinifiedName:nonMinifiedName,ns:null,securityContext:null,suffix:null}}var outputDefs=[];if(outputs)for(var propName in outputs)outputDefs.push({type:1,propName:propName,target:null,eventName:outputs[propName]});return flags|=16384,_def(flags,matchedQueries,childCount,ctor,ctor,deps,bindings,outputDefs)}function pipeDef(flags,ctor,deps){return flags|=16,_def(flags,null,0,ctor,ctor,deps)}function providerDef(flags,matchedQueries,token,value,deps){return _def(flags,matchedQueries,0,token,value,deps)}function _def(flags,matchedQueriesDsl,childCount,token,value,deps,bindings,outputs){var _a=splitMatchedQueriesDsl(matchedQueriesDsl),matchedQueries=_a.matchedQueries,references=_a.references,matchedQueryIds=_a.matchedQueryIds;outputs||(outputs=[]),bindings||(bindings=[]);var depDefs=splitDepsDsl(deps);return{index:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,flags:flags,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:matchedQueries,matchedQueryIds:matchedQueryIds,references:references,ngContentIndex:-1,childCount:childCount,bindings:bindings,bindingFlags:calcBindingFlags(bindings),outputs:outputs,element:null,provider:{token:token,value:value,deps:depDefs},text:null,query:null,ngContent:null}}function createProviderInstance(view,def){return 4096&def.flags?NOT_CREATED:_createProviderInstance(view,def)}function createPipeInstance(view,def){for(var compView=view;compView.parent&&!isComponentView(compView);)compView=compView.parent;return createClass(compView.parent,viewParentEl(compView),!0,def.provider.value,def.provider.deps)}function createDirectiveInstance(view,def){var allowPrivateServices=(32768&def.flags)>0,instance=createClass(view,def.parent,allowPrivateServices,def.provider.value,def.provider.deps);if(def.outputs.length)for(var i=0;i<def.outputs.length;i++){var output=def.outputs[i],subscription=instance[output.propName].subscribe(eventHandlerClosure(view,def.parent.index,output.eventName));view.disposables[def.outputIndex+i]=subscription.unsubscribe.bind(subscription)}return instance}function eventHandlerClosure(view,index,eventName){return function(event){try{return dispatchEvent(view,index,eventName,event)}catch(e){view.root.errorHandler.handleError(e)}}}function checkAndUpdateDirectiveInline(view,def,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9){var providerData=asProviderData(view,def.index),directive=providerData.instance,changed=!1,changes=void 0,bindLen=def.bindings.length;return bindLen>0&&checkBinding(view,def,0,v0)&&(changed=!0,changes=updateProp(view,providerData,def,0,v0,changes)),bindLen>1&&checkBinding(view,def,1,v1)&&(changed=!0,changes=updateProp(view,providerData,def,1,v1,changes)),bindLen>2&&checkBinding(view,def,2,v2)&&(changed=!0,changes=updateProp(view,providerData,def,2,v2,changes)),bindLen>3&&checkBinding(view,def,3,v3)&&(changed=!0,changes=updateProp(view,providerData,def,3,v3,changes)),bindLen>4&&checkBinding(view,def,4,v4)&&(changed=!0,changes=updateProp(view,providerData,def,4,v4,changes)),bindLen>5&&checkBinding(view,def,5,v5)&&(changed=!0,changes=updateProp(view,providerData,def,5,v5,changes)),bindLen>6&&checkBinding(view,def,6,v6)&&(changed=!0,changes=updateProp(view,providerData,def,6,v6,changes)),bindLen>7&&checkBinding(view,def,7,v7)&&(changed=!0,changes=updateProp(view,providerData,def,7,v7,changes)),bindLen>8&&checkBinding(view,def,8,v8)&&(changed=!0,changes=updateProp(view,providerData,def,8,v8,changes)),bindLen>9&&checkBinding(view,def,9,v9)&&(changed=!0,changes=updateProp(view,providerData,def,9,v9,changes)),changes&&directive.ngOnChanges(changes),2&view.state&&65536&def.flags&&directive.ngOnInit(),262144&def.flags&&directive.ngDoCheck(),changed}function checkAndUpdateDirectiveDynamic(view,def,values){for(var providerData=asProviderData(view,def.index),directive=providerData.instance,changed=!1,changes=void 0,i=0;i<values.length;i++)checkBinding(view,def,i,values[i])&&(changed=!0,changes=updateProp(view,providerData,def,i,values[i],changes));return changes&&directive.ngOnChanges(changes),2&view.state&&65536&def.flags&&directive.ngOnInit(),262144&def.flags&&directive.ngDoCheck(),changed}function _createProviderInstance(view,def){var injectable,allowPrivateServices=(8192&def.flags)>0,providerDef=def.provider;switch(201347067&def.flags){case 512:injectable=createClass(view,def.parent,allowPrivateServices,providerDef.value,providerDef.deps);break;case 1024:injectable=callFactory(view,def.parent,allowPrivateServices,providerDef.value,providerDef.deps);break;case 2048:injectable=resolveDep(view,def.parent,allowPrivateServices,providerDef.deps[0]);break;case 256:injectable=providerDef.value}return injectable}function createClass(view,elDef,allowPrivateServices,ctor,deps){var injectable,len=deps.length;switch(len){case 0:injectable=new ctor;break;case 1:injectable=new ctor(resolveDep(view,elDef,allowPrivateServices,deps[0]));break;case 2:injectable=new ctor(resolveDep(view,elDef,allowPrivateServices,deps[0]),resolveDep(view,elDef,allowPrivateServices,deps[1]));break;case 3:injectable=new ctor(resolveDep(view,elDef,allowPrivateServices,deps[0]),resolveDep(view,elDef,allowPrivateServices,deps[1]),resolveDep(view,elDef,allowPrivateServices,deps[2]));break;default:for(var depValues=new Array(len),i=0;i<len;i++)depValues[i]=resolveDep(view,elDef,allowPrivateServices,deps[i]);injectable=new(ctor.bind.apply(ctor,[void 0].concat(depValues)))}return injectable}function callFactory(view,elDef,allowPrivateServices,factory,deps){var injectable,len=deps.length;switch(len){case 0:injectable=factory();break;case 1:injectable=factory(resolveDep(view,elDef,allowPrivateServices,deps[0]));break;case 2:injectable=factory(resolveDep(view,elDef,allowPrivateServices,deps[0]),resolveDep(view,elDef,allowPrivateServices,deps[1]));break;case 3:injectable=factory(resolveDep(view,elDef,allowPrivateServices,deps[0]),resolveDep(view,elDef,allowPrivateServices,deps[1]),resolveDep(view,elDef,allowPrivateServices,deps[2]));break;default:for(var depValues=Array(len),i=0;i<len;i++)depValues[i]=resolveDep(view,elDef,allowPrivateServices,deps[i]);injectable=factory.apply(void 0,depValues)}return injectable}function resolveDep(view,elDef,allowPrivateServices,depDef,notFoundValue){if(void 0===notFoundValue&&(notFoundValue=Injector.THROW_IF_NOT_FOUND),8&depDef.flags)return depDef.token;var startView=view;2&depDef.flags&&(notFoundValue=null);var tokenKey$$1=depDef.tokenKey;for(tokenKey$$1===ChangeDetectorRefTokenKey&&(allowPrivateServices=!(!elDef||!elDef.element.componentView)),elDef&&1&depDef.flags&&(allowPrivateServices=!1,elDef=elDef.parent);view;){if(elDef)switch(tokenKey$$1){case RendererV1TokenKey:var compView=findCompView(view,elDef,allowPrivateServices);return createRendererV1(compView);case Renderer2TokenKey:var compView=findCompView(view,elDef,allowPrivateServices);return compView.renderer;case ElementRefTokenKey:return new ElementRef(asElementData(view,elDef.index).renderElement);case ViewContainerRefTokenKey:return asElementData(view,elDef.index).viewContainer;case TemplateRefTokenKey:if(elDef.element.template)return asElementData(view,elDef.index).template;break;case ChangeDetectorRefTokenKey:return createChangeDetectorRef(findCompView(view,elDef,allowPrivateServices));case InjectorRefTokenKey:return createInjector(view,elDef);default:var providerDef_1=(allowPrivateServices?elDef.element.allProviders:elDef.element.publicProviders)[tokenKey$$1];if(providerDef_1){var providerData=asProviderData(view,providerDef_1.index);return providerData.instance===NOT_CREATED&&(providerData.instance=_createProviderInstance(view,providerDef_1)),providerData.instance}}allowPrivateServices=isComponentView(view),elDef=viewParentEl(view),view=view.parent}var value=startView.root.injector.get(depDef.token,NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR);return value!==NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR||notFoundValue===NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR?value:startView.root.ngModule.injector.get(depDef.token,notFoundValue)}function findCompView(view,elDef,allowPrivateServices){var compView;if(allowPrivateServices)compView=asElementData(view,elDef.index).componentView;else for(compView=view;compView.parent&&!isComponentView(compView);)compView=compView.parent;return compView}function updateProp(view,providerData,def,bindingIdx,value,changes){if(32768&def.flags){var compView=asElementData(view,def.parent.index).componentView;2&compView.def.flags&&(compView.state|=8)}var binding=def.bindings[bindingIdx],propName=binding.name;if(providerData.instance[propName]=value,524288&def.flags){changes=changes||{};var oldValue=view.oldValues[def.bindingIndex+bindingIdx];oldValue instanceof WrappedValue&&(oldValue=oldValue.wrapped);changes[def.bindings[bindingIdx].nonMinifiedName]=new SimpleChange(oldValue,value,0!=(2&view.state))}return view.oldValues[def.bindingIndex+bindingIdx]=value,changes}function callLifecycleHooksChildrenFirst(view,lifecycles){if(view.def.nodeFlags&lifecycles)for(var nodes=view.def.nodes,i=0;i<nodes.length;i++){var nodeDef=nodes[i],parent=nodeDef.parent;for(!parent&&nodeDef.flags&lifecycles&&callProviderLifecycles(view,i,nodeDef.flags&lifecycles),0==(nodeDef.childFlags&lifecycles)&&(i+=nodeDef.childCount);parent&&1&parent.flags&&i===parent.index+parent.childCount;)parent.directChildFlags&lifecycles&&callElementProvidersLifecycles(view,parent,lifecycles),parent=parent.parent}}function callElementProvidersLifecycles(view,elDef,lifecycles){for(var i=elDef.index+1;i<=elDef.index+elDef.childCount;i++){var nodeDef=view.def.nodes[i];nodeDef.flags&lifecycles&&callProviderLifecycles(view,i,nodeDef.flags&lifecycles),i+=nodeDef.childCount}}function callProviderLifecycles(view,index,lifecycles){var provider=asProviderData(view,index).instance;provider!==NOT_CREATED&&(Services.setCurrentNode(view,index),1048576&lifecycles&&provider.ngAfterContentInit(),2097152&lifecycles&&provider.ngAfterContentChecked(),4194304&lifecycles&&provider.ngAfterViewInit(),8388608&lifecycles&&provider.ngAfterViewChecked(),131072&lifecycles&&provider.ngOnDestroy())}function queryDef(flags,id,bindings){var bindingDefs=[];for(var propName in bindings){var bindingType=bindings[propName];bindingDefs.push({propName:propName,bindingType:bindingType})}return{index:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,flags:flags,childFlags:0,directChildFlags:0,childMatchedQueries:0,ngContentIndex:-1,matchedQueries:{},matchedQueryIds:0,references:{},childCount:0,bindings:[],bindingFlags:0,outputs:[],element:null,provider:null,text:null,query:{id:id,filterId:filterQueryId(id),bindings:bindingDefs},ngContent:null}}function createQuery(){return new QueryList}function dirtyParentQueries(view){for(var queryIds=view.def.nodeMatchedQueries;view.parent&&isEmbeddedView(view);){var tplDef=view.parentNodeDef;view=view.parent;for(var end=tplDef.index+tplDef.childCount,i=0;i<=end;i++){var nodeDef=view.def.nodes[i];67108864&nodeDef.flags&&536870912&nodeDef.flags&&(nodeDef.query.filterId&queryIds)===nodeDef.query.filterId&&asQueryList(view,i).setDirty(),!(1&nodeDef.flags&&i+nodeDef.childCount<tplDef.index)&&67108864&nodeDef.childFlags&&536870912&nodeDef.childFlags||(i+=nodeDef.childCount)}}if(134217728&view.def.nodeFlags)for(var i=0;i<view.def.nodes.length;i++){var nodeDef=view.def.nodes[i];134217728&nodeDef.flags&&536870912&nodeDef.flags&&asQueryList(view,i).setDirty(),i+=nodeDef.childCount}}function checkAndUpdateQuery(view,nodeDef){var queryList=asQueryList(view,nodeDef.index);if(queryList.dirty){var directiveInstance,newValues=void 0;if(67108864&nodeDef.flags){var elementDef_1=nodeDef.parent.parent;newValues=calcQueryValues(view,elementDef_1.index,elementDef_1.index+elementDef_1.childCount,nodeDef.query,[]),directiveInstance=asProviderData(view,nodeDef.parent.index).instance}else 134217728&nodeDef.flags&&(newValues=calcQueryValues(view,0,view.def.nodes.length-1,nodeDef.query,[]),directiveInstance=view.component);queryList.reset(newValues);for(var bindings=nodeDef.query.bindings,notify=!1,i=0;i<bindings.length;i++){var binding=bindings[i],boundValue=void 0;switch(binding.bindingType){case 0:boundValue=queryList.first;break;case 1:boundValue=queryList,notify=!0}directiveInstance[binding.propName]=boundValue}notify&&queryList.notifyOnChanges()}}function calcQueryValues(view,startIndex,endIndex,queryDef,values){for(var i=startIndex;i<=endIndex;i++){var nodeDef=view.def.nodes[i],valueType=nodeDef.matchedQueries[queryDef.id];if(null!=valueType&&values.push(getQueryValue(view,nodeDef,valueType)),1&nodeDef.flags&&nodeDef.element.template&&(nodeDef.element.template.nodeMatchedQueries&queryDef.filterId)===queryDef.filterId){var elementData=asElementData(view,i);if(16777216&nodeDef.flags)for(var embeddedViews=elementData.viewContainer._embeddedViews,k=0;k<embeddedViews.length;k++){var embeddedView=embeddedViews[k],dvc=declaredViewContainer(embeddedView);dvc&&dvc===elementData&&calcQueryValues(embeddedView,0,embeddedView.def.nodes.length-1,queryDef,values)}var projectedViews=elementData.template._projectedViews;if(projectedViews)for(var k=0;k<projectedViews.length;k++){var projectedView=projectedViews[k];calcQueryValues(projectedView,0,projectedView.def.nodes.length-1,queryDef,values)}}(nodeDef.childMatchedQueries&queryDef.filterId)!==queryDef.filterId&&(i+=nodeDef.childCount)}return values}function getQueryValue(view,nodeDef,queryValueType){if(null!=queryValueType){var value=void 0;switch(queryValueType){case 1:value=asElementData(view,nodeDef.index).renderElement;break;case 0:value=new ElementRef(asElementData(view,nodeDef.index).renderElement);break;case 2:value=asElementData(view,nodeDef.index).template;break;case 3:value=asElementData(view,nodeDef.index).viewContainer;break;case 4:value=asProviderData(view,nodeDef.index).instance}return value}}function ngContentDef(ngContentIndex,index){return{index:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,flags:8,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:ngContentIndex,childCount:0,bindings:[],bindingFlags:0,outputs:[],element:null,provider:null,text:null,query:null,ngContent:{index:index}}}function appendNgContent(view,renderHost,def){var parentEl=getParentRenderElement(view,renderHost,def);if(parentEl){visitProjectedRenderNodes(view,def.ngContent.index,1,parentEl,null,void 0)}}function purePipeDef(argCount){return _pureExpressionDef(128,new Array(argCount+1))}function pureArrayDef(argCount){return _pureExpressionDef(32,new Array(argCount))}function pureObjectDef(propToIndex){for(var keys=Object.keys(propToIndex),nbKeys=keys.length,propertyNames=new Array(nbKeys),i=0;i<nbKeys;i++){var key=keys[i];propertyNames[propToIndex[key]]=key}return _pureExpressionDef(64,propertyNames)}function _pureExpressionDef(flags,propertyNames){for(var bindings=new Array(propertyNames.length),i=0;i<propertyNames.length;i++){var prop=propertyNames[i];bindings[i]={flags:8,name:prop,ns:null,nonMinifiedName:prop,securityContext:null,suffix:null}}return{index:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,flags:flags,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:-1,childCount:0,bindings:bindings,bindingFlags:calcBindingFlags(bindings),outputs:[],element:null,provider:null,text:null,query:null,ngContent:null}}function createPureExpression(view,def){return{value:void 0}}function checkAndUpdatePureExpressionInline(view,def,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9){var bindings=def.bindings,changed=!1,bindLen=bindings.length;if(bindLen>0&&checkAndUpdateBinding(view,def,0,v0)&&(changed=!0),bindLen>1&&checkAndUpdateBinding(view,def,1,v1)&&(changed=!0),bindLen>2&&checkAndUpdateBinding(view,def,2,v2)&&(changed=!0),bindLen>3&&checkAndUpdateBinding(view,def,3,v3)&&(changed=!0),bindLen>4&&checkAndUpdateBinding(view,def,4,v4)&&(changed=!0),bindLen>5&&checkAndUpdateBinding(view,def,5,v5)&&(changed=!0),bindLen>6&&checkAndUpdateBinding(view,def,6,v6)&&(changed=!0),bindLen>7&&checkAndUpdateBinding(view,def,7,v7)&&(changed=!0),bindLen>8&&checkAndUpdateBinding(view,def,8,v8)&&(changed=!0),bindLen>9&&checkAndUpdateBinding(view,def,9,v9)&&(changed=!0),changed){var data=asPureExpressionData(view,def.index),value=void 0;switch(201347067&def.flags){case 32:value=new Array(bindings.length),bindLen>0&&(value[0]=v0),bindLen>1&&(value[1]=v1),bindLen>2&&(value[2]=v2),bindLen>3&&(value[3]=v3),bindLen>4&&(value[4]=v4),bindLen>5&&(value[5]=v5),bindLen>6&&(value[6]=v6),bindLen>7&&(value[7]=v7),bindLen>8&&(value[8]=v8),bindLen>9&&(value[9]=v9);break;case 64:value={},bindLen>0&&(value[bindings[0].name]=v0),bindLen>1&&(value[bindings[1].name]=v1),bindLen>2&&(value[bindings[2].name]=v2),bindLen>3&&(value[bindings[3].name]=v3),bindLen>4&&(value[bindings[4].name]=v4),bindLen>5&&(value[bindings[5].name]=v5),bindLen>6&&(value[bindings[6].name]=v6),bindLen>7&&(value[bindings[7].name]=v7),bindLen>8&&(value[bindings[8].name]=v8),bindLen>9&&(value[bindings[9].name]=v9);break;case 128:var pipe=v0;switch(bindLen){case 1:value=pipe.transform(v0);break;case 2:value=pipe.transform(v1);break;case 3:value=pipe.transform(v1,v2);break;case 4:value=pipe.transform(v1,v2,v3);break;case 5:value=pipe.transform(v1,v2,v3,v4);break;case 6:value=pipe.transform(v1,v2,v3,v4,v5);break;case 7:value=pipe.transform(v1,v2,v3,v4,v5,v6);break;case 8:value=pipe.transform(v1,v2,v3,v4,v5,v6,v7);break;case 9:value=pipe.transform(v1,v2,v3,v4,v5,v6,v7,v8);break;case 10:value=pipe.transform(v1,v2,v3,v4,v5,v6,v7,v8,v9)}}data.value=value}return changed}function checkAndUpdatePureExpressionDynamic(view,def,values){for(var bindings=def.bindings,changed=!1,i=0;i<values.length;i++)checkAndUpdateBinding(view,def,i,values[i])&&(changed=!0);if(changed){var data=asPureExpressionData(view,def.index),value=void 0;switch(201347067&def.flags){case 32:value=values;break;case 64:value={};for(var i=0;i<values.length;i++)value[bindings[i].name]=values[i];break;case 128:var pipe=values[0],params=values.slice(1);value=pipe.transform.apply(pipe,params)}data.value=value}return changed}function textDef(ngContentIndex,constants){for(var bindings=new Array(constants.length-1),i=1;i<constants.length;i++)bindings[i-1]={flags:8,name:null,ns:null,nonMinifiedName:null,securityContext:null,suffix:constants[i]};return{index:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,flags:2,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:ngContentIndex,childCount:0,bindings:bindings,bindingFlags:calcBindingFlags(bindings),outputs:[],element:null,provider:null,text:{prefix:constants[0]},query:null,ngContent:null}}function createText(view,renderHost,def){var renderNode$$1,renderer=view.renderer;renderNode$$1=renderer.createText(def.text.prefix);var parentEl=getParentRenderElement(view,renderHost,def);return parentEl&&renderer.appendChild(parentEl,renderNode$$1),{renderText:renderNode$$1}}function checkAndUpdateTextInline(view,def,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9){var changed=!1,bindings=def.bindings,bindLen=bindings.length;if(bindLen>0&&checkAndUpdateBinding(view,def,0,v0)&&(changed=!0),bindLen>1&&checkAndUpdateBinding(view,def,1,v1)&&(changed=!0),bindLen>2&&checkAndUpdateBinding(view,def,2,v2)&&(changed=!0),bindLen>3&&checkAndUpdateBinding(view,def,3,v3)&&(changed=!0),bindLen>4&&checkAndUpdateBinding(view,def,4,v4)&&(changed=!0),bindLen>5&&checkAndUpdateBinding(view,def,5,v5)&&(changed=!0),bindLen>6&&checkAndUpdateBinding(view,def,6,v6)&&(changed=!0),bindLen>7&&checkAndUpdateBinding(view,def,7,v7)&&(changed=!0),bindLen>8&&checkAndUpdateBinding(view,def,8,v8)&&(changed=!0),bindLen>9&&checkAndUpdateBinding(view,def,9,v9)&&(changed=!0),changed){var value=def.text.prefix;bindLen>0&&(value+=_addInterpolationPart(v0,bindings[0])),bindLen>1&&(value+=_addInterpolationPart(v1,bindings[1])),bindLen>2&&(value+=_addInterpolationPart(v2,bindings[2])),bindLen>3&&(value+=_addInterpolationPart(v3,bindings[3])),bindLen>4&&(value+=_addInterpolationPart(v4,bindings[4])),bindLen>5&&(value+=_addInterpolationPart(v5,bindings[5])),bindLen>6&&(value+=_addInterpolationPart(v6,bindings[6])),bindLen>7&&(value+=_addInterpolationPart(v7,bindings[7])),bindLen>8&&(value+=_addInterpolationPart(v8,bindings[8])),bindLen>9&&(value+=_addInterpolationPart(v9,bindings[9]));var renderNode$$1=asTextData(view,def.index).renderText;view.renderer.setValue(renderNode$$1,value)}return changed}function checkAndUpdateTextDynamic(view,def,values){for(var bindings=def.bindings,changed=!1,i=0;i<values.length;i++)checkAndUpdateBinding(view,def,i,values[i])&&(changed=!0);if(changed){for(var value="",i=0;i<values.length;i++)value+=_addInterpolationPart(values[i],bindings[i]);value=def.text.prefix+value;var renderNode$$1=asTextData(view,def.index).renderText;view.renderer.setValue(renderNode$$1,value)}return changed}function _addInterpolationPart(value,binding){return(null!=value?value.toString():"")+binding.suffix}function viewDef(flags,nodes,updateDirectives,updateRenderer){for(var viewBindingCount=0,viewDisposableCount=0,viewNodeFlags=0,viewRootNodeFlags=0,viewMatchedQueries=0,currentParent=null,currentElementHasPublicProviders=!1,currentElementHasPrivateProviders=!1,lastRenderRootNode=null,i=0;i<nodes.length;i++){for(;currentParent&&i>currentParent.index+currentParent.childCount;){var newParent=currentParent.parent;newParent&&(newParent.childFlags|=currentParent.childFlags,newParent.childMatchedQueries|=currentParent.childMatchedQueries),currentParent=newParent}var node=nodes[i];node.index=i,node.parent=currentParent,node.bindingIndex=viewBindingCount,node.outputIndex=viewDisposableCount;var currentRenderParent=void 0;if(currentRenderParent=currentParent&&1¤tParent.flags&&!currentParent.element.name?currentParent.renderParent:currentParent,node.renderParent=currentRenderParent,node.element){var elDef=node.element;elDef.publicProviders=currentParent?currentParent.element.publicProviders:Object.create(null),elDef.allProviders=elDef.publicProviders,currentElementHasPublicProviders=!1,currentElementHasPrivateProviders=!1}if(validateNode(currentParent,node,nodes.length),viewNodeFlags|=node.flags,viewMatchedQueries|=node.matchedQueryIds,node.element&&node.element.template&&(viewMatchedQueries|=node.element.template.nodeMatchedQueries),currentParent?(currentParent.childFlags|=node.flags,currentParent.directChildFlags|=node.flags,currentParent.childMatchedQueries|=node.matchedQueryIds,node.element&&node.element.template&&(currentParent.childMatchedQueries|=node.element.template.nodeMatchedQueries)):viewRootNodeFlags|=node.flags,viewBindingCount+=node.bindings.length,viewDisposableCount+=node.outputs.length,!currentRenderParent&&3&node.flags&&(lastRenderRootNode=node),20224&node.flags){currentElementHasPublicProviders||(currentElementHasPublicProviders=!0,currentParent.element.publicProviders=Object.create(currentParent.element.publicProviders),currentParent.element.allProviders=currentParent.element.publicProviders);var isPrivateService=0!=(8192&node.flags),isComponent=0!=(32768&node.flags);!isPrivateService||isComponent?currentParent.element.publicProviders[tokenKey(node.provider.token)]=node:(currentElementHasPrivateProviders||(currentElementHasPrivateProviders=!0,currentParent.element.allProviders=Object.create(currentParent.element.publicProviders)),currentParent.element.allProviders[tokenKey(node.provider.token)]=node),isComponent&&(currentParent.element.componentProvider=node)}node.childCount&&(currentParent=node)}for(;currentParent;){var newParent=currentParent.parent;newParent&&(newParent.childFlags|=currentParent.childFlags,newParent.childMatchedQueries|=currentParent.childMatchedQueries),currentParent=newParent}var handleEvent=function(view,nodeIndex,eventName,event){return nodes[nodeIndex].element.handleEvent(view,eventName,event)};return{factory:null,nodeFlags:viewNodeFlags,rootNodeFlags:viewRootNodeFlags,nodeMatchedQueries:viewMatchedQueries,flags:flags,nodes:nodes,updateDirectives:updateDirectives||NOOP,updateRenderer:updateRenderer||NOOP,handleEvent:handleEvent||NOOP,bindingCount:viewBindingCount,outputCount:viewDisposableCount,lastRenderRootNode:lastRenderRootNode}}function validateNode(parent,node,nodeCount){var template=node.element&&node.element.template;if(template){if(!template.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(template.lastRenderRootNode&&16777216&template.lastRenderRootNode.flags)throw new Error("Illegal State: Last root node of a template can't have embedded views, at index "+node.index+"!")}if(20224&node.flags){if(0==(1&(parent?parent.flags:0)))throw new Error("Illegal State: Provider/Directive nodes need to be children of elements or anchors, at index "+node.index+"!")}if(node.query){if(67108864&node.flags&&(!parent||0==(16384&parent.flags)))throw new Error("Illegal State: Content Query nodes need to be children of directives, at index "+node.index+"!");if(134217728&node.flags&&parent)throw new Error("Illegal State: View Query nodes have to be top level nodes, at index "+node.index+"!")}if(node.childCount){var parentEnd=parent?parent.index+parent.childCount:nodeCount-1;if(node.index<=parentEnd&&node.index+node.childCount>parentEnd)throw new Error("Illegal State: childCount of node leads outside of parent, at index "+node.index+"!")}}function createEmbeddedView(parent,anchorDef$$1,viewDef,context){var view=createView(parent.root,parent.renderer,parent,anchorDef$$1,viewDef);return initView(view,parent.component,context),createViewNodes(view),view}function createRootView(root,def,context){var view=createView(root,root.renderer,null,null,def);return initView(view,context,context),createViewNodes(view),view}function createComponentView(parentView,nodeDef,viewDef,hostElement){var compRenderer,rendererType=nodeDef.element.componentRendererType;return compRenderer=rendererType?parentView.root.rendererFactory.createRenderer(hostElement,rendererType):parentView.root.renderer,createView(parentView.root,compRenderer,parentView,nodeDef.element.componentProvider,viewDef)}function createView(root,renderer,parent,parentNodeDef,def){var nodes=new Array(def.nodes.length),disposables=def.outputCount?new Array(def.outputCount):null;return{def:def,parent:parent,viewContainerParent:null,parentNodeDef:parentNodeDef,context:null,component:null,nodes:nodes,state:13,root:root,renderer:renderer,oldValues:new Array(def.bindingCount),disposables:disposables}}function initView(view,component,context){view.component=component,view.context=context}function createViewNodes(view){var renderHost;if(isComponentView(view)){var hostDef=view.parentNodeDef;renderHost=asElementData(view.parent,hostDef.parent.index).renderElement}for(var def=view.def,nodes=view.nodes,i=0;i<def.nodes.length;i++){var nodeDef=def.nodes[i];Services.setCurrentNode(view,i);var nodeData=void 0;switch(201347067&nodeDef.flags){case 1:var el=createElement(view,renderHost,nodeDef),componentView=void 0;if(33554432&nodeDef.flags){var compViewDef=resolveDefinition(nodeDef.element.componentView);componentView=Services.createComponentView(view,nodeDef,compViewDef,el)}listenToElementOutputs(view,componentView,nodeDef,el),nodeData={renderElement:el,componentView:componentView,viewContainer:null,template:nodeDef.element.template?createTemplateData(view,nodeDef):void 0},16777216&nodeDef.flags&&(nodeData.viewContainer=createViewContainerData(view,nodeDef,nodeData));break;case 2:nodeData=createText(view,renderHost,nodeDef);break;case 512:case 1024:case 2048:case 256:var instance=createProviderInstance(view,nodeDef);nodeData={instance:instance};break;case 16:var instance=createPipeInstance(view,nodeDef);nodeData={instance:instance};break;case 16384:var instance=createDirectiveInstance(view,nodeDef);if(nodeData={instance:instance},32768&nodeDef.flags){initView(asElementData(view,nodeDef.parent.index).componentView,instance,instance)}break;case 32:case 64:case 128:nodeData=createPureExpression(view,nodeDef);break;case 67108864:case 134217728:nodeData=createQuery();break;case 8:appendNgContent(view,renderHost,nodeDef),nodeData=void 0}nodes[i]=nodeData}execComponentViewsAction(view,ViewAction.CreateViewNodes),execQueriesAction(view,201326592,268435456,0)}function checkNoChangesView(view){markProjectedViewsForCheck(view),Services.updateDirectives(view,1),execEmbeddedViewsAction(view,ViewAction.CheckNoChanges),Services.updateRenderer(view,1),execComponentViewsAction(view,ViewAction.CheckNoChanges),view.state&=-97}function checkAndUpdateView(view){1&view.state?(view.state&=-2,view.state|=2):view.state&=-3,markProjectedViewsForCheck(view),Services.updateDirectives(view,0),execEmbeddedViewsAction(view,ViewAction.CheckAndUpdate),execQueriesAction(view,67108864,536870912,0),callLifecycleHooksChildrenFirst(view,2097152|(2&view.state?1048576:0)),Services.updateRenderer(view,0),execComponentViewsAction(view,ViewAction.CheckAndUpdate),execQueriesAction(view,134217728,536870912,0),callLifecycleHooksChildrenFirst(view,8388608|(2&view.state?4194304:0)),2&view.def.flags&&(view.state&=-9),view.state&=-97}function checkAndUpdateNode(view,nodeDef,argStyle,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9){return 0===argStyle?checkAndUpdateNodeInline(view,nodeDef,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9):checkAndUpdateNodeDynamic(view,nodeDef,v0)}function markProjectedViewsForCheck(view){var def=view.def;if(4&def.nodeFlags)for(var i=0;i<def.nodes.length;i++){var nodeDef=def.nodes[i];if(4&nodeDef.flags){var projectedViews=asElementData(view,i).template._projectedViews;if(projectedViews)for(var i_1=0;i_1<projectedViews.length;i_1++){var projectedView=projectedViews[i_1];projectedView.state|=32,markParentViewsForCheckProjectedViews(projectedView,view)}}else 0==(4&nodeDef.childFlags)&&(i+=nodeDef.childCount)}}function checkAndUpdateNodeInline(view,nodeDef,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9){var changed=!1;switch(201347067&nodeDef.flags){case 1:changed=checkAndUpdateElementInline(view,nodeDef,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9);break;case 2:changed=checkAndUpdateTextInline(view,nodeDef,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9);break;case 16384:changed=checkAndUpdateDirectiveInline(view,nodeDef,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9);break;case 32:case 64:case 128:changed=checkAndUpdatePureExpressionInline(view,nodeDef,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9)}return changed}function checkAndUpdateNodeDynamic(view,nodeDef,values){var changed=!1;switch(201347067&nodeDef.flags){case 1:changed=checkAndUpdateElementDynamic(view,nodeDef,values);break;case 2:changed=checkAndUpdateTextDynamic(view,nodeDef,values);break;case 16384:changed=checkAndUpdateDirectiveDynamic(view,nodeDef,values);break;case 32:case 64:case 128:changed=checkAndUpdatePureExpressionDynamic(view,nodeDef,values)}if(changed)for(var bindLen=nodeDef.bindings.length,bindingStart=nodeDef.bindingIndex,oldValues=view.oldValues,i=0;i<bindLen;i++)oldValues[bindingStart+i]=values[i];return changed}function checkNoChangesNode(view,nodeDef,argStyle,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9){return 0===argStyle?checkNoChangesNodeInline(view,nodeDef,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9):checkNoChangesNodeDynamic(view,nodeDef,v0),!1}function checkNoChangesNodeInline(view,nodeDef,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9){var bindLen=nodeDef.bindings.length;bindLen>0&&checkBindingNoChanges(view,nodeDef,0,v0),bindLen>1&&checkBindingNoChanges(view,nodeDef,1,v1),bindLen>2&&checkBindingNoChanges(view,nodeDef,2,v2),bindLen>3&&checkBindingNoChanges(view,nodeDef,3,v3),bindLen>4&&checkBindingNoChanges(view,nodeDef,4,v4),bindLen>5&&checkBindingNoChanges(view,nodeDef,5,v5),bindLen>6&&checkBindingNoChanges(view,nodeDef,6,v6),bindLen>7&&checkBindingNoChanges(view,nodeDef,7,v7),bindLen>8&&checkBindingNoChanges(view,nodeDef,8,v8),bindLen>9&&checkBindingNoChanges(view,nodeDef,9,v9)}function checkNoChangesNodeDynamic(view,nodeDef,values){for(var i=0;i<values.length;i++)checkBindingNoChanges(view,nodeDef,i,values[i])}function checkNoChangesQuery(view,nodeDef){if(asQueryList(view,nodeDef.index).dirty)throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view,nodeDef.index),"Query "+nodeDef.query.id+" not dirty","Query "+nodeDef.query.id+" dirty",0!=(1&view.state))}function destroyView(view){if(!(128&view.state)){if(execEmbeddedViewsAction(view,ViewAction.Destroy),execComponentViewsAction(view,ViewAction.Destroy),callLifecycleHooksChildrenFirst(view,131072),view.disposables)for(var i=0;i<view.disposables.length;i++)view.disposables[i]();detachProjectedView(view),view.renderer.destroyNode&&destroyViewNodes(view),isComponentView(view)&&view.renderer.destroy(),view.state|=128}}function destroyViewNodes(view){for(var len=view.def.nodes.length,i=0;i<len;i++){var def=view.def.nodes[i];1&def.flags?view.renderer.destroyNode(asElementData(view,i).renderElement):2&def.flags&&view.renderer.destroyNode(asTextData(view,i).renderText)}}function execComponentViewsAction(view,action){var def=view.def;if(33554432&def.nodeFlags)for(var i=0;i<def.nodes.length;i++){var nodeDef=def.nodes[i];33554432&nodeDef.flags?callViewAction(asElementData(view,i).componentView,action):0==(33554432&nodeDef.childFlags)&&(i+=nodeDef.childCount)}}function execEmbeddedViewsAction(view,action){var def=view.def;if(16777216&def.nodeFlags)for(var i=0;i<def.nodes.length;i++){var nodeDef=def.nodes[i];if(16777216&nodeDef.flags)for(var embeddedViews=asElementData(view,i).viewContainer._embeddedViews,k=0;k<embeddedViews.length;k++)callViewAction(embeddedViews[k],action);else 0==(16777216&nodeDef.childFlags)&&(i+=nodeDef.childCount)}}function callViewAction(view,action){var viewState=view.state;switch(action){case ViewAction.CheckNoChanges:0==(128&viewState)&&(12==(12&viewState)?checkNoChangesView(view):64&viewState&&execProjectedViewsAction(view,ViewAction.CheckNoChangesProjectedViews));break;case ViewAction.CheckNoChangesProjectedViews:0==(128&viewState)&&(32&viewState?checkNoChangesView(view):64&viewState&&execProjectedViewsAction(view,action));break;case ViewAction.CheckAndUpdate:0==(128&viewState)&&(12==(12&viewState)?checkAndUpdateView(view):64&viewState&&execProjectedViewsAction(view,ViewAction.CheckAndUpdateProjectedViews));break;case ViewAction.CheckAndUpdateProjectedViews:0==(128&viewState)&&(32&viewState?checkAndUpdateView(view):64&viewState&&execProjectedViewsAction(view,action));break;case ViewAction.Destroy:destroyView(view);break;case ViewAction.CreateViewNodes:createViewNodes(view)}}function execProjectedViewsAction(view,action){execEmbeddedViewsAction(view,action),execComponentViewsAction(view,action)}function execQueriesAction(view,queryFlags,staticDynamicQueryFlag,checkType){if(view.def.nodeFlags&queryFlags&&view.def.nodeFlags&staticDynamicQueryFlag)for(var nodeCount=view.def.nodes.length,i=0;i<nodeCount;i++){var nodeDef=view.def.nodes[i];if(nodeDef.flags&queryFlags&&nodeDef.flags&staticDynamicQueryFlag)switch(Services.setCurrentNode(view,nodeDef.index),checkType){case 0:checkAndUpdateQuery(view,nodeDef);break;case 1:checkNoChangesQuery(view,nodeDef)}nodeDef.childFlags&queryFlags&&nodeDef.childFlags&staticDynamicQueryFlag||(i+=nodeDef.childCount)}}function initServicesIfNeeded(){if(!initialized){initialized=!0;var services=isDevMode()?createDebugServices():createProdServices();Services.setCurrentNode=services.setCurrentNode,Services.createRootView=services.createRootView,Services.createEmbeddedView=services.createEmbeddedView,Services.createComponentView=services.createComponentView,Services.createNgModuleRef=services.createNgModuleRef,Services.overrideProvider=services.overrideProvider,Services.clearProviderOverrides=services.clearProviderOverrides,Services.checkAndUpdateView=services.checkAndUpdateView,Services.checkNoChangesView=services.checkNoChangesView,Services.destroyView=services.destroyView,Services.resolveDep=resolveDep,Services.createDebugContext=services.createDebugContext,Services.handleEvent=services.handleEvent,Services.updateDirectives=services.updateDirectives,Services.updateRenderer=services.updateRenderer,Services.dirtyParentQueries=dirtyParentQueries}}function createProdServices(){return{setCurrentNode:function(){},createRootView:createProdRootView,createEmbeddedView:createEmbeddedView,createComponentView:createComponentView,createNgModuleRef:createNgModuleRef,overrideProvider:NOOP,clearProviderOverrides:NOOP,checkAndUpdateView:checkAndUpdateView,checkNoChangesView:checkNoChangesView,destroyView:destroyView,createDebugContext:function(view,nodeIndex){return new DebugContext_(view,nodeIndex)},handleEvent:function(view,nodeIndex,eventName,event){return view.def.handleEvent(view,nodeIndex,eventName,event)},updateDirectives:function(view,checkType){return view.def.updateDirectives(0===checkType?prodCheckAndUpdateNode:prodCheckNoChangesNode,view)},updateRenderer:function(view,checkType){return view.def.updateRenderer(0===checkType?prodCheckAndUpdateNode:prodCheckNoChangesNode,view)}}}function createDebugServices(){return{setCurrentNode:debugSetCurrentNode,createRootView:debugCreateRootView,createEmbeddedView:debugCreateEmbeddedView,createComponentView:debugCreateComponentView,createNgModuleRef:debugCreateNgModuleRef,overrideProvider:debugOverrideProvider,clearProviderOverrides:debugClearProviderOverrides,checkAndUpdateView:debugCheckAndUpdateView,checkNoChangesView:debugCheckNoChangesView,destroyView:debugDestroyView,createDebugContext:function(view,nodeIndex){return new DebugContext_(view,nodeIndex)},handleEvent:debugHandleEvent,updateDirectives:debugUpdateDirectives,updateRenderer:debugUpdateRenderer}}function createProdRootView(elInjector,projectableNodes,rootSelectorOrNode,def,ngModule,context){return createRootView(createRootData(elInjector,ngModule,ngModule.injector.get(RendererFactory2),projectableNodes,rootSelectorOrNode),def,context)}function debugCreateRootView(elInjector,projectableNodes,rootSelectorOrNode,def,ngModule,context){var rendererFactory=ngModule.injector.get(RendererFactory2),root=createRootData(elInjector,ngModule,new DebugRendererFactory2(rendererFactory),projectableNodes,rootSelectorOrNode),defWithOverride=applyProviderOverridesToView(def);return callWithDebugContext(DebugAction.create,createRootView,null,[root,defWithOverride,context])}function createRootData(elInjector,ngModule,rendererFactory,projectableNodes,rootSelectorOrNode){var sanitizer=ngModule.injector.get(Sanitizer),errorHandler=ngModule.injector.get(ErrorHandler);return{ngModule:ngModule,injector:elInjector,projectableNodes:projectableNodes,selectorOrNode:rootSelectorOrNode,sanitizer:sanitizer,rendererFactory:rendererFactory,renderer:rendererFactory.createRenderer(null,null),errorHandler:errorHandler}}function debugCreateEmbeddedView(parentView,anchorDef,viewDef$$1,context){var defWithOverride=applyProviderOverridesToView(viewDef$$1);return callWithDebugContext(DebugAction.create,createEmbeddedView,null,[parentView,anchorDef,defWithOverride,context])}function debugCreateComponentView(parentView,nodeDef,viewDef$$1,hostElement){var defWithOverride=applyProviderOverridesToView(viewDef$$1);return callWithDebugContext(DebugAction.create,createComponentView,null,[parentView,nodeDef,defWithOverride,hostElement])}function debugCreateNgModuleRef(moduleType,parentInjector,bootstrapComponents,def){return createNgModuleRef(moduleType,parentInjector,bootstrapComponents,applyProviderOverridesToNgModule(def))}function debugOverrideProvider(override){providerOverrides.set(override.token,override)}function debugClearProviderOverrides(){providerOverrides.clear()}function applyProviderOverridesToView(def){function findElementIndicesWithOverwrittenProviders(def){for(var elIndicesWithOverwrittenProviders=[],lastElementDef=null,i=0;i<def.nodes.length;i++){var nodeDef=def.nodes[i];1&nodeDef.flags&&(lastElementDef=nodeDef),lastElementDef&&3840&nodeDef.flags&&providerOverrides.has(nodeDef.provider.token)&&(elIndicesWithOverwrittenProviders.push(lastElementDef.index),lastElementDef=null)}return elIndicesWithOverwrittenProviders}function applyProviderOverridesToElement(viewDef$$1,elIndex){for(var i=elIndex+1;i<viewDef$$1.nodes.length;i++){var nodeDef=viewDef$$1.nodes[i];if(1&nodeDef.flags)return;if(3840&nodeDef.flags){nodeDef.flags|=4096;var provider=nodeDef.provider,override=providerOverrides.get(provider.token);override&&(nodeDef.flags=-3841&nodeDef.flags|override.flags,provider.deps=splitDepsDsl(override.deps),provider.value=override.value)}}}if(0===providerOverrides.size)return def;var elementIndicesWithOverwrittenProviders=findElementIndicesWithOverwrittenProviders(def);if(0===elementIndicesWithOverwrittenProviders.length)return def;def=def.factory(function(){return NOOP});for(var i=0;i<elementIndicesWithOverwrittenProviders.length;i++)applyProviderOverridesToElement(def,elementIndicesWithOverwrittenProviders[i]);return def}function applyProviderOverridesToNgModule(def){function hasOverrrides(def){return def.providers.some(function(node){return!!(3840&node.flags)&&providerOverrides.has(node.token)})}function applyProviderOverrides(def){for(var i=0;i<def.providers.length;i++){var provider=def.providers[i];provider.flags|=4096;var override=providerOverrides.get(provider.token);override&&(provider.flags=-3841&provider.flags|override.flags,provider.deps=splitDepsDsl(override.deps),provider.value=override.value)}}return 0!==providerOverrides.size&&hasOverrrides(def)?(def=def.factory(function(){return NOOP}),applyProviderOverrides(def),def):def}function prodCheckAndUpdateNode(view,nodeIndex,argStyle,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9){var nodeDef=view.def.nodes[nodeIndex];return checkAndUpdateNode(view,nodeDef,argStyle,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9),224&nodeDef.flags?asPureExpressionData(view,nodeIndex).value:void 0}function prodCheckNoChangesNode(view,nodeIndex,argStyle,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9){var nodeDef=view.def.nodes[nodeIndex];return checkNoChangesNode(view,nodeDef,argStyle,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9),224&nodeDef.flags?asPureExpressionData(view,nodeIndex).value:void 0}function debugCheckAndUpdateView(view){return callWithDebugContext(DebugAction.detectChanges,checkAndUpdateView,null,[view])}function debugCheckNoChangesView(view){return callWithDebugContext(DebugAction.checkNoChanges,checkNoChangesView,null,[view])}function debugDestroyView(view){return callWithDebugContext(DebugAction.destroy,destroyView,null,[view])}function debugSetCurrentNode(view,nodeIndex){_currentView=view,_currentNodeIndex=nodeIndex}function debugHandleEvent(view,nodeIndex,eventName,event){return debugSetCurrentNode(view,nodeIndex),callWithDebugContext(DebugAction.handleEvent,view.def.handleEvent,null,[view,nodeIndex,eventName,event])}function debugUpdateDirectives(view,checkType){function debugCheckDirectivesFn(view,nodeIndex,argStyle){for(var values=[],_i=3;_i<arguments.length;_i++)values[_i-3]=arguments[_i];var nodeDef=view.def.nodes[nodeIndex];return 0===checkType?debugCheckAndUpdateNode(view,nodeDef,argStyle,values):debugCheckNoChangesNode(view,nodeDef,argStyle,values),16384&nodeDef.flags&&debugSetCurrentNode(view,nextDirectiveWithBinding(view,nodeIndex)),224&nodeDef.flags?asPureExpressionData(view,nodeDef.index).value:void 0}if(128&view.state)throw viewDestroyedError(DebugAction[_currentAction]);return debugSetCurrentNode(view,nextDirectiveWithBinding(view,0)),view.def.updateDirectives(debugCheckDirectivesFn,view)}function debugUpdateRenderer(view,checkType){function debugCheckRenderNodeFn(view,nodeIndex,argStyle){for(var values=[],_i=3;_i<arguments.length;_i++)values[_i-3]=arguments[_i];var nodeDef=view.def.nodes[nodeIndex];return 0===checkType?debugCheckAndUpdateNode(view,nodeDef,argStyle,values):debugCheckNoChangesNode(view,nodeDef,argStyle,values),3&nodeDef.flags&&debugSetCurrentNode(view,nextRenderNodeWithBinding(view,nodeIndex)),224&nodeDef.flags?asPureExpressionData(view,nodeDef.index).value:void 0}if(128&view.state)throw viewDestroyedError(DebugAction[_currentAction]);return debugSetCurrentNode(view,nextRenderNodeWithBinding(view,0)),view.def.updateRenderer(debugCheckRenderNodeFn,view)}function debugCheckAndUpdateNode(view,nodeDef,argStyle,givenValues){if(checkAndUpdateNode.apply(void 0,[view,nodeDef,argStyle].concat(givenValues))){var values=1===argStyle?givenValues[0]:givenValues;if(16384&nodeDef.flags){for(var bindingValues={},i=0;i<nodeDef.bindings.length;i++){var binding=nodeDef.bindings[i],value=values[i];8&binding.flags&&(bindingValues[normalizeDebugBindingName(binding.nonMinifiedName)]=normalizeDebugBindingValue(value))}var elDef=nodeDef.parent,el=asElementData(view,elDef.index).renderElement;if(elDef.element.name)for(var attr in bindingValues){var value=bindingValues[attr];null!=value?view.renderer.setAttribute(el,attr,value):view.renderer.removeAttribute(el,attr)}else view.renderer.setValue(el,"bindings="+JSON.stringify(bindingValues,null,2))}}}function debugCheckNoChangesNode(view,nodeDef,argStyle,values){checkNoChangesNode.apply(void 0,[view,nodeDef,argStyle].concat(values))}function normalizeDebugBindingName(name){return"ng-reflect-"+(name=camelCaseToDashCase(name.replace(/[$@]/g,"_")))}function camelCaseToDashCase(input){return input.replace(CAMEL_CASE_REGEXP,function(){for(var m=[],_i=0;_i<arguments.length;_i++)m[_i]=arguments[_i];return"-"+m[1].toLowerCase()})}function normalizeDebugBindingValue(value){try{return null!=value?value.toString().slice(0,30):value}catch(e){return"[ERROR] Exception while trying to serialize the value"}}function nextDirectiveWithBinding(view,nodeIndex){for(var i=nodeIndex;i<view.def.nodes.length;i++){var nodeDef=view.def.nodes[i];if(16384&nodeDef.flags&&nodeDef.bindings&&nodeDef.bindings.length)return i}return null}function nextRenderNodeWithBinding(view,nodeIndex){for(var i=nodeIndex;i<view.def.nodes.length;i++){var nodeDef=view.def.nodes[i];if(3&nodeDef.flags&&nodeDef.bindings&&nodeDef.bindings.length)return i}return null}function getRenderNodeIndex(viewDef$$1,nodeIndex){for(var renderNodeIndex=-1,i=0;i<=nodeIndex;i++){3&viewDef$$1.nodes[i].flags&&renderNodeIndex++}return renderNodeIndex}function findHostElement(view){for(;view&&!isComponentView(view);)view=view.parent;return view.parent?asElementData(view.parent,viewParentEl(view).index):null}function collectReferences(view,nodeDef,references){for(var refName in nodeDef.references)references[refName]=getQueryValue(view,nodeDef,nodeDef.references[refName])}function callWithDebugContext(action,fn,self,args){var oldAction=_currentAction,oldView=_currentView,oldNodeIndex=_currentNodeIndex;try{_currentAction=action;var result=fn.apply(self,args);return _currentView=oldView,_currentNodeIndex=oldNodeIndex,_currentAction=oldAction,result}catch(e){if(isViewDebugError(e)||!_currentView)throw e;throw viewWrappedDebugError(e,getCurrentDebugContext())}}function getCurrentDebugContext(){return _currentView?new DebugContext_(_currentView,_currentNodeIndex):null}function overrideProvider(override){return initServicesIfNeeded(),Services.overrideProvider(override)}function clearProviderOverrides(){return initServicesIfNeeded(),Services.clearProviderOverrides()}function createNgModuleFactory(ngModuleType,bootstrapComponents,defFactory){return new NgModuleFactory_(ngModuleType,bootstrapComponents,defFactory)}function trigger$1(name,definitions){return{type:7,name:name,definitions:definitions,options:{}}}function animate$1(timings,styles){return void 0===styles&&(styles=null),{type:4,styles:styles,timings:timings}}function group$1(steps,options){return void 0===options&&(options=null),{type:3,steps:steps,options:options}}function sequence$1(steps,options){return void 0===options&&(options=null),{type:2,steps:steps,options:options}}function style$1(tokens){return{type:6,styles:tokens,offset:null}}function state$1(name,styles){return{type:0,name:name,styles:styles}}function keyframes$1(steps){return{type:5,steps:steps}}function transition$1(stateChangeExpr,steps,options){return void 0===options&&(options=null),{type:1,expr:stateChangeExpr,animation:steps,options:options}}function trigger$$1(name,definitions){return trigger$1(name,definitions)}function animate$$1(timings,styles){return animate$1(timings,styles)}function group$$1(steps){return group$1(steps)}function sequence$$1(steps){return sequence$1(steps)}function style$$1(tokens){return style$1(tokens)}function state$$1(name,styles){return state$1(name,styles)}function keyframes$$1(steps){return keyframes$1(steps)}function transition$$1(stateChangeExpr,steps){return transition$1(stateChangeExpr,steps)}var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])},OpaqueToken=function(){function OpaqueToken(_desc){this._desc=_desc}return OpaqueToken.prototype.toString=function(){return"Token "+this._desc},OpaqueToken}(),InjectionToken=function(_super){function InjectionToken(desc){return _super.call(this,desc)||this}return __extends(InjectionToken,_super),InjectionToken.prototype.toString=function(){return"InjectionToken "+this._desc},InjectionToken}(OpaqueToken),__window="undefined"!=typeof window&&window,__self="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,__global="undefined"!=typeof global&&global,_global=__window||__global||__self,_symbolIterator=null,_nextClassId=0,Reflect$1=_global.Reflect,ANALYZE_FOR_ENTRY_COMPONENTS=new InjectionToken("AnalyzeForEntryComponents"),Attribute=makeParamDecorator("Attribute",function(attributeName){return{attributeName:attributeName}}),Query=function(){function Query(){}return Query}(),ContentChildren=makePropDecorator("ContentChildren",function(selector,data){return void 0===data&&(data={}),Object.assign({selector:selector,first:!1,isViewQuery:!1,descendants:!1},data)},Query),ContentChild=makePropDecorator("ContentChild",function(selector,data){return void 0===data&&(data={}),Object.assign({selector:selector,first:!0,isViewQuery:!1,descendants:!0},data)},Query),ViewChildren=makePropDecorator("ViewChildren",function(selector,data){return void 0===data&&(data={}),Object.assign({selector:selector,first:!1,isViewQuery:!0,descendants:!0},data)},Query),ViewChild=makePropDecorator("ViewChild",function(selector,data){return Object.assign({selector:selector,first:!0,isViewQuery:!0,descendants:!0},data)},Query),ChangeDetectionStrategy={};ChangeDetectionStrategy.OnPush=0,ChangeDetectionStrategy.Default=1,ChangeDetectionStrategy[ChangeDetectionStrategy.OnPush]="OnPush",ChangeDetectionStrategy[ChangeDetectionStrategy.Default]="Default";var ChangeDetectorStatus={};ChangeDetectorStatus.CheckOnce=0,ChangeDetectorStatus.Checked=1,ChangeDetectorStatus.CheckAlways=2,ChangeDetectorStatus.Detached=3,ChangeDetectorStatus.Errored=4,ChangeDetectorStatus.Destroyed=5,ChangeDetectorStatus[ChangeDetectorStatus.CheckOnce]="CheckOnce",ChangeDetectorStatus[ChangeDetectorStatus.Checked]="Checked",ChangeDetectorStatus[ChangeDetectorStatus.CheckAlways]="CheckAlways",ChangeDetectorStatus[ChangeDetectorStatus.Detached]="Detached",ChangeDetectorStatus[ChangeDetectorStatus.Errored]="Errored",ChangeDetectorStatus[ChangeDetectorStatus.Destroyed]="Destroyed";var Directive=makeDecorator("Directive",function(dir){return void 0===dir&&(dir={}),dir}),Component=makeDecorator("Component",function(c){return void 0===c&&(c={}),Object.assign({changeDetection:ChangeDetectionStrategy.Default},c)},Directive),Pipe=makeDecorator("Pipe",function(p){return Object.assign({pure:!0},p)}),Input=makePropDecorator("Input",function(bindingPropertyName){return{bindingPropertyName:bindingPropertyName}}),Output=makePropDecorator("Output",function(bindingPropertyName){return{bindingPropertyName:bindingPropertyName}}),HostBinding=makePropDecorator("HostBinding",function(hostPropertyName){return{hostPropertyName:hostPropertyName}}),HostListener=makePropDecorator("HostListener",function(eventName,args){return{eventName:eventName,args:args}}),CUSTOM_ELEMENTS_SCHEMA={name:"custom-elements"},NO_ERRORS_SCHEMA={name:"no-errors-schema"},NgModule=makeDecorator("NgModule",function(ngModule){return ngModule}),ViewEncapsulation={};ViewEncapsulation.Emulated=0,ViewEncapsulation.Native=1,ViewEncapsulation.None=2,ViewEncapsulation[ViewEncapsulation.Emulated]="Emulated",ViewEncapsulation[ViewEncapsulation.Native]="Native",ViewEncapsulation[ViewEncapsulation.None]="None";var ViewMetadata=function(){function ViewMetadata(opts){void 0===opts&&(opts={}),this.templateUrl=opts.templateUrl,this.template=opts.template,this.styleUrls=opts.styleUrls,this.styles=opts.styles,this.encapsulation=opts.encapsulation,this.animations=opts.animations,this.interpolation=opts.interpolation}return ViewMetadata}(),Version=function(){function Version(full){this.full=full}return Object.defineProperty(Version.prototype,"major",{get:function(){return this.full.split(".")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(Version.prototype,"minor",{get:function(){return this.full.split(".")[1]},enumerable:!0,configurable:!0}),Object.defineProperty(Version.prototype,"patch",{get:function(){return this.full.split(".").slice(2).join(".")},enumerable:!0,configurable:!0}),Version}(),VERSION=new Version("4.2.6"),Inject=makeParamDecorator("Inject",function(token){return{token:token}}),Optional=makeParamDecorator("Optional"),Injectable=makeDecorator("Injectable"),Self=makeParamDecorator("Self"),SkipSelf=makeParamDecorator("SkipSelf"),Host=makeParamDecorator("Host"),_THROW_IF_NOT_FOUND=new Object,THROW_IF_NOT_FOUND=_THROW_IF_NOT_FOUND,_NullInjector=function(){function _NullInjector(){}return _NullInjector.prototype.get=function(token,notFoundValue){if(void 0===notFoundValue&&(notFoundValue=_THROW_IF_NOT_FOUND),notFoundValue===_THROW_IF_NOT_FOUND)throw new Error("No provider for "+stringify(token)+"!");return notFoundValue},_NullInjector}(),Injector=function(){function Injector(){}return Injector.prototype.get=function(token,notFoundValue){},Injector.prototype.get=function(token,notFoundValue){},Injector}();Injector.THROW_IF_NOT_FOUND=_THROW_IF_NOT_FOUND,Injector.NULL=new _NullInjector;var ERROR_COMPONENT_TYPE="ngComponentType",ERROR_DEBUG_CONTEXT="ngDebugContext",ERROR_ORIGINAL_ERROR="ngOriginalError",ERROR_LOGGER="ngErrorLogger",ErrorHandler=function(){function ErrorHandler(deprecatedParameter){this._console=console}return ErrorHandler.prototype.handleError=function(error){var originalError=this._findOriginalError(error),context=this._findContext(error),errorLogger=getErrorLogger(error);errorLogger(this._console,"ERROR",error),originalError&&errorLogger(this._console,"ORIGINAL ERROR",originalError),context&&errorLogger(this._console,"ERROR CONTEXT",context)},ErrorHandler.prototype._findContext=function(error){return error?getDebugContext(error)?getDebugContext(error):this._findContext(getOriginalError(error)):null},ErrorHandler.prototype._findOriginalError=function(error){for(var e=getOriginalError(error);e&&getOriginalError(e);)e=getOriginalError(e);return e},ErrorHandler}(),ReflectiveKey=function(){function ReflectiveKey(token,id){if(this.token=token,this.id=id,!token)throw new Error("Token must be defined!")}return Object.defineProperty(ReflectiveKey.prototype,"displayName",{get:function(){return stringify(this.token)},enumerable:!0,configurable:!0}),ReflectiveKey.get=function(token){return _globalKeyRegistry.get(resolveForwardRef(token))},Object.defineProperty(ReflectiveKey,"numberOfKeys",{get:function(){return _globalKeyRegistry.numberOfKeys},enumerable:!0,configurable:!0}),ReflectiveKey}(),KeyRegistry=function(){function KeyRegistry(){this._allKeys=new Map}return KeyRegistry.prototype.get=function(token){if(token instanceof ReflectiveKey)return token;if(this._allKeys.has(token))return this._allKeys.get(token);var newKey=new ReflectiveKey(token,ReflectiveKey.numberOfKeys);return this._allKeys.set(token,newKey),newKey},Object.defineProperty(KeyRegistry.prototype,"numberOfKeys",{get:function(){return this._allKeys.size},enumerable:!0,configurable:!0}),KeyRegistry}(),_globalKeyRegistry=new KeyRegistry,Type=Function,DELEGATE_CTOR=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*arguments\)/,ReflectionCapabilities=function(){function ReflectionCapabilities(reflect){this._reflect=reflect||_global.Reflect}return ReflectionCapabilities.prototype.isReflectionEnabled=function(){return!0},ReflectionCapabilities.prototype.factory=function(t){return function(){for(var args=[],_i=0;_i<arguments.length;_i++)args[_i]=arguments[_i];return new(t.bind.apply(t,[void 0].concat(args)))}},ReflectionCapabilities.prototype._zipTypesAndAnnotations=function(paramTypes,paramAnnotations){var result;result=void 0===paramTypes?new Array(paramAnnotations.length):new Array(paramTypes.length);for(var i=0;i<result.length;i++)void 0===paramTypes?result[i]=[]:paramTypes[i]!=Object?result[i]=[paramTypes[i]]:result[i]=[],paramAnnotations&&null!=paramAnnotations[i]&&(result[i]=result[i].concat(paramAnnotations[i]));return result},ReflectionCapabilities.prototype._ownParameters=function(type,parentCtor){if(DELEGATE_CTOR.exec(type.toString()))return null;if(type.parameters&&type.parameters!==parentCtor.parameters)return type.parameters;var tsickleCtorParams=type.ctorParameters;if(tsickleCtorParams&&tsickleCtorParams!==parentCtor.ctorParameters){var ctorParameters="function"==typeof tsickleCtorParams?tsickleCtorParams():tsickleCtorParams,paramTypes=ctorParameters.map(function(ctorParam){return ctorParam&&ctorParam.type}),paramAnnotations=ctorParameters.map(function(ctorParam){return ctorParam&&convertTsickleDecoratorIntoMetadata(ctorParam.decorators)});return this._zipTypesAndAnnotations(paramTypes,paramAnnotations)}if(null!=this._reflect&&null!=this._reflect.getOwnMetadata){var paramAnnotations=this._reflect.getOwnMetadata("parameters",type),paramTypes=this._reflect.getOwnMetadata("design:paramtypes",type);if(paramTypes||paramAnnotations)return this._zipTypesAndAnnotations(paramTypes,paramAnnotations)}return new Array(type.length).fill(void 0)},ReflectionCapabilities.prototype.parameters=function(type){if(!isType(type))return[];var parentCtor=getParentCtor(type),parameters=this._ownParameters(type,parentCtor);return parameters||parentCtor===Object||(parameters=this.parameters(parentCtor)),parameters||[]},ReflectionCapabilities.prototype._ownAnnotations=function(typeOrFunc,parentCtor){if(typeOrFunc.annotations&&typeOrFunc.annotations!==parentCtor.annotations){var annotations=typeOrFunc.annotations;return"function"==typeof annotations&&annotations.annotations&&(annotations=annotations.annotations),annotations}return typeOrFunc.decorators&&typeOrFunc.decorators!==parentCtor.decorators?convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators):this._reflect&&this._reflect.getOwnMetadata?this._reflect.getOwnMetadata("annotations",typeOrFunc):null},ReflectionCapabilities.prototype.annotations=function(typeOrFunc){if(!isType(typeOrFunc))return[];var parentCtor=getParentCtor(typeOrFunc),ownAnnotations=this._ownAnnotations(typeOrFunc,parentCtor)||[];return(parentCtor!==Object?this.annotations(parentCtor):[]).concat(ownAnnotations)},ReflectionCapabilities.prototype._ownPropMetadata=function(typeOrFunc,parentCtor){if(typeOrFunc.propMetadata&&typeOrFunc.propMetadata!==parentCtor.propMetadata){var propMetadata=typeOrFunc.propMetadata;return"function"==typeof propMetadata&&propMetadata.propMetadata&&(propMetadata=propMetadata.propMetadata),propMetadata}if(typeOrFunc.propDecorators&&typeOrFunc.propDecorators!==parentCtor.propDecorators){var propDecorators_1=typeOrFunc.propDecorators,propMetadata_1={};return Object.keys(propDecorators_1).forEach(function(prop){propMetadata_1[prop]=convertTsickleDecoratorIntoMetadata(propDecorators_1[prop])}),propMetadata_1}return this._reflect&&this._reflect.getOwnMetadata?this._reflect.getOwnMetadata("propMetadata",typeOrFunc):null},ReflectionCapabilities.prototype.propMetadata=function(typeOrFunc){if(!isType(typeOrFunc))return{};var parentCtor=getParentCtor(typeOrFunc),propMetadata={};if(parentCtor!==Object){var parentPropMetadata_1=this.propMetadata(parentCtor);Object.keys(parentPropMetadata_1).forEach(function(propName){propMetadata[propName]=parentPropMetadata_1[propName]})}var ownPropMetadata=this._ownPropMetadata(typeOrFunc,parentCtor);return ownPropMetadata&&Object.keys(ownPropMetadata).forEach(function(propName){var decorators=[];propMetadata.hasOwnProperty(propName)&&decorators.push.apply(decorators,propMetadata[propName]),decorators.push.apply(decorators,ownPropMetadata[propName]),propMetadata[propName]=decorators}),propMetadata},ReflectionCapabilities.prototype.hasLifecycleHook=function(type,lcProperty){return type instanceof Type&&lcProperty in type.prototype},ReflectionCapabilities.prototype.getter=function(name){return new Function("o","return o."+name+";")},ReflectionCapabilities.prototype.setter=function(name){return new Function("o","v","return o."+name+" = v;")},ReflectionCapabilities.prototype.method=function(name){var functionBody="if (!o."+name+") throw new Error('\""+name+"\" is undefined');\n return o."+name+".apply(o, args);";return new Function("o","args",functionBody)},ReflectionCapabilities.prototype.importUri=function(type){return"object"==typeof type&&type.filePath?type.filePath:"./"+stringify(type)},ReflectionCapabilities.prototype.resourceUri=function(type){return"./"+stringify(type)},ReflectionCapabilities.prototype.resolveIdentifier=function(name,moduleUrl,members,runtime){return runtime},ReflectionCapabilities.prototype.resolveEnum=function(enumIdentifier,name){return enumIdentifier[name]},ReflectionCapabilities}(),Reflector=function(){function Reflector(reflectionCapabilities){this.reflectionCapabilities=reflectionCapabilities}return Reflector.prototype.updateCapabilities=function(caps){this.reflectionCapabilities=caps},Reflector.prototype.factory=function(type){return this.reflectionCapabilities.factory(type)},Reflector.prototype.parameters=function(typeOrFunc){return this.reflectionCapabilities.parameters(typeOrFunc)},Reflector.prototype.annotations=function(typeOrFunc){return this.reflectionCapabilities.annotations(typeOrFunc)},Reflector.prototype.propMetadata=function(typeOrFunc){return this.reflectionCapabilities.propMetadata(typeOrFunc)},Reflector.prototype.hasLifecycleHook=function(type,lcProperty){return this.reflectionCapabilities.hasLifecycleHook(type,lcProperty)},Reflector.prototype.getter=function(name){return this.reflectionCapabilities.getter(name)},Reflector.prototype.setter=function(name){return this.reflectionCapabilities.setter(name)},Reflector.prototype.method=function(name){return this.reflectionCapabilities.method(name)},Reflector.prototype.importUri=function(type){return this.reflectionCapabilities.importUri(type)},Reflector.prototype.resourceUri=function(type){return this.reflectionCapabilities.resourceUri(type)},Reflector.prototype.resolveIdentifier=function(name,moduleUrl,members,runtime){return this.reflectionCapabilities.resolveIdentifier(name,moduleUrl,members,runtime)},Reflector.prototype.resolveEnum=function(identifier,name){return this.reflectionCapabilities.resolveEnum(identifier,name)},Reflector}(),reflector=new Reflector(new ReflectionCapabilities),ReflectiveDependency=function(){function ReflectiveDependency(key,optional,visibility){this.key=key,this.optional=optional,this.visibility=visibility}return ReflectiveDependency.fromKey=function(key){return new ReflectiveDependency(key,!1,null)},ReflectiveDependency}(),_EMPTY_LIST=[],ResolvedReflectiveProvider_=function(){function ResolvedReflectiveProvider_(key,resolvedFactories,multiProvider){this.key=key,this.resolvedFactories=resolvedFactories,this.multiProvider=multiProvider}return Object.defineProperty(ResolvedReflectiveProvider_.prototype,"resolvedFactory",{get:function(){return this.resolvedFactories[0]},enumerable:!0,configurable:!0}),ResolvedReflectiveProvider_}(),ResolvedReflectiveFactory=function(){function ResolvedReflectiveFactory(factory,dependencies){this.factory=factory,this.dependencies=dependencies}return ResolvedReflectiveFactory}(),UNDEFINED=new Object,ReflectiveInjector=function(){function ReflectiveInjector(){}return ReflectiveInjector.resolve=function(providers){return resolveReflectiveProviders(providers)},ReflectiveInjector.resolveAndCreate=function(providers,parent){var ResolvedReflectiveProviders=ReflectiveInjector.resolve(providers);return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders,parent)},ReflectiveInjector.fromResolvedProviders=function(providers,parent){return new ReflectiveInjector_(providers,parent)},ReflectiveInjector.prototype.parent=function(){},ReflectiveInjector.prototype.resolveAndCreateChild=function(providers){},ReflectiveInjector.prototype.createChildFromResolved=function(providers){},ReflectiveInjector.prototype.resolveAndInstantiate=function(provider){},ReflectiveInjector.prototype.instantiateResolved=function(provider){},ReflectiveInjector.prototype.get=function(token,notFoundValue){},ReflectiveInjector}(),ReflectiveInjector_=function(){function ReflectiveInjector_(_providers,_parent){this._constructionCounter=0,this._providers=_providers,this._parent=_parent||null;var len=_providers.length;this.keyIds=new Array(len),this.objs=new Array(len);for(var i=0;i<len;i++)this.keyIds[i]=_providers[i].key.id,this.objs[i]=UNDEFINED}return ReflectiveInjector_.prototype.get=function(token,notFoundValue){return void 0===notFoundValue&&(notFoundValue=THROW_IF_NOT_FOUND),this._getByKey(ReflectiveKey.get(token),null,notFoundValue)},Object.defineProperty(ReflectiveInjector_.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),ReflectiveInjector_.prototype.resolveAndCreateChild=function(providers){var ResolvedReflectiveProviders=ReflectiveInjector.resolve(providers);return this.createChildFromResolved(ResolvedReflectiveProviders)},ReflectiveInjector_.prototype.createChildFromResolved=function(providers){var inj=new ReflectiveInjector_(providers);return inj._parent=this,inj},ReflectiveInjector_.prototype.resolveAndInstantiate=function(provider){return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0])},ReflectiveInjector_.prototype.instantiateResolved=function(provider){return this._instantiateProvider(provider)},ReflectiveInjector_.prototype.getProviderAtIndex=function(index){if(index<0||index>=this._providers.length)throw outOfBoundsError(index);return this._providers[index]},ReflectiveInjector_.prototype._new=function(provider){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw cyclicDependencyError(this,provider.key);return this._instantiateProvider(provider)},ReflectiveInjector_.prototype._getMaxNumberOfObjects=function(){return this.objs.length},ReflectiveInjector_.prototype._instantiateProvider=function(provider){if(provider.multiProvider){for(var res=new Array(provider.resolvedFactories.length),i=0;i<provider.resolvedFactories.length;++i)res[i]=this._instantiate(provider,provider.resolvedFactories[i]);return res}return this._instantiate(provider,provider.resolvedFactories[0])},ReflectiveInjector_.prototype._instantiate=function(provider,ResolvedReflectiveFactory$$1){var deps,_this=this,factory=ResolvedReflectiveFactory$$1.factory;try{deps=ResolvedReflectiveFactory$$1.dependencies.map(function(dep){return _this._getByReflectiveDependency(dep)})}catch(e){throw e.addKey&&e.addKey(this,provider.key),e}var obj;try{obj=factory.apply(void 0,deps)}catch(e){throw instantiationError(this,e,e.stack,provider.key)}return obj},ReflectiveInjector_.prototype._getByReflectiveDependency=function(dep){return this._getByKey(dep.key,dep.visibility,dep.optional?null:THROW_IF_NOT_FOUND)},ReflectiveInjector_.prototype._getByKey=function(key,visibility,notFoundValue){return key===INJECTOR_KEY?this:visibility instanceof Self?this._getByKeySelf(key,notFoundValue):this._getByKeyDefault(key,notFoundValue,visibility)},ReflectiveInjector_.prototype._getObjByKeyId=function(keyId){for(var i=0;i<this.keyIds.length;i++)if(this.keyIds[i]===keyId)return this.objs[i]===UNDEFINED&&(this.objs[i]=this._new(this._providers[i])),this.objs[i];return UNDEFINED},ReflectiveInjector_.prototype._throwOrNull=function(key,notFoundValue){if(notFoundValue!==THROW_IF_NOT_FOUND)return notFoundValue;throw noProviderError(this,key)},ReflectiveInjector_.prototype._getByKeySelf=function(key,notFoundValue){var obj=this._getObjByKeyId(key.id);return obj!==UNDEFINED?obj:this._throwOrNull(key,notFoundValue)},ReflectiveInjector_.prototype._getByKeyDefault=function(key,notFoundValue,visibility){var inj;for(inj=visibility instanceof SkipSelf?this._parent:this;inj instanceof ReflectiveInjector_;){var inj_=inj,obj=inj_._getObjByKeyId(key.id);if(obj!==UNDEFINED)return obj;inj=inj_._parent}return null!==inj?inj.get(key.token,notFoundValue):this._throwOrNull(key,notFoundValue)},Object.defineProperty(ReflectiveInjector_.prototype,"displayName",{get:function(){return"ReflectiveInjector(providers: ["+_mapProviders(this,function(b){return' "'+b.key.displayName+'" '}).join(", ")+"])"},enumerable:!0,configurable:!0}),ReflectiveInjector_.prototype.toString=function(){return this.displayName},ReflectiveInjector_}(),INJECTOR_KEY=ReflectiveKey.get(Injector),APP_INITIALIZER=new InjectionToken("Application Initializer"),ApplicationInitStatus=function(){function ApplicationInitStatus(appInits){var _this=this;this.appInits=appInits,this.initialized=!1,this._done=!1,this._donePromise=new Promise(function(res,rej){_this.resolve=res,_this.reject=rej})}return ApplicationInitStatus.prototype.runInitializers=function(){var _this=this;if(!this.initialized){var asyncInitPromises=[],complete=function(){_this._done=!0,_this.resolve()};if(this.appInits)for(var i=0;i<this.appInits.length;i++){var initResult=this.appInits[i]();isPromise(initResult)&&asyncInitPromises.push(initResult)}Promise.all(asyncInitPromises).then(function(){complete()}).catch(function(e){_this.reject(e)}),0===asyncInitPromises.length&&complete(),this.initialized=!0}},Object.defineProperty(ApplicationInitStatus.prototype,"done",{get:function(){return this._done},enumerable:!0,configurable:!0}),Object.defineProperty(ApplicationInitStatus.prototype,"donePromise",{get:function(){return this._donePromise},enumerable:!0,configurable:!0}),ApplicationInitStatus}();ApplicationInitStatus.decorators=[{type:Injectable}],ApplicationInitStatus.ctorParameters=function(){return[{type:Array,decorators:[{type:Inject,args:[APP_INITIALIZER]},{type:Optional}]}]};var APP_ID=new InjectionToken("AppId"),APP_ID_RANDOM_PROVIDER={provide:APP_ID,useFactory:_appIdRandomProviderFactory,deps:[]},PLATFORM_INITIALIZER=new InjectionToken("Platform Initializer"),PLATFORM_ID=new InjectionToken("Platform ID"),APP_BOOTSTRAP_LISTENER=new InjectionToken("appBootstrapListener"),PACKAGE_ROOT_URL=new InjectionToken("Application Packages Root URL"),Console=function(){function Console(){}return Console.prototype.log=function(message){console.log(message)},Console.prototype.warn=function(message){console.warn(message)},Console}();Console.decorators=[{type:Injectable}],Console.ctorParameters=function(){return[]};var ModuleWithComponentFactories=function(){function ModuleWithComponentFactories(ngModuleFactory,componentFactories){this.ngModuleFactory=ngModuleFactory,this.componentFactories=componentFactories}return ModuleWithComponentFactories}(),Compiler=function(){function Compiler(){}return Compiler.prototype.compileModuleSync=function(moduleType){throw _throwError()},Compiler.prototype.compileModuleAsync=function(moduleType){throw _throwError()},Compiler.prototype.compileModuleAndAllComponentsSync=function(moduleType){throw _throwError()},Compiler.prototype.compileModuleAndAllComponentsAsync=function(moduleType){throw _throwError()},Compiler.prototype.getNgContentSelectors=function(component){throw _throwError()},Compiler.prototype.clearCache=function(){},Compiler.prototype.clearCacheFor=function(type){},Compiler}();Compiler.decorators=[{type:Injectable}],Compiler.ctorParameters=function(){return[]};var COMPILER_OPTIONS=new InjectionToken("compilerOptions"),CompilerFactory=function(){function CompilerFactory(){}return CompilerFactory.prototype.createCompiler=function(options){},CompilerFactory}(),ComponentRef=function(){function ComponentRef(){}return ComponentRef.prototype.location=function(){},ComponentRef.prototype.injector=function(){},ComponentRef.prototype.instance=function(){},ComponentRef.prototype.hostView=function(){},ComponentRef.prototype.changeDetectorRef=function(){},ComponentRef.prototype.componentType=function(){},ComponentRef.prototype.destroy=function(){},ComponentRef.prototype.onDestroy=function(callback){},ComponentRef}(),ComponentFactory=function(){function ComponentFactory(){}return ComponentFactory.prototype.selector=function(){},ComponentFactory.prototype.componentType=function(){},ComponentFactory.prototype.ngContentSelectors=function(){},ComponentFactory.prototype.inputs=function(){},ComponentFactory.prototype.outputs=function(){},ComponentFactory.prototype.create=function(injector,projectableNodes,rootSelectorOrNode,ngModule){},ComponentFactory}(),ERROR_COMPONENT="ngComponent",_NullComponentFactoryResolver=function(){function _NullComponentFactoryResolver(){}return _NullComponentFactoryResolver.prototype.resolveComponentFactory=function(component){throw noComponentFactoryError(component)},_NullComponentFactoryResolver}(),ComponentFactoryResolver=function(){function ComponentFactoryResolver(){}return ComponentFactoryResolver.prototype.resolveComponentFactory=function(component){},ComponentFactoryResolver}();ComponentFactoryResolver.NULL=new _NullComponentFactoryResolver;var trace,events,CodegenComponentFactoryResolver=function(){function CodegenComponentFactoryResolver(factories,_parent,_ngModule){this._parent=_parent,this._ngModule=_ngModule,this._factories=new Map;for(var i=0;i<factories.length;i++){var factory=factories[i];this._factories.set(factory.componentType,factory)}}return CodegenComponentFactoryResolver.prototype.resolveComponentFactory=function(component){var factory=this._factories.get(component);if(!factory&&this._parent&&(factory=this._parent.resolveComponentFactory(component)),!factory)throw noComponentFactoryError(component);return new ComponentFactoryBoundToModule(factory,this._ngModule)},CodegenComponentFactoryResolver}(),ComponentFactoryBoundToModule=function(_super){function ComponentFactoryBoundToModule(factory,ngModule){var _this=_super.call(this)||this;return _this.factory=factory,_this.ngModule=ngModule,_this}return __extends(ComponentFactoryBoundToModule,_super),Object.defineProperty(ComponentFactoryBoundToModule.prototype,"selector",{get:function(){return this.factory.selector},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentFactoryBoundToModule.prototype,"componentType",{get:function(){return this.factory.componentType},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentFactoryBoundToModule.prototype,"ngContentSelectors",{get:function(){return this.factory.ngContentSelectors},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentFactoryBoundToModule.prototype,"inputs",{get:function(){return this.factory.inputs},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentFactoryBoundToModule.prototype,"outputs",{get:function(){return this.factory.outputs},enumerable:!0,configurable:!0}),ComponentFactoryBoundToModule.prototype.create=function(injector,projectableNodes,rootSelectorOrNode,ngModule){return this.factory.create(injector,projectableNodes,rootSelectorOrNode,ngModule||this.ngModule)},ComponentFactoryBoundToModule}(ComponentFactory),NgModuleRef=function(){function NgModuleRef(){}return NgModuleRef.prototype.injector=function(){},NgModuleRef.prototype.componentFactoryResolver=function(){},NgModuleRef.prototype.instance=function(){},NgModuleRef.prototype.destroy=function(){},NgModuleRef.prototype.onDestroy=function(callback){},NgModuleRef}(),NgModuleFactory=function(){function NgModuleFactory(){}return NgModuleFactory.prototype.moduleType=function(){},NgModuleFactory.prototype.create=function(parentInjector){},NgModuleFactory}(),wtfEnabled=detectWTF(),wtfCreateScope=wtfEnabled?createScope$1:function(signature,flags){return noopScope},wtfLeave=wtfEnabled?leave:function(s,r){return r},wtfStartTimeRange=wtfEnabled?startTimeRange:function(rangeType,action){return null},wtfEndTimeRange=wtfEnabled?endTimeRange:function(r){return null},EventEmitter=function(_super){function EventEmitter(isAsync){void 0===isAsync&&(isAsync=!1);var _this=_super.call(this)||this;return _this.__isAsync=isAsync,_this}return __extends(EventEmitter,_super),EventEmitter.prototype.emit=function(value){_super.prototype.next.call(this,value)},EventEmitter.prototype.subscribe=function(generatorOrNext,error,complete){var schedulerFn,errorFn=function(err){return null},completeFn=function(){return null};return generatorOrNext&&"object"==typeof generatorOrNext?(schedulerFn=this.__isAsync?function(value){setTimeout(function(){return generatorOrNext.next(value)})}:function(value){generatorOrNext.next(value)},generatorOrNext.error&&(errorFn=this.__isAsync?function(err){setTimeout(function(){return generatorOrNext.error(err)})}:function(err){generatorOrNext.error(err)}),generatorOrNext.complete&&(completeFn=this.__isAsync?function(){setTimeout(function(){return generatorOrNext.complete()})}:function(){generatorOrNext.complete()})):(schedulerFn=this.__isAsync?function(value){setTimeout(function(){return generatorOrNext(value)})}:function(value){generatorOrNext(value)},error&&(errorFn=this.__isAsync?function(err){setTimeout(function(){return error(err)})}:function(err){error(err)}),complete&&(completeFn=this.__isAsync?function(){setTimeout(function(){return complete()})}:function(){complete()})),_super.prototype.subscribe.call(this,schedulerFn,errorFn,completeFn)},EventEmitter}(rxjs_Subject.Subject),NgZone=function(){function NgZone(_a){var _b=_a.enableLongStackTrace,enableLongStackTrace=void 0!==_b&&_b;if(this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new EventEmitter(!1),this.onMicrotaskEmpty=new EventEmitter(!1),this.onStable=new EventEmitter(!1),this.onError=new EventEmitter(!1),"undefined"==typeof Zone)throw new Error("Angular requires Zone.js prolyfill.");Zone.assertZonePatched();var self=this;self._nesting=0,self._outer=self._inner=Zone.current,Zone.wtfZoneSpec&&(self._inner=self._inner.fork(Zone.wtfZoneSpec)),enableLongStackTrace&&Zone.longStackTraceZoneSpec&&(self._inner=self._inner.fork(Zone.longStackTraceZoneSpec)),forkInnerZoneWithAngularBehavior(self)}return NgZone.isInAngularZone=function(){return!0===Zone.current.get("isAngularZone")},NgZone.assertInAngularZone=function(){if(!NgZone.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")},NgZone.assertNotInAngularZone=function(){if(NgZone.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")},NgZone.prototype.run=function(fn){return this._inner.run(fn)},NgZone.prototype.runGuarded=function(fn){return this._inner.runGuarded(fn)},NgZone.prototype.runOutsideAngular=function(fn){return this._outer.run(fn)},NgZone}(),Testability=function(){function Testability(_ngZone){this._ngZone=_ngZone,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this._watchAngularEvents()}return Testability.prototype._watchAngularEvents=function(){var _this=this;this._ngZone.onUnstable.subscribe({next:function(){_this._didWork=!0,_this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(function(){_this._ngZone.onStable.subscribe({next:function(){NgZone.assertNotInAngularZone(),scheduleMicroTask(function(){_this._isZoneStable=!0,_this._runCallbacksIfReady()})}})})},Testability.prototype.increasePendingRequestCount=function(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount},Testability.prototype.decreasePendingRequestCount=function(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount},Testability.prototype.isStable=function(){return this._isZoneStable&&0==this._pendingCount&&!this._ngZone.hasPendingMacrotasks},Testability.prototype._runCallbacksIfReady=function(){var _this=this;this.isStable()?scheduleMicroTask(function(){for(;0!==_this._callbacks.length;)_this._callbacks.pop()(_this._didWork);_this._didWork=!1}):this._didWork=!0},Testability.prototype.whenStable=function(callback){this._callbacks.push(callback),this._runCallbacksIfReady()},Testability.prototype.getPendingRequestCount=function(){return this._pendingCount},Testability.prototype.findBindings=function(using,provider,exactMatch){return[]},Testability.prototype.findProviders=function(using,provider,exactMatch){return[]},Testability}();Testability.decorators=[{type:Injectable}],Testability.ctorParameters=function(){return[{type:NgZone}]};var TestabilityRegistry=function(){function TestabilityRegistry(){this._applications=new Map,_testabilityGetter.addToWindow(this)}return TestabilityRegistry.prototype.registerApplication=function(token,testability){this._applications.set(token,testability)},TestabilityRegistry.prototype.getTestability=function(elem){return this._applications.get(elem)||null},TestabilityRegistry.prototype.getAllTestabilities=function(){return Array.from(this._applications.values())},TestabilityRegistry.prototype.getAllRootElements=function(){return Array.from(this._applications.keys())},TestabilityRegistry.prototype.findTestabilityInTree=function(elem,findInAncestors){return void 0===findInAncestors&&(findInAncestors=!0),_testabilityGetter.findTestabilityInTree(this,elem,findInAncestors)},TestabilityRegistry}();TestabilityRegistry.decorators=[{type:Injectable}],TestabilityRegistry.ctorParameters=function(){return[]};var _platform,_NoopGetTestability=function(){function _NoopGetTestability(){}return _NoopGetTestability.prototype.addToWindow=function(registry){},_NoopGetTestability.prototype.findTestabilityInTree=function(registry,elem,findInAncestors){return null},_NoopGetTestability}(),_testabilityGetter=new _NoopGetTestability,_devMode=!0,_runModeLocked=!1,ALLOW_MULTIPLE_PLATFORMS=new InjectionToken("AllowMultipleToken"),NgProbeToken=function(){function NgProbeToken(name,token){this.name=name,this.token=token}return NgProbeToken}(),PlatformRef=function(){function PlatformRef(){}return PlatformRef.prototype.bootstrapModuleFactory=function(moduleFactory){},PlatformRef.prototype.bootstrapModule=function(moduleType,compilerOptions){},PlatformRef.prototype.onDestroy=function(callback){},PlatformRef.prototype.injector=function(){},PlatformRef.prototype.destroy=function(){},PlatformRef.prototype.destroyed=function(){},PlatformRef}(),PlatformRef_=function(_super){function PlatformRef_(_injector){var _this=_super.call(this)||this;return _this._injector=_injector,_this._modules=[],_this._destroyListeners=[],_this._destroyed=!1,_this}return __extends(PlatformRef_,_super),PlatformRef_.prototype.onDestroy=function(callback){this._destroyListeners.push(callback)},Object.defineProperty(PlatformRef_.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),Object.defineProperty(PlatformRef_.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),PlatformRef_.prototype.destroy=function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(module){return module.destroy()}),this._destroyListeners.forEach(function(listener){return listener()}),this._destroyed=!0},PlatformRef_.prototype.bootstrapModuleFactory=function(moduleFactory){return this._bootstrapModuleFactoryWithZone(moduleFactory)},PlatformRef_.prototype._bootstrapModuleFactoryWithZone=function(moduleFactory,ngZone){var _this=this;return ngZone||(ngZone=new NgZone({enableLongStackTrace:isDevMode()})),ngZone.run(function(){var ngZoneInjector=ReflectiveInjector.resolveAndCreate([{provide:NgZone,useValue:ngZone}],_this.injector),moduleRef=moduleFactory.create(ngZoneInjector),exceptionHandler=moduleRef.injector.get(ErrorHandler,null);if(!exceptionHandler)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return moduleRef.onDestroy(function(){return remove(_this._modules,moduleRef)}),ngZone.onError.subscribe({next:function(error){exceptionHandler.handleError(error)}}),_callAndReportToErrorHandler(exceptionHandler,function(){var initStatus=moduleRef.injector.get(ApplicationInitStatus);return initStatus.runInitializers(),initStatus.donePromise.then(function(){return _this._moduleDoBootstrap(moduleRef),moduleRef})})})},PlatformRef_.prototype.bootstrapModule=function(moduleType,compilerOptions){return void 0===compilerOptions&&(compilerOptions=[]),this._bootstrapModuleWithZone(moduleType,compilerOptions)},PlatformRef_.prototype._bootstrapModuleWithZone=function(moduleType,compilerOptions,ngZone){var _this=this;return void 0===compilerOptions&&(compilerOptions=[]),this.injector.get(CompilerFactory).createCompiler(Array.isArray(compilerOptions)?compilerOptions:[compilerOptions]).compileModuleAsync(moduleType).then(function(moduleFactory){return _this._bootstrapModuleFactoryWithZone(moduleFactory,ngZone)})},PlatformRef_.prototype._moduleDoBootstrap=function(moduleRef){var appRef=moduleRef.injector.get(ApplicationRef);if(moduleRef._bootstrapComponents.length>0)moduleRef._bootstrapComponents.forEach(function(f){return appRef.bootstrap(f)});else{if(!moduleRef.instance.ngDoBootstrap)throw new Error("The module "+stringify(moduleRef.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');moduleRef.instance.ngDoBootstrap(appRef)}this._modules.push(moduleRef)},PlatformRef_}(PlatformRef);PlatformRef_.decorators=[{type:Injectable}],PlatformRef_.ctorParameters=function(){return[{type:Injector}]};var ApplicationRef=function(){function ApplicationRef(){}return ApplicationRef.prototype.bootstrap=function(componentFactory,rootSelectorOrNode){},ApplicationRef.prototype.tick=function(){},ApplicationRef.prototype.componentTypes=function(){},ApplicationRef.prototype.components=function(){},ApplicationRef.prototype.attachView=function(view){},ApplicationRef.prototype.detachView=function(view){},ApplicationRef.prototype.viewCount=function(){},ApplicationRef.prototype.isStable=function(){},ApplicationRef}(),ApplicationRef_=function(_super){function ApplicationRef_(_zone,_console,_injector,_exceptionHandler,_componentFactoryResolver,_initStatus){var _this=_super.call(this)||this;_this._zone=_zone,_this._console=_console,_this._injector=_injector,_this._exceptionHandler=_exceptionHandler,_this._componentFactoryResolver=_componentFactoryResolver,_this._initStatus=_initStatus,_this._bootstrapListeners=[],_this._rootComponents=[],_this._rootComponentTypes=[],_this._views=[],_this._runningTick=!1,_this._enforceNoNewChanges=!1,_this._stable=!0,_this._enforceNoNewChanges=isDevMode(),_this._zone.onMicrotaskEmpty.subscribe({next:function(){_this._zone.run(function(){_this.tick()})}});var isCurrentlyStable=new rxjs_Observable.Observable(function(observer){_this._stable=_this._zone.isStable&&!_this._zone.hasPendingMacrotasks&&!_this._zone.hasPendingMicrotasks,_this._zone.runOutsideAngular(function(){observer.next(_this._stable),observer.complete()})}),isStable=new rxjs_Observable.Observable(function(observer){var stableSub=_this._zone.onStable.subscribe(function(){NgZone.assertNotInAngularZone(),scheduleMicroTask(function(){_this._stable||_this._zone.hasPendingMacrotasks||_this._zone.hasPendingMicrotasks||(_this._stable=!0,observer.next(!0))})}),unstableSub=_this._zone.onUnstable.subscribe(function(){NgZone.assertInAngularZone(),_this._stable&&(_this._stable=!1,_this._zone.runOutsideAngular(function(){observer.next(!1)}))});return function(){stableSub.unsubscribe(),unstableSub.unsubscribe()}});return _this._isStable=rxjs_observable_merge.merge(isCurrentlyStable,rxjs_operator_share.share.call(isStable)),_this}return __extends(ApplicationRef_,_super),ApplicationRef_.prototype.attachView=function(viewRef){var view=viewRef;this._views.push(view),view.attachToAppRef(this)},ApplicationRef_.prototype.detachView=function(viewRef){var view=viewRef;remove(this._views,view),view.detachFromAppRef()},ApplicationRef_.prototype.bootstrap=function(componentOrFactory,rootSelectorOrNode){var _this=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");var componentFactory;componentFactory=componentOrFactory instanceof ComponentFactory?componentOrFactory:this._componentFactoryResolver.resolveComponentFactory(componentOrFactory),this._rootComponentTypes.push(componentFactory.componentType);var ngModule=componentFactory instanceof ComponentFactoryBoundToModule?null:this._injector.get(NgModuleRef),selectorOrNode=rootSelectorOrNode||componentFactory.selector,compRef=componentFactory.create(Injector.NULL,[],selectorOrNode,ngModule);compRef.onDestroy(function(){_this._unloadComponent(compRef)});var testability=compRef.injector.get(Testability,null);return testability&&compRef.injector.get(TestabilityRegistry).registerApplication(compRef.location.nativeElement,testability),this._loadComponent(compRef),isDevMode()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),compRef},ApplicationRef_.prototype._loadComponent=function(componentRef){this.attachView(componentRef.hostView),this.tick(),this._rootComponents.push(componentRef),this._injector.get(APP_BOOTSTRAP_LISTENER,[]).concat(this._bootstrapListeners).forEach(function(listener){return listener(componentRef)})},ApplicationRef_.prototype._unloadComponent=function(componentRef){this.detachView(componentRef.hostView),remove(this._rootComponents,componentRef)},ApplicationRef_.prototype.tick=function(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var scope=ApplicationRef_._tickScope();try{this._runningTick=!0,this._views.forEach(function(view){return view.detectChanges()}),this._enforceNoNewChanges&&this._views.forEach(function(view){return view.checkNoChanges()})}catch(e){this._exceptionHandler.handleError(e)}finally{this._runningTick=!1,wtfLeave(scope)}},ApplicationRef_.prototype.ngOnDestroy=function(){this._views.slice().forEach(function(view){return view.destroy()})},Object.defineProperty(ApplicationRef_.prototype,"viewCount",{get:function(){return this._views.length},enumerable:!0,configurable:!0}),Object.defineProperty(ApplicationRef_.prototype,"componentTypes",{get:function(){return this._rootComponentTypes},enumerable:!0,configurable:!0}),Object.defineProperty(ApplicationRef_.prototype,"components",{get:function(){return this._rootComponents},enumerable:!0,configurable:!0}),Object.defineProperty(ApplicationRef_.prototype,"isStable",{get:function(){return this._isStable},enumerable:!0,configurable:!0}),ApplicationRef_}(ApplicationRef);ApplicationRef_._tickScope=wtfCreateScope("ApplicationRef#tick()"),ApplicationRef_.decorators=[{type:Injectable}],ApplicationRef_.ctorParameters=function(){return[{type:NgZone},{type:Console},{type:Injector},{type:ErrorHandler},{type:ComponentFactoryResolver},{type:ApplicationInitStatus}]};var RenderComponentType=function(){function RenderComponentType(id,templateUrl,slotCount,encapsulation,styles,animations){this.id=id,this.templateUrl=templateUrl,this.slotCount=slotCount,this.encapsulation=encapsulation,this.styles=styles,this.animations=animations}return RenderComponentType}(),RenderDebugInfo=function(){function RenderDebugInfo(){}return RenderDebugInfo.prototype.injector=function(){},RenderDebugInfo.prototype.component=function(){},RenderDebugInfo.prototype.providerTokens=function(){},RenderDebugInfo.prototype.references=function(){},RenderDebugInfo.prototype.context=function(){},RenderDebugInfo.prototype.source=function(){},RenderDebugInfo}(),Renderer=function(){function Renderer(){}return Renderer.prototype.selectRootElement=function(selectorOrNode,debugInfo){},Renderer.prototype.createElement=function(parentElement,name,debugInfo){},Renderer.prototype.createViewRoot=function(hostElement){},Renderer.prototype.createTemplateAnchor=function(parentElement,debugInfo){},Renderer.prototype.createText=function(parentElement,value,debugInfo){},Renderer.prototype.projectNodes=function(parentElement,nodes){},Renderer.prototype.attachViewAfter=function(node,viewRootNodes){},Renderer.prototype.detachView=function(viewRootNodes){},Renderer.prototype.destroyView=function(hostElement,viewAllNodes){},Renderer.prototype.listen=function(renderElement,name,callback){},Renderer.prototype.listenGlobal=function(target,name,callback){},Renderer.prototype.setElementProperty=function(renderElement,propertyName,propertyValue){},Renderer.prototype.setElementAttribute=function(renderElement,attributeName,attributeValue){},Renderer.prototype.setBindingDebugInfo=function(renderElement,propertyName,propertyValue){},Renderer.prototype.setElementClass=function(renderElement,className,isAdd){},Renderer.prototype.setElementStyle=function(renderElement,styleName,styleValue){},Renderer.prototype.invokeElementMethod=function(renderElement,methodName,args){},Renderer.prototype.setText=function(renderNode,text){},Renderer.prototype.animate=function(element,startingStyles,keyframes,duration,delay,easing,previousPlayers){},Renderer}(),RootRenderer=(new InjectionToken("Renderer2Interceptor"),function(){function RootRenderer(){}return RootRenderer.prototype.renderComponent=function(componentType){},RootRenderer}()),RendererFactory2=function(){function RendererFactory2(){}return RendererFactory2.prototype.createRenderer=function(hostElement,type){},RendererFactory2.prototype.begin=function(){},RendererFactory2.prototype.end=function(){},RendererFactory2.prototype.whenRenderingDone=function(){},RendererFactory2}(),RendererStyleFlags2={};RendererStyleFlags2.Important=1,RendererStyleFlags2.DashCase=2,RendererStyleFlags2[RendererStyleFlags2.Important]="Important",RendererStyleFlags2[RendererStyleFlags2.DashCase]="DashCase";var Renderer2=function(){function Renderer2(){}return Renderer2.prototype.data=function(){},Renderer2.prototype.destroy=function(){},Renderer2.prototype.createElement=function(name,namespace){},Renderer2.prototype.createComment=function(value){},Renderer2.prototype.createText=function(value){},Renderer2.prototype.appendChild=function(parent,newChild){},Renderer2.prototype.insertBefore=function(parent,newChild,refChild){},Renderer2.prototype.removeChild=function(parent,oldChild){},Renderer2.prototype.selectRootElement=function(selectorOrNode){},Renderer2.prototype.parentNode=function(node){},Renderer2.prototype.nextSibling=function(node){},Renderer2.prototype.setAttribute=function(el,name,value,namespace){},Renderer2.prototype.removeAttribute=function(el,name,namespace){},Renderer2.prototype.addClass=function(el,name){},Renderer2.prototype.removeClass=function(el,name){},Renderer2.prototype.setStyle=function(el,style,value,flags){},Renderer2.prototype.removeStyle=function(el,style,flags){},Renderer2.prototype.setProperty=function(el,name,value){},Renderer2.prototype.setValue=function(node,value){},Renderer2.prototype.listen=function(target,eventName,callback){},Renderer2}(),ElementRef=function(){function ElementRef(nativeElement){this.nativeElement=nativeElement}return ElementRef}(),NgModuleFactoryLoader=function(){function NgModuleFactoryLoader(){}return NgModuleFactoryLoader.prototype.load=function(path){},NgModuleFactoryLoader}(),moduleFactories=new Map,QueryList=function(){function QueryList(){this._dirty=!0,this._results=[],this._emitter=new EventEmitter}return Object.defineProperty(QueryList.prototype,"changes",{get:function(){return this._emitter},enumerable:!0,configurable:!0}),Object.defineProperty(QueryList.prototype,"length",{get:function(){return this._results.length},enumerable:!0,configurable:!0}),Object.defineProperty(QueryList.prototype,"first",{get:function(){return this._results[0]},enumerable:!0,configurable:!0}),Object.defineProperty(QueryList.prototype,"last",{get:function(){return this._results[this.length-1]},enumerable:!0,configurable:!0}),QueryList.prototype.map=function(fn){return this._results.map(fn)},QueryList.prototype.filter=function(fn){return this._results.filter(fn)},QueryList.prototype.find=function(fn){return this._results.find(fn)},QueryList.prototype.reduce=function(fn,init){return this._results.reduce(fn,init)},QueryList.prototype.forEach=function(fn){this._results.forEach(fn)},QueryList.prototype.some=function(fn){return this._results.some(fn)},QueryList.prototype.toArray=function(){return this._results.slice()},QueryList.prototype[getSymbolIterator()]=function(){return this._results[getSymbolIterator()]()},QueryList.prototype.toString=function(){return this._results.toString()},QueryList.prototype.reset=function(res){this._results=flatten(res),this._dirty=!1},QueryList.prototype.notifyOnChanges=function(){this._emitter.emit(this)},QueryList.prototype.setDirty=function(){this._dirty=!0},Object.defineProperty(QueryList.prototype,"dirty",{get:function(){return this._dirty},enumerable:!0,configurable:!0}),QueryList}(),_SEPARATOR="#",FACTORY_CLASS_SUFFIX="NgFactory",SystemJsNgModuleLoaderConfig=function(){function SystemJsNgModuleLoaderConfig(){}return SystemJsNgModuleLoaderConfig}(),DEFAULT_CONFIG={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},SystemJsNgModuleLoader=function(){function SystemJsNgModuleLoader(_compiler,config){this._compiler=_compiler,this._config=config||DEFAULT_CONFIG}return SystemJsNgModuleLoader.prototype.load=function(path){return this._compiler instanceof Compiler?this.loadFactory(path):this.loadAndCompile(path)},SystemJsNgModuleLoader.prototype.loadAndCompile=function(path){var _this=this,_a=path.split(_SEPARATOR),module=_a[0],exportName=_a[1];return void 0===exportName&&(exportName="default"),System.import(module).then(function(module){return module[exportName]}).then(function(type){return checkNotEmpty(type,module,exportName)}).then(function(type){return _this._compiler.compileModuleAsync(type)})},SystemJsNgModuleLoader.prototype.loadFactory=function(path){var _a=path.split(_SEPARATOR),module=_a[0],exportName=_a[1],factoryClassSuffix=FACTORY_CLASS_SUFFIX;return void 0===exportName&&(exportName="default",factoryClassSuffix=""),System.import(this._config.factoryPathPrefix+module+this._config.factoryPathSuffix).then(function(module){return module[exportName+factoryClassSuffix]}).then(function(factory){return checkNotEmpty(factory,module,exportName)})},SystemJsNgModuleLoader}();SystemJsNgModuleLoader.decorators=[{type:Injectable}],SystemJsNgModuleLoader.ctorParameters=function(){return[{type:Compiler},{type:SystemJsNgModuleLoaderConfig,decorators:[{type:Optional}]}]};var TemplateRef=function(){function TemplateRef(){}return TemplateRef.prototype.elementRef=function(){},TemplateRef.prototype.createEmbeddedView=function(context){},TemplateRef}(),ViewContainerRef=function(){function ViewContainerRef(){}return ViewContainerRef.prototype.element=function(){},ViewContainerRef.prototype.injector=function(){},ViewContainerRef.prototype.parentInjector=function(){},ViewContainerRef.prototype.clear=function(){},ViewContainerRef.prototype.get=function(index){},ViewContainerRef.prototype.length=function(){},ViewContainerRef.prototype.createEmbeddedView=function(templateRef,context,index){},ViewContainerRef.prototype.createComponent=function(componentFactory,index,injector,projectableNodes,ngModule){},ViewContainerRef.prototype.insert=function(viewRef,index){},ViewContainerRef.prototype.move=function(viewRef,currentIndex){},ViewContainerRef.prototype.indexOf=function(viewRef){},ViewContainerRef.prototype.remove=function(index){},ViewContainerRef.prototype.detach=function(index){},ViewContainerRef}(),ChangeDetectorRef=function(){function ChangeDetectorRef(){}return ChangeDetectorRef.prototype.markForCheck=function(){},ChangeDetectorRef.prototype.detach=function(){},ChangeDetectorRef.prototype.detectChanges=function(){},ChangeDetectorRef.prototype.checkNoChanges=function(){},ChangeDetectorRef.prototype.reattach=function(){},ChangeDetectorRef}(),ViewRef=function(_super){function ViewRef(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(ViewRef,_super),ViewRef.prototype.destroy=function(){},ViewRef.prototype.destroyed=function(){},ViewRef.prototype.onDestroy=function(callback){},ViewRef}(ChangeDetectorRef),EmbeddedViewRef=function(_super){function EmbeddedViewRef(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(EmbeddedViewRef,_super),EmbeddedViewRef.prototype.context=function(){},EmbeddedViewRef.prototype.rootNodes=function(){},EmbeddedViewRef}(ViewRef),EventListener=function(){function EventListener(name,callback){this.name=name,this.callback=callback}return EventListener}(),DebugNode=function(){function DebugNode(nativeNode,parent,_debugContext){this._debugContext=_debugContext,this.nativeNode=nativeNode,parent&&parent instanceof DebugElement?parent.addChild(this):this.parent=null,this.listeners=[]}return Object.defineProperty(DebugNode.prototype,"injector",{get:function(){return this._debugContext.injector},enumerable:!0,configurable:!0}),Object.defineProperty(DebugNode.prototype,"componentInstance",{get:function(){return this._debugContext.component},enumerable:!0,configurable:!0}),Object.defineProperty(DebugNode.prototype,"context",{get:function(){return this._debugContext.context},enumerable:!0,configurable:!0}),Object.defineProperty(DebugNode.prototype,"references",{get:function(){return this._debugContext.references},enumerable:!0,configurable:!0}),Object.defineProperty(DebugNode.prototype,"providerTokens",{get:function(){return this._debugContext.providerTokens},enumerable:!0,configurable:!0}),Object.defineProperty(DebugNode.prototype,"source",{get:function(){return"Deprecated since v4"},enumerable:!0,configurable:!0}),DebugNode}(),DebugElement=function(_super){function DebugElement(nativeNode,parent,_debugContext){var _this=_super.call(this,nativeNode,parent,_debugContext)||this;return _this.properties={},_this.attributes={},_this.classes={},_this.styles={},_this.childNodes=[],_this.nativeElement=nativeNode,_this}return __extends(DebugElement,_super),DebugElement.prototype.addChild=function(child){child&&(this.childNodes.push(child),child.parent=this)},DebugElement.prototype.removeChild=function(child){var childIndex=this.childNodes.indexOf(child);-1!==childIndex&&(child.parent=null,this.childNodes.splice(childIndex,1))},DebugElement.prototype.insertChildrenAfter=function(child,newChildren){var _this=this,siblingIndex=this.childNodes.indexOf(child);-1!==siblingIndex&&((_a=this.childNodes).splice.apply(_a,[siblingIndex+1,0].concat(newChildren)),newChildren.forEach(function(c){c.parent&&c.parent.removeChild(c),c.parent=_this}));var _a},DebugElement.prototype.insertBefore=function(refChild,newChild){var refIndex=this.childNodes.indexOf(refChild);-1===refIndex?this.addChild(newChild):(newChild.parent&&newChild.parent.removeChild(newChild),newChild.parent=this,this.childNodes.splice(refIndex,0,newChild))},DebugElement.prototype.query=function(predicate){return this.queryAll(predicate)[0]||null},DebugElement.prototype.queryAll=function(predicate){var matches=[];return _queryElementChildren(this,predicate,matches),matches},DebugElement.prototype.queryAllNodes=function(predicate){var matches=[];return _queryNodeChildren(this,predicate,matches),matches},Object.defineProperty(DebugElement.prototype,"children",{get:function(){return this.childNodes.filter(function(node){return node instanceof DebugElement})},enumerable:!0,configurable:!0}),DebugElement.prototype.triggerEventHandler=function(eventName,eventObj){this.listeners.forEach(function(listener){listener.name==eventName&&listener.callback(eventObj)})},DebugElement}(DebugNode),_nativeNodeToDebugNode=new Map,WrappedValue=function(){function WrappedValue(wrapped){this.wrapped=wrapped}return WrappedValue.wrap=function(value){return new WrappedValue(value)},WrappedValue}(),ValueUnwrapper=function(){function ValueUnwrapper(){this.hasWrappedValue=!1}return ValueUnwrapper.prototype.unwrap=function(value){return value instanceof WrappedValue?(this.hasWrappedValue=!0,value.wrapped):value},ValueUnwrapper.prototype.reset=function(){this.hasWrappedValue=!1},ValueUnwrapper}(),SimpleChange=function(){function SimpleChange(previousValue,currentValue,firstChange){this.previousValue=previousValue,this.currentValue=currentValue,this.firstChange=firstChange}return SimpleChange.prototype.isFirstChange=function(){return this.firstChange},SimpleChange}(),DefaultIterableDifferFactory=function(){function DefaultIterableDifferFactory(){}return DefaultIterableDifferFactory.prototype.supports=function(obj){return isListLikeIterable(obj)},DefaultIterableDifferFactory.prototype.create=function(cdRefOrTrackBy,trackByFn){return new DefaultIterableDiffer(trackByFn||cdRefOrTrackBy)},DefaultIterableDifferFactory}(),trackByIdentity=function(index,item){return item},DefaultIterableDiffer=function(){function DefaultIterableDiffer(trackByFn){this._length=0,this._collection=null,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=trackByFn||trackByIdentity}return Object.defineProperty(DefaultIterableDiffer.prototype,"collection",{get:function(){return this._collection},enumerable:!0,configurable:!0}),Object.defineProperty(DefaultIterableDiffer.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0}),DefaultIterableDiffer.prototype.forEachItem=function(fn){var record;for(record=this._itHead;null!==record;record=record._next)fn(record)},DefaultIterableDiffer.prototype.forEachOperation=function(fn){for(var nextIt=this._itHead,nextRemove=this._removalsHead,addRemoveOffset=0,moveOffsets=null;nextIt||nextRemove;){var record=!nextRemove||nextIt&&nextIt.currentIndex<getPreviousIndex(nextRemove,addRemoveOffset,moveOffsets)?nextIt:nextRemove,adjPreviousIndex=getPreviousIndex(record,addRemoveOffset,moveOffsets),currentIndex=record.currentIndex;if(record===nextRemove)addRemoveOffset--,nextRemove=nextRemove._nextRemoved;else if(nextIt=nextIt._next,null==record.previousIndex)addRemoveOffset++;else{moveOffsets||(moveOffsets=[]);var localMovePreviousIndex=adjPreviousIndex-addRemoveOffset,localCurrentIndex=currentIndex-addRemoveOffset;if(localMovePreviousIndex!=localCurrentIndex){for(var i=0;i<localMovePreviousIndex;i++){var offset=i<moveOffsets.length?moveOffsets[i]:moveOffsets[i]=0,index=offset+i;localCurrentIndex<=index&&index<localMovePreviousIndex&&(moveOffsets[i]=offset+1)}var previousIndex=record.previousIndex;moveOffsets[previousIndex]=localCurrentIndex-localMovePreviousIndex}}adjPreviousIndex!==currentIndex&&fn(record,adjPreviousIndex,currentIndex)}},DefaultIterableDiffer.prototype.forEachPreviousItem=function(fn){var record;for(record=this._previousItHead;null!==record;record=record._nextPrevious)fn(record)},DefaultIterableDiffer.prototype.forEachAddedItem=function(fn){var record;for(record=this._additionsHead;null!==record;record=record._nextAdded)fn(record)},DefaultIterableDiffer.prototype.forEachMovedItem=function(fn){var record;for(record=this._movesHead;null!==record;record=record._nextMoved)fn(record)},DefaultIterableDiffer.prototype.forEachRemovedItem=function(fn){var record;for(record=this._removalsHead;null!==record;record=record._nextRemoved)fn(record)},DefaultIterableDiffer.prototype.forEachIdentityChange=function(fn){var record;for(record=this._identityChangesHead;null!==record;record=record._nextIdentityChange)fn(record)},DefaultIterableDiffer.prototype.diff=function(collection){if(null==collection&&(collection=[]),!isListLikeIterable(collection))throw new Error("Error trying to diff '"+stringify(collection)+"'. Only arrays and iterables are allowed");return this.check(collection)?this:null},DefaultIterableDiffer.prototype.onDestroy=function(){},DefaultIterableDiffer.prototype.check=function(collection){var _this=this;this._reset();var index,item,itemTrackBy,record=this._itHead,mayBeDirty=!1;if(Array.isArray(collection)){this._length=collection.length;for(var index_1=0;index_1<this._length;index_1++)item=collection[index_1],itemTrackBy=this._trackByFn(index_1,item),null!==record&&looseIdentical(record.trackById,itemTrackBy)?(mayBeDirty&&(record=this._verifyReinsertion(record,item,itemTrackBy,index_1)),looseIdentical(record.item,item)||this._addIdentityChange(record,item)):(record=this._mismatch(record,item,itemTrackBy,index_1),mayBeDirty=!0),record=record._next}else index=0,iterateListLike(collection,function(item){itemTrackBy=_this._trackByFn(index,item),null!==record&&looseIdentical(record.trackById,itemTrackBy)?(mayBeDirty&&(record=_this._verifyReinsertion(record,item,itemTrackBy,index)),looseIdentical(record.item,item)||_this._addIdentityChange(record,item)):(record=_this._mismatch(record,item,itemTrackBy,index),mayBeDirty=!0),record=record._next,index++}),this._length=index;return this._truncate(record),this._collection=collection,this.isDirty},Object.defineProperty(DefaultIterableDiffer.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead},enumerable:!0,configurable:!0}),DefaultIterableDiffer.prototype._reset=function(){if(this.isDirty){var record=void 0,nextRecord=void 0;for(record=this._previousItHead=this._itHead;null!==record;record=record._next)record._nextPrevious=record._next;for(record=this._additionsHead;null!==record;record=record._nextAdded)record.previousIndex=record.currentIndex;for(this._additionsHead=this._additionsTail=null,record=this._movesHead;null!==record;record=nextRecord)record.previousIndex=record.currentIndex,nextRecord=record._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}},DefaultIterableDiffer.prototype._mismatch=function(record,item,itemTrackBy,index){var previousRecord;return null===record?previousRecord=this._itTail:(previousRecord=record._prev,this._remove(record)),record=null===this._linkedRecords?null:this._linkedRecords.get(itemTrackBy,index),null!==record?(looseIdentical(record.item,item)||this._addIdentityChange(record,item),this._moveAfter(record,previousRecord,index)):(record=null===this._unlinkedRecords?null:this._unlinkedRecords.get(itemTrackBy,null),null!==record?(looseIdentical(record.item,item)||this._addIdentityChange(record,item),this._reinsertAfter(record,previousRecord,index)):record=this._addAfter(new IterableChangeRecord_(item,itemTrackBy),previousRecord,index)),record},DefaultIterableDiffer.prototype._verifyReinsertion=function(record,item,itemTrackBy,index){var reinsertRecord=null===this._unlinkedRecords?null:this._unlinkedRecords.get(itemTrackBy,null);return null!==reinsertRecord?record=this._reinsertAfter(reinsertRecord,record._prev,index):record.currentIndex!=index&&(record.currentIndex=index,this._addToMoves(record,index)),record},DefaultIterableDiffer.prototype._truncate=function(record){for(;null!==record;){var nextRecord=record._next;this._addToRemovals(this._unlink(record)),record=nextRecord}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)},DefaultIterableDiffer.prototype._reinsertAfter=function(record,prevRecord,index){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(record);var prev=record._prevRemoved,next=record._nextRemoved;return null===prev?this._removalsHead=next:prev._nextRemoved=next,null===next?this._removalsTail=prev:next._prevRemoved=prev,this._insertAfter(record,prevRecord,index),this._addToMoves(record,index),record},DefaultIterableDiffer.prototype._moveAfter=function(record,prevRecord,index){return this._unlink(record),this._insertAfter(record,prevRecord,index),this._addToMoves(record,index),record},DefaultIterableDiffer.prototype._addAfter=function(record,prevRecord,index){return this._insertAfter(record,prevRecord,index),null===this._additionsTail?this._additionsTail=this._additionsHead=record:this._additionsTail=this._additionsTail._nextAdded=record,record},DefaultIterableDiffer.prototype._insertAfter=function(record,prevRecord,index){var next=null===prevRecord?this._itHead:prevRecord._next;return record._next=next,record._prev=prevRecord,null===next?this._itTail=record:next._prev=record,null===prevRecord?this._itHead=record:prevRecord._next=record,null===this._linkedRecords&&(this._linkedRecords=new _DuplicateMap),this._linkedRecords.put(record),record.currentIndex=index,record},DefaultIterableDiffer.prototype._remove=function(record){return this._addToRemovals(this._unlink(record))},DefaultIterableDiffer.prototype._unlink=function(record){null!==this._linkedRecords&&this._linkedRecords.remove(record);var prev=record._prev,next=record._next;return null===prev?this._itHead=next:prev._next=next,null===next?this._itTail=prev:next._prev=prev,record},DefaultIterableDiffer.prototype._addToMoves=function(record,toIndex){return record.previousIndex===toIndex?record:(null===this._movesTail?this._movesTail=this._movesHead=record:this._movesTail=this._movesTail._nextMoved=record,record)},DefaultIterableDiffer.prototype._addToRemovals=function(record){return null===this._unlinkedRecords&&(this._unlinkedRecords=new _DuplicateMap),this._unlinkedRecords.put(record),record.currentIndex=null,record._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=record,record._prevRemoved=null):(record._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=record),record},DefaultIterableDiffer.prototype._addIdentityChange=function(record,item){return record.item=item,null===this._identityChangesTail?this._identityChangesTail=this._identityChangesHead=record:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=record,record},DefaultIterableDiffer.prototype.toString=function(){var list=[];this.forEachItem(function(record){return list.push(record)});var previous=[];this.forEachPreviousItem(function(record){return previous.push(record)});var additions=[];this.forEachAddedItem(function(record){return additions.push(record)});var moves=[];this.forEachMovedItem(function(record){return moves.push(record)});var removals=[];this.forEachRemovedItem(function(record){return removals.push(record)});var identityChanges=[];return this.forEachIdentityChange(function(record){return identityChanges.push(record)}),"collection: "+list.join(", ")+"\nprevious: "+previous.join(", ")+"\nadditions: "+additions.join(", ")+"\nmoves: "+moves.join(", ")+"\nremovals: "+removals.join(", ")+"\nidentityChanges: "+identityChanges.join(", ")+"\n"},DefaultIterableDiffer}(),IterableChangeRecord_=function(){function IterableChangeRecord_(item,trackById){this.item=item,this.trackById=trackById,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}return IterableChangeRecord_.prototype.toString=function(){return this.previousIndex===this.currentIndex?stringify(this.item):stringify(this.item)+"["+stringify(this.previousIndex)+"->"+stringify(this.currentIndex)+"]"},IterableChangeRecord_}(),_DuplicateItemRecordList=function(){function _DuplicateItemRecordList(){this._head=null,this._tail=null}return _DuplicateItemRecordList.prototype.add=function(record){null===this._head?(this._head=this._tail=record,record._nextDup=null,record._prevDup=null):(this._tail._nextDup=record,record._prevDup=this._tail,record._nextDup=null,this._tail=record)},_DuplicateItemRecordList.prototype.get=function(trackById,atOrAfterIndex){var record;for(record=this._head;null!==record;record=record._nextDup)if((null===atOrAfterIndex||atOrAfterIndex<=record.currentIndex)&&looseIdentical(record.trackById,trackById))return record;return null},_DuplicateItemRecordList.prototype.remove=function(record){var prev=record._prevDup,next=record._nextDup;return null===prev?this._head=next:prev._nextDup=next,null===next?this._tail=prev:next._prevDup=prev,null===this._head},_DuplicateItemRecordList}(),_DuplicateMap=function(){function _DuplicateMap(){this.map=new Map}return _DuplicateMap.prototype.put=function(record){var key=record.trackById,duplicates=this.map.get(key);duplicates||(duplicates=new _DuplicateItemRecordList,this.map.set(key,duplicates)),duplicates.add(record)},_DuplicateMap.prototype.get=function(trackById,atOrAfterIndex){var key=trackById,recordList=this.map.get(key);return recordList?recordList.get(trackById,atOrAfterIndex):null},_DuplicateMap.prototype.remove=function(record){var key=record.trackById;return this.map.get(key).remove(record)&&this.map.delete(key),record},Object.defineProperty(_DuplicateMap.prototype,"isEmpty",{get:function(){return 0===this.map.size},enumerable:!0,configurable:!0}),_DuplicateMap.prototype.clear=function(){this.map.clear()},_DuplicateMap.prototype.toString=function(){return"_DuplicateMap("+stringify(this.map)+")"},_DuplicateMap}(),DefaultKeyValueDifferFactory=function(){function DefaultKeyValueDifferFactory(){}return DefaultKeyValueDifferFactory.prototype.supports=function(obj){return obj instanceof Map||isJsObject(obj)},DefaultKeyValueDifferFactory.prototype.create=function(cd){return new DefaultKeyValueDiffer},DefaultKeyValueDifferFactory}(),DefaultKeyValueDiffer=function(){function DefaultKeyValueDiffer(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}return Object.defineProperty(DefaultKeyValueDiffer.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead},enumerable:!0,configurable:!0}),DefaultKeyValueDiffer.prototype.forEachItem=function(fn){var record;for(record=this._mapHead;null!==record;record=record._next)fn(record)},DefaultKeyValueDiffer.prototype.forEachPreviousItem=function(fn){var record;for(record=this._previousMapHead;null!==record;record=record._nextPrevious)fn(record)},DefaultKeyValueDiffer.prototype.forEachChangedItem=function(fn){var record;for(record=this._changesHead;null!==record;record=record._nextChanged)fn(record)},DefaultKeyValueDiffer.prototype.forEachAddedItem=function(fn){var record;for(record=this._additionsHead;null!==record;record=record._nextAdded)fn(record)},DefaultKeyValueDiffer.prototype.forEachRemovedItem=function(fn){var record;for(record=this._removalsHead;null!==record;record=record._nextRemoved)fn(record)},DefaultKeyValueDiffer.prototype.diff=function(map){if(map){if(!(map instanceof Map||isJsObject(map)))throw new Error("Error trying to diff '"+stringify(map)+"'. Only maps and objects are allowed")}else map=new Map;return this.check(map)?this:null},DefaultKeyValueDiffer.prototype.onDestroy=function(){},DefaultKeyValueDiffer.prototype.check=function(map){var _this=this;this._reset();var insertBefore=this._mapHead;if(this._appendAfter=null,this._forEach(map,function(value,key){if(insertBefore&&insertBefore.key===key)_this._maybeAddToChanges(insertBefore,value),_this._appendAfter=insertBefore,insertBefore=insertBefore._next;else{var record=_this._getOrCreateRecordForKey(key,value);insertBefore=_this._insertBeforeOrAppend(insertBefore,record)}}),insertBefore){insertBefore._prev&&(insertBefore._prev._next=null),this._removalsHead=insertBefore;for(var record=insertBefore;null!==record;record=record._nextRemoved)record===this._mapHead&&(this._mapHead=null),this._records.delete(record.key),record._nextRemoved=record._next,record.previousValue=record.currentValue,record.currentValue=null,record._prev=null,record._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty},DefaultKeyValueDiffer.prototype._insertBeforeOrAppend=function(before,record){if(before){var prev=before._prev;return record._next=before,record._prev=prev,before._prev=record,prev&&(prev._next=record),before===this._mapHead&&(this._mapHead=record),this._appendAfter=before,before}return this._appendAfter?(this._appendAfter._next=record,record._prev=this._appendAfter):this._mapHead=record,this._appendAfter=record,null},DefaultKeyValueDiffer.prototype._getOrCreateRecordForKey=function(key,value){if(this._records.has(key)){var record_1=this._records.get(key);this._maybeAddToChanges(record_1,value);var prev=record_1._prev,next=record_1._next;return prev&&(prev._next=next),next&&(next._prev=prev),record_1._next=null,record_1._prev=null,record_1}var record=new KeyValueChangeRecord_(key);return this._records.set(key,record),record.currentValue=value,this._addToAdditions(record),record},DefaultKeyValueDiffer.prototype._reset=function(){if(this.isDirty){var record=void 0;for(this._previousMapHead=this._mapHead,record=this._previousMapHead;null!==record;record=record._next)record._nextPrevious=record._next;for(record=this._changesHead;null!==record;record=record._nextChanged)record.previousValue=record.currentValue;for(record=this._additionsHead;null!=record;record=record._nextAdded)record.previousValue=record.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}},DefaultKeyValueDiffer.prototype._maybeAddToChanges=function(record,newValue){looseIdentical(newValue,record.currentValue)||(record.previousValue=record.currentValue,record.currentValue=newValue,this._addToChanges(record))},DefaultKeyValueDiffer.prototype._addToAdditions=function(record){null===this._additionsHead?this._additionsHead=this._additionsTail=record:(this._additionsTail._nextAdded=record,this._additionsTail=record)},DefaultKeyValueDiffer.prototype._addToChanges=function(record){null===this._changesHead?this._changesHead=this._changesTail=record:(this._changesTail._nextChanged=record,this._changesTail=record)},DefaultKeyValueDiffer.prototype._forEach=function(obj,fn){obj instanceof Map?obj.forEach(fn):Object.keys(obj).forEach(function(k){return fn(obj[k],k)})},DefaultKeyValueDiffer}(),KeyValueChangeRecord_=function(){function KeyValueChangeRecord_(key){this.key=key,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}return KeyValueChangeRecord_}(),IterableDiffers=function(){function IterableDiffers(factories){this.factories=factories}return IterableDiffers.create=function(factories,parent){if(null!=parent){var copied=parent.factories.slice();return factories=factories.concat(copied),new IterableDiffers(factories)}return new IterableDiffers(factories)},IterableDiffers.extend=function(factories){return{provide:IterableDiffers,useFactory:function(parent){if(!parent)throw new Error("Cannot extend IterableDiffers without a parent injector");return IterableDiffers.create(factories,parent)},deps:[[IterableDiffers,new SkipSelf,new Optional]]}},IterableDiffers.prototype.find=function(iterable){var factory=this.factories.find(function(f){return f.supports(iterable)});if(null!=factory)return factory;throw new Error("Cannot find a differ supporting object '"+iterable+"' of type '"+getTypeNameForDebugging(iterable)+"'")},IterableDiffers}(),KeyValueDiffers=function(){function KeyValueDiffers(factories){this.factories=factories}return KeyValueDiffers.create=function(factories,parent){if(parent){var copied=parent.factories.slice();factories=factories.concat(copied)}return new KeyValueDiffers(factories)},KeyValueDiffers.extend=function(factories){return{provide:KeyValueDiffers,useFactory:function(parent){if(!parent)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return KeyValueDiffers.create(factories,parent)},deps:[[KeyValueDiffers,new SkipSelf,new Optional]]}},KeyValueDiffers.prototype.find=function(kv){var factory=this.factories.find(function(f){return f.supports(kv)});if(factory)return factory;throw new Error("Cannot find a differ supporting object '"+kv+"'")},KeyValueDiffers}(),keyValDiff=[new DefaultKeyValueDifferFactory],iterableDiff=[new DefaultIterableDifferFactory],defaultIterableDiffers=new IterableDiffers(iterableDiff),defaultKeyValueDiffers=new KeyValueDiffers(keyValDiff),_CORE_PLATFORM_PROVIDERS=[{provide:PLATFORM_ID,useValue:"unknown"},PlatformRef_,{provide:PlatformRef,useExisting:PlatformRef_},{provide:Reflector,useFactory:_reflector,deps:[]},TestabilityRegistry,Console],platformCore=createPlatformFactory(null,"core",_CORE_PLATFORM_PROVIDERS),LOCALE_ID=new InjectionToken("LocaleId"),TRANSLATIONS=new InjectionToken("Translations"),TRANSLATIONS_FORMAT=new InjectionToken("TranslationsFormat"),MissingTranslationStrategy={};MissingTranslationStrategy.Error=0,MissingTranslationStrategy.Warning=1,MissingTranslationStrategy.Ignore=2,MissingTranslationStrategy[MissingTranslationStrategy.Error]="Error",MissingTranslationStrategy[MissingTranslationStrategy.Warning]="Warning",MissingTranslationStrategy[MissingTranslationStrategy.Ignore]="Ignore";var ApplicationModule=function(){function ApplicationModule(appRef){}return ApplicationModule}();ApplicationModule.decorators=[{type:NgModule,args:[{providers:[ApplicationRef_,{provide:ApplicationRef,useExisting:ApplicationRef_},ApplicationInitStatus,Compiler,APP_ID_RANDOM_PROVIDER,{provide:IterableDiffers,useFactory:_iterableDiffersFactory},{provide:KeyValueDiffers,useFactory:_keyValueDiffersFactory},{provide:LOCALE_ID,useFactory:_localeFactory,deps:[[new Inject(LOCALE_ID),new Optional,new SkipSelf]]}]}]}],ApplicationModule.ctorParameters=function(){return[{type:ApplicationRef}]};var SecurityContext={};SecurityContext.NONE=0,SecurityContext.HTML=1,SecurityContext.STYLE=2,SecurityContext.SCRIPT=3,SecurityContext.URL=4,SecurityContext.RESOURCE_URL=5,SecurityContext[SecurityContext.NONE]="NONE",SecurityContext[SecurityContext.HTML]="HTML",SecurityContext[SecurityContext.STYLE]="STYLE",SecurityContext[SecurityContext.SCRIPT]="SCRIPT",SecurityContext[SecurityContext.URL]="URL",SecurityContext[SecurityContext.RESOURCE_URL]="RESOURCE_URL";var Sanitizer=function(){function Sanitizer(){}return Sanitizer.prototype.sanitize=function(context,value){},Sanitizer}(),DebugContext=function(){function DebugContext(){}return DebugContext.prototype.view=function(){},DebugContext.prototype.nodeIndex=function(){},DebugContext.prototype.injector=function(){},DebugContext.prototype.component=function(){},DebugContext.prototype.providerTokens=function(){},DebugContext.prototype.references=function(){},DebugContext.prototype.context=function(){},DebugContext.prototype.componentRenderElement=function(){},DebugContext.prototype.renderNode=function(){},DebugContext.prototype.logError=function(console){for(var values=[],_i=1;_i<arguments.length;_i++)values[_i-1]=arguments[_i]},DebugContext}(),Services={setCurrentNode:void 0,createRootView:void 0,createEmbeddedView:void 0,createComponentView:void 0,createNgModuleRef:void 0,overrideProvider:void 0,clearProviderOverrides:void 0,checkAndUpdateView:void 0,checkNoChangesView:void 0,destroyView:void 0,resolveDep:void 0,createDebugContext:void 0,handleEvent:void 0,updateDirectives:void 0,updateRenderer:void 0,dirtyParentQueries:void 0},NOOP=function(){},_tokenKeyCache=new Map,UNDEFINED_RENDERER_TYPE_ID="$$undefined",EMPTY_RENDERER_TYPE_ID="$$empty",_renderCompCount=0,DEFINITION_CACHE=new WeakMap,NS_PREFIX_RE=/^:([^:]+):(.+)$/,EMPTY_ARRAY=[],EMPTY_MAP={},NOT_CREATED$1=new Object,InjectorRefTokenKey$1=tokenKey(Injector),NgModuleRefTokenKey=tokenKey(NgModuleRef),EMPTY_CONTEXT=new Object,ComponentFactory_=function(_super){function ComponentFactory_(selector,componentType,viewDefFactory,_inputs,_outputs,ngContentSelectors){var _this=_super.call(this)||this;return _this.selector=selector,_this.componentType=componentType,_this._inputs=_inputs,_this._outputs=_outputs,_this.ngContentSelectors=ngContentSelectors,_this.viewDefFactory=viewDefFactory,_this}return __extends(ComponentFactory_,_super),Object.defineProperty(ComponentFactory_.prototype,"inputs",{get:function(){var inputsArr=[],inputs=this._inputs;for(var propName in inputs){var templateName=inputs[propName];inputsArr.push({propName:propName,templateName:templateName})}return inputsArr},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentFactory_.prototype,"outputs",{get:function(){var outputsArr=[];for(var propName in this._outputs){var templateName=this._outputs[propName];outputsArr.push({propName:propName,templateName:templateName})}return outputsArr},enumerable:!0,configurable:!0}),ComponentFactory_.prototype.create=function(injector,projectableNodes,rootSelectorOrNode,ngModule){if(!ngModule)throw new Error("ngModule should be provided");var viewDef=resolveDefinition(this.viewDefFactory),componentNodeIndex=viewDef.nodes[0].element.componentProvider.index,view=Services.createRootView(injector,projectableNodes||[],rootSelectorOrNode,viewDef,ngModule,EMPTY_CONTEXT),component=asProviderData(view,componentNodeIndex).instance;return rootSelectorOrNode&&view.renderer.setAttribute(asElementData(view,0).renderElement,"ng-version",VERSION.full),new ComponentRef_(view,new ViewRef_(view),component)},ComponentFactory_}(ComponentFactory),ComponentRef_=function(_super){function ComponentRef_(_view,_viewRef,_component){var _this=_super.call(this)||this;return _this._view=_view,_this._viewRef=_viewRef,_this._component=_component,_this._elDef=_this._view.def.nodes[0],_this}return __extends(ComponentRef_,_super),Object.defineProperty(ComponentRef_.prototype,"location",{get:function(){return new ElementRef(asElementData(this._view,this._elDef.index).renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef_.prototype,"injector",{get:function(){return new Injector_(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef_.prototype,"instance",{get:function(){return this._component},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef_.prototype,"hostView",{get:function(){return this._viewRef},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef_.prototype,"changeDetectorRef",{get:function(){return this._viewRef},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef_.prototype,"componentType",{get:function(){return this._component.constructor},enumerable:!0,configurable:!0}),ComponentRef_.prototype.destroy=function(){this._viewRef.destroy()},ComponentRef_.prototype.onDestroy=function(callback){this._viewRef.onDestroy(callback)},ComponentRef_}(ComponentRef),ViewContainerRef_=function(){function ViewContainerRef_(_view,_elDef,_data){this._view=_view,this._elDef=_elDef,this._data=_data,this._embeddedViews=[]}return Object.defineProperty(ViewContainerRef_.prototype,"element",{get:function(){return new ElementRef(this._data.renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(ViewContainerRef_.prototype,"injector",{get:function(){return new Injector_(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(ViewContainerRef_.prototype,"parentInjector",{get:function(){for(var view=this._view,elDef=this._elDef.parent;!elDef&&view;)elDef=viewParentEl(view),view=view.parent;return view?new Injector_(view,elDef):new Injector_(this._view,null)},enumerable:!0,configurable:!0}),ViewContainerRef_.prototype.clear=function(){for(var len=this._embeddedViews.length,i=len-1;i>=0;i--){var view=detachEmbeddedView(this._data,i);Services.destroyView(view)}},ViewContainerRef_.prototype.get=function(index){var view=this._embeddedViews[index];if(view){var ref=new ViewRef_(view);return ref.attachToViewContainerRef(this),ref}return null},Object.defineProperty(ViewContainerRef_.prototype,"length",{get:function(){return this._embeddedViews.length},enumerable:!0,configurable:!0}),ViewContainerRef_.prototype.createEmbeddedView=function(templateRef,context,index){var viewRef=templateRef.createEmbeddedView(context||{});return this.insert(viewRef,index),viewRef},ViewContainerRef_.prototype.createComponent=function(componentFactory,index,injector,projectableNodes,ngModuleRef){var contextInjector=injector||this.parentInjector;ngModuleRef||componentFactory instanceof ComponentFactoryBoundToModule||(ngModuleRef=contextInjector.get(NgModuleRef));var componentRef=componentFactory.create(contextInjector,projectableNodes,void 0,ngModuleRef);return this.insert(componentRef.hostView,index),componentRef},ViewContainerRef_.prototype.insert=function(viewRef,index){var viewRef_=viewRef,viewData=viewRef_._view;return attachEmbeddedView(this._view,this._data,index,viewData),viewRef_.attachToViewContainerRef(this),viewRef},ViewContainerRef_.prototype.move=function(viewRef,currentIndex){var previousIndex=this._embeddedViews.indexOf(viewRef._view);return moveEmbeddedView(this._data,previousIndex,currentIndex),viewRef},ViewContainerRef_.prototype.indexOf=function(viewRef){return this._embeddedViews.indexOf(viewRef._view)},ViewContainerRef_.prototype.remove=function(index){var viewData=detachEmbeddedView(this._data,index);viewData&&Services.destroyView(viewData)},ViewContainerRef_.prototype.detach=function(index){var view=detachEmbeddedView(this._data,index);return view?new ViewRef_(view):null},ViewContainerRef_}(),ViewRef_=function(){function ViewRef_(_view){this._view=_view,this._viewContainerRef=null,this._appRef=null}return Object.defineProperty(ViewRef_.prototype,"rootNodes",{get:function(){return rootRenderNodes(this._view)},enumerable:!0,configurable:!0}),Object.defineProperty(ViewRef_.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(ViewRef_.prototype,"destroyed",{get:function(){return 0!=(128&this._view.state)},enumerable:!0,configurable:!0}),ViewRef_.prototype.markForCheck=function(){markParentViewsForCheck(this._view)},ViewRef_.prototype.detach=function(){this._view.state&=-5},ViewRef_.prototype.detectChanges=function(){var fs=this._view.root.rendererFactory;fs.begin&&fs.begin(),Services.checkAndUpdateView(this._view),fs.end&&fs.end()},ViewRef_.prototype.checkNoChanges=function(){Services.checkNoChangesView(this._view)},ViewRef_.prototype.reattach=function(){this._view.state|=4},ViewRef_.prototype.onDestroy=function(callback){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(callback)},ViewRef_.prototype.destroy=function(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),Services.destroyView(this._view)},ViewRef_.prototype.detachFromAppRef=function(){this._appRef=null,renderDetachView(this._view),Services.dirtyParentQueries(this._view)},ViewRef_.prototype.attachToAppRef=function(appRef){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=appRef},ViewRef_.prototype.attachToViewContainerRef=function(vcRef){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=vcRef},ViewRef_}(),TemplateRef_=function(_super){function TemplateRef_(_parentView,_def){var _this=_super.call(this)||this;return _this._parentView=_parentView,_this._def=_def,_this}return __extends(TemplateRef_,_super),TemplateRef_.prototype.createEmbeddedView=function(context){return new ViewRef_(Services.createEmbeddedView(this._parentView,this._def,this._def.element.template,context))},Object.defineProperty(TemplateRef_.prototype,"elementRef",{get:function(){return new ElementRef(asElementData(this._parentView,this._def.index).renderElement)},enumerable:!0,configurable:!0}),TemplateRef_}(TemplateRef),Injector_=function(){function Injector_(view,elDef){this.view=view,this.elDef=elDef}return Injector_.prototype.get=function(token,notFoundValue){void 0===notFoundValue&&(notFoundValue=Injector.THROW_IF_NOT_FOUND);var allowPrivateServices=!!this.elDef&&0!=(33554432&this.elDef.flags);return Services.resolveDep(this.view,this.elDef,allowPrivateServices,{flags:0,token:token,tokenKey:tokenKey(token)},notFoundValue)},Injector_}(),RendererAdapter=function(){function RendererAdapter(delegate){this.delegate=delegate}return RendererAdapter.prototype.selectRootElement=function(selectorOrNode){return this.delegate.selectRootElement(selectorOrNode)},RendererAdapter.prototype.createElement=function(parent,namespaceAndName){var _a=splitNamespace(namespaceAndName),ns=_a[0],name=_a[1],el=this.delegate.createElement(name,ns);return parent&&this.delegate.appendChild(parent,el),el},RendererAdapter.prototype.createViewRoot=function(hostElement){return hostElement},RendererAdapter.prototype.createTemplateAnchor=function(parentElement){var comment=this.delegate.createComment("");return parentElement&&this.delegate.appendChild(parentElement,comment),comment},RendererAdapter.prototype.createText=function(parentElement,value){var node=this.delegate.createText(value);return parentElement&&this.delegate.appendChild(parentElement,node),node},RendererAdapter.prototype.projectNodes=function(parentElement,nodes){for(var i=0;i<nodes.length;i++)this.delegate.appendChild(parentElement,nodes[i])},RendererAdapter.prototype.attachViewAfter=function(node,viewRootNodes){for(var parentElement=this.delegate.parentNode(node),nextSibling=this.delegate.nextSibling(node),i=0;i<viewRootNodes.length;i++)this.delegate.insertBefore(parentElement,viewRootNodes[i],nextSibling)},RendererAdapter.prototype.detachView=function(viewRootNodes){for(var i=0;i<viewRootNodes.length;i++){var node=viewRootNodes[i],parentElement=this.delegate.parentNode(node);this.delegate.removeChild(parentElement,node)}},RendererAdapter.prototype.destroyView=function(hostElement,viewAllNodes){for(var i=0;i<viewAllNodes.length;i++)this.delegate.destroyNode(viewAllNodes[i])},RendererAdapter.prototype.listen=function(renderElement,name,callback){return this.delegate.listen(renderElement,name,callback)},RendererAdapter.prototype.listenGlobal=function(target,name,callback){return this.delegate.listen(target,name,callback)},RendererAdapter.prototype.setElementProperty=function(renderElement,propertyName,propertyValue){this.delegate.setProperty(renderElement,propertyName,propertyValue)},RendererAdapter.prototype.setElementAttribute=function(renderElement,namespaceAndName,attributeValue){var _a=splitNamespace(namespaceAndName),ns=_a[0],name=_a[1];null!=attributeValue?this.delegate.setAttribute(renderElement,name,attributeValue,ns):this.delegate.removeAttribute(renderElement,name,ns)},RendererAdapter.prototype.setBindingDebugInfo=function(renderElement,propertyName,propertyValue){},RendererAdapter.prototype.setElementClass=function(renderElement,className,isAdd){isAdd?this.delegate.addClass(renderElement,className):this.delegate.removeClass(renderElement,className)},RendererAdapter.prototype.setElementStyle=function(renderElement,styleName,styleValue){null!=styleValue?this.delegate.setStyle(renderElement,styleName,styleValue):this.delegate.removeStyle(renderElement,styleName)},RendererAdapter.prototype.invokeElementMethod=function(renderElement,methodName,args){renderElement[methodName].apply(renderElement,args)},RendererAdapter.prototype.setText=function(renderNode$$1,text){this.delegate.setValue(renderNode$$1,text)},RendererAdapter.prototype.animate=function(){throw new Error("Renderer.animate is no longer supported!")},RendererAdapter}(),NgModuleRef_=function(){function NgModuleRef_(_moduleType,_parent,_bootstrapComponents,_def){this._moduleType=_moduleType,this._parent=_parent,this._bootstrapComponents=_bootstrapComponents,this._def=_def,this._destroyListeners=[],this._destroyed=!1,initNgModule(this)}return NgModuleRef_.prototype.get=function(token,notFoundValue){return void 0===notFoundValue&&(notFoundValue=Injector.THROW_IF_NOT_FOUND),resolveNgModuleDep(this,{token:token,tokenKey:tokenKey(token),flags:0},notFoundValue)},Object.defineProperty(NgModuleRef_.prototype,"instance",{get:function(){return this.get(this._moduleType)},enumerable:!0,configurable:!0}),Object.defineProperty(NgModuleRef_.prototype,"componentFactoryResolver",{get:function(){return this.get(ComponentFactoryResolver)},enumerable:!0,configurable:!0}),Object.defineProperty(NgModuleRef_.prototype,"injector",{get:function(){return this},enumerable:!0,configurable:!0}),NgModuleRef_.prototype.destroy=function(){if(this._destroyed)throw new Error("The ng module "+stringify(this.instance.constructor)+" has already been destroyed.");this._destroyed=!0,callNgModuleLifecycle(this,131072),this._destroyListeners.forEach(function(listener){return listener()})},NgModuleRef_.prototype.onDestroy=function(callback){this._destroyListeners.push(callback)},NgModuleRef_}(),RendererV1TokenKey=tokenKey(Renderer),Renderer2TokenKey=tokenKey(Renderer2),ElementRefTokenKey=tokenKey(ElementRef),ViewContainerRefTokenKey=tokenKey(ViewContainerRef),TemplateRefTokenKey=tokenKey(TemplateRef),ChangeDetectorRefTokenKey=tokenKey(ChangeDetectorRef),InjectorRefTokenKey=tokenKey(Injector),NOT_CREATED=new Object,NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR={},ViewAction={};ViewAction.CreateViewNodes=0,ViewAction.CheckNoChanges=1,ViewAction.CheckNoChangesProjectedViews=2,ViewAction.CheckAndUpdate=3,ViewAction.CheckAndUpdateProjectedViews=4,ViewAction.Destroy=5,ViewAction[ViewAction.CreateViewNodes]="CreateViewNodes",ViewAction[ViewAction.CheckNoChanges]="CheckNoChanges",ViewAction[ViewAction.CheckNoChangesProjectedViews]="CheckNoChangesProjectedViews",ViewAction[ViewAction.CheckAndUpdate]="CheckAndUpdate",ViewAction[ViewAction.CheckAndUpdateProjectedViews]="CheckAndUpdateProjectedViews",ViewAction[ViewAction.Destroy]="Destroy";var initialized=!1,providerOverrides=new Map,DebugAction={};DebugAction.create=0,DebugAction.detectChanges=1,DebugAction.checkNoChanges=2,DebugAction.destroy=3,DebugAction.handleEvent=4,DebugAction[DebugAction.create]="create",DebugAction[DebugAction.detectChanges]="detectChanges",DebugAction[DebugAction.checkNoChanges]="checkNoChanges",DebugAction[DebugAction.destroy]="destroy",DebugAction[DebugAction.handleEvent]="handleEvent";var _currentAction,_currentView,_currentNodeIndex,CAMEL_CASE_REGEXP=/([A-Z])/g,DebugContext_=function(){function DebugContext_(view,nodeIndex){this.view=view,this.nodeIndex=nodeIndex,null==nodeIndex&&(this.nodeIndex=nodeIndex=0),this.nodeDef=view.def.nodes[nodeIndex];for(var elDef=this.nodeDef,elView=view;elDef&&0==(1&elDef.flags);)elDef=elDef.parent;if(!elDef)for(;!elDef&&elView;)elDef=viewParentEl(elView),elView=elView.parent;this.elDef=elDef,this.elView=elView}return Object.defineProperty(DebugContext_.prototype,"elOrCompView",{get:function(){return asElementData(this.elView,this.elDef.index).componentView||this.view},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext_.prototype,"injector",{get:function(){return createInjector(this.elView,this.elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext_.prototype,"component",{get:function(){return this.elOrCompView.component},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext_.prototype,"context",{get:function(){return this.elOrCompView.context},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext_.prototype,"providerTokens",{get:function(){var tokens=[];if(this.elDef)for(var i=this.elDef.index+1;i<=this.elDef.index+this.elDef.childCount;i++){var childDef=this.elView.def.nodes[i];20224&childDef.flags&&tokens.push(childDef.provider.token),i+=childDef.childCount}return tokens},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext_.prototype,"references",{get:function(){var references={};if(this.elDef){collectReferences(this.elView,this.elDef,references);for(var i=this.elDef.index+1;i<=this.elDef.index+this.elDef.childCount;i++){var childDef=this.elView.def.nodes[i];20224&childDef.flags&&collectReferences(this.elView,childDef,references),i+=childDef.childCount}}return references},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext_.prototype,"componentRenderElement",{get:function(){var elData=findHostElement(this.elOrCompView);return elData?elData.renderElement:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext_.prototype,"renderNode",{get:function(){return 2&this.nodeDef.flags?renderNode(this.view,this.nodeDef):renderNode(this.elView,this.elDef)},enumerable:!0,configurable:!0}),DebugContext_.prototype.logError=function(console){for(var values=[],_i=1;_i<arguments.length;_i++)values[_i-1]=arguments[_i];var logViewDef,logNodeIndex;2&this.nodeDef.flags?(logViewDef=this.view.def,logNodeIndex=this.nodeDef.index):(logViewDef=this.elView.def,logNodeIndex=this.elDef.index);var renderNodeIndex=getRenderNodeIndex(logViewDef,logNodeIndex),currRenderNodeIndex=-1,nodeLogger=function(){return currRenderNodeIndex++,currRenderNodeIndex===renderNodeIndex?(_a=console.error).bind.apply(_a,[console].concat(values)):NOOP;var _a};logViewDef.factory(nodeLogger),currRenderNodeIndex<renderNodeIndex&&(console.error("Illegal state: the ViewDefinitionFactory did not call the logger!"),console.error.apply(console,values))},DebugContext_}(),DebugRendererFactory2=function(){function DebugRendererFactory2(delegate){this.delegate=delegate}return DebugRendererFactory2.prototype.createRenderer=function(element,renderData){return new DebugRenderer2(this.delegate.createRenderer(element,renderData))},DebugRendererFactory2.prototype.begin=function(){this.delegate.begin&&this.delegate.begin()},DebugRendererFactory2.prototype.end=function(){this.delegate.end&&this.delegate.end()},DebugRendererFactory2.prototype.whenRenderingDone=function(){return this.delegate.whenRenderingDone?this.delegate.whenRenderingDone():Promise.resolve(null)},DebugRendererFactory2}(),DebugRenderer2=function(){function DebugRenderer2(delegate){this.delegate=delegate}return Object.defineProperty(DebugRenderer2.prototype,"data",{get:function(){return this.delegate.data},enumerable:!0,configurable:!0}),DebugRenderer2.prototype.destroyNode=function(node){removeDebugNodeFromIndex(getDebugNode(node)),this.delegate.destroyNode&&this.delegate.destroyNode(node)},DebugRenderer2.prototype.destroy=function(){this.delegate.destroy()},DebugRenderer2.prototype.createElement=function(name,namespace){var el=this.delegate.createElement(name,namespace),debugCtx=getCurrentDebugContext();if(debugCtx){var debugEl=new DebugElement(el,null,debugCtx);debugEl.name=name,indexDebugNode(debugEl)}return el},DebugRenderer2.prototype.createComment=function(value){var comment=this.delegate.createComment(value),debugCtx=getCurrentDebugContext();return debugCtx&&indexDebugNode(new DebugNode(comment,null,debugCtx)),comment},DebugRenderer2.prototype.createText=function(value){var text=this.delegate.createText(value),debugCtx=getCurrentDebugContext();return debugCtx&&indexDebugNode(new DebugNode(text,null,debugCtx)),text},DebugRenderer2.prototype.appendChild=function(parent,newChild){var debugEl=getDebugNode(parent),debugChildEl=getDebugNode(newChild);debugEl&&debugChildEl&&debugEl instanceof DebugElement&&debugEl.addChild(debugChildEl),this.delegate.appendChild(parent,newChild)},DebugRenderer2.prototype.insertBefore=function(parent,newChild,refChild){var debugEl=getDebugNode(parent),debugChildEl=getDebugNode(newChild),debugRefEl=getDebugNode(refChild);debugEl&&debugChildEl&&debugEl instanceof DebugElement&&debugEl.insertBefore(debugRefEl,debugChildEl),this.delegate.insertBefore(parent,newChild,refChild)},DebugRenderer2.prototype.removeChild=function(parent,oldChild){var debugEl=getDebugNode(parent),debugChildEl=getDebugNode(oldChild);debugEl&&debugChildEl&&debugEl instanceof DebugElement&&debugEl.removeChild(debugChildEl),this.delegate.removeChild(parent,oldChild)},DebugRenderer2.prototype.selectRootElement=function(selectorOrNode){var el=this.delegate.selectRootElement(selectorOrNode),debugCtx=getCurrentDebugContext();return debugCtx&&indexDebugNode(new DebugElement(el,null,debugCtx)),el},DebugRenderer2.prototype.setAttribute=function(el,name,value,namespace){var debugEl=getDebugNode(el);if(debugEl&&debugEl instanceof DebugElement){var fullName=namespace?namespace+":"+name:name;debugEl.attributes[fullName]=value}this.delegate.setAttribute(el,name,value,namespace)},DebugRenderer2.prototype.removeAttribute=function(el,name,namespace){var debugEl=getDebugNode(el);if(debugEl&&debugEl instanceof DebugElement){var fullName=namespace?namespace+":"+name:name;debugEl.attributes[fullName]=null}this.delegate.removeAttribute(el,name,namespace)},DebugRenderer2.prototype.addClass=function(el,name){var debugEl=getDebugNode(el);debugEl&&debugEl instanceof DebugElement&&(debugEl.classes[name]=!0),this.delegate.addClass(el,name)},DebugRenderer2.prototype.removeClass=function(el,name){var debugEl=getDebugNode(el);debugEl&&debugEl instanceof DebugElement&&(debugEl.classes[name]=!1),this.delegate.removeClass(el,name)},DebugRenderer2.prototype.setStyle=function(el,style,value,flags){var debugEl=getDebugNode(el);debugEl&&debugEl instanceof DebugElement&&(debugEl.styles[style]=value),this.delegate.setStyle(el,style,value,flags)},DebugRenderer2.prototype.removeStyle=function(el,style,flags){var debugEl=getDebugNode(el);debugEl&&debugEl instanceof DebugElement&&(debugEl.styles[style]=null),this.delegate.removeStyle(el,style,flags)},DebugRenderer2.prototype.setProperty=function(el,name,value){var debugEl=getDebugNode(el);debugEl&&debugEl instanceof DebugElement&&(debugEl.properties[name]=value),this.delegate.setProperty(el,name,value)},DebugRenderer2.prototype.listen=function(target,eventName,callback){if("string"!=typeof target){var debugEl=getDebugNode(target);debugEl&&debugEl.listeners.push(new EventListener(eventName,callback))}return this.delegate.listen(target,eventName,callback)},DebugRenderer2.prototype.parentNode=function(node){return this.delegate.parentNode(node)},DebugRenderer2.prototype.nextSibling=function(node){return this.delegate.nextSibling(node)},DebugRenderer2.prototype.setValue=function(node,value){return this.delegate.setValue(node,value)},DebugRenderer2}(),NgModuleFactory_=function(_super){function NgModuleFactory_(moduleType,_bootstrapComponents,_ngModuleDefFactory){var _this=_super.call(this)||this;return _this.moduleType=moduleType,_this._bootstrapComponents=_bootstrapComponents,_this._ngModuleDefFactory=_ngModuleDefFactory,_this}return __extends(NgModuleFactory_,_super),NgModuleFactory_.prototype.create=function(parentInjector){initServicesIfNeeded();var def=resolveDefinition(this._ngModuleDefFactory);return Services.createNgModuleRef(this.moduleType,parentInjector||Injector.NULL,this._bootstrapComponents,def)},NgModuleFactory_}(NgModuleFactory);exports.Class=Class,exports.createPlatform=createPlatform,exports.assertPlatform=assertPlatform,exports.destroyPlatform=destroyPlatform,exports.getPlatform=getPlatform,exports.PlatformRef=PlatformRef,exports.ApplicationRef=ApplicationRef,exports.enableProdMode=enableProdMode,exports.isDevMode=isDevMode,exports.createPlatformFactory=createPlatformFactory,exports.NgProbeToken=NgProbeToken,exports.APP_ID=APP_ID,exports.PACKAGE_ROOT_URL=PACKAGE_ROOT_URL,exports.PLATFORM_INITIALIZER=PLATFORM_INITIALIZER,exports.PLATFORM_ID=PLATFORM_ID,exports.APP_BOOTSTRAP_LISTENER=APP_BOOTSTRAP_LISTENER,exports.APP_INITIALIZER=APP_INITIALIZER,exports.ApplicationInitStatus=ApplicationInitStatus,exports.DebugElement=DebugElement,exports.DebugNode=DebugNode,exports.asNativeElements=asNativeElements,exports.getDebugNode=getDebugNode,exports.Testability=Testability,exports.TestabilityRegistry=TestabilityRegistry,exports.setTestabilityGetter=setTestabilityGetter,exports.TRANSLATIONS=TRANSLATIONS,exports.TRANSLATIONS_FORMAT=TRANSLATIONS_FORMAT,exports.LOCALE_ID=LOCALE_ID,exports.MissingTranslationStrategy=MissingTranslationStrategy,exports.ApplicationModule=ApplicationModule,exports.wtfCreateScope=wtfCreateScope,exports.wtfLeave=wtfLeave,exports.wtfStartTimeRange=wtfStartTimeRange,exports.wtfEndTimeRange=wtfEndTimeRange,exports.Type=Type,exports.EventEmitter=EventEmitter,exports.ErrorHandler=ErrorHandler,exports.Sanitizer=Sanitizer,exports.SecurityContext=SecurityContext,exports.ANALYZE_FOR_ENTRY_COMPONENTS=ANALYZE_FOR_ENTRY_COMPONENTS,exports.Attribute=Attribute,exports.ContentChild=ContentChild,exports.ContentChildren=ContentChildren,exports.Query=Query,exports.ViewChild=ViewChild,exports.ViewChildren=ViewChildren,exports.Component=Component,exports.Directive=Directive,exports.HostBinding=HostBinding,exports.HostListener=HostListener,exports.Input=Input,exports.Output=Output,exports.Pipe=Pipe,exports.CUSTOM_ELEMENTS_SCHEMA=CUSTOM_ELEMENTS_SCHEMA,exports.NO_ERRORS_SCHEMA=NO_ERRORS_SCHEMA,exports.NgModule=NgModule,exports.ViewEncapsulation=ViewEncapsulation,exports.Version=Version,exports.VERSION=VERSION,exports.forwardRef=forwardRef,exports.resolveForwardRef=resolveForwardRef,exports.Injector=Injector,exports.ReflectiveInjector=ReflectiveInjector,exports.ResolvedReflectiveFactory=ResolvedReflectiveFactory,exports.ReflectiveKey=ReflectiveKey,exports.InjectionToken=InjectionToken,exports.OpaqueToken=OpaqueToken,exports.Inject=Inject,exports.Optional=Optional,exports.Injectable=Injectable,exports.Self=Self,exports.SkipSelf=SkipSelf,exports.Host=Host,exports.NgZone=NgZone,exports.RenderComponentType=RenderComponentType,exports.Renderer=Renderer,exports.Renderer2=Renderer2,exports.RendererFactory2=RendererFactory2,exports.RendererStyleFlags2=RendererStyleFlags2,exports.RootRenderer=RootRenderer,exports.COMPILER_OPTIONS=COMPILER_OPTIONS,exports.Compiler=Compiler,exports.CompilerFactory=CompilerFactory,exports.ModuleWithComponentFactories=ModuleWithComponentFactories,exports.ComponentFactory=ComponentFactory,exports.ComponentRef=ComponentRef,exports.ComponentFactoryResolver=ComponentFactoryResolver,exports.ElementRef=ElementRef,exports.NgModuleFactory=NgModuleFactory,exports.NgModuleRef=NgModuleRef,exports.NgModuleFactoryLoader=NgModuleFactoryLoader,exports.getModuleFactory=getModuleFactory,exports.QueryList=QueryList,exports.SystemJsNgModuleLoader=SystemJsNgModuleLoader,exports.SystemJsNgModuleLoaderConfig=SystemJsNgModuleLoaderConfig,exports.TemplateRef=TemplateRef,exports.ViewContainerRef=ViewContainerRef,exports.EmbeddedViewRef=EmbeddedViewRef,exports.ViewRef=ViewRef,exports.ChangeDetectionStrategy=ChangeDetectionStrategy,exports.ChangeDetectorRef=ChangeDetectorRef,exports.DefaultIterableDiffer=DefaultIterableDiffer,exports.IterableDiffers=IterableDiffers,exports.KeyValueDiffers=KeyValueDiffers,exports.SimpleChange=SimpleChange,exports.WrappedValue=WrappedValue,exports.platformCore=platformCore,exports.ɵALLOW_MULTIPLE_PLATFORMS=ALLOW_MULTIPLE_PLATFORMS,exports.ɵAPP_ID_RANDOM_PROVIDER=APP_ID_RANDOM_PROVIDER,exports.ɵValueUnwrapper=ValueUnwrapper,exports.ɵdevModeEqual=devModeEqual,exports.ɵisListLikeIterable=isListLikeIterable,exports.ɵChangeDetectorStatus=ChangeDetectorStatus,exports.ɵisDefaultChangeDetectionStrategy=isDefaultChangeDetectionStrategy,exports.ɵConsole=Console,exports.ɵERROR_COMPONENT_TYPE=ERROR_COMPONENT_TYPE,exports.ɵComponentFactory=ComponentFactory,exports.ɵCodegenComponentFactoryResolver=CodegenComponentFactoryResolver,exports.ɵViewMetadata=ViewMetadata,exports.ɵReflectionCapabilities=ReflectionCapabilities,exports.ɵRenderDebugInfo=RenderDebugInfo,exports.ɵglobal=_global,exports.ɵlooseIdentical=looseIdentical,exports.ɵstringify=stringify,exports.ɵmakeDecorator=makeDecorator,exports.ɵisObservable=isObservable,exports.ɵisPromise=isPromise,exports.ɵclearProviderOverrides=clearProviderOverrides,exports.ɵoverrideProvider=overrideProvider,exports.ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR=NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR,exports.ɵregisterModuleFactory=registerModuleFactory,exports.ɵEMPTY_ARRAY=EMPTY_ARRAY,exports.ɵEMPTY_MAP=EMPTY_MAP,exports.ɵand=anchorDef,exports.ɵccf=createComponentFactory,exports.ɵcmf=createNgModuleFactory,exports.ɵcrt=createRendererType2,exports.ɵdid=directiveDef,exports.ɵeld=elementDef,exports.ɵelementEventFullName=elementEventFullName,exports.ɵgetComponentViewDefinitionFactory=getComponentViewDefinitionFactory,exports.ɵinlineInterpolate=inlineInterpolate,exports.ɵinterpolate=interpolate,exports.ɵmod=moduleDef,exports.ɵmpd=moduleProvideDef,exports.ɵncd=ngContentDef,exports.ɵnov=nodeValue,exports.ɵpid=pipeDef,exports.ɵprd=providerDef,exports.ɵpad=pureArrayDef,exports.ɵpod=pureObjectDef,exports.ɵppd=purePipeDef,exports.ɵqud=queryDef,exports.ɵted=textDef,exports.ɵunv=unwrapValue,exports.ɵvid=viewDef,exports.AUTO_STYLE="*",exports.trigger=trigger$$1,exports.animate=animate$$1,exports.group=group$$1,exports.sequence=sequence$$1,exports.style=style$$1,exports.state=state$$1,exports.keyframes=keyframes$$1,exports.transition=transition$$1,exports.ɵx=animate$1,exports.ɵy=group$1,exports.ɵbc=keyframes$1,exports.ɵz=sequence$1,exports.ɵbb=state$1,exports.ɵba=style$1,exports.ɵbd=transition$1,exports.ɵw=trigger$1,exports.ɵk=_iterableDiffersFactory,exports.ɵl=_keyValueDiffersFactory,exports.ɵm=_localeFactory,exports.ɵe=ApplicationRef_,exports.ɵf=_appIdRandomProviderFactory,exports.ɵg=defaultIterableDiffers,exports.ɵh=defaultKeyValueDiffers,exports.ɵi=DefaultIterableDifferFactory,exports.ɵj=DefaultKeyValueDifferFactory,exports.ɵb=ReflectiveInjector_,exports.ɵc=ReflectiveDependency,exports.ɵd=resolveReflectiveProviders,exports.ɵn=wtfEnabled,exports.ɵp=createScope$1,exports.ɵo=detectWTF,exports.ɵs=endTimeRange,exports.ɵq=leave,exports.ɵr=startTimeRange,exports.ɵa=makeParamDecorator,exports.ɵt=_def,exports.ɵu=DebugContext,Object.defineProperty(exports,"__esModule",{value:!0})}),function(global,factory){"object"==typeof exports&&void 0!==module?factory(exports,require("@angular/common"),require("@angular/core")):$__System.registerDynamic("f",["e","c"],!1,function($__require,$__exports,$__module){return"function"==typeof factory?factory.call($__exports,$__exports,$__require("e"),$__require("c")):factory})}(0,function(exports,_angular_common,_angular_core){"use strict";function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}function getDOM(){return _DOM}function setRootDomAdapter(adapter){_DOM||(_DOM=adapter)}function getBaseElementHref(){return baseElement||(baseElement=document.querySelector("base"))?baseElement.getAttribute("href"):null}function relativePath(url){return urlParsingNode||(urlParsingNode=document.createElement("a")),urlParsingNode.setAttribute("href",url),"/"===urlParsingNode.pathname.charAt(0)?urlParsingNode.pathname:"/"+urlParsingNode.pathname}function parseCookieValue(cookieStr,name){name=encodeURIComponent(name);for(var _i=0,_a=cookieStr.split(";");_i<_a.length;_i++){var cookie=_a[_i],eqIndex=cookie.indexOf("="),_b=-1==eqIndex?[cookie,""]:[cookie.slice(0,eqIndex),cookie.slice(eqIndex+1)],cookieName=_b[0],cookieValue=_b[1];if(cookieName.trim()===name)return decodeURIComponent(cookieValue)}return null}function supportsState(){return!!window.history.pushState}function appInitializerFactory(transitionId,document,injector){return function(){injector.get(_angular_core.ApplicationInitStatus).donePromise.then(function(){var dom=getDOM();Array.prototype.slice.apply(dom.querySelectorAll(document,"style[ng-transition]")).filter(function(el){return dom.getAttribute(el,"ng-transition")===transitionId}).forEach(function(el){return dom.remove(el)})})}}function exportNgVar(name,value){ng||(_angular_core.ɵglobal.ng=ng=_angular_core.ɵglobal.ng||{}),ng[name]=value}function inspectNativeElement(element){return _angular_core.getDebugNode(element)}function _createNgProbe(extraTokens,coreTokens){var tokens=(extraTokens||[]).concat(coreTokens||[]);return exportNgVar(INSPECT_GLOBAL_NAME,inspectNativeElement),exportNgVar(CORE_TOKENS_GLOBAL_NAME,Object.assign({},CORE_TOKENS,_ngProbeTokensToMap(tokens||[]))),function(){return inspectNativeElement}}function _ngProbeTokensToMap(tokens){return tokens.reduce(function(prev,t){return prev[t.name]=t.token,prev},{})}function shimContentAttribute(componentShortId){return CONTENT_ATTR.replace(COMPONENT_REGEX,componentShortId)}function shimHostAttribute(componentShortId){return HOST_ATTR.replace(COMPONENT_REGEX,componentShortId)}function flattenStyles(compId,styles,target){for(var i=0;i<styles.length;i++){var style=styles[i];Array.isArray(style)?flattenStyles(compId,style,target):(style=style.replace(COMPONENT_REGEX,compId),target.push(style))}return target}function decoratePreventDefault(eventHandler){return function(event){!1===eventHandler(event)&&(event.preventDefault(),event.returnValue=!1)}}function checkNoSyntheticProp(name,nameKind){if(name.charCodeAt(0)===AT_CHARCODE)throw new Error("Found the synthetic "+nameKind+" "+name+'. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.')}function sanitizeUrl(url){return url=String(url),url.match(SAFE_URL_PATTERN)||url.match(DATA_URL_PATTERN)?url:(_angular_core.isDevMode()&&getDOM().log("WARNING: sanitizing unsafe URL value "+url+" (see http://g.co/ng/security#xss)"),"unsafe:"+url)}function sanitizeSrcset(srcset){return srcset=String(srcset),srcset.split(",").map(function(srcset){return sanitizeUrl(srcset.trim())}).join(", ")}function getInertElement(){if(inertElement)return inertElement;DOM=getDOM();var templateEl=DOM.createElement("template");if("content"in templateEl)return templateEl;var doc=DOM.createHtmlDocument();if(null==(inertElement=DOM.querySelector(doc,"body"))){var html=DOM.createElement("html",doc);inertElement=DOM.createElement("body",doc),DOM.appendChild(html,inertElement),DOM.appendChild(doc,html)}return inertElement}function tagSet(tags){for(var res={},_i=0,_a=tags.split(",");_i<_a.length;_i++){res[_a[_i]]=!0}return res}function merge(){for(var sets=[],_i=0;_i<arguments.length;_i++)sets[_i]=arguments[_i];for(var res={},_a=0,sets_1=sets;_a<sets_1.length;_a++){var s=sets_1[_a];for(var v in s)s.hasOwnProperty(v)&&(res[v]=!0)}return res}function checkClobberedElement(node,nextNode){if(nextNode&&DOM.contains(node,nextNode))throw new Error("Failed to sanitize html because the element is clobbered: "+DOM.getOuterHTML(node));return nextNode}function encodeEntities(value){return value.replace(/&/g,"&").replace(SURROGATE_PAIR_REGEXP,function(match){return"&#"+(1024*(match.charCodeAt(0)-55296)+(match.charCodeAt(1)-56320)+65536)+";"}).replace(NON_ALPHANUMERIC_REGEXP,function(match){return"&#"+match.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function stripCustomNsAttrs(el){DOM.attributeMap(el).forEach(function(_,attrName){"xmlns:ns1"!==attrName&&0!==attrName.indexOf("ns1:")||DOM.removeAttribute(el,attrName)});for(var _i=0,_a=DOM.childNodesAsList(el);_i<_a.length;_i++){var n=_a[_i];DOM.isElementNode(n)&&stripCustomNsAttrs(n)}}function sanitizeHtml(defaultDoc,unsafeHtmlInput){try{var containerEl=getInertElement(),unsafeHtml=unsafeHtmlInput?String(unsafeHtmlInput):"",mXSSAttempts=5,parsedHtml=unsafeHtml;do{if(0===mXSSAttempts)throw new Error("Failed to sanitize html because the input is unstable");mXSSAttempts--,unsafeHtml=parsedHtml,DOM.setInnerHTML(containerEl,unsafeHtml),defaultDoc.documentMode&&stripCustomNsAttrs(containerEl),parsedHtml=DOM.getInnerHTML(containerEl)}while(unsafeHtml!==parsedHtml);for(var sanitizer=new SanitizingHtmlSerializer,safeHtml=sanitizer.sanitizeChildren(DOM.getTemplateContent(containerEl)||containerEl),parent=DOM.getTemplateContent(containerEl)||containerEl,_i=0,_a=DOM.childNodesAsList(parent);_i<_a.length;_i++){var child=_a[_i];DOM.removeChild(parent,child)}return _angular_core.isDevMode()&&sanitizer.sanitizedSomething&&DOM.log("WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss)."),safeHtml}catch(e){throw inertElement=null,e}}function hasBalancedQuotes(value){for(var outsideSingle=!0,outsideDouble=!0,i=0;i<value.length;i++){var c=value.charAt(i);"'"===c&&outsideDouble?outsideSingle=!outsideSingle:'"'===c&&outsideSingle&&(outsideDouble=!outsideDouble)}return outsideSingle&&outsideDouble}function sanitizeStyle(value){if(!(value=String(value).trim()))return"";var urlMatch=value.match(URL_RE);return urlMatch&&sanitizeUrl(urlMatch[1])===urlMatch[1]||value.match(SAFE_STYLE_VALUE)&&hasBalancedQuotes(value)?value:(_angular_core.isDevMode()&&getDOM().log("WARNING: sanitizing unsafe style value "+value+" (see http://g.co/ng/security#xss)."),"unsafe")}function initDomAdapter(){BrowserDomAdapter.makeCurrent(),BrowserGetTestability.init()}function errorHandler(){return new _angular_core.ErrorHandler}function _document(){return document}function enableDebugTools(ref){return exportNgVar(PROFILER_GLOBAL_NAME,new AngularProfiler(ref)),ref}function disableDebugTools(){exportNgVar(PROFILER_GLOBAL_NAME,null)}var nodeContains,extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])},_DOM=null,DomAdapter=function(){function DomAdapter(){this.resourceLoaderType=null}return DomAdapter.prototype.hasProperty=function(element,name){},DomAdapter.prototype.setProperty=function(el,name,value){},DomAdapter.prototype.getProperty=function(el,name){},DomAdapter.prototype.invoke=function(el,methodName,args){},DomAdapter.prototype.logError=function(error){},DomAdapter.prototype.log=function(error){},DomAdapter.prototype.logGroup=function(error){},DomAdapter.prototype.logGroupEnd=function(){},Object.defineProperty(DomAdapter.prototype,"attrToPropMap",{get:function(){return this._attrToPropMap},set:function(value){this._attrToPropMap=value},enumerable:!0,configurable:!0}),DomAdapter.prototype.contains=function(nodeA,nodeB){},DomAdapter.prototype.parse=function(templateHtml){},DomAdapter.prototype.querySelector=function(el,selector){},DomAdapter.prototype.querySelectorAll=function(el,selector){},DomAdapter.prototype.on=function(el,evt,listener){},DomAdapter.prototype.onAndCancel=function(el,evt,listener){},DomAdapter.prototype.dispatchEvent=function(el,evt){},DomAdapter.prototype.createMouseEvent=function(eventType){},DomAdapter.prototype.createEvent=function(eventType){},DomAdapter.prototype.preventDefault=function(evt){},DomAdapter.prototype.isPrevented=function(evt){},DomAdapter.prototype.getInnerHTML=function(el){},DomAdapter.prototype.getTemplateContent=function(el){},DomAdapter.prototype.getOuterHTML=function(el){},DomAdapter.prototype.nodeName=function(node){},DomAdapter.prototype.nodeValue=function(node){},DomAdapter.prototype.type=function(node){},DomAdapter.prototype.content=function(node){},DomAdapter.prototype.firstChild=function(el){},DomAdapter.prototype.nextSibling=function(el){},DomAdapter.prototype.parentElement=function(el){},DomAdapter.prototype.childNodes=function(el){},DomAdapter.prototype.childNodesAsList=function(el){},DomAdapter.prototype.clearNodes=function(el){},DomAdapter.prototype.appendChild=function(el,node){},DomAdapter.prototype.removeChild=function(el,node){},DomAdapter.prototype.replaceChild=function(el,newNode,oldNode){},DomAdapter.prototype.remove=function(el){},DomAdapter.prototype.insertBefore=function(parent,ref,node){},DomAdapter.prototype.insertAllBefore=function(parent,ref,nodes){},DomAdapter.prototype.insertAfter=function(parent,el,node){},DomAdapter.prototype.setInnerHTML=function(el,value){},DomAdapter.prototype.getText=function(el){},DomAdapter.prototype.setText=function(el,value){},DomAdapter.prototype.getValue=function(el){},DomAdapter.prototype.setValue=function(el,value){},DomAdapter.prototype.getChecked=function(el){},DomAdapter.prototype.setChecked=function(el,value){},DomAdapter.prototype.createComment=function(text){},DomAdapter.prototype.createTemplate=function(html){},DomAdapter.prototype.createElement=function(tagName,doc){},DomAdapter.prototype.createElementNS=function(ns,tagName,doc){},DomAdapter.prototype.createTextNode=function(text,doc){},DomAdapter.prototype.createScriptTag=function(attrName,attrValue,doc){},DomAdapter.prototype.createStyleElement=function(css,doc){},DomAdapter.prototype.createShadowRoot=function(el){},DomAdapter.prototype.getShadowRoot=function(el){},DomAdapter.prototype.getHost=function(el){},DomAdapter.prototype.getDistributedNodes=function(el){},DomAdapter.prototype.clone=function(node){},DomAdapter.prototype.getElementsByClassName=function(element,name){},DomAdapter.prototype.getElementsByTagName=function(element,name){},DomAdapter.prototype.classList=function(element){},DomAdapter.prototype.addClass=function(element,className){},DomAdapter.prototype.removeClass=function(element,className){},DomAdapter.prototype.hasClass=function(element,className){},DomAdapter.prototype.setStyle=function(element,styleName,styleValue){},DomAdapter.prototype.removeStyle=function(element,styleName){},DomAdapter.prototype.getStyle=function(element,styleName){},DomAdapter.prototype.hasStyle=function(element,styleName,styleValue){},DomAdapter.prototype.tagName=function(element){},DomAdapter.prototype.attributeMap=function(element){},DomAdapter.prototype.hasAttribute=function(element,attribute){},DomAdapter.prototype.hasAttributeNS=function(element,ns,attribute){},DomAdapter.prototype.getAttribute=function(element,attribute){},DomAdapter.prototype.getAttributeNS=function(element,ns,attribute){},DomAdapter.prototype.setAttribute=function(element,name,value){},DomAdapter.prototype.setAttributeNS=function(element,ns,name,value){},DomAdapter.prototype.removeAttribute=function(element,attribute){},DomAdapter.prototype.removeAttributeNS=function(element,ns,attribute){},DomAdapter.prototype.templateAwareRoot=function(el){},DomAdapter.prototype.createHtmlDocument=function(){},DomAdapter.prototype.getBoundingClientRect=function(el){},DomAdapter.prototype.getTitle=function(doc){},DomAdapter.prototype.setTitle=function(doc,newTitle){},DomAdapter.prototype.elementMatches=function(n,selector){},DomAdapter.prototype.isTemplateElement=function(el){},DomAdapter.prototype.isTextNode=function(node){},DomAdapter.prototype.isCommentNode=function(node){},DomAdapter.prototype.isElementNode=function(node){},DomAdapter.prototype.hasShadowRoot=function(node){},DomAdapter.prototype.isShadowRoot=function(node){},DomAdapter.prototype.importIntoDoc=function(node){},DomAdapter.prototype.adoptNode=function(node){},DomAdapter.prototype.getHref=function(element){},DomAdapter.prototype.getEventKey=function(event){},DomAdapter.prototype.resolveAndSetHref=function(element,baseUrl,href){},DomAdapter.prototype.supportsDOMEvents=function(){},DomAdapter.prototype.supportsNativeShadowDOM=function(){},DomAdapter.prototype.getGlobalEventTarget=function(doc,target){},DomAdapter.prototype.getHistory=function(){},DomAdapter.prototype.getLocation=function(){},DomAdapter.prototype.getBaseHref=function(doc){},DomAdapter.prototype.resetBaseElement=function(){},DomAdapter.prototype.getUserAgent=function(){},DomAdapter.prototype.setData=function(element,name,value){},DomAdapter.prototype.getComputedStyle=function(element){},DomAdapter.prototype.getData=function(element,name){},DomAdapter.prototype.supportsWebAnimation=function(){},DomAdapter.prototype.performanceNow=function(){},DomAdapter.prototype.getAnimationPrefix=function(){},DomAdapter.prototype.getTransitionEnd=function(){},DomAdapter.prototype.supportsAnimation=function(){},DomAdapter.prototype.supportsCookies=function(){},DomAdapter.prototype.getCookie=function(name){},DomAdapter.prototype.setCookie=function(name,value){},DomAdapter}(),GenericBrowserDomAdapter=function(_super){function GenericBrowserDomAdapter(){var _this=_super.call(this)||this;_this._animationPrefix=null,_this._transitionEnd=null;try{var element_1=_this.createElement("div",document);if(null!=_this.getStyle(element_1,"animationName"))_this._animationPrefix="";else for(var domPrefixes=["Webkit","Moz","O","ms"],i=0;i<domPrefixes.length;i++)if(null!=_this.getStyle(element_1,domPrefixes[i]+"AnimationName")){_this._animationPrefix="-"+domPrefixes[i].toLowerCase()+"-";break}var transEndEventNames_1={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};Object.keys(transEndEventNames_1).forEach(function(key){null!=_this.getStyle(element_1,key)&&(_this._transitionEnd=transEndEventNames_1[key])})}catch(e){_this._animationPrefix=null,_this._transitionEnd=null}return _this}return __extends(GenericBrowserDomAdapter,_super),GenericBrowserDomAdapter.prototype.getDistributedNodes=function(el){return el.getDistributedNodes()},GenericBrowserDomAdapter.prototype.resolveAndSetHref=function(el,baseUrl,href){el.href=null==href?baseUrl:baseUrl+"/../"+href},GenericBrowserDomAdapter.prototype.supportsDOMEvents=function(){return!0},GenericBrowserDomAdapter.prototype.supportsNativeShadowDOM=function(){return"function"==typeof document.body.createShadowRoot},GenericBrowserDomAdapter.prototype.getAnimationPrefix=function(){return this._animationPrefix?this._animationPrefix:""},GenericBrowserDomAdapter.prototype.getTransitionEnd=function(){return this._transitionEnd?this._transitionEnd:""},GenericBrowserDomAdapter.prototype.supportsAnimation=function(){return null!=this._animationPrefix&&null!=this._transitionEnd},GenericBrowserDomAdapter}(DomAdapter),_attrToPropMap={class:"className",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},DOM_KEY_LOCATION_NUMPAD=3,_keyMap={"\b":"Backspace","\t":"Tab","":"Delete","":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},_chromeNumKeyPadMap={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","":"NumLock"};_angular_core.ɵglobal.Node&&(nodeContains=_angular_core.ɵglobal.Node.prototype.contains||function(node){return!!(16&this.compareDocumentPosition(node))});var urlParsingNode,BrowserDomAdapter=function(_super){function BrowserDomAdapter(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(BrowserDomAdapter,_super),BrowserDomAdapter.prototype.parse=function(templateHtml){throw new Error("parse not implemented")},BrowserDomAdapter.makeCurrent=function(){setRootDomAdapter(new BrowserDomAdapter)},BrowserDomAdapter.prototype.hasProperty=function(element,name){return name in element},BrowserDomAdapter.prototype.setProperty=function(el,name,value){el[name]=value},BrowserDomAdapter.prototype.getProperty=function(el,name){return el[name]},BrowserDomAdapter.prototype.invoke=function(el,methodName,args){el[methodName].apply(el,args)},BrowserDomAdapter.prototype.logError=function(error){window.console&&(console.error?console.error(error):console.log(error))},BrowserDomAdapter.prototype.log=function(error){window.console&&window.console.log&&window.console.log(error)},BrowserDomAdapter.prototype.logGroup=function(error){window.console&&window.console.group&&window.console.group(error)},BrowserDomAdapter.prototype.logGroupEnd=function(){window.console&&window.console.groupEnd&&window.console.groupEnd()},Object.defineProperty(BrowserDomAdapter.prototype,"attrToPropMap",{get:function(){return _attrToPropMap},enumerable:!0,configurable:!0}),BrowserDomAdapter.prototype.contains=function(nodeA,nodeB){return nodeContains.call(nodeA,nodeB)},BrowserDomAdapter.prototype.querySelector=function(el,selector){return el.querySelector(selector)},BrowserDomAdapter.prototype.querySelectorAll=function(el,selector){return el.querySelectorAll(selector)},BrowserDomAdapter.prototype.on=function(el,evt,listener){el.addEventListener(evt,listener,!1)},BrowserDomAdapter.prototype.onAndCancel=function(el,evt,listener){return el.addEventListener(evt,listener,!1),function(){el.removeEventListener(evt,listener,!1)}},BrowserDomAdapter.prototype.dispatchEvent=function(el,evt){el.dispatchEvent(evt)},BrowserDomAdapter.prototype.createMouseEvent=function(eventType){var evt=document.createEvent("MouseEvent");return evt.initEvent(eventType,!0,!0),evt},BrowserDomAdapter.prototype.createEvent=function(eventType){var evt=document.createEvent("Event");return evt.initEvent(eventType,!0,!0),evt},BrowserDomAdapter.prototype.preventDefault=function(evt){evt.preventDefault(),evt.returnValue=!1},BrowserDomAdapter.prototype.isPrevented=function(evt){return evt.defaultPrevented||null!=evt.returnValue&&!evt.returnValue},BrowserDomAdapter.prototype.getInnerHTML=function(el){return el.innerHTML},BrowserDomAdapter.prototype.getTemplateContent=function(el){return"content"in el&&el instanceof HTMLTemplateElement?el.content:null},BrowserDomAdapter.prototype.getOuterHTML=function(el){return el.outerHTML},BrowserDomAdapter.prototype.nodeName=function(node){return node.nodeName},BrowserDomAdapter.prototype.nodeValue=function(node){return node.nodeValue},BrowserDomAdapter.prototype.type=function(node){return node.type},BrowserDomAdapter.prototype.content=function(node){return this.hasProperty(node,"content")?node.content:node},BrowserDomAdapter.prototype.firstChild=function(el){return el.firstChild},BrowserDomAdapter.prototype.nextSibling=function(el){return el.nextSibling},BrowserDomAdapter.prototype.parentElement=function(el){return el.parentNode},BrowserDomAdapter.prototype.childNodes=function(el){return el.childNodes},BrowserDomAdapter.prototype.childNodesAsList=function(el){for(var childNodes=el.childNodes,res=new Array(childNodes.length),i=0;i<childNodes.length;i++)res[i]=childNodes[i];return res},BrowserDomAdapter.prototype.clearNodes=function(el){for(;el.firstChild;)el.removeChild(el.firstChild)},BrowserDomAdapter.prototype.appendChild=function(el,node){el.appendChild(node)},BrowserDomAdapter.prototype.removeChild=function(el,node){el.removeChild(node)},BrowserDomAdapter.prototype.replaceChild=function(el,newChild,oldChild){el.replaceChild(newChild,oldChild)},BrowserDomAdapter.prototype.remove=function(node){return node.parentNode&&node.parentNode.removeChild(node),node},BrowserDomAdapter.prototype.insertBefore=function(parent,ref,node){parent.insertBefore(node,ref)},BrowserDomAdapter.prototype.insertAllBefore=function(parent,ref,nodes){nodes.forEach(function(n){return parent.insertBefore(n,ref)})},BrowserDomAdapter.prototype.insertAfter=function(parent,ref,node){parent.insertBefore(node,ref.nextSibling)},BrowserDomAdapter.prototype.setInnerHTML=function(el,value){el.innerHTML=value},BrowserDomAdapter.prototype.getText=function(el){return el.textContent},BrowserDomAdapter.prototype.setText=function(el,value){el.textContent=value},BrowserDomAdapter.prototype.getValue=function(el){return el.value},BrowserDomAdapter.prototype.setValue=function(el,value){el.value=value},BrowserDomAdapter.prototype.getChecked=function(el){return el.checked},BrowserDomAdapter.prototype.setChecked=function(el,value){el.checked=value},BrowserDomAdapter.prototype.createComment=function(text){return document.createComment(text)},BrowserDomAdapter.prototype.createTemplate=function(html){var t=document.createElement("template");return t.innerHTML=html,t},BrowserDomAdapter.prototype.createElement=function(tagName,doc){return void 0===doc&&(doc=document),doc.createElement(tagName)},BrowserDomAdapter.prototype.createElementNS=function(ns,tagName,doc){return void 0===doc&&(doc=document),doc.createElementNS(ns,tagName)},BrowserDomAdapter.prototype.createTextNode=function(text,doc){return void 0===doc&&(doc=document),doc.createTextNode(text)},BrowserDomAdapter.prototype.createScriptTag=function(attrName,attrValue,doc){void 0===doc&&(doc=document);var el=doc.createElement("SCRIPT");return el.setAttribute(attrName,attrValue),el},BrowserDomAdapter.prototype.createStyleElement=function(css,doc){void 0===doc&&(doc=document);var style=doc.createElement("style");return this.appendChild(style,this.createTextNode(css)),style},BrowserDomAdapter.prototype.createShadowRoot=function(el){return el.createShadowRoot()},BrowserDomAdapter.prototype.getShadowRoot=function(el){return el.shadowRoot},BrowserDomAdapter.prototype.getHost=function(el){return el.host},BrowserDomAdapter.prototype.clone=function(node){return node.cloneNode(!0)},BrowserDomAdapter.prototype.getElementsByClassName=function(element,name){return element.getElementsByClassName(name)},BrowserDomAdapter.prototype.getElementsByTagName=function(element,name){return element.getElementsByTagName(name)},BrowserDomAdapter.prototype.classList=function(element){return Array.prototype.slice.call(element.classList,0)},BrowserDomAdapter.prototype.addClass=function(element,className){element.classList.add(className)},BrowserDomAdapter.prototype.removeClass=function(element,className){element.classList.remove(className)},BrowserDomAdapter.prototype.hasClass=function(element,className){return element.classList.contains(className)},BrowserDomAdapter.prototype.setStyle=function(element,styleName,styleValue){element.style[styleName]=styleValue},BrowserDomAdapter.prototype.removeStyle=function(element,stylename){element.style[stylename]=""},BrowserDomAdapter.prototype.getStyle=function(element,stylename){return element.style[stylename]},BrowserDomAdapter.prototype.hasStyle=function(element,styleName,styleValue){var value=this.getStyle(element,styleName)||"";return styleValue?value==styleValue:value.length>0},BrowserDomAdapter.prototype.tagName=function(element){return element.tagName},BrowserDomAdapter.prototype.attributeMap=function(element){for(var res=new Map,elAttrs=element.attributes,i=0;i<elAttrs.length;i++){var attrib=elAttrs[i];res.set(attrib.name,attrib.value)}return res},BrowserDomAdapter.prototype.hasAttribute=function(element,attribute){return element.hasAttribute(attribute)},BrowserDomAdapter.prototype.hasAttributeNS=function(element,ns,attribute){return element.hasAttributeNS(ns,attribute)},BrowserDomAdapter.prototype.getAttribute=function(element,attribute){return element.getAttribute(attribute)},BrowserDomAdapter.prototype.getAttributeNS=function(element,ns,name){return element.getAttributeNS(ns,name)},BrowserDomAdapter.prototype.setAttribute=function(element,name,value){element.setAttribute(name,value)},BrowserDomAdapter.prototype.setAttributeNS=function(element,ns,name,value){element.setAttributeNS(ns,name,value)},BrowserDomAdapter.prototype.removeAttribute=function(element,attribute){element.removeAttribute(attribute)},BrowserDomAdapter.prototype.removeAttributeNS=function(element,ns,name){element.removeAttributeNS(ns,name)},BrowserDomAdapter.prototype.templateAwareRoot=function(el){return this.isTemplateElement(el)?this.content(el):el},BrowserDomAdapter.prototype.createHtmlDocument=function(){return document.implementation.createHTMLDocument("fakeTitle")},BrowserDomAdapter.prototype.getBoundingClientRect=function(el){try{return el.getBoundingClientRect()}catch(e){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}},BrowserDomAdapter.prototype.getTitle=function(doc){return document.title},BrowserDomAdapter.prototype.setTitle=function(doc,newTitle){document.title=newTitle||""},BrowserDomAdapter.prototype.elementMatches=function(n,selector){return n instanceof HTMLElement&&(n.matches&&n.matches(selector)||n.msMatchesSelector&&n.msMatchesSelector(selector)||n.webkitMatchesSelector&&n.webkitMatchesSelector(selector))},BrowserDomAdapter.prototype.isTemplateElement=function(el){return el instanceof HTMLElement&&"TEMPLATE"==el.nodeName},BrowserDomAdapter.prototype.isTextNode=function(node){return node.nodeType===Node.TEXT_NODE},BrowserDomAdapter.prototype.isCommentNode=function(node){return node.nodeType===Node.COMMENT_NODE},BrowserDomAdapter.prototype.isElementNode=function(node){return node.nodeType===Node.ELEMENT_NODE},BrowserDomAdapter.prototype.hasShadowRoot=function(node){return null!=node.shadowRoot&&node instanceof HTMLElement},BrowserDomAdapter.prototype.isShadowRoot=function(node){return node instanceof DocumentFragment},BrowserDomAdapter.prototype.importIntoDoc=function(node){return document.importNode(this.templateAwareRoot(node),!0)},BrowserDomAdapter.prototype.adoptNode=function(node){return document.adoptNode(node)},BrowserDomAdapter.prototype.getHref=function(el){return el.href},BrowserDomAdapter.prototype.getEventKey=function(event){var key=event.key;if(null==key){if(null==(key=event.keyIdentifier))return"Unidentified";key.startsWith("U+")&&(key=String.fromCharCode(parseInt(key.substring(2),16)),event.location===DOM_KEY_LOCATION_NUMPAD&&_chromeNumKeyPadMap.hasOwnProperty(key)&&(key=_chromeNumKeyPadMap[key]))}return _keyMap[key]||key},BrowserDomAdapter.prototype.getGlobalEventTarget=function(doc,target){return"window"===target?window:"document"===target?document:"body"===target?document.body:null},BrowserDomAdapter.prototype.getHistory=function(){return window.history},BrowserDomAdapter.prototype.getLocation=function(){return window.location},BrowserDomAdapter.prototype.getBaseHref=function(doc){var href=getBaseElementHref();return null==href?null:relativePath(href)},BrowserDomAdapter.prototype.resetBaseElement=function(){baseElement=null},BrowserDomAdapter.prototype.getUserAgent=function(){return window.navigator.userAgent},BrowserDomAdapter.prototype.setData=function(element,name,value){this.setAttribute(element,"data-"+name,value)},BrowserDomAdapter.prototype.getData=function(element,name){return this.getAttribute(element,"data-"+name)},BrowserDomAdapter.prototype.getComputedStyle=function(element){return getComputedStyle(element)},BrowserDomAdapter.prototype.supportsWebAnimation=function(){return"function"==typeof Element.prototype.animate},BrowserDomAdapter.prototype.performanceNow=function(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()},BrowserDomAdapter.prototype.supportsCookies=function(){return!0},BrowserDomAdapter.prototype.getCookie=function(name){return parseCookieValue(document.cookie,name)},BrowserDomAdapter.prototype.setCookie=function(name,value){document.cookie=encodeURIComponent(name)+"="+encodeURIComponent(value)},BrowserDomAdapter}(GenericBrowserDomAdapter),baseElement=null,DOCUMENT$1=_angular_common.DOCUMENT,BrowserPlatformLocation=function(_super){function BrowserPlatformLocation(_doc){var _this=_super.call(this)||this;return _this._doc=_doc,_this._init(),_this}return __extends(BrowserPlatformLocation,_super),BrowserPlatformLocation.prototype._init=function(){this._location=getDOM().getLocation(),this._history=getDOM().getHistory()},Object.defineProperty(BrowserPlatformLocation.prototype,"location",{get:function(){return this._location},enumerable:!0,configurable:!0}),BrowserPlatformLocation.prototype.getBaseHrefFromDOM=function(){return getDOM().getBaseHref(this._doc)},BrowserPlatformLocation.prototype.onPopState=function(fn){getDOM().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",fn,!1)},BrowserPlatformLocation.prototype.onHashChange=function(fn){getDOM().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",fn,!1)},Object.defineProperty(BrowserPlatformLocation.prototype,"pathname",{get:function(){return this._location.pathname},set:function(newPath){this._location.pathname=newPath},enumerable:!0,configurable:!0}),Object.defineProperty(BrowserPlatformLocation.prototype,"search",{get:function(){return this._location.search},enumerable:!0,configurable:!0}),Object.defineProperty(BrowserPlatformLocation.prototype,"hash",{get:function(){return this._location.hash},enumerable:!0,configurable:!0}),BrowserPlatformLocation.prototype.pushState=function(state,title,url){supportsState()?this._history.pushState(state,title,url):this._location.hash=url},BrowserPlatformLocation.prototype.replaceState=function(state,title,url){supportsState()?this._history.replaceState(state,title,url):this._location.hash=url},BrowserPlatformLocation.prototype.forward=function(){this._history.forward()},BrowserPlatformLocation.prototype.back=function(){this._history.back()},BrowserPlatformLocation}(_angular_common.PlatformLocation);BrowserPlatformLocation.decorators=[{type:_angular_core.Injectable}],BrowserPlatformLocation.ctorParameters=function(){return[{type:void 0,decorators:[{type:_angular_core.Inject,args:[DOCUMENT$1]}]}]};var Meta=function(){function Meta(_doc){this._doc=_doc,this._dom=getDOM()}return Meta.prototype.addTag=function(tag,forceCreation){return void 0===forceCreation&&(forceCreation=!1),tag?this._getOrCreateElement(tag,forceCreation):null},Meta.prototype.addTags=function(tags,forceCreation){var _this=this;return void 0===forceCreation&&(forceCreation=!1),tags?tags.reduce(function(result,tag){return tag&&result.push(_this._getOrCreateElement(tag,forceCreation)),result},[]):[]},Meta.prototype.getTag=function(attrSelector){return attrSelector?this._dom.querySelector(this._doc,"meta["+attrSelector+"]"):null},Meta.prototype.getTags=function(attrSelector){if(!attrSelector)return[];var list=this._dom.querySelectorAll(this._doc,"meta["+attrSelector+"]");return list?[].slice.call(list):[]},Meta.prototype.updateTag=function(tag,selector){if(!tag)return null;selector=selector||this._parseSelector(tag);var meta=this.getTag(selector);return meta?this._setMetaElementAttributes(tag,meta):this._getOrCreateElement(tag,!0)},Meta.prototype.removeTag=function(attrSelector){this.removeTagElement(this.getTag(attrSelector))},Meta.prototype.removeTagElement=function(meta){meta&&this._dom.remove(meta)},Meta.prototype._getOrCreateElement=function(meta,forceCreation){if(void 0===forceCreation&&(forceCreation=!1),!forceCreation){var selector=this._parseSelector(meta),elem=this.getTag(selector);if(elem&&this._containsAttributes(meta,elem))return elem}var element=this._dom.createElement("meta");this._setMetaElementAttributes(meta,element);var head=this._dom.getElementsByTagName(this._doc,"head")[0];return this._dom.appendChild(head,element),element},Meta.prototype._setMetaElementAttributes=function(tag,el){var _this=this;return Object.keys(tag).forEach(function(prop){return _this._dom.setAttribute(el,prop,tag[prop])}),el},Meta.prototype._parseSelector=function(tag){var attr=tag.name?"name":"property";return attr+'="'+tag[attr]+'"'},Meta.prototype._containsAttributes=function(tag,elem){var _this=this;return Object.keys(tag).every(function(key){return _this._dom.getAttribute(elem,key)===tag[key]})},Meta}();Meta.decorators=[{type:_angular_core.Injectable}],Meta.ctorParameters=function(){return[{type:void 0,decorators:[{type:_angular_core.Inject,args:[DOCUMENT$1]}]}]};var TRANSITION_ID=new _angular_core.InjectionToken("TRANSITION_ID"),SERVER_TRANSITION_PROVIDERS=[{provide:_angular_core.APP_INITIALIZER,useFactory:appInitializerFactory,deps:[TRANSITION_ID,DOCUMENT$1,_angular_core.Injector],multi:!0}],BrowserGetTestability=function(){function BrowserGetTestability(){}return BrowserGetTestability.init=function(){_angular_core.setTestabilityGetter(new BrowserGetTestability)},BrowserGetTestability.prototype.addToWindow=function(registry){_angular_core.ɵglobal.getAngularTestability=function(elem,findInAncestors){void 0===findInAncestors&&(findInAncestors=!0);var testability=registry.findTestabilityInTree(elem,findInAncestors);if(null==testability)throw new Error("Could not find testability for element.");return testability},_angular_core.ɵglobal.getAllAngularTestabilities=function(){return registry.getAllTestabilities()},_angular_core.ɵglobal.getAllAngularRootElements=function(){return registry.getAllRootElements()};var whenAllStable=function(callback){var testabilities=_angular_core.ɵglobal.getAllAngularTestabilities(),count=testabilities.length,didWork=!1,decrement=function(didWork_){didWork=didWork||didWork_,0==--count&&callback(didWork)};testabilities.forEach(function(testability){testability.whenStable(decrement)})};_angular_core.ɵglobal.frameworkStabilizers||(_angular_core.ɵglobal.frameworkStabilizers=[]),_angular_core.ɵglobal.frameworkStabilizers.push(whenAllStable)},BrowserGetTestability.prototype.findTestabilityInTree=function(registry,elem,findInAncestors){if(null==elem)return null;var t=registry.getTestability(elem);return null!=t?t:findInAncestors?getDOM().isShadowRoot(elem)?this.findTestabilityInTree(registry,getDOM().getHost(elem),!0):this.findTestabilityInTree(registry,getDOM().parentElement(elem),!0):null},BrowserGetTestability}(),Title=function(){function Title(_doc){this._doc=_doc}return Title.prototype.getTitle=function(){return getDOM().getTitle(this._doc)},Title.prototype.setTitle=function(newTitle){getDOM().setTitle(this._doc,newTitle)},Title}();Title.decorators=[{type:_angular_core.Injectable}],Title.ctorParameters=function(){return[{type:void 0,decorators:[{type:_angular_core.Inject,args:[DOCUMENT$1]}]}]};var ng,CORE_TOKENS={ApplicationRef:_angular_core.ApplicationRef,NgZone:_angular_core.NgZone},INSPECT_GLOBAL_NAME="probe",CORE_TOKENS_GLOBAL_NAME="coreTokens",NgProbeToken$1=function(){function NgProbeToken$1(name,token){this.name=name,this.token=token}return NgProbeToken$1}(),ELEMENT_PROBE_PROVIDERS=[{provide:_angular_core.APP_INITIALIZER,useFactory:_createNgProbe,deps:[[NgProbeToken$1,new _angular_core.Optional],[_angular_core.NgProbeToken,new _angular_core.Optional]],multi:!0}],EVENT_MANAGER_PLUGINS=new _angular_core.InjectionToken("EventManagerPlugins"),EventManager=function(){function EventManager(plugins,_zone){var _this=this;this._zone=_zone,this._eventNameToPlugin=new Map,plugins.forEach(function(p){return p.manager=_this}),this._plugins=plugins.slice().reverse()}return EventManager.prototype.addEventListener=function(element,eventName,handler){return this._findPluginFor(eventName).addEventListener(element,eventName,handler)},EventManager.prototype.addGlobalEventListener=function(target,eventName,handler){return this._findPluginFor(eventName).addGlobalEventListener(target,eventName,handler)},EventManager.prototype.getZone=function(){return this._zone},EventManager.prototype._findPluginFor=function(eventName){var plugin=this._eventNameToPlugin.get(eventName);if(plugin)return plugin;for(var plugins=this._plugins,i=0;i<plugins.length;i++){var plugin_1=plugins[i];if(plugin_1.supports(eventName))return this._eventNameToPlugin.set(eventName,plugin_1),plugin_1}throw new Error("No event manager plugin found for event "+eventName)},EventManager}();EventManager.decorators=[{type:_angular_core.Injectable}],EventManager.ctorParameters=function(){return[{type:Array,decorators:[{type:_angular_core.Inject,args:[EVENT_MANAGER_PLUGINS]}]},{type:_angular_core.NgZone}]};var EventManagerPlugin=function(){function EventManagerPlugin(_doc){this._doc=_doc}return EventManagerPlugin.prototype.supports=function(eventName){},EventManagerPlugin.prototype.addEventListener=function(element,eventName,handler){},EventManagerPlugin.prototype.addGlobalEventListener=function(element,eventName,handler){var target=getDOM().getGlobalEventTarget(this._doc,element);if(!target)throw new Error("Unsupported event target "+target+" for event "+eventName);return this.addEventListener(target,eventName,handler)},EventManagerPlugin}(),SharedStylesHost=function(){function SharedStylesHost(){this._stylesSet=new Set}return SharedStylesHost.prototype.addStyles=function(styles){var _this=this,additions=new Set;styles.forEach(function(style){_this._stylesSet.has(style)||(_this._stylesSet.add(style),additions.add(style))}),this.onStylesAdded(additions)},SharedStylesHost.prototype.onStylesAdded=function(additions){},SharedStylesHost.prototype.getAllStyles=function(){return Array.from(this._stylesSet)},SharedStylesHost}();SharedStylesHost.decorators=[{type:_angular_core.Injectable}],SharedStylesHost.ctorParameters=function(){return[]};var DomSharedStylesHost=function(_super){function DomSharedStylesHost(_doc){var _this=_super.call(this)||this;return _this._doc=_doc,_this._hostNodes=new Set,_this._styleNodes=new Set,_this._hostNodes.add(_doc.head),_this}return __extends(DomSharedStylesHost,_super),DomSharedStylesHost.prototype._addStylesToHost=function(styles,host){var _this=this;styles.forEach(function(style){var styleEl=_this._doc.createElement("style");styleEl.textContent=style,_this._styleNodes.add(host.appendChild(styleEl))})},DomSharedStylesHost.prototype.addHost=function(hostNode){this._addStylesToHost(this._stylesSet,hostNode),this._hostNodes.add(hostNode)},DomSharedStylesHost.prototype.removeHost=function(hostNode){this._hostNodes.delete(hostNode)},DomSharedStylesHost.prototype.onStylesAdded=function(additions){var _this=this;this._hostNodes.forEach(function(hostNode){return _this._addStylesToHost(additions,hostNode)})},DomSharedStylesHost.prototype.ngOnDestroy=function(){this._styleNodes.forEach(function(styleNode){return getDOM().remove(styleNode)})},DomSharedStylesHost}(SharedStylesHost);DomSharedStylesHost.decorators=[{type:_angular_core.Injectable}],DomSharedStylesHost.ctorParameters=function(){return[{type:void 0,decorators:[{type:_angular_core.Inject,args:[DOCUMENT$1]}]}]};var NAMESPACE_URIS={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},COMPONENT_REGEX=/%COMP%/g,COMPONENT_VARIABLE="%COMP%",HOST_ATTR="_nghost-"+COMPONENT_VARIABLE,CONTENT_ATTR="_ngcontent-"+COMPONENT_VARIABLE,DomRendererFactory2=function(){function DomRendererFactory2(eventManager,sharedStylesHost){this.eventManager=eventManager,this.sharedStylesHost=sharedStylesHost,this.rendererByCompId=new Map,this.defaultRenderer=new DefaultDomRenderer2(eventManager)}return DomRendererFactory2.prototype.createRenderer=function(element,type){if(!element||!type)return this.defaultRenderer;switch(type.encapsulation){case _angular_core.ViewEncapsulation.Emulated:var renderer=this.rendererByCompId.get(type.id);return renderer||(renderer=new EmulatedEncapsulationDomRenderer2(this.eventManager,this.sharedStylesHost,type),this.rendererByCompId.set(type.id,renderer)),renderer.applyToHost(element),renderer;case _angular_core.ViewEncapsulation.Native:return new ShadowDomRenderer(this.eventManager,this.sharedStylesHost,element,type);default:if(!this.rendererByCompId.has(type.id)){var styles=flattenStyles(type.id,type.styles,[]);this.sharedStylesHost.addStyles(styles),this.rendererByCompId.set(type.id,this.defaultRenderer)}return this.defaultRenderer}},DomRendererFactory2.prototype.begin=function(){},DomRendererFactory2.prototype.end=function(){},DomRendererFactory2}();DomRendererFactory2.decorators=[{type:_angular_core.Injectable}],DomRendererFactory2.ctorParameters=function(){return[{type:EventManager},{type:DomSharedStylesHost}]};var DefaultDomRenderer2=function(){function DefaultDomRenderer2(eventManager){this.eventManager=eventManager,this.data=Object.create(null)}return DefaultDomRenderer2.prototype.destroy=function(){},DefaultDomRenderer2.prototype.createElement=function(name,namespace){return namespace?document.createElementNS(NAMESPACE_URIS[namespace],name):document.createElement(name)},DefaultDomRenderer2.prototype.createComment=function(value){return document.createComment(value)},DefaultDomRenderer2.prototype.createText=function(value){return document.createTextNode(value)},DefaultDomRenderer2.prototype.appendChild=function(parent,newChild){parent.appendChild(newChild)},DefaultDomRenderer2.prototype.insertBefore=function(parent,newChild,refChild){parent&&parent.insertBefore(newChild,refChild)},DefaultDomRenderer2.prototype.removeChild=function(parent,oldChild){parent&&parent.removeChild(oldChild)},DefaultDomRenderer2.prototype.selectRootElement=function(selectorOrNode){var el="string"==typeof selectorOrNode?document.querySelector(selectorOrNode):selectorOrNode;if(!el)throw new Error('The selector "'+selectorOrNode+'" did not match any elements');return el.textContent="",el},DefaultDomRenderer2.prototype.parentNode=function(node){return node.parentNode},DefaultDomRenderer2.prototype.nextSibling=function(node){return node.nextSibling},DefaultDomRenderer2.prototype.setAttribute=function(el,name,value,namespace){if(namespace){name=namespace+":"+name;var namespaceUri=NAMESPACE_URIS[namespace];namespaceUri?el.setAttributeNS(namespaceUri,name,value):el.setAttribute(name,value)}else el.setAttribute(name,value)},DefaultDomRenderer2.prototype.removeAttribute=function(el,name,namespace){if(namespace){var namespaceUri=NAMESPACE_URIS[namespace];namespaceUri?el.removeAttributeNS(namespaceUri,name):el.removeAttribute(namespace+":"+name)}else el.removeAttribute(name)},DefaultDomRenderer2.prototype.addClass=function(el,name){el.classList.add(name)},DefaultDomRenderer2.prototype.removeClass=function(el,name){el.classList.remove(name)},DefaultDomRenderer2.prototype.setStyle=function(el,style,value,flags){flags&_angular_core.RendererStyleFlags2.DashCase?el.style.setProperty(style,value,flags&_angular_core.RendererStyleFlags2.Important?"important":""):el.style[style]=value},DefaultDomRenderer2.prototype.removeStyle=function(el,style,flags){flags&_angular_core.RendererStyleFlags2.DashCase?el.style.removeProperty(style):el.style[style]=""},DefaultDomRenderer2.prototype.setProperty=function(el,name,value){checkNoSyntheticProp(name,"property"),el[name]=value},DefaultDomRenderer2.prototype.setValue=function(node,value){node.nodeValue=value},DefaultDomRenderer2.prototype.listen=function(target,event,callback){return checkNoSyntheticProp(event,"listener"),"string"==typeof target?this.eventManager.addGlobalEventListener(target,event,decoratePreventDefault(callback)):this.eventManager.addEventListener(target,event,decoratePreventDefault(callback))},DefaultDomRenderer2}(),AT_CHARCODE="@".charCodeAt(0),EmulatedEncapsulationDomRenderer2=function(_super){function EmulatedEncapsulationDomRenderer2(eventManager,sharedStylesHost,component){var _this=_super.call(this,eventManager)||this;_this.component=component;var styles=flattenStyles(component.id,component.styles,[]);return sharedStylesHost.addStyles(styles),_this.contentAttr=shimContentAttribute(component.id),_this.hostAttr=shimHostAttribute(component.id),_this}return __extends(EmulatedEncapsulationDomRenderer2,_super),EmulatedEncapsulationDomRenderer2.prototype.applyToHost=function(element){_super.prototype.setAttribute.call(this,element,this.hostAttr,"")},EmulatedEncapsulationDomRenderer2.prototype.createElement=function(parent,name){var el=_super.prototype.createElement.call(this,parent,name);return _super.prototype.setAttribute.call(this,el,this.contentAttr,""),el},EmulatedEncapsulationDomRenderer2}(DefaultDomRenderer2),ShadowDomRenderer=function(_super){function ShadowDomRenderer(eventManager,sharedStylesHost,hostEl,component){var _this=_super.call(this,eventManager)||this;_this.sharedStylesHost=sharedStylesHost,_this.hostEl=hostEl,_this.component=component,_this.shadowRoot=hostEl.createShadowRoot(),_this.sharedStylesHost.addHost(_this.shadowRoot);for(var styles=flattenStyles(component.id,component.styles,[]),i=0;i<styles.length;i++){var styleEl=document.createElement("style");styleEl.textContent=styles[i],_this.shadowRoot.appendChild(styleEl)}return _this}return __extends(ShadowDomRenderer,_super),ShadowDomRenderer.prototype.nodeOrShadowRoot=function(node){return node===this.hostEl?this.shadowRoot:node},ShadowDomRenderer.prototype.destroy=function(){this.sharedStylesHost.removeHost(this.shadowRoot)},ShadowDomRenderer.prototype.appendChild=function(parent,newChild){return _super.prototype.appendChild.call(this,this.nodeOrShadowRoot(parent),newChild)},ShadowDomRenderer.prototype.insertBefore=function(parent,newChild,refChild){return _super.prototype.insertBefore.call(this,this.nodeOrShadowRoot(parent),newChild,refChild)},ShadowDomRenderer.prototype.removeChild=function(parent,oldChild){return _super.prototype.removeChild.call(this,this.nodeOrShadowRoot(parent),oldChild)},ShadowDomRenderer.prototype.parentNode=function(node){return this.nodeOrShadowRoot(_super.prototype.parentNode.call(this,this.nodeOrShadowRoot(node)))},ShadowDomRenderer}(DefaultDomRenderer2),DomEventsPlugin=function(_super){function DomEventsPlugin(doc){return _super.call(this,doc)||this}return __extends(DomEventsPlugin,_super),DomEventsPlugin.prototype.supports=function(eventName){return!0},DomEventsPlugin.prototype.addEventListener=function(element,eventName,handler){return element.addEventListener(eventName,handler,!1),function(){return element.removeEventListener(eventName,handler,!1)}},DomEventsPlugin}(EventManagerPlugin);DomEventsPlugin.decorators=[{type:_angular_core.Injectable}],DomEventsPlugin.ctorParameters=function(){return[{type:void 0,decorators:[{type:_angular_core.Inject,args:[DOCUMENT$1]}]}]};var EVENT_NAMES={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0},HAMMER_GESTURE_CONFIG=new _angular_core.InjectionToken("HammerGestureConfig"),HammerGestureConfig=function(){function HammerGestureConfig(){this.events=[],this.overrides={}}return HammerGestureConfig.prototype.buildHammer=function(element){var mc=new Hammer(element);mc.get("pinch").set({enable:!0}),mc.get("rotate").set({enable:!0});for(var eventName in this.overrides)mc.get(eventName).set(this.overrides[eventName]);return mc},HammerGestureConfig}();HammerGestureConfig.decorators=[{type:_angular_core.Injectable}],HammerGestureConfig.ctorParameters=function(){return[]};var HammerGesturesPlugin=function(_super){function HammerGesturesPlugin(doc,_config){var _this=_super.call(this,doc)||this;return _this._config=_config,_this}return __extends(HammerGesturesPlugin,_super),HammerGesturesPlugin.prototype.supports=function(eventName){if(!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase())&&!this.isCustomEvent(eventName))return!1;if(!window.Hammer)throw new Error("Hammer.js is not loaded, can not bind "+eventName+" event");return!0},HammerGesturesPlugin.prototype.addEventListener=function(element,eventName,handler){var _this=this,zone=this.manager.getZone();return eventName=eventName.toLowerCase(),zone.runOutsideAngular(function(){var mc=_this._config.buildHammer(element),callback=function(eventObj){zone.runGuarded(function(){handler(eventObj)})};return mc.on(eventName,callback),function(){return mc.off(eventName,callback)}})},HammerGesturesPlugin.prototype.isCustomEvent=function(eventName){return this._config.events.indexOf(eventName)>-1},HammerGesturesPlugin}(EventManagerPlugin);HammerGesturesPlugin.decorators=[{type:_angular_core.Injectable}],HammerGesturesPlugin.ctorParameters=function(){return[{type:void 0,decorators:[{type:_angular_core.Inject,args:[DOCUMENT$1]}]},{type:HammerGestureConfig,decorators:[{type:_angular_core.Inject,args:[HAMMER_GESTURE_CONFIG]}]}]};var MODIFIER_KEYS=["alt","control","meta","shift"],MODIFIER_KEY_GETTERS={alt:function(event){return event.altKey},control:function(event){return event.ctrlKey},meta:function(event){return event.metaKey},shift:function(event){return event.shiftKey}},KeyEventsPlugin=function(_super){function KeyEventsPlugin(doc){return _super.call(this,doc)||this}return __extends(KeyEventsPlugin,_super),KeyEventsPlugin.prototype.supports=function(eventName){return null!=KeyEventsPlugin.parseEventName(eventName)},KeyEventsPlugin.prototype.addEventListener=function(element,eventName,handler){var parsedEvent=KeyEventsPlugin.parseEventName(eventName),outsideHandler=KeyEventsPlugin.eventCallback(parsedEvent.fullKey,handler,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return getDOM().onAndCancel(element,parsedEvent.domEventName,outsideHandler)})},KeyEventsPlugin.parseEventName=function(eventName){var parts=eventName.toLowerCase().split("."),domEventName=parts.shift();if(0===parts.length||"keydown"!==domEventName&&"keyup"!==domEventName)return null;var key=KeyEventsPlugin._normalizeKey(parts.pop()),fullKey="";if(MODIFIER_KEYS.forEach(function(modifierName){var index=parts.indexOf(modifierName);index>-1&&(parts.splice(index,1),fullKey+=modifierName+".")}),fullKey+=key,0!=parts.length||0===key.length)return null;var result={};return result.domEventName=domEventName,result.fullKey=fullKey,result},KeyEventsPlugin.getEventFullKey=function(event){var fullKey="",key=getDOM().getEventKey(event);return key=key.toLowerCase()," "===key?key="space":"."===key&&(key="dot"),MODIFIER_KEYS.forEach(function(modifierName){if(modifierName!=key){(0,MODIFIER_KEY_GETTERS[modifierName])(event)&&(fullKey+=modifierName+".")}}),fullKey+=key},KeyEventsPlugin.eventCallback=function(fullKey,handler,zone){return function(event){KeyEventsPlugin.getEventFullKey(event)===fullKey&&zone.runGuarded(function(){return handler(event)})}},KeyEventsPlugin._normalizeKey=function(keyName){switch(keyName){case"esc":return"escape";default:return keyName}},KeyEventsPlugin}(EventManagerPlugin);KeyEventsPlugin.decorators=[{type:_angular_core.Injectable}],KeyEventsPlugin.ctorParameters=function(){return[{type:void 0,decorators:[{type:_angular_core.Inject,args:[DOCUMENT$1]}]}]};var SAFE_URL_PATTERN=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,DATA_URL_PATTERN=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i,inertElement=null,DOM=null,VOID_ELEMENTS=tagSet("area,br,col,hr,img,wbr"),OPTIONAL_END_TAG_BLOCK_ELEMENTS=tagSet("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),OPTIONAL_END_TAG_INLINE_ELEMENTS=tagSet("rp,rt"),OPTIONAL_END_TAG_ELEMENTS=merge(OPTIONAL_END_TAG_INLINE_ELEMENTS,OPTIONAL_END_TAG_BLOCK_ELEMENTS),BLOCK_ELEMENTS=merge(OPTIONAL_END_TAG_BLOCK_ELEMENTS,tagSet("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),INLINE_ELEMENTS=merge(OPTIONAL_END_TAG_INLINE_ELEMENTS,tagSet("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),VALID_ELEMENTS=merge(VOID_ELEMENTS,BLOCK_ELEMENTS,INLINE_ELEMENTS,OPTIONAL_END_TAG_ELEMENTS),URI_ATTRS=tagSet("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),SRCSET_ATTRS=tagSet("srcset"),HTML_ATTRS=tagSet("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),VALID_ATTRS=merge(URI_ATTRS,SRCSET_ATTRS,HTML_ATTRS),SanitizingHtmlSerializer=function(){function SanitizingHtmlSerializer(){this.sanitizedSomething=!1,this.buf=[]}return SanitizingHtmlSerializer.prototype.sanitizeChildren=function(el){for(var current=el.firstChild;current;)if(DOM.isElementNode(current)?this.startElement(current):DOM.isTextNode(current)?this.chars(DOM.nodeValue(current)):this.sanitizedSomething=!0,DOM.firstChild(current))current=DOM.firstChild(current);else for(;current;){DOM.isElementNode(current)&&this.endElement(current);var next=checkClobberedElement(current,DOM.nextSibling(current));if(next){current=next;break}current=checkClobberedElement(current,DOM.parentElement(current))}return this.buf.join("")},SanitizingHtmlSerializer.prototype.startElement=function(element){var _this=this,tagName=DOM.nodeName(element).toLowerCase();if(!VALID_ELEMENTS.hasOwnProperty(tagName))return void(this.sanitizedSomething=!0);this.buf.push("<"),this.buf.push(tagName),DOM.attributeMap(element).forEach(function(value,attrName){var lower=attrName.toLowerCase();if(!VALID_ATTRS.hasOwnProperty(lower))return void(_this.sanitizedSomething=!0);URI_ATTRS[lower]&&(value=sanitizeUrl(value)),SRCSET_ATTRS[lower]&&(value=sanitizeSrcset(value)),_this.buf.push(" "),_this.buf.push(attrName),_this.buf.push('="'),_this.buf.push(encodeEntities(value)),_this.buf.push('"')}),this.buf.push(">")},SanitizingHtmlSerializer.prototype.endElement=function(current){var tagName=DOM.nodeName(current).toLowerCase();VALID_ELEMENTS.hasOwnProperty(tagName)&&!VOID_ELEMENTS.hasOwnProperty(tagName)&&(this.buf.push("</"),this.buf.push(tagName),this.buf.push(">"))},SanitizingHtmlSerializer.prototype.chars=function(chars){this.buf.push(encodeEntities(chars))},SanitizingHtmlSerializer}(),SURROGATE_PAIR_REGEXP=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,NON_ALPHANUMERIC_REGEXP=/([^\#-~ |!])/g,VALUES="[-,.\"'%_!# a-zA-Z0-9]+",TRANSFORMATION_FNS="(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?",COLOR_FNS="(?:rgb|hsl)a?",GRADIENTS="(?:repeating-)?(?:linear|radial)-gradient",CSS3_FNS="(?:calc|attr)",FN_ARGS="\\([-0-9.%, #a-zA-Z]+\\)",SAFE_STYLE_VALUE=new RegExp("^("+VALUES+"|(?:"+TRANSFORMATION_FNS+"|"+COLOR_FNS+"|"+GRADIENTS+"|"+CSS3_FNS+")"+FN_ARGS+")$","g"),URL_RE=/^url\(([^)]+)\)$/,DomSanitizer=function(){function DomSanitizer(){}return DomSanitizer.prototype.sanitize=function(context,value){},DomSanitizer.prototype.bypassSecurityTrustHtml=function(value){},DomSanitizer.prototype.bypassSecurityTrustStyle=function(value){},DomSanitizer.prototype.bypassSecurityTrustScript=function(value){},DomSanitizer.prototype.bypassSecurityTrustUrl=function(value){},DomSanitizer.prototype.bypassSecurityTrustResourceUrl=function(value){},DomSanitizer}(),DomSanitizerImpl=function(_super){function DomSanitizerImpl(_doc){var _this=_super.call(this)||this;return _this._doc=_doc,_this}return __extends(DomSanitizerImpl,_super),DomSanitizerImpl.prototype.sanitize=function(ctx,value){if(null==value)return null;switch(ctx){case _angular_core.SecurityContext.NONE:return value;case _angular_core.SecurityContext.HTML:return value instanceof SafeHtmlImpl?value.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(value,"HTML"),sanitizeHtml(this._doc,String(value)));case _angular_core.SecurityContext.STYLE:return value instanceof SafeStyleImpl?value.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(value,"Style"),sanitizeStyle(value));case _angular_core.SecurityContext.SCRIPT:if(value instanceof SafeScriptImpl)return value.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(value,"Script"),new Error("unsafe value used in a script context");case _angular_core.SecurityContext.URL:return value instanceof SafeResourceUrlImpl||value instanceof SafeUrlImpl?value.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(value,"URL"),sanitizeUrl(String(value)));case _angular_core.SecurityContext.RESOURCE_URL:if(value instanceof SafeResourceUrlImpl)return value.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(value,"ResourceURL"),new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext "+ctx+" (see http://g.co/ng/security#xss)")}},DomSanitizerImpl.prototype.checkNotSafeValue=function(value,expectedType){if(value instanceof SafeValueImpl)throw new Error("Required a safe "+expectedType+", got a "+value.getTypeName()+" (see http://g.co/ng/security#xss)")},DomSanitizerImpl.prototype.bypassSecurityTrustHtml=function(value){return new SafeHtmlImpl(value)},DomSanitizerImpl.prototype.bypassSecurityTrustStyle=function(value){return new SafeStyleImpl(value)},DomSanitizerImpl.prototype.bypassSecurityTrustScript=function(value){return new SafeScriptImpl(value)},DomSanitizerImpl.prototype.bypassSecurityTrustUrl=function(value){return new SafeUrlImpl(value)},DomSanitizerImpl.prototype.bypassSecurityTrustResourceUrl=function(value){return new SafeResourceUrlImpl(value)},DomSanitizerImpl}(DomSanitizer);DomSanitizerImpl.decorators=[{type:_angular_core.Injectable}],DomSanitizerImpl.ctorParameters=function(){return[{type:void 0,decorators:[{type:_angular_core.Inject,args:[DOCUMENT$1]}]}]};var SafeValueImpl=function(){function SafeValueImpl(changingThisBreaksApplicationSecurity){this.changingThisBreaksApplicationSecurity=changingThisBreaksApplicationSecurity}return SafeValueImpl.prototype.getTypeName=function(){},SafeValueImpl.prototype.toString=function(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"},SafeValueImpl}(),SafeHtmlImpl=function(_super){function SafeHtmlImpl(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(SafeHtmlImpl,_super),SafeHtmlImpl.prototype.getTypeName=function(){return"HTML"},SafeHtmlImpl}(SafeValueImpl),SafeStyleImpl=function(_super){function SafeStyleImpl(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(SafeStyleImpl,_super),SafeStyleImpl.prototype.getTypeName=function(){return"Style"},SafeStyleImpl}(SafeValueImpl),SafeScriptImpl=function(_super){function SafeScriptImpl(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(SafeScriptImpl,_super),SafeScriptImpl.prototype.getTypeName=function(){return"Script"},SafeScriptImpl}(SafeValueImpl),SafeUrlImpl=function(_super){function SafeUrlImpl(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(SafeUrlImpl,_super),SafeUrlImpl.prototype.getTypeName=function(){return"URL"},SafeUrlImpl}(SafeValueImpl),SafeResourceUrlImpl=function(_super){function SafeResourceUrlImpl(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(SafeResourceUrlImpl,_super),SafeResourceUrlImpl.prototype.getTypeName=function(){return"ResourceURL"},SafeResourceUrlImpl}(SafeValueImpl),INTERNAL_BROWSER_PLATFORM_PROVIDERS=[{provide:_angular_core.PLATFORM_ID,useValue:_angular_common.ɵPLATFORM_BROWSER_ID},{provide:_angular_core.PLATFORM_INITIALIZER,useValue:initDomAdapter,multi:!0},{provide:_angular_common.PlatformLocation,useClass:BrowserPlatformLocation},{provide:DOCUMENT$1,useFactory:_document,deps:[]}],BROWSER_SANITIZATION_PROVIDERS=[{provide:_angular_core.Sanitizer,useExisting:DomSanitizer},{provide:DomSanitizer,useClass:DomSanitizerImpl}],platformBrowser=_angular_core.createPlatformFactory(_angular_core.platformCore,"browser",INTERNAL_BROWSER_PLATFORM_PROVIDERS),BrowserModule=function(){function BrowserModule(parentModule){if(parentModule)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}return BrowserModule.withServerTransition=function(params){return{ngModule:BrowserModule,providers:[{provide:_angular_core.APP_ID,useValue:params.appId},{provide:TRANSITION_ID,useExisting:_angular_core.APP_ID},SERVER_TRANSITION_PROVIDERS]}},BrowserModule}();BrowserModule.decorators=[{type:_angular_core.NgModule,args:[{providers:[BROWSER_SANITIZATION_PROVIDERS,{provide:_angular_core.ErrorHandler,useFactory:errorHandler,deps:[]},{provide:EVENT_MANAGER_PLUGINS,useClass:DomEventsPlugin,multi:!0},{provide:EVENT_MANAGER_PLUGINS,useClass:KeyEventsPlugin,multi:!0},{provide:EVENT_MANAGER_PLUGINS,useClass:HammerGesturesPlugin,multi:!0},{provide:HAMMER_GESTURE_CONFIG,useClass:HammerGestureConfig},DomRendererFactory2,{provide:_angular_core.RendererFactory2,useExisting:DomRendererFactory2},{provide:SharedStylesHost,useExisting:DomSharedStylesHost},DomSharedStylesHost,_angular_core.Testability,EventManager,ELEMENT_PROBE_PROVIDERS,Meta,Title],exports:[_angular_common.CommonModule,_angular_core.ApplicationModule]}]}],BrowserModule.ctorParameters=function(){return[{type:BrowserModule,decorators:[{type:_angular_core.Optional},{type:_angular_core.SkipSelf}]}]};var win="undefined"!=typeof window&&window||{},ChangeDetectionPerfRecord=function(){function ChangeDetectionPerfRecord(msPerTick,numTicks){this.msPerTick=msPerTick,this.numTicks=numTicks}return ChangeDetectionPerfRecord}(),AngularProfiler=function(){function AngularProfiler(ref){this.appRef=ref.injector.get(_angular_core.ApplicationRef)}return AngularProfiler.prototype.timeChangeDetection=function(config){var record=config&&config.record,profileName="Change Detection",isProfilerAvailable=null!=win.console.profile;record&&isProfilerAvailable&&win.console.profile(profileName);for(var start=getDOM().performanceNow(),numTicks=0;numTicks<5||getDOM().performanceNow()-start<500;)this.appRef.tick(),numTicks++;var end=getDOM().performanceNow();record&&isProfilerAvailable&&win.console.profileEnd(profileName);var msPerTick=(end-start)/numTicks;return win.console.log("ran "+numTicks+" change detection cycles"),win.console.log(msPerTick.toFixed(2)+" ms per check"),new ChangeDetectionPerfRecord(msPerTick,numTicks)},AngularProfiler}(),PROFILER_GLOBAL_NAME="profiler",By=function(){function By(){}return By.all=function(){return function(debugElement){return!0}},By.css=function(selector){return function(debugElement){return null!=debugElement.nativeElement&&getDOM().elementMatches(debugElement.nativeElement,selector)}},By.directive=function(type){return function(debugElement){return-1!==debugElement.providerTokens.indexOf(type)}},By}(),VERSION=new _angular_core.Version("4.2.6");exports.BrowserModule=BrowserModule,exports.platformBrowser=platformBrowser,exports.Meta=Meta,exports.Title=Title,exports.disableDebugTools=disableDebugTools,exports.enableDebugTools=enableDebugTools,exports.By=By,exports.NgProbeToken=NgProbeToken$1,exports.DOCUMENT=DOCUMENT$1,exports.EVENT_MANAGER_PLUGINS=EVENT_MANAGER_PLUGINS,exports.EventManager=EventManager,exports.HAMMER_GESTURE_CONFIG=HAMMER_GESTURE_CONFIG,exports.HammerGestureConfig=HammerGestureConfig,exports.DomSanitizer=DomSanitizer,exports.VERSION=VERSION,exports.ɵBROWSER_SANITIZATION_PROVIDERS=BROWSER_SANITIZATION_PROVIDERS,exports.ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS=INTERNAL_BROWSER_PLATFORM_PROVIDERS,exports.ɵinitDomAdapter=initDomAdapter,exports.ɵBrowserDomAdapter=BrowserDomAdapter,exports.ɵBrowserPlatformLocation=BrowserPlatformLocation,exports.ɵTRANSITION_ID=TRANSITION_ID,exports.ɵBrowserGetTestability=BrowserGetTestability,exports.ɵELEMENT_PROBE_PROVIDERS=ELEMENT_PROBE_PROVIDERS,exports.ɵDomAdapter=DomAdapter,exports.ɵgetDOM=getDOM,exports.ɵsetRootDomAdapter=setRootDomAdapter,exports.ɵDomRendererFactory2=DomRendererFactory2,exports.ɵNAMESPACE_URIS=NAMESPACE_URIS,exports.ɵflattenStyles=flattenStyles,exports.ɵshimContentAttribute=shimContentAttribute,exports.ɵshimHostAttribute=shimHostAttribute,exports.ɵDomEventsPlugin=DomEventsPlugin,exports.ɵHammerGesturesPlugin=HammerGesturesPlugin,exports.ɵKeyEventsPlugin=KeyEventsPlugin,exports.ɵDomSharedStylesHost=DomSharedStylesHost,exports.ɵSharedStylesHost=SharedStylesHost,exports.ɵb=_document,exports.ɵa=errorHandler,exports.ɵh=GenericBrowserDomAdapter,exports.ɵg=SERVER_TRANSITION_PROVIDERS,exports.ɵf=appInitializerFactory,exports.ɵc=_createNgProbe,exports.ɵd=EventManagerPlugin,exports.ɵe=DomSanitizerImpl,Object.defineProperty(exports,"__esModule",{value:!0})}),$__System.registerDynamic("31",["f"],!0,function($__require,exports,module){"use strict";var __extends=(this||self,exports&&exports.__extends||function(){var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])};return function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}}());Object.defineProperty(exports,"__esModule",{value:!0});var platform_browser_1=$__require("f"),MyHammerConfig=function(_super){function MyHammerConfig(){var _this=null!==_super&&_super.apply(this,arguments)||this;return _this.overrides={swipe:{velocity:.3,threshold:10}},_this}return __extends(MyHammerConfig,_super),MyHammerConfig}(platform_browser_1.HammerGestureConfig);exports.MyHammerConfig=MyHammerConfig,delete Hammer.defaults.cssProps.userSelect,Hammer.defaults.touchAction="auto";var AppModule=function(){function AppModule(){}return AppModule}();exports.AppModule=AppModule}),$__System.registerDynamic("a",["c","d","31"],!0,function($__require,exports,module){"use strict";this||self;Object.defineProperty(exports,"__esModule",{value:!0});var core_1=$__require("c"),platform_browser_dynamic_1=$__require("d"),app_module_1=$__require("31");core_1.enableProdMode(),platform_browser_dynamic_1.platformBrowserDynamic().bootstrapModule(app_module_1.AppModule)})})(function(factory){module.exports=factory()});
|