Files
ng2-file-upload/vendor.7412687088ecabc87d1c.bundle.js
Dmitriy Shekhovtsov 6ecec0b579 Updates
2016-10-19 17:14:22 +03:00

23 lines
682 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
webpackJsonp([2],{0:function(e,t,r){"use strict";r(13),r(3),r(12),r(56),r(123),r(125),r(126)},13:function(e,t,r){(function(e){!function(e,n){n(t,r(3))}(this,function(t,r){"use strict";function getTypeNameForDebugging(e){return e.name||typeof e}function isPresent(e){return void 0!==e&&null!==e}function isBlank(e){return void 0===e||null===e}function isStringMap(e){return"object"==typeof e&&null!==e}function isArray(e){return Array.isArray(e)}function isDate(e){return e instanceof Date&&!isNaN(e.valueOf())}function stringify(e){if("string"==typeof e)return e;if(void 0===e||null===e)return""+e;if(e.overriddenName)return e.overriddenName;if(e.name)return e.name;var t=e.toString(),r=t.indexOf("\n");return r===-1?t:t.substring(0,r)}function isJsObject(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function getSymbolIterator(){if(isBlank(p))if(isPresent(n.Symbol)&&isPresent(Symbol.iterator))p=Symbol.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),t=0;t<e.length;++t){var r=e[t];"entries"!==r&&"size"!==r&&Map.prototype[r]===Map.prototype.entries&&(p=r)}return p}function _stripBaseHref(e,t){return e.length>0&&t.startsWith(e)?t.substring(e.length):t}function _stripIndexHtml(e){return/\/index.html$/g.test(e)?e.substring(0,e.length-11):e}function getPluralCategory(e,t,r){var n="="+e;return t.indexOf(n)>-1?n:r.getPluralCategory(e)}function getPluralCase(e,t){"string"==typeof t&&(t=parseInt(t,10));var r=t,n=r.toString().replace(/^[^.]*\.?/,""),i=Math.floor(Math.abs(r)),o=n.length,s=parseInt(n,10),a=parseInt(r.toString().replace(/^[^.]*\.?|0+$/g,""),10)||0,l=e.split("-")[0].toLowerCase();switch(l){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===r?u.One:u.Other;case"agq":case"bas":case"cu":case"dav":case"dje":case"dua":case"dyo":case"ebu":case"ewo":case"guz":case"kam":case"khq":case"ki":case"kln":case"kok":case"ksf":case"lrc":case"lu":case"luo":case"luy":case"mer":case"mfe":case"mgh":case"mua":case"mzn":case"nmg":case"nus":case"qu":case"rn":case"rw":case"sbp":case"twq":case"vai":case"yav":case"yue":case"zgh":case"ak":case"ln":case"mg":case"pa":case"ti":return r===Math.floor(r)&&r>=0&&r<=1?u.One:u.Other;case"am":case"as":case"bn":case"fa":case"gu":case"hi":case"kn":case"mr":case"zu":return 0===i||1===r?u.One:u.Other;case"ar":return 0===r?u.Zero:1===r?u.One:2===r?u.Two:r%100===Math.floor(r%100)&&r%100>=3&&r%100<=10?u.Few:r%100===Math.floor(r%100)&&r%100>=11&&r%100<=99?u.Many:u.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===o?u.One:u.Other;case"be":return r%10===1&&r%100!==11?u.One:r%10===Math.floor(r%10)&&r%10>=2&&r%10<=4&&!(r%100>=12&&r%100<=14)?u.Few:r%10===0||r%10===Math.floor(r%10)&&r%10>=5&&r%10<=9||r%100===Math.floor(r%100)&&r%100>=11&&r%100<=14?u.Many:u.Other;case"br":return r%10===1&&r%100!==11&&r%100!==71&&r%100!==91?u.One:r%10===2&&r%100!==12&&r%100!==72&&r%100!==92?u.Two:r%10===Math.floor(r%10)&&(r%10>=3&&r%10<=4||r%10===9)&&!(r%100>=10&&r%100<=19||r%100>=70&&r%100<=79||r%100>=90&&r%100<=99)?u.Few:0!==r&&r%1e6===0?u.Many:u.Other;case"bs":case"hr":case"sr":return 0===o&&i%10===1&&i%100!==11||s%10===1&&s%100!==11?u.One:0===o&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)||s%10===Math.floor(s%10)&&s%10>=2&&s%10<=4&&!(s%100>=12&&s%100<=14)?u.Few:u.Other;case"cs":case"sk":return 1===i&&0===o?u.One:i===Math.floor(i)&&i>=2&&i<=4&&0===o?u.Few:0!==o?u.Many:u.Other;case"cy":return 0===r?u.Zero:1===r?u.One:2===r?u.Two:3===r?u.Few:6===r?u.Many:u.Other;case"da":return 1===r||0!==a&&(0===i||1===i)?u.One:u.Other;case"dsb":case"hsb":return 0===o&&i%100===1||s%100===1?u.One:0===o&&i%100===2||s%100===2?u.Two:0===o&&i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||s%100===Math.floor(s%100)&&s%100>=3&&s%100<=4?u.Few:u.Other;case"ff":case"fr":case"hy":case"kab":return 0===i||1===i?u.One:u.Other;case"fil":return 0===o&&(1===i||2===i||3===i)||0===o&&i%10!==4&&i%10!==6&&i%10!==9||0!==o&&s%10!==4&&s%10!==6&&s%10!==9?u.One:u.Other;case"ga":return 1===r?u.One:2===r?u.Two:r===Math.floor(r)&&r>=3&&r<=6?u.Few:r===Math.floor(r)&&r>=7&&r<=10?u.Many:u.Other;case"gd":return 1===r||11===r?u.One:2===r||12===r?u.Two:r===Math.floor(r)&&(r>=3&&r<=10||r>=13&&r<=19)?u.Few:u.Other;case"gv":return 0===o&&i%10===1?u.One:0===o&&i%10===2?u.Two:0!==o||i%100!==0&&i%100!==20&&i%100!==40&&i%100!==60&&i%100!==80?0!==o?u.Many:u.Other:u.Few;case"he":return 1===i&&0===o?u.One:2===i&&0===o?u.Two:0!==o||r>=0&&r<=10||r%10!==0?u.Other:u.Many;case"is":return 0===a&&i%10===1&&i%100!==11||0!==a?u.One:u.Other;case"ksh":return 0===r?u.Zero:1===r?u.One:u.Other;case"kw":case"naq":case"se":case"smn":return 1===r?u.One:2===r?u.Two:u.Other;case"lag":return 0===r?u.Zero:0!==i&&1!==i||0===r?u.Other:u.One;case"lt":return r%10!==1||r%100>=11&&r%100<=19?r%10===Math.floor(r%10)&&r%10>=2&&r%10<=9&&!(r%100>=11&&r%100<=19)?u.Few:0!==s?u.Many:u.Other:u.One;case"lv":case"prg":return r%10===0||r%100===Math.floor(r%100)&&r%100>=11&&r%100<=19||2===o&&s%100===Math.floor(s%100)&&s%100>=11&&s%100<=19?u.Zero:r%10===1&&r%100!==11||2===o&&s%10===1&&s%100!==11||2!==o&&s%10===1?u.One:u.Other;case"mk":return 0===o&&i%10===1||s%10===1?u.One:u.Other;case"mt":return 1===r?u.One:0===r||r%100===Math.floor(r%100)&&r%100>=2&&r%100<=10?u.Few:r%100===Math.floor(r%100)&&r%100>=11&&r%100<=19?u.Many:u.Other;case"pl":return 1===i&&0===o?u.One:0===o&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)?u.Few:0===o&&1!==i&&i%10===Math.floor(i%10)&&i%10>=0&&i%10<=1||0===o&&i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||0===o&&i%100===Math.floor(i%100)&&i%100>=12&&i%100<=14?u.Many:u.Other;case"pt":return r===Math.floor(r)&&r>=0&&r<=2&&2!==r?u.One:u.Other;case"ro":return 1===i&&0===o?u.One:0!==o||0===r||1!==r&&r%100===Math.floor(r%100)&&r%100>=1&&r%100<=19?u.Few:u.Other;case"ru":case"uk":return 0===o&&i%10===1&&i%100!==11?u.One:0===o&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)?u.Few:0===o&&i%10===0||0===o&&i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||0===o&&i%100===Math.floor(i%100)&&i%100>=11&&i%100<=14?u.Many:u.Other;case"shi":return 0===i||1===r?u.One:r===Math.floor(r)&&r>=2&&r<=10?u.Few:u.Other;case"si":return 0===r||1===r||0===i&&1===s?u.One:u.Other;case"sl":return 0===o&&i%100===1?u.One:0===o&&i%100===2?u.Two:0===o&&i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||0!==o?u.Few:u.Other;case"tzm":return r===Math.floor(r)&&r>=0&&r<=1||r===Math.floor(r)&&r>=11&&r<=99?u.One:u.Other;default:return u.Other}}function _flattenArray(e,t){if(isPresent(e))for(var r=0;r<e.length;r++){var n=e[r];isArray(n)?_flattenArray(n,t):t.push(n)}return t}function isListLikeIterable(e){return!!isJsObject(e)&&(isArray(e)||!(e instanceof Map)&&getSymbolIterator()in e)}function digitModifier(e){return function(t,r){var n=e(t,r);return 1==n.length?"0"+n:n}}function hourClockExtracter(e){return function(t,r){var n=e(t,r);return n.split(" ")[1]}}function hourExtracter(e){return function(t,r){var n=e(t,r);return n.split(" ")[0]}}function intlDateFormat(e,t,r){return new Intl.DateTimeFormat(t,r).format(e).replace(/[\u200e\u200f]/g,"")}function timeZoneGetter(e){var t={hour:"2-digit",hour12:!1,timeZoneName:e};return function(e,r){var n=intlDateFormat(e,r,t);return n?n.substring(3):""}}function hour12Modify(e,t){return e.hour12=t,e}function digitCondition(e,t){var r={};return r[e]=2==t?"2-digit":"numeric",r}function nameCondition(e,t){var r={};return r[e]=t<4?"short":"long",r}function combine(e){var t={};return e.forEach(function(e){Object.assign(t,e)}),t}function datePartGetterFactory(e){return function(t,r){return intlDateFormat(t,r,e)}}function dateFormatter(e,t,r){var n,i,o="",s=[];if(Z[e])return Z[e](t,r);if($.has(e))s=$.get(e);else{for(Q.exec(e);e;)n=Q.exec(e),n?(s=concat(s,n,1),e=s.pop()):(s.push(e),e=null);$.set(e,s)}return s.forEach(function(e){i=X[e],o+=i?i(t,r):"''"===e?"'":e.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),o}function concat(e,t,r){return e.concat(J.call(t,r))}function formatNumber(e,t,r,n,i,o,s){if(void 0===o&&(o=null),void 0===s&&(s=!1),isBlank(r))return null;if(r="string"==typeof r&&l.isNumeric(r)?+r:r,"number"!=typeof r)throw new U(e,r);var a,u,c;if(n!==b.Currency&&(a=1,u=0,c=3),i){var p=i.match(se);if(null===p)throw new Error(i+" is not a valid digit info for number pipes");isPresent(p[1])&&(a=l.parseIntAutoRadix(p[1])),isPresent(p[3])&&(u=l.parseIntAutoRadix(p[3])),isPresent(p[5])&&(c=l.parseIntAutoRadix(p[5]))}return K.format(r,t,n,{minimumIntegerDigits:a,minimumFractionDigits:u,maximumFractionDigits:c,currency:o,currencyAsSymbol:s})}var n,i=function(){function PlatformLocation(){}return Object.defineProperty(PlatformLocation.prototype,"pathname",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(PlatformLocation.prototype,"search",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(PlatformLocation.prototype,"hash",{get:function(){return null},enumerable:!0,configurable:!0}),PlatformLocation}(),o=function(){function LocationStrategy(){}return LocationStrategy}(),s=new r.OpaqueToken("appBaseHref");n="undefined"==typeof window?"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:e:window;var a=n;a.assert=function(e){};var u,l=function(){function NumberWrapper(){}return NumberWrapper.toFixed=function(e,t){return e.toFixed(t)},NumberWrapper.equal=function(e,t){return e===t},NumberWrapper.parseIntAutoRadix=function(e){var t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t},NumberWrapper.parseInt=function(e,t){if(10==t){if(/^(\-|\+)?[0-9]+$/.test(e))return parseInt(e,t)}else if(16==t){if(/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(e))return parseInt(e,t)}else{var r=parseInt(e,t);if(!isNaN(r))return r}throw new Error("Invalid integer literal when parsing "+e+" in base "+t)},Object.defineProperty(NumberWrapper,"NaN",{get:function(){return NaN},enumerable:!0,configurable:!0}),NumberWrapper.isNumeric=function(e){return!isNaN(e-parseFloat(e))},NumberWrapper.isNaN=function(e){return isNaN(e)},NumberWrapper.isInteger=function(e){return Number.isInteger(e)},NumberWrapper}(),c=function(){function Json(){}return Json.parse=function(e){return a.JSON.parse(e)},Json.stringify=function(e){return a.JSON.stringify(e,null,2)},Json}(),p=null,h=function(){function Location(e){var t=this;this._subject=new r.EventEmitter,this._platformStrategy=e;var n=this._platformStrategy.getBaseHref();this._baseHref=Location.stripTrailingSlash(_stripIndexHtml(n)),this._platformStrategy.onPopState(function(e){t._subject.emit({url:t.path(!0),pop:!0,type:e.type})})}return Location.prototype.path=function(e){return void 0===e&&(e=!1),this.normalize(this._platformStrategy.path(e))},Location.prototype.isCurrentPathEqualTo=function(e,t){return void 0===t&&(t=""),this.path()==this.normalize(e+Location.normalizeQueryParams(t))},Location.prototype.normalize=function(e){return Location.stripTrailingSlash(_stripBaseHref(this._baseHref,_stripIndexHtml(e)))},Location.prototype.prepareExternalUrl=function(e){return e.length>0&&!e.startsWith("/")&&(e="/"+e),this._platformStrategy.prepareExternalUrl(e)},Location.prototype.go=function(e,t){void 0===t&&(t=""),this._platformStrategy.pushState(null,"",e,t)},Location.prototype.replaceState=function(e,t){void 0===t&&(t=""),this._platformStrategy.replaceState(null,"",e,t)},Location.prototype.forward=function(){this._platformStrategy.forward()},Location.prototype.back=function(){this._platformStrategy.back()},Location.prototype.subscribe=function(e,t,r){return void 0===t&&(t=null),void 0===r&&(r=null),this._subject.subscribe({next:e,error:t,complete:r})},Location.normalizeQueryParams=function(e){return e.length>0&&"?"!=e.substring(0,1)?"?"+e:e},Location.joinWithSlash=function(e,t){if(0==e.length)return t;if(0==t.length)return e;var r=0;return e.endsWith("/")&&r++,t.startsWith("/")&&r++,2==r?e+t.substring(1):1==r?e+t:e+"/"+t},Location.stripTrailingSlash=function(e){return/\/$/g.test(e)&&(e=e.substring(0,e.length-1)),e},Location.decorators=[{type:r.Injectable}],Location.ctorParameters=[{type:o}],Location}(),f=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},d=function(e){function HashLocationStrategy(t,r){e.call(this),this._platformLocation=t,this._baseHref="",isPresent(r)&&(this._baseHref=r)}return f(HashLocationStrategy,e),HashLocationStrategy.prototype.onPopState=function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)},HashLocationStrategy.prototype.getBaseHref=function(){return this._baseHref},HashLocationStrategy.prototype.path=function(e){void 0===e&&(e=!1);var t=this._platformLocation.hash;return isPresent(t)||(t="#"),t.length>0?t.substring(1):t},HashLocationStrategy.prototype.prepareExternalUrl=function(e){var t=h.joinWithSlash(this._baseHref,e);return t.length>0?"#"+t:t},HashLocationStrategy.prototype.pushState=function(e,t,r,n){var i=this.prepareExternalUrl(r+h.normalizeQueryParams(n));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.pushState(e,t,i)},HashLocationStrategy.prototype.replaceState=function(e,t,r,n){var i=this.prepareExternalUrl(r+h.normalizeQueryParams(n));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.replaceState(e,t,i)},HashLocationStrategy.prototype.forward=function(){this._platformLocation.forward()},HashLocationStrategy.prototype.back=function(){this._platformLocation.back()},HashLocationStrategy.decorators=[{type:r.Injectable}],HashLocationStrategy.ctorParameters=[{type:i},{type:void 0,decorators:[{type:r.Optional},{type:r.Inject,args:[s]}]}],HashLocationStrategy}(o),m=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},y=function(e){function PathLocationStrategy(t,r){if(e.call(this),this._platformLocation=t,isBlank(r)&&(r=this._platformLocation.getBaseHrefFromDOM()),isBlank(r))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.");this._baseHref=r}return m(PathLocationStrategy,e),PathLocationStrategy.prototype.onPopState=function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)},PathLocationStrategy.prototype.getBaseHref=function(){return this._baseHref},PathLocationStrategy.prototype.prepareExternalUrl=function(e){return h.joinWithSlash(this._baseHref,e)},PathLocationStrategy.prototype.path=function(e){void 0===e&&(e=!1);var t=this._platformLocation.pathname+h.normalizeQueryParams(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?""+t+r:t},PathLocationStrategy.prototype.pushState=function(e,t,r,n){var i=this.prepareExternalUrl(r+h.normalizeQueryParams(n));this._platformLocation.pushState(e,t,i)},PathLocationStrategy.prototype.replaceState=function(e,t,r,n){var i=this.prepareExternalUrl(r+h.normalizeQueryParams(n));this._platformLocation.replaceState(e,t,i)},PathLocationStrategy.prototype.forward=function(){this._platformLocation.forward()},PathLocationStrategy.prototype.back=function(){this._platformLocation.back()},PathLocationStrategy.decorators=[{type:r.Injectable}],PathLocationStrategy.ctorParameters=[{type:i},{type:void 0,decorators:[{type:r.Optional},{type:r.Inject,args:[s]}]}],PathLocationStrategy}(o),v=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},g=function(){function NgLocalization(){}return NgLocalization}(),_=function(e){function NgLocaleLocalization(t){e.call(this),this._locale=t}return v(NgLocaleLocalization,e),NgLocaleLocalization.prototype.getPluralCategory=function(e){var t=getPluralCase(this._locale,e);switch(t){case u.Zero:return"zero";case u.One:return"one";case u.Two:return"two";case u.Few:return"few";case u.Many:return"many";default:return"other"}},NgLocaleLocalization.decorators=[{type:r.Injectable}],NgLocaleLocalization.ctorParameters=[{type:void 0,decorators:[{type:r.Inject,args:[r.LOCALE_ID]}]}],NgLocaleLocalization}(g);!function(e){e[e.Zero=0]="Zero",e[e.One=1]="One",e[e.Two=2]="Two",e[e.Few=3]="Few",e[e.Many=4]="Many",e[e.Other=5]="Other"}(u||(u={}));var b,w=(function(){return(new Map).keys().next?function(e){for(var t,r=e.keys();!(t=r.next()).done;)e.set(t.value,null)}:function(e){e.forEach(function(t,r){e.set(r,null)})}}(),function(){try{if((new Map).values().next)return function(e,t){return t?Array.from(e.values()):Array.from(e.keys())}}catch(e){}return function(e,t){var r=new Array(e.size),n=0;return e.forEach(function(e,i){r[n]=t?e:i,n++}),r}}(),function(){function ListWrapper(){}return ListWrapper.createFixedSize=function(e){return new Array(e)},ListWrapper.createGrowableSize=function(e){return new Array(e)},ListWrapper.clone=function(e){return e.slice(0)},ListWrapper.forEachWithIndex=function(e,t){for(var r=0;r<e.length;r++)t(e[r],r)},ListWrapper.first=function(e){return e?e[0]:null},ListWrapper.last=function(e){return e&&0!=e.length?e[e.length-1]:null},ListWrapper.indexOf=function(e,t,r){return void 0===r&&(r=0),e.indexOf(t,r)},ListWrapper.contains=function(e,t){return e.indexOf(t)!==-1},ListWrapper.reversed=function(e){var t=ListWrapper.clone(e);return t.reverse()},ListWrapper.concat=function(e,t){return e.concat(t)},ListWrapper.insert=function(e,t,r){e.splice(t,0,r)},ListWrapper.removeAt=function(e,t){var r=e[t];return e.splice(t,1),r},ListWrapper.removeAll=function(e,t){for(var r=0;r<t.length;++r){var n=e.indexOf(t[r]);e.splice(n,1)}},ListWrapper.remove=function(e,t){var r=e.indexOf(t);return r>-1&&(e.splice(r,1),!0)},ListWrapper.clear=function(e){e.length=0},ListWrapper.isEmpty=function(e){return 0==e.length},ListWrapper.fill=function(e,t,r,n){void 0===r&&(r=0),void 0===n&&(n=null),e.fill(t,r,null===n?e.length:n)},ListWrapper.equals=function(e,t){if(e.length!=t.length)return!1;for(var r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0},ListWrapper.slice=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=null),e.slice(t,null===r?void 0:r)},ListWrapper.splice=function(e,t,r){return e.splice(t,r)},ListWrapper.sort=function(e,t){isPresent(t)?e.sort(t):e.sort()},ListWrapper.toString=function(e){return e.toString()},ListWrapper.toJSON=function(e){return JSON.stringify(e)},ListWrapper.maximum=function(e,t){if(0==e.length)return null;for(var r=null,n=-(1/0),i=0;i<e.length;i++){var o=e[i];if(!isBlank(o)){var s=t(o);s>n&&(r=o,n=s)}}return r},ListWrapper.flatten=function(e){var t=[];return _flattenArray(e,t),t},ListWrapper.addAll=function(e,t){for(var r=0;r<t.length;r++)e.push(t[r])},ListWrapper}()),E=function(){function NgClass(e,t,r,n){this._iterableDiffers=e,this._keyValueDiffers=t,this._ngEl=r,this._renderer=n,this._initialClasses=[]}return Object.defineProperty(NgClass.prototype,"klass",{set:function(e){this._applyInitialClasses(!0),this._initialClasses="string"==typeof e?e.split(/\s+/):[],this._applyInitialClasses(!1),this._applyClasses(this._rawClass,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(NgClass.prototype,"ngClass",{set:function(e){this._cleanupClasses(this._rawClass),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof e?e.split(/\s+/):e,this._rawClass&&(isListLikeIterable(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create(null):this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create(null))},enumerable:!0,configurable:!0}),NgClass.prototype.ngDoCheck=function(){if(this._iterableDiffer){var e=this._iterableDiffer.diff(this._rawClass);e&&this._applyIterableChanges(e)}else if(this._keyValueDiffer){var e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}},NgClass.prototype._cleanupClasses=function(e){this._applyClasses(e,!0),this._applyInitialClasses(!1)},NgClass.prototype._applyKeyValueChanges=function(e){var t=this;e.forEachAddedItem(function(e){return t._toggleClass(e.key,e.currentValue)}),e.forEachChangedItem(function(e){return t._toggleClass(e.key,e.currentValue)}),e.forEachRemovedItem(function(e){e.previousValue&&t._toggleClass(e.key,!1)})},NgClass.prototype._applyIterableChanges=function(e){var t=this;e.forEachAddedItem(function(e){return t._toggleClass(e.item,!0)}),e.forEachRemovedItem(function(e){return t._toggleClass(e.item,!1)})},NgClass.prototype._applyInitialClasses=function(e){var t=this;this._initialClasses.forEach(function(r){return t._toggleClass(r,!e)})},NgClass.prototype._applyClasses=function(e,t){var r=this;e&&(Array.isArray(e)||e instanceof Set?e.forEach(function(e){return r._toggleClass(e,!t)}):Object.keys(e).forEach(function(n){isPresent(e[n])&&r._toggleClass(n,!t)}))},NgClass.prototype._toggleClass=function(e,t){var r=this;e=e.trim(),e&&e.split(/\s+/g).forEach(function(e){r._renderer.setElementClass(r._ngEl.nativeElement,e,t)})},NgClass.decorators=[{type:r.Directive,args:[{selector:"[ngClass]"}]}],NgClass.ctorParameters=[{type:r.IterableDiffers},{type:r.KeyValueDiffers},{type:r.ElementRef},{type:r.Renderer}],NgClass.propDecorators={klass:[{type:r.Input,args:["class"]}],ngClass:[{type:r.Input}]},NgClass}(),C=function(){function NgForRow(e,t,r){this.$implicit=e,this.index=t,this.count=r}return Object.defineProperty(NgForRow.prototype,"first",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(NgForRow.prototype,"last",{get:function(){return this.index===this.count-1},enumerable:!0,configurable:!0}),Object.defineProperty(NgForRow.prototype,"even",{get:function(){return this.index%2===0},enumerable:!0,configurable:!0}),Object.defineProperty(NgForRow.prototype,"odd",{get:function(){return!this.even},enumerable:!0,configurable:!0}),NgForRow}(),S=function(){function NgFor(e,t,r,n){this._viewContainer=e,this._template=t,this._differs=r,this._cdr=n,this._differ=null}return Object.defineProperty(NgFor.prototype,"ngForTemplate",{set:function(e){e&&(this._template=e)},enumerable:!0,configurable:!0}),NgFor.prototype.ngOnChanges=function(e){if("ngForOf"in e){var t=e.ngForOf.currentValue;if(!this._differ&&t)try{this._differ=this._differs.find(t).create(this._cdr,this.ngForTrackBy)}catch(r){throw new Error("Cannot find a differ supporting object '"+t+"' of type '"+getTypeNameForDebugging(t)+"'. NgFor only supports binding to Iterables such as Arrays.")}}},NgFor.prototype.ngDoCheck=function(){if(this._differ){var e=this._differ.diff(this.ngForOf);e&&this._applyChanges(e)}},NgFor.prototype._applyChanges=function(e){var t=this,r=[];e.forEachOperation(function(e,n,i){if(null==e.previousIndex){var o=t._viewContainer.createEmbeddedView(t._template,new C(null,null,null),i),s=new P(e,o);r.push(s)}else if(null==i)t._viewContainer.remove(n);else{var o=t._viewContainer.get(n);t._viewContainer.move(o,i);var s=new P(e,o);r.push(s)}});for(var n=0;n<r.length;n++)this._perViewChange(r[n].view,r[n].record);for(var n=0,i=this._viewContainer.length;n<i;n++){var o=this._viewContainer.get(n);o.context.index=n,o.context.count=i}e.forEachIdentityChange(function(e){var r=t._viewContainer.get(e.currentIndex);r.context.$implicit=e.item})},NgFor.prototype._perViewChange=function(e,t){e.context.$implicit=t.item},NgFor.decorators=[{type:r.Directive,args:[{selector:"[ngFor][ngForOf]"}]}],NgFor.ctorParameters=[{type:r.ViewContainerRef},{type:r.TemplateRef},{type:r.IterableDiffers},{type:r.ChangeDetectorRef}],NgFor.propDecorators={ngForOf:[{type:r.Input}],ngForTrackBy:[{type:r.Input}],ngForTemplate:[{type:r.Input}]},NgFor}(),P=function(){function RecordViewTuple(e,t){this.record=e,this.view=t}return RecordViewTuple}(),A=function(){function NgIf(e,t){this._viewContainer=e,this._template=t,this._hasView=!1}return Object.defineProperty(NgIf.prototype,"ngIf",{set:function(e){e&&!this._hasView?(this._hasView=!0,this._viewContainer.createEmbeddedView(this._template)):!e&&this._hasView&&(this._hasView=!1,this._viewContainer.clear())},enumerable:!0,configurable:!0}),NgIf.decorators=[{type:r.Directive,args:[{selector:"[ngIf]"}]}],NgIf.ctorParameters=[{type:r.ViewContainerRef},{type:r.TemplateRef}],NgIf.propDecorators={ngIf:[{type:r.Input}]},NgIf}(),x=new Object,T=function(){function SwitchView(e,t){this._viewContainerRef=e,this._templateRef=t}return SwitchView.prototype.create=function(){this._viewContainerRef.createEmbeddedView(this._templateRef)},SwitchView.prototype.destroy=function(){this._viewContainerRef.clear()},SwitchView}(),M=function(){function NgSwitch(){this._useDefault=!1,this._valueViews=new Map,this._activeViews=[]}return Object.defineProperty(NgSwitch.prototype,"ngSwitch",{set:function(e){this._emptyAllActiveViews(),this._useDefault=!1;var t=this._valueViews.get(e);t||(this._useDefault=!0,t=this._valueViews.get(x)||null),this._activateViews(t),this._switchValue=e},enumerable:!0,configurable:!0}),NgSwitch.prototype._onCaseValueChanged=function(e,t,r){this._deregisterView(e,r),this._registerView(t,r),e===this._switchValue?(r.destroy(),w.remove(this._activeViews,r)):t===this._switchValue&&(this._useDefault&&(this._useDefault=!1,this._emptyAllActiveViews()),r.create(),this._activeViews.push(r)),0!==this._activeViews.length||this._useDefault||(this._useDefault=!0,this._activateViews(this._valueViews.get(x)))},NgSwitch.prototype._emptyAllActiveViews=function(){for(var e=this._activeViews,t=0;t<e.length;t++)e[t].destroy();this._activeViews=[]},NgSwitch.prototype._activateViews=function(e){if(e){for(var t=0;t<e.length;t++)e[t].create();this._activeViews=e}},NgSwitch.prototype._registerView=function(e,t){var r=this._valueViews.get(e);r||(r=[],this._valueViews.set(e,r)),r.push(t)},NgSwitch.prototype._deregisterView=function(e,t){if(e!==x){var r=this._valueViews.get(e);1==r.length?this._valueViews.delete(e):w.remove(r,t)}},NgSwitch.decorators=[{type:r.Directive,args:[{selector:"[ngSwitch]"}]}],NgSwitch.ctorParameters=[],NgSwitch.propDecorators={ngSwitch:[{type:r.Input}]},NgSwitch}(),I=function(){function NgSwitchCase(e,t,r){this._value=x,this._switch=r,this._view=new T(e,t)}return Object.defineProperty(NgSwitchCase.prototype,"ngSwitchCase",{set:function(e){this._switch._onCaseValueChanged(this._value,e,this._view),this._value=e},enumerable:!0,configurable:!0}),NgSwitchCase.decorators=[{type:r.Directive,args:[{selector:"[ngSwitchCase]"}]}],NgSwitchCase.ctorParameters=[{type:r.ViewContainerRef},{type:r.TemplateRef},{type:M,decorators:[{type:r.Host}]}],NgSwitchCase.propDecorators={ngSwitchCase:[{type:r.Input}]},NgSwitchCase}(),D=function(){function NgSwitchDefault(e,t,r){r._registerView(x,new T(e,t))}return NgSwitchDefault.decorators=[{type:r.Directive,args:[{selector:"[ngSwitchDefault]"}]}],NgSwitchDefault.ctorParameters=[{type:r.ViewContainerRef},{type:r.TemplateRef},{type:M,decorators:[{type:r.Host}]}],NgSwitchDefault}(),N=function(){function NgPlural(e){this._localization=e,this._caseViews={}}return Object.defineProperty(NgPlural.prototype,"ngPlural",{set:function(e){this._switchValue=e,this._updateView()},enumerable:!0,configurable:!0}),NgPlural.prototype.addCase=function(e,t){this._caseViews[e]=t},NgPlural.prototype._updateView=function(){this._clearViews();var e=Object.keys(this._caseViews),t=getPluralCategory(this._switchValue,e,this._localization);this._activateView(this._caseViews[t])},NgPlural.prototype._clearViews=function(){this._activeView&&this._activeView.destroy()},NgPlural.prototype._activateView=function(e){e&&(this._activeView=e,this._activeView.create())},NgPlural.decorators=[{type:r.Directive,args:[{selector:"[ngPlural]"}]}],NgPlural.ctorParameters=[{type:g}],NgPlural.propDecorators={ngPlural:[{type:r.Input}]},NgPlural}(),O=function(){function NgPluralCase(e,t,r,n){this.value=e,n.addCase(e,new T(r,t))}return NgPluralCase.decorators=[{type:r.Directive,args:[{selector:"[ngPluralCase]"}]}],NgPluralCase.ctorParameters=[{type:void 0,decorators:[{type:r.Attribute,args:["ngPluralCase"]}]},{type:r.TemplateRef},{type:r.ViewContainerRef},{type:N,decorators:[{type:r.Host}]}],NgPluralCase}(),V=function(){function NgStyle(e,t,r){this._differs=e,this._ngEl=t,this._renderer=r}return Object.defineProperty(NgStyle.prototype,"ngStyle",{set:function(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create(null))},enumerable:!0,configurable:!0}),NgStyle.prototype.ngDoCheck=function(){if(this._differ){var e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}},NgStyle.prototype._applyChanges=function(e){var t=this;e.forEachRemovedItem(function(e){return t._setStyle(e.key,null)}),e.forEachAddedItem(function(e){return t._setStyle(e.key,e.currentValue)}),e.forEachChangedItem(function(e){return t._setStyle(e.key,e.currentValue)})},NgStyle.prototype._setStyle=function(e,t){var r=e.split("."),n=r[0],i=r[1];t=t&&i?""+t+i:t,this._renderer.setElementStyle(this._ngEl.nativeElement,n,t)},NgStyle.decorators=[{type:r.Directive,args:[{selector:"[ngStyle]"}]}],NgStyle.ctorParameters=[{type:r.KeyValueDiffers},{type:r.ElementRef},{type:r.Renderer}],NgStyle.propDecorators={ngStyle:[{type:r.Input}]},NgStyle}(),R=function(){function NgTemplateOutlet(e){this._viewContainerRef=e}return Object.defineProperty(NgTemplateOutlet.prototype,"ngOutletContext",{set:function(e){this._context=e},enumerable:!0,configurable:!0}),Object.defineProperty(NgTemplateOutlet.prototype,"ngTemplateOutlet",{set:function(e){this._templateRef=e},enumerable:!0,configurable:!0}),NgTemplateOutlet.prototype.ngOnChanges=function(e){this._viewRef&&this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._viewRef)),this._templateRef&&(this._viewRef=this._viewContainerRef.createEmbeddedView(this._templateRef,this._context))},NgTemplateOutlet.decorators=[{type:r.Directive,args:[{selector:"[ngTemplateOutlet]"}]}],NgTemplateOutlet.ctorParameters=[{type:r.ViewContainerRef}],NgTemplateOutlet.propDecorators={ngOutletContext:[{type:r.Input}],ngTemplateOutlet:[{type:r.Input}]},NgTemplateOutlet}(),k=[E,S,A,R,V,M,I,D,N,O],L=r.__core_private__.isPromise,F=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},j=function(e){function BaseError(t){var r=e.call(this,t);this._nativeError=r}return F(BaseError,e),Object.defineProperty(BaseError.prototype,"message",{get:function(){return this._nativeError.message},set:function(e){this._nativeError.message=e},enumerable:!0,configurable:!0}),Object.defineProperty(BaseError.prototype,"name",{get:function(){return this._nativeError.name},enumerable:!0,configurable:!0}),Object.defineProperty(BaseError.prototype,"stack",{get:function(){return this._nativeError.stack},set:function(e){this._nativeError.stack=e},enumerable:!0,configurable:!0}),BaseError.prototype.toString=function(){return this._nativeError.toString()},BaseError}(Error),B=(function(e){function WrappedError(t,r){e.call(this,t+" caused by: "+(r instanceof Error?r.message:r)),this.originalError=r}return F(WrappedError,e),Object.defineProperty(WrappedError.prototype,"stack",{get:function(){return(this.originalError instanceof Error?this.originalError:this._nativeError).stack},enumerable:!0,configurable:!0}),WrappedError}(j),this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);
e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),U=function(e){function InvalidPipeArgumentError(t,r){e.call(this,"Invalid argument '"+r+"' for pipe '"+stringify(t)+"'")}return B(InvalidPipeArgumentError,e),InvalidPipeArgumentError}(j),W=function(){function ObservableStrategy(){}return ObservableStrategy.prototype.createSubscription=function(e,t){return e.subscribe({next:t,error:function(e){throw e}})},ObservableStrategy.prototype.dispose=function(e){e.unsubscribe()},ObservableStrategy.prototype.onDestroy=function(e){e.unsubscribe()},ObservableStrategy}(),H=function(){function PromiseStrategy(){}return PromiseStrategy.prototype.createSubscription=function(e,t){return e.then(t,function(e){throw e})},PromiseStrategy.prototype.dispose=function(e){},PromiseStrategy.prototype.onDestroy=function(e){},PromiseStrategy}(),G=new H,z=new W,q=function(){function AsyncPipe(e){this._ref=e,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(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue===this._latestReturnedValue?this._latestReturnedValue:(this._latestReturnedValue=this._latestValue,r.WrappedValue.wrap(this._latestValue)):(e&&this._subscribe(e),this._latestReturnedValue=this._latestValue,this._latestValue)},AsyncPipe.prototype._subscribe=function(e){var t=this;this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,function(r){return t._updateLatestValue(e,r)})},AsyncPipe.prototype._selectStrategy=function(e){if(L(e))return G;if(e.subscribe)return z;throw new U(AsyncPipe,e)},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(e,t){e===this._obj&&(this._latestValue=t,this._ref.markForCheck())},AsyncPipe.decorators=[{type:r.Pipe,args:[{name:"async",pure:!1}]}],AsyncPipe.ctorParameters=[{type:r.ChangeDetectorRef}],AsyncPipe}();!function(e){e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency"}(b||(b={}));var K=function(){function NumberFormatter(){}return NumberFormatter.format=function(e,t,r,n){var i=void 0===n?{}:n,o=i.minimumIntegerDigits,s=i.minimumFractionDigits,a=i.maximumFractionDigits,u=i.currency,l=i.currencyAsSymbol,c=void 0!==l&&l,p={minimumIntegerDigits:o,minimumFractionDigits:s,maximumFractionDigits:a,style:b[r].toLowerCase()};return r==b.Currency&&(p.currency=u,p.currencyDisplay=c?"symbol":"code"),new Intl.NumberFormat(t,p).format(e)},NumberFormatter}(),Q=/((?:[^yMLdHhmsazZEwGjJ']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|J+|j+|m+|s+|a|z|Z|G+|w+))(.*)/,Z={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)]))},X={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)),dd:datePartGetterFactory(digitCondition("day",2)),d:datePartGetterFactory(digitCondition("day",1)),HH:digitModifier(hourExtracter(datePartGetterFactory(hour12Modify(digitCondition("hour",2),!1)))),H:hourExtracter(datePartGetterFactory(hour12Modify(digitCondition("hour",1),!1))),hh:digitModifier(hourExtracter(datePartGetterFactory(hour12Modify(digitCondition("hour",2),!0)))),h:hourExtracter(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:hourClockExtracter(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))},$=new Map,J=[].slice,Y=function(){function DateFormatter(){}return DateFormatter.format=function(e,t,r){return dateFormatter(r,e,t)},DateFormatter}(),ee=function(){function DatePipe(e){this._locale=e}return DatePipe.prototype.transform=function(e,t){if(void 0===t&&(t="mediumDate"),isBlank(e))return null;if(!this.supports(e))throw new U(DatePipe,e);return l.isNumeric(e)&&(e=parseFloat(e)),Y.format(new Date(e),this._locale,DatePipe._ALIASES[t]||t)},DatePipe.prototype.supports=function(e){return isDate(e)||l.isNumeric(e)||"string"==typeof e&&isDate(new Date(e))},DatePipe._ALIASES={medium:"yMMMdjms","short":"yMdjm",fullDate:"yMMMMEEEEd",longDate:"yMMMMd",mediumDate:"yMMMd",shortDate:"yMd",mediumTime:"jms",shortTime:"jm"},DatePipe.decorators=[{type:r.Pipe,args:[{name:"date",pure:!0}]}],DatePipe.ctorParameters=[{type:void 0,decorators:[{type:r.Inject,args:[r.LOCALE_ID]}]}],DatePipe}(),te=/#/g,re=function(){function I18nPluralPipe(e){this._localization=e}return I18nPluralPipe.prototype.transform=function(e,t){if(isBlank(e))return"";if(!isStringMap(t))throw new U(I18nPluralPipe,t);var r=getPluralCategory(e,Object.keys(t),this._localization);return t[r].replace(te,e.toString())},I18nPluralPipe.decorators=[{type:r.Pipe,args:[{name:"i18nPlural",pure:!0}]}],I18nPluralPipe.ctorParameters=[{type:g}],I18nPluralPipe}(),ne=function(){function I18nSelectPipe(){}return I18nSelectPipe.prototype.transform=function(e,t){if(isBlank(e))return"";if(!isStringMap(t))throw new U(I18nSelectPipe,t);return t.hasOwnProperty(e)?t[e]:""},I18nSelectPipe.decorators=[{type:r.Pipe,args:[{name:"i18nSelect",pure:!0}]}],I18nSelectPipe.ctorParameters=[],I18nSelectPipe}(),ie=function(){function JsonPipe(){}return JsonPipe.prototype.transform=function(e){return c.stringify(e)},JsonPipe.decorators=[{type:r.Pipe,args:[{name:"json",pure:!1}]}],JsonPipe.ctorParameters=[],JsonPipe}(),oe=function(){function LowerCasePipe(){}return LowerCasePipe.prototype.transform=function(e){if(isBlank(e))return e;if("string"!=typeof e)throw new U(LowerCasePipe,e);return e.toLowerCase()},LowerCasePipe.decorators=[{type:r.Pipe,args:[{name:"lowercase"}]}],LowerCasePipe.ctorParameters=[],LowerCasePipe}(),se=/^(\d+)?\.((\d+)(-(\d+))?)?$/,ae=function(){function DecimalPipe(e){this._locale=e}return DecimalPipe.prototype.transform=function(e,t){return void 0===t&&(t=null),formatNumber(DecimalPipe,this._locale,e,b.Decimal,t)},DecimalPipe.decorators=[{type:r.Pipe,args:[{name:"number"}]}],DecimalPipe.ctorParameters=[{type:void 0,decorators:[{type:r.Inject,args:[r.LOCALE_ID]}]}],DecimalPipe}(),ue=function(){function PercentPipe(e){this._locale=e}return PercentPipe.prototype.transform=function(e,t){return void 0===t&&(t=null),formatNumber(PercentPipe,this._locale,e,b.Percent,t)},PercentPipe.decorators=[{type:r.Pipe,args:[{name:"percent"}]}],PercentPipe.ctorParameters=[{type:void 0,decorators:[{type:r.Inject,args:[r.LOCALE_ID]}]}],PercentPipe}(),le=function(){function CurrencyPipe(e){this._locale=e}return CurrencyPipe.prototype.transform=function(e,t,r,n){return void 0===t&&(t="USD"),void 0===r&&(r=!1),void 0===n&&(n=null),formatNumber(CurrencyPipe,this._locale,e,b.Currency,n,t,r)},CurrencyPipe.decorators=[{type:r.Pipe,args:[{name:"currency"}]}],CurrencyPipe.ctorParameters=[{type:void 0,decorators:[{type:r.Inject,args:[r.LOCALE_ID]}]}],CurrencyPipe}(),ce=function(){function SlicePipe(){}return SlicePipe.prototype.transform=function(e,t,r){if(isBlank(e))return e;if(!this.supports(e))throw new U(SlicePipe,e);return e.slice(t,r)},SlicePipe.prototype.supports=function(e){return"string"==typeof e||Array.isArray(e)},SlicePipe.decorators=[{type:r.Pipe,args:[{name:"slice",pure:!1}]}],SlicePipe.ctorParameters=[],SlicePipe}(),pe=function(){function UpperCasePipe(){}return UpperCasePipe.prototype.transform=function(e){if(isBlank(e))return e;if("string"!=typeof e)throw new U(UpperCasePipe,e);return e.toUpperCase()},UpperCasePipe.decorators=[{type:r.Pipe,args:[{name:"uppercase"}]}],UpperCasePipe.ctorParameters=[],UpperCasePipe}(),he=[q,pe,oe,ie,ce,ae,ue,le,ee,re,ne],fe=function(){function CommonModule(){}return CommonModule.decorators=[{type:r.NgModule,args:[{declarations:[k,he],exports:[k,he],providers:[{provide:g,useClass:_}]}]}],CommonModule.ctorParameters=[],CommonModule}();t.NgLocalization=g,t.CommonModule=fe,t.NgClass=E,t.NgFor=S,t.NgIf=A,t.NgPlural=N,t.NgPluralCase=O,t.NgStyle=V,t.NgSwitch=M,t.NgSwitchCase=I,t.NgSwitchDefault=D,t.NgTemplateOutlet=R,t.AsyncPipe=q,t.DatePipe=ee,t.I18nPluralPipe=re,t.I18nSelectPipe=ne,t.JsonPipe=ie,t.LowerCasePipe=oe,t.CurrencyPipe=le,t.DecimalPipe=ae,t.PercentPipe=ue,t.SlicePipe=ce,t.UpperCasePipe=pe,t.PlatformLocation=i,t.LocationStrategy=o,t.APP_BASE_HREF=s,t.HashLocationStrategy=d,t.PathLocationStrategy=y,t.Location=h})}).call(t,function(){return this}())},297:function(e,t,r){(function(e){!function(e,n){n(t,r(3))}(this,function(t,r){"use strict";function templateVisitAll(e,t,r){void 0===r&&(r=null);var n=[],i=e.visit?function(t){return e.visit(t,r)||t.visit(e,r)}:function(t){return t.visit(e,r)};return t.forEach(function(e){var t=i(e);t&&n.push(t)}),n}function isPresent(e){return void 0!==e&&null!==e}function isBlank(e){return void 0===e||null===e}function isString(e){return"string"==typeof e}function isStringMap(e){return"object"==typeof e&&null!==e}function isStrictStringMap(e){return isStringMap(e)&&Object.getPrototypeOf(e)===_}function isArray(e){return Array.isArray(e)}function stringify(e){if("string"==typeof e)return e;if(void 0===e||null===e)return""+e;if(e.overriddenName)return e.overriddenName;if(e.name)return e.name;var t=e.toString(),r=t.indexOf("\n");return r===-1?t:t.substring(0,r)}function normalizeBlank(e){return isBlank(e)?null:e}function normalizeBool(e){return!isBlank(e)&&e}function isJsObject(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function evalExpression(e,t,r,n){var i=r+"\nreturn "+t+"\n//# sourceURL="+e,o=[],s=[];for(var a in n)o.push(a),s.push(n[a]);return(new(Function.bind.apply(Function,[void 0].concat(o.concat(i))))).apply(void 0,s)}function isPrimitive(e){return!isJsObject(e)}function escapeRegExp(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function _flattenArray(e,t){if(isPresent(e))for(var r=0;r<e.length;r++){var n=e[r];isArray(n)?_flattenArray(n,t):t.push(n)}return t}function splitNsName(e){if(":"!=e[0])return[null,e];var t=e.indexOf(":",1);if(t==-1)throw new Error('Unsupported format "'+e+'" expecting ":namespace:name"');return[e.slice(1,t),e.slice(t+1)]}function getNsPrefix(e){return null===e?null:splitNsName(e)[0]}function mergeNsAndName(e,t){return e?":"+e+":"+t:t}function getHtmlTagDefinition(e){return I[e.toLowerCase()]||D}function replaceVarInExpression(e,t,r){var n=new Fe(e,t);return r.visitExpression(n,null)}function findReadVarNames(e){var t=new je;return t.visitAllStatements(e,null),t.varNames}function variable(e,t){return void 0===t&&(t=null),new Y(e,t)}function importExpr(e,t){return void 0===t&&(t=null),new ue(e,null,t)}function importType(e,t,r){return void 0===t&&(t=null),void 0===r&&(r=null),isPresent(e)?new W(e,t,r):null}function literalArr(e,t){return void 0===t&&(t=null),new ve(e,t)}function literalMap(e,t){return void 0===t&&(t=null),new ge(e,t)}function not(e){return new ce(e)}function fn(e,t,r){return void 0===r&&(r=null),new fe(e,t,r)}function literal(e,t){return void 0===t&&(t=null),new ae(e,t)}function camelCaseToDashCase(e){return e.replace(Ue,function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return"-"+e[1].toLowerCase()})}function splitAtColon(e,t){return _splitAt(e,":",t)}function splitAtPeriod(e,t){return _splitAt(e,".",t)}function _splitAt(e,t,r){var n=e.indexOf(t);return n==-1?r:[e.slice(0,n).trim(),e.slice(n+1).trim()]}function sanitizeIdentifier(e){return e.replace(/\W/g,"_")}function visitValue(e,t,r){return isArray(e)?t.visitArray(e,r):isStrictStringMap(e)?t.visitStringMap(e,r):isBlank(e)||isPrimitive(e)?t.visitPrimitive(e,r):t.visitOther(e,r)}function assetUrl(e,t,r){return void 0===t&&(t=null),void 0===r&&(r="src"),null==t?"asset:@angular/lib/"+e+"/index":"asset:@angular/lib/"+e+"/src/"+t}function createDiTokenExpression(e){return isPresent(e.value)?literal(e.value):e.identifierIsInstance?importExpr(e.identifier).instantiate([],importType(e.identifier,[],[x.Const])):importExpr(e.identifier)}function unimplemented(){throw new Error("unimplemented")}function createHostComponentMeta(e){var t=O.parse(e.selector)[0].getMatchingElementTemplate();return ft.create({type:new lt({reference:Object,name:e.type.name+"_Host",moduleUrl:e.type.moduleUrl,isHost:!0}),template:new ht({encapsulation:r.ViewEncapsulation.None,template:t,templateUrl:"",styles:[],styleUrls:[],ngContentSelectors:[],animations:[]}),changeDetection:r.ChangeDetectionStrategy.Default,inputs:[],outputs:[],host:{},isComponent:!0,selector:"*",providers:[],viewProviders:[],queries:[],viewQueries:[]})}function removeIdentifierDuplicates(e){var t=new Map;return e.forEach(function(e){t.get(e.identifier.reference)||t.set(e.identifier.reference,e)}),S.values(t)}function _normalizeArray(e){return e||[]}function isStaticSymbol(e){return isStringMap(e)&&isPresent(e.name)&&isPresent(e.filePath)}function isWhitespace(e){return e>=qt&&e<=$t||e==Gr}function isDigit(e){return _r<=e&&e<=br}function isAsciiLetter(e){return e>=Dr&&e<=Br||e>=wr&&e<=Pr}function isAsciiHexDigit(e){return e>=Dr&&e<=Or||e>=wr&&e<=Cr||isDigit(e)}function assertArrayOfStrings(e,t){if(r.isDevMode()&&!isBlank(t)){if(!isArray(t))throw new Error("Expected '"+e+"' to be an array of strings.");for(var n=0;n<t.length;n+=1)if(!isString(t[n]))throw new Error("Expected '"+e+"' to be an array of strings.")}}function assertInterpolationSymbols(e,t){if(isPresent(t)&&(!isArray(t)||2!=t.length))throw new Error("Expected '"+e+"' to be an array, [start, end].");if(r.isDevMode()&&!isBlank(t)){var n=t[0],i=t[1];qr.forEach(function(e){if(e.test(n)||e.test(i))throw new Error("['"+n+"', '"+i+"'] contains unusable interpolation symbol.")})}}function newCharacterToken(e,t){return new Jr(e,Ee.Character,t,String.fromCharCode(t))}function newIdentifierToken(e,t){return new Jr(e,Ee.Identifier,0,t)}function newKeywordToken(e,t){return new Jr(e,Ee.Keyword,0,t)}function newOperatorToken(e,t){return new Jr(e,Ee.Operator,0,t)}function newStringToken(e,t){return new Jr(e,Ee.String,0,t)}function newNumberToken(e,t){return new Jr(e,Ee.Number,t,"")}function newErrorToken(e,t){return new Jr(e,Ee.Error,0,t)}function isIdentifierStart(e){return Dr<=e&&e<=Br||wr<=e&&e<=Pr||e==Ir||e==tr}function isIdentifier(e){if(0==e.length)return!1;var t=new en(e);if(!isIdentifierStart(t.peek))return!1;for(t.advance();t.peek!==zt;){if(!isIdentifierPart(t.peek))return!1;t.advance()}return!0}function isIdentifierPart(e){return isAsciiLetter(e)||isDigit(e)||e==Ir||e==tr}function isExponentStart(e){return e==Nr||e==Er}function isExponentSign(e){return e==cr||e==ur}function isQuote(e){return e===ir||e===Yt||e===zr}function unescape(e){switch(e){case Vr:return Kt;case Or:return Zt;case Rr:return Xt;case kr:return qt;case Fr:return Qt;default:return e}}function _createInterpolateRegExp(e){var t=escapeRegExp(e.start)+"([\\s\\S]*?)"+escapeRegExp(e.end);return new RegExp(t,"g")}function visitAll(e,t,r){void 0===r&&(r=null);var n=[],i=e.visit?function(t){return e.visit(t,r)||t.visit(e,r)}:function(t){return t.visit(e,r)};return t.forEach(function(e){var t=i(e);t&&n.push(t)}),n}function tokenize(e,t,r,n,i){return void 0===n&&(n=!1),void 0===i&&(i=Qr),new An(new un(e,t),r,n,i).tokenize()}function _unexpectedCharacterErrorMsg(e){var t=e===zt?"EOF":String.fromCharCode(e);return'Unexpected character "'+t+'"'}function _unknownEntityErrorMsg(e){return'Unknown entity "'+e+'" - use the "&#<decimal>;" or "&#x<hex>;" syntax'}function isNotWhitespace(e){return!isWhitespace(e)||e===zt}function isNameEnd(e){return isWhitespace(e)||e===vr||e===hr||e===ir||e===Yt||e===yr}function isPrefixEnd(e){return(e<Dr||Br<e)&&(e<wr||Pr<e)&&(e<_r||e>br)}function isDigitEntityEnd(e){return e==dr||e==zt||!isAsciiHexDigit(e)}function isNamedEntityEnd(e){return e==dr||e==zt||!isAsciiLetter(e)}function isExpansionFormStart(e,t,r){var n=!!r&&e.indexOf(r.start,t)==t;return e.charCodeAt(t)==Ur&&!n}function isExpansionCaseStart(e){return e===yr||isAsciiLetter(e)}function compareCharCodeCaseInsensitive(e,t){return toUpperCaseCharCode(e)==toUpperCaseCharCode(t)}function toUpperCaseCharCode(e){return e>=Dr&&e<=Br?e-Dr+wr:e}function mergeTextTokens(e){for(var t,r=[],n=0;n<e.length;n++){var i=e[n];t&&t.type==cn.TEXT&&i.type==cn.TEXT?(t.parts[0]+=i.parts[0],t.sourceSpan.end=i.sourceSpan.end):(t=i,r.push(t))}return r}function lastOnStack(e,t){return e.length>0&&e[e.length-1]===t}function digestMessage(e){return sha1(serializeNodes(e.nodes).join("")+("["+e.meaning+"]"))}function serializeNodes(e){return e.map(function(e){return e.visit(On,null)})}function sha1(e){var t=utf8Encode(e),r=stringToWords32(t),n=8*t.length,i=new Array(80),o=[1732584193,4023233417,2562383102,271733878,3285377520],s=o[0],a=o[1],u=o[2],l=o[3],c=o[4];r[n>>5]|=128<<24-n%32,r[(n+64>>9<<4)+15]=n;for(var p=0;p<r.length;p+=16){for(var h=[s,a,u,l,c],f=h[0],d=h[1],m=h[2],y=h[3],v=h[4],g=0;g<80;g++){g<16?i[g]=r[p+g]:i[g]=rol32(i[g-3]^i[g-8]^i[g-14]^i[g-16],1);var _=fk(g,a,u,l),b=_[0],w=_[1],E=[rol32(s,5),b,c,w,i[g]].reduce(add32);A=[l,u,rol32(a,30),s,E],c=A[0],l=A[1],u=A[2],a=A[3],s=A[4]}x=[add32(s,f),add32(a,d),add32(u,m),add32(l,y),add32(c,v)],s=x[0],a=x[1],u=x[2],l=x[3],c=x[4]}for(var C=words32ToString([s,a,u,l,c]),S="",p=0;p<C.length;p++){var P=C.charCodeAt(p);S+=(P>>>4&15).toString(16)+(15&P).toString(16)}return S.toLowerCase();var A,x}function utf8Encode(e){for(var t="",r=0;r<e.length;r++){var n=decodeSurrogatePairs(e,r);n<=127?t+=String.fromCharCode(n):n<=2047?t+=String.fromCharCode(192|n>>>6,128|63&n):n<=65535?t+=String.fromCharCode(224|n>>>12,128|n>>>6&63,128|63&n):n<=2097151&&(t+=String.fromCharCode(240|n>>>18,128|n>>>12&63,128|n>>>6&63,128|63&n))}return t}function decodeSurrogatePairs(e,t){if(t<0||t>=e.length)throw new Error("index="+t+' is out of range in "'+e+'"');var r,n=e.charCodeAt(t);return n>=55296&&n<=57343&&e.length>t+1&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?1024*(n-55296)+r-56320+65536:n}function stringToWords32(e){for(var t=Array(e.length>>>2),r=0;r<t.length;r++)t[r]=0;for(var r=0;r<e.length;r++)t[r>>>2]|=(255&e.charCodeAt(r))<<8*(3-r&3);return t}function words32ToString(e){for(var t="",r=0;r<4*e.length;r++)t+=String.fromCharCode(e[r>>>2]>>>8*(3-r&3)&255);return t}function fk(e,t,r,n){return e<20?[t&r|~t&n,1518500249]:e<40?[t^r^n,1859775393]:e<60?[t&r|t&n|r&n,2400959708]:[t^r^n,3395469782]}function add32(e,t){var r=(65535&e)+(65535&t),n=(e>>16)+(t>>16)+(r>>16);return n<<16|65535&r}function rol32(e,t){return e<<t|e>>>32-t}function createI18nMessageFactory(e){var t=new Gn(Hn,e);return function(e,r,n){return t.toI18nMessage(e,r,n)}}function _extractPlaceholderName(e){return e.split(zn)[1]}function extractMessages(e,t,r,n){var i=new Yn(r,n);return i.extract(e,t)}function mergeTranslations(e,t,r,n,i){var o=new Yn(n,i);return o.merge(e,t,r)}function _isOpeningComment(e){return e instanceof gn&&e.value&&e.value.startsWith("i18n")}function _isClosingComment(e){return e instanceof gn&&e.value&&"/i18n"===e.value}function _getI18nAttr(e){return e.attrs.find(function(e){return e.name===Qn})||null}function _splitMeaningAndDesc(e){if(!e)return["",""];var t=e.indexOf("|");return t==-1?["",e]:[e.slice(0,t),e.slice(t+1)]}function getXmlTagDefinition(e){return ri}function extractPlaceholders(e){var t=e.getMessageMap(),r={};return Object.keys(t).forEach(function(e){r[e]=t[e].placeholders}),r}function extractPlaceholderToIds(e){var t=e.getMessageMap(),r={};return Object.keys(t).forEach(function(e){r[e]=t[e].placeholderToMsgIds}),r}function serialize(e){return e.map(function(e){return e.visit(ai)}).join("")}function _escapeXml(e){return fi.reduce(function(e,t){return e.replace(t[0],t[1])},e)}function getCtypeForTag(e){switch(e.toLowerCase()){case"br":return"lb";case"img":return"image";default:return"x-"+e}}function resolveIdentifier(e){return new it({name:e.name,moduleUrl:e.moduleUrl,reference:Eo.resolveIdentifier(e.name,e.moduleUrl,e.runtime)})}function identifierToken(e){return new ut({identifier:e})}function resolveIdentifierToken(e){return identifierToken(resolveIdentifier(e))}function resolveEnumIdentifier(e,t){var r=Eo.resolveEnum(e.reference,t);return new it({name:e.name+"."+t,moduleUrl:e.moduleUrl,reference:r})}function expandNodes(e){var t=new $o;return new Zo(visitAll(t,e),t.isExpanded,t.errors)}function _expandPluralForm(e,t){var r=e.cases.map(function(e){Qo.indexOf(e.value)!=-1||e.value.match(/^=\d+$/)||t.push(new Xo(e.valueSourceSpan,'Plural cases should be "=<number>" or one of '+Qo.join(", ")));var r=expandNodes(e.expression);return t.push.apply(t,r.errors),new vn("template",[new yn("ngPluralCase",""+e.value,e.valueSourceSpan)],r.nodes,e.sourceSpan,e.sourceSpan,e.sourceSpan)}),n=new yn("[ngPlural]",e.switchValue,e.switchValueSourceSpan);return new vn("ng-container",[n],r,e.sourceSpan,e.sourceSpan,e.sourceSpan)}function _expandDefaultForm(e,t){var r=e.cases.map(function(e){var r=expandNodes(e.expression);return t.push.apply(t,r.errors),new vn("template",[new yn("ngSwitchCase",""+e.value,e.valueSourceSpan)],r.nodes,e.sourceSpan,e.sourceSpan,e.sourceSpan)}),n=new yn("[ngSwitch]",e.switchValue,e.switchValueSourceSpan);return new vn("ng-container",[n],r,e.sourceSpan,e.sourceSpan,e.sourceSpan)}function _transformProvider(e,t){var r=t.useExisting,n=t.useValue,i=t.deps;return new st({token:e.token,useClass:e.useClass,useExisting:r,useFactory:e.useFactory,useValue:n,deps:i,multi:e.multi})}function _transformProviderAst(e,t){var r=t.eager,n=t.providers;return new d(e.token,e.multiProvider,e.eager||r,n,e.providerType,e.lifecycleHooks,e.sourceSpan)}function _normalizeProviders(e,t,r,n){return void 0===n&&(n=null),n||(n=[]),isPresent(e)&&e.forEach(function(e){if(isArray(e))_normalizeProviders(e,t,r,n);else{var i=void 0;e instanceof st?i=e:e instanceof lt?i=new st({token:new ut({identifier:e}),useClass:e}):r.push(new Yo("Unknown provider type "+e,t)),isPresent(i)&&n.push(i)}}),n}function _resolveProvidersFromDirectives(e,r,n){var i=new Map;e.forEach(function(e){var o=new st({token:new ut({identifier:e.type}),useClass:e.type});_resolveProviders([o],e.isComponent?t.ProviderAstType.Component:t.ProviderAstType.Directive,!0,r,n,i)});var o=e.filter(function(e){return e.isComponent}).concat(e.filter(function(e){return!e.isComponent}));return o.forEach(function(e){_resolveProviders(_normalizeProviders(e.providers,r,n),t.ProviderAstType.PublicService,!1,r,n,i),_resolveProviders(_normalizeProviders(e.viewProviders,r,n),t.ProviderAstType.PrivateService,!1,r,n,i)}),i}function _resolveProviders(e,t,r,n,i,o){e.forEach(function(e){var s=o.get(e.token.reference);if(isPresent(s)&&s.multiProvider!==e.multi&&i.push(new Yo("Mixing multi and non multi provider is not possible for token "+s.token.name,n)),s)e.multi||A.clear(s.providers),s.providers.push(e);else{var a=e.token.identifier&&e.token.identifier instanceof lt?e.token.identifier.lifecycleHooks:[];s=new d(e.token,e.multi,r||a.length>0,[e],t,a,n),o.set(e.token.reference,s)}})}function _getViewQueries(e){var t=new Map;return isPresent(e.viewQueries)&&e.viewQueries.forEach(function(e){return _addQueryToTokenMap(t,e)}),e.type.diDeps.forEach(function(e){isPresent(e.viewQuery)&&_addQueryToTokenMap(t,e.viewQuery)}),t}function _getContentQueries(e){var t=new Map;return e.forEach(function(e){isPresent(e.queries)&&e.queries.forEach(function(e){return _addQueryToTokenMap(t,e)}),e.type.diDeps.forEach(function(e){isPresent(e.query)&&_addQueryToTokenMap(t,e.query)})}),t}function _addQueryToTokenMap(e,t){t.selectors.forEach(function(r){var n=e.get(r.reference);n||(n=[],e.set(r.reference,n)),n.push(t)})}function isStyleUrlResolvable(e){if(isBlank(e)||0===e.length||"/"==e[0])return!1;var t=e.match(ss);return null===t||"package"==t[1]||"asset"==t[1]}function extractStyleUrls(e,t,r){var n=[],i=r.replace(os,function(){for(var r=[],i=0;i<arguments.length;i++)r[i-0]=arguments[i];var o=r[1]||r[2];return isStyleUrlResolvable(o)?(n.push(e.resolve(t,o)),""):r[0]});return new is(i,n)}function preparseElement(e){var t=null,r=null,n=null,i=!1,o=null;e.attrs.forEach(function(e){var s=e.name.toLowerCase();s==as?t=e.value:s==ps?r=e.value:s==cs?n=e.value:e.name==ms?i=!0:e.name==ys&&e.value.length>0&&(o=e.value)}),t=normalizeNgContentSelect(t);var s=e.name.toLowerCase(),a=Jn.OTHER;return splitNsName(s)[1]==us?a=Jn.NG_CONTENT:s==fs?a=Jn.STYLE:s==ds?a=Jn.SCRIPT:s==ls&&n==hs&&(a=Jn.STYLESHEET),new gs(a,t,r,i,o)}function normalizeNgContentSelect(e){return null===e||0===e.length?"*":e}function splitClasses(e){return e.trim().split(/\s+/g)}function createElementCssSelector(e,t){var r=new O,n=splitNsName(e)[1];r.setElement(n);for(var i=0;i<t.length;i++){var o=t[i][0],s=splitNsName(o)[1],a=t[i][1];if(r.addAttribute(s,a),o.toLowerCase()==Rs){var u=splitClasses(a);u.forEach(function(e){return r.addClassName(e)})}}return r}function _isAnimationLabel(e){return"@"==e[0]}function _isEmptyTextNode(e){return e instanceof hn&&0==e.value.trim().length}function unimplemented$1(){throw new Error("unimplemented")}function _compareToAnimationStateExpr(e,t){var r=literal(No);switch(t){case No:return e.equals(r);case Io:return literal(!0);default:return e.equals(literal(t))}}function _isEndStateAnimateStep(e){if(e instanceof la&&e.duration>0&&2==e.keyframes.length){var t=_getStylesArray(e.keyframes[0])[0],r=_getStylesArray(e.keyframes[1])[0];return 0===Object.keys(t).length&&0===Object.keys(r).length}return!1}function _getStylesArray(e){return e.styles.styles}function _parseAnimationDeclarationStates(e,t){var r=[];e.styles.styles.forEach(function(e){isStringMap(e)?r.push(e):t.push(new ja("State based animations cannot contain references to other states"))});var n=new ca(r),i=e.stateNameExpr.split(/\s*,\s*/);return i.map(function(e){return new sa(e,n)})}function _parseAnimationStateTransition(e,t,r){var n=new Va,i=[],o=e.stateChangeExpr.split(/\s*,\s*/);o.forEach(function(e){i.push.apply(i,_parseAnimationTransitionExpr(e,r))});var s=_normalizeAnimationEntry(e.steps),a=_normalizeStyleSteps(s,t,r),u=_parseTransitionAnimation(a,0,n,t,r);0==r.length&&_fillAnimationAstStartingKeyframes(u,n,r);var l=u instanceof ha?u:new da([u]);return new ua(i,l)}function _parseAnimationAlias(e,t){switch(e){case":enter":return"void => *";case":leave":return"* => void";default:return t.push(new ja('the transition alias value "'+e+'" is not supported')),"* => *"}}function _parseAnimationTransitionExpr(e,t){var r=[];":"==e[0]&&(e=_parseAnimationAlias(e,t));var n=e.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(!isPresent(n)||n.length<4)return t.push(new ja("the provided "+e+" is not of a supported format")),r;var i=n[1],o=n[2],s=n[3];r.push(new aa(i,s));var a=i==Io&&s==Io;return"<"!=o[0]||a||r.push(new aa(s,i)),r}function _normalizeAnimationEntry(e){return isArray(e)?new rt(e):e}function _normalizeStyleMetadata(e,t,r){var n=[];return e.styles.forEach(function(e){isString(e)?A.addAll(n,_resolveStylesFromState(e,t,r)):n.push(e)}),n}function _normalizeStyleSteps(e,t,r){var n=_normalizeStyleStepEntry(e,t,r);return e instanceof nt?new nt(n):new rt(n)}function _mergeAnimationStyles(e,t){if(isStringMap(t)&&e.length>0){var r=e.length-1,n=e[r];if(isStringMap(n))return void(e[r]=P.merge(n,t))}e.push(t)}function _normalizeStyleStepEntry(e,t,r){var n;if(!(e instanceof tt))return[e];n=e.steps;var i,o=[];return n.forEach(function(e){if(e instanceof Ye)isPresent(i)||(i=[]),_normalizeStyleMetadata(e,t,r).forEach(function(e){_mergeAnimationStyles(i,e)});else{if(isPresent(i)&&(o.push(new Ye(0,i)),i=null),e instanceof et){var n=e.styles;n instanceof Ye?n.styles=_normalizeStyleMetadata(n,t,r):n instanceof Je&&n.steps.forEach(function(e){e.styles=_normalizeStyleMetadata(e,t,r)})}else if(e instanceof tt){var s=_normalizeStyleStepEntry(e,t,r);e=e instanceof nt?new nt(s):new rt(s)}o.push(e)}}),isPresent(i)&&o.push(new Ye(0,i)),o}function _resolveStylesFromState(e,t,r){var n=[];if(":"!=e[0])r.push(new ja('Animation states via styles must be prefixed with a ":"'));else{var i=e.substring(1),o=t[i];isPresent(o)?o.styles.forEach(function(e){isStringMap(e)&&n.push(e)}):r.push(new ja('Unable to apply styles due to missing a state: "'+i+'"'))}return n}function _parseAnimationKeyframes(e,t,r,n,i){var o=e.steps.length,s=0;e.steps.forEach(function(e){return s+=isPresent(e.offset)?1:0}),s>0&&s<o&&(i.push(new ja("Not all style() entries contain an offset for the provided keyframe()")),s=o);var a=o-1,u=0==s?1/a:0,l=[],c=0,p=!1,h=0;e.steps.forEach(function(e){var t=e.offset,r={};e.styles.forEach(function(e){Object.keys(e).forEach(function(t){"offset"!=t&&(r[t]=e[t])})}),isPresent(t)?p=p||t<h:t=c==a?La:u*c,l.push([t,r]),h=t,c++}),p&&A.sort(l,function(e,t){return e[0]<=t[0]?-1:1});var f=l[0];f[0]!=ka&&A.insert(l,0,f=[ka,{}]);var d=f[1];a=l.length-1;var m=l[a];m[0]!=La&&(l.push(m=[La,{}]),a++);for(var y=m[1],v=1;v<=a;v++){var g=l[v],_=g[1];Object.keys(_).forEach(function(e){isPresent(d[e])||(d[e]=Oo)})}for(var b=function(e){var t=l[e],r=t[1];Object.keys(r).forEach(function(e){isPresent(y[e])||(y[e]=r[e])})},v=a-1;v>=0;v--)b(v);return l.map(function(e){return new pa(e[0],new ca([e[1]]))})}function _parseTransitionAnimation(e,t,r,n,i){var o,s=0,a=t;if(e instanceof tt){var u,l=0,c=[],p=e instanceof nt;if(e.steps.forEach(function(e){var o=p?a:t;if(e instanceof Ye)return e.styles.forEach(function(e){var t=e;Object.keys(t).forEach(function(e){r.insertAtTime(e,o,t[e])})}),void(u=e.styles);var h=_parseTransitionAnimation(e,o,r,n,i);if(isPresent(u)){if(e instanceof tt){var f=new ca(u);c.push(new la(f,[],0,0,""))}else{var d=h;A.addAll(d.startingStyles.styles,u)}u=null}var m=h.playTime;t+=m,s+=m,l=Na.max(m,l),c.push(h)}),isPresent(u)){var h=new ca(u);c.push(new la(h,[],0,0,""))}p?(o=new fa(c),s=l,t=a+s):o=new da(c)}else if(e instanceof et){var f,d=_parseTimeExpression(e.timings,i),m=e.styles;if(m instanceof Je)f=_parseAnimationKeyframes(m,t,r,n,i);else{var y=m,v=La,g=new ca(y.styles),_=new pa(v,g);f=[_]}o=new la(new ca([]),f,d.duration,d.delay,d.easing),
s=d.duration+d.delay,t+=s,f.forEach(function(e){return e.styles.styles.forEach(function(e){return Object.keys(e).forEach(function(n){r.insertAtTime(n,t,e[n])})})})}else o=new la(null,[],0,0,"");return o.playTime=s,o.startTime=a,o}function _fillAnimationAstStartingKeyframes(e,t,r){if(e instanceof la&&e.keyframes.length>0){var n=e.keyframes;if(1==n.length){var i=n[0],o=_createStartKeyframeFromEndKeyframe(i,e.startTime,e.playTime,t,r);e.keyframes=[o,i]}}else e instanceof ha&&e.steps.forEach(function(e){return _fillAnimationAstStartingKeyframes(e,t,r)})}function _parseTimeExpression(e,t){var r,n=/^([\.\d]+)(m?s)(?:\s+([\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?/i,i=0,o=null;if(isString(e)){var s=e.match(n);if(null===s)return t.push(new ja('The provided timing value "'+e+'" is invalid.')),new Wa(0,0,null);var a=parseFloat(s[1]),u=s[2];"s"==u&&(a*=Fa),r=Na.floor(a);var l=s[3],c=s[4];if(isPresent(l)){var p=parseFloat(l);isPresent(c)&&"s"==c&&(p*=Fa),i=Na.floor(p)}var h=s[5];isBlank(h)||(o=h)}else r=e;return new Wa(r,i,o)}function _createStartKeyframeFromEndKeyframe(e,t,r,n,i){var o={},s=t+r;return e.styles.styles.forEach(function(e){Object.keys(e).forEach(function(r){var a=e[r];if("offset"!=r){var u,l,c,p=n.indexOfAtOrBeforeTime(r,t);isPresent(p)?(u=n.getByIndex(r,p),c=u.value,l=n.getByIndex(r,p+1)):c=Oo,isPresent(l)&&!l.matches(s,a)&&i.push(new ja('The animated CSS property "'+r+'" unexpectedly changes between steps "'+u.time+'ms" and "'+s+'ms" at "'+l.time+'ms"')),o[r]=c}})}),new pa(ka,new ca([o]))}function convertValueToOutputAst(e,t){return void 0===t&&(t=null),visitValue(e,new Ha,t)}function getPropertyInView(e,t,r){if(t===r)return e;for(var n=_e,i=t;i!==r&&isPresent(i.declarationElement.view);)i=i.declarationElement.view,n=n.prop("parent");if(i!==r)throw new Error("Internal error: Could not calculate a property in a parent view: "+e);if(e instanceof me){var o=e;(r.fields.some(function(e){return e.name==o.name})||r.getters.some(function(e){return e.name==o.name}))&&(n=n.cast(r.classType))}return replaceVarInExpression(_e.name,n,e)}function injectFromViewParentInjector(e,t){var r=[createDiTokenExpression(e)];return t&&r.push(we),_e.prop("parentInjector").callMethod("get",r)}function getViewFactoryName(e,t){return"viewFactory_"+e.type.name+t}function createFlatArray(e){for(var t=[],r=literalArr([]),n=0;n<e.length;n++){var i=e[n];i.type instanceof H?(t.length>0&&(r=r.callMethod(J.ConcatArray,[literalArr(t)]),t=[]),r=r.callMethod(J.ConcatArray,[i])):t.push(i)}return t.length>0&&(r=r.callMethod(J.ConcatArray,[literalArr(t)])),r}function createPureProxy(e,t,r,n){n.fields.push(new Me(r.name,null));var i=t<Go.pureProxies.length?Go.pureProxies[t]:null;if(!i)throw new Error("Unsupported number of argument for pure functions: "+t);n.createMethod.addStmt(_e.prop(r.name).set(importExpr(resolveIdentifier(i)).callFn([e])).toStmt())}function createQueryValues(e){return A.flatten(e.values.map(function(e){return e instanceof Ka?mapNestedViews(e.view.declarationElement.appElement,e.view,createQueryValues(e)):e}))}function mapNestedViews(e,t,r){var n=r.map(function(e){return replaceVarInExpression(_e.name,variable("nestedView"),e)});return e.callMethod("mapNestedViews",[variable(t.className),fn([new he("nestedView",t.classType)],[new xe(literalArr(n))],z)])}function createQueryList(e,t,r,n){n.fields.push(new Me(r,importType(resolveIdentifier(Go.QueryList),[z])));var i=_e.prop(r);return n.createMethod.addStmt(_e.prop(r).set(importExpr(resolveIdentifier(Go.QueryList),[z]).instantiate([])).toStmt()),i}function addQueryToTokenMap(e,t){t.meta.selectors.forEach(function(r){var n=e.get(r.reference);n||(n=[],e.set(r.reference,n)),n.push(t)})}function _enumExpression(e,t){return importExpr(resolveEnumIdentifier(e,t))}function createInjectInternalCondition(e,t,r,n){var i;return i=t>0?literal(e).lowerEquals(tu.requestNodeIndex).and(tu.requestNodeIndex.lowerEquals(literal(e+t))):literal(e).identical(tu.requestNodeIndex),new Oe(tu.token.identical(createDiTokenExpression(r.token)).and(i),[new xe(n)])}function createProviderProperty(e,t,r,n,i,o){var s,a,u=o.view;if(n?(s=literalArr(r),a=new H(z)):(s=r[0],a=r[0].type),a||(a=z),i)u.fields.push(new Me(e,a)),u.createMethod.addStmt(_e.prop(e).set(s).toStmt());else{var l="_"+e;u.fields.push(new Me(l,a));var c=new qa(u);c.resetDebugInfo(o.nodeIndex,o.sourceAst),c.addStmt(new Oe(_e.prop(l).isBlank(),[_e.prop(l).set(s).toStmt()])),c.addStmt(new xe(_e.prop(l))),u.getters.push(new De(e,c.finish(),a))}return _e.prop(e)}function _findPipeMeta(e,t){for(var r=null,n=e.pipeMetas.length-1;n>=0;n--){var i=e.pipeMetas[n];if(i.name==t){r=i;break}}if(!r)throw new Error("Illegal state: Could not find pipe "+t+" although the parser should have detected this error!");return r}function getViewType(e,t){return t>0?Zi.EMBEDDED:e.type.isHost?Zi.HOST:Zi.COMPONENT}function convertCdExpressionToIr(e,t,r,n,i){var o=new hu(e,t,n,i),s=r.visit(o,vs.Expression);return new cu(s,o.needsValueUnwrapper,o.temporaryCount)}function convertCdStatementToIr(e,t,r,n){var i=new hu(e,t,null,n),o=[];return flattenStatements(r.visit(i,vs.Statement),o),prependTemporaryDecls(i.temporaryCount,n,o),o}function temporaryName(e,t){return"tmp_"+e+"_"+t}function temporaryDeclaration(e,t){return new Se(temporaryName(e,t),we)}function prependTemporaryDecls(e,t,r){for(var n=e-1;n>=0;n--)r.unshift(temporaryDeclaration(t,n))}function ensureStatementMode(e,t){if(e!==vs.Statement)throw new Error("Expected a statement, but saw "+t)}function ensureExpressionMode(e,t){if(e!==vs.Expression)throw new Error("Expected an expression, but saw "+t)}function convertToStatementIfNeeded(e,t){return e===vs.Statement?t.toStmt():t}function flattenStatements(e,t){isArray(e)?e.forEach(function(e){return flattenStatements(e,t)}):t.push(e)}function collectEventListeners(e,t,r){var n=[];return e.forEach(function(e){r.view.bindings.push(new lu(r,e));var t=fu.getOrCreate(r,e.target,e.name,e.phase,n);t.addAction(e,null,null)}),t.forEach(function(e){var t=r.instances.get(identifierToken(e.directive.type).reference);e.hostEvents.forEach(function(i){r.view.bindings.push(new lu(r,i));var o=fu.getOrCreate(r,i.target,i.name,i.phase,n);o.addAction(i,e.directive,t)})}),n.forEach(function(e){return e.finishMethod()}),n}function bindDirectiveOutputs(e,t,r){Object.keys(e.directive.outputs).forEach(function(n){var i=e.directive.outputs[n];r.filter(function(e){return e.eventName==i}).forEach(function(e){e.listenToDirective(t,n)})})}function bindRenderOutputs(e){e.forEach(function(e){e.eventPhase?e.listenToAnimation():e.listenToRenderer()})}function convertStmtIntoExpression(e){return e instanceof Ae?e.expr:e instanceof xe?e.value:null}function sanitizeEventName(e){return e.replace(/[^a-zA-Z_]/g,"_")}function bindDirectiveDetectChangesLifecycleCallbacks(e,t,r){var n=r.view,i=n.detectChangesInInputsMethod,o=e.directive.type.lifecycleHooks;o.indexOf(Bi.OnChanges)!==-1&&e.inputs.length>0&&i.addStmt(new Oe(ru.changes.notIdentical(we),[t.callMethod("ngOnChanges",[ru.changes]).toStmt()])),o.indexOf(Bi.OnInit)!==-1&&i.addStmt(new Oe(du.and(mu),[t.callMethod("ngOnInit",[]).toStmt()])),o.indexOf(Bi.DoCheck)!==-1&&i.addStmt(new Oe(mu,[t.callMethod("ngDoCheck",[]).toStmt()]))}function bindDirectiveAfterContentLifecycleCallbacks(e,t,r){var n=r.view,i=e.type.lifecycleHooks,o=n.afterContentLifecycleCallbacksMethod;o.resetDebugInfo(r.nodeIndex,r.sourceAst),i.indexOf(Bi.AfterContentInit)!==-1&&o.addStmt(new Oe(du,[t.callMethod("ngAfterContentInit",[]).toStmt()])),i.indexOf(Bi.AfterContentChecked)!==-1&&o.addStmt(t.callMethod("ngAfterContentChecked",[]).toStmt())}function bindDirectiveAfterViewLifecycleCallbacks(e,t,r){var n=r.view,i=e.type.lifecycleHooks,o=n.afterViewLifecycleCallbacksMethod;o.resetDebugInfo(r.nodeIndex,r.sourceAst),i.indexOf(Bi.AfterViewInit)!==-1&&o.addStmt(new Oe(du,[t.callMethod("ngAfterViewInit",[]).toStmt()])),i.indexOf(Bi.AfterViewChecked)!==-1&&o.addStmt(t.callMethod("ngAfterViewChecked",[]).toStmt())}function bindInjectableDestroyLifecycleCallbacks(e,t,r){var n=r.view.destroyMethod;n.resetDebugInfo(r.nodeIndex,r.sourceAst),e.lifecycleHooks.indexOf(Bi.OnDestroy)!==-1&&n.addStmt(t.callMethod("ngOnDestroy",[]).toStmt())}function bindPipeDestroyLifecycleCallbacks(e,t,r){var n=r.destroyMethod;e.type.lifecycleHooks.indexOf(Bi.OnDestroy)!==-1&&n.addStmt(t.callMethod("ngOnDestroy",[]).toStmt())}function createBindFieldExpr(e){return _e.prop("_expr_"+e)}function createCurrValueExpr(e){return variable("currVal_"+e)}function bind(e,t,r,n,i,o,s,a){var u=convertCdExpressionToIr(e,i,n,ru.valUnwrapper,a);if(u.expression){if(u.temporaryCount)for(var l=0;l<u.temporaryCount;l++)s.addStmt(temporaryDeclaration(a,l));if(e.fields.push(new Me(r.name,null,[ne.Private])),e.createMethod.addStmt(_e.prop(r.name).set(importExpr(resolveIdentifier(Go.UNINITIALIZED))).toStmt()),u.needsValueUnwrapper){var c=ru.valUnwrapper.callMethod("reset",[]).toStmt();s.addStmt(c)}s.addStmt(t.set(u.expression).toDeclStmt(null,[ne.Final]));var p=importExpr(resolveIdentifier(Go.checkBinding)).callFn([ru.throwOnChange,r,t]);u.needsValueUnwrapper&&(p=ru.valUnwrapper.prop("hasWrappedValue").or(p)),s.addStmt(new Oe(p,o.concat([_e.prop(r.name).set(t).toStmt()])))}}function bindRenderText(e,t,r){var n=r.bindings.length;r.bindings.push(new lu(t,e));var i=createCurrValueExpr(n),o=createBindFieldExpr(n);r.detectChangesRenderPropertiesMethod.resetDebugInfo(t.nodeIndex,e),bind(r,i,o,e.value,r.componentContext,[_e.prop("renderer").callMethod("setText",[t.renderNode,i]).toStmt()],r.detectChangesRenderPropertiesMethod,n)}function bindAndWriteToRenderer(e,r,n,i){var o=n.view,s=n.renderNode;e.forEach(function(e){var a=o.bindings.length;o.bindings.push(new lu(n,e)),o.detectChangesRenderPropertiesMethod.resetDebugInfo(n.nodeIndex,e);var u=createBindFieldExpr(a),l=createCurrValueExpr(a),c=sanitizedValue(e,u),p=sanitizedValue(e,l),h=[],f=o.detectChangesRenderPropertiesMethod;switch(e.type){case t.PropertyBindingType.Property:o.genConfig.logBindingUpdate&&h.push(logBindingUpdateStmt(s,e.name,p)),h.push(_e.prop("renderer").callMethod("setElementProperty",[s,literal(e.name),p]).toStmt());break;case t.PropertyBindingType.Attribute:p=p.isBlank().conditional(we,p.callMethod("toString",[])),h.push(_e.prop("renderer").callMethod("setElementAttribute",[s,literal(e.name),p]).toStmt());break;case t.PropertyBindingType.Class:h.push(_e.prop("renderer").callMethod("setElementClass",[s,literal(e.name),p]).toStmt());break;case t.PropertyBindingType.Style:var d=p.callMethod("toString",[]);isPresent(e.unit)&&(d=d.plus(literal(e.unit))),p=p.isBlank().conditional(we,d),h.push(_e.prop("renderer").callMethod("setElementStyle",[s,literal(e.name),p]).toStmt());break;case t.PropertyBindingType.Animation:var m=e.name,y=_e;i&&(y=n.appElement.prop("componentView")),f=o.animationBindingsMethod;var v=y.prop("componentType").prop("animations").key(literal(m)),g=literal(No),_=variable("oldRenderVar");h.push(_.set(c).toDeclStmt()),h.push(new Oe(_.equals(importExpr(resolveIdentifier(Go.UNINITIALIZED))),[_.set(g).toStmt()]));var b=variable("newRenderVar");h.push(b.set(p).toDeclStmt()),h.push(new Oe(b.equals(importExpr(resolveIdentifier(Go.UNINITIALIZED))),[b.set(g).toStmt()])),h.push(v.callFn([_e,s,_,b]).toStmt()),o.detachMethod.addStmt(v.callFn([_e,s,c,g]).toStmt())}bind(o,l,u,e.value,r,h,f,o.bindings.length)})}function sanitizedValue(e,t){var n;switch(e.securityContext){case r.SecurityContext.NONE:return t;case r.SecurityContext.HTML:n="HTML";break;case r.SecurityContext.STYLE:n="STYLE";break;case r.SecurityContext.SCRIPT:n="SCRIPT";break;case r.SecurityContext.URL:n="URL";break;case r.SecurityContext.RESOURCE_URL:n="RESOURCE_URL";break;default:throw new Error("internal error, unexpected SecurityContext "+e.securityContext+".")}var i=Ya.viewUtils.prop("sanitizer"),o=[importExpr(resolveIdentifier(Go.SecurityContext)).prop(n),t];return i.callMethod("sanitize",o)}function bindRenderInputs(e,t){bindAndWriteToRenderer(e,t.view.componentContext,t,!1)}function bindDirectiveHostProps(e,t,r){bindAndWriteToRenderer(e.hostProperties,t,r,!0)}function bindDirectiveInputs(e,t,r){if(0!==e.inputs.length){var n=r.view,i=n.detectChangesInInputsMethod;i.resetDebugInfo(r.nodeIndex,r.sourceAst);var o=e.directive.type.lifecycleHooks,s=o.indexOf(Bi.OnChanges)!==-1,a=e.directive.isComponent&&!Fi(e.directive.changeDetection);s&&i.addStmt(ru.changes.set(we).toStmt()),a&&i.addStmt(ru.changed.set(literal(!1)).toStmt()),e.inputs.forEach(function(e){var o=n.bindings.length;n.bindings.push(new lu(r,e)),i.resetDebugInfo(r.nodeIndex,e);var u=createBindFieldExpr(o),l=createCurrValueExpr(o),c=[t.prop(e.directiveName).set(l).toStmt()];s&&(c.push(new Oe(ru.changes.identical(we),[ru.changes.set(literalMap([],new G(importType(resolveIdentifier(Go.SimpleChange))))).toStmt()])),c.push(ru.changes.key(literal(e.directiveName)).set(importExpr(resolveIdentifier(Go.SimpleChange)).instantiate([u,l])).toStmt())),a&&c.push(ru.changed.set(literal(!0)).toStmt()),n.genConfig.logBindingUpdate&&c.push(logBindingUpdateStmt(r.renderNode,e.directiveName,l)),bind(n,l,u,e.value,n.componentContext,c,i,o)}),a&&i.addStmt(new Oe(ru.changed,[r.appElement.prop("componentView").callMethod("markAsCheckOnce",[]).toStmt()]))}}function logBindingUpdateStmt(e,t,r){var n=_e.prop("renderer").callMethod("setBindingDebugInfo",[e,literal("ng-reflect-"+camelCaseToDashCase(t)),r.isBlank().conditional(we,r.callMethod("toString",[]))]).toStmt(),i=_e.prop("renderer").callMethod("setBindingDebugInfo",[e,literal("ng-reflect-"+camelCaseToDashCase(t)),literal("[ERROR] Exception while trying to serialize the value")]).toStmt();return new Ve([n],[i])}function bindView(e,t){var r=new yu(e);templateVisitAll(r,t),e.pipes.forEach(function(e){bindPipeDestroyLifecycleCallbacks(e.meta,e.instance,e.view)})}function buildView(e,t,r){var n=new Pu(e,r);return templateVisitAll(n,t,e.declarationElement.isNull()?e.declarationElement:e.declarationElement.parent),n.nestedViewCount}function finishView(e,t){e.afterNodes(),createViewTopLevelStmts(e,t),e.nodes.forEach(function(e){e instanceof ou&&e.hasEmbeddedView&&finishView(e.embeddedView,t)})}function _getOuterContainerOrSelf(e){for(var t=e.view;_isNgContainer(e.parent,t);)e=e.parent;return e}function _getOuterContainerParentOrSelf(e){for(var t=e.view;_isNgContainer(e,t);)e=e.parent;return e}function _isNgContainer(e,t){return!e.isNull()&&e.sourceAst.name===bu&&e.view===t}function _mergeHtmlAndDirectiveAttrs(e,t){var r={};return Object.keys(e).forEach(function(t){r[t]=e[t]}),t.forEach(function(e){Object.keys(e.hostAttributes).forEach(function(t){var n=e.hostAttributes[t],i=r[t];r[t]=isPresent(i)?mergeAttributeValue(t,i,n):n})}),mapToKeyValueArray(r)}function _readHtmlAttrs(e){var t={};return e.forEach(function(e){t[e.name]=e.value}),t}function mergeAttributeValue(e,t,r){return e==gu||e==_u?t+" "+r:r}function mapToKeyValueArray(e){var t=[];return Object.keys(e).forEach(function(r){t.push([r,e[r]])}),A.sort(t),t}function createViewTopLevelStmts(e,t){var r=we;e.genConfig.genDebugInfo&&(r=variable("nodeDebugInfos_"+e.component.type.name+e.viewIndex),t.push(r.set(literalArr(e.nodes.map(createStaticNodeDebugInfo),new H(new W(resolveIdentifier(Go.StaticNodeDebugInfo)),[x.Const]))).toDeclStmt(null,[ne.Final])));var n=variable("renderType_"+e.component.type.name);0===e.viewIndex&&t.push(n.set(we).toDeclStmt(importType(resolveIdentifier(Go.RenderComponentType))));var i=createViewClass(e,n,r);t.push(i),t.push(createViewFactory(e,i,n))}function createStaticNodeDebugInfo(e){var t=e instanceof ou?e:null,r=[],n=we,i=[];return isPresent(t)&&(r=t.getProviderTokens(),isPresent(t.component)&&(n=createDiTokenExpression(identifierToken(t.component.type))),Object.keys(t.referenceTokens).forEach(function(e){var r=t.referenceTokens[e];i.push([e,isPresent(r)?createDiTokenExpression(r):we])})),importExpr(resolveIdentifier(Go.StaticNodeDebugInfo)).instantiate([literalArr(r,new H(z,[x.Const])),n,literalMap(i,new G(z,[x.Const]))],importType(resolveIdentifier(Go.StaticNodeDebugInfo),null,[x.Const]))}function createViewClass(e,t,r){var n=[new he(Ja.viewUtils.name,importType(resolveIdentifier(Go.ViewUtils))),new he(Ja.parentInjector.name,importType(resolveIdentifier(Go.Injector))),new he(Ja.declarationEl.name,importType(resolveIdentifier(Go.AppElement)))],i=[variable(e.className),t,Za.fromValue(e.viewType),Ja.viewUtils,Ja.parentInjector,Ja.declarationEl,$a.fromValue(getChangeDetectionMode(e))];e.genConfig.genDebugInfo&&i.push(r);var o=new Ie(null,n,[be.callFn(i).toStmt()]),s=[new Ie("createInternal",[new he(Eu.name,Q)],generateCreateMethod(e),importType(resolveIdentifier(Go.AppElement))),new Ie("injectorGetInternal",[new he(tu.token.name,z),new he(tu.requestNodeIndex.name,K),new he(tu.notFoundResult.name,z)],addReturnValuefNotEmpty(e.injectorGetMethod.finish(),tu.notFoundResult),z),new Ie("detectChangesInternal",[new he(ru.throwOnChange.name,q)],generateDetectChangesMethod(e)),new Ie("dirtyParentQueriesInternal",[],e.dirtyParentQueriesMethod.finish()),new Ie("destroyInternal",[],e.destroyMethod.finish()),new Ie("detachInternal",[],e.detachMethod.finish())].concat(e.eventHandlerMethods),a=e.genConfig.genDebugInfo?Go.DebugAppView:Go.AppView,u=new Ne(e.className,importExpr(resolveIdentifier(a),[getContextType(e)]),e.fields,e.getters,o,s.filter(function(e){return e.body.length>0}));return u}function createViewFactory(e,t,r){var n,i=[new he(Ja.viewUtils.name,importType(resolveIdentifier(Go.ViewUtils))),new he(Ja.parentInjector.name,importType(resolveIdentifier(Go.Injector))),new he(Ja.declarationEl.name,importType(resolveIdentifier(Go.AppElement)))],o=[];if(n=e.component.template.templateUrl==e.component.type.moduleUrl?e.component.type.moduleUrl+" class "+e.component.type.name+" - inline template":e.component.template.templateUrl,0===e.viewIndex){var s=literalMap(e.animations.map(function(e){return[e.name,e.fnExp]}));o=[new Oe(r.identical(we),[r.set(Ja.viewUtils.callMethod("createRenderComponentType",[literal(e.genConfig.genDebugInfo?n:""),literal(e.component.template.ngContentSelectors.length),Xa.fromValue(e.component.template.encapsulation),e.styles,s])).toStmt()])]}return fn(i,o.concat([new xe(variable(t.name).instantiate(t.constructorMethod.params.map(function(e){return variable(e.name)})))]),importType(resolveIdentifier(Go.AppView),[getContextType(e)])).toDeclStmt(e.viewFactory.name,[ne.Final])}function generateCreateMethod(e){var t=we,r=[];e.viewType===Zi.COMPONENT&&(t=Ya.renderer.callMethod("createViewRoot",[_e.prop("declarationAppElement").prop("nativeElement")]),r=[wu.set(t).toDeclStmt(importType(e.genConfig.renderTypes.renderNode),[ne.Final])]);var n;return n=e.viewType===Zi.HOST?e.nodes[0].appElement:we,r.concat(e.createMethod.finish(),[_e.callMethod("init",[createFlatArray(e.rootNodesOrAppElements),literalArr(e.nodes.map(function(e){return e.renderNode})),literalArr(e.disposables),literalArr(e.subscriptions)]).toStmt(),new xe(n)])}function generateDetectChangesMethod(e){var t=[];if(e.animationBindingsMethod.isEmpty()&&e.detectChangesInInputsMethod.isEmpty()&&e.updateContentQueriesMethod.isEmpty()&&e.afterContentLifecycleCallbacksMethod.isEmpty()&&e.detectChangesRenderPropertiesMethod.isEmpty()&&e.updateViewQueriesMethod.isEmpty()&&e.afterViewLifecycleCallbacksMethod.isEmpty())return t;A.addAll(t,e.animationBindingsMethod.finish()),A.addAll(t,e.detectChangesInInputsMethod.finish()),t.push(_e.callMethod("detectContentChildrenChanges",[ru.throwOnChange]).toStmt());var r=e.updateContentQueriesMethod.finish().concat(e.afterContentLifecycleCallbacksMethod.finish());r.length>0&&t.push(new Oe(not(ru.throwOnChange),r)),A.addAll(t,e.detectChangesRenderPropertiesMethod.finish()),t.push(_e.callMethod("detectViewChildrenChanges",[ru.throwOnChange]).toStmt());var n=e.updateViewQueriesMethod.finish().concat(e.afterViewLifecycleCallbacksMethod.finish());n.length>0&&t.push(new Oe(not(ru.throwOnChange),n));var i=[],o=findReadVarNames(t);return o.has(ru.changed.name)&&i.push(ru.changed.set(literal(!0)).toDeclStmt(q)),o.has(ru.changes.name)&&i.push(ru.changes.set(we).toDeclStmt(new G(importType(resolveIdentifier(Go.SimpleChange))))),o.has(ru.valUnwrapper.name)&&i.push(ru.valUnwrapper.set(importExpr(resolveIdentifier(Go.ValueUnwrapper)).instantiate([])).toDeclStmt(null,[ne.Final])),i.concat(t)}function addReturnValuefNotEmpty(e,t){return e.length>0?e.concat([new xe(t)]):e}function getContextType(e){return e.viewType===Zi.COMPONENT?importType(e.component.type):z}function getChangeDetectionMode(e){var t;return t=e.viewType===Zi.COMPONENT?Fi(e.component.changeDetection)?ji.CheckAlways:ji.CheckOnce:ji.CheckAlways}function analyzeModules(e,t){var r=new Map,n=[];return e.forEach(function(e){var i=t.getNgModuleMetadata(e);n.push(i),i.declaredDirectives.forEach(function(e){e.isComponent&&r.set(e.type.reference,i)})}),new Mu(r,n)}function _resolveViewStatements(e){return e.dependencies.forEach(function(e){if(e instanceof Cu){var t=e;t.placeholder.moduleUrl=_ngfactoryModuleUrl(t.comp.moduleUrl)}else if(e instanceof Su){var r=e;r.placeholder.name=_componentFactoryName(r.comp),r.placeholder.moduleUrl=_ngfactoryModuleUrl(r.comp.moduleUrl)}}),e.statements}function _resolveStyleStatements(e,t){return e.dependencies.forEach(function(e){e.valuePlaceholder.moduleUrl=_stylesModuleUrl(e.moduleUrl,e.isShimmed,t)}),e.statements}function _ngfactoryModuleUrl(e){var t=_splitTypescriptSuffix(e);return t[0]+".ngfactory"+t[1]}function _componentFactoryName(e){return e.name+"NgFactory"}function _stylesModuleUrl(e,t,r){return t?e+".shim"+r:""+e+r}function _assertComponent(e){if(!e.isComponent)throw new Error("Could not compile '"+e.type.name+"' because it is not a component.")}function _splitTypescriptSuffix(e){if(e.endsWith(".d.ts"))return[e.slice(0,-5),".ts"];var t=e.lastIndexOf(".");return t!==-1?[e.substring(0,t),e.substring(t)]:[e,""]}function createOfflineCompileUrlResolver(){return new Vu(Nu)}function getUrlScheme(e){var t=_split(e);return t&&t[pu.Scheme]||""}function _buildFromEncodedParts(e,t,r,n,i,o,s){var a=[];return isPresent(e)&&a.push(e+":"),isPresent(r)&&(a.push("//"),isPresent(t)&&a.push(t+"@"),a.push(r),isPresent(n)&&a.push(":"+n)),isPresent(i)&&a.push(i),isPresent(o)&&a.push("?"+o),isPresent(s)&&a.push("#"+s),a.join("")}function _split(e){return e.match(Ru)}function _removeDotSegments(e){if("/"==e)return"/";for(var t="/"==e[0]?"/":"",r="/"===e[e.length-1]?"/":"",n=e.split("/"),i=[],o=0,s=0;s<n.length;s++){var a=n[s];switch(a){case"":case".":break;case"..":i.length>0?i.pop():o++;break;default:i.push(a)}}if(""==t){for(;o-- >0;)i.unshift("..");0===i.length&&i.push(".")}return t+i.join("/")+r}function _joinAndCanonicalizePath(e){var t=e[pu.Path];return t=isBlank(t)?"":_removeDotSegments(t),e[pu.Path]=t,_buildFromEncodedParts(e[pu.Scheme],e[pu.UserInfo],e[pu.Domain],e[pu.Port],t,e[pu.QueryData],e[pu.Fragment])}function _resolveUrl(e,t){var r=_split(encodeURI(t)),n=_split(e);if(isPresent(r[pu.Scheme]))return _joinAndCanonicalizePath(r);r[pu.Scheme]=n[pu.Scheme];for(var i=pu.Scheme;i<=pu.Port;i++)isBlank(r[i])&&(r[i]=n[i]);if("/"==r[pu.Path][0])return _joinAndCanonicalizePath(r);var o=n[pu.Path];isBlank(o)&&(o="/");var s=o.lastIndexOf("/");return o=o.substring(0,s+1)+r[pu.Path],r[pu.Path]=o,_joinAndCanonicalizePath(r)}function _cloneDirectiveWithTemplate(e,t){return new ft({type:e.type,isComponent:e.isComponent,selector:e.selector,exportAs:e.exportAs,changeDetection:e.changeDetection,inputs:e.inputs,outputs:e.outputs,hostListeners:e.hostListeners,hostProperties:e.hostProperties,hostAttributes:e.hostAttributes,providers:e.providers,viewProviders:e.viewProviders,queries:e.queries,viewQueries:e.viewQueries,entryComponents:e.entryComponents,template:t})}function isDirectiveMetadata(e){return e instanceof r.Directive}function hasLifecycleHook(e,t){var r=ju.get(e),n=Bu.get(e);return Eo.hasLifecycleHook(t,r,n)}function _isNgModuleMetadata(e){return e instanceof r.NgModule}function _isPipeMetadata(e){return e instanceof r.Pipe}function getTransitiveModules(e,t,r,n){return void 0===r&&(r=[]),void 0===n&&(n=new Set),e.forEach(function(e){if(!n.has(e.type.reference)){n.add(e.type.reference);var i=t?e.importedModules.concat(e.exportedModules):e.exportedModules;getTransitiveModules(i,t,r,n),r.push(e)}}),r}function flattenArray(e,t){if(void 0===t&&(t=[]),e)for(var n=0;n<e.length;n++){var i=r.resolveForwardRef(e[n]);Array.isArray(i)?flattenArray(i,t):t.push(i)}return t}function isValidType(e){return isStaticSymbol(e)||e instanceof r.Type}function staticTypeModuleUrl(e){return isStaticSymbol(e)?e.filePath:null}function componentModuleUrl(e,t,r){if(isStaticSymbol(t))return staticTypeModuleUrl(t);var n=r.moduleId;if("string"==typeof n){var i=getUrlScheme(n);return i?n:"package:"+n+Be}if(null!==n&&void 0!==n)throw new Error('moduleId should be a string in "'+stringify(t)+"\". 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 e.importUri(t)}function convertToCompileValue(e,t){return visitValue(e,new zu,t)}function escapeIdentifier(e,t,r){if(void 0===r&&(r=!0),isBlank(e))return null;var n=e.replace(Ju,function(){for(var e=[],r=0;r<arguments.length;r++)e[r-0]=arguments[r];return"$"==e[0]?t?"\\$":"$":"\n"==e[0]?"\\n":"\r"==e[0]?"\\r":"\\"+e[0]}),i=r||!Yu.test(n);return i?"'"+n+"'":n}function _createIndent(e){for(var t="",r=0;r<e;r++)t+=" ";return t}function debugOutputAstAsTypeScript(e){var t,r=new ul(sl),n=nl.createRoot([]);return t=isArray(e)?e:[e],t.forEach(function(e){if(e instanceof Ce)e.visitStatement(r,n);else if(e instanceof $)e.visitExpression(r,n);else{if(!(e instanceof j))throw new Error("Don't know how to print debug info for "+e);e.visitType(r,n)}}),n.toSource()}function interpretStatements(e,t){var r=e.concat([new xe(variable(t))]),n=new ll(null,null,null,new Map),i=new pl,o=i.visitAllStatements(r,n);return isPresent(o)?o.value:null}function _executeFunctionStatements(e,t,r,n,i){for(var o=n.createChildWihtLocalVars(),s=0;s<e.length;s++)o.vars.set(e[s],t[s]);var a=i.visitAllStatements(r,o);return isPresent(a)?a.value:null}function createDynamicClass(e,t,r){var n={};e.getters.forEach(function(i){n[i.name]={configurable:!1,get:function(){var n=new ll(t,this,e.name,t.vars);return _executeFunctionStatements([],[],i.body,n,r)}}}),e.methods.forEach(function(i){var o=i.params.map(function(e){return e.name});n[i.name]={writable:!1,configurable:!1,value:function(){for(var n=[],s=0;s<arguments.length;s++)n[s-0]=arguments[s];var a=new ll(t,this,e.name,t.vars);return _executeFunctionStatements(o,n,i.body,a,r)}}});var i=e.constructorMethod.params.map(function(e){return e.name}),o=function(){for(var n=this,o=[],s=0;s<arguments.length;s++)o[s-0]=arguments[s];var a=new ll(t,this,e.name,t.vars);e.fields.forEach(function(e){n[e.name]=void 0}),_executeFunctionStatements(i,o,e.constructorMethod.body,a,r)},s=e.parent.visitExpression(r,t);return o.prototype=Object.create(s.prototype,n),o}function _declareFn(e,t,r,n){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o-0]=arguments[o];return _executeFunctionStatements(e,i,t,r,n)}}function jitStatements(e,t,r){var n=new vl,i=nl.createRoot([r]);return n.visitAllStatements(t,i),evalExpression(e,r,i.toSource(),n.getArgs())}function stripComments(e){return e.replace(Rl,"")}function extractSourceMappingUrl(e){var t=e.match(kl);return t?t[0]:""}function processRules(e,t){var r=escapeBlocks(e),n=0;return r.escapedString.replace(Ll,function(){for(var e=[],i=0;i<arguments.length;i++)e[i-0]=arguments[i];var o=e[2],s="",a=e[4],u="";a&&a.startsWith("{"+Ul)&&(s=r.blocks[n++],a=a.substring(Ul.length+1),u="{");var l=t(new Wl(o,s));return""+e[1]+l.selector+e[3]+u+l.content+a})}function escapeBlocks(e){for(var t=e.split(Fl),r=[],n=[],i=0,o=[],s=0;s<t.length;s++){var a=t[s];a==Bl&&i--,i>0?o.push(a):(o.length>0&&(n.push(o.join("")),r.push(Ul),o=[]),r.push(a)),a==jl&&i++}return o.length>0&&(n.push(o.join("")),r.push(Ul)),new Hl(r.join(""),n)}function getStylesVarName(e){var t="styles";return e&&(t+="_"+e.type.name),t}function assertComponent(e){if(!e.isComponent)throw new Error("Could not compile '"+e.type.name+"' because it is not a component.")}function registerContext(e,t){for(var r=0,n=t;r<n.length;r++){var i=n[r];ec[i.toLowerCase()]=e}}function _initReflector(){Eo.reflectionCapabilities=new So}function _mergeOptions(e){return{useDebug:_lastDefined(e.map(function(e){return e.useDebug})),useJit:_lastDefined(e.map(function(e){return e.useJit})),defaultEncapsulation:_lastDefined(e.map(function(e){return e.defaultEncapsulation})),providers:_mergeArrays(e.map(function(e){return e.providers}))}}function _lastDefined(e){for(var t=e.length-1;t>=0;t--)if(void 0!==e[t])return e[t]}function _mergeArrays(e){var t=[];return e.forEach(function(e){return e&&t.push.apply(t,e)}),t}var n=function(){function TextAst(e,t,r){this.value=e,this.ngContentIndex=t,this.sourceSpan=r}return TextAst.prototype.visit=function(e,t){return e.visitText(this,t)},TextAst}(),i=function(){function BoundTextAst(e,t,r){this.value=e,this.ngContentIndex=t,this.sourceSpan=r}return BoundTextAst.prototype.visit=function(e,t){return e.visitBoundText(this,t)},BoundTextAst}(),o=function(){function AttrAst(e,t,r){this.name=e,this.value=t,this.sourceSpan=r}return AttrAst.prototype.visit=function(e,t){return e.visitAttr(this,t)},AttrAst}(),s=function(){function BoundElementPropertyAst(e,t,r,n,i,o){this.name=e,this.type=t,this.securityContext=r,this.value=n,this.unit=i,this.sourceSpan=o}return BoundElementPropertyAst.prototype.visit=function(e,t){return e.visitElementProperty(this,t)},Object.defineProperty(BoundElementPropertyAst.prototype,"isAnimation",{get:function(){return this.type===t.PropertyBindingType.Animation},enumerable:!0,configurable:!0}),BoundElementPropertyAst}(),a=function(){function BoundEventAst(e,t,r,n,i){this.name=e,this.target=t,this.phase=r,this.handler=n,this.sourceSpan=i}return BoundEventAst.prototype.visit=function(e,t){return e.visitEvent(this,t)},Object.defineProperty(BoundEventAst.prototype,"fullName",{get:function(){return this.target?this.target+":"+this.name:this.name},enumerable:!0,configurable:!0}),Object.defineProperty(BoundEventAst.prototype,"isAnimation",{get:function(){return!!this.phase},enumerable:!0,configurable:!0}),BoundEventAst}(),u=function(){function ReferenceAst(e,t,r){this.name=e,this.value=t,this.sourceSpan=r}return ReferenceAst.prototype.visit=function(e,t){return e.visitReference(this,t)},ReferenceAst}(),l=function(){function VariableAst(e,t,r){this.name=e,this.value=t,this.sourceSpan=r}return VariableAst.prototype.visit=function(e,t){return e.visitVariable(this,t)},VariableAst}(),c=function(){function ElementAst(e,t,r,n,i,o,s,a,u,l,c,p){this.name=e,this.attrs=t,this.inputs=r,this.outputs=n,this.references=i,this.directives=o,this.providers=s,this.hasViewContainer=a,this.children=u,this.ngContentIndex=l,this.sourceSpan=c,this.endSourceSpan=p}return ElementAst.prototype.visit=function(e,t){return e.visitElement(this,t)},ElementAst}(),p=function(){function EmbeddedTemplateAst(e,t,r,n,i,o,s,a,u,l){this.attrs=e,this.outputs=t,this.references=r,this.variables=n,this.directives=i,this.providers=o,this.hasViewContainer=s,this.children=a,this.ngContentIndex=u,this.sourceSpan=l}return EmbeddedTemplateAst.prototype.visit=function(e,t){return e.visitEmbeddedTemplate(this,t)},EmbeddedTemplateAst}(),h=function(){function BoundDirectivePropertyAst(e,t,r,n){this.directiveName=e,this.templateName=t,this.value=r,this.sourceSpan=n}return BoundDirectivePropertyAst.prototype.visit=function(e,t){return e.visitDirectiveProperty(this,t)},BoundDirectivePropertyAst}(),f=function(){function DirectiveAst(e,t,r,n,i){this.directive=e,this.inputs=t,this.hostProperties=r,this.hostEvents=n,this.sourceSpan=i}return DirectiveAst.prototype.visit=function(e,t){return e.visitDirective(this,t)},DirectiveAst}(),d=function(){function ProviderAst(e,t,r,n,i,o,s){this.token=e,this.multiProvider=t,this.eager=r,
this.providers=n,this.providerType=i,this.lifecycleHooks=o,this.sourceSpan=s}return ProviderAst.prototype.visit=function(e,t){return null},ProviderAst}();t.ProviderAstType,function(e){e[e.PublicService=0]="PublicService",e[e.PrivateService=1]="PrivateService",e[e.Component=2]="Component",e[e.Directive=3]="Directive",e[e.Builtin=4]="Builtin"}(t.ProviderAstType||(t.ProviderAstType={}));var m=function(){function NgContentAst(e,t,r){this.index=e,this.ngContentIndex=t,this.sourceSpan=r}return NgContentAst.prototype.visit=function(e,t){return e.visitNgContent(this,t)},NgContentAst}();t.PropertyBindingType,function(e){e[e.Property=0]="Property",e[e.Attribute=1]="Attribute",e[e.Class=2]="Class",e[e.Style=3]="Style",e[e.Animation=4]="Animation"}(t.PropertyBindingType||(t.PropertyBindingType={}));var y;y="undefined"==typeof window?"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:e:window;var v=y;v.assert=function(e){};var g,_=Object.getPrototypeOf({}),b=function(){function StringJoiner(e){void 0===e&&(e=[]),this.parts=e}return StringJoiner.prototype.add=function(e){this.parts.push(e)},StringJoiner.prototype.toString=function(){return this.parts.join("")},StringJoiner}(),w=function(){function NumberWrapper(){}return NumberWrapper.toFixed=function(e,t){return e.toFixed(t)},NumberWrapper.equal=function(e,t){return e===t},NumberWrapper.parseIntAutoRadix=function(e){var t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t},NumberWrapper.parseInt=function(e,t){if(10==t){if(/^(\-|\+)?[0-9]+$/.test(e))return parseInt(e,t)}else if(16==t){if(/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(e))return parseInt(e,t)}else{var r=parseInt(e,t);if(!isNaN(r))return r}throw new Error("Invalid integer literal when parsing "+e+" in base "+t)},Object.defineProperty(NumberWrapper,"NaN",{get:function(){return NaN},enumerable:!0,configurable:!0}),NumberWrapper.isNumeric=function(e){return!isNaN(e-parseFloat(e))},NumberWrapper.isNaN=function(e){return isNaN(e)},NumberWrapper.isInteger=function(e){return Number.isInteger(e)},NumberWrapper}(),E=function(){try{if(1===new Map([[1,2]]).size)return function(e){return new Map(e)}}catch(e){}return function(e){for(var t=new Map,r=0;r<e.length;r++){var n=e[r];t.set(n[0],n[1])}return t}}(),C=(function(){return(new Map).keys().next?function(e){for(var t,r=e.keys();!(t=r.next()).done;)e.set(t.value,null)}:function(e){e.forEach(function(t,r){e.set(r,null)})}}(),function(){try{if((new Map).values().next)return function(e,t){return t?Array.from(e.values()):Array.from(e.keys())}}catch(e){}return function(e,t){var r=new Array(e.size),n=0;return e.forEach(function(e,i){r[n]=t?e:i,n++}),r}}()),S=function(){function MapWrapper(){}return MapWrapper.createFromStringMap=function(e){var t=new Map;for(var r in e)t.set(r,e[r]);return t},MapWrapper.toStringMap=function(e){var t={};return e.forEach(function(e,r){return t[r]=e}),t},MapWrapper.createFromPairs=function(e){return E(e)},MapWrapper.iterable=function(e){return e},MapWrapper.keys=function(e){return C(e,!1)},MapWrapper.values=function(e){return C(e,!0)},MapWrapper}(),P=function(){function StringMapWrapper(){}return StringMapWrapper.merge=function(e,t){for(var r={},n=0,i=Object.keys(e);n<i.length;n++){var o=i[n];r[o]=e[o]}for(var s=0,a=Object.keys(t);s<a.length;s++){var o=a[s];r[o]=t[o]}return r},StringMapWrapper.equals=function(e,t){var r=Object.keys(e),n=Object.keys(t);if(r.length!=n.length)return!1;for(var i=0;i<r.length;i++){var o=r[i];if(e[o]!==t[o])return!1}return!0},StringMapWrapper}(),A=function(){function ListWrapper(){}return ListWrapper.createFixedSize=function(e){return new Array(e)},ListWrapper.createGrowableSize=function(e){return new Array(e)},ListWrapper.clone=function(e){return e.slice(0)},ListWrapper.forEachWithIndex=function(e,t){for(var r=0;r<e.length;r++)t(e[r],r)},ListWrapper.first=function(e){return e?e[0]:null},ListWrapper.last=function(e){return e&&0!=e.length?e[e.length-1]:null},ListWrapper.indexOf=function(e,t,r){return void 0===r&&(r=0),e.indexOf(t,r)},ListWrapper.contains=function(e,t){return e.indexOf(t)!==-1},ListWrapper.reversed=function(e){var t=ListWrapper.clone(e);return t.reverse()},ListWrapper.concat=function(e,t){return e.concat(t)},ListWrapper.insert=function(e,t,r){e.splice(t,0,r)},ListWrapper.removeAt=function(e,t){var r=e[t];return e.splice(t,1),r},ListWrapper.removeAll=function(e,t){for(var r=0;r<t.length;++r){var n=e.indexOf(t[r]);e.splice(n,1)}},ListWrapper.remove=function(e,t){var r=e.indexOf(t);return r>-1&&(e.splice(r,1),!0)},ListWrapper.clear=function(e){e.length=0},ListWrapper.isEmpty=function(e){return 0==e.length},ListWrapper.fill=function(e,t,r,n){void 0===r&&(r=0),void 0===n&&(n=null),e.fill(t,r,null===n?e.length:n)},ListWrapper.equals=function(e,t){if(e.length!=t.length)return!1;for(var r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0},ListWrapper.slice=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=null),e.slice(t,null===r?void 0:r)},ListWrapper.splice=function(e,t,r){return e.splice(t,r)},ListWrapper.sort=function(e,t){isPresent(t)?e.sort(t):e.sort()},ListWrapper.toString=function(e){return e.toString()},ListWrapper.toJSON=function(e){return JSON.stringify(e)},ListWrapper.maximum=function(e,t){if(0==e.length)return null;for(var r=null,n=-(1/0),i=0;i<e.length;i++){var o=e[i];if(!isBlank(o)){var s=t(o);s>n&&(r=o,n=s)}}return r},ListWrapper.flatten=function(e){var t=[];return _flattenArray(e,t),t},ListWrapper.addAll=function(e,t){for(var r=0;r<t.length;r++)e.push(t[r])},ListWrapper}();!function(e){e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA"}(g||(g={}));var x,T={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:""},M=function(){function HtmlTagDefinition(e){var t=this,r=void 0===e?{}:e,n=r.closedByChildren,i=r.requiredParents,o=r.implicitNamespacePrefix,s=r.contentType,a=void 0===s?g.PARSABLE_DATA:s,u=r.closedByParent,l=void 0!==u&&u,c=r.isVoid,p=void 0!==c&&c,h=r.ignoreFirstLf,f=void 0!==h&&h;this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,n&&n.length>0&&n.forEach(function(e){return t.closedByChildren[e]=!0}),this.isVoid=p,this.closedByParent=l||p,i&&i.length>0&&(this.requiredParents={},this.parentToAdd=i[0],i.forEach(function(e){return t.requiredParents[e]=!0})),this.implicitNamespacePrefix=o,this.contentType=a,this.ignoreFirstLf=f}return HtmlTagDefinition.prototype.requireExtraParent=function(e){if(!this.requiredParents)return!1;if(!e)return!0;var t=e.toLowerCase();return 1!=this.requiredParents[t]&&"template"!=t},HtmlTagDefinition.prototype.isClosedByChild=function(e){return this.isVoid||e.toLowerCase()in this.closedByChildren},HtmlTagDefinition}(),I={base:new M({isVoid:!0}),meta:new M({isVoid:!0}),area:new M({isVoid:!0}),embed:new M({isVoid:!0}),link:new M({isVoid:!0}),img:new M({isVoid:!0}),input:new M({isVoid:!0}),param:new M({isVoid:!0}),hr:new M({isVoid:!0}),br:new M({isVoid:!0}),source:new M({isVoid:!0}),track:new M({isVoid:!0}),wbr:new M({isVoid:!0}),p:new M({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 M({closedByChildren:["tbody","tfoot"]}),tbody:new M({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new M({closedByChildren:["tbody"],closedByParent:!0}),tr:new M({closedByChildren:["tr"],requiredParents:["tbody","tfoot","thead"],closedByParent:!0}),td:new M({closedByChildren:["td","th"],closedByParent:!0}),th:new M({closedByChildren:["td","th"],closedByParent:!0}),col:new M({requiredParents:["colgroup"],isVoid:!0}),svg:new M({implicitNamespacePrefix:"svg"}),math:new M({implicitNamespacePrefix:"math"}),li:new M({closedByChildren:["li"],closedByParent:!0}),dt:new M({closedByChildren:["dt","dd"]}),dd:new M({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new M({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new M({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new M({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new M({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new M({closedByChildren:["optgroup"],closedByParent:!0}),option:new M({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new M({ignoreFirstLf:!0}),listing:new M({ignoreFirstLf:!0}),style:new M({contentType:g.RAW_TEXT}),script:new M({contentType:g.RAW_TEXT}),title:new M({contentType:g.ESCAPABLE_RAW_TEXT}),textarea:new M({contentType:g.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})},D=new M,N=new RegExp("(\\:not\\()|([-\\w]+)|(?:\\.([-\\w]+))|(?:\\[([-\\w*]+)(?:=([^\\]]*))?\\])|(\\))|(\\s*,\\s*)","g"),O=function(){function CssSelector(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}return CssSelector.parse=function(e){var t,r=[],n=function(e,t){t.notSelectors.length>0&&!t.element&&0==t.classNames.length&&0==t.attrs.length&&(t.element="*"),e.push(t)},i=new CssSelector,o=i,s=!1;for(N.lastIndex=0;t=N.exec(e);){if(t[1]){if(s)throw new Error("Nesting :not is not allowed in a selector");s=!0,o=new CssSelector,i.notSelectors.push(o)}if(t[2]&&o.setElement(t[2]),t[3]&&o.addClassName(t[3]),t[4]&&o.addAttribute(t[4],t[5]),t[6]&&(s=!1,o=i),t[7]){if(s)throw new Error("Multiple selectors in :not are not supported");n(r,i),i=o=new CssSelector}}return n(r,i),r},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(e){void 0===e&&(e=null),this.element=e},CssSelector.prototype.getMatchingElementTemplate=function(){for(var e=this.element||"div",t=this.classNames.length>0?' class="'+this.classNames.join(" ")+'"':"",r="",n=0;n<this.attrs.length;n+=2){var i=this.attrs[n],o=""!==this.attrs[n+1]?'="'+this.attrs[n+1]+'"':"";r+=" "+i+o}return getHtmlTagDefinition(e).isVoid?"<"+e+t+r+"/>":"<"+e+t+r+"></"+e+">"},CssSelector.prototype.addAttribute=function(e,t){void 0===t&&(t=""),this.attrs.push(e,t&&t.toLowerCase()||"")},CssSelector.prototype.addClassName=function(e){this.classNames.push(e.toLowerCase())},CssSelector.prototype.toString=function(){var e=this.element||"";if(this.classNames&&this.classNames.forEach(function(t){return e+="."+t}),this.attrs)for(var t=0;t<this.attrs.length;t+=2){var r=this.attrs[t],n=this.attrs[t+1];e+="["+r+(n?"="+n:"")+"]"}return this.notSelectors.forEach(function(t){return e+=":not("+t+")"}),e},CssSelector}(),V=function(){function SelectorMatcher(){this._elementMap={},this._elementPartialMap={},this._classMap={},this._classPartialMap={},this._attrValueMap={},this._attrValuePartialMap={},this._listContexts=[]}return SelectorMatcher.createNotMatcher=function(e){var t=new SelectorMatcher;return t.addSelectables(e,null),t},SelectorMatcher.prototype.addSelectables=function(e,t){var r=null;e.length>1&&(r=new R(e),this._listContexts.push(r));for(var n=0;n<e.length;n++)this._addSelectable(e[n],t,r)},SelectorMatcher.prototype._addSelectable=function(e,t,r){var n=this,i=e.element,o=e.classNames,s=e.attrs,a=new k(e,t,r);if(i){var u=0===s.length&&0===o.length;u?this._addTerminal(n._elementMap,i,a):n=this._addPartial(n._elementPartialMap,i)}if(o)for(var l=0;l<o.length;l++){var u=0===s.length&&l===o.length-1,c=o[l];u?this._addTerminal(n._classMap,c,a):n=this._addPartial(n._classPartialMap,c)}if(s)for(var l=0;l<s.length;l+=2){var u=l===s.length-2,p=s[l],h=s[l+1];if(u){var f=n._attrValueMap,d=f[p];d||(d={},f[p]=d),this._addTerminal(d,h,a)}else{var m=n._attrValuePartialMap,y=m[p];y||(y={},m[p]=y),n=this._addPartial(y,h)}}},SelectorMatcher.prototype._addTerminal=function(e,t,r){var n=e[t];n||(n=[],e[t]=n),n.push(r)},SelectorMatcher.prototype._addPartial=function(e,t){var r=e[t];return r||(r=new SelectorMatcher,e[t]=r),r},SelectorMatcher.prototype.match=function(e,t){for(var r=!1,n=e.element,i=e.classNames,o=e.attrs,s=0;s<this._listContexts.length;s++)this._listContexts[s].alreadyMatched=!1;if(r=this._matchTerminal(this._elementMap,n,e,t)||r,r=this._matchPartial(this._elementPartialMap,n,e,t)||r,i)for(var s=0;s<i.length;s++){var a=i[s];r=this._matchTerminal(this._classMap,a,e,t)||r,r=this._matchPartial(this._classPartialMap,a,e,t)||r}if(o)for(var s=0;s<o.length;s+=2){var u=o[s],l=o[s+1],c=this._attrValueMap[u];l&&(r=this._matchTerminal(c,"",e,t)||r),r=this._matchTerminal(c,l,e,t)||r;var p=this._attrValuePartialMap[u];l&&(r=this._matchPartial(p,"",e,t)||r),r=this._matchPartial(p,l,e,t)||r}return r},SelectorMatcher.prototype._matchTerminal=function(e,t,r,n){if(!e||"string"!=typeof t)return!1;var i=e[t],o=e["*"];if(o&&(i=i.concat(o)),!i)return!1;for(var s,a=!1,u=0;u<i.length;u++)s=i[u],a=s.finalize(r,n)||a;return a},SelectorMatcher.prototype._matchPartial=function(e,t,r,n){if(!e||"string"!=typeof t)return!1;var i=e[t];return!!i&&i.match(r,n)},SelectorMatcher}(),R=function(){function SelectorListContext(e){this.selectors=e,this.alreadyMatched=!1}return SelectorListContext}(),k=function(){function SelectorContext(e,t,r){this.selector=e,this.cbContext=t,this.listContext=r,this.notSelectors=e.notSelectors}return SelectorContext.prototype.finalize=function(e,t){var r=!0;if(this.notSelectors.length>0&&(!this.listContext||!this.listContext.alreadyMatched)){var n=V.createNotMatcher(this.notSelectors);r=!n.match(e,null)}return!r||!t||this.listContext&&this.listContext.alreadyMatched||(this.listContext&&(this.listContext.alreadyMatched=!0),t(this.selector,this.cbContext)),r},SelectorContext}(),L=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)};!function(e){e[e.Const=0]="Const"}(x||(x={}));var F,j=function(){function Type(e){void 0===e&&(e=null),this.modifiers=e,e||(this.modifiers=[])}return Type.prototype.hasModifier=function(e){return this.modifiers.indexOf(e)!==-1},Type}();!function(e){e[e.Dynamic=0]="Dynamic",e[e.Bool=1]="Bool",e[e.String=2]="String",e[e.Int=3]="Int",e[e.Number=4]="Number",e[e.Function=5]="Function"}(F||(F={}));var B,U=function(e){function BuiltinType(t,r){void 0===r&&(r=null),e.call(this,r),this.name=t}return L(BuiltinType,e),BuiltinType.prototype.visitType=function(e,t){return e.visitBuiltintType(this,t)},BuiltinType}(j),W=function(e){function ExternalType(t,r,n){void 0===r&&(r=null),void 0===n&&(n=null),e.call(this,n),this.value=t,this.typeParams=r}return L(ExternalType,e),ExternalType.prototype.visitType=function(e,t){return e.visitExternalType(this,t)},ExternalType}(j),H=function(e){function ArrayType(t,r){void 0===r&&(r=null),e.call(this,r),this.of=t}return L(ArrayType,e),ArrayType.prototype.visitType=function(e,t){return e.visitArrayType(this,t)},ArrayType}(j),G=function(e){function MapType(t,r){void 0===r&&(r=null),e.call(this,r),this.valueType=t}return L(MapType,e),MapType.prototype.visitType=function(e,t){return e.visitMapType(this,t)},MapType}(j),z=new U(F.Dynamic),q=new U(F.Bool),K=(new U(F.Int),new U(F.Number)),Q=new U(F.String),Z=new U(F.Function);!function(e){e[e.Equals=0]="Equals",e[e.NotEquals=1]="NotEquals",e[e.Identical=2]="Identical",e[e.NotIdentical=3]="NotIdentical",e[e.Minus=4]="Minus",e[e.Plus=5]="Plus",e[e.Divide=6]="Divide",e[e.Multiply=7]="Multiply",e[e.Modulo=8]="Modulo",e[e.And=9]="And",e[e.Or=10]="Or",e[e.Lower=11]="Lower",e[e.LowerEquals=12]="LowerEquals",e[e.Bigger=13]="Bigger",e[e.BiggerEquals=14]="BiggerEquals"}(B||(B={}));var X,$=function(){function Expression(e){this.type=e}return Expression.prototype.prop=function(e){return new me(this,e)},Expression.prototype.key=function(e,t){return void 0===t&&(t=null),new ye(this,e,t)},Expression.prototype.callMethod=function(e,t){return new ie(this,e,t)},Expression.prototype.callFn=function(e){return new oe(this,e)},Expression.prototype.instantiate=function(e,t){return void 0===t&&(t=null),new se(this,e,t)},Expression.prototype.conditional=function(e,t){return void 0===t&&(t=null),new le(this,e,t)},Expression.prototype.equals=function(e){return new de(B.Equals,this,e)},Expression.prototype.notEquals=function(e){return new de(B.NotEquals,this,e)},Expression.prototype.identical=function(e){return new de(B.Identical,this,e)},Expression.prototype.notIdentical=function(e){return new de(B.NotIdentical,this,e)},Expression.prototype.minus=function(e){return new de(B.Minus,this,e)},Expression.prototype.plus=function(e){return new de(B.Plus,this,e)},Expression.prototype.divide=function(e){return new de(B.Divide,this,e)},Expression.prototype.multiply=function(e){return new de(B.Multiply,this,e)},Expression.prototype.modulo=function(e){return new de(B.Modulo,this,e)},Expression.prototype.and=function(e){return new de(B.And,this,e)},Expression.prototype.or=function(e){return new de(B.Or,this,e)},Expression.prototype.lower=function(e){return new de(B.Lower,this,e)},Expression.prototype.lowerEquals=function(e){return new de(B.LowerEquals,this,e)},Expression.prototype.bigger=function(e){return new de(B.Bigger,this,e)},Expression.prototype.biggerEquals=function(e){return new de(B.BiggerEquals,this,e)},Expression.prototype.isBlank=function(){return this.equals(we)},Expression.prototype.cast=function(e){return new pe(this,e)},Expression.prototype.toStmt=function(){return new Ae(this)},Expression}();!function(e){e[e.This=0]="This",e[e.Super=1]="Super",e[e.CatchError=2]="CatchError",e[e.CatchStack=3]="CatchStack"}(X||(X={}));var J,Y=function(e){function ReadVarExpr(t,r){void 0===r&&(r=null),e.call(this,r),isString(t)?(this.name=t,this.builtin=null):(this.name=null,this.builtin=t)}return L(ReadVarExpr,e),ReadVarExpr.prototype.visitExpression=function(e,t){return e.visitReadVarExpr(this,t)},ReadVarExpr.prototype.set=function(e){return new ee(this.name,e)},ReadVarExpr}($),ee=function(e){function WriteVarExpr(t,r,n){void 0===n&&(n=null),e.call(this,n||r.type),this.name=t,this.value=r}return L(WriteVarExpr,e),WriteVarExpr.prototype.visitExpression=function(e,t){return e.visitWriteVarExpr(this,t)},WriteVarExpr.prototype.toDeclStmt=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=null),new Se(this.name,this.value,e,t)},WriteVarExpr}($),te=function(e){function WriteKeyExpr(t,r,n,i){void 0===i&&(i=null),e.call(this,i||n.type),this.receiver=t,this.index=r,this.value=n}return L(WriteKeyExpr,e),WriteKeyExpr.prototype.visitExpression=function(e,t){return e.visitWriteKeyExpr(this,t)},WriteKeyExpr}($),re=function(e){function WritePropExpr(t,r,n,i){void 0===i&&(i=null),e.call(this,i||n.type),this.receiver=t,this.name=r,this.value=n}return L(WritePropExpr,e),WritePropExpr.prototype.visitExpression=function(e,t){return e.visitWritePropExpr(this,t)},WritePropExpr}($);!function(e){e[e.ConcatArray=0]="ConcatArray",e[e.SubscribeObservable=1]="SubscribeObservable",e[e.Bind=2]="Bind"}(J||(J={}));var ne,ie=function(e){function InvokeMethodExpr(t,r,n,i){void 0===i&&(i=null),e.call(this,i),this.receiver=t,this.args=n,isString(r)?(this.name=r,this.builtin=null):(this.name=null,this.builtin=r)}return L(InvokeMethodExpr,e),InvokeMethodExpr.prototype.visitExpression=function(e,t){return e.visitInvokeMethodExpr(this,t)},InvokeMethodExpr}($),oe=function(e){function InvokeFunctionExpr(t,r,n){void 0===n&&(n=null),e.call(this,n),this.fn=t,this.args=r}return L(InvokeFunctionExpr,e),InvokeFunctionExpr.prototype.visitExpression=function(e,t){return e.visitInvokeFunctionExpr(this,t)},InvokeFunctionExpr}($),se=function(e){function InstantiateExpr(t,r,n){e.call(this,n),this.classExpr=t,this.args=r}return L(InstantiateExpr,e),InstantiateExpr.prototype.visitExpression=function(e,t){return e.visitInstantiateExpr(this,t)},InstantiateExpr}($),ae=function(e){function LiteralExpr(t,r){void 0===r&&(r=null),e.call(this,r),this.value=t}return L(LiteralExpr,e),LiteralExpr.prototype.visitExpression=function(e,t){return e.visitLiteralExpr(this,t)},LiteralExpr}($),ue=function(e){function ExternalExpr(t,r,n){void 0===r&&(r=null),void 0===n&&(n=null),e.call(this,r),this.value=t,this.typeParams=n}return L(ExternalExpr,e),ExternalExpr.prototype.visitExpression=function(e,t){return e.visitExternalExpr(this,t)},ExternalExpr}($),le=function(e){function ConditionalExpr(t,r,n,i){void 0===n&&(n=null),void 0===i&&(i=null),e.call(this,i||r.type),this.condition=t,this.falseCase=n,this.trueCase=r}return L(ConditionalExpr,e),ConditionalExpr.prototype.visitExpression=function(e,t){return e.visitConditionalExpr(this,t)},ConditionalExpr}($),ce=function(e){function NotExpr(t){e.call(this,q),this.condition=t}return L(NotExpr,e),NotExpr.prototype.visitExpression=function(e,t){return e.visitNotExpr(this,t)},NotExpr}($),pe=function(e){function CastExpr(t,r){e.call(this,r),this.value=t}return L(CastExpr,e),CastExpr.prototype.visitExpression=function(e,t){return e.visitCastExpr(this,t)},CastExpr}($),he=function(){function FnParam(e,t){void 0===t&&(t=null),this.name=e,this.type=t}return FnParam}(),fe=function(e){function FunctionExpr(t,r,n){void 0===n&&(n=null),e.call(this,n),this.params=t,this.statements=r}return L(FunctionExpr,e),FunctionExpr.prototype.visitExpression=function(e,t){return e.visitFunctionExpr(this,t)},FunctionExpr.prototype.toDeclStmt=function(e,t){return void 0===t&&(t=null),new Pe(e,this.params,this.statements,this.type,t)},FunctionExpr}($),de=function(e){function BinaryOperatorExpr(t,r,n,i){void 0===i&&(i=null),e.call(this,i||r.type),this.operator=t,this.rhs=n,this.lhs=r}return L(BinaryOperatorExpr,e),BinaryOperatorExpr.prototype.visitExpression=function(e,t){return e.visitBinaryOperatorExpr(this,t)},BinaryOperatorExpr}($),me=function(e){function ReadPropExpr(t,r,n){void 0===n&&(n=null),e.call(this,n),this.receiver=t,this.name=r}return L(ReadPropExpr,e),ReadPropExpr.prototype.visitExpression=function(e,t){return e.visitReadPropExpr(this,t)},ReadPropExpr.prototype.set=function(e){return new re(this.receiver,this.name,e)},ReadPropExpr}($),ye=function(e){function ReadKeyExpr(t,r,n){void 0===n&&(n=null),e.call(this,n),this.receiver=t,this.index=r}return L(ReadKeyExpr,e),ReadKeyExpr.prototype.visitExpression=function(e,t){return e.visitReadKeyExpr(this,t)},ReadKeyExpr.prototype.set=function(e){return new te(this.receiver,this.index,e)},ReadKeyExpr}($),ve=function(e){function LiteralArrayExpr(t,r){void 0===r&&(r=null),e.call(this,r),this.entries=t}return L(LiteralArrayExpr,e),LiteralArrayExpr.prototype.visitExpression=function(e,t){return e.visitLiteralArrayExpr(this,t)},LiteralArrayExpr}($),ge=function(e){function LiteralMapExpr(t,r){void 0===r&&(r=null),e.call(this,r),this.entries=t,this.valueType=null,isPresent(r)&&(this.valueType=r.valueType)}return L(LiteralMapExpr,e),LiteralMapExpr.prototype.visitExpression=function(e,t){return e.visitLiteralMapExpr(this,t)},LiteralMapExpr}($),_e=new Y(X.This),be=new Y(X.Super),we=(new Y(X.CatchError),new Y(X.CatchStack),new ae(null,null));!function(e){e[e.Final=0]="Final",e[e.Private=1]="Private"}(ne||(ne={}));var Ee,Ce=function(){function Statement(e){void 0===e&&(e=null),this.modifiers=e,e||(this.modifiers=[])}return Statement.prototype.hasModifier=function(e){return this.modifiers.indexOf(e)!==-1},Statement}(),Se=function(e){function DeclareVarStmt(t,r,n,i){void 0===n&&(n=null),void 0===i&&(i=null),e.call(this,i),this.name=t,this.value=r,this.type=n||r.type}return L(DeclareVarStmt,e),DeclareVarStmt.prototype.visitStatement=function(e,t){return e.visitDeclareVarStmt(this,t)},DeclareVarStmt}(Ce),Pe=function(e){function DeclareFunctionStmt(t,r,n,i,o){void 0===i&&(i=null),void 0===o&&(o=null),e.call(this,o),this.name=t,this.params=r,this.statements=n,this.type=i}return L(DeclareFunctionStmt,e),DeclareFunctionStmt.prototype.visitStatement=function(e,t){return e.visitDeclareFunctionStmt(this,t)},DeclareFunctionStmt}(Ce),Ae=function(e){function ExpressionStatement(t){e.call(this),this.expr=t}return L(ExpressionStatement,e),ExpressionStatement.prototype.visitStatement=function(e,t){return e.visitExpressionStmt(this,t)},ExpressionStatement}(Ce),xe=function(e){function ReturnStatement(t){e.call(this),this.value=t}return L(ReturnStatement,e),ReturnStatement.prototype.visitStatement=function(e,t){return e.visitReturnStmt(this,t)},ReturnStatement}(Ce),Te=function(){function AbstractClassPart(e,t){void 0===e&&(e=null),this.type=e,this.modifiers=t,t||(this.modifiers=[])}return AbstractClassPart.prototype.hasModifier=function(e){return this.modifiers.indexOf(e)!==-1},AbstractClassPart}(),Me=function(e){function ClassField(t,r,n){void 0===r&&(r=null),void 0===n&&(n=null),e.call(this,r,n),this.name=t}return L(ClassField,e),ClassField}(Te),Ie=function(e){function ClassMethod(t,r,n,i,o){void 0===i&&(i=null),void 0===o&&(o=null),e.call(this,i,o),this.name=t,this.params=r,this.body=n}return L(ClassMethod,e),ClassMethod}(Te),De=function(e){function ClassGetter(t,r,n,i){void 0===n&&(n=null),void 0===i&&(i=null),e.call(this,n,i),this.name=t,this.body=r}return L(ClassGetter,e),ClassGetter}(Te),Ne=function(e){function ClassStmt(t,r,n,i,o,s,a){void 0===a&&(a=null),e.call(this,a),this.name=t,this.parent=r,this.fields=n,this.getters=i,this.constructorMethod=o,this.methods=s}return L(ClassStmt,e),ClassStmt.prototype.visitStatement=function(e,t){return e.visitDeclareClassStmt(this,t)},ClassStmt}(Ce),Oe=function(e){function IfStmt(t,r,n){void 0===n&&(n=[]),e.call(this),this.condition=t,this.trueCase=r,this.falseCase=n}return L(IfStmt,e),IfStmt.prototype.visitStatement=function(e,t){return e.visitIfStmt(this,t)},IfStmt}(Ce),Ve=(function(e){function CommentStmt(t){e.call(this),this.comment=t}return L(CommentStmt,e),CommentStmt.prototype.visitStatement=function(e,t){return e.visitCommentStmt(this,t)},CommentStmt}(Ce),function(e){function TryCatchStmt(t,r){e.call(this),this.bodyStmts=t,this.catchStmts=r}return L(TryCatchStmt,e),TryCatchStmt.prototype.visitStatement=function(e,t){return e.visitTryCatchStmt(this,t)},TryCatchStmt}(Ce)),Re=function(e){function ThrowStmt(t){e.call(this),this.error=t}return L(ThrowStmt,e),ThrowStmt.prototype.visitStatement=function(e,t){return e.visitThrowStmt(this,t)},ThrowStmt}(Ce),ke=function(){function ExpressionTransformer(){}return ExpressionTransformer.prototype.visitReadVarExpr=function(e,t){return e},ExpressionTransformer.prototype.visitWriteVarExpr=function(e,t){return new ee(e.name,e.value.visitExpression(this,t))},ExpressionTransformer.prototype.visitWriteKeyExpr=function(e,t){return new te(e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.value.visitExpression(this,t))},ExpressionTransformer.prototype.visitWritePropExpr=function(e,t){return new re(e.receiver.visitExpression(this,t),e.name,e.value.visitExpression(this,t))},ExpressionTransformer.prototype.visitInvokeMethodExpr=function(e,t){var r=e.builtin||e.name;return new ie(e.receiver.visitExpression(this,t),r,this.visitAllExpressions(e.args,t),e.type)},ExpressionTransformer.prototype.visitInvokeFunctionExpr=function(e,t){return new oe(e.fn.visitExpression(this,t),this.visitAllExpressions(e.args,t),e.type)},ExpressionTransformer.prototype.visitInstantiateExpr=function(e,t){return new se(e.classExpr.visitExpression(this,t),this.visitAllExpressions(e.args,t),e.type)},ExpressionTransformer.prototype.visitLiteralExpr=function(e,t){return e},ExpressionTransformer.prototype.visitExternalExpr=function(e,t){return e},ExpressionTransformer.prototype.visitConditionalExpr=function(e,t){return new le(e.condition.visitExpression(this,t),e.trueCase.visitExpression(this,t),e.falseCase.visitExpression(this,t))},ExpressionTransformer.prototype.visitNotExpr=function(e,t){return new ce(e.condition.visitExpression(this,t))},ExpressionTransformer.prototype.visitCastExpr=function(e,t){return new pe(e.value.visitExpression(this,t),t)},ExpressionTransformer.prototype.visitFunctionExpr=function(e,t){return e},ExpressionTransformer.prototype.visitBinaryOperatorExpr=function(e,t){return new de(e.operator,e.lhs.visitExpression(this,t),e.rhs.visitExpression(this,t),e.type)},ExpressionTransformer.prototype.visitReadPropExpr=function(e,t){return new me(e.receiver.visitExpression(this,t),e.name,e.type)},ExpressionTransformer.prototype.visitReadKeyExpr=function(e,t){return new ye(e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.type)},ExpressionTransformer.prototype.visitLiteralArrayExpr=function(e,t){return new ve(this.visitAllExpressions(e.entries,t))},ExpressionTransformer.prototype.visitLiteralMapExpr=function(e,t){var r=this,n=e.entries.map(function(e){return[e[0],e[1].visitExpression(r,t)]});return new ge(n)},ExpressionTransformer.prototype.visitAllExpressions=function(e,t){var r=this;return e.map(function(e){return e.visitExpression(r,t)})},ExpressionTransformer.prototype.visitDeclareVarStmt=function(e,t){return new Se(e.name,e.value.visitExpression(this,t),e.type,e.modifiers)},ExpressionTransformer.prototype.visitDeclareFunctionStmt=function(e,t){return e},ExpressionTransformer.prototype.visitExpressionStmt=function(e,t){return new Ae(e.expr.visitExpression(this,t))},ExpressionTransformer.prototype.visitReturnStmt=function(e,t){return new xe(e.value.visitExpression(this,t))},ExpressionTransformer.prototype.visitDeclareClassStmt=function(e,t){return e},ExpressionTransformer.prototype.visitIfStmt=function(e,t){return new Oe(e.condition.visitExpression(this,t),this.visitAllStatements(e.trueCase,t),this.visitAllStatements(e.falseCase,t))},ExpressionTransformer.prototype.visitTryCatchStmt=function(e,t){return new Ve(this.visitAllStatements(e.bodyStmts,t),this.visitAllStatements(e.catchStmts,t));
},ExpressionTransformer.prototype.visitThrowStmt=function(e,t){return new Re(e.error.visitExpression(this,t))},ExpressionTransformer.prototype.visitCommentStmt=function(e,t){return e},ExpressionTransformer.prototype.visitAllStatements=function(e,t){var r=this;return e.map(function(e){return e.visitStatement(r,t)})},ExpressionTransformer}(),Le=function(){function RecursiveExpressionVisitor(){}return RecursiveExpressionVisitor.prototype.visitReadVarExpr=function(e,t){return e},RecursiveExpressionVisitor.prototype.visitWriteVarExpr=function(e,t){return e.value.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitWriteKeyExpr=function(e,t){return e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e.value.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitWritePropExpr=function(e,t){return e.receiver.visitExpression(this,t),e.value.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitInvokeMethodExpr=function(e,t){return e.receiver.visitExpression(this,t),this.visitAllExpressions(e.args,t),e},RecursiveExpressionVisitor.prototype.visitInvokeFunctionExpr=function(e,t){return e.fn.visitExpression(this,t),this.visitAllExpressions(e.args,t),e},RecursiveExpressionVisitor.prototype.visitInstantiateExpr=function(e,t){return e.classExpr.visitExpression(this,t),this.visitAllExpressions(e.args,t),e},RecursiveExpressionVisitor.prototype.visitLiteralExpr=function(e,t){return e},RecursiveExpressionVisitor.prototype.visitExternalExpr=function(e,t){return e},RecursiveExpressionVisitor.prototype.visitConditionalExpr=function(e,t){return e.condition.visitExpression(this,t),e.trueCase.visitExpression(this,t),e.falseCase.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitNotExpr=function(e,t){return e.condition.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitCastExpr=function(e,t){return e.value.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitFunctionExpr=function(e,t){return e},RecursiveExpressionVisitor.prototype.visitBinaryOperatorExpr=function(e,t){return e.lhs.visitExpression(this,t),e.rhs.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitReadPropExpr=function(e,t){return e.receiver.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitReadKeyExpr=function(e,t){return e.receiver.visitExpression(this,t),e.index.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitLiteralArrayExpr=function(e,t){return this.visitAllExpressions(e.entries,t),e},RecursiveExpressionVisitor.prototype.visitLiteralMapExpr=function(e,t){var r=this;return e.entries.forEach(function(e){return e[1].visitExpression(r,t)}),e},RecursiveExpressionVisitor.prototype.visitAllExpressions=function(e,t){var r=this;e.forEach(function(e){return e.visitExpression(r,t)})},RecursiveExpressionVisitor.prototype.visitDeclareVarStmt=function(e,t){return e.value.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitDeclareFunctionStmt=function(e,t){return e},RecursiveExpressionVisitor.prototype.visitExpressionStmt=function(e,t){return e.expr.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitReturnStmt=function(e,t){return e.value.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitDeclareClassStmt=function(e,t){return e},RecursiveExpressionVisitor.prototype.visitIfStmt=function(e,t){return e.condition.visitExpression(this,t),this.visitAllStatements(e.trueCase,t),this.visitAllStatements(e.falseCase,t),e},RecursiveExpressionVisitor.prototype.visitTryCatchStmt=function(e,t){return this.visitAllStatements(e.bodyStmts,t),this.visitAllStatements(e.catchStmts,t),e},RecursiveExpressionVisitor.prototype.visitThrowStmt=function(e,t){return e.error.visitExpression(this,t),e},RecursiveExpressionVisitor.prototype.visitCommentStmt=function(e,t){return e},RecursiveExpressionVisitor.prototype.visitAllStatements=function(e,t){var r=this;e.forEach(function(e){return e.visitStatement(r,t)})},RecursiveExpressionVisitor}(),Fe=function(e){function _ReplaceVariableTransformer(t,r){e.call(this),this._varName=t,this._newValue=r}return L(_ReplaceVariableTransformer,e),_ReplaceVariableTransformer.prototype.visitReadVarExpr=function(e,t){return e.name==this._varName?this._newValue:e},_ReplaceVariableTransformer}(ke),je=function(e){function _VariableFinder(){e.apply(this,arguments),this.varNames=new Set}return L(_VariableFinder,e),_VariableFinder.prototype.visitReadVarExpr=function(e,t){return this.varNames.add(e.name),null},_VariableFinder}(Le),Be="",Ue=/([A-Z])/g,We=function(){function ValueTransformer(){}return ValueTransformer.prototype.visitArray=function(e,t){var r=this;return e.map(function(e){return visitValue(e,r,t)})},ValueTransformer.prototype.visitStringMap=function(e,t){var r=this,n={};return Object.keys(e).forEach(function(i){n[i]=visitValue(e[i],r,t)}),n},ValueTransformer.prototype.visitPrimitive=function(e,t){return e},ValueTransformer.prototype.visitOther=function(e,t){return e},ValueTransformer}(),He=function(){function SyncAsyncResult(e,t){void 0===t&&(t=null),this.syncResult=e,this.asyncResult=t,t||(this.asyncResult=Promise.resolve(e))}return SyncAsyncResult}(),Ge=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},ze=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/,qe=function(){function CompileMetadataWithIdentifier(){}return Object.defineProperty(CompileMetadataWithIdentifier.prototype,"identifier",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),CompileMetadataWithIdentifier}(),Ke=function(){function CompileAnimationEntryMetadata(e,t){void 0===e&&(e=null),void 0===t&&(t=null),this.name=e,this.definitions=t}return CompileAnimationEntryMetadata}(),Qe=function(){function CompileAnimationStateMetadata(){}return CompileAnimationStateMetadata}(),Ze=function(e){function CompileAnimationStateDeclarationMetadata(t,r){e.call(this),this.stateNameExpr=t,this.styles=r}return Ge(CompileAnimationStateDeclarationMetadata,e),CompileAnimationStateDeclarationMetadata}(Qe),Xe=function(e){function CompileAnimationStateTransitionMetadata(t,r){e.call(this),this.stateChangeExpr=t,this.steps=r}return Ge(CompileAnimationStateTransitionMetadata,e),CompileAnimationStateTransitionMetadata}(Qe),$e=function(){function CompileAnimationMetadata(){}return CompileAnimationMetadata}(),Je=function(e){function CompileAnimationKeyframesSequenceMetadata(t){void 0===t&&(t=[]),e.call(this),this.steps=t}return Ge(CompileAnimationKeyframesSequenceMetadata,e),CompileAnimationKeyframesSequenceMetadata}($e),Ye=function(e){function CompileAnimationStyleMetadata(t,r){void 0===r&&(r=null),e.call(this),this.offset=t,this.styles=r}return Ge(CompileAnimationStyleMetadata,e),CompileAnimationStyleMetadata}($e),et=function(e){function CompileAnimationAnimateMetadata(t,r){void 0===t&&(t=0),void 0===r&&(r=null),e.call(this),this.timings=t,this.styles=r}return Ge(CompileAnimationAnimateMetadata,e),CompileAnimationAnimateMetadata}($e),tt=function(e){function CompileAnimationWithStepsMetadata(t){void 0===t&&(t=null),e.call(this),this.steps=t}return Ge(CompileAnimationWithStepsMetadata,e),CompileAnimationWithStepsMetadata}($e),rt=function(e){function CompileAnimationSequenceMetadata(t){void 0===t&&(t=null),e.call(this,t)}return Ge(CompileAnimationSequenceMetadata,e),CompileAnimationSequenceMetadata}(tt),nt=function(e){function CompileAnimationGroupMetadata(t){void 0===t&&(t=null),e.call(this,t)}return Ge(CompileAnimationGroupMetadata,e),CompileAnimationGroupMetadata}(tt),it=function(){function CompileIdentifierMetadata(e){var t=void 0===e?{}:e,r=t.reference,n=t.name,i=t.moduleUrl,o=t.prefix,s=t.value;this.reference=r,this.name=n,this.prefix=o,this.moduleUrl=i,this.value=s}return Object.defineProperty(CompileIdentifierMetadata.prototype,"identifier",{get:function(){return this},enumerable:!0,configurable:!0}),CompileIdentifierMetadata}(),ot=function(){function CompileDiDependencyMetadata(e){var t=void 0===e?{}:e,r=t.isAttribute,n=t.isSelf,i=t.isHost,o=t.isSkipSelf,s=t.isOptional,a=t.isValue,u=t.query,l=t.viewQuery,c=t.token,p=t.value;this.isAttribute=normalizeBool(r),this.isSelf=normalizeBool(n),this.isHost=normalizeBool(i),this.isSkipSelf=normalizeBool(o),this.isOptional=normalizeBool(s),this.isValue=normalizeBool(a),this.query=u,this.viewQuery=l,this.token=c,this.value=p}return CompileDiDependencyMetadata}(),st=function(){function CompileProviderMetadata(e){var t=e.token,r=e.useClass,n=e.useValue,i=e.useExisting,o=e.useFactory,s=e.deps,a=e.multi;this.token=t,this.useClass=r,this.useValue=n,this.useExisting=i,this.useFactory=o,this.deps=normalizeBlank(s),this.multi=normalizeBool(a)}return CompileProviderMetadata}(),at=function(e){function CompileFactoryMetadata(t){var r=t.reference,n=t.name,i=t.moduleUrl,o=t.prefix,s=t.diDeps,a=t.value;e.call(this,{reference:r,name:n,prefix:o,moduleUrl:i,value:a}),this.diDeps=_normalizeArray(s)}return Ge(CompileFactoryMetadata,e),CompileFactoryMetadata}(it),ut=function(){function CompileTokenMetadata(e){var t=e.value,r=e.identifier,n=e.identifierIsInstance;this.value=t,this.identifier=r,this.identifierIsInstance=normalizeBool(n)}return Object.defineProperty(CompileTokenMetadata.prototype,"reference",{get:function(){return isPresent(this.identifier)?this.identifier.reference:this.value},enumerable:!0,configurable:!0}),Object.defineProperty(CompileTokenMetadata.prototype,"name",{get:function(){return isPresent(this.value)?sanitizeIdentifier(this.value):this.identifier.name},enumerable:!0,configurable:!0}),CompileTokenMetadata}(),lt=function(e){function CompileTypeMetadata(t){var r=void 0===t?{}:t,n=r.reference,i=r.name,o=r.moduleUrl,s=r.prefix,a=r.isHost,u=r.value,l=r.diDeps,c=r.lifecycleHooks;e.call(this,{reference:n,name:i,moduleUrl:o,prefix:s,value:u}),this.isHost=normalizeBool(a),this.diDeps=_normalizeArray(l),this.lifecycleHooks=_normalizeArray(c)}return Ge(CompileTypeMetadata,e),CompileTypeMetadata}(it),ct=function(){function CompileQueryMetadata(e){var t=void 0===e?{}:e,r=t.selectors,n=t.descendants,i=t.first,o=t.propertyName,s=t.read;this.selectors=r,this.descendants=normalizeBool(n),this.first=normalizeBool(i),this.propertyName=o,this.read=s}return CompileQueryMetadata}(),pt=function(){function CompileStylesheetMetadata(e){var t=void 0===e?{}:e,r=t.moduleUrl,n=t.styles,i=t.styleUrls;this.moduleUrl=r,this.styles=_normalizeArray(n),this.styleUrls=_normalizeArray(i)}return CompileStylesheetMetadata}(),ht=function(){function CompileTemplateMetadata(e){var t=void 0===e?{}:e,r=t.encapsulation,n=t.template,i=t.templateUrl,o=t.styles,s=t.styleUrls,a=t.externalStylesheets,u=t.animations,l=t.ngContentSelectors,c=t.interpolation;if(this.encapsulation=r,this.template=n,this.templateUrl=i,this.styles=_normalizeArray(o),this.styleUrls=_normalizeArray(s),this.externalStylesheets=_normalizeArray(a),this.animations=isPresent(u)?A.flatten(u):[],this.ngContentSelectors=l||[],isPresent(c)&&2!=c.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=c}return CompileTemplateMetadata}(),ft=function(){function CompileDirectiveMetadata(e){var t=void 0===e?{}:e,r=t.type,n=t.isComponent,i=t.selector,o=t.exportAs,s=t.changeDetection,a=t.inputs,u=t.outputs,l=t.hostListeners,c=t.hostProperties,p=t.hostAttributes,h=t.providers,f=t.viewProviders,d=t.queries,m=t.viewQueries,y=t.entryComponents,v=t.template;this.type=r,this.isComponent=n,this.selector=i,this.exportAs=o,this.changeDetection=s,this.inputs=a,this.outputs=u,this.hostListeners=l,this.hostProperties=c,this.hostAttributes=p,this.providers=_normalizeArray(h),this.viewProviders=_normalizeArray(f),this.queries=_normalizeArray(d),this.viewQueries=_normalizeArray(m),this.entryComponents=_normalizeArray(y),this.template=v}return CompileDirectiveMetadata.create=function(e){var t=void 0===e?{}:e,r=t.type,n=t.isComponent,i=t.selector,o=t.exportAs,s=t.changeDetection,a=t.inputs,u=t.outputs,l=t.host,c=t.providers,p=t.viewProviders,h=t.queries,f=t.viewQueries,d=t.entryComponents,m=t.template,y={},v={},g={};isPresent(l)&&Object.keys(l).forEach(function(e){var t=l[e],r=e.match(ze);null===r?g[e]=t:isPresent(r[1])?v[r[1]]=t:isPresent(r[2])&&(y[r[2]]=t)});var _={};isPresent(a)&&a.forEach(function(e){var t=splitAtColon(e,[e,e]);_[t[0]]=t[1]});var b={};return isPresent(u)&&u.forEach(function(e){var t=splitAtColon(e,[e,e]);b[t[0]]=t[1]}),new CompileDirectiveMetadata({type:r,isComponent:normalizeBool(n),selector:i,exportAs:o,changeDetection:s,inputs:_,outputs:b,hostListeners:y,hostProperties:v,hostAttributes:g,providers:c,viewProviders:p,queries:h,viewQueries:f,entryComponents:d,template:m})},Object.defineProperty(CompileDirectiveMetadata.prototype,"identifier",{get:function(){return this.type},enumerable:!0,configurable:!0}),CompileDirectiveMetadata}(),dt=function(){function CompilePipeMetadata(e){var t=void 0===e?{}:e,r=t.type,n=t.name,i=t.pure;this.type=r,this.name=n,this.pure=normalizeBool(i)}return Object.defineProperty(CompilePipeMetadata.prototype,"identifier",{get:function(){return this.type},enumerable:!0,configurable:!0}),CompilePipeMetadata}(),mt=function(){function CompileNgModuleMetadata(e){var t=void 0===e?{}:e,r=t.type,n=t.providers,i=t.declaredDirectives,o=t.exportedDirectives,s=t.declaredPipes,a=t.exportedPipes,u=t.entryComponents,l=t.bootstrapComponents,c=t.importedModules,p=t.exportedModules,h=t.schemas,f=t.transitiveModule,d=t.id;this.type=r,this.declaredDirectives=_normalizeArray(i),this.exportedDirectives=_normalizeArray(o),this.declaredPipes=_normalizeArray(s),this.exportedPipes=_normalizeArray(a),this.providers=_normalizeArray(n),this.entryComponents=_normalizeArray(u),this.bootstrapComponents=_normalizeArray(l),this.importedModules=_normalizeArray(c),this.exportedModules=_normalizeArray(p),this.schemas=_normalizeArray(h),this.id=d,this.transitiveModule=f}return Object.defineProperty(CompileNgModuleMetadata.prototype,"identifier",{get:function(){return this.type},enumerable:!0,configurable:!0}),CompileNgModuleMetadata}(),yt=function(){function TransitiveCompileNgModuleMetadata(e,t,r,n,i){var o=this;this.modules=e,this.providers=t,this.entryComponents=r,this.directives=n,this.pipes=i,this.directivesSet=new Set,this.pipesSet=new Set,n.forEach(function(e){return o.directivesSet.add(e.type.reference)}),i.forEach(function(e){return o.pipesSet.add(e.type.reference)})}return TransitiveCompileNgModuleMetadata}(),vt=function(){function ProviderMeta(e,t){var r=t.useClass,n=t.useValue,i=t.useExisting,o=t.useFactory,s=t.deps,a=t.multi;this.token=e,this.useClass=r,this.useValue=n,this.useExisting=i,this.useFactory=o,this.dependencies=s,this.multi=!!a}return ProviderMeta}(),gt=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},_t=function(){function ParserError(e,t,r,n){this.input=t,this.errLocation=r,this.ctxLocation=n,this.message="Parser Error: "+e+" "+r+" ["+t+"] in "+n}return ParserError}(),bt=function(){function ParseSpan(e,t){this.start=e,this.end=t}return ParseSpan}(),wt=function(){function AST(e){this.span=e}return AST.prototype.visit=function(e,t){return void 0===t&&(t=null),null},AST.prototype.toString=function(){return"AST"},AST}(),Et=function(e){function Quote(t,r,n,i){e.call(this,t),this.prefix=r,this.uninterpretedExpression=n,this.location=i}return gt(Quote,e),Quote.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitQuote(this,t)},Quote.prototype.toString=function(){return"Quote"},Quote}(wt),Ct=function(e){function EmptyExpr(){e.apply(this,arguments)}return gt(EmptyExpr,e),EmptyExpr.prototype.visit=function(e,t){void 0===t&&(t=null)},EmptyExpr}(wt),St=function(e){function ImplicitReceiver(){e.apply(this,arguments)}return gt(ImplicitReceiver,e),ImplicitReceiver.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitImplicitReceiver(this,t)},ImplicitReceiver}(wt),Pt=function(e){function Chain(t,r){e.call(this,t),this.expressions=r}return gt(Chain,e),Chain.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitChain(this,t)},Chain}(wt),At=function(e){function Conditional(t,r,n,i){e.call(this,t),this.condition=r,this.trueExp=n,this.falseExp=i}return gt(Conditional,e),Conditional.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitConditional(this,t)},Conditional}(wt),xt=function(e){function PropertyRead(t,r,n){e.call(this,t),this.receiver=r,this.name=n}return gt(PropertyRead,e),PropertyRead.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPropertyRead(this,t)},PropertyRead}(wt),Tt=function(e){function PropertyWrite(t,r,n,i){e.call(this,t),this.receiver=r,this.name=n,this.value=i}return gt(PropertyWrite,e),PropertyWrite.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPropertyWrite(this,t)},PropertyWrite}(wt),Mt=function(e){function SafePropertyRead(t,r,n){e.call(this,t),this.receiver=r,this.name=n}return gt(SafePropertyRead,e),SafePropertyRead.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitSafePropertyRead(this,t)},SafePropertyRead}(wt),It=function(e){function KeyedRead(t,r,n){e.call(this,t),this.obj=r,this.key=n}return gt(KeyedRead,e),KeyedRead.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitKeyedRead(this,t)},KeyedRead}(wt),Dt=function(e){function KeyedWrite(t,r,n,i){e.call(this,t),this.obj=r,this.key=n,this.value=i}return gt(KeyedWrite,e),KeyedWrite.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitKeyedWrite(this,t)},KeyedWrite}(wt),Nt=function(e){function BindingPipe(t,r,n,i){e.call(this,t),this.exp=r,this.name=n,this.args=i}return gt(BindingPipe,e),BindingPipe.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPipe(this,t)},BindingPipe}(wt),Ot=function(e){function LiteralPrimitive(t,r){e.call(this,t),this.value=r}return gt(LiteralPrimitive,e),LiteralPrimitive.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralPrimitive(this,t)},LiteralPrimitive}(wt),Vt=function(e){function LiteralArray(t,r){e.call(this,t),this.expressions=r}return gt(LiteralArray,e),LiteralArray.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralArray(this,t)},LiteralArray}(wt),Rt=function(e){function LiteralMap(t,r,n){e.call(this,t),this.keys=r,this.values=n}return gt(LiteralMap,e),LiteralMap.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitLiteralMap(this,t)},LiteralMap}(wt),kt=function(e){function Interpolation(t,r,n){e.call(this,t),this.strings=r,this.expressions=n}return gt(Interpolation,e),Interpolation.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitInterpolation(this,t)},Interpolation}(wt),Lt=function(e){function Binary(t,r,n,i){e.call(this,t),this.operation=r,this.left=n,this.right=i}return gt(Binary,e),Binary.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitBinary(this,t)},Binary}(wt),Ft=function(e){function PrefixNot(t,r){e.call(this,t),this.expression=r}return gt(PrefixNot,e),PrefixNot.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitPrefixNot(this,t)},PrefixNot}(wt),jt=function(e){function MethodCall(t,r,n,i){e.call(this,t),this.receiver=r,this.name=n,this.args=i}return gt(MethodCall,e),MethodCall.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitMethodCall(this,t)},MethodCall}(wt),Bt=function(e){function SafeMethodCall(t,r,n,i){e.call(this,t),this.receiver=r,this.name=n,this.args=i}return gt(SafeMethodCall,e),SafeMethodCall.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitSafeMethodCall(this,t)},SafeMethodCall}(wt),Ut=function(e){function FunctionCall(t,r,n){e.call(this,t),this.target=r,this.args=n}return gt(FunctionCall,e),FunctionCall.prototype.visit=function(e,t){return void 0===t&&(t=null),e.visitFunctionCall(this,t)},FunctionCall}(wt),Wt=function(e){function ASTWithSource(t,r,n,i){e.call(this,new bt(0,isBlank(r)?0:r.length)),this.ast=t,this.source=r,this.location=n,this.errors=i}return gt(ASTWithSource,e),ASTWithSource.prototype.visit=function(e,t){return void 0===t&&(t=null),this.ast.visit(e,t)},ASTWithSource.prototype.toString=function(){return this.source+" in "+this.location},ASTWithSource}(wt),Ht=function(){function TemplateBinding(e,t,r,n){this.key=e,this.keyIsVar=t,this.name=r,this.expression=n}return TemplateBinding}(),Gt=function(){function RecursiveAstVisitor(){}return RecursiveAstVisitor.prototype.visitBinary=function(e,t){return e.left.visit(this),e.right.visit(this),null},RecursiveAstVisitor.prototype.visitChain=function(e,t){return this.visitAll(e.expressions,t)},RecursiveAstVisitor.prototype.visitConditional=function(e,t){return e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this),null},RecursiveAstVisitor.prototype.visitPipe=function(e,t){return e.exp.visit(this),this.visitAll(e.args,t),null},RecursiveAstVisitor.prototype.visitFunctionCall=function(e,t){return e.target.visit(this),this.visitAll(e.args,t),null},RecursiveAstVisitor.prototype.visitImplicitReceiver=function(e,t){return null},RecursiveAstVisitor.prototype.visitInterpolation=function(e,t){return this.visitAll(e.expressions,t)},RecursiveAstVisitor.prototype.visitKeyedRead=function(e,t){return e.obj.visit(this),e.key.visit(this),null},RecursiveAstVisitor.prototype.visitKeyedWrite=function(e,t){return e.obj.visit(this),e.key.visit(this),e.value.visit(this),null},RecursiveAstVisitor.prototype.visitLiteralArray=function(e,t){return this.visitAll(e.expressions,t)},RecursiveAstVisitor.prototype.visitLiteralMap=function(e,t){return this.visitAll(e.values,t)},RecursiveAstVisitor.prototype.visitLiteralPrimitive=function(e,t){return null},RecursiveAstVisitor.prototype.visitMethodCall=function(e,t){return e.receiver.visit(this),this.visitAll(e.args,t)},RecursiveAstVisitor.prototype.visitPrefixNot=function(e,t){return e.expression.visit(this),null},RecursiveAstVisitor.prototype.visitPropertyRead=function(e,t){return e.receiver.visit(this),null},RecursiveAstVisitor.prototype.visitPropertyWrite=function(e,t){return e.receiver.visit(this),e.value.visit(this),null},RecursiveAstVisitor.prototype.visitSafePropertyRead=function(e,t){return e.receiver.visit(this),null},RecursiveAstVisitor.prototype.visitSafeMethodCall=function(e,t){return e.receiver.visit(this),this.visitAll(e.args,t)},RecursiveAstVisitor.prototype.visitAll=function(e,t){var r=this;return e.forEach(function(e){return e.visit(r,t)}),null},RecursiveAstVisitor.prototype.visitQuote=function(e,t){return null},RecursiveAstVisitor}(),zt=0,qt=9,Kt=10,Qt=11,Zt=12,Xt=13,$t=32,Jt=33,Yt=34,er=35,tr=36,rr=37,nr=38,ir=39,or=40,sr=41,ar=42,ur=43,lr=44,cr=45,pr=46,hr=47,fr=58,dr=59,mr=60,yr=61,vr=62,gr=63,_r=48,br=57,wr=65,Er=69,Cr=70,Sr=88,Pr=90,Ar=91,xr=92,Tr=93,Mr=94,Ir=95,Dr=97,Nr=101,Or=102,Vr=110,Rr=114,kr=116,Lr=117,Fr=118,jr=120,Br=122,Ur=123,Wr=124,Hr=125,Gr=160,zr=96,qr=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//],Kr=function(){function InterpolationConfig(e,t){this.start=e,this.end=t}return InterpolationConfig.fromArray=function(e){return e?(assertInterpolationSymbols("interpolation",e),new InterpolationConfig(e[0],e[1])):Qr},InterpolationConfig}(),Qr=new Kr("{{","}}");!function(e){e[e.Character=0]="Character",e[e.Identifier=1]="Identifier",e[e.Keyword=2]="Keyword",e[e.String=3]="String",e[e.Operator=4]="Operator",e[e.Number=5]="Number",e[e.Error=6]="Error"}(Ee||(Ee={}));var Zr,Xr=["var","let","null","undefined","true","false","if","else","this"],$r=function(){function Lexer(){}return Lexer.prototype.tokenize=function(e){for(var t=new en(e),r=[],n=t.scanToken();null!=n;)r.push(n),n=t.scanToken();return r},Lexer.decorators=[{type:r.Injectable}],Lexer.ctorParameters=[],Lexer}(),Jr=function(){function Token(e,t,r,n){this.index=e,this.type=t,this.numValue=r,this.strValue=n}return Token.prototype.isCharacter=function(e){return this.type==Ee.Character&&this.numValue==e},Token.prototype.isNumber=function(){return this.type==Ee.Number},Token.prototype.isString=function(){return this.type==Ee.String},Token.prototype.isOperator=function(e){return this.type==Ee.Operator&&this.strValue==e},Token.prototype.isIdentifier=function(){return this.type==Ee.Identifier},Token.prototype.isKeyword=function(){return this.type==Ee.Keyword},Token.prototype.isKeywordLet=function(){return this.type==Ee.Keyword&&"let"==this.strValue},Token.prototype.isKeywordNull=function(){return this.type==Ee.Keyword&&"null"==this.strValue},Token.prototype.isKeywordUndefined=function(){return this.type==Ee.Keyword&&"undefined"==this.strValue},Token.prototype.isKeywordTrue=function(){return this.type==Ee.Keyword&&"true"==this.strValue},Token.prototype.isKeywordFalse=function(){return this.type==Ee.Keyword&&"false"==this.strValue},Token.prototype.isKeywordThis=function(){return this.type==Ee.Keyword&&"this"==this.strValue},Token.prototype.isError=function(){return this.type==Ee.Error},Token.prototype.toNumber=function(){return this.type==Ee.Number?this.numValue:-1},Token.prototype.toString=function(){switch(this.type){case Ee.Character:case Ee.Identifier:case Ee.Keyword:case Ee.Operator:case Ee.String:case Ee.Error:return this.strValue;case Ee.Number:return this.numValue.toString();default:return null}},Token}(),Yr=new Jr((-1),Ee.Character,0,""),en=function(){function _Scanner(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}return _Scanner.prototype.advance=function(){this.peek=++this.index>=this.length?zt:this.input.charCodeAt(this.index)},_Scanner.prototype.scanToken=function(){for(var e=this.input,t=this.length,r=this.peek,n=this.index;r<=$t;){if(++n>=t){r=zt;break}r=e.charCodeAt(n)}if(this.peek=r,this.index=n,n>=t)return null;if(isIdentifierStart(r))return this.scanIdentifier();if(isDigit(r))return this.scanNumber(n);var i=n;switch(r){case pr:return this.advance(),isDigit(this.peek)?this.scanNumber(i):newCharacterToken(i,pr);case or:case sr:case Ur:case Hr:case Ar:case Tr:case lr:case fr:case dr:return this.scanCharacter(i,r);case ir:case Yt:return this.scanString();case er:case ur:case cr:case ar:case hr:case rr:case Mr:return this.scanOperator(i,String.fromCharCode(r));case gr:return this.scanComplexOperator(i,"?",pr,".");case mr:case vr:return this.scanComplexOperator(i,String.fromCharCode(r),yr,"=");case Jt:case yr:return this.scanComplexOperator(i,String.fromCharCode(r),yr,"=",yr,"=");case nr:return this.scanComplexOperator(i,"&",nr,"&");case Wr:return this.scanComplexOperator(i,"|",Wr,"|");case Gr:for(;isWhitespace(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error("Unexpected character ["+String.fromCharCode(r)+"]",0)},_Scanner.prototype.scanCharacter=function(e,t){return this.advance(),newCharacterToken(e,t)},_Scanner.prototype.scanOperator=function(e,t){return this.advance(),newOperatorToken(e,t)},_Scanner.prototype.scanComplexOperator=function(e,t,r,n,i,o){this.advance();var s=t;return this.peek==r&&(this.advance(),s+=n),isPresent(i)&&this.peek==i&&(this.advance(),s+=o),newOperatorToken(e,s)},_Scanner.prototype.scanIdentifier=function(){var e=this.index;for(this.advance();isIdentifierPart(this.peek);)this.advance();var t=this.input.substring(e,this.index);return Xr.indexOf(t)>-1?newKeywordToken(e,t):newIdentifierToken(e,t)},_Scanner.prototype.scanNumber=function(e){var t=this.index===e;for(this.advance();;){if(isDigit(this.peek));else if(this.peek==pr)t=!1;else{if(!isExponentStart(this.peek))break;if(this.advance(),isExponentSign(this.peek)&&this.advance(),!isDigit(this.peek))return this.error("Invalid exponent",-1);t=!1}this.advance()}var r=this.input.substring(e,this.index),n=t?w.parseIntAutoRadix(r):parseFloat(r);return newNumberToken(e,n)},_Scanner.prototype.scanString=function(){var e=this.index,t=this.peek;this.advance();for(var r,n=this.index,i=this.input;this.peek!=t;)if(this.peek==xr){null==r&&(r=new b),r.add(i.substring(n,this.index)),this.advance();var o;if(this.peek==Lr){var s=i.substring(this.index+1,this.index+5);try{o=w.parseInt(s,16)}catch(a){return this.error("Invalid unicode escape [\\u"+s+"]",0)}for(var u=0;u<5;u++)this.advance()}else o=unescape(this.peek),this.advance();r.add(String.fromCharCode(o)),n=this.index}else{if(this.peek==zt)return this.error("Unterminated quote",0);this.advance()}var l=i.substring(n,this.index);this.advance();var c=l;return null!=r&&(r.add(l),c=r.toString()),newStringToken(e,c)},_Scanner.prototype.error=function(e,t){var r=this.index+t;return newErrorToken(r,"Lexer Error: "+e+" at column "+r+" in expression ["+this.input+"]")},_Scanner}(),tn=function(){function SplitInterpolation(e,t,r){this.strings=e,this.expressions=t,this.offsets=r}return SplitInterpolation}(),rn=function(){function TemplateBindingParseResult(e,t,r){this.templateBindings=e,this.warnings=t,this.errors=r}return TemplateBindingParseResult}(),nn=function(){function Parser(e){this._lexer=e,this.errors=[]}return Parser.prototype.parseAction=function(e,t,r){void 0===r&&(r=Qr),this._checkNoInterpolation(e,t,r);var n=this._stripComments(e),i=this._lexer.tokenize(this._stripComments(e)),o=new on(e,t,i,n.length,(!0),this.errors,e.length-n.length).parseChain();return new Wt(o,e,t,this.errors)},Parser.prototype.parseBinding=function(e,t,r){void 0===r&&(r=Qr);var n=this._parseBindingAst(e,t,r);return new Wt(n,e,t,this.errors)},Parser.prototype.parseSimpleBinding=function(e,t,r){void 0===r&&(r=Qr);var n=this._parseBindingAst(e,t,r);return sn.check(n)||this._reportError("Host binding expression can only contain field access and constants",e,t),new Wt(n,e,t,this.errors)},Parser.prototype._reportError=function(e,t,r,n){this.errors.push(new _t(e,t,r,n))},Parser.prototype._parseBindingAst=function(e,t,r){var n=this._parseQuote(e,t);if(isPresent(n))return n;this._checkNoInterpolation(e,t,r);var i=this._stripComments(e),o=this._lexer.tokenize(i);return new on(e,t,o,i.length,(!1),this.errors,e.length-i.length).parseChain()},Parser.prototype._parseQuote=function(e,t){if(isBlank(e))return null;var r=e.indexOf(":");if(r==-1)return null;var n=e.substring(0,r).trim();if(!isIdentifier(n))return null;var i=e.substring(r+1);return new Et(new bt(0,e.length),n,i,t)},Parser.prototype.parseTemplateBindings=function(e,t){var r=this._lexer.tokenize(e);return new on(e,t,r,e.length,(!1),this.errors,0).parseTemplateBindings()},Parser.prototype.parseInterpolation=function(e,t,r){void 0===r&&(r=Qr);var n=this.splitInterpolation(e,t,r);if(null==n)return null;for(var i=[],o=0;o<n.expressions.length;++o){var s=n.expressions[o],a=this._stripComments(s),u=this._lexer.tokenize(this._stripComments(n.expressions[o])),l=new on(e,t,u,a.length,(!1),this.errors,n.offsets[o]+(s.length-a.length)).parseChain();i.push(l)}return new Wt(new kt(new bt(0,isBlank(e)?0:e.length),n.strings,i),e,t,this.errors)},Parser.prototype.splitInterpolation=function(e,t,r){void 0===r&&(r=Qr);var n=_createInterpolateRegExp(r),i=e.split(n);if(i.length<=1)return null;for(var o=[],s=[],a=[],u=0,l=0;l<i.length;l++){var c=i[l];l%2===0?(o.push(c),u+=c.length):c.trim().length>0?(u+=r.start.length,s.push(c),a.push(u),u+=c.length+r.end.length):this._reportError("Blank expressions are not allowed in interpolated strings",e,"at column "+this._findInterpolationErrorColumn(i,l,r)+" in",t)}return new tn(o,s,a)},Parser.prototype.wrapLiteralPrimitive=function(e,t){return new Wt(new Ot(new bt(0,isBlank(e)?0:e.length),e),e,t,this.errors)},Parser.prototype._stripComments=function(e){var t=this._commentStart(e);return isPresent(t)?e.substring(0,t).trim():e},Parser.prototype._commentStart=function(e){for(var t=null,r=0;r<e.length-1;r++){var n=e.charCodeAt(r),i=e.charCodeAt(r+1);if(n===hr&&i==hr&&isBlank(t))return r;t===n?t=null:isBlank(t)&&isQuote(n)&&(t=n)}return null},Parser.prototype._checkNoInterpolation=function(e,t,r){var n=_createInterpolateRegExp(r),i=e.split(n);i.length>1&&this._reportError("Got interpolation ("+r.start+r.end+") where expression was expected",e,"at column "+this._findInterpolationErrorColumn(i,1,r)+" in",t);
},Parser.prototype._findInterpolationErrorColumn=function(e,t,r){for(var n="",i=0;i<t;i++)n+=i%2===0?e[i]:""+r.start+e[i]+r.end;return n.length},Parser.decorators=[{type:r.Injectable}],Parser.ctorParameters=[{type:$r}],Parser}(),on=function(){function _ParseAST(e,t,r,n,i,o,s){this.input=e,this.location=t,this.tokens=r,this.inputLength=n,this.parseAction=i,this.errors=o,this.offset=s,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.index=0}return _ParseAST.prototype.peek=function(e){var t=this.index+e;return t<this.tokens.length?this.tokens[t]:Yr},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(e){return new bt(e,this.inputIndex)},_ParseAST.prototype.advance=function(){this.index++},_ParseAST.prototype.optionalCharacter=function(e){return!!this.next.isCharacter(e)&&(this.advance(),!0)},_ParseAST.prototype.peekKeywordLet=function(){return this.next.isKeywordLet()},_ParseAST.prototype.expectCharacter=function(e){this.optionalCharacter(e)||this.error("Missing expected "+String.fromCharCode(e))},_ParseAST.prototype.optionalOperator=function(e){return!!this.next.isOperator(e)&&(this.advance(),!0)},_ParseAST.prototype.expectOperator=function(e){this.optionalOperator(e)||this.error("Missing expected operator "+e)},_ParseAST.prototype.expectIdentifierOrKeyword=function(){var e=this.next;return e.isIdentifier()||e.isKeyword()?(this.advance(),e.toString()):(this.error("Unexpected token "+e+", expected identifier or keyword"),"")},_ParseAST.prototype.expectIdentifierOrKeywordOrString=function(){var e=this.next;return e.isIdentifier()||e.isKeyword()||e.isString()?(this.advance(),e.toString()):(this.error("Unexpected token "+e+", expected identifier, keyword, or string"),"")},_ParseAST.prototype.parseChain=function(){for(var e=[],t=this.inputIndex;this.index<this.tokens.length;){var r=this.parsePipe();if(e.push(r),this.optionalCharacter(dr))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.optionalCharacter(dr););else this.index<this.tokens.length&&this.error("Unexpected token '"+this.next+"'")}return 0==e.length?new Ct(this.span(t)):1==e.length?e[0]:new Pt(this.span(t),e)},_ParseAST.prototype.parsePipe=function(){var e=this.parseExpression();if(this.optionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{for(var t=this.expectIdentifierOrKeyword(),r=[];this.optionalCharacter(fr);)r.push(this.parseExpression());e=new Nt(this.span(e.span.start-this.offset),e,t,r)}while(this.optionalOperator("|"))}return e},_ParseAST.prototype.parseExpression=function(){return this.parseConditional()},_ParseAST.prototype.parseConditional=function(){var e=this.inputIndex,t=this.parseLogicalOr();if(this.optionalOperator("?")){var r=this.parsePipe(),n=void 0;if(this.optionalCharacter(fr))n=this.parsePipe();else{var i=this.inputIndex,o=this.input.substring(e,i);this.error("Conditional expression "+o+" requires all 3 expressions"),n=new Ct(this.span(e))}return new At(this.span(e),t,r,n)}return t},_ParseAST.prototype.parseLogicalOr=function(){for(var e=this.parseLogicalAnd();this.optionalOperator("||");){var t=this.parseLogicalAnd();e=new Lt(this.span(e.span.start),"||",e,t)}return e},_ParseAST.prototype.parseLogicalAnd=function(){for(var e=this.parseEquality();this.optionalOperator("&&");){var t=this.parseEquality();e=new Lt(this.span(e.span.start),"&&",e,t)}return e},_ParseAST.prototype.parseEquality=function(){for(var e=this.parseRelational();this.next.type==Ee.Operator;){var t=this.next.strValue;switch(t){case"==":case"===":case"!=":case"!==":this.advance();var r=this.parseRelational();e=new Lt(this.span(e.span.start),t,e,r);continue}break}return e},_ParseAST.prototype.parseRelational=function(){for(var e=this.parseAdditive();this.next.type==Ee.Operator;){var t=this.next.strValue;switch(t){case"<":case">":case"<=":case">=":this.advance();var r=this.parseAdditive();e=new Lt(this.span(e.span.start),t,e,r);continue}break}return e},_ParseAST.prototype.parseAdditive=function(){for(var e=this.parseMultiplicative();this.next.type==Ee.Operator;){var t=this.next.strValue;switch(t){case"+":case"-":this.advance();var r=this.parseMultiplicative();e=new Lt(this.span(e.span.start),t,e,r);continue}break}return e},_ParseAST.prototype.parseMultiplicative=function(){for(var e=this.parsePrefix();this.next.type==Ee.Operator;){var t=this.next.strValue;switch(t){case"*":case"%":case"/":this.advance();var r=this.parsePrefix();e=new Lt(this.span(e.span.start),t,e,r);continue}break}return e},_ParseAST.prototype.parsePrefix=function(){if(this.next.type==Ee.Operator){var e=this.inputIndex,t=this.next.strValue,r=void 0;switch(t){case"+":return this.advance(),this.parsePrefix();case"-":return this.advance(),r=this.parsePrefix(),new Lt(this.span(e),t,new Ot(new bt(e,e),0),r);case"!":return this.advance(),r=this.parsePrefix(),new Ft(this.span(e),r)}}return this.parseCallChain()},_ParseAST.prototype.parseCallChain=function(){for(var e=this.parsePrimary();;)if(this.optionalCharacter(pr))e=this.parseAccessMemberOrMethodCall(e,!1);else if(this.optionalOperator("?."))e=this.parseAccessMemberOrMethodCall(e,!0);else if(this.optionalCharacter(Ar)){this.rbracketsExpected++;var t=this.parsePipe();if(this.rbracketsExpected--,this.expectCharacter(Tr),this.optionalOperator("=")){var r=this.parseConditional();e=new Dt(this.span(e.span.start),e,t,r)}else e=new It(this.span(e.span.start),e,t)}else{if(!this.optionalCharacter(or))return e;this.rparensExpected++;var n=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(sr),e=new Ut(this.span(e.span.start),e,n)}},_ParseAST.prototype.parsePrimary=function(){var e=this.inputIndex;if(this.optionalCharacter(or)){this.rparensExpected++;var t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(sr),t}if(this.next.isKeywordNull())return this.advance(),new Ot(this.span(e),null);if(this.next.isKeywordUndefined())return this.advance(),new Ot(this.span(e),(void 0));if(this.next.isKeywordTrue())return this.advance(),new Ot(this.span(e),(!0));if(this.next.isKeywordFalse())return this.advance(),new Ot(this.span(e),(!1));if(this.next.isKeywordThis())return this.advance(),new St(this.span(e));if(this.optionalCharacter(Ar)){this.rbracketsExpected++;var r=this.parseExpressionList(Tr);return this.rbracketsExpected--,this.expectCharacter(Tr),new Vt(this.span(e),r)}if(this.next.isCharacter(Ur))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new St(this.span(e)),!1);if(this.next.isNumber()){var n=this.next.toNumber();return this.advance(),new Ot(this.span(e),n)}if(this.next.isString()){var i=this.next.toString();return this.advance(),new Ot(this.span(e),i)}return this.index>=this.tokens.length?(this.error("Unexpected end of expression: "+this.input),new Ct(this.span(e))):(this.error("Unexpected token "+this.next),new Ct(this.span(e)))},_ParseAST.prototype.parseExpressionList=function(e){var t=[];if(!this.next.isCharacter(e))do t.push(this.parsePipe());while(this.optionalCharacter(lr));return t},_ParseAST.prototype.parseLiteralMap=function(){var e=[],t=[],r=this.inputIndex;if(this.expectCharacter(Ur),!this.optionalCharacter(Hr)){this.rbracesExpected++;do{var n=this.expectIdentifierOrKeywordOrString();e.push(n),this.expectCharacter(fr),t.push(this.parsePipe())}while(this.optionalCharacter(lr));this.rbracesExpected--,this.expectCharacter(Hr)}return new Rt(this.span(r),e,t)},_ParseAST.prototype.parseAccessMemberOrMethodCall=function(e,t){void 0===t&&(t=!1);var r=e.span.start,n=this.expectIdentifierOrKeyword();if(this.optionalCharacter(or)){this.rparensExpected++;var i=this.parseCallArguments();this.expectCharacter(sr),this.rparensExpected--;var o=this.span(r);return t?new Bt(o,e,n,i):new jt(o,e,n,i)}if(t)return this.optionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new Ct(this.span(r))):new Mt(this.span(r),e,n);if(this.optionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new Ct(this.span(r));var s=this.parseConditional();return new Tt(this.span(r),e,n,s)}return new xt(this.span(r),e,n)},_ParseAST.prototype.parseCallArguments=function(){if(this.next.isCharacter(sr))return[];var e=[];do e.push(this.parsePipe());while(this.optionalCharacter(lr));return e},_ParseAST.prototype.expectTemplateBindingKey=function(){var e="",t=!1;do e+=this.expectIdentifierOrKeywordOrString(),t=this.optionalOperator("-"),t&&(e+="-");while(t);return e.toString()},_ParseAST.prototype.parseTemplateBindings=function(){for(var e=[],t=null,r=[];this.index<this.tokens.length;){var n=this.peekKeywordLet();n&&this.advance();var i=this.expectTemplateBindingKey();n||(null==t?t=i:i=t+i[0].toUpperCase()+i.substring(1)),this.optionalCharacter(fr);var o=null,s=null;if(n)o=this.optionalOperator("=")?this.expectTemplateBindingKey():"$implicit";else if(this.next!==Yr&&!this.peekKeywordLet()){var a=this.inputIndex,u=this.parsePipe(),l=this.input.substring(a,this.inputIndex);s=new Wt(u,l,this.location,this.errors)}e.push(new Ht(i,n,o,s)),this.optionalCharacter(dr)||this.optionalCharacter(lr)}return new rn(e,r,this.errors)},_ParseAST.prototype.error=function(e,t){void 0===t&&(t=null),this.errors.push(new _t(e,this.input,this.locationText(t),this.location)),this.skip()},_ParseAST.prototype.locationText=function(e){return void 0===e&&(e=null),isBlank(e)&&(e=this.index),e<this.tokens.length?"at column "+(this.tokens[e].index+1)+" in":"at the end of the expression"},_ParseAST.prototype.skip=function(){for(var e=this.next;this.index<this.tokens.length&&!e.isCharacter(dr)&&(this.rparensExpected<=0||!e.isCharacter(sr))&&(this.rbracesExpected<=0||!e.isCharacter(Hr))&&(this.rbracketsExpected<=0||!e.isCharacter(Tr));)this.next.isError()&&this.errors.push(new _t(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next},_ParseAST}(),sn=function(){function SimpleExpressionChecker(){this.simple=!0}return SimpleExpressionChecker.check=function(e){var t=new SimpleExpressionChecker;return e.visit(t),t.simple},SimpleExpressionChecker.prototype.visitImplicitReceiver=function(e,t){},SimpleExpressionChecker.prototype.visitInterpolation=function(e,t){this.simple=!1},SimpleExpressionChecker.prototype.visitLiteralPrimitive=function(e,t){},SimpleExpressionChecker.prototype.visitPropertyRead=function(e,t){},SimpleExpressionChecker.prototype.visitPropertyWrite=function(e,t){this.simple=!1},SimpleExpressionChecker.prototype.visitSafePropertyRead=function(e,t){this.simple=!1},SimpleExpressionChecker.prototype.visitMethodCall=function(e,t){this.simple=!1},SimpleExpressionChecker.prototype.visitSafeMethodCall=function(e,t){this.simple=!1},SimpleExpressionChecker.prototype.visitFunctionCall=function(e,t){this.simple=!1},SimpleExpressionChecker.prototype.visitLiteralArray=function(e,t){this.visitAll(e.expressions)},SimpleExpressionChecker.prototype.visitLiteralMap=function(e,t){this.visitAll(e.values)},SimpleExpressionChecker.prototype.visitBinary=function(e,t){this.simple=!1},SimpleExpressionChecker.prototype.visitPrefixNot=function(e,t){this.simple=!1},SimpleExpressionChecker.prototype.visitConditional=function(e,t){this.simple=!1},SimpleExpressionChecker.prototype.visitPipe=function(e,t){this.simple=!1},SimpleExpressionChecker.prototype.visitKeyedRead=function(e,t){this.simple=!1},SimpleExpressionChecker.prototype.visitKeyedWrite=function(e,t){this.simple=!1},SimpleExpressionChecker.prototype.visitAll=function(e){var t=this;return e.map(function(e){return e.visit(t)})},SimpleExpressionChecker.prototype.visitChain=function(e,t){this.simple=!1},SimpleExpressionChecker.prototype.visitQuote=function(e,t){this.simple=!1},SimpleExpressionChecker}(),an=function(){function ParseLocation(e,t,r,n){this.file=e,this.offset=t,this.line=r,this.col=n}return ParseLocation.prototype.toString=function(){return isPresent(this.offset)?this.file.url+"@"+this.line+":"+this.col:this.file.url},ParseLocation}(),un=function(){function ParseSourceFile(e,t){this.content=e,this.url=t}return ParseSourceFile}(),ln=function(){function ParseSourceSpan(e,t,r){void 0===r&&(r=null),this.start=e,this.end=t,this.details=r}return ParseSourceSpan.prototype.toString=function(){return this.start.file.content.substring(this.start.offset,this.end.offset)},ParseSourceSpan}();!function(e){e[e.WARNING=0]="WARNING",e[e.FATAL=1]="FATAL"}(Zr||(Zr={}));var cn,pn=function(){function ParseError(e,t,r){void 0===r&&(r=Zr.FATAL),this.span=e,this.msg=t,this.level=r}return ParseError.prototype.toString=function(){var e=this.span.start.file.content,t=this.span.start.offset,r="",n="";if(isPresent(t)){t>e.length-1&&(t=e.length-1);for(var i=t,o=0,s=0;o<100&&t>0&&(t--,o++,"\n"!=e[t]||3!=++s););for(o=0,s=0;o<100&&i<e.length-1&&(i++,o++,"\n"!=e[i]||3!=++s););var a=e.substring(t,this.span.start.offset)+"[ERROR ->]"+e.substring(this.span.start.offset,i+1);r=' ("'+a+'")'}return this.span.details&&(n=", "+this.span.details),""+this.msg+r+": "+this.span.start+n},ParseError}(),hn=function(){function Text(e,t){this.value=e,this.sourceSpan=t}return Text.prototype.visit=function(e,t){return e.visitText(this,t)},Text}(),dn=function(){function Expansion(e,t,r,n,i){this.switchValue=e,this.type=t,this.cases=r,this.sourceSpan=n,this.switchValueSourceSpan=i}return Expansion.prototype.visit=function(e,t){return e.visitExpansion(this,t)},Expansion}(),mn=function(){function ExpansionCase(e,t,r,n,i){this.value=e,this.expression=t,this.sourceSpan=r,this.valueSourceSpan=n,this.expSourceSpan=i}return ExpansionCase.prototype.visit=function(e,t){return e.visitExpansionCase(this,t)},ExpansionCase}(),yn=function(){function Attribute(e,t,r,n){this.name=e,this.value=t,this.sourceSpan=r,this.valueSpan=n}return Attribute.prototype.visit=function(e,t){return e.visitAttribute(this,t)},Attribute}(),vn=function(){function Element(e,t,r,n,i,o){this.name=e,this.attrs=t,this.children=r,this.sourceSpan=n,this.startSourceSpan=i,this.endSourceSpan=o}return Element.prototype.visit=function(e,t){return e.visitElement(this,t)},Element}(),gn=function(){function Comment(e,t){this.value=e,this.sourceSpan=t}return Comment.prototype.visit=function(e,t){return e.visitComment(this,t)},Comment}(),_n=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)};!function(e){e[e.TAG_OPEN_START=0]="TAG_OPEN_START",e[e.TAG_OPEN_END=1]="TAG_OPEN_END",e[e.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",e[e.TAG_CLOSE=3]="TAG_CLOSE",e[e.TEXT=4]="TEXT",e[e.ESCAPABLE_RAW_TEXT=5]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=6]="RAW_TEXT",e[e.COMMENT_START=7]="COMMENT_START",e[e.COMMENT_END=8]="COMMENT_END",e[e.CDATA_START=9]="CDATA_START",e[e.CDATA_END=10]="CDATA_END",e[e.ATTR_NAME=11]="ATTR_NAME",e[e.ATTR_VALUE=12]="ATTR_VALUE",e[e.DOC_TYPE=13]="DOC_TYPE",e[e.EXPANSION_FORM_START=14]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=15]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=16]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=17]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=18]="EXPANSION_FORM_END",e[e.EOF=19]="EOF"}(cn||(cn={}));var bn,wn=function(){function Token(e,t,r){this.type=e,this.parts=t,this.sourceSpan=r}return Token}(),En=function(e){function TokenError(t,r,n){e.call(this,n,t),this.tokenType=r}return _n(TokenError,e),TokenError}(pn),Cn=function(){function TokenizeResult(e,t){this.tokens=e,this.errors=t}return TokenizeResult}(),Sn=/\r\n?/g,Pn=function(){function _ControlFlowError(e){this.error=e}return _ControlFlowError}(),An=function(){function _Tokenizer(e,t,r,n){void 0===n&&(n=Qr),this._file=e,this._getTagDefinition=t,this._tokenizeIcu=r,this._interpolationConfig=n,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=e.content,this._length=e.content.length,this._advance()}return _Tokenizer.prototype._processCarriageReturns=function(e){return e.replace(Sn,"\n")},_Tokenizer.prototype.tokenize=function(){for(;this._peek!==zt;){var e=this._getLocation();try{this._attemptCharCode(mr)?this._attemptCharCode(Jt)?this._attemptCharCode(Ar)?this._consumeCdata(e):this._attemptCharCode(cr)?this._consumeComment(e):this._consumeDocType(e):this._attemptCharCode(hr)?this._consumeTagClose(e):this._consumeTagOpen(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(t){if(!(t instanceof Pn))throw t;this.errors.push(t.error)}}return this._beginToken(cn.EOF),this._endToken([]),new Cn(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===Hr){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1},_Tokenizer.prototype._getLocation=function(){return new an(this._file,this._index,this._line,this._column)},_Tokenizer.prototype._getSpan=function(e,t){return void 0===e&&(e=this._getLocation()),void 0===t&&(t=this._getLocation()),new ln(e,t)},_Tokenizer.prototype._beginToken=function(e,t){void 0===t&&(t=this._getLocation()),this._currentTokenStart=t,this._currentTokenType=e},_Tokenizer.prototype._endToken=function(e,t){void 0===t&&(t=this._getLocation());var r=new wn(this._currentTokenType,e,new ln(this._currentTokenStart,t));return this.tokens.push(r),this._currentTokenStart=null,this._currentTokenType=null,r},_Tokenizer.prototype._createError=function(e,t){this._isInExpansionForm()&&(e+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');var r=new En(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new Pn(r)},_Tokenizer.prototype._advance=function(){if(this._index>=this._length)throw this._createError(_unexpectedCharacterErrorMsg(zt),this._getSpan());this._peek===Kt?(this._line++,this._column=0):this._peek!==Kt&&this._peek!==Xt&&this._column++,this._index++,this._peek=this._index>=this._length?zt:this._input.charCodeAt(this._index),this._nextPeek=this._index+1>=this._length?zt:this._input.charCodeAt(this._index+1)},_Tokenizer.prototype._attemptCharCode=function(e){return this._peek===e&&(this._advance(),!0)},_Tokenizer.prototype._attemptCharCodeCaseInsensitive=function(e){return!!compareCharCodeCaseInsensitive(this._peek,e)&&(this._advance(),!0)},_Tokenizer.prototype._requireCharCode=function(e){var t=this._getLocation();if(!this._attemptCharCode(e))throw this._createError(_unexpectedCharacterErrorMsg(this._peek),this._getSpan(t,t))},_Tokenizer.prototype._attemptStr=function(e){var t=e.length;if(this._index+t>this._length)return!1;for(var r=this._savePosition(),n=0;n<t;n++)if(!this._attemptCharCode(e.charCodeAt(n)))return this._restorePosition(r),!1;return!0},_Tokenizer.prototype._attemptStrCaseInsensitive=function(e){for(var t=0;t<e.length;t++)if(!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t)))return!1;return!0},_Tokenizer.prototype._requireStr=function(e){var t=this._getLocation();if(!this._attemptStr(e))throw this._createError(_unexpectedCharacterErrorMsg(this._peek),this._getSpan(t))},_Tokenizer.prototype._attemptCharCodeUntilFn=function(e){for(;!e(this._peek);)this._advance()},_Tokenizer.prototype._requireCharCodeUntilFn=function(e,t){var r=this._getLocation();if(this._attemptCharCodeUntilFn(e),this._index-r.offset<t)throw this._createError(_unexpectedCharacterErrorMsg(this._peek),this._getSpan(r,r))},_Tokenizer.prototype._attemptUntilChar=function(e){for(;this._peek!==e;)this._advance()},_Tokenizer.prototype._readChar=function(e){if(e&&this._peek===nr)return this._decodeEntity();var t=this._index;return this._advance(),this._input[t]},_Tokenizer.prototype._decodeEntity=function(){var e=this._getLocation();if(this._advance(),!this._attemptCharCode(er)){var t=this._savePosition();if(this._attemptCharCodeUntilFn(isNamedEntityEnd),this._peek!=dr)return this._restorePosition(t),"&";this._advance();var r=this._input.substring(e.offset+1,this._index-1),n=T[r];if(!n)throw this._createError(_unknownEntityErrorMsg(r),this._getSpan(e));return n}var i=this._attemptCharCode(jr)||this._attemptCharCode(Sr),o=this._getLocation().offset;if(this._attemptCharCodeUntilFn(isDigitEntityEnd),this._peek!=dr)throw this._createError(_unexpectedCharacterErrorMsg(this._peek),this._getSpan());this._advance();var s=this._input.substring(o,this._index-1);try{var a=parseInt(s,i?16:10);return String.fromCharCode(a)}catch(u){var l=this._input.substring(e.offset+1,this._index-1);throw this._createError(_unknownEntityErrorMsg(l),this._getSpan(e))}},_Tokenizer.prototype._consumeRawText=function(e,t,r){var n,i=this._getLocation();this._beginToken(e?cn.ESCAPABLE_RAW_TEXT:cn.RAW_TEXT,i);for(var o=[];;){if(n=this._getLocation(),this._attemptCharCode(t)&&r())break;for(this._index>n.offset&&o.push(this._input.substring(n.offset,this._index));this._peek!==t;)o.push(this._readChar(e))}return this._endToken([this._processCarriageReturns(o.join(""))],n)},_Tokenizer.prototype._consumeComment=function(e){var t=this;this._beginToken(cn.COMMENT_START,e),this._requireCharCode(cr),this._endToken([]);var r=this._consumeRawText(!1,cr,function(){return t._attemptStr("->")});this._beginToken(cn.COMMENT_END,r.sourceSpan.end),this._endToken([])},_Tokenizer.prototype._consumeCdata=function(e){var t=this;this._beginToken(cn.CDATA_START,e),this._requireStr("CDATA["),this._endToken([]);var r=this._consumeRawText(!1,Tr,function(){return t._attemptStr("]>")});this._beginToken(cn.CDATA_END,r.sourceSpan.end),this._endToken([])},_Tokenizer.prototype._consumeDocType=function(e){this._beginToken(cn.DOC_TYPE,e),this._attemptUntilChar(vr),this._advance(),this._endToken([this._input.substring(e.offset+2,this._index-1)])},_Tokenizer.prototype._consumePrefixAndName=function(){for(var e=this._index,t=null;this._peek!==fr&&!isPrefixEnd(this._peek);)this._advance();var r;this._peek===fr?(this._advance(),t=this._input.substring(e,this._index-1),r=this._index):r=e,this._requireCharCodeUntilFn(isNameEnd,this._index===r?1:0);var n=this._input.substring(r,this._index);return[t,n]},_Tokenizer.prototype._consumeTagOpen=function(e){var t,r,n=this._savePosition();try{if(!isAsciiLetter(this._peek))throw this._createError(_unexpectedCharacterErrorMsg(this._peek),this._getSpan());var i=this._index;for(this._consumeTagOpenStart(e),t=this._input.substring(i,this._index),r=t.toLowerCase(),this._attemptCharCodeUntilFn(isNotWhitespace);this._peek!==hr&&this._peek!==vr;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(isNotWhitespace),this._attemptCharCode(yr)&&(this._attemptCharCodeUntilFn(isNotWhitespace),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(isNotWhitespace);this._consumeTagOpenEnd()}catch(o){if(o instanceof Pn)return this._restorePosition(n),this._beginToken(cn.TEXT,e),void this._endToken(["<"]);throw o}var s=this._getTagDefinition(t).contentType;s===g.RAW_TEXT?this._consumeRawTextWithTagClose(r,!1):s===g.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(r,!0)},_Tokenizer.prototype._consumeRawTextWithTagClose=function(e,t){var r=this,n=this._consumeRawText(t,mr,function(){return!!r._attemptCharCode(hr)&&(r._attemptCharCodeUntilFn(isNotWhitespace),!!r._attemptStrCaseInsensitive(e)&&(r._attemptCharCodeUntilFn(isNotWhitespace),r._attemptCharCode(vr)))});this._beginToken(cn.TAG_CLOSE,n.sourceSpan.end),this._endToken([null,e])},_Tokenizer.prototype._consumeTagOpenStart=function(e){this._beginToken(cn.TAG_OPEN_START,e);var t=this._consumePrefixAndName();this._endToken(t)},_Tokenizer.prototype._consumeAttributeName=function(){this._beginToken(cn.ATTR_NAME);var e=this._consumePrefixAndName();this._endToken(e)},_Tokenizer.prototype._consumeAttributeValue=function(){this._beginToken(cn.ATTR_VALUE);var e;if(this._peek===ir||this._peek===Yt){var t=this._peek;this._advance();for(var r=[];this._peek!==t;)r.push(this._readChar(!0));e=r.join(""),this._advance()}else{var n=this._index;this._requireCharCodeUntilFn(isNameEnd,1),e=this._input.substring(n,this._index)}this._endToken([this._processCarriageReturns(e)])},_Tokenizer.prototype._consumeTagOpenEnd=function(){var e=this._attemptCharCode(hr)?cn.TAG_OPEN_END_VOID:cn.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(vr),this._endToken([])},_Tokenizer.prototype._consumeTagClose=function(e){this._beginToken(cn.TAG_CLOSE,e),this._attemptCharCodeUntilFn(isNotWhitespace);var t=this._consumePrefixAndName();this._attemptCharCodeUntilFn(isNotWhitespace),this._requireCharCode(vr),this._endToken(t)},_Tokenizer.prototype._consumeExpansionFormStart=function(){this._beginToken(cn.EXPANSION_FORM_START,this._getLocation()),this._requireCharCode(Ur),this._endToken([]),this._expansionCaseStack.push(cn.EXPANSION_FORM_START),this._beginToken(cn.RAW_TEXT,this._getLocation());var e=this._readUntil(lr);this._endToken([e],this._getLocation()),this._requireCharCode(lr),this._attemptCharCodeUntilFn(isNotWhitespace),this._beginToken(cn.RAW_TEXT,this._getLocation());var t=this._readUntil(lr);this._endToken([t],this._getLocation()),this._requireCharCode(lr),this._attemptCharCodeUntilFn(isNotWhitespace)},_Tokenizer.prototype._consumeExpansionCaseStart=function(){this._beginToken(cn.EXPANSION_CASE_VALUE,this._getLocation());var e=this._readUntil(Ur).trim();this._endToken([e],this._getLocation()),this._attemptCharCodeUntilFn(isNotWhitespace),this._beginToken(cn.EXPANSION_CASE_EXP_START,this._getLocation()),this._requireCharCode(Ur),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(isNotWhitespace),this._expansionCaseStack.push(cn.EXPANSION_CASE_EXP_START)},_Tokenizer.prototype._consumeExpansionCaseEnd=function(){this._beginToken(cn.EXPANSION_CASE_EXP_END,this._getLocation()),this._requireCharCode(Hr),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(isNotWhitespace),this._expansionCaseStack.pop()},_Tokenizer.prototype._consumeExpansionFormEnd=function(){this._beginToken(cn.EXPANSION_FORM_END,this._getLocation()),this._requireCharCode(Hr),this._endToken([]),this._expansionCaseStack.pop()},_Tokenizer.prototype._consumeText=function(){var e=this._getLocation();this._beginToken(cn.TEXT,e);var t=[];do this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(t.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._attemptStr(this._interpolationConfig.end)&&this._inInterpolation?(t.push(this._interpolationConfig.end),this._inInterpolation=!1):t.push(this._readChar(!0));while(!this._isTextEnd());this._endToken([this._processCarriageReturns(t.join(""))])},_Tokenizer.prototype._isTextEnd=function(){if(this._peek===mr||this._peek===zt)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(isExpansionFormStart(this._input,this._index,this._interpolationConfig))return!0;if(this._peek===Hr&&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(e){var t=this._index;return this._attemptUntilChar(e),this._input.substring(t,this._index)},_Tokenizer.prototype._restorePosition=function(e){this._peek=e[0],this._index=e[1],this._column=e[2],this._line=e[3];var t=e[4];t<this.tokens.length&&(this.tokens=this.tokens.slice(0,t))},_Tokenizer.prototype._isInExpansionCase=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===cn.EXPANSION_CASE_EXP_START},_Tokenizer.prototype._isInExpansionForm=function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===cn.EXPANSION_FORM_START},_Tokenizer}(),xn=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},Tn=function(e){function TreeError(t,r,n){e.call(this,r,n),this.elementName=t}return xn(TreeError,e),TreeError.create=function(e,t,r){return new TreeError(e,t,r)},TreeError}(pn),Mn=function(){function ParseTreeResult(e,t){this.rootNodes=e,this.errors=t}return ParseTreeResult}(),In=function(){function Parser(e){this.getTagDefinition=e}return Parser.prototype.parse=function(e,t,r,n){void 0===r&&(r=!1),void 0===n&&(n=Qr);var i=tokenize(e,t,this.getTagDefinition,r,n),o=new Dn(i.tokens,this.getTagDefinition).build();return new Mn(o.rootNodes,i.errors.concat(o.errors))},Parser}(),Dn=function(){function _TreeBuilder(e,t){this.tokens=e,this.getTagDefinition=t,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}return _TreeBuilder.prototype.build=function(){for(;this._peek.type!==cn.EOF;)this._peek.type===cn.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===cn.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===cn.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===cn.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===cn.TEXT||this._peek.type===cn.RAW_TEXT||this._peek.type===cn.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===cn.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance();return new Mn(this._rootNodes,this._errors)},_TreeBuilder.prototype._advance=function(){var e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e},_TreeBuilder.prototype._advanceIf=function(e){return this._peek.type===e?this._advance():null},_TreeBuilder.prototype._consumeCdata=function(e){this._consumeText(this._advance()),this._advanceIf(cn.CDATA_END)},_TreeBuilder.prototype._consumeComment=function(e){var t=this._advanceIf(cn.RAW_TEXT);this._advanceIf(cn.COMMENT_END);var r=isPresent(t)?t.parts[0].trim():null;this._addToParent(new gn(r,e.sourceSpan))},_TreeBuilder.prototype._consumeExpansion=function(e){for(var t=this._advance(),r=this._advance(),n=[];this._peek.type===cn.EXPANSION_CASE_VALUE;){var i=this._parseExpansionCase();if(!i)return;n.push(i)}if(this._peek.type!==cn.EXPANSION_FORM_END)return void this._errors.push(Tn.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."));var o=new ln(e.sourceSpan.start,this._peek.sourceSpan.end);this._addToParent(new dn(t.parts[0],r.parts[0],n,o,t.sourceSpan)),this._advance()},_TreeBuilder.prototype._parseExpansionCase=function(){var e=this._advance();if(this._peek.type!==cn.EXPANSION_CASE_EXP_START)return this._errors.push(Tn.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;var t=this._advance(),r=this._collectExpansionExpTokens(t);if(!r)return null;var n=this._advance();r.push(new wn(cn.EOF,[],n.sourceSpan));var i=new _TreeBuilder(r,this.getTagDefinition).build();if(i.errors.length>0)return this._errors=this._errors.concat(i.errors),null;var o=new ln(e.sourceSpan.start,n.sourceSpan.end),s=new ln(t.sourceSpan.start,n.sourceSpan.end);return new mn(e.parts[0],i.rootNodes,o,e.sourceSpan,s)},_TreeBuilder.prototype._collectExpansionExpTokens=function(e){for(var t=[],r=[cn.EXPANSION_CASE_EXP_START];;){if(this._peek.type!==cn.EXPANSION_FORM_START&&this._peek.type!==cn.EXPANSION_CASE_EXP_START||r.push(this._peek.type),this._peek.type===cn.EXPANSION_CASE_EXP_END){if(!lastOnStack(r,cn.EXPANSION_CASE_EXP_START))return this._errors.push(Tn.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),
null;if(r.pop(),0==r.length)return t}if(this._peek.type===cn.EXPANSION_FORM_END){if(!lastOnStack(r,cn.EXPANSION_FORM_START))return this._errors.push(Tn.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;r.pop()}if(this._peek.type===cn.EOF)return this._errors.push(Tn.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}},_TreeBuilder.prototype._consumeText=function(e){var t=e.parts[0];if(t.length>0&&"\n"==t[0]){var r=this._getParentElement();isPresent(r)&&0==r.children.length&&this.getTagDefinition(r.name).ignoreFirstLf&&(t=t.substring(1))}t.length>0&&this._addToParent(new hn(t,e.sourceSpan))},_TreeBuilder.prototype._closeVoidElement=function(){if(this._elementStack.length>0){var e=A.last(this._elementStack);this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()}},_TreeBuilder.prototype._consumeStartTag=function(e){for(var t=e.parts[0],r=e.parts[1],n=[];this._peek.type===cn.ATTR_NAME;)n.push(this._consumeAttr(this._advance()));var i=this._getElementFullName(t,r,this._getParentElement()),o=!1;if(this._peek.type===cn.TAG_OPEN_END_VOID){this._advance(),o=!0;var s=this.getTagDefinition(i);s.canSelfClose||null!==getNsPrefix(i)||s.isVoid||this._errors.push(Tn.create(i,e.sourceSpan,'Only void and foreign elements can be self closed "'+e.parts[1]+'"'))}else this._peek.type===cn.TAG_OPEN_END&&(this._advance(),o=!1);var a=this._peek.sourceSpan.start,u=new ln(e.sourceSpan.start,a),l=new vn(i,n,[],u,u,null);this._pushElement(l),o&&(this._popElement(i),l.endSourceSpan=u)},_TreeBuilder.prototype._pushElement=function(e){if(this._elementStack.length>0){var t=A.last(this._elementStack);this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop()}var r=this.getTagDefinition(e.name),n=this._getParentElementSkippingContainers(),i=n.parent,o=n.container;if(isPresent(i)&&r.requireExtraParent(i.name)){var s=new vn(r.parentToAdd,[],[],e.sourceSpan,e.startSourceSpan,e.endSourceSpan);this._insertBeforeContainer(i,o,s)}this._addToParent(e),this._elementStack.push(e)},_TreeBuilder.prototype._consumeEndTag=function(e){var t=this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());this._getParentElement()&&(this._getParentElement().endSourceSpan=e.sourceSpan),this.getTagDefinition(t).isVoid?this._errors.push(Tn.create(t,e.sourceSpan,'Void elements do not have end tags "'+e.parts[1]+'"')):this._popElement(t)||this._errors.push(Tn.create(t,e.sourceSpan,'Unexpected closing tag "'+e.parts[1]+'"'))},_TreeBuilder.prototype._popElement=function(e){for(var t=this._elementStack.length-1;t>=0;t--){var r=this._elementStack[t];if(r.name==e)return A.splice(this._elementStack,t,this._elementStack.length-t),!0;if(!this.getTagDefinition(r.name).closedByParent)return!1}return!1},_TreeBuilder.prototype._consumeAttr=function(e){var t,r=mergeNsAndName(e.parts[0],e.parts[1]),n=e.sourceSpan.end,i="";if(this._peek.type===cn.ATTR_VALUE){var o=this._advance();i=o.parts[0],n=o.sourceSpan.end,t=o.sourceSpan}return new yn(r,i,new ln(e.sourceSpan.start,n),t)},_TreeBuilder.prototype._getParentElement=function(){return this._elementStack.length>0?A.last(this._elementStack):null},_TreeBuilder.prototype._getParentElementSkippingContainers=function(){for(var e=null,t=this._elementStack.length-1;t>=0;t--){if("ng-container"!==this._elementStack[t].name)return{parent:this._elementStack[t],container:e};e=this._elementStack[t]}return{parent:A.last(this._elementStack),container:e}},_TreeBuilder.prototype._addToParent=function(e){var t=this._getParentElement();isPresent(t)?t.children.push(e):this._rootNodes.push(e)},_TreeBuilder.prototype._insertBeforeContainer=function(e,t,r){if(t){if(e){var n=e.children.indexOf(t);e.children[n]=r}else this._rootNodes.push(r);r.children.push(t),this._elementStack.splice(this._elementStack.indexOf(t),0,r)}else this._addToParent(r),this._elementStack.push(r)},_TreeBuilder.prototype._getElementFullName=function(e,t,r){return isBlank(e)&&(e=this.getTagDefinition(t).implicitNamespacePrefix,isBlank(e)&&isPresent(r)&&(e=getNsPrefix(r.name))),mergeNsAndName(e,t)},_TreeBuilder}(),Nn=function(){function _SerializerVisitor(){}return _SerializerVisitor.prototype.visitText=function(e,t){return e.value},_SerializerVisitor.prototype.visitContainer=function(e,t){var r=this;return"["+e.children.map(function(e){return e.visit(r)}).join(", ")+"]"},_SerializerVisitor.prototype.visitIcu=function(e,t){var r=this,n=Object.keys(e.cases).map(function(t){return t+" {"+e.cases[t].visit(r)+"}"});return"{"+e.expression+", "+e.type+", "+n.join(", ")+"}"},_SerializerVisitor.prototype.visitTagPlaceholder=function(e,t){var r=this;return e.isVoid?'<ph tag name="'+e.startName+'"/>':'<ph tag name="'+e.startName+'">'+e.children.map(function(e){return e.visit(r)}).join(", ")+'</ph name="'+e.closeName+'">'},_SerializerVisitor.prototype.visitPlaceholder=function(e,t){return'<ph name="'+e.name+'">'+e.value+"</ph>"},_SerializerVisitor.prototype.visitIcuPlaceholder=function(e,t){return'<ph icu name="'+e.name+'">'+e.value.visit(this)+"</ph>"},_SerializerVisitor}(),On=new Nn,Vn=function(){function Message(e,t,r,n,i){this.nodes=e,this.placeholders=t,this.placeholderToMsgIds=r,this.meaning=n,this.description=i}return Message}(),Rn=function(){function Text(e,t){this.value=e,this.sourceSpan=t}return Text.prototype.visit=function(e,t){return e.visitText(this,t)},Text}(),kn=function(){function Container(e,t){this.children=e,this.sourceSpan=t}return Container.prototype.visit=function(e,t){return e.visitContainer(this,t)},Container}(),Ln=function(){function Icu(e,t,r,n){this.expression=e,this.type=t,this.cases=r,this.sourceSpan=n}return Icu.prototype.visit=function(e,t){return e.visitIcu(this,t)},Icu}(),Fn=function(){function TagPlaceholder(e,t,r,n,i,o,s){this.tag=e,this.attrs=t,this.startName=r,this.closeName=n,this.children=i,this.isVoid=o,this.sourceSpan=s}return TagPlaceholder.prototype.visit=function(e,t){return e.visitTagPlaceholder(this,t)},TagPlaceholder}(),jn=function(){function Placeholder(e,t,r){void 0===t&&(t=""),this.value=e,this.name=t,this.sourceSpan=r}return Placeholder.prototype.visit=function(e,t){return e.visitPlaceholder(this,t)},Placeholder}(),Bn=function(){function IcuPlaceholder(e,t,r){void 0===t&&(t=""),this.value=e,this.name=t,this.sourceSpan=r}return IcuPlaceholder.prototype.visit=function(e,t){return e.visitIcuPlaceholder(this,t)},IcuPlaceholder}(),Un={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"},Wn=function(){function PlaceholderRegistry(){this._placeHolderNameCounts={},this._signatureToName={}}return PlaceholderRegistry.prototype.getStartTagPlaceholderName=function(e,t,r){var n=this._hashTag(e,t,r);if(this._signatureToName[n])return this._signatureToName[n];var i=e.toUpperCase(),o=Un[i]||"TAG_"+i,s=this._generateUniqueName(r?o:"START_"+o);return this._signatureToName[n]=s,s},PlaceholderRegistry.prototype.getCloseTagPlaceholderName=function(e){var t=this._hashClosingTag(e);if(this._signatureToName[t])return this._signatureToName[t];var r=e.toUpperCase(),n=Un[r]||"TAG_"+r,i=this._generateUniqueName("CLOSE_"+n);return this._signatureToName[t]=i,i},PlaceholderRegistry.prototype.getPlaceholderName=function(e,t){var r=e.toUpperCase(),n="PH: "+r+"="+t;if(this._signatureToName[n])return this._signatureToName[n];var i=this._generateUniqueName(r);return this._signatureToName[n]=i,i},PlaceholderRegistry.prototype._hashTag=function(e,t,r){var n="<"+e,i=Object.keys(t).sort().map(function(e){return" "+e+"="+t[e]}).join(""),o=r?"/>":"></"+e+">";return n+i+o},PlaceholderRegistry.prototype._hashClosingTag=function(e){return this._hashTag("/"+e,{},!1)},PlaceholderRegistry.prototype._generateUniqueName=function(e){var t=e,r=this._placeHolderNameCounts[t];return r?(t+="_"+r,r++):r=1,this._placeHolderNameCounts[e]=r,t},PlaceholderRegistry}(),Hn=new nn(new $r),Gn=function(){function _I18nVisitor(e,t){this._expressionParser=e,this._interpolationConfig=t}return _I18nVisitor.prototype.toI18nMessage=function(e,t,r){this._isIcu=1==e.length&&e[0]instanceof dn,this._icuDepth=0,this._placeholderRegistry=new Wn,this._placeholderToContent={},this._placeholderToIds={};var n=visitAll(this,e,{});return new Vn(n,this._placeholderToContent,this._placeholderToIds,t,r)},_I18nVisitor.prototype.visitElement=function(e,t){var r=visitAll(this,e.children),n={};e.attrs.forEach(function(e){n[e.name]=e.value});var i=getHtmlTagDefinition(e.name).isVoid,o=this._placeholderRegistry.getStartTagPlaceholderName(e.name,n,i);this._placeholderToContent[o]=e.sourceSpan.toString();var s="";return i||(s=this._placeholderRegistry.getCloseTagPlaceholderName(e.name),this._placeholderToContent[s]="</"+e.name+">"),new Fn(e.name,n,o,s,r,i,e.sourceSpan)},_I18nVisitor.prototype.visitAttribute=function(e,t){return this._visitTextWithInterpolation(e.value,e.sourceSpan)},_I18nVisitor.prototype.visitText=function(e,t){return this._visitTextWithInterpolation(e.value,e.sourceSpan)},_I18nVisitor.prototype.visitComment=function(e,t){return null},_I18nVisitor.prototype.visitExpansion=function(e,t){var r=this;this._icuDepth++;var n={},i=new Ln(e.switchValue,e.type,n,e.sourceSpan);if(e.cases.forEach(function(e){n[e.value]=new kn(e.expression.map(function(e){return e.visit(r,{})}),e.expSourceSpan)}),this._icuDepth--,this._isIcu||this._icuDepth>0)return i;var o=this._placeholderRegistry.getPlaceholderName("ICU",e.sourceSpan.toString()),s=new _I18nVisitor(this._expressionParser,this._interpolationConfig);return this._placeholderToIds[o]=digestMessage(s.toI18nMessage([e],"","")),new Bn(i,o,e.sourceSpan)},_I18nVisitor.prototype.visitExpansionCase=function(e,t){throw new Error("Unreachable code")},_I18nVisitor.prototype._visitTextWithInterpolation=function(e,t){var r=this._expressionParser.splitInterpolation(e,t.start.toString(),this._interpolationConfig);if(!r)return new Rn(e,t);for(var n=[],i=new kn(n,t),o=this._interpolationConfig,s=o.start,a=o.end,u=0;u<r.strings.length-1;u++){var l=r.expressions[u],c=_extractPlaceholderName(l)||"INTERPOLATION",p=this._placeholderRegistry.getPlaceholderName(c,l);r.strings[u].length&&n.push(new Rn(r.strings[u],t)),n.push(new jn(l,p,t)),this._placeholderToContent[p]=s+l+a}var h=r.strings.length-1;return r.strings[h].length&&n.push(new Rn(r.strings[h],t)),i},_I18nVisitor}(),zn=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*"([\s\S]*?)"[\s\S]*\)/g,qn=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},Kn=function(e){function I18nError(t,r){e.call(this,t,r)}return qn(I18nError,e),I18nError}(pn),Qn="i18n",Zn="i18n-",Xn=/^i18n:?/,$n=function(){function ExtractionResult(e,t){this.messages=e,this.errors=t}return ExtractionResult}();!function(e){e[e.Extract=0]="Extract",e[e.Merge=1]="Merge"}(bn||(bn={}));var Jn,Yn=function(){function _Visitor(e,t){this._implicitTags=e,this._implicitAttrs=t}return _Visitor.prototype.extract=function(e,t){var r=this;return this._init(bn.Extract,t),e.forEach(function(e){return e.visit(r,null)}),this._inI18nBlock&&this._reportError(e[e.length-1],"Unclosed block"),new $n(this._messages,this._errors)},_Visitor.prototype.merge=function(e,t,r){this._init(bn.Merge,r),this._translations=t;var n=new vn("wrapper",[],e,null,null,null),i=n.visit(this,null);return this._inI18nBlock&&this._reportError(e[e.length-1],"Unclosed block"),new Mn(i.children,this._errors)},_Visitor.prototype.visitExpansionCase=function(e,t){var r=visitAll(this,e.expression,t);if(this._mode===bn.Merge)return new mn(e.value,r,e.sourceSpan,e.valueSourceSpan,e.expSourceSpan)},_Visitor.prototype.visitExpansion=function(e,t){this._mayBeAddBlockChildren(e);var r=this._inIcu;this._inIcu||(this._isInTranslatableSection&&this._addMessage([e]),this._inIcu=!0);var n=visitAll(this,e.cases,t);return this._mode===bn.Merge&&(e=new dn(e.switchValue,e.type,n,e.sourceSpan,e.switchValueSourceSpan)),this._inIcu=r,e},_Visitor.prototype.visitComment=function(e,t){var r=_isOpeningComment(e);if(r&&this._isInTranslatableSection)return void this._reportError(e,"Could not start a block inside a translatable section");var n=_isClosingComment(e);if(n&&!this._inI18nBlock)return void this._reportError(e,"Trying to close an unopened block");if(!this._inI18nNode&&!this._inIcu)if(this._inI18nBlock){if(n){if(this._depth==this._blockStartDepth){this._closeTranslatableSection(e,this._blockChildren),this._inI18nBlock=!1;var i=this._addMessage(this._blockChildren,this._blockMeaningAndDesc),o=this._translateMessage(e,i);return visitAll(this,o)}return void this._reportError(e,"I18N blocks should not cross element boundaries")}}else r&&(this._inI18nBlock=!0,this._blockStartDepth=this._depth,this._blockChildren=[],this._blockMeaningAndDesc=e.value.replace(Xn,"").trim(),this._openTranslatableSection(e))},_Visitor.prototype.visitText=function(e,t){return this._isInTranslatableSection&&this._mayBeAddBlockChildren(e),e},_Visitor.prototype.visitElement=function(e,t){var r=this;this._mayBeAddBlockChildren(e),this._depth++;var n,i=this._inI18nNode,o=this._inImplicitNode,s=_getI18nAttr(e),a=this._implicitTags.some(function(t){return e.name===t})&&!this._inIcu&&!this._isInTranslatableSection,u=!o&&a;if(this._inImplicitNode=this._inImplicitNode||a,this._isInTranslatableSection||this._inIcu)(s||u)&&this._reportError(e,"Could not mark an element as translatable inside a translatable section"),this._mode==bn.Extract&&visitAll(this,e.children),this._mode==bn.Merge&&(n=[],e.children.forEach(function(e){var i=e.visit(r,t);i&&!r._isInTranslatableSection&&(n=n.concat(i))}));else{if(s){this._inI18nNode=!0;var l=this._addMessage(e.children,s.value);n=this._translateMessage(e,l)}else if(u){this._inI18nNode=!0;var l=this._addMessage(e.children);n=this._translateMessage(e,l)}if(this._mode==bn.Extract){var c=s||u;c&&this._openTranslatableSection(e),visitAll(this,e.children),c&&this._closeTranslatableSection(e,e.children)}this._mode!==bn.Merge||s||u||(n=[],e.children.forEach(function(e){var i=e.visit(r,t);i&&!r._isInTranslatableSection&&(n=n.concat(i))}))}if(this._visitAttributesOf(e),this._depth--,this._inI18nNode=i,this._inImplicitNode=o,this._mode===bn.Merge){var p=this._translateAttributes(e);return new vn(e.name,p,n,e.sourceSpan,e.startSourceSpan,e.endSourceSpan)}},_Visitor.prototype.visitAttribute=function(e,t){throw new Error("unreachable code")},_Visitor.prototype._init=function(e,t){this._mode=e,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(t)},_Visitor.prototype._visitAttributesOf=function(e){var t=this,r={},n=this._implicitAttrs[e.name]||[];e.attrs.filter(function(e){return e.name.startsWith(Zn)}).forEach(function(e){return r[e.name.slice(Zn.length)]=e.value}),e.attrs.forEach(function(e){e.name in r?t._addMessage([e],r[e.name]):n.some(function(t){return e.name===t})&&t._addMessage([e])})},_Visitor.prototype._addMessage=function(e,t){if(!(0==e.length||1==e.length&&e[0]instanceof yn&&!e[0].value)){var r=_splitMeaningAndDesc(t),n=r[0],i=r[1],o=this._createI18nMessage(e,n,i);return this._messages.push(o),o}},_Visitor.prototype._translateMessage=function(e,t){if(t&&this._mode===bn.Merge){var r=digestMessage(t),n=this._translations.get(r);if(n)return n;this._reportError(e,'Translation unavailable for message id="'+r+'"')}return[]},_Visitor.prototype._translateAttributes=function(e){var t=this,r=e.attrs,n={};r.forEach(function(e){e.name.startsWith(Zn)&&(n[e.name.slice(Zn.length)]=_splitMeaningAndDesc(e.value)[0])});var i=[];return r.forEach(function(r){if(r.name!==Qn&&!r.name.startsWith(Zn))if(r.value&&""!=r.value&&n.hasOwnProperty(r.name)){var o=n[r.name],s=t._createI18nMessage([r],o,""),a=digestMessage(s),u=t._translations.get(a);if(u)if(u[0]instanceof hn){var l=u[0].value;i.push(new yn(r.name,l,r.sourceSpan))}else t._reportError(e,'Unexpected translation for attribute "'+r.name+'" (id="'+a+'")');else t._reportError(e,'Translation unavailable for attribute "'+r.name+'" (id="'+a+'")')}else i.push(r)}),i},_Visitor.prototype._mayBeAddBlockChildren=function(e){this._inI18nBlock&&!this._inIcu&&this._depth==this._blockStartDepth&&this._blockChildren.push(e)},_Visitor.prototype._openTranslatableSection=function(e){this._isInTranslatableSection?this._reportError(e,"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(e,t){if(!this._isInTranslatableSection)return void this._reportError(e,"Unexpected section end");var r=this._msgCountAtSectionStart,n=t.reduce(function(e,t){return e+(t instanceof gn?0:1)},0);if(1==n)for(var i=this._messages.length-1;i>=r;i--){var o=this._messages[i].nodes;if(!(1==o.length&&o[0]instanceof Rn)){this._messages.splice(i,1);break}}this._msgCountAtSectionStart=void 0},_Visitor.prototype._reportError=function(e,t){this._errors.push(new Kn(e.sourceSpan,t))},_Visitor}(),ei=function(){function MessageBundle(e,t,r){this._htmlParser=e,this._implicitTags=t,this._implicitAttrs=r,this._messageMap={}}return MessageBundle.prototype.updateFromTemplate=function(e,t,r){var n=this,i=this._htmlParser.parse(e,t,!0,r);if(i.errors.length)return i.errors;var o=extractMessages(i.rootNodes,r,this._implicitTags,this._implicitAttrs);return o.errors.length?o.errors:void o.messages.forEach(function(e){n._messageMap[digestMessage(e)]=e})},MessageBundle.prototype.getMessageMap=function(){return this._messageMap},MessageBundle.prototype.write=function(e){return e.write(this._messageMap)},MessageBundle}(),ti=function(){function XmlTagDefinition(){this.closedByParent=!1,this.contentType=g.PARSABLE_DATA,this.isVoid=!1,this.ignoreFirstLf=!1,this.canSelfClose=!0}return XmlTagDefinition.prototype.requireExtraParent=function(e){return!1},XmlTagDefinition.prototype.isClosedByChild=function(e){return!1},XmlTagDefinition}(),ri=new ti,ni=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},ii=function(e){function XmlParser(){e.call(this,getXmlTagDefinition)}return ni(XmlParser,e),XmlParser.prototype.parse=function(t,r,n){return void 0===n&&(n=!1),e.prototype.parse.call(this,t,r,n,null)},XmlParser}(In),oi=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},si=function(){function _Visitor(){}return _Visitor.prototype.visitTag=function(e){var t=this,r=this._serializeAttributes(e.attrs);if(0==e.children.length)return"<"+e.name+r+"/>";var n=e.children.map(function(e){return e.visit(t)});return"<"+e.name+r+">"+n.join("")+"</"+e.name+">"},_Visitor.prototype.visitText=function(e){return e.value},_Visitor.prototype.visitDeclaration=function(e){return"<?xml"+this._serializeAttributes(e.attrs)+" ?>"},_Visitor.prototype._serializeAttributes=function(e){var t=Object.keys(e).map(function(t){return t+'="'+e[t]+'"'}).join(" ");return t.length>0?" "+t:""},_Visitor.prototype.visitDoctype=function(e){return"<!DOCTYPE "+e.rootTag+" [\n"+e.dtd+"\n]>"},_Visitor}(),ai=new si,ui=function(){function Declaration(e){var t=this;this.attrs={},Object.keys(e).forEach(function(r){t.attrs[r]=_escapeXml(e[r])})}return Declaration.prototype.visit=function(e){return e.visitDeclaration(this)},Declaration}(),li=function(){function Doctype(e,t){this.rootTag=e,this.dtd=t}return Doctype.prototype.visit=function(e){return e.visitDoctype(this)},Doctype}(),ci=function(){function Tag(e,t,r){var n=this;void 0===t&&(t={}),void 0===r&&(r=[]),this.name=e,this.children=r,this.attrs={},Object.keys(t).forEach(function(e){n.attrs[e]=_escapeXml(t[e])})}return Tag.prototype.visit=function(e){return e.visitTag(this)},Tag}(),pi=function(){function Text(e){this.value=_escapeXml(e)}return Text.prototype.visit=function(e){return e.visitText(this)},Text}(),hi=function(e){function CR(t){void 0===t&&(t=0),e.call(this,"\n"+new Array(t+1).join(" "))}return oi(CR,e),CR}(pi),fi=[[/&/g,"&amp;"],[/"/g,"&quot;"],[/'/g,"&apos;"],[/</g,"&lt;"],[/>/g,"&gt;"]],di="1.2",mi="urn:oasis:names:tc:xliff:document:1.2",yi="en",vi="x",gi="source",_i="target",bi="trans-unit",wi=function(){function Xliff(e,t){this._htmlParser=e,this._interpolationConfig=t}return Xliff.prototype.write=function(e){var t=new Ei,r=[];Object.keys(e).forEach(function(n){var i=e[n],o=new ci(bi,{id:n,datatype:"html"});o.children.push(new hi(8),new ci(gi,{},t.serialize(i.nodes)),new hi(8),new ci(_i)),i.description&&o.children.push(new hi(8),new ci("note",{priority:"1",from:"description"},[new pi(i.description)])),i.meaning&&o.children.push(new hi(8),new ci("note",{priority:"1",from:"meaning"},[new pi(i.meaning)])),o.children.push(new hi(6)),r.push(new hi(6),o)});var n=new ci("body",{},r.concat([new hi(4)])),i=new ci("file",{"source-language":yi,datatype:"plaintext",original:"ng2.template"},[new hi(4),n,new hi(2)]),o=new ci("xliff",{version:di,xmlns:mi},[new hi(2),i,new hi]);return serialize([new ui({version:"1.0",encoding:"UTF-8"}),new hi,o,new hi])},Xliff.prototype.load=function(e,t,r){var n=this,i=(new ii).parse(e,t);if(i.errors.length)throw new Error("xtb parse errors:\n"+i.errors.join("\n"));var o=(new Ci).parse(i.rootNodes,r),s=o.messages,a=o.errors;if(a.length)throw new Error("xtb parse errors:\n"+a.join("\n"));var u={},l=[];if(Object.keys(s).forEach(function(e){var r=n._htmlParser.parse(s[e],t,!0,n._interpolationConfig);l.push.apply(l,r.errors),u[e]=r.rootNodes}),l.length)throw new Error("xtb parse errors:\n"+l.join("\n"));return u},Xliff}(),Ei=function(){function _WriteVisitor(){}return _WriteVisitor.prototype.visitText=function(e,t){return[new pi(e.value)]},_WriteVisitor.prototype.visitContainer=function(e,t){var r=this,n=[];return e.children.forEach(function(e){return n.push.apply(n,e.visit(r))}),n},_WriteVisitor.prototype.visitIcu=function(e,t){if(this._isInIcu)throw new Error("xliff does not support nested ICU messages");this._isInIcu=!0;var r=[];return this._isInIcu=!1,r},_WriteVisitor.prototype.visitTagPlaceholder=function(e,t){var r=getCtypeForTag(e.tag),n=new ci(vi,{id:e.startName,ctype:r});if(e.isVoid)return[n];var i=new ci(vi,{id:e.closeName,ctype:r});return[n].concat(this.serialize(e.children),[i])},_WriteVisitor.prototype.visitPlaceholder=function(e,t){return[new ci(vi,{id:e.name})]},_WriteVisitor.prototype.visitIcuPlaceholder=function(e,t){return[new ci(vi,{id:e.name})]},_WriteVisitor.prototype.serialize=function(e){var t=this;return this._isInIcu=!1,A.flatten(e.map(function(e){return e.visit(t)}))},_WriteVisitor}(),Ci=function(){function _LoadVisitor(){}return _LoadVisitor.prototype.parse=function(e,t){var r=this;this._messageNodes=[],this._translatedMessages={},this._msgId="",this._target=[],this._errors=[],visitAll(this,e,null);var n=t.getMessageMap(),i=extractPlaceholders(t),o=extractPlaceholderToIds(t);return this._messageNodes.filter(function(e){return n.hasOwnProperty(e[0])}).sort(function(e,t){return 0==Object.keys(n[e[0]].placeholderToMsgIds).length?-1:0==Object.keys(n[t[0]].placeholderToMsgIds).length?1:0}).forEach(function(e){var t=e[0];r._placeholders=i[t]||{},r._placeholderToIds=o[t]||{},r._translatedMessages[t]=visitAll(r,e[1]).join("")}),{messages:this._translatedMessages,errors:this._errors}},_LoadVisitor.prototype.visitElement=function(e,t){switch(e.name){case bi:this._target=null;var r=e.attrs.find(function(e){return"id"===e.name});r?this._msgId=r.value:this._addError(e,"<"+bi+'> misses the "id" attribute'),visitAll(this,e.children,null),null!==this._msgId&&this._messageNodes.push([this._msgId,this._target]);break;case gi:break;case _i:this._target=e.children;break;case vi:var n=e.attrs.find(function(e){return"id"===e.name});if(n){var i=n.value;if(this._placeholders.hasOwnProperty(i))return this._placeholders[i];if(this._placeholderToIds.hasOwnProperty(i)&&this._translatedMessages.hasOwnProperty(this._placeholderToIds[i]))return this._translatedMessages[this._placeholderToIds[i]];this._addError(e,'The placeholder "'+i+'" does not exists in the source message')}else this._addError(e,"<"+vi+'> misses the "id" attribute');break;default:visitAll(this,e.children,null)}},_LoadVisitor.prototype.visitAttribute=function(e,t){throw new Error("unreachable code")},_LoadVisitor.prototype.visitText=function(e,t){return e.value},_LoadVisitor.prototype.visitComment=function(e,t){return""},_LoadVisitor.prototype.visitExpansion=function(e,t){throw new Error("unreachable code")},_LoadVisitor.prototype.visitExpansionCase=function(e,t){throw new Error("unreachable code")},_LoadVisitor.prototype._addError=function(e,t){this._errors.push(new Kn(e.sourceSpan,t))},_LoadVisitor}(),Si="messagebundle",Pi="msg",Ai="ph",xi="ex",Ti='<!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)>',Mi=function(){function Xmb(){}return Xmb.prototype.write=function(e){var t=new Ii,r=new ci(Si);return Object.keys(e).forEach(function(n){var i=e[n],o={id:n};i.description&&(o.desc=i.description),i.meaning&&(o.meaning=i.meaning),r.children.push(new hi(2),new ci(Pi,o,t.serialize(i.nodes)))}),r.children.push(new hi),serialize([new ui({version:"1.0",encoding:"UTF-8"}),new hi,new li(Si,Ti),new hi,r,new hi])},Xmb.prototype.load=function(e,t,r){throw new Error("Unsupported")},Xmb}(),Ii=function(){function _Visitor(){}return _Visitor.prototype.visitText=function(e,t){return[new pi(e.value)]},_Visitor.prototype.visitContainer=function(e,t){var r=this,n=[];return e.children.forEach(function(e){return n.push.apply(n,e.visit(r))}),n},_Visitor.prototype.visitIcu=function(e,t){var r=this,n=[new pi("{"+e.expression+", "+e.type+", ")];return Object.keys(e.cases).forEach(function(t){n.push.apply(n,[new pi(t+" {")].concat(e.cases[t].visit(r),[new pi("} ")]))}),n.push(new pi("}")),n},_Visitor.prototype.visitTagPlaceholder=function(e,t){var r=new ci(xi,{},[new pi("<"+e.tag+">")]),n=new ci(Ai,{name:e.startName},[r]);if(e.isVoid)return[n];var i=new ci(xi,{},[new pi("</"+e.tag+">")]),o=new ci(Ai,{name:e.closeName},[i]);return[n].concat(this.serialize(e.children),[o])},_Visitor.prototype.visitPlaceholder=function(e,t){return[new ci(Ai,{name:e.name})]},_Visitor.prototype.visitIcuPlaceholder=function(e,t){return[new ci(Ai,{name:e.name})]},_Visitor.prototype.serialize=function(e){var t=this;return A.flatten(e.map(function(e){return e.visit(t)}))},_Visitor}(),Di="translationbundle",Ni="translation",Oi="ph",Vi=function(){function Xtb(e,t){this._htmlParser=e,this._interpolationConfig=t}return Xtb.prototype.write=function(e){throw new Error("Unsupported")},Xtb.prototype.load=function(e,t,r){var n=this,i=(new ii).parse(e,t);if(i.errors.length)throw new Error("xtb parse errors:\n"+i.errors.join("\n"));var o=(new Ri).parse(i.rootNodes,r),s=o.messages,a=o.errors;if(a.length)throw new Error("xtb parse errors:\n"+a.join("\n"));var u={},l=[];if(Object.keys(s).forEach(function(e){var r=n._htmlParser.parse(s[e],t,!0,n._interpolationConfig);l.push.apply(l,r.errors),u[e]=r.rootNodes}),l.length)throw new Error("xtb parse errors:\n"+l.join("\n"));return u},Xtb}(),Ri=function(){function _Visitor(){}return _Visitor.prototype.parse=function(e,t){var r=this;this._messageNodes=[],this._translatedMessages={},this._bundleDepth=0,this._translationDepth=0,this._errors=[],visitAll(this,e,null);var n=t.getMessageMap(),i=extractPlaceholders(t),o=extractPlaceholderToIds(t);return this._messageNodes.filter(function(e){return n.hasOwnProperty(e[0])}).sort(function(e,t){return 0==Object.keys(n[e[0]].placeholderToMsgIds).length?-1:0==Object.keys(n[t[0]].placeholderToMsgIds).length?1:0}).forEach(function(e){var t=e[0];r._placeholders=i[t]||{},r._placeholderToIds=o[t]||{},r._translatedMessages[t]=visitAll(r,e[1]).join("")}),{messages:this._translatedMessages,errors:this._errors}},_Visitor.prototype.visitElement=function(e,t){switch(e.name){case Di:this._bundleDepth++,this._bundleDepth>1&&this._addError(e,"<"+Di+"> elements can not be nested"),visitAll(this,e.children,null),this._bundleDepth--;break;case Ni:this._translationDepth++,this._translationDepth>1&&this._addError(e,"<"+Ni+"> elements can not be nested");var r=e.attrs.find(function(e){return"id"===e.name});r?this._messageNodes.push([r.value,e.children]):this._addError(e,"<"+Ni+'> misses the "id" attribute'),this._translationDepth--;break;case Oi:var n=e.attrs.find(function(e){return"name"===e.name});if(n){var i=n.value;if(this._placeholders.hasOwnProperty(i))return this._placeholders[i];if(this._placeholderToIds.hasOwnProperty(i)&&this._translatedMessages.hasOwnProperty(this._placeholderToIds[i]))return this._translatedMessages[this._placeholderToIds[i]];this._addError(e,'The placeholder "'+i+'" does not exists in the source message')}else this._addError(e,"<"+Oi+'> misses the "name" attribute');break;default:this._addError(e,"Unexpected tag")}},_Visitor.prototype.visitAttribute=function(e,t){throw new Error("unreachable code")},_Visitor.prototype.visitText=function(e,t){return e.value},_Visitor.prototype.visitComment=function(e,t){return""},_Visitor.prototype.visitExpansion=function(e,t){var r=this;e.cases.map(function(e){return e.visit(r,null)});return"{"+e.switchValue+", "+e.type+", strCases.join(' ')}"},_Visitor.prototype.visitExpansionCase=function(e,t){return e.value+" {"+visitAll(this,e.expression,null)+"}"},_Visitor.prototype._addError=function(e,t){this._errors.push(new Kn(e.sourceSpan,t))},_Visitor}(),ki=function(){function TranslationBundle(e){void 0===e&&(e={}),this._messageMap=e}return TranslationBundle.load=function(e,t,r,n){return new TranslationBundle(n.load(e,t,r))},TranslationBundle.prototype.get=function(e){return this._messageMap[e]},TranslationBundle.prototype.has=function(e){return e in this._messageMap},TranslationBundle}(),Li=function(){function I18NHtmlParser(e,t,r){this._htmlParser=e,this._translations=t,this._translationsFormat=r}return I18NHtmlParser.prototype.parse=function(e,t,r,n){void 0===r&&(r=!1),void 0===n&&(n=Qr);var i=this._htmlParser.parse(e,t,r,n);if(!this._translations||""===this._translations)return i;var o=new ei(this._htmlParser,[],{}),s=o.updateFromTemplate(e,t,n);if(s&&s.length)return new Mn(i.rootNodes,i.errors.concat(s));var a=this._createSerializer(n),u=ki.load(this._translations,t,o,a);return mergeTranslations(i.rootNodes,u,n,[],{})},I18NHtmlParser.prototype._createSerializer=function(e){var t=(this._translationsFormat||"xlf").toLowerCase();switch(t){case"xmb":return new Mi;case"xtb":return new Vi(this._htmlParser,e);case"xliff":case"xlf":default:return new wi(this._htmlParser,e)}},I18NHtmlParser}(),Fi=r.__core_private__.isDefaultChangeDetectionStrategy,ji=r.__core_private__.ChangeDetectorStatus,Bi=r.__core_private__.LifecycleHooks,Ui=r.__core_private__.LIFECYCLE_HOOKS_VALUES,Wi=r.__core_private__.ReflectorReader,Hi=r.__core_private__.AppElement,Gi=r.__core_private__.CodegenComponentFactoryResolver,zi=r.__core_private__.AppView,qi=r.__core_private__.DebugAppView,Ki=r.__core_private__.NgModuleInjector,Qi=r.__core_private__.registerModuleFactory,Zi=r.__core_private__.ViewType,Xi=r.__core_private__.MAX_INTERPOLATION_VALUES,$i=r.__core_private__.checkBinding,Ji=r.__core_private__.flattenNestedViewRenderNodes,Yi=r.__core_private__.interpolate,eo=r.__core_private__.ViewUtils,to=r.__core_private__.DebugContext,ro=r.__core_private__.StaticNodeDebugInfo,no=r.__core_private__.devModeEqual,io=r.__core_private__.UNINITIALIZED,oo=r.__core_private__.ValueUnwrapper,so=r.__core_private__.TemplateRef_,ao=r.__core_private__.EMPTY_ARRAY,uo=r.__core_private__.EMPTY_MAP,lo=r.__core_private__.pureProxy1,co=r.__core_private__.pureProxy2,po=r.__core_private__.pureProxy3,ho=r.__core_private__.pureProxy4,fo=r.__core_private__.pureProxy5,mo=r.__core_private__.pureProxy6,yo=r.__core_private__.pureProxy7,vo=r.__core_private__.pureProxy8,go=r.__core_private__.pureProxy9,_o=r.__core_private__.pureProxy10,bo=r.__core_private__.castByValue,wo=r.__core_private__.Console,Eo=r.__core_private__.reflector,Co=r.__core_private__.Reflector,So=r.__core_private__.ReflectionCapabilities,Po=r.__core_private__.NoOpAnimationPlayer,Ao=r.__core_private__.AnimationSequencePlayer,xo=r.__core_private__.AnimationGroupPlayer,To=r.__core_private__.AnimationKeyframe,Mo=r.__core_private__.AnimationStyles,Io=r.__core_private__.ANY_STATE,Do=r.__core_private__.DEFAULT_STATE,No=r.__core_private__.EMPTY_STATE,Oo=r.__core_private__.FILL_STYLE_FLAG,Vo=r.__core_private__.prepareFinalAnimationStyles,Ro=r.__core_private__.balanceAnimationKeyframes,ko=r.__core_private__.clearStyles,Lo=r.__core_private__.collectAndResolveStyles,Fo=r.__core_private__.renderStyles,jo=r.__core_private__.ComponentStillLoadingError,Bo=assetUrl("core","linker/view"),Uo=assetUrl("core","linker/view_utils"),Wo=assetUrl("core","change_detection/change_detection"),Ho=assetUrl("core","animation/animation_style_util"),Go=function(){
function Identifiers(){}return Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS={name:"ANALYZE_FOR_ENTRY_COMPONENTS",moduleUrl:assetUrl("core","metadata/di"),runtime:r.ANALYZE_FOR_ENTRY_COMPONENTS},Identifiers.ViewUtils={name:"ViewUtils",moduleUrl:assetUrl("core","linker/view_utils"),runtime:eo},Identifiers.AppView={name:"AppView",moduleUrl:Bo,runtime:zi},Identifiers.DebugAppView={name:"DebugAppView",moduleUrl:Bo,runtime:qi},Identifiers.AppElement={name:"AppElement",moduleUrl:assetUrl("core","linker/element"),runtime:Hi},Identifiers.ElementRef={name:"ElementRef",moduleUrl:assetUrl("core","linker/element_ref"),runtime:r.ElementRef},Identifiers.ViewContainerRef={name:"ViewContainerRef",moduleUrl:assetUrl("core","linker/view_container_ref"),runtime:r.ViewContainerRef},Identifiers.ChangeDetectorRef={name:"ChangeDetectorRef",moduleUrl:assetUrl("core","change_detection/change_detector_ref"),runtime:r.ChangeDetectorRef},Identifiers.RenderComponentType={name:"RenderComponentType",moduleUrl:assetUrl("core","render/api"),runtime:r.RenderComponentType},Identifiers.QueryList={name:"QueryList",moduleUrl:assetUrl("core","linker/query_list"),runtime:r.QueryList},Identifiers.TemplateRef={name:"TemplateRef",moduleUrl:assetUrl("core","linker/template_ref"),runtime:r.TemplateRef},Identifiers.TemplateRef_={name:"TemplateRef_",moduleUrl:assetUrl("core","linker/template_ref"),runtime:so},Identifiers.CodegenComponentFactoryResolver={name:"CodegenComponentFactoryResolver",moduleUrl:assetUrl("core","linker/component_factory_resolver"),runtime:Gi},Identifiers.ComponentFactoryResolver={name:"ComponentFactoryResolver",moduleUrl:assetUrl("core","linker/component_factory_resolver"),runtime:r.ComponentFactoryResolver},Identifiers.ComponentFactory={name:"ComponentFactory",runtime:r.ComponentFactory,moduleUrl:assetUrl("core","linker/component_factory")},Identifiers.NgModuleFactory={name:"NgModuleFactory",runtime:r.NgModuleFactory,moduleUrl:assetUrl("core","linker/ng_module_factory")},Identifiers.NgModuleInjector={name:"NgModuleInjector",runtime:Ki,moduleUrl:assetUrl("core","linker/ng_module_factory")},Identifiers.RegisterModuleFactoryFn={name:"registerModuleFactory",runtime:Qi,moduleUrl:assetUrl("core","linker/ng_module_factory_loader")},Identifiers.ValueUnwrapper={name:"ValueUnwrapper",moduleUrl:Wo,runtime:oo},Identifiers.Injector={name:"Injector",moduleUrl:assetUrl("core","di/injector"),runtime:r.Injector},Identifiers.ViewEncapsulation={name:"ViewEncapsulation",moduleUrl:assetUrl("core","metadata/view"),runtime:r.ViewEncapsulation},Identifiers.ViewType={name:"ViewType",moduleUrl:assetUrl("core","linker/view_type"),runtime:Zi},Identifiers.ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleUrl:Wo,runtime:r.ChangeDetectionStrategy},Identifiers.StaticNodeDebugInfo={name:"StaticNodeDebugInfo",moduleUrl:assetUrl("core","linker/debug_context"),runtime:ro},Identifiers.DebugContext={name:"DebugContext",moduleUrl:assetUrl("core","linker/debug_context"),runtime:to},Identifiers.Renderer={name:"Renderer",moduleUrl:assetUrl("core","render/api"),runtime:r.Renderer},Identifiers.SimpleChange={name:"SimpleChange",moduleUrl:Wo,runtime:r.SimpleChange},Identifiers.UNINITIALIZED={name:"UNINITIALIZED",moduleUrl:Wo,runtime:io},Identifiers.ChangeDetectorStatus={name:"ChangeDetectorStatus",moduleUrl:Wo,runtime:ji},Identifiers.checkBinding={name:"checkBinding",moduleUrl:Uo,runtime:$i},Identifiers.flattenNestedViewRenderNodes={name:"flattenNestedViewRenderNodes",moduleUrl:Uo,runtime:Ji},Identifiers.devModeEqual={name:"devModeEqual",moduleUrl:Wo,runtime:no},Identifiers.interpolate={name:"interpolate",moduleUrl:Uo,runtime:Yi},Identifiers.castByValue={name:"castByValue",moduleUrl:Uo,runtime:bo},Identifiers.EMPTY_ARRAY={name:"EMPTY_ARRAY",moduleUrl:Uo,runtime:ao},Identifiers.EMPTY_MAP={name:"EMPTY_MAP",moduleUrl:Uo,runtime:uo},Identifiers.pureProxies=[null,{name:"pureProxy1",moduleUrl:Uo,runtime:lo},{name:"pureProxy2",moduleUrl:Uo,runtime:co},{name:"pureProxy3",moduleUrl:Uo,runtime:po},{name:"pureProxy4",moduleUrl:Uo,runtime:ho},{name:"pureProxy5",moduleUrl:Uo,runtime:fo},{name:"pureProxy6",moduleUrl:Uo,runtime:mo},{name:"pureProxy7",moduleUrl:Uo,runtime:yo},{name:"pureProxy8",moduleUrl:Uo,runtime:vo},{name:"pureProxy9",moduleUrl:Uo,runtime:go},{name:"pureProxy10",moduleUrl:Uo,runtime:_o}],Identifiers.SecurityContext={name:"SecurityContext",moduleUrl:assetUrl("core","security"),runtime:r.SecurityContext},Identifiers.AnimationKeyframe={name:"AnimationKeyframe",moduleUrl:assetUrl("core","animation/animation_keyframe"),runtime:To},Identifiers.AnimationStyles={name:"AnimationStyles",moduleUrl:assetUrl("core","animation/animation_styles"),runtime:Mo},Identifiers.NoOpAnimationPlayer={name:"NoOpAnimationPlayer",moduleUrl:assetUrl("core","animation/animation_player"),runtime:Po},Identifiers.AnimationGroupPlayer={name:"AnimationGroupPlayer",moduleUrl:assetUrl("core","animation/animation_group_player"),runtime:xo},Identifiers.AnimationSequencePlayer={name:"AnimationSequencePlayer",moduleUrl:assetUrl("core","animation/animation_sequence_player"),runtime:Ao},Identifiers.prepareFinalAnimationStyles={name:"prepareFinalAnimationStyles",moduleUrl:Ho,runtime:Vo},Identifiers.balanceAnimationKeyframes={name:"balanceAnimationKeyframes",moduleUrl:Ho,runtime:Ro},Identifiers.clearStyles={name:"clearStyles",moduleUrl:Ho,runtime:ko},Identifiers.renderStyles={name:"renderStyles",moduleUrl:Ho,runtime:Fo},Identifiers.collectAndResolveStyles={name:"collectAndResolveStyles",moduleUrl:Ho,runtime:Lo},Identifiers.LOCALE_ID={name:"LOCALE_ID",moduleUrl:assetUrl("core","i18n/tokens"),runtime:r.LOCALE_ID},Identifiers.TRANSLATIONS_FORMAT={name:"TRANSLATIONS_FORMAT",moduleUrl:assetUrl("core","i18n/tokens"),runtime:r.TRANSLATIONS_FORMAT},Identifiers}(),zo=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},qo=function(e){function HtmlParser(){e.call(this,getHtmlTagDefinition)}return zo(HtmlParser,e),HtmlParser.prototype.parse=function(t,r,n,i){return void 0===n&&(n=!1),void 0===i&&(i=Qr),e.prototype.parse.call(this,t,r,n,i)},HtmlParser.decorators=[{type:r.Injectable}],HtmlParser.ctorParameters=[],HtmlParser}(In),Ko=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},Qo=["zero","one","two","few","many","other"],Zo=function(){function ExpansionResult(e,t,r){this.nodes=e,this.expanded=t,this.errors=r}return ExpansionResult}(),Xo=function(e){function ExpansionError(t,r){e.call(this,t,r)}return Ko(ExpansionError,e),ExpansionError}(pn),$o=function(){function _Expander(){this.isExpanded=!1,this.errors=[]}return _Expander.prototype.visitElement=function(e,t){return new vn(e.name,e.attrs,visitAll(this,e.children),e.sourceSpan,e.startSourceSpan,e.endSourceSpan)},_Expander.prototype.visitAttribute=function(e,t){return e},_Expander.prototype.visitText=function(e,t){return e},_Expander.prototype.visitComment=function(e,t){return e},_Expander.prototype.visitExpansion=function(e,t){return this.isExpanded=!0,"plural"==e.type?_expandPluralForm(e,this.errors):_expandDefaultForm(e,this.errors)},_Expander.prototype.visitExpansionCase=function(e,t){throw new Error("Should not be reached")},_Expander}(),Jo=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},Yo=function(e){function ProviderError(t,r){e.call(this,r,t)}return Jo(ProviderError,e),ProviderError}(pn),es=function(){function ProviderViewContext(e,t){var r=this;this.component=e,this.sourceSpan=t,this.errors=[],this.viewQueries=_getViewQueries(e),this.viewProviders=new Map,_normalizeProviders(e.viewProviders,t,this.errors).forEach(function(e){isBlank(r.viewProviders.get(e.token.reference))&&r.viewProviders.set(e.token.reference,!0)})}return ProviderViewContext}(),ts=function(){function ProviderElementContext(e,t,r,n,i,o,s){var a=this;this.viewContext=e,this._parent=t,this._isViewRoot=r,this._directiveAsts=n,this._sourceSpan=s,this._transformedProviders=new Map,this._seenProviders=new Map,this._hasViewContainer=!1,this._attrs={},i.forEach(function(e){return a._attrs[e.name]=e.value});var u=n.map(function(e){return e.directive});this._allProviders=_resolveProvidersFromDirectives(u,s,e.errors),this._contentQueries=_getContentQueries(u);var l=new Map;S.values(this._allProviders).forEach(function(e){a._addQueryReadsTo(e.token,l)}),o.forEach(function(e){a._addQueryReadsTo(new ut({value:e.name}),l)}),isPresent(l.get(resolveIdentifierToken(Go.ViewContainerRef).reference))&&(this._hasViewContainer=!0),S.values(this._allProviders).forEach(function(e){var t=e.eager||isPresent(l.get(e.token.reference));t&&a._getOrCreateLocalProvider(e.providerType,e.token,!0)})}return ProviderElementContext.prototype.afterElement=function(){var e=this;S.values(this._allProviders).forEach(function(t){e._getOrCreateLocalProvider(t.providerType,t.token,!1)})},Object.defineProperty(ProviderElementContext.prototype,"transformProviders",{get:function(){return S.values(this._transformedProviders)},enumerable:!0,configurable:!0}),Object.defineProperty(ProviderElementContext.prototype,"transformedDirectiveAsts",{get:function(){var e=this.transformProviders.map(function(e){return e.token.identifier}),t=A.clone(this._directiveAsts);return A.sort(t,function(t,r){return e.indexOf(t.directive.type)-e.indexOf(r.directive.type)}),t},enumerable:!0,configurable:!0}),Object.defineProperty(ProviderElementContext.prototype,"transformedHasViewContainer",{get:function(){return this._hasViewContainer},enumerable:!0,configurable:!0}),ProviderElementContext.prototype._addQueryReadsTo=function(e,t){this._getQueriesFor(e).forEach(function(r){var n=r.read||e;isBlank(t.get(n.reference))&&t.set(n.reference,!0)})},ProviderElementContext.prototype._getQueriesFor=function(e){for(var t,r=[],n=this,i=0;null!==n;)t=n._contentQueries.get(e.reference),isPresent(t)&&A.addAll(r,t.filter(function(e){return e.descendants||i<=1})),n._directiveAsts.length>0&&i++,n=n._parent;return t=this.viewContext.viewQueries.get(e.reference),isPresent(t)&&A.addAll(r,t),r},ProviderElementContext.prototype._getOrCreateLocalProvider=function(e,r,n){var i=this,o=this._allProviders.get(r.reference);if(!o||(e===t.ProviderAstType.Directive||e===t.ProviderAstType.PublicService)&&o.providerType===t.ProviderAstType.PrivateService||(e===t.ProviderAstType.PrivateService||e===t.ProviderAstType.PublicService)&&o.providerType===t.ProviderAstType.Builtin)return null;var s=this._transformedProviders.get(r.reference);if(isPresent(s))return s;if(isPresent(this._seenProviders.get(r.reference)))return this.viewContext.errors.push(new Yo("Cannot instantiate cyclic dependency! "+r.name,this._sourceSpan)),null;this._seenProviders.set(r.reference,!0);var a=o.providers.map(function(e){var t,r=e.useValue,s=e.useExisting;if(isPresent(e.useExisting)){var a=i._getDependency(o.providerType,new ot({token:e.useExisting}),n);isPresent(a.token)?s=a.token:(s=null,r=a.value)}else if(isPresent(e.useFactory)){var u=e.deps||e.useFactory.diDeps;t=u.map(function(e){return i._getDependency(o.providerType,e,n)})}else if(isPresent(e.useClass)){var u=e.deps||e.useClass.diDeps;t=u.map(function(e){return i._getDependency(o.providerType,e,n)})}return _transformProvider(e,{useExisting:s,useValue:r,deps:t})});return s=_transformProviderAst(o,{eager:n,providers:a}),this._transformedProviders.set(r.reference,s),s},ProviderElementContext.prototype._getLocalDependency=function(e,r,n){if(void 0===n&&(n=null),r.isAttribute){var i=this._attrs[r.token.value];return new ot({isValue:!0,value:normalizeBlank(i)})}if(isPresent(r.query)||isPresent(r.viewQuery))return r;if(isPresent(r.token)){if(e===t.ProviderAstType.Directive||e===t.ProviderAstType.Component){if(r.token.reference===resolveIdentifierToken(Go.Renderer).reference||r.token.reference===resolveIdentifierToken(Go.ElementRef).reference||r.token.reference===resolveIdentifierToken(Go.ChangeDetectorRef).reference||r.token.reference===resolveIdentifierToken(Go.TemplateRef).reference)return r;r.token.reference===resolveIdentifierToken(Go.ViewContainerRef).reference&&(this._hasViewContainer=!0)}if(r.token.reference===resolveIdentifierToken(Go.Injector).reference)return r;if(isPresent(this._getOrCreateLocalProvider(e,r.token,n)))return r}return null},ProviderElementContext.prototype._getDependency=function(e,r,n){void 0===n&&(n=null);var i=this,o=n,s=null;if(r.isSkipSelf||(s=this._getLocalDependency(e,r,n)),r.isSelf)!s&&r.isOptional&&(s=new ot({isValue:!0,value:null}));else{for(;!s&&isPresent(i._parent);){var a=i;i=i._parent,a._isViewRoot&&(o=!1),s=i._getLocalDependency(t.ProviderAstType.PublicService,r,o)}s||(s=!r.isHost||this.viewContext.component.type.isHost||this.viewContext.component.type.reference===r.token.reference||isPresent(this.viewContext.viewProviders.get(r.token.reference))?r:r.isOptional?s=new ot({isValue:!0,value:null}):null)}return s||this.viewContext.errors.push(new Yo("No provider for "+r.token.name,this._sourceSpan)),s},ProviderElementContext}(),rs=function(){function NgModuleProviderAnalyzer(e,r,n){var i=this;this._transformedProviders=new Map,this._seenProviders=new Map,this._errors=[],this._allProviders=new Map;var o=e.transitiveModule.modules.map(function(e){return e.type});o.forEach(function(e){var r=new st({token:new ut({identifier:e}),useClass:e});_resolveProviders([r],t.ProviderAstType.PublicService,!0,n,i._errors,i._allProviders)}),_resolveProviders(_normalizeProviders(e.transitiveModule.providers.concat(r),n,this._errors),t.ProviderAstType.PublicService,!1,n,this._errors,this._allProviders)}return NgModuleProviderAnalyzer.prototype.parse=function(){var e=this;if(S.values(this._allProviders).forEach(function(t){e._getOrCreateLocalProvider(t.token,t.eager)}),this._errors.length>0){var t=this._errors.join("\n");throw new Error("Provider parse errors:\n"+t)}return S.values(this._transformedProviders)},NgModuleProviderAnalyzer.prototype._getOrCreateLocalProvider=function(e,t){var r=this,n=this._allProviders.get(e.reference);if(!n)return null;var i=this._transformedProviders.get(e.reference);if(isPresent(i))return i;if(isPresent(this._seenProviders.get(e.reference)))return this._errors.push(new Yo("Cannot instantiate cyclic dependency! "+e.name,n.sourceSpan)),null;this._seenProviders.set(e.reference,!0);var o=n.providers.map(function(e){var i,o=e.useValue,s=e.useExisting;if(isPresent(e.useExisting)){var a=r._getDependency(new ot({token:e.useExisting}),t,n.sourceSpan);isPresent(a.token)?s=a.token:(s=null,o=a.value)}else if(isPresent(e.useFactory)){var u=e.deps||e.useFactory.diDeps;i=u.map(function(e){return r._getDependency(e,t,n.sourceSpan)})}else if(isPresent(e.useClass)){var u=e.deps||e.useClass.diDeps;i=u.map(function(e){return r._getDependency(e,t,n.sourceSpan)})}return _transformProvider(e,{useExisting:s,useValue:o,deps:i})});return i=_transformProviderAst(n,{eager:t,providers:o}),this._transformedProviders.set(e.reference,i),i},NgModuleProviderAnalyzer.prototype._getDependency=function(e,t,r){void 0===t&&(t=null);var n=!1;!e.isSkipSelf&&isPresent(e.token)&&(e.token.reference===resolveIdentifierToken(Go.Injector).reference||e.token.reference===resolveIdentifierToken(Go.ComponentFactoryResolver).reference?n=!0:isPresent(this._getOrCreateLocalProvider(e.token,t))&&(n=!0));var i=e;return e.isSelf&&!n&&(e.isOptional?i=new ot({isValue:!0,value:null}):this._errors.push(new Yo("No provider for "+e.token.name,r))),i},NgModuleProviderAnalyzer}(),ns=function(){function ElementSchemaRegistry(){}return ElementSchemaRegistry}(),is=function(){function StyleWithImports(e,t){this.style=e,this.styleUrls=t}return StyleWithImports}(),os=/@import\s+(?:url\()?\s*(?:(?:['"]([^'"]*))|([^;\)\s]*))[^;]*;?/g,ss=/^([^:\/?#]+):/,as="select",us="ng-content",ls="link",cs="rel",ps="href",hs="stylesheet",fs="style",ds="script",ms="ngNonBindable",ys="ngProjectAs";!function(e){e[e.NG_CONTENT=0]="NG_CONTENT",e[e.STYLE=1]="STYLE",e[e.STYLESHEET=2]="STYLESHEET",e[e.SCRIPT=3]="SCRIPT",e[e.OTHER=4]="OTHER"}(Jn||(Jn={}));var vs,gs=function(){function PreparsedElement(e,t,r,n,i){this.type=e,this.selectAttr=t,this.hrefAttr=r,this.nonBindable=n,this.projectAs=i}return PreparsedElement}(),_s=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},bs=/^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.+))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/,ws=1,Es=2,Cs=3,Ss=4,Ps=5,As=6,xs=7,Ts=8,Ms=9,Is=10,Ds="animate-",Ns="template",Os="template",Vs="*",Rs="class",ks=".",Ls="attr",Fs="class",js="style",Bs=O.parse("*")[0],Us=new r.OpaqueToken("TemplateTransforms"),Ws=function(e){function TemplateParseError(t,r,n){e.call(this,r,t,n)}return _s(TemplateParseError,e),TemplateParseError}(pn),Hs=function(){function TemplateParseResult(e,t){this.templateAst=e,this.errors=t}return TemplateParseResult}(),Gs=function(){function TemplateParser(e,t,r,n,i){this._exprParser=e,this._schemaRegistry=t,this._htmlParser=r,this._console=n,this.transforms=i}return TemplateParser.prototype.parse=function(e,t,r,n,i,o){var s=this.tryParse(e,t,r,n,i,o),a=s.errors.filter(function(e){return e.level===Zr.WARNING}),u=s.errors.filter(function(e){return e.level===Zr.FATAL});if(a.length>0&&this._console.warn("Template parse warnings:\n"+a.join("\n")),u.length>0){var l=u.join("\n");throw new Error("Template parse errors:\n"+l)}return s.templateAst},TemplateParser.prototype.tryParse=function(e,t,r,n,i,o){return this.tryParseHtml(this.expandHtml(this._htmlParser.parse(t,o,!0,this.getInterpolationConfig(e))),e,t,r,n,i,o)},TemplateParser.prototype.tryParseHtml=function(e,t,r,n,i,o,s){var a,u=e.errors;if(e.rootNodes.length>0){var l=removeIdentifierDuplicates(n),c=removeIdentifierDuplicates(i),p=new es(t,e.rootNodes[0].sourceSpan),h=new zs(p,l,c,o,this._exprParser,this._schemaRegistry);a=visitAll(h,e.rootNodes,Xs),u.push.apply(u,h.errors.concat(p.errors))}else a=[];return this._assertNoReferenceDuplicationOnTemplate(a,u),u.length>0?new Hs(a,u):(isPresent(this.transforms)&&this.transforms.forEach(function(e){a=templateVisitAll(e,a)}),new Hs(a,u))},TemplateParser.prototype.expandHtml=function(e,t){void 0===t&&(t=!1);var r=e.errors;if(0==r.length||t){var n=expandNodes(e.rootNodes);r.push.apply(r,n.errors),e=new Mn(n.nodes,r)}return e},TemplateParser.prototype.getInterpolationConfig=function(e){if(e.template)return Kr.fromArray(e.template.interpolation)},TemplateParser.prototype._assertNoReferenceDuplicationOnTemplate=function(e,t){var r=[];e.filter(function(e){return!!e.references}).forEach(function(e){return e.references.forEach(function(e){var n=e.name;if(r.indexOf(n)<0)r.push(n);else{var i=new Ws('Reference "#'+n+'" is defined several times',e.sourceSpan,Zr.FATAL);t.push(i)}})})},TemplateParser.decorators=[{type:r.Injectable}],TemplateParser.ctorParameters=[{type:nn},{type:ns},{type:Li},{type:wo},{type:Array,decorators:[{type:r.Optional},{type:r.Inject,args:[Us]}]}],TemplateParser}(),zs=function(){function TemplateParseVisitor(e,t,r,n,i,o){var s=this;this.providerViewContext=e,this._schemas=n,this._exprParser=i,this._schemaRegistry=o,this.selectorMatcher=new V,this.errors=[],this.directivesIndex=new Map,this.ngContentCount=0,this.pipesByName=new Map;var a=e.component.template;a&&a.interpolation&&(this._interpolationConfig={start:a.interpolation[0],end:a.interpolation[1]}),t.forEach(function(e,t){var r=O.parse(e.selector);s.selectorMatcher.addSelectables(r,e),s.directivesIndex.set(e,t)}),r.forEach(function(e){return s.pipesByName.set(e.name,e)})}return TemplateParseVisitor.prototype._reportError=function(e,t,r){void 0===r&&(r=Zr.FATAL),this.errors.push(new Ws(e,t,r))},TemplateParseVisitor.prototype._reportParserErrors=function(e,t){for(var r=0,n=e;r<n.length;r++){var i=n[r];this._reportError(i.message,t)}},TemplateParseVisitor.prototype._parseInterpolation=function(e,t){var r=t.start.toString();try{var n=this._exprParser.parseInterpolation(e,r,this._interpolationConfig);if(n&&this._reportParserErrors(n.errors,t),this._checkPipes(n,t),isPresent(n)&&n.ast.expressions.length>Xi)throw new Error("Only support at most "+Xi+" interpolation values!");return n}catch(i){return this._reportError(""+i,t),this._exprParser.wrapLiteralPrimitive("ERROR",r)}},TemplateParseVisitor.prototype._parseAction=function(e,t){var r=t.start.toString();try{var n=this._exprParser.parseAction(e,r,this._interpolationConfig);return n&&this._reportParserErrors(n.errors,t),!n||n.ast instanceof Ct?(this._reportError("Empty expressions are not allowed",t),this._exprParser.wrapLiteralPrimitive("ERROR",r)):(this._checkPipes(n,t),n)}catch(i){return this._reportError(""+i,t),this._exprParser.wrapLiteralPrimitive("ERROR",r)}},TemplateParseVisitor.prototype._parseBinding=function(e,t){var r=t.start.toString();try{var n=this._exprParser.parseBinding(e,r,this._interpolationConfig);return n&&this._reportParserErrors(n.errors,t),this._checkPipes(n,t),n}catch(i){return this._reportError(""+i,t),this._exprParser.wrapLiteralPrimitive("ERROR",r)}},TemplateParseVisitor.prototype._parseTemplateBindings=function(e,t){var r=this,n=t.start.toString();try{var i=this._exprParser.parseTemplateBindings(e,n);return this._reportParserErrors(i.errors,t),i.templateBindings.forEach(function(e){isPresent(e.expression)&&r._checkPipes(e.expression,t)}),i.warnings.forEach(function(e){r._reportError(e,t,Zr.WARNING)}),i.templateBindings}catch(o){return this._reportError(""+o,t),[]}},TemplateParseVisitor.prototype._checkPipes=function(e,t){var r=this;if(isPresent(e)){var n=new Js;e.visit(n),n.pipes.forEach(function(e){r.pipesByName.has(e)||r._reportError("The pipe '"+e+"' could not be found",t)})}},TemplateParseVisitor.prototype.visitExpansion=function(e,t){return null},TemplateParseVisitor.prototype.visitExpansionCase=function(e,t){return null},TemplateParseVisitor.prototype.visitText=function(e,t){var r=t.findNgContentIndex(Bs),o=this._parseInterpolation(e.value,e.sourceSpan);return isPresent(o)?new i(o,r,e.sourceSpan):new n(e.value,r,e.sourceSpan)},TemplateParseVisitor.prototype.visitAttribute=function(e,t){return new o(e.name,e.value,e.sourceSpan)},TemplateParseVisitor.prototype.visitComment=function(e,t){return null},TemplateParseVisitor.prototype.visitElement=function(e,t){var r=this,n=e.name,i=preparseElement(e);if(i.type===Jn.SCRIPT||i.type===Jn.STYLE)return null;if(i.type===Jn.STYLESHEET&&isStyleUrlResolvable(i.hrefAttr))return null;var o=[],s=[],a=[],u=[],l=[],h=[],f=[],d=[],y=[],v=!1,g=[],_=splitNsName(n.toLowerCase())[1],b=_==Ns;e.attrs.forEach(function(e){var t=r._parseAttr(b,e,o,s,l,h,a,u),n=r._parseInlineTemplateBinding(e,d,f,y);n&&v&&r._reportError("Can't have multiple template bindings on one element. Use only one attribute named 'template' or prefixed with *",e.sourceSpan),t||n||(g.push(r.visitAttribute(e,null)),o.push([e.name,e.value])),n&&(v=!0)});var w=createElementCssSelector(n,o),E=this._parseDirectives(this.selectorMatcher,w),C=E.directives,S=E.matchElement,P=[],A=this._createDirectiveAsts(b,e.name,C,s,a,e.sourceSpan,P),x=this._createElementPropertyAsts(e.name,s,A).concat(l),T=t.isTemplateElement||v,M=new ts(this.providerViewContext,t.providerContext,T,A,g,P,e.sourceSpan),I=visitAll(i.nonBindable?$s:this,e.children,Zs.create(b,A,b?t.providerContext:M));M.afterElement();var D,N=isPresent(i.projectAs)?O.parse(i.projectAs)[0]:w,V=t.findNgContentIndex(N);if(i.type===Jn.NG_CONTENT)e.children&&!e.children.every(_isEmptyTextNode)&&this._reportError("<ng-content> element cannot have content.",e.sourceSpan),D=new m((this.ngContentCount++),v?null:V,e.sourceSpan);else if(b)this._assertAllEventsPublishedByDirectives(A,h),this._assertNoComponentsNorElementBindingsOnTemplate(A,x,e.sourceSpan),D=new p(g,h,P,u,M.transformedDirectiveAsts,M.transformProviders,M.transformedHasViewContainer,I,v?null:V,e.sourceSpan);else{this._assertElementExists(S,e),this._assertOnlyOneComponent(A,e.sourceSpan);var R=v?null:t.findNgContentIndex(N);D=new c(n,g,x,h,P,M.transformedDirectiveAsts,M.transformProviders,M.transformedHasViewContainer,I,v?null:R,e.sourceSpan,e.endSourceSpan),this._findComponentDirectives(A).forEach(function(e){return r._validateElementAnimationInputOutputs(e.hostProperties,e.hostEvents,e.directive.template)});var k=M.viewContext.component.template;this._validateElementAnimationInputOutputs(x,h,k)}if(v){var L=createElementCssSelector(Ns,d),F=this._parseDirectives(this.selectorMatcher,L).directives,j=this._createDirectiveAsts(!0,e.name,F,f,[],e.sourceSpan,[]),B=this._createElementPropertyAsts(e.name,f,j);this._assertNoComponentsNorElementBindingsOnTemplate(j,B,e.sourceSpan);var U=new ts(this.providerViewContext,t.providerContext,t.isTemplateElement,j,[],[],e.sourceSpan);U.afterElement(),D=new p([],[],[],y,U.transformedDirectiveAsts,U.transformProviders,U.transformedHasViewContainer,[D],V,e.sourceSpan)}return D},TemplateParseVisitor.prototype._validateElementAnimationInputOutputs=function(e,t,r){var n=this,i=new Set;r.animations.forEach(function(e){i.add(e.name)});var o=e.filter(function(e){return e.isAnimation});o.forEach(function(e){var t=e.name;i.has(t)||n._reportError("Couldn't find an animation entry for \""+t+'"',e.sourceSpan)}),t.forEach(function(e){if(e.isAnimation){var t=o.find(function(t){return t.name==e.name});t||n._reportError("Unable to listen on (@"+e.name+"."+e.phase+") because the animation trigger [@"+e.name+"] isn't being used on the same element",e.sourceSpan)}})},TemplateParseVisitor.prototype._parseInlineTemplateBinding=function(e,t,r,n){var i=null;if(this._normalizeAttributeName(e.name)==Os)i=e.value;else if(e.name.startsWith(Vs)){var o=e.name.substring(Vs.length);i=0==e.value.length?o:o+" "+e.value}if(isPresent(i)){for(var s=this._parseTemplateBindings(i,e.sourceSpan),a=0;a<s.length;a++){var u=s[a];u.keyIsVar?n.push(new l(u.key,u.name,e.sourceSpan)):isPresent(u.expression)?this._parsePropertyAst(u.key,u.expression,e.sourceSpan,t,r):(t.push([u.key,""]),this._parseLiteralAttr(u.key,null,e.sourceSpan,r))}return!0}return!1},TemplateParseVisitor.prototype._parseAttr=function(e,t,r,n,i,o,s,a){var u=this._normalizeAttributeName(t.name),l=t.value,c=t.sourceSpan,p=u.match(bs),h=!1;if(null!==p)if(h=!0,isPresent(p[ws]))this._parsePropertyOrAnimation(p[xs],l,c,r,n,i);else if(p[Es])if(e){var f=p[xs];this._parseVariable(f,l,c,a)}else this._reportError('"let-" is only supported on template elements.',c);else if(p[Cs]){var f=p[xs];this._parseReference(f,l,c,s)}else p[Ss]?this._parseEventOrAnimationEvent(p[xs],l,c,r,o):p[Ps]?(this._parsePropertyOrAnimation(p[xs],l,c,r,n,i),this._parseAssignmentEvent(p[xs],l,c,r,o)):p[As]?(_isAnimationLabel(u)&&isPresent(l)&&l.length>0&&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.',c,Zr.FATAL),this._parseAnimation(p[xs],l,c,r,i)):p[Ts]?(this._parsePropertyOrAnimation(p[Ts],l,c,r,n,i),this._parseAssignmentEvent(p[Ts],l,c,r,o)):p[Ms]?this._parsePropertyOrAnimation(p[Ms],l,c,r,n,i):p[Is]&&this._parseEventOrAnimationEvent(p[Is],l,c,r,o);else h=this._parsePropertyInterpolation(u,l,c,r,n);return h||this._parseLiteralAttr(u,l,c,n),h},TemplateParseVisitor.prototype._normalizeAttributeName=function(e){return/^data-/i.test(e)?e.substring(5):e},TemplateParseVisitor.prototype._parseVariable=function(e,t,r,n){e.indexOf("-")>-1&&this._reportError('"-" is not allowed in variable names',r),n.push(new l(e,t,r))},TemplateParseVisitor.prototype._parseReference=function(e,t,r,n){e.indexOf("-")>-1&&this._reportError('"-" is not allowed in reference names',r),n.push(new Qs(e,t,r))},TemplateParseVisitor.prototype._parsePropertyOrAnimation=function(e,t,r,n,i,o){var s=Ds.length,a=_isAnimationLabel(e),u=1;e.substring(0,s)==Ds&&(a=!0,u=s),a?this._parseAnimation(e.substr(u),t,r,n,o):this._parsePropertyAst(e,this._parseBinding(t,r),r,n,i)},TemplateParseVisitor.prototype._parseAnimation=function(e,n,i,o,a){isPresent(n)&&0!=n.length||(n="null");var u=this._parseBinding(n,i);o.push([e,u.source]),a.push(new s(e,t.PropertyBindingType.Animation,r.SecurityContext.NONE,u,null,i))},TemplateParseVisitor.prototype._parsePropertyInterpolation=function(e,t,r,n,i){var o=this._parseInterpolation(t,r);return!!isPresent(o)&&(this._parsePropertyAst(e,o,r,n,i),!0)},TemplateParseVisitor.prototype._parsePropertyAst=function(e,t,r,n,i){n.push([e,t.source]),i.push(new Ks(e,t,(!1),r))},TemplateParseVisitor.prototype._parseAssignmentEvent=function(e,t,r,n,i){this._parseEventOrAnimationEvent(e+"Change",t+"=$event",r,n,i)},TemplateParseVisitor.prototype._parseEventOrAnimationEvent=function(e,t,r,n,i){_isAnimationLabel(e)?(e=e.substr(1),this._parseAnimationEvent(e,t,r,i)):this._parseEvent(e,t,r,n,i)},TemplateParseVisitor.prototype._parseAnimationEvent=function(e,t,r,n){var i=splitAtPeriod(e,[e,""]),o=i[0],s=i[1].toLowerCase();if(s)switch(s){case"start":case"done":var u=this._parseAction(t,r);n.push(new a(o,null,s,u,r));break;default:this._reportError('The provided animation output phase value "'+s+'" for "@'+o+'" is not supported (use start or done)',r)}else this._reportError("The animation trigger output event (@"+o+") is missing its phase value name (start or done are currently supported)",r)},TemplateParseVisitor.prototype._parseEvent=function(e,t,r,n,i){var o=splitAtColon(e,[null,e]),s=o[0],u=o[1],l=this._parseAction(t,r);n.push([e,l.source]),i.push(new a(u,s,null,l,r))},TemplateParseVisitor.prototype._parseLiteralAttr=function(e,t,r,n){n.push(new Ks(e,this._exprParser.wrapLiteralPrimitive(t,""),(!0),r))},TemplateParseVisitor.prototype._parseDirectives=function(e,t){var r=this,n=new Array(this.directivesIndex.size),i=!1;return e.match(t,function(e,t){n[r.directivesIndex.get(t)]=t,i=i||e.hasElementSelector()}),{directives:n.filter(function(e){return!!e}),matchElement:i}},TemplateParseVisitor.prototype._createDirectiveAsts=function(e,t,r,n,i,o,s){var a=this,l=new Set,c=null,p=r.map(function(e){var r=new ln(o.start,o.end,"Directive "+e.type.name);e.isComponent&&(c=e);var p=[],h=[],d=[];return a._createDirectiveHostPropertyAsts(t,e.hostProperties,r,p),a._createDirectiveHostEventAsts(e.hostListeners,r,h),a._createDirectivePropertyAsts(e.inputs,n,d),i.forEach(function(t){(0===t.value.length&&e.isComponent||e.exportAs==t.value)&&(s.push(new u(t.name,identifierToken(e.type),t.sourceSpan)),l.add(t.name))}),new f(e,d,p,h,r)});return i.forEach(function(t){if(t.value.length>0)l.has(t.name)||a._reportError('There is no directive with "exportAs" set to "'+t.value+'"',t.sourceSpan);else if(!c){var r=null;e&&(r=resolveIdentifierToken(Go.TemplateRef)),s.push(new u(t.name,r,t.sourceSpan))}}),p},TemplateParseVisitor.prototype._createDirectiveHostPropertyAsts=function(e,t,r,n){var i=this;t&&Object.keys(t).forEach(function(o){var s=t[o];if(isString(s)){var a=i._parseBinding(s,r);n.push(i._createElementPropertyAst(e,o,a,r))}else i._reportError('Value of the host property binding "'+o+'" needs to be a string representing an expression but got "'+s+'" ('+typeof s+")",r)})},TemplateParseVisitor.prototype._createDirectiveHostEventAsts=function(e,t,r){var n=this;e&&Object.keys(e).forEach(function(i){var o=e[i];isString(o)?n._parseEventOrAnimationEvent(i,o,t,[],r):n._reportError('Value of the host listener "'+i+'" needs to be a string representing an expression but got "'+o+'" ('+typeof o+")",t)})},TemplateParseVisitor.prototype._createDirectivePropertyAsts=function(e,t,r){if(e){var n=new Map;t.forEach(function(e){var t=n.get(e.name);t&&!t.isLiteral||n.set(e.name,e)}),Object.keys(e).forEach(function(t){var i=e[t],o=n.get(i);o&&r.push(new h(t,o.name,o.expression,o.sourceSpan))})}},TemplateParseVisitor.prototype._createElementPropertyAsts=function(e,t,r){
var n=this,i=[],o=new Map;return r.forEach(function(e){e.inputs.forEach(function(e){o.set(e.templateName,e)})}),t.forEach(function(t){t.isLiteral||o.get(t.name)||i.push(n._createElementPropertyAst(e,t.name,t.expression,t.sourceSpan))}),i},TemplateParseVisitor.prototype._createElementPropertyAst=function(e,n,i,o){var a,u,l,c=null,p=n.split(ks);if(1===p.length){var h=p[0];if(_isAnimationLabel(h))u=h.substr(1),a=t.PropertyBindingType.Animation,l=r.SecurityContext.NONE;else if(u=this._schemaRegistry.getMappedPropName(h),l=this._schemaRegistry.securityContext(e,u),a=t.PropertyBindingType.Property,this._validatePropertyOrAttributeName(u,o,!1),!this._schemaRegistry.hasProperty(e,u,this._schemas)){var f="Can't bind to '"+u+"' since it isn't a known property of '"+e+"'.";e.indexOf("-")>-1&&(f+="\n1. If '"+e+"' is an Angular component and it has '"+u+"' input, then verify that it is part of this module."+("\n2. If '"+e+"' is a Web Component then add \"CUSTOM_ELEMENTS_SCHEMA\" to the '@NgModule.schemas' of this component to suppress this message.\n")),this._reportError(f,o)}}else if(p[0]==Ls){u=p[1],this._validatePropertyOrAttributeName(u,o,!0);var d=this._schemaRegistry.getMappedPropName(u);l=this._schemaRegistry.securityContext(e,d);var m=u.indexOf(":");if(m>-1){var y=u.substring(0,m),v=u.substring(m+1);u=mergeNsAndName(y,v)}a=t.PropertyBindingType.Attribute}else p[0]==Fs?(u=p[1],a=t.PropertyBindingType.Class,l=r.SecurityContext.NONE):p[0]==js?(c=p.length>2?p[2]:null,u=p[1],a=t.PropertyBindingType.Style,l=r.SecurityContext.STYLE):(this._reportError("Invalid property name '"+n+"'",o),a=null,l=null);return new s(u,a,l,i,c,o)},TemplateParseVisitor.prototype._validatePropertyOrAttributeName=function(e,t,r){var n=r?this._schemaRegistry.validateAttribute(e):this._schemaRegistry.validateProperty(e);n.error&&this._reportError(n.msg,t,Zr.FATAL)},TemplateParseVisitor.prototype._findComponentDirectives=function(e){return e.filter(function(e){return e.directive.isComponent})},TemplateParseVisitor.prototype._findComponentDirectiveNames=function(e){return this._findComponentDirectives(e).map(function(e){return e.directive.type.name})},TemplateParseVisitor.prototype._assertOnlyOneComponent=function(e,t){var r=this._findComponentDirectiveNames(e);r.length>1&&this._reportError("More than one component: "+r.join(","),t)},TemplateParseVisitor.prototype._assertElementExists=function(e,t){var r=t.name.replace(/^:xhtml:/,"");if(!e&&!this._schemaRegistry.hasElement(r,this._schemas)){var n="'"+r+"' is not a known element:\n"+("1. If '"+r+"' is an Angular component, then verify that it is part of this module.\n")+("2. If '"+r+"' is a Web Component then add \"CUSTOM_ELEMENTS_SCHEMA\" to the '@NgModule.schemas' of this component to suppress this message.");this._reportError(n,t.sourceSpan)}},TemplateParseVisitor.prototype._assertNoComponentsNorElementBindingsOnTemplate=function(e,t,r){var n=this,i=this._findComponentDirectiveNames(e);i.length>0&&this._reportError("Components on an embedded template: "+i.join(","),r),t.forEach(function(e){n._reportError("Property binding "+e.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 "directives" section.',r)})},TemplateParseVisitor.prototype._assertAllEventsPublishedByDirectives=function(e,t){var r=this,n=new Set;e.forEach(function(e){Object.keys(e.directive.outputs).forEach(function(t){var r=e.directive.outputs[t];n.add(r)})}),t.forEach(function(e){!isPresent(e.target)&&n.has(e.name)||r._reportError("Event binding "+e.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 "directives" section.',e.sourceSpan)})},TemplateParseVisitor}(),qs=function(){function NonBindableVisitor(){}return NonBindableVisitor.prototype.visitElement=function(e,t){var r=preparseElement(e);if(r.type===Jn.SCRIPT||r.type===Jn.STYLE||r.type===Jn.STYLESHEET)return null;var n=e.attrs.map(function(e){return[e.name,e.value]}),i=createElementCssSelector(e.name,n),o=t.findNgContentIndex(i),s=visitAll(this,e.children,Xs);return new c(e.name,visitAll(this,e.attrs),[],[],[],[],[],(!1),s,o,e.sourceSpan,e.endSourceSpan)},NonBindableVisitor.prototype.visitComment=function(e,t){return null},NonBindableVisitor.prototype.visitAttribute=function(e,t){return new o(e.name,e.value,e.sourceSpan)},NonBindableVisitor.prototype.visitText=function(e,t){var r=t.findNgContentIndex(Bs);return new n(e.value,r,e.sourceSpan)},NonBindableVisitor.prototype.visitExpansion=function(e,t){return e},NonBindableVisitor.prototype.visitExpansionCase=function(e,t){return e},NonBindableVisitor}(),Ks=function(){function BoundElementOrDirectiveProperty(e,t,r,n){this.name=e,this.expression=t,this.isLiteral=r,this.sourceSpan=n}return BoundElementOrDirectiveProperty}(),Qs=function(){function ElementOrDirectiveRef(e,t,r){this.name=e,this.value=t,this.sourceSpan=r}return ElementOrDirectiveRef}(),Zs=function(){function ElementContext(e,t,r,n){this.isTemplateElement=e,this._ngContentIndexMatcher=t,this._wildcardNgContentIndex=r,this.providerContext=n}return ElementContext.create=function(e,t,r){var n=new V,i=null,o=t.find(function(e){return e.directive.isComponent});if(o)for(var s=o.directive.template.ngContentSelectors,a=0;a<s.length;a++){var u=s[a];"*"===u?i=a:n.addSelectables(O.parse(s[a]),a)}return new ElementContext(e,n,i,r)},ElementContext.prototype.findNgContentIndex=function(e){var t=[];return this._ngContentIndexMatcher.match(e,function(e,r){t.push(r)}),t.sort(),isPresent(this._wildcardNgContentIndex)&&t.push(this._wildcardNgContentIndex),t.length>0?t[0]:null},ElementContext}(),Xs=new Zs((!0),new V,null,null),$s=new qs,Js=function(e){function PipeCollector(){e.apply(this,arguments),this.pipes=new Set}return _s(PipeCollector,e),PipeCollector.prototype.visitPipe=function(e,t){return this.pipes.add(e.name),e.exp.visit(this),this.visitAll(e.args,t),null},PipeCollector}(Gt),Ys=function(){function CompilerConfig(e){var t=void 0===e?{}:e,n=t.renderTypes,i=void 0===n?new ta:n,o=t.defaultEncapsulation,s=void 0===o?r.ViewEncapsulation.Emulated:o,a=t.genDebugInfo,u=t.logBindingUpdate,l=t.useJit,c=void 0===l||l;this.renderTypes=i,this.defaultEncapsulation=s,this._genDebugInfo=a,this._logBindingUpdate=u,this.useJit=c}return Object.defineProperty(CompilerConfig.prototype,"genDebugInfo",{get:function(){return void 0===this._genDebugInfo?r.isDevMode():this._genDebugInfo},enumerable:!0,configurable:!0}),Object.defineProperty(CompilerConfig.prototype,"logBindingUpdate",{get:function(){return void 0===this._logBindingUpdate?r.isDevMode():this._logBindingUpdate},enumerable:!0,configurable:!0}),CompilerConfig}(),ea=function(){function RenderTypes(){}return Object.defineProperty(RenderTypes.prototype,"renderer",{get:function(){return unimplemented$1()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderTypes.prototype,"renderText",{get:function(){return unimplemented$1()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderTypes.prototype,"renderElement",{get:function(){return unimplemented$1()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderTypes.prototype,"renderComment",{get:function(){return unimplemented$1()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderTypes.prototype,"renderNode",{get:function(){return unimplemented$1()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderTypes.prototype,"renderEvent",{get:function(){return unimplemented$1()},enumerable:!0,configurable:!0}),RenderTypes}(),ta=function(){function DefaultRenderTypes(){this.renderText=null,this.renderElement=null,this.renderComment=null,this.renderNode=null,this.renderEvent=null}return Object.defineProperty(DefaultRenderTypes.prototype,"renderer",{get:function(){return resolveIdentifier(Go.Renderer)},enumerable:!0,configurable:!0}),DefaultRenderTypes}(),ra=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},na=function(){function AnimationAst(){this.startTime=0,this.playTime=0}return AnimationAst}(),ia=function(e){function AnimationStateAst(){e.apply(this,arguments)}return ra(AnimationStateAst,e),AnimationStateAst}(na),oa=function(e){function AnimationEntryAst(t,r,n){e.call(this),this.name=t,this.stateDeclarations=r,this.stateTransitions=n}return ra(AnimationEntryAst,e),AnimationEntryAst.prototype.visit=function(e,t){return e.visitAnimationEntry(this,t)},AnimationEntryAst}(na),sa=function(e){function AnimationStateDeclarationAst(t,r){e.call(this),this.stateName=t,this.styles=r}return ra(AnimationStateDeclarationAst,e),AnimationStateDeclarationAst.prototype.visit=function(e,t){return e.visitAnimationStateDeclaration(this,t)},AnimationStateDeclarationAst}(ia),aa=function(){function AnimationStateTransitionExpression(e,t){this.fromState=e,this.toState=t}return AnimationStateTransitionExpression}(),ua=function(e){function AnimationStateTransitionAst(t,r){e.call(this),this.stateChanges=t,this.animation=r}return ra(AnimationStateTransitionAst,e),AnimationStateTransitionAst.prototype.visit=function(e,t){return e.visitAnimationStateTransition(this,t)},AnimationStateTransitionAst}(ia),la=function(e){function AnimationStepAst(t,r,n,i,o){e.call(this),this.startingStyles=t,this.keyframes=r,this.duration=n,this.delay=i,this.easing=o}return ra(AnimationStepAst,e),AnimationStepAst.prototype.visit=function(e,t){return e.visitAnimationStep(this,t)},AnimationStepAst}(na),ca=function(e){function AnimationStylesAst(t){e.call(this),this.styles=t}return ra(AnimationStylesAst,e),AnimationStylesAst.prototype.visit=function(e,t){return e.visitAnimationStyles(this,t)},AnimationStylesAst}(na),pa=function(e){function AnimationKeyframeAst(t,r){e.call(this),this.offset=t,this.styles=r}return ra(AnimationKeyframeAst,e),AnimationKeyframeAst.prototype.visit=function(e,t){return e.visitAnimationKeyframe(this,t)},AnimationKeyframeAst}(na),ha=function(e){function AnimationWithStepsAst(t){e.call(this),this.steps=t}return ra(AnimationWithStepsAst,e),AnimationWithStepsAst}(na),fa=function(e){function AnimationGroupAst(t){e.call(this,t)}return ra(AnimationGroupAst,e),AnimationGroupAst.prototype.visit=function(e,t){return e.visitAnimationGroup(this,t)},AnimationGroupAst}(ha),da=function(e){function AnimationSequenceAst(t){e.call(this,t)}return ra(AnimationSequenceAst,e),AnimationSequenceAst.prototype.visit=function(e,t){return e.visitAnimationSequence(this,t)},AnimationSequenceAst}(ha),ma=function(){function AnimationEntryCompileResult(e,t,r){this.name=e,this.statements=t,this.fnExp=r}return AnimationEntryCompileResult}(),ya=function(){function AnimationCompiler(){}return AnimationCompiler.prototype.compile=function(e,t){return t.map(function(t){var r=e+"_"+t.name,n=new Ma(t.name,r);return n.build(t)})},AnimationCompiler}(),va=variable("element"),ga=variable("defaultStateStyles"),_a=variable("view"),ba=_a.prop("renderer"),wa=variable("currentState"),Ea=variable("nextState"),Ca=variable("player"),Sa=variable("totalTime"),Pa=variable("startStateStyles"),Aa=variable("endStateStyles"),xa=variable("collectedStyles"),Ta=literalMap([]),Ma=function(){function _AnimationBuilder(e,t){this.animationName=e,this._fnVarName=t+"_factory",this._statesMapVarName=t+"_states",this._statesMapVar=variable(this._statesMapVarName)}return _AnimationBuilder.prototype.visitAnimationStyles=function(e,t){var r=[];return t.isExpectingFirstStyleStep&&(r.push(Pa),t.isExpectingFirstStyleStep=!1),e.styles.forEach(function(e){var t=Object.keys(e).map(function(t){return[t,literal(e[t])]});r.push(literalMap(t))}),importExpr(resolveIdentifier(Go.AnimationStyles)).instantiate([importExpr(resolveIdentifier(Go.collectAndResolveStyles)).callFn([xa,literalArr(r)])])},_AnimationBuilder.prototype.visitAnimationKeyframe=function(e,t){return importExpr(resolveIdentifier(Go.AnimationKeyframe)).instantiate([literal(e.offset),e.styles.visit(this,t)])},_AnimationBuilder.prototype.visitAnimationStep=function(e,t){var r=this;if(t.endStateAnimateStep===e)return this._visitEndStateAnimation(e,t);var n=e.startingStyles.visit(this,t),i=e.keyframes.map(function(e){return e.visit(r,t)});return this._callAnimateMethod(e,n,literalArr(i),t)},_AnimationBuilder.prototype._visitEndStateAnimation=function(e,t){var r=this,n=e.startingStyles.visit(this,t),i=e.keyframes.map(function(e){return e.visit(r,t)}),o=importExpr(resolveIdentifier(Go.balanceAnimationKeyframes)).callFn([xa,Aa,literalArr(i)]);return this._callAnimateMethod(e,n,o,t)},_AnimationBuilder.prototype._callAnimateMethod=function(e,t,r,n){return n.totalTransitionTime+=e.duration+e.delay,ba.callMethod("animate",[va,t,r,literal(e.duration),literal(e.delay),literal(e.easing)])},_AnimationBuilder.prototype.visitAnimationSequence=function(e,t){var r=this,n=e.steps.map(function(e){return e.visit(r,t)});return importExpr(resolveIdentifier(Go.AnimationSequencePlayer)).instantiate([literalArr(n)])},_AnimationBuilder.prototype.visitAnimationGroup=function(e,t){var r=this,n=e.steps.map(function(e){return e.visit(r,t)});return importExpr(resolveIdentifier(Go.AnimationGroupPlayer)).instantiate([literalArr(n)])},_AnimationBuilder.prototype.visitAnimationStateDeclaration=function(e,t){var r={};_getStylesArray(e).forEach(function(e){Object.keys(e).forEach(function(t){r[t]=e[t]})}),t.stateMap.registerState(e.stateName,r)},_AnimationBuilder.prototype.visitAnimationStateTransition=function(e,t){var r=e.animation.steps,n=r[r.length-1];_isEndStateAnimateStep(n)&&(t.endStateAnimateStep=n),t.totalTransitionTime=0,t.isExpectingFirstStyleStep=!0;var i=[];e.stateChanges.forEach(function(e){i.push(_compareToAnimationStateExpr(wa,e.fromState).and(_compareToAnimationStateExpr(Ea,e.toState))),e.fromState!=Io&&t.stateMap.registerState(e.fromState),e.toState!=Io&&t.stateMap.registerState(e.toState)});var o=e.animation.visit(this,t),s=i.reduce(function(e,t){return e.or(t)}),a=Ca.equals(we).and(s),u=Ca.set(o).toStmt(),l=Sa.set(literal(t.totalTransitionTime)).toStmt();return new Oe(a,[u,l])},_AnimationBuilder.prototype.visitAnimationEntry=function(e,t){var r=this;e.stateDeclarations.forEach(function(e){return e.visit(r,t)}),t.stateMap.registerState(Do,{});var n=[];n.push(_a.callMethod("cancelActiveAnimation",[va,literal(this.animationName),Ea.equals(literal(No))]).toStmt()),n.push(xa.set(Ta).toDeclStmt()),n.push(Ca.set(we).toDeclStmt()),n.push(Sa.set(literal(0)).toDeclStmt()),n.push(ga.set(this._statesMapVar.key(literal(Do))).toDeclStmt()),n.push(Pa.set(this._statesMapVar.key(wa)).toDeclStmt()),n.push(new Oe(Pa.equals(we),[Pa.set(ga).toStmt()])),n.push(Aa.set(this._statesMapVar.key(Ea)).toDeclStmt()),n.push(new Oe(Aa.equals(we),[Aa.set(ga).toStmt()]));var i=importExpr(resolveIdentifier(Go.renderStyles));return n.push(i.callFn([va,ba,importExpr(resolveIdentifier(Go.clearStyles)).callFn([Pa])]).toStmt()),e.stateTransitions.forEach(function(e){return n.push(e.visit(r,t))}),n.push(new Oe(Ca.equals(we),[Ca.set(importExpr(resolveIdentifier(Go.NoOpAnimationPlayer)).instantiate([])).toStmt()])),n.push(Ca.callMethod("onDone",[fn([],[i.callFn([va,ba,importExpr(resolveIdentifier(Go.prepareFinalAnimationStyles)).callFn([Pa,Aa])]).toStmt()])]).toStmt()),n.push(_a.callMethod("queueAnimation",[va,literal(this.animationName),Ca,Sa,wa,Ea]).toStmt()),fn([new he(_a.name,importType(resolveIdentifier(Go.AppView),[z])),new he(va.name,z),new he(wa.name,z),new he(Ea.name,z)],n)},_AnimationBuilder.prototype.build=function(e){var t=new Ia,r=e.visit(this,t).toDeclStmt(this._fnVarName),n=variable(this._fnVarName),i=[];Object.keys(t.stateMap.states).forEach(function(e){var r=t.stateMap.states[e],n=Ta;if(isPresent(r)){var o=[];Object.keys(r).forEach(function(e){o.push([e,literal(r[e])])}),n=literalMap(o)}i.push([e,n])});var o=this._statesMapVar.set(literalMap(i)).toDeclStmt(),s=[o,r];return new ma(this.animationName,s,n)},_AnimationBuilder}(),Ia=function(){function _AnimationBuilderContext(){this.stateMap=new Da,this.endStateAnimateStep=null,this.isExpectingFirstStyleStep=!1,this.totalTransitionTime=0}return _AnimationBuilderContext}(),Da=function(){function _AnimationBuilderStateMap(){this._states={}}return Object.defineProperty(_AnimationBuilderStateMap.prototype,"states",{get:function(){return this._states},enumerable:!0,configurable:!0}),_AnimationBuilderStateMap.prototype.registerState=function(e,t){void 0===t&&(t=null);var r=this._states[e];r||(this._states[e]=t)},_AnimationBuilderStateMap}(),Na=v.Math,Oa=function(){function StylesCollectionEntry(e,t){this.time=e,this.value=t}return StylesCollectionEntry.prototype.matches=function(e,t){return e==this.time&&t==this.value},StylesCollectionEntry}(),Va=function(){function StylesCollection(){this.styles={}}return StylesCollection.prototype.insertAtTime=function(e,t,r){var n=new Oa(t,r),i=this.styles[e];isPresent(i)||(i=this.styles[e]=[]);for(var o=0,s=i.length-1;s>=0;s--)if(i[s].time<=t){o=s+1;break}A.insert(i,o,n)},StylesCollection.prototype.getByIndex=function(e,t){var r=this.styles[e];return isPresent(r)?t>=r.length?null:r[t]:null},StylesCollection.prototype.indexOfAtOrBeforeTime=function(e,t){var r=this.styles[e];if(isPresent(r))for(var n=r.length-1;n>=0;n--)if(r[n].time<=t)return n;return null},StylesCollection}(),Ra=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},ka=0,La=1,Fa=1e3,ja=function(e){function AnimationParseError(t){e.call(this,null,t)}return Ra(AnimationParseError,e),AnimationParseError.prototype.toString=function(){return""+this.msg},AnimationParseError}(pn),Ba=function(){function AnimationEntryParseResult(e,t){this.ast=e,this.errors=t}return AnimationEntryParseResult}(),Ua=function(){function AnimationParser(){}return AnimationParser.prototype.parseComponent=function(e){var t=this,r=[],n=e.type.name,i=new Set,o=e.template.animations.map(function(e){var o=t.parseEntry(e),s=o.ast,a=s.name;if(i.has(a)?o.errors.push(new ja('The animation trigger "'+a+'" has already been registered for the '+n+" component")):i.add(a),o.errors.length>0){var u='- Unable to parse the animation sequence for "'+a+'" on the '+n+" component due to the following errors:";o.errors.forEach(function(e){u+="\n-- "+e.msg}),r.push(u)}return s});if(r.length>0){var s=r.join("\n");throw new Error("Animation parse errors:\n"+s)}return o},AnimationParser.prototype.parseEntry=function(e){var t=[],r={},n=[],i=[];e.definitions.forEach(function(e){e instanceof Ze?_parseAnimationDeclarationStates(e,t).forEach(function(e){i.push(e),r[e.stateName]=e.styles}):n.push(e)});var o=n.map(function(e){return _parseAnimationStateTransition(e,r,t)}),s=new oa(e.name,i,o);return new Ba(s,t)},AnimationParser}(),Wa=function(){function _AnimationTimings(e,t,r){this.duration=e,this.delay=t,this.easing=r}return _AnimationTimings}(),Ha=function(){function _ValueOutputAstTransformer(){}return _ValueOutputAstTransformer.prototype.visitArray=function(e,t){var r=this;return literalArr(e.map(function(e){return visitValue(e,r,null)}),t)},_ValueOutputAstTransformer.prototype.visitStringMap=function(e,t){var r=this,n=[];return Object.keys(e).forEach(function(t){n.push([t,visitValue(e[t],r,null)])}),literalMap(n,t)},_ValueOutputAstTransformer.prototype.visitPrimitive=function(e,t){return literal(e,t)},_ValueOutputAstTransformer.prototype.visitOther=function(e,t){if(e instanceof it)return importExpr(e);if(e instanceof $)return e;throw new Error("Illegal state: Don't now how to compile value "+e)},_ValueOutputAstTransformer}(),Ga=function(){function _DebugState(e,t){this.nodeIndex=e,this.sourceAst=t}return _DebugState}(),za=new Ga(null,null),qa=function(){function CompileMethod(e){this._view=e,this._newState=za,this._currState=za,this._bodyStatements=[],this._debugEnabled=this._view.genConfig.genDebugInfo}return CompileMethod.prototype._updateDebugContextIfNeeded=function(){if(this._newState.nodeIndex!==this._currState.nodeIndex||this._newState.sourceAst!==this._currState.sourceAst){var e=this._updateDebugContext(this._newState);isPresent(e)&&this._bodyStatements.push(e.toStmt())}},CompileMethod.prototype._updateDebugContext=function(e){if(this._currState=this._newState=e,this._debugEnabled){var t=isPresent(e.sourceAst)?e.sourceAst.sourceSpan.start:null;return _e.callMethod("debug",[literal(e.nodeIndex),isPresent(t)?literal(t.line):we,isPresent(t)?literal(t.col):we])}return null},CompileMethod.prototype.resetDebugInfoExpr=function(e,t){var r=this._updateDebugContext(new Ga(e,t));return r||we},CompileMethod.prototype.resetDebugInfo=function(e,t){this._newState=new Ga(e,t)},CompileMethod.prototype.addStmt=function(e){this._updateDebugContextIfNeeded(),this._bodyStatements.push(e)},CompileMethod.prototype.addStmts=function(e){this._updateDebugContextIfNeeded(),A.addAll(this._bodyStatements,e)},CompileMethod.prototype.finish=function(){return this._bodyStatements},CompileMethod.prototype.isEmpty=function(){return 0===this._bodyStatements.length},CompileMethod}(),Ka=function(){function ViewQueryValues(e,t){this.view=e,this.values=t}return ViewQueryValues}(),Qa=function(){function CompileQuery(e,t,r,n){this.meta=e,this.queryList=t,this.ownerDirectiveExpression=r,this.view=n,this._values=new Ka(n,[])}return CompileQuery.prototype.addValue=function(e,t){for(var r=t,n=[];isPresent(r)&&r!==this.view;){var i=r.declarationElement;n.unshift(i),r=i.view}var o=getPropertyInView(this.queryList,t,this.view),s=this._values;n.forEach(function(e){var t=s.values.length>0?s.values[s.values.length-1]:null;if(t instanceof Ka&&t.view===e.embeddedView)s=t;else{var r=new Ka(e.embeddedView,[]);s.values.push(r),s=r}}),s.values.push(e),n.length>0&&t.dirtyParentQueriesMethod.addStmt(o.callMethod("setDirty",[]).toStmt())},CompileQuery.prototype._isStatic=function(){return!this._values.values.some(function(e){return e instanceof Ka})},CompileQuery.prototype.afterChildren=function(e,t){var r=createQueryValues(this._values),n=[this.queryList.callMethod("reset",[literalArr(r)]).toStmt()];if(isPresent(this.ownerDirectiveExpression)){var i=this.meta.first?this.queryList.prop("first"):this.queryList;n.push(this.ownerDirectiveExpression.prop(this.meta.propertyName).set(i).toStmt())}this.meta.first||n.push(this.queryList.callMethod("notifyOnChanges",[]).toStmt()),this.meta.first&&this._isStatic()?e.addStmts(n):t.addStmt(new Oe(this.queryList.prop("dirty"),n))},CompileQuery}(),Za=function(){function ViewTypeEnum(){}return ViewTypeEnum.fromValue=function(e){var t=resolveIdentifier(Go.ViewType);switch(e){case Zi.HOST:return _enumExpression(t,"HOST");case Zi.COMPONENT:return _enumExpression(t,"COMPONENT");case Zi.EMBEDDED:return _enumExpression(t,"EMBEDDED");default:throw Error("Inavlid ViewType value: "+e)}},ViewTypeEnum}(),Xa=function(){function ViewEncapsulationEnum(){}return ViewEncapsulationEnum.fromValue=function(e){var t=resolveIdentifier(Go.ViewEncapsulation);switch(e){case r.ViewEncapsulation.Emulated:return _enumExpression(t,"Emulated");case r.ViewEncapsulation.Native:return _enumExpression(t,"Native");case r.ViewEncapsulation.None:return _enumExpression(t,"None");default:throw Error("Inavlid ViewEncapsulation value: "+e)}},ViewEncapsulationEnum}(),$a=function(){function ChangeDetectorStatusEnum(){}return ChangeDetectorStatusEnum.fromValue=function(e){var t=resolveIdentifier(Go.ChangeDetectorStatus);switch(e){case ji.CheckOnce:return _enumExpression(t,"CheckOnce");case ji.Checked:return _enumExpression(t,"Checked");case ji.CheckAlways:return _enumExpression(t,"CheckAlways");case ji.Detached:return _enumExpression(t,"Detached");case ji.Errored:return _enumExpression(t,"Errored");case ji.Destroyed:return _enumExpression(t,"Destroyed");default:throw Error("Inavlid ChangeDetectorStatus value: "+e)}},ChangeDetectorStatusEnum}(),Ja=function(){function ViewConstructorVars(){}return ViewConstructorVars.viewUtils=variable("viewUtils"),ViewConstructorVars.parentInjector=variable("parentInjector"),ViewConstructorVars.declarationEl=variable("declarationEl"),ViewConstructorVars}(),Ya=function(){function ViewProperties(){}return ViewProperties.renderer=_e.prop("renderer"),ViewProperties.projectableNodes=_e.prop("projectableNodes"),ViewProperties.viewUtils=_e.prop("viewUtils"),ViewProperties}(),eu=function(){function EventHandlerVars(){}return EventHandlerVars.event=variable("$event"),EventHandlerVars}(),tu=function(){function InjectMethodVars(){}return InjectMethodVars.token=variable("token"),InjectMethodVars.requestNodeIndex=variable("requestNodeIndex"),InjectMethodVars.notFoundResult=variable("notFoundResult"),InjectMethodVars}(),ru=function(){function DetectChangesVars(){}return DetectChangesVars.throwOnChange=variable("throwOnChange"),DetectChangesVars.changes=variable("changes"),DetectChangesVars.changed=variable("changed"),DetectChangesVars.valUnwrapper=variable("valUnwrapper"),DetectChangesVars}(),nu=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},iu=function(){function CompileNode(e,t,r,n,i){this.parent=e,this.view=t,this.nodeIndex=r,this.renderNode=n,this.sourceAst=i}return CompileNode.prototype.isNull=function(){return!this.renderNode},CompileNode.prototype.isRootElement=function(){return this.view!=this.parent.view},CompileNode}(),ou=function(e){function CompileElement(t,r,n,i,o,s,a,u,l,c,p){var h=this;e.call(this,t,r,n,i,o),this.component=s,this._directives=a,this._resolvedProvidersArray=u,this.hasViewContainer=l,this.hasEmbeddedView=c,this._compViewExpr=null,this.instances=new Map,this._queryCount=0,this._queries=new Map,this._componentConstructorViewQueryLists=[],this.contentNodesByNgContentIndex=null,this.referenceTokens={},p.forEach(function(e){return h.referenceTokens[e.name]=e.value}),this.elementRef=importExpr(resolveIdentifier(Go.ElementRef)).instantiate([this.renderNode]),this.instances.set(resolveIdentifierToken(Go.ElementRef).reference,this.elementRef),this.injector=_e.callMethod("injector",[literal(this.nodeIndex)]),this.instances.set(resolveIdentifierToken(Go.Injector).reference,this.injector),this.instances.set(resolveIdentifierToken(Go.Renderer).reference,_e.prop("renderer")),(this.hasViewContainer||this.hasEmbeddedView||isPresent(this.component))&&this._createAppElement()}return nu(CompileElement,e),CompileElement.createNull=function(){return new CompileElement(null,null,null,null,null,null,[],[],(!1),(!1),[])},CompileElement.prototype._createAppElement=function(){var e="_appEl_"+this.nodeIndex,t=this.isRootElement()?null:this.parent.nodeIndex;this.view.fields.push(new Me(e,importType(resolveIdentifier(Go.AppElement)),[ne.Private]));var r=_e.prop(e).set(importExpr(resolveIdentifier(Go.AppElement)).instantiate([literal(this.nodeIndex),literal(t),_e,this.renderNode])).toStmt();this.view.createMethod.addStmt(r),this.appElement=_e.prop(e),this.instances.set(resolveIdentifierToken(Go.AppElement).reference,this.appElement)},CompileElement.prototype.createComponentFactoryResolver=function(e){if(e&&0!==e.length){var r=importExpr(resolveIdentifier(Go.CodegenComponentFactoryResolver)).instantiate([literalArr(e.map(function(e){return importExpr(e)})),injectFromViewParentInjector(resolveIdentifierToken(Go.ComponentFactoryResolver),!1)]),n=new st({token:resolveIdentifierToken(Go.ComponentFactoryResolver),useValue:r});this._resolvedProvidersArray.unshift(new d(n.token,(!1),(!0),[n],t.ProviderAstType.PrivateService,[],this.sourceAst.sourceSpan))}},CompileElement.prototype.setComponentView=function(e){this._compViewExpr=e,this.contentNodesByNgContentIndex=new Array(this.component.template.ngContentSelectors.length);for(var t=0;t<this.contentNodesByNgContentIndex.length;t++)this.contentNodesByNgContentIndex[t]=[]},CompileElement.prototype.setEmbeddedView=function(e){if(this.embeddedView=e,isPresent(e)){var r=importExpr(resolveIdentifier(Go.TemplateRef_)).instantiate([this.appElement,this.embeddedView.viewFactory]),n=new st({token:resolveIdentifierToken(Go.TemplateRef),useValue:r});this._resolvedProvidersArray.unshift(new d(n.token,(!1),(!0),[n],t.ProviderAstType.Builtin,[],this.sourceAst.sourceSpan))}},CompileElement.prototype.beforeChildren=function(){var e=this;this.hasViewContainer&&this.instances.set(resolveIdentifierToken(Go.ViewContainerRef).reference,this.appElement.prop("vcRef")),this._resolvedProviders=new Map,this._resolvedProvidersArray.forEach(function(t){return e._resolvedProviders.set(t.token.reference,t)}),S.values(this._resolvedProviders).forEach(function(t){var r=t.providers.map(function(r){if(isPresent(r.useExisting))return e._getDependency(t.providerType,new ot({token:r.useExisting}));if(isPresent(r.useFactory)){var n=r.deps||r.useFactory.diDeps,i=n.map(function(r){return e._getDependency(t.providerType,r)});return importExpr(r.useFactory).callFn(i)}if(isPresent(r.useClass)){var n=r.deps||r.useClass.diDeps,i=n.map(function(r){return e._getDependency(t.providerType,r)});return importExpr(r.useClass).instantiate(i,importType(r.useClass))}return convertValueToOutputAst(r.useValue)}),n="_"+t.token.name+"_"+e.nodeIndex+"_"+e.instances.size,i=createProviderProperty(n,t,r,t.multiProvider,t.eager,e);e.instances.set(t.token.reference,i)});for(var t=0;t<this._directives.length;t++){var r=this._directives[t],n=this.instances.get(identifierToken(r.type).reference);r.queries.forEach(function(t){e._addQuery(t,n)})}var i=[];if(S.values(this._resolvedProviders).forEach(function(t){var r=e._getQueriesFor(t.token);A.addAll(i,r.map(function(e){return new su(e,t.token)}))}),Object.keys(this.referenceTokens).forEach(function(t){var r,n=e.referenceTokens[t];r=isPresent(n)?e.instances.get(n.reference):e.renderNode,e.view.locals.set(t,r);var o=new ut({value:t});A.addAll(i,e._getQueriesFor(o).map(function(e){return new su(e,o)}))}),i.forEach(function(t){var r;if(isPresent(t.read.identifier))r=e.instances.get(t.read.reference);else{var n=e.referenceTokens[t.read.value];r=isPresent(n)?e.instances.get(n.reference):e.elementRef}isPresent(r)&&t.query.addValue(r,e.view)}),isPresent(this.component)){var o=isPresent(this.component)?literalArr(this._componentConstructorViewQueryLists):we,s=isPresent(this.getComponent())?this.getComponent():we;this.view.createMethod.addStmt(this.appElement.callMethod("initComponent",[s,o,this._compViewExpr]).toStmt())}},CompileElement.prototype.afterChildren=function(e){var r=this;S.values(this._resolvedProviders).forEach(function(n){var i=r.instances.get(n.token.reference),o=n.providerType===t.ProviderAstType.PrivateService?0:e;r.view.injectorGetMethod.addStmt(createInjectInternalCondition(r.nodeIndex,o,n,i))}),S.values(this._queries).forEach(function(e){return e.forEach(function(e){return e.afterChildren(r.view.createMethod,r.view.updateContentQueriesMethod)})})},CompileElement.prototype.addContentNode=function(e,t){this.contentNodesByNgContentIndex[e].push(t)},CompileElement.prototype.getComponent=function(){return isPresent(this.component)?this.instances.get(identifierToken(this.component.type).reference):null},CompileElement.prototype.getProviderTokens=function(){return S.values(this._resolvedProviders).map(function(e){return createDiTokenExpression(e.token)})},CompileElement.prototype._getQueriesFor=function(e){for(var t,r=[],n=this,i=0;!n.isNull();)t=n._queries.get(e.reference),isPresent(t)&&A.addAll(r,t.filter(function(e){return e.meta.descendants||i<=1})),n._directives.length>0&&i++,n=n.parent;return t=this.view.componentView.viewQueries.get(e.reference),isPresent(t)&&A.addAll(r,t),r},CompileElement.prototype._addQuery=function(e,t){var r="_query_"+e.selectors[0].name+"_"+this.nodeIndex+"_"+this._queryCount++,n=createQueryList(e,t,r,this.view),i=new Qa(e,n,t,this.view);return addQueryToTokenMap(this._queries,i),i},CompileElement.prototype._getLocalDependency=function(e,r){
var n=null;if(!n&&isPresent(r.query)&&(n=this._addQuery(r.query,null).queryList),!n&&isPresent(r.viewQuery)&&(n=createQueryList(r.viewQuery,null,"_viewQuery_"+r.viewQuery.selectors[0].name+"_"+this.nodeIndex+"_"+this._componentConstructorViewQueryLists.length,this.view),this._componentConstructorViewQueryLists.push(n)),isPresent(r.token)){if(!n&&r.token.reference===resolveIdentifierToken(Go.ChangeDetectorRef).reference)return e===t.ProviderAstType.Component?this._compViewExpr.prop("ref"):getPropertyInView(_e.prop("ref"),this.view,this.view.componentView);if(!n){var i=this._resolvedProviders.get(r.token.reference);if(i&&(e===t.ProviderAstType.Directive||e===t.ProviderAstType.PublicService)&&i.providerType===t.ProviderAstType.PrivateService)return null;n=this.instances.get(r.token.reference)}}return n},CompileElement.prototype._getDependency=function(e,r){var n=this,i=null;for(r.isValue&&(i=literal(r.value)),i||r.isSkipSelf||(i=this._getLocalDependency(e,r));!i&&!n.parent.isNull();)n=n.parent,i=n._getLocalDependency(t.ProviderAstType.PublicService,new ot({token:r.token}));return i||(i=injectFromViewParentInjector(r.token,r.isOptional)),i||(i=we),getPropertyInView(i,this.view,n.view)},CompileElement}(iu),su=function(){function _QueryWithRead(e,t){this.query=e,this.read=e.meta.read||t}return _QueryWithRead}(),au=function(){function CompilePipe(e,t){var r=this;this.view=e,this.meta=t,this._purePipeProxyCount=0,this.instance=_e.prop("_pipe_"+t.name+"_"+e.pipeCount++);var n=this.meta.type.diDeps.map(function(e){return e.token.reference===resolveIdentifierToken(Go.ChangeDetectorRef).reference?getPropertyInView(_e.prop("ref"),r.view,r.view.componentView):injectFromViewParentInjector(e.token,!1)});this.view.fields.push(new Me(this.instance.name,importType(this.meta.type))),this.view.createMethod.resetDebugInfo(null,null),this.view.createMethod.addStmt(_e.prop(this.instance.name).set(importExpr(this.meta.type).instantiate(n)).toStmt())}return CompilePipe.call=function(e,t,r){var n,i=e.componentView,o=_findPipeMeta(i,t);return o.pure?(n=i.purePipes.get(t),n||(n=new CompilePipe(i,o),i.purePipes.set(t,n),i.pipes.push(n))):(n=new CompilePipe(e,o),e.pipes.push(n)),n._call(e,r)},Object.defineProperty(CompilePipe.prototype,"pure",{get:function(){return this.meta.pure},enumerable:!0,configurable:!0}),CompilePipe.prototype._call=function(e,t){if(this.meta.pure){var r=_e.prop(this.instance.name+"_"+this._purePipeProxyCount++),n=getPropertyInView(this.instance,e,this.view);return createPureProxy(n.prop("transform").callMethod(J.Bind,[n]),t.length,r,e),importExpr(resolveIdentifier(Go.castByValue)).callFn([r,n.prop("transform")]).callFn(t)}return getPropertyInView(this.instance,e,this.view).callMethod("transform",t)},CompilePipe}(),uu=function(){function CompileView(e,t,r,n,i,o,s,a){var u=this;this.component=e,this.genConfig=t,this.pipeMetas=r,this.styles=n,this.animations=i,this.viewIndex=o,this.declarationElement=s,this.templateVariableBindings=a,this.nodes=[],this.rootNodesOrAppElements=[],this.bindings=[],this.classStatements=[],this.eventHandlerMethods=[],this.fields=[],this.getters=[],this.disposables=[],this.subscriptions=[],this.purePipes=new Map,this.pipes=[],this.locals=new Map,this.literalArrayCount=0,this.literalMapCount=0,this.pipeCount=0,this.createMethod=new qa(this),this.animationBindingsMethod=new qa(this),this.injectorGetMethod=new qa(this),this.updateContentQueriesMethod=new qa(this),this.dirtyParentQueriesMethod=new qa(this),this.updateViewQueriesMethod=new qa(this),this.detectChangesInInputsMethod=new qa(this),this.detectChangesRenderPropertiesMethod=new qa(this),this.afterContentLifecycleCallbacksMethod=new qa(this),this.afterViewLifecycleCallbacksMethod=new qa(this),this.destroyMethod=new qa(this),this.detachMethod=new qa(this),this.viewType=getViewType(e,o),this.className="_View_"+e.type.name+o,this.classType=importType(new it({name:this.className})),this.viewFactory=variable(getViewFactoryName(e,o)),this.viewType===Zi.COMPONENT||this.viewType===Zi.HOST?this.componentView=this:this.componentView=this.declarationElement.view.componentView,this.componentContext=getPropertyInView(_e.prop("context"),this,this.componentView);var l=new Map;if(this.viewType===Zi.COMPONENT){var c=_e.prop("context");A.forEachWithIndex(this.component.viewQueries,function(e,t){var r="_viewQuery_"+e.selectors[0].name+"_"+t,n=createQueryList(e,c,r,u),i=new Qa(e,n,c,u);addQueryToTokenMap(l,i)});var p=0;this.component.type.diDeps.forEach(function(e){if(isPresent(e.viewQuery)){var t=_e.prop("declarationAppElement").prop("componentConstructorViewQueries").key(literal(p++)),r=new Qa(e.viewQuery,t,null,u);addQueryToTokenMap(l,r)}})}this.viewQueries=l,a.forEach(function(e){u.locals.set(e[1],_e.prop("context").prop(e[0]))}),this.declarationElement.isNull()||this.declarationElement.setEmbeddedView(this)}return CompileView.prototype.callPipe=function(e,t,r){return au.call(this,e,[t].concat(r))},CompileView.prototype.getLocal=function(e){if(e==eu.event.name)return eu.event;for(var t=this,r=t.locals.get(e);!r&&isPresent(t.declarationElement.view);)t=t.declarationElement.view,r=t.locals.get(e);return isPresent(r)?getPropertyInView(r,this,t):null},CompileView.prototype.createLiteralArray=function(e){if(0===e.length)return importExpr(resolveIdentifier(Go.EMPTY_ARRAY));for(var t=_e.prop("_arr_"+this.literalArrayCount++),r=[],n=[],i=0;i<e.length;i++){var o="p"+i;r.push(new he(o)),n.push(variable(o))}return createPureProxy(fn(r,[new xe(literalArr(n))],new H(z)),e.length,t,this),t.callFn(e)},CompileView.prototype.createLiteralMap=function(e){if(0===e.length)return importExpr(resolveIdentifier(Go.EMPTY_MAP));for(var t=_e.prop("_map_"+this.literalMapCount++),r=[],n=[],i=[],o=0;o<e.length;o++){var s="p"+o;r.push(new he(s)),n.push([e[o][0],variable(s)]),i.push(e[o][1])}return createPureProxy(fn(r,[new xe(literalMap(n))],new G(z)),e.length,t,this),t.callFn(i)},CompileView.prototype.afterNodes=function(){var e=this;S.values(this.viewQueries).forEach(function(t){return t.forEach(function(t){return t.afterChildren(e.createMethod,e.updateViewQueriesMethod)})})},CompileView}(),lu=function(){function CompileBinding(e,t){this.node=e,this.sourceAst=t}return CompileBinding}(),cu=function(){function ExpressionWithWrappedValueInfo(e,t,r){this.expression=e,this.needsValueUnwrapper=t,this.temporaryCount=r}return ExpressionWithWrappedValueInfo}();!function(e){e[e.Statement=0]="Statement",e[e.Expression=1]="Expression"}(vs||(vs={}));var pu,hu=function(){function _AstToIrVisitor(e,t,r,n){this._nameResolver=e,this._implicitReceiver=t,this._valueUnwrapper=r,this.bindingIndex=n,this._nodeMap=new Map,this._resultMap=new Map,this._currentTemporary=0,this.needsValueUnwrapper=!1,this.temporaryCount=0}return _AstToIrVisitor.prototype.visitBinary=function(e,t){var r;switch(e.operation){case"+":r=B.Plus;break;case"-":r=B.Minus;break;case"*":r=B.Multiply;break;case"/":r=B.Divide;break;case"%":r=B.Modulo;break;case"&&":r=B.And;break;case"||":r=B.Or;break;case"==":r=B.Equals;break;case"!=":r=B.NotEquals;break;case"===":r=B.Identical;break;case"!==":r=B.NotIdentical;break;case"<":r=B.Lower;break;case">":r=B.Bigger;break;case"<=":r=B.LowerEquals;break;case">=":r=B.BiggerEquals;break;default:throw new Error("Unsupported operation "+e.operation)}return convertToStatementIfNeeded(t,new de(r,this.visit(e.left,vs.Expression),this.visit(e.right,vs.Expression)))},_AstToIrVisitor.prototype.visitChain=function(e,t){return ensureStatementMode(t,e),this.visitAll(e.expressions,t)},_AstToIrVisitor.prototype.visitConditional=function(e,t){var r=this.visit(e.condition,vs.Expression);return convertToStatementIfNeeded(t,r.conditional(this.visit(e.trueExp,vs.Expression),this.visit(e.falseExp,vs.Expression)))},_AstToIrVisitor.prototype.visitPipe=function(e,t){var r=this.visit(e.exp,vs.Expression),n=this.visitAll(e.args,vs.Expression),i=this._nameResolver.callPipe(e.name,r,n);return this.needsValueUnwrapper=!0,convertToStatementIfNeeded(t,this._valueUnwrapper.callMethod("unwrap",[i]))},_AstToIrVisitor.prototype.visitFunctionCall=function(e,t){return convertToStatementIfNeeded(t,this.visit(e.target,vs.Expression).callFn(this.visitAll(e.args,vs.Expression)))},_AstToIrVisitor.prototype.visitImplicitReceiver=function(e,t){return ensureExpressionMode(t,e),this._implicitReceiver},_AstToIrVisitor.prototype.visitInterpolation=function(e,t){ensureExpressionMode(t,e);for(var r=[literal(e.expressions.length)],n=0;n<e.strings.length-1;n++)r.push(literal(e.strings[n])),r.push(this.visit(e.expressions[n],vs.Expression));return r.push(literal(e.strings[e.strings.length-1])),importExpr(resolveIdentifier(Go.interpolate)).callFn(r)},_AstToIrVisitor.prototype.visitKeyedRead=function(e,t){return convertToStatementIfNeeded(t,this.visit(e.obj,vs.Expression).key(this.visit(e.key,vs.Expression)))},_AstToIrVisitor.prototype.visitKeyedWrite=function(e,t){var r=this.visit(e.obj,vs.Expression),n=this.visit(e.key,vs.Expression),i=this.visit(e.value,vs.Expression);return convertToStatementIfNeeded(t,r.key(n).set(i))},_AstToIrVisitor.prototype.visitLiteralArray=function(e,t){return convertToStatementIfNeeded(t,this._nameResolver.createLiteralArray(this.visitAll(e.expressions,t)))},_AstToIrVisitor.prototype.visitLiteralMap=function(e,t){for(var r=[],n=0;n<e.keys.length;n++)r.push([e.keys[n],this.visit(e.values[n],vs.Expression)]);return convertToStatementIfNeeded(t,this._nameResolver.createLiteralMap(r))},_AstToIrVisitor.prototype.visitLiteralPrimitive=function(e,t){return convertToStatementIfNeeded(t,literal(e.value))},_AstToIrVisitor.prototype.visitMethodCall=function(e,t){var r=this.leftMostSafeNode(e);if(r)return this.convertSafeAccess(e,r,t);var n=this.visitAll(e.args,vs.Expression),i=null,o=this.visit(e.receiver,vs.Expression);if(o===this._implicitReceiver){var s=this._nameResolver.getLocal(e.name);isPresent(s)&&(i=s.callFn(n))}return isBlank(i)&&(i=o.callMethod(e.name,n)),convertToStatementIfNeeded(t,i)},_AstToIrVisitor.prototype.visitPrefixNot=function(e,t){return convertToStatementIfNeeded(t,not(this.visit(e.expression,vs.Expression)))},_AstToIrVisitor.prototype.visitPropertyRead=function(e,t){var r=this.leftMostSafeNode(e);if(r)return this.convertSafeAccess(e,r,t);var n=null,i=this.visit(e.receiver,vs.Expression);return i===this._implicitReceiver&&(n=this._nameResolver.getLocal(e.name)),isBlank(n)&&(n=i.prop(e.name)),convertToStatementIfNeeded(t,n)},_AstToIrVisitor.prototype.visitPropertyWrite=function(e,t){var r=this.visit(e.receiver,vs.Expression);if(r===this._implicitReceiver){var n=this._nameResolver.getLocal(e.name);if(isPresent(n))throw new Error("Cannot assign to a reference or variable!")}return convertToStatementIfNeeded(t,r.prop(e.name).set(this.visit(e.value,vs.Expression)))},_AstToIrVisitor.prototype.visitSafePropertyRead=function(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)},_AstToIrVisitor.prototype.visitSafeMethodCall=function(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)},_AstToIrVisitor.prototype.visitAll=function(e,t){var r=this;return e.map(function(e){return r.visit(e,t)})},_AstToIrVisitor.prototype.visitQuote=function(e,t){throw new Error("Quotes are not supported for evaluation!")},_AstToIrVisitor.prototype.visit=function(e,t){var r=this._resultMap.get(e);return r?r:(this._nodeMap.get(e)||e).visit(this,t)},_AstToIrVisitor.prototype.convertSafeAccess=function(e,t,r){var n,i=this.visit(t.receiver,vs.Expression);this.needsTemporary(t.receiver)&&(n=this.allocateTemporary(),i=n.set(i),this._resultMap.set(t.receiver,n));var o=i.isBlank();t instanceof Bt?this._nodeMap.set(t,new jt(t.span,t.receiver,t.name,t.args)):this._nodeMap.set(t,new xt(t.span,t.receiver,t.name));var s=this.visit(e,vs.Expression);return this._nodeMap.delete(t),n&&this.releaseTemporary(n),convertToStatementIfNeeded(r,o.conditional(literal(null),s))},_AstToIrVisitor.prototype.leftMostSafeNode=function(e){var t=this,r=function(e,r){return(t._nodeMap.get(r)||r).visit(e)};return e.visit({visitBinary:function(e){return null},visitChain:function(e){return null},visitConditional:function(e){return null},visitFunctionCall:function(e){return null},visitImplicitReceiver:function(e){return null},visitInterpolation:function(e){return null},visitKeyedRead:function(e){return r(this,e.obj)},visitKeyedWrite:function(e){return null},visitLiteralArray:function(e){return null},visitLiteralMap:function(e){return null},visitLiteralPrimitive:function(e){return null},visitMethodCall:function(e){return r(this,e.receiver)},visitPipe:function(e){return null},visitPrefixNot:function(e){return null},visitPropertyRead:function(e){return r(this,e.receiver)},visitPropertyWrite:function(e){return null},visitQuote:function(e){return null},visitSafeMethodCall:function(e){return r(this,e.receiver)||e},visitSafePropertyRead:function(e){return r(this,e.receiver)||e}})},_AstToIrVisitor.prototype.needsTemporary=function(e){var t=this,r=function(e,r){return r&&(t._nodeMap.get(r)||r).visit(e)},n=function(e,t){return t.some(function(t){return r(e,t)})};return e.visit({visitBinary:function(e){return r(this,e.left)||r(this,e.right)},visitChain:function(e){return!1},visitConditional:function(e){return r(this,e.condition)||r(this,e.trueExp)||r(this,e.falseExp)},visitFunctionCall:function(e){return!0},visitImplicitReceiver:function(e){return!1},visitInterpolation:function(e){return n(this,e.expressions)},visitKeyedRead:function(e){return!1},visitKeyedWrite:function(e){return!1},visitLiteralArray:function(e){return!0},visitLiteralMap:function(e){return!0},visitLiteralPrimitive:function(e){return!1},visitMethodCall:function(e){return!0},visitPipe:function(e){return!0},visitPrefixNot:function(e){return r(this,e.expression)},visitPropertyRead:function(e){return!1},visitPropertyWrite:function(e){return!1},visitQuote:function(e){return!1},visitSafeMethodCall:function(e){return!0},visitSafePropertyRead:function(e){return!1}})},_AstToIrVisitor.prototype.allocateTemporary=function(){var e=this._currentTemporary++;return this.temporaryCount=Math.max(this._currentTemporary,this.temporaryCount),new Y(temporaryName(this.bindingIndex,e))},_AstToIrVisitor.prototype.releaseTemporary=function(e){if(this._currentTemporary--,e.name!=temporaryName(this.bindingIndex,this._currentTemporary))throw new Error("Temporary "+e.name+" released out of order")},_AstToIrVisitor}(),fu=function(){function CompileEventListener(e,t,r,n,i){this.compileElement=e,this.eventTarget=t,this.eventName=r,this.eventPhase=n,this._hasComponentHostListener=!1,this._actionResultExprs=[],this._method=new qa(e.view),this._methodName="_handle_"+sanitizeEventName(r)+"_"+e.nodeIndex+"_"+i,this._eventParam=new he(eu.event.name,importType(this.compileElement.view.genConfig.renderTypes.renderEvent))}return CompileEventListener.getOrCreate=function(e,t,r,n,i){var o=i.find(function(e){return e.eventTarget==t&&e.eventName==r&&e.eventPhase==n});return o||(o=new CompileEventListener(e,t,r,n,i.length),i.push(o)),o},Object.defineProperty(CompileEventListener.prototype,"methodName",{get:function(){return this._methodName},enumerable:!0,configurable:!0}),CompileEventListener.prototype.addAction=function(e,t,r){isPresent(t)&&t.isComponent&&(this._hasComponentHostListener=!0),this._method.resetDebugInfo(this.compileElement.nodeIndex,e);var n=r||this.compileElement.view.componentContext,i=convertCdStatementToIr(this.compileElement.view,n,e.handler,this.compileElement.nodeIndex),o=i.length-1;if(o>=0){var s=i[o],a=convertStmtIntoExpression(s),u=variable("pd_"+this._actionResultExprs.length);this._actionResultExprs.push(u),isPresent(a)&&(i[o]=u.set(a.cast(z).notIdentical(literal(!1))).toDeclStmt(null,[ne.Final]))}this._method.addStmts(i)},CompileEventListener.prototype.finishMethod=function(){var e=this._hasComponentHostListener?this.compileElement.appElement.prop("componentView"):_e,t=literal(!0);this._actionResultExprs.forEach(function(e){t=t.and(e)});var r=[e.callMethod("markPathToRootAsCheckOnce",[]).toStmt()].concat(this._method.finish()).concat([new xe(t)]);this.compileElement.view.eventHandlerMethods.push(new Ie(this._methodName,[this._eventParam],r,q,[ne.Private]))},CompileEventListener.prototype.listenToRenderer=function(){var e,t=_e.callMethod("eventHandler",[_e.prop(this._methodName).callMethod(J.Bind,[_e])]);e=isPresent(this.eventTarget)?Ya.renderer.callMethod("listenGlobal",[literal(this.eventTarget),literal(this.eventName),t]):Ya.renderer.callMethod("listen",[this.compileElement.renderNode,literal(this.eventName),t]);var r=variable("disposable_"+this.compileElement.view.disposables.length);this.compileElement.view.disposables.push(r),this.compileElement.view.createMethod.addStmt(r.set(e).toDeclStmt(Z,[ne.Private]))},CompileEventListener.prototype.listenToAnimation=function(){var e=_e.callMethod("eventHandler",[_e.prop(this._methodName).callMethod(J.Bind,[_e])]),t=_e.callMethod("registerAnimationOutput",[this.compileElement.renderNode,literal(this.eventName),literal(this.eventPhase),e]).toStmt();this.compileElement.view.createMethod.addStmt(t)},CompileEventListener.prototype.listenToDirective=function(e,t){var r=variable("subscription_"+this.compileElement.view.subscriptions.length);this.compileElement.view.subscriptions.push(r);var n=_e.callMethod("eventHandler",[_e.prop(this._methodName).callMethod(J.Bind,[_e])]);this.compileElement.view.createMethod.addStmt(r.set(e.prop(t).callMethod(J.SubscribeObservable,[n])).toDeclStmt(null,[ne.Final]))},CompileEventListener}(),du=_e.prop("numberOfChecks").identical(new ae(0)),mu=not(ru.throwOnChange),yu=function(){function ViewBinderVisitor(e){this.view=e,this._nodeIndex=0}return ViewBinderVisitor.prototype.visitBoundText=function(e,t){var r=this.view.nodes[this._nodeIndex++];return bindRenderText(e,r,this.view),null},ViewBinderVisitor.prototype.visitText=function(e,t){return this._nodeIndex++,null},ViewBinderVisitor.prototype.visitNgContent=function(e,t){return null},ViewBinderVisitor.prototype.visitElement=function(e,t){var r=this.view.nodes[this._nodeIndex++],n=[];return collectEventListeners(e.outputs,e.directives,r).forEach(function(e){n.push(e)}),bindRenderInputs(e.inputs,r),bindRenderOutputs(n),e.directives.forEach(function(e){var t=r.instances.get(e.directive.type.reference);bindDirectiveInputs(e,t,r),bindDirectiveDetectChangesLifecycleCallbacks(e,t,r),bindDirectiveHostProps(e,t,r),bindDirectiveOutputs(e,t,n)}),templateVisitAll(this,e.children,r),e.directives.forEach(function(e){var t=r.instances.get(e.directive.type.reference);bindDirectiveAfterContentLifecycleCallbacks(e.directive,t,r),bindDirectiveAfterViewLifecycleCallbacks(e.directive,t,r)}),e.providers.forEach(function(e){var t=r.instances.get(e.token.reference);bindInjectableDestroyLifecycleCallbacks(e,t,r)}),null},ViewBinderVisitor.prototype.visitEmbeddedTemplate=function(e,t){var r=this.view.nodes[this._nodeIndex++],n=collectEventListeners(e.outputs,e.directives,r);return e.directives.forEach(function(e){var t=r.instances.get(e.directive.type.reference);bindDirectiveInputs(e,t,r),bindDirectiveDetectChangesLifecycleCallbacks(e,t,r),bindDirectiveOutputs(e,t,n),bindDirectiveAfterContentLifecycleCallbacks(e.directive,t,r),bindDirectiveAfterViewLifecycleCallbacks(e.directive,t,r)}),e.providers.forEach(function(e){var t=r.instances.get(e.token.reference);bindInjectableDestroyLifecycleCallbacks(e,t,r)}),bindView(r.embeddedView,e.children),null},ViewBinderVisitor.prototype.visitAttr=function(e,t){return null},ViewBinderVisitor.prototype.visitDirective=function(e,t){return null},ViewBinderVisitor.prototype.visitEvent=function(e,t){return null},ViewBinderVisitor.prototype.visitReference=function(e,t){return null},ViewBinderVisitor.prototype.visitVariable=function(e,t){return null},ViewBinderVisitor.prototype.visitDirectiveProperty=function(e,t){return null},ViewBinderVisitor.prototype.visitElementProperty=function(e,t){return null},ViewBinderVisitor}(),vu="$implicit",gu="class",_u="style",bu="ng-container",wu=variable("parentRenderNode"),Eu=variable("rootSelector"),Cu=function(){function ViewFactoryDependency(e,t){this.comp=e,this.placeholder=t}return ViewFactoryDependency}(),Su=function(){function ComponentFactoryDependency(e,t){this.comp=e,this.placeholder=t}return ComponentFactoryDependency}(),Pu=function(){function ViewBuilderVisitor(e,t){this.view=e,this.targetDependencies=t,this.nestedViewCount=0}return ViewBuilderVisitor.prototype._isRootNode=function(e){return e.view!==this.view},ViewBuilderVisitor.prototype._addRootNodeAndProject=function(e){var t=_getOuterContainerOrSelf(e),r=t.parent,n=t.sourceAst.ngContentIndex,i=e instanceof ou&&e.hasViewContainer?e.appElement:null;this._isRootNode(r)?this.view.viewType!==Zi.COMPONENT&&this.view.rootNodesOrAppElements.push(i||e.renderNode):isPresent(r.component)&&isPresent(n)&&r.addContentNode(n,i||e.renderNode)},ViewBuilderVisitor.prototype._getParentRenderNode=function(e){return e=_getOuterContainerParentOrSelf(e),this._isRootNode(e)?this.view.viewType===Zi.COMPONENT?wu:we:isPresent(e.component)&&e.component.template.encapsulation!==r.ViewEncapsulation.Native?we:e.renderNode},ViewBuilderVisitor.prototype.visitBoundText=function(e,t){return this._visitText(e,"",t)},ViewBuilderVisitor.prototype.visitText=function(e,t){return this._visitText(e,e.value,t)},ViewBuilderVisitor.prototype._visitText=function(e,t,r){var n="_text_"+this.view.nodes.length;this.view.fields.push(new Me(n,importType(this.view.genConfig.renderTypes.renderText)));var i=_e.prop(n),o=new iu(r,this.view,this.view.nodes.length,i,e),s=_e.prop(n).set(Ya.renderer.callMethod("createText",[this._getParentRenderNode(r),literal(t),this.view.createMethod.resetDebugInfoExpr(this.view.nodes.length,e)])).toStmt();return this.view.nodes.push(o),this.view.createMethod.addStmt(s),this._addRootNodeAndProject(o),i},ViewBuilderVisitor.prototype.visitNgContent=function(e,t){this.view.createMethod.resetDebugInfo(null,e);var r=this._getParentRenderNode(t),n=Ya.projectableNodes.key(literal(e.index),new H(importType(this.view.genConfig.renderTypes.renderNode)));return r!==we?this.view.createMethod.addStmt(Ya.renderer.callMethod("projectNodes",[r,importExpr(resolveIdentifier(Go.flattenNestedViewRenderNodes)).callFn([n])]).toStmt()):this._isRootNode(t)?this.view.viewType!==Zi.COMPONENT&&this.view.rootNodesOrAppElements.push(n):isPresent(t.component)&&isPresent(e.ngContentIndex)&&t.addContentNode(e.ngContentIndex,n),null},ViewBuilderVisitor.prototype.visitElement=function(e,t){var r,n=this,i=this.view.nodes.length,o=this.view.createMethod.resetDebugInfoExpr(i,e);r=0===i&&this.view.viewType===Zi.HOST?_e.callMethod("selectOrCreateHostElement",[literal(e.name),Eu,o]):e.name===bu?Ya.renderer.callMethod("createTemplateAnchor",[this._getParentRenderNode(t),o]):Ya.renderer.callMethod("createElement",[this._getParentRenderNode(t),literal(e.name),o]);var s="_el_"+i;this.view.fields.push(new Me(s,importType(this.view.genConfig.renderTypes.renderElement))),this.view.createMethod.addStmt(_e.prop(s).set(r).toStmt());for(var a=_e.prop(s),u=e.directives.map(function(e){return e.directive}),l=u.find(function(e){return e.isComponent}),c=_readHtmlAttrs(e.attrs),p=_mergeHtmlAndDirectiveAttrs(c,u),h=0;h<p.length;h++){var f=p[h][0];if(e.name!==bu){var d=p[h][1];this.view.createMethod.addStmt(Ya.renderer.callMethod("setElementAttribute",[a,literal(f),literal(d)]).toStmt())}}var m=new ou(t,this.view,i,a,e,l,u,e.providers,e.hasViewContainer,(!1),e.references);this.view.nodes.push(m);var y=null;if(isPresent(l)){var v=new it({name:getViewFactoryName(l,0)});this.targetDependencies.push(new Cu(l.type,v));var g=l.entryComponents.map(function(e){var t=new it({name:e.name});return n.targetDependencies.push(new Su(e,t)),t});m.createComponentFactoryResolver(g),y=variable("compView_"+i),m.setComponentView(y),this.view.createMethod.addStmt(y.set(importExpr(v).callFn([Ya.viewUtils,m.injector,m.appElement])).toDeclStmt())}if(m.beforeChildren(),this._addRootNodeAndProject(m),templateVisitAll(this,e.children,m),m.afterChildren(this.view.nodes.length-i-1),isPresent(y)){var _;_=this.view.component.type.isHost?Ya.projectableNodes:literalArr(m.contentNodesByNgContentIndex.map(function(e){return createFlatArray(e)})),this.view.createMethod.addStmt(y.callMethod("create",[m.getComponent(),_,we]).toStmt())}return null},ViewBuilderVisitor.prototype.visitEmbeddedTemplate=function(e,t){var r=this.view.nodes.length,n="_anchor_"+r;this.view.fields.push(new Me(n,importType(this.view.genConfig.renderTypes.renderComment))),this.view.createMethod.addStmt(_e.prop(n).set(Ya.renderer.callMethod("createTemplateAnchor",[this._getParentRenderNode(t),this.view.createMethod.resetDebugInfoExpr(r,e)])).toStmt());var i=_e.prop(n),o=e.variables.map(function(e){return[e.value.length>0?e.value:vu,e.name]}),s=e.directives.map(function(e){return e.directive}),a=new ou(t,this.view,r,i,e,null,s,e.providers,e.hasViewContainer,(!0),e.references);this.view.nodes.push(a),this.nestedViewCount++;var u=new uu(this.view.component,this.view.genConfig,this.view.pipeMetas,we,this.view.animations,this.view.viewIndex+this.nestedViewCount,a,o);return this.nestedViewCount+=buildView(u,e.children,this.targetDependencies),a.beforeChildren(),this._addRootNodeAndProject(a),a.afterChildren(0),null},ViewBuilderVisitor.prototype.visitAttr=function(e,t){return null},ViewBuilderVisitor.prototype.visitDirective=function(e,t){return null},ViewBuilderVisitor.prototype.visitEvent=function(e,t){return null},ViewBuilderVisitor.prototype.visitReference=function(e,t){return null},ViewBuilderVisitor.prototype.visitVariable=function(e,t){return null},ViewBuilderVisitor.prototype.visitDirectiveProperty=function(e,t){return null},ViewBuilderVisitor.prototype.visitElementProperty=function(e,t){return null},ViewBuilderVisitor}(),Au=function(){function ViewCompileResult(e,t,r){this.statements=e,this.viewFactoryVar=t,this.dependencies=r}return ViewCompileResult}(),xu=function(){function ViewCompiler(e){this._genConfig=e,this._animationCompiler=new ya}return ViewCompiler.prototype.compileComponent=function(e,t,r,n,i){var o=[],s=new uu(e,this._genConfig,n,r,i,0,ou.createNull(),[]),a=[];return buildView(s,t,o),bindView(s,t),finishView(s,a),new Au(a,s.viewFactory.name,o)},ViewCompiler.decorators=[{type:r.Injectable}],ViewCompiler.ctorParameters=[{type:Ys}],ViewCompiler}(),Tu=function(){function SourceModule(e,t){this.moduleUrl=e,this.source=t}return SourceModule}(),Mu=function(){function NgModulesSummary(e,t){this.ngModuleByComponent=e,this.ngModules=t}return NgModulesSummary}(),Iu=function(){function OfflineCompiler(e,t,r,n,i,o,s,a,u){this._metadataResolver=e,this._directiveNormalizer=t,this._templateParser=r,this._styleCompiler=n,this._viewCompiler=i,this._ngModuleCompiler=o,this._outputEmitter=s,this._localeId=a,this._translationFormat=u,this._animationParser=new Ua,this._animationCompiler=new ya}return OfflineCompiler.prototype.analyzeModules=function(e){return analyzeModules(e,this._metadataResolver)},OfflineCompiler.prototype.clearCache=function(){this._directiveNormalizer.clearCache(),this._metadataResolver.clearCache()},OfflineCompiler.prototype.compile=function(e,t,r,n){var i=this,o=_splitTypescriptSuffix(e)[1],s=[],a=[],u=[];return a.push.apply(a,n.map(function(e){return i._compileModule(e,s)})),Promise.all(r.map(function(e){var r=i._metadataResolver.getDirectiveMetadata(e),n=t.ngModuleByComponent.get(e);if(!n)throw new Error("Cannot determine the module for component "+r.type.name+"!");return Promise.all([r].concat(n.transitiveModule.directives).map(function(e){return i._directiveNormalizer.normalizeDirective(e).asyncResult})).then(function(e){var t=e[0],r=e.slice(1);_assertComponent(t);var l=i._styleCompiler.compileComponent(t);l.externalStylesheets.forEach(function(e){u.push(i._codgenStyles(e,o))}),a.push(i._compileComponentFactory(t,o,s),i._compileComponent(t,r,n.transitiveModule.pipes,n.schemas,l.componentStylesheet,o,s))})})).then(function(){return s.length>0&&u.unshift(i._codegenSourceModule(_ngfactoryModuleUrl(e),s,a)),u})},OfflineCompiler.prototype._compileModule=function(e,t){var r=this._metadataResolver.getNgModuleMetadata(e),n=[];this._localeId&&n.push(new st({token:resolveIdentifierToken(Go.LOCALE_ID),useValue:this._localeId})),this._translationFormat&&n.push(new st({token:resolveIdentifierToken(Go.TRANSLATIONS_FORMAT),useValue:this._translationFormat}));var i=this._ngModuleCompiler.compile(r,n);return i.dependencies.forEach(function(e){e.placeholder.name=_componentFactoryName(e.comp),e.placeholder.moduleUrl=_ngfactoryModuleUrl(e.comp.moduleUrl)}),t.push.apply(t,i.statements),i.ngModuleFactoryVar},OfflineCompiler.prototype._compileComponentFactory=function(e,t,r){var n=createHostComponentMeta(e),i=this._compileComponent(n,[e],[],[],null,t,r),o=_componentFactoryName(e.type);return r.push(variable(o).set(importExpr(resolveIdentifier(Go.ComponentFactory),[importType(e.type)]).instantiate([literal(e.selector),variable(i),importExpr(e.type)],importType(resolveIdentifier(Go.ComponentFactory),[importType(e.type)],[x.Const]))).toDeclStmt(null,[ne.Final])),o},OfflineCompiler.prototype._compileComponent=function(e,t,r,n,i,o,s){var a=this._animationParser.parseComponent(e),u=this._templateParser.parse(e,e.template.template,t,r,n,e.type.name),l=i?variable(i.stylesVar):literalArr([]),c=this._animationCompiler.compile(e.type.name,a),p=this._viewCompiler.compileComponent(e,u,l,r,c);return i&&s.push.apply(s,_resolveStyleStatements(i,o)),c.forEach(function(e){e.statements.forEach(function(e){s.push(e)})}),s.push.apply(s,_resolveViewStatements(p)),p.viewFactoryVar},OfflineCompiler.prototype._codgenStyles=function(e,t){return _resolveStyleStatements(e,t),this._codegenSourceModule(_stylesModuleUrl(e.meta.moduleUrl,e.isShimmed,t),e.statements,[e.stylesVar])},OfflineCompiler.prototype._codegenSourceModule=function(e,t,r){return new Tu(e,this._outputEmitter.emitStatements(e,t,r))},OfflineCompiler}(),Du=function(){function ResourceLoader(){}return ResourceLoader.prototype.get=function(e){return null},ResourceLoader}(),Nu="asset:",Ou={provide:r.PACKAGE_ROOT_URL,useValue:"/"},Vu=function(){function UrlResolver(e){void 0===e&&(e=null),this._packagePrefix=e}return UrlResolver.prototype.resolve=function(e,t){var r=t;isPresent(e)&&e.length>0&&(r=_resolveUrl(e,r));var n=_split(r),i=this._packagePrefix;if(isPresent(i)&&isPresent(n)&&"package"==n[pu.Scheme]){var o=n[pu.Path];if(this._packagePrefix!==Nu)return i=i.replace(/\/+$/,""),o=o.replace(/^\/+/,""),i+"/"+o;var s=o.split(/\//);r="asset:"+s[0]+"/lib/"+s.slice(1).join("/")}return r},UrlResolver.decorators=[{type:r.Injectable}],UrlResolver.ctorParameters=[{type:void 0,decorators:[{type:r.Inject,args:[r.PACKAGE_ROOT_URL]}]}],UrlResolver}(),Ru=new RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");!function(e){e[e.Scheme=1]="Scheme",e[e.UserInfo=2]="UserInfo",e[e.Domain=3]="Domain",e[e.Port=4]="Port",e[e.Path=5]="Path",e[e.QueryData=6]="QueryData",e[e.Fragment=7]="Fragment"}(pu||(pu={}));var ku=function(){function DirectiveNormalizer(e,t,r,n){this._resourceLoader=e,this._urlResolver=t,this._htmlParser=r,this._config=n,this._resourceLoaderCache=new Map}return DirectiveNormalizer.prototype.clearCache=function(){this._resourceLoaderCache.clear()},DirectiveNormalizer.prototype.clearCacheFor=function(e){var t=this;e.isComponent&&(this._resourceLoaderCache.delete(e.template.templateUrl),e.template.externalStylesheets.forEach(function(e){t._resourceLoaderCache.delete(e.moduleUrl)}))},DirectiveNormalizer.prototype._fetch=function(e){var t=this._resourceLoaderCache.get(e);return t||(t=this._resourceLoader.get(e),this._resourceLoaderCache.set(e,t)),t},DirectiveNormalizer.prototype.normalizeDirective=function(e){var t=this;if(!e.isComponent)return new He(e,Promise.resolve(e));var r,n=null;if(isPresent(e.template.template))n=this.normalizeTemplateSync(e.type,e.template),r=Promise.resolve(n);else{if(!e.template.templateUrl)throw new Error("No template specified for component "+e.type.name);
r=this.normalizeTemplateAsync(e.type,e.template)}if(n&&0===n.styleUrls.length){var i=_cloneDirectiveWithTemplate(e,n);return new He(i,Promise.resolve(i))}return new He(null,r.then(function(e){return t.normalizeExternalStylesheets(e)}).then(function(t){return _cloneDirectiveWithTemplate(e,t)}))},DirectiveNormalizer.prototype.normalizeTemplateSync=function(e,t){return this.normalizeLoadedTemplate(e,t,t.template,e.moduleUrl)},DirectiveNormalizer.prototype.normalizeTemplateAsync=function(e,t){var r=this,n=this._urlResolver.resolve(e.moduleUrl,t.templateUrl);return this._fetch(n).then(function(i){return r.normalizeLoadedTemplate(e,t,i,n)})},DirectiveNormalizer.prototype.normalizeLoadedTemplate=function(e,t,n,i){var o=Kr.fromArray(t.interpolation),s=this._htmlParser.parse(n,e.name,!1,o);if(s.errors.length>0){var a=s.errors.join("\n");throw new Error("Template parse errors:\n"+a)}var u=this.normalizeStylesheet(new pt({styles:t.styles,styleUrls:t.styleUrls,moduleUrl:e.moduleUrl})),l=new Lu;visitAll(l,s.rootNodes);var c=this.normalizeStylesheet(new pt({styles:l.styles,styleUrls:l.styleUrls,moduleUrl:i})),p=t.encapsulation;isBlank(p)&&(p=this._config.defaultEncapsulation);var h=u.styles.concat(c.styles),f=u.styleUrls.concat(c.styleUrls);return p===r.ViewEncapsulation.Emulated&&0===h.length&&0===f.length&&(p=r.ViewEncapsulation.None),new ht({encapsulation:p,template:n,templateUrl:i,styles:h,styleUrls:f,externalStylesheets:t.externalStylesheets,ngContentSelectors:l.ngContentSelectors,animations:t.animations,interpolation:t.interpolation})},DirectiveNormalizer.prototype.normalizeExternalStylesheets=function(e){return this._loadMissingExternalStylesheets(e.styleUrls).then(function(t){return new ht({encapsulation:e.encapsulation,template:e.template,templateUrl:e.templateUrl,styles:e.styles,styleUrls:e.styleUrls,externalStylesheets:t,ngContentSelectors:e.ngContentSelectors,animations:e.animations,interpolation:e.interpolation})})},DirectiveNormalizer.prototype._loadMissingExternalStylesheets=function(e,t){var r=this;return void 0===t&&(t=new Map),Promise.all(e.filter(function(e){return!t.has(e)}).map(function(e){return r._fetch(e).then(function(n){var i=r.normalizeStylesheet(new pt({styles:[n],moduleUrl:e}));return t.set(e,i),r._loadMissingExternalStylesheets(i.styleUrls,t)})})).then(function(e){return S.values(t)})},DirectiveNormalizer.prototype.normalizeStylesheet=function(e){var t=this,r=e.styleUrls.filter(isStyleUrlResolvable).map(function(r){return t._urlResolver.resolve(e.moduleUrl,r)}),n=e.styles.map(function(n){var i=extractStyleUrls(t._urlResolver,e.moduleUrl,n);return r.push.apply(r,i.styleUrls),i.style});return new pt({styles:n,styleUrls:r,moduleUrl:e.moduleUrl})},DirectiveNormalizer.decorators=[{type:r.Injectable}],DirectiveNormalizer.ctorParameters=[{type:Du},{type:Vu},{type:qo},{type:Ys}],DirectiveNormalizer}(),Lu=function(){function TemplatePreparseVisitor(){this.ngContentSelectors=[],this.styles=[],this.styleUrls=[],this.ngNonBindableStackCount=0}return TemplatePreparseVisitor.prototype.visitElement=function(e,t){var r=preparseElement(e);switch(r.type){case Jn.NG_CONTENT:0===this.ngNonBindableStackCount&&this.ngContentSelectors.push(r.selectAttr);break;case Jn.STYLE:var n="";e.children.forEach(function(e){e instanceof hn&&(n+=e.value)}),this.styles.push(n);break;case Jn.STYLESHEET:this.styleUrls.push(r.hrefAttr)}return r.nonBindable&&this.ngNonBindableStackCount++,visitAll(this,e.children),r.nonBindable&&this.ngNonBindableStackCount--,null},TemplatePreparseVisitor.prototype.visitComment=function(e,t){return null},TemplatePreparseVisitor.prototype.visitAttribute=function(e,t){return null},TemplatePreparseVisitor.prototype.visitText=function(e,t){return null},TemplatePreparseVisitor.prototype.visitExpansion=function(e,t){return null},TemplatePreparseVisitor.prototype.visitExpansionCase=function(e,t){return null},TemplatePreparseVisitor}(),Fu=function(){function DirectiveResolver(e){void 0===e&&(e=Eo),this._reflector=e}return DirectiveResolver.prototype.resolve=function(e,t){void 0===t&&(t=!0);var n=this._reflector.annotations(r.resolveForwardRef(e));if(n){var i=n.find(isDirectiveMetadata);if(i){var o=this._reflector.propMetadata(e);return this._mergeWithPropertyMetadata(i,o,e)}}if(t)throw new Error("No Directive annotation found on "+stringify(e));return null},DirectiveResolver.prototype._mergeWithPropertyMetadata=function(e,t,n){var i=[],o=[],s={},a={};return Object.keys(t).forEach(function(e){t[e].forEach(function(t){if(t instanceof r.Input)t.bindingPropertyName?i.push(e+": "+t.bindingPropertyName):i.push(e);else if(t instanceof r.Output){var n=t;n.bindingPropertyName?o.push(e+": "+n.bindingPropertyName):o.push(e)}else if(t instanceof r.HostBinding){var u=t;if(u.hostPropertyName){var l=u.hostPropertyName[0];if("("===l)throw new Error("@HostBinding can not bind to events. Use @HostListener instead.");if("["===l)throw new Error("@HostBinding parameter should be a property name, 'class.<name>', or 'attr.<name>'.");s["["+u.hostPropertyName+"]"]=e}else s["["+e+"]"]=e}else if(t instanceof r.HostListener){var c=t,p=c.args||[];s["("+c.eventName+")"]=e+"("+p.join(",")+")"}else t instanceof r.Query&&(a[e]=t)})}),this._merge(e,i,o,s,a,n)},DirectiveResolver.prototype._extractPublicName=function(e){return splitAtColon(e,[null,e])[1].trim()},DirectiveResolver.prototype._merge=function(e,t,n,i,o,s){var a=this,u=t;if(e.inputs){var l=e.inputs.map(function(e){return a._extractPublicName(e)});t.forEach(function(e){var t=a._extractPublicName(e);if(l.indexOf(t)>-1)throw new Error("Input '"+t+"' defined multiple times in '"+stringify(s)+"'")}),u.unshift.apply(u,e.inputs)}var c=n;if(e.outputs){var p=e.outputs.map(function(e){return a._extractPublicName(e)});n.forEach(function(e){var t=a._extractPublicName(e);if(p.indexOf(t)>-1)throw new Error("Output event '"+t+"' defined multiple times in '"+stringify(s)+"'")}),c.unshift.apply(c,e.outputs)}var h=e.host?P.merge(e.host,i):i,f=e.queries?P.merge(e.queries,o):o;return e instanceof r.Component?new r.Component({selector:e.selector,inputs:u,outputs:c,host:h,exportAs:e.exportAs,moduleId:e.moduleId,queries:f,changeDetection:e.changeDetection,providers:e.providers,viewProviders:e.viewProviders,entryComponents:e.entryComponents,template:e.template,templateUrl:e.templateUrl,styles:e.styles,styleUrls:e.styleUrls,encapsulation:e.encapsulation,animations:e.animations,interpolation:e.interpolation}):new r.Directive({selector:e.selector,inputs:u,outputs:c,host:h,exportAs:e.exportAs,queries:f,providers:e.providers})},DirectiveResolver.decorators=[{type:r.Injectable}],DirectiveResolver.ctorParameters=[{type:Wi}],DirectiveResolver}(),ju=S.createFromPairs([[Bi.OnInit,r.OnInit],[Bi.OnDestroy,r.OnDestroy],[Bi.DoCheck,r.DoCheck],[Bi.OnChanges,r.OnChanges],[Bi.AfterContentInit,r.AfterContentInit],[Bi.AfterContentChecked,r.AfterContentChecked],[Bi.AfterViewInit,r.AfterViewInit],[Bi.AfterViewChecked,r.AfterViewChecked]]),Bu=S.createFromPairs([[Bi.OnInit,"ngOnInit"],[Bi.OnDestroy,"ngOnDestroy"],[Bi.DoCheck,"ngDoCheck"],[Bi.OnChanges,"ngOnChanges"],[Bi.AfterContentInit,"ngAfterContentInit"],[Bi.AfterContentChecked,"ngAfterContentChecked"],[Bi.AfterViewInit,"ngAfterViewInit"],[Bi.AfterViewChecked,"ngAfterViewChecked"]]),Uu=function(){function NgModuleResolver(e){void 0===e&&(e=Eo),this._reflector=e}return NgModuleResolver.prototype.resolve=function(e,t){void 0===t&&(t=!0);var r=this._reflector.annotations(e).find(_isNgModuleMetadata);if(isPresent(r))return r;if(t)throw new Error("No NgModule metadata found for '"+stringify(e)+"'.");return null},NgModuleResolver.decorators=[{type:r.Injectable}],NgModuleResolver.ctorParameters=[{type:Wi}],NgModuleResolver}(),Wu=function(){function PipeResolver(e){void 0===e&&(e=Eo),this._reflector=e}return PipeResolver.prototype.resolve=function(e,t){void 0===t&&(t=!0);var n=this._reflector.annotations(r.resolveForwardRef(e));if(isPresent(n)){var i=n.find(_isPipeMetadata);if(isPresent(i))return i}if(t)throw new Error("No Pipe decorator found on "+stringify(e));return null},PipeResolver.decorators=[{type:r.Injectable}],PipeResolver.ctorParameters=[{type:Wi}],PipeResolver}(),Hu=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},Gu=function(){function CompileMetadataResolver(e,t,r,n,i){void 0===i&&(i=Eo),this._ngModuleResolver=e,this._directiveResolver=t,this._pipeResolver=r,this._schemaRegistry=n,this._reflector=i,this._directiveCache=new Map,this._pipeCache=new Map,this._ngModuleCache=new Map,this._ngModuleOfTypes=new Map,this._anonymousTypes=new Map,this._anonymousTypeIndex=0}return CompileMetadataResolver.prototype.sanitizeTokenName=function(e){var t=stringify(e);if(t.indexOf("(")>=0){var r=this._anonymousTypes.get(e);r||(this._anonymousTypes.set(e,this._anonymousTypeIndex++),r=this._anonymousTypes.get(e)),t="anonymous_token_"+r+"_"}return sanitizeIdentifier(t)},CompileMetadataResolver.prototype.clearCacheFor=function(e){this._directiveCache.delete(e),this._pipeCache.delete(e),this._ngModuleOfTypes.delete(e),this._ngModuleCache.clear()},CompileMetadataResolver.prototype.clearCache=function(){this._directiveCache.clear(),this._pipeCache.clear(),this._ngModuleCache.clear(),this._ngModuleOfTypes.clear()},CompileMetadataResolver.prototype.getAnimationEntryMetadata=function(e){var t=this,r=e.definitions.map(function(e){return t.getAnimationStateMetadata(e)});return new Ke(e.name,r)},CompileMetadataResolver.prototype.getAnimationStateMetadata=function(e){if(e instanceof r.AnimationStateDeclarationMetadata){var t=this.getAnimationStyleMetadata(e.styles);return new Ze(e.stateNameExpr,t)}return e instanceof r.AnimationStateTransitionMetadata?new Xe(e.stateChangeExpr,this.getAnimationMetadata(e.steps)):null},CompileMetadataResolver.prototype.getAnimationStyleMetadata=function(e){return new Ye(e.offset,e.styles)},CompileMetadataResolver.prototype.getAnimationMetadata=function(e){var t=this;if(e instanceof r.AnimationStyleMetadata)return this.getAnimationStyleMetadata(e);if(e instanceof r.AnimationKeyframesSequenceMetadata)return new Je(e.steps.map(function(e){return t.getAnimationStyleMetadata(e)}));if(e instanceof r.AnimationAnimateMetadata){var n=this.getAnimationMetadata(e.styles);return new et(e.timings,n)}if(e instanceof r.AnimationWithStepsMetadata){var i=e.steps.map(function(e){return t.getAnimationMetadata(e)});return e instanceof r.AnimationGroupMetadata?new nt(i):new rt(i)}return null},CompileMetadataResolver.prototype.getDirectiveMetadata=function(e,t){var n=this;void 0===t&&(t=!0),e=r.resolveForwardRef(e);var i=this._directiveCache.get(e);if(!i){var o=this._directiveResolver.resolve(e,t);if(!o)return null;var s=null,a=null,u=[],l=staticTypeModuleUrl(e),c=[],p=o.selector;if(o instanceof r.Component){assertArrayOfStrings("styles",o.styles),assertArrayOfStrings("styleUrls",o.styleUrls),assertInterpolationSymbols("interpolation",o.interpolation);var h=o.animations?o.animations.map(function(e){return n.getAnimationEntryMetadata(e)}):null;s=new ht({encapsulation:o.encapsulation,template:o.template,templateUrl:o.templateUrl,styles:o.styles,styleUrls:o.styleUrls,animations:h,interpolation:o.interpolation}),a=o.changeDetection,o.viewProviders&&(u=this.getProvidersMetadata(o.viewProviders,c,'viewProviders for "'+stringify(e)+'"')),l=componentModuleUrl(this._reflector,e,o),o.entryComponents&&(c=flattenArray(o.entryComponents).map(function(e){return n.getTypeMetadata(e,staticTypeModuleUrl(e))}).concat(c)),p||(p=this._schemaRegistry.getDefaultComponentElementName())}else if(!p)throw new Error("Directive "+stringify(e)+" has no selector, please add it!");var f=[];isPresent(o.providers)&&(f=this.getProvidersMetadata(o.providers,c,'providers for "'+stringify(e)+'"'));var d=[],m=[];isPresent(o.queries)&&(d=this.getQueriesMetadata(o.queries,!1,e),m=this.getQueriesMetadata(o.queries,!0,e)),i=ft.create({selector:p,exportAs:o.exportAs,isComponent:!!s,type:this.getTypeMetadata(e,l),template:s,changeDetection:a,inputs:o.inputs,outputs:o.outputs,host:o.host,providers:f,viewProviders:u,queries:d,viewQueries:m,entryComponents:c}),this._directiveCache.set(e,i)}return i},CompileMetadataResolver.prototype.getNgModuleMetadata=function(e,t){var n=this;void 0===t&&(t=!0),e=r.resolveForwardRef(e);var i=this._ngModuleCache.get(e);if(!i){var o=this._ngModuleResolver.resolve(e,t);if(!o)return null;var s=[],a=[],u=[],l=[],c=[],p=[],h=[],f=[],d=[],m=[];o.imports&&flattenArray(o.imports).forEach(function(t){var r;if(isValidType(t))r=t;else if(t&&t.ngModule){var i=t;r=i.ngModule,i.providers&&h.push.apply(h,n.getProvidersMetadata(i.providers,f,"provider for the NgModule '"+stringify(r)+"'"))}if(!r)throw new Error("Unexpected value '"+stringify(t)+"' imported by the module '"+stringify(e)+"'");var o=n.getNgModuleMetadata(r,!1);if(null===o)throw new Error("Unexpected "+n._getTypeDescriptor(t)+" '"+stringify(t)+"' imported by the module '"+stringify(e)+"'");c.push(o)}),o.exports&&flattenArray(o.exports).forEach(function(t){if(!isValidType(t))throw new Error("Unexpected value '"+stringify(t)+"' exported by the module '"+stringify(e)+"'");var r,i,o;if(r=n.getDirectiveMetadata(t,!1))a.push(r);else if(i=n.getPipeMetadata(t,!1))l.push(i);else{if(!(o=n.getNgModuleMetadata(t,!1)))throw new Error("Unexpected "+n._getTypeDescriptor(t)+" '"+stringify(t)+"' exported by the module '"+stringify(e)+"'");p.push(o)}});var y=this._getTransitiveNgModuleMetadata(c,p);if(o.declarations&&flattenArray(o.declarations).forEach(function(t){if(!isValidType(t))throw new Error("Unexpected value '"+stringify(t)+"' declared by the module '"+stringify(e)+"'");var r,i;if(r=n.getDirectiveMetadata(t,!1))n._addDirectiveToModule(r,e,y,s,!0);else{if(!(i=n.getPipeMetadata(t,!1)))throw new Error("Unexpected "+n._getTypeDescriptor(t)+" '"+stringify(t)+"' declared by the module '"+stringify(e)+"'");n._addPipeToModule(i,e,y,u,!0)}}),o.providers&&h.push.apply(h,this.getProvidersMetadata(o.providers,f,"provider for the NgModule '"+stringify(e)+"'")),o.entryComponents&&f.push.apply(f,flattenArray(o.entryComponents).map(function(e){return n.getTypeMetadata(e,staticTypeModuleUrl(e))})),o.bootstrap){var v=flattenArray(o.bootstrap).map(function(t){if(!isValidType(t))throw new Error("Unexpected value '"+stringify(t)+"' used in the bootstrap property of module '"+stringify(e)+"'");return n.getTypeMetadata(t,staticTypeModuleUrl(t))});d.push.apply(d,v)}f.push.apply(f,d),o.schemas&&m.push.apply(m,flattenArray(o.schemas)),(g=y.entryComponents).push.apply(g,f),(_=y.providers).push.apply(_,h),i=new mt({type:this.getTypeMetadata(e,staticTypeModuleUrl(e)),providers:h,entryComponents:f,bootstrapComponents:d,schemas:m,declaredDirectives:s,exportedDirectives:a,declaredPipes:u,exportedPipes:l,importedModules:c,exportedModules:p,transitiveModule:y,id:o.id}),y.modules.push(i),this._verifyModule(i),this._ngModuleCache.set(e,i)}return i;var g,_},CompileMetadataResolver.prototype._verifyModule=function(e){e.exportedDirectives.forEach(function(t){if(!e.transitiveModule.directivesSet.has(t.type.reference))throw new Error("Can't export directive "+stringify(t.type.reference)+" from "+stringify(e.type.reference)+" as it was neither declared nor imported!")}),e.exportedPipes.forEach(function(t){if(!e.transitiveModule.pipesSet.has(t.type.reference))throw new Error("Can't export pipe "+stringify(t.type.reference)+" from "+stringify(e.type.reference)+" as it was neither declared nor imported!")})},CompileMetadataResolver.prototype._getTypeDescriptor=function(e){return null!==this._directiveResolver.resolve(e,!1)?"directive":null!==this._pipeResolver.resolve(e,!1)?"pipe":null!==this._ngModuleResolver.resolve(e,!1)?"module":e.provide?"provider":"value"},CompileMetadataResolver.prototype._addTypeToModule=function(e,t){var r=this._ngModuleOfTypes.get(e);if(r&&r!==t)throw new Error("Type "+stringify(e)+" is part of the declarations of 2 modules: "+stringify(r)+" and "+stringify(t)+"! "+("Please consider moving "+stringify(e)+" to a higher module that imports "+stringify(r)+" and "+stringify(t)+". ")+("You can also create a new NgModule that exports and includes "+stringify(e)+" then import that NgModule in "+stringify(r)+" and "+stringify(t)+"."));this._ngModuleOfTypes.set(e,t)},CompileMetadataResolver.prototype._getTransitiveNgModuleMetadata=function(e,t){var r=getTransitiveModules(e.concat(t),!0),n=flattenArray(r.map(function(e){return e.providers})),i=flattenArray(r.map(function(e){return e.entryComponents})),o=getTransitiveModules(e,!1),s=flattenArray(o.map(function(e){return e.exportedDirectives})),a=flattenArray(o.map(function(e){return e.exportedPipes}));return new yt(r,n,i,s,a)},CompileMetadataResolver.prototype._addDirectiveToModule=function(e,t,r,n,i){return void 0===i&&(i=!1),!(!i&&r.directivesSet.has(e.type.reference))&&(r.directivesSet.add(e.type.reference),r.directives.push(e),n.push(e),this._addTypeToModule(e.type.reference,t),!0)},CompileMetadataResolver.prototype._addPipeToModule=function(e,t,r,n,i){return void 0===i&&(i=!1),!(!i&&r.pipesSet.has(e.type.reference))&&(r.pipesSet.add(e.type.reference),r.pipes.push(e),n.push(e),this._addTypeToModule(e.type.reference,t),!0)},CompileMetadataResolver.prototype.getTypeMetadata=function(e,t,n){return void 0===n&&(n=null),e=r.resolveForwardRef(e),new lt({name:this.sanitizeTokenName(e),moduleUrl:t,reference:e,diDeps:this.getDependenciesMetadata(e,n),lifecycleHooks:Ui.filter(function(t){return hasLifecycleHook(t,e)})})},CompileMetadataResolver.prototype.getFactoryMetadata=function(e,t,n){return void 0===n&&(n=null),e=r.resolveForwardRef(e),new at({name:this.sanitizeTokenName(e),moduleUrl:t,reference:e,diDeps:this.getDependenciesMetadata(e,n)})},CompileMetadataResolver.prototype.getPipeMetadata=function(e,t){void 0===t&&(t=!0),e=r.resolveForwardRef(e);var n=this._pipeCache.get(e);if(!n){var i=this._pipeResolver.resolve(e,t);if(!i)return null;n=new dt({type:this.getTypeMetadata(e,staticTypeModuleUrl(e)),name:i.name,pure:i.pure}),this._pipeCache.set(e,n)}return n},CompileMetadataResolver.prototype.getDependenciesMetadata=function(e,t){var n=this,i=!1,o=t||this._reflector.parameters(e)||[],s=o.map(function(t){var o=!1,s=!1,a=!1,u=!1,l=!1,c=null,p=null,h=null;return Array.isArray(t)?t.forEach(function(e){e instanceof r.Host?s=!0:e instanceof r.Self?a=!0:e instanceof r.SkipSelf?u=!0:e instanceof r.Optional?l=!0:e instanceof r.Attribute?(o=!0,h=e.attributeName):e instanceof r.Query?e.isViewQuery?p=e:c=e:e instanceof r.Inject?h=e.token:isValidType(e)&&isBlank(h)&&(h=e)}):h=t,isBlank(h)?(i=!0,null):new ot({isAttribute:o,isHost:s,isSelf:a,isSkipSelf:u,isOptional:l,query:c?n.getQueryMetadata(c,null,e):null,viewQuery:p?n.getQueryMetadata(p,null,e):null,token:n.getTokenMetadata(h)})});if(i){var a=s.map(function(e){return e?stringify(e.token):"?"}).join(", ");throw new Error("Can't resolve all parameters for "+stringify(e)+": ("+a+").")}return s},CompileMetadataResolver.prototype.getTokenMetadata=function(e){e=r.resolveForwardRef(e);var t;return t=new ut(isString(e)?{value:e}:{identifier:new it({reference:e,name:this.sanitizeTokenName(e),moduleUrl:staticTypeModuleUrl(e)})})},CompileMetadataResolver.prototype.getProvidersMetadata=function(e,t,n){var i=this,o=[];return e.forEach(function(s,a){s=r.resolveForwardRef(s),s&&"object"==typeof s&&s.hasOwnProperty("provide")&&(s=new vt(s.provide,s));var u;if(Array.isArray(s))u=i.getProvidersMetadata(s,t,n);else if(s instanceof vt){var l=i.getTokenMetadata(s.token);l.reference===resolveIdentifierToken(Go.ANALYZE_FOR_ENTRY_COMPONENTS).reference?t.push.apply(t,i._getEntryComponentsFromProvider(s)):u=i.getProviderMetadata(s)}else{if(!isValidType(s)){var c=e.reduce(function(e,t,r){return r<a?e.push(""+stringify(t)):r==a?e.push("?"+stringify(t)+"?"):r==a+1&&e.push("..."),e},[]).join(", ");throw new Error("Invalid "+(n?n:"provider")+" - only instances of Provider and Type are allowed, got: ["+c+"]")}u=i.getTypeMetadata(s,staticTypeModuleUrl(s))}u&&o.push(u)}),o},CompileMetadataResolver.prototype._getEntryComponentsFromProvider=function(e){var t=this,r=[],n=[];if(e.useFactory||e.useExisting||e.useClass)throw new Error("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports useValue!");if(!e.multi)throw new Error("The ANALYZE_FOR_ENTRY_COMPONENTS token only supports 'multi = true'!");return convertToCompileValue(e.useValue,n),n.forEach(function(e){var n=t.getDirectiveMetadata(e.reference,!1);n&&r.push(n.type)}),r},CompileMetadataResolver.prototype.getProviderMetadata=function(e){var t,r=null,n=null;return e.useClass?(r=this.getTypeMetadata(e.useClass,staticTypeModuleUrl(e.useClass),e.dependencies),t=r.diDeps):e.useFactory&&(n=this.getFactoryMetadata(e.useFactory,staticTypeModuleUrl(e.useFactory),e.dependencies),t=n.diDeps),new st({token:this.getTokenMetadata(e.token),useClass:r,useValue:convertToCompileValue(e.useValue,[]),useFactory:n,useExisting:e.useExisting?this.getTokenMetadata(e.useExisting):null,deps:t,multi:e.multi})},CompileMetadataResolver.prototype.getQueriesMetadata=function(e,t,r){var n=this,i=[];return Object.keys(e).forEach(function(o){var s=e[o];s.isViewQuery===t&&i.push(n.getQueryMetadata(s,o,r))}),i},CompileMetadataResolver.prototype._queryVarBindings=function(e){return e.split(/\s*,\s*/)},CompileMetadataResolver.prototype.getQueryMetadata=function(e,t,r){var n,i=this;if("string"==typeof e.selector)n=this._queryVarBindings(e.selector).map(function(e){return i.getTokenMetadata(e)});else{if(!e.selector)throw new Error("Can't construct a query for the property \""+t+'" of "'+stringify(r)+"\" since the query selector wasn't defined.");n=[this.getTokenMetadata(e.selector)]}return new ct({selectors:n,first:e.first,descendants:e.descendants,propertyName:t,read:e.read?this.getTokenMetadata(e.read):null})},CompileMetadataResolver.decorators=[{type:r.Injectable}],CompileMetadataResolver.ctorParameters=[{type:Uu},{type:Fu},{type:Wu},{type:ns},{type:Wi}],CompileMetadataResolver}(),zu=function(e){function _CompileValueConverter(){e.apply(this,arguments)}return Hu(_CompileValueConverter,e),_CompileValueConverter.prototype.visitOther=function(e,t){var r;return r=new it(isStaticSymbol(e)?{name:e.name,moduleUrl:e.filePath,reference:e}:{reference:e}),t.push(r),r},_CompileValueConverter}(We),qu=function(){function ComponentFactoryDependency(e,t){this.comp=e,this.placeholder=t}return ComponentFactoryDependency}(),Ku=function(){function NgModuleCompileResult(e,t,r){this.statements=e,this.ngModuleFactoryVar=t,this.dependencies=r}return NgModuleCompileResult}(),Qu=function(){function NgModuleCompiler(){}return NgModuleCompiler.prototype.compile=function(e,t){var r=isPresent(e.type.moduleUrl)?"in NgModule "+e.type.name+" in "+e.type.moduleUrl:"in NgModule "+e.type.name,n=new un("",r),i=new ln(new an(n,null,null,null),new an(n,null,null,null)),o=[],s=[],a=e.transitiveModule.entryComponents.map(function(t){var r=new it({name:t.name});return e.bootstrapComponents.indexOf(t)>-1&&s.push(r),o.push(new qu(t,r)),r}),u=new Zu(e,a,s,i),l=new rs(e,t,i);l.parse().forEach(function(e){return u.addProvider(e)});var c=u.build(),p=e.type.name+"NgFactory",h=variable(p).set(importExpr(resolveIdentifier(Go.NgModuleFactory)).instantiate([variable(c.name),importExpr(e.type)],importType(resolveIdentifier(Go.NgModuleFactory),[importType(e.type)],[x.Const]))).toDeclStmt(null,[ne.Final]),f=[c,h];if(e.id){var d=importExpr(resolveIdentifier(Go.RegisterModuleFactoryFn)).callFn([literal(e.id),variable(p)]).toStmt();f.push(d)}return new Ku(f,p,o)},NgModuleCompiler.decorators=[{type:r.Injectable}],NgModuleCompiler.ctorParameters=[],NgModuleCompiler}(),Zu=function(){function _InjectorBuilder(e,t,r,n){this._ngModuleMeta=e,this._entryComponentFactories=t,this._bootstrapComponentFactories=r,this._sourceSpan=n,this._tokens=[],this._instances=new Map,this._fields=[],this._createStmts=[],this._destroyStmts=[],this._getters=[]}return _InjectorBuilder.prototype.addProvider=function(e){var t=this,r=e.providers.map(function(e){return t._getProviderValue(e)}),n="_"+e.token.name+"_"+this._instances.size,i=this._createProviderProperty(n,e,r,e.multiProvider,e.eager);e.lifecycleHooks.indexOf(Bi.OnDestroy)!==-1&&this._destroyStmts.push(i.callMethod("ngOnDestroy",[]).toStmt()),this._tokens.push(e.token),this._instances.set(e.token.reference,i)},_InjectorBuilder.prototype.build=function(){var e=this,t=this._tokens.map(function(t){var r=e._instances.get(t.reference);return new Oe($u.token.identical(createDiTokenExpression(t)),[new xe(r)])}),r=[new Ie("createInternal",[],this._createStmts.concat(new xe(this._instances.get(this._ngModuleMeta.type.reference))),importType(this._ngModuleMeta.type)),new Ie("getInternal",[new he($u.token.name,z),new he($u.notFoundResult.name,z)],t.concat([new xe($u.notFoundResult)]),z),new Ie("destroyInternal",[],this._destroyStmts)],n=new Ie(null,[new he(Xu.parent.name,importType(resolveIdentifier(Go.Injector)))],[be.callFn([variable(Xu.parent.name),literalArr(this._entryComponentFactories.map(function(e){return importExpr(e)})),literalArr(this._bootstrapComponentFactories.map(function(e){return importExpr(e)}))]).toStmt()]),i=this._ngModuleMeta.type.name+"Injector";return new Ne(i,importExpr(resolveIdentifier(Go.NgModuleInjector),[importType(this._ngModuleMeta.type)]),this._fields,this._getters,n,r)},_InjectorBuilder.prototype._getProviderValue=function(e){var t,r=this;if(isPresent(e.useExisting))t=this._getDependency(new ot({token:e.useExisting}));else if(isPresent(e.useFactory)){var n=e.deps||e.useFactory.diDeps,i=n.map(function(e){return r._getDependency(e)});t=importExpr(e.useFactory).callFn(i)}else if(isPresent(e.useClass)){var n=e.deps||e.useClass.diDeps,i=n.map(function(e){return r._getDependency(e)});t=importExpr(e.useClass).instantiate(i,importType(e.useClass))}else t=convertValueToOutputAst(e.useValue);return t},_InjectorBuilder.prototype._createProviderProperty=function(e,t,r,n,i){var o,s;if(n?(o=literalArr(r),s=new H(z)):(o=r[0],s=r[0].type),s||(s=z),i)this._fields.push(new Me(e,s)),this._createStmts.push(_e.prop(e).set(o).toStmt());else{var a="_"+e;this._fields.push(new Me(a,s));var u=[new Oe(_e.prop(a).isBlank(),[_e.prop(a).set(o).toStmt()]),new xe(_e.prop(a))];this._getters.push(new De(e,u,s))}return _e.prop(e)},_InjectorBuilder.prototype._getDependency=function(e){var t=null;if(e.isValue&&(t=literal(e.value)),e.isSkipSelf||(!e.token||e.token.reference!==resolveIdentifierToken(Go.Injector).reference&&e.token.reference!==resolveIdentifierToken(Go.ComponentFactoryResolver).reference||(t=_e),t||(t=this._instances.get(e.token.reference))),!t){var r=[createDiTokenExpression(e.token)];e.isOptional&&r.push(we),t=Xu.parent.callMethod("get",r)}return t},_InjectorBuilder}(),Xu=function(){function InjectorProps(){}return InjectorProps.parent=_e.prop("parent"),InjectorProps}(),$u=function(){function InjectMethodVars(){}return InjectMethodVars.token=variable("token"),InjectMethodVars.notFoundResult=variable("notFoundResult"),InjectMethodVars}(),Ju=/'|\\|\n|\r|\$/g,Yu=/^[$A-Z_][0-9A-Z_$]*$/i,el=variable("error"),tl=variable("stack"),rl=function(){function _EmittedLine(e){this.indent=e,this.parts=[]}return _EmittedLine}(),nl=function(){function EmitterVisitorContext(e,t){this._exportedVars=e,this._indent=t,this._classes=[],this._lines=[new rl(t)]}return EmitterVisitorContext.createRoot=function(e){return new EmitterVisitorContext(e,0)},Object.defineProperty(EmitterVisitorContext.prototype,"_currentLine",{get:function(){return this._lines[this._lines.length-1]},enumerable:!0,configurable:!0}),EmitterVisitorContext.prototype.isExportedVar=function(e){return this._exportedVars.indexOf(e)!==-1},EmitterVisitorContext.prototype.println=function(e){void 0===e&&(e=""),this.print(e,!0)},EmitterVisitorContext.prototype.lineIsEmpty=function(){return 0===this._currentLine.parts.length},EmitterVisitorContext.prototype.print=function(e,t){void 0===t&&(t=!1),e.length>0&&this._currentLine.parts.push(e),t&&this._lines.push(new rl(this._indent))},EmitterVisitorContext.prototype.removeEmptyLastLine=function(){this.lineIsEmpty()&&this._lines.pop()},EmitterVisitorContext.prototype.incIndent=function(){this._indent++,this._currentLine.indent=this._indent},EmitterVisitorContext.prototype.decIndent=function(){this._indent--,this._currentLine.indent=this._indent},EmitterVisitorContext.prototype.pushClass=function(e){this._classes.push(e)},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(){var e=this._lines;return 0===e[e.length-1].parts.length&&(e=e.slice(0,e.length-1)),e.map(function(e){return e.parts.length>0?_createIndent(e.indent)+e.parts.join(""):""}).join("\n")},EmitterVisitorContext}(),il=function(){function AbstractEmitterVisitor(e){this._escapeDollarInStrings=e}return AbstractEmitterVisitor.prototype.visitExpressionStmt=function(e,t){return e.expr.visitExpression(this,t),t.println(";"),null},AbstractEmitterVisitor.prototype.visitReturnStmt=function(e,t){return t.print("return "),e.value.visitExpression(this,t),t.println(";"),null},AbstractEmitterVisitor.prototype.visitIfStmt=function(e,t){t.print("if ("),e.condition.visitExpression(this,t),t.print(") {");var r=isPresent(e.falseCase)&&e.falseCase.length>0;return e.trueCase.length<=1&&!r?(t.print(" "),this.visitAllStatements(e.trueCase,t),t.removeEmptyLastLine(),t.print(" ")):(t.println(),t.incIndent(),this.visitAllStatements(e.trueCase,t),t.decIndent(),r&&(t.println("} else {"),t.incIndent(),this.visitAllStatements(e.falseCase,t),t.decIndent())),t.println("}"),null},AbstractEmitterVisitor.prototype.visitThrowStmt=function(e,t){return t.print("throw "),e.error.visitExpression(this,t),t.println(";"),null},AbstractEmitterVisitor.prototype.visitCommentStmt=function(e,t){var r=e.comment.split("\n");return r.forEach(function(e){t.println("// "+e)}),null},AbstractEmitterVisitor.prototype.visitWriteVarExpr=function(e,t){var r=t.lineIsEmpty();return r||t.print("("),t.print(e.name+" = "),e.value.visitExpression(this,t),r||t.print(")"),null},AbstractEmitterVisitor.prototype.visitWriteKeyExpr=function(e,t){var r=t.lineIsEmpty();return r||t.print("("),e.receiver.visitExpression(this,t),t.print("["),e.index.visitExpression(this,t),t.print("] = "),e.value.visitExpression(this,t),r||t.print(")"),null},AbstractEmitterVisitor.prototype.visitWritePropExpr=function(e,t){var r=t.lineIsEmpty();return r||t.print("("),e.receiver.visitExpression(this,t),t.print("."+e.name+" = "),e.value.visitExpression(this,t),r||t.print(")"),null},AbstractEmitterVisitor.prototype.visitInvokeMethodExpr=function(e,t){e.receiver.visitExpression(this,t);var r=e.name;return isPresent(e.builtin)&&(r=this.getBuiltinMethodName(e.builtin),isBlank(r))?null:(t.print("."+r+"("),this.visitAllExpressions(e.args,t,","),t.print(")"),null)},AbstractEmitterVisitor.prototype.visitInvokeFunctionExpr=function(e,t){return e.fn.visitExpression(this,t),t.print("("),this.visitAllExpressions(e.args,t,","),t.print(")"),null},AbstractEmitterVisitor.prototype.visitReadVarExpr=function(e,t){var r=e.name;if(isPresent(e.builtin))switch(e.builtin){case X.Super:r="super";break;case X.This:r="this";break;case X.CatchError:r=el.name;break;case X.CatchStack:r=tl.name;break;default:throw new Error("Unknown builtin variable "+e.builtin)}return t.print(r),null},AbstractEmitterVisitor.prototype.visitInstantiateExpr=function(e,t){return t.print("new "),e.classExpr.visitExpression(this,t),t.print("("),this.visitAllExpressions(e.args,t,","),t.print(")"),null},AbstractEmitterVisitor.prototype.visitLiteralExpr=function(e,t,r){void 0===r&&(r="null");var n=e.value;return isString(n)?t.print(escapeIdentifier(n,this._escapeDollarInStrings)):isBlank(n)?t.print(r):t.print(""+n),null;
},AbstractEmitterVisitor.prototype.visitConditionalExpr=function(e,t){return t.print("("),e.condition.visitExpression(this,t),t.print("? "),e.trueCase.visitExpression(this,t),t.print(": "),e.falseCase.visitExpression(this,t),t.print(")"),null},AbstractEmitterVisitor.prototype.visitNotExpr=function(e,t){return t.print("!"),e.condition.visitExpression(this,t),null},AbstractEmitterVisitor.prototype.visitBinaryOperatorExpr=function(e,t){var r;switch(e.operator){case B.Equals:r="==";break;case B.Identical:r="===";break;case B.NotEquals:r="!=";break;case B.NotIdentical:r="!==";break;case B.And:r="&&";break;case B.Or:r="||";break;case B.Plus:r="+";break;case B.Minus:r="-";break;case B.Divide:r="/";break;case B.Multiply:r="*";break;case B.Modulo:r="%";break;case B.Lower:r="<";break;case B.LowerEquals:r="<=";break;case B.Bigger:r=">";break;case B.BiggerEquals:r=">=";break;default:throw new Error("Unknown operator "+e.operator)}return t.print("("),e.lhs.visitExpression(this,t),t.print(" "+r+" "),e.rhs.visitExpression(this,t),t.print(")"),null},AbstractEmitterVisitor.prototype.visitReadPropExpr=function(e,t){return e.receiver.visitExpression(this,t),t.print("."),t.print(e.name),null},AbstractEmitterVisitor.prototype.visitReadKeyExpr=function(e,t){return e.receiver.visitExpression(this,t),t.print("["),e.index.visitExpression(this,t),t.print("]"),null},AbstractEmitterVisitor.prototype.visitLiteralArrayExpr=function(e,t){var r=e.entries.length>1;return t.print("[",r),t.incIndent(),this.visitAllExpressions(e.entries,t,",",r),t.decIndent(),t.print("]",r),null},AbstractEmitterVisitor.prototype.visitLiteralMapExpr=function(e,t){var r=this,n=e.entries.length>1;return t.print("{",n),t.incIndent(),this.visitAllObjects(function(e){t.print(escapeIdentifier(e[0],r._escapeDollarInStrings,!1)+": "),e[1].visitExpression(r,t)},e.entries,t,",",n),t.decIndent(),t.print("}",n),null},AbstractEmitterVisitor.prototype.visitAllExpressions=function(e,t,r,n){var i=this;void 0===n&&(n=!1),this.visitAllObjects(function(e){return e.visitExpression(i,t)},e,t,r,n)},AbstractEmitterVisitor.prototype.visitAllObjects=function(e,t,r,n,i){void 0===i&&(i=!1);for(var o=0;o<t.length;o++)o>0&&r.print(n,i),e(t[o]);i&&r.println()},AbstractEmitterVisitor.prototype.visitAllStatements=function(e,t){var r=this;e.forEach(function(e){return e.visitStatement(r,t)})},AbstractEmitterVisitor}(),ol=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},sl="asset://debug/lib",al=function(){function TypeScriptEmitter(e){this._importGenerator=e}return TypeScriptEmitter.prototype.emitStatements=function(e,t,r){var n=this,i=new ul(e),o=nl.createRoot(r);i.visitAllStatements(t,o);var s=[];return i.importsWithPrefixes.forEach(function(t,r){s.push("imp"+("ort * as "+t+" from '"+n._importGenerator.getImportPath(e,r)+"';"))}),s.push(o.toSource()),s.join("\n")},TypeScriptEmitter}(),ul=function(e){function _TsEmitterVisitor(t){e.call(this,!1),this._moduleUrl=t,this.importsWithPrefixes=new Map}return ol(_TsEmitterVisitor,e),_TsEmitterVisitor.prototype.visitType=function(e,t,r){void 0===r&&(r="any"),isPresent(e)?e.visitType(this,t):t.print(r)},_TsEmitterVisitor.prototype.visitLiteralExpr=function(t,r){e.prototype.visitLiteralExpr.call(this,t,r,"(null as any)")},_TsEmitterVisitor.prototype.visitLiteralArrayExpr=function(t,r){0===t.entries.length&&r.print("(");var n=e.prototype.visitLiteralArrayExpr.call(this,t,r);return 0===t.entries.length&&r.print(" as any[])"),n},_TsEmitterVisitor.prototype.visitExternalExpr=function(e,t){return this._visitIdentifier(e.value,e.typeParams,t),null},_TsEmitterVisitor.prototype.visitDeclareVarStmt=function(e,t){return t.isExportedVar(e.name)&&t.print("export "),e.hasModifier(ne.Final)?t.print("const"):t.print("var"),t.print(" "+e.name+":"),this.visitType(e.type,t),t.print(" = "),e.value.visitExpression(this,t),t.println(";"),null},_TsEmitterVisitor.prototype.visitCastExpr=function(e,t){return t.print("(<"),e.type.visitType(this,t),t.print(">"),e.value.visitExpression(this,t),t.print(")"),null},_TsEmitterVisitor.prototype.visitDeclareClassStmt=function(e,t){var r=this;return t.pushClass(e),t.isExportedVar(e.name)&&t.print("export "),t.print("class "+e.name),isPresent(e.parent)&&(t.print(" extends "),e.parent.visitExpression(this,t)),t.println(" {"),t.incIndent(),e.fields.forEach(function(e){return r._visitClassField(e,t)}),isPresent(e.constructorMethod)&&this._visitClassConstructor(e,t),e.getters.forEach(function(e){return r._visitClassGetter(e,t)}),e.methods.forEach(function(e){return r._visitClassMethod(e,t)}),t.decIndent(),t.println("}"),t.popClass(),null},_TsEmitterVisitor.prototype._visitClassField=function(e,t){e.hasModifier(ne.Private)&&t.print("/*private*/ "),t.print(e.name),t.print(":"),this.visitType(e.type,t),t.println(";")},_TsEmitterVisitor.prototype._visitClassGetter=function(e,t){e.hasModifier(ne.Private)&&t.print("private "),t.print("get "+e.name+"()"),t.print(":"),this.visitType(e.type,t),t.println(" {"),t.incIndent(),this.visitAllStatements(e.body,t),t.decIndent(),t.println("}")},_TsEmitterVisitor.prototype._visitClassConstructor=function(e,t){t.print("constructor("),this._visitParams(e.constructorMethod.params,t),t.println(") {"),t.incIndent(),this.visitAllStatements(e.constructorMethod.body,t),t.decIndent(),t.println("}")},_TsEmitterVisitor.prototype._visitClassMethod=function(e,t){e.hasModifier(ne.Private)&&t.print("private "),t.print(e.name+"("),this._visitParams(e.params,t),t.print("):"),this.visitType(e.type,t,"void"),t.println(" {"),t.incIndent(),this.visitAllStatements(e.body,t),t.decIndent(),t.println("}")},_TsEmitterVisitor.prototype.visitFunctionExpr=function(e,t){return t.print("("),this._visitParams(e.params,t),t.print("):"),this.visitType(e.type,t,"void"),t.println(" => {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.print("}"),null},_TsEmitterVisitor.prototype.visitDeclareFunctionStmt=function(e,t){return t.isExportedVar(e.name)&&t.print("export "),t.print("function "+e.name+"("),this._visitParams(e.params,t),t.print("):"),this.visitType(e.type,t,"void"),t.println(" {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.println("}"),null},_TsEmitterVisitor.prototype.visitTryCatchStmt=function(e,t){t.println("try {"),t.incIndent(),this.visitAllStatements(e.bodyStmts,t),t.decIndent(),t.println("} catch ("+el.name+") {"),t.incIndent();var r=[tl.set(el.prop("stack")).toDeclStmt(null,[ne.Final])].concat(e.catchStmts);return this.visitAllStatements(r,t),t.decIndent(),t.println("}"),null},_TsEmitterVisitor.prototype.visitBuiltintType=function(e,t){var r;switch(e.name){case F.Bool:r="boolean";break;case F.Dynamic:r="any";break;case F.Function:r="Function";break;case F.Number:r="number";break;case F.Int:r="number";break;case F.String:r="string";break;default:throw new Error("Unsupported builtin type "+e.name)}return t.print(r),null},_TsEmitterVisitor.prototype.visitExternalType=function(e,t){return this._visitIdentifier(e.value,e.typeParams,t),null},_TsEmitterVisitor.prototype.visitArrayType=function(e,t){return this.visitType(e.of,t),t.print("[]"),null},_TsEmitterVisitor.prototype.visitMapType=function(e,t){return t.print("{[key: string]:"),this.visitType(e.valueType,t),t.print("}"),null},_TsEmitterVisitor.prototype.getBuiltinMethodName=function(e){var t;switch(e){case J.ConcatArray:t="concat";break;case J.SubscribeObservable:t="subscribe";break;case J.Bind:t="bind";break;default:throw new Error("Unknown builtin method: "+e)}return t},_TsEmitterVisitor.prototype._visitParams=function(e,t){var r=this;this.visitAllObjects(function(e){t.print(e.name),t.print(":"),r.visitType(e.type,t)},e,t,",")},_TsEmitterVisitor.prototype._visitIdentifier=function(e,t,r){var n=this;if(isBlank(e.name))throw new Error("Internal error: unknown identifier "+e);if(isPresent(e.moduleUrl)&&e.moduleUrl!=this._moduleUrl){var i=this.importsWithPrefixes.get(e.moduleUrl);isBlank(i)&&(i="import"+this.importsWithPrefixes.size,this.importsWithPrefixes.set(e.moduleUrl,i)),r.print(i+".")}e.reference&&e.reference.members?(r.print(e.reference.name),r.print("."),r.print(e.reference.members.join("."))):r.print(e.name),isPresent(t)&&t.length>0&&(r.print("<"),this.visitAllObjects(function(e){return e.visitType(n,r)},t,r,","),r.print(">"))},_TsEmitterVisitor}(il),ll=function(){function _ExecutionContext(e,t,r,n){this.parent=e,this.instance=t,this.className=r,this.vars=n}return _ExecutionContext.prototype.createChildWihtLocalVars=function(){return new _ExecutionContext(this,this.instance,this.className,new Map)},_ExecutionContext}(),cl=function(){function ReturnValue(e){this.value=e}return ReturnValue}(),pl=function(){function StatementInterpreter(){}return StatementInterpreter.prototype.debugAst=function(e){return debugOutputAstAsTypeScript(e)},StatementInterpreter.prototype.visitDeclareVarStmt=function(e,t){return t.vars.set(e.name,e.value.visitExpression(this,t)),null},StatementInterpreter.prototype.visitWriteVarExpr=function(e,t){for(var r=e.value.visitExpression(this,t),n=t;null!=n;){if(n.vars.has(e.name))return n.vars.set(e.name,r),r;n=n.parent}throw new Error("Not declared variable "+e.name)},StatementInterpreter.prototype.visitReadVarExpr=function(e,t){var r=e.name;if(isPresent(e.builtin))switch(e.builtin){case X.Super:return t.instance.__proto__;case X.This:return t.instance;case X.CatchError:r=hl;break;case X.CatchStack:r=fl;break;default:throw new Error("Unknown builtin variable "+e.builtin)}for(var n=t;null!=n;){if(n.vars.has(r))return n.vars.get(r);n=n.parent}throw new Error("Not declared variable "+r)},StatementInterpreter.prototype.visitWriteKeyExpr=function(e,t){var r=e.receiver.visitExpression(this,t),n=e.index.visitExpression(this,t),i=e.value.visitExpression(this,t);return r[n]=i,i},StatementInterpreter.prototype.visitWritePropExpr=function(e,t){var r=e.receiver.visitExpression(this,t),n=e.value.visitExpression(this,t);return r[e.name]=n,n},StatementInterpreter.prototype.visitInvokeMethodExpr=function(e,t){var r,n=e.receiver.visitExpression(this,t),i=this.visitAllExpressions(e.args,t);if(isPresent(e.builtin))switch(e.builtin){case J.ConcatArray:r=A.concat(n,i[0]);break;case J.SubscribeObservable:r=n.subscribe({next:i[0]});break;case J.Bind:r=n.bind(i[0]);break;default:throw new Error("Unknown builtin method "+e.builtin)}else r=n[e.name].apply(n,i);return r},StatementInterpreter.prototype.visitInvokeFunctionExpr=function(e,t){var r=this.visitAllExpressions(e.args,t),n=e.fn;if(n instanceof Y&&n.builtin===X.Super)return t.instance.constructor.prototype.constructor.apply(t.instance,r),null;var i=e.fn.visitExpression(this,t);return i.apply(null,r)},StatementInterpreter.prototype.visitReturnStmt=function(e,t){return new cl(e.value.visitExpression(this,t))},StatementInterpreter.prototype.visitDeclareClassStmt=function(e,t){var r=createDynamicClass(e,t,this);return t.vars.set(e.name,r),null},StatementInterpreter.prototype.visitExpressionStmt=function(e,t){return e.expr.visitExpression(this,t)},StatementInterpreter.prototype.visitIfStmt=function(e,t){var r=e.condition.visitExpression(this,t);return r?this.visitAllStatements(e.trueCase,t):isPresent(e.falseCase)?this.visitAllStatements(e.falseCase,t):null},StatementInterpreter.prototype.visitTryCatchStmt=function(e,t){try{return this.visitAllStatements(e.bodyStmts,t)}catch(r){var n=t.createChildWihtLocalVars();return n.vars.set(hl,r),n.vars.set(fl,r.stack),this.visitAllStatements(e.catchStmts,n)}},StatementInterpreter.prototype.visitThrowStmt=function(e,t){throw e.error.visitExpression(this,t)},StatementInterpreter.prototype.visitCommentStmt=function(e,t){return null},StatementInterpreter.prototype.visitInstantiateExpr=function(e,t){var r=this.visitAllExpressions(e.args,t),n=e.classExpr.visitExpression(this,t);return new(n.bind.apply(n,[void 0].concat(r)))},StatementInterpreter.prototype.visitLiteralExpr=function(e,t){return e.value},StatementInterpreter.prototype.visitExternalExpr=function(e,t){return e.value.reference},StatementInterpreter.prototype.visitConditionalExpr=function(e,t){return e.condition.visitExpression(this,t)?e.trueCase.visitExpression(this,t):isPresent(e.falseCase)?e.falseCase.visitExpression(this,t):null},StatementInterpreter.prototype.visitNotExpr=function(e,t){return!e.condition.visitExpression(this,t)},StatementInterpreter.prototype.visitCastExpr=function(e,t){return e.value.visitExpression(this,t)},StatementInterpreter.prototype.visitFunctionExpr=function(e,t){var r=e.params.map(function(e){return e.name});return _declareFn(r,e.statements,t,this)},StatementInterpreter.prototype.visitDeclareFunctionStmt=function(e,t){var r=e.params.map(function(e){return e.name});return t.vars.set(e.name,_declareFn(r,e.statements,t,this)),null},StatementInterpreter.prototype.visitBinaryOperatorExpr=function(e,t){var r=this,n=function(){return e.lhs.visitExpression(r,t)},i=function(){return e.rhs.visitExpression(r,t)};switch(e.operator){case B.Equals:return n()==i();case B.Identical:return n()===i();case B.NotEquals:return n()!=i();case B.NotIdentical:return n()!==i();case B.And:return n()&&i();case B.Or:return n()||i();case B.Plus:return n()+i();case B.Minus:return n()-i();case B.Divide:return n()/i();case B.Multiply:return n()*i();case B.Modulo:return n()%i();case B.Lower:return n()<i();case B.LowerEquals:return n()<=i();case B.Bigger:return n()>i();case B.BiggerEquals:return n()>=i();default:throw new Error("Unknown operator "+e.operator)}},StatementInterpreter.prototype.visitReadPropExpr=function(e,t){var r,n=e.receiver.visitExpression(this,t);return r=n[e.name]},StatementInterpreter.prototype.visitReadKeyExpr=function(e,t){var r=e.receiver.visitExpression(this,t),n=e.index.visitExpression(this,t);return r[n]},StatementInterpreter.prototype.visitLiteralArrayExpr=function(e,t){return this.visitAllExpressions(e.entries,t)},StatementInterpreter.prototype.visitLiteralMapExpr=function(e,t){var r=this,n={};return e.entries.forEach(function(e){return n[e[0]]=e[1].visitExpression(r,t)}),n},StatementInterpreter.prototype.visitAllExpressions=function(e,t){var r=this;return e.map(function(e){return e.visitExpression(r,t)})},StatementInterpreter.prototype.visitAllStatements=function(e,t){for(var r=0;r<e.length;r++){var n=e[r],i=n.visitStatement(this,t);if(i instanceof cl)return i}return null},StatementInterpreter}(),hl="error",fl="stack",dl=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},ml=function(e){function AbstractJsEmitterVisitor(){e.call(this,!1)}return dl(AbstractJsEmitterVisitor,e),AbstractJsEmitterVisitor.prototype.visitDeclareClassStmt=function(e,t){var r=this;return t.pushClass(e),this._visitClassConstructor(e,t),isPresent(e.parent)&&(t.print(e.name+".prototype = Object.create("),e.parent.visitExpression(this,t),t.println(".prototype);")),e.getters.forEach(function(n){return r._visitClassGetter(e,n,t)}),e.methods.forEach(function(n){return r._visitClassMethod(e,n,t)}),t.popClass(),null},AbstractJsEmitterVisitor.prototype._visitClassConstructor=function(e,t){t.print("function "+e.name+"("),isPresent(e.constructorMethod)&&this._visitParams(e.constructorMethod.params,t),t.println(") {"),t.incIndent(),isPresent(e.constructorMethod)&&e.constructorMethod.body.length>0&&(t.println("var self = this;"),this.visitAllStatements(e.constructorMethod.body,t)),t.decIndent(),t.println("}")},AbstractJsEmitterVisitor.prototype._visitClassGetter=function(e,t,r){r.println("Object.defineProperty("+e.name+".prototype, '"+t.name+"', { get: function() {"),r.incIndent(),t.body.length>0&&(r.println("var self = this;"),this.visitAllStatements(t.body,r)),r.decIndent(),r.println("}});")},AbstractJsEmitterVisitor.prototype._visitClassMethod=function(e,t,r){r.print(e.name+".prototype."+t.name+" = function("),this._visitParams(t.params,r),r.println(") {"),r.incIndent(),t.body.length>0&&(r.println("var self = this;"),this.visitAllStatements(t.body,r)),r.decIndent(),r.println("};")},AbstractJsEmitterVisitor.prototype.visitReadVarExpr=function(t,r){if(t.builtin===X.This)r.print("self");else{if(t.builtin===X.Super)throw new Error("'super' needs to be handled at a parent ast node, not at the variable level!");e.prototype.visitReadVarExpr.call(this,t,r)}return null},AbstractJsEmitterVisitor.prototype.visitDeclareVarStmt=function(e,t){return t.print("var "+e.name+" = "),e.value.visitExpression(this,t),t.println(";"),null},AbstractJsEmitterVisitor.prototype.visitCastExpr=function(e,t){return e.value.visitExpression(this,t),null},AbstractJsEmitterVisitor.prototype.visitInvokeFunctionExpr=function(t,r){var n=t.fn;return n instanceof Y&&n.builtin===X.Super?(r.currentClass.parent.visitExpression(this,r),r.print(".call(this"),t.args.length>0&&(r.print(", "),this.visitAllExpressions(t.args,r,",")),r.print(")")):e.prototype.visitInvokeFunctionExpr.call(this,t,r),null},AbstractJsEmitterVisitor.prototype.visitFunctionExpr=function(e,t){return t.print("function("),this._visitParams(e.params,t),t.println(") {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.print("}"),null},AbstractJsEmitterVisitor.prototype.visitDeclareFunctionStmt=function(e,t){return t.print("function "+e.name+"("),this._visitParams(e.params,t),t.println(") {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.println("}"),null},AbstractJsEmitterVisitor.prototype.visitTryCatchStmt=function(e,t){t.println("try {"),t.incIndent(),this.visitAllStatements(e.bodyStmts,t),t.decIndent(),t.println("} catch ("+el.name+") {"),t.incIndent();var r=[tl.set(el.prop("stack")).toDeclStmt(null,[ne.Final])].concat(e.catchStmts);return this.visitAllStatements(r,t),t.decIndent(),t.println("}"),null},AbstractJsEmitterVisitor.prototype._visitParams=function(e,t){this.visitAllObjects(function(e){return t.print(e.name)},e,t,",")},AbstractJsEmitterVisitor.prototype.getBuiltinMethodName=function(e){var t;switch(e){case J.ConcatArray:t="concat";break;case J.SubscribeObservable:t="subscribe";break;case J.Bind:t="bind";break;default:throw new Error("Unknown builtin method: "+e)}return t},AbstractJsEmitterVisitor}(il),yl=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},vl=function(e){function JitEmitterVisitor(){e.apply(this,arguments),this._evalArgNames=[],this._evalArgValues=[]}return yl(JitEmitterVisitor,e),JitEmitterVisitor.prototype.getArgs=function(){for(var e={},t=0;t<this._evalArgNames.length;t++)e[this._evalArgNames[t]]=this._evalArgValues[t];return e},JitEmitterVisitor.prototype.visitExternalExpr=function(e,t){var r=e.value.reference,n=this._evalArgValues.indexOf(r);if(n===-1){n=this._evalArgValues.length,this._evalArgValues.push(r);var i=isPresent(e.value.name)?sanitizeIdentifier(e.value.name):"val";this._evalArgNames.push(sanitizeIdentifier("jit_"+i+n))}return t.print(this._evalArgNames[n]),null},JitEmitterVisitor}(ml),gl=function(){function ShadowCss(){this.strictStyling=!0}return ShadowCss.prototype.shimCssText=function(e,t,r){void 0===r&&(r="");var n=extractSourceMappingUrl(e);return e=stripComments(e),e=this._insertDirectives(e),this._scopeCssText(e,t,r)+n},ShadowCss.prototype._insertDirectives=function(e){return e=this._insertPolyfillDirectivesInCssText(e),this._insertPolyfillRulesInCssText(e)},ShadowCss.prototype._insertPolyfillDirectivesInCssText=function(e){return e.replace(_l,function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return e[2]+"{"})},ShadowCss.prototype._insertPolyfillRulesInCssText=function(e){return e.replace(bl,function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var r=e[0].replace(e[1],"").replace(e[2],"");return e[4]+r})},ShadowCss.prototype._scopeCssText=function(e,t,r){var n=this._extractUnscopedRulesFromCssText(e);return e=this._insertPolyfillHostInCssText(e),e=this._convertColonHost(e),e=this._convertColonHostContext(e),e=this._convertShadowDOMSelectors(e),t&&(e=this._scopeSelectors(e,t,r)),e=e+"\n"+n,e.trim()},ShadowCss.prototype._extractUnscopedRulesFromCssText=function(e){var t,r="";for(wl.lastIndex=0;null!==(t=wl.exec(e));){var n=t[0].replace(t[2],"").replace(t[1],t[4]);r+=n+"\n\n"}return r},ShadowCss.prototype._convertColonHost=function(e){return this._convertColonRule(e,Pl,this._colonHostPartReplacer)},ShadowCss.prototype._convertColonHostContext=function(e){return this._convertColonRule(e,Al,this._colonHostContextPartReplacer)},ShadowCss.prototype._convertColonRule=function(e,t,r){return e.replace(t,function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];if(e[2]){for(var n=e[2].split(","),i=[],o=0;o<n.length;o++){var s=n[o].trim();if(!s)break;i.push(r(xl,s,e[3]))}return i.join(",")}return xl+e[3]})},ShadowCss.prototype._colonHostContextPartReplacer=function(e,t,r){return t.indexOf(El)>-1?this._colonHostPartReplacer(e,t,r):e+t+r+", "+t+" "+e+r},ShadowCss.prototype._colonHostPartReplacer=function(e,t,r){return e+t.replace(El,"")+r},ShadowCss.prototype._convertShadowDOMSelectors=function(e){return Ml.reduce(function(e,t){return e.replace(t," ")},e)},ShadowCss.prototype._scopeSelectors=function(e,t,r){var n=this;return processRules(e,function(e){var i=e.selector,o=e.content;return"@"!=e.selector[0]?i=n._scopeSelector(e.selector,t,r,n.strictStyling):(e.selector.startsWith("@media")||e.selector.startsWith("@supports")||e.selector.startsWith("@page")||e.selector.startsWith("@document"))&&(o=n._scopeSelectors(e.content,t,r)),new Wl(i,o)})},ShadowCss.prototype._scopeSelector=function(e,t,r,n){var i=this;return e.split(",").map(function(e){return e.trim().split(Il)}).map(function(e){var o=e[0],s=e.slice(1),a=function(e){return i._selectorNeedsScoping(e,t)?n?i._applyStrictSelectorScope(e,t,r):i._applySelectorScope(e,t,r):e};return[a(o)].concat(s).join(" ")}).join(", ")},ShadowCss.prototype._selectorNeedsScoping=function(e,t){var r=this._makeScopeMatcher(t);return!r.test(e)},ShadowCss.prototype._makeScopeMatcher=function(e){var t=/\[/g,r=/\]/g;return e=e.replace(t,"\\[").replace(r,"\\]"),new RegExp("^("+e+")"+Dl,"m")},ShadowCss.prototype._applySelectorScope=function(e,t,r){return this._applySimpleSelectorScope(e,t,r)},ShadowCss.prototype._applySimpleSelectorScope=function(e,t,r){if(Nl.lastIndex=0,Nl.test(e)){var n=this.strictStyling?"["+r+"]":t;return e.replace(Tl,function(e,t){return":"===t[0]?n+t:t+n}).replace(Nl,n+" ")}return t+" "+e},ShadowCss.prototype._applyStrictSelectorScope=function(e,t,r){var n=this,i=/\[is=([^\]]*)\]/g;t=t.replace(i,function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t[0]});var o="["+t+"]",s=function(e){var i=e.trim();if(!i)return"";if(e.indexOf(xl)>-1)i=n._applySimpleSelectorScope(e,t,r);else{var s=e.replace(Nl,"");if(s.length>0){var a=s.match(/([^:]*)(:*)(.*)/);null!==a&&(i=a[1]+o+a[2]+a[3])}}return i},a=0,u=[];e=e.replace(/\[[^\]]*\]/g,function(e){var t="__attr_sel_"+a+"__";return u.push(e),a++,t});for(var l,c="",p=0,h=/( |>|\+|~(?!=))\s*/g,f=e.indexOf(xl);null!==(l=h.exec(e));){var d=l[1],m=e.slice(p,l.index).trim(),y=p>=f?s(m):m;c+=y+" "+d+" ",p=h.lastIndex}return c+=s(e.substring(p)),c.replace(/__attr_sel_(\d+)__/g,function(e,t){return u[+t]})},ShadowCss.prototype._insertPolyfillHostInCssText=function(e){return e.replace(Vl,Cl).replace(Ol,El)},ShadowCss}(),_l=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,bl=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,wl=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,El="-shadowcsshost",Cl="-shadowcsscontext",Sl=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",Pl=new RegExp("("+El+Sl,"gim"),Al=new RegExp("("+Cl+Sl,"gim"),xl=El+"-no-combinator",Tl=/-shadowcsshost-no-combinator([^\s]*)/,Ml=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],Il=/(?:>>>)|(?:\/deep\/)/g,Dl="([>\\s~+[.,{:][\\s\\S]*)?$",Nl=/-shadowcsshost/gim,Ol=/:host/gim,Vl=/:host-context/gim,Rl=/\/\*\s*[\s\S]*?\*\//g,kl=/\/\*\s*#\s*sourceMappingURL=[\s\S]+?\*\//,Ll=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,Fl=/([{}])/g,jl="{",Bl="}",Ul="%BLOCK%",Wl=function(){function CssRule(e,t){this.selector=e,this.content=t}return CssRule}(),Hl=function(){function StringWithEscapedBlocks(e,t){this.escapedString=e,this.blocks=t}return StringWithEscapedBlocks}(),Gl="%COMP%",zl="_nghost-"+Gl,ql="_ngcontent-"+Gl,Kl=function(){function StylesCompileDependency(e,t,r){this.moduleUrl=e,this.isShimmed=t,this.valuePlaceholder=r}return StylesCompileDependency}(),Ql=function(){function StylesCompileResult(e,t){this.componentStylesheet=e,this.externalStylesheets=t}return StylesCompileResult}(),Zl=function(){function CompiledStylesheet(e,t,r,n,i){this.statements=e,this.stylesVar=t,this.dependencies=r,this.isShimmed=n,this.meta=i}return CompiledStylesheet}(),Xl=function(){function StyleCompiler(e){this._urlResolver=e,this._shadowCss=new gl}return StyleCompiler.prototype.compileComponent=function(e){var t=this,r=[],n=this._compileStyles(e,new pt({styles:e.template.styles,styleUrls:e.template.styleUrls,moduleUrl:e.type.moduleUrl}),!0);return e.template.externalStylesheets.forEach(function(n){var i=t._compileStyles(e,n,!1);r.push(i)}),new Ql(n,r)},StyleCompiler.prototype._compileStyles=function(e,t,n){for(var i=this,o=e.template.encapsulation===r.ViewEncapsulation.Emulated,s=t.styles.map(function(e){return literal(i._shimIfNeeded(e,o))}),a=[],u=0;u<t.styleUrls.length;u++){var l=new it({name:getStylesVarName(null)});a.push(new Kl(t.styleUrls[u],o,l)),s.push(new ue(l))}var c=getStylesVarName(n?e:null),p=variable(c).set(literalArr(s,new H(z,[x.Const]))).toDeclStmt(null,[ne.Final]);return new Zl([p],c,a,o,t)},StyleCompiler.prototype._shimIfNeeded=function(e,t){return t?this._shadowCss.shimCssText(e,ql,zl):e},StyleCompiler.decorators=[{type:r.Injectable}],StyleCompiler.ctorParameters=[{type:Vu}],StyleCompiler}(),$l=function(){function RuntimeCompiler(e,t,r,n,i,o,s,a){this._injector=e,this._metadataResolver=t,this._templateNormalizer=r,this._templateParser=n,this._styleCompiler=i,this._viewCompiler=o,this._ngModuleCompiler=s,this._compilerConfig=a,this._compiledTemplateCache=new Map,this._compiledHostTemplateCache=new Map,this._compiledNgModuleCache=new Map,this._animationParser=new Ua,this._animationCompiler=new ya}return Object.defineProperty(RuntimeCompiler.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),RuntimeCompiler.prototype.compileModuleSync=function(e){return this._compileModuleAndComponents(e,!0).syncResult},RuntimeCompiler.prototype.compileModuleAsync=function(e){return this._compileModuleAndComponents(e,!1).asyncResult},RuntimeCompiler.prototype.compileModuleAndAllComponentsSync=function(e){return this._compileModuleAndAllComponents(e,!0).syncResult},RuntimeCompiler.prototype.compileModuleAndAllComponentsAsync=function(e){return this._compileModuleAndAllComponents(e,!1).asyncResult},RuntimeCompiler.prototype._compileModuleAndComponents=function(e,t){var r=this._compileComponents(e,t),n=this._compileModule(e);return new He(n,r.then(function(){return n}))},RuntimeCompiler.prototype._compileModuleAndAllComponents=function(e,t){var n=this,i=this._compileComponents(e,t),o=this._compileModule(e),s=this._metadataResolver.getNgModuleMetadata(e),a=[],u=new Set;s.transitiveModule.modules.forEach(function(e){e.declaredDirectives.forEach(function(e){if(e.isComponent){var t=n._createCompiledHostTemplate(e.type.reference);u.add(t),a.push(t.proxyComponentFactory)}})});var l=new r.ModuleWithComponentFactories(o,a),c=function(){return u.forEach(function(e){n._compileTemplate(e)}),l},p=t?Promise.resolve(c()):i.then(c);return new He(l,p)},RuntimeCompiler.prototype._compileModule=function(e){var t=this,n=this._compiledNgModuleCache.get(e);if(!n){var i=this._metadataResolver.getNgModuleMetadata(e),o=[this._metadataResolver.getProviderMetadata(new vt(r.Compiler,{useFactory:function(){return new Yl(t,i.type.reference)}}))],s=this._ngModuleCompiler.compile(i,o);s.dependencies.forEach(function(e){e.placeholder.reference=t._assertComponentKnown(e.comp.reference,!0).proxyComponentFactory,e.placeholder.name="compFactory_"+e.comp.name}),n=this._compilerConfig.useJit?jitStatements(i.type.name+".ngfactory.js",s.statements,s.ngModuleFactoryVar):interpretStatements(s.statements,s.ngModuleFactoryVar),this._compiledNgModuleCache.set(i.type.reference,n)}return n},RuntimeCompiler.prototype._compileComponents=function(e,t){var r=this,n=new Set,i=[],o=this._metadataResolver.getNgModuleMetadata(e);o.transitiveModule.modules.forEach(function(e){e.declaredDirectives.forEach(function(t){t.isComponent&&(n.add(r._createCompiledTemplate(t,e)),t.entryComponents.forEach(function(e){n.add(r._createCompiledHostTemplate(e.reference))}))}),e.entryComponents.forEach(function(e){n.add(r._createCompiledHostTemplate(e.reference))})}),n.forEach(function(e){if(e.loading){if(t)throw new jo(e.compType.reference);i.push(e.loading)}});var s=function(){n.forEach(function(e){r._compileTemplate(e)})};return t?(s(),Promise.resolve(null)):Promise.all(i).then(s)},RuntimeCompiler.prototype.clearCacheFor=function(e){this._compiledNgModuleCache.delete(e),this._metadataResolver.clearCacheFor(e),this._compiledHostTemplateCache.delete(e);var t=this._compiledTemplateCache.get(e);t&&(this._templateNormalizer.clearCacheFor(t.normalizedCompMeta),this._compiledTemplateCache.delete(e))},RuntimeCompiler.prototype.clearCache=function(){this._metadataResolver.clearCache(),this._compiledTemplateCache.clear(),this._compiledHostTemplateCache.clear(),this._templateNormalizer.clearCache(),this._compiledNgModuleCache.clear()},RuntimeCompiler.prototype._createCompiledHostTemplate=function(e){var t=this._compiledHostTemplateCache.get(e);if(!t){var r=this._metadataResolver.getDirectiveMetadata(e);assertComponent(r);var n=createHostComponentMeta(r);t=new Jl((!0),r.selector,r.type,[r],[],[],this._templateNormalizer.normalizeDirective(n)),this._compiledHostTemplateCache.set(e,t)}return t},RuntimeCompiler.prototype._createCompiledTemplate=function(e,t){var r=this._compiledTemplateCache.get(e.type.reference);return r||(assertComponent(e),r=new Jl((!1),e.selector,e.type,t.transitiveModule.directives,t.transitiveModule.pipes,t.schemas,this._templateNormalizer.normalizeDirective(e)),this._compiledTemplateCache.set(e.type.reference,r)),r},RuntimeCompiler.prototype._assertComponentKnown=function(e,t){var r=t?this._compiledHostTemplateCache.get(e):this._compiledTemplateCache.get(e);if(!r)throw t?new Error("Illegal state: Compiled view for component "+stringify(e)+" does not exist!"):new Error("Component "+stringify(e)+" is not part of any NgModule or the module has not been imported into your module.");return r},RuntimeCompiler.prototype._assertComponentLoaded=function(e,t){var r=this._assertComponentKnown(e,t);if(r.loading)throw new Error("Illegal state: CompiledTemplate for "+stringify(e)+" (isHost: "+t+") is still loading!");return r},RuntimeCompiler.prototype._compileTemplate=function(e){var t=this;if(!e.isCompiled){var r=e.normalizedCompMeta,n=new Map,i=this._styleCompiler.compileComponent(r);i.externalStylesheets.forEach(function(e){n.set(e.meta.moduleUrl,e)}),this._resolveStylesCompileResult(i.componentStylesheet,n);var o=e.viewComponentTypes.map(function(e){return t._assertComponentLoaded(e,!1).normalizedCompMeta}),s=this._animationParser.parseComponent(r),a=this._templateParser.parse(r,r.template.template,e.viewDirectives.concat(o),e.viewPipes,e.schemas,r.type.name),u=this._animationCompiler.compile(r.type.name,s),l=this._viewCompiler.compileComponent(r,a,variable(i.componentStylesheet.stylesVar),e.viewPipes,u);l.dependencies.forEach(function(e){var r;if(e instanceof Cu){var n=e;r=t._assertComponentLoaded(n.comp.reference,!1),
n.placeholder.reference=r.proxyViewFactory,n.placeholder.name="viewFactory_"+n.comp.name}else if(e instanceof Su){var i=e;r=t._assertComponentLoaded(i.comp.reference,!0),i.placeholder.reference=r.proxyComponentFactory,i.placeholder.name="compFactory_"+i.comp.name}});var c=i.componentStylesheet.statements.concat(l.statements);u.forEach(function(e){e.statements.forEach(function(e){c.push(e)})});var p;p=this._compilerConfig.useJit?jitStatements(""+e.compType.name+(e.isHost?"_Host":"")+".ngfactory.js",c,l.viewFactoryVar):interpretStatements(c,l.viewFactoryVar),e.compiled(p)}},RuntimeCompiler.prototype._resolveStylesCompileResult=function(e,t){var r=this;e.dependencies.forEach(function(e,n){var i=t.get(e.moduleUrl),o=r._resolveAndEvalStylesCompileResult(i,t);e.valuePlaceholder.reference=o,e.valuePlaceholder.name="importedStyles"+n})},RuntimeCompiler.prototype._resolveAndEvalStylesCompileResult=function(e,t){return this._resolveStylesCompileResult(e,t),this._compilerConfig.useJit?jitStatements(e.meta.moduleUrl+".css.js",e.statements,e.stylesVar):interpretStatements(e.statements,e.stylesVar)},RuntimeCompiler.decorators=[{type:r.Injectable}],RuntimeCompiler.ctorParameters=[{type:r.Injector},{type:Gu},{type:ku},{type:Gs},{type:Xl},{type:xu},{type:Qu},{type:Ys}],RuntimeCompiler}(),Jl=function(){function CompiledTemplate(e,t,n,i,o,s,a){var u=this;this.isHost=e,this.compType=n,this.viewPipes=o,this.schemas=s,this._viewFactory=null,this.loading=null,this._normalizedCompMeta=null,this.isCompiled=!1,this.isCompiledWithDeps=!1,this.viewComponentTypes=[],this.viewDirectives=[],i.forEach(function(e){e.isComponent?u.viewComponentTypes.push(e.type.reference):u.viewDirectives.push(e)}),this.proxyViewFactory=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];if(!u._viewFactory)throw new Error("Illegal state: CompiledTemplate for "+stringify(u.compType)+" is not compiled yet!");return u._viewFactory.apply(null,e)},this.proxyComponentFactory=e?new r.ComponentFactory(t,this.proxyViewFactory,n.reference):null,a.syncResult?this._normalizedCompMeta=a.syncResult:this.loading=a.asyncResult.then(function(e){u._normalizedCompMeta=e,u.loading=null})}return Object.defineProperty(CompiledTemplate.prototype,"normalizedCompMeta",{get:function(){if(this.loading)throw new Error("Template is still loading for "+this.compType.name+"!");return this._normalizedCompMeta},enumerable:!0,configurable:!0}),CompiledTemplate.prototype.compiled=function(e){this._viewFactory=e,this.isCompiled=!0},CompiledTemplate.prototype.depsCompiled=function(){this.isCompiledWithDeps=!0},CompiledTemplate}(),Yl=function(){function ModuleBoundCompiler(e,t){this._delegate=e,this._ngModule=t}return Object.defineProperty(ModuleBoundCompiler.prototype,"_injector",{get:function(){return this._delegate.injector},enumerable:!0,configurable:!0}),ModuleBoundCompiler.prototype.compileModuleSync=function(e){return this._delegate.compileModuleSync(e)},ModuleBoundCompiler.prototype.compileModuleAsync=function(e){return this._delegate.compileModuleAsync(e)},ModuleBoundCompiler.prototype.compileModuleAndAllComponentsSync=function(e){return this._delegate.compileModuleAndAllComponentsSync(e)},ModuleBoundCompiler.prototype.compileModuleAndAllComponentsAsync=function(e){return this._delegate.compileModuleAndAllComponentsAsync(e)},ModuleBoundCompiler.prototype.clearCache=function(){this._delegate.clearCache()},ModuleBoundCompiler.prototype.clearCacheFor=function(e){this._delegate.clearCacheFor(e)},ModuleBoundCompiler}(),ec={};registerContext(r.SecurityContext.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),registerContext(r.SecurityContext.STYLE,["*|style"]),registerContext(r.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(r.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 tc=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},rc="boolean",nc="number",ic="string",oc="object",sc=["[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"],ac={"class":"className",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},uc=function(e){function DomElementSchemaRegistry(){var t=this;e.call(this),this._schema={},sc.forEach(function(e){var r={},n=e.split("|"),i=n[0],o=n[1],s=o.split(","),a=i.split("^"),u=a[0],l=a[1];u.split(",").forEach(function(e){return t._schema[e.toLowerCase()]=r});var c=l&&t._schema[l.toLowerCase()];c&&Object.keys(c).forEach(function(e){r[e]=c[e]}),s.forEach(function(e){if(e.length>0)switch(e[0]){case"*":break;case"!":r[e.substring(1)]=rc;break;case"#":r[e.substring(1)]=nc;break;case"%":r[e.substring(1)]=oc;break;default:r[e]=ic}})})}return tc(DomElementSchemaRegistry,e),DomElementSchemaRegistry.prototype.hasProperty=function(e,t,n){if(n.some(function(e){return e.name===r.NO_ERRORS_SCHEMA.name}))return!0;if(e.indexOf("-")>-1){if("ng-container"===e||"ng-content"===e)return!1;if(n.some(function(e){return e.name===r.CUSTOM_ELEMENTS_SCHEMA.name}))return!0}var i=this._schema[e.toLowerCase()]||this._schema.unknown;return!!i[t]},DomElementSchemaRegistry.prototype.hasElement=function(e,t){if(t.some(function(e){return e.name===r.NO_ERRORS_SCHEMA.name}))return!0;if(e.indexOf("-")>-1){if("ng-container"===e||"ng-content"===e)return!0;if(t.some(function(e){return e.name===r.CUSTOM_ELEMENTS_SCHEMA.name}))return!0}return!!this._schema[e.toLowerCase()]},DomElementSchemaRegistry.prototype.securityContext=function(e,t){e=e.toLowerCase(),t=t.toLowerCase();var n=ec[e+"|"+t];return n?n:(n=ec["*|"+t],n?n:r.SecurityContext.NONE)},DomElementSchemaRegistry.prototype.getMappedPropName=function(e){return ac[e]||e},DomElementSchemaRegistry.prototype.getDefaultComponentElementName=function(){return"ng-component"},DomElementSchemaRegistry.prototype.validateProperty=function(e){if(e.toLowerCase().startsWith("on")){var t="Binding to event property '"+e+"' is disallowed for security reasons, "+("please use ("+e.slice(2)+")=...")+("\nIf '"+e+"' is a directive input, make sure the directive is imported by the")+" current module.";return{error:!0,msg:t}}return{error:!1}},DomElementSchemaRegistry.prototype.validateAttribute=function(e){if(e.toLowerCase().startsWith("on")){var t="Binding to event attribute '"+e+"' is disallowed for security reasons, "+("please use ("+e.slice(2)+")=...");return{error:!0,msg:t}}return{error:!1}},DomElementSchemaRegistry.decorators=[{type:r.Injectable}],DomElementSchemaRegistry.ctorParameters=[],DomElementSchemaRegistry}(ns),lc={get:function(e){throw new Error("No ResourceLoader implementation has been provided. Can't read the url \""+e+'"')}},cc=[{provide:Co,useValue:Eo},{provide:Wi,useExisting:Co},{provide:Du,useValue:lc},wo,$r,nn,qo,{provide:Li,useFactory:function(e,t,r){return new Li(e,t,r)},deps:[qo,[new r.Optional,new r.Inject(r.TRANSLATIONS)],[new r.Optional,new r.Inject(r.TRANSLATIONS_FORMAT)]]},Gs,ku,Gu,Ou,Xl,xu,Qu,{provide:Ys,useValue:new Ys},$l,{provide:r.Compiler,useExisting:$l},uc,{provide:ns,useExisting:uc},Vu,Fu,Wu,Uu],pc=function(){function RuntimeCompilerFactory(e){this._defaultOptions=[{useDebug:r.isDevMode(),useJit:!0,defaultEncapsulation:r.ViewEncapsulation.Emulated}].concat(e)}return RuntimeCompilerFactory.prototype.createCompiler=function(e){void 0===e&&(e=[]);var t=_mergeOptions(this._defaultOptions.concat(e)),n=r.ReflectiveInjector.resolveAndCreate([cc,{provide:Ys,useFactory:function(){return new Ys({genDebugInfo:t.useDebug,useJit:t.useJit,defaultEncapsulation:t.defaultEncapsulation,logBindingUpdate:t.useDebug})},deps:[]},t.providers]);return n.get(r.Compiler)},RuntimeCompilerFactory.decorators=[{type:r.Injectable}],RuntimeCompilerFactory.ctorParameters=[{type:Array,decorators:[{type:r.Inject,args:[r.COMPILER_OPTIONS]}]}],RuntimeCompilerFactory}(),hc=r.createPlatformFactory(r.platformCore,"coreDynamic",[{provide:r.COMPILER_OPTIONS,useValue:{},multi:!0},{provide:r.CompilerFactory,useClass:pc},{provide:r.PLATFORM_INITIALIZER,useValue:_initReflector,multi:!0}]),fc=/asset:([^\/]+)\/([^\/]+)\/(.+)/,dc=function(){function ImportGenerator(){}return ImportGenerator.parseAssetUrl=function(e){return mc.parse(e)},ImportGenerator}(),mc=function(){function AssetUrl(e,t,r){this.packageName=e,this.firstLevelDir=t,this.modulePath=r}return AssetUrl.parse=function(e,t){void 0===t&&(t=!0);var r=e.match(fc);if(null!==r)return new AssetUrl(r[1],r[2],r[3]);if(t)return null;throw new Error("Url "+e+" is not a valid asset: url")},AssetUrl}(),yc={SelectorMatcher:V,CssSelector:O,AssetUrl:mc,ImportGenerator:dc,CompileMetadataResolver:Gu,HtmlParser:qo,InterpolationConfig:Kr,DirectiveNormalizer:ku,Lexer:$r,Parser:nn,ParseLocation:an,ParseError:pn,ParseErrorLevel:Zr,ParseSourceFile:un,ParseSourceSpan:ln,TemplateParser:Gs,DomElementSchemaRegistry:uc,StyleCompiler:Xl,ViewCompiler:xu,NgModuleCompiler:Qu,TypeScriptEmitter:al};t.COMPILER_PROVIDERS=cc,t.CompileDiDependencyMetadata=ot,t.CompileDirectiveMetadata=ft,t.CompileFactoryMetadata=at,t.CompileIdentifierMetadata=it,t.CompileMetadataWithIdentifier=qe,t.CompilePipeMetadata=dt,t.CompileProviderMetadata=st,t.CompileQueryMetadata=ct,t.CompileTemplateMetadata=ht,t.CompileTokenMetadata=ut,t.CompileTypeMetadata=lt,t.CompilerConfig=Ys,t.DEFAULT_PACKAGE_URL_PROVIDER=Ou,t.DirectiveResolver=Fu,t.NgModuleResolver=Uu,t.OfflineCompiler=Iu,t.PipeResolver=Wu,t.RenderTypes=ea,t.ResourceLoader=Du,t.RuntimeCompiler=$l,t.SourceModule=Tu,t.TEMPLATE_TRANSFORMS=Us,t.UrlResolver=Vu,t.createOfflineCompileUrlResolver=createOfflineCompileUrlResolver,t.platformCoreDynamic=hc,t.DEFAULT_INTERPOLATION_CONFIG=Qr,t.InterpolationConfig=Kr,t.ElementSchemaRegistry=ns,t.I18NHtmlParser=Li,t.MessageBundle=ei,t.Xliff=wi,t.Xmb=Mi,t.Xtb=Vi,t.TextAst=n,t.BoundTextAst=i,t.AttrAst=o,t.BoundElementPropertyAst=s,t.BoundEventAst=a,t.ReferenceAst=u,t.VariableAst=l,t.ElementAst=c,t.EmbeddedTemplateAst=p,t.BoundDirectivePropertyAst=h,t.DirectiveAst=f,t.ProviderAst=d,t.NgContentAst=m,t.templateVisitAll=templateVisitAll,t.__compiler_private__=yc})}).call(t,function(){return this}())},3:function(e,t,r){(function(e){!function(e,n){n(t,r(124),r(9))}(this,function(t,r,n){"use strict";function scheduleMicroTask(e){Zone.current.scheduleMicroTask("scheduleMicrotask",e)}function getTypeNameForDebugging(e){return e.name||typeof e}function isPresent(e){return void 0!==e&&null!==e}function isBlank(e){return void 0===e||null===e}function isString(e){return"string"==typeof e}function isFunction(e){return"function"==typeof e}function isArray(e){return Array.isArray(e)}function stringify(e){if("string"==typeof e)return e;if(void 0===e||null===e)return""+e;if(e.overriddenName)return e.overriddenName;if(e.name)return e.name;var t=e.toString(),r=t.indexOf("\n");return r===-1?t:t.substring(0,r)}function looseIdentical(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}function getMapKey(e){return e}function isJsObject(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function print(e){console.log(e)}function warn(e){console.warn(e)}function getSymbolIterator(){if(isBlank(s))if(isPresent(i.Symbol)&&isPresent(Symbol.iterator))s=Symbol.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),t=0;t<e.length;++t){var r=e[t];"entries"!==r&&"size"!==r&&Map.prototype[r]===Map.prototype.entries&&(s=r)}return s}function isPrimitive(e){return!isJsObject(e)}function extractAnnotation(e){return"function"==typeof e&&e.hasOwnProperty("annotation")&&(e=e.annotation),e}function applyParams(e,t){if(e===Object||e===String||e===Function||e===Number||e===Array)throw new Error("Can not use native "+stringify(e)+" as constructor");if("function"==typeof e)return e;if(Array.isArray(e)){var r=e,n=r.length-1,i=e[n];if("function"!=typeof i)throw new Error("Last position of Class method array must be Function in key "+t+" was '"+stringify(i)+"'");if(n!=i.length)throw new Error("Number of annotations ("+n+") does not match number of arguments ("+i.length+") in the function: "+stringify(i));for(var o=[],s=0,a=r.length-1;s<a;s++){var l=[];o.push(l);var c=r[s];if(Array.isArray(c))for(var p=0;p<c.length;p++)l.push(extractAnnotation(c[p]));else"function"==typeof c?l.push(extractAnnotation(c)):l.push(c)}return u.defineMetadata("parameters",o,i),i}throw new Error("Only Function or Array is supported in Class definition for key '"+t+"' is '"+stringify(e)+"'")}function Class(e){var t=applyParams(e.hasOwnProperty("constructor")?e.constructor:void 0,"constructor"),r=t.prototype;if(e.hasOwnProperty("extends")){if("function"!=typeof e.extends)throw new Error("Class definition 'extends' property must be a constructor function was: "+stringify(e.extends));t.prototype=r=Object.create(e.extends.prototype)}for(var n in e)"extends"!==n&&"prototype"!==n&&e.hasOwnProperty(n)&&(r[n]=applyParams(e[n],n));this&&this.annotations instanceof Array&&u.defineMetadata("annotations",this.annotations,t);var i=t.name;return i&&"constructor"!==i||(t.overriddenName="class"+a++),t}function makeDecorator(e,t,r,n){function DecoratorFactory(e){if(!u||!u.getMetadata)throw"reflect-metadata shim is required when using class decorators";if(this instanceof DecoratorFactory)return i.call(this,e),this;var t=new DecoratorFactory(e),r="function"==typeof this&&Array.isArray(this.annotations)?this.annotations:[];r.push(t);var o=function(e){var r=u.getOwnMetadata("annotations",e)||[];return r.push(t),u.defineMetadata("annotations",r,e),e};return o.annotations=r,o.Class=Class,n&&n(o),o}void 0===n&&(n=null);var i=makeMetadataCtor([t]);return r&&(DecoratorFactory.prototype=Object.create(r.prototype)),DecoratorFactory.prototype.toString=function(){return"@"+e},DecoratorFactory.annotationCls=DecoratorFactory,DecoratorFactory}function makeMetadataCtor(e){function ctor(){for(var t=this,r=[],n=0;n<arguments.length;n++)r[n-0]=arguments[n];e.forEach(function(e,n){var i=r[n];if(Array.isArray(e))t[e[0]]=i&&void 0!==i?i:e[1];else for(var o in e)t[o]=i&&void 0!==i[o]?i[o]:e[o]})}return ctor}function makeParamDecorator(e,t,r){function ParamDecoratorFactory(){function ParamDecorator(e,t,n){for(var i=u.getMetadata("parameters",e)||[];i.length<=n;)i.push(null);return i[n]=i[n]||[],i[n].push(r),u.defineMetadata("parameters",i,e),e}for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];if(this instanceof ParamDecoratorFactory)return n.apply(this,e),this;var r=new((i=ParamDecoratorFactory).bind.apply(i,[void 0].concat(e)));return ParamDecorator.annotation=r,ParamDecorator;var i}var n=makeMetadataCtor(t);return r&&(ParamDecoratorFactory.prototype=Object.create(r.prototype)),ParamDecoratorFactory.prototype.toString=function(){return"@"+e},ParamDecoratorFactory.annotationCls=ParamDecoratorFactory,ParamDecoratorFactory}function makePropDecorator(e,t,r){function PropDecoratorFactory(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];if(this instanceof PropDecoratorFactory)return n.apply(this,e),this;var r=new((i=PropDecoratorFactory).bind.apply(i,[void 0].concat(e)));return function(e,t){var n=u.getOwnMetadata("propMetadata",e.constructor)||{};n[t]=n[t]||[],n[t].unshift(r),u.defineMetadata("propMetadata",n,e.constructor)};var i}var n=makeMetadataCtor(t);return r&&(PropDecoratorFactory.prototype=Object.create(r.prototype)),PropDecoratorFactory.prototype.toString=function(){return"@"+e},PropDecoratorFactory.annotationCls=PropDecoratorFactory,PropDecoratorFactory}function isDefaultChangeDetectionStrategy(e){return isBlank(e)||e===t.ChangeDetectionStrategy.Default}function forwardRef(e){return e.__forward_ref__=forwardRef,e.toString=function(){return stringify(this())},e}function resolveForwardRef(e){return isFunction(e)&&e.hasOwnProperty("__forward_ref__")&&e.__forward_ref__===forwardRef?e():e}function unimplemented(){throw new Error("unimplemented")}function _flattenArray(e,t){if(isPresent(e))for(var r=0;r<e.length;r++){var n=e[r];isArray(n)?_flattenArray(n,t):t.push(n)}return t}function isListLikeIterable(e){return!!isJsObject(e)&&(isArray(e)||!(e instanceof Map)&&getSymbolIterator()in e)}function areIterablesEqual(e,t,r){for(var n=e[getSymbolIterator()](),i=t[getSymbolIterator()]();;){var o=n.next(),s=i.next();if(o.done&&s.done)return!0;if(o.done||s.done)return!1;if(!r(o.value,s.value))return!1}}function iterateListLike(e,t){if(isArray(e))for(var r=0;r<e.length;r++)t(e[r]);else for(var n,i=e[getSymbolIterator()]();!(n=i.next()).done;)t(n.value)}function findFirstClosedCycle(e){for(var t=[],r=0;r<e.length;++r){if(re.contains(t,e[r]))return t.push(e[r]),t;t.push(e[r])}return t}function constructResolvingPath(e){if(e.length>1){var t=findFirstClosedCycle(re.reversed(e)),r=t.map(function(e){return stringify(e.token)});return" ("+r.join(" -> ")+")"}return""}function convertTsickleDecoratorIntoMetadata(e){return e?e.map(function(e){var t=e.type,r=t.annotationCls,n=e.args?e.args:[];return new(r.bind.apply(r,[void 0].concat(n)))}):[]}function _mergeMaps(e,t){Object.keys(t).forEach(function(r){e.set(r,t[r])})}function resolveReflectiveFactory(e){var t,r;if(isPresent(e.useClass)){var n=resolveForwardRef(e.useClass);t=be.factory(n),r=_dependenciesFor(n)}else isPresent(e.useExisting)?(t=function(e){return e},r=[we.fromKey(he.get(e.useExisting))]):isPresent(e.useFactory)?(t=e.useFactory,r=constructDependencies(e.useFactory,e.deps)):(t=function(){return e.useValue},r=Ee);return new Se(t,r)}function resolveReflectiveProvider(e){return new Ce(he.get(e.provide),[resolveReflectiveFactory(e)],e.multi)}function resolveReflectiveProviders(e){var t=_normalizeProviders(e,[]),r=t.map(resolveReflectiveProvider);return ee.values(mergeResolvedReflectiveProviders(r,new Map))}function mergeResolvedReflectiveProviders(e,t){for(var r=0;r<e.length;r++){var n=e[r],i=t.get(n.key.id);if(isPresent(i)){if(n.multiProvider!==i.multiProvider)throw new pe(i,n);if(n.multiProvider)for(var o=0;o<n.resolvedFactories.length;o++)i.resolvedFactories.push(n.resolvedFactories[o]);else t.set(n.key.id,n)}else{var s;s=n.multiProvider?new Ce(n.key,re.clone(n.resolvedFactories),n.multiProvider):n,t.set(n.key.id,s)}}return t}function _normalizeProviders(e,t){return e.forEach(function(e){if(e instanceof me)t.push({provide:e,useClass:e});else if(e&&"object"==typeof e&&void 0!==e.provide)t.push(e);else{if(!(e instanceof Array))throw new ue(e);_normalizeProviders(e,t)}}),t}function constructDependencies(e,t){if(t){var r=t.map(function(e){return[e]});return t.map(function(t){return _extractToken(e,t,r)})}return _dependenciesFor(e)}function _dependenciesFor(e){var t=be.parameters(e);if(!t)return[];if(t.some(isBlank))throw new le(e,t);return t.map(function(r){return _extractToken(e,r,t)})}function _extractToken(e,t,r){var n=[],i=null,o=!1;if(!isArray(t))return t instanceof l?_createDependency(t.token,o,null,null,n):_createDependency(t,o,null,null,n);for(var s=null,a=null,u=0;u<t.length;++u){var p=t[u];p instanceof me?i=p:p instanceof l?i=p.token:p instanceof c?o=!0:p instanceof h?a=p:p instanceof d?a=p:p instanceof f&&(s=p)}if(i=resolveForwardRef(i),isPresent(i))return _createDependency(i,o,s,a,n);throw new le(e,r)}function _createDependency(e,t,r,n,i){return new we(he.get(e),t,r,n,i)}function _mapProviders(e,t){for(var r=new Array(e._proto.numberOfProviders),n=0;n<e._proto.numberOfProviders;++n)r[n]=t(e._proto.getProviderAtIndex(n));return r}function isPromise(e){return!!e&&"function"==typeof e.then}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 getPreviousIndex(e,t,r){var n=e.previousIndex;if(null===n)return n;var i=0;return r&&n<r.length&&(i=r[n]),n+t+i}function devModeEqual(e,t){return isListLikeIterable(e)&&isListLikeIterable(t)?areIterablesEqual(e,t,devModeEqual):!(isListLikeIterable(e)||isPrimitive(e)||isListLikeIterable(t)||isPrimitive(t))||looseIdentical(e,t)}function detectWTF(){var e=o.wtf;return!(!e||!(bt=e.trace))&&(wt=bt.events,!0)}function createScope(e,t){return void 0===t&&(t=null),wt.createScope(e,t)}function leave(e,t){return bt.leaveScope(e,t),t}function startTimeRange(e,t){return bt.beginTimeRange(e,t)}function endTimeRange(e){bt.endTimeRange(e)}function noopScope(e,t){return null}function flattenNestedViewRenderNodes(e){return _flattenNestedViewRenderNodes(e,[])}function _flattenNestedViewRenderNodes(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(n instanceof Ot){var i=n;if(t.push(i.nativeElement),isPresent(i.nestedViews))for(var o=0;o<i.nestedViews.length;o++)_flattenNestedViewRenderNodes(i.nestedViews[o].rootNodesOrAppElements,t)}else t.push(n)}return t}function ensureSlotCount(e,t){var r;if(e)if(e.length<t){var n=e.length;r=new Array(t);for(var i=0;i<t;i++)r[i]=i<n?e[i]:jt}else r=e;else r=jt;return r}function interpolate(e,t,r,n,i,o,s,a,u,l,c,p,h,f,d,m,y,v,g,_){switch(e){case 1:return t+_toStringWithNull(r)+n;case 2:return t+_toStringWithNull(r)+n+_toStringWithNull(i)+o;case 3:return t+_toStringWithNull(r)+n+_toStringWithNull(i)+o+_toStringWithNull(s)+a;case 4:return t+_toStringWithNull(r)+n+_toStringWithNull(i)+o+_toStringWithNull(s)+a+_toStringWithNull(u)+l;case 5:return t+_toStringWithNull(r)+n+_toStringWithNull(i)+o+_toStringWithNull(s)+a+_toStringWithNull(u)+l+_toStringWithNull(c)+p;case 6:return t+_toStringWithNull(r)+n+_toStringWithNull(i)+o+_toStringWithNull(s)+a+_toStringWithNull(u)+l+_toStringWithNull(c)+p+_toStringWithNull(h)+f;
case 7:return t+_toStringWithNull(r)+n+_toStringWithNull(i)+o+_toStringWithNull(s)+a+_toStringWithNull(u)+l+_toStringWithNull(c)+p+_toStringWithNull(h)+f+_toStringWithNull(d)+m;case 8:return t+_toStringWithNull(r)+n+_toStringWithNull(i)+o+_toStringWithNull(s)+a+_toStringWithNull(u)+l+_toStringWithNull(c)+p+_toStringWithNull(h)+f+_toStringWithNull(d)+m+_toStringWithNull(y)+v;case 9:return t+_toStringWithNull(r)+n+_toStringWithNull(i)+o+_toStringWithNull(s)+a+_toStringWithNull(u)+l+_toStringWithNull(c)+p+_toStringWithNull(h)+f+_toStringWithNull(d)+m+_toStringWithNull(y)+v+_toStringWithNull(g)+_;default:throw new Error("Does not support more than 9 expressions")}}function _toStringWithNull(e){return null!=e?e.toString():""}function checkBinding(e,t,r){if(e){if(!devModeEqual(t,r))throw new Rt(t,r);return!1}return!looseIdentical(t,r)}function castByValue(e,t){return e}function pureProxy1(e){var t,r=at;return function(n){return looseIdentical(r,n)||(r=n,t=e(n)),t}}function pureProxy2(e){var t,r=at,n=at;return function(i,o){return looseIdentical(r,i)&&looseIdentical(n,o)||(r=i,n=o,t=e(i,o)),t}}function pureProxy3(e){var t,r=at,n=at,i=at;return function(o,s,a){return looseIdentical(r,o)&&looseIdentical(n,s)&&looseIdentical(i,a)||(r=o,n=s,i=a,t=e(o,s,a)),t}}function pureProxy4(e){var t,r,n,i,o;return r=n=i=o=at,function(s,a,u,l){return looseIdentical(r,s)&&looseIdentical(n,a)&&looseIdentical(i,u)&&looseIdentical(o,l)||(r=s,n=a,i=u,o=l,t=e(s,a,u,l)),t}}function pureProxy5(e){var t,r,n,i,o,s;return r=n=i=o=s=at,function(a,u,l,c,p){return looseIdentical(r,a)&&looseIdentical(n,u)&&looseIdentical(i,l)&&looseIdentical(o,c)&&looseIdentical(s,p)||(r=a,n=u,i=l,o=c,s=p,t=e(a,u,l,c,p)),t}}function pureProxy6(e){var t,r,n,i,o,s,a;return r=n=i=o=s=a=at,function(u,l,c,p,h,f){return looseIdentical(r,u)&&looseIdentical(n,l)&&looseIdentical(i,c)&&looseIdentical(o,p)&&looseIdentical(s,h)&&looseIdentical(a,f)||(r=u,n=l,i=c,o=p,s=h,a=f,t=e(u,l,c,p,h,f)),t}}function pureProxy7(e){var t,r,n,i,o,s,a,u;return r=n=i=o=s=a=u=at,function(l,c,p,h,f,d,m){return looseIdentical(r,l)&&looseIdentical(n,c)&&looseIdentical(i,p)&&looseIdentical(o,h)&&looseIdentical(s,f)&&looseIdentical(a,d)&&looseIdentical(u,m)||(r=l,n=c,i=p,o=h,s=f,a=d,u=m,t=e(l,c,p,h,f,d,m)),t}}function pureProxy8(e){var t,r,n,i,o,s,a,u,l;return r=n=i=o=s=a=u=l=at,function(c,p,h,f,d,m,y,v){return looseIdentical(r,c)&&looseIdentical(n,p)&&looseIdentical(i,h)&&looseIdentical(o,f)&&looseIdentical(s,d)&&looseIdentical(a,m)&&looseIdentical(u,y)&&looseIdentical(l,v)||(r=c,n=p,i=h,o=f,s=d,a=m,u=y,l=v,t=e(c,p,h,f,d,m,y,v)),t}}function pureProxy9(e){var t,r,n,i,o,s,a,u,l,c;return r=n=i=o=s=a=u=l=c=at,function(p,h,f,d,m,y,v,g,_){return looseIdentical(r,p)&&looseIdentical(n,h)&&looseIdentical(i,f)&&looseIdentical(o,d)&&looseIdentical(s,m)&&looseIdentical(a,y)&&looseIdentical(u,v)&&looseIdentical(l,g)&&looseIdentical(c,_)||(r=p,n=h,i=f,o=d,s=m,a=y,u=v,l=g,c=_,t=e(p,h,f,d,m,y,v,g,_)),t}}function pureProxy10(e){var t,r,n,i,o,s,a,u,l,c,p;return r=n=i=o=s=a=u=l=c=p=at,function(h,f,d,m,y,v,g,_,b,w){return looseIdentical(r,h)&&looseIdentical(n,f)&&looseIdentical(i,d)&&looseIdentical(o,m)&&looseIdentical(s,y)&&looseIdentical(a,v)&&looseIdentical(u,g)&&looseIdentical(l,_)&&looseIdentical(c,b)&&looseIdentical(p,w)||(r=h,n=f,i=d,o=m,s=y,a=v,u=g,l=_,c=b,p=w,t=e(h,f,d,m,y,v,g,_,b,w)),t}}function setTestabilityGetter(e){or=e}function enableProdMode(){if(ur)throw new Error("Cannot enable prod mode after platform setup.");ar=!1}function isDevMode(){return ur=!0,ar}function createPlatform(e){if(Nt&&!Nt.destroyed)throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Nt=e.get(lr);var t=e.get(Be,null);return t&&t.forEach(function(e){return e()}),Nt}function createPlatformFactory(e,t,r){void 0===r&&(r=[]);var n=new m("Platform: "+t);return function(t){return void 0===t&&(t=[]),getPlatform()||(e?e(r.concat(t).concat({provide:n,useValue:!0})):createPlatform(Ne.resolveAndCreate(r.concat(t).concat({provide:n,useValue:!0})))),assertPlatform(n)}}function assertPlatform(e){var t=getPlatform();if(!t)throw new Error("No platform exists!");if(!t.injector.get(e,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return t}function destroyPlatform(){Nt&&!Nt.destroyed&&Nt.destroy()}function getPlatform(){return Nt&&!Nt.destroyed?Nt:null}function _callAndReportToErrorHandler(e,t){try{var r=t();return isPromise(r)?r.catch(function(t){throw e.handleError(t),t}):r}catch(n){throw e.handleError(n),n}}function registerModuleFactory(e,t){var r=_r.get(e);if(r)throw new Error("Duplicate module registered for "+e+" - "+r.moduleType.name+" vs "+t.moduleType.name);_r.set(e,t)}function getModuleFactory(e){var t=_r.get(e);if(!t)throw new Error("No module with ID "+e+" loaded");return t}function checkNotEmpty(e,t,r){if(!e)throw new Error("Cannot find '"+r+"' in '"+t+"'");return e}function queueAnimation(e){Mr.push(e)}function triggerQueuedAnimations(){for(var e=0;e<Mr.length;e++){var t=Mr[e];t.play()}Mr=[]}function asNativeElements(e){return e.map(function(e){return e.nativeElement})}function _queryElementChildren(e,t,r){e.childNodes.forEach(function(e){e instanceof Lr&&(t(e)&&r.push(e),_queryElementChildren(e,t,r))})}function _queryNodeChildren(e,t,r){e instanceof Lr&&e.childNodes.forEach(function(e){t(e)&&r.push(e),e instanceof Lr&&_queryNodeChildren(e,t,r)})}function getDebugNode(e){return Fr.get(e)}function indexDebugNode(e){Fr.set(e.nativeNode,e)}function removeDebugNodeFromIndex(e){Fr.delete(e.nativeNode)}function _reflector(){return be}function _iterableDiffersFactory(){return dt}function _keyValueDiffersFactory(){return mt}function animate(e,t){void 0===t&&(t=null);var r=t;if(!isPresent(r)){var n={};r=new cn([n],1)}return new pn(e,r)}function group(e){return new dn(e)}function sequence(e){return new fn(e)}function style(e){var t,r=null;return isString(e)?t=[e]:(t=isArray(e)?e:[e],t.forEach(function(e){var t=e.offset;isPresent(t)&&(r=null==r?parseFloat(t):r)})),new cn(t,r)}function state(e,t){return new sn(e,t)}function keyframes(e){return new ln(e)}function transition(e,t){var r=isArray(t)?new fn(t):t;return new an(e,r)}function trigger(e,t){return new nn(e,t)}function prepareFinalAnimationStyles(e,t,r){void 0===r&&(r=null);var n={};return Object.keys(t).forEach(function(e){var i=t[e];n[e]=i==rn?r:i.toString()}),Object.keys(e).forEach(function(e){isPresent(n[e])||(n[e]=r)}),n}function balanceAnimationKeyframes(e,t,r){var n=r.length-1,i=r[0],o=flattenStyles(i.styles.styles),s={},a=!1;Object.keys(e).forEach(function(t){var r=e[t];o[t]||(o[t]=r,s[t]=r,a=!0)});var u=te.merge({},o),l=r[n];re.insert(l.styles.styles,0,t);var c=flattenStyles(l.styles.styles),p={},h=!1;return Object.keys(u).forEach(function(e){isPresent(c[e])||(p[e]=rn,h=!0)}),h&&l.styles.styles.push(p),Object.keys(c).forEach(function(e){isPresent(o[e])||(s[e]=rn,a=!0)}),a&&i.styles.styles.push(s),r}function clearStyles(e){var t={};return Object.keys(e).forEach(function(e){t[e]=null}),t}function collectAndResolveStyles(e,t){return t.map(function(t){var r={};return Object.keys(t).forEach(function(n){var i=t[n];i==zr&&(i=e[n],isPresent(i)||(i=rn)),e[n]=i,r[n]=i}),r})}function renderStyles(e,t,r){Object.keys(r).forEach(function(n){t.setElementStyle(e,n,r[n])})}function flattenStyles(e){var t={};return e.forEach(function(e){Object.keys(e).forEach(function(r){t[r]=e[r]})}),t}function _findLastRenderNode(e){var t;if(e instanceof Ot){var r=e;if(t=r.nativeElement,isPresent(r.nestedViews))for(var n=r.nestedViews.length-1;n>=0;n--){var i=r.nestedViews[n];i.rootNodesOrAppElements.length>0&&(t=_findLastRenderNode(i.rootNodesOrAppElements[i.rootNodesOrAppElements.length-1]))}}else t=e;return t}var i;i="undefined"==typeof window?"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:e:window;var o=i;o.assert=function(e){};var s=(function(){function NumberWrapper(){}return NumberWrapper.toFixed=function(e,t){return e.toFixed(t)},NumberWrapper.equal=function(e,t){return e===t},NumberWrapper.parseIntAutoRadix=function(e){var t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t},NumberWrapper.parseInt=function(e,t){if(10==t){if(/^(\-|\+)?[0-9]+$/.test(e))return parseInt(e,t)}else if(16==t){if(/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(e))return parseInt(e,t)}else{var r=parseInt(e,t);if(!isNaN(r))return r}throw new Error("Invalid integer literal when parsing "+e+" in base "+t)},Object.defineProperty(NumberWrapper,"NaN",{get:function(){return NaN},enumerable:!0,configurable:!0}),NumberWrapper.isNumeric=function(e){return!isNaN(e-parseFloat(e))},NumberWrapper.isNaN=function(e){return isNaN(e)},NumberWrapper.isInteger=function(e){return Number.isInteger(e)},NumberWrapper}(),null),a=0,u=o.Reflect,l=makeParamDecorator("Inject",[["token",void 0]]),c=makeParamDecorator("Optional",[]),p=makeParamDecorator("Injectable",[]),h=makeParamDecorator("Self",[]),f=makeParamDecorator("SkipSelf",[]),d=makeParamDecorator("Host",[]),m=function(){function OpaqueToken(e){this._desc=e}return OpaqueToken.prototype.toString=function(){return"Token "+this._desc},OpaqueToken.decorators=[{type:p}],OpaqueToken.ctorParameters=[null],OpaqueToken}(),y=new m("AnalyzeForEntryComponents"),v=makeParamDecorator("Attribute",[["attributeName",void 0]]),g=function(){function Query(){}return Query}(),_=makePropDecorator("ContentChildren",[["selector",void 0],{first:!1,isViewQuery:!1,descendants:!1,read:void 0}],g),b=makePropDecorator("ContentChild",[["selector",void 0],{first:!0,isViewQuery:!1,descendants:!0,read:void 0}],g),w=makePropDecorator("ViewChildren",[["selector",void 0],{first:!1,isViewQuery:!0,descendants:!0,read:void 0}],g),E=makePropDecorator("ViewChild",[["selector",void 0],{first:!0,isViewQuery:!0,descendants:!0,read:void 0}],g);t.ChangeDetectionStrategy,function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"}(t.ChangeDetectionStrategy||(t.ChangeDetectionStrategy={}));var C;!function(e){e[e.CheckOnce=0]="CheckOnce",e[e.Checked=1]="Checked",e[e.CheckAlways=2]="CheckAlways",e[e.Detached=3]="Detached",e[e.Errored=4]="Errored",e[e.Destroyed=5]="Destroyed"}(C||(C={}));var S,P=makeDecorator("Directive",{selector:void 0,inputs:void 0,outputs:void 0,host:void 0,providers:void 0,exportAs:void 0,queries:void 0}),A=makeDecorator("Component",{selector:void 0,inputs:void 0,outputs:void 0,host:void 0,exportAs:void 0,moduleId:void 0,providers:void 0,viewProviders:void 0,changeDetection:t.ChangeDetectionStrategy.Default,queries:void 0,templateUrl:void 0,template:void 0,styleUrls:void 0,styles:void 0,animations:void 0,encapsulation:void 0,interpolation:void 0,entryComponents:void 0},P),x=makeDecorator("Pipe",{name:void 0,pure:!0}),T=makePropDecorator("Input",[["bindingPropertyName",void 0]]),M=makePropDecorator("Output",[["bindingPropertyName",void 0]]),I=makePropDecorator("HostBinding",[["hostPropertyName",void 0]]),D=makePropDecorator("HostListener",[["eventName",void 0],["args",[]]]);!function(e){e[e.OnInit=0]="OnInit",e[e.OnDestroy=1]="OnDestroy",e[e.DoCheck=2]="DoCheck",e[e.OnChanges=3]="OnChanges",e[e.AfterContentInit=4]="AfterContentInit",e[e.AfterContentChecked=5]="AfterContentChecked",e[e.AfterViewInit=6]="AfterViewInit",e[e.AfterViewChecked=7]="AfterViewChecked"}(S||(S={}));var N=[S.OnInit,S.OnDestroy,S.DoCheck,S.OnChanges,S.AfterContentInit,S.AfterContentChecked,S.AfterViewInit,S.AfterViewChecked],O=function(){function OnChanges(){}return OnChanges}(),V=function(){function OnInit(){}return OnInit}(),R=function(){function DoCheck(){}return DoCheck}(),k=function(){function OnDestroy(){}return OnDestroy}(),L=function(){function AfterContentInit(){}return AfterContentInit}(),F=function(){function AfterContentChecked(){}return AfterContentChecked}(),j=function(){function AfterViewInit(){}return AfterViewInit}(),B=function(){function AfterViewChecked(){}return AfterViewChecked}(),U={name:"custom-elements"},W={name:"no-errors-schema"},H=makeDecorator("NgModule",{providers:void 0,declarations:void 0,imports:void 0,exports:void 0,entryComponents:void 0,bootstrap:void 0,schemas:void 0,id:void 0});t.ViewEncapsulation,function(e){e[e.Emulated=0]="Emulated",e[e.Native=1]="Native",e[e.None=2]="None"}(t.ViewEncapsulation||(t.ViewEncapsulation={}));var G=function(){function ViewMetadata(e){var t=void 0===e?{}:e,r=t.templateUrl,n=t.template,i=t.encapsulation,o=t.styles,s=t.styleUrls,a=t.animations,u=t.interpolation;this.templateUrl=r,this.template=n,this.styleUrls=s,this.styles=o,this.encapsulation=i,this.animations=a,this.interpolation=u}return ViewMetadata}(),z=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},q=function(e){function BaseError(t){var r=e.call(this,t);this._nativeError=r}return z(BaseError,e),Object.defineProperty(BaseError.prototype,"message",{get:function(){return this._nativeError.message},set:function(e){this._nativeError.message=e},enumerable:!0,configurable:!0}),Object.defineProperty(BaseError.prototype,"name",{get:function(){return this._nativeError.name},enumerable:!0,configurable:!0}),Object.defineProperty(BaseError.prototype,"stack",{get:function(){return this._nativeError.stack},set:function(e){this._nativeError.stack=e},enumerable:!0,configurable:!0}),BaseError.prototype.toString=function(){return this._nativeError.toString()},BaseError}(Error),K=function(e){function WrappedError(t,r){e.call(this,t+" caused by: "+(r instanceof Error?r.message:r)),this.originalError=r}return z(WrappedError,e),Object.defineProperty(WrappedError.prototype,"stack",{get:function(){return(this.originalError instanceof Error?this.originalError:this._nativeError).stack},enumerable:!0,configurable:!0}),WrappedError}(q),Q=new Object,Z=Q,X=function(){function _NullInjector(){}return _NullInjector.prototype.get=function(e,t){if(void 0===t&&(t=Q),t===Q)throw new Error("No provider for "+stringify(e)+"!");return t},_NullInjector}(),$=function(){function Injector(){}return Injector.prototype.get=function(e,t){return unimplemented()},Injector.THROW_IF_NOT_FOUND=Q,Injector.NULL=new X,Injector}(),J=function(){try{if(1===new Map([[1,2]]).size)return function(e){return new Map(e)}}catch(e){}return function(e){for(var t=new Map,r=0;r<e.length;r++){var n=e[r];t.set(n[0],n[1])}return t}}(),Y=(function(){return(new Map).keys().next?function(e){for(var t,r=e.keys();!(t=r.next()).done;)e.set(t.value,null)}:function(e){e.forEach(function(t,r){e.set(r,null)})}}(),function(){try{if((new Map).values().next)return function(e,t){return t?Array.from(e.values()):Array.from(e.keys())}}catch(e){}return function(e,t){var r=new Array(e.size),n=0;return e.forEach(function(e,i){r[n]=t?e:i,n++}),r}}()),ee=function(){function MapWrapper(){}return MapWrapper.createFromStringMap=function(e){var t=new Map;for(var r in e)t.set(r,e[r]);return t},MapWrapper.toStringMap=function(e){var t={};return e.forEach(function(e,r){return t[r]=e}),t},MapWrapper.createFromPairs=function(e){return J(e)},MapWrapper.iterable=function(e){return e},MapWrapper.keys=function(e){return Y(e,!1)},MapWrapper.values=function(e){return Y(e,!0)},MapWrapper}(),te=function(){function StringMapWrapper(){}return StringMapWrapper.merge=function(e,t){for(var r={},n=0,i=Object.keys(e);n<i.length;n++){var o=i[n];r[o]=e[o]}for(var s=0,a=Object.keys(t);s<a.length;s++){var o=a[s];r[o]=t[o]}return r},StringMapWrapper.equals=function(e,t){var r=Object.keys(e),n=Object.keys(t);if(r.length!=n.length)return!1;for(var i=0;i<r.length;i++){var o=r[i];if(e[o]!==t[o])return!1}return!0},StringMapWrapper}(),re=function(){function ListWrapper(){}return ListWrapper.createFixedSize=function(e){return new Array(e)},ListWrapper.createGrowableSize=function(e){return new Array(e)},ListWrapper.clone=function(e){return e.slice(0)},ListWrapper.forEachWithIndex=function(e,t){for(var r=0;r<e.length;r++)t(e[r],r)},ListWrapper.first=function(e){return e?e[0]:null},ListWrapper.last=function(e){return e&&0!=e.length?e[e.length-1]:null},ListWrapper.indexOf=function(e,t,r){return void 0===r&&(r=0),e.indexOf(t,r)},ListWrapper.contains=function(e,t){return e.indexOf(t)!==-1},ListWrapper.reversed=function(e){var t=ListWrapper.clone(e);return t.reverse()},ListWrapper.concat=function(e,t){return e.concat(t)},ListWrapper.insert=function(e,t,r){e.splice(t,0,r)},ListWrapper.removeAt=function(e,t){var r=e[t];return e.splice(t,1),r},ListWrapper.removeAll=function(e,t){for(var r=0;r<t.length;++r){var n=e.indexOf(t[r]);e.splice(n,1)}},ListWrapper.remove=function(e,t){var r=e.indexOf(t);return r>-1&&(e.splice(r,1),!0)},ListWrapper.clear=function(e){e.length=0},ListWrapper.isEmpty=function(e){return 0==e.length},ListWrapper.fill=function(e,t,r,n){void 0===r&&(r=0),void 0===n&&(n=null),e.fill(t,r,null===n?e.length:n)},ListWrapper.equals=function(e,t){if(e.length!=t.length)return!1;for(var r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0},ListWrapper.slice=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=null),e.slice(t,null===r?void 0:r)},ListWrapper.splice=function(e,t,r){return e.splice(t,r)},ListWrapper.sort=function(e,t){isPresent(t)?e.sort(t):e.sort()},ListWrapper.toString=function(e){return e.toString()},ListWrapper.toJSON=function(e){return JSON.stringify(e)},ListWrapper.maximum=function(e,t){if(0==e.length)return null;for(var r=null,n=-(1/0),i=0;i<e.length;i++){var o=e[i];if(!isBlank(o)){var s=t(o);s>n&&(r=o,n=s)}}return r},ListWrapper.flatten=function(e){var t=[];return _flattenArray(e,t),t},ListWrapper.addAll=function(e,t){for(var r=0;r<t.length;r++)e.push(t[r])},ListWrapper}(),ne=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},ie=function(e){function AbstractProviderError(t,r,n){e.call(this,"DI Error"),this.keys=[r],this.injectors=[t],this.constructResolvingMessage=n,this.message=this.constructResolvingMessage(this.keys)}return ne(AbstractProviderError,e),AbstractProviderError.prototype.addKey=function(e,t){this.injectors.push(e),this.keys.push(t),this.message=this.constructResolvingMessage(this.keys)},AbstractProviderError}(q),oe=function(e){function NoProviderError(t,r){e.call(this,t,r,function(e){var t=stringify(re.first(e).token);return"No provider for "+t+"!"+constructResolvingPath(e)})}return ne(NoProviderError,e),NoProviderError}(ie),se=function(e){function CyclicDependencyError(t,r){e.call(this,t,r,function(e){return"Cannot instantiate cyclic dependency!"+constructResolvingPath(e)})}return ne(CyclicDependencyError,e),CyclicDependencyError}(ie),ae=function(e){function InstantiationError(t,r,n,i){e.call(this,"DI Error",r),this.keys=[i],this.injectors=[t]}return ne(InstantiationError,e),InstantiationError.prototype.addKey=function(e,t){this.injectors.push(e),this.keys.push(t)},Object.defineProperty(InstantiationError.prototype,"message",{get:function(){var e=stringify(re.first(this.keys).token);return this.originalError.message+": Error during instantiation of "+e+"!"+constructResolvingPath(this.keys)+"."},enumerable:!0,configurable:!0}),Object.defineProperty(InstantiationError.prototype,"causeKey",{get:function(){return this.keys[0]},enumerable:!0,configurable:!0}),InstantiationError}(K),ue=function(e){function InvalidProviderError(t){e.call(this,"Invalid provider - only instances of Provider and Type are allowed, got: "+t)}return ne(InvalidProviderError,e),InvalidProviderError}(q),le=function(e){function NoAnnotationError(t,r){e.call(this,NoAnnotationError._genMessage(t,r))}return ne(NoAnnotationError,e),NoAnnotationError._genMessage=function(e,t){for(var r=[],n=0,i=t.length;n<i;n++){var o=t[n];o&&0!=o.length?r.push(o.map(stringify).join(" ")):r.push("?")}return"Cannot resolve all parameters for '"+stringify(e)+"'("+r.join(", ")+"). Make sure that all the parameters are decorated with Inject or have valid type annotations and that '"+stringify(e)+"' is decorated with Injectable."},NoAnnotationError}(q),ce=function(e){function OutOfBoundsError(t){e.call(this,"Index "+t+" is out-of-bounds.")}return ne(OutOfBoundsError,e),OutOfBoundsError}(q),pe=function(e){function MixingMultiProvidersWithRegularProvidersError(t,r){e.call(this,"Cannot mix multi providers and regular providers, got: "+t.toString()+" "+r.toString())}return ne(MixingMultiProvidersWithRegularProvidersError,e),MixingMultiProvidersWithRegularProvidersError}(q),he=function(){function ReflectiveKey(e,t){if(this.token=e,this.id=t,!e)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(e){return de.get(resolveForwardRef(e))},Object.defineProperty(ReflectiveKey,"numberOfKeys",{get:function(){return de.numberOfKeys},enumerable:!0,configurable:!0}),ReflectiveKey}(),fe=function(){function KeyRegistry(){this._allKeys=new Map}return KeyRegistry.prototype.get=function(e){if(e instanceof he)return e;if(this._allKeys.has(e))return this._allKeys.get(e);var t=new he(e,he.numberOfKeys);return this._allKeys.set(e,t),t},Object.defineProperty(KeyRegistry.prototype,"numberOfKeys",{get:function(){return this._allKeys.size},enumerable:!0,configurable:!0}),KeyRegistry}(),de=new fe,me=Function,ye=function(){function ReflectionCapabilities(e){this._reflect=e||o.Reflect}return ReflectionCapabilities.prototype.isReflectionEnabled=function(){return!0},ReflectionCapabilities.prototype.factory=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r-0]=arguments[r];return new(e.bind.apply(e,[void 0].concat(t)))}},ReflectionCapabilities.prototype._zipTypesAndAnnotations=function(e,t){var r;r="undefined"==typeof e?new Array(t.length):new Array(e.length);for(var n=0;n<r.length;n++)"undefined"==typeof e?r[n]=[]:e[n]!=Object?r[n]=[e[n]]:r[n]=[],t&&isPresent(t[n])&&(r[n]=r[n].concat(t[n]));return r},ReflectionCapabilities.prototype.parameters=function(e){if(e.parameters)return e.parameters;if(e.ctorParameters){var t=e.ctorParameters,r=t.map(function(e){return e&&e.type}),n=t.map(function(e){return e&&convertTsickleDecoratorIntoMetadata(e.decorators)});return this._zipTypesAndAnnotations(r,n)}if(isPresent(this._reflect)&&isPresent(this._reflect.getMetadata)){var n=this._reflect.getMetadata("parameters",e),r=this._reflect.getMetadata("design:paramtypes",e);if(r||n)return this._zipTypesAndAnnotations(r,n)}return new Array(e.length).fill(void 0)},ReflectionCapabilities.prototype.annotations=function(e){if(e.annotations){var t=e.annotations;return isFunction(t)&&t.annotations&&(t=t.annotations),t}if(e.decorators)return convertTsickleDecoratorIntoMetadata(e.decorators);if(this._reflect&&this._reflect.getMetadata){var t=this._reflect.getMetadata("annotations",e);if(t)return t}return[]},ReflectionCapabilities.prototype.propMetadata=function(e){if(e.propMetadata){var t=e.propMetadata;return isFunction(t)&&t.propMetadata&&(t=t.propMetadata),t}if(e.propDecorators){var r=e.propDecorators,n={};return Object.keys(r).forEach(function(e){n[e]=convertTsickleDecoratorIntoMetadata(r[e])}),n}if(this._reflect&&this._reflect.getMetadata){var t=this._reflect.getMetadata("propMetadata",e);if(t)return t}return{}},ReflectionCapabilities.prototype.interfaces=function(e){return[]},ReflectionCapabilities.prototype.hasLifecycleHook=function(e,t,r){if(!(e instanceof me))return!1;var n=e.prototype;return!!n[r]},ReflectionCapabilities.prototype.getter=function(e){return new Function("o","return o."+e+";")},ReflectionCapabilities.prototype.setter=function(e){return new Function("o","v","return o."+e+" = v;")},ReflectionCapabilities.prototype.method=function(e){var t="if (!o."+e+") throw new Error('\""+e+"\" is undefined');\n return o."+e+".apply(o, args);";return new Function("o","args",t)},ReflectionCapabilities.prototype.importUri=function(e){return"object"==typeof e&&e.filePath?e.filePath:"./"+stringify(e)},ReflectionCapabilities.prototype.resolveIdentifier=function(e,t,r){return r},ReflectionCapabilities.prototype.resolveEnum=function(e,t){return e[t]},ReflectionCapabilities}(),ve=function(){function ReflectorReader(){}return ReflectorReader}(),ge=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},_e=function(e){function Reflector(t){e.call(this),this.reflectionCapabilities=t,this._injectableInfo=new Map,this._getters=new Map,this._setters=new Map,this._methods=new Map,this._usedKeys=null}return ge(Reflector,e),Reflector.prototype.updateCapabilities=function(e){this.reflectionCapabilities=e},Reflector.prototype.isReflectionEnabled=function(){return this.reflectionCapabilities.isReflectionEnabled()},Reflector.prototype.trackUsage=function(){this._usedKeys=new Set},Reflector.prototype.listUnusedKeys=function(){var e=this;if(!this._usedKeys)throw new Error("Usage tracking is disabled");var t=ee.keys(this._injectableInfo);return t.filter(function(t){return!e._usedKeys.has(t)})},Reflector.prototype.registerFunction=function(e,t){this._injectableInfo.set(e,t)},Reflector.prototype.registerType=function(e,t){this._injectableInfo.set(e,t)},Reflector.prototype.registerGetters=function(e){_mergeMaps(this._getters,e)},Reflector.prototype.registerSetters=function(e){_mergeMaps(this._setters,e)},Reflector.prototype.registerMethods=function(e){_mergeMaps(this._methods,e)},Reflector.prototype.factory=function(e){return this._containsReflectionInfo(e)?this._getReflectionInfo(e).factory||null:this.reflectionCapabilities.factory(e)},Reflector.prototype.parameters=function(e){return this._injectableInfo.has(e)?this._getReflectionInfo(e).parameters||[]:this.reflectionCapabilities.parameters(e)},Reflector.prototype.annotations=function(e){return this._injectableInfo.has(e)?this._getReflectionInfo(e).annotations||[]:this.reflectionCapabilities.annotations(e)},Reflector.prototype.propMetadata=function(e){return this._injectableInfo.has(e)?this._getReflectionInfo(e).propMetadata||{}:this.reflectionCapabilities.propMetadata(e)},Reflector.prototype.interfaces=function(e){return this._injectableInfo.has(e)?this._getReflectionInfo(e).interfaces||[]:this.reflectionCapabilities.interfaces(e)},Reflector.prototype.hasLifecycleHook=function(e,t,r){return this.interfaces(e).indexOf(t)!==-1||this.reflectionCapabilities.hasLifecycleHook(e,t,r)},Reflector.prototype.getter=function(e){return this._getters.has(e)?this._getters.get(e):this.reflectionCapabilities.getter(e)},Reflector.prototype.setter=function(e){return this._setters.has(e)?this._setters.get(e):this.reflectionCapabilities.setter(e)},Reflector.prototype.method=function(e){return this._methods.has(e)?this._methods.get(e):this.reflectionCapabilities.method(e)},Reflector.prototype._getReflectionInfo=function(e){return this._usedKeys&&this._usedKeys.add(e),this._injectableInfo.get(e)},Reflector.prototype._containsReflectionInfo=function(e){return this._injectableInfo.has(e)},Reflector.prototype.importUri=function(e){return this.reflectionCapabilities.importUri(e)},Reflector.prototype.resolveIdentifier=function(e,t,r){return this.reflectionCapabilities.resolveIdentifier(e,t,r)},Reflector.prototype.resolveEnum=function(e,t){return this.reflectionCapabilities.resolveEnum(e,t)},Reflector}(ve),be=new _e(new ye),we=function(){function ReflectiveDependency(e,t,r,n,i){this.key=e,this.optional=t,this.lowerBoundVisibility=r,this.upperBoundVisibility=n,this.properties=i}return ReflectiveDependency.fromKey=function(e){return new ReflectiveDependency(e,(!1),null,null,[])},ReflectiveDependency}(),Ee=[],Ce=function(){function ResolvedReflectiveProvider_(e,t,r){this.key=e,this.resolvedFactories=t,this.multiProvider=r}return Object.defineProperty(ResolvedReflectiveProvider_.prototype,"resolvedFactory",{get:function(){return this.resolvedFactories[0]},enumerable:!0,configurable:!0}),ResolvedReflectiveProvider_}(),Se=function(){function ResolvedReflectiveFactory(e,t){this.factory=e,this.dependencies=t}return ResolvedReflectiveFactory}(),Pe=10,Ae=new Object,xe=function(){function ReflectiveProtoInjectorInlineStrategy(e,t){this.provider0=null,this.provider1=null,this.provider2=null,this.provider3=null,this.provider4=null,this.provider5=null,this.provider6=null,this.provider7=null,this.provider8=null,this.provider9=null,this.keyId0=null,this.keyId1=null,this.keyId2=null,this.keyId3=null,this.keyId4=null,this.keyId5=null,this.keyId6=null,this.keyId7=null,this.keyId8=null,this.keyId9=null;var r=t.length;r>0&&(this.provider0=t[0],this.keyId0=t[0].key.id),r>1&&(this.provider1=t[1],this.keyId1=t[1].key.id),r>2&&(this.provider2=t[2],this.keyId2=t[2].key.id),r>3&&(this.provider3=t[3],this.keyId3=t[3].key.id),r>4&&(this.provider4=t[4],this.keyId4=t[4].key.id),r>5&&(this.provider5=t[5],this.keyId5=t[5].key.id),r>6&&(this.provider6=t[6],this.keyId6=t[6].key.id),r>7&&(this.provider7=t[7],this.keyId7=t[7].key.id),r>8&&(this.provider8=t[8],this.keyId8=t[8].key.id),r>9&&(this.provider9=t[9],this.keyId9=t[9].key.id)}return ReflectiveProtoInjectorInlineStrategy.prototype.getProviderAtIndex=function(e){if(0==e)return this.provider0;if(1==e)return this.provider1;if(2==e)return this.provider2;if(3==e)return this.provider3;if(4==e)return this.provider4;if(5==e)return this.provider5;if(6==e)return this.provider6;if(7==e)return this.provider7;if(8==e)return this.provider8;if(9==e)return this.provider9;throw new ce(e)},ReflectiveProtoInjectorInlineStrategy.prototype.createInjectorStrategy=function(e){return new Ie(e,this)},ReflectiveProtoInjectorInlineStrategy}(),Te=function(){function ReflectiveProtoInjectorDynamicStrategy(e,t){this.providers=t;var r=t.length;this.keyIds=new Array(r);for(var n=0;n<r;n++)this.keyIds[n]=t[n].key.id}return ReflectiveProtoInjectorDynamicStrategy.prototype.getProviderAtIndex=function(e){if(e<0||e>=this.providers.length)throw new ce(e);return this.providers[e]},ReflectiveProtoInjectorDynamicStrategy.prototype.createInjectorStrategy=function(e){return new De(this,e)},ReflectiveProtoInjectorDynamicStrategy}(),Me=function(){function ReflectiveProtoInjector(e){this.numberOfProviders=e.length,this._strategy=e.length>Pe?new Te(this,e):new xe(this,e)}return ReflectiveProtoInjector.fromResolvedProviders=function(e){return new ReflectiveProtoInjector(e)},ReflectiveProtoInjector.prototype.getProviderAtIndex=function(e){return this._strategy.getProviderAtIndex(e)},ReflectiveProtoInjector}(),Ie=function(){function ReflectiveInjectorInlineStrategy(e,t){this.injector=e,this.protoStrategy=t,this.obj0=Ae,this.obj1=Ae,this.obj2=Ae,this.obj3=Ae,this.obj4=Ae,this.obj5=Ae,this.obj6=Ae,this.obj7=Ae,this.obj8=Ae,this.obj9=Ae}return ReflectiveInjectorInlineStrategy.prototype.resetConstructionCounter=function(){this.injector._constructionCounter=0},ReflectiveInjectorInlineStrategy.prototype.instantiateProvider=function(e){return this.injector._new(e)},ReflectiveInjectorInlineStrategy.prototype.getObjByKeyId=function(e){var t=this.protoStrategy,r=this.injector;return t.keyId0===e?(this.obj0===Ae&&(this.obj0=r._new(t.provider0)),this.obj0):t.keyId1===e?(this.obj1===Ae&&(this.obj1=r._new(t.provider1)),this.obj1):t.keyId2===e?(this.obj2===Ae&&(this.obj2=r._new(t.provider2)),this.obj2):t.keyId3===e?(this.obj3===Ae&&(this.obj3=r._new(t.provider3)),this.obj3):t.keyId4===e?(this.obj4===Ae&&(this.obj4=r._new(t.provider4)),this.obj4):t.keyId5===e?(this.obj5===Ae&&(this.obj5=r._new(t.provider5)),this.obj5):t.keyId6===e?(this.obj6===Ae&&(this.obj6=r._new(t.provider6)),this.obj6):t.keyId7===e?(this.obj7===Ae&&(this.obj7=r._new(t.provider7)),this.obj7):t.keyId8===e?(this.obj8===Ae&&(this.obj8=r._new(t.provider8)),this.obj8):t.keyId9===e?(this.obj9===Ae&&(this.obj9=r._new(t.provider9)),this.obj9):Ae},ReflectiveInjectorInlineStrategy.prototype.getObjAtIndex=function(e){if(0==e)return this.obj0;if(1==e)return this.obj1;
if(2==e)return this.obj2;if(3==e)return this.obj3;if(4==e)return this.obj4;if(5==e)return this.obj5;if(6==e)return this.obj6;if(7==e)return this.obj7;if(8==e)return this.obj8;if(9==e)return this.obj9;throw new ce(e)},ReflectiveInjectorInlineStrategy.prototype.getMaxNumberOfObjects=function(){return Pe},ReflectiveInjectorInlineStrategy}(),De=function(){function ReflectiveInjectorDynamicStrategy(e,t){this.protoStrategy=e,this.injector=t,this.objs=new Array(e.providers.length),re.fill(this.objs,Ae)}return ReflectiveInjectorDynamicStrategy.prototype.resetConstructionCounter=function(){this.injector._constructionCounter=0},ReflectiveInjectorDynamicStrategy.prototype.instantiateProvider=function(e){return this.injector._new(e)},ReflectiveInjectorDynamicStrategy.prototype.getObjByKeyId=function(e){for(var t=this.protoStrategy,r=0;r<t.keyIds.length;r++)if(t.keyIds[r]===e)return this.objs[r]===Ae&&(this.objs[r]=this.injector._new(t.providers[r])),this.objs[r];return Ae},ReflectiveInjectorDynamicStrategy.prototype.getObjAtIndex=function(e){if(e<0||e>=this.objs.length)throw new ce(e);return this.objs[e]},ReflectiveInjectorDynamicStrategy.prototype.getMaxNumberOfObjects=function(){return this.objs.length},ReflectiveInjectorDynamicStrategy}(),Ne=function(){function ReflectiveInjector(){}return ReflectiveInjector.resolve=function(e){return resolveReflectiveProviders(e)},ReflectiveInjector.resolveAndCreate=function(e,t){void 0===t&&(t=null);var r=ReflectiveInjector.resolve(e);return ReflectiveInjector.fromResolvedProviders(r,t)},ReflectiveInjector.fromResolvedProviders=function(e,t){return void 0===t&&(t=null),new Oe(Me.fromResolvedProviders(e),t)},Object.defineProperty(ReflectiveInjector.prototype,"parent",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),ReflectiveInjector.prototype.resolveAndCreateChild=function(e){return unimplemented()},ReflectiveInjector.prototype.createChildFromResolved=function(e){return unimplemented()},ReflectiveInjector.prototype.resolveAndInstantiate=function(e){return unimplemented()},ReflectiveInjector.prototype.instantiateResolved=function(e){return unimplemented()},ReflectiveInjector}(),Oe=function(){function ReflectiveInjector_(e,t){void 0===t&&(t=null),this._constructionCounter=0,this._proto=e,this._parent=t,this._strategy=e._strategy.createInjectorStrategy(this)}return ReflectiveInjector_.prototype.get=function(e,t){return void 0===t&&(t=Z),this._getByKey(he.get(e),null,null,t)},ReflectiveInjector_.prototype.getAt=function(e){return this._strategy.getObjAtIndex(e)},Object.defineProperty(ReflectiveInjector_.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(ReflectiveInjector_.prototype,"internalStrategy",{get:function(){return this._strategy},enumerable:!0,configurable:!0}),ReflectiveInjector_.prototype.resolveAndCreateChild=function(e){var t=Ne.resolve(e);return this.createChildFromResolved(t)},ReflectiveInjector_.prototype.createChildFromResolved=function(e){var t=new Me(e),r=new ReflectiveInjector_(t);return r._parent=this,r},ReflectiveInjector_.prototype.resolveAndInstantiate=function(e){return this.instantiateResolved(Ne.resolve([e])[0])},ReflectiveInjector_.prototype.instantiateResolved=function(e){return this._instantiateProvider(e)},ReflectiveInjector_.prototype._new=function(e){if(this._constructionCounter++>this._strategy.getMaxNumberOfObjects())throw new se(this,e.key);return this._instantiateProvider(e)},ReflectiveInjector_.prototype._instantiateProvider=function(e){if(e.multiProvider){for(var t=new Array(e.resolvedFactories.length),r=0;r<e.resolvedFactories.length;++r)t[r]=this._instantiate(e,e.resolvedFactories[r]);return t}return this._instantiate(e,e.resolvedFactories[0])},ReflectiveInjector_.prototype._instantiate=function(e,t){var r,n,i,o,s,a,u,l,c,p,h,f,d,m,y,v,g,_,b,w,E=t.factory,C=t.dependencies,S=C.length;try{r=S>0?this._getByReflectiveDependency(e,C[0]):null,n=S>1?this._getByReflectiveDependency(e,C[1]):null,i=S>2?this._getByReflectiveDependency(e,C[2]):null,o=S>3?this._getByReflectiveDependency(e,C[3]):null,s=S>4?this._getByReflectiveDependency(e,C[4]):null,a=S>5?this._getByReflectiveDependency(e,C[5]):null,u=S>6?this._getByReflectiveDependency(e,C[6]):null,l=S>7?this._getByReflectiveDependency(e,C[7]):null,c=S>8?this._getByReflectiveDependency(e,C[8]):null,p=S>9?this._getByReflectiveDependency(e,C[9]):null,h=S>10?this._getByReflectiveDependency(e,C[10]):null,f=S>11?this._getByReflectiveDependency(e,C[11]):null,d=S>12?this._getByReflectiveDependency(e,C[12]):null,m=S>13?this._getByReflectiveDependency(e,C[13]):null,y=S>14?this._getByReflectiveDependency(e,C[14]):null,v=S>15?this._getByReflectiveDependency(e,C[15]):null,g=S>16?this._getByReflectiveDependency(e,C[16]):null,_=S>17?this._getByReflectiveDependency(e,C[17]):null,b=S>18?this._getByReflectiveDependency(e,C[18]):null,w=S>19?this._getByReflectiveDependency(e,C[19]):null}catch(P){throw(P instanceof ie||P instanceof ae)&&P.addKey(this,e.key),P}var A;try{switch(S){case 0:A=E();break;case 1:A=E(r);break;case 2:A=E(r,n);break;case 3:A=E(r,n,i);break;case 4:A=E(r,n,i,o);break;case 5:A=E(r,n,i,o,s);break;case 6:A=E(r,n,i,o,s,a);break;case 7:A=E(r,n,i,o,s,a,u);break;case 8:A=E(r,n,i,o,s,a,u,l);break;case 9:A=E(r,n,i,o,s,a,u,l,c);break;case 10:A=E(r,n,i,o,s,a,u,l,c,p);break;case 11:A=E(r,n,i,o,s,a,u,l,c,p,h);break;case 12:A=E(r,n,i,o,s,a,u,l,c,p,h,f);break;case 13:A=E(r,n,i,o,s,a,u,l,c,p,h,f,d);break;case 14:A=E(r,n,i,o,s,a,u,l,c,p,h,f,d,m);break;case 15:A=E(r,n,i,o,s,a,u,l,c,p,h,f,d,m,y);break;case 16:A=E(r,n,i,o,s,a,u,l,c,p,h,f,d,m,y,v);break;case 17:A=E(r,n,i,o,s,a,u,l,c,p,h,f,d,m,y,v,g);break;case 18:A=E(r,n,i,o,s,a,u,l,c,p,h,f,d,m,y,v,g,_);break;case 19:A=E(r,n,i,o,s,a,u,l,c,p,h,f,d,m,y,v,g,_,b);break;case 20:A=E(r,n,i,o,s,a,u,l,c,p,h,f,d,m,y,v,g,_,b,w);break;default:throw new Error("Cannot instantiate '"+e.key.displayName+"' because it has more than 20 dependencies")}}catch(P){throw new ae(this,P,P.stack,e.key)}return A},ReflectiveInjector_.prototype._getByReflectiveDependency=function(e,t){return this._getByKey(t.key,t.lowerBoundVisibility,t.upperBoundVisibility,t.optional?null:Z)},ReflectiveInjector_.prototype._getByKey=function(e,t,r,n){return e===Ve?this:r instanceof h?this._getByKeySelf(e,n):this._getByKeyDefault(e,n,t)},ReflectiveInjector_.prototype._throwOrNull=function(e,t){if(t!==Z)return t;throw new oe(this,e)},ReflectiveInjector_.prototype._getByKeySelf=function(e,t){var r=this._strategy.getObjByKeyId(e.id);return r!==Ae?r:this._throwOrNull(e,t)},ReflectiveInjector_.prototype._getByKeyDefault=function(e,t,r){var n;for(n=r instanceof f?this._parent:this;n instanceof ReflectiveInjector_;){var i=n,o=i._strategy.getObjByKeyId(e.id);if(o!==Ae)return o;n=i._parent}return null!==n?n.get(e.token,t):this._throwOrNull(e,t)},Object.defineProperty(ReflectiveInjector_.prototype,"displayName",{get:function(){var e=_mapProviders(this,function(e){return' "'+e.key.displayName+'" '}).join(", ");return"ReflectiveInjector(providers: ["+e+"])"},enumerable:!0,configurable:!0}),ReflectiveInjector_.prototype.toString=function(){return this.displayName},ReflectiveInjector_}(),Ve=he.get($),Re=function(){function ErrorHandler(e){void 0===e&&(e=!0),this._console=console,this.rethrowError=e}return ErrorHandler.prototype.handleError=function(e){var t=this._findOriginalError(e),r=this._findOriginalStack(e),n=this._findContext(e);if(this._console.error("EXCEPTION: "+this._extractMessage(e)),t&&this._console.error("ORIGINAL EXCEPTION: "+this._extractMessage(t)),r&&(this._console.error("ORIGINAL STACKTRACE:"),this._console.error(r)),n&&(this._console.error("ERROR CONTEXT:"),this._console.error(n)),this.rethrowError)throw e},ErrorHandler.prototype._extractMessage=function(e){return e instanceof Error?e.message:e.toString()},ErrorHandler.prototype._findContext=function(e){return e?e.context?e.context:this._findContext(e.originalError):null},ErrorHandler.prototype._findOriginalError=function(e){for(var t=e.originalError;t&&t.originalError;)t=t.originalError;return t},ErrorHandler.prototype._findOriginalStack=function(e){if(!(e instanceof Error))return null;for(var t=e,r=t.stack;t instanceof Error&&t.originalError;)t=t.originalError,t instanceof Error&&t.stack&&(r=t.stack);return r},ErrorHandler}(),ke=new m("Application Initializer"),Le=function(){function ApplicationInitStatus(e){var t=this;this._done=!1;var r=[];if(e)for(var n=0;n<e.length;n++){var i=e[n]();isPromise(i)&&r.push(i)}this._donePromise=Promise.all(r).then(function(){t._done=!0}),0===r.length&&(this._done=!0)}return 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.decorators=[{type:p}],ApplicationInitStatus.ctorParameters=[{type:Array,decorators:[{type:l,args:[ke]},{type:c}]}],ApplicationInitStatus}(),Fe=new m("AppId"),je={provide:Fe,useFactory:_appIdRandomProviderFactory,deps:[]},Be=new m("Platform Initializer"),Ue=new m("appBootstrapListener"),We=new m("Application Packages Root URL"),He=function(){function Console(){}return Console.prototype.log=function(e){print(e)},Console.prototype.warn=function(e){warn(e)},Console.decorators=[{type:p}],Console.ctorParameters=[],Console}(),Ge=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},ze=function(e){function ComponentStillLoadingError(t){e.call(this,"Can't compile synchronously as "+stringify(t)+" is still being loaded!"),this.compType=t}return Ge(ComponentStillLoadingError,e),ComponentStillLoadingError}(q),qe=function(){function ModuleWithComponentFactories(e,t){this.ngModuleFactory=e,this.componentFactories=t}return ModuleWithComponentFactories}(),Ke=function(){function Compiler(){}return Compiler.prototype.compileModuleSync=function(e){throw _throwError()},Compiler.prototype.compileModuleAsync=function(e){throw _throwError()},Compiler.prototype.compileModuleAndAllComponentsSync=function(e){throw _throwError()},Compiler.prototype.compileModuleAndAllComponentsAsync=function(e){throw _throwError()},Compiler.prototype.clearCache=function(){},Compiler.prototype.clearCacheFor=function(e){},Compiler}(),Qe=new m("compilerOptions"),Ze=function(){function CompilerFactory(){}return CompilerFactory}(),Xe=function(){function DefaultIterableDifferFactory(){}return DefaultIterableDifferFactory.prototype.supports=function(e){return isListLikeIterable(e)},DefaultIterableDifferFactory.prototype.create=function(e,t){return new Je(t)},DefaultIterableDifferFactory}(),$e=function(e,t){return t},Je=function(){function DefaultIterableDiffer(e){this._trackByFn=e,this._length=null,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=this._trackByFn||$e}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(e){var t;for(t=this._itHead;null!==t;t=t._next)e(t)},DefaultIterableDiffer.prototype.forEachOperation=function(e){for(var t=this._itHead,r=this._removalsHead,n=0,i=null;t||r;){var o=!r||t&&t.currentIndex<getPreviousIndex(r,n,i)?t:r,s=getPreviousIndex(o,n,i),a=o.currentIndex;if(o===r)n--,r=r._nextRemoved;else if(t=t._next,null==o.previousIndex)n++;else{i||(i=[]);var u=s-n,l=a-n;if(u!=l){for(var c=0;c<u;c++){var p=c<i.length?i[c]:i[c]=0,h=p+c;l<=h&&h<u&&(i[c]=p+1)}var f=o.previousIndex;i[f]=l-u}}s!==a&&e(o,s,a)}},DefaultIterableDiffer.prototype.forEachPreviousItem=function(e){var t;for(t=this._previousItHead;null!==t;t=t._nextPrevious)e(t)},DefaultIterableDiffer.prototype.forEachAddedItem=function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)},DefaultIterableDiffer.prototype.forEachMovedItem=function(e){var t;for(t=this._movesHead;null!==t;t=t._nextMoved)e(t)},DefaultIterableDiffer.prototype.forEachRemovedItem=function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)},DefaultIterableDiffer.prototype.forEachIdentityChange=function(e){var t;for(t=this._identityChangesHead;null!==t;t=t._nextIdentityChange)e(t)},DefaultIterableDiffer.prototype.diff=function(e){if(isBlank(e)&&(e=[]),!isListLikeIterable(e))throw new Error("Error trying to diff '"+e+"'");return this.check(e)?this:null},DefaultIterableDiffer.prototype.onDestroy=function(){},DefaultIterableDiffer.prototype.check=function(e){var t=this;this._reset();var r,n,i,o=this._itHead,s=!1;if(isArray(e)){var a=e;for(this._length=e.length,r=0;r<this._length;r++)n=a[r],i=this._trackByFn(r,n),null!==o&&looseIdentical(o.trackById,i)?(s&&(o=this._verifyReinsertion(o,n,i,r)),looseIdentical(o.item,n)||this._addIdentityChange(o,n)):(o=this._mismatch(o,n,i,r),s=!0),o=o._next}else r=0,iterateListLike(e,function(e){i=t._trackByFn(r,e),null!==o&&looseIdentical(o.trackById,i)?(s&&(o=t._verifyReinsertion(o,e,i,r)),looseIdentical(o.item,e)||t._addIdentityChange(o,e)):(o=t._mismatch(o,e,i,r),s=!0),o=o._next,r++}),this._length=r;return this._truncate(o),this._collection=e,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 e,t;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=t)e.previousIndex=e.currentIndex,t=e._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}},DefaultIterableDiffer.prototype._mismatch=function(e,t,r,n){var i;return null===e?i=this._itTail:(i=e._prev,this._remove(e)),e=null===this._linkedRecords?null:this._linkedRecords.get(r,n),null!==e?(looseIdentical(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,i,n)):(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r),null!==e?(looseIdentical(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,i,n)):e=this._addAfter(new Ye(t,r),i,n)),e},DefaultIterableDiffer.prototype._verifyReinsertion=function(e,t,r,n){var i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r);return null!==i?e=this._reinsertAfter(i,e._prev,n):e.currentIndex!=n&&(e.currentIndex=n,this._addToMoves(e,n)),e},DefaultIterableDiffer.prototype._truncate=function(e){for(;null!==e;){var t=e._next;this._addToRemovals(this._unlink(e)),e=t}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(e,t,r){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);var n=e._prevRemoved,i=e._nextRemoved;return null===n?this._removalsHead=i:n._nextRemoved=i,null===i?this._removalsTail=n:i._prevRemoved=n,this._insertAfter(e,t,r),this._addToMoves(e,r),e},DefaultIterableDiffer.prototype._moveAfter=function(e,t,r){return this._unlink(e),this._insertAfter(e,t,r),this._addToMoves(e,r),e},DefaultIterableDiffer.prototype._addAfter=function(e,t,r){return this._insertAfter(e,t,r),null===this._additionsTail?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e},DefaultIterableDiffer.prototype._insertAfter=function(e,t,r){var n=null===t?this._itHead:t._next;return e._next=n,e._prev=t,null===n?this._itTail=e:n._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new tt),this._linkedRecords.put(e),e.currentIndex=r,e},DefaultIterableDiffer.prototype._remove=function(e){return this._addToRemovals(this._unlink(e))},DefaultIterableDiffer.prototype._unlink=function(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);var t=e._prev,r=e._next;return null===t?this._itHead=r:t._next=r,null===r?this._itTail=t:r._prev=t,e},DefaultIterableDiffer.prototype._addToMoves=function(e,t){return e.previousIndex===t?e:(null===this._movesTail?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e,e)},DefaultIterableDiffer.prototype._addToRemovals=function(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new tt),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e},DefaultIterableDiffer.prototype._addIdentityChange=function(e,t){return e.item=t,null===this._identityChangesTail?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e},DefaultIterableDiffer.prototype.toString=function(){var e=[];this.forEachItem(function(t){return e.push(t)});var t=[];this.forEachPreviousItem(function(e){return t.push(e)});var r=[];this.forEachAddedItem(function(e){return r.push(e)});var n=[];this.forEachMovedItem(function(e){return n.push(e)});var i=[];this.forEachRemovedItem(function(e){return i.push(e)});var o=[];return this.forEachIdentityChange(function(e){return o.push(e)}),"collection: "+e.join(", ")+"\nprevious: "+t.join(", ")+"\nadditions: "+r.join(", ")+"\nmoves: "+n.join(", ")+"\nremovals: "+i.join(", ")+"\nidentityChanges: "+o.join(", ")+"\n"},DefaultIterableDiffer}(),Ye=function(){function CollectionChangeRecord(e,t){this.item=e,this.trackById=t,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 CollectionChangeRecord.prototype.toString=function(){return this.previousIndex===this.currentIndex?stringify(this.item):stringify(this.item)+"["+stringify(this.previousIndex)+"->"+stringify(this.currentIndex)+"]"},CollectionChangeRecord}(),et=function(){function _DuplicateItemRecordList(){this._head=null,this._tail=null}return _DuplicateItemRecordList.prototype.add=function(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)},_DuplicateItemRecordList.prototype.get=function(e,t){var r;for(r=this._head;null!==r;r=r._nextDup)if((null===t||t<r.currentIndex)&&looseIdentical(r.trackById,e))return r;return null},_DuplicateItemRecordList.prototype.remove=function(e){var t=e._prevDup,r=e._nextDup;return null===t?this._head=r:t._nextDup=r,null===r?this._tail=t:r._prevDup=t,null===this._head},_DuplicateItemRecordList}(),tt=function(){function _DuplicateMap(){this.map=new Map}return _DuplicateMap.prototype.put=function(e){var t=getMapKey(e.trackById),r=this.map.get(t);isPresent(r)||(r=new et,this.map.set(t,r)),r.add(e)},_DuplicateMap.prototype.get=function(e,t){void 0===t&&(t=null);var r=getMapKey(e),n=this.map.get(r);return n?n.get(e,t):null},_DuplicateMap.prototype.remove=function(e){var t=getMapKey(e.trackById),r=this.map.get(t);return r.remove(e)&&this.map.delete(t),e},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}(),rt=function(){function DefaultKeyValueDifferFactory(){}return DefaultKeyValueDifferFactory.prototype.supports=function(e){return e instanceof Map||isJsObject(e)},DefaultKeyValueDifferFactory.prototype.create=function(e){return new nt},DefaultKeyValueDifferFactory}(),nt=function(){function DefaultKeyValueDiffer(){this._records=new Map,this._mapHead=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(e){var t;for(t=this._mapHead;null!==t;t=t._next)e(t)},DefaultKeyValueDiffer.prototype.forEachPreviousItem=function(e){var t;for(t=this._previousMapHead;null!==t;t=t._nextPrevious)e(t)},DefaultKeyValueDiffer.prototype.forEachChangedItem=function(e){var t;for(t=this._changesHead;null!==t;t=t._nextChanged)e(t)},DefaultKeyValueDiffer.prototype.forEachAddedItem=function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)},DefaultKeyValueDiffer.prototype.forEachRemovedItem=function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)},DefaultKeyValueDiffer.prototype.diff=function(e){if(e){if(!(e instanceof Map||isJsObject(e)))throw new Error("Error trying to diff '"+e+"'")}else e=new Map;return this.check(e)?this:null},DefaultKeyValueDiffer.prototype.onDestroy=function(){},DefaultKeyValueDiffer.prototype.check=function(e){var t=this;this._reset();var r=this._records,n=this._mapHead,i=null,o=null,s=!1;return this._forEach(e,function(e,a){var u;n&&a===n.key?(u=n,t._maybeAddToChanges(u,e)):(s=!0,null!==n&&(t._removeFromSeq(i,n),t._addToRemovals(n)),r.has(a)?(u=r.get(a),t._maybeAddToChanges(u,e)):(u=new it(a),r.set(a,u),u.currentValue=e,t._addToAdditions(u))),s&&(t._isInRemovals(u)&&t._removeFromRemovals(u),null==o?t._mapHead=u:o._next=u),i=n,o=u,n=n&&n._next}),this._truncate(i,n),this.isDirty},DefaultKeyValueDiffer.prototype._reset=function(){if(this.isDirty){var e=void 0;for(e=this._previousMapHead=this._mapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=this._removalsTail=null}},DefaultKeyValueDiffer.prototype._truncate=function(e,t){for(;null!==t;){null===e?this._mapHead=null:e._next=null;var r=t._next;this._addToRemovals(t),e=t,t=r}for(var n=this._removalsHead;null!==n;n=n._nextRemoved)n.previousValue=n.currentValue,n.currentValue=null,this._records.delete(n.key)},DefaultKeyValueDiffer.prototype._maybeAddToChanges=function(e,t){looseIdentical(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))},DefaultKeyValueDiffer.prototype._isInRemovals=function(e){return e===this._removalsHead||null!==e._nextRemoved||null!==e._prevRemoved},DefaultKeyValueDiffer.prototype._addToRemovals=function(e){null===this._removalsHead?this._removalsHead=this._removalsTail=e:(this._removalsTail._nextRemoved=e,e._prevRemoved=this._removalsTail,this._removalsTail=e)},DefaultKeyValueDiffer.prototype._removeFromSeq=function(e,t){var r=t._next;null===e?this._mapHead=r:e._next=r,t._next=null},DefaultKeyValueDiffer.prototype._removeFromRemovals=function(e){var t=e._prevRemoved,r=e._nextRemoved;null===t?this._removalsHead=r:t._nextRemoved=r,null===r?this._removalsTail=t:r._prevRemoved=t,e._prevRemoved=e._nextRemoved=null},DefaultKeyValueDiffer.prototype._addToAdditions=function(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)},DefaultKeyValueDiffer.prototype._addToChanges=function(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)},DefaultKeyValueDiffer.prototype.toString=function(){var e,t=[],r=[],n=[],i=[],o=[];for(e=this._mapHead;null!==e;e=e._next)t.push(stringify(e));for(e=this._previousMapHead;null!==e;e=e._nextPrevious)r.push(stringify(e));for(e=this._changesHead;null!==e;e=e._nextChanged)n.push(stringify(e));for(e=this._additionsHead;null!==e;e=e._nextAdded)i.push(stringify(e));for(e=this._removalsHead;null!==e;e=e._nextRemoved)o.push(stringify(e));return"map: "+t.join(", ")+"\nprevious: "+r.join(", ")+"\nadditions: "+i.join(", ")+"\nchanges: "+n.join(", ")+"\nremovals: "+o.join(", ")+"\n"},DefaultKeyValueDiffer.prototype._forEach=function(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(function(r){return t(e[r],r)})},DefaultKeyValueDiffer}(),it=function(){function KeyValueChangeRecord(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._nextAdded=null,this._nextRemoved=null,this._prevRemoved=null,this._nextChanged=null}return KeyValueChangeRecord.prototype.toString=function(){return looseIdentical(this.previousValue,this.currentValue)?stringify(this.key):stringify(this.key)+"["+stringify(this.previousValue)+"->"+stringify(this.currentValue)+"]"},KeyValueChangeRecord}(),ot=function(){function IterableDiffers(e){this.factories=e}return IterableDiffers.create=function(e,t){if(isPresent(t)){var r=re.clone(t.factories);return e=e.concat(r),new IterableDiffers(e)}return new IterableDiffers(e)},IterableDiffers.extend=function(e){return{provide:IterableDiffers,useFactory:function(t){if(!t)throw new Error("Cannot extend IterableDiffers without a parent injector");return IterableDiffers.create(e,t)},deps:[[IterableDiffers,new f,new c]]}},IterableDiffers.prototype.find=function(e){var t=this.factories.find(function(t){return t.supports(e)});if(isPresent(t))return t;throw new Error("Cannot find a differ supporting object '"+e+"' of type '"+getTypeNameForDebugging(e)+"'")},IterableDiffers}(),st=function(){function KeyValueDiffers(e){this.factories=e}return KeyValueDiffers.create=function(e,t){if(isPresent(t)){var r=re.clone(t.factories);return e=e.concat(r),new KeyValueDiffers(e)}return new KeyValueDiffers(e)},KeyValueDiffers.extend=function(e){return{provide:KeyValueDiffers,useFactory:function(t){if(!t)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return KeyValueDiffers.create(e,t)},deps:[[KeyValueDiffers,new f,new c]]}},KeyValueDiffers.prototype.find=function(e){var t=this.factories.find(function(t){return t.supports(e)});if(isPresent(t))return t;throw new Error("Cannot find a differ supporting object '"+e+"'")},KeyValueDiffers}(),at={toString:function(){return"CD_INIT_VALUE"}},ut=function(){function WrappedValue(e){this.wrapped=e}return WrappedValue.wrap=function(e){return new WrappedValue(e)},WrappedValue}(),lt=function(){function ValueUnwrapper(){this.hasWrappedValue=!1}return ValueUnwrapper.prototype.unwrap=function(e){return e instanceof ut?(this.hasWrappedValue=!0,e.wrapped):e},ValueUnwrapper.prototype.reset=function(){this.hasWrappedValue=!1},ValueUnwrapper}(),ct=function(){function SimpleChange(e,t){this.previousValue=e,this.currentValue=t}return SimpleChange.prototype.isFirstChange=function(){return this.previousValue===at},SimpleChange}(),pt=function(){function ChangeDetectorRef(){}return ChangeDetectorRef}(),ht=[new rt],ft=[new Xe],dt=new ot(ft),mt=new st(ht),yt=function(){function RenderComponentType(e,t,r,n,i,o){this.id=e,this.templateUrl=t,this.slotCount=r,this.encapsulation=n,this.styles=i,this.animations=o}return RenderComponentType}(),vt=function(){function RenderDebugInfo(){}return Object.defineProperty(RenderDebugInfo.prototype,"injector",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderDebugInfo.prototype,"component",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderDebugInfo.prototype,"providerTokens",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderDebugInfo.prototype,"references",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderDebugInfo.prototype,"context",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(RenderDebugInfo.prototype,"source",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),RenderDebugInfo}(),gt=function(){function Renderer(){}return Renderer}(),_t=function(){function RootRenderer(){}return RootRenderer}();t.SecurityContext,function(e){e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL"}(t.SecurityContext||(t.SecurityContext={}));var bt,wt,Et,Ct=function(){function Sanitizer(){}return Sanitizer}(),St=function(){function ElementRef(e){this.nativeElement=e}return ElementRef}(),Pt=detectWTF(),At=Pt?createScope:function(e,t){return noopScope},xt=Pt?leave:function(e,t){return t},Tt=Pt?startTimeRange:function(e,t){return null},Mt=Pt?endTimeRange:function(e){return null},It=function(){function ViewContainerRef(){}return Object.defineProperty(ViewContainerRef.prototype,"element",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(ViewContainerRef.prototype,"injector",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(ViewContainerRef.prototype,"parentInjector",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(ViewContainerRef.prototype,"length",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),ViewContainerRef}(),Dt=function(){function ViewContainerRef_(e){this._element=e,this._createComponentInContainerScope=At("ViewContainerRef#createComponent()"),this._insertScope=At("ViewContainerRef#insert()"),this._removeScope=At("ViewContainerRef#remove()"),this._detachScope=At("ViewContainerRef#detach()")}return ViewContainerRef_.prototype.get=function(e){return this._element.nestedViews[e].ref},Object.defineProperty(ViewContainerRef_.prototype,"length",{get:function(){var e=this._element.nestedViews;return isPresent(e)?e.length:0},enumerable:!0,configurable:!0}),Object.defineProperty(ViewContainerRef_.prototype,"element",{get:function(){return this._element.elementRef},enumerable:!0,configurable:!0}),Object.defineProperty(ViewContainerRef_.prototype,"injector",{get:function(){return this._element.injector},enumerable:!0,configurable:!0}),Object.defineProperty(ViewContainerRef_.prototype,"parentInjector",{get:function(){return this._element.parentInjector},enumerable:!0,configurable:!0}),ViewContainerRef_.prototype.createEmbeddedView=function(e,t,r){void 0===t&&(t=null),void 0===r&&(r=-1);var n=e.createEmbeddedView(t);return this.insert(n,r),n},ViewContainerRef_.prototype.createComponent=function(e,t,r,n){void 0===t&&(t=-1),void 0===r&&(r=null),void 0===n&&(n=null);var i=this._createComponentInContainerScope(),o=r||this._element.parentInjector,s=e.create(o,n);return this.insert(s.hostView,t),xt(i,s)},ViewContainerRef_.prototype.insert=function(e,t){void 0===t&&(t=-1);var r=this._insertScope();t==-1&&(t=this.length);var n=e;return this._element.attachView(n.internalView,t),xt(r,n)},ViewContainerRef_.prototype.move=function(e,t){var r=this._insertScope();if(t!=-1){var n=e;return this._element.moveView(n.internalView,t),xt(r,n)}},ViewContainerRef_.prototype.indexOf=function(e){
return re.indexOf(this._element.nestedViews,e.internalView)},ViewContainerRef_.prototype.remove=function(e){void 0===e&&(e=-1);var t=this._removeScope();e==-1&&(e=this.length-1);var r=this._element.detachView(e);r.destroy(),xt(t)},ViewContainerRef_.prototype.detach=function(e){void 0===e&&(e=-1);var t=this._detachScope();e==-1&&(e=this.length-1);var r=this._element.detachView(e);return xt(t,r.ref)},ViewContainerRef_.prototype.clear=function(){for(var e=this.length-1;e>=0;e--)this.remove(e)},ViewContainerRef_}();!function(e){e[e.HOST=0]="HOST",e[e.COMPONENT=1]="COMPONENT",e[e.EMBEDDED=2]="EMBEDDED"}(Et||(Et={}));var Nt,Ot=function(){function AppElement(e,t,r,n){this.index=e,this.parentIndex=t,this.parentView=r,this.nativeElement=n,this.nestedViews=null,this.componentView=null}return Object.defineProperty(AppElement.prototype,"elementRef",{get:function(){return new St(this.nativeElement)},enumerable:!0,configurable:!0}),Object.defineProperty(AppElement.prototype,"vcRef",{get:function(){return new Dt(this)},enumerable:!0,configurable:!0}),AppElement.prototype.initComponent=function(e,t,r){this.component=e,this.componentConstructorViewQueries=t,this.componentView=r},Object.defineProperty(AppElement.prototype,"parentInjector",{get:function(){return this.parentView.injector(this.parentIndex)},enumerable:!0,configurable:!0}),Object.defineProperty(AppElement.prototype,"injector",{get:function(){return this.parentView.injector(this.index)},enumerable:!0,configurable:!0}),AppElement.prototype.mapNestedViews=function(e,t){var r=[];return isPresent(this.nestedViews)&&this.nestedViews.forEach(function(n){n.clazz===e&&r.push(t(n))}),r},AppElement.prototype.moveView=function(e,t){var r=this.nestedViews.indexOf(e);if(e.type===Et.COMPONENT)throw new Error("Component views can't be moved!");var n=this.nestedViews;null==n&&(n=[],this.nestedViews=n),re.removeAt(n,r),re.insert(n,t,e);var i;if(t>0){var o=n[t-1];i=o.lastRootNode}else i=this.nativeElement;isPresent(i)&&e.renderer.attachViewAfter(i,e.flatRootNodes),e.markContentChildAsMoved(this)},AppElement.prototype.attachView=function(e,t){if(e.type===Et.COMPONENT)throw new Error("Component views can't be moved!");var r=this.nestedViews;null==r&&(r=[],this.nestedViews=r),re.insert(r,t,e);var n;if(t>0){var i=r[t-1];n=i.lastRootNode}else n=this.nativeElement;isPresent(n)&&e.renderer.attachViewAfter(n,e.flatRootNodes),e.addToContentChildren(this)},AppElement.prototype.detachView=function(e){var t=re.removeAt(this.nestedViews,e);if(t.type===Et.COMPONENT)throw new Error("Component views can't be moved!");return t.detach(),t.removeFromContentChildren(this),t},AppElement}(),Vt=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},Rt=function(e){function ExpressionChangedAfterItHasBeenCheckedError(t,r){var n="Expression has changed after it was checked. Previous value: '"+t+"'. Current value: '"+r+"'.";t===at&&(n+=" 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 ?"),e.call(this,n)}return Vt(ExpressionChangedAfterItHasBeenCheckedError,e),ExpressionChangedAfterItHasBeenCheckedError}(q),kt=function(e){function ViewWrappedError(t,r){e.call(this,"Error in "+r.source,t),this.context=r}return Vt(ViewWrappedError,e),ViewWrappedError}(K),Lt=function(e){function ViewDestroyedError(t){e.call(this,"Attempt to use a destroyed view: "+t)}return Vt(ViewDestroyedError,e),ViewDestroyedError}(q),Ft=function(){function ViewUtils(e,t,r){this._renderer=e,this._appId=t,this._nextCompTypeId=0,this.sanitizer=r}return ViewUtils.prototype.createRenderComponentType=function(e,t,r,n,i){return new yt(this._appId+"-"+this._nextCompTypeId++,e,t,r,n,i)},ViewUtils.prototype.renderComponent=function(e){return this._renderer.renderComponent(e)},ViewUtils.decorators=[{type:p}],ViewUtils.ctorParameters=[{type:_t},{type:void 0,decorators:[{type:l,args:[Fe]}]},{type:Ct}],ViewUtils}(),jt=[],Bt=9,Ut=[],Wt={},Ht=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},Gt=function(){function ComponentRef(){}return Object.defineProperty(ComponentRef.prototype,"location",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef.prototype,"injector",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef.prototype,"instance",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef.prototype,"hostView",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef.prototype,"changeDetectorRef",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef.prototype,"componentType",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),ComponentRef}(),zt=function(e){function ComponentRef_(t,r){e.call(this),this._hostElement=t,this._componentType=r}return Ht(ComponentRef_,e),Object.defineProperty(ComponentRef_.prototype,"location",{get:function(){return this._hostElement.elementRef},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef_.prototype,"injector",{get:function(){return this._hostElement.injector},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef_.prototype,"instance",{get:function(){return this._hostElement.component},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef_.prototype,"hostView",{get:function(){return this._hostElement.parentView.ref},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef_.prototype,"changeDetectorRef",{get:function(){return this._hostElement.parentView.ref},enumerable:!0,configurable:!0}),Object.defineProperty(ComponentRef_.prototype,"componentType",{get:function(){return this._componentType},enumerable:!0,configurable:!0}),ComponentRef_.prototype.destroy=function(){this._hostElement.parentView.destroy()},ComponentRef_.prototype.onDestroy=function(e){this.hostView.onDestroy(e)},ComponentRef_}(Gt),qt=new Object,Kt=function(){function ComponentFactory(e,t,r){this.selector=e,this._viewFactory=t,this._componentType=r}return Object.defineProperty(ComponentFactory.prototype,"componentType",{get:function(){return this._componentType},enumerable:!0,configurable:!0}),ComponentFactory.prototype.create=function(e,t,r){void 0===t&&(t=null),void 0===r&&(r=null);var n=e.get(Ft);t||(t=[]);var i=this._viewFactory(n,e,null),o=i.create(qt,t,r);return new zt(o,this._componentType)},ComponentFactory}(),Qt=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},Zt=function(e){function NoComponentFactoryError(t){e.call(this,"No component factory found for "+stringify(t)),this.component=t}return Qt(NoComponentFactoryError,e),NoComponentFactoryError}(q),Xt=function(){function _NullComponentFactoryResolver(){}return _NullComponentFactoryResolver.prototype.resolveComponentFactory=function(e){throw new Zt(e)},_NullComponentFactoryResolver}(),$t=function(){function ComponentFactoryResolver(){}return ComponentFactoryResolver.NULL=new Xt,ComponentFactoryResolver}(),Jt=function(){function CodegenComponentFactoryResolver(e,t){this._parent=t,this._factories=new Map;for(var r=0;r<e.length;r++){var n=e[r];this._factories.set(n.componentType,n)}}return CodegenComponentFactoryResolver.prototype.resolveComponentFactory=function(e){var t=this._factories.get(e);return t||(t=this._parent.resolveComponentFactory(e)),t},CodegenComponentFactoryResolver}(),Yt=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},er=function(e){function EventEmitter(t){void 0===t&&(t=!1),e.call(this),this.__isAsync=t}return Yt(EventEmitter,e),EventEmitter.prototype.emit=function(t){e.prototype.next.call(this,t)},EventEmitter.prototype.subscribe=function(t,r,n){var i,o=function(e){return null},s=function(){return null};return t&&"object"==typeof t?(i=this.__isAsync?function(e){setTimeout(function(){return t.next(e)})}:function(e){t.next(e)},t.error&&(o=this.__isAsync?function(e){setTimeout(function(){return t.error(e)})}:function(e){t.error(e)}),t.complete&&(s=this.__isAsync?function(){setTimeout(function(){return t.complete()})}:function(){t.complete()})):(i=this.__isAsync?function(e){setTimeout(function(){return t(e)})}:function(e){t(e)},r&&(o=this.__isAsync?function(e){setTimeout(function(){return r(e)})}:function(e){r(e)}),n&&(s=this.__isAsync?function(){setTimeout(function(){return n()})}:function(){n()})),e.prototype.subscribe.call(this,i,o,s)},EventEmitter}(r.Subject),tr=function(){function NgZone(e){var t=e.enableLongStackTrace,r=void 0!==t&&t;if(this._hasPendingMicrotasks=!1,this._hasPendingMacrotasks=!1,this._isStable=!0,this._nesting=0,this._onUnstable=new er((!1)),this._onMicrotaskEmpty=new er((!1)),this._onStable=new er((!1)),this._onErrorEvents=new er((!1)),"undefined"==typeof Zone)throw new Error("Angular requires Zone.js prolyfill.");Zone.assertZonePatched(),this.outer=this.inner=Zone.current,Zone.wtfZoneSpec&&(this.inner=this.inner.fork(Zone.wtfZoneSpec)),r&&Zone.longStackTraceZoneSpec&&(this.inner=this.inner.fork(Zone.longStackTraceZoneSpec)),this.forkInnerZoneWithAngularBehavior()}return NgZone.isInAngularZone=function(){return Zone.current.get("isAngularZone")===!0},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(e){return this.inner.run(e)},NgZone.prototype.runGuarded=function(e){return this.inner.runGuarded(e)},NgZone.prototype.runOutsideAngular=function(e){return this.outer.run(e)},Object.defineProperty(NgZone.prototype,"onUnstable",{get:function(){return this._onUnstable},enumerable:!0,configurable:!0}),Object.defineProperty(NgZone.prototype,"onMicrotaskEmpty",{get:function(){return this._onMicrotaskEmpty},enumerable:!0,configurable:!0}),Object.defineProperty(NgZone.prototype,"onStable",{get:function(){return this._onStable},enumerable:!0,configurable:!0}),Object.defineProperty(NgZone.prototype,"onError",{get:function(){return this._onErrorEvents},enumerable:!0,configurable:!0}),Object.defineProperty(NgZone.prototype,"isStable",{get:function(){return this._isStable},enumerable:!0,configurable:!0}),Object.defineProperty(NgZone.prototype,"hasPendingMicrotasks",{get:function(){return this._hasPendingMicrotasks},enumerable:!0,configurable:!0}),Object.defineProperty(NgZone.prototype,"hasPendingMacrotasks",{get:function(){return this._hasPendingMacrotasks},enumerable:!0,configurable:!0}),NgZone.prototype.checkStable=function(){var e=this;if(0==this._nesting&&!this._hasPendingMicrotasks&&!this._isStable)try{this._nesting++,this._onMicrotaskEmpty.emit(null)}finally{if(this._nesting--,!this._hasPendingMicrotasks)try{this.runOutsideAngular(function(){return e._onStable.emit(null)})}finally{this._isStable=!0}}},NgZone.prototype.forkInnerZoneWithAngularBehavior=function(){var e=this;this.inner=this.inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:function(t,r,n,i,o,s){try{return e.onEnter(),t.invokeTask(n,i,o,s)}finally{e.onLeave()}},onInvoke:function(t,r,n,i,o,s,a){try{return e.onEnter(),t.invoke(n,i,o,s,a)}finally{e.onLeave()}},onHasTask:function(t,r,n,i){t.hasTask(n,i),r===n&&("microTask"==i.change?e.setHasMicrotask(i.microTask):"macroTask"==i.change&&e.setHasMacrotask(i.macroTask))},onHandleError:function(t,r,n,i){return t.handleError(n,i),e.triggerError(i),!1}})},NgZone.prototype.onEnter=function(){this._nesting++,this._isStable&&(this._isStable=!1,this._onUnstable.emit(null))},NgZone.prototype.onLeave=function(){this._nesting--,this.checkStable()},NgZone.prototype.setHasMicrotask=function(e){this._hasPendingMicrotasks=e,this.checkStable()},NgZone.prototype.setHasMacrotask=function(e){this._hasPendingMacrotasks=e},NgZone.prototype.triggerError=function(e){this._onErrorEvents.emit(e)},NgZone}(),rr=function(){function Testability(e){this._ngZone=e,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this._watchAngularEvents()}return Testability.prototype._watchAngularEvents=function(){var e=this;this._ngZone.onUnstable.subscribe({next:function(){e._didWork=!0,e._isZoneStable=!1}}),this._ngZone.runOutsideAngular(function(){e._ngZone.onStable.subscribe({next:function(){tr.assertNotInAngularZone(),scheduleMicroTask(function(){e._isZoneStable=!0,e._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 e=this;this.isStable()?scheduleMicroTask(function(){for(;0!==e._callbacks.length;)e._callbacks.pop()(e._didWork);e._didWork=!1}):this._didWork=!0},Testability.prototype.whenStable=function(e){this._callbacks.push(e),this._runCallbacksIfReady()},Testability.prototype.getPendingRequestCount=function(){return this._pendingCount},Testability.prototype.findBindings=function(e,t,r){return[]},Testability.prototype.findProviders=function(e,t,r){return[]},Testability.decorators=[{type:p}],Testability.ctorParameters=[{type:tr}],Testability}(),nr=function(){function TestabilityRegistry(){this._applications=new Map,or.addToWindow(this)}return TestabilityRegistry.prototype.registerApplication=function(e,t){this._applications.set(e,t)},TestabilityRegistry.prototype.getTestability=function(e){return this._applications.get(e)},TestabilityRegistry.prototype.getAllTestabilities=function(){return ee.values(this._applications)},TestabilityRegistry.prototype.getAllRootElements=function(){return ee.keys(this._applications)},TestabilityRegistry.prototype.findTestabilityInTree=function(e,t){return void 0===t&&(t=!0),or.findTestabilityInTree(this,e,t)},TestabilityRegistry.decorators=[{type:p}],TestabilityRegistry.ctorParameters=[],TestabilityRegistry}(),ir=function(){function _NoopGetTestability(){}return _NoopGetTestability.prototype.addToWindow=function(e){},_NoopGetTestability.prototype.findTestabilityInTree=function(e,t,r){return null},_NoopGetTestability}(),or=new ir,sr=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},ar=!0,ur=!1,lr=function(){function PlatformRef(){}return PlatformRef.prototype.bootstrapModuleFactory=function(e){throw unimplemented()},PlatformRef.prototype.bootstrapModule=function(e,t){throw void 0===t&&(t=[]),unimplemented()},Object.defineProperty(PlatformRef.prototype,"injector",{get:function(){throw unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(PlatformRef.prototype,"destroyed",{get:function(){throw unimplemented()},enumerable:!0,configurable:!0}),PlatformRef}(),cr=function(e){function PlatformRef_(t){e.call(this),this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return sr(PlatformRef_,e),PlatformRef_.prototype.onDestroy=function(e){this._destroyListeners.push(e)},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(e){return e.destroy()}),this._destroyListeners.forEach(function(e){return e()}),this._destroyed=!0},PlatformRef_.prototype.bootstrapModuleFactory=function(e){return this._bootstrapModuleFactoryWithZone(e,null)},PlatformRef_.prototype._bootstrapModuleFactoryWithZone=function(e,t){var r=this;return t||(t=new tr({enableLongStackTrace:isDevMode()})),t.run(function(){var n=Ne.resolveAndCreate([{provide:tr,useValue:t}],r.injector),i=e.create(n),o=i.injector.get(Re,null);if(!o)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return i.onDestroy(function(){return re.remove(r._modules,i)}),t.onError.subscribe({next:function(e){o.handleError(e)}}),_callAndReportToErrorHandler(o,function(){var e=i.injector.get(Le);return e.donePromise.then(function(){return r._moduleDoBootstrap(i),i})})})},PlatformRef_.prototype.bootstrapModule=function(e,t){return void 0===t&&(t=[]),this._bootstrapModuleWithZone(e,t,null)},PlatformRef_.prototype._bootstrapModuleWithZone=function(e,t,r,n){var i=this;void 0===t&&(t=[]);var o=this.injector.get(Ze),s=o.createCompiler(Array.isArray(t)?t:[t]);return n?s.compileModuleAndAllComponentsAsync(e).then(function(e){var t=e.ngModuleFactory,o=e.componentFactories;return n(o),i._bootstrapModuleFactoryWithZone(t,r)}):s.compileModuleAsync(e).then(function(e){return i._bootstrapModuleFactoryWithZone(e,r)})},PlatformRef_.prototype._moduleDoBootstrap=function(e){var t=e.injector.get(pr);if(e.bootstrapFactories.length>0)e.bootstrapFactories.forEach(function(e){return t.bootstrap(e)});else{if(!e.instance.ngDoBootstrap)throw new Error("The module "+stringify(e.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');e.instance.ngDoBootstrap(t)}},PlatformRef_.decorators=[{type:p}],PlatformRef_.ctorParameters=[{type:$}],PlatformRef_}(lr),pr=function(){function ApplicationRef(){}return Object.defineProperty(ApplicationRef.prototype,"componentTypes",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(ApplicationRef.prototype,"components",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),ApplicationRef}(),hr=function(e){function ApplicationRef_(t,r,n,i,o,s,a,u){var l=this;e.call(this),this._zone=t,this._console=r,this._injector=n,this._exceptionHandler=i,this._componentFactoryResolver=o,this._initStatus=s,this._testabilityRegistry=a,this._testability=u,this._bootstrapListeners=[],this._rootComponents=[],this._rootComponentTypes=[],this._changeDetectorRefs=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._enforceNoNewChanges=isDevMode(),this._zone.onMicrotaskEmpty.subscribe({next:function(){l._zone.run(function(){l.tick()})}})}return sr(ApplicationRef_,e),ApplicationRef_.prototype.registerChangeDetector=function(e){this._changeDetectorRefs.push(e)},ApplicationRef_.prototype.unregisterChangeDetector=function(e){re.remove(this._changeDetectorRefs,e)},ApplicationRef_.prototype.bootstrap=function(e){var t=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 r;r=e instanceof Kt?e:this._componentFactoryResolver.resolveComponentFactory(e),this._rootComponentTypes.push(r.componentType);var n=r.create(this._injector,[],r.selector);n.onDestroy(function(){t._unloadComponent(n)});var i=n.injector.get(rr,null);return i&&n.injector.get(nr).registerApplication(n.location.nativeElement,i),this._loadComponent(n),isDevMode()&&this._console.log("Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode."),n},ApplicationRef_.prototype._loadComponent=function(e){this._changeDetectorRefs.push(e.changeDetectorRef),this.tick(),this._rootComponents.push(e);var t=this._injector.get(Ue,[]).concat(this._bootstrapListeners);t.forEach(function(t){return t(e)})},ApplicationRef_.prototype._unloadComponent=function(e){this._rootComponents.indexOf(e)!=-1&&(this.unregisterChangeDetector(e.changeDetectorRef),re.remove(this._rootComponents,e))},ApplicationRef_.prototype.tick=function(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var e=ApplicationRef_._tickScope();try{this._runningTick=!0,this._changeDetectorRefs.forEach(function(e){return e.detectChanges()}),this._enforceNoNewChanges&&this._changeDetectorRefs.forEach(function(e){return e.checkNoChanges()})}finally{this._runningTick=!1,xt(e)}},ApplicationRef_.prototype.ngOnDestroy=function(){this._rootComponents.slice().forEach(function(e){return e.destroy()})},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}),ApplicationRef_._tickScope=At("ApplicationRef#tick()"),ApplicationRef_.decorators=[{type:p}],ApplicationRef_.ctorParameters=[{type:tr},{type:He},{type:$},{type:Re},{type:$t},{type:Le},{type:nr,decorators:[{type:c}]},{type:rr,decorators:[{type:c}]}],ApplicationRef_}(pr),fr=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},dr=function(){function NgModuleRef(){}return Object.defineProperty(NgModuleRef.prototype,"injector",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(NgModuleRef.prototype,"componentFactoryResolver",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(NgModuleRef.prototype,"instance",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),NgModuleRef}(),mr=function(){function NgModuleFactory(e,t){this._injectorClass=e,this._moduleType=t}return Object.defineProperty(NgModuleFactory.prototype,"moduleType",{get:function(){return this._moduleType},enumerable:!0,configurable:!0}),NgModuleFactory.prototype.create=function(e){e||(e=$.NULL);var t=new this._injectorClass(e);return t.create(),t},NgModuleFactory}(),yr=new Object,vr=function(e){function NgModuleInjector(t,r,n){e.call(this,r,t.get($t,$t.NULL)),this.parent=t,this.bootstrapFactories=n,this._destroyListeners=[],this._destroyed=!1}return fr(NgModuleInjector,e),NgModuleInjector.prototype.create=function(){this.instance=this.createInternal()},NgModuleInjector.prototype.get=function(e,t){if(void 0===t&&(t=Z),e===$||e===$t)return this;var r=this.getInternal(e,yr);return r===yr?this.parent.get(e,t):r},Object.defineProperty(NgModuleInjector.prototype,"injector",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(NgModuleInjector.prototype,"componentFactoryResolver",{get:function(){return this},enumerable:!0,configurable:!0}),NgModuleInjector.prototype.destroy=function(){if(this._destroyed)throw new Error("The ng module "+stringify(this.instance.constructor)+" has already been destroyed.");this._destroyed=!0,this.destroyInternal(),this._destroyListeners.forEach(function(e){return e()})},NgModuleInjector.prototype.onDestroy=function(e){this._destroyListeners.push(e)},NgModuleInjector}(Jt),gr=function(){function NgModuleFactoryLoader(){}return NgModuleFactoryLoader}(),_r=new Map,br=function(){function QueryList(){this._dirty=!0,this._results=[],this._emitter=new er}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(e){return this._results.map(e)},QueryList.prototype.filter=function(e){return this._results.filter(e)},QueryList.prototype.reduce=function(e,t){return this._results.reduce(e,t)},QueryList.prototype.forEach=function(e){this._results.forEach(e)},QueryList.prototype.some=function(e){return this._results.some(e)},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(e){this._results=re.flatten(e),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}(),wr="#",Er="NgFactory",Cr=function(){function SystemJsNgModuleLoaderConfig(){}return SystemJsNgModuleLoaderConfig}(),Sr={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},Pr=function(){function SystemJsNgModuleLoader(e,t){this._compiler=e,this._config=t||Sr}return SystemJsNgModuleLoader.prototype.load=function(e){var t=this._compiler instanceof Ke;return t?this.loadFactory(e):this.loadAndCompile(e)},SystemJsNgModuleLoader.prototype.loadAndCompile=function(e){var t=this,r=e.split(wr),n=r[0],i=r[1];return void 0===i&&(i="default"),System.import(n).then(function(e){return e[i]}).then(function(e){return checkNotEmpty(e,n,i)}).then(function(e){return t._compiler.compileModuleAsync(e)})},SystemJsNgModuleLoader.prototype.loadFactory=function(e){var t=e.split(wr),r=t[0],n=t[1],i=Er;return void 0===n&&(n="default",i=""),System.import(this._config.factoryPathPrefix+r+this._config.factoryPathSuffix).then(function(e){return e[n+i]}).then(function(e){return checkNotEmpty(e,r,n)})},SystemJsNgModuleLoader.decorators=[{type:p}],SystemJsNgModuleLoader.ctorParameters=[{type:Ke},{type:Cr,decorators:[{type:c}]}],SystemJsNgModuleLoader}(),Ar=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},xr=function(){function TemplateRef(){}return Object.defineProperty(TemplateRef.prototype,"elementRef",{get:function(){return null},enumerable:!0,configurable:!0}),TemplateRef}(),Tr=function(e){function TemplateRef_(t,r){e.call(this),this._appElement=t,this._viewFactory=r}return Ar(TemplateRef_,e),TemplateRef_.prototype.createEmbeddedView=function(e){var t=this._viewFactory(this._appElement.parentView.viewUtils,this._appElement.parentInjector,this._appElement);return t.create(e||{},null,null),t.ref},Object.defineProperty(TemplateRef_.prototype,"elementRef",{get:function(){return this._appElement.elementRef},enumerable:!0,configurable:!0}),TemplateRef_}(xr),Mr=[],Ir=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},Dr=function(){function ViewRef(){}return Object.defineProperty(ViewRef.prototype,"destroyed",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),ViewRef}(),Nr=function(e){function EmbeddedViewRef(){e.apply(this,arguments)}return Ir(EmbeddedViewRef,e),Object.defineProperty(EmbeddedViewRef.prototype,"context",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(EmbeddedViewRef.prototype,"rootNodes",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),EmbeddedViewRef}(Dr),Or=function(){function ViewRef_(e){this._view=e,this._view=e,this._originalMode=this._view.cdMode}return Object.defineProperty(ViewRef_.prototype,"internalView",{get:function(){return this._view},enumerable:!0,configurable:!0}),Object.defineProperty(ViewRef_.prototype,"rootNodes",{get:function(){return this._view.flatRootNodes},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 this._view.destroyed},enumerable:!0,configurable:!0}),ViewRef_.prototype.markForCheck=function(){this._view.markPathToRootAsCheckOnce()},ViewRef_.prototype.detach=function(){this._view.cdMode=C.Detached},ViewRef_.prototype.detectChanges=function(){this._view.detectChanges(!1),triggerQueuedAnimations()},ViewRef_.prototype.checkNoChanges=function(){this._view.detectChanges(!0)},ViewRef_.prototype.reattach=function(){this._view.cdMode=this._originalMode,this.markForCheck()},ViewRef_.prototype.onDestroy=function(e){this._view.disposables.push(e)},ViewRef_.prototype.destroy=function(){this._view.destroy()},ViewRef_}(),Vr=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},Rr=function(){function EventListener(e,t){this.name=e,this.callback=t}return EventListener}(),kr=function(){function DebugNode(e,t,r){this._debugInfo=r,this.nativeNode=e,isPresent(t)&&t instanceof Lr?t.addChild(this):this.parent=null,this.listeners=[]}return Object.defineProperty(DebugNode.prototype,"injector",{get:function(){return isPresent(this._debugInfo)?this._debugInfo.injector:null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugNode.prototype,"componentInstance",{get:function(){return isPresent(this._debugInfo)?this._debugInfo.component:null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugNode.prototype,"context",{get:function(){return isPresent(this._debugInfo)?this._debugInfo.context:null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugNode.prototype,"references",{get:function(){return isPresent(this._debugInfo)?this._debugInfo.references:null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugNode.prototype,"providerTokens",{get:function(){return isPresent(this._debugInfo)?this._debugInfo.providerTokens:null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugNode.prototype,"source",{get:function(){return isPresent(this._debugInfo)?this._debugInfo.source:null},enumerable:!0,configurable:!0}),DebugNode}(),Lr=function(e){function DebugElement(t,r,n){e.call(this,t,r,n),this.properties={},this.attributes={},this.classes={},this.styles={},this.childNodes=[],this.nativeElement=t}return Vr(DebugElement,e),DebugElement.prototype.addChild=function(e){isPresent(e)&&(this.childNodes.push(e),e.parent=this)},DebugElement.prototype.removeChild=function(e){var t=this.childNodes.indexOf(e);t!==-1&&(e.parent=null,this.childNodes.splice(t,1))},DebugElement.prototype.insertChildrenAfter=function(e,t){var r=this.childNodes.indexOf(e);if(r!==-1){var n=this.childNodes.slice(0,r+1),i=this.childNodes.slice(r+1);this.childNodes=re.concat(re.concat(n,t),i);for(var o=0;o<t.length;++o){var s=t[o];isPresent(s.parent)&&s.parent.removeChild(s),s.parent=this}}},DebugElement.prototype.query=function(e){var t=this.queryAll(e);return t.length>0?t[0]:null},DebugElement.prototype.queryAll=function(e){var t=[];return _queryElementChildren(this,e,t),t},DebugElement.prototype.queryAllNodes=function(e){var t=[];return _queryNodeChildren(this,e,t),t},Object.defineProperty(DebugElement.prototype,"children",{get:function(){var e=[];return this.childNodes.forEach(function(t){t instanceof DebugElement&&e.push(t)}),e},enumerable:!0,configurable:!0}),DebugElement.prototype.triggerEventHandler=function(e,t){this.listeners.forEach(function(r){
r.name==e&&r.callback(t)})},DebugElement}(kr),Fr=new Map,jr=[cr,{provide:lr,useExisting:cr},{provide:_e,useFactory:_reflector,deps:[]},{provide:ve,useExisting:_e},nr,He],Br=createPlatformFactory(null,"core",jr),Ur=new m("LocaleId"),Wr=new m("Translations"),Hr=new m("TranslationsFormat"),Gr=function(){function ApplicationModule(){}return ApplicationModule.decorators=[{type:H,args:[{providers:[hr,{provide:pr,useExisting:hr},Le,Ke,je,Ft,{provide:ot,useFactory:_iterableDiffersFactory},{provide:st,useFactory:_keyValueDiffersFactory},{provide:Ur,useValue:"en-US"}]}]}],ApplicationModule.ctorParameters=[],ApplicationModule}(),zr="true",qr="*",Kr="*",Qr="void",Zr=o.Math,Xr=function(){function AnimationGroupPlayer(e){var t=this;this._players=e,this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this.parentPlayer=null;var r=0,n=this._players.length;0==n?scheduleMicroTask(function(){return t._onFinish()}):this._players.forEach(function(e){e.parentPlayer=t,e.onDone(function(){++r>=n&&t._onFinish()})})}return AnimationGroupPlayer.prototype._onFinish=function(){this._finished||(this._finished=!0,isPresent(this.parentPlayer)||this.destroy(),this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[])},AnimationGroupPlayer.prototype.init=function(){this._players.forEach(function(e){return e.init()})},AnimationGroupPlayer.prototype.onStart=function(e){this._onStartFns.push(e)},AnimationGroupPlayer.prototype.onDone=function(e){this._onDoneFns.push(e)},AnimationGroupPlayer.prototype.hasStarted=function(){return this._started},AnimationGroupPlayer.prototype.play=function(){isPresent(this.parentPlayer)||this.init(),this.hasStarted()||(this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[],this._started=!0),this._players.forEach(function(e){return e.play()})},AnimationGroupPlayer.prototype.pause=function(){this._players.forEach(function(e){return e.pause()})},AnimationGroupPlayer.prototype.restart=function(){this._players.forEach(function(e){return e.restart()})},AnimationGroupPlayer.prototype.finish=function(){this._onFinish(),this._players.forEach(function(e){return e.finish()})},AnimationGroupPlayer.prototype.destroy=function(){this._onFinish(),this._players.forEach(function(e){return e.destroy()})},AnimationGroupPlayer.prototype.reset=function(){this._players.forEach(function(e){return e.reset()})},AnimationGroupPlayer.prototype.setPosition=function(e){this._players.forEach(function(t){t.setPosition(e)})},AnimationGroupPlayer.prototype.getPosition=function(){var e=0;return this._players.forEach(function(t){var r=t.getPosition();e=Zr.min(r,e)}),e},AnimationGroupPlayer}(),$r=function(){function AnimationKeyframe(e,t){this.offset=e,this.styles=t}return AnimationKeyframe}(),Jr=function(){function AnimationPlayer(){}return Object.defineProperty(AnimationPlayer.prototype,"parentPlayer",{get:function(){throw new Error("NOT IMPLEMENTED: Base Class")},set:function(e){throw new Error("NOT IMPLEMENTED: Base Class")},enumerable:!0,configurable:!0}),AnimationPlayer}(),Yr=function(){function NoOpAnimationPlayer(){var e=this;this._onDoneFns=[],this._onStartFns=[],this._started=!1,this.parentPlayer=null,scheduleMicroTask(function(){return e._onFinish()})}return NoOpAnimationPlayer.prototype._onFinish=function(){this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[]},NoOpAnimationPlayer.prototype.onStart=function(e){this._onStartFns.push(e)},NoOpAnimationPlayer.prototype.onDone=function(e){this._onDoneFns.push(e)},NoOpAnimationPlayer.prototype.hasStarted=function(){return this._started},NoOpAnimationPlayer.prototype.init=function(){},NoOpAnimationPlayer.prototype.play=function(){this.hasStarted()||(this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[]),this._started=!0},NoOpAnimationPlayer.prototype.pause=function(){},NoOpAnimationPlayer.prototype.restart=function(){},NoOpAnimationPlayer.prototype.finish=function(){this._onFinish()},NoOpAnimationPlayer.prototype.destroy=function(){},NoOpAnimationPlayer.prototype.reset=function(){},NoOpAnimationPlayer.prototype.setPosition=function(e){},NoOpAnimationPlayer.prototype.getPosition=function(){return 0},NoOpAnimationPlayer}(),en=function(){function AnimationSequencePlayer(e){var t=this;this._players=e,this._currentIndex=0,this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this.parentPlayer=null,this._players.forEach(function(e){e.parentPlayer=t}),this._onNext(!1)}return AnimationSequencePlayer.prototype._onNext=function(e){var t=this;if(!this._finished)if(0==this._players.length)this._activePlayer=new Yr,scheduleMicroTask(function(){return t._onFinish()});else if(this._currentIndex>=this._players.length)this._activePlayer=new Yr,this._onFinish();else{var r=this._players[this._currentIndex++];r.onDone(function(){return t._onNext(!0)}),this._activePlayer=r,e&&r.play()}},AnimationSequencePlayer.prototype._onFinish=function(){this._finished||(this._finished=!0,isPresent(this.parentPlayer)||this.destroy(),this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[])},AnimationSequencePlayer.prototype.init=function(){this._players.forEach(function(e){return e.init()})},AnimationSequencePlayer.prototype.onStart=function(e){this._onStartFns.push(e)},AnimationSequencePlayer.prototype.onDone=function(e){this._onDoneFns.push(e)},AnimationSequencePlayer.prototype.hasStarted=function(){return this._started},AnimationSequencePlayer.prototype.play=function(){isPresent(this.parentPlayer)||this.init(),this.hasStarted()||(this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[],this._started=!0),this._activePlayer.play()},AnimationSequencePlayer.prototype.pause=function(){this._activePlayer.pause()},AnimationSequencePlayer.prototype.restart=function(){this._players.length>0&&(this.reset(),this._players[0].restart())},AnimationSequencePlayer.prototype.reset=function(){this._players.forEach(function(e){return e.reset()})},AnimationSequencePlayer.prototype.finish=function(){this._onFinish(),this._players.forEach(function(e){return e.finish()})},AnimationSequencePlayer.prototype.destroy=function(){this._onFinish(),this._players.forEach(function(e){return e.destroy()})},AnimationSequencePlayer.prototype.setPosition=function(e){this._players[0].setPosition(e)},AnimationSequencePlayer.prototype.getPosition=function(){return this._players[0].getPosition()},AnimationSequencePlayer}(),tn=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},rn="*",nn=function(){function AnimationEntryMetadata(e,t){this.name=e,this.definitions=t}return AnimationEntryMetadata}(),on=function(){function AnimationStateMetadata(){}return AnimationStateMetadata}(),sn=function(e){function AnimationStateDeclarationMetadata(t,r){e.call(this),this.stateNameExpr=t,this.styles=r}return tn(AnimationStateDeclarationMetadata,e),AnimationStateDeclarationMetadata}(on),an=function(e){function AnimationStateTransitionMetadata(t,r){e.call(this),this.stateChangeExpr=t,this.steps=r}return tn(AnimationStateTransitionMetadata,e),AnimationStateTransitionMetadata}(on),un=function(){function AnimationMetadata(){}return AnimationMetadata}(),ln=function(e){function AnimationKeyframesSequenceMetadata(t){e.call(this),this.steps=t}return tn(AnimationKeyframesSequenceMetadata,e),AnimationKeyframesSequenceMetadata}(un),cn=function(e){function AnimationStyleMetadata(t,r){void 0===r&&(r=null),e.call(this),this.styles=t,this.offset=r}return tn(AnimationStyleMetadata,e),AnimationStyleMetadata}(un),pn=function(e){function AnimationAnimateMetadata(t,r){e.call(this),this.timings=t,this.styles=r}return tn(AnimationAnimateMetadata,e),AnimationAnimateMetadata}(un),hn=function(e){function AnimationWithStepsMetadata(){e.call(this)}return tn(AnimationWithStepsMetadata,e),Object.defineProperty(AnimationWithStepsMetadata.prototype,"steps",{get:function(){throw new Error("NOT IMPLEMENTED: Base Class")},enumerable:!0,configurable:!0}),AnimationWithStepsMetadata}(un),fn=function(e){function AnimationSequenceMetadata(t){e.call(this),this._steps=t}return tn(AnimationSequenceMetadata,e),Object.defineProperty(AnimationSequenceMetadata.prototype,"steps",{get:function(){return this._steps},enumerable:!0,configurable:!0}),AnimationSequenceMetadata}(hn),dn=function(e){function AnimationGroupMetadata(t){e.call(this),this._steps=t}return tn(AnimationGroupMetadata,e),Object.defineProperty(AnimationGroupMetadata.prototype,"steps",{get:function(){return this._steps},enumerable:!0,configurable:!0}),AnimationGroupMetadata}(hn),mn=function(){function AnimationStyles(e){this.styles=e}return AnimationStyles}(),yn=function(){function DebugDomRootRenderer(e){this._delegate=e}return DebugDomRootRenderer.prototype.renderComponent=function(e){return new vn(this._delegate.renderComponent(e))},DebugDomRootRenderer}(),vn=function(){function DebugDomRenderer(e){this._delegate=e}return DebugDomRenderer.prototype.selectRootElement=function(e,t){var r=this._delegate.selectRootElement(e,t),n=new Lr(r,null,t);return indexDebugNode(n),r},DebugDomRenderer.prototype.createElement=function(e,t,r){var n=this._delegate.createElement(e,t,r),i=new Lr(n,getDebugNode(e),r);return i.name=t,indexDebugNode(i),n},DebugDomRenderer.prototype.createViewRoot=function(e){return this._delegate.createViewRoot(e)},DebugDomRenderer.prototype.createTemplateAnchor=function(e,t){var r=this._delegate.createTemplateAnchor(e,t),n=new kr(r,getDebugNode(e),t);return indexDebugNode(n),r},DebugDomRenderer.prototype.createText=function(e,t,r){var n=this._delegate.createText(e,t,r),i=new kr(n,getDebugNode(e),r);return indexDebugNode(i),n},DebugDomRenderer.prototype.projectNodes=function(e,t){var r=getDebugNode(e);if(isPresent(r)&&r instanceof Lr){var n=r;t.forEach(function(e){n.addChild(getDebugNode(e))})}this._delegate.projectNodes(e,t)},DebugDomRenderer.prototype.attachViewAfter=function(e,t){var r=getDebugNode(e);if(isPresent(r)){var n=r.parent;if(t.length>0&&isPresent(n)){var i=[];t.forEach(function(e){return i.push(getDebugNode(e))}),n.insertChildrenAfter(r,i)}}this._delegate.attachViewAfter(e,t)},DebugDomRenderer.prototype.detachView=function(e){e.forEach(function(e){var t=getDebugNode(e);isPresent(t)&&isPresent(t.parent)&&t.parent.removeChild(t)}),this._delegate.detachView(e)},DebugDomRenderer.prototype.destroyView=function(e,t){t.forEach(function(e){removeDebugNodeFromIndex(getDebugNode(e))}),this._delegate.destroyView(e,t)},DebugDomRenderer.prototype.listen=function(e,t,r){var n=getDebugNode(e);return isPresent(n)&&n.listeners.push(new Rr(t,r)),this._delegate.listen(e,t,r)},DebugDomRenderer.prototype.listenGlobal=function(e,t,r){return this._delegate.listenGlobal(e,t,r)},DebugDomRenderer.prototype.setElementProperty=function(e,t,r){var n=getDebugNode(e);isPresent(n)&&n instanceof Lr&&(n.properties[t]=r),this._delegate.setElementProperty(e,t,r)},DebugDomRenderer.prototype.setElementAttribute=function(e,t,r){var n=getDebugNode(e);isPresent(n)&&n instanceof Lr&&(n.attributes[t]=r),this._delegate.setElementAttribute(e,t,r)},DebugDomRenderer.prototype.setBindingDebugInfo=function(e,t,r){this._delegate.setBindingDebugInfo(e,t,r)},DebugDomRenderer.prototype.setElementClass=function(e,t,r){var n=getDebugNode(e);isPresent(n)&&n instanceof Lr&&(n.classes[t]=r),this._delegate.setElementClass(e,t,r)},DebugDomRenderer.prototype.setElementStyle=function(e,t,r){var n=getDebugNode(e);isPresent(n)&&n instanceof Lr&&(n.styles[t]=r),this._delegate.setElementStyle(e,t,r)},DebugDomRenderer.prototype.invokeElementMethod=function(e,t,r){this._delegate.invokeElementMethod(e,t,r)},DebugDomRenderer.prototype.setText=function(e,t){this._delegate.setText(e,t)},DebugDomRenderer.prototype.animate=function(e,t,r,n,i,o){return this._delegate.animate(e,t,r,n,i,o)},DebugDomRenderer}(),gn=function(){function StaticNodeDebugInfo(e,t,r){this.providerTokens=e,this.componentToken=t,this.refTokens=r}return StaticNodeDebugInfo}(),_n=function(){function DebugContext(e,t,r,n){this._view=e,this._nodeIndex=t,this._tplRow=r,this._tplCol=n}return Object.defineProperty(DebugContext.prototype,"_staticNodeInfo",{get:function(){return isPresent(this._nodeIndex)?this._view.staticNodeDebugInfos[this._nodeIndex]:null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext.prototype,"component",{get:function(){var e=this._staticNodeInfo;return isPresent(e)&&isPresent(e.componentToken)?this.injector.get(e.componentToken):null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext.prototype,"componentRenderElement",{get:function(){for(var e=this._view;isPresent(e.declarationAppElement)&&e.type!==Et.COMPONENT;)e=e.declarationAppElement.parentView;return isPresent(e.declarationAppElement)?e.declarationAppElement.nativeElement:null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext.prototype,"injector",{get:function(){return this._view.injector(this._nodeIndex)},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext.prototype,"renderNode",{get:function(){return isPresent(this._nodeIndex)&&this._view.allNodes?this._view.allNodes[this._nodeIndex]:null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext.prototype,"providerTokens",{get:function(){var e=this._staticNodeInfo;return isPresent(e)?e.providerTokens:null},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext.prototype,"source",{get:function(){return this._view.componentType.templateUrl+":"+this._tplRow+":"+this._tplCol},enumerable:!0,configurable:!0}),Object.defineProperty(DebugContext.prototype,"references",{get:function(){var e=this,t={},r=this._staticNodeInfo;if(isPresent(r)){var n=r.refTokens;Object.keys(n).forEach(function(r){var i,o=n[r];i=isBlank(o)?e._view.allNodes?e._view.allNodes[e._nodeIndex]:null:e._view.injectorGet(o,e._nodeIndex,null),t[r]=i})}return t},enumerable:!0,configurable:!0}),DebugContext}(),bn=function(){function AnimationTransitionEvent(e){var t=e.fromState,r=e.toState,n=e.totalTime;this.fromState=t,this.toState=r,this.totalTime=n}return AnimationTransitionEvent}(),wn=function(){function ViewAnimationMap(){this._map=new Map,this._allPlayers=[]}return Object.defineProperty(ViewAnimationMap.prototype,"length",{get:function(){return this.getAllPlayers().length},enumerable:!0,configurable:!0}),ViewAnimationMap.prototype.find=function(e,t){var r=this._map.get(e);if(isPresent(r))return r[t]},ViewAnimationMap.prototype.findAllPlayersByElement=function(e){var t=this._map.get(e);return t?Object.keys(t).map(function(e){return t[e]}):[]},ViewAnimationMap.prototype.set=function(e,t,r){var n=this._map.get(e);isPresent(n)||(n={});var i=n[t];isPresent(i)&&this.remove(e,t),n[t]=r,this._allPlayers.push(r),this._map.set(e,n)},ViewAnimationMap.prototype.getAllPlayers=function(){return this._allPlayers},ViewAnimationMap.prototype.remove=function(e,t){var r=this._map.get(e);if(r){var n=r[t];delete r[t];var i=this._allPlayers.indexOf(n);this._allPlayers.splice(i,1),0===Object.keys(r).length&&this._map.delete(e)}},ViewAnimationMap}(),En=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},Cn=new Object,Sn=function(e){function ElementInjector(t,r){e.call(this),this._view=t,this._nodeIndex=r}return En(ElementInjector,e),ElementInjector.prototype.get=function(e,t){void 0===t&&(t=Z);var r=Cn;return r===Cn&&(r=this._view.injectorGet(e,this._nodeIndex,Cn)),r===Cn&&(r=this._view.parentInjector.get(e,t)),r},ElementInjector}($),Pn=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},An=At("AppView#check(ascii id)"),xn=function(){function AppView(e,t,r,n,i,o,s){this.clazz=e,this.componentType=t,this.type=r,this.viewUtils=n,this.parentInjector=i,this.declarationAppElement=o,this.cdMode=s,this.contentChildren=[],this.viewChildren=[],this.viewContainerElement=null,this.numberOfChecks=0,this.animationPlayers=new wn,this._animationListeners=new Map,this.ref=new Or(this),r===Et.COMPONENT||r===Et.HOST?this.renderer=n.renderComponent(t):this.renderer=o.parentView.renderer}return Object.defineProperty(AppView.prototype,"destroyed",{get:function(){return this.cdMode===C.Destroyed},enumerable:!0,configurable:!0}),AppView.prototype.cancelActiveAnimation=function(e,t,r){if(void 0===r&&(r=!1),r)this.animationPlayers.findAllPlayersByElement(e).forEach(function(e){return e.destroy()});else{var n=this.animationPlayers.find(e,t);isPresent(n)&&n.destroy()}},AppView.prototype.queueAnimation=function(e,t,r,n,i,o){var s=this;queueAnimation(r);var a=new bn({fromState:i,toState:o,totalTime:n});this.animationPlayers.set(e,t,r),r.onDone(function(){s.triggerAnimationOutput(e,t,"done",a),s.animationPlayers.remove(e,t)}),r.onStart(function(){s.triggerAnimationOutput(e,t,"start",a)})},AppView.prototype.triggerAnimationOutput=function(e,t,r,n){var i=this._animationListeners.get(e);if(isPresent(i)&&i.length)for(var o=0;o<i.length;o++){var s=i[o];if(s.eventName===t&&s.eventPhase===r){s.handler(n);break}}},AppView.prototype.registerAnimationOutput=function(e,t,r,n){var i=this._animationListeners.get(e);isPresent(i)||this._animationListeners.set(e,i=[]),i.push(new Mn(t,r,n))},AppView.prototype.create=function(e,t,r){this.context=e;var n;switch(this.type){case Et.COMPONENT:n=ensureSlotCount(t,this.componentType.slotCount);break;case Et.EMBEDDED:n=this.declarationAppElement.parentView.projectableNodes;break;case Et.HOST:n=t}return this._hasExternalHostElement=isPresent(r),this.projectableNodes=n,this.createInternal(r)},AppView.prototype.createInternal=function(e){return null},AppView.prototype.init=function(e,t,r,n){this.rootNodesOrAppElements=e,this.allNodes=t,this.disposables=r,this.subscriptions=n,this.type===Et.COMPONENT&&(this.declarationAppElement.parentView.viewChildren.push(this),this.dirtyParentQueriesInternal())},AppView.prototype.selectOrCreateHostElement=function(e,t,r){var n;return n=isPresent(t)?this.renderer.selectRootElement(t,r):this.renderer.createElement(null,e,r)},AppView.prototype.injectorGet=function(e,t,r){return this.injectorGetInternal(e,t,r)},AppView.prototype.injectorGetInternal=function(e,t,r){return r},AppView.prototype.injector=function(e){return isPresent(e)?new Sn(this,e):this.parentInjector},AppView.prototype.destroy=function(){this._hasExternalHostElement?this.renderer.detachView(this.flatRootNodes):isPresent(this.viewContainerElement)&&this.viewContainerElement.detachView(this.viewContainerElement.nestedViews.indexOf(this)),this._destroyRecurse()},AppView.prototype._destroyRecurse=function(){if(this.cdMode!==C.Destroyed){for(var e=this.contentChildren,t=0;t<e.length;t++)e[t]._destroyRecurse();e=this.viewChildren;for(var t=0;t<e.length;t++)e[t]._destroyRecurse();this.destroyLocal(),this.cdMode=C.Destroyed}},AppView.prototype.destroyLocal=function(){for(var e=this,t=this.type===Et.COMPONENT?this.declarationAppElement.nativeElement:null,r=0;r<this.disposables.length;r++)this.disposables[r]();for(var r=0;r<this.subscriptions.length;r++)this.subscriptions[r].unsubscribe();if(this.destroyInternal(),this.dirtyParentQueriesInternal(),0==this.animationPlayers.length)this.renderer.destroyView(t,this.allNodes);else{var n=new Xr(this.animationPlayers.getAllPlayers());n.onDone(function(){e.renderer.destroyView(t,e.allNodes)})}},AppView.prototype.destroyInternal=function(){},AppView.prototype.detachInternal=function(){},AppView.prototype.detach=function(){var e=this;if(this.detachInternal(),0==this.animationPlayers.length)this.renderer.detachView(this.flatRootNodes);else{var t=new Xr(this.animationPlayers.getAllPlayers());t.onDone(function(){e.renderer.detachView(e.flatRootNodes)})}},Object.defineProperty(AppView.prototype,"changeDetectorRef",{get:function(){return this.ref},enumerable:!0,configurable:!0}),Object.defineProperty(AppView.prototype,"parent",{get:function(){return isPresent(this.declarationAppElement)?this.declarationAppElement.parentView:null},enumerable:!0,configurable:!0}),Object.defineProperty(AppView.prototype,"flatRootNodes",{get:function(){return flattenNestedViewRenderNodes(this.rootNodesOrAppElements)},enumerable:!0,configurable:!0}),Object.defineProperty(AppView.prototype,"lastRootNode",{get:function(){var e=this.rootNodesOrAppElements.length>0?this.rootNodesOrAppElements[this.rootNodesOrAppElements.length-1]:null;return _findLastRenderNode(e)},enumerable:!0,configurable:!0}),AppView.prototype.dirtyParentQueriesInternal=function(){},AppView.prototype.detectChanges=function(e){var t=An(this.clazz);this.cdMode!==C.Checked&&this.cdMode!==C.Errored&&(this.cdMode===C.Destroyed&&this.throwDestroyedError("detectChanges"),this.detectChangesInternal(e),this.cdMode===C.CheckOnce&&(this.cdMode=C.Checked),this.numberOfChecks++,xt(t))},AppView.prototype.detectChangesInternal=function(e){this.detectContentChildrenChanges(e),this.detectViewChildrenChanges(e)},AppView.prototype.detectContentChildrenChanges=function(e){for(var t=0;t<this.contentChildren.length;++t){var r=this.contentChildren[t];r.cdMode!==C.Detached&&r.detectChanges(e)}},AppView.prototype.detectViewChildrenChanges=function(e){for(var t=0;t<this.viewChildren.length;++t){var r=this.viewChildren[t];r.cdMode!==C.Detached&&r.detectChanges(e)}},AppView.prototype.markContentChildAsMoved=function(e){this.dirtyParentQueriesInternal()},AppView.prototype.addToContentChildren=function(e){e.parentView.contentChildren.push(this),this.viewContainerElement=e,this.dirtyParentQueriesInternal()},AppView.prototype.removeFromContentChildren=function(e){re.remove(e.parentView.contentChildren,this),this.dirtyParentQueriesInternal(),this.viewContainerElement=null},AppView.prototype.markAsCheckOnce=function(){this.cdMode=C.CheckOnce},AppView.prototype.markPathToRootAsCheckOnce=function(){for(var e=this;isPresent(e)&&e.cdMode!==C.Detached;){e.cdMode===C.Checked&&(e.cdMode=C.CheckOnce);var t=e.type===Et.COMPONENT?e.declarationAppElement:e.viewContainerElement;e=isPresent(t)?t.parentView:null}},AppView.prototype.eventHandler=function(e){return e},AppView.prototype.throwDestroyedError=function(e){throw new Lt(e)},AppView}(),Tn=function(e){function DebugAppView(t,r,n,i,o,s,a,u){e.call(this,t,r,n,i,o,s,a),this.staticNodeDebugInfos=u,this._currentDebugContext=null}return Pn(DebugAppView,e),DebugAppView.prototype.create=function(t,r,n){this._resetDebug();try{return e.prototype.create.call(this,t,r,n)}catch(i){throw this._rethrowWithContext(i),i}},DebugAppView.prototype.injectorGet=function(t,r,n){this._resetDebug();try{return e.prototype.injectorGet.call(this,t,r,n)}catch(i){throw this._rethrowWithContext(i),i}},DebugAppView.prototype.detach=function(){this._resetDebug();try{e.prototype.detach.call(this)}catch(t){throw this._rethrowWithContext(t),t}},DebugAppView.prototype.destroyLocal=function(){this._resetDebug();try{e.prototype.destroyLocal.call(this)}catch(t){throw this._rethrowWithContext(t),t}},DebugAppView.prototype.detectChanges=function(t){this._resetDebug();try{e.prototype.detectChanges.call(this,t)}catch(r){throw this._rethrowWithContext(r),r}},DebugAppView.prototype._resetDebug=function(){this._currentDebugContext=null},DebugAppView.prototype.debug=function(e,t,r){return this._currentDebugContext=new _n(this,e,t,r)},DebugAppView.prototype._rethrowWithContext=function(e){if(!(e instanceof kt)&&(e instanceof Rt||(this.cdMode=C.Errored),isPresent(this._currentDebugContext)))throw new kt(e,this._currentDebugContext)},DebugAppView.prototype.eventHandler=function(t){var r=this,n=e.prototype.eventHandler.call(this,t);return function(e){r._resetDebug();try{return n(e)}catch(t){throw r._rethrowWithContext(t),t}}},DebugAppView}(xn),Mn=function(){function _AnimationOutputHandler(e,t,r){this.eventName=e,this.eventPhase=t,this.handler=r}return _AnimationOutputHandler}(),In={isDefaultChangeDetectionStrategy:isDefaultChangeDetectionStrategy,ChangeDetectorStatus:C,constructDependencies:constructDependencies,LifecycleHooks:S,LIFECYCLE_HOOKS_VALUES:N,ReflectorReader:ve,CodegenComponentFactoryResolver:Jt,AppElement:Ot,AppView:xn,DebugAppView:Tn,NgModuleInjector:vr,registerModuleFactory:registerModuleFactory,ViewType:Et,MAX_INTERPOLATION_VALUES:Bt,checkBinding:checkBinding,flattenNestedViewRenderNodes:flattenNestedViewRenderNodes,interpolate:interpolate,ViewUtils:Ft,ViewMetadata:G,DebugContext:_n,StaticNodeDebugInfo:gn,devModeEqual:devModeEqual,UNINITIALIZED:at,ValueUnwrapper:lt,RenderDebugInfo:vt,TemplateRef_:Tr,ReflectionCapabilities:ye,makeDecorator:makeDecorator,DebugDomRootRenderer:yn,EMPTY_ARRAY:Ut,EMPTY_MAP:Wt,pureProxy1:pureProxy1,pureProxy2:pureProxy2,pureProxy3:pureProxy3,pureProxy4:pureProxy4,pureProxy5:pureProxy5,pureProxy6:pureProxy6,pureProxy7:pureProxy7,pureProxy8:pureProxy8,pureProxy9:pureProxy9,pureProxy10:pureProxy10,castByValue:castByValue,Console:He,reflector:be,Reflector:_e,NoOpAnimationPlayer:Yr,AnimationPlayer:Jr,AnimationSequencePlayer:en,AnimationGroupPlayer:Xr,AnimationKeyframe:$r,prepareFinalAnimationStyles:prepareFinalAnimationStyles,balanceAnimationKeyframes:balanceAnimationKeyframes,flattenStyles:flattenStyles,clearStyles:clearStyles,renderStyles:renderStyles,collectAndResolveStyles:collectAndResolveStyles,AnimationStyles:mn,ANY_STATE:qr,DEFAULT_STATE:Kr,EMPTY_STATE:Qr,FILL_STYLE_FLAG:zr,ComponentStillLoadingError:ze,isPromise:isPromise};t.createPlatform=createPlatform,t.assertPlatform=assertPlatform,t.destroyPlatform=destroyPlatform,t.getPlatform=getPlatform,t.PlatformRef=lr,t.ApplicationRef=pr,t.enableProdMode=enableProdMode,t.isDevMode=isDevMode,t.createPlatformFactory=createPlatformFactory,t.APP_ID=Fe,t.PACKAGE_ROOT_URL=We,t.PLATFORM_INITIALIZER=Be,t.APP_BOOTSTRAP_LISTENER=Ue,t.APP_INITIALIZER=ke,t.ApplicationInitStatus=Le,t.DebugElement=Lr,t.DebugNode=kr,t.asNativeElements=asNativeElements,t.getDebugNode=getDebugNode,t.Testability=rr,t.TestabilityRegistry=nr,t.setTestabilityGetter=setTestabilityGetter,t.TRANSLATIONS=Wr,t.TRANSLATIONS_FORMAT=Hr,t.LOCALE_ID=Ur,t.ApplicationModule=Gr,t.wtfCreateScope=At,t.wtfLeave=xt,t.wtfStartTimeRange=Tt,t.wtfEndTimeRange=Mt,t.Type=me,t.EventEmitter=er,t.ErrorHandler=Re,t.AnimationTransitionEvent=bn,t.AnimationPlayer=Jr,t.Sanitizer=Ct,t.ANALYZE_FOR_ENTRY_COMPONENTS=y,t.Attribute=v,t.ContentChild=b,t.ContentChildren=_,t.Query=g,t.ViewChild=E,t.ViewChildren=w,t.Component=A,t.Directive=P,t.HostBinding=I,t.HostListener=D,t.Input=T,t.Output=M,t.Pipe=x,t.AfterContentChecked=F,t.AfterContentInit=L,t.AfterViewChecked=B,t.AfterViewInit=j,t.DoCheck=R,t.OnChanges=O,t.OnDestroy=k,t.OnInit=V,t.CUSTOM_ELEMENTS_SCHEMA=U,t.NO_ERRORS_SCHEMA=W,t.NgModule=H,t.Class=Class,t.forwardRef=forwardRef,t.resolveForwardRef=resolveForwardRef,t.Injector=$,t.ReflectiveInjector=Ne,t.ResolvedReflectiveFactory=Se,t.ReflectiveKey=he,t.OpaqueToken=m,t.Inject=l,t.Optional=c,t.Injectable=p,t.Self=h,t.SkipSelf=f,t.Host=d,t.NgZone=tr,t.RenderComponentType=yt,t.Renderer=gt,t.RootRenderer=_t,t.COMPILER_OPTIONS=Qe,t.Compiler=Ke,t.CompilerFactory=Ze,t.ModuleWithComponentFactories=qe,t.ComponentFactory=Kt,t.ComponentRef=Gt,t.ComponentFactoryResolver=$t,t.ElementRef=St,t.NgModuleFactory=mr,t.NgModuleRef=dr,t.NgModuleFactoryLoader=gr,t.getModuleFactory=getModuleFactory,t.QueryList=br,t.SystemJsNgModuleLoader=Pr,t.SystemJsNgModuleLoaderConfig=Cr,t.TemplateRef=xr,t.ViewContainerRef=It,t.EmbeddedViewRef=Nr,t.ViewRef=Dr,t.ChangeDetectorRef=pt,t.CollectionChangeRecord=Ye,t.DefaultIterableDiffer=Je,t.IterableDiffers=ot,t.KeyValueChangeRecord=it,t.KeyValueDiffers=st,t.SimpleChange=ct,t.WrappedValue=ut,t.platformCore=Br,t.__core_private__=In,t.AUTO_STYLE=rn,t.AnimationEntryMetadata=nn,t.AnimationStateMetadata=on,t.AnimationStateDeclarationMetadata=sn,t.AnimationStateTransitionMetadata=an,t.AnimationMetadata=un,t.AnimationKeyframesSequenceMetadata=ln,t.AnimationStyleMetadata=cn,t.AnimationAnimateMetadata=pn,t.AnimationWithStepsMetadata=hn,t.AnimationSequenceMetadata=fn,t.AnimationGroupMetadata=dn,t.animate=animate,t.group=group,t.sequence=sequence,t.style=style,t.state=state,t.keyframes=keyframes,t.transition=transition,t.trigger=trigger})}).call(t,function(){return this}())},12:function(e,t,r){!function(e,n){n(t,r(3),r(327),r(124),r(9),r(320))}(this,function(e,t,r,n,i,o){"use strict";function isPresent(e){return void 0!==e&&null!==e}function isBlank(e){return void 0===e||null===e}function isString(e){return"string"==typeof e}function isStringMap(e){return"object"==typeof e&&null!==e}function isArray(e){return Array.isArray(e)}function looseIdentical(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}function normalizeBool(e){return!isBlank(e)&&e}function isJsObject(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function isPrimitive(e){return!isJsObject(e)}function hasConstructor(e,t){return e.constructor===t}function _flattenArray(e,t){if(isPresent(e))for(var r=0;r<e.length;r++){var n=e[r];isArray(n)?_flattenArray(n,t):t.push(n)}return t}function isEmptyInputValue(e){return null==e||"string"==typeof e&&0===e.length}function _convertToPromise(e){return d(e)?e:r.toPromise.call(e)}function _executeValidators(e,t){return t.map(function(t){return t(e)})}function _executeAsyncValidators(e,t){return t.map(function(t){return t(e)})}function _mergeErrors(e){var t=e.reduce(function(e,t){return isPresent(t)?h.merge(e,t):e},{});return 0===Object.keys(t).length?null:t}function normalizeValidator(e){return void 0!==e.validate?function(t){return e.validate(t)}:e}function normalizeAsyncValidator(e){return void 0!==e.validate?function(t){return e.validate(t)}:e}function unimplemented(){throw new Error("unimplemented")}function _buildValueString(e,t){return isBlank(e)?""+t:(isPrimitive(t)||(t="Object"),(e+": "+t).slice(0,50))}function _extractId(e){return e.split(":")[0]}function _buildValueString$1(e,t){return isBlank(e)?""+t:(isString(t)&&(t="'"+t+"'"),isPrimitive(t)||(t="Object"),(e+": "+t).slice(0,50))}function _extractId$1(e){return e.split(":")[0]}function controlPath(e,t){var r=f.clone(t.path);return r.push(e),r}function setUpControl(e,t){e||_throwError(t,"Cannot find control with"),t.valueAccessor||_throwError(t,"No value accessor for form control with"),e.validator=v.compose([e.validator,t.validator]),e.asyncValidator=v.composeAsync([e.asyncValidator,t.asyncValidator]),t.valueAccessor.writeValue(e.value),t.valueAccessor.registerOnChange(function(r){t.viewToModelUpdate(r),e.markAsDirty(),e.setValue(r,{emitModelToViewChange:!1})}),t.valueAccessor.registerOnTouched(function(){return e.markAsTouched()}),e.registerOnChange(function(e,r){t.valueAccessor.writeValue(e),r&&t.viewToModelUpdate(e)}),t.valueAccessor.setDisabledState&&e.registerOnDisabledChange(function(e){t.valueAccessor.setDisabledState(e)}),t._rawValidators.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(function(){return e.updateValueAndValidity()})}),t._rawAsyncValidators.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(function(){return e.updateValueAndValidity()})})}function cleanUpControl(e,t){t.valueAccessor.registerOnChange(function(){return _noControlError(t)}),t.valueAccessor.registerOnTouched(function(){return _noControlError(t)}),t._rawValidators.forEach(function(e){return e.registerOnValidatorChange(null)}),t._rawAsyncValidators.forEach(function(e){return e.registerOnValidatorChange(null)}),e&&e._clearChangeFns()}function setUpFormContainer(e,t){isBlank(e)&&_throwError(t,"Cannot find control with"),e.validator=v.compose([e.validator,t.validator]),e.asyncValidator=v.composeAsync([e.asyncValidator,t.asyncValidator])}function _noControlError(e){return _throwError(e,"There is no FormControl instance attached to form control element with");
}function _throwError(e,t){var r;throw r=e.path.length>1?"path: '"+e.path.join(" -> ")+"'":e.path[0]?"name: '"+e.path+"'":"unspecified name attribute",new Error(t+" "+r)}function composeValidators(e){return isPresent(e)?v.compose(e.map(normalizeValidator)):null}function composeAsyncValidators(e){return isPresent(e)?v.composeAsync(e.map(normalizeAsyncValidator)):null}function isPropertyUpdated(e,t){if(!e.hasOwnProperty("model"))return!1;var r=e.model;return!!r.isFirstChange()||!looseIdentical(t,r.currentValue)}function isBuiltInAccessor(e){return hasConstructor(e,b)||hasConstructor(e,S)||hasConstructor(e,D)||hasConstructor(e,V)||hasConstructor(e,M)}function selectValueAccessor(e,t){if(!t)return null;var r,n,i;return t.forEach(function(t){hasConstructor(t,E)?r=t:isBuiltInAccessor(t)?(isPresent(n)&&_throwError(e,"More than one built-in value accessor matches form control with"),n=t):(isPresent(i)&&_throwError(e,"More than one custom value accessor matches form control with"),i=t)}),isPresent(i)?i:isPresent(n)?n:isPresent(r)?r:(_throwError(e,"No valid value accessor for form control with"),null)}function _find(e,t,r){return isBlank(t)?null:(t instanceof Array||(t=t.split(r)),t instanceof Array&&f.isEmpty(t)?null:t.reduce(function(e,t){return e instanceof J?e.controls[t]||null:e instanceof Y?e.at(t)||null:null},e))}function toObservable(e){return d(e)?o.fromPromise(e):e}function coerceToValidator(e){return Array.isArray(e)?composeValidators(e):e}function coerceToAsyncValidator(e){return Array.isArray(e)?composeAsyncValidators(e):e}function _hasInvalidParent(e){return!(e instanceof Ee||e instanceof _e||e instanceof Se)}var s=(function(){function NumberWrapper(){}return NumberWrapper.toFixed=function(e,t){return e.toFixed(t)},NumberWrapper.equal=function(e,t){return e===t},NumberWrapper.parseIntAutoRadix=function(e){var t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t},NumberWrapper.parseInt=function(e,t){if(10==t){if(/^(\-|\+)?[0-9]+$/.test(e))return parseInt(e,t)}else if(16==t){if(/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(e))return parseInt(e,t)}else{var r=parseInt(e,t);if(!isNaN(r))return r}throw new Error("Invalid integer literal when parsing "+e+" in base "+t)},Object.defineProperty(NumberWrapper,"NaN",{get:function(){return NaN},enumerable:!0,configurable:!0}),NumberWrapper.isNumeric=function(e){return!isNaN(e-parseFloat(e))},NumberWrapper.isNaN=function(e){return isNaN(e)},NumberWrapper.isInteger=function(e){return Number.isInteger(e)},NumberWrapper}(),function(){function AbstractControlDirective(){}return Object.defineProperty(AbstractControlDirective.prototype,"control",{get:function(){throw new Error("unimplemented")},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"value",{get:function(){return isPresent(this.control)?this.control.value:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"valid",{get:function(){return isPresent(this.control)?this.control.valid:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"invalid",{get:function(){return isPresent(this.control)?this.control.invalid:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"pending",{get:function(){return isPresent(this.control)?this.control.pending:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"errors",{get:function(){return isPresent(this.control)?this.control.errors:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"pristine",{get:function(){return isPresent(this.control)?this.control.pristine:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"dirty",{get:function(){return isPresent(this.control)?this.control.dirty:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"touched",{get:function(){return isPresent(this.control)?this.control.touched:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"untouched",{get:function(){return isPresent(this.control)?this.control.untouched:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"disabled",{get:function(){return isPresent(this.control)?this.control.disabled:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"enabled",{get:function(){return isPresent(this.control)?this.control.enabled:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"statusChanges",{get:function(){return isPresent(this.control)?this.control.statusChanges:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"valueChanges",{get:function(){return isPresent(this.control)?this.control.valueChanges:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),AbstractControlDirective.prototype.reset=function(e){void 0===e&&(e=void 0),isPresent(this.control)&&this.control.reset(e)},AbstractControlDirective}()),a=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},u=function(e){function ControlContainer(){e.apply(this,arguments)}return a(ControlContainer,e),Object.defineProperty(ControlContainer.prototype,"formDirective",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(ControlContainer.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),ControlContainer}(s),l=function(){try{if(1===new Map([[1,2]]).size)return function(e){return new Map(e)}}catch(e){}return function(e){for(var t=new Map,r=0;r<e.length;r++){var n=e[r];t.set(n[0],n[1])}return t}}(),c=(function(){return(new Map).keys().next?function(e){for(var t,r=e.keys();!(t=r.next()).done;)e.set(t.value,null)}:function(e){e.forEach(function(t,r){e.set(r,null)})}}(),function(){try{if((new Map).values().next)return function(e,t){return t?Array.from(e.values()):Array.from(e.keys())}}catch(e){}return function(e,t){var r=new Array(e.size),n=0;return e.forEach(function(e,i){r[n]=t?e:i,n++}),r}}()),p=function(){function MapWrapper(){}return MapWrapper.createFromStringMap=function(e){var t=new Map;for(var r in e)t.set(r,e[r]);return t},MapWrapper.toStringMap=function(e){var t={};return e.forEach(function(e,r){return t[r]=e}),t},MapWrapper.createFromPairs=function(e){return l(e)},MapWrapper.iterable=function(e){return e},MapWrapper.keys=function(e){return c(e,!1)},MapWrapper.values=function(e){return c(e,!0)},MapWrapper}(),h=function(){function StringMapWrapper(){}return StringMapWrapper.merge=function(e,t){for(var r={},n=0,i=Object.keys(e);n<i.length;n++){var o=i[n];r[o]=e[o]}for(var s=0,a=Object.keys(t);s<a.length;s++){var o=a[s];r[o]=t[o]}return r},StringMapWrapper.equals=function(e,t){var r=Object.keys(e),n=Object.keys(t);if(r.length!=n.length)return!1;for(var i=0;i<r.length;i++){var o=r[i];if(e[o]!==t[o])return!1}return!0},StringMapWrapper}(),f=function(){function ListWrapper(){}return ListWrapper.createFixedSize=function(e){return new Array(e)},ListWrapper.createGrowableSize=function(e){return new Array(e)},ListWrapper.clone=function(e){return e.slice(0)},ListWrapper.forEachWithIndex=function(e,t){for(var r=0;r<e.length;r++)t(e[r],r)},ListWrapper.first=function(e){return e?e[0]:null},ListWrapper.last=function(e){return e&&0!=e.length?e[e.length-1]:null},ListWrapper.indexOf=function(e,t,r){return void 0===r&&(r=0),e.indexOf(t,r)},ListWrapper.contains=function(e,t){return e.indexOf(t)!==-1},ListWrapper.reversed=function(e){var t=ListWrapper.clone(e);return t.reverse()},ListWrapper.concat=function(e,t){return e.concat(t)},ListWrapper.insert=function(e,t,r){e.splice(t,0,r)},ListWrapper.removeAt=function(e,t){var r=e[t];return e.splice(t,1),r},ListWrapper.removeAll=function(e,t){for(var r=0;r<t.length;++r){var n=e.indexOf(t[r]);e.splice(n,1)}},ListWrapper.remove=function(e,t){var r=e.indexOf(t);return r>-1&&(e.splice(r,1),!0)},ListWrapper.clear=function(e){e.length=0},ListWrapper.isEmpty=function(e){return 0==e.length},ListWrapper.fill=function(e,t,r,n){void 0===r&&(r=0),void 0===n&&(n=null),e.fill(t,r,null===n?e.length:n)},ListWrapper.equals=function(e,t){if(e.length!=t.length)return!1;for(var r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0},ListWrapper.slice=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=null),e.slice(t,null===r?void 0:r)},ListWrapper.splice=function(e,t,r){return e.splice(t,r)},ListWrapper.sort=function(e,t){isPresent(t)?e.sort(t):e.sort()},ListWrapper.toString=function(e){return e.toString()},ListWrapper.toJSON=function(e){return JSON.stringify(e)},ListWrapper.maximum=function(e,t){if(0==e.length)return null;for(var r=null,n=-(1/0),i=0;i<e.length;i++){var o=e[i];if(!isBlank(o)){var s=t(o);s>n&&(r=o,n=s)}}return r},ListWrapper.flatten=function(e){var t=[];return _flattenArray(e,t),t},ListWrapper.addAll=function(e,t){for(var r=0;r<t.length;r++)e.push(t[r])},ListWrapper}(),d=t.__core_private__.isPromise,m=new t.OpaqueToken("NgValidators"),y=new t.OpaqueToken("NgAsyncValidators"),v=function(){function Validators(){}return Validators.required=function(e){return isEmptyInputValue(e.value)?{required:!0}:null},Validators.minLength=function(e){return function(t){if(isEmptyInputValue(t.value))return null;var r="string"==typeof t.value?t.value.length:0;return r<e?{minlength:{requiredLength:e,actualLength:r}}:null}},Validators.maxLength=function(e){return function(t){var r="string"==typeof t.value?t.value.length:0;return r>e?{maxlength:{requiredLength:e,actualLength:r}}:null}},Validators.pattern=function(e){return function(t){if(isEmptyInputValue(t.value))return null;var r=new RegExp("^"+e+"$"),n=t.value;return r.test(n)?null:{pattern:{requiredPattern:"^"+e+"$",actualValue:n}}}},Validators.nullValidator=function(e){return null},Validators.compose=function(e){if(!e)return null;var t=e.filter(isPresent);return 0==t.length?null:function(e){return _mergeErrors(_executeValidators(e,t))}},Validators.composeAsync=function(e){if(!e)return null;var t=e.filter(isPresent);return 0==t.length?null:function(e){var r=_executeAsyncValidators(e,t).map(_convertToPromise);return Promise.all(r).then(_mergeErrors)}},Validators}(),g=new t.OpaqueToken("NgValueAccessor"),_={provide:g,useExisting:t.forwardRef(function(){return b}),multi:!0},b=function(){function CheckboxControlValueAccessor(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return CheckboxControlValueAccessor.prototype.writeValue=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"checked",e)},CheckboxControlValueAccessor.prototype.registerOnChange=function(e){this.onChange=e},CheckboxControlValueAccessor.prototype.registerOnTouched=function(e){this.onTouched=e},CheckboxControlValueAccessor.prototype.setDisabledState=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",e)},CheckboxControlValueAccessor.decorators=[{type:t.Directive,args:[{selector:"input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]",host:{"(change)":"onChange($event.target.checked)","(blur)":"onTouched()"},providers:[_]}]}],CheckboxControlValueAccessor.ctorParameters=[{type:t.Renderer},{type:t.ElementRef}],CheckboxControlValueAccessor}(),w={provide:g,useExisting:t.forwardRef(function(){return E}),multi:!0},E=function(){function DefaultValueAccessor(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return DefaultValueAccessor.prototype.writeValue=function(e){var t=isBlank(e)?"":e;this._renderer.setElementProperty(this._elementRef.nativeElement,"value",t)},DefaultValueAccessor.prototype.registerOnChange=function(e){this.onChange=e},DefaultValueAccessor.prototype.registerOnTouched=function(e){this.onTouched=e},DefaultValueAccessor.prototype.setDisabledState=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",e)},DefaultValueAccessor.decorators=[{type:t.Directive,args:[{selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]",host:{"(input)":"onChange($event.target.value)","(blur)":"onTouched()"},providers:[w]}]}],DefaultValueAccessor.ctorParameters=[{type:t.Renderer},{type:t.ElementRef}],DefaultValueAccessor}(),C={provide:g,useExisting:t.forwardRef(function(){return S}),multi:!0},S=function(){function NumberValueAccessor(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return NumberValueAccessor.prototype.writeValue=function(e){var t=isBlank(e)?"":e;this._renderer.setElementProperty(this._elementRef.nativeElement,"value",t)},NumberValueAccessor.prototype.registerOnChange=function(e){this.onChange=function(t){e(""==t?null:parseFloat(t))}},NumberValueAccessor.prototype.registerOnTouched=function(e){this.onTouched=e},NumberValueAccessor.prototype.setDisabledState=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",e)},NumberValueAccessor.decorators=[{type:t.Directive,args:[{selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]",host:{"(change)":"onChange($event.target.value)","(input)":"onChange($event.target.value)","(blur)":"onTouched()"},providers:[C]}]}],NumberValueAccessor.ctorParameters=[{type:t.Renderer},{type:t.ElementRef}],NumberValueAccessor}(),P=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},A=function(e){function NgControl(){e.apply(this,arguments),this._parent=null,this.name=null,this.valueAccessor=null,this._rawValidators=[],this._rawAsyncValidators=[]}return P(NgControl,e),Object.defineProperty(NgControl.prototype,"validator",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(NgControl.prototype,"asyncValidator",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),NgControl}(s),x={provide:g,useExisting:t.forwardRef(function(){return M}),multi:!0},T=function(){function RadioControlRegistry(){this._accessors=[]}return RadioControlRegistry.prototype.add=function(e,t){this._accessors.push([e,t])},RadioControlRegistry.prototype.remove=function(e){for(var t=-1,r=0;r<this._accessors.length;++r)this._accessors[r][1]===e&&(t=r);f.removeAt(this._accessors,t)},RadioControlRegistry.prototype.select=function(e){var t=this;this._accessors.forEach(function(r){t._isSameGroup(r,e)&&r[1]!==e&&r[1].fireUncheck(e.value)})},RadioControlRegistry.prototype._isSameGroup=function(e,t){return!!e[0].control&&(e[0]._parent===t._control._parent&&e[1].name===t.name)},RadioControlRegistry.decorators=[{type:t.Injectable}],RadioControlRegistry.ctorParameters=[],RadioControlRegistry}(),M=function(){function RadioControlValueAccessor(e,t,r,n){this._renderer=e,this._elementRef=t,this._registry=r,this._injector=n,this.onChange=function(){},this.onTouched=function(){}}return RadioControlValueAccessor.prototype.ngOnInit=function(){this._control=this._injector.get(A),this._checkName(),this._registry.add(this._control,this)},RadioControlValueAccessor.prototype.ngOnDestroy=function(){this._registry.remove(this)},RadioControlValueAccessor.prototype.writeValue=function(e){this._state=e===this.value,this._renderer.setElementProperty(this._elementRef.nativeElement,"checked",this._state)},RadioControlValueAccessor.prototype.registerOnChange=function(e){var t=this;this._fn=e,this.onChange=function(){e(t.value),t._registry.select(t)}},RadioControlValueAccessor.prototype.fireUncheck=function(e){this.writeValue(e)},RadioControlValueAccessor.prototype.registerOnTouched=function(e){this.onTouched=e},RadioControlValueAccessor.prototype.setDisabledState=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",e)},RadioControlValueAccessor.prototype._checkName=function(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)},RadioControlValueAccessor.prototype._throwNameError=function(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: <input type="radio" formControlName="food" name="food">\n ')},RadioControlValueAccessor.decorators=[{type:t.Directive,args:[{selector:"input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]",host:{"(change)":"onChange()","(blur)":"onTouched()"},providers:[x]}]}],RadioControlValueAccessor.ctorParameters=[{type:t.Renderer},{type:t.ElementRef},{type:T},{type:t.Injector}],RadioControlValueAccessor.propDecorators={name:[{type:t.Input}],formControlName:[{type:t.Input}],value:[{type:t.Input}]},RadioControlValueAccessor}(),I={provide:g,useExisting:t.forwardRef(function(){return D}),multi:!0},D=function(){function SelectControlValueAccessor(e,t){this._renderer=e,this._elementRef=t,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){}}return SelectControlValueAccessor.prototype.writeValue=function(e){this.value=e;var t=_buildValueString(this._getOptionId(e),e);this._renderer.setElementProperty(this._elementRef.nativeElement,"value",t)},SelectControlValueAccessor.prototype.registerOnChange=function(e){var t=this;this.onChange=function(r){t.value=r,e(t._getOptionValue(r))}},SelectControlValueAccessor.prototype.registerOnTouched=function(e){this.onTouched=e},SelectControlValueAccessor.prototype.setDisabledState=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",e)},SelectControlValueAccessor.prototype._registerOption=function(){return(this._idCounter++).toString()},SelectControlValueAccessor.prototype._getOptionId=function(e){for(var t=0,r=p.keys(this._optionMap);t<r.length;t++){var n=r[t];if(looseIdentical(this._optionMap.get(n),e))return n}return null},SelectControlValueAccessor.prototype._getOptionValue=function(e){var t=this._optionMap.get(_extractId(e));return isPresent(t)?t:e},SelectControlValueAccessor.decorators=[{type:t.Directive,args:[{selector:"select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]",host:{"(change)":"onChange($event.target.value)","(blur)":"onTouched()"},providers:[I]}]}],SelectControlValueAccessor.ctorParameters=[{type:t.Renderer},{type:t.ElementRef}],SelectControlValueAccessor}(),N=function(){function NgSelectOption(e,t,r){this._element=e,this._renderer=t,this._select=r,isPresent(this._select)&&(this.id=this._select._registerOption())}return Object.defineProperty(NgSelectOption.prototype,"ngValue",{set:function(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(_buildValueString(this.id,e)),this._select.writeValue(this._select.value))},enumerable:!0,configurable:!0}),Object.defineProperty(NgSelectOption.prototype,"value",{set:function(e){this._setElementValue(e),isPresent(this._select)&&this._select.writeValue(this._select.value)},enumerable:!0,configurable:!0}),NgSelectOption.prototype._setElementValue=function(e){this._renderer.setElementProperty(this._element.nativeElement,"value",e)},NgSelectOption.prototype.ngOnDestroy=function(){isPresent(this._select)&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))},NgSelectOption.decorators=[{type:t.Directive,args:[{selector:"option"}]}],NgSelectOption.ctorParameters=[{type:t.ElementRef},{type:t.Renderer},{type:D,decorators:[{type:t.Optional},{type:t.Host}]}],NgSelectOption.propDecorators={ngValue:[{type:t.Input,args:["ngValue"]}],value:[{type:t.Input,args:["value"]}]},NgSelectOption}(),O={provide:g,useExisting:t.forwardRef(function(){return V}),multi:!0},V=function(){function SelectMultipleControlValueAccessor(e,t){this._renderer=e,this._elementRef=t,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){}}return SelectMultipleControlValueAccessor.prototype.writeValue=function(e){var t=this;if(this.value=e,null!=e){var r=e,n=r.map(function(e){return t._getOptionId(e)});this._optionMap.forEach(function(e,t){e._setSelected(n.indexOf(t.toString())>-1)})}},SelectMultipleControlValueAccessor.prototype.registerOnChange=function(e){var t=this;this.onChange=function(r){var n=[];if(r.hasOwnProperty("selectedOptions"))for(var i=r.selectedOptions,o=0;o<i.length;o++){var s=i.item(o),a=t._getOptionValue(s.value);n.push(a)}else for(var i=r.options,o=0;o<i.length;o++){var s=i.item(o);if(s.selected){var a=t._getOptionValue(s.value);n.push(a)}}e(n)}},SelectMultipleControlValueAccessor.prototype.registerOnTouched=function(e){this.onTouched=e},SelectMultipleControlValueAccessor.prototype.setDisabledState=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",e)},SelectMultipleControlValueAccessor.prototype._registerOption=function(e){var t=(this._idCounter++).toString();return this._optionMap.set(t,e),t},SelectMultipleControlValueAccessor.prototype._getOptionId=function(e){for(var t=0,r=p.keys(this._optionMap);t<r.length;t++){var n=r[t];if(looseIdentical(this._optionMap.get(n)._value,e))return n}return null},SelectMultipleControlValueAccessor.prototype._getOptionValue=function(e){var t=this._optionMap.get(_extractId$1(e));return isPresent(t)?t._value:e},SelectMultipleControlValueAccessor.decorators=[{type:t.Directive,args:[{selector:"select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]",host:{"(change)":"onChange($event.target)","(blur)":"onTouched()"},providers:[O]}]}],SelectMultipleControlValueAccessor.ctorParameters=[{type:t.Renderer},{type:t.ElementRef}],SelectMultipleControlValueAccessor}(),R=function(){function NgSelectMultipleOption(e,t,r){this._element=e,this._renderer=t,this._select=r,isPresent(this._select)&&(this.id=this._select._registerOption(this))}return Object.defineProperty(NgSelectMultipleOption.prototype,"ngValue",{set:function(e){null!=this._select&&(this._value=e,this._setElementValue(_buildValueString$1(this.id,e)),this._select.writeValue(this._select.value))},enumerable:!0,configurable:!0}),Object.defineProperty(NgSelectMultipleOption.prototype,"value",{set:function(e){isPresent(this._select)?(this._value=e,this._setElementValue(_buildValueString$1(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)},enumerable:!0,configurable:!0}),NgSelectMultipleOption.prototype._setElementValue=function(e){this._renderer.setElementProperty(this._element.nativeElement,"value",e)},NgSelectMultipleOption.prototype._setSelected=function(e){this._renderer.setElementProperty(this._element.nativeElement,"selected",e)},NgSelectMultipleOption.prototype.ngOnDestroy=function(){isPresent(this._select)&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))},NgSelectMultipleOption.decorators=[{type:t.Directive,args:[{selector:"option"}]}],NgSelectMultipleOption.ctorParameters=[{type:t.ElementRef},{type:t.Renderer},{type:V,decorators:[{type:t.Optional},{type:t.Host}]}],NgSelectMultipleOption.propDecorators={ngValue:[{type:t.Input,args:["ngValue"]}],value:[{type:t.Input,args:["value"]}]},NgSelectMultipleOption}(),k=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},L=function(e){function AbstractFormGroupDirective(){e.apply(this,arguments)}return k(AbstractFormGroupDirective,e),AbstractFormGroupDirective.prototype.ngOnInit=function(){this._checkParentType(),this.formDirective.addFormGroup(this)},AbstractFormGroupDirective.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeFormGroup(this)},Object.defineProperty(AbstractFormGroupDirective.prototype,"control",{get:function(){return this.formDirective.getFormGroup(this)},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractFormGroupDirective.prototype,"path",{get:function(){return controlPath(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractFormGroupDirective.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractFormGroupDirective.prototype,"validator",{get:function(){return composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractFormGroupDirective.prototype,"asyncValidator",{get:function(){return composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),AbstractFormGroupDirective.prototype._checkParentType=function(){},AbstractFormGroupDirective}(u),F=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},j=function(){function AbstractControlStatus(e){this._cd=e}return Object.defineProperty(AbstractControlStatus.prototype,"ngClassUntouched",{get:function(){return!!isPresent(this._cd.control)&&this._cd.control.untouched},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlStatus.prototype,"ngClassTouched",{get:function(){return!!isPresent(this._cd.control)&&this._cd.control.touched},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlStatus.prototype,"ngClassPristine",{get:function(){return!!isPresent(this._cd.control)&&this._cd.control.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlStatus.prototype,"ngClassDirty",{get:function(){return!!isPresent(this._cd.control)&&this._cd.control.dirty},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlStatus.prototype,"ngClassValid",{get:function(){return!!isPresent(this._cd.control)&&this._cd.control.valid},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlStatus.prototype,"ngClassInvalid",{get:function(){return!!isPresent(this._cd.control)&&this._cd.control.invalid},enumerable:!0,configurable:!0}),AbstractControlStatus}(),B={"[class.ng-untouched]":"ngClassUntouched","[class.ng-touched]":"ngClassTouched","[class.ng-pristine]":"ngClassPristine","[class.ng-dirty]":"ngClassDirty","[class.ng-valid]":"ngClassValid","[class.ng-invalid]":"ngClassInvalid"},U=function(e){function NgControlStatus(t){e.call(this,t)}return F(NgControlStatus,e),NgControlStatus.decorators=[{type:t.Directive,args:[{selector:"[formControlName],[ngModel],[formControl]",host:B}]}],NgControlStatus.ctorParameters=[{type:A,decorators:[{type:t.Self}]}],NgControlStatus}(j),W=function(e){function NgControlStatusGroup(t){e.call(this,t)}return F(NgControlStatusGroup,e),NgControlStatusGroup.decorators=[{type:t.Directive,args:[{selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]",host:B}]}],NgControlStatusGroup.ctorParameters=[{type:u,decorators:[{type:t.Self}]}],NgControlStatusGroup}(j),H=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},G=function(e){function EventEmitter(t){void 0===t&&(t=!1),e.call(this),this.__isAsync=t}return H(EventEmitter,e),EventEmitter.prototype.emit=function(t){e.prototype.next.call(this,t)},EventEmitter.prototype.subscribe=function(t,r,n){var i,o=function(e){return null},s=function(){return null};return t&&"object"==typeof t?(i=this.__isAsync?function(e){setTimeout(function(){return t.next(e)})}:function(e){t.next(e)},t.error&&(o=this.__isAsync?function(e){setTimeout(function(){return t.error(e)})}:function(e){t.error(e)}),t.complete&&(s=this.__isAsync?function(){setTimeout(function(){return t.complete()})}:function(){t.complete()})):(i=this.__isAsync?function(e){setTimeout(function(){return t(e)})}:function(e){t(e)},r&&(o=this.__isAsync?function(e){setTimeout(function(){return r(e)})}:function(e){r(e)}),n&&(s=this.__isAsync?function(){setTimeout(function(){return n()})}:function(){n()})),e.prototype.subscribe.call(this,i,o,s)},EventEmitter}(n.Subject),z=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},q="VALID",K="INVALID",Q="PENDING",Z="DISABLED",X=function(){function AbstractControl(e,t){this.validator=e,this.asyncValidator=t,this._onCollectionChange=function(){},this._pristine=!0,this._touched=!1,this._onDisabledChange=[]}return Object.defineProperty(AbstractControl.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"status",{get:function(){return this._status},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"valid",{get:function(){return this._status===q},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"invalid",{get:function(){return this._status===K},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"pending",{get:function(){return this._status==Q},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"disabled",{get:function(){return this._status===Z},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"enabled",{get:function(){return this._status!==Z},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"errors",{get:function(){return this._errors},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"pristine",{get:function(){return this._pristine},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"dirty",{get:function(){return!this.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"touched",{get:function(){return this._touched},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"untouched",{get:function(){return!this._touched},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"valueChanges",{get:function(){return this._valueChanges},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"statusChanges",{get:function(){return this._statusChanges},enumerable:!0,configurable:!0}),AbstractControl.prototype.setValidators=function(e){this.validator=coerceToValidator(e)},AbstractControl.prototype.setAsyncValidators=function(e){this.asyncValidator=coerceToAsyncValidator(e)},AbstractControl.prototype.clearValidators=function(){this.validator=null},AbstractControl.prototype.clearAsyncValidators=function(){this.asyncValidator=null},AbstractControl.prototype.markAsTouched=function(e){var t=(void 0===e?{}:e).onlySelf;t=normalizeBool(t),this._touched=!0,isPresent(this._parent)&&!t&&this._parent.markAsTouched({onlySelf:t})},AbstractControl.prototype.markAsUntouched=function(e){var t=(void 0===e?{}:e).onlySelf;this._touched=!1,this._forEachChild(function(e){e.markAsUntouched({onlySelf:!0})}),isPresent(this._parent)&&!t&&this._parent._updateTouched({onlySelf:t})},AbstractControl.prototype.markAsDirty=function(e){var t=(void 0===e?{}:e).onlySelf;t=normalizeBool(t),this._pristine=!1,isPresent(this._parent)&&!t&&this._parent.markAsDirty({onlySelf:t})},AbstractControl.prototype.markAsPristine=function(e){var t=(void 0===e?{}:e).onlySelf;this._pristine=!0,
this._forEachChild(function(e){e.markAsPristine({onlySelf:!0})}),isPresent(this._parent)&&!t&&this._parent._updatePristine({onlySelf:t})},AbstractControl.prototype.markAsPending=function(e){var t=(void 0===e?{}:e).onlySelf;t=normalizeBool(t),this._status=Q,isPresent(this._parent)&&!t&&this._parent.markAsPending({onlySelf:t})},AbstractControl.prototype.disable=function(e){var t=void 0===e?{}:e,r=t.onlySelf,n=t.emitEvent;n=!isPresent(n)||n,this._status=Z,this._errors=null,this._forEachChild(function(e){e.disable({onlySelf:!0})}),this._updateValue(),n&&(this._valueChanges.emit(this._value),this._statusChanges.emit(this._status)),this._updateAncestors(r),this._onDisabledChange.forEach(function(e){return e(!0)})},AbstractControl.prototype.enable=function(e){var t=void 0===e?{}:e,r=t.onlySelf,n=t.emitEvent;this._status=q,this._forEachChild(function(e){e.enable({onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n}),this._updateAncestors(r),this._onDisabledChange.forEach(function(e){return e(!1)})},AbstractControl.prototype._updateAncestors=function(e){isPresent(this._parent)&&!e&&(this._parent.updateValueAndValidity(),this._parent._updatePristine(),this._parent._updateTouched())},AbstractControl.prototype.setParent=function(e){this._parent=e},AbstractControl.prototype.updateValueAndValidity=function(e){var t=void 0===e?{}:e,r=t.onlySelf,n=t.emitEvent;r=normalizeBool(r),n=!isPresent(n)||n,this._setInitialStatus(),this._updateValue(),this.enabled&&(this._errors=this._runValidator(),this._status=this._calculateStatus(),this._status!==q&&this._status!==Q||this._runAsyncValidator(n)),n&&(this._valueChanges.emit(this._value),this._statusChanges.emit(this._status)),isPresent(this._parent)&&!r&&this._parent.updateValueAndValidity({onlySelf:r,emitEvent:n})},AbstractControl.prototype._updateTreeValidity=function(e){var t=(void 0===e?{emitEvent:!0}:e).emitEvent;this._forEachChild(function(e){return e._updateTreeValidity({emitEvent:t})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t})},AbstractControl.prototype._setInitialStatus=function(){this._status=this._allControlsDisabled()?Z:q},AbstractControl.prototype._runValidator=function(){return isPresent(this.validator)?this.validator(this):null},AbstractControl.prototype._runAsyncValidator=function(e){var t=this;if(isPresent(this.asyncValidator)){this._status=Q,this._cancelExistingSubscription();var r=toObservable(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe({next:function(r){return t.setErrors(r,{emitEvent:e})}})}},AbstractControl.prototype._cancelExistingSubscription=function(){isPresent(this._asyncValidationSubscription)&&this._asyncValidationSubscription.unsubscribe()},AbstractControl.prototype.setErrors=function(e,t){var r=(void 0===t?{}:t).emitEvent;r=!isPresent(r)||r,this._errors=e,this._updateControlsErrors(r)},AbstractControl.prototype.get=function(e){return _find(this,e,".")},AbstractControl.prototype.getError=function(e,t){void 0===t&&(t=null);var r=isPresent(t)&&!f.isEmpty(t)?this.get(t):this;return isPresent(r)&&isPresent(r._errors)?r._errors[e]:null},AbstractControl.prototype.hasError=function(e,t){return void 0===t&&(t=null),isPresent(this.getError(e,t))},Object.defineProperty(AbstractControl.prototype,"root",{get:function(){for(var e=this;isPresent(e._parent);)e=e._parent;return e},enumerable:!0,configurable:!0}),AbstractControl.prototype._updateControlsErrors=function(e){this._status=this._calculateStatus(),e&&this._statusChanges.emit(this._status),isPresent(this._parent)&&this._parent._updateControlsErrors(e)},AbstractControl.prototype._initObservables=function(){this._valueChanges=new G,this._statusChanges=new G},AbstractControl.prototype._calculateStatus=function(){return this._allControlsDisabled()?Z:isPresent(this._errors)?K:this._anyControlsHaveStatus(Q)?Q:this._anyControlsHaveStatus(K)?K:q},AbstractControl.prototype._anyControlsHaveStatus=function(e){return this._anyControls(function(t){return t.status==e})},AbstractControl.prototype._anyControlsDirty=function(){return this._anyControls(function(e){return e.dirty})},AbstractControl.prototype._anyControlsTouched=function(){return this._anyControls(function(e){return e.touched})},AbstractControl.prototype._updatePristine=function(e){var t=(void 0===e?{}:e).onlySelf;this._pristine=!this._anyControlsDirty(),isPresent(this._parent)&&!t&&this._parent._updatePristine({onlySelf:t})},AbstractControl.prototype._updateTouched=function(e){var t=(void 0===e?{}:e).onlySelf;this._touched=this._anyControlsTouched(),isPresent(this._parent)&&!t&&this._parent._updateTouched({onlySelf:t})},AbstractControl.prototype._isBoxedValue=function(e){return isStringMap(e)&&2===Object.keys(e).length&&"value"in e&&"disabled"in e},AbstractControl.prototype._registerOnCollectionChange=function(e){this._onCollectionChange=e},AbstractControl}(),$=function(e){function FormControl(t,r,n){void 0===t&&(t=null),void 0===r&&(r=null),void 0===n&&(n=null),e.call(this,coerceToValidator(r),coerceToAsyncValidator(n)),this._onChange=[],this._applyFormState(t),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this._initObservables()}return z(FormControl,e),FormControl.prototype.setValue=function(e,t){var r=this,n=void 0===t?{}:t,i=n.onlySelf,o=n.emitEvent,s=n.emitModelToViewChange,a=n.emitViewToModelChange;s=!isPresent(s)||s,a=!isPresent(a)||a,this._value=e,this._onChange.length&&s&&this._onChange.forEach(function(e){return e(r._value,a)}),this.updateValueAndValidity({onlySelf:i,emitEvent:o})},FormControl.prototype.patchValue=function(e,t){void 0===t&&(t={}),this.setValue(e,t)},FormControl.prototype.reset=function(e,t){void 0===e&&(e=null);var r=(void 0===t?{}:t).onlySelf;this._applyFormState(e),this.markAsPristine({onlySelf:r}),this.markAsUntouched({onlySelf:r}),this.setValue(this._value,{onlySelf:r})},FormControl.prototype._updateValue=function(){},FormControl.prototype._anyControls=function(e){return!1},FormControl.prototype._allControlsDisabled=function(){return this.disabled},FormControl.prototype.registerOnChange=function(e){this._onChange.push(e)},FormControl.prototype._clearChangeFns=function(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=function(){}},FormControl.prototype.registerOnDisabledChange=function(e){this._onDisabledChange.push(e)},FormControl.prototype._forEachChild=function(e){},FormControl.prototype._applyFormState=function(e){this._isBoxedValue(e)?(this._value=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this._value=e},FormControl}(X),J=function(e){function FormGroup(t,r,n){void 0===r&&(r=null),void 0===n&&(n=null),e.call(this,r,n),this.controls=t,this._initObservables(),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}return z(FormGroup,e),FormGroup.prototype.registerControl=function(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)},FormGroup.prototype.addControl=function(e,t){this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()},FormGroup.prototype.removeControl=function(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),delete this.controls[e],this.updateValueAndValidity(),this._onCollectionChange()},FormGroup.prototype.setControl=function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()},FormGroup.prototype.contains=function(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled},FormGroup.prototype.setValue=function(e,t){var r=this,n=(void 0===t?{}:t).onlySelf;this._checkAllValuesPresent(e),Object.keys(e).forEach(function(t){r._throwIfControlMissing(t),r.controls[t].setValue(e[t],{onlySelf:!0})}),this.updateValueAndValidity({onlySelf:n})},FormGroup.prototype.patchValue=function(e,t){var r=this,n=(void 0===t?{}:t).onlySelf;Object.keys(e).forEach(function(t){r.controls[t]&&r.controls[t].patchValue(e[t],{onlySelf:!0})}),this.updateValueAndValidity({onlySelf:n})},FormGroup.prototype.reset=function(e,t){void 0===e&&(e={});var r=(void 0===t?{}:t).onlySelf;this._forEachChild(function(t,r){t.reset(e[r],{onlySelf:!0})}),this.updateValueAndValidity({onlySelf:r}),this._updatePristine({onlySelf:r}),this._updateTouched({onlySelf:r})},FormGroup.prototype.getRawValue=function(){return this._reduceChildren({},function(e,t,r){return e[r]=t.value,e})},FormGroup.prototype._throwIfControlMissing=function(e){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[e])throw new Error("Cannot find form control with name: "+e+".")},FormGroup.prototype._forEachChild=function(e){var t=this;Object.keys(this.controls).forEach(function(r){return e(t.controls[r],r)})},FormGroup.prototype._setUpControls=function(){var e=this;this._forEachChild(function(t){t.setParent(e),t._registerOnCollectionChange(e._onCollectionChange)})},FormGroup.prototype._updateValue=function(){this._value=this._reduceValue()},FormGroup.prototype._anyControls=function(e){var t=this,r=!1;return this._forEachChild(function(n,i){r=r||t.contains(i)&&e(n)}),r},FormGroup.prototype._reduceValue=function(){var e=this;return this._reduceChildren({},function(t,r,n){return(r.enabled||e.disabled)&&(t[n]=r.value),t})},FormGroup.prototype._reduceChildren=function(e,t){var r=e;return this._forEachChild(function(e,n){r=t(r,e,n)}),r},FormGroup.prototype._allControlsDisabled=function(){for(var e=0,t=Object.keys(this.controls);e<t.length;e++){var r=t[e];if(this.controls[r].enabled)return!1}return Object.keys(this.controls).length>0||this.disabled},FormGroup.prototype._checkAllValuesPresent=function(e){this._forEachChild(function(t,r){if(void 0===e[r])throw new Error("Must supply a value for form control with name: '"+r+"'.")})},FormGroup}(X),Y=function(e){function FormArray(t,r,n){void 0===r&&(r=null),void 0===n&&(n=null),e.call(this,r,n),this.controls=t,this._initObservables(),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}return z(FormArray,e),FormArray.prototype.at=function(e){return this.controls[e]},FormArray.prototype.push=function(e){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity(),this._onCollectionChange()},FormArray.prototype.insert=function(e,t){f.insert(this.controls,e,t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()},FormArray.prototype.removeAt=function(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),f.removeAt(this.controls,e),this.updateValueAndValidity(),this._onCollectionChange()},FormArray.prototype.setControl=function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),f.removeAt(this.controls,e),t&&(f.insert(this.controls,e,t),this._registerControl(t)),this.updateValueAndValidity(),this._onCollectionChange()},Object.defineProperty(FormArray.prototype,"length",{get:function(){return this.controls.length},enumerable:!0,configurable:!0}),FormArray.prototype.setValue=function(e,t){var r=this,n=(void 0===t?{}:t).onlySelf;this._checkAllValuesPresent(e),e.forEach(function(e,t){r._throwIfControlMissing(t),r.at(t).setValue(e,{onlySelf:!0})}),this.updateValueAndValidity({onlySelf:n})},FormArray.prototype.patchValue=function(e,t){var r=this,n=(void 0===t?{}:t).onlySelf;e.forEach(function(e,t){r.at(t)&&r.at(t).patchValue(e,{onlySelf:!0})}),this.updateValueAndValidity({onlySelf:n})},FormArray.prototype.reset=function(e,t){void 0===e&&(e=[]);var r=(void 0===t?{}:t).onlySelf;this._forEachChild(function(t,r){t.reset(e[r],{onlySelf:!0})}),this.updateValueAndValidity({onlySelf:r}),this._updatePristine({onlySelf:r}),this._updateTouched({onlySelf:r})},FormArray.prototype.getRawValue=function(){return this.controls.map(function(e){return e.value})},FormArray.prototype._throwIfControlMissing=function(e){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(e))throw new Error("Cannot find form control at index "+e)},FormArray.prototype._forEachChild=function(e){this.controls.forEach(function(t,r){e(t,r)})},FormArray.prototype._updateValue=function(){var e=this;this._value=this.controls.filter(function(t){return t.enabled||e.disabled}).map(function(e){return e.value})},FormArray.prototype._anyControls=function(e){return this.controls.some(function(t){return t.enabled&&e(t)})},FormArray.prototype._setUpControls=function(){var e=this;this._forEachChild(function(t){return e._registerControl(t)})},FormArray.prototype._checkAllValuesPresent=function(e){this._forEachChild(function(t,r){if(void 0===e[r])throw new Error("Must supply a value for form control at index: "+r+".")})},FormArray.prototype._allControlsDisabled=function(){for(var e=0,t=this.controls;e<t.length;e++){var r=t[e];if(r.enabled)return!1}return this.controls.length>0||this.disabled},FormArray.prototype._registerControl=function(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)},FormArray}(X),ee=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},te={provide:u,useExisting:t.forwardRef(function(){return ne})},re=Promise.resolve(null),ne=function(e){function NgForm(t,r){e.call(this),this._submitted=!1,this.ngSubmit=new G,this.form=new J({},composeValidators(t),composeAsyncValidators(r))}return ee(NgForm,e),Object.defineProperty(NgForm.prototype,"submitted",{get:function(){return this._submitted},enumerable:!0,configurable:!0}),Object.defineProperty(NgForm.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(NgForm.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(NgForm.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(NgForm.prototype,"controls",{get:function(){return this.form.controls},enumerable:!0,configurable:!0}),NgForm.prototype.addControl=function(e){var t=this;re.then(function(){var r=t._findContainer(e.path);e._control=r.registerControl(e.name,e.control),setUpControl(e.control,e),e.control.updateValueAndValidity({emitEvent:!1})})},NgForm.prototype.getControl=function(e){return this.form.get(e.path)},NgForm.prototype.removeControl=function(e){var t=this;re.then(function(){var r=t._findContainer(e.path);isPresent(r)&&r.removeControl(e.name)})},NgForm.prototype.addFormGroup=function(e){var t=this;re.then(function(){var r=t._findContainer(e.path),n=new J({});setUpFormContainer(n,e),r.registerControl(e.name,n),n.updateValueAndValidity({emitEvent:!1})})},NgForm.prototype.removeFormGroup=function(e){var t=this;re.then(function(){var r=t._findContainer(e.path);isPresent(r)&&r.removeControl(e.name)})},NgForm.prototype.getFormGroup=function(e){return this.form.get(e.path)},NgForm.prototype.updateModel=function(e,t){var r=this;re.then(function(){var n=r.form.get(e.path);n.setValue(t)})},NgForm.prototype.setValue=function(e){this.control.setValue(e)},NgForm.prototype.onSubmit=function(e){return this._submitted=!0,this.ngSubmit.emit(e),!1},NgForm.prototype.onReset=function(){this.resetForm()},NgForm.prototype.resetForm=function(e){void 0===e&&(e=void 0),this.form.reset(e),this._submitted=!1},NgForm.prototype._findContainer=function(e){return e.pop(),f.isEmpty(e)?this.form:this.form.get(e)},NgForm.decorators=[{type:t.Directive,args:[{selector:"form:not([ngNoForm]):not([formGroup]),ngForm,[ngForm]",providers:[te],host:{"(submit)":"onSubmit($event)","(reset)":"onReset()"},outputs:["ngSubmit"],exportAs:"ngForm"}]}],NgForm.ctorParameters=[{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[m]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[y]}]}],NgForm}(u),ie={formControlName:'\n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });',formGroupName:'\n <div [formGroup]="myGroup">\n <div formGroupName="person">\n <input formControlName="firstName">\n </div>\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });',formArrayName:'\n <div [formGroup]="myGroup">\n <div formArrayName="cities">\n <div *ngFor="let city of cityArray.controls; let i=index">\n <input [formControlName]="i">\n </div>\n </div>\n </div>\n\n In your class:\n\n this.cityArray = new FormArray([new FormControl(\'SF\')]);\n this.myGroup = new FormGroup({\n cities: this.cityArray\n });',ngModelGroup:'\n <form>\n <div ngModelGroup="person">\n <input [(ngModel)]="person.name" name="firstName">\n </div>\n </form>',ngModelWithFormGroup:'\n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n <input [(ngModel)]="showMoreControls" [ngModelOptions]="{standalone: true}">\n </div>\n '},oe=function(){function TemplateDrivenErrors(){}return TemplateDrivenErrors.modelParentException=function(){throw new Error('\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup\'s partner directive "formControlName" instead. Example:\n\n '+ie.formControlName+"\n\n Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:\n\n Example:\n\n "+ie.ngModelWithFormGroup)},TemplateDrivenErrors.formGroupNameException=function(){throw new Error("\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n "+ie.formGroupName+"\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n "+ie.ngModelGroup)},TemplateDrivenErrors.missingNameException=function(){throw new Error('If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as \'standalone\' in ngModelOptions.\n\n Example 1: <input [(ngModel)]="person.firstName" name="first">\n Example 2: <input [(ngModel)]="person.firstName" [ngModelOptions]="{standalone: true}">')},TemplateDrivenErrors.modelGroupParentException=function(){throw new Error("\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n "+ie.formGroupName+"\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n "+ie.ngModelGroup)},TemplateDrivenErrors}(),se=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},ae={provide:u,useExisting:t.forwardRef(function(){return ue})},ue=function(e){function NgModelGroup(t,r,n){e.call(this),this._parent=t,this._validators=r,this._asyncValidators=n}return se(NgModelGroup,e),NgModelGroup.prototype._checkParentType=function(){this._parent instanceof NgModelGroup||this._parent instanceof ne||oe.modelGroupParentException()},NgModelGroup.decorators=[{type:t.Directive,args:[{selector:"[ngModelGroup]",providers:[ae],exportAs:"ngModelGroup"}]}],NgModelGroup.ctorParameters=[{type:u,decorators:[{type:t.Host},{type:t.SkipSelf}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[m]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[y]}]}],NgModelGroup.propDecorators={name:[{type:t.Input,args:["ngModelGroup"]}]},NgModelGroup}(L),le=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},ce={provide:A,useExisting:t.forwardRef(function(){return he})},pe=Promise.resolve(null),he=function(e){function NgModel(t,r,n,i){e.call(this),this._control=new $,this._registered=!1,this.update=new G,this._parent=t,this._rawValidators=r||[],this._rawAsyncValidators=n||[],this.valueAccessor=selectValueAccessor(this,i)}return le(NgModel,e),NgModel.prototype.ngOnChanges=function(e){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in e&&this._updateDisabled(e),isPropertyUpdated(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)},NgModel.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeControl(this)},Object.defineProperty(NgModel.prototype,"control",{get:function(){return this._control},enumerable:!0,configurable:!0}),Object.defineProperty(NgModel.prototype,"path",{get:function(){return this._parent?controlPath(this.name,this._parent):[this.name]},enumerable:!0,configurable:!0}),Object.defineProperty(NgModel.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(NgModel.prototype,"validator",{get:function(){return composeValidators(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(NgModel.prototype,"asyncValidator",{get:function(){return composeAsyncValidators(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),NgModel.prototype.viewToModelUpdate=function(e){this.viewModel=e,this.update.emit(e)},NgModel.prototype._setUpControl=function(){this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0},NgModel.prototype._isStandalone=function(){return!this._parent||this.options&&this.options.standalone},NgModel.prototype._setUpStandalone=function(){setUpControl(this._control,this),this._control.updateValueAndValidity({emitEvent:!1})},NgModel.prototype._checkForErrors=function(){this._isStandalone()||this._checkParentType(),this._checkName()},NgModel.prototype._checkParentType=function(){!(this._parent instanceof ue)&&this._parent instanceof L?oe.formGroupNameException():this._parent instanceof ue||this._parent instanceof ne||oe.modelParentException()},NgModel.prototype._checkName=function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()||this.name||oe.missingNameException()},NgModel.prototype._updateValue=function(e){var t=this;pe.then(function(){t.control.setValue(e,{emitViewToModelChange:!1})})},NgModel.prototype._updateDisabled=function(e){var t=this,r=e.isDisabled.currentValue,n=""===r||r&&"false"!==r;pe.then(function(){n&&!t.control.disabled?t.control.disable():!n&&t.control.disabled&&t.control.enable()})},NgModel.decorators=[{type:t.Directive,args:[{selector:"[ngModel]:not([formControlName]):not([formControl])",providers:[ce],exportAs:"ngModel"}]}],NgModel.ctorParameters=[{type:u,decorators:[{type:t.Optional},{type:t.Host}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[m]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[y]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[g]}]}],NgModel.propDecorators={name:[{type:t.Input}],isDisabled:[{type:t.Input,args:["disabled"]}],model:[{type:t.Input,args:["ngModel"]}],options:[{type:t.Input,args:["ngModelOptions"]}],update:[{type:t.Output,args:["ngModelChange"]}]},NgModel}(A),fe=function(){function ReactiveErrors(){}return ReactiveErrors.controlParentException=function(){throw new Error("formControlName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n "+ie.formControlName)},ReactiveErrors.ngModelGroupException=function(){throw new Error('formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n that also have a "form" prefix: formGroupName, formArrayName, or formGroup.\n\n Option 1: Update the parent to be formGroupName (reactive form strategy)\n\n '+ie.formGroupName+"\n\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n "+ie.ngModelGroup)},ReactiveErrors.missingFormException=function(){throw new Error("formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n "+ie.formControlName)},ReactiveErrors.groupParentException=function(){throw new Error("formGroupName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n "+ie.formGroupName)},ReactiveErrors.arrayParentException=function(){throw new Error("formArrayName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n "+ie.formArrayName)},ReactiveErrors.disabledAttrWarning=function(){console.warn("\n It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n you. We recommend using this approach to avoid 'changed after checked' errors.\n \n Example: \n form = new FormGroup({\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n last: new FormControl('Drew', Validators.required)\n });\n ")},ReactiveErrors}(),de=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},me={provide:A,useExisting:t.forwardRef(function(){return ye})},ye=function(e){function FormControlDirective(t,r,n){e.call(this),this.update=new G,this._rawValidators=t||[],this._rawAsyncValidators=r||[],this.valueAccessor=selectValueAccessor(this,n)}return de(FormControlDirective,e),Object.defineProperty(FormControlDirective.prototype,"isDisabled",{set:function(e){fe.disabledAttrWarning()},enumerable:!0,configurable:!0}),FormControlDirective.prototype.ngOnChanges=function(e){this._isControlChanged(e)&&(setUpControl(this.form,this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this.form.updateValueAndValidity({emitEvent:!1})),isPropertyUpdated(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)},Object.defineProperty(FormControlDirective.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(FormControlDirective.prototype,"validator",{get:function(){return composeValidators(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(FormControlDirective.prototype,"asyncValidator",{get:function(){return composeAsyncValidators(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(FormControlDirective.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),FormControlDirective.prototype.viewToModelUpdate=function(e){this.viewModel=e,this.update.emit(e)},FormControlDirective.prototype._isControlChanged=function(e){return e.hasOwnProperty("form")},FormControlDirective.decorators=[{type:t.Directive,args:[{selector:"[formControl]",providers:[me],exportAs:"ngForm"}]}],FormControlDirective.ctorParameters=[{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[m]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[y]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[g]}]}],FormControlDirective.propDecorators={form:[{type:t.Input,args:["formControl"]}],model:[{type:t.Input,args:["ngModel"]}],update:[{type:t.Output,args:["ngModelChange"]}],isDisabled:[{type:t.Input,args:["disabled"]}]},FormControlDirective}(A),ve=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},ge={provide:u,useExisting:t.forwardRef(function(){return _e})},_e=function(e){function FormGroupDirective(t,r){e.call(this),this._validators=t,this._asyncValidators=r,this._submitted=!1,this.directives=[],this.form=null,this.ngSubmit=new G}return ve(FormGroupDirective,e),FormGroupDirective.prototype.ngOnChanges=function(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())},Object.defineProperty(FormGroupDirective.prototype,"submitted",{get:function(){return this._submitted},enumerable:!0,configurable:!0}),Object.defineProperty(FormGroupDirective.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(FormGroupDirective.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(FormGroupDirective.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),FormGroupDirective.prototype.addControl=function(e){var t=this.form.get(e.path);return setUpControl(t,e),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),t},FormGroupDirective.prototype.getControl=function(e){return this.form.get(e.path)},FormGroupDirective.prototype.removeControl=function(e){f.remove(this.directives,e)},FormGroupDirective.prototype.addFormGroup=function(e){var t=this.form.get(e.path);setUpFormContainer(t,e),t.updateValueAndValidity({emitEvent:!1})},FormGroupDirective.prototype.removeFormGroup=function(e){},FormGroupDirective.prototype.getFormGroup=function(e){return this.form.get(e.path)},FormGroupDirective.prototype.addFormArray=function(e){var t=this.form.get(e.path);setUpFormContainer(t,e),t.updateValueAndValidity({emitEvent:!1})},FormGroupDirective.prototype.removeFormArray=function(e){},FormGroupDirective.prototype.getFormArray=function(e){return this.form.get(e.path)},FormGroupDirective.prototype.updateModel=function(e,t){var r=this.form.get(e.path);r.setValue(t)},FormGroupDirective.prototype.onSubmit=function(e){return this._submitted=!0,this.ngSubmit.emit(e),!1},FormGroupDirective.prototype.onReset=function(){this.resetForm()},FormGroupDirective.prototype.resetForm=function(e){void 0===e&&(e=void 0),this.form.reset(e),this._submitted=!1},FormGroupDirective.prototype._updateDomValue=function(){var e=this;this.directives.forEach(function(t){var r=e.form.get(t.path);t._control!==r&&(cleanUpControl(t._control,t),r&&setUpControl(r,t),t._control=r)}),this.form._updateTreeValidity({emitEvent:!1})},FormGroupDirective.prototype._updateRegistrations=function(){var e=this;this.form._registerOnCollectionChange(function(){return e._updateDomValue()}),this._oldForm&&this._oldForm._registerOnCollectionChange(function(){}),this._oldForm=this.form},FormGroupDirective.prototype._updateValidators=function(){var e=composeValidators(this._validators);this.form.validator=v.compose([this.form.validator,e]);var t=composeAsyncValidators(this._asyncValidators);this.form.asyncValidator=v.composeAsync([this.form.asyncValidator,t])},FormGroupDirective.prototype._checkFormPresent=function(){this.form||fe.missingFormException()},FormGroupDirective.decorators=[{type:t.Directive,args:[{selector:"[formGroup]",providers:[ge],host:{"(submit)":"onSubmit($event)",
"(reset)":"onReset()"},exportAs:"ngForm"}]}],FormGroupDirective.ctorParameters=[{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[m]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[y]}]}],FormGroupDirective.propDecorators={form:[{type:t.Input,args:["formGroup"]}],ngSubmit:[{type:t.Output}]},FormGroupDirective}(u),be=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},we={provide:u,useExisting:t.forwardRef(function(){return Ee})},Ee=function(e){function FormGroupName(t,r,n){e.call(this),this._parent=t,this._validators=r,this._asyncValidators=n}return be(FormGroupName,e),FormGroupName.prototype._checkParentType=function(){_hasInvalidParent(this._parent)&&fe.groupParentException()},FormGroupName.decorators=[{type:t.Directive,args:[{selector:"[formGroupName]",providers:[we]}]}],FormGroupName.ctorParameters=[{type:u,decorators:[{type:t.Optional},{type:t.Host},{type:t.SkipSelf}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[m]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[y]}]}],FormGroupName.propDecorators={name:[{type:t.Input,args:["formGroupName"]}]},FormGroupName}(L),Ce={provide:u,useExisting:t.forwardRef(function(){return Se})},Se=function(e){function FormArrayName(t,r,n){e.call(this),this._parent=t,this._validators=r,this._asyncValidators=n}return be(FormArrayName,e),FormArrayName.prototype.ngOnInit=function(){this._checkParentType(),this.formDirective.addFormArray(this)},FormArrayName.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeFormArray(this)},Object.defineProperty(FormArrayName.prototype,"control",{get:function(){return this.formDirective.getFormArray(this)},enumerable:!0,configurable:!0}),Object.defineProperty(FormArrayName.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(FormArrayName.prototype,"path",{get:function(){return controlPath(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(FormArrayName.prototype,"validator",{get:function(){return composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(FormArrayName.prototype,"asyncValidator",{get:function(){return composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),FormArrayName.prototype._checkParentType=function(){_hasInvalidParent(this._parent)&&fe.arrayParentException()},FormArrayName.decorators=[{type:t.Directive,args:[{selector:"[formArrayName]",providers:[Ce]}]}],FormArrayName.ctorParameters=[{type:u,decorators:[{type:t.Optional},{type:t.Host},{type:t.SkipSelf}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[m]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[y]}]}],FormArrayName.propDecorators={name:[{type:t.Input,args:["formArrayName"]}]},FormArrayName}(u),Pe=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},Ae={provide:A,useExisting:t.forwardRef(function(){return xe})},xe=function(e){function FormControlName(t,r,n,i){e.call(this),this._added=!1,this.update=new G,this._parent=t,this._rawValidators=r||[],this._rawAsyncValidators=n||[],this.valueAccessor=selectValueAccessor(this,i)}return Pe(FormControlName,e),Object.defineProperty(FormControlName.prototype,"isDisabled",{set:function(e){fe.disabledAttrWarning()},enumerable:!0,configurable:!0}),FormControlName.prototype.ngOnChanges=function(e){this._added||this._setUpControl(),isPropertyUpdated(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))},FormControlName.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeControl(this)},FormControlName.prototype.viewToModelUpdate=function(e){this.viewModel=e,this.update.emit(e)},Object.defineProperty(FormControlName.prototype,"path",{get:function(){return controlPath(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(FormControlName.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(FormControlName.prototype,"validator",{get:function(){return composeValidators(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(FormControlName.prototype,"asyncValidator",{get:function(){return composeAsyncValidators(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(FormControlName.prototype,"control",{get:function(){return this._control},enumerable:!0,configurable:!0}),FormControlName.prototype._checkParentType=function(){!(this._parent instanceof Ee)&&this._parent instanceof L?fe.ngModelGroupException():this._parent instanceof Ee||this._parent instanceof _e||this._parent instanceof Se||fe.controlParentException()},FormControlName.prototype._setUpControl=function(){this._checkParentType(),this._control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0},FormControlName.decorators=[{type:t.Directive,args:[{selector:"[formControlName]",providers:[Ae]}]}],FormControlName.ctorParameters=[{type:u,decorators:[{type:t.Optional},{type:t.Host},{type:t.SkipSelf}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[m]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[y]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[g]}]}],FormControlName.propDecorators={name:[{type:t.Input,args:["formControlName"]}],model:[{type:t.Input,args:["ngModel"]}],update:[{type:t.Output,args:["ngModelChange"]}],isDisabled:[{type:t.Input,args:["disabled"]}]},FormControlName}(A),Te={provide:m,useExisting:t.forwardRef(function(){return Me}),multi:!0},Me=function(){function RequiredValidator(){}return Object.defineProperty(RequiredValidator.prototype,"required",{get:function(){return this._required},set:function(e){this._required=isPresent(e)&&""+e!="false",this._onChange&&this._onChange()},enumerable:!0,configurable:!0}),RequiredValidator.prototype.validate=function(e){return this.required?v.required(e):null},RequiredValidator.prototype.registerOnValidatorChange=function(e){this._onChange=e},RequiredValidator.decorators=[{type:t.Directive,args:[{selector:"[required][formControlName],[required][formControl],[required][ngModel]",providers:[Te],host:{"[attr.required]":'required? "" : null'}}]}],RequiredValidator.ctorParameters=[],RequiredValidator.propDecorators={required:[{type:t.Input}]},RequiredValidator}(),Ie={provide:m,useExisting:t.forwardRef(function(){return De}),multi:!0},De=function(){function MinLengthValidator(){}return MinLengthValidator.prototype._createValidator=function(){this._validator=v.minLength(parseInt(this.minlength,10))},MinLengthValidator.prototype.ngOnChanges=function(e){e.minlength&&(this._createValidator(),this._onChange&&this._onChange())},MinLengthValidator.prototype.validate=function(e){return isPresent(this.minlength)?this._validator(e):null},MinLengthValidator.prototype.registerOnValidatorChange=function(e){this._onChange=e},MinLengthValidator.decorators=[{type:t.Directive,args:[{selector:"[minlength][formControlName],[minlength][formControl],[minlength][ngModel]",providers:[Ie],host:{"[attr.minlength]":"minlength? minlength : null"}}]}],MinLengthValidator.ctorParameters=[],MinLengthValidator.propDecorators={minlength:[{type:t.Input}]},MinLengthValidator}(),Ne={provide:m,useExisting:t.forwardRef(function(){return Oe}),multi:!0},Oe=function(){function MaxLengthValidator(){}return MaxLengthValidator.prototype._createValidator=function(){this._validator=v.maxLength(parseInt(this.maxlength,10))},MaxLengthValidator.prototype.ngOnChanges=function(e){e.maxlength&&(this._createValidator(),this._onChange&&this._onChange())},MaxLengthValidator.prototype.validate=function(e){return isPresent(this.maxlength)?this._validator(e):null},MaxLengthValidator.prototype.registerOnValidatorChange=function(e){this._onChange=e},MaxLengthValidator.decorators=[{type:t.Directive,args:[{selector:"[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",providers:[Ne],host:{"[attr.maxlength]":"maxlength? maxlength : null"}}]}],MaxLengthValidator.ctorParameters=[],MaxLengthValidator.propDecorators={maxlength:[{type:t.Input}]},MaxLengthValidator}(),Ve={provide:m,useExisting:t.forwardRef(function(){return Re}),multi:!0},Re=function(){function PatternValidator(){}return PatternValidator.prototype._createValidator=function(){this._validator=v.pattern(this.pattern)},PatternValidator.prototype.ngOnChanges=function(e){e.pattern&&(this._createValidator(),this._onChange&&this._onChange())},PatternValidator.prototype.validate=function(e){return isPresent(this.pattern)?this._validator(e):null},PatternValidator.prototype.registerOnValidatorChange=function(e){this._onChange=e},PatternValidator.decorators=[{type:t.Directive,args:[{selector:"[pattern][formControlName],[pattern][formControl],[pattern][ngModel]",providers:[Ve],host:{"[attr.pattern]":"pattern? pattern : null"}}]}],PatternValidator.ctorParameters=[],PatternValidator.propDecorators={pattern:[{type:t.Input}]},PatternValidator}(),ke=function(){function FormBuilder(){}return FormBuilder.prototype.group=function(e,t){void 0===t&&(t=null);var r=this._reduceControls(e),n=isPresent(t)?t.validator:null,i=isPresent(t)?t.asyncValidator:null;return new J(r,n,i)},FormBuilder.prototype.control=function(e,t,r){return void 0===t&&(t=null),void 0===r&&(r=null),new $(e,t,r)},FormBuilder.prototype.array=function(e,t,r){var n=this;void 0===t&&(t=null),void 0===r&&(r=null);var i=e.map(function(e){return n._createControl(e)});return new Y(i,t,r)},FormBuilder.prototype._reduceControls=function(e){var t=this,r={};return Object.keys(e).forEach(function(n){r[n]=t._createControl(e[n])}),r},FormBuilder.prototype._createControl=function(e){if(e instanceof $||e instanceof J||e instanceof Y)return e;if(isArray(e)){var t=e[0],r=e.length>1?e[1]:null,n=e.length>2?e[2]:null;return this.control(t,r,n)}return this.control(e)},FormBuilder.decorators=[{type:t.Injectable}],FormBuilder.ctorParameters=[],FormBuilder}(),Le=[N,R,E,S,b,D,V,M,U,W,Me,De,Oe,Re],Fe=[he,ue,ne],je=[ye,_e,xe,Ee,Se],Be=function(){function InternalFormsSharedModule(){}return InternalFormsSharedModule.decorators=[{type:t.NgModule,args:[{declarations:Le,exports:Le}]}],InternalFormsSharedModule.ctorParameters=[],InternalFormsSharedModule}(),Ue=function(){function FormsModule(){}return FormsModule.decorators=[{type:t.NgModule,args:[{declarations:Fe,providers:[T],exports:[Be,Fe]}]}],FormsModule.ctorParameters=[],FormsModule}(),We=function(){function ReactiveFormsModule(){}return ReactiveFormsModule.decorators=[{type:t.NgModule,args:[{declarations:[je],providers:[ke,T],exports:[Be,je]}]}],ReactiveFormsModule.ctorParameters=[],ReactiveFormsModule}();e.AbstractControlDirective=s,e.AbstractFormGroupDirective=L,e.CheckboxControlValueAccessor=b,e.ControlContainer=u,e.NG_VALUE_ACCESSOR=g,e.DefaultValueAccessor=E,e.NgControl=A,e.NgControlStatus=U,e.NgControlStatusGroup=W,e.NgForm=ne,e.NgModel=he,e.NgModelGroup=ue,e.RadioControlValueAccessor=M,e.FormControlDirective=ye,e.FormControlName=xe,e.FormGroupDirective=_e,e.FormArrayName=Se,e.FormGroupName=Ee,e.NgSelectOption=N,e.SelectControlValueAccessor=D,e.SelectMultipleControlValueAccessor=V,e.MaxLengthValidator=Oe,e.MinLengthValidator=De,e.PatternValidator=Re,e.RequiredValidator=Me,e.FormBuilder=ke,e.AbstractControl=X,e.FormArray=Y,e.FormControl=$,e.FormGroup=J,e.NG_ASYNC_VALIDATORS=y,e.NG_VALIDATORS=m,e.Validators=v,e.FormsModule=Ue,e.ReactiveFormsModule=We})},123:function(e,t,r){(function(e){!function(e,n){n(t,r(297),r(3),r(56))}(this,function(t,r,n,i){"use strict";var o,s=i.__platform_browser_private__.INTERNAL_BROWSER_PLATFORM_PROVIDERS,a=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},u=function(e){function ResourceLoaderImpl(){e.apply(this,arguments)}return a(ResourceLoaderImpl,e),ResourceLoaderImpl.prototype.get=function(e){var t,r,n=new Promise(function(e,n){t=e,r=n}),i=new XMLHttpRequest;return i.open("GET",e,!0),i.responseType="text",i.onload=function(){var n=i.response||i.responseText,o=1223===i.status?204:i.status;0===o&&(o=n?200:0),200<=o&&o<=300?t(n):r("Failed to load "+e)},i.onerror=function(){r("Failed to load "+e)},i.send(),n},ResourceLoaderImpl.decorators=[{type:n.Injectable}],ResourceLoaderImpl.ctorParameters=[],ResourceLoaderImpl}(r.ResourceLoader),l=[s,{provide:n.COMPILER_OPTIONS,useValue:{providers:[{provide:r.ResourceLoader,useClass:u}]},multi:!0}];o="undefined"==typeof window?"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:e:window;var c=o;c.assert=function(e){};var p=(function(){function NumberWrapper(){}return NumberWrapper.toFixed=function(e,t){return e.toFixed(t)},NumberWrapper.equal=function(e,t){return e===t},NumberWrapper.parseIntAutoRadix=function(e){var t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t},NumberWrapper.parseInt=function(e,t){if(10==t){if(/^(\-|\+)?[0-9]+$/.test(e))return parseInt(e,t)}else if(16==t){if(/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(e))return parseInt(e,t)}else{var r=parseInt(e,t);if(!isNaN(r))return r}throw new Error("Invalid integer literal when parsing "+e+" in base "+t)},Object.defineProperty(NumberWrapper,"NaN",{get:function(){return NaN},enumerable:!0,configurable:!0}),NumberWrapper.isNumeric=function(e){return!isNaN(e-parseFloat(e))},NumberWrapper.isNaN=function(e){return isNaN(e)},NumberWrapper.isInteger=function(e){return Number.isInteger(e)},NumberWrapper}(),this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),h=function(e){function CachedResourceLoader(){if(e.call(this),this._cache=c.$templateCache,null==this._cache)throw new Error("CachedResourceLoader: Template cache was not found in $templateCache.")}return p(CachedResourceLoader,e),CachedResourceLoader.prototype.get=function(e){return this._cache.hasOwnProperty(e)?Promise.resolve(this._cache[e]):Promise.reject("CachedResourceLoader: Did not find cached template for "+e)},CachedResourceLoader}(r.ResourceLoader),f={INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS:l,ResourceLoaderImpl:u},d=[{provide:r.ResourceLoader,useClass:h}],m=n.createPlatformFactory(r.platformCoreDynamic,"browserDynamic",l);t.RESOURCE_CACHE_PROVIDER=d,t.platformBrowserDynamic=m,t.__platform_browser_dynamic_private__=f})}).call(t,function(){return this}())},56:function(e,t,r){(function(e){!function(e,n){n(t,r(13),r(3))}(this,function(t,r,n){"use strict";function isPresent(e){return void 0!==e&&null!==e}function isBlank(e){return void 0===e||null===e}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function isArray(e){return Array.isArray(e)}function stringify(e){if("string"==typeof e)return e;if(void 0===e||null===e)return""+e;if(e.overriddenName)return e.overriddenName;if(e.name)return e.name;var t=e.toString(),r=t.indexOf("\n");return r===-1?t:t.substring(0,r)}function setValueOnPath(e,t,r){for(var n=t.split("."),i=e;n.length>1;){var o=n.shift();i=i.hasOwnProperty(o)&&isPresent(i[o])?i[o]:i[o]={}}void 0!==i&&null!==i||(i={}),i[n.shift()]=r}function camelCaseToDashCase(e){return e.replace(f,function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return"-"+e[1].toLowerCase()})}function dashCaseToCamelCase(e){return e.replace(d,function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return e[1].toUpperCase()})}function getDOM(){return m}function setRootDomAdapter(e){m||(m=e)}function _computeStyle(e,t){return getDOM().getComputedStyle(e)[t]}function _populateStyles(e,t,r){var i={};return t.styles.forEach(function(e){Object.keys(e).forEach(function(t){var r=e[t],o=dashCaseToCamelCase(t);i[o]=r==n.AUTO_STYLE?r:r.toString()+_resolveStyleUnit(r,t,o)})}),Object.keys(r).forEach(function(e){isPresent(i[e])||(i[e]=r[e])}),i}function _resolveStyleUnit(e,t,r){var n="";if(_isPixelDimensionStyle(r)&&0!=e&&"0"!=e)if(isNumber(e))n="px";else if(0==_findDimensionalSuffix(e.toString()).length)throw new Error("Please provide a CSS unit value for "+t+":"+e);return n}function _findDimensionalSuffix(e){for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(!(r>=_&&r<=b||r==w))return e.substring(t,e.length)}return""}function _isPixelDimensionStyle(e){switch(e){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 getBaseElementHref(){return I||(I=document.querySelector("base"))?I.getAttribute("href"):null}function relativePath(e){return c||(c=document.createElement("a")),c.setAttribute("href",e),"/"===c.pathname.charAt(0)?c.pathname:"/"+c.pathname}function parseCookieValue(e,t){t=encodeURIComponent(t);for(var r=0,n=e.split(";");r<n.length;r++){var i=n[r],o=i.indexOf("="),s=o==-1?[i,""]:[i.slice(0,o),i.slice(o+1)],a=s[0],u=s[1];if(a.trim()===t)return decodeURIComponent(u)}return null}function supportsState(){return!!window.history.pushState}function _flattenArray(e,t){if(isPresent(e))for(var r=0;r<e.length;r++){var n=e[r];isArray(n)?_flattenArray(n,t):t.push(n)}return t}function moveNodesAfterSibling(e,t){var r=getDOM().parentElement(e);if(t.length>0&&isPresent(r)){var n=getDOM().nextSibling(e);if(isPresent(n))for(var i=0;i<t.length;i++)getDOM().insertBefore(n,t[i]);else for(var i=0;i<t.length;i++)getDOM().appendChild(r,t[i])}}function appendNodes(e,t){for(var r=0;r<t.length;r++)getDOM().appendChild(e,t[r])}function decoratePreventDefault(e){return function(t){var r=e(t);r===!1&&getDOM().preventDefault(t)}}function _shimContentAttribute(e){return ee.replace($,e)}function _shimHostAttribute(e){return Y.replace($,e)}function _flattenStyles(e,t,r){for(var n=0;n<t.length;n++){var i=t[n];isArray(i)?_flattenStyles(e,i,r):(i=i.replace($,e),r.push(i))}return r}function splitNamespace(e){if(":"!=e[0])return[null,e];var t=e.match(te);return[t[1],t[2]]}function inspectNativeElement(e){return n.getDebugNode(e)}function _createConditionalRootRenderer(e,t){return n.isDevMode()?_createRootRenderer(e,t):e}function _createRootRenderer(e,t){return getDOM().setGlobalVar(ne,inspectNativeElement),getDOM().setGlobalVar(ie,O.merge(re,_ngProbeTokensToMap(t||[]))),new o(e)}function _ngProbeTokensToMap(e){return e.reduce(function(e,t){return e[t.name]=t.token,e},{})}function sanitizeUrl(e){return e=String(e),e.match(be)||e.match(we)?e:(n.isDevMode()&&getDOM().log("WARNING: sanitizing unsafe URL value "+e+" (see http://g.co/ng/security#xss)"),"unsafe:"+e)}function sanitizeSrcset(e){return e=String(e),e.split(",").map(function(e){return sanitizeUrl(e.trim())}).join(", ")}function getInertElement(){if(Ee)return Ee;Ce=getDOM();var e=Ce.createElement("template");if("content"in e)return e;var t=Ce.createHtmlDocument();if(Ee=Ce.querySelector(t,"body"),null==Ee){var r=Ce.createElement("html",t);Ee=Ce.createElement("body",t),Ce.appendChild(r,Ee),Ce.appendChild(t,r)}return Ee}function tagSet(e){for(var t={},r=0,n=e.split(",");r<n.length;r++){var i=n[r];t[i]=!0}return t}function merge(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];for(var r={},n=0,i=e;n<i.length;n++){var o=i[n];for(var s in o)o.hasOwnProperty(s)&&(r[s]=!0)}return r}function encodeEntities(e){return e.replace(/&/g,"&amp;").replace(ke,function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1);return"&#"+(1024*(t-55296)+(r-56320)+65536)+";"}).replace(Le,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function stripCustomNsAttrs(e){Ce.attributeMap(e).forEach(function(t,r){"xmlns:ns1"!==r&&0!==r.indexOf("ns1:")||Ce.removeAttribute(e,r)});for(var t=0,r=Ce.childNodesAsList(e);t<r.length;t++){var n=r[t];Ce.isElementNode(n)&&stripCustomNsAttrs(n)}}function sanitizeHtml(e){try{var t=getInertElement(),r=e?String(e):"",i=5,o=r;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,Ce.setInnerHTML(t,r),Ce.defaultDoc().documentMode&&stripCustomNsAttrs(t),o=Ce.getInnerHTML(t)}while(r!==o);for(var s=new Re,a=s.sanitizeChildren(Ce.getTemplateContent(t)||t),u=Ce.getTemplateContent(t)||t,l=0,c=Ce.childNodesAsList(u);l<c.length;l++){var p=c[l];Ce.removeChild(u,p)}return n.isDevMode()&&s.sanitizedSomething&&Ce.log("WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss)."),a}catch(h){throw Ee=null,h}}function hasBalancedQuotes(e){for(var t=!0,r=!0,n=0;n<e.length;n++){var i=e.charAt(n);"'"===i&&r?t=!t:'"'===i&&t&&(r=!r)}return t&&r}function sanitizeStyle(e){if(e=String(e).trim(),!e)return"";var t=e.match(He);return t&&sanitizeUrl(t[1])===t[1]||e.match(We)&&hasBalancedQuotes(e)?e:(n.isDevMode()&&getDOM().log("WARNING: sanitizing unsafe style value "+e+" (see http://g.co/ng/security#xss)."),"unsafe")}function initDomAdapter(){M.makeCurrent(),R.init()}function errorHandler(){return new n.ErrorHandler}function _document(){return getDOM().defaultDoc()}function _resolveDefaultAnimationDriver(){return getDOM().supportsWebAnimation()?new g:u.NOOP}function enableDebugTools(e){return at.ng=new ot(e),e}function disableDebugTools(){delete at.ng}var i,o=n.__core_private__.DebugDomRootRenderer,s=n.__core_private__.NoOpAnimationPlayer,a=function(){function _NoOpAnimationDriver(){}return _NoOpAnimationDriver.prototype.animate=function(e,t,r,n,i,o){return new s},_NoOpAnimationDriver}(),u=function(){function AnimationDriver(){}return AnimationDriver.NOOP=new a,AnimationDriver}();i="undefined"==typeof window?"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:e:window;var l=i;l.assert=function(e){};var c,p=function(){function NumberWrapper(){}return NumberWrapper.toFixed=function(e,t){return e.toFixed(t)},NumberWrapper.equal=function(e,t){return e===t},NumberWrapper.parseIntAutoRadix=function(e){var t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t},NumberWrapper.parseInt=function(e,t){if(10==t){if(/^(\-|\+)?[0-9]+$/.test(e))return parseInt(e,t)}else if(16==t){if(/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(e))return parseInt(e,t)}else{var r=parseInt(e,t);if(!isNaN(r))return r}throw new Error("Invalid integer literal when parsing "+e+" in base "+t)},Object.defineProperty(NumberWrapper,"NaN",{get:function(){return NaN},enumerable:!0,configurable:!0}),NumberWrapper.isNumeric=function(e){return!isNaN(e-parseFloat(e))},NumberWrapper.isNaN=function(e){return isNaN(e)},NumberWrapper.isInteger=function(e){return Number.isInteger(e)},NumberWrapper}(),h=function(){function Json(){}return Json.parse=function(e){return l.JSON.parse(e)},Json.stringify=function(e){return l.JSON.stringify(e,null,2)},Json}(),f=/([A-Z])/g,d=/-([a-z])/g,m=null,y=function(){function DomAdapter(){this.resourceLoaderType=null}return Object.defineProperty(DomAdapter.prototype,"attrToPropMap",{get:function(){return this._attrToPropMap},set:function(e){this._attrToPropMap=e},enumerable:!0,configurable:!0}),DomAdapter}(),v=function(){function WebAnimationsPlayer(e,t,r){this.element=e,this.keyframes=t,this.options=r,this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._initialized=!1,this._started=!1,this.parentPlayer=null,this._duration=r.duration}return WebAnimationsPlayer.prototype._onFinish=function(){this._finished||(this._finished=!0,isPresent(this.parentPlayer)||this.destroy(),this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[])},WebAnimationsPlayer.prototype.init=function(){var e=this;if(!this._initialized){this._initialized=!0;var t=this.keyframes.map(function(t){var r={};return Object.keys(t).forEach(function(i){var o=t[i];r[i]=o==n.AUTO_STYLE?_computeStyle(e.element,i):o}),r});this._player=this._triggerWebAnimation(this.element,t,this.options),this.reset(),this._player.onfinish=function(){return e._onFinish()}}},WebAnimationsPlayer.prototype._triggerWebAnimation=function(e,t,r){return e.animate(t,r)},WebAnimationsPlayer.prototype.onStart=function(e){this._onStartFns.push(e)},WebAnimationsPlayer.prototype.onDone=function(e){this._onDoneFns.push(e)},WebAnimationsPlayer.prototype.play=function(){this.init(),this.hasStarted()||(this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[],this._started=!0),this._player.play()},WebAnimationsPlayer.prototype.pause=function(){this.init(),this._player.pause()},WebAnimationsPlayer.prototype.finish=function(){this.init(),this._onFinish(),this._player.finish()},WebAnimationsPlayer.prototype.reset=function(){this._player.cancel()},WebAnimationsPlayer.prototype.restart=function(){this.reset(),this.play()},WebAnimationsPlayer.prototype.hasStarted=function(){return this._started},WebAnimationsPlayer.prototype.destroy=function(){this.reset(),this._onFinish()},Object.defineProperty(WebAnimationsPlayer.prototype,"totalTime",{get:function(){return this._duration},enumerable:!0,configurable:!0}),WebAnimationsPlayer.prototype.setPosition=function(e){this._player.currentTime=e*this.totalTime},WebAnimationsPlayer.prototype.getPosition=function(){return this._player.currentTime/this.totalTime},WebAnimationsPlayer}(),g=function(){function WebAnimationsDriver(){}return WebAnimationsDriver.prototype.animate=function(e,t,r,n,i,o){var s=[],a={};if(isPresent(t)&&t.styles.length>0&&(a=_populateStyles(e,t,{}),a.offset=0,s.push(a)),r.forEach(function(t){var r=_populateStyles(e,t.styles,a);r.offset=t.offset,s.push(r)}),1==s.length){var u=s[0];u.offset=null,s=[u,u]}var l={duration:n,delay:i,fill:"both"};return o&&(l.easing=o),new v(e,s,l)},WebAnimationsDriver}(),_=48,b=57,w=46,E=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},C=function(e){function GenericBrowserDomAdapter(){var t=this;e.call(this),this._animationPrefix=null,this._transitionEnd=null;try{var r=this.createElement("div",this.defaultDoc());if(isPresent(this.getStyle(r,"animationName")))this._animationPrefix="";else for(var n=["Webkit","Moz","O","ms"],i=0;i<n.length;i++)if(isPresent(this.getStyle(r,n[i]+"AnimationName"))){this._animationPrefix="-"+n[i].toLowerCase()+"-";break}var o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};Object.keys(o).forEach(function(e){isPresent(t.getStyle(r,e))&&(t._transitionEnd=o[e])})}catch(s){this._animationPrefix=null,this._transitionEnd=null}}return E(GenericBrowserDomAdapter,e),GenericBrowserDomAdapter.prototype.getDistributedNodes=function(e){return e.getDistributedNodes()},GenericBrowserDomAdapter.prototype.resolveAndSetHref=function(e,t,r){e.href=null==r?t:t+"/../"+r},GenericBrowserDomAdapter.prototype.supportsDOMEvents=function(){return!0},GenericBrowserDomAdapter.prototype.supportsNativeShadowDOM=function(){return"function"==typeof this.defaultDoc().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 isPresent(this._animationPrefix)&&isPresent(this._transitionEnd)},GenericBrowserDomAdapter}(y),S=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},P={"class":"className",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},A=3,x={"\b":"Backspace","\t":"Tab","":"Delete","":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},T={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"},M=function(e){function BrowserDomAdapter(){e.apply(this,arguments)}return S(BrowserDomAdapter,e),BrowserDomAdapter.prototype.parse=function(e){throw new Error("parse not implemented")},BrowserDomAdapter.makeCurrent=function(){setRootDomAdapter(new BrowserDomAdapter)},BrowserDomAdapter.prototype.hasProperty=function(e,t){return t in e},BrowserDomAdapter.prototype.setProperty=function(e,t,r){e[t]=r},BrowserDomAdapter.prototype.getProperty=function(e,t){return e[t]},BrowserDomAdapter.prototype.invoke=function(e,t,r){(n=e)[t].apply(n,r);var n},BrowserDomAdapter.prototype.logError=function(e){(window.console.error||window.console.log)(e)},BrowserDomAdapter.prototype.log=function(e){window.console.log(e)},BrowserDomAdapter.prototype.logGroup=function(e){window.console.group&&window.console.group(e),this.logError(e)},BrowserDomAdapter.prototype.logGroupEnd=function(){window.console.groupEnd&&window.console.groupEnd()},Object.defineProperty(BrowserDomAdapter.prototype,"attrToPropMap",{get:function(){return P},enumerable:!0,configurable:!0}),BrowserDomAdapter.prototype.query=function(e){return document.querySelector(e)},BrowserDomAdapter.prototype.querySelector=function(e,t){return e.querySelector(t)},BrowserDomAdapter.prototype.querySelectorAll=function(e,t){return e.querySelectorAll(t)},BrowserDomAdapter.prototype.on=function(e,t,r){e.addEventListener(t,r,!1)},BrowserDomAdapter.prototype.onAndCancel=function(e,t,r){return e.addEventListener(t,r,!1),function(){e.removeEventListener(t,r,!1)}},BrowserDomAdapter.prototype.dispatchEvent=function(e,t){e.dispatchEvent(t)},BrowserDomAdapter.prototype.createMouseEvent=function(e){var t=document.createEvent("MouseEvent");return t.initEvent(e,!0,!0),t},BrowserDomAdapter.prototype.createEvent=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t},BrowserDomAdapter.prototype.preventDefault=function(e){e.preventDefault(),e.returnValue=!1},BrowserDomAdapter.prototype.isPrevented=function(e){return e.defaultPrevented||isPresent(e.returnValue)&&!e.returnValue},BrowserDomAdapter.prototype.getInnerHTML=function(e){return e.innerHTML},BrowserDomAdapter.prototype.getTemplateContent=function(e){return"content"in e&&e instanceof HTMLTemplateElement?e.content:null},BrowserDomAdapter.prototype.getOuterHTML=function(e){return e.outerHTML},BrowserDomAdapter.prototype.nodeName=function(e){return e.nodeName},BrowserDomAdapter.prototype.nodeValue=function(e){return e.nodeValue},BrowserDomAdapter.prototype.type=function(e){return e.type},BrowserDomAdapter.prototype.content=function(e){return this.hasProperty(e,"content")?e.content:e},BrowserDomAdapter.prototype.firstChild=function(e){return e.firstChild},BrowserDomAdapter.prototype.nextSibling=function(e){return e.nextSibling},BrowserDomAdapter.prototype.parentElement=function(e){return e.parentNode},BrowserDomAdapter.prototype.childNodes=function(e){return e.childNodes},BrowserDomAdapter.prototype.childNodesAsList=function(e){for(var t=e.childNodes,r=new Array(t.length),n=0;n<t.length;n++)r[n]=t[n];return r},BrowserDomAdapter.prototype.clearNodes=function(e){for(;e.firstChild;)e.removeChild(e.firstChild);
},BrowserDomAdapter.prototype.appendChild=function(e,t){e.appendChild(t)},BrowserDomAdapter.prototype.removeChild=function(e,t){e.removeChild(t)},BrowserDomAdapter.prototype.replaceChild=function(e,t,r){e.replaceChild(t,r)},BrowserDomAdapter.prototype.remove=function(e){return e.parentNode&&e.parentNode.removeChild(e),e},BrowserDomAdapter.prototype.insertBefore=function(e,t){e.parentNode.insertBefore(t,e)},BrowserDomAdapter.prototype.insertAllBefore=function(e,t){t.forEach(function(t){return e.parentNode.insertBefore(t,e)})},BrowserDomAdapter.prototype.insertAfter=function(e,t){e.parentNode.insertBefore(t,e.nextSibling)},BrowserDomAdapter.prototype.setInnerHTML=function(e,t){e.innerHTML=t},BrowserDomAdapter.prototype.getText=function(e){return e.textContent},BrowserDomAdapter.prototype.setText=function(e,t){e.textContent=t},BrowserDomAdapter.prototype.getValue=function(e){return e.value},BrowserDomAdapter.prototype.setValue=function(e,t){e.value=t},BrowserDomAdapter.prototype.getChecked=function(e){return e.checked},BrowserDomAdapter.prototype.setChecked=function(e,t){e.checked=t},BrowserDomAdapter.prototype.createComment=function(e){return document.createComment(e)},BrowserDomAdapter.prototype.createTemplate=function(e){var t=document.createElement("template");return t.innerHTML=e,t},BrowserDomAdapter.prototype.createElement=function(e,t){return void 0===t&&(t=document),t.createElement(e)},BrowserDomAdapter.prototype.createElementNS=function(e,t,r){return void 0===r&&(r=document),r.createElementNS(e,t)},BrowserDomAdapter.prototype.createTextNode=function(e,t){return void 0===t&&(t=document),t.createTextNode(e)},BrowserDomAdapter.prototype.createScriptTag=function(e,t,r){void 0===r&&(r=document);var n=r.createElement("SCRIPT");return n.setAttribute(e,t),n},BrowserDomAdapter.prototype.createStyleElement=function(e,t){void 0===t&&(t=document);var r=t.createElement("style");return this.appendChild(r,this.createTextNode(e)),r},BrowserDomAdapter.prototype.createShadowRoot=function(e){return e.createShadowRoot()},BrowserDomAdapter.prototype.getShadowRoot=function(e){return e.shadowRoot},BrowserDomAdapter.prototype.getHost=function(e){return e.host},BrowserDomAdapter.prototype.clone=function(e){return e.cloneNode(!0)},BrowserDomAdapter.prototype.getElementsByClassName=function(e,t){return e.getElementsByClassName(t)},BrowserDomAdapter.prototype.getElementsByTagName=function(e,t){return e.getElementsByTagName(t)},BrowserDomAdapter.prototype.classList=function(e){return Array.prototype.slice.call(e.classList,0)},BrowserDomAdapter.prototype.addClass=function(e,t){e.classList.add(t)},BrowserDomAdapter.prototype.removeClass=function(e,t){e.classList.remove(t)},BrowserDomAdapter.prototype.hasClass=function(e,t){return e.classList.contains(t)},BrowserDomAdapter.prototype.setStyle=function(e,t,r){e.style[t]=r},BrowserDomAdapter.prototype.removeStyle=function(e,t){e.style[t]=""},BrowserDomAdapter.prototype.getStyle=function(e,t){return e.style[t]},BrowserDomAdapter.prototype.hasStyle=function(e,t,r){void 0===r&&(r=null);var n=this.getStyle(e,t)||"";return r?n==r:n.length>0},BrowserDomAdapter.prototype.tagName=function(e){return e.tagName},BrowserDomAdapter.prototype.attributeMap=function(e){for(var t=new Map,r=e.attributes,n=0;n<r.length;n++){var i=r[n];t.set(i.name,i.value)}return t},BrowserDomAdapter.prototype.hasAttribute=function(e,t){return e.hasAttribute(t)},BrowserDomAdapter.prototype.hasAttributeNS=function(e,t,r){return e.hasAttributeNS(t,r)},BrowserDomAdapter.prototype.getAttribute=function(e,t){return e.getAttribute(t)},BrowserDomAdapter.prototype.getAttributeNS=function(e,t,r){return e.getAttributeNS(t,r)},BrowserDomAdapter.prototype.setAttribute=function(e,t,r){e.setAttribute(t,r)},BrowserDomAdapter.prototype.setAttributeNS=function(e,t,r,n){e.setAttributeNS(t,r,n)},BrowserDomAdapter.prototype.removeAttribute=function(e,t){e.removeAttribute(t)},BrowserDomAdapter.prototype.removeAttributeNS=function(e,t,r){e.removeAttributeNS(t,r)},BrowserDomAdapter.prototype.templateAwareRoot=function(e){return this.isTemplateElement(e)?this.content(e):e},BrowserDomAdapter.prototype.createHtmlDocument=function(){return document.implementation.createHTMLDocument("fakeTitle")},BrowserDomAdapter.prototype.defaultDoc=function(){return document},BrowserDomAdapter.prototype.getBoundingClientRect=function(e){try{return e.getBoundingClientRect()}catch(t){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}},BrowserDomAdapter.prototype.getTitle=function(){return document.title},BrowserDomAdapter.prototype.setTitle=function(e){document.title=e||""},BrowserDomAdapter.prototype.elementMatches=function(e,t){return e instanceof HTMLElement&&(e.matches&&e.matches(t)||e.msMatchesSelector&&e.msMatchesSelector(t)||e.webkitMatchesSelector&&e.webkitMatchesSelector(t))},BrowserDomAdapter.prototype.isTemplateElement=function(e){return e instanceof HTMLElement&&"TEMPLATE"==e.nodeName},BrowserDomAdapter.prototype.isTextNode=function(e){return e.nodeType===Node.TEXT_NODE},BrowserDomAdapter.prototype.isCommentNode=function(e){return e.nodeType===Node.COMMENT_NODE},BrowserDomAdapter.prototype.isElementNode=function(e){return e.nodeType===Node.ELEMENT_NODE},BrowserDomAdapter.prototype.hasShadowRoot=function(e){return isPresent(e.shadowRoot)&&e instanceof HTMLElement},BrowserDomAdapter.prototype.isShadowRoot=function(e){return e instanceof DocumentFragment},BrowserDomAdapter.prototype.importIntoDoc=function(e){return document.importNode(this.templateAwareRoot(e),!0)},BrowserDomAdapter.prototype.adoptNode=function(e){return document.adoptNode(e)},BrowserDomAdapter.prototype.getHref=function(e){return e.href},BrowserDomAdapter.prototype.getEventKey=function(e){var t=e.key;if(isBlank(t)){if(t=e.keyIdentifier,isBlank(t))return"Unidentified";t.startsWith("U+")&&(t=String.fromCharCode(parseInt(t.substring(2),16)),e.location===A&&T.hasOwnProperty(t)&&(t=T[t]))}return x[t]||t},BrowserDomAdapter.prototype.getGlobalEventTarget=function(e){return"window"===e?window:"document"===e?document:"body"===e?document.body:void 0},BrowserDomAdapter.prototype.getHistory=function(){return window.history},BrowserDomAdapter.prototype.getLocation=function(){return window.location},BrowserDomAdapter.prototype.getBaseHref=function(){var e=getBaseElementHref();return isBlank(e)?null:relativePath(e)},BrowserDomAdapter.prototype.resetBaseElement=function(){I=null},BrowserDomAdapter.prototype.getUserAgent=function(){return window.navigator.userAgent},BrowserDomAdapter.prototype.setData=function(e,t,r){this.setAttribute(e,"data-"+t,r)},BrowserDomAdapter.prototype.getData=function(e,t){return this.getAttribute(e,"data-"+t)},BrowserDomAdapter.prototype.getComputedStyle=function(e){return getComputedStyle(e)},BrowserDomAdapter.prototype.setGlobalVar=function(e,t){setValueOnPath(l,e,t)},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(e){return parseCookieValue(document.cookie,e)},BrowserDomAdapter.prototype.setCookie=function(e,t){document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)},BrowserDomAdapter}(C),I=null,D=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},N=function(e){function BrowserPlatformLocation(){e.call(this),this._init()}return D(BrowserPlatformLocation,e),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()},BrowserPlatformLocation.prototype.onPopState=function(e){getDOM().getGlobalEventTarget("window").addEventListener("popstate",e,!1)},BrowserPlatformLocation.prototype.onHashChange=function(e){getDOM().getGlobalEventTarget("window").addEventListener("hashchange",e,!1)},Object.defineProperty(BrowserPlatformLocation.prototype,"pathname",{get:function(){return this._location.pathname},set:function(e){this._location.pathname=e},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(e,t,r){supportsState()?this._history.pushState(e,t,r):this._location.hash=r},BrowserPlatformLocation.prototype.replaceState=function(e,t,r){supportsState()?this._history.replaceState(e,t,r):this._location.hash=r},BrowserPlatformLocation.prototype.forward=function(){this._history.forward()},BrowserPlatformLocation.prototype.back=function(){this._history.back()},BrowserPlatformLocation.decorators=[{type:n.Injectable}],BrowserPlatformLocation.ctorParameters=[],BrowserPlatformLocation}(r.PlatformLocation),O=(function(){return(new Map).keys().next?function(e){for(var t,r=e.keys();!(t=r.next()).done;)e.set(t.value,null)}:function(e){e.forEach(function(t,r){e.set(r,null)})}}(),function(){try{if((new Map).values().next)return function(e,t){return t?Array.from(e.values()):Array.from(e.keys())}}catch(e){}return function(e,t){var r=new Array(e.size),n=0;return e.forEach(function(e,i){r[n]=t?e:i,n++}),r}}(),function(){function StringMapWrapper(){}return StringMapWrapper.merge=function(e,t){for(var r={},n=0,i=Object.keys(e);n<i.length;n++){var o=i[n];r[o]=e[o]}for(var s=0,a=Object.keys(t);s<a.length;s++){var o=a[s];r[o]=t[o]}return r},StringMapWrapper.equals=function(e,t){var r=Object.keys(e),n=Object.keys(t);if(r.length!=n.length)return!1;for(var i=0;i<r.length;i++){var o=r[i];if(e[o]!==t[o])return!1}return!0},StringMapWrapper}()),V=function(){function ListWrapper(){}return ListWrapper.createFixedSize=function(e){return new Array(e)},ListWrapper.createGrowableSize=function(e){return new Array(e)},ListWrapper.clone=function(e){return e.slice(0)},ListWrapper.forEachWithIndex=function(e,t){for(var r=0;r<e.length;r++)t(e[r],r)},ListWrapper.first=function(e){return e?e[0]:null},ListWrapper.last=function(e){return e&&0!=e.length?e[e.length-1]:null},ListWrapper.indexOf=function(e,t,r){return void 0===r&&(r=0),e.indexOf(t,r)},ListWrapper.contains=function(e,t){return e.indexOf(t)!==-1},ListWrapper.reversed=function(e){var t=ListWrapper.clone(e);return t.reverse()},ListWrapper.concat=function(e,t){return e.concat(t)},ListWrapper.insert=function(e,t,r){e.splice(t,0,r)},ListWrapper.removeAt=function(e,t){var r=e[t];return e.splice(t,1),r},ListWrapper.removeAll=function(e,t){for(var r=0;r<t.length;++r){var n=e.indexOf(t[r]);e.splice(n,1)}},ListWrapper.remove=function(e,t){var r=e.indexOf(t);return r>-1&&(e.splice(r,1),!0)},ListWrapper.clear=function(e){e.length=0},ListWrapper.isEmpty=function(e){return 0==e.length},ListWrapper.fill=function(e,t,r,n){void 0===r&&(r=0),void 0===n&&(n=null),e.fill(t,r,null===n?e.length:n)},ListWrapper.equals=function(e,t){if(e.length!=t.length)return!1;for(var r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0},ListWrapper.slice=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=null),e.slice(t,null===r?void 0:r)},ListWrapper.splice=function(e,t,r){return e.splice(t,r)},ListWrapper.sort=function(e,t){isPresent(t)?e.sort(t):e.sort()},ListWrapper.toString=function(e){return e.toString()},ListWrapper.toJSON=function(e){return JSON.stringify(e)},ListWrapper.maximum=function(e,t){if(0==e.length)return null;for(var r=null,n=-(1/0),i=0;i<e.length;i++){var o=e[i];if(!isBlank(o)){var s=t(o);s>n&&(r=o,n=s)}}return r},ListWrapper.flatten=function(e){var t=[];return _flattenArray(e,t),t},ListWrapper.addAll=function(e,t){for(var r=0;r<t.length;r++)e.push(t[r])},ListWrapper}(),R=function(){function BrowserGetTestability(){}return BrowserGetTestability.init=function(){n.setTestabilityGetter(new BrowserGetTestability)},BrowserGetTestability.prototype.addToWindow=function(e){l.getAngularTestability=function(t,r){void 0===r&&(r=!0);var n=e.findTestabilityInTree(t,r);if(null==n)throw new Error("Could not find testability for element.");return n},l.getAllAngularTestabilities=function(){return e.getAllTestabilities()},l.getAllAngularRootElements=function(){return e.getAllRootElements()};var t=function(e){var t=l.getAllAngularTestabilities(),r=t.length,n=!1,i=function(t){n=n||t,r--,0==r&&e(n)};t.forEach(function(e){e.whenStable(i)})};l.frameworkStabilizers||(l.frameworkStabilizers=V.createGrowableSize(0)),l.frameworkStabilizers.push(t)},BrowserGetTestability.prototype.findTestabilityInTree=function(e,t,r){if(null==t)return null;var n=e.getTestability(t);return isPresent(n)?n:r?getDOM().isShadowRoot(t)?this.findTestabilityInTree(e,getDOM().getHost(t),!0):this.findTestabilityInTree(e,getDOM().parentElement(t),!0):null},BrowserGetTestability}(),k=function(){function Title(){}return Title.prototype.getTitle=function(){return getDOM().getTitle()},Title.prototype.setTitle=function(e){getDOM().setTitle(e)},Title}(),L=new n.OpaqueToken("DocumentToken"),F=new n.OpaqueToken("EventManagerPlugins"),j=function(){function EventManager(e,t){var r=this;this._zone=t,e.forEach(function(e){return e.manager=r}),this._plugins=e.slice().reverse()}return EventManager.prototype.addEventListener=function(e,t,r){var n=this._findPluginFor(t);return n.addEventListener(e,t,r)},EventManager.prototype.addGlobalEventListener=function(e,t,r){var n=this._findPluginFor(t);return n.addGlobalEventListener(e,t,r)},EventManager.prototype.getZone=function(){return this._zone},EventManager.prototype._findPluginFor=function(e){for(var t=this._plugins,r=0;r<t.length;r++){var n=t[r];if(n.supports(e))return n}throw new Error("No event manager plugin found for event "+e)},EventManager.decorators=[{type:n.Injectable}],EventManager.ctorParameters=[{type:Array,decorators:[{type:n.Inject,args:[F]}]},{type:n.NgZone}],EventManager}(),B=function(){function EventManagerPlugin(){}return EventManagerPlugin.prototype.supports=function(e){return!1},EventManagerPlugin.prototype.addEventListener=function(e,t,r){throw"not implemented"},EventManagerPlugin.prototype.addGlobalEventListener=function(e,t,r){throw"not implemented"},EventManagerPlugin}(),U=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},W=function(){function SharedStylesHost(){this._styles=[],this._stylesSet=new Set}return SharedStylesHost.prototype.addStyles=function(e){var t=this,r=[];e.forEach(function(e){t._stylesSet.has(e)||(t._stylesSet.add(e),t._styles.push(e),r.push(e))}),this.onStylesAdded(r)},SharedStylesHost.prototype.onStylesAdded=function(e){},SharedStylesHost.prototype.getAllStyles=function(){return this._styles},SharedStylesHost.decorators=[{type:n.Injectable}],SharedStylesHost.ctorParameters=[],SharedStylesHost}(),H=function(e){function DomSharedStylesHost(t){e.call(this),this._hostNodes=new Set,this._hostNodes.add(t.head)}return U(DomSharedStylesHost,e),DomSharedStylesHost.prototype._addStylesToHost=function(e,t){for(var r=0;r<e.length;r++){var n=e[r];getDOM().appendChild(t,getDOM().createStyleElement(n))}},DomSharedStylesHost.prototype.addHost=function(e){this._addStylesToHost(this._styles,e),this._hostNodes.add(e)},DomSharedStylesHost.prototype.removeHost=function(e){this._hostNodes.delete(e)},DomSharedStylesHost.prototype.onStylesAdded=function(e){var t=this;this._hostNodes.forEach(function(r){t._addStylesToHost(e,r)})},DomSharedStylesHost.decorators=[{type:n.Injectable}],DomSharedStylesHost.ctorParameters=[{type:void 0,decorators:[{type:n.Inject,args:[L]}]}],DomSharedStylesHost}(W),G=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},z={xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml"},q="template bindings={}",K=/^template bindings=(.*)$/,Q=function(){function DomRootRenderer(e,t,r,n){this.document=e,this.eventManager=t,this.sharedStylesHost=r,this.animationDriver=n,this.registeredComponents=new Map}return DomRootRenderer.prototype.renderComponent=function(e){var t=this.registeredComponents.get(e.id);return t||(t=new X(this,e,this.animationDriver),this.registeredComponents.set(e.id,t)),t},DomRootRenderer}(),Z=function(e){function DomRootRenderer_(t,r,n,i){e.call(this,t,r,n,i)}return G(DomRootRenderer_,e),DomRootRenderer_.decorators=[{type:n.Injectable}],DomRootRenderer_.ctorParameters=[{type:void 0,decorators:[{type:n.Inject,args:[L]}]},{type:j},{type:H},{type:u}],DomRootRenderer_}(Q),X=function(){function DomRenderer(e,t,r){this._rootRenderer=e,this.componentProto=t,this._animationDriver=r,this._styles=_flattenStyles(t.id,t.styles,[]),t.encapsulation!==n.ViewEncapsulation.Native&&this._rootRenderer.sharedStylesHost.addStyles(this._styles),this.componentProto.encapsulation===n.ViewEncapsulation.Emulated?(this._contentAttr=_shimContentAttribute(t.id),this._hostAttr=_shimHostAttribute(t.id)):(this._contentAttr=null,this._hostAttr=null)}return DomRenderer.prototype.selectRootElement=function(e,t){var r;if(isString(e)){if(r=getDOM().querySelector(this._rootRenderer.document,e),isBlank(r))throw new Error('The selector "'+e+'" did not match any elements')}else r=e;return getDOM().clearNodes(r),r},DomRenderer.prototype.createElement=function(e,t,r){var n=splitNamespace(t),i=isPresent(n[0])?getDOM().createElementNS(z[n[0]],n[1]):getDOM().createElement(n[1]);return isPresent(this._contentAttr)&&getDOM().setAttribute(i,this._contentAttr,""),isPresent(e)&&getDOM().appendChild(e,i),i},DomRenderer.prototype.createViewRoot=function(e){var t;if(this.componentProto.encapsulation===n.ViewEncapsulation.Native){t=getDOM().createShadowRoot(e),this._rootRenderer.sharedStylesHost.addHost(t);for(var r=0;r<this._styles.length;r++)getDOM().appendChild(t,getDOM().createStyleElement(this._styles[r]))}else isPresent(this._hostAttr)&&getDOM().setAttribute(e,this._hostAttr,""),t=e;return t},DomRenderer.prototype.createTemplateAnchor=function(e,t){var r=getDOM().createComment(q);return isPresent(e)&&getDOM().appendChild(e,r),r},DomRenderer.prototype.createText=function(e,t,r){var n=getDOM().createTextNode(t);return isPresent(e)&&getDOM().appendChild(e,n),n},DomRenderer.prototype.projectNodes=function(e,t){isBlank(e)||appendNodes(e,t)},DomRenderer.prototype.attachViewAfter=function(e,t){moveNodesAfterSibling(e,t)},DomRenderer.prototype.detachView=function(e){for(var t=0;t<e.length;t++)getDOM().remove(e[t])},DomRenderer.prototype.destroyView=function(e,t){this.componentProto.encapsulation===n.ViewEncapsulation.Native&&isPresent(e)&&this._rootRenderer.sharedStylesHost.removeHost(getDOM().getShadowRoot(e))},DomRenderer.prototype.listen=function(e,t,r){return this._rootRenderer.eventManager.addEventListener(e,t,decoratePreventDefault(r))},DomRenderer.prototype.listenGlobal=function(e,t,r){return this._rootRenderer.eventManager.addGlobalEventListener(e,t,decoratePreventDefault(r))},DomRenderer.prototype.setElementProperty=function(e,t,r){getDOM().setProperty(e,t,r)},DomRenderer.prototype.setElementAttribute=function(e,t,r){var n,i=splitNamespace(t);isPresent(i[0])&&(t=i[0]+":"+i[1],n=z[i[0]]),isPresent(r)?isPresent(n)?getDOM().setAttributeNS(e,n,t,r):getDOM().setAttribute(e,t,r):isPresent(n)?getDOM().removeAttributeNS(e,n,i[1]):getDOM().removeAttribute(e,t)},DomRenderer.prototype.setBindingDebugInfo=function(e,t,r){var n=camelCaseToDashCase(t);if(getDOM().isCommentNode(e)){var i=getDOM().getText(e).replace(/\n/g,"").match(K),o=h.parse(i[1]);o[n]=r,getDOM().setText(e,q.replace("{}",h.stringify(o)))}else this.setElementAttribute(e,t,r)},DomRenderer.prototype.setElementClass=function(e,t,r){r?getDOM().addClass(e,t):getDOM().removeClass(e,t)},DomRenderer.prototype.setElementStyle=function(e,t,r){isPresent(r)?getDOM().setStyle(e,t,stringify(r)):getDOM().removeStyle(e,t)},DomRenderer.prototype.invokeElementMethod=function(e,t,r){getDOM().invoke(e,t,r)},DomRenderer.prototype.setText=function(e,t){getDOM().setText(e,t)},DomRenderer.prototype.animate=function(e,t,r,n,i,o){return this._animationDriver.animate(e,t,r,n,i,o)},DomRenderer}(),$=/%COMP%/g,J="%COMP%",Y="_nghost-"+J,ee="_ngcontent-"+J,te=/^:([^:]+):(.+)$/,re={ApplicationRef:n.ApplicationRef,NgZone:n.NgZone},ne="ng.probe",ie="ng.coreTokens",oe=function(){function NgProbeToken(e,t){this.name=e,this.token=t}return NgProbeToken}(),se=[{provide:n.RootRenderer,useFactory:_createConditionalRootRenderer,deps:[Q,[oe,new n.Optional]]}],ae=([{provide:n.RootRenderer,useFactory:_createRootRenderer,deps:[Q,[oe,new n.Optional]]}],this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),ue=function(e){function DomEventsPlugin(){e.apply(this,arguments)}return ae(DomEventsPlugin,e),DomEventsPlugin.prototype.supports=function(e){return!0},DomEventsPlugin.prototype.addEventListener=function(e,t,r){var n=this.manager.getZone(),i=function(e){return n.runGuarded(function(){return r(e)})};return this.manager.getZone().runOutsideAngular(function(){return getDOM().onAndCancel(e,t,i)})},DomEventsPlugin.prototype.addGlobalEventListener=function(e,t,r){var n=getDOM().getGlobalEventTarget(e),i=this.manager.getZone(),o=function(e){return i.runGuarded(function(){return r(e)})};return this.manager.getZone().runOutsideAngular(function(){return getDOM().onAndCancel(n,t,o)})},DomEventsPlugin.decorators=[{type:n.Injectable}],DomEventsPlugin.ctorParameters=[],DomEventsPlugin}(B),le=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},ce={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},pe=function(e){function HammerGesturesPluginCommon(){e.call(this)}return le(HammerGesturesPluginCommon,e),HammerGesturesPluginCommon.prototype.supports=function(e){return ce.hasOwnProperty(e.toLowerCase())},HammerGesturesPluginCommon}(B),he=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},fe=new n.OpaqueToken("HammerGestureConfig"),de=function(){function HammerGestureConfig(){this.events=[],this.overrides={}}return HammerGestureConfig.prototype.buildHammer=function(e){var t=new Hammer(e);t.get("pinch").set({enable:!0}),t.get("rotate").set({enable:!0});for(var r in this.overrides)t.get(r).set(this.overrides[r]);return t},HammerGestureConfig.decorators=[{type:n.Injectable}],HammerGestureConfig.ctorParameters=[],HammerGestureConfig}(),me=function(e){function HammerGesturesPlugin(t){e.call(this),this._config=t}return he(HammerGesturesPlugin,e),HammerGesturesPlugin.prototype.supports=function(t){if(!e.prototype.supports.call(this,t)&&!this.isCustomEvent(t))return!1;if(!isPresent(window.Hammer))throw new Error("Hammer.js is not loaded, can not bind "+t+" event");return!0},HammerGesturesPlugin.prototype.addEventListener=function(e,t,r){var n=this,i=this.manager.getZone();return t=t.toLowerCase(),i.runOutsideAngular(function(){var o=n._config.buildHammer(e),s=function(e){i.runGuarded(function(){r(e)})};return o.on(t,s),function(){o.off(t,s)}})},HammerGesturesPlugin.prototype.isCustomEvent=function(e){return this._config.events.indexOf(e)>-1},HammerGesturesPlugin.decorators=[{type:n.Injectable}],HammerGesturesPlugin.ctorParameters=[{type:de,decorators:[{type:n.Inject,args:[fe]}]}],HammerGesturesPlugin}(pe),ye=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},ve=["alt","control","meta","shift"],ge={alt:function(e){return e.altKey},control:function(e){return e.ctrlKey},meta:function(e){return e.metaKey},shift:function(e){return e.shiftKey}},_e=function(e){function KeyEventsPlugin(){e.call(this)}return ye(KeyEventsPlugin,e),KeyEventsPlugin.prototype.supports=function(e){return isPresent(KeyEventsPlugin.parseEventName(e))},KeyEventsPlugin.prototype.addEventListener=function(e,t,r){var n=KeyEventsPlugin.parseEventName(t),i=KeyEventsPlugin.eventCallback(e,n.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return getDOM().onAndCancel(e,n.domEventName,i)})},KeyEventsPlugin.parseEventName=function(e){var t=e.toLowerCase().split("."),r=t.shift();if(0===t.length||"keydown"!==r&&"keyup"!==r)return null;var n=KeyEventsPlugin._normalizeKey(t.pop()),i="";if(ve.forEach(function(e){V.contains(t,e)&&(V.remove(t,e),i+=e+".")}),i+=n,0!=t.length||0===n.length)return null;var o={};return o.domEventName=r,o.fullKey=i,o},KeyEventsPlugin.getEventFullKey=function(e){var t="",r=getDOM().getEventKey(e);return r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),ve.forEach(function(n){if(n!=r){var i=ge[n];i(e)&&(t+=n+".")}}),t+=r},KeyEventsPlugin.eventCallback=function(e,t,r,n){return function(e){KeyEventsPlugin.getEventFullKey(e)===t&&n.runGuarded(function(){return r(e)})}},KeyEventsPlugin._normalizeKey=function(e){switch(e){case"esc":return"escape";default:return e}},KeyEventsPlugin.decorators=[{type:n.Injectable}],KeyEventsPlugin.ctorParameters=[],KeyEventsPlugin}(B),be=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:\/?#]*(?:[\/?#]|$))/gi,we=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i,Ee=null,Ce=null,Se=tagSet("area,br,col,hr,img,wbr"),Pe=tagSet("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Ae=tagSet("rp,rt"),xe=merge(Ae,Pe),Te=merge(Pe,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")),Me=merge(Ae,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")),Ie=merge(Se,Te,Me,xe),De=tagSet("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Ne=tagSet("srcset"),Oe=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"),Ve=merge(De,Ne,Oe),Re=function(){function SanitizingHtmlSerializer(){this.sanitizedSomething=!1,this.buf=[]}return SanitizingHtmlSerializer.prototype.sanitizeChildren=function(e){for(var t=e.firstChild;t;)if(Ce.isElementNode(t)?this.startElement(t):Ce.isTextNode(t)?this.chars(Ce.nodeValue(t)):this.sanitizedSomething=!0,Ce.firstChild(t))t=Ce.firstChild(t);else for(;t;){if(Ce.isElementNode(t)&&this.endElement(t),Ce.nextSibling(t)){t=Ce.nextSibling(t);break}t=Ce.parentElement(t)}return this.buf.join("")},SanitizingHtmlSerializer.prototype.startElement=function(e){var t=this,r=Ce.nodeName(e).toLowerCase();return Ie.hasOwnProperty(r)?(this.buf.push("<"),this.buf.push(r),Ce.attributeMap(e).forEach(function(e,r){var n=r.toLowerCase();return Ve.hasOwnProperty(n)?(De[n]&&(e=sanitizeUrl(e)),Ne[n]&&(e=sanitizeSrcset(e)),t.buf.push(" "),t.buf.push(r),t.buf.push('="'),t.buf.push(encodeEntities(e)),void t.buf.push('"')):void(t.sanitizedSomething=!0)}),void this.buf.push(">")):void(this.sanitizedSomething=!0)},SanitizingHtmlSerializer.prototype.endElement=function(e){var t=Ce.nodeName(e).toLowerCase();Ie.hasOwnProperty(t)&&!Se.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))},SanitizingHtmlSerializer.prototype.chars=function(e){this.buf.push(encodeEntities(e))},SanitizingHtmlSerializer}(),ke=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Le=/([^\#-~ |!])/g,Fe="[-,.\"'%_!# a-zA-Z0-9]+",je="(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?",Be="(?:rgb|hsl)a?",Ue="\\([-0-9.%, a-zA-Z]+\\)",We=new RegExp("^("+Fe+"|(?:"+je+"|"+Be+")"+Ue+")$","g"),He=/^url\(([^)]+)\)$/,Ge=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},ze=function(){function DomSanitizer(){}return DomSanitizer}(),qe=function(e){function DomSanitizerImpl(){e.apply(this,arguments)}return Ge(DomSanitizerImpl,e),DomSanitizerImpl.prototype.sanitize=function(e,t){if(null==t)return null;switch(e){case n.SecurityContext.NONE:return t;case n.SecurityContext.HTML:return t instanceof Qe?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"HTML"),sanitizeHtml(String(t)));case n.SecurityContext.STYLE:return t instanceof Ze?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"Style"),sanitizeStyle(t));case n.SecurityContext.SCRIPT:if(t instanceof Xe)return t.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(t,"Script"),new Error("unsafe value used in a script context");case n.SecurityContext.URL:return t instanceof Je||t instanceof $e?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"URL"),sanitizeUrl(String(t)));case n.SecurityContext.RESOURCE_URL:if(t instanceof Je)return t.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(t,"ResourceURL"),new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext "+e+" (see http://g.co/ng/security#xss)")}},DomSanitizerImpl.prototype.checkNotSafeValue=function(e,t){if(e instanceof Ke)throw new Error("Required a safe "+t+", got a "+e.getTypeName()+" (see http://g.co/ng/security#xss)")},DomSanitizerImpl.prototype.bypassSecurityTrustHtml=function(e){return new Qe(e)},DomSanitizerImpl.prototype.bypassSecurityTrustStyle=function(e){return new Ze(e)},DomSanitizerImpl.prototype.bypassSecurityTrustScript=function(e){return new Xe(e)},DomSanitizerImpl.prototype.bypassSecurityTrustUrl=function(e){return new $e(e)},DomSanitizerImpl.prototype.bypassSecurityTrustResourceUrl=function(e){return new Je(e)},DomSanitizerImpl.decorators=[{type:n.Injectable}],DomSanitizerImpl.ctorParameters=[],DomSanitizerImpl}(ze),Ke=function(){function SafeValueImpl(e){this.changingThisBreaksApplicationSecurity=e}return SafeValueImpl.prototype.toString=function(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"},SafeValueImpl}(),Qe=function(e){function SafeHtmlImpl(){e.apply(this,arguments)}return Ge(SafeHtmlImpl,e),SafeHtmlImpl.prototype.getTypeName=function(){return"HTML"},SafeHtmlImpl}(Ke),Ze=function(e){function SafeStyleImpl(){e.apply(this,arguments)}return Ge(SafeStyleImpl,e),SafeStyleImpl.prototype.getTypeName=function(){return"Style"},SafeStyleImpl}(Ke),Xe=function(e){function SafeScriptImpl(){e.apply(this,arguments);
}return Ge(SafeScriptImpl,e),SafeScriptImpl.prototype.getTypeName=function(){return"Script"},SafeScriptImpl}(Ke),$e=function(e){function SafeUrlImpl(){e.apply(this,arguments)}return Ge(SafeUrlImpl,e),SafeUrlImpl.prototype.getTypeName=function(){return"URL"},SafeUrlImpl}(Ke),Je=function(e){function SafeResourceUrlImpl(){e.apply(this,arguments)}return Ge(SafeResourceUrlImpl,e),SafeResourceUrlImpl.prototype.getTypeName=function(){return"ResourceURL"},SafeResourceUrlImpl}(Ke),Ye=[{provide:n.PLATFORM_INITIALIZER,useValue:initDomAdapter,multi:!0},{provide:r.PlatformLocation,useClass:N}],et=[{provide:n.Sanitizer,useExisting:ze},{provide:ze,useClass:qe}],tt=n.createPlatformFactory(n.platformCore,"browser",Ye),rt=function(){function BrowserModule(e){if(e)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.decorators=[{type:n.NgModule,args:[{providers:[et,{provide:n.ErrorHandler,useFactory:errorHandler,deps:[]},{provide:L,useFactory:_document,deps:[]},{provide:F,useClass:ue,multi:!0},{provide:F,useClass:_e,multi:!0},{provide:F,useClass:me,multi:!0},{provide:fe,useClass:de},{provide:Q,useClass:Z},{provide:n.RootRenderer,useExisting:Q},{provide:W,useExisting:H},{provide:u,useFactory:_resolveDefaultAnimationDriver},H,n.Testability,j,se,k],exports:[r.CommonModule,n.ApplicationModule]}]}],BrowserModule.ctorParameters=[{type:BrowserModule,decorators:[{type:n.Optional},{type:n.SkipSelf}]}],BrowserModule}(),nt="undefined"!=typeof window&&window||{},it=function(){function ChangeDetectionPerfRecord(e,t){this.msPerTick=e,this.numTicks=t}return ChangeDetectionPerfRecord}(),ot=function(){function AngularTools(e){this.profiler=new st(e)}return AngularTools}(),st=function(){function AngularProfiler(e){this.appRef=e.injector.get(n.ApplicationRef)}return AngularProfiler.prototype.timeChangeDetection=function(e){var t=isPresent(e)&&e.record,r="Change Detection",n=isPresent(nt.console.profile);t&&n&&nt.console.profile(r);for(var i=getDOM().performanceNow(),o=0;o<5||getDOM().performanceNow()-i<500;)this.appRef.tick(),o++;var s=getDOM().performanceNow();t&&n&&nt.console.profileEnd(r);var a=(s-i)/o;return nt.console.log("ran "+o+" change detection cycles"),nt.console.log(p.toFixed(a,2)+" ms per check"),new it(a,o)},AngularProfiler}(),at=l,ut=function(){function By(){}return By.all=function(){return function(e){return!0}},By.css=function(e){return function(t){return!!isPresent(t.nativeElement)&&getDOM().elementMatches(t.nativeElement,e)}},By.directive=function(e){return function(t){return t.providerTokens.indexOf(e)!==-1}},By}(),lt={BrowserPlatformLocation:N,DomAdapter:y,BrowserDomAdapter:M,BrowserGetTestability:R,getDOM:getDOM,setRootDomAdapter:setRootDomAdapter,DomRootRenderer_:Z,DomRootRenderer:Q,DomSharedStylesHost:H,SharedStylesHost:W,ELEMENT_PROBE_PROVIDERS:se,DomEventsPlugin:ue,KeyEventsPlugin:_e,HammerGesturesPlugin:me,initDomAdapter:initDomAdapter,INTERNAL_BROWSER_PLATFORM_PROVIDERS:Ye,BROWSER_SANITIZATION_PROVIDERS:et};t.BrowserModule=rt,t.platformBrowser=tt,t.Title=k,t.disableDebugTools=disableDebugTools,t.enableDebugTools=enableDebugTools,t.AnimationDriver=u,t.By=ut,t.NgProbeToken=oe,t.DOCUMENT=L,t.EVENT_MANAGER_PLUGINS=F,t.EventManager=j,t.HAMMER_GESTURE_CONFIG=fe,t.HammerGestureConfig=de,t.DomSanitizer=ze,t.__platform_browser_private__=lt})}).call(t,function(){return this}())},305:function(e,t,r){"use strict";var n=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=r(25),o=function(e){function InnerSubscriber(t,r,n){e.call(this),this.parent=t,this.outerValue=r,this.outerIndex=n,this.index=0}return n(InnerSubscriber,e),InnerSubscriber.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},InnerSubscriber.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},InnerSubscriber.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},InnerSubscriber}(i.Subscriber);t.InnerSubscriber=o},9:function(e,t,r){"use strict";var n=r(26),i=r(337),o=r(70),s=function(){function Observable(e){this._isScalar=!1,e&&(this._subscribe=e)}return Observable.prototype.lift=function(e){var t=new Observable;return t.source=this,t.operator=e,t},Observable.prototype.subscribe=function(e,t,r){var n=this.operator,o=i.toSubscriber(e,t,r);if(n?n.call(o,this):o.add(this._subscribe(o)),o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},Observable.prototype.forEach=function(e,t){var r=this;if(t||(n.root.Rx&&n.root.Rx.config&&n.root.Rx.config.Promise?t=n.root.Rx.config.Promise:n.root.Promise&&(t=n.root.Promise)),!t)throw new Error("no Promise impl found");return new t(function(t,n){var i=r.subscribe(function(t){if(i)try{e(t)}catch(r){n(r),i.unsubscribe()}else e(t)},n,t)})},Observable.prototype._subscribe=function(e){return this.source.subscribe(e)},Observable.prototype[o.$$observable]=function(){return this},Observable.create=function(e){return new Observable(e)},Observable}();t.Observable=s},307:function(e,t){"use strict";t.empty={closed:!0,next:function(e){},error:function(e){throw e},complete:function(){}}},308:function(e,t,r){"use strict";var n=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=r(25),o=function(e){function OuterSubscriber(){e.apply(this,arguments)}return n(OuterSubscriber,e),OuterSubscriber.prototype.notifyNext=function(e,t,r,n,i){this.destination.next(t)},OuterSubscriber.prototype.notifyError=function(e,t){this.destination.error(e)},OuterSubscriber.prototype.notifyComplete=function(e){this.destination.complete()},OuterSubscriber}(i.Subscriber);t.OuterSubscriber=o},124:function(e,t,r){"use strict";var n=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=r(9),o=r(25),s=r(57),a=r(332),u=r(310),l=r(71),c=function(e){function SubjectSubscriber(t){e.call(this,t),this.destination=t}return n(SubjectSubscriber,e),SubjectSubscriber}(o.Subscriber);t.SubjectSubscriber=c;var p=function(e){function Subject(){e.call(this),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}return n(Subject,e),Subject.prototype[l.$$rxSubscriber]=function(){return new c(this)},Subject.prototype.lift=function(e){var t=new h(this,this);return t.operator=e,t},Subject.prototype.next=function(e){if(this.closed)throw new a.ObjectUnsubscribedError;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),i=0;i<r;i++)n[i].next(e)},Subject.prototype.error=function(e){if(this.closed)throw new a.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),i=0;i<r;i++)n[i].error(e);this.observers.length=0},Subject.prototype.complete=function(){if(this.closed)throw new a.ObjectUnsubscribedError;this.isStopped=!0;for(var e=this.observers,t=e.length,r=e.slice(),n=0;n<t;n++)r[n].complete();this.observers.length=0},Subject.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},Subject.prototype._subscribe=function(e){if(this.closed)throw new a.ObjectUnsubscribedError;return this.hasError?(e.error(this.thrownError),s.Subscription.EMPTY):this.isStopped?(e.complete(),s.Subscription.EMPTY):(this.observers.push(e),new u.SubjectSubscription(this,e))},Subject.prototype.asObservable=function(){var e=new i.Observable;return e.source=this,e},Subject.create=function(e,t){return new h(e,t)},Subject}(i.Observable);t.Subject=p;var h=function(e){function AnonymousSubject(t,r){e.call(this),this.destination=t,this.source=r}return n(AnonymousSubject,e),AnonymousSubject.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},AnonymousSubject.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},AnonymousSubject.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},AnonymousSubject.prototype._subscribe=function(e){var t=this.source;return t?this.source.subscribe(e):s.Subscription.EMPTY},AnonymousSubject}(p);t.AnonymousSubject=h},310:function(e,t,r){"use strict";var n=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=r(57),o=function(e){function SubjectSubscription(t,r){e.call(this),this.subject=t,this.subscriber=r,this.closed=!1}return n(SubjectSubscription,e),SubjectSubscription.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var r=t.indexOf(this.subscriber);r!==-1&&t.splice(r,1)}}},SubjectSubscription}(i.Subscription);t.SubjectSubscription=o},25:function(e,t,r){"use strict";var n=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=r(131),o=r(57),s=r(307),a=r(71),u=function(e){function Subscriber(t,r,n){switch(e.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=s.empty;break;case 1:if(!t){this.destination=s.empty;break}if("object"==typeof t){t instanceof Subscriber?(this.destination=t,this.destination.add(this)):(this.syncErrorThrowable=!0,this.destination=new l(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new l(this,t,r,n)}}return n(Subscriber,e),Subscriber.prototype[a.$$rxSubscriber]=function(){return this},Subscriber.create=function(e,t,r){var n=new Subscriber(e,t,r);return n.syncErrorThrowable=!1,n},Subscriber.prototype.next=function(e){this.isStopped||this._next(e)},Subscriber.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},Subscriber.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},Subscriber.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},Subscriber.prototype._next=function(e){this.destination.next(e)},Subscriber.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},Subscriber.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},Subscriber}(o.Subscription);t.Subscriber=u;var l=function(e){function SafeSubscriber(t,r,n,o){e.call(this),this._parent=t;var s,a=this;i.isFunction(r)?s=r:r&&(a=r,s=r.next,n=r.error,o=r.complete,i.isFunction(a.unsubscribe)&&this.add(a.unsubscribe.bind(a)),a.unsubscribe=this.unsubscribe.bind(this)),this._context=a,this._next=s,this._error=n,this._complete=o}return n(SafeSubscriber,e),SafeSubscriber.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parent;t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},SafeSubscriber.prototype.error=function(e){if(!this.isStopped){var t=this._parent;if(this._error)t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else{if(!t.syncErrorThrowable)throw this.unsubscribe(),e;t.syncErrorValue=e,t.syncErrorThrown=!0,this.unsubscribe()}}},SafeSubscriber.prototype.complete=function(){if(!this.isStopped){var e=this._parent;this._complete?e.syncErrorThrowable?(this.__tryOrSetError(e,this._complete),this.unsubscribe()):(this.__tryOrUnsub(this._complete),this.unsubscribe()):this.unsubscribe()}},SafeSubscriber.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(r){throw this.unsubscribe(),r}},SafeSubscriber.prototype.__tryOrSetError=function(e,t,r){try{t.call(this._context,r)}catch(n){return e.syncErrorValue=n,e.syncErrorThrown=!0,!0}return!1},SafeSubscriber.prototype._unsubscribe=function(){var e=this._parent;this._context=null,this._parent=null,e.unsubscribe()},SafeSubscriber}(u)},57:function(e,t,r){"use strict";var n=r(72),i=r(334),o=r(131),s=r(338),a=r(130),u=r(333),l=function(){function Subscription(e){this.closed=!1,e&&(this._unsubscribe=e)}return Subscription.prototype.unsubscribe=function(){var e,t=!1;if(!this.closed){this.closed=!0;var r=this,l=r._unsubscribe,c=r._subscriptions;if(this._subscriptions=null,o.isFunction(l)){var p=s.tryCatch(l).call(this);p===a.errorObject&&(t=!0,(e=e||[]).push(a.errorObject.e))}if(n.isArray(c))for(var h=-1,f=c.length;++h<f;){var d=c[h];if(i.isObject(d)){var p=s.tryCatch(d.unsubscribe).call(d);if(p===a.errorObject){t=!0,e=e||[];var m=a.errorObject.e;m instanceof u.UnsubscriptionError?e=e.concat(m.errors):e.push(m)}}}if(t)throw new u.UnsubscriptionError(e)}},Subscription.prototype.add=function(e){if(!e||e===Subscription.EMPTY)return Subscription.EMPTY;if(e===this)return this;var t=e;switch(typeof e){case"function":t=new Subscription(e);case"object":if(t.closed||"function"!=typeof t.unsubscribe)break;this.closed?t.unsubscribe():(this._subscriptions||(this._subscriptions=[])).push(t);break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}return t},Subscription.prototype.remove=function(e){if(null!=e&&e!==this&&e!==Subscription.EMPTY){var t=this._subscriptions;if(t){var r=t.indexOf(e);r!==-1&&t.splice(r,1)}}},Subscription.EMPTY=function(e){return e.closed=!0,e}(new Subscription),Subscription}();t.Subscription=l},125:function(e,t,r){"use strict";var n=r(9),i=r(323);n.Observable.prototype.map=i.map},126:function(e,t,r){"use strict";var n=r(9),i=r(324);n.Observable.prototype.mergeMap=i.mergeMap,n.Observable.prototype.flatMap=i.mergeMap},128:function(e,t,r){"use strict";function dispatchNext(e){var t=e.value,r=e.subscriber;r.closed||(r.next(t),r.complete())}function dispatchError(e){var t=e.err,r=e.subscriber;r.closed||r.error(t)}var n=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=r(26),o=r(9),s=function(e){function PromiseObservable(t,r){e.call(this),this.promise=t,this.scheduler=r}return n(PromiseObservable,e),PromiseObservable.create=function(e,t){return new PromiseObservable(e,t)},PromiseObservable.prototype._subscribe=function(e){var t=this,r=this.promise,n=this.scheduler;if(null==n)this._isScalar?e.closed||(e.next(this.value),e.complete()):r.then(function(r){t.value=r,t._isScalar=!0,e.closed||(e.next(r),e.complete())},function(t){e.closed||e.error(t)}).then(null,function(e){i.root.setTimeout(function(){throw e})});else if(this._isScalar){if(!e.closed)return n.schedule(dispatchNext,0,{value:this.value,subscriber:e})}else r.then(function(r){t.value=r,t._isScalar=!0,e.closed||e.add(n.schedule(dispatchNext,0,{value:r,subscriber:e}))},function(t){e.closed||e.add(n.schedule(dispatchError,0,{err:t,subscriber:e}))}).then(null,function(e){i.root.setTimeout(function(){throw e})})},PromiseObservable}(o.Observable);t.PromiseObservable=s},320:function(e,t,r){"use strict";var n=r(128);t.fromPromise=n.PromiseObservable.create},323:function(e,t,r){"use strict";function map(e,t){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return this.lift(new o(e,t))}var n=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=r(25);t.map=map;var o=function(){function MapOperator(e,t){this.project=e,this.thisArg=t}return MapOperator.prototype.call=function(e,t){return t._subscribe(new s(e,this.project,this.thisArg))},MapOperator}();t.MapOperator=o;var s=function(e){function MapSubscriber(t,r,n){e.call(this,t),this.project=r,this.count=0,this.thisArg=n||this}return n(MapSubscriber,e),MapSubscriber.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(r){return void this.destination.error(r)}this.destination.next(t)},MapSubscriber}(i.Subscriber)},324:function(e,t,r){"use strict";function mergeMap(e,t,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"number"==typeof t&&(r=t,t=null),this.lift(new s(e,t,r))}var n=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},i=r(336),o=r(308);t.mergeMap=mergeMap;var s=function(){function MergeMapOperator(e,t,r){void 0===r&&(r=Number.POSITIVE_INFINITY),this.project=e,this.resultSelector=t,this.concurrent=r}return MergeMapOperator.prototype.call=function(e,t){return t._subscribe(new a(e,this.project,this.resultSelector,this.concurrent))},MergeMapOperator}();t.MergeMapOperator=s;var a=function(e){function MergeMapSubscriber(t,r,n,i){void 0===i&&(i=Number.POSITIVE_INFINITY),e.call(this,t),this.project=r,this.resultSelector=n,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return n(MergeMapSubscriber,e),MergeMapSubscriber.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},MergeMapSubscriber.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(n){return void this.destination.error(n)}this.active++,this._innerSub(t,e,r)},MergeMapSubscriber.prototype._innerSub=function(e,t,r){this.add(i.subscribeToResult(this,e,t,r))},MergeMapSubscriber.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},MergeMapSubscriber.prototype.notifyNext=function(e,t,r,n,i){this.resultSelector?this._notifyResultSelector(e,t,r,n):this.destination.next(t)},MergeMapSubscriber.prototype._notifyResultSelector=function(e,t,r,n){var i;try{i=this.resultSelector(e,t,r,n)}catch(o){return void this.destination.error(o)}this.destination.next(i)},MergeMapSubscriber.prototype.notifyComplete=function(e){var t=this.buffer;this.remove(e),this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},MergeMapSubscriber}(o.OuterSubscriber);t.MergeMapSubscriber=a},327:function(e,t,r){"use strict";function toPromise(e){var t=this;if(e||(n.root.Rx&&n.root.Rx.config&&n.root.Rx.config.Promise?e=n.root.Rx.config.Promise:n.root.Promise&&(e=n.root.Promise)),!e)throw new Error("no Promise impl found");return new e(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})}var n=r(26);t.toPromise=toPromise},69:function(e,t,r){"use strict";var n=r(26),i=n.root.Symbol;if("function"==typeof i)i.iterator?t.$$iterator=i.iterator:"function"==typeof i.for&&(t.$$iterator=i.for("iterator"));else if(n.root.Set&&"function"==typeof(new n.root.Set)["@@iterator"])t.$$iterator="@@iterator";else if(n.root.Map)for(var o=Object.getOwnPropertyNames(n.root.Map.prototype),s=0;s<o.length;++s){var a=o[s];if("entries"!==a&&"size"!==a&&n.root.Map.prototype[a]===n.root.Map.prototype.entries){t.$$iterator=a;break}}else t.$$iterator="@@iterator"},70:function(e,t,r){"use strict";function getSymbolObservable(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}var n=r(26);t.getSymbolObservable=getSymbolObservable,t.$$observable=getSymbolObservable(n.root)},71:function(e,t,r){"use strict";var n=r(26),i=n.root.Symbol;t.$$rxSubscriber="function"==typeof i&&"function"==typeof i.for?i.for("rxSubscriber"):"@@rxSubscriber"},332:function(e,t){"use strict";var r=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},n=function(e){function ObjectUnsubscribedError(){var t=e.call(this,"object unsubscribed");this.name=t.name="ObjectUnsubscribedError",this.stack=t.stack,this.message=t.message}return r(ObjectUnsubscribedError,e),ObjectUnsubscribedError}(Error);t.ObjectUnsubscribedError=n},333:function(e,t){"use strict";var r=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},n=function(e){function UnsubscriptionError(t){e.call(this),this.errors=t;var r=Error.call(this,t?t.length+" errors occurred during unsubscription:\n "+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"");this.name=r.name="UnsubscriptionError",this.stack=r.stack,this.message=r.message}return r(UnsubscriptionError,e),UnsubscriptionError}(Error);t.UnsubscriptionError=n},130:function(e,t){"use strict";t.errorObject={e:{}}},72:function(e,t){"use strict";t.isArray=Array.isArray||function(e){return e&&"number"==typeof e.length}},131:function(e,t){"use strict";function isFunction(e){return"function"==typeof e}t.isFunction=isFunction},334:function(e,t){"use strict";function isObject(e){return null!=e&&"object"==typeof e}t.isObject=isObject},132:function(e,t){"use strict";function isPromise(e){return e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}t.isPromise=isPromise},26:function(e,t){(function(e){"use strict";var r={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1};t.root=r[typeof self]&&self||r[typeof window]&&window;var n=r[typeof e]&&e;!n||n.global!==n&&n.window!==n||(t.root=n)}).call(t,function(){return this}())},336:function(e,t,r){"use strict";function subscribeToResult(e,t,r,c){var p=new u.InnerSubscriber(e,r,c);if(p.closed)return null;if(t instanceof s.Observable)return t._isScalar?(p.next(t.value),p.complete(),null):t.subscribe(p);if(i.isArray(t)){for(var h=0,f=t.length;h<f&&!p.closed;h++)p.next(t[h]);p.closed||p.complete()}else{if(o.isPromise(t))return t.then(function(e){p.closed||(p.next(e),p.complete())},function(e){return p.error(e)}).then(null,function(e){n.root.setTimeout(function(){throw e})}),p;if("function"==typeof t[a.$$iterator])for(var d=t[a.$$iterator]();;){var m=d.next();if(m.done){p.complete();break}if(p.next(m.value),p.closed)break}else if("function"==typeof t[l.$$observable]){var y=t[l.$$observable]();if("function"==typeof y.subscribe)return y.subscribe(new u.InnerSubscriber(e,r,c));p.error(new Error("invalid observable"))}else p.error(new TypeError("unknown type returned"))}return null}var n=r(26),i=r(72),o=r(132),s=r(9),a=r(69),u=r(305),l=r(70);t.subscribeToResult=subscribeToResult},337:function(e,t,r){"use strict";function toSubscriber(e,t,r){if(e){if(e instanceof n.Subscriber)return e;if(e[i.$$rxSubscriber])return e[i.$$rxSubscriber]()}return e||t||r?new n.Subscriber(e,t,r):new n.Subscriber}var n=r(25),i=r(71);t.toSubscriber=toSubscriber},338:function(e,t,r){"use strict";function tryCatcher(){try{return n.apply(this,arguments)}catch(e){return i.errorObject.e=e,i.errorObject}}function tryCatch(e){return n=e,tryCatcher}var n,i=r(130);t.tryCatch=tryCatch}});
//# sourceMappingURL=vendor.7412687088ecabc87d1c.bundle.map