@angular-eslint/eslint-plugin 1.0.1-alpha.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var e=require("@typescript-eslint/experimental-utils");function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(this,arguments)}const n=Object.keys;var s,r,i,a;!function(e){e.Component="Component",e.Directive="Directive",e.Injectable="Injectable",e.NgModule="NgModule",e.Pipe="Pipe"}(s||(s={})),function(e){e.Attribute="Attribute",e.Host="Host",e.Inject="Inject",e.Optional="Optional",e.Self="Self",e.SkipSelf="SkipSelf"}(r||(r={})),function(e){e.HostListener="HostListener"}(i||(i={})),function(e){e.ContentChild="ContentChild",e.ContentChildren="ContentChildren",e.HostBinding="HostBinding",e.Input="Input",e.Output="Output",e.ViewChild="ViewChild",e.ViewChildren="ViewChildren"}(a||(a={}));const o=t({},r,i,a);var l,c;!function(e){e.AfterContentChecked="AfterContentChecked",e.AfterContentInit="AfterContentInit",e.AfterViewChecked="AfterViewChecked",e.AfterViewInit="AfterViewInit",e.OnChanges="OnChanges",e.OnDestroy="OnDestroy",e.OnInit="OnInit",e.DoCheck="DoCheck"}(l||(l={})),function(e){e.ngAfterContentChecked="ngAfterContentChecked",e.ngAfterContentInit="ngAfterContentInit",e.ngAfterViewChecked="ngAfterViewChecked",e.ngAfterViewInit="ngAfterViewInit",e.ngOnChanges="ngOnChanges",e.ngOnDestroy="ngOnDestroy",e.ngOnInit="ngOnInit",e.ngDoCheck="ngDoCheck"}(c||(c={}));const u="camelCase",p="kebab-case",h=n(s),d=n(o),m=n(l),g=n(c),f=new Map([[s.Component,new Set(g)],[s.Directive,new Set(g)],[s.Injectable,new Set([c.ngOnDestroy])],[s.NgModule,new Set([])],[s.Pipe,new Set([c.ngOnDestroy])]]),v=new Set(d),y=new Set(h),x=new Map([[s.Component,v],[s.Directive,v],[s.Injectable,new Set([o.Host,o.Inject,o.Optional,o.Self,o.SkipSelf])],[s.NgModule,new Set([o.Host,o.Inject,o.Optional,o.Self,o.SkipSelf])],[s.Pipe,new Set([o.Host,o.Inject,o.Optional,o.Self,o.SkipSelf])]]);function S(e){return"CallExpression"===e.type}function E(e){return"Identifier"===e.type}function _(e){return"MemberExpression"===e.type}function C(e){return"ObjectExpression"===e.type}function w(e){return"ArrayExpression"===e.type}function b(e){return"Literal"===e.type}function I(e){return"TemplateLiteral"===e.type}function T(e){return"ImportDeclaration"===e.type}function N(e){return"ImportSpecifier"===e.type}function A(e){return"Literal"===e.type&&"string"==typeof e.value}function P(e){return"MethodDefinition"===e.type}const k=e=>function(e){return"ClassDeclaration"===e.type}(e)?e.id?e.id.name:void 0:e.parent?k(e.parent):void 0,O=e=>{const{expression:t}=e;return E(t)?t.name:S(t)&&E(t.callee)?t.callee.name:void 0},M=e=>{const{expression:t}=e;return _(t)?t.property.name:t.name},L=e=>e.implements||[],R=e=>L(e).map(M),D=e=>R(e).filter($),F=new Set(m),B=new Set(g),$=e=>F.has(e),V=e=>B.has(e),j=e=>y.has(e);function U(e){if("Identifier"===e.key.type)return e.key.name;if("Literal"===e.key.type)return e.key.raw;throw new Error('Unexpected "ClassProperty.key.type" provided: '+e.key.type)}const q=(e,t)=>{const n=(e=>{const{expression:t}=e;if(!S(t)||!t.arguments||0===t.arguments.length)return;const n=t.arguments[0];return C(n)&&n.properties?n:void 0})(e);if(!n||!C(n))return;const s=n.properties.find(e=>e.key&&E(e.key)&&e.key.name===t);return s&&"Property"===s.type?s:void 0},H=(e,t)=>{const n=q(e,t);if(n)return n.value},W=e=>e.body.body.filter(P),z=e=>b(e.key)?e.key.value:e.key.name,K=e=>e.slice(2);function X(e){return Array.isArray(e)?e:null!=e?[e]:[]}const G=e=>null!=e,Q={attribute:e=>0!==e.length,camelCase:e=>/^[a-zA-Z0-9\[\]]+$/.test(e),element:e=>null!==e,kebabCase:e=>/^[a-z0-9\-]+-[a-z0-9\-]+$/.test(e),prefix(e,t){const n=new RegExp(`^\\[?(${e})`);return s=>{if(!e)return!0;if(!n.test(s))return!1;const r=s.replace(n,"");if(t===u)return!r||r[0]===r[0].toUpperCase();if(t===p)return!r||"-"===r[0];throw Error("Invalid selector style!")}}};function Y(e,t){let n=e;for(;n=n.parent;)if("Program"===n.type)return n.body.some(n=>T(n)&&n.source.value===t&&n.specifiers.some(t=>N(t)&&t.imported.name===e.name&&t.local.name===e.name));return!1}const Z=e=>{const t=e.length;return 1===t?`"${e[0]}"`:`${e.map(e=>`"${e}"`).slice(0,t-1).join(", ")} or "${[...e].pop()}"`},J=e.ESLintUtils.RuleCreator(()=>"");var ee=J({name:"contextual-decorator",meta:{type:"suggestion",docs:{description:"Ensures that classes use contextual decorators in its body.",category:"Best Practices",recommended:!1},schema:[],messages:{contextualDecorator:'Decorator out of context for "@{{classDecoratorName}}()"'}},defaultOptions:[],create:e=>({"MethodDefinition[kind=/^(get|set|method)$/], ClassProperty, TSParameterProperty"(t){!function(e,t){var n;if(!(null==(n=t.decorators)?void 0:n.length))return;const s=function(e){for(;e.parent;){if("ClassDeclaration"===e.type)return e;e=e.parent}return null}(t);if(!s)return;const r=function(e){return(e.decorators||[]).map(O).filter(G).find(j)}(s);if(r)for(const n of t.decorators)te(e,n,r)}(e,t)}})});function te(e,t,n){const s=O(t);if(!s||!v.has(s))return;const r=x.get(n);r&&!r.has(s)&&e.report({node:t,messageId:"contextualDecorator",data:{classDecoratorName:n}})}const ne='ClassDeclaration > Decorator:matches([expression.callee.name="Component"], [expression.callee.name="Directive"])',se='ClassDeclaration > Decorator[expression.callee.name="Component"]',re='ClassDeclaration > Decorator[expression.callee.name="Directive"]',ie='ClassDeclaration > Decorator[expression.callee.name="Pipe"]';var ae=J({name:"component-class-suffix",meta:{type:"suggestion",docs:{description:'Classes decorated with @Component must have suffix "Component" (or custom) in their name. See more at https://angular.io/styleguide#style-02-03.',category:"Best Practices",recommended:"error"},schema:[{type:"object",properties:{suffixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{componentClassSuffix:"The name of the class {{className}} should end with the suffix {{suffixes}} (https://angular.io/styleguide#style-02-03)"}},defaultOptions:[{suffixes:["Component"]}],create(e,[t]){const{suffixes:n}=t;return{[se](t){const s=t.parent,r=k(s);r&&n.some(e=>r.endsWith(e))||e.report({node:s.id?s.id:s,messageId:"componentClassSuffix",data:{className:r,suffixes:n}})}}}});const oe="componentMaxInlineDeclarations",le=/\r\n|\r|\n/;function ce(e){return I(e)?e.quasis[0].value.raw.trim().split(le).length:b(e)?e.raw.trim().split(le).length:0}var ue,pe=J({name:"component-max-inline-declarations",meta:{type:"suggestion",docs:{description:"Disallows having too many lines in inline template and styles. Forces separate template or styles file creation.",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{template:{type:"number"},styles:{type:"number"},animations:{type:"number"}},additionalProperties:!1}],messages:{componentMaxInlineDeclarations:"Exceeds the maximum allowed inline lines for {{propertyType}}. Defined limit: {{definedLimit}} / total lines: {{totalLines}} (https://angular.io/guide/styleguide#style-05-04.)"}},defaultOptions:[{template:3,styles:3,animations:15}],create:(e,[{template:t=-1,styles:n=-1,animations:s=-1}])=>(t=t>-1?t:3,n=n>-1?n:3,s=s>-1?s:15,{[se](r){const i=H(r,"template");if(i){const n=ce(i);n>t&&e.report({node:i,messageId:oe,data:{propertyType:"template",definedLimit:t,totalLines:n}})}const a=H(r,"styles");if(a&&w(a)){const t=a.elements.reduce((e,t)=>e+ce(t),0);t>n&&e.report({node:a,messageId:oe,data:{propertyType:"styles",definedLimit:n,totalLines:t}})}const o=H(r,"animations");if(o&&w(o)){const t=o.elements.reduce((e,t)=>e+ce(t),0);t>s&&e.report({node:o,messageId:oe,data:{propertyType:"animations",definedLimit:s,totalLines:t}})}}})});function he(e){if(":"!=e[0])return[null,e];const t=e.indexOf(":",1);if(-1==t)throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);return[e.slice(1,t),e.slice(t+1)]}function de(e){return"ng-container"===he(e)[1]}function me(e){return"ng-content"===he(e)[1]}function ge(e){return null===e?null:he(e)[0]}function fe(e,t){return e?`:${e}:${t}`:t}!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"}(ue||(ue={}));const ve={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:"‌",ngsp:""};class ye{constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:n=ue.PARSABLE_DATA,closedByParent:s=!1,isVoid:r=!1,ignoreFirstLf:i=!1,preventNamespaceInheritance:a=!1}={}){this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,e&&e.length>0&&e.forEach(e=>this.closedByChildren[e]=!0),this.isVoid=r,this.closedByParent=s||r,this.implicitNamespacePrefix=t||null,this.contentType=n,this.ignoreFirstLf=i,this.preventNamespaceInheritance=a}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}}let xe,Se;function Ee(e){var t,n;return Se||(xe=new ye,Se={base:new ye({isVoid:!0}),meta:new ye({isVoid:!0}),area:new ye({isVoid:!0}),embed:new ye({isVoid:!0}),link:new ye({isVoid:!0}),img:new ye({isVoid:!0}),input:new ye({isVoid:!0}),param:new ye({isVoid:!0}),hr:new ye({isVoid:!0}),br:new ye({isVoid:!0}),source:new ye({isVoid:!0}),track:new ye({isVoid:!0}),wbr:new ye({isVoid:!0}),p:new ye({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 ye({closedByChildren:["tbody","tfoot"]}),tbody:new ye({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new ye({closedByChildren:["tbody"],closedByParent:!0}),tr:new ye({closedByChildren:["tr"],closedByParent:!0}),td:new ye({closedByChildren:["td","th"],closedByParent:!0}),th:new ye({closedByChildren:["td","th"],closedByParent:!0}),col:new ye({isVoid:!0}),svg:new ye({implicitNamespacePrefix:"svg"}),foreignObject:new ye({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new ye({implicitNamespacePrefix:"math"}),li:new ye({closedByChildren:["li"],closedByParent:!0}),dt:new ye({closedByChildren:["dt","dd"]}),dd:new ye({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new ye({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new ye({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new ye({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new ye({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new ye({closedByChildren:["optgroup"],closedByParent:!0}),option:new ye({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new ye({ignoreFirstLf:!0}),listing:new ye({ignoreFirstLf:!0}),style:new ye({contentType:ue.RAW_TEXT}),script:new ye({contentType:ue.RAW_TEXT}),title:new ye({contentType:ue.ESCAPABLE_RAW_TEXT}),textarea:new ye({contentType:ue.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),null!==(n=null!==(t=Se[e])&&void 0!==t?t:Se[e.toLowerCase()])&&void 0!==n?n:xe}const _e=new RegExp("(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*]+)(?:=([\"']?)([^\\]\"']*)\\5)?\\])|(\\))|(\\s*,\\s*)","g");class Ce{constructor(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}static parse(e){const t=[],n=(e,t)=>{t.notSelectors.length>0&&!t.element&&0==t.classNames.length&&0==t.attrs.length&&(t.element="*"),e.push(t)};let s,r=new Ce,i=r,a=!1;for(_e.lastIndex=0;s=_e.exec(e);){if(s[1]){if(a)throw new Error("Nesting :not in a selector is not allowed");a=!0,i=new Ce,r.notSelectors.push(i)}const e=s[2];if(e){const t=s[3];"#"===t?i.addAttribute("id",e.substr(1)):"."===t?i.addClassName(e.substr(1)):i.setElement(e)}const o=s[4];if(o&&i.addAttribute(o,s[6]),s[7]&&(a=!1,i=r),s[8]){if(a)throw new Error("Multiple selectors in :not are not supported");n(t,r),r=i=new Ce}}return n(t,r),t}isElementSelector(){return this.hasElementSelector()&&0==this.classNames.length&&0==this.attrs.length&&0===this.notSelectors.length}hasElementSelector(){return!!this.element}setElement(e=null){this.element=e}getMatchingElementTemplate(){const e=this.element||"div",t=this.classNames.length>0?` class="${this.classNames.join(" ")}"`:"";let n="";for(let e=0;e<this.attrs.length;e+=2)n+=` ${this.attrs[e]}${""!==this.attrs[e+1]?`="${this.attrs[e+1]}"`:""}`;return Ee(e).isVoid?`<${e}${t}${n}/>`:`<${e}${t}${n}></${e}>`}getAttrs(){const e=[];return this.classNames.length>0&&e.push("class",this.classNames.join(" ")),e.concat(this.attrs)}addAttribute(e,t=""){this.attrs.push(e,t&&t.toLowerCase()||"")}addClassName(e){this.classNames.push(e.toLowerCase())}toString(){let e=this.element||"";if(this.classNames&&this.classNames.forEach(t=>e+="."+t),this.attrs)for(let t=0;t<this.attrs.length;t+=2){const n=this.attrs[t+1];e+=`[${this.attrs[t]}${n?"="+n:""}]`}return this.notSelectors.forEach(t=>e+=`:not(${t})`),e}}class we{constructor(){this._elementMap=new Map,this._elementPartialMap=new Map,this._classMap=new Map,this._classPartialMap=new Map,this._attrValueMap=new Map,this._attrValuePartialMap=new Map,this._listContexts=[]}static createNotMatcher(e){const t=new we;return t.addSelectables(e,null),t}addSelectables(e,t){let n=null;e.length>1&&(n=new be(e),this._listContexts.push(n));for(let s=0;s<e.length;s++)this._addSelectable(e[s],t,n)}_addSelectable(e,t,n){let s=this;const r=e.element,i=e.classNames,a=e.attrs,o=new Ie(e,t,n);if(r&&(0===a.length&&0===i.length?this._addTerminal(s._elementMap,r,o):s=this._addPartial(s._elementPartialMap,r)),i)for(let e=0;e<i.length;e++){const t=i[e];0===a.length&&e===i.length-1?this._addTerminal(s._classMap,t,o):s=this._addPartial(s._classPartialMap,t)}if(a)for(let e=0;e<a.length;e+=2){const t=a[e],n=a[e+1];if(e===a.length-2){const e=s._attrValueMap;let r=e.get(t);r||(r=new Map,e.set(t,r)),this._addTerminal(r,n,o)}else{const e=s._attrValuePartialMap;let r=e.get(t);r||(r=new Map,e.set(t,r)),s=this._addPartial(r,n)}}}_addTerminal(e,t,n){let s=e.get(t);s||(s=[],e.set(t,s)),s.push(n)}_addPartial(e,t){let n=e.get(t);return n||(n=new we,e.set(t,n)),n}match(e,t){let n=!1;const s=e.element,r=e.classNames,i=e.attrs;for(let e=0;e<this._listContexts.length;e++)this._listContexts[e].alreadyMatched=!1;if(n=this._matchTerminal(this._elementMap,s,e,t)||n,n=this._matchPartial(this._elementPartialMap,s,e,t)||n,r)for(let s=0;s<r.length;s++){const i=r[s];n=this._matchTerminal(this._classMap,i,e,t)||n,n=this._matchPartial(this._classPartialMap,i,e,t)||n}if(i)for(let s=0;s<i.length;s+=2){const r=i[s],a=i[s+1],o=this._attrValueMap.get(r);a&&(n=this._matchTerminal(o,"",e,t)||n),n=this._matchTerminal(o,a,e,t)||n;const l=this._attrValuePartialMap.get(r);a&&(n=this._matchPartial(l,"",e,t)||n),n=this._matchPartial(l,a,e,t)||n}return n}_matchTerminal(e,t,n,s){if(!e||"string"!=typeof t)return!1;let r=e.get(t)||[];const i=e.get("*");if(i&&(r=r.concat(i)),0===r.length)return!1;let a,o=!1;for(let e=0;e<r.length;e++)a=r[e],o=a.finalize(n,s)||o;return o}_matchPartial(e,t,n,s){if(!e||"string"!=typeof t)return!1;const r=e.get(t);return!!r&&r.match(n,s)}}class be{constructor(e){this.selectors=e,this.alreadyMatched=!1}}class Ie{constructor(e,t,n){this.selector=e,this.cbContext=t,this.listContext=n,this.notSelectors=e.notSelectors}finalize(e,t){let n=!0;return!(this.notSelectors.length>0)||this.listContext&&this.listContext.alreadyMatched||(n=!we.createNotMatcher(this.notSelectors).match(e,null)),!n||!t||this.listContext&&this.listContext.alreadyMatched||(this.listContext&&(this.listContext.alreadyMatched=!0),t(this.selector,this.cbContext)),n}}var Te,Ne,Ae,Pe,ke,Oe;function Me(e){const t=function(e){const t=e.classNames&&e.classNames.length?[8,...e.classNames]:[];return[e.element&&"*"!==e.element?e.element:"",...e.attrs,...t]}(e),n=e.notSelectors&&e.notSelectors.length?e.notSelectors.map(e=>function(e){const t=e.classNames&&e.classNames.length?[8,...e.classNames]:[];return e.element?[5,e.element,...e.attrs,...t]:e.attrs.length?[3,...e.attrs,...t]:e.classNames&&e.classNames.length?[9,...e.classNames]:[]}(e)):[];return t.concat(...n)}function Le(e){return e?Ce.parse(e).map(Me):[]}!function(e){e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom"}(Te||(Te={})),function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"}(Ne||(Ne={})),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"}(Ae||(Ae={})),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Ignore=2]="Ignore"}(Pe||(Pe={})),function(e){e[e.Const=0]="Const"}(ke||(ke={}));class Re{constructor(e=[]){this.modifiers=e}hasModifier(e){return-1!==this.modifiers.indexOf(e)}}!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",e[e.Inferred=6]="Inferred",e[e.None=7]="None"}(Oe||(Oe={}));class De extends Re{constructor(e,t){super(t),this.name=e}visitType(e,t){return e.visitBuiltinType(this,t)}}class Fe extends Re{constructor(e,t,n=null){super(t),this.value=e,this.typeParams=n}visitType(e,t){return e.visitExpressionType(this,t)}}const Be=new De(Oe.Dynamic),$e=new De(Oe.Inferred),Ve=new De(Oe.Bool),je=(new De(Oe.Int),new De(Oe.Number)),Ue=new De(Oe.String),qe=(new De(Oe.Function),new De(Oe.None));var He,We,ze,Ke;function Xe(e,t){const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(!e[s].isEquivalent(t[s]))return!1;return!0}!function(e){e[e.Minus=0]="Minus",e[e.Plus=1]="Plus"}(He||(He={})),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.BitwiseAnd=11]="BitwiseAnd",e[e.Lower=12]="Lower",e[e.LowerEquals=13]="LowerEquals",e[e.Bigger=14]="Bigger",e[e.BiggerEquals=15]="BiggerEquals"}(We||(We={}));class Ge{constructor(e,t){this.type=e||null,this.sourceSpan=t||null}prop(e,t){return new Ct(this,e,null,t)}key(e,t,n){return new wt(this,e,t,n)}callMethod(e,t,n){return new nt(this,e,t,null,n)}callFn(e,t,n){return new st(this,e,null,t,n)}instantiate(e,t,n){return new rt(this,e,t,n)}conditional(e,t=null,n){return new gt(this,e,t,null,n)}equals(e,t){return new _t(We.Equals,this,e,null,t)}notEquals(e,t){return new _t(We.NotEquals,this,e,null,t)}identical(e,t){return new _t(We.Identical,this,e,null,t)}notIdentical(e,t){return new _t(We.NotIdentical,this,e,null,t)}minus(e,t){return new _t(We.Minus,this,e,null,t)}plus(e,t){return new _t(We.Plus,this,e,null,t)}divide(e,t){return new _t(We.Divide,this,e,null,t)}multiply(e,t){return new _t(We.Multiply,this,e,null,t)}modulo(e,t){return new _t(We.Modulo,this,e,null,t)}and(e,t){return new _t(We.And,this,e,null,t)}bitwiseAnd(e,t,n=!0){return new _t(We.BitwiseAnd,this,e,null,t,n)}or(e,t){return new _t(We.Or,this,e,null,t)}lower(e,t){return new _t(We.Lower,this,e,null,t)}lowerEquals(e,t){return new _t(We.LowerEquals,this,e,null,t)}bigger(e,t){return new _t(We.Bigger,this,e,null,t)}biggerEquals(e,t){return new _t(We.BiggerEquals,this,e,null,t)}isBlank(e){return this.equals(At,e)}cast(e,t){return new yt(this,e,t)}toStmt(){return new Rt(this,null)}}!function(e){e[e.This=0]="This",e[e.Super=1]="Super",e[e.CatchError=2]="CatchError",e[e.CatchStack=3]="CatchStack"}(ze||(ze={}));class Qe extends Ge{constructor(e,t,n){super(t,n),"string"==typeof e?(this.name=e,this.builtin=null):(this.name=null,this.builtin=e)}isEquivalent(e){return e instanceof Qe&&this.name===e.name&&this.builtin===e.builtin}isConstant(){return!1}visitExpression(e,t){return e.visitReadVarExpr(this,t)}set(e){if(!this.name)throw new Error(`Built in variable ${this.builtin} can not be assigned to.`);return new Je(this.name,e,null,this.sourceSpan)}}class Ye extends Ge{constructor(e,t,n){super(t,n),this.expr=e}visitExpression(e,t){return e.visitTypeofExpr(this,t)}isEquivalent(e){return e instanceof Ye&&e.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}}class Ze extends Ge{constructor(e,t,n){super(t,n),this.node=e}isEquivalent(e){return e instanceof Ze&&this.node===e.node}isConstant(){return!1}visitExpression(e,t){return e.visitWrappedNodeExpr(this,t)}}class Je extends Ge{constructor(e,t,n,s){super(n||t.type,s),this.name=e,this.value=t}isEquivalent(e){return e instanceof Je&&this.name===e.name&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitWriteVarExpr(this,t)}toDeclStmt(e,t){return new Mt(this.name,this.value,e,t,this.sourceSpan)}toConstDecl(){return this.toDeclStmt($e,[Pt.Final])}}class et extends Ge{constructor(e,t,n,s,r){super(s||n.type,r),this.receiver=e,this.index=t,this.value=n}isEquivalent(e){return e instanceof et&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitWriteKeyExpr(this,t)}}class tt extends Ge{constructor(e,t,n,s,r){super(s||n.type,r),this.receiver=e,this.name=t,this.value=n}isEquivalent(e){return e instanceof tt&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitWritePropExpr(this,t)}}!function(e){e[e.ConcatArray=0]="ConcatArray",e[e.SubscribeObservable=1]="SubscribeObservable",e[e.Bind=2]="Bind"}(Ke||(Ke={}));class nt extends Ge{constructor(e,t,n,s,r){super(s,r),this.receiver=e,this.args=n,"string"==typeof t?(this.name=t,this.builtin=null):(this.name=null,this.builtin=t)}isEquivalent(e){return e instanceof nt&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.builtin===e.builtin&&Xe(this.args,e.args)}isConstant(){return!1}visitExpression(e,t){return e.visitInvokeMethodExpr(this,t)}}class st extends Ge{constructor(e,t,n,s,r=!1){super(n,s),this.fn=e,this.args=t,this.pure=r}isEquivalent(e){return e instanceof st&&this.fn.isEquivalent(e.fn)&&Xe(this.args,e.args)&&this.pure===e.pure}isConstant(){return!1}visitExpression(e,t){return e.visitInvokeFunctionExpr(this,t)}}class rt extends Ge{constructor(e,t,n,s){super(n,s),this.classExpr=e,this.args=t}isEquivalent(e){return e instanceof rt&&this.classExpr.isEquivalent(e.classExpr)&&Xe(this.args,e.args)}isConstant(){return!1}visitExpression(e,t){return e.visitInstantiateExpr(this,t)}}class it extends Ge{constructor(e,t,n){super(t,n),this.value=e}isEquivalent(e){return e instanceof it&&this.value===e.value}isConstant(){return!0}visitExpression(e,t){return e.visitLiteralExpr(this,t)}}class at{constructor(e,t){this.text=e,this.sourceSpan=t}}class ot extends at{}class lt extends at{}class ct extends Ge{constructor(e,t,n,s,r){super(Ue,r),this.metaBlock=e,this.messageParts=t,this.placeHolderNames=n,this.expressions=s}isEquivalent(e){return!1}isConstant(){return!1}visitExpression(e,t){return e.visitLocalizedString(this,t)}serializeI18nHead(){let e=this.metaBlock.description||"";return this.metaBlock.meaning&&(e=`${this.metaBlock.meaning}|${e}`),this.metaBlock.customId&&(e=`${e}@@${this.metaBlock.customId}`),this.metaBlock.legacyIds&&this.metaBlock.legacyIds.forEach(t=>{e=`${e}␟${t}`}),dt(e,this.messageParts[0].text,this.getMessagePartSourceSpan(0))}getMessagePartSourceSpan(e){var t,n;return null!==(n=null===(t=this.messageParts[e])||void 0===t?void 0:t.sourceSpan)&&void 0!==n?n:this.sourceSpan}getPlaceholderSourceSpan(e){var t,n,s,r;return null!==(r=null!==(n=null===(t=this.placeHolderNames[e])||void 0===t?void 0:t.sourceSpan)&&void 0!==n?n:null===(s=this.expressions[e])||void 0===s?void 0:s.sourceSpan)&&void 0!==r?r:this.sourceSpan}serializeI18nTemplatePart(e){return dt(this.placeHolderNames[e-1].text,this.messageParts[e].text,this.getMessagePartSourceSpan(e))}}const ut=e=>e.replace(/\\/g,"\\\\"),pt=e=>e.replace(/:/g,"\\:"),ht=e=>e.replace(/`/g,"\\`").replace(/\${/g,"$\\{");function dt(e,t,n){return""===e?{cooked:t,raw:ht((s=ut(t),s.replace(/^:/,"\\:"))),range:n}:{cooked:`:${e}:${t}`,raw:ht(`:${pt(ut(e))}:${ut(t)}`),range:n};var s}class mt extends Ge{constructor(e,t,n=null,s){super(t,s),this.value=e,this.typeParams=n}isEquivalent(e){return e instanceof mt&&this.value.name===e.value.name&&this.value.moduleName===e.value.moduleName&&this.value.runtime===e.value.runtime}isConstant(){return!1}visitExpression(e,t){return e.visitExternalExpr(this,t)}}class gt extends Ge{constructor(e,t,n=null,s,r){super(s||t.type,r),this.condition=e,this.falseCase=n,this.trueCase=t}isEquivalent(e){return e instanceof gt&&this.condition.isEquivalent(e.condition)&&this.trueCase.isEquivalent(e.trueCase)&&(n=e.falseCase,null==(t=this.falseCase)||null==n?t==n:t.isEquivalent(n));var t,n}isConstant(){return!1}visitExpression(e,t){return e.visitConditionalExpr(this,t)}}class ft extends Ge{constructor(e,t){super(Ve,t),this.condition=e}isEquivalent(e){return e instanceof ft&&this.condition.isEquivalent(e.condition)}isConstant(){return!1}visitExpression(e,t){return e.visitNotExpr(this,t)}}class vt extends Ge{constructor(e,t){super(e.type,t),this.condition=e}isEquivalent(e){return e instanceof vt&&this.condition.isEquivalent(e.condition)}isConstant(){return!1}visitExpression(e,t){return e.visitAssertNotNullExpr(this,t)}}class yt extends Ge{constructor(e,t,n){super(t,n),this.value=e}isEquivalent(e){return e instanceof yt&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitCastExpr(this,t)}}class xt{constructor(e,t=null){this.name=e,this.type=t}isEquivalent(e){return this.name===e.name}}class St extends Ge{constructor(e,t,n,s,r){super(n,s),this.params=e,this.statements=t,this.name=r}isEquivalent(e){return e instanceof St&&Xe(this.params,e.params)&&Xe(this.statements,e.statements)}isConstant(){return!1}visitExpression(e,t){return e.visitFunctionExpr(this,t)}toDeclStmt(e,t){return new Lt(e,this.params,this.statements,this.type,t,this.sourceSpan)}}class Et extends Ge{constructor(e,t,n,s,r=!0){super(n||je,s),this.operator=e,this.expr=t,this.parens=r}isEquivalent(e){return e instanceof Et&&this.operator===e.operator&&this.expr.isEquivalent(e.expr)}isConstant(){return!1}visitExpression(e,t){return e.visitUnaryOperatorExpr(this,t)}}class _t extends Ge{constructor(e,t,n,s,r,i=!0){super(s||t.type,r),this.operator=e,this.rhs=n,this.parens=i,this.lhs=t}isEquivalent(e){return e instanceof _t&&this.operator===e.operator&&this.lhs.isEquivalent(e.lhs)&&this.rhs.isEquivalent(e.rhs)}isConstant(){return!1}visitExpression(e,t){return e.visitBinaryOperatorExpr(this,t)}}class Ct extends Ge{constructor(e,t,n,s){super(n,s),this.receiver=e,this.name=t}isEquivalent(e){return e instanceof Ct&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name}isConstant(){return!1}visitExpression(e,t){return e.visitReadPropExpr(this,t)}set(e){return new tt(this.receiver,this.name,e,null,this.sourceSpan)}}class wt extends Ge{constructor(e,t,n,s){super(n,s),this.receiver=e,this.index=t}isEquivalent(e){return e instanceof wt&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)}isConstant(){return!1}visitExpression(e,t){return e.visitReadKeyExpr(this,t)}set(e){return new et(this.receiver,this.index,e,null,this.sourceSpan)}}class bt extends Ge{constructor(e,t,n){super(t,n),this.entries=e}isConstant(){return this.entries.every(e=>e.isConstant())}isEquivalent(e){return e instanceof bt&&Xe(this.entries,e.entries)}visitExpression(e,t){return e.visitLiteralArrayExpr(this,t)}}class It{constructor(e,t,n){this.key=e,this.value=t,this.quoted=n}isEquivalent(e){return this.key===e.key&&this.value.isEquivalent(e.value)}}class Tt extends Ge{constructor(e,t,n){super(t,n),this.entries=e,this.valueType=null,t&&(this.valueType=t.valueType)}isEquivalent(e){return e instanceof Tt&&Xe(this.entries,e.entries)}isConstant(){return this.entries.every(e=>e.value.isConstant())}visitExpression(e,t){return e.visitLiteralMapExpr(this,t)}}new Qe(ze.This,null,null),new Qe(ze.Super,null,null),new Qe(ze.CatchError,null,null),new Qe(ze.CatchStack,null,null);const Nt=new it(null,null,null),At=new it(null,$e,null);var Pt;!function(e){e[e.Final=0]="Final",e[e.Private=1]="Private",e[e.Exported=2]="Exported",e[e.Static=3]="Static"}(Pt||(Pt={}));class kt extends class{constructor(e,t,n){this.text=e,this.multiline=t,this.trailingNewline=n}toString(){return this.multiline?` ${this.text} `:this.text}}{constructor(e){super("",!0,!0),this.tags=e}toString(){return function(e){if(0===e.length)return"";if(1===e.length&&e[0].tagName&&!e[0].text)return`*${Xt(e[0])} `;let t="*\n";for(const n of e)t+=" *",t+=Xt(n).replace(/\n/g,"\n * "),t+="\n";return t+=" ",t}(this.tags)}}class Ot{constructor(e=[],t=null,n){this.modifiers=e,this.sourceSpan=t,this.leadingComments=n}hasModifier(e){return-1!==this.modifiers.indexOf(e)}addLeadingComment(e){var t;this.leadingComments=null!==(t=this.leadingComments)&&void 0!==t?t:[],this.leadingComments.push(e)}}class Mt extends Ot{constructor(e,t,n,s,r,i){super(s,r,i),this.name=e,this.value=t,this.type=n||t&&t.type||null}isEquivalent(e){return e instanceof Mt&&this.name===e.name&&(this.value?!!e.value&&this.value.isEquivalent(e.value):!e.value)}visitStatement(e,t){return e.visitDeclareVarStmt(this,t)}}class Lt extends Ot{constructor(e,t,n,s,r,i,a){super(r,i,a),this.name=e,this.params=t,this.statements=n,this.type=s||null}isEquivalent(e){return e instanceof Lt&&Xe(this.params,e.params)&&Xe(this.statements,e.statements)}visitStatement(e,t){return e.visitDeclareFunctionStmt(this,t)}}class Rt extends Ot{constructor(e,t,n){super([],t,n),this.expr=e}isEquivalent(e){return e instanceof Rt&&this.expr.isEquivalent(e.expr)}visitStatement(e,t){return e.visitExpressionStmt(this,t)}}class Dt extends Ot{constructor(e,t=null,n){super([],t,n),this.value=e}isEquivalent(e){return e instanceof Dt&&this.value.isEquivalent(e.value)}visitStatement(e,t){return e.visitReturnStmt(this,t)}}class Ft extends Ot{constructor(e,t,n=[],s,r){super([],s,r),this.condition=e,this.trueCase=t,this.falseCase=n}isEquivalent(e){return e instanceof Ft&&this.condition.isEquivalent(e.condition)&&Xe(this.trueCase,e.trueCase)&&Xe(this.falseCase,e.falseCase)}visitStatement(e,t){return e.visitIfStmt(this,t)}}function Bt(e,t,n){return new Qe(e,t,n)}function $t(e,t=null,n){return new mt(e,null,t,n)}function Vt(e,t,n){return new Fe(e,t,n)}function jt(e){return new Ye(e)}function Ut(e,t,n){return new bt(e,t,n)}function qt(e,t=null){return new Tt(e.map(e=>new It(e.key,e.value,e.quoted)),t,null)}function Ht(e,t,n,s,r){return new St(e,t,n,s,r)}function Wt(e,t,n,s,r){return new Ft(e,t,n,s,r)}function zt(e,t,n){return new it(e,t,n)}function Kt(e){return e instanceof it&&null===e.value}function Xt(e){let t="";if(e.tagName&&(t+=" @"+e.tagName),e.text){if(e.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');t+=" "+e.text.replace(/@/g,"\\@")}return t}const Gt=/-+([a-z0-9])/g;function Qt(e,t){return Yt(e,":",t)}function Yt(e,t,n){const s=e.indexOf(t);return-1==s?n:[e.slice(0,s).trim(),e.slice(s+1).trim()]}function Zt(e){throw new Error("Internal Error: "+e)}function Jt(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function en(e){let t="";for(let n=0;n<e.length;n++){let s=e.charCodeAt(n);if(s>=55296&&s<=56319&&e.length>n+1){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(n++,s=(s-55296<<10)+t-56320+65536)}s<=127?t+=String.fromCharCode(s):s<=2047?t+=String.fromCharCode(s>>6&31|192,63&s|128):s<=65535?t+=String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128):s<=2097151&&(t+=String.fromCharCode(s>>18&7|240,s>>12&63|128,s>>6&63|128,63&s|128))}return t}function tn(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(tn).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;if(!e.toString)return"object";const t=e.toString();if(null==t)return""+t;const n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}const nn="undefined"!=typeof window&&window,sn="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,rn="undefined"!=typeof global&&global||nn||sn,an=Bt("<unknown>"),on={};class ln extends Ge{constructor(e){super(e.type),this.resolved=e,this.original=e}visitExpression(e,t){return t===on?this.original.visitExpression(e,t):this.resolved.visitExpression(e,t)}isEquivalent(e){return e instanceof ln&&this.resolved.isEquivalent(e.resolved)}isConstant(){return!0}fixup(e){this.resolved=e,this.shared=!0}}class cn{constructor(e=!1){this.isClosureCompilerEnabled=e,this.statements=[],this.literals=new Map,this.literalFactories=new Map,this.injectorDefinitions=new Map,this.directiveDefinitions=new Map,this.componentDefinitions=new Map,this.pipeDefinitions=new Map,this.nextNameIndex=0}getConstLiteral(e,t){if(e instanceof it&&!dn(e)||e instanceof ln)return e;const n=this.keyOf(e);let s=this.literals.get(n),r=!1;if(s||(s=new ln(e),this.literals.set(n,s),r=!0),!r&&!s.shared||r&&t){const t=this.freshName();let n,r;this.isClosureCompilerEnabled&&dn(e)?(n=Bt(t).set(new St([],[new Dt(e)])),r=Bt(t).callFn([])):(n=Bt(t).set(e),r=Bt(t)),this.statements.push(n.toDeclStmt($e,[Pt.Final])),s.fixup(r)}return s}getDefinition(e,t,n,s=!1){const r=this.definitionsOf(t);let i=r.get(e),a=!1;if(!i){const s=this.propertyNameOf(t);i=new ln(n.importExpr(e).prop(s)),r.set(e,i),a=!0}if(!a&&!i.shared||a&&s){const e=this.freshName();this.statements.push(Bt(e).set(i.resolved).toDeclStmt($e,[Pt.Final])),i.fixup(Bt(e))}return i}getLiteralFactory(e){if(e instanceof bt){const t=e.entries.map(e=>e.isConstant()?e:an),n=this.keyOf(Ut(t));return this._getLiteralFactory(n,e.entries,e=>Ut(e))}{const t=qt(e.entries.map(e=>({key:e.key,value:e.value.isConstant()?e.value:an,quoted:e.quoted}))),n=this.keyOf(t);return this._getLiteralFactory(n,e.entries.map(e=>e.value),t=>qt(t.map((t,n)=>({key:e.entries[n].key,value:t,quoted:e.entries[n].quoted}))))}}_getLiteralFactory(e,t,n){let s=this.literalFactories.get(e);const r=t.filter(e=>!e.isConstant());if(!s){const r=t.map((e,t)=>e.isConstant()?this.getConstLiteral(e,!0):Bt("a"+t)),i=Ht(r.filter(hn).map(e=>new xt(e.name,Be)),[new Dt(n(r))],$e),a=this.freshName();this.statements.push(Bt(a).set(i).toDeclStmt($e,[Pt.Final])),s=Bt(a),this.literalFactories.set(e,s)}return{literalFactory:s,literalFactoryArguments:r}}uniqueName(e){return`${e}${this.nextNameIndex++}`}definitionsOf(e){switch(e){case 2:return this.componentDefinitions;case 1:return this.directiveDefinitions;case 0:return this.injectorDefinitions;case 3:return this.pipeDefinitions}return Zt("Unknown definition kind "+e),this.componentDefinitions}propertyNameOf(e){switch(e){case 2:return"ɵcmp";case 1:return"ɵdir";case 0:return"ɵinj";case 3:return"ɵpipe"}return Zt("Unknown definition kind "+e),"<unknown>"}freshName(){return this.uniqueName("_c")}keyOf(e){return e.visitExpression(new un,on)}}class un{constructor(){this.visitWrappedNodeExpr=pn,this.visitWriteVarExpr=pn,this.visitWriteKeyExpr=pn,this.visitWritePropExpr=pn,this.visitInvokeMethodExpr=pn,this.visitInvokeFunctionExpr=pn,this.visitInstantiateExpr=pn,this.visitConditionalExpr=pn,this.visitNotExpr=pn,this.visitAssertNotNullExpr=pn,this.visitCastExpr=pn,this.visitFunctionExpr=pn,this.visitUnaryOperatorExpr=pn,this.visitBinaryOperatorExpr=pn,this.visitReadPropExpr=pn,this.visitReadKeyExpr=pn,this.visitCommaExpr=pn,this.visitLocalizedString=pn}visitLiteralExpr(e){return""+("string"==typeof e.value?'"'+e.value+'"':e.value)}visitLiteralArrayExpr(e,t){return`[${e.entries.map(e=>e.visitExpression(this,t)).join(",")}]`}visitLiteralMapExpr(e,t){return"{"+e.entries.map(e=>`${(e=>{const t=e.quoted?'"':"";return`${t}${e.key}${t}`})(e)}:${e.value.visitExpression(this,t)}`).join(",")}visitExternalExpr(e){return e.value.moduleName?`EX:${e.value.moduleName}:${e.value.name}`:"EX:"+e.value.runtime.name}visitReadVarExpr(e){return"VAR:"+e.name}visitTypeofExpr(e,t){return"TYPEOF:"+e.expr.visitExpression(this,t)}}function pn(e){throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${e.constructor.name}`)}function hn(e){return e instanceof Qe}function dn(e){return e instanceof it&&"string"==typeof e.value&&e.value.length>=50}const mn="@angular/core";class gn{}function fn(e){return e.replace(/\W/g,"_")}gn.ANALYZE_FOR_ENTRY_COMPONENTS={name:"ANALYZE_FOR_ENTRY_COMPONENTS",moduleName:mn},gn.ElementRef={name:"ElementRef",moduleName:mn},gn.NgModuleRef={name:"NgModuleRef",moduleName:mn},gn.ViewContainerRef={name:"ViewContainerRef",moduleName:mn},gn.ChangeDetectorRef={name:"ChangeDetectorRef",moduleName:mn},gn.QueryList={name:"QueryList",moduleName:mn},gn.TemplateRef={name:"TemplateRef",moduleName:mn},gn.Renderer2={name:"Renderer2",moduleName:mn},gn.CodegenComponentFactoryResolver={name:"ɵCodegenComponentFactoryResolver",moduleName:mn},gn.ComponentFactoryResolver={name:"ComponentFactoryResolver",moduleName:mn},gn.ComponentFactory={name:"ComponentFactory",moduleName:mn},gn.ComponentRef={name:"ComponentRef",moduleName:mn},gn.NgModuleFactory={name:"NgModuleFactory",moduleName:mn},gn.createModuleFactory={name:"ɵcmf",moduleName:mn},gn.moduleDef={name:"ɵmod",moduleName:mn},gn.moduleProviderDef={name:"ɵmpd",moduleName:mn},gn.RegisterModuleFactoryFn={name:"ɵregisterModuleFactory",moduleName:mn},gn.inject={name:"ɵɵinject",moduleName:mn},gn.directiveInject={name:"ɵɵdirectiveInject",moduleName:mn},gn.INJECTOR={name:"INJECTOR",moduleName:mn},gn.Injector={name:"Injector",moduleName:mn},gn.ɵɵdefineInjectable={name:"ɵɵdefineInjectable",moduleName:mn},gn.InjectableDef={name:"ɵɵInjectableDef",moduleName:mn},gn.ViewEncapsulation={name:"ViewEncapsulation",moduleName:mn},gn.ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:mn},gn.SecurityContext={name:"SecurityContext",moduleName:mn},gn.LOCALE_ID={name:"LOCALE_ID",moduleName:mn},gn.TRANSLATIONS_FORMAT={name:"TRANSLATIONS_FORMAT",moduleName:mn},gn.inlineInterpolate={name:"ɵinlineInterpolate",moduleName:mn},gn.interpolate={name:"ɵinterpolate",moduleName:mn},gn.EMPTY_ARRAY={name:"ɵEMPTY_ARRAY",moduleName:mn},gn.EMPTY_MAP={name:"ɵEMPTY_MAP",moduleName:mn},gn.Renderer={name:"Renderer",moduleName:mn},gn.viewDef={name:"ɵvid",moduleName:mn},gn.elementDef={name:"ɵeld",moduleName:mn},gn.anchorDef={name:"ɵand",moduleName:mn},gn.textDef={name:"ɵted",moduleName:mn},gn.directiveDef={name:"ɵdid",moduleName:mn},gn.providerDef={name:"ɵprd",moduleName:mn},gn.queryDef={name:"ɵqud",moduleName:mn},gn.pureArrayDef={name:"ɵpad",moduleName:mn},gn.pureObjectDef={name:"ɵpod",moduleName:mn},gn.purePipeDef={name:"ɵppd",moduleName:mn},gn.pipeDef={name:"ɵpid",moduleName:mn},gn.nodeValue={name:"ɵnov",moduleName:mn},gn.ngContentDef={name:"ɵncd",moduleName:mn},gn.unwrapValue={name:"ɵunv",moduleName:mn},gn.createRendererType2={name:"ɵcrt",moduleName:mn},gn.RendererType2={name:"RendererType2",moduleName:mn},gn.ViewDefinition={name:"ɵViewDefinition",moduleName:mn},gn.createComponentFactory={name:"ɵccf",moduleName:mn},gn.setClassMetadata={name:"ɵsetClassMetadata",moduleName:mn};let vn=0;var yn;!function(e){e[e.Pipe=0]="Pipe",e[e.Directive=1]="Directive",e[e.NgModule=2]="NgModule",e[e.Injectable=3]="Injectable"}(yn||(yn={}));const xn="@angular/core";class Sn{}function En(e){return qt(Object.keys(e).map(t=>({key:t,value:e[t],quoted:!1})))}function _n(e,t){if(0===t)return Vt(e);const n=[];for(let e=0;e<t;e++)n.push(Be);return Vt(e,void 0,n)}function Cn(e){return"@"+e}function wn(e,t){return`animation_${e}_${t}`}Sn.NEW_METHOD="factory",Sn.TRANSFORM_METHOD="transform",Sn.PATCH_DEPS="patchedDeps",Sn.namespaceHTML={name:"ɵɵnamespaceHTML",moduleName:xn},Sn.namespaceMathML={name:"ɵɵnamespaceMathML",moduleName:xn},Sn.namespaceSVG={name:"ɵɵnamespaceSVG",moduleName:xn},Sn.element={name:"ɵɵelement",moduleName:xn},Sn.elementStart={name:"ɵɵelementStart",moduleName:xn},Sn.elementEnd={name:"ɵɵelementEnd",moduleName:xn},Sn.advance={name:"ɵɵadvance",moduleName:xn},Sn.syntheticHostProperty={name:"ɵɵsyntheticHostProperty",moduleName:xn},Sn.syntheticHostListener={name:"ɵɵsyntheticHostListener",moduleName:xn},Sn.attribute={name:"ɵɵattribute",moduleName:xn},Sn.attributeInterpolate1={name:"ɵɵattributeInterpolate1",moduleName:xn},Sn.attributeInterpolate2={name:"ɵɵattributeInterpolate2",moduleName:xn},Sn.attributeInterpolate3={name:"ɵɵattributeInterpolate3",moduleName:xn},Sn.attributeInterpolate4={name:"ɵɵattributeInterpolate4",moduleName:xn},Sn.attributeInterpolate5={name:"ɵɵattributeInterpolate5",moduleName:xn},Sn.attributeInterpolate6={name:"ɵɵattributeInterpolate6",moduleName:xn},Sn.attributeInterpolate7={name:"ɵɵattributeInterpolate7",moduleName:xn},Sn.attributeInterpolate8={name:"ɵɵattributeInterpolate8",moduleName:xn},Sn.attributeInterpolateV={name:"ɵɵattributeInterpolateV",moduleName:xn},Sn.classProp={name:"ɵɵclassProp",moduleName:xn},Sn.elementContainerStart={name:"ɵɵelementContainerStart",moduleName:xn},Sn.elementContainerEnd={name:"ɵɵelementContainerEnd",moduleName:xn},Sn.elementContainer={name:"ɵɵelementContainer",moduleName:xn},Sn.styleMap={name:"ɵɵstyleMap",moduleName:xn},Sn.styleMapInterpolate1={name:"ɵɵstyleMapInterpolate1",moduleName:xn},Sn.styleMapInterpolate2={name:"ɵɵstyleMapInterpolate2",moduleName:xn},Sn.styleMapInterpolate3={name:"ɵɵstyleMapInterpolate3",moduleName:xn},Sn.styleMapInterpolate4={name:"ɵɵstyleMapInterpolate4",moduleName:xn},Sn.styleMapInterpolate5={name:"ɵɵstyleMapInterpolate5",moduleName:xn},Sn.styleMapInterpolate6={name:"ɵɵstyleMapInterpolate6",moduleName:xn},Sn.styleMapInterpolate7={name:"ɵɵstyleMapInterpolate7",moduleName:xn},Sn.styleMapInterpolate8={name:"ɵɵstyleMapInterpolate8",moduleName:xn},Sn.styleMapInterpolateV={name:"ɵɵstyleMapInterpolateV",moduleName:xn},Sn.classMap={name:"ɵɵclassMap",moduleName:xn},Sn.classMapInterpolate1={name:"ɵɵclassMapInterpolate1",moduleName:xn},Sn.classMapInterpolate2={name:"ɵɵclassMapInterpolate2",moduleName:xn},Sn.classMapInterpolate3={name:"ɵɵclassMapInterpolate3",moduleName:xn},Sn.classMapInterpolate4={name:"ɵɵclassMapInterpolate4",moduleName:xn},Sn.classMapInterpolate5={name:"ɵɵclassMapInterpolate5",moduleName:xn},Sn.classMapInterpolate6={name:"ɵɵclassMapInterpolate6",moduleName:xn},Sn.classMapInterpolate7={name:"ɵɵclassMapInterpolate7",moduleName:xn},Sn.classMapInterpolate8={name:"ɵɵclassMapInterpolate8",moduleName:xn},Sn.classMapInterpolateV={name:"ɵɵclassMapInterpolateV",moduleName:xn},Sn.styleProp={name:"ɵɵstyleProp",moduleName:xn},Sn.stylePropInterpolate1={name:"ɵɵstylePropInterpolate1",moduleName:xn},Sn.stylePropInterpolate2={name:"ɵɵstylePropInterpolate2",moduleName:xn},Sn.stylePropInterpolate3={name:"ɵɵstylePropInterpolate3",moduleName:xn},Sn.stylePropInterpolate4={name:"ɵɵstylePropInterpolate4",moduleName:xn},Sn.stylePropInterpolate5={name:"ɵɵstylePropInterpolate5",moduleName:xn},Sn.stylePropInterpolate6={name:"ɵɵstylePropInterpolate6",moduleName:xn},Sn.stylePropInterpolate7={name:"ɵɵstylePropInterpolate7",moduleName:xn},Sn.stylePropInterpolate8={name:"ɵɵstylePropInterpolate8",moduleName:xn},Sn.stylePropInterpolateV={name:"ɵɵstylePropInterpolateV",moduleName:xn},Sn.nextContext={name:"ɵɵnextContext",moduleName:xn},Sn.templateCreate={name:"ɵɵtemplate",moduleName:xn},Sn.text={name:"ɵɵtext",moduleName:xn},Sn.enableBindings={name:"ɵɵenableBindings",moduleName:xn},Sn.disableBindings={name:"ɵɵdisableBindings",moduleName:xn},Sn.getCurrentView={name:"ɵɵgetCurrentView",moduleName:xn},Sn.textInterpolate={name:"ɵɵtextInterpolate",moduleName:xn},Sn.textInterpolate1={name:"ɵɵtextInterpolate1",moduleName:xn},Sn.textInterpolate2={name:"ɵɵtextInterpolate2",moduleName:xn},Sn.textInterpolate3={name:"ɵɵtextInterpolate3",moduleName:xn},Sn.textInterpolate4={name:"ɵɵtextInterpolate4",moduleName:xn},Sn.textInterpolate5={name:"ɵɵtextInterpolate5",moduleName:xn},Sn.textInterpolate6={name:"ɵɵtextInterpolate6",moduleName:xn},Sn.textInterpolate7={name:"ɵɵtextInterpolate7",moduleName:xn},Sn.textInterpolate8={name:"ɵɵtextInterpolate8",moduleName:xn},Sn.textInterpolateV={name:"ɵɵtextInterpolateV",moduleName:xn},Sn.restoreView={name:"ɵɵrestoreView",moduleName:xn},Sn.pureFunction0={name:"ɵɵpureFunction0",moduleName:xn},Sn.pureFunction1={name:"ɵɵpureFunction1",moduleName:xn},Sn.pureFunction2={name:"ɵɵpureFunction2",moduleName:xn},Sn.pureFunction3={name:"ɵɵpureFunction3",moduleName:xn},Sn.pureFunction4={name:"ɵɵpureFunction4",moduleName:xn},Sn.pureFunction5={name:"ɵɵpureFunction5",moduleName:xn},Sn.pureFunction6={name:"ɵɵpureFunction6",moduleName:xn},Sn.pureFunction7={name:"ɵɵpureFunction7",moduleName:xn},Sn.pureFunction8={name:"ɵɵpureFunction8",moduleName:xn},Sn.pureFunctionV={name:"ɵɵpureFunctionV",moduleName:xn},Sn.pipeBind1={name:"ɵɵpipeBind1",moduleName:xn},Sn.pipeBind2={name:"ɵɵpipeBind2",moduleName:xn},Sn.pipeBind3={name:"ɵɵpipeBind3",moduleName:xn},Sn.pipeBind4={name:"ɵɵpipeBind4",moduleName:xn},Sn.pipeBindV={name:"ɵɵpipeBindV",moduleName:xn},Sn.hostProperty={name:"ɵɵhostProperty",moduleName:xn},Sn.property={name:"ɵɵproperty",moduleName:xn},Sn.propertyInterpolate={name:"ɵɵpropertyInterpolate",moduleName:xn},Sn.propertyInterpolate1={name:"ɵɵpropertyInterpolate1",moduleName:xn},Sn.propertyInterpolate2={name:"ɵɵpropertyInterpolate2",moduleName:xn},Sn.propertyInterpolate3={name:"ɵɵpropertyInterpolate3",moduleName:xn},Sn.propertyInterpolate4={name:"ɵɵpropertyInterpolate4",moduleName:xn},Sn.propertyInterpolate5={name:"ɵɵpropertyInterpolate5",moduleName:xn},Sn.propertyInterpolate6={name:"ɵɵpropertyInterpolate6",moduleName:xn},Sn.propertyInterpolate7={name:"ɵɵpropertyInterpolate7",moduleName:xn},Sn.propertyInterpolate8={name:"ɵɵpropertyInterpolate8",moduleName:xn},Sn.propertyInterpolateV={name:"ɵɵpropertyInterpolateV",moduleName:xn},Sn.i18n={name:"ɵɵi18n",moduleName:xn},Sn.i18nAttributes={name:"ɵɵi18nAttributes",moduleName:xn},Sn.i18nExp={name:"ɵɵi18nExp",moduleName:xn},Sn.i18nStart={name:"ɵɵi18nStart",moduleName:xn},Sn.i18nEnd={name:"ɵɵi18nEnd",moduleName:xn},Sn.i18nApply={name:"ɵɵi18nApply",moduleName:xn},Sn.i18nPostprocess={name:"ɵɵi18nPostprocess",moduleName:xn},Sn.pipe={name:"ɵɵpipe",moduleName:xn},Sn.projection={name:"ɵɵprojection",moduleName:xn},Sn.projectionDef={name:"ɵɵprojectionDef",moduleName:xn},Sn.reference={name:"ɵɵreference",moduleName:xn},Sn.inject={name:"ɵɵinject",moduleName:xn},Sn.injectAttribute={name:"ɵɵinjectAttribute",moduleName:xn},Sn.injectPipeChangeDetectorRef={name:"ɵɵinjectPipeChangeDetectorRef",moduleName:xn},Sn.directiveInject={name:"ɵɵdirectiveInject",moduleName:xn},Sn.invalidFactory={name:"ɵɵinvalidFactory",moduleName:xn},Sn.invalidFactoryDep={name:"ɵɵinvalidFactoryDep",moduleName:xn},Sn.templateRefExtractor={name:"ɵɵtemplateRefExtractor",moduleName:xn},Sn.resolveWindow={name:"ɵɵresolveWindow",moduleName:xn},Sn.resolveDocument={name:"ɵɵresolveDocument",moduleName:xn},Sn.resolveBody={name:"ɵɵresolveBody",moduleName:xn},Sn.defineComponent={name:"ɵɵdefineComponent",moduleName:xn},Sn.setComponentScope={name:"ɵɵsetComponentScope",moduleName:xn},Sn.ComponentDefWithMeta={name:"ɵɵComponentDefWithMeta",moduleName:xn},Sn.FactoryDef={name:"ɵɵFactoryDef",moduleName:xn},Sn.defineDirective={name:"ɵɵdefineDirective",moduleName:xn},Sn.DirectiveDefWithMeta={name:"ɵɵDirectiveDefWithMeta",moduleName:xn},Sn.InjectorDef={name:"ɵɵInjectorDef",moduleName:xn},Sn.defineInjector={name:"ɵɵdefineInjector",moduleName:xn},Sn.NgModuleDefWithMeta={name:"ɵɵNgModuleDefWithMeta",moduleName:xn},Sn.ModuleWithProviders={name:"ModuleWithProviders",moduleName:xn},Sn.defineNgModule={name:"ɵɵdefineNgModule",moduleName:xn},Sn.setNgModuleScope={name:"ɵɵsetNgModuleScope",moduleName:xn},Sn.PipeDefWithMeta={name:"ɵɵPipeDefWithMeta",moduleName:xn},Sn.definePipe={name:"ɵɵdefinePipe",moduleName:xn},Sn.queryRefresh={name:"ɵɵqueryRefresh",moduleName:xn},Sn.viewQuery={name:"ɵɵviewQuery",moduleName:xn},Sn.staticViewQuery={name:"ɵɵstaticViewQuery",moduleName:xn},Sn.staticContentQuery={name:"ɵɵstaticContentQuery",moduleName:xn},Sn.loadQuery={name:"ɵɵloadQuery",moduleName:xn},Sn.contentQuery={name:"ɵɵcontentQuery",moduleName:xn},Sn.NgOnChangesFeature={name:"ɵɵNgOnChangesFeature",moduleName:xn},Sn.InheritDefinitionFeature={name:"ɵɵInheritDefinitionFeature",moduleName:xn},Sn.CopyDefinitionFeature={name:"ɵɵCopyDefinitionFeature",moduleName:xn},Sn.ProvidersFeature={name:"ɵɵProvidersFeature",moduleName:xn},Sn.listener={name:"ɵɵlistener",moduleName:xn},Sn.getFactoryOf={name:"ɵɵgetFactoryOf",moduleName:xn},Sn.getInheritedFactory={name:"ɵɵgetInheritedFactory",moduleName:xn},Sn.sanitizeHtml={name:"ɵɵsanitizeHtml",moduleName:xn},Sn.sanitizeStyle={name:"ɵɵsanitizeStyle",moduleName:xn},Sn.sanitizeResourceUrl={name:"ɵɵsanitizeResourceUrl",moduleName:xn},Sn.sanitizeScript={name:"ɵɵsanitizeScript",moduleName:xn},Sn.sanitizeUrl={name:"ɵɵsanitizeUrl",moduleName:xn},Sn.sanitizeUrlOrResourceUrl={name:"ɵɵsanitizeUrlOrResourceUrl",moduleName:xn},Sn.trustConstantHtml={name:"ɵɵtrustConstantHtml",moduleName:xn},Sn.trustConstantScript={name:"ɵɵtrustConstantScript",moduleName:xn},Sn.trustConstantResourceUrl={name:"ɵɵtrustConstantResourceUrl",moduleName:xn};class bn{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e){return e.visitText(this)}}class In{constructor(e,t,n){this.value=e,this.sourceSpan=t,this.i18n=n}visit(e){return e.visitBoundText(this)}}class Tn{constructor(e,t,n,s,r){this.name=e,this.value=t,this.sourceSpan=n,this.valueSpan=s,this.i18n=r}visit(e){return e.visitTextAttribute(this)}}class Nn{constructor(e,t,n,s,r,i,a,o,l){this.name=e,this.type=t,this.securityContext=n,this.value=s,this.unit=r,this.sourceSpan=i,this.keySpan=a,this.valueSpan=o,this.i18n=l}static fromBoundElementProperty(e,t){if(void 0===e.keySpan)throw new Error(`Unexpected state: keySpan must be defined for bound attributes but was not for ${e.name}: ${e.sourceSpan}`);return new Nn(e.name,e.type,e.securityContext,e.value,e.unit,e.sourceSpan,e.keySpan,e.valueSpan,t)}visit(e){return e.visitBoundAttribute(this)}}class An{constructor(e,t,n,s,r,i,a){this.name=e,this.type=t,this.handler=n,this.target=s,this.phase=r,this.sourceSpan=i,this.handlerSpan=a}static fromParsedEvent(e){return new An(e.name,e.type,e.handler,0===e.type?e.targetOrPhase:null,1===e.type?e.targetOrPhase:null,e.sourceSpan,e.handlerSpan)}visit(e){return e.visitBoundEvent(this)}}class Pn{constructor(e,t,n,s,r,i,a,o,l,c){this.name=e,this.attributes=t,this.inputs=n,this.outputs=s,this.children=r,this.references=i,this.sourceSpan=a,this.startSourceSpan=o,this.endSourceSpan=l,this.i18n=c}visit(e){return e.visitElement(this)}}class kn{constructor(e,t,n,s,r,i,a,o,l,c,u,p){this.tagName=e,this.attributes=t,this.inputs=n,this.outputs=s,this.templateAttrs=r,this.children=i,this.references=a,this.variables=o,this.sourceSpan=l,this.startSourceSpan=c,this.endSourceSpan=u,this.i18n=p}visit(e){return e.visitTemplate(this)}}class On{constructor(e,t,n,s){this.selector=e,this.attributes=t,this.sourceSpan=n,this.i18n=s,this.name="ng-content"}visit(e){return e.visitContent(this)}}class Mn{constructor(e,t,n,s,r){this.name=e,this.value=t,this.sourceSpan=n,this.keySpan=s,this.valueSpan=r}visit(e){return e.visitVariable(this)}}class Ln{constructor(e,t,n,s){this.name=e,this.value=t,this.sourceSpan=n,this.valueSpan=s}visit(e){return e.visitReference(this)}}class Rn{constructor(e,t,n,s){this.vars=e,this.placeholders=t,this.sourceSpan=n,this.i18n=s}visit(e){return e.visitIcu(this)}}function Dn(e,t){const n=[];if(e.visit)for(const n of t)e.visit(n)||n.visit(e);else for(const s of t){const t=s.visit(e);t&&n.push(t)}return n}class Fn{constructor(e,t,n,s,r,i){this.nodes=e,this.placeholders=t,this.placeholderToMessage=n,this.meaning=s,this.description=r,this.customId=i,this.id=this.customId,this.legacyIds=[],this.sources=e.length?[{filePath:e[0].sourceSpan.start.file.url,startLine:e[0].sourceSpan.start.line+1,startCol:e[0].sourceSpan.start.col+1,endLine:e[e.length-1].sourceSpan.end.line+1,endCol:e[0].sourceSpan.start.col+1}]:[]}}class Bn{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitText(this,t)}}class $n{constructor(e,t){this.children=e,this.sourceSpan=t}visit(e,t){return e.visitContainer(this,t)}}class Vn{constructor(e,t,n,s){this.expression=e,this.type=t,this.cases=n,this.sourceSpan=s}visit(e,t){return e.visitIcu(this,t)}}class jn{constructor(e,t,n,s,r,i,a,o,l){this.tag=e,this.attrs=t,this.startName=n,this.closeName=s,this.children=r,this.isVoid=i,this.sourceSpan=a,this.startSourceSpan=o,this.endSourceSpan=l}visit(e,t){return e.visitTagPlaceholder(this,t)}}class Un{constructor(e,t,n){this.value=e,this.name=t,this.sourceSpan=n}visit(e,t){return e.visitPlaceholder(this,t)}}class qn{constructor(e,t,n){this.value=e,this.name=t,this.sourceSpan=n}visit(e,t){return e.visitIcuPlaceholder(this,t)}}function Hn(e){return function(e){const t=en(e),n=function(e,t){const n=e.length+3>>>2,s=[];for(let r=0;r<n;r++)s[r]=is(e,4*r,t);return s}(t,Jn.Big),s=8*t.length,r=function(e,t){const n=[];for(let e=0;e<80;e++)n.push(void 0);return n}();let i=1732584193,a=4023233417,o=2562383102,l=271733878,c=3285377520;n[s>>5]|=128<<24-s%32,n[15+(s+64>>9<<4)]=s;for(let e=0;e<n.length;e+=16){const t=i,s=a,u=o,p=l,h=c;for(let t=0;t<80;t++){r[t]=t<16?n[e+t]:ss(r[t-3]^r[t-8]^r[t-14]^r[t-16],1);const s=Gn(t,a,o,l),u=s[0],p=s[1],h=[ss(i,5),u,c,p,r[t]].reduce(es);c=l,l=o,o=ss(a,30),a=i,i=h}i=es(i,t),a=es(a,s),o=es(o,u),l=es(l,p),c=es(c,h)}return function(e){let t="";for(let n=0;n<e.length;n++){const s=rs(e,n);t+=(s>>>4).toString(16)+(15&s).toString(16)}return t.toLowerCase()}(as([i,a,o,l,c]))}((t=e.nodes,t.map(e=>e.visit(Kn,null))).join("")+`[${e.meaning}]`);var t}function Wn(e){const t=new Xn;return function(e,t=""){let n=Qn(e);if(t){const e=Qn(t);n=function(e,t){const n=e[0],s=t[0],r=ts(e[1],t[1]),i=r[0],a=r[1];return[es(es(n,s),i),a]}(function(e,t){const n=e[0],s=e[1];return[n<<1|s>>>31,s<<1|n>>>31]}(n),e)}return function(e){let t="",n="1";for(let s=e.length-1;s>=0;s--)t=os(t,ls(rs(e,s),n)),n=ls(256,n);return t.split("").reverse().join("")}(as([2147483647&n[0],n[1]]))}(e.nodes.map(e=>e.visit(t,null)).join(""),e.meaning)}class zn{visitText(e,t){return e.value}visitContainer(e,t){return`[${e.children.map(e=>e.visit(this)).join(", ")}]`}visitIcu(e,t){const n=Object.keys(e.cases).map(t=>`${t} {${e.cases[t].visit(this)}}`);return`{${e.expression}, ${e.type}, ${n.join(", ")}}`}visitTagPlaceholder(e,t){return e.isVoid?`<ph tag name="${e.startName}"/>`:`<ph tag name="${e.startName}">${e.children.map(e=>e.visit(this)).join(", ")}</ph name="${e.closeName}">`}visitPlaceholder(e,t){return e.value?`<ph name="${e.name}">${e.value}</ph>`:`<ph name="${e.name}"/>`}visitIcuPlaceholder(e,t){return`<ph icu name="${e.name}">${e.value.visit(this)}</ph>`}}const Kn=new zn;class Xn extends zn{visitIcu(e,t){let n=Object.keys(e.cases).map(t=>`${t} {${e.cases[t].visit(this)}}`);return`{${e.type}, ${n.join(", ")}}`}}function Gn(e,t,n,s){return e<20?[t&n|~t&s,1518500249]:e<40?[t^n^s,1859775393]:e<60?[t&n|t&s|n&s,2400959708]:[t^n^s,3395469782]}function Qn(e){const t=en(e);let n=Yn(t,0),s=Yn(t,102072);return 0!=n||0!=s&&1!=s||(n^=319790063,s^=-1801410264),[n,s]}function Yn(e,t){let n,s=2654435769,r=2654435769;const i=e.length;for(n=0;n+12<=i;n+=12){s=es(s,is(e,n,Jn.Little)),r=es(r,is(e,n+4,Jn.Little));const i=Zn(s,r,t=es(t,is(e,n+8,Jn.Little)));s=i[0],r=i[1],t=i[2]}return s=es(s,is(e,n,Jn.Little)),r=es(r,is(e,n+4,Jn.Little)),t=es(t,i),Zn(s,r,t=es(t,is(e,n+8,Jn.Little)<<8))[2]}function Zn(e,t,n){return e=ns(e,t),e=ns(e,n),e^=n>>>13,t=ns(t,n),t=ns(t,e),t^=e<<8,n=ns(n,e),n=ns(n,t),n^=t>>>13,e=ns(e,t),e=ns(e,n),e^=n>>>12,t=ns(t,n),t=ns(t,e),t^=e<<16,n=ns(n,e),n=ns(n,t),n^=t>>>5,e=ns(e,t),e=ns(e,n),e^=n>>>3,t=ns(t,n),t=ns(t,e),t^=e<<10,n=ns(n,e),n=ns(n,t),[e,t,n^=t>>>15]}var Jn;function es(e,t){return ts(e,t)[1]}function ts(e,t){const n=(65535&e)+(65535&t),s=(e>>>16)+(t>>>16)+(n>>>16);return[s>>>16,s<<16|65535&n]}function ns(e,t){const n=(65535&e)-(65535&t);return(e>>16)-(t>>16)+(n>>16)<<16|65535&n}function ss(e,t){return e<<t|e>>>32-t}function rs(e,t){return t>=e.length?0:255&e.charCodeAt(t)}function is(e,t,n){let s=0;if(n===Jn.Big)for(let n=0;n<4;n++)s+=rs(e,t+n)<<24-8*n;else for(let n=0;n<4;n++)s+=rs(e,t+n)<<8*n;return s}function as(e){return e.reduce((e,t)=>e+function(e){let t="";for(let n=0;n<4;n++)t+=String.fromCharCode(e>>>8*(3-n)&255);return t}(t),"")}function os(e,t){let n="";const s=Math.max(e.length,t.length);for(let r=0,i=0;r<s||i;r++){const s=i+ +(e[r]||0)+ +(t[r]||0);s>=10?(i=1,n+=s-10):(i=0,n+=s)}return n}function ls(e,t){let n="",s=t;for(;0!==e;e>>>=1)1&e&&(n=os(n,s)),s=os(s,s);return n}function cs(e){return"i18n"===e||e.startsWith("i18n-")}function us(e){return e instanceof Fn}function ps(e){return us(e)&&1===e.nodes.length&&e.nodes[0]instanceof Vn}function hs(e){return!!e.i18n}function ds(e){return e.nodes[0]}function ms(e,t=0){return`�${e}${t>0?":"+t:""}�`}function gs(e=0){let t=e;return()=>t++}function fs(e){const t={};return e.forEach((e,n)=>{t[n]=zt(e.length>1?`[${e.join("|")}]`:e[0])}),t}function vs(e,t,...n){const s=e.get(t)||[];s.push(...n),e.set(t,s)}function ys(e,t=0,n=0){const s=t,r=new Map,i=e instanceof Fn?e.nodes.find(e=>e instanceof $n):e;return i&&i.children.filter(e=>e instanceof Un).forEach((e,t)=>{const i=ms(s+t,n);vs(r,e.name,i)}),r}function xs(e={},t){const n={};return e&&Object.keys(e).length&&Object.keys(e).forEach(s=>n[Ss(s,t)]=e[s]),n}function Ss(e,t=!0){const n=e.toUpperCase().replace(/[^A-Z0-9_]/g,"_");if(!t)return n;const s=n.split("_");if(1===s.length)return e.toLowerCase();let r;/^\d+$/.test(s[s.length-1])&&(r=s.pop());let i=s.shift().toLowerCase();return s.length&&(i+=s.map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")),r?`${i}_${r}`:i}function Es(e){return("MSG_"+e).toUpperCase()}function _s(e){return new Mt(e.name,void 0,$e,void 0,e.sourceSpan)}!function(e){e[e.Little=0]="Little",e[e.Big=1]="Big"}(Jn||(Jn={}));const Cs=/[-.]/;function ws(e,t){let n=null;return()=>(n||(e.push(new Mt("_t",void 0,Be)),n=Bt(t)),n)}function bs(e){if(this)throw new Error(`Builder ${this.constructor.name} doesn't support ${e} yet`);throw new Error(`Feature ${e} is not supported yet`)}function Is(e){throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${e.constructor.name}`)}function Ts(e){return Array.isArray(e)?Ut(e.map(Ts)):zt(e,$e)}function Ns(e,t){return Object.getOwnPropertyNames(e).length>0?function(e,t){return qt(Object.getOwnPropertyNames(e).map(n=>{const s=e[n];let r,i,a;return Array.isArray(s)?[i,r]=s:[r,i]=Qt(n,[n,s]),a=r,{key:a,quoted:Cs.test(a),value:t&&i!==r?Ut([Ts(i),Ts(r)]):Ts(i)}}))}(e,t):null}function As(e){for(;Kt(e[e.length-1]);)e.pop();return e}function Ps(e,t){if(Array.isArray(e.predicate)){let n=[];return e.predicate.forEach(e=>{const t=e.split(",").map(e=>zt(e.trim()));n.push(...t)}),t.getConstLiteral(Ut(n),!0)}return e.predicate}class ks{constructor(){this.values=[]}set(e,t){t&&this.values.push({key:e,value:t,quoted:!1})}toLiteralMap(){return qt(this.values)}}function Os(e,t,n){let s=$t(e,null,n);if(t.length>0)for(let e=0;e<t.length;e++)s=s.callFn(t[e],n);else s=s.callFn([],n);return s}function Ms(e){const{expressions:t,strings:n}=e;return 1===t.length&&2===n.length&&""===n[0]&&""===n[1]?1:t.length+n.length}var Ls,Rs,Ds;function Fs(e){const t=Bt("t"),n=[];let s=qe;const r=$s(e)?t:new _t(We.Or,t,e.internalType);let i=null;if(null!==e.deps)"invalid"!==e.deps&&(i=new rt(r,Bs(e.deps,e.injectFn,e.target===Rs.Pipe)),s=function(e){let t=!1;const n=e.map(e=>{const n=function(e){const t=[];return e.resolved===Ds.Attribute&&null!==e.attribute&&t.push({key:"attribute",value:e.attribute,quoted:!1}),e.optional&&t.push({key:"optional",value:zt(!0),quoted:!1}),e.host&&t.push({key:"host",value:zt(!0),quoted:!1}),e.self&&t.push({key:"self",value:zt(!0),quoted:!1}),e.skipSelf&&t.push({key:"skipSelf",value:zt(!0),quoted:!1}),t.length>0?qt(t):null}(e);return null!==n?(t=!0,n):zt(null)});return t?Vt(Ut(n)):qe}(e.deps));else{const t=Bt(`ɵ${e.name}_BaseFactory`),s=$t(Sn.getInheritedFactory),a=t.set(s.callFn([e.internalType],void 0,!0)).toDeclStmt($e,[Pt.Exported,Pt.Final]);n.push(a),i=t.callFn([r])}const a=i,o=[];let l=null;function c(e){const n=Bt("r");o.push(n.set(Nt).toDeclStmt());let s=null;return s=null!==a?n.set(a).toStmt():$t(Sn.invalidFactory).callFn([]).toStmt(),o.push(Wt(t,[s],[n.set(e).toStmt()])),n}if($s(e)&&e.delegateType===Ls.Factory){const t=Bt(`ɵ${e.name}_BaseFactory`),s=$t(Sn.getFactoryOf);if(e.delegate.isEquivalent(e.internalType))throw new Error("Illegal state: compiling factory that delegates to itself");const r=t.set(s.callFn([e.delegate])).toDeclStmt($e,[Pt.Exported,Pt.Final]);n.push(r),l=c(t.callFn([]))}else if($s(e)){const t=Bs(e.delegateDeps,e.injectFn,e.target===Rs.Pipe);l=c(new(e.delegateType===Ls.Class?rt:st)(e.delegate,t))}else l=function(e){return void 0!==e.expression}(e)?c(e.expression):i;return o.push(null!==l?new Dt(l):$t(Sn.invalidFactory).callFn([]).toStmt()),{factory:Ht([new xt("t",Be)],o,$e,void 0,e.name+"_Factory"),statements:n,type:Vt($t(Sn.FactoryDef,[_n(e.type.type,e.typeArgumentCount),s]))}}function Bs(e,t,n){return e.map((e,s)=>function(e,t,n,s){switch(e.resolved){case Ds.Token:case Ds.ChangeDetectorRef:const r=0|(e.self?2:0)|(e.skipSelf?4:0)|(e.host?1:0)|(e.optional?8:0);let i=0!==r||e.optional?zt(r):null;if(n&&e.resolved===Ds.ChangeDetectorRef)return $t(Sn.injectPipeChangeDetectorRef).callFn(i?[i]:[]);const a=[e.token];return i&&a.push(i),$t(t).callFn(a);case Ds.Attribute:return $t(Sn.injectAttribute).callFn([e.token]);case Ds.Invalid:return $t(Sn.invalidFactoryDep).callFn([zt(s)]);default:return bs("Unknown R3ResolvedDependencyType: "+Ds[e.resolved])}}(e,t,n,s))}function $s(e){return void 0!==e.delegateType}function Vs(e,t){return{statements:[],factory:e.node===t.node?t.prop("ɵfac"):Ht([new xt("t",Be)],[new Dt(t.callMethod("ɵfac",[Bt("t")]))])}}!function(e){e[e.Class=0]="Class",e[e.Function=1]="Function",e[e.Factory=2]="Factory"}(Ls||(Ls={})),function(e){e[e.Directive=0]="Directive",e[e.Component=1]="Component",e[e.Injectable=2]="Injectable",e[e.Pipe=3]="Pipe",e[e.NgModule=4]="NgModule"}(Rs||(Rs={})),function(e){e[e.Token=0]="Token",e[e.Attribute=1]="Attribute",e[e.ChangeDetectorRef=2]="ChangeDetectorRef",e[e.Invalid=3]="Invalid"}(Ds||(Ds={}));const js=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];class Us{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error("Expected 'interpolation' to be an array, [start, end].");if(null!=t){const e=t[0],n=t[1];js.forEach(t=>{if(t.test(e)||t.test(n))throw new Error(`['${e}', '${n}'] contains unusable interpolation symbol.`)})}}(0,e),new Us(e[0],e[1])):qs}}const qs=new Us("{{","}}");class Hs{constructor(e=null){this.file=e,this.sourcesContent=new Map,this.lines=[],this.lastCol0=0,this.hasMappings=!1}addSource(e,t=null){return this.sourcesContent.has(e)||this.sourcesContent.set(e,t),this}addLine(){return this.lines.push([]),this.lastCol0=0,this}addMapping(e,t,n,s){if(!this.currentLine)throw new Error("A line must be added before mappings can be added");if(null!=t&&!this.sourcesContent.has(t))throw new Error(`Unknown source file "${t}"`);if(null==e)throw new Error("The column in the generated code must be provided");if(e<this.lastCol0)throw new Error("Mapping should be added in output order");if(t&&(null==n||null==s))throw new Error("The source location must be provided when a source url is provided");return this.hasMappings=!0,this.lastCol0=e,this.currentLine.push({col0:e,sourceUrl:t,sourceLine0:n,sourceCol0:s}),this}get currentLine(){return this.lines.slice(-1)[0]}toJSON(){if(!this.hasMappings)return null;const e=new Map,t=[],n=[];Array.from(this.sourcesContent.keys()).forEach((s,r)=>{e.set(s,r),t.push(s),n.push(this.sourcesContent.get(s)||null)});let s="",r=0,i=0,a=0,o=0;return this.lines.forEach(t=>{r=0,s+=t.map(t=>{let n=Ws(t.col0-r);return r=t.col0,null!=t.sourceUrl&&(n+=Ws(e.get(t.sourceUrl)-i),i=e.get(t.sourceUrl),n+=Ws(t.sourceLine0-a),a=t.sourceLine0,n+=Ws(t.sourceCol0-o),o=t.sourceCol0),n}).join(","),s+=";"}),s=s.slice(0,-1),{file:this.file||"",version:3,sourceRoot:"",sources:t,sourcesContent:n,mappings:s}}toJsComment(){return this.hasMappings?"//# sourceMappingURL=data:application/json;base64,"+function(e){let t="";e=en(e);for(let n=0;n<e.length;){const s=e.charCodeAt(n++),r=e.charCodeAt(n++),i=e.charCodeAt(n++);t+=zs(s>>2),t+=zs((3&s)<<4|(isNaN(r)?0:r>>4)),t+=isNaN(r)?"=":zs((15&r)<<2|i>>6),t+=isNaN(r)||isNaN(i)?"=":zs(63&i)}return t}(JSON.stringify(this,null,0)):""}}function Ws(e){e=e<0?1+(-e<<1):e<<1;let t="";do{let n=31&e;(e>>=5)>0&&(n|=32),t+=zs(n)}while(e>0);return t}function zs(e){if(e<0||e>=64)throw new Error("Can only encode value in the range [0, 63]");return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e]}const Ks=/'|\\|\n|\r|\$/g,Xs=/^[$A-Z_][0-9A-Z_$]*$/i,Gs=Bt("error",null,null),Qs=Bt("stack",null,null);class Ys{constructor(e){this.indent=e,this.partsLength=0,this.parts=[],this.srcSpans=[]}}class Zs{constructor(e){this._indent=e,this._classes=[],this._preambleLineCount=0,this._lines=[new Ys(e)]}static createRoot(){return new Zs(0)}get _currentLine(){return this._lines[this._lines.length-1]}println(e,t=""){this.print(e||null,t,!0)}lineIsEmpty(){return 0===this._currentLine.parts.length}lineLength(){return this._currentLine.indent*" ".length+this._currentLine.partsLength}print(e,t,n=!1){t.length>0&&(this._currentLine.parts.push(t),this._currentLine.partsLength+=t.length,this._currentLine.srcSpans.push(e&&e.sourceSpan||null)),n&&this._lines.push(new Ys(this._indent))}removeEmptyLastLine(){this.lineIsEmpty()&&this._lines.pop()}incIndent(){this._indent++,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}decIndent(){this._indent--,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}pushClass(e){this._classes.push(e)}popClass(){return this._classes.pop()}get currentClass(){return this._classes.length>0?this._classes[this._classes.length-1]:null}toSource(){return this.sourceLines.map(e=>e.parts.length>0?er(e.indent)+e.parts.join(""):"").join("\n")}toSourceMapGenerator(e,t=0){const n=new Hs(e);let s=!1;const r=()=>{s||(n.addSource(e," ").addMapping(0,e,0,0),s=!0)};for(let e=0;e<t;e++)n.addLine(),r();return this.sourceLines.forEach((e,t)=>{n.addLine();const i=e.srcSpans,a=e.parts;let o=e.indent*" ".length,l=0;for(;l<i.length&&!i[l];)o+=a[l].length,l++;for(l<i.length&&0===t&&0===o?s=!0:r();l<i.length;){const e=i[l],t=e.start.file,s=e.start.line,r=e.start.col;for(n.addSource(t.url,t.content).addMapping(o,t.url,s,r),o+=a[l].length,l++;l<i.length&&(e===i[l]||!i[l]);)o+=a[l].length,l++}}),n}setPreambleLineCount(e){return this._preambleLineCount=e}spanOf(e,t){const n=this._lines[e-this._preambleLineCount];if(n){let e=t-er(n.indent).length;for(let t=0;t<n.parts.length;t++){const s=n.parts[t];if(s.length>e)return n.srcSpans[t];e-=s.length}}return null}get sourceLines(){return this._lines.length&&0===this._lines[this._lines.length-1].parts.length?this._lines.slice(0,-1):this._lines}}function Js(e,t,n=!0){if(null==e)return null;const s=e.replace(Ks,(...e)=>"$"==e[0]?t?"\\$":"$":"\n"==e[0]?"\\n":"\r"==e[0]?"\\r":"\\"+e[0]);return n||!Xs.test(s)?`'${s}'`:s}function er(e){let t="";for(let n=0;n<e;n++)t+=" ";return t}class tr{evaluateStatements(e,t,n,s){const r=new nr(n),i=Zs.createRoot();return t.length>0&&!t[0].isEquivalent(zt("use strict").toStmt())&&(t=[zt("use strict").toStmt(),...t]),r.visitAllStatements(t,i),r.createReturnStmt(i),this.evaluateCode(e,i,r.getArgs(),s)}evaluateCode(e,t,n,s){let r=`"use strict";${t.toSource()}\n//# sourceURL=${e}`;const i=[],a=[];for(const e in n)a.push(n[e]),i.push(e);if(s){const n=new Function(...i.concat("return null;")).toString(),s=n.slice(0,n.indexOf("return null;")).split("\n").length-1;r+="\n"+t.toSourceMapGenerator(e,s).toJsComment()}const o=new Function(...i.concat(r));return this.executeFunction(o,a)}executeFunction(e,t){return e(...t)}}class nr extends class extends class{constructor(e){this._escapeDollarInStrings=e}printLeadingComments(e,t){if(void 0!==e.leadingComments)for(const n of e.leadingComments)n instanceof kt?t.print(e,`/*${n.toString()}*/`,n.trailingNewline):n.multiline?t.print(e,`/* ${n.text} */`,n.trailingNewline):n.text.split("\n").forEach(n=>{t.println(e,"// "+n)})}visitExpressionStmt(e,t){return this.printLeadingComments(e,t),e.expr.visitExpression(this,t),t.println(e,";"),null}visitReturnStmt(e,t){return this.printLeadingComments(e,t),t.print(e,"return "),e.value.visitExpression(this,t),t.println(e,";"),null}visitIfStmt(e,t){this.printLeadingComments(e,t),t.print(e,"if ("),e.condition.visitExpression(this,t),t.print(e,") {");const n=null!=e.falseCase&&e.falseCase.length>0;return e.trueCase.length<=1&&!n?(t.print(e," "),this.visitAllStatements(e.trueCase,t),t.removeEmptyLastLine(),t.print(e," ")):(t.println(),t.incIndent(),this.visitAllStatements(e.trueCase,t),t.decIndent(),n&&(t.println(e,"} else {"),t.incIndent(),this.visitAllStatements(e.falseCase,t),t.decIndent())),t.println(e,"}"),null}visitThrowStmt(e,t){return this.printLeadingComments(e,t),t.print(e,"throw "),e.error.visitExpression(this,t),t.println(e,";"),null}visitWriteVarExpr(e,t){const n=t.lineIsEmpty();return n||t.print(e,"("),t.print(e,e.name+" = "),e.value.visitExpression(this,t),n||t.print(e,")"),null}visitWriteKeyExpr(e,t){const n=t.lineIsEmpty();return n||t.print(e,"("),e.receiver.visitExpression(this,t),t.print(e,"["),e.index.visitExpression(this,t),t.print(e,"] = "),e.value.visitExpression(this,t),n||t.print(e,")"),null}visitWritePropExpr(e,t){const n=t.lineIsEmpty();return n||t.print(e,"("),e.receiver.visitExpression(this,t),t.print(e,`.${e.name} = `),e.value.visitExpression(this,t),n||t.print(e,")"),null}visitInvokeMethodExpr(e,t){e.receiver.visitExpression(this,t);let n=e.name;return null!=e.builtin&&(n=this.getBuiltinMethodName(e.builtin),null==n)||(t.print(e,`.${n}(`),this.visitAllExpressions(e.args,t,","),t.print(e,")")),null}visitInvokeFunctionExpr(e,t){return e.fn.visitExpression(this,t),t.print(e,"("),this.visitAllExpressions(e.args,t,","),t.print(e,")"),null}visitWrappedNodeExpr(e,t){throw new Error("Abstract emitter cannot visit WrappedNodeExpr.")}visitTypeofExpr(e,t){t.print(e,"typeof "),e.expr.visitExpression(this,t)}visitReadVarExpr(e,t){let n=e.name;if(null!=e.builtin)switch(e.builtin){case ze.Super:n="super";break;case ze.This:n="this";break;case ze.CatchError:n=Gs.name;break;case ze.CatchStack:n=Qs.name;break;default:throw new Error("Unknown builtin variable "+e.builtin)}return t.print(e,n),null}visitInstantiateExpr(e,t){return t.print(e,"new "),e.classExpr.visitExpression(this,t),t.print(e,"("),this.visitAllExpressions(e.args,t,","),t.print(e,")"),null}visitLiteralExpr(e,t){const n=e.value;return t.print(e,"string"==typeof n?Js(n,this._escapeDollarInStrings):""+n),null}visitLocalizedString(e,t){const n=e.serializeI18nHead();t.print(e,"$localize `"+n.raw);for(let n=1;n<e.messageParts.length;n++)t.print(e,"${"),e.expressions[n-1].visitExpression(this,t),t.print(e,"}"+e.serializeI18nTemplatePart(n).raw);return t.print(e,"`"),null}visitConditionalExpr(e,t){return t.print(e,"("),e.condition.visitExpression(this,t),t.print(e,"? "),e.trueCase.visitExpression(this,t),t.print(e,": "),e.falseCase.visitExpression(this,t),t.print(e,")"),null}visitNotExpr(e,t){return t.print(e,"!"),e.condition.visitExpression(this,t),null}visitAssertNotNullExpr(e,t){return e.condition.visitExpression(this,t),null}visitUnaryOperatorExpr(e,t){let n;switch(e.operator){case He.Plus:n="+";break;case He.Minus:n="-";break;default:throw new Error("Unknown operator "+e.operator)}return e.parens&&t.print(e,"("),t.print(e,n),e.expr.visitExpression(this,t),e.parens&&t.print(e,")"),null}visitBinaryOperatorExpr(e,t){let n;switch(e.operator){case We.Equals:n="==";break;case We.Identical:n="===";break;case We.NotEquals:n="!=";break;case We.NotIdentical:n="!==";break;case We.And:n="&&";break;case We.BitwiseAnd:n="&";break;case We.Or:n="||";break;case We.Plus:n="+";break;case We.Minus:n="-";break;case We.Divide:n="/";break;case We.Multiply:n="*";break;case We.Modulo:n="%";break;case We.Lower:n="<";break;case We.LowerEquals:n="<=";break;case We.Bigger:n=">";break;case We.BiggerEquals:n=">=";break;default:throw new Error("Unknown operator "+e.operator)}return e.parens&&t.print(e,"("),e.lhs.visitExpression(this,t),t.print(e,` ${n} `),e.rhs.visitExpression(this,t),e.parens&&t.print(e,")"),null}visitReadPropExpr(e,t){return e.receiver.visitExpression(this,t),t.print(e,"."),t.print(e,e.name),null}visitReadKeyExpr(e,t){return e.receiver.visitExpression(this,t),t.print(e,"["),e.index.visitExpression(this,t),t.print(e,"]"),null}visitLiteralArrayExpr(e,t){return t.print(e,"["),this.visitAllExpressions(e.entries,t,","),t.print(e,"]"),null}visitLiteralMapExpr(e,t){return t.print(e,"{"),this.visitAllObjects(n=>{t.print(e,Js(n.key,this._escapeDollarInStrings,n.quoted)+":"),n.value.visitExpression(this,t)},e.entries,t,","),t.print(e,"}"),null}visitCommaExpr(e,t){return t.print(e,"("),this.visitAllExpressions(e.parts,t,","),t.print(e,")"),null}visitAllExpressions(e,t,n){this.visitAllObjects(e=>e.visitExpression(this,t),e,t,n)}visitAllObjects(e,t,n,s){let r=!1;for(let i=0;i<t.length;i++)i>0&&(n.lineLength()>80?(n.print(null,s,!0),r||(n.incIndent(),n.incIndent(),r=!0)):n.print(null,s,!1)),e(t[i]);r&&(n.decIndent(),n.decIndent())}visitAllStatements(e,t){e.forEach(e=>e.visitStatement(this,t))}}{constructor(){super(!1)}visitDeclareClassStmt(e,t){return t.pushClass(e),this._visitClassConstructor(e,t),null!=e.parent&&(t.print(e,e.name+".prototype = Object.create("),e.parent.visitExpression(this,t),t.println(e,".prototype);")),e.getters.forEach(n=>this._visitClassGetter(e,n,t)),e.methods.forEach(n=>this._visitClassMethod(e,n,t)),t.popClass(),null}_visitClassConstructor(e,t){t.print(e,`function ${e.name}(`),null!=e.constructorMethod&&this._visitParams(e.constructorMethod.params,t),t.println(e,") {"),t.incIndent(),null!=e.constructorMethod&&e.constructorMethod.body.length>0&&(t.println(e,"var self = this;"),this.visitAllStatements(e.constructorMethod.body,t)),t.decIndent(),t.println(e,"}")}_visitClassGetter(e,t,n){n.println(e,`Object.defineProperty(${e.name}.prototype, '${t.name}', { get: function() {`),n.incIndent(),t.body.length>0&&(n.println(e,"var self = this;"),this.visitAllStatements(t.body,n)),n.decIndent(),n.println(e,"}});")}_visitClassMethod(e,t,n){n.print(e,`${e.name}.prototype.${t.name} = function(`),this._visitParams(t.params,n),n.println(e,") {"),n.incIndent(),t.body.length>0&&(n.println(e,"var self = this;"),this.visitAllStatements(t.body,n)),n.decIndent(),n.println(e,"};")}visitWrappedNodeExpr(e,t){throw new Error("Cannot emit a WrappedNodeExpr in Javascript.")}visitReadVarExpr(e,t){if(e.builtin===ze.This)t.print(e,"self");else{if(e.builtin===ze.Super)throw new Error("'super' needs to be handled at a parent ast node, not at the variable level!");super.visitReadVarExpr(e,t)}return null}visitDeclareVarStmt(e,t){return t.print(e,"var "+e.name),e.value&&(t.print(e," = "),e.value.visitExpression(this,t)),t.println(e,";"),null}visitCastExpr(e,t){return e.value.visitExpression(this,t),null}visitInvokeFunctionExpr(e,t){const n=e.fn;return n instanceof Qe&&n.builtin===ze.Super?(t.currentClass.parent.visitExpression(this,t),t.print(e,".call(this"),e.args.length>0&&(t.print(e,", "),this.visitAllExpressions(e.args,t,",")),t.print(e,")")):super.visitInvokeFunctionExpr(e,t),null}visitFunctionExpr(e,t){return t.print(e,`function${e.name?" "+e.name:""}(`),this._visitParams(e.params,t),t.println(e,") {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.print(e,"}"),null}visitDeclareFunctionStmt(e,t){return t.print(e,`function ${e.name}(`),this._visitParams(e.params,t),t.println(e,") {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.println(e,"}"),null}visitTryCatchStmt(e,t){t.println(e,"try {"),t.incIndent(),this.visitAllStatements(e.bodyStmts,t),t.decIndent(),t.println(e,`} catch (${Gs.name}) {`),t.incIndent();const n=[Qs.set(Gs.prop("stack")).toDeclStmt(null,[Pt.Final])].concat(e.catchStmts);return this.visitAllStatements(n,t),t.decIndent(),t.println(e,"}"),null}visitLocalizedString(e,t){t.print(e,'$localize((this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})(');const n=[e.serializeI18nHead()];for(let t=1;t<e.messageParts.length;t++)n.push(e.serializeI18nTemplatePart(t));return t.print(e,`[${n.map(e=>Js(e.cooked,!1)).join(", ")}], `),t.print(e,`[${n.map(e=>Js(e.raw,!1)).join(", ")}])`),e.expressions.forEach(n=>{t.print(e,", "),n.visitExpression(this,t)}),t.print(e,")"),null}_visitParams(e,t){this.visitAllObjects(e=>t.print(null,e.name),e,t,",")}getBuiltinMethodName(e){let t;switch(e){case Ke.ConcatArray:t="concat";break;case Ke.SubscribeObservable:t="subscribe";break;case Ke.Bind:t="bind";break;default:throw new Error("Unknown builtin method: "+e)}return t}}{constructor(e){super(),this.reflector=e,this._evalArgNames=[],this._evalArgValues=[],this._evalExportedVars=[]}createReturnStmt(e){new Dt(new Tt(this._evalExportedVars.map(e=>new It(e,Bt(e),!1)))).visitStatement(this,e)}getArgs(){const e={};for(let t=0;t<this._evalArgNames.length;t++)e[this._evalArgNames[t]]=this._evalArgValues[t];return e}visitExternalExpr(e,t){return this._emitReferenceToExternal(e,this.reflector.resolveExternalReference(e.value),t),null}visitWrappedNodeExpr(e,t){return this._emitReferenceToExternal(e,e.node,t),null}visitDeclareVarStmt(e,t){return e.hasModifier(Pt.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareVarStmt(e,t)}visitDeclareFunctionStmt(e,t){return e.hasModifier(Pt.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareFunctionStmt(e,t)}visitDeclareClassStmt(e,t){return e.hasModifier(Pt.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareClassStmt(e,t)}_emitReferenceToExternal(e,t,n){let s=this._evalArgValues.indexOf(t);if(-1===s){s=this._evalArgValues.length,this._evalArgValues.push(t);const e=function(e){if(!e||!e.reference)return null;const t=e.reference;if(t instanceof class{constructor(e,t,n){this.filePath=e,this.name=t,this.members=n}assertNoMembers(){if(this.members.length)throw new Error(`Illegal state: symbol without members expected, but got ${JSON.stringify(this)}.`)}})return t.name;if(t.__anonymousType)return t.__anonymousType;let n=tn(t);return n.indexOf("(")>=0?(n="anonymous_"+vn++,t.__anonymousType=n):n=fn(n),n}({reference:t})||"val";this._evalArgNames.push(`jit_${e}_${s}`)}n.print(e,this._evalArgNames[s])}}function sr(e){return e>=9&&e<=32||160==e}function rr(e){return 48<=e&&e<=57}function ir(e){return e>=97&&e<=122||e>=65&&e<=90}function ar(e){return 10===e||13===e}function or(e){return 48<=e&&e<=55}class lr{constructor(e,t,n,s){this.file=e,this.offset=t,this.line=n,this.col=s}toString(){return null!=this.offset?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){const t=this.file.content,n=t.length;let s=this.offset,r=this.line,i=this.col;for(;s>0&&e<0;)if(s--,e++,10==t.charCodeAt(s)){r--;const e=t.substr(0,s-1).lastIndexOf(String.fromCharCode(10));i=e>0?s-e:s}else i--;for(;s<n&&e>0;){const n=t.charCodeAt(s);s++,e--,10==n?(r++,i=0):i++}return new lr(this.file,s,r,i)}getContext(e,t){const n=this.file.content;let s=this.offset;if(null!=s){s>n.length-1&&(s=n.length-1);let r=s,i=0,a=0;for(;i<e&&s>0&&(s--,i++,"\n"!=n[s]||++a!=t););for(i=0,a=0;i<e&&r<n.length-1&&(r++,i++,"\n"!=n[r]||++a!=t););return{before:n.substring(s,this.offset),after:n.substring(this.offset,r+1)}}return null}}class cr{constructor(e,t){this.content=e,this.url=t}}class ur{constructor(e,t,n=e,s=null){this.start=e,this.end=t,this.fullStart=n,this.details=s}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}var pr,hr,dr,mr;!function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"}(pr||(pr={}));class gr{constructor(e,t,n=pr.ERROR){this.span=e,this.msg=t,this.level=n}contextualMessage(){const e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${pr[this.level]} ->]${e.after}")`:this.msg}toString(){const e=this.span.details?", "+this.span.details:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}}class fr{constructor(e){this.context=e}resolveExternalReference(e){if("@angular/core"!==e.moduleName)throw new Error(`Cannot resolve external reference to ${e.moduleName}, only references to @angular/core are supported.`);if(!this.context.hasOwnProperty(e.name))throw new Error(`No value provided for @angular/core symbol '${e.name}'.`);return this.context[e.name]}parameters(e){throw new Error("Not implemented.")}annotations(e){throw new Error("Not implemented.")}shallowAnnotations(e){throw new Error("Not implemented.")}tryAnnotations(e){throw new Error("Not implemented.")}propMetadata(e){throw new Error("Not implemented.")}hasLifecycleHook(e,t){throw new Error("Not implemented.")}guards(e){throw new Error("Not implemented.")}componentModuleUrl(e,t){throw new Error("Not implemented.")}}function vr(e,t=!1){return qt(Object.keys(e).map(n=>({key:n,quoted:t,value:e[n]})))}function yr(e){const t=e.map(e=>jt(e.type));return e.length>0?Vt(Ut(t)):qe}function xr(e,t){const n=Ut(e.map(e=>e.value));return t?Ht([],[new Dt(n)]):n}class Sr{constructor(e,t,n,s){this.input=t,this.errLocation=n,this.ctxLocation=s,this.message=`Parser Error: ${e} ${n} [${t}] in ${s}`}}class Er{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new Kr(e+this.start,e+this.end)}}class _r{constructor(e,t){this.span=e,this.sourceSpan=t}visit(e,t=null){return null}toString(){return"AST"}}class Cr extends _r{constructor(e,t,n){super(e,t),this.nameSpan=n}}class wr extends _r{constructor(e,t,n,s,r){super(e,t),this.prefix=n,this.uninterpretedExpression=s,this.location=r}visit(e,t=null){return e.visitQuote(this,t)}toString(){return"Quote"}}class br extends _r{visit(e,t=null){}}class Ir extends _r{visit(e,t=null){return e.visitImplicitReceiver(this,t)}}class Tr extends Ir{visit(e,t=null){var n;return null===(n=e.visitThisReceiver)||void 0===n?void 0:n.call(e,this,t)}}class Nr extends _r{constructor(e,t,n){super(e,t),this.expressions=n}visit(e,t=null){return e.visitChain(this,t)}}class Ar extends _r{constructor(e,t,n,s,r){super(e,t),this.condition=n,this.trueExp=s,this.falseExp=r}visit(e,t=null){return e.visitConditional(this,t)}}class Pr extends Cr{constructor(e,t,n,s,r){super(e,t,n),this.receiver=s,this.name=r}visit(e,t=null){return e.visitPropertyRead(this,t)}}class kr extends Cr{constructor(e,t,n,s,r,i){super(e,t,n),this.receiver=s,this.name=r,this.value=i}visit(e,t=null){return e.visitPropertyWrite(this,t)}}class Or extends Cr{constructor(e,t,n,s,r){super(e,t,n),this.receiver=s,this.name=r}visit(e,t=null){return e.visitSafePropertyRead(this,t)}}class Mr extends _r{constructor(e,t,n,s){super(e,t),this.obj=n,this.key=s}visit(e,t=null){return e.visitKeyedRead(this,t)}}class Lr extends _r{constructor(e,t,n,s,r){super(e,t),this.obj=n,this.key=s,this.value=r}visit(e,t=null){return e.visitKeyedWrite(this,t)}}class Rr extends Cr{constructor(e,t,n,s,r,i){super(e,t,i),this.exp=n,this.name=s,this.args=r}visit(e,t=null){return e.visitPipe(this,t)}}class Dr extends _r{constructor(e,t,n){super(e,t),this.value=n}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}}class Fr extends _r{constructor(e,t,n){super(e,t),this.expressions=n}visit(e,t=null){return e.visitLiteralArray(this,t)}}class Br extends _r{constructor(e,t,n,s){super(e,t),this.keys=n,this.values=s}visit(e,t=null){return e.visitLiteralMap(this,t)}}class $r extends _r{constructor(e,t,n,s){super(e,t),this.strings=n,this.expressions=s}visit(e,t=null){return e.visitInterpolation(this,t)}}class Vr extends _r{constructor(e,t,n,s,r){super(e,t),this.operation=n,this.left=s,this.right=r}visit(e,t=null){return e.visitBinary(this,t)}}class jr extends Vr{constructor(e,t,n,s,r,i,a){super(e,t,r,i,a),this.operator=n,this.expr=s}static createMinus(e,t,n){return new jr(e,t,"-",n,"-",new Dr(e,t,0),n)}static createPlus(e,t,n){return new jr(e,t,"+",n,"-",n,new Dr(e,t,0))}visit(e,t=null){return void 0!==e.visitUnary?e.visitUnary(this,t):e.visitBinary(this,t)}}class Ur extends _r{constructor(e,t,n){super(e,t),this.expression=n}visit(e,t=null){return e.visitPrefixNot(this,t)}}class qr extends _r{constructor(e,t,n){super(e,t),this.expression=n}visit(e,t=null){return e.visitNonNullAssert(this,t)}}class Hr extends Cr{constructor(e,t,n,s,r,i){super(e,t,n),this.receiver=s,this.name=r,this.args=i}visit(e,t=null){return e.visitMethodCall(this,t)}}class Wr extends Cr{constructor(e,t,n,s,r,i){super(e,t,n),this.receiver=s,this.name=r,this.args=i}visit(e,t=null){return e.visitSafeMethodCall(this,t)}}class zr extends _r{constructor(e,t,n,s){super(e,t),this.target=n,this.args=s}visit(e,t=null){return e.visitFunctionCall(this,t)}}class Kr{constructor(e,t){this.start=e,this.end=t}}class Xr extends _r{constructor(e,t,n,s,r){super(new Er(0,null===t?0:t.length),new Kr(s,null===t?s:s+t.length)),this.ast=e,this.source=t,this.location=n,this.errors=r}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}}class Gr{constructor(e,t,n){this.sourceSpan=e,this.key=t,this.value=n}}class Qr{constructor(e,t,n){this.sourceSpan=e,this.key=t,this.value=n}}class Yr{visit(e,t){e.visit(this,t)}visitUnary(e,t){this.visit(e.expr,t)}visitBinary(e,t){this.visit(e.left,t),this.visit(e.right,t)}visitChain(e,t){this.visitAll(e.expressions,t)}visitConditional(e,t){this.visit(e.condition,t),this.visit(e.trueExp,t),this.visit(e.falseExp,t)}visitPipe(e,t){this.visit(e.exp,t),this.visitAll(e.args,t)}visitFunctionCall(e,t){e.target&&this.visit(e.target,t),this.visitAll(e.args,t)}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){this.visitAll(e.expressions,t)}visitKeyedRead(e,t){this.visit(e.obj,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.obj,t),this.visit(e.key,t),this.visit(e.value,t)}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitLiteralPrimitive(e,t){}visitMethodCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitPrefixNot(e,t){this.visit(e.expression,t)}visitNonNullAssert(e,t){this.visit(e.expression,t)}visitPropertyRead(e,t){this.visit(e.receiver,t)}visitPropertyWrite(e,t){this.visit(e.receiver,t),this.visit(e.value,t)}visitSafePropertyRead(e,t){this.visit(e.receiver,t)}visitSafeMethodCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitQuote(e,t){}visitAll(e,t){for(const n of e)this.visit(n,t)}}class Zr{constructor(e,t,n,s,r,i){this.name=e,this.expression=t,this.type=n,this.sourceSpan=s,this.keySpan=r,this.valueSpan=i,this.isLiteral=this.type===hr.LITERAL_ATTR,this.isAnimation=this.type===hr.ANIMATION}}!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.LITERAL_ATTR=1]="LITERAL_ATTR",e[e.ANIMATION=2]="ANIMATION"}(hr||(hr={}));class Jr{constructor(e,t,n,s,r,i){this.name=e,this.targetOrPhase=t,this.type=n,this.handler=s,this.sourceSpan=r,this.handlerSpan=i}}class ei{constructor(e,t,n,s,r){this.name=e,this.value=t,this.sourceSpan=n,this.keySpan=s,this.valueSpan=r}}class ti{constructor(e,t,n,s,r,i,a,o){this.name=e,this.type=t,this.securityContext=n,this.value=s,this.unit=r,this.sourceSpan=i,this.keySpan=a,this.valueSpan=o}}class ni{}ni.event=Bt("$event");class si{constructor(e,t){this.stmts=e,this.allowDefault=t,this.render3Stmts=e.map(e=>e instanceof Mt&&e.name==t.name&&e.value instanceof _t?new Dt(e.value.lhs.value):e)}}class ri{constructor(e,t){this.stmts=e,this.currValExpr=t}}function ii(e,t,n,s,r,i){e||(e=new di);const a=new hi(e,t,s,i),o=n.visit(a,mr.Expression),l=ai(a,s);if(a.usesImplicitReceiver&&e.notifyImplicitReceiverUse(),0===a.temporaryCount&&r==dr.TrySimple)return new ri([],o);if(r===dr.Expression)return new ri(l,o);const c=function(e){return Bt("currVal_"+e)}(s);return l.push(c.set(o).toDeclStmt(Be,[Pt.Final])),new ri(l,c)}function ai(e,t){const n=[];for(let s=0;s<e.temporaryCount;s++)n.push(li(t,s));return n}function oi(e,t){return`tmp_${e}_${t}`}function li(e,t){return new Mt(oi(e,t),Nt)}function ci(e,t){if(e!==mr.Expression)throw new Error("Expected an expression, but saw "+t)}function ui(e,t){return e===mr.Statement?t.toStmt():t}!function(e){e[e.General=0]="General",e[e.TrySimple=1]="TrySimple",e[e.Expression=2]="Expression"}(dr||(dr={})),function(e){e[e.Statement=0]="Statement",e[e.Expression=1]="Expression"}(mr||(mr={}));class pi extends class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){return new $r(e.span,e.sourceSpan,e.strings,this.visitAll(e.expressions))}visitLiteralPrimitive(e,t){return new Dr(e.span,e.sourceSpan,e.value)}visitPropertyRead(e,t){return new Pr(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitPropertyWrite(e,t){return new kr(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,e.value.visit(this))}visitSafePropertyRead(e,t){return new Or(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitMethodCall(e,t){return new Hr(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args))}visitSafeMethodCall(e,t){return new Wr(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args))}visitFunctionCall(e,t){return new zr(e.span,e.sourceSpan,e.target.visit(this),this.visitAll(e.args))}visitLiteralArray(e,t){return new Fr(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitLiteralMap(e,t){return new Br(e.span,e.sourceSpan,e.keys,this.visitAll(e.values))}visitUnary(e,t){switch(e.operator){case"+":return jr.createPlus(e.span,e.sourceSpan,e.expr.visit(this));case"-":return jr.createMinus(e.span,e.sourceSpan,e.expr.visit(this));default:throw new Error("Unknown unary operator "+e.operator)}}visitBinary(e,t){return new Vr(e.span,e.sourceSpan,e.operation,e.left.visit(this),e.right.visit(this))}visitPrefixNot(e,t){return new Ur(e.span,e.sourceSpan,e.expression.visit(this))}visitNonNullAssert(e,t){return new qr(e.span,e.sourceSpan,e.expression.visit(this))}visitConditional(e,t){return new Ar(e.span,e.sourceSpan,e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))}visitPipe(e,t){return new Rr(e.span,e.sourceSpan,e.exp.visit(this),e.name,this.visitAll(e.args),e.nameSpan)}visitKeyedRead(e,t){return new Mr(e.span,e.sourceSpan,e.obj.visit(this),e.key.visit(this))}visitKeyedWrite(e,t){return new Lr(e.span,e.sourceSpan,e.obj.visit(this),e.key.visit(this),e.value.visit(this))}visitAll(e){const t=[];for(let n=0;n<e.length;++n)t[n]=e[n].visit(this);return t}visitChain(e,t){return new Nr(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitQuote(e,t){return new wr(e.span,e.sourceSpan,e.prefix,e.uninterpretedExpression,e.location)}}{constructor(e){super(),this._converterFactory=e}visitPipe(e,t){const n=[e.exp,...e.args].map(e=>e.visit(this,t));return new mi(e.span,e.sourceSpan,n,this._converterFactory.createPipeConverter(e.name,n.length))}visitLiteralArray(e,t){const n=e.expressions.map(e=>e.visit(this,t));return new mi(e.span,e.sourceSpan,n,this._converterFactory.createLiteralArrayConverter(e.expressions.length))}visitLiteralMap(e,t){const n=e.values.map(e=>e.visit(this,t));return new mi(e.span,e.sourceSpan,n,this._converterFactory.createLiteralMapConverter(e.keys))}}class hi{constructor(e,t,n,s,r,i){this._localResolver=e,this._implicitReceiver=t,this.bindingId=n,this.interpolationFunction=s,this.baseSourceSpan=r,this.implicitReceiverAccesses=i,this._nodeMap=new Map,this._resultMap=new Map,this._currentTemporary=0,this.temporaryCount=0,this.usesImplicitReceiver=!1}visitUnary(e,t){let n;switch(e.operator){case"+":n=He.Plus;break;case"-":n=He.Minus;break;default:throw new Error("Unsupported operator "+e.operator)}return ui(t,new Et(n,this._visit(e.expr,mr.Expression),void 0,this.convertSourceSpan(e.span)))}visitBinary(e,t){let n;switch(e.operation){case"+":n=We.Plus;break;case"-":n=We.Minus;break;case"*":n=We.Multiply;break;case"/":n=We.Divide;break;case"%":n=We.Modulo;break;case"&&":n=We.And;break;case"||":n=We.Or;break;case"==":n=We.Equals;break;case"!=":n=We.NotEquals;break;case"===":n=We.Identical;break;case"!==":n=We.NotIdentical;break;case"<":n=We.Lower;break;case">":n=We.Bigger;break;case"<=":n=We.LowerEquals;break;case">=":n=We.BiggerEquals;break;default:throw new Error("Unsupported operation "+e.operation)}return ui(t,new _t(n,this._visit(e.left,mr.Expression),this._visit(e.right,mr.Expression),void 0,this.convertSourceSpan(e.span)))}visitChain(e,t){return function(e,t){if(e!==mr.Statement)throw new Error("Expected a statement, but saw "+t)}(t,e),this.visitAll(e.expressions,t)}visitConditional(e,t){return ui(t,this._visit(e.condition,mr.Expression).conditional(this._visit(e.trueExp,mr.Expression),this._visit(e.falseExp,mr.Expression),this.convertSourceSpan(e.span)))}visitPipe(e,t){throw new Error("Illegal state: Pipes should have been converted into functions. Pipe: "+e.name)}visitFunctionCall(e,t){const n=this.visitAll(e.args,mr.Expression);let s;return s=e instanceof mi?e.converter(n):this._visit(e.target,mr.Expression).callFn(n,this.convertSourceSpan(e.span)),ui(t,s)}visitImplicitReceiver(e,t){return ci(t,e),this.usesImplicitReceiver=!0,this._implicitReceiver}visitThisReceiver(e,t){return this.visitImplicitReceiver(e,t)}visitInterpolation(e,t){ci(t,e);const n=[zt(e.expressions.length)];for(let t=0;t<e.strings.length-1;t++)n.push(zt(e.strings[t])),n.push(this._visit(e.expressions[t],mr.Expression));return n.push(zt(e.strings[e.strings.length-1])),this.interpolationFunction?this.interpolationFunction(n):e.expressions.length<=9?$t(gn.inlineInterpolate).callFn(n):$t(gn.interpolate).callFn([n[0],Ut(n.slice(1),void 0,this.convertSourceSpan(e.span))])}visitKeyedRead(e,t){const n=this.leftMostSafeNode(e);return n?this.convertSafeAccess(e,n,t):ui(t,this._visit(e.obj,mr.Expression).key(this._visit(e.key,mr.Expression)))}visitKeyedWrite(e,t){const n=this._visit(e.obj,mr.Expression),s=this._visit(e.key,mr.Expression),r=this._visit(e.value,mr.Expression);return ui(t,n.key(s).set(r))}visitLiteralArray(e,t){throw new Error("Illegal State: literal arrays should have been converted into functions")}visitLiteralMap(e,t){throw new Error("Illegal State: literal maps should have been converted into functions")}visitLiteralPrimitive(e,t){return ui(t,zt(e.value,null==e.value||!0===e.value||!0===e.value?$e:void 0,this.convertSourceSpan(e.span)))}_getLocal(e,t){var n;return(null===(n=this._localResolver.globals)||void 0===n?void 0:n.has(e))&&t instanceof Tr?null:this._localResolver.getLocal(e)}visitMethodCall(e,t){if(e.receiver instanceof Ir&&!(e.receiver instanceof Tr)&&"$any"===e.name){const t=this.visitAll(e.args,mr.Expression);if(1!=t.length)throw new Error("Invalid call to $any, expected 1 argument but received "+(t.length||"none"));return t[0].cast(Be,this.convertSourceSpan(e.span))}const n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);{const n=this.visitAll(e.args,mr.Expression),s=this.usesImplicitReceiver;let r=null;const i=this._visit(e.receiver,mr.Expression);if(i===this._implicitReceiver){const t=this._getLocal(e.name,e.receiver);t&&(this.usesImplicitReceiver=s,r=t.callFn(n),this.addImplicitReceiverAccess(e.name))}return null==r&&(r=i.callMethod(e.name,n,this.convertSourceSpan(e.span))),ui(t,r)}}visitPrefixNot(e,t){return ui(t,(n=this._visit(e.expression,mr.Expression),new ft(n,void 0)));var n}visitNonNullAssert(e,t){return ui(t,(n=this._visit(e.expression,mr.Expression),new vt(n,void 0)));var n}visitPropertyRead(e,t){const n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);{let n=null;const s=this.usesImplicitReceiver,r=this._visit(e.receiver,mr.Expression);return r===this._implicitReceiver&&(n=this._getLocal(e.name,e.receiver),n&&(this.usesImplicitReceiver=s,this.addImplicitReceiverAccess(e.name))),null==n&&(n=r.prop(e.name)),ui(t,n)}}visitPropertyWrite(e,t){const n=this._visit(e.receiver,mr.Expression),s=this.usesImplicitReceiver;let r=null;if(n===this._implicitReceiver){const t=this._getLocal(e.name,e.receiver);if(t){if(!(t instanceof Ct))throw new Error(`Cannot assign value "${e.value instanceof Pr?e.value.name:void 0}" to template variable "${e.name}". Template variables are read-only.`);r=t,this.usesImplicitReceiver=s,this.addImplicitReceiverAccess(e.name)}}return null===r&&(r=n.prop(e.name)),ui(t,r.set(this._visit(e.value,mr.Expression)))}visitSafePropertyRead(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)}visitSafeMethodCall(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)}visitAll(e,t){return e.map(e=>this._visit(e,t))}visitQuote(e,t){throw new Error(`Quotes are not supported for evaluation!\n Statement: ${e.uninterpretedExpression} located at ${e.location}`)}_visit(e,t){return this._resultMap.get(e)||(this._nodeMap.get(e)||e).visit(this,t)}convertSafeAccess(e,t,n){let s=this._visit(t.receiver,mr.Expression),r=void 0;this.needsTemporary(t.receiver)&&(r=this.allocateTemporary(),s=r.set(s),this._resultMap.set(t.receiver,r));const i=s.isBlank();this._nodeMap.set(t,t instanceof Wr?new Hr(t.span,t.sourceSpan,t.nameSpan,t.receiver,t.name,t.args):new Pr(t.span,t.sourceSpan,t.nameSpan,t.receiver,t.name));const a=this._visit(e,mr.Expression);return this._nodeMap.delete(t),r&&this.releaseTemporary(r),ui(n,i.conditional(zt(null),a))}leftMostSafeNode(e){const t=(e,t)=>(this._nodeMap.get(t)||t).visit(e);return e.visit({visitUnary:e=>null,visitBinary:e=>null,visitChain:e=>null,visitConditional:e=>null,visitFunctionCall:e=>null,visitImplicitReceiver:e=>null,visitThisReceiver:e=>null,visitInterpolation:e=>null,visitKeyedRead(e){return t(this,e.obj)},visitKeyedWrite:e=>null,visitLiteralArray:e=>null,visitLiteralMap:e=>null,visitLiteralPrimitive:e=>null,visitMethodCall(e){return t(this,e.receiver)},visitPipe:e=>null,visitPrefixNot:e=>null,visitNonNullAssert:e=>null,visitPropertyRead(e){return t(this,e.receiver)},visitPropertyWrite:e=>null,visitQuote:e=>null,visitSafeMethodCall(e){return t(this,e.receiver)||e},visitSafePropertyRead(e){return t(this,e.receiver)||e}})}needsTemporary(e){const t=(e,t)=>t&&(this._nodeMap.get(t)||t).visit(e);return e.visit({visitUnary(e){return t(this,e.expr)},visitBinary(e){return t(this,e.left)||t(this,e.right)},visitChain:e=>!1,visitConditional(e){return t(this,e.condition)||t(this,e.trueExp)||t(this,e.falseExp)},visitFunctionCall:e=>!0,visitImplicitReceiver:e=>!1,visitThisReceiver:e=>!1,visitInterpolation(e){return((e,n)=>n.some(n=>t(e,n)))(this,e.expressions)},visitKeyedRead:e=>!1,visitKeyedWrite:e=>!1,visitLiteralArray:e=>!0,visitLiteralMap:e=>!0,visitLiteralPrimitive:e=>!1,visitMethodCall:e=>!0,visitPipe:e=>!0,visitPrefixNot(e){return t(this,e.expression)},visitNonNullAssert(e){return t(this,e.expression)},visitPropertyRead:e=>!1,visitPropertyWrite:e=>!1,visitQuote:e=>!1,visitSafeMethodCall:e=>!0,visitSafePropertyRead:e=>!1})}allocateTemporary(){const e=this._currentTemporary++;return this.temporaryCount=Math.max(this._currentTemporary,this.temporaryCount),new Qe(oi(this.bindingId,e))}releaseTemporary(e){if(this._currentTemporary--,e.name!=oi(this.bindingId,this._currentTemporary))throw new Error(`Temporary ${e.name} released out of order`)}convertSourceSpan(e){if(this.baseSourceSpan){const t=this.baseSourceSpan.start.moveBy(e.start),n=this.baseSourceSpan.start.moveBy(e.end),s=this.baseSourceSpan.fullStart.moveBy(e.start);return new ur(t,n,s)}return null}addImplicitReceiverAccess(e){this.implicitReceiverAccesses&&this.implicitReceiverAccesses.add(e)}}class di{constructor(e){this.globals=e}notifyImplicitReceiverUse(){}getLocal(e){return e===ni.event.name?ni.event:null}}class mi extends zr{constructor(e,t,n,s){super(e,t,null,n),this.args=n,this.converter=s}}class gi{constructor(){this.strictStyling=!0}shimCssText(e,t,n=""){const s=e.match(Li)||[];return e=function(e){return e.replace(Mi,"")}(e),e=this._insertDirectives(e),[this._scopeCssText(e,t,n),...s].join("\n")}_insertDirectives(e){return e=this._insertPolyfillDirectivesInCssText(e),this._insertPolyfillRulesInCssText(e)}_insertPolyfillDirectivesInCssText(e){return e.replace(vi,function(...e){return e[2]+"{"})}_insertPolyfillRulesInCssText(e){return e.replace(yi,(...e)=>{const t=e[0].replace(e[1],"").replace(e[2],"");return e[4]+t})}_scopeCssText(e,t,n){const s=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,n)),(e=e+"\n"+s).trim()}_extractUnscopedRulesFromCssText(e){let t,n="";for(xi.lastIndex=0;null!==(t=xi.exec(e));)n+=t[0].replace(t[2],"").replace(t[1],t[4])+"\n\n";return n}_convertColonHost(e){return this._convertColonRule(e,Ci,this._colonHostPartReplacer)}_convertColonHostContext(e){return this._convertColonRule(e,wi,this._colonHostContextPartReplacer)}_convertColonRule(e,t,n){return e.replace(t,function(...e){if(e[2]){const t=e[2].split(","),s=[];for(let r=0;r<t.length;r++){const i=t[r].trim();if(!i)break;s.push(n(bi,i,e[3]))}return s.join(",")}return bi+e[3]})}_colonHostContextPartReplacer(e,t,n){return t.indexOf(Si)>-1?this._colonHostPartReplacer(e,t,n):e+t+n+", "+t+" "+e+n}_colonHostPartReplacer(e,t,n){return e+t.replace(Si,"")+n}_convertShadowDOMSelectors(e){return Ti.reduce((e,t)=>e.replace(t," "),e)}_scopeSelectors(e,t,n){return function(e,t){const n=ji(e,Bi,"%QUOTED%"),s=ji(n.escapedString,Fi,"%BLOCK%");let r=0,i=0;return s.escapedString.replace(Ri,(...e)=>{const n=e[2];let i="",a=e[4],o="";a&&a.startsWith("{%BLOCK%")&&(i=s.blocks[r++],a=a.substring("%BLOCK%".length+1),o="{");const l=t(new $i(n,i));return`${e[1]}${l.selector}${e[3]}${o}${l.content}${a}`}).replace(Di,()=>n.blocks[i++])}(e,e=>{let s=e.selector,r=e.content;return"@"!=e.selector[0]?s=this._scopeSelector(e.selector,t,n,this.strictStyling):(e.selector.startsWith("@media")||e.selector.startsWith("@supports")||e.selector.startsWith("@page")||e.selector.startsWith("@document"))&&(r=this._scopeSelectors(e.content,t,n)),new $i(s,r)})}_scopeSelector(e,t,n,s){return e.split(",").map(e=>e.trim().split(Ni)).map(e=>{const[r,...i]=e;return[(e=>this._selectorNeedsScoping(e,t)?s?this._applyStrictSelectorScope(e,t,n):this._applySelectorScope(e,t,n):e)(r),...i].join(" ")}).join(", ")}_selectorNeedsScoping(e,t){return!this._makeScopeMatcher(t).test(e)}_makeScopeMatcher(e){return e=e.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),new RegExp("^("+e+")"+Ai,"m")}_applySelectorScope(e,t,n){return this._applySimpleSelectorScope(e,t,n)}_applySimpleSelectorScope(e,t,n){if(Pi.lastIndex=0,Pi.test(e)){const s=this.strictStyling?`[${n}]`:t;return e.replace(Ii,(e,t)=>t.replace(/([^:]*)(:*)(.*)/,(e,t,n,r)=>t+s+n+r)).replace(Pi,s+" ")}return t+" "+e}_applyStrictSelectorScope(e,t,n){const s="["+(t=t.replace(/\[is=([^\]]*)\]/g,(e,...t)=>t[0]))+"]",r=e=>{let r=e.trim();if(!r)return"";if(e.indexOf(bi)>-1)r=this._applySimpleSelectorScope(e,t,n);else{const t=e.replace(Pi,"");if(t.length>0){const e=t.match(/([^:]*)(:*)(.*)/);e&&(r=e[1]+s+e[2]+e[3])}}return r},i=new fi(e);let a,o="",l=0;const c=/( |>|\+|~(?!=))\s*/g;let u=!((e=i.content()).indexOf(bi)>-1);for(;null!==(a=c.exec(e));){const t=a[1],n=e.slice(l,a.index).trim();u=u||n.indexOf(bi)>-1,o+=`${u?r(n):n} ${t} `,l=c.lastIndex}const p=e.substring(l);return u=u||p.indexOf(bi)>-1,o+=u?r(p):p,i.restore(o)}_insertPolyfillHostInCssText(e){return e.replace(Oi,Ei).replace(ki,Si)}}class fi{constructor(e){this.placeholders=[],this.index=0,e=e.replace(/(\[[^\]]*\])/g,(e,t)=>{const n=`__ph-${this.index}__`;return this.placeholders.push(t),this.index++,n}),this._content=e.replace(/(:nth-[-\w]+)(\([^)]+\))/g,(e,t,n)=>{const s=`__ph-${this.index}__`;return this.placeholders.push(n),this.index++,t+s})}restore(e){return e.replace(/__ph-(\d+)__/g,(e,t)=>this.placeholders[+t])}content(){return this._content}}const vi=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,yi=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,xi=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,Si="-shadowcsshost",Ei="-shadowcsscontext",_i=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",Ci=new RegExp("("+Si+_i,"gim"),wi=new RegExp("("+Ei+_i,"gim"),bi=Si+"-no-combinator",Ii=/-shadowcsshost-no-combinator([^\s]*)/,Ti=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],Ni=/(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g,Ai="([>\\s~+[.,{:][\\s\\S]*)?$",Pi=/-shadowcsshost/gim,ki=/:host/gim,Oi=/:host-context/gim,Mi=/\/\*\s*[\s\S]*?\*\//g,Li=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g,Ri=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,Di=/%QUOTED%/g,Fi=new Map([["{","}"]]),Bi=new Map([['"','"'],["'","'"]]);class $i{constructor(e,t){this.selector=e,this.content=t}}class Vi{constructor(e,t){this.escapedString=e,this.blocks=t}}function ji(e,t,n){const s=[],r=[];let i,a,o=0,l=0,c=-1;for(let u=0;u<e.length;u++){const p=e[u];"\\"===p?u++:p===a?(o--,0===o&&(r.push(e.substring(c,u)),s.push(n),l=u,c=-1,i=a=void 0)):p===i?o++:0===o&&t.has(p)&&(i=p,a=t.get(p),o=1,c=u+1,s.push(e.substring(l,c)))}return-1!==c?(r.push(e.substring(c)),s.push(n)):s.push(e.substring(l)),new Vi(s.join(""),r)}class Ui{constructor(e,t){this.sourceSpan=e,this.i18n=t}}class qi extends Ui{constructor(e,t,n){super(t,n),this.value=e}visit(e,t){return e.visitText(this,t)}}class Hi extends Ui{constructor(e,t,n,s,r,i){super(s,i),this.switchValue=e,this.type=t,this.cases=n,this.switchValueSourceSpan=r}visit(e,t){return e.visitExpansion(this,t)}}class Wi{constructor(e,t,n,s,r){this.value=e,this.expression=t,this.sourceSpan=n,this.valueSourceSpan=s,this.expSourceSpan=r}visit(e,t){return e.visitExpansionCase(this,t)}}class zi extends Ui{constructor(e,t,n,s,r){super(n,r),this.name=e,this.value=t,this.valueSpan=s}visit(e,t){return e.visitAttribute(this,t)}}class Ki extends Ui{constructor(e,t,n,s,r,i=null,a){super(s,a),this.name=e,this.attrs=t,this.children=n,this.startSourceSpan=r,this.endSourceSpan=i}visit(e,t){return e.visitElement(this,t)}}class Xi{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitComment(this,t)}}function Gi(e,t,n=null){const s=[],r=e.visit?t=>e.visit(t,n)||t.visit(e,n):t=>t.visit(e,n);return t.forEach(e=>{const t=r(e);t&&s.push(t)}),s}var Qi;!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.INCOMPLETE_TAG_OPEN=4]="INCOMPLETE_TAG_OPEN",e[e.TEXT=5]="TEXT",e[e.ESCAPABLE_RAW_TEXT=6]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=7]="RAW_TEXT",e[e.COMMENT_START=8]="COMMENT_START",e[e.COMMENT_END=9]="COMMENT_END",e[e.CDATA_START=10]="CDATA_START",e[e.CDATA_END=11]="CDATA_END",e[e.ATTR_NAME=12]="ATTR_NAME",e[e.ATTR_QUOTE=13]="ATTR_QUOTE",e[e.ATTR_VALUE=14]="ATTR_VALUE",e[e.DOC_TYPE=15]="DOC_TYPE",e[e.EXPANSION_FORM_START=16]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=17]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=18]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=19]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=20]="EXPANSION_FORM_END",e[e.EOF=21]="EOF"}(Qi||(Qi={}));class Yi{constructor(e,t,n){this.type=e,this.parts=t,this.sourceSpan=n}}class Zi extends gr{constructor(e,t,n){super(n,e),this.tokenType=t}}class Ji{constructor(e,t,n){this.tokens=e,this.errors=t,this.nonNormalizedIcuExpressions=n}}const ea=/\r\n?/g;function ta(e){return`Unexpected character "${0===e?"EOF":String.fromCharCode(e)}"`}function na(e){return`Unknown entity "${e}" - use the "&#<decimal>;" or "&#x<hex>;" syntax`}var sa;!function(e){e.HEX="hexadecimal",e.DEC="decimal"}(sa||(sa={}));class ra{constructor(e){this.error=e}}class ia{constructor(e,t,n){this._getTagDefinition=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._interpolationConfig=n.interpolationConfig||qs,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map(e=>e.codePointAt(0)||0);const s=n.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new ha(e,s):new pa(e,s),this._preserveLineEndings=n.preserveLineEndings||!1,this._escapedString=n.escapedString||!1,this._i18nNormalizeLineEndingsInICUs=n.i18nNormalizeLineEndingsInICUs||!1;try{this._cursor.init()}catch(e){this.handleError(e)}}_processCarriageReturns(e){return this._preserveLineEndings?e:e.replace(ea,"\n")}tokenize(){for(;0!==this._cursor.peek();){const e=this._cursor.clone();try{this._attemptCharCode(60)?this._attemptCharCode(33)?this._attemptCharCode(91)?this._consumeCdata(e):this._attemptCharCode(45)?this._consumeComment(e):this._consumeDocType(e):this._attemptCharCode(47)?this._consumeTagClose(e):this._consumeTagOpen(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){this.handleError(e)}}this._beginToken(Qi.EOF),this._endToken([])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(125!==this._cursor.peek()&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(125===this._cursor.peek()){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,t=this._cursor.clone()){this._currentTokenStart=t,this._currentTokenType=e}_endToken(e,t){if(null===this._currentTokenStart)throw new Zi("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(t));if(null===this._currentTokenType)throw new Zi("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));const n=new Yi(this._currentTokenType,e,this._cursor.getSpan(this._currentTokenStart,this._leadingTriviaCodePoints));return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}_createError(e,t){this._isInExpansionForm()&&(e+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');const n=new Zi(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new ra(n)}handleError(e){if(e instanceof da&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),!(e instanceof ra))throw e;this.errors.push(e.error)}_attemptCharCode(e){return this._cursor.peek()===e&&(this._cursor.advance(),!0)}_attemptCharCodeCaseInsensitive(e){return t=e,ua(this._cursor.peek())==ua(t)&&(this._cursor.advance(),!0);var t}_requireCharCode(e){const t=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(ta(this._cursor.peek()),this._cursor.getSpan(t))}_attemptStr(e){const t=e.length;if(this._cursor.charsLeft()<t)return!1;const n=this._cursor.clone();for(let s=0;s<t;s++)if(!this._attemptCharCode(e.charCodeAt(s)))return this._cursor=n,!1;return!0}_attemptStrCaseInsensitive(e){for(let t=0;t<e.length;t++)if(!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t)))return!1;return!0}_requireStr(e){const t=this._cursor.clone();if(!this._attemptStr(e))throw this._createError(ta(this._cursor.peek()),this._cursor.getSpan(t))}_attemptCharCodeUntilFn(e){for(;!e(this._cursor.peek());)this._cursor.advance()}_requireCharCodeUntilFn(e,t){const n=this._cursor.clone();if(this._attemptCharCodeUntilFn(e),this._cursor.diff(n)<t)throw this._createError(ta(this._cursor.peek()),this._cursor.getSpan(n))}_attemptUntilChar(e){for(;this._cursor.peek()!==e;)this._cursor.advance()}_readChar(e){if(e&&38===this._cursor.peek())return this._decodeEntity();{const e=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),e}}_decodeEntity(){const e=this._cursor.clone();if(this._cursor.advance(),!this._attemptCharCode(35)){const t=this._cursor.clone();if(this._attemptCharCodeUntilFn(ca),59!=this._cursor.peek())return this._cursor=t,"&";const n=this._cursor.getChars(t);this._cursor.advance();const s=ve[n];if(!s)throw this._createError(na(n),this._cursor.getSpan(e));return s}{const n=this._attemptCharCode(120)||this._attemptCharCode(88),s=this._cursor.clone();if(this._attemptCharCodeUntilFn(la),59!=this._cursor.peek())throw this._cursor.advance(),this._createError((t=n?sa.HEX:sa.DEC,`Unable to parse entity "${this._cursor.getChars(e)}" - ${t} character reference entities must end with ";"`),this._cursor.getSpan());const r=this._cursor.getChars(s);this._cursor.advance();try{const e=parseInt(r,n?16:10);return String.fromCharCode(e)}catch(t){throw this._createError(na(this._cursor.getChars(e)),this._cursor.getSpan())}}var t}_consumeRawText(e,t){this._beginToken(e?Qi.ESCAPABLE_RAW_TEXT:Qi.RAW_TEXT);const n=[];for(;;){const s=this._cursor.clone(),r=t();if(this._cursor=s,r)break;n.push(this._readChar(e))}return this._endToken([this._processCarriageReturns(n.join(""))])}_consumeComment(e){this._beginToken(Qi.COMMENT_START,e),this._requireCharCode(45),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("--\x3e")),this._beginToken(Qi.COMMENT_END),this._requireStr("--\x3e"),this._endToken([])}_consumeCdata(e){this._beginToken(Qi.CDATA_START,e),this._requireStr("CDATA["),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(Qi.CDATA_END),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(Qi.DOC_TYPE,e);const t=this._cursor.clone();this._attemptUntilChar(62);const n=this._cursor.getChars(t);this._cursor.advance(),this._endToken([n])}_consumePrefixAndName(){const e=this._cursor.clone();let t="";for(;58!==this._cursor.peek()&&!(((n=this._cursor.peek())<97||122<n)&&(n<65||90<n)&&(n<48||n>57));)this._cursor.advance();var n;let s;return 58===this._cursor.peek()?(t=this._cursor.getChars(e),this._cursor.advance(),s=this._cursor.clone()):s=e,this._requireCharCodeUntilFn(oa,""===t?0:1),[t,this._cursor.getChars(s)]}_consumeTagOpen(e){let t,n,s;try{if(!ir(this._cursor.peek()))throw this._createError(ta(this._cursor.peek()),this._cursor.getSpan(e));for(s=this._consumeTagOpenStart(e),n=s.parts[0],t=s.parts[1],this._attemptCharCodeUntilFn(aa);47!==this._cursor.peek()&&62!==this._cursor.peek()&&60!==this._cursor.peek();)this._consumeAttributeName(),this._attemptCharCodeUntilFn(aa),this._attemptCharCode(61)&&(this._attemptCharCodeUntilFn(aa),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(aa);this._consumeTagOpenEnd()}catch(t){if(t instanceof ra)return void(s?s.type=Qi.INCOMPLETE_TAG_OPEN:(this._beginToken(Qi.TEXT,e),this._endToken(["<"])));throw t}const r=this._getTagDefinition(t).contentType;r===ue.RAW_TEXT?this._consumeRawTextWithTagClose(n,t,!1):r===ue.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,t,!0)}_consumeRawTextWithTagClose(e,t,n){this._consumeRawText(n,()=>!!this._attemptCharCode(60)&&!!this._attemptCharCode(47)&&(this._attemptCharCodeUntilFn(aa),!!this._attemptStrCaseInsensitive(t)&&(this._attemptCharCodeUntilFn(aa),this._attemptCharCode(62)))),this._beginToken(Qi.TAG_CLOSE),this._requireCharCodeUntilFn(e=>62===e,3),this._cursor.advance(),this._endToken([e,t])}_consumeTagOpenStart(e){this._beginToken(Qi.TAG_OPEN_START,e);const t=this._consumePrefixAndName();return this._endToken(t)}_consumeAttributeName(){const e=this._cursor.peek();if(39===e||34===e)throw this._createError(ta(e),this._cursor.getSpan());this._beginToken(Qi.ATTR_NAME);const t=this._consumePrefixAndName();this._endToken(t)}_consumeAttributeValue(){let e;if(39===this._cursor.peek()||34===this._cursor.peek()){this._beginToken(Qi.ATTR_QUOTE);const t=this._cursor.peek();this._cursor.advance(),this._endToken([String.fromCodePoint(t)]),this._beginToken(Qi.ATTR_VALUE);const n=[];for(;this._cursor.peek()!==t;)n.push(this._readChar(!0));e=n.join(""),this._endToken([this._processCarriageReturns(e)]),this._beginToken(Qi.ATTR_QUOTE),this._cursor.advance(),this._endToken([String.fromCodePoint(t)])}else{this._beginToken(Qi.ATTR_VALUE);const t=this._cursor.clone();this._requireCharCodeUntilFn(oa,1),e=this._cursor.getChars(t),this._endToken([this._processCarriageReturns(e)])}}_consumeTagOpenEnd(){const e=this._attemptCharCode(47)?Qi.TAG_OPEN_END_VOID:Qi.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(62),this._endToken([])}_consumeTagClose(e){this._beginToken(Qi.TAG_CLOSE,e),this._attemptCharCodeUntilFn(aa);const t=this._consumePrefixAndName();this._attemptCharCodeUntilFn(aa),this._requireCharCode(62),this._endToken(t)}_consumeExpansionFormStart(){this._beginToken(Qi.EXPANSION_FORM_START),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(Qi.EXPANSION_FORM_START),this._beginToken(Qi.RAW_TEXT);const e=this._readUntil(44),t=this._processCarriageReturns(e);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([t]);else{const n=this._endToken([e]);t!==e&&this.nonNormalizedIcuExpressions.push(n)}this._requireCharCode(44),this._attemptCharCodeUntilFn(aa),this._beginToken(Qi.RAW_TEXT);const n=this._readUntil(44);this._endToken([n]),this._requireCharCode(44),this._attemptCharCodeUntilFn(aa)}_consumeExpansionCaseStart(){this._beginToken(Qi.EXPANSION_CASE_VALUE);const e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(aa),this._beginToken(Qi.EXPANSION_CASE_EXP_START),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(aa),this._expansionCaseStack.push(Qi.EXPANSION_CASE_EXP_START)}_consumeExpansionCaseEnd(){this._beginToken(Qi.EXPANSION_CASE_EXP_END),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(aa),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(Qi.EXPANSION_FORM_END),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeText(){const e=this._cursor.clone();this._beginToken(Qi.TEXT,e);const t=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(t.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(t.push(this._interpolationConfig.end),this._inInterpolation=!1):t.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(t.join(""))])}_isTextEnd(){if(60===this._cursor.peek()||0===this._cursor.peek())return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(this.isExpansionFormStart())return!0;if(125===this._cursor.peek()&&this._isInExpansionCase())return!0}return!1}_readUntil(e){const t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Qi.EXPANSION_CASE_EXP_START}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Qi.EXPANSION_FORM_START}isExpansionFormStart(){if(123!==this._cursor.peek())return!1;if(this._interpolationConfig){const e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0}}function aa(e){return!sr(e)||0===e}function oa(e){return sr(e)||62===e||60===e||47===e||39===e||34===e||61===e}function la(e){return 59==e||0==e||!function(e){return e>=97&&e<=102||e>=65&&e<=70||rr(e)}(e)}function ca(e){return 59==e||0==e||!ir(e)}function ua(e){return e>=97&&e<=122?e-97+65:e}class pa{constructor(e,t){if(e instanceof pa){this.file=e.file,this.input=e.input,this.end=e.end;const t=e.state;this.state={peek:t.peek,offset:t.offset,line:t.line,column:t.column}}else{if(!t)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=e,this.input=e.content,this.end=t.endPos,this.state={peek:-1,offset:t.startPos,line:t.startLine,column:t.startCol}}}clone(){return new pa(this)}peek(){return this.state.peek}charsLeft(){return this.end-this.state.offset}diff(e){return this.state.offset-e.state.offset}advance(){this.advanceState(this.state)}init(){this.updatePeek(this.state)}getSpan(e,t){let n=e=e||this;if(t)for(;this.diff(e)>0&&-1!==t.indexOf(e.peek());)n===e&&(e=e.clone()),e.advance();const s=this.locationFromCursor(e),r=this.locationFromCursor(this),i=n!==e?this.locationFromCursor(n):s;return new ur(s,r,i)}getChars(e){return this.input.substring(e.state.offset,this.state.offset)}charAt(e){return this.input.charCodeAt(e)}advanceState(e){if(e.offset>=this.end)throw this.state=e,new da('Unexpected character "EOF"',this);const t=this.charAt(e.offset);10===t?(e.line++,e.column=0):ar(t)||e.column++,e.offset++,this.updatePeek(e)}updatePeek(e){e.peek=e.offset>=this.end?0:this.charAt(e.offset)}locationFromCursor(e){return new lr(e.file,e.state.offset,e.state.line,e.state.column)}}class ha extends pa{constructor(e,t){e instanceof ha?(super(e),this.internalState=Object.assign({},e.internalState)):(super(e,t),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new ha(this)}getChars(e){const t=e.clone();let n="";for(;t.internalState.offset<this.internalState.offset;)n+=String.fromCodePoint(t.peek()),t.advance();return n}processEscapeSequence(){const e=()=>this.internalState.peek;if(92===e())if(this.internalState=Object.assign({},this.state),this.advanceState(this.internalState),110===e())this.state.peek=10;else if(114===e())this.state.peek=13;else if(118===e())this.state.peek=11;else if(116===e())this.state.peek=9;else if(98===e())this.state.peek=8;else if(102===e())this.state.peek=12;else if(117===e())if(this.advanceState(this.internalState),123===e()){this.advanceState(this.internalState);const t=this.clone();let n=0;for(;125!==e();)this.advanceState(this.internalState),n++;this.state.peek=this.decodeHexDigits(t,n)}else{const e=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,4)}else if(120===e()){this.advanceState(this.internalState);const e=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,2)}else if(or(e())){let t="",n=0,s=this.clone();for(;or(e())&&n<3;)s=this.clone(),t+=String.fromCodePoint(e()),this.advanceState(this.internalState),n++;this.state.peek=parseInt(t,8),this.internalState=s.internalState}else ar(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(e,t){const n=this.input.substr(e.internalState.offset,t),s=parseInt(n,16);if(isNaN(s))throw e.state=e.internalState,new da("Invalid hexadecimal escape sequence",e);return s}}class da{constructor(e,t){this.msg=e,this.cursor=t}}class ma extends gr{constructor(e,t,n){super(t,n),this.elementName=e}static create(e,t,n){return new ma(e,t,n)}}class ga{constructor(e,t){this.rootNodes=e,this.errors=t}}class fa{constructor(e,t){this.tokens=e,this.getTagDefinition=t,this._index=-1,this._elementStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==Qi.EOF;)this._peek.type===Qi.TAG_OPEN_START||this._peek.type===Qi.INCOMPLETE_TAG_OPEN?this._consumeStartTag(this._advance()):this._peek.type===Qi.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===Qi.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===Qi.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===Qi.TEXT||this._peek.type===Qi.RAW_TEXT||this._peek.type===Qi.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===Qi.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance()}_advance(){const e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e}_advanceIf(e){return this._peek.type===e?this._advance():null}_consumeCdata(e){this._consumeText(this._advance()),this._advanceIf(Qi.CDATA_END)}_consumeComment(e){const t=this._advanceIf(Qi.RAW_TEXT);this._advanceIf(Qi.COMMENT_END);const n=null!=t?t.parts[0].trim():null;this._addToParent(new Xi(n,e.sourceSpan))}_consumeExpansion(e){const t=this._advance(),n=this._advance(),s=[];for(;this._peek.type===Qi.EXPANSION_CASE_VALUE;){const e=this._parseExpansionCase();if(!e)return;s.push(e)}if(this._peek.type!==Qi.EXPANSION_FORM_END)return void this.errors.push(ma.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."));const r=new ur(e.sourceSpan.start,this._peek.sourceSpan.end,e.sourceSpan.fullStart);this._addToParent(new Hi(t.parts[0],n.parts[0],s,r,t.sourceSpan)),this._advance()}_parseExpansionCase(){const e=this._advance();if(this._peek.type!==Qi.EXPANSION_CASE_EXP_START)return this.errors.push(ma.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;const t=this._advance(),n=this._collectExpansionExpTokens(t);if(!n)return null;const s=this._advance();n.push(new Yi(Qi.EOF,[],s.sourceSpan));const r=new fa(n,this.getTagDefinition);if(r.build(),r.errors.length>0)return this.errors=this.errors.concat(r.errors),null;const i=new ur(e.sourceSpan.start,s.sourceSpan.end,e.sourceSpan.fullStart),a=new ur(t.sourceSpan.start,s.sourceSpan.end,t.sourceSpan.fullStart);return new Wi(e.parts[0],r.rootNodes,i,e.sourceSpan,a)}_collectExpansionExpTokens(e){const t=[],n=[Qi.EXPANSION_CASE_EXP_START];for(;;){if(this._peek.type!==Qi.EXPANSION_FORM_START&&this._peek.type!==Qi.EXPANSION_CASE_EXP_START||n.push(this._peek.type),this._peek.type===Qi.EXPANSION_CASE_EXP_END){if(!va(n,Qi.EXPANSION_CASE_EXP_START))return this.errors.push(ma.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(n.pop(),0==n.length)return t}if(this._peek.type===Qi.EXPANSION_FORM_END){if(!va(n,Qi.EXPANSION_FORM_START))return this.errors.push(ma.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;n.pop()}if(this._peek.type===Qi.EOF)return this.errors.push(ma.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}}_consumeText(e){let t=e.parts[0];if(t.length>0&&"\n"==t[0]){const e=this._getParentElement();null!=e&&0==e.children.length&&this.getTagDefinition(e.name).ignoreFirstLf&&(t=t.substring(1))}t.length>0&&this._addToParent(new qi(t,e.sourceSpan))}_closeVoidElement(){const e=this._getParentElement();e&&this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()}_consumeStartTag(e){const[t,n]=e.parts,s=[];for(;this._peek.type===Qi.ATTR_NAME;)s.push(this._consumeAttr(this._advance()));const r=this._getElementFullName(t,n,this._getParentElement());let i=!1;if(this._peek.type===Qi.TAG_OPEN_END_VOID){this._advance(),i=!0;const t=this.getTagDefinition(r);t.canSelfClose||null!==ge(r)||t.isVoid||this.errors.push(ma.create(r,e.sourceSpan,`Only void and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===Qi.TAG_OPEN_END&&(this._advance(),i=!1);const a=this._peek.sourceSpan.start,o=new ur(e.sourceSpan.start,a,e.sourceSpan.fullStart),l=new ur(e.sourceSpan.start,a,e.sourceSpan.fullStart),c=new Ki(r,s,[],o,l,void 0);this._pushElement(c),i?this._popElement(r,o):e.type===Qi.INCOMPLETE_TAG_OPEN&&(this._popElement(r,null),this.errors.push(ma.create(r,o,`Opening tag "${r}" not terminated.`)))}_pushElement(e){const t=this._getParentElement();t&&this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop(),this._addToParent(e),this._elementStack.push(e)}_consumeEndTag(e){const t=this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());this.getTagDefinition(t).isVoid?this.errors.push(ma.create(t,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`)):this._popElement(t,e.sourceSpan)||this.errors.push(ma.create(t,e.sourceSpan,`Unexpected closing tag "${t}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`))}_popElement(e,t){for(let n=this._elementStack.length-1;n>=0;n--){const s=this._elementStack[n];if(s.name==e)return s.endSourceSpan=t,s.sourceSpan.end=null!==t?t.end:s.sourceSpan.end,this._elementStack.splice(n,this._elementStack.length-n),!0;if(!this.getTagDefinition(s.name).closedByParent)return!1}return!1}_consumeAttr(e){const t=fe(e.parts[0],e.parts[1]);let n=e.sourceSpan.end,s="",r=void 0;if(this._peek.type===Qi.ATTR_QUOTE&&this._advance(),this._peek.type===Qi.ATTR_VALUE){const e=this._advance();s=e.parts[0],n=e.sourceSpan.end,r=e.sourceSpan}return this._peek.type===Qi.ATTR_QUOTE&&(n=this._advance().sourceSpan.end),new zi(t,s,new ur(e.sourceSpan.start,n,e.sourceSpan.fullStart),r)}_getParentElement(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null}_addToParent(e){const t=this._getParentElement();null!=t?t.children.push(e):this.rootNodes.push(e)}_getElementFullName(e,t,n){if(""===e&&""===(e=this.getTagDefinition(t).implicitNamespacePrefix||"")&&null!=n){const t=he(n.name)[1];this.getTagDefinition(t).preventNamespaceInheritance||(e=ge(n.name))}return fe(e,t)}}function va(e,t){return e.length>0&&e[e.length-1]===t}class ya extends class{constructor(e){this.getTagDefinition=e}parse(e,t,n){const s=function(e,t,n,s={}){const r=new ia(new cr(e,t),n,s);return r.tokenize(),new Ji(function(e){const t=[];let n=void 0;for(let s=0;s<e.length;s++){const r=e[s];n&&n.type==Qi.TEXT&&r.type==Qi.TEXT?(n.parts[0]+=r.parts[0],n.sourceSpan.end=r.sourceSpan.end):(n=r,t.push(n))}return t}(r.tokens),r.errors,r.nonNormalizedIcuExpressions)}(e,t,this.getTagDefinition,n),r=new fa(s.tokens,this.getTagDefinition);return r.build(),new ga(r.rootNodes,s.errors.concat(r.errors))}}{constructor(){super(Ee)}parse(e,t,n){return super.parse(e,t,n)}}const xa=new Set(["pre","template","textarea","script","style"]),Sa=new RegExp("[^ \f\n\r\t\v ᠎ - \u2028\u2029   \ufeff]"),Ea=new RegExp("[ \f\n\r\t\v ᠎ - \u2028\u2029   \ufeff]{2,}","g");function _a(e){return e.replace(new RegExp("","g")," ")}class Ca{visitElement(e,t){return xa.has(e.name)||e.attrs.some(e=>"ngPreserveWhitespaces"===e.name)?new Ki(e.name,Gi(this,e.attrs),e.children,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n):new Ki(e.name,e.attrs,function(e,t){const n=[];return t.forEach((s,r)=>{const i=s.visit(e,{prev:t[r-1],next:t[r+1]});i&&n.push(i)}),n}(this,e.children),e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}visitAttribute(e,t){return"ngPreserveWhitespaces"!==e.name?e:null}visitText(e,t){return e.value.match(Sa)||t&&(t.prev instanceof Hi||t.next instanceof Hi)?new qi(_a(e.value).replace(Ea," "),e.sourceSpan,e.i18n):null}visitComment(e,t){return e}visitExpansion(e,t){return e}visitExpansionCase(e,t){return e}}var wa;!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"}(wa||(wa={}));const ba=/^([^:/?#]+):/;class Ia{constructor(e,t,n,s,r){if(this._exprParser=e,this._interpolationConfig=t,this._schemaRegistry=n,this.errors=r,this.pipesByName=null,this._usedPipes=new Map,s){const e=new Map;s.forEach(t=>e.set(t.name,t)),this.pipesByName=e}}get interpolationConfig(){return this._interpolationConfig}getUsedPipes(){return Array.from(this._usedPipes.values())}createBoundHostProperties(e,t){if(e.hostProperties){const n=[];return Object.keys(e.hostProperties).forEach(s=>{const r=e.hostProperties[s];"string"==typeof r?this.parsePropertyBinding(s,r,!0,t,t.start.offset,void 0,[],n,t):this._reportError(`Value of the host property binding "${s}" needs to be a string representing an expression but got "${r}" (${typeof r})`,t)}),n}return null}createDirectiveHostPropertyAsts(e,t,n){const s=this.createBoundHostProperties(e,n);return s&&s.map(e=>this.createBoundElementProperty(t,e))}createDirectiveHostEventAsts(e,t){if(e.hostListeners){const n=[];return Object.keys(e.hostListeners).forEach(s=>{const r=e.hostListeners[s];"string"==typeof r?this.parseEvent(s,r,t,t,[],n):this._reportError(`Value of the host listener "${s}" needs to be a string representing an expression but got "${r}" (${typeof r})`,t)}),n}return null}parseInterpolation(e,t){const n=t.start.toString();try{const s=this._exprParser.parseInterpolation(e,n,t.start.offset,this._interpolationConfig);return s&&this._reportExpressionParserErrors(s.errors,t),this._checkPipes(s,t),s}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n,t.start.offset)}}parseInterpolationExpression(e,t){const n=t.start.toString();try{const s=this._exprParser.parseInterpolationExpression(e,n,t.start.offset);return s&&this._reportExpressionParserErrors(s.errors,t),this._checkPipes(s,t),s}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n,t.start.offset)}}parseInlineTemplateBinding(e,t,n,s,r,i,a,o){const l=this._parseTemplateBindings(e,t,n,n.start.offset+"*".length,s);for(const e of l){const t=Pa(n,e.sourceSpan),l=e.key.source,c=Pa(n,e.key.span);if(e instanceof Gr){const s=e.value?e.value.source:"$implicit",r=e.value?Pa(n,e.value.span):void 0;a.push(new ei(l,s,t,c,r))}else if(e.value){const s=o?t:n,a=Pa(n,e.value.ast.sourceSpan);this._parsePropertyAst(l,e.value,s,c,a,r,i)}else r.push([l,""]),this.parseLiteralAttr(l,null,c,s,void 0,r,i,c)}}_parseTemplateBindings(e,t,n,s,r){const i=n.start.toString();try{const a=this._exprParser.parseTemplateBindings(e,t,i,s,r);return this._reportExpressionParserErrors(a.errors,n),a.templateBindings.forEach(e=>{e.value instanceof Xr&&this._checkPipes(e.value,n)}),a.warnings.forEach(e=>{this._reportError(e,n,pr.WARNING)}),a.templateBindings}catch(e){return this._reportError(""+e,n),[]}}parseLiteralAttr(e,t,n,s,r,i,a,o){Na(e)?(e=e.substring(1),t&&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.',n,pr.ERROR),this._parseAnimation(e,t,n,s,o,r,i,a)):a.push(new Zr(e,this._exprParser.wrapLiteralPrimitive(t,"",s),hr.LITERAL_ATTR,n,o,r))}parsePropertyBinding(e,t,n,s,r,i,a,o,l){0===e.length&&this._reportError("Property name is missing in binding",s);let c=!1;e.startsWith("animate-")?(c=!0,e=e.substring("animate-".length)):Na(e)&&(c=!0,e=e.substring(1)),c?this._parseAnimation(e,t,s,r,l,i,a,o):this._parsePropertyAst(e,this._parseBinding(t,n,i||s,r),s,l,i,a,o)}parsePropertyInterpolation(e,t,n,s,r,i,a){const o=this.parseInterpolation(t,s||n);return!!o&&(this._parsePropertyAst(e,o,n,a,s,r,i),!0)}_parsePropertyAst(e,t,n,s,r,i,a){i.push([e,t.source]),a.push(new Zr(e,t,hr.DEFAULT,n,s,r))}_parseAnimation(e,t,n,s,r,i,a,o){0===e.length&&this._reportError("Animation trigger is missing",n);const l=this._parseBinding(t||"undefined",!1,i||n,s);a.push([e,l.source]),o.push(new Zr(e,l,hr.ANIMATION,n,r,i))}_parseBinding(e,t,n,s){const r=(n&&n.start||"(unknown)").toString();try{const i=t?this._exprParser.parseSimpleBinding(e,r,s,this._interpolationConfig):this._exprParser.parseBinding(e,r,s,this._interpolationConfig);return i&&this._reportExpressionParserErrors(i.errors,n),this._checkPipes(i,n),i}catch(e){return this._reportError(""+e,n),this._exprParser.wrapLiteralPrimitive("ERROR",r,s)}}createBoundElementProperty(e,t,n=!1,s=!0){if(t.isAnimation)return new ti(t.name,4,Ae.NONE,t.expression,null,t.sourceSpan,t.keySpan,t.valueSpan);let r=null,i=void 0,a=null;const o=t.name.split(".");let l=void 0;if(o.length>1)if("attr"==o[0]){a=o.slice(1).join("."),n||this._validatePropertyOrAttributeName(a,t.sourceSpan,!0),l=Aa(this._schemaRegistry,e,a,!0);const s=a.indexOf(":");if(s>-1){const e=a.substring(0,s),t=a.substring(s+1);a=fe(e,t)}i=1}else"class"==o[0]?(a=o[1],i=2,l=[Ae.NONE]):"style"==o[0]&&(r=o.length>2?o[2]:null,a=o[1],i=3,l=[Ae.STYLE]);if(null===a){const r=this._schemaRegistry.getMappedPropName(t.name);a=s?r:t.name,l=Aa(this._schemaRegistry,e,r,!1),i=0,n||this._validatePropertyOrAttributeName(r,t.sourceSpan,!1)}return new ti(a,i,l[0],t.expression,r,t.sourceSpan,t.keySpan,t.valueSpan)}parseEvent(e,t,n,s,r,i){0===e.length&&this._reportError("Event name is missing in binding",n),Na(e)?(e=e.substr(1),this._parseAnimationEvent(e,t,n,s,i)):this._parseRegularEvent(e,t,n,s,r,i)}calcPossibleSecurityContexts(e,t,n){const s=this._schemaRegistry.getMappedPropName(t);return Aa(this._schemaRegistry,e,s,n)}_parseAnimationEvent(e,t,n,s,r){const i=Yt(e,".",[e,""]),a=i[0],o=i[1].toLowerCase();if(o)switch(o){case"start":case"done":const e=this._parseAction(t,s);r.push(new Jr(a,o,1,e,n,s));break;default:this._reportError(`The provided animation output phase value "${o}" for "@${a}" is not supported (use start or done)`,n)}else this._reportError(`The animation trigger output event (@${a}) is missing its phase value name (start or done are currently supported)`,n)}_parseRegularEvent(e,t,n,s,r,i){const[a,o]=Qt(e,[null,e]),l=this._parseAction(t,s);r.push([e,l.source]),i.push(new Jr(o,a,0,l,n,s))}_parseAction(e,t){const n=(t&&t.start||"(unknown").toString(),s=t&&t.start?t.start.offset:0;try{const r=this._exprParser.parseAction(e,n,s,this._interpolationConfig);return r&&this._reportExpressionParserErrors(r.errors,t),!r||r.ast instanceof br?(this._reportError("Empty expressions are not allowed",t),this._exprParser.wrapLiteralPrimitive("ERROR",n,s)):(this._checkPipes(r,t),r)}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n,s)}}_reportError(e,t,n=pr.ERROR){this.errors.push(new gr(t,e,n))}_reportExpressionParserErrors(e,t){for(const n of e)this._reportError(n.message,t)}_checkPipes(e,t){if(e&&this.pipesByName){const n=new Ta;e.visit(n),n.pipes.forEach((e,n)=>{const s=this.pipesByName.get(n);s?this._usedPipes.set(n,s):this._reportError(`The pipe '${n}' could not be found`,new ur(t.start.moveBy(e.span.start),t.start.moveBy(e.span.end)))})}}_validatePropertyOrAttributeName(e,t,n){const s=n?this._schemaRegistry.validateAttribute(e):this._schemaRegistry.validateProperty(e);s.error&&this._reportError(s.msg,t,pr.ERROR)}}class Ta extends Yr{constructor(){super(...arguments),this.pipes=new Map}visitPipe(e,t){return this.pipes.set(e.name,e),e.exp.visit(this),this.visitAll(e.args,t),null}}function Na(e){return"@"==e[0]}function Aa(e,t,n,s){const r=[];return Ce.parse(t).forEach(t=>{const i=t.element?[t.element]:e.allKnownElementNames(),a=new Set(t.notSelectors.filter(e=>e.isElementSelector()).map(e=>e.element)),o=i.filter(e=>!a.has(e));r.push(...o.map(t=>e.securityContext(t,n,s)))}),0===r.length?[Ae.NONE]:Array.from(new Set(r)).sort()}function Pa(e,t){const n=t.start-e.start.offset,s=t.end-e.end.offset;return new ur(e.start.moveBy(n),e.end.moveBy(s),e.fullStart.moveBy(n),e.details)}function ka(e){let t=null,n=null,s=null,r=!1,i="";e.attrs.forEach(e=>{const a=e.name.toLowerCase();"select"==a?t=e.value:"href"==a?n=e.value:"rel"==a?s=e.value:"ngNonBindable"==e.name?r=!0:"ngProjectAs"==e.name&&e.value.length>0&&(i=e.value)}),t=function(e){return null===e||0===e.length?"*":e}(t);const a=e.name.toLowerCase();let o=Oa.OTHER;return me(a)?o=Oa.NG_CONTENT:"style"==a?o=Oa.STYLE:"script"==a?o=Oa.SCRIPT:"link"==a&&"stylesheet"==s&&(o=Oa.STYLESHEET),new La(o,t,n,r,i)}var Oa,Ma;!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"}(Oa||(Oa={}));class La{constructor(e,t,n,s,r){this.type=e,this.selectAttr=t,this.hrefAttr=n,this.nonBindable=s,this.projectAs=r}}function Ra(e){return e instanceof Xr&&(e=e.ast),e instanceof br}function Da(e){const t=e.charCodeAt(0);if(t==e.charCodeAt(e.length-1)&&(39==t||34==t)){const t=e.substring(1,e.length-1);-1==t.indexOf("'")&&-1==t.indexOf('"')&&(e=t)}return e}function Fa(e){return e.replace(/[a-z][A-Z]/g,e=>e.charAt(0)+"-"+e.charAt(1)).toLowerCase()}class Ba{constructor(e){this._directiveExpr=e,this._hasInitialValues=!1,this.hasBindings=!1,this.hasBindingsWithPipes=!1,this._classMapInput=null,this._styleMapInput=null,this._singleStyleInputs=null,this._singleClassInputs=null,this._lastStylingInput=null,this._firstStylingInput=null,this._stylesIndex=new Map,this._classesIndex=new Map,this._initialStyleValues=[],this._initialClassValues=[]}registerBoundInput(e){let t=null,n=e.name;switch(e.type){case 0:t=this.registerInputBasedOnName(n,e.value,e.sourceSpan);break;case 3:t=this.registerStyleInput(n,!1,e.value,e.sourceSpan,e.unit);break;case 2:t=this.registerClassInput(n,!1,e.value,e.sourceSpan)}return!!t}registerInputBasedOnName(e,t,n){let s=null;const r=e.substring(0,6),i="style"===e||"style."===r||"style!"===r;if(i||!i&&("class"===e||"class."===r||"class!"===r)){const r="."!==e.charAt(5),a=e.substr(r?5:6);s=i?this.registerStyleInput(a,r,t,n):this.registerClassInput(a,r,t,n)}return s}registerStyleInput(e,t,n,s,r){if(Ra(n))return null;e=Fa(e);const{property:i,hasOverrideFlag:a,suffix:o}=Va(e),l={name:i,suffix:r="string"==typeof r&&0!==r.length?r:o,value:n,sourceSpan:s,hasOverrideFlag:a};return t?this._styleMapInput=l:((this._singleStyleInputs=this._singleStyleInputs||[]).push(l),$a(this._stylesIndex,i)),this._lastStylingInput=l,this._firstStylingInput=this._firstStylingInput||l,this._checkForPipes(n),this.hasBindings=!0,l}registerClassInput(e,t,n,s){if(Ra(n))return null;const{property:r,hasOverrideFlag:i}=Va(e),a={name:r,value:n,sourceSpan:s,hasOverrideFlag:i,suffix:null};if(t){if(this._classMapInput)throw new Error("[class] and [className] bindings cannot be used on the same element simultaneously");this._classMapInput=a}else(this._singleClassInputs=this._singleClassInputs||[]).push(a),$a(this._classesIndex,r);return this._lastStylingInput=a,this._firstStylingInput=this._firstStylingInput||a,this._checkForPipes(n),this.hasBindings=!0,a}_checkForPipes(e){e instanceof Xr&&e.ast instanceof Rr&&(this.hasBindingsWithPipes=!0)}registerStyleAttr(e){this._initialStyleValues=function(e){const t=[];let n=0,s=0,r=0,i=0,a=0,o=null,l=!1;for(;n<e.length;)switch(e.charCodeAt(n++)){case 40:s++;break;case 41:s--;break;case 39:l=l||i>0,0===r?r=39:39===r&&92!==e.charCodeAt(n-1)&&(r=0);break;case 34:l=l||i>0,0===r?r=34:34===r&&92!==e.charCodeAt(n-1)&&(r=0);break;case 58:o||0!==s||0!==r||(o=Fa(e.substring(a,n-1).trim()),i=n);break;case 59:if(o&&i>0&&0===s&&0===r){const s=e.substring(i,n-1).trim();t.push(o,l?Da(s):s),a=n,i=0,o=null,l=!1}}if(o&&i){const n=e.substr(i).trim();t.push(o,l?Da(n):n)}return t}(e),this._hasInitialValues=!0}registerClassAttr(e){this._initialClassValues=e.trim().split(/\s+/g),this._hasInitialValues=!0}populateInitialStylingAttrs(e){if(this._initialClassValues.length){e.push(zt(1));for(let t=0;t<this._initialClassValues.length;t++)e.push(zt(this._initialClassValues[t]))}if(this._initialStyleValues.length){e.push(zt(2));for(let t=0;t<this._initialStyleValues.length;t+=2)e.push(zt(this._initialStyleValues[t]),zt(this._initialStyleValues[t+1]))}}assignHostAttrs(e,t){this._directiveExpr&&(e.length||this._hasInitialValues)&&(this.populateInitialStylingAttrs(e),t.set("hostAttrs",Ut(e)))}buildClassMapInstruction(e){return this._classMapInput?this._buildMapBasedInstruction(e,!0,this._classMapInput):null}buildStyleMapInstruction(e){return this._styleMapInput?this._buildMapBasedInstruction(e,!1,this._styleMapInput):null}_buildMapBasedInstruction(e,t,n){let s=2;const r=n.value.visit(e);let i;return r instanceof $r?(s+=r.expressions.length,i=t?function(e){switch(Ms(e)){case 1:return Sn.classMap;case 3:return Sn.classMapInterpolate1;case 5:return Sn.classMapInterpolate2;case 7:return Sn.classMapInterpolate3;case 9:return Sn.classMapInterpolate4;case 11:return Sn.classMapInterpolate5;case 13:return Sn.classMapInterpolate6;case 15:return Sn.classMapInterpolate7;case 17:return Sn.classMapInterpolate8;default:return Sn.classMapInterpolateV}}(r):function(e){switch(Ms(e)){case 1:return Sn.styleMap;case 3:return Sn.styleMapInterpolate1;case 5:return Sn.styleMapInterpolate2;case 7:return Sn.styleMapInterpolate3;case 9:return Sn.styleMapInterpolate4;case 11:return Sn.styleMapInterpolate5;case 13:return Sn.styleMapInterpolate6;case 15:return Sn.styleMapInterpolate7;case 17:return Sn.styleMapInterpolate8;default:return Sn.styleMapInterpolateV}}(r)):i=t?Sn.classMap:Sn.styleMap,{reference:i,calls:[{supportsInterpolation:!0,sourceSpan:n.sourceSpan,allocateBindingSlots:s,params:e=>{const t=e(r);return Array.isArray(t)?t:[t]}}]}}_buildSingleInputs(e,t,n,s,r){const i=[];return t.forEach(t=>{const a=i[i.length-1],o=t.value.visit(n);let l=e,c=2;o instanceof $r&&(c+=o.expressions.length,s&&(l=s(o)));const u={sourceSpan:t.sourceSpan,allocateBindingSlots:c,supportsInterpolation:!!s,params:e=>{const n=[];n.push(zt(t.name));const s=e(o);return Array.isArray(s)?n.push(...s):n.push(s),r||null===t.suffix||n.push(zt(t.suffix)),n}};a&&a.reference===l?a.calls.push(u):i.push({reference:l,calls:[u]})}),i}_buildClassInputs(e){return this._singleClassInputs?this._buildSingleInputs(Sn.classProp,this._singleClassInputs,e,null,!0):[]}_buildStyleInputs(e){return this._singleStyleInputs?this._buildSingleInputs(Sn.styleProp,this._singleStyleInputs,e,ja,!1):[]}buildUpdateLevelInstructions(e){const t=[];if(this.hasBindings){const n=this.buildStyleMapInstruction(e);n&&t.push(n);const s=this.buildClassMapInstruction(e);s&&t.push(s),t.push(...this._buildStyleInputs(e)),t.push(...this._buildClassInputs(e))}return t}}function $a(e,t){e.has(t)||e.set(t,e.size)}function Va(e){let t=!1;const n=e.indexOf("!important");-1!==n&&(e=n>0?e.substring(0,n):"",t=!0);let s=null,r=e;const i=e.lastIndexOf(".");return i>0&&(s=e.substr(i+1),r=e.substring(0,i)),{property:r,suffix:s,hasOverrideFlag:t}}function ja(e){switch(Ms(e)){case 1:return Sn.styleProp;case 3:return Sn.stylePropInterpolate1;case 5:return Sn.stylePropInterpolate2;case 7:return Sn.stylePropInterpolate3;case 9:return Sn.stylePropInterpolate4;case 11:return Sn.stylePropInterpolate5;case 13:return Sn.stylePropInterpolate6;case 15:return Sn.stylePropInterpolate7;case 17:return Sn.stylePropInterpolate8;default:return Sn.stylePropInterpolateV}}!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"}(Ma||(Ma={}));const Ua=["var","let","as","null","undefined","true","false","if","else","this"];class qa{tokenize(e){const t=new Xa(e),n=[];let s=t.scanToken();for(;null!=s;)n.push(s),s=t.scanToken();return n}}class Ha{constructor(e,t,n,s,r){this.index=e,this.end=t,this.type=n,this.numValue=s,this.strValue=r}isCharacter(e){return this.type==Ma.Character&&this.numValue==e}isNumber(){return this.type==Ma.Number}isString(){return this.type==Ma.String}isOperator(e){return this.type==Ma.Operator&&this.strValue==e}isIdentifier(){return this.type==Ma.Identifier}isKeyword(){return this.type==Ma.Keyword}isKeywordLet(){return this.type==Ma.Keyword&&"let"==this.strValue}isKeywordAs(){return this.type==Ma.Keyword&&"as"==this.strValue}isKeywordNull(){return this.type==Ma.Keyword&&"null"==this.strValue}isKeywordUndefined(){return this.type==Ma.Keyword&&"undefined"==this.strValue}isKeywordTrue(){return this.type==Ma.Keyword&&"true"==this.strValue}isKeywordFalse(){return this.type==Ma.Keyword&&"false"==this.strValue}isKeywordThis(){return this.type==Ma.Keyword&&"this"==this.strValue}isError(){return this.type==Ma.Error}toNumber(){return this.type==Ma.Number?this.numValue:-1}toString(){switch(this.type){case Ma.Character:case Ma.Identifier:case Ma.Keyword:case Ma.Operator:case Ma.String:case Ma.Error:return this.strValue;case Ma.Number:return this.numValue.toString();default:return null}}}function Wa(e,t,n){return new Ha(e,t,Ma.Character,n,String.fromCharCode(n))}function za(e,t,n){return new Ha(e,t,Ma.Operator,0,n)}const Ka=new Ha(-1,-1,Ma.Character,0,"");class Xa{constructor(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){const e=this.input,t=this.length;let n=this.peek,s=this.index;for(;n<=32;){if(++s>=t){n=0;break}n=e.charCodeAt(s)}if(this.peek=n,this.index=s,s>=t)return null;if(Ga(n))return this.scanIdentifier();if(rr(n))return this.scanNumber(s);const r=s;switch(n){case 46:return this.advance(),rr(this.peek)?this.scanNumber(r):Wa(r,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(r,n);case 39:case 34:return this.scanString();case 35:case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(r,String.fromCharCode(n));case 63:return this.scanComplexOperator(r,"?",46,".");case 60:case 62:return this.scanComplexOperator(r,String.fromCharCode(n),61,"=");case 33:case 61:return this.scanComplexOperator(r,String.fromCharCode(n),61,"=",61,"=");case 38:return this.scanComplexOperator(r,"&",38,"&");case 124:return this.scanComplexOperator(r,"|",124,"|");case 160:for(;sr(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(n)}]`,0)}scanCharacter(e,t){return this.advance(),Wa(e,this.index,t)}scanOperator(e,t){return this.advance(),za(e,this.index,t)}scanComplexOperator(e,t,n,s,r,i){this.advance();let a=t;return this.peek==n&&(this.advance(),a+=s),null!=r&&this.peek==r&&(this.advance(),a+=i),za(e,this.index,a)}scanIdentifier(){const e=this.index;for(this.advance();Qa(this.peek);)this.advance();const t=this.input.substring(e,this.index);return Ua.indexOf(t)>-1?new Ha(e,this.index,Ma.Keyword,0,t):function(e,t,n){return new Ha(e,t,Ma.Identifier,0,n)}(e,this.index,t)}scanNumber(e){let t=this.index===e;for(this.advance();;){if(rr(this.peek));else if(46==this.peek)t=!1;else{if(101!=(n=this.peek)&&69!=n)break;if(this.advance(),Ya(this.peek)&&this.advance(),!rr(this.peek))return this.error("Invalid exponent",-1);t=!1}this.advance()}var n;const s=this.input.substring(e,this.index),r=t?function(e){const t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}(s):parseFloat(s);return new Ha(e,this.index,Ma.Number,r,"")}scanString(){const e=this.index,t=this.peek;this.advance();let n="",s=this.index;const r=this.input;for(;this.peek!=t;)if(92==this.peek){let e;if(n+=r.substring(s,this.index),this.advance(),this.peek=this.peek,117==this.peek){const t=r.substring(this.index+1,this.index+5);if(!/^[0-9a-f]+$/i.test(t))return this.error(`Invalid unicode escape [\\u${t}]`,0);e=parseInt(t,16);for(let e=0;e<5;e++)this.advance()}else e=Za(this.peek),this.advance();n+=String.fromCharCode(e),s=this.index}else{if(0==this.peek)return this.error("Unterminated quote",0);this.advance()}const i=r.substring(s,this.index);return this.advance(),new Ha(e,this.index,Ma.String,0,n+i)}error(e,t){const n=this.index+t;return function(e,t,n){return new Ha(e,t,Ma.Error,0,n)}(n,this.index,`Lexer Error: ${e} at column ${n} in expression [${this.input}]`)}}function Ga(e){return 97<=e&&e<=122||65<=e&&e<=90||95==e||36==e}function Qa(e){return ir(e)||rr(e)||95==e||36==e}function Ya(e){return 45==e||43==e}function Za(e){switch(e){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return e}}class Ja{constructor(e,t,n,s,r){this.strings=e,this.stringSpans=t,this.expressions=n,this.expressionsSpans=s,this.offsets=r}}class eo{constructor(e,t,n){this.templateBindings=e,this.warnings=t,this.errors=n}}const to=no(qs);function no(e){const t=Jt(e.start)+"([\\s\\S]*?)"+Jt(e.end);return new RegExp(t,"g")}class so{constructor(e){this._lexer=e,this.errors=[],this.simpleExpressionChecker=oo}parseAction(e,t,n,s=qs){this._checkNoInterpolation(e,t,s);const r=this._stripComments(e),i=this._lexer.tokenize(this._stripComments(e)),a=new ao(e,t,n,i,r.length,!0,this.errors,e.length-r.length).parseChain();return new Xr(a,e,t,n,this.errors)}parseBinding(e,t,n,s=qs){const r=this._parseBindingAst(e,t,n,s);return new Xr(r,e,t,n,this.errors)}checkSimpleExpression(e){const t=new this.simpleExpressionChecker;return e.visit(t),t.errors}parseSimpleBinding(e,t,n,s=qs){const r=this._parseBindingAst(e,t,n,s),i=this.checkSimpleExpression(r);return i.length>0&&this._reportError("Host binding expression cannot contain "+i.join(" "),e,t),new Xr(r,e,t,n,this.errors)}_reportError(e,t,n,s){this.errors.push(new Sr(e,t,n,s))}_parseBindingAst(e,t,n,s){const r=this._parseQuote(e,t,n);if(null!=r)return r;this._checkNoInterpolation(e,t,s);const i=this._stripComments(e),a=this._lexer.tokenize(i);return new ao(e,t,n,a,i.length,!1,this.errors,e.length-i.length).parseChain()}_parseQuote(e,t,n){if(null==e)return null;const s=e.indexOf(":");if(-1==s)return null;const r=e.substring(0,s).trim();if(!function(e){if(0==e.length)return!1;const t=new Xa(e);if(!Ga(t.peek))return!1;for(t.advance();0!==t.peek;){if(!Qa(t.peek))return!1;t.advance()}return!0}(r))return null;const i=e.substring(s+1),a=new Er(0,e.length);return new wr(a,a.toAbsolute(n),r,i,t)}parseTemplateBindings(e,t,n,s,r){const i=this._lexer.tokenize(t);return new ao(t,n,r,i,t.length,!1,this.errors,0).parseTemplateBindings({source:e,span:new Kr(s,s+e.length)})}parseInterpolation(e,t,n,s=qs){const r=this.splitInterpolation(e,t,s);if(null==r)return null;const i=[];for(let s=0;s<r.expressions.length;++s){const a=r.expressions[s],o=this._stripComments(a),l=this._lexer.tokenize(o),c=new ao(e,t,n,l,o.length,!1,this.errors,r.offsets[s]+(a.length-o.length)).parseChain();i.push(c)}return this.createInterpolationAst(r.strings,i,e,t,n)}parseInterpolationExpression(e,t,n){const s=this._stripComments(e),r=this._lexer.tokenize(s),i=new ao(e,t,n,r,s.length,!1,this.errors,0).parseChain();return this.createInterpolationAst(["",""],[i],e,t,n)}createInterpolationAst(e,t,n,s,r){const i=new Er(0,n.length),a=new $r(i,i.toAbsolute(r),e,t);return new Xr(a,n,s,r,this.errors)}splitInterpolation(e,t,n=qs){const s=[],r=[],i=[],a=[],o=[];let l=0,c=!1,u=!1,{start:p,end:h}=n;for(;l<e.length;)if(c){const n=l,s=n+p.length,a=e.indexOf(h,s);if(-1===a){c=!1,u=!0;break}const d=a+h.length,m=e.substring(s,a);m.trim().length>0?r.push(m):(this._reportError("Blank expressions are not allowed in interpolated strings",e,`at column ${l} in`,t),r.push("$implicit")),i.push(s),o.push({start:n,end:d}),l=d,c=!1}else{const t=l;l=e.indexOf(p,l),-1===l&&(l=e.length);const n=e.substring(t,l);s.push(n),a.push({start:t,end:l}),c=!0}return c||(u?(s[s.length-1]+=e.substring(l),a[a.length-1].end=e.length):(s.push(e.substring(l)),a.push({start:l,end:e.length}))),0===r.length?null:new Ja(s,a,r,o,i)}wrapLiteralPrimitive(e,t,n){const s=new Er(0,null==e?0:e.length);return new Xr(new Dr(s,s.toAbsolute(n),e),e,t,n,this.errors)}_stripComments(e){const t=this._commentStart(e);return null!=t?e.substring(0,t).trim():e}_commentStart(e){let t=null;for(let s=0;s<e.length-1;s++){const r=e.charCodeAt(s),i=e.charCodeAt(s+1);if(47===r&&47==i&&null==t)return s;t===r?t=null:null==t&&(39===(n=r)||34===n||96===n)&&(t=r)}var n;return null}_checkNoInterpolation(e,t,n){const s=(r=n)===qs?to:no(r);var r;const i=e.split(s);i.length>1&&this._reportError(`Got interpolation (${n.start}${n.end}) where expression was expected`,e,`at column ${this._findInterpolationErrorColumn(i,1,n)} in`,t)}_findInterpolationErrorColumn(e,t,n){let s="";for(let r=0;r<t;r++)s+=r%2==0?e[r]:`${n.start}${e[r]}${n.end}`;return s.length}}class ro extends so{constructor(){super(...arguments),this.simpleExpressionChecker=lo}}var io;!function(e){e[e.None=0]="None",e[e.Writable=1]="Writable"}(io||(io={}));class ao{constructor(e,t,n,s,r,i,a,o){this.input=e,this.location=t,this.absoluteOffset=n,this.tokens=s,this.inputLength=r,this.parseAction=i,this.errors=a,this.offset=o,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=io.None,this.sourceSpanCache=new Map,this.index=0}peek(e){const t=this.index+e;return t<this.tokens.length?this.tokens[t]:Ka}get next(){return this.peek(0)}get atEOF(){return this.index>=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){return this.index>0?this.peek(-1).end+this.offset:0===this.tokens.length?this.inputLength+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e){return new Er(e,this.currentEndIndex)}sourceSpan(e){const t=`${e}@${this.inputIndex}`;return this.sourceSpanCache.has(t)||this.sourceSpanCache.set(t,this.span(e).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(t)}advance(){this.index++}withContext(e,t){this.context|=e;const n=t();return this.context^=e,n}consumeOptionalCharacter(e){return!!this.next.isCharacter(e)&&(this.advance(),!0)}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(e){this.consumeOptionalCharacter(e)||this.error("Missing expected "+String.fromCharCode(e))}consumeOptionalOperator(e){return!!this.next.isOperator(e)&&(this.advance(),!0)}expectOperator(e){this.consumeOptionalOperator(e)||this.error("Missing expected operator "+e)}prettyPrintToken(e){return e===Ka?"end of input":"token "+e}expectIdentifierOrKeyword(){const e=this.next;return e.isIdentifier()||e.isKeyword()?(this.advance(),e.toString()):(this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),"")}expectIdentifierOrKeywordOrString(){const e=this.next;return e.isIdentifier()||e.isKeyword()||e.isString()?(this.advance(),e.toString()):(this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),"")}parseChain(){const e=[],t=this.inputIndex;for(;this.index<this.tokens.length;){const t=this.parsePipe();if(e.push(t),this.consumeOptionalCharacter(59))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.consumeOptionalCharacter(59););else this.index<this.tokens.length&&this.error(`Unexpected token '${this.next}'`)}return 0==e.length?new br(this.span(t),this.sourceSpan(t)):1==e.length?e[0]:new Nr(this.span(t),this.sourceSpan(t),e)}parsePipe(){let e=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{const t=this.inputIndex,n=this.expectIdentifierOrKeyword(),s=this.sourceSpan(t),r=[];for(;this.consumeOptionalCharacter(58);)r.push(this.parseExpression());const{start:i}=e.span;e=new Rr(this.span(i),this.sourceSpan(i),e,n,r,s)}while(this.consumeOptionalOperator("|"))}return e}parseExpression(){return this.parseConditional()}parseConditional(){const e=this.inputIndex,t=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){const n=this.parsePipe();let s;if(this.consumeOptionalCharacter(58))s=this.parsePipe();else{const t=this.input.substring(e,this.inputIndex);this.error(`Conditional expression ${t} requires all 3 expressions`),s=new br(this.span(e),this.sourceSpan(e))}return new Ar(this.span(e),this.sourceSpan(e),t,n,s)}return t}parseLogicalOr(){let e=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){const t=this.parseLogicalAnd(),{start:n}=e.span;e=new Vr(this.span(n),this.sourceSpan(n),"||",e,t)}return e}parseLogicalAnd(){let e=this.parseEquality();for(;this.consumeOptionalOperator("&&");){const t=this.parseEquality(),{start:n}=e.span;e=new Vr(this.span(n),this.sourceSpan(n),"&&",e,t)}return e}parseEquality(){let e=this.parseRelational();for(;this.next.type==Ma.Operator;){const t=this.next.strValue;switch(t){case"==":case"===":case"!=":case"!==":this.advance();const n=this.parseRelational(),{start:s}=e.span;e=new Vr(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parseRelational(){let e=this.parseAdditive();for(;this.next.type==Ma.Operator;){const t=this.next.strValue;switch(t){case"<":case">":case"<=":case">=":this.advance();const n=this.parseAdditive(),{start:s}=e.span;e=new Vr(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parseAdditive(){let e=this.parseMultiplicative();for(;this.next.type==Ma.Operator;){const t=this.next.strValue;switch(t){case"+":case"-":this.advance();let n=this.parseMultiplicative();const{start:s}=e.span;e=new Vr(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parseMultiplicative(){let e=this.parsePrefix();for(;this.next.type==Ma.Operator;){const t=this.next.strValue;switch(t){case"*":case"%":case"/":this.advance();let n=this.parsePrefix();const{start:s}=e.span;e=new Vr(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parsePrefix(){if(this.next.type==Ma.Operator){const e=this.inputIndex;let t;switch(this.next.strValue){case"+":return this.advance(),t=this.parsePrefix(),jr.createPlus(this.span(e),this.sourceSpan(e),t);case"-":return this.advance(),t=this.parsePrefix(),jr.createMinus(this.span(e),this.sourceSpan(e),t);case"!":return this.advance(),t=this.parsePrefix(),new Ur(this.span(e),this.sourceSpan(e),t)}}return this.parseCallChain()}parseCallChain(){let e=this.parsePrimary();const t=e.span.start;for(;;)if(this.consumeOptionalCharacter(46))e=this.parseAccessMemberOrMethodCall(e,!1);else if(this.consumeOptionalOperator("?."))e=this.parseAccessMemberOrMethodCall(e,!0);else if(this.consumeOptionalCharacter(91))this.withContext(io.Writable,()=>{this.rbracketsExpected++;const n=this.parsePipe();if(n instanceof br&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("=")){const s=this.parseConditional();e=new Lr(this.span(t),this.sourceSpan(t),e,n,s)}else e=new Mr(this.span(t),this.sourceSpan(t),e,n)});else if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const n=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(41),e=new zr(this.span(t),this.sourceSpan(t),e,n)}else{if(!this.consumeOptionalOperator("!"))return e;e=new qr(this.span(t),this.sourceSpan(t),e)}}parsePrimary(){const e=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const e=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),e}if(this.next.isKeywordNull())return this.advance(),new Dr(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new Dr(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new Dr(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new Dr(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new Tr(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;const t=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new Fr(this.span(e),this.sourceSpan(e),t)}if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new Ir(this.span(e),this.sourceSpan(e)),!1);if(this.next.isNumber()){const t=this.next.toNumber();return this.advance(),new Dr(this.span(e),this.sourceSpan(e),t)}if(this.next.isString()){const t=this.next.toString();return this.advance(),new Dr(this.span(e),this.sourceSpan(e),t)}return this.index>=this.tokens.length?(this.error("Unexpected end of expression: "+this.input),new br(this.span(e),this.sourceSpan(e))):(this.error("Unexpected token "+this.next),new br(this.span(e),this.sourceSpan(e)))}parseExpressionList(e){const t=[];if(!this.next.isCharacter(e))do{t.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return t}parseLiteralMap(){const e=[],t=[],n=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{const n=this.next.isString(),s=this.expectIdentifierOrKeywordOrString();e.push({key:s,quoted:n}),this.expectCharacter(58),t.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));this.rbracesExpected--,this.expectCharacter(125)}return new Br(this.span(n),this.sourceSpan(n),e,t)}parseAccessMemberOrMethodCall(e,t=!1){const n=e.span.start,s=this.inputIndex,r=this.expectIdentifierOrKeyword(),i=this.sourceSpan(s);if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const s=this.parseCallArguments();this.expectCharacter(41),this.rparensExpected--;const a=this.span(n),o=this.sourceSpan(n);return t?new Wr(a,o,i,e,r,s):new Hr(a,o,i,e,r,s)}if(t)return this.consumeOptionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new br(this.span(n),this.sourceSpan(n))):new Or(this.span(n),this.sourceSpan(n),i,e,r);if(this.consumeOptionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new br(this.span(n),this.sourceSpan(n));const t=this.parseConditional();return new kr(this.span(n),this.sourceSpan(n),i,e,r,t)}return new Pr(this.span(n),this.sourceSpan(n),i,e,r)}parseCallArguments(){if(this.next.isCharacter(41))return[];const e=[];do{e.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return e}expectTemplateBindingKey(){let e="",t=!1;const n=this.currentAbsoluteOffset;do{e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-")}while(t);return{source:e,span:new Kr(n,n+e.length)}}parseTemplateBindings(e){const t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index<this.tokens.length;){const n=this.parseLetBinding();if(n)t.push(n);else{const n=this.expectTemplateBindingKey(),s=this.parseAsBinding(n);s?t.push(s):(n.source=e.source+n.source[0].toUpperCase()+n.source.substring(1),t.push(...this.parseDirectiveKeywordBindings(n)))}this.consumeStatementTerminator()}return new eo(t,[],this.errors)}parseDirectiveKeywordBindings(e){const t=[];this.consumeOptionalCharacter(58);const n=this.getDirectiveBoundTarget();let s=this.currentAbsoluteOffset;const r=this.parseAsBinding(e);r||(this.consumeStatementTerminator(),s=this.currentAbsoluteOffset);const i=new Kr(e.span.start,s);return t.push(new Qr(i,e,n)),r&&t.push(r),t}getDirectiveBoundTarget(){if(this.next===Ka||this.peekKeywordAs()||this.peekKeywordLet())return null;const e=this.parsePipe(),{start:t,end:n}=e.span,s=this.input.substring(t,n);return new Xr(e,s,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();const t=this.expectTemplateBindingKey();this.consumeStatementTerminator();const n=new Kr(e.span.start,this.currentAbsoluteOffset);return new Gr(n,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;const e=this.currentAbsoluteOffset;this.advance();const t=this.expectTemplateBindingKey();let n=null;this.consumeOptionalOperator("=")&&(n=this.expectTemplateBindingKey()),this.consumeStatementTerminator();const s=new Kr(e,this.currentAbsoluteOffset);return new Gr(s,t,n)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(e,t=null){this.errors.push(new Sr(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(e=null){return null==e&&(e=this.index),e<this.tokens.length?`at column ${this.tokens[e].index+1} in`:"at the end of the expression"}skip(){let e=this.next;for(;this.index<this.tokens.length&&!e.isCharacter(59)&&(this.rparensExpected<=0||!e.isCharacter(41))&&(this.rbracesExpected<=0||!e.isCharacter(125))&&(this.rbracketsExpected<=0||!e.isCharacter(93))&&!(this.context&io.Writable&&e.isOperator("="));)this.next.isError()&&this.errors.push(new Sr(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next}}class oo{constructor(){this.errors=[]}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){}visitLiteralPrimitive(e,t){}visitPropertyRead(e,t){}visitPropertyWrite(e,t){}visitSafePropertyRead(e,t){}visitMethodCall(e,t){}visitSafeMethodCall(e,t){}visitFunctionCall(e,t){}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitUnary(e,t){}visitBinary(e,t){}visitPrefixNot(e,t){}visitNonNullAssert(e,t){}visitConditional(e,t){}visitPipe(e,t){this.errors.push("pipes")}visitKeyedRead(e,t){}visitKeyedWrite(e,t){}visitAll(e,t){return e.map(e=>e.visit(this,t))}visitChain(e,t){}visitQuote(e,t){}}class lo extends Yr{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}}let co;function uo(){return co||(co={},po(Ae.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),po(Ae.STYLE,["*|style"]),po(Ae.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"]),po(Ae.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"])),co}function po(e,t){for(const n of t)co[n.toLowerCase()]=e}const ho=["[Element]|textContent,%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate","abbr,address,article,aside,b,bdi,bdo,cite,code,dd,dfn,dt,em,figcaption,figure,footer,header,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,src,%srcObject,#volume",":svg:^[HTMLElement]|*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex",":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,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,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","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,referrerPolicy,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]|","slot^[HTMLElement]|name","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: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","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|"],mo={class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"};class go extends class{}{constructor(){super(),this._schema={},ho.forEach(e=>{const t={},[n,s]=e.split("|"),r=s.split(","),[i,a]=n.split("^");i.split(",").forEach(e=>this._schema[e.toLowerCase()]=t);const o=a&&this._schema[a.toLowerCase()];o&&Object.keys(o).forEach(e=>{t[e]=o[e]}),r.forEach(e=>{if(e.length>0)switch(e[0]){case"*":break;case"!":t[e.substring(1)]="boolean";break;case"#":t[e.substring(1)]="number";break;case"%":t[e.substring(1)]="object";break;default:t[e]="string"}})})}hasProperty(e,t,n){if(n.some(e=>"no-errors-schema"===e.name))return!0;if(e.indexOf("-")>-1){if(de(e)||me(e))return!1;if(n.some(e=>"custom-elements"===e.name))return!0}return!!(this._schema[e.toLowerCase()]||this._schema.unknown)[t]}hasElement(e,t){if(t.some(e=>"no-errors-schema"===e.name))return!0;if(e.indexOf("-")>-1){if(de(e)||me(e))return!0;if(t.some(e=>"custom-elements"===e.name))return!0}return!!this._schema[e.toLowerCase()]}securityContext(e,t,n){n&&(t=this.getMappedPropName(t)),e=e.toLowerCase(),t=t.toLowerCase();let s=uo()[e+"|"+t];return s||(s=uo()["*|"+t],s||Ae.NONE)}getMappedPropName(e){return mo[e]||e}getDefaultComponentElementName(){return"ng-component"}validateProperty(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`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.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Object.keys(this._schema)}normalizeAnimationStyleProperty(e){return e.replace(Gt,(...e)=>e[1].toUpperCase())}normalizeAnimationStyleValue(e,t,n){let s="";const r=n.toString().trim();let i=null;if(function(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}}(e)&&0!==n&&"0"!==n)if("number"==typeof n)s="px";else{const e=n.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&(i=`Please provide a CSS unit value for ${t}:${n}`)}return{error:i,value:r+s}}}const fo=/^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/;class vo{constructor(e){this.bindingParser=e,this.errors=[],this.styles=[],this.styleUrls=[],this.ngContentSelectors=[],this.inI18nBlock=!1}visitElement(e){const t=us(e.i18n);t&&(this.inI18nBlock&&this.reportError("Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.",e.sourceSpan),this.inI18nBlock=!0);const n=ka(e);if(n.type===Oa.SCRIPT)return null;if(n.type===Oa.STYLE){const t=1===(s=e).children.length&&s.children[0]instanceof qi?s.children[0].value:null;return null!==t&&this.styles.push(t),null}if(n.type===Oa.STYLESHEET&&function(e){if(null==e||0===e.length||"/"==e[0])return!1;const t=e.match(ba);return null===t||"package"==t[1]||"asset"==t[1]}(n.hrefAttr))return this.styleUrls.push(n.hrefAttr),null;var s;const r="ng-template"===he(e.name)[1],i=[],a=[],o=[],l=[],c=[],u={},p=[],h=[];let d=!1;for(const t of e.attrs){let e=!1;const n=xo(t.name);let s=!1;if(t.i18n&&(u[t.name]=t.i18n),n.startsWith("*")){d&&this.reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",t.sourceSpan),s=!0,d=!0;const e=t.value,r=n.substring("*".length),i=[];this.bindingParser.parseInlineTemplateBinding(r,e,t.sourceSpan,t.valueSpan?t.valueSpan.start.offset:t.sourceSpan.start.offset+t.name.length,[],p,i,!0),h.push(...i.map(e=>new Mn(e.name,e.value,e.sourceSpan,e.keySpan,e.valueSpan)))}else e=this.parseAttribute(r,t,[],i,a,o,l);e||s||c.push(this.visitAttribute(t))}const m=Gi(n.nonBindable?yo:this,e.children);let g;if(n.type===Oa.NG_CONTENT){e.children&&!e.children.every(e=>function(e){return e instanceof qi&&0==e.value.trim().length}(e)||function(e){return e instanceof Xi}(e))&&this.reportError("<ng-content> element cannot have content.",e.sourceSpan);const t=n.selectAttr,s=e.attrs.map(e=>this.visitAttribute(e));g=new On(t,s,e.sourceSpan,e.i18n),this.ngContentSelectors.push(t)}else if(r){const t=this.extractAttributes(e.name,i,u);g=new kn(e.name,c,t.bound,a,[],m,l,o,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}else{const t=this.extractAttributes(e.name,i,u);g=new Pn(e.name,c,t.bound,a,m,l,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}if(d){const n=this.extractAttributes("ng-template",p,u),s=[];n.literal.forEach(e=>s.push(e)),n.bound.forEach(e=>s.push(e));const i=g instanceof Pn?{attributes:g.attributes,inputs:g.inputs,outputs:g.outputs}:{attributes:[],inputs:[],outputs:[]};g=new kn(g.name,i.attributes,i.inputs,i.outputs,s,[g],[],h,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,r&&t?void 0:e.i18n)}return t&&(this.inI18nBlock=!1),g}visitAttribute(e){return new Tn(e.name,e.value,e.sourceSpan,e.valueSpan,e.i18n)}visitText(e){return this._visitTextWithInterpolation(e.value,e.sourceSpan,e.i18n)}visitExpansion(e){if(!e.i18n)return null;if(!us(e.i18n))throw new Error(`Invalid type "${e.i18n.constructor}" for "i18n" property of ${e.sourceSpan.toString()}. Expected a "Message"`);const t=e.i18n,n={},s={};return Object.keys(t.placeholders).forEach(e=>{const r=t.placeholders[e];if(e.startsWith("VAR_")){const t=e.trim(),s=this.bindingParser.parseInterpolationExpression(r.text,r.sourceSpan);n[t]=new In(s,r.sourceSpan)}else s[e]=this._visitTextWithInterpolation(r.text,r.sourceSpan)}),new Rn(n,s,e.sourceSpan,t)}visitExpansionCase(e){return null}visitComment(e){return null}extractAttributes(e,t,n){const s=[],r=[];return t.forEach(t=>{const i=n[t.name];if(t.isLiteral)r.push(new Tn(t.name,t.expression.source||"",t.sourceSpan,void 0,i));else{const n=this.bindingParser.createBoundElementProperty(e,t,!0,!1);s.push(Nn.fromBoundElementProperty(n,i))}}),{bound:s,literal:r}}parseAttribute(e,t,n,s,r,i,a){const o=xo(t.name),l=t.value,c=t.sourceSpan,u=t.valueSpan?t.valueSpan.start.offset:c.start.offset;function p(e,n,s){const r=e.start.moveBy(n.length+(t.name.length-o.length)),i=r.moveBy(s.length);return new ur(r,i,r,s)}const h=o.match(fo);let d=!1;if(h){if(d=!0,null!=h[1]){const e=h[7],r=p(c,h[1],e);this.bindingParser.parsePropertyBinding(e,l,!1,c,u,t.valueSpan,n,s,r)}else if(h[2])if(e){const e=h[7],n=p(c,h[2],e);this.parseVariable(e,l,c,n,t.valueSpan,i)}else this.reportError('"let-" is only supported on ng-template elements.',c);else if(h[3])this.parseReference(h[7],l,c,t.valueSpan,a);else if(h[4]){const e=[];this.bindingParser.parseEvent(h[7],l,c,t.valueSpan||c,n,e),So(e,r)}else if(h[5]){const e=h[7],i=p(c,h[5],e);this.bindingParser.parsePropertyBinding(e,l,!1,c,u,t.valueSpan,n,s,i),this.parseAssignmentEvent(e,l,c,t.valueSpan,n,r)}else if(h[6]){const e=p(c,"",o);this.bindingParser.parseLiteralAttr(o,l,c,u,t.valueSpan,n,s,e)}else if(h[8]){const e=p(c,"[(",h[8]);this.bindingParser.parsePropertyBinding(h[8],l,!1,c,u,t.valueSpan,n,s,e),this.parseAssignmentEvent(h[8],l,c,t.valueSpan,n,r)}else if(h[9]){const e=p(c,"[",h[9]);this.bindingParser.parsePropertyBinding(h[9],l,!1,c,u,t.valueSpan,n,s,e)}else if(h[10]){const e=[];this.bindingParser.parseEvent(h[10],l,c,t.valueSpan||c,n,e),So(e,r)}}else{const e=p(c,"",o);d=this.bindingParser.parsePropertyInterpolation(o,l,c,t.valueSpan,n,s,e)}return d}_visitTextWithInterpolation(e,t,n){const s=_a(e),r=this.bindingParser.parseInterpolation(s,t);return r?new In(r,t,n):new bn(s,t)}parseVariable(e,t,n,s,r,i){e.indexOf("-")>-1?this.reportError('"-" is not allowed in variable names',n):0===e.length&&this.reportError("Variable does not have a name",n),i.push(new Mn(e,t,n,s,r))}parseReference(e,t,n,s,r){e.indexOf("-")>-1?this.reportError('"-" is not allowed in reference names',n):0===e.length&&this.reportError("Reference does not have a name",n),r.push(new Ln(e,t,n,s))}parseAssignmentEvent(e,t,n,s,r,i){const a=[];this.bindingParser.parseEvent(e+"Change",t+"=$event",n,s||n,r,a),So(a,i)}reportError(e,t,n=pr.ERROR){this.errors.push(new gr(t,e,n))}}const yo=new class{visitElement(e){const t=ka(e);if(t.type===Oa.SCRIPT||t.type===Oa.STYLE||t.type===Oa.STYLESHEET)return null;const n=Gi(this,e.children,null);return new Pn(e.name,Gi(this,e.attrs),[],[],n,[],e.sourceSpan,e.startSourceSpan,e.endSourceSpan)}visitComment(e){return null}visitAttribute(e){return new Tn(e.name,e.value,e.sourceSpan,void 0,e.i18n)}visitText(e){return new bn(e.value,e.sourceSpan)}visitExpansion(e){return null}visitExpansionCase(e){return null}};function xo(e){return/^data-/i.test(e)?e.substring(5):e}function So(e,t){t.push(...e.map(e=>An.fromParsedEvent(e)))}var Eo;!function(e){e[e.ELEMENT=0]="ELEMENT",e[e.TEMPLATE=1]="TEMPLATE"}(Eo||(Eo={}));class _o{constructor(e,t,n=0,s=null,r,i){this.index=e,this.ref=t,this.level=n,this.templateIndex=s,this.meta=r,this.registry=i,this.bindings=new Set,this.placeholders=new Map,this.isEmitted=!1,this._unresolvedCtxCount=0,this._registry=i||{getUniqueId:gs(),icus:new Map},this.id=this._registry.getUniqueId()}appendTag(e,t,n,s){t.isVoid&&s||vs(this.placeholders,t.isVoid||!s?t.startName:t.closeName,{type:e,index:n,ctx:this.id,isVoid:t.isVoid,closed:s})}get icus(){return this._registry.icus}get isRoot(){return 0===this.level}get isResolved(){return 0===this._unresolvedCtxCount}getSerializedPlaceholders(){const e=new Map;return this.placeholders.forEach((t,n)=>e.set(n,t.map(Io))),e}appendBinding(e){this.bindings.add(e)}appendIcu(e,t){vs(this._registry.icus,e,t)}appendBoundText(e){ys(e,this.bindings.size,this.id).forEach((e,t)=>vs(this.placeholders,t,...e))}appendTemplate(e,t){this.appendTag(Eo.TEMPLATE,e,t,!1),this.appendTag(Eo.TEMPLATE,e,t,!0),this._unresolvedCtxCount++}appendElement(e,t,n){this.appendTag(Eo.ELEMENT,e,t,n)}appendProjection(e,t){this.appendTag(Eo.ELEMENT,e,t,!1),this.appendTag(Eo.ELEMENT,e,t,!0)}forkChildContext(e,t,n){return new _o(e,this.ref,this.level+1,t,n,this._registry)}reconcileChildContext(e){["start","close"].forEach(t=>{const n=(this.placeholders.get(e.meta[t+"Name"])||[]).find(bo(this.id,e.templateIndex));n&&(n.ctx=e.id)}),e.placeholders.forEach((t,n)=>{const s=this.placeholders.get(n);if(!s)return void this.placeholders.set(n,t);const r=s.findIndex(bo(e.id,e.templateIndex));if(r>=0){const e=n.startsWith("CLOSE");n.endsWith("NG-TEMPLATE")?s.splice(r+(e?0:1),0,...t):(t[e?t.length-1:0].tmpl=s[r],s.splice(r,1,...t))}else s.push(...t);this.placeholders.set(n,s)}),this._unresolvedCtxCount--}}function Co(e,t,n,s){return ms(`${s?"/":""}${e}${t}`,n)}function wo(e,{index:t,ctx:n,isVoid:s},r){return s?Co(e,t,n)+Co(e,t,n,!0):Co(e,t,n,r)}function bo(e,t){return n=>"object"==typeof n&&n.type===Eo.TEMPLATE&&n.index===t&&n.ctx===e}function Io(e){const t=(e,t)=>wo("#",e,t),n=(e,t)=>wo("*",e,t);switch(e.type){case Eo.ELEMENT:return e.closed?t(e,!0)+(e.tmpl?n(e.tmpl,!0):""):e.tmpl?n(e.tmpl)+t(e)+(e.isVoid?n(e.tmpl,!0):""):t(e);case Eo.TEMPLATE:return n(e,e.closed);default:return e}}const To=new class{visitText(e){return e.value}visitContainer(e){return e.children.map(e=>e.visit(this)).join("")}visitIcu(e){const t=Object.keys(e.cases).map(t=>`${t} {${e.cases[t].visit(this)}}`);return`{${e.expressionPlaceholder}, ${e.type}, ${t.join(" ")}}`}visitTagPlaceholder(e){return e.isVoid?this.formatPh(e.startName):`${this.formatPh(e.startName)}${e.children.map(e=>e.visit(this)).join("")}${this.formatPh(e.closeName)}`}visitPlaceholder(e){return this.formatPh(e.name)}visitIcuPlaceholder(e,t){return this.formatPh(e.name)}formatPh(e){return`{${Ss(e,!1)}}`}};function No(e){return e.visit(To)}const Ao={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"};class Po{constructor(){this._placeHolderNameCounts={},this._signatureToName={}}getStartTagPlaceholderName(e,t,n){const s=this._hashTag(e,t,n);if(this._signatureToName[s])return this._signatureToName[s];const r=e.toUpperCase(),i=Ao[r]||"TAG_"+r,a=this._generateUniqueName(n?i:"START_"+i);return this._signatureToName[s]=a,a}getCloseTagPlaceholderName(e){const t=this._hashClosingTag(e);if(this._signatureToName[t])return this._signatureToName[t];const n=e.toUpperCase(),s=this._generateUniqueName("CLOSE_"+(Ao[n]||"TAG_"+n));return this._signatureToName[t]=s,s}getPlaceholderName(e,t){const n=e.toUpperCase(),s=`PH: ${n}=${t}`;if(this._signatureToName[s])return this._signatureToName[s];const r=this._generateUniqueName(n);return this._signatureToName[s]=r,r}getUniquePlaceholder(e){return this._generateUniqueName(e.toUpperCase())}_hashTag(e,t,n){return"<"+e+Object.keys(t).sort().map(e=>` ${e}=${t[e]}`).join("")+(n?"/>":`></${e}>`)}_hashClosingTag(e){return this._hashTag("/"+e,{},!1)}_generateUniqueName(e){if(!this._placeHolderNameCounts.hasOwnProperty(e))return this._placeHolderNameCounts[e]=1,e;const t=this._placeHolderNameCounts[e];return this._placeHolderNameCounts[e]=t+1,`${e}_${t}`}}const ko=new so(new qa);function Oo(e,t){return t}class Mo{constructor(e,t){this._expressionParser=e,this._interpolationConfig=t}toI18nMessage(e,t="",n="",s="",r){const i={isIcu:1==e.length&&e[0]instanceof Hi,icuDepth:0,placeholderRegistry:new Po,placeholderToContent:{},placeholderToMessage:{},visitNodeFn:r||Oo},a=Gi(this,e,i);return new Fn(a,i.placeholderToContent,i.placeholderToMessage,t,n,s)}visitElement(e,t){var n;const s=Gi(this,e.children,t),r={};e.attrs.forEach(e=>{r[e.name]=e.value});const i=Ee(e.name).isVoid,a=t.placeholderRegistry.getStartTagPlaceholderName(e.name,r,i);t.placeholderToContent[a]={text:e.startSourceSpan.toString(),sourceSpan:e.startSourceSpan};let o="";i||(o=t.placeholderRegistry.getCloseTagPlaceholderName(e.name),t.placeholderToContent[o]={text:`</${e.name}>`,sourceSpan:null!==(n=e.endSourceSpan)&&void 0!==n?n:e.sourceSpan});const l=new jn(e.name,r,a,o,s,i,e.sourceSpan,e.startSourceSpan,e.endSourceSpan);return t.visitNodeFn(e,l)}visitAttribute(e,t){const n=this._visitTextWithInterpolation(e.value,e.sourceSpan,t);return t.visitNodeFn(e,n)}visitText(e,t){const n=this._visitTextWithInterpolation(e.value,e.sourceSpan,t);return t.visitNodeFn(e,n)}visitComment(e,t){return null}visitExpansion(e,t){t.icuDepth++;const n={},s=new Vn(e.switchValue,e.type,n,e.sourceSpan);if(e.cases.forEach(e=>{n[e.value]=new $n(e.expression.map(e=>e.visit(this,t)),e.expSourceSpan)}),t.icuDepth--,t.isIcu||t.icuDepth>0){const n=t.placeholderRegistry.getUniquePlaceholder("VAR_"+e.type);return s.expressionPlaceholder=n,t.placeholderToContent[n]={text:e.switchValue,sourceSpan:e.switchValueSourceSpan},t.visitNodeFn(e,s)}const r=t.placeholderRegistry.getPlaceholderName("ICU",e.sourceSpan.toString());t.placeholderToMessage[r]=this.toI18nMessage([e],"","","",void 0);const i=new qn(s,r,e.sourceSpan);return t.visitNodeFn(e,i)}visitExpansionCase(e,t){throw new Error("Unreachable code")}_visitTextWithInterpolation(e,t,n){const s=this._expressionParser.splitInterpolation(e,t.start.toString(),this._interpolationConfig);if(!s)return new Bn(e,t);const r=[],i=new $n(r,t),{start:a,end:o}=this._interpolationConfig;for(let e=0;e<s.strings.length-1;e++){const i=s.expressions[e],l=i.split(Ro)[2]||"INTERPOLATION",c=n.placeholderRegistry.getPlaceholderName(l,i);if(s.strings[e].length){const n=Lo(t,s.stringSpans[e]);r.push(new Bn(s.strings[e],n))}const u=Lo(t,s.expressionsSpans[e]);r.push(new Un(i,c,u)),n.placeholderToContent[c]={text:a+i+o,sourceSpan:u}}const l=s.strings.length-1;if(s.strings[l].length){const e=Lo(t,s.stringSpans[l]);r.push(new Bn(s.strings[l],e))}return i}}function Lo(e,{start:t,end:n}){return new ur(e.fullStart.moveBy(t),e.fullStart.moveBy(n))}const Ro=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g,Do=(e,t)=>(e instanceof Ui&&(t instanceof qn&&e.i18n instanceof Fn&&(t.previousMessage=e.i18n),e.i18n=t),t);class Fo{constructor(e=qs,t=!1,n=!1){this.interpolationConfig=e,this.keepI18nAttrs=t,this.enableI18nLegacyMessageIdFormat=n,this.hasI18nMeta=!1,this._createI18nMessage=function(e){const t=new Mo(ko,e);return(e,n,s,r,i)=>t.toI18nMessage(e,n,s,r,i)}(this.interpolationConfig)}_generateI18nMessage(e,t="",n){const{meaning:s,description:r,customId:i}=this._parseMetadata(t),a=this._createI18nMessage(e,s,r,i,n);return this._setMessageId(a,t),this._setLegacyIds(a,t),a}visitElement(e){if(function(e){return e.attrs.some(e=>cs(e.name))}(e)){this.hasI18nMeta=!0;const t=[],n={};for(const s of e.attrs)if("i18n"===s.name){const t=this._generateI18nMessage(e.children,e.i18n||s.value,Do);t.nodes.length&&(e.i18n=t)}else s.name.startsWith("i18n-")?n[s.name.slice("i18n-".length)]=s.value:t.push(s);if(Object.keys(n).length)for(const e of t){const t=n[e.name];void 0!==t&&e.value&&(e.i18n=this._generateI18nMessage([e],e.i18n||t))}this.keepI18nAttrs||(e.attrs=t)}return Gi(this,e.children,e.i18n),e}visitExpansion(e,t){let n;const s=e.i18n;if(this.hasI18nMeta=!0,s instanceof qn){const t=s.name;n=this._generateI18nMessage([e],s),ds(n).name=t}else n=this._generateI18nMessage([e],t||s);return e.i18n=n,e}visitText(e){return e}visitAttribute(e){return e}visitComment(e){return e}visitExpansionCase(e){return e}_parseMetadata(e){return"string"==typeof e?function(e=""){let t,n,s;if(e=e.trim()){const r=e.indexOf("@@"),i=e.indexOf("|");let a;[a,t]=r>-1?[e.slice(0,r),e.slice(r+2)]:[e,""],[n,s]=i>-1?[a.slice(0,i),a.slice(i+1)]:["",a]}return{customId:t,meaning:n,description:s}}(e):e instanceof Fn?e:{}}_setMessageId(e,t){e.id||(e.id=t instanceof Fn&&t.id||function(e){return e.id||Wn(e)}(e))}_setLegacyIds(e,t){if(this.enableI18nLegacyMessageIdFormat)e.legacyIds=[Hn(e),Wn(e)];else if("string"!=typeof t){const n=t instanceof Fn?t:t instanceof qn?t.previousMessage:void 0;e.legacyIds=n?n.legacyIds:[]}}}function Bo(e,t,n,s){const r=[zt(function(e){return e.nodes.map(e=>e.visit($o,null)).join("")}(t))];Object.keys(s).length&&r.push(vr(s,!0));const i=n.set(Bt("goog.getMsg").callFn(r)).toConstDecl(),a=function(e){const t=[];return e.description&&t.push({tagName:"desc",text:e.description}),e.meaning&&t.push({tagName:"meaning",text:e.meaning}),0==t.length?null:function(e=[]){return new kt(e)}(t)}(t);return null!==a&&i.addLeadingComment(a),[i,new Rt(e.set(n))]}const $o=new class{formatPh(e){return`{$${Ss(e)}}`}visitText(e){return e.value}visitContainer(e){return e.children.map(e=>e.visit(this)).join("")}visitIcu(e){return No(e)}visitTagPlaceholder(e){return e.isVoid?this.formatPh(e.startName):`${this.formatPh(e.startName)}${e.children.map(e=>e.visit(this)).join("")}${this.formatPh(e.closeName)}`}visitPlaceholder(e){return this.formatPh(e.name)}visitIcuPlaceholder(e,t){return this.formatPh(e.name)}};function Vo(e,t,n){const{messageParts:s,placeHolders:r}=function(e){const t=[];return e.nodes.forEach(e=>e.visit(jo,t)),function(e){const t=[],n=[];e[0]instanceof lt&&t.push(Uo(e[0].sourceSpan.start));for(let s=0;s<e.length;s++){const r=e[s];r instanceof ot?t.push(r):(n.push(r),e[s-1]instanceof lt&&t.push(Uo(e[s-1].sourceSpan.end)))}return e[e.length-1]instanceof lt&&t.push(Uo(e[e.length-1].sourceSpan.end)),{messageParts:t,placeHolders:n}}(t)}(t),i=function(e){const t=e.nodes[0];return new ur(t.sourceSpan.start,e.nodes[e.nodes.length-1].sourceSpan.end,t.sourceSpan.fullStart,t.sourceSpan.details)}(t),a=r.map(e=>n[e.text]),o=function(e,t,n,s,r){return new ct(e,t,n,s,r)}(t,s,r,a,i),l=e.set(o);return[new Rt(l)]}const jo=new class{visitText(e,t){t[t.length-1]instanceof ot?t[t.length-1].text+=e.value:t.push(new ot(e.value,e.sourceSpan))}visitContainer(e,t){e.children.forEach(e=>e.visit(this,t))}visitIcu(e,t){t.push(new ot(No(e),e.sourceSpan))}visitTagPlaceholder(e,t){var n,s;t.push(this.createPlaceholderPiece(e.startName,null!==(n=e.startSourceSpan)&&void 0!==n?n:e.sourceSpan)),e.isVoid||(e.children.forEach(e=>e.visit(this,t)),t.push(this.createPlaceholderPiece(e.closeName,null!==(s=e.endSourceSpan)&&void 0!==s?s:e.sourceSpan)))}visitPlaceholder(e,t){t.push(this.createPlaceholderPiece(e.name,e.sourceSpan))}visitIcuPlaceholder(e,t){t.push(this.createPlaceholderPiece(e.name,e.sourceSpan))}createPlaceholderPiece(e,t){return new lt(Ss(e,!1),t)}};function Uo(e){return new ot("",new ur(e,e))}const qo=new Set(["$event"]),Ho=new Map([["window",Sn.resolveWindow],["document",Sn.resolveDocument],["body",Sn.resolveBody]]),Wo=[" ","\n","\r","\t"];function zo(e,t){return Wt(Bt("rf").bitwiseAnd(zt(e),null,!1),t)}function Ko(e,t=null,n=null){const{type:s,name:r,target:i,phase:a,handler:o}=e;if(i&&!Ho.has(i))throw new Error(`Unexpected global target '${i}' defined for '${r}' event.\n Supported list of global targets: ${Array.from(Ho.keys())}.`);const l=new Set,c=null===n||0===n.bindingLevel?Bt("ctx"):n.getOrCreateSharedContextVar(0),u=function(e,t,n,s,r,i,a,o){e||(e=new di(qo));const l=function(e,t){const n=new pi(e);return t.visit(n)}({createLiteralArrayConverter:e=>e=>Ut(e),createLiteralMapConverter:e=>t=>qt(e.map((e,n)=>({key:e.key,value:t[n],quoted:e.quoted}))),createPipeConverter:e=>{throw new Error("Illegal State: Actions are not allowed to contain pipes. Pipe: "+e)}},n),c=new hi(e,t,"b",()=>Zt("Unexpected interpolation"),i,a),u=[];!function e(t,n){Array.isArray(t)?t.forEach(t=>e(t,n)):n.push(t)}(l.visit(c,mr.Statement),u),function(e,t,n){for(let t=e-1;t>=0;t--)n.unshift(li("b",t))}(c.temporaryCount,0,u),c.usesImplicitReceiver&&e.notifyImplicitReceiverUse();const p=u.length-1;let h=null;if(p>=0){const e=(d=u[p])instanceof Rt?d.expr:d instanceof Dt?d.value:null;e&&(h=Bt("pd_b"),u[p]=h.set(e.cast(Be).notIdentical(zt(!1))).toDeclStmt(null,[Pt.Final]))}var d;return new si(u,h)}(n,c,o,0,0,e.handlerSpan,l),p=[];n&&(p.push(...n.restoreViewStatement()),p.push(...n.variableDeclarations())),p.push(...u.render3Stmts);const h=1===s?function(e,t){return`@${e}.${t}`}(r,a):r,d=t&&fn(t),m=[];l.has("$event")&&m.push(new xt("$event",Be));const g=Ht(m,p,$e,null,d),f=[zt(h),g];return i&&f.push(zt(!1),$t(Ho.get(i))),f}class Xo{constructor(e,t,n=0,s,r,i,a,o,l,c,u,p,h,d,m={prepareStatements:[],constExpressions:[]}){this.constantPool=e,this.level=n,this.contextName=s,this.i18nContext=r,this.templateIndex=i,this.templateName=a,this.directiveMatcher=o,this.directives=l,this.pipeTypeByName=c,this.pipes=u,this._namespace=p,this.i18nUseExternalIds=d,this._constants=m,this._dataIndex=0,this._bindingContext=0,this._prefixCode=[],this._creationCodeFns=[],this._updateCodeFns=[],this._currentIndex=0,this._tempVariables=[],this._nestedTemplateFns=[],this._unsupported=bs,this.i18n=null,this._pureFunctionSlots=0,this._bindingSlots=0,this._ngContentReservedSlots=[],this._ngContentSelectorsOffset=0,this._implicitReceiverExpr=null,this.visitReference=Is,this.visitVariable=Is,this.visitTextAttribute=Is,this.visitBoundAttribute=Is,this.visitBoundEvent=Is,this._bindingScope=t.nestedScope(n),this.fileBasedI18nSuffix=h.replace(/[^A-Za-z0-9]/g,"_")+"_",this._valueConverter=new Go(e,()=>this.allocateDataSlot(),e=>this.allocatePureFunctionSlots(e),(e,t,n,s)=>{const r=c.get(e);r&&this.pipes.add(r),this._bindingScope.set(this.level,t,s),this.creationInstruction(null,Sn.pipe,[zt(n),zt(e)])})}buildTemplateFunction(e,t,n=0,s){this._ngContentSelectorsOffset=n,this._namespace!==Sn.namespaceHTML&&this.creationInstruction(null,this._namespace),t.forEach(e=>this.registerContextVariables(e));const r=this.i18nContext||us(s)&&!ps(s)&&!(1===(i=e).length&&i[0]instanceof Pn&&e[0].i18n===s);var i;const a=cl(e);if(r&&this.i18nStart(null,s,a),Dn(this,e),this._pureFunctionSlots+=this._bindingSlots,this._valueConverter.updatePipeSlotOffsets(this._bindingSlots),this._nestedTemplateFns.forEach(e=>e()),0===this.level&&this._ngContentReservedSlots.length){const e=[];if(this._ngContentReservedSlots.length>1||"*"!==this._ngContentReservedSlots[0]){const t=this._ngContentReservedSlots.map(e=>"*"!==e?Le(e):e);e.push(this.constantPool.getConstLiteral(Ts(t),!0))}this.creationInstruction(null,Sn.projectionDef,e,!0)}r&&this.i18nEnd(null,a);const o=this._creationCodeFns.map(e=>e()),l=this._updateCodeFns.map(e=>e()),c=this._bindingScope.viewSnapshotStatements(),u=this._bindingScope.variableDeclarations().concat(this._tempVariables),p=o.length>0?[zo(1,c.concat(o))]:[],h=l.length>0?[zo(2,u.concat(l))]:[];return Ht([new xt("rf",je),new xt("ctx",null)],[...this._prefixCode,...p,...h],$e,null,this.templateName)}getLocal(e){return this._bindingScope.get(e)}notifyImplicitReceiverUse(){this._bindingScope.notifyImplicitReceiverUse()}i18nTranslate(e,t={},n,s){const r=n||this.i18nGenerateMainBlockVar(),i=function(e,t,n,s={},r){const i=[_s(t),Wt(ul(),Bo(t,e,n,xs(s,!0)),Vo(t,e,xs(s,!1)))];return r&&i.push(new Rt(t.set(r(t)))),i}(e,r,this.i18nGenerateClosureVar(e.id),t,s);return this._constants.prepareStatements.push(...i),r}registerContextVariables(e){const t=this._bindingScope.freshReferenceName(),n=this.level,s=Bt(e.name+t);this._bindingScope.set(n,e.name,s,1,(t,r)=>{let i;return i=t.bindingLevel===n?Bt("ctx"):t.getSharedContextName(n)||Jo(r),[s.set(i.prop(e.value||"$implicit")).toConstDecl()]})}i18nAppendBindings(e){e.length>0&&e.forEach(e=>this.i18n.appendBinding(e))}i18nBindProps(e){const t={};return Object.keys(e).forEach(n=>{const s=e[n];if(s instanceof bn)t[n]=zt(s.value);else{const e=s.value.visit(this._valueConverter);if(this.allocateBindingSlots(e),e instanceof $r){const{strings:s,expressions:r}=e,{id:i,bindings:a}=this.i18n,o=function(e,t=0,n=0){if(!e.length)return"";let s="";const r=e.length-1;for(let i=0;i<r;i++)s+=`${e[i]}${ms(t+i,n)}`;return s+=e[r],s}(s,a.size,i);this.i18nAppendBindings(r),t[n]=zt(o)}}}),t}i18nGenerateMainBlockVar(){return Bt(this.constantPool.uniqueName("i18n_"))}i18nGenerateClosureVar(e){let t;const n=this.fileBasedI18nSuffix.toUpperCase();if(this.i18nUseExternalIds){const s=Es("EXTERNAL_"),r=this.constantPool.uniqueName(n);t=`${s}${fn(e)}$$${r}`}else{const e=Es(n);t=this.constantPool.uniqueName(e)}return Bt(t)}i18nUpdateRef(e){const{icus:t,meta:n,isRoot:s,isResolved:r,isEmitted:i}=e;if(s&&r&&!i&&!ps(n)){e.isEmitted=!0;const s=e.getSerializedPlaceholders();let r,i={},a=s.size?fs(s):{};t.size&&t.forEach((e,t)=>{if(1===e.length)a[t]=e[0];else{const n=ms("I18N_EXP_"+t);a[t]=zt(n),i[t]=Ut(e)}}),(Array.from(s.values()).some(e=>e.length>1)||Object.keys(i).length)&&(r=e=>{const t=[e];return Object.keys(i).length&&t.push(vr(i,!0)),Zo(null,Sn.i18nPostprocess,t)}),this.i18nTranslate(n,a,e.ref,r)}}i18nStart(e=null,t,n){const s=this.allocateDataSlot();this.i18n=this.i18nContext?this.i18nContext.forkChildContext(s,this.templateIndex,t):new _o(s,this.i18nGenerateMainBlockVar(),0,this.templateIndex,t);const{id:r,ref:i}=this.i18n,a=[zt(s),this.addToConsts(i)];r>0&&a.push(zt(r)),this.creationInstruction(e,n?Sn.i18n:Sn.i18nStart,a)}i18nEnd(e=null,t){if(!this.i18n)throw new Error("i18nEnd is executed with no i18n context present");this.i18nContext?(this.i18nContext.reconcileChildContext(this.i18n),this.i18nUpdateRef(this.i18nContext)):this.i18nUpdateRef(this.i18n);const{index:n,bindings:s}=this.i18n;if(s.size){const t=[];s.forEach(n=>{t.push({sourceSpan:e,value:()=>this.convertPropertyBinding(n)})}),this.updateInstructionChainWithAdvance(this.getConstCount()-1,Sn.i18nExp,t),this.updateInstruction(e,Sn.i18nApply,[zt(n)])}t||this.creationInstruction(e,Sn.i18nEnd),this.i18n=null}i18nAttributesInstruction(e,t,n){let s=!1;const r=[],i=[];if(t.forEach(e=>{const t=e.i18n,a=e.value.visit(this._valueConverter);if(this.allocateBindingSlots(a),a instanceof $r){const o=fs(ys(t));r.push(zt(e.name),this.i18nTranslate(t,o)),a.expressions.forEach(e=>{s=!0,i.push({sourceSpan:n,value:()=>this.convertPropertyBinding(e)})})}}),i.length>0&&this.updateInstructionChainWithAdvance(e,Sn.i18nExp,i),r.length>0){const e=zt(this.allocateDataSlot()),t=this.addToConsts(Ut(r));this.creationInstruction(n,Sn.i18nAttributes,[e,t]),s&&this.updateInstruction(n,Sn.i18nApply,[e])}}getNamespaceInstruction(e){switch(e){case"math":return Sn.namespaceMathML;case"svg":return Sn.namespaceSVG;default:return Sn.namespaceHTML}}addNamespaceInstruction(e,t){this._namespace=e,this.creationInstruction(t.startSourceSpan,e)}interpolatedUpdateInstruction(e,t,n,s,r,i){this.updateInstructionWithAdvance(t,s.sourceSpan,e,()=>[zt(n),...this.getUpdateInstructionArguments(r),...i])}visitContent(e){const t=this.allocateDataSlot(),n=this._ngContentSelectorsOffset+this._ngContentReservedSlots.length,s=[zt(t)];this._ngContentReservedSlots.push(e.selector);const r=e.attributes.filter(e=>"select"!==e.name.toLowerCase()),i=this.getAttributeExpressions(e.name,r,[],[]);i.length>0?s.push(zt(n),Ut(i)):0!==n&&s.push(zt(n)),this.creationInstruction(e.sourceSpan,Sn.projection,s),this.i18n&&this.i18n.appendProjection(e.i18n,t)}visitElement(e){var t,n;const s=this.allocateDataSlot(),r=new Ba(null);let i=!1;const a=us(e.i18n)&&!ps(e.i18n),o=[],[l,c]=he(e.name),u=de(e.name);for(const t of e.attributes){const{name:e,value:n}=t;"ngNonBindable"===e?i=!0:"style"===e?r.registerStyleAttr(n):"class"===e?r.registerClassAttr(n):o.push(t)}this.matchDirectives(e.name,e);const p=[zt(s)];u||p.push(zt(c));const h=[],d=[];e.inputs.forEach(e=>{r.registerBoundInput(e)||(0===e.type&&e.i18n?d.push(e):h.push(e))});const m=this.getAttributeExpressions(e.name,o,h,e.outputs,r,[],d);p.push(this.addAttrsToConsts(m));const g=this.prepareRefsArray(e.references);p.push(this.addToConsts(g));const f=this._namespace,v=this.getNamespaceInstruction(l);v!==f&&this.addNamespaceInstruction(v,e),this.i18n&&this.i18n.appendElement(e.i18n,s);const y=!a&&this.i18n?!cl(e.children):e.children.length>0,x=!r.hasBindingsWithPipes&&0===e.outputs.length&&0===d.length&&!y,S=!x&&cl(e.children);if(x)this.creationInstruction(e.sourceSpan,u?Sn.elementContainer:Sn.element,As(p));else{if(this.creationInstruction(e.startSourceSpan,u?Sn.elementContainerStart:Sn.elementStart,As(p)),i&&this.creationInstruction(e.startSourceSpan,Sn.disableBindings),d.length>0&&this.i18nAttributesInstruction(s,d,null!==(t=e.startSourceSpan)&&void 0!==t?t:e.sourceSpan),e.outputs.length>0){const t=e.outputs.map(t=>({sourceSpan:t.sourceSpan,params:this.prepareListenerParameter(e.name,t,s)}));this.creationInstructionChain(Sn.listener,t)}a&&this.i18nStart(e.startSourceSpan,e.i18n,S)}const E=r.buildUpdateLevelInstructions(this._valueConverter),_=E.length-1;for(let e=0;e<=_;e++)this._bindingSlots+=this.processStylingUpdateInstruction(s,E[e]);const C=zt(void 0),w=[],b=[];if(h.forEach(e=>{const t=e.type;if(4===t){const t=e.value.visit(this._valueConverter),n=!(t instanceof Dr&&!t.value);this.allocateBindingSlots(t),w.push({name:Cn(e.name),sourceSpan:e.sourceSpan,value:()=>n?this.convertPropertyBinding(t):C})}else{if(e.i18n)return;const n=e.value.visit(this._valueConverter);if(void 0!==n){const r=[],[i,a]=he(e.name),o=al(e.securityContext,1===t);if(o&&r.push(o),i){const e=zt(i);o?r.push(e):r.push(zt(null),e)}if(this.allocateBindingSlots(n),0===t)n instanceof $r?this.interpolatedUpdateInstruction(sl(n),s,a,e,n,r):w.push({name:a,sourceSpan:e.sourceSpan,value:()=>this.convertPropertyBinding(n),params:r});else if(1===t)if(n instanceof $r&&Ms(n)>1)this.interpolatedUpdateInstruction(function(e){switch(Ms(e)){case 3:return Sn.attributeInterpolate1;case 5:return Sn.attributeInterpolate2;case 7:return Sn.attributeInterpolate3;case 9:return Sn.attributeInterpolate4;case 11:return Sn.attributeInterpolate5;case 13:return Sn.attributeInterpolate6;case 15:return Sn.attributeInterpolate7;case 17:return Sn.attributeInterpolate8;default:return Sn.attributeInterpolateV}}(n),s,a,e,n,r);else{const t=n instanceof $r?n.expressions[0]:n;b.push({name:a,sourceSpan:e.sourceSpan,value:()=>this.convertPropertyBinding(t),params:r})}else this.updateInstructionWithAdvance(s,e.sourceSpan,Sn.classProp,()=>[zt(s),zt(a),this.convertPropertyBinding(n),...r])}}}),w.length>0&&this.updateInstructionChainWithAdvance(s,Sn.property,w),b.length>0&&this.updateInstructionChainWithAdvance(s,Sn.attribute,b),Dn(this,e.children),!a&&this.i18n&&this.i18n.appendElement(e.i18n,s,!0),!x){const t=null!==(n=e.endSourceSpan)&&void 0!==n?n:e.sourceSpan;a&&this.i18nEnd(t,S),i&&this.creationInstruction(t,Sn.enableBindings),this.creationInstruction(t,u?Sn.elementContainerEnd:Sn.elementEnd)}}visitTemplate(e){var t;const n=this.allocateDataSlot();this.i18n&&this.i18n.appendTemplate(e.i18n,n);const s=fn(e.tagName||""),r=`${this.contextName}${s?"_"+s:""}_${n}`,i=r+"_Template",a=[zt(n),Bt(i),zt(e.tagName?he(e.tagName)[1]:e.tagName)];this.matchDirectives("ng-template",e);const o=this.getAttributeExpressions("ng-template",e.attributes,e.inputs,e.outputs,void 0,e.templateAttrs);if(a.push(this.addAttrsToConsts(o)),e.references&&e.references.length){const t=this.prepareRefsArray(e.references);a.push(this.addToConsts(t)),a.push($t(Sn.templateRefExtractor))}const l=new Xo(this.constantPool,this._bindingScope,this.level+1,r,this.i18n,n,i,this.directiveMatcher,this.directives,this.pipeTypeByName,this.pipes,this._namespace,this.fileBasedI18nSuffix,this.i18nUseExternalIds,this._constants);if(this._nestedTemplateFns.push(()=>{const t=l.buildTemplateFunction(e.children,e.variables,this._ngContentReservedSlots.length+this._ngContentSelectorsOffset,e.i18n);this.constantPool.statements.push(t.toDeclStmt(i)),l._ngContentReservedSlots.length&&this._ngContentReservedSlots.push(...l._ngContentReservedSlots)}),this.creationInstruction(e.sourceSpan,Sn.templateCreate,()=>(a.splice(2,0,zt(l.getConstCount()),zt(l.getVarCount())),As(a))),this.templatePropertyBindings(n,e.templateAttrs),"ng-template"===e.tagName){const[s,r]=function(e,t){const n=[],s=[];for(const r of e)(t(r)?n:s).push(r);return[n,s]}(e.inputs,hs);if(s.length>0&&this.i18nAttributesInstruction(n,s,null!==(t=e.startSourceSpan)&&void 0!==t?t:e.sourceSpan),r.length>0&&this.templatePropertyBindings(n,r),e.outputs.length>0){const t=e.outputs.map(e=>({sourceSpan:e.sourceSpan,params:this.prepareListenerParameter("ng_template",e,n)}));this.creationInstructionChain(Sn.listener,t)}}}visitBoundText(e){if(this.i18n){const t=e.value.visit(this._valueConverter);return this.allocateBindingSlots(t),void(t instanceof $r&&(this.i18n.appendBoundText(e.i18n),this.i18nAppendBindings(t.expressions)))}const t=this.allocateDataSlot();this.creationInstruction(e.sourceSpan,Sn.text,[zt(t)]);const n=e.value.visit(this._valueConverter);this.allocateBindingSlots(n),n instanceof $r?this.updateInstructionWithAdvance(t,e.sourceSpan,function(e){switch(Ms(e)){case 1:return Sn.textInterpolate;case 3:return Sn.textInterpolate1;case 5:return Sn.textInterpolate2;case 7:return Sn.textInterpolate3;case 9:return Sn.textInterpolate4;case 11:return Sn.textInterpolate5;case 13:return Sn.textInterpolate6;case 15:return Sn.textInterpolate7;case 17:return Sn.textInterpolate8;default:return Sn.textInterpolateV}}(n),()=>this.getUpdateInstructionArguments(n)):Zt("Text nodes should be interpolated and never bound directly.")}visitText(e){this.i18n||this.creationInstruction(e.sourceSpan,Sn.text,[zt(this.allocateDataSlot()),zt(e.value)])}visitIcu(e){let t=!1;this.i18n||(t=!0,this.i18nStart(null,e.i18n,!0));const n=this.i18n,s=this.i18nBindProps(e.vars),r=this.i18nBindProps(e.placeholders),i=e.i18n,a=e=>{const t=xs(Object.assign(Object.assign({},s),r),!1);return Zo(null,Sn.i18nPostprocess,[e,vr(t,!0)])};if(ps(n.meta))this.i18nTranslate(i,{},n.ref,a);else{const e=this.i18nTranslate(i,{},void 0,a);n.appendIcu(ds(i).name,e)}return t&&this.i18nEnd(null,!0),null}allocateDataSlot(){return this._dataIndex++}getConstCount(){return this._dataIndex}getVarCount(){return this._pureFunctionSlots}getConsts(){return this._constants}getNgContentSelectors(){return this._ngContentReservedSlots.length?this.constantPool.getConstLiteral(Ts(this._ngContentReservedSlots),!0):null}bindingContext(){return""+this._bindingContext++}templatePropertyBindings(e,t){const n=[];t.forEach(t=>{if(t instanceof Nn){const s=t.value.visit(this._valueConverter);if(void 0!==s)if(this.allocateBindingSlots(s),s instanceof $r){const n=[];this.interpolatedUpdateInstruction(sl(s),e,t.name,t,s,n)}else n.push({name:t.name,sourceSpan:t.sourceSpan,value:()=>this.convertPropertyBinding(s)})}}),n.length>0&&this.updateInstructionChainWithAdvance(e,Sn.property,n)}instructionFn(e,t,n,s,r=!1){e[r?"unshift":"push"](()=>{const e=Array.isArray(s)?s:s();return Zo(t,n,e).toStmt()})}processStylingUpdateInstruction(e,t){let n=0;if(t){const s=[];t.calls.forEach(e=>{n+=e.allocateBindingSlots,s.push({sourceSpan:e.sourceSpan,value:()=>e.params(t=>e.supportsInterpolation&&t instanceof $r?this.getUpdateInstructionArguments(t):this.convertPropertyBinding(t))})}),this.updateInstructionChainWithAdvance(e,t.reference,s)}return n}creationInstruction(e,t,n,s){this.instructionFn(this._creationCodeFns,e,t,n||[],s)}creationInstructionChain(e,t){const n=t.length?t[0].sourceSpan:null;this._creationCodeFns.push(()=>Os(e,t.map(e=>e.params()),n).toStmt())}updateInstructionWithAdvance(e,t,n,s){this.addAdvanceInstructionIfNecessary(e,t),this.updateInstruction(t,n,s)}updateInstruction(e,t,n){this.instructionFn(this._updateCodeFns,e,t,n||[])}updateInstructionChain(e,t){const n=t.length?t[0].sourceSpan:null;this._updateCodeFns.push(()=>{const s=t.map(e=>{const t=e.value(),n=Array.isArray(t)?t:[t];return e.params&&n.push(...e.params),e.name&&n.unshift(zt(e.name)),n});return Os(e,s,n).toStmt()})}updateInstructionChainWithAdvance(e,t,n){this.addAdvanceInstructionIfNecessary(e,n.length?n[0].sourceSpan:null),this.updateInstructionChain(t,n)}addAdvanceInstructionIfNecessary(e,t){if(e!==this._currentIndex){const n=e-this._currentIndex;if(n<1)throw new Error("advance instruction can only go forwards");this.instructionFn(this._updateCodeFns,t,Sn.advance,[zt(n)]),this._currentIndex=e}}allocatePureFunctionSlots(e){const t=this._pureFunctionSlots;return this._pureFunctionSlots+=e,t}allocateBindingSlots(e){this._bindingSlots+=e instanceof $r?e.expressions.length:1}getImplicitReceiverExpr(){return this._implicitReceiverExpr?this._implicitReceiverExpr:this._implicitReceiverExpr=0===this.level?Bt("ctx"):this._bindingScope.getOrCreateSharedContextVar(0)}convertPropertyBinding(e){const t=ii(this,this.getImplicitReceiverExpr(),e,this.bindingContext(),dr.Expression,()=>Zt("Unexpected interpolation")),n=t.currValExpr;return this._tempVariables.push(...t.stmts),n}getUpdateInstructionArguments(e){const{args:t,stmts:n}=function(e,t,n,s){const r=new hi(e,t,s,void 0),i=n.visit(r,mr.Expression);r.usesImplicitReceiver&&e.notifyImplicitReceiverUse();const a=ai(r,s);let o=i.args.slice(1);if(n instanceof $r){const e=n.strings;3===o.length&&""===e[0]&&""===e[1]?o=[o[1]]:o.length>=19&&(o=[Ut(o)])}return{stmts:a,args:o}}(this,this.getImplicitReceiverExpr(),e,this.bindingContext());return this._tempVariables.push(...n),t}matchDirectives(e,t){if(this.directiveMatcher){const n=function(e,t){const n=new Ce,s=he(e)[1];return n.setElement(s),Object.getOwnPropertyNames(t).forEach(e=>{const s=he(e)[1],r=t[e];n.addAttribute(s,r),"class"===e.toLowerCase()&&r.trim().split(/\s+/).forEach(e=>n.addClassName(e))}),n}(e,function(e){const t={};return e instanceof kn&&"ng-template"!==e.tagName?e.templateAttrs.forEach(e=>t[e.name]=""):(e.attributes.forEach(e=>{cs(e.name)||(t[e.name]=e.value)}),e.inputs.forEach(e=>{t[e.name]=""}),e.outputs.forEach(e=>{t[e.name]=""})),t}(t));this.directiveMatcher.match(n,(e,t)=>{this.directives.add(t)})}}getAttributeExpressions(e,t,n,s,r,i=[],a=[]){const o=new Set,l=[];let c;for(const n of t)"ngProjectAs"===n.name&&(c=n),n.i18n?l.push(zt(n.name),this.i18nTranslate(n.i18n)):l.push(...tl(n.name),ol(e,n));function u(e,t){"string"==typeof e?o.has(e)||(l.push(...tl(e)),void 0!==t&&l.push(t),o.add(e)):l.push(zt(e))}if(c&&l.push(...function(e){const t=Le(e.value)[0];return[zt(5),Ts(t)]}(c)),r&&r.populateInitialStylingAttrs(l),n.length||s.length){const e=l.length;for(let e=0;e<n.length;e++){const t=n[e];4!==t.type&&1!==t.type&&u(t.name)}for(let e=0;e<s.length;e++){const t=s[e];1!==t.type&&u(t.name)}l.length!==e&&l.splice(e,0,zt(3))}return i.length&&(l.push(zt(4)),i.forEach(e=>u(e.name))),a.length&&(l.push(zt(6)),a.forEach(e=>u(e.name))),l}addToConsts(e){if(Kt(e))return At;const t=this._constants.constExpressions;for(let n=0;n<t.length;n++)if(t[n].isEquivalent(e))return zt(n);return zt(t.push(e)-1)}addAttrsToConsts(e){return e.length>0?this.addToConsts(Ut(e)):At}prepareRefsArray(e){return e&&0!==e.length?Ts(function e(t){return t.reduce((t,n)=>{const s=Array.isArray(n)?e(n):n;return t.concat(s)},[])}(e.map(e=>{const t=this.allocateDataSlot(),n=this._bindingScope.freshReferenceName(),s=this.level,r=Bt(n);return this._bindingScope.set(s,e.name,r,0,(e,n)=>{const s=n>0?[Jo(n).toStmt()]:[],i=r.set($t(Sn.reference).callFn([zt(t)]));return s.concat(i.toConstDecl())},!0),[e.name,e.value]}))):At}prepareListenerParameter(e,t,n){return()=>{const s=t.name,r=1===t.type?wn(s,t.phase):fn(s),i=`${this.templateName}_${e}_${r}_${n}_listener`,a=this._bindingScope.nestedScope(this._bindingScope.bindingLevel,qo);return Ko(t,i,a)}}}class Go extends class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){const n=this.visitAll(e.expressions);return n!==e.expressions?new $r(e.span,e.sourceSpan,e.strings,n):e}visitLiteralPrimitive(e,t){return e}visitPropertyRead(e,t){const n=e.receiver.visit(this);return n!==e.receiver?new Pr(e.span,e.sourceSpan,e.nameSpan,n,e.name):e}visitPropertyWrite(e,t){const n=e.receiver.visit(this),s=e.value.visit(this);return n!==e.receiver||s!==e.value?new kr(e.span,e.sourceSpan,e.nameSpan,n,e.name,s):e}visitSafePropertyRead(e,t){const n=e.receiver.visit(this);return n!==e.receiver?new Or(e.span,e.sourceSpan,e.nameSpan,n,e.name):e}visitMethodCall(e,t){const n=e.receiver.visit(this),s=this.visitAll(e.args);return n!==e.receiver||s!==e.args?new Hr(e.span,e.sourceSpan,e.nameSpan,n,e.name,s):e}visitSafeMethodCall(e,t){const n=e.receiver.visit(this),s=this.visitAll(e.args);return n!==e.receiver||s!==e.args?new Wr(e.span,e.sourceSpan,e.nameSpan,n,e.name,s):e}visitFunctionCall(e,t){const n=e.target&&e.target.visit(this),s=this.visitAll(e.args);return n!==e.target||s!==e.args?new zr(e.span,e.sourceSpan,n,s):e}visitLiteralArray(e,t){const n=this.visitAll(e.expressions);return n!==e.expressions?new Fr(e.span,e.sourceSpan,n):e}visitLiteralMap(e,t){const n=this.visitAll(e.values);return n!==e.values?new Br(e.span,e.sourceSpan,e.keys,n):e}visitUnary(e,t){const n=e.expr.visit(this);if(n!==e.expr)switch(e.operator){case"+":return jr.createPlus(e.span,e.sourceSpan,n);case"-":return jr.createMinus(e.span,e.sourceSpan,n);default:throw new Error("Unknown unary operator "+e.operator)}return e}visitBinary(e,t){const n=e.left.visit(this),s=e.right.visit(this);return n!==e.left||s!==e.right?new Vr(e.span,e.sourceSpan,e.operation,n,s):e}visitPrefixNot(e,t){const n=e.expression.visit(this);return n!==e.expression?new Ur(e.span,e.sourceSpan,n):e}visitNonNullAssert(e,t){const n=e.expression.visit(this);return n!==e.expression?new qr(e.span,e.sourceSpan,n):e}visitConditional(e,t){const n=e.condition.visit(this),s=e.trueExp.visit(this),r=e.falseExp.visit(this);return n!==e.condition||s!==e.trueExp||r!==e.falseExp?new Ar(e.span,e.sourceSpan,n,s,r):e}visitPipe(e,t){const n=e.exp.visit(this),s=this.visitAll(e.args);return n!==e.exp||s!==e.args?new Rr(e.span,e.sourceSpan,n,e.name,s,e.nameSpan):e}visitKeyedRead(e,t){const n=e.obj.visit(this),s=e.key.visit(this);return n!==e.obj||s!==e.key?new Mr(e.span,e.sourceSpan,n,s):e}visitKeyedWrite(e,t){const n=e.obj.visit(this),s=e.key.visit(this),r=e.value.visit(this);return n!==e.obj||s!==e.key||r!==e.value?new Lr(e.span,e.sourceSpan,n,s,r):e}visitAll(e){const t=[];let n=!1;for(let s=0;s<e.length;++s){const r=e[s],i=r.visit(this);t[s]=i,n=n||i!==r}return n?t:e}visitChain(e,t){const n=this.visitAll(e.expressions);return n!==e.expressions?new Nr(e.span,e.sourceSpan,n):e}visitQuote(e,t){return e}}{constructor(e,t,n,s){super(),this.constantPool=e,this.allocateSlot=t,this.allocatePureFunctionSlots=n,this.definePipe=s,this._pipeBindExprs=[]}visitPipe(e,t){const n=this.allocateSlot(),s="PIPE:"+n,r=this.allocatePureFunctionSlots(2+e.args.length),i=new Pr(e.span,e.sourceSpan,e.nameSpan,new Ir(e.span,e.sourceSpan),s),{identifier:a,isVarLength:o}=function(e){const t=Qo[e.length];return{identifier:t||Sn.pipeBindV,isVarLength:!t}}(e.args);this.definePipe(e.name,s,n,$t(a));const l=[e.exp,...e.args],c=this.visitAll(o?[new Fr(e.span,e.sourceSpan,l)]:l),u=new zr(e.span,e.sourceSpan,i,[new Dr(e.span,e.sourceSpan,n),new Dr(e.span,e.sourceSpan,r),...c]);return this._pipeBindExprs.push(u),u}updatePipeSlotOffsets(e){this._pipeBindExprs.forEach(t=>{t.args[1].value+=e})}visitLiteralArray(e,t){return new mi(e.span,e.sourceSpan,this.visitAll(e.expressions),e=>{const t=Ut(e);return el(this.constantPool,t,this.allocatePureFunctionSlots)})}visitLiteralMap(e,t){return new mi(e.span,e.sourceSpan,this.visitAll(e.values),t=>{const n=qt(t.map((t,n)=>({key:e.keys[n].key,value:t,quoted:e.keys[n].quoted})));return el(this.constantPool,n,this.allocatePureFunctionSlots)})}}const Qo=[Sn.pipeBind1,Sn.pipeBind2,Sn.pipeBind3,Sn.pipeBind4],Yo=[Sn.pureFunction0,Sn.pureFunction1,Sn.pureFunction2,Sn.pureFunction3,Sn.pureFunction4,Sn.pureFunction5,Sn.pureFunction6,Sn.pureFunction7,Sn.pureFunction8];function Zo(e,t,n){return $t(t,null,e).callFn(n,e)}function Jo(e){return $t(Sn.nextContext).callFn(e>1?[zt(e)]:[])}function el(e,t,n){const{literalFactory:s,literalFactoryArguments:r}=e.getLiteralFactory(t),i=n(1+r.length),{identifier:a,isVarLength:o}=function(e){const t=Yo[e.length];return{identifier:t||Sn.pureFunctionV,isVarLength:!t}}(r),l=[zt(i),s];return o?l.push(Ut(r)):l.push(...r),$t(a).callFn(l)}function tl(e){const[t,n]=he(e),s=zt(n);return t?[zt(0),zt(t),s]:[s]}class nl{constructor(e=0,t=null,n){if(this.bindingLevel=e,this.parent=t,this.globals=n,this.map=new Map,this.referenceNameIndex=0,this.restoreViewVariable=null,void 0!==n)for(const e of n)this.set(0,e,Bt(e))}static createRootScope(){return new nl}get(e){let t=this;for(;t;){let n=t.map.get(e);if(null!=n)return t!==this&&(n={retrievalLevel:n.retrievalLevel,lhs:n.lhs,declareLocalCallback:n.declareLocalCallback,declare:!1,priority:n.priority,localRef:n.localRef},this.map.set(e,n),this.maybeGenerateSharedContextVar(n),this.maybeRestoreView(n.retrievalLevel,n.localRef)),n.declareLocalCallback&&!n.declare&&(n.declare=!0),n.lhs;t=t.parent}return 0===this.bindingLevel?null:this.getComponentProperty(e)}set(e,t,n,s=0,r,i){if(this.map.has(t)){if(i)return this;Zt(`The name ${t} is already defined in scope to be ${this.map.get(t)}`)}return this.map.set(t,{retrievalLevel:e,lhs:n,declare:!1,declareLocalCallback:r,priority:s,localRef:i||!1}),this}getLocal(e){return this.get(e)}notifyImplicitReceiverUse(){0!==this.bindingLevel&&(this.map.get("$$shared_ctx$$0").declare=!0)}nestedScope(e,t){const n=new nl(e,this,t);return e>0&&n.generateSharedContextVar(0),n}getOrCreateSharedContextVar(e){const t="$$shared_ctx$$"+e;return this.map.has(t)||this.generateSharedContextVar(e),this.map.get(t).lhs}getSharedContextName(e){const t=this.map.get("$$shared_ctx$$"+e);return t&&t.declare?t.lhs:null}maybeGenerateSharedContextVar(e){if(1===e.priority&&e.retrievalLevel<this.bindingLevel){const t=this.map.get("$$shared_ctx$$"+e.retrievalLevel);t?t.declare=!0:this.generateSharedContextVar(e.retrievalLevel)}}generateSharedContextVar(e){const t=Bt("ctx"+this.freshReferenceName());this.map.set("$$shared_ctx$$"+e,{retrievalLevel:e,lhs:t,declareLocalCallback:(e,n)=>[t.set(Jo(n)).toConstDecl()],declare:!1,priority:2,localRef:!1})}getComponentProperty(e){const t=this.map.get("$$shared_ctx$$0");return t.declare=!0,this.maybeRestoreView(0,!1),t.lhs.prop(e)}maybeRestoreView(e,t){this.isListenerScope()&&(e<this.bindingLevel||t)&&(this.parent.restoreViewVariable||(this.parent.restoreViewVariable=Bt(this.parent.freshReferenceName())),this.restoreViewVariable=this.parent.restoreViewVariable)}restoreViewStatement(){return this.restoreViewVariable?[Zo(null,Sn.restoreView,[this.restoreViewVariable]).toStmt()]:[]}viewSnapshotStatements(){const e=Zo(null,Sn.getCurrentView,[]);return this.restoreViewVariable?[this.restoreViewVariable.set(e).toConstDecl()]:[]}isListenerScope(){return this.parent&&this.parent.bindingLevel===this.bindingLevel}variableDeclarations(){let e=0;return Array.from(this.map.values()).filter(e=>e.declare).sort((e,t)=>t.retrievalLevel-e.retrievalLevel||t.priority-e.priority).reduce((t,n)=>{const s=this.bindingLevel-n.retrievalLevel,r=n.declareLocalCallback(this,s-e);return e=s,t.concat(r)},[])}freshReferenceName(){let e=this;for(;e.parent;)e=e.parent;return"_r"+e.referenceNameIndex++}}function sl(e){switch(Ms(e)){case 1:return Sn.propertyInterpolate;case 3:return Sn.propertyInterpolate1;case 5:return Sn.propertyInterpolate2;case 7:return Sn.propertyInterpolate3;case 9:return Sn.propertyInterpolate4;case 11:return Sn.propertyInterpolate5;case 13:return Sn.propertyInterpolate6;case 15:return Sn.propertyInterpolate7;case 17:return Sn.propertyInterpolate8;default:return Sn.propertyInterpolateV}}const rl=new go;function il(e=qs){return new Ia(new ro(new qa),e,rl,null,[])}function al(e,t){switch(e){case Ae.HTML:return $t(Sn.sanitizeHtml);case Ae.SCRIPT:return $t(Sn.sanitizeScript);case Ae.STYLE:return t?$t(Sn.sanitizeStyle):null;case Ae.URL:return $t(Sn.sanitizeUrl);case Ae.RESOURCE_URL:return $t(Sn.sanitizeResourceUrl);default:return null}}function ol(e,t){const n=Ts(t.value);switch(rl.securityContext(e,t.name,!0)){case Ae.HTML:return $t(Sn.trustConstantHtml).callFn([n],t.valueSpan);case Ae.SCRIPT:return $t(Sn.trustConstantScript).callFn([n],t.valueSpan);case Ae.RESOURCE_URL:return $t(Sn.trustConstantResourceUrl).callFn([n],t.valueSpan);default:return n}}function ll(e){return e instanceof bn||e instanceof In||e instanceof Rn}function cl(e){return e.every(ll)}function ul(){return jt(Bt("ngI18nClosureMode")).notIdentical(zt("undefined",Ue)).and(Bt("ngI18nClosureMode"))}const pl=/attr\.([^\]]+)/;function hl(e,t,n){const s=new ks,r=Le(e.selector);return s.set("type",e.internalType),r.length>0&&s.set("selectors",Ts(r)),e.queries.length>0&&s.set("contentQueries",function(e,t,n){const s=[],r=[],i=ws(r,"_t");for(const n of e){s.push($t(n.static?Sn.staticContentQuery:Sn.contentQuery).callFn([Bt("dirIndex"),...ml(n,t)]).toStmt());const e=i(),a=$t(Sn.loadQuery).callFn([]),o=$t(Sn.queryRefresh).callFn([e.set(a)]),l=Bt("ctx").prop(n.propertyName).set(n.first?e.prop("first"):e);r.push(o.and(l).toStmt())}const a=n?n+"_ContentQueries":null;return Ht([new xt("rf",je),new xt("ctx",null),new xt("dirIndex",null)],[zo(1,s),zo(2,r)],$e,null,a)}(e.queries,t,e.name)),e.viewQueries.length&&s.set("viewQuery",function(e,t,n){const s=[],r=[],i=ws(r,"_t");e.forEach(e=>{const n=$t(e.static?Sn.staticViewQuery:Sn.viewQuery).callFn(ml(e,t));s.push(n.toStmt());const a=i(),o=$t(Sn.loadQuery).callFn([]),l=$t(Sn.queryRefresh).callFn([a.set(o)]),c=Bt("ctx").prop(e.propertyName).set(e.first?a.prop("first"):a);r.push(l.and(c).toStmt())});const a=n?n+"_Query":null;return Ht([new xt("rf",je),new xt("ctx",null)],[zo(1,s),zo(2,r)],$e,null,a)}(e.viewQueries,t,e.name)),s.set("hostBindings",function(e,t,n,s,r,i,a){const o=Bt("ctx"),l=new Ba(o),{styleAttr:c,classAttr:u}=e.specialAttributes;void 0!==c&&l.registerStyleAttr(c),void 0!==u&&l.registerClassAttr(u);const p=[],h=[],d=t,m=xl(e),g=n.createDirectiveHostEventAsts(m,d);if(g&&g.length){const e=function(e,t){const n=[],s=[],r=[];return e.forEach(e=>{let r=e.name&&fn(e.name);const i=1===e.type?wn(r,e.targetOrPhase):r,a=t&&r?`${t}_${i}_HostBindingHandler`:null,o=Ko(An.fromParsedEvent(e),a);1==e.type?s.push(o):n.push(o)}),s.length>0&&r.push(Os(Sn.syntheticHostListener,s).toStmt()),n.length>0&&r.push(Os(Sn.listener,n).toStmt()),r}(g,i);p.push(...e)}const f=n.createBoundHostProperties(m,d),v=[];let y,x=0;f&&f.forEach(e=>{l.registerInputBasedOnName(e.name,e.expression,d)?x+=2:(v.push(e),x++)});const S=()=>(y||(y=new Go(s,()=>Zt("Unexpected node"),e=>{const t=x;return x+=e,t},()=>Zt("Unexpected pipe"))),y),E=[],_=[],C=[];v.forEach(e=>{const t=e.expression.visit(S()),s=yl(o,t),{bindingName:i,instruction:a,isAttribute:l}=function(e){let t,n=e.name;const s=n.match(pl);return s?(n=s[1],t=Sn.attribute):e.isAnimation?(n=Cn(n),t=Sn.syntheticHostProperty):t=Sn.hostProperty,{bindingName:n,instruction:t,isAttribute:!!s}}(e),c=n.calcPossibleSecurityContexts(r,i,l).filter(e=>e!==Ae.NONE);let u=null;c.length&&(u=2===c.length&&c.indexOf(Ae.URL)>-1&&c.indexOf(Ae.RESOURCE_URL)>-1?$t(Sn.sanitizeUrlOrResourceUrl):al(c[0],l));const p=[zt(i),s.currValExpr];u&&p.push(u),h.push(...s.stmts),a===Sn.hostProperty?E.push(p):a===Sn.attribute?_.push(p):a===Sn.syntheticHostProperty?C.push(p):h.push($t(a).callFn(p).toStmt())}),E.length>0&&h.push(Os(Sn.hostProperty,E).toStmt()),_.length>0&&h.push(Os(Sn.attribute,_).toStmt()),C.length>0&&h.push(Os(Sn.syntheticHostProperty,C).toStmt());const w=function(e){const t=[];for(let n of Object.getOwnPropertyNames(e)){const s=e[n];t.push(zt(n),s)}return t}(e.attributes);if(l.assignHostAttrs(w,a),l.hasBindings&&l.buildUpdateLevelInstructions(S()).forEach(e=>{if(e.calls.length>0){const t=[];e.calls.forEach(e=>{x+=Math.max(e.allocateBindingSlots-2,0),t.push(function(e,t,n){return e.params(e=>n(t,e).currValExpr)}(e,o,yl))}),h.push(Os(e.reference,t).toStmt())}}),x&&a.set("hostVars",zt(x)),p.length>0||h.length>0){const e=i?i+"_HostBindings":null,t=[];return p.length>0&&t.push(zo(1,p)),h.length>0&&t.push(zo(2,h)),Ht([new xt("rf",je),new xt("ctx",null)],t,$e,null,e)}return null}(e.host,e.typeSourceSpan,n,t,e.selector||"",e.name,s)),s.set("inputs",Ns(e.inputs,!0)),s.set("outputs",Ns(e.outputs)),null!==e.exportAs&&s.set("exportAs",Ut(e.exportAs.map(e=>zt(e)))),s}function dl(e,t){const n=[],s=t.providers,r=t.viewProviders;if(s||r){const e=[s||new bt([])];r&&e.push(r),n.push($t(Sn.ProvidersFeature).callFn(e))}t.usesInheritance&&n.push($t(Sn.InheritDefinitionFeature)),t.fullInheritance&&n.push($t(Sn.CopyDefinitionFeature)),t.lifecycle.usesOnChanges&&n.push($t(Sn.NgOnChangesFeature)),n.length&&e.set("features",Ut(n))}function ml(e,t){const n=[Ps(e,t),zt(e.descendants)];return e.read&&n.push(e.read),n}function gl(e){return Vt(qt(Object.keys(e).map(t=>({key:t,value:zt(Array.isArray(e[t])?e[t][0]:e[t]),quoted:!0}))))}function fl(e){return e.length>0?Vt(Ut(e.map(e=>zt(e)))):qe}function vl(e){const t=null!==e.selector?e.selector.replace(/\n/g,""):null;return[_n(e.type.type,e.typeArgumentCount),null!==t?(n=t,Vt(zt(n))):qe,null!==e.exportAs?fl(e.exportAs):qe,gl(e.inputs),gl(e.outputs),fl(e.queries.map(e=>e.propertyName))];var n}function yl(e,t){return ii(null,e,t,"b",dr.Expression,()=>Zt("Unexpected interpolation"))}function xl(e){return{hostAttributes:{},hostListeners:e.listeners,hostProperties:e.properties}}const Sl=/^(?:\[([^\]]+)\])|(?:\(([^\)]+)\))$/;class El{get(e){return""}}const _l=Object.keys({useClass:null})[0],Cl=Object.keys({useFactory:null})[0],wl=Object.keys({useValue:null})[0],bl=Object.keys({useExisting:null})[0],Il=function(e){const t=new Ze(e);return{value:t,type:t}};function Tl(e){return Object.assign(Object.assign({},e),{predicate:Array.isArray(e.predicate)?e.predicate:new Ze(e.predicate),read:e.read?new Ze(e.read):null,static:e.static})}function Nl(e){const t=Rl(e.inputs||[]),n=Rl(e.outputs||[]),s=e.propMetadata,r={},i={};for(const e in s)s.hasOwnProperty(e)&&s[e].forEach(t=>{"Input"===t.ngMetadataName?r[e]=t.bindingPropertyName?[t.bindingPropertyName,e]:e:Ll(t)&&(i[e]=t.bindingPropertyName||e)});return Object.assign(Object.assign({},e),{typeSourceSpan:e.typeSourceSpan,type:Il(e.type),internalType:new Ze(e.type),deps:kl(e.deps),host:Ol(e.propMetadata,e.typeSourceSpan,e.host),inputs:Object.assign(Object.assign({},t),r),outputs:Object.assign(Object.assign({},n),i),queries:e.queries.map(Tl),providers:null!=e.providers?new Ze(e.providers):null,viewQueries:e.viewQueries.map(Tl),fullInheritance:!1})}function Al(e,t){return e.hasOwnProperty(t)?new Ze(e[t]):void 0}function Pl(e){let t;return t=null===e.token?new it(null):e.resolved===Ds.Attribute?new it(e.token):new Ze(e.token),{token:t,attribute:null,resolved:e.resolved,host:e.host,optional:e.optional,self:e.self,skipSelf:e.skipSelf}}function kl(e){return null==e?null:e.map(Pl)}function Ol(e,t,n){const s=function(e){const t={},n={},s={},r={};for(const i of Object.keys(e)){const a=e[i],o=i.match(Sl);if(null===o)switch(i){case"class":if("string"!=typeof a)throw new Error("Class binding must be string");r.classAttr=a;break;case"style":if("string"!=typeof a)throw new Error("Style binding must be string");r.styleAttr=a;break;default:t[i]="string"==typeof a?zt(a):a}else if(null!=o[1]){if("string"!=typeof a)throw new Error("Property binding must be string");s[o[1]]=a}else if(null!=o[2]){if("string"!=typeof a)throw new Error("Event binding must be string");n[o[2]]=a}}return{attributes:t,listeners:n,properties:s,specialAttributes:r}}(n||{}),r=function(e,t){const n=xl(e),s=il();return s.createDirectiveHostEventAsts(n,t),s.createBoundHostProperties(n,t),s.errors}(s,t);if(r.length)throw new Error(r.map(e=>e.msg).join("\n"));for(const t in e)e.hasOwnProperty(t)&&e[t].forEach(e=>{"HostBinding"===e.ngMetadataName?s.properties[e.hostPropertyName||t]=t:Ml(e)&&(s.listeners[e.eventName||t]=`${t}(${(e.args||[]).join(",")})`)});return s}function Ml(e){return"HostListener"===e.ngMetadataName}function Ll(e){return"Output"===e.ngMetadataName}function Rl(e){return e.reduce((e,t)=>{const[n,s]=t.split(",").map(e=>e.trim());return e[n]=s||n,e},{})}var Dl,Fl,Bl;new class{constructor(e){this.full=e;const t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}}("11.0.0"),function(e){e[e.Extract=0]="Extract",e[e.Merge=1]="Merge"}(Dl||(Dl={})),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"}(Fl||(Fl={})),Bt("_l"),Bt("_l"),Bt("_v"),Bt("_ck"),Bt("_co"),Bt("en"),Bt("ad"),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"}(Bl||(Bl={})),(rn.ng||(rn.ng={})).ɵcompilerFacade=new class{constructor(e=new tr){this.jitEvaluator=e,this.R3ResolvedDependencyType=Ds,this.R3FactoryTarget=Rs,this.ResourceLoader=El,this.elementSchemaRegistry=new go}compilePipe(e,t,n){const s=function(e){const t=[];return t.push({key:"name",value:zt(e.pipeName),quoted:!1}),t.push({key:"type",value:e.type.value,quoted:!1}),t.push({key:"pure",value:zt(e.pure),quoted:!1}),{expression:$t(Sn.definePipe).callFn([qt(t)]),type:new Fe($t(Sn.PipeDefWithMeta,[_n(e.type.type,e.typeArgumentCount),new Fe(new it(e.pipeName))]))}}({name:n.name,type:Il(n.type),internalType:new Ze(n.type),typeArgumentCount:n.typeArgumentCount,deps:kl(n.deps),pipeName:n.pipeName,pure:n.pure});return this.jitExpression(s.expression,e,t,[])}compileInjectable(e,t,n){const{expression:s,statements:r}=function(e){let t=null;const n={name:e.name,type:e.type,internalType:e.internalType,typeArgumentCount:e.typeArgumentCount,deps:[],injectFn:gn.inject,target:Rs.Injectable};if(void 0!==e.useClass){const s=e.useClass.isEquivalent(e.internalType);let r=void 0;void 0!==e.userDeps&&(r=e.userDeps),t=void 0!==r?Fs(Object.assign(Object.assign({},n),{delegate:e.useClass,delegateDeps:r,delegateType:Ls.Class})):s?Fs(n):Vs(e.type.value,e.useClass)}else t=void 0!==e.useFactory?void 0!==e.userDeps?Fs(Object.assign(Object.assign({},n),{delegate:e.useFactory,delegateDeps:e.userDeps||[],delegateType:Ls.Function})):{statements:[],factory:Ht([],[new Dt(e.useFactory.callFn([]))])}:void 0!==e.useValue?Fs(Object.assign(Object.assign({},n),{expression:e.useValue})):void 0!==e.useExisting?Fs(Object.assign(Object.assign({},n),{expression:$t(gn.inject).callFn([e.useExisting])})):Vs(e.type.value,e.internalType);const s={token:e.internalType,factory:t.factory};return null!==e.providedIn.value&&(s.providedIn=e.providedIn),{expression:$t(gn.ɵɵdefineInjectable).callFn([En(s)]),type:new Fe($t(gn.InjectableDef,[_n(e.type.type,e.typeArgumentCount)])),statements:t.statements}}({name:n.name,type:Il(n.type),internalType:new Ze(n.type),typeArgumentCount:n.typeArgumentCount,providedIn:(i=n.providedIn,null==i||"string"==typeof i?new it(i):new Ze(i)),useClass:Al(n,_l),useFactory:Al(n,Cl),useValue:Al(n,wl),useExisting:Al(n,bl),userDeps:kl(n.userDeps)||void 0});var i;return this.jitExpression(s,e,t,r)}compileInjector(e,t,n){const s=function(e){const t=Fs({name:e.name,type:e.type,internalType:e.internalType,typeArgumentCount:0,deps:e.deps,injectFn:Sn.inject,target:Rs.NgModule}),n={factory:t.factory};return null!==e.providers&&(n.providers=e.providers),e.imports.length>0&&(n.imports=Ut(e.imports)),{expression:$t(Sn.defineInjector).callFn([En(n)]),type:new Fe($t(Sn.InjectorDef,[new Fe(e.type.type)])),statements:t.statements}}({name:n.name,type:Il(n.type),internalType:new Ze(n.type),deps:kl(n.deps),providers:new Ze(n.providers),imports:n.imports.map(e=>new Ze(e))});return this.jitExpression(s.expression,e,t,s.statements)}compileNgModule(e,t,n){const s=function(e){const{internalType:t,type:n,bootstrap:s,declarations:r,imports:i,exports:a,schemas:o,containsForwardDecls:l,emitInline:c,id:u}=e,p=[],h={type:t};if(s.length&&(h.bootstrap=xr(s,l)),c)r.length&&(h.declarations=xr(r,l)),i.length&&(h.imports=xr(i,l)),a.length&&(h.exports=xr(a,l));else{const t=function(e){const{adjacentType:t,declarations:n,imports:s,exports:r,containsForwardDecls:i}=e,a={};if(n.length&&(a.declarations=xr(n,i)),s.length&&(a.imports=xr(s,i)),r.length&&(a.exports=xr(r,i)),0===Object.keys(a).length)return null;const o=function(e){const t=new mt({name:"ngJitMode",moduleName:null}),n=new _t(We.Identical,new Ye(t),zt("undefined")),s=new _t(We.Or,n,t,void 0,void 0,!0);return new _t(We.And,s,e)}(new st($t(Sn.setNgModuleScope),[t,En(a)])),l=new St([],[o.toStmt()]);return new st(l,[]).toStmt()}(e);null!==t&&p.push(t)}return o&&o.length&&(h.schemas=Ut(o.map(e=>e.value))),u&&(h.id=u),{expression:$t(Sn.defineNgModule).callFn([En(h)]),type:new Fe($t(Sn.NgModuleDefWithMeta,[new Fe(n.type),yr(r),yr(i),yr(a)])),additionalStatements:p}}({type:Il(n.type),internalType:new Ze(n.type),adjacentType:new Ze(n.type),bootstrap:n.bootstrap.map(Il),declarations:n.declarations.map(Il),imports:n.imports.map(Il),exports:n.exports.map(Il),emitInline:!0,containsForwardDecls:!1,schemas:n.schemas?n.schemas.map(Il):null,id:n.id?new Ze(n.id):null});return this.jitExpression(s.expression,e,t,[])}compileDirective(e,t,n){const s=new cn,r=il(),i=function(e,t,n){const s=hl(e,t,n);dl(s,e);const r=$t(Sn.defineDirective).callFn([s.toLiteralMap()]),i=vl(e);return{expression:r,type:Vt($t(Sn.DirectiveDefWithMeta,i))}}(Nl(n),s,r);return this.jitExpression(i.expression,e,t,s.statements)}compileComponent(e,t,n){const s=new cn,r=n.interpolation?Us.fromArray(n.interpolation):qs,i=function(e,t,n={}){const{interpolationConfig:s,preserveWhitespaces:r,enableI18nLegacyMessageIdFormat:i}=n,a=il(s),o=(new ya).parse(e,t,Object.assign(Object.assign({leadingTriviaChars:Wo},n),{tokenizeExpansionForms:!0}));if(o.errors&&o.errors.length>0)return{interpolationConfig:s,preserveWhitespaces:r,template:e,errors:o.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};let l=o.rootNodes;const c=new Fo(s,!r,i);l=Gi(c,l),r||(l=Gi(new Ca,l),c.hasI18nMeta&&(l=Gi(new Fo(s,!1),l)));const{nodes:u,errors:p,styleUrls:h,styles:d,ngContentSelectors:m}=function(e,t){const n=new vo(t);return{nodes:Gi(n,e),errors:t.errors.concat(n.errors),styleUrls:n.styleUrls,styles:n.styles,ngContentSelectors:n.ngContentSelectors}}(l,a);return{interpolationConfig:s,preserveWhitespaces:r,errors:p.length>0?p:null,template:e,nodes:u,styleUrls:h,styles:d,ngContentSelectors:m}}(n.template,t,{preserveWhitespaces:n.preserveWhitespaces,interpolationConfig:r});if(null!==i.errors){const e=i.errors.map(e=>e.toString()).join(", ");throw new Error(`Errors during JIT compilation of template for ${n.name}: ${e}`)}const a=function(e,t,n){const s=hl(e,t,n);dl(s,e);const r=e.selector&&Ce.parse(e.selector),i=r&&r[0];if(i){const e=i.getAttrs();e.length&&s.set("attrs",t.getConstLiteral(Ut(e.map(e=>zt(null!=e?e:void 0))),!0))}let a=null;if(e.directives.length>0){const t=new we;for(const{selector:n,expression:s}of e.directives)t.addSelectables(Ce.parse(n),s);a=t}const o=e.name,l=o?o+"_Template":null,c=new Set,u=new Set,p=e.changeDetection,h=e.template,d=new Xo(t,nl.createRootScope(),0,o,null,null,l,a,c,e.pipes,u,Sn.namespaceHTML,e.relativeContextFilePath,e.i18nUseExternalIds),m=d.buildTemplateFunction(h.nodes,[]),g=d.getNgContentSelectors();g&&s.set("ngContentSelectors",g),s.set("decls",zt(d.getConstCount())),s.set("vars",zt(d.getVarCount()));const{constExpressions:f,prepareStatements:v}=d.getConsts();if(f.length>0){let e=Ut(f);v.length>0&&(e=Ht([],[...v,new Dt(e)])),s.set("consts",e)}if(s.set("template",m),c.size){let t=Ut(Array.from(c));e.wrapDirectivesAndPipesInClosure&&(t=Ht([],[new Dt(t)])),s.set("directives",t)}if(u.size){let t=Ut(Array.from(u));e.wrapDirectivesAndPipesInClosure&&(t=Ht([],[new Dt(t)])),s.set("pipes",t)}if(null===e.encapsulation&&(e.encapsulation=Te.Emulated),e.styles&&e.styles.length){const n=(e.encapsulation==Te.Emulated?function(e,t,n){const s=new gi;return e.map(e=>s.shimCssText(e,"_ngcontent-%COMP%","_nghost-%COMP%"))}(e.styles):e.styles).map(e=>t.getConstLiteral(zt(e)));s.set("styles",Ut(n))}else e.encapsulation===Te.Emulated&&(e.encapsulation=Te.None);e.encapsulation!==Te.Emulated&&s.set("encapsulation",zt(e.encapsulation)),null!==e.animations&&s.set("data",qt([{key:"animation",value:e.animations,quoted:!1}])),null!=p&&p!==Ne.Default&&s.set("changeDetection",zt(p));const y=$t(Sn.defineComponent).callFn([s.toLiteralMap()]),x=vl(e);return x.push(fl(e.template.ngContentSelectors)),{expression:y,type:Vt($t(Sn.ComponentDefWithMeta,x))}}(Object.assign(Object.assign(Object.assign({},n),Nl(n)),{selector:n.selector||this.elementSchemaRegistry.getDefaultComponentElementName(),template:i,wrapDirectivesAndPipesInClosure:!1,styles:[...n.styles,...i.styles],encapsulation:n.encapsulation,interpolation:r,changeDetection:n.changeDetection,animations:null!=n.animations?new Ze(n.animations):null,viewProviders:null!=n.viewProviders?new Ze(n.viewProviders):null,relativeContextFilePath:"",i18nUseExternalIds:!0}),s,il(r));return this.jitExpression(a.expression,e,`ng:///${n.name}.js`,s.statements)}compileFactory(e,t,n){const s=Fs({name:n.name,type:Il(n.type),internalType:new Ze(n.type),typeArgumentCount:n.typeArgumentCount,deps:kl(n.deps),injectFn:"directiveInject"===n.injectFn?gn.directiveInject:gn.inject,target:n.target});return this.jitExpression(s.factory,e,t,s.statements)}createParseSourceSpan(e,t,n){return function(e,t,n){const s=new cr("",`in ${e} ${t} in ${n}`);return new ur(new lr(s,-1,-1,-1),new lr(s,-1,-1,-1))}(e,t,n)}jitExpression(e,t,n,s){const r=[...s,new Mt("$def",e,void 0,[Pt.Exported])];return this.jitEvaluator.evaluateStatements(n,r,new fr(t),!0).$def}};const $l="attribute",Vl="element",jl={[$l]:"attrs",[Vl]:Vl},Ul=(e,t,n)=>{n.report({node:e,messageId:"prefixFailure",data:{prefix:t}})},ql=(e,t,n)=>{n.report({node:e,messageId:"styleFailure",data:{style:t}})},Hl=(e,t,n)=>{n.report({node:e,messageId:"typeFailure",data:{type:t}})},Wl=(e,t,n)=>{const s=X(e),r=n,i=s.length>0&&s.every(e=>-1!==[Vl,$l].indexOf(e)),a=t.length>0,o=-1!==[u,p].indexOf(r);return i&&a&&o},zl=(e,t,n,s)=>{const r=X(t||["attrs",Vl]).reduce((e,t)=>e.concat(jl[t]),[]),i=s===p?Q.kebabCase:Q.camelCase;let a=null;if(e&&b(e)?a=Ce.parse(e.raw):e&&I(e)&&e.quasis[0]&&(a=Ce.parse(e.quasis[0].value.raw)),!a)return null;const o=((e,t)=>e.reduce((e,n)=>{const s=t.reduce((e,t)=>{const s=n[t];return s?e.concat(s):e},[]);return e.concat(s)},[]))(a,r),l=o.some(e=>n.some(t=>Q.prefix(t,s)(e))),c=o.some(e=>i(e));return{hasExpectedPrefix:l,hasExpectedType:o.length>0,hasExpectedStyle:c}};var Kl=J({name:"component-selector",meta:{type:"suggestion",docs:{description:"Component selectors should follow given naming rules. See more at https://angular.io/guide/styleguide#style-02-07, https://angular.io/guide/styleguide#style-05-02\n and https://angular.io/guide/styleguide#style-05-03.",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{type:{oneOf:[{type:"string"},{type:"array",items:{enum:[Vl,$l]}}]},prefix:{oneOf:[{type:"string"},{type:"array"}]},style:{type:"string",enum:[u,p]}},additionalProperties:!1}],messages:{prefixFailure:"The selector should be prefixed by one of the prefixes: '{{prefix}}' (https://angular.io/guide/styleguide#style-02-07)",styleFailure:"The selector should be {{style}} (https://angular.io/guide/styleguide#style-05-02)",typeFailure:"The selector should be used as an {{type}} (https://angular.io/guide/styleguide#style-05-03)"}},defaultOptions:[{type:"",prefix:"",style:""}],create(e,[t]){const{type:n,prefix:s,style:r}=t;return{[se](t){const i=H(t,"selector");if(!i)return;if(!Wl(n,s,r))return;const a=zl(i,n,X(s),r);null!==a&&(a.hasExpectedType?a.hasExpectedStyle?a.hasExpectedPrefix||Ul(i,s,e):ql(i,r,e):Hl(i,n,e))}}}}),Xl=J({name:"contextual-lifecycle",meta:{type:"problem",docs:{description:"Ensures that classes use allowed lifecycle method in its body",category:"Possible Errors",recommended:"error"},schema:[],messages:{contextuaLifecycle:"The method {{methodName}} is not allowed for class {{className}} because it is decorated with {{decorator}}"}},defaultOptions:[],create(e){function t(t,n){const s=k(t),r=t.parent,i=f.get(n),a=W(r);for(const t of a){const r=z(t);!V(r)||i&&i.has(r)||e.report({node:t.key,messageId:"contextuaLifecycle",data:{methodName:r,className:s,decorator:n}})}}return{[ie](e){t(e,s.Pipe)},'ClassDeclaration > Decorator[expression.callee.name="Injectable"]'(e){t(e,s.Injectable)},'ClassDeclaration > Decorator[expression.callee.name="NgModule"]'(e){t(e,s.NgModule)},[re](e){t(e,s.Directive)}}}}),Gl=J({name:"directive-class-suffix",meta:{type:"suggestion",docs:{description:'Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. See more at https://angular.io/styleguide#style-02-03.',category:"Best Practices",recommended:"error"},schema:[{type:"object",properties:{suffixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{directiveClassSuffix:"The name of the class {{className}} should end with the suffix {{suffixes}} (https://angular.io/styleguide#style-02-03)"}},defaultOptions:[{suffixes:["Directive"]}],create(e,[t]){const{suffixes:n}=t;return{[re](t){const s=t.parent,r=k(s);R(s).some(e=>e.endsWith("Validator"))&&n.push("Validator"),r&&n.some(e=>r.endsWith(e))||e.report({node:s.id?s.id:s,messageId:"directiveClassSuffix",data:{className:r,suffixes:n}})}}}}),Ql=J({name:"directive-selector",meta:{type:"suggestion",docs:{description:"Directive selectors should follow given naming rules. See more at https://angular.io/guide/styleguide#style-02-06 and https://angular.io/guide/styleguide#style-02-08.",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{type:{oneOf:[{type:"string"},{type:"array",items:{enum:[Vl,$l]}}]},prefix:{oneOf:[{type:"string"},{type:"array"}]},style:{type:"string",enum:[u,p]}},additionalProperties:!1}],messages:{prefixFailure:"The selector should be prefixed by one of the prefixes: '{{prefix}}' (https://angular.io/guide/styleguide#style-02-08)",styleFailure:"The selector should be {{style}} (https://angular.io/guide/styleguide#style-02-06)",typeFailure:"The selector should be used as an {{type}} (https://angular.io/guide/styleguide#style-02-06)"}},defaultOptions:[{type:"",prefix:"",style:""}],create(e,[t]){const{type:n,prefix:s,style:r}=t;return{[re](t){const i=H(t,"selector");if(!i)return;if(!Wl(n,s,r))return;const a=zl(i,n,X(s),r);null!==a&&(a.hasExpectedType?a.hasExpectedStyle?a.hasExpectedPrefix||Ul(i,s,e):ql(i,r,e):Hl(i,n,e))}}}}),Yl=J({name:"no-attribute-decorator",meta:{type:"problem",docs:{description:`Disallows usage of @${o.Attribute} decorator.`,category:"Possible Errors",recommended:!1},schema:[],messages:{noAttributeDecorator:`@${o.Attribute} is considered bad practice. Use @Input instead`}},defaultOptions:[],create:t=>({MethodDefinition(n){n.value&&n.value.type===e.AST_NODE_TYPES.FunctionExpression&&function(e){return"constructor"===e.kind}(n)&&function(e){e.value.params.forEach(e=>{if(null!=e.decorators)for(const n of e.decorators)if(O(n)===o.Attribute){t.report({node:e,messageId:"noAttributeDecorator"});break}})}(n)}})});const Zl=[l.DoCheck,l.OnChanges],Jl=[c.ngDoCheck,c.ngOnChanges];var ec=J({name:"no-conflicting-lifecycle",meta:{type:"suggestion",docs:{description:"Ensures that directives not implement conflicting lifecycle interfaces.",category:"Best Practices",recommended:"error"},schema:[],messages:{noConflictingLifecycleInterface:`Implementing ${l.DoCheck} and ${l.OnChanges} in a class is not recommended`,noConflictingLifecycleMethod:`Declaring ${c.ngDoCheck} and ${c.ngOnChanges} method in a class is not recommended`}},defaultOptions:[],create:e=>({ClassDeclaration(t){(t=>{const n=D(t);if(!Zl.every(e=>n.includes(e)))return;const s=L(t).filter(e=>E(e.expression)&&$(e.expression.name));for(const t of s)e.report({node:t,messageId:"noConflictingLifecycleInterface"})})(t),(t=>{const n=(e=>W(e).map(z).filter(V))(t);if(!Jl.every(e=>n.includes(e)))return;const s=W(t).filter(e=>E(e.key)&&V(e.key.name));for(const t of s)e.report({node:t,messageId:"noConflictingLifecycleMethod"})})(t)}})}),tc=J({name:"no-forward-ref",meta:{type:"suggestion",docs:{description:"Disallows usage of `forwardRef` references for DI",category:"Best Practices",recommended:!1},schema:[],messages:{noForwardRef:"Avoid using `forwardRef`"}},defaultOptions:[],create:e=>({'CallExpression[callee.type="Identifier"][callee.name="forwardRef"]'(t){e.report({node:t,messageId:"noForwardRef"})}})}),nc=J({name:"no-host-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `host` metadata property. See more at https://angular.io/styleguide#style-06-03.",category:"Best Practices",recommended:"error"},schema:[],messages:{noHostMetadataProperty:`Use @${o.HostBinding} or @${o.HostListener} rather than the \`host\` metadata property (https://angular.io/styleguide#style-06-03)`}},defaultOptions:[],create:e=>({[ne](t){const n=H(t,"host");n&&e.report({node:n.parent,messageId:"noHostMetadataProperty"})}})}),sc=J({name:"no-input-prefix",meta:{type:"suggestion",docs:{description:"Input names should not be prefixed by the configured disallowed prefixes.",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{prefixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{noInputPrefix:"@Inputs should not be prefixed by {{disallowedPrefixes}}"}},defaultOptions:[{prefixes:[]}],create:(e,[t])=>({':matches(ClassProperty, MethodDefinition[kind="set"]) > Decorator[expression.callee.name="Input"]'(n){if(!Y(n.expression.callee,"@angular/core"))return;const s=n.parent,r=U(s),i=t.prefixes;i.some(e=>e===r||new RegExp(`^${e}[^a-z]`).test(r))&&e.report({node:s,messageId:"noInputPrefix",data:{disallowedPrefixes:i.join(", ")}})}})});const rc=new Set(["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-controls","aria-current","aria-describedby","aria-disabled","aria-dragged","aria-dropeffect","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-label","aria-labelledby","aria-level","aria-live","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"]);var ic=J({name:"no-input-rename",meta:{type:"suggestion",docs:{description:"Disallows renaming directive inputs by providing a string to the decorator.",category:"Best Practices",recommended:"error"},schema:[],messages:{noInputRename:"In the class {{className}}, the directive input property {{propertyName}} should not be renamed"}},defaultOptions:[],create:e=>({':matches(ClassProperty, MethodDefinition[kind="set"]) > Decorator[expression.callee.name="Input"]'(t){const n=t.expression;if(!Y(n.callee,"@angular/core"))return;if(0===n.arguments.length)return;let r;const i=t.parent,a=i.parent.parent,o=a.decorators&&a.decorators.find(e=>S(e.expression)&&E(e.expression.callee)&&e.expression.callee.name===s.Directive);if(o){const e=H(o,"selector");e&&b(e)&&e.value&&(r=(e.value.toString()||"").replace(/[\[\]\s]/g,"").split(","))}const l=n.arguments[0].value;l&&E(i.key)&&((e,t)=>{return!!(e!==t&&r&&r.some(n=>new RegExp(`^${n}((${t[0].toUpperCase()+t.slice(1)}$)|(?=$))`).test(e))||rc.has(e)&&t===(n=e,n.replace(/-[a-zA-Z]/g,e=>e[1].toUpperCase())));var n})(l.toString(),i.key.name)||e.report({node:i,messageId:"noInputRename",data:{className:a.id&&a.id.name,propertyName:i.key.name}})}})}),ac=J({name:"no-inputs-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `inputs` metadata property. See more at https://angular.io/styleguide#style-05-12.",category:"Best Practices",recommended:"error"},schema:[],messages:{noInputsMetadataProperty:`Use @${o.Input} rather than the \`inputs\` metadata property (https://angular.io/styleguide#style-05-12)`}},defaultOptions:[],create:e=>({[ne](t){const n=H(t,"inputs");n&&e.report({node:n.parent,messageId:"noInputsMetadataProperty"})}})}),oc=J({name:"no-lifecycle-call",meta:{type:"suggestion",docs:{description:"Disallows explicit calls to lifecycle methods.",category:"Best Practices",recommended:!1},schema:[],messages:{noLifecycleCall:"Avoid explicit calls to lifecycle methods"}},defaultOptions:[],create:e=>({MemberExpression:t=>{const{object:{type:n},parent:s,property:r}=t,i="Super"===n;s&&E(r)&&V(r.name)&&!i&&e.report({node:s,messageId:"noLifecycleCall"})}})}),lc=J({name:"no-output-native",meta:{type:"suggestion",docs:{description:"Disallows naming directive outputs as standard DOM event.",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputNative:"The output property should not be named or renamed as a native event"}},defaultOptions:[],create:e=>({'ClassProperty > Decorator[expression.callee.name="Output"]'(t){const n=t.parent;if(!k(t))return;const s=U(n),r=t.expression.arguments[0],i=r&&b(r)&&r.value||s;i&&(cc||(cc=new Set(["abort","afterprint","animationend","animationiteration","animationstart","appinstalled","audioprocess","audioend","audiostart","beforeprint","beforeunload","beginEvent","blocked","blur","boundary","cached","canplay","canplaythrough","change","chargingchange","chargingtimechange","checking","click","close","complete","compositionend","compositionstart","compositionupdate","contextmenu","copy","cut","dblclick","devicechange","devicelight","devicemotion","deviceorientation","deviceproximity","dischargingtimechange","DOMAttributeNameChanged","DOMAttrModified","DOMCharacterDataModified","DOMContentLoaded","DOMElementNameChanged","focus","focusin","focusout","DOMNodeInserted","DOMNodeInsertedIntoDocument","DOMNodeRemoved","DOMNodeRemovedFromDocument","DOMSubtreeModified","downloading","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","end","ended","endEvent","error","fullscreenchange","fullscreenerror","gamepadconnected","gamepaddisconnected","gotpointercapture","hashchange","lostpointercapture","input","invalid","keydown","keypress","keyup","languagechange","levelchange","load","loadeddata","loadedmetadata","loadend","loadstart","mark","message","messageerror","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","nomatch","notificationclick","noupdate","obsolete","offline","online","open","orientationchange","pagehide","pageshow","paste","pause","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","pointerlockerror","pointermove","pointerout","pointerover","pointerup","play","playing","popstate","progress","push","pushsubscriptionchange","ratechange","readystatechange","repeatEvent","reset","resize","resourcetimingbufferfull","result","resume","scroll","seeked","seeking","select","selectstart","selectionchange","show","soundend","soundstart","speechend","speechstart","stalled","start","storage","submit","success","suspend","SVGAbort","SVGError","SVGLoad","SVGResize","SVGScroll","SVGUnload","SVGZoom","timeout","timeupdate","touchcancel","touchend","touchmove","touchstart","transitionend","unload","updateready","upgradeneeded","userproximity","voiceschanged","versionchange","visibilitychange","volumechange","waiting","wheel"]))).has(i.toString())&&e.report({node:n,messageId:"noOutputNative"})}})});let cc=null;var uc=J({name:"no-output-on-prefix",meta:{type:"suggestion",docs:{description:"Name events without the prefix on. See more at https://angular.io/guide/styleguide#dont-prefix-output-properties.",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputOnPrefix:'In the class "{{className}}", the output property "{{memberName}}" should not be prefixed with on'}},defaultOptions:[],create:e=>({'ClassProperty > Decorator[expression.callee.name="Output"]'(t){const n=t.parent,s=k(t),r=U(n);r&&/^on((?![a-z])|(?=$))/.test(r)&&e.report({node:n,messageId:"noOutputOnPrefix",data:{className:s,memberName:r}})}})}),pc=J({name:"no-output-rename",meta:{type:"suggestion",docs:{description:"Disallows renaming directive outputs by providing a string to the decorator.",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputRename:"@Outputs should not be renamed"}},defaultOptions:[],create:e=>({'ClassProperty > Decorator[expression.callee.name="Output"]'(t){const n=t.expression;if(!Y(n.callee,"@angular/core"))return;if(0===n.arguments.length)return;let r;const i=t.parent,a=i.parent.parent,o=a.decorators&&a.decorators.find(e=>S(e.expression)&&E(e.expression.callee)&&e.expression.callee.name===s.Directive);if(o){const e=H(o,"selector");e&&b(e)&&e.value&&(r=new Set((e.value.toString()||"").replace(/[\[\]\s]/g,"").split(",")))}const l=n.arguments[0].value;l&&E(i.key)&&((e,t)=>!(!r||!r.has(e)||e===t))(l.toString(),i.key.name)||e.report({node:i,messageId:"noOutputRename"})}})}),hc=J({name:"no-outputs-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `outputs` metadata property. See more at https://angular.io/styleguide#style-05-12.",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputsMetadataProperty:`Use @${o.Output} rather than the \`outputs\` metadata property (https://angular.io/styleguide#style-05-12)`}},defaultOptions:[],create:e=>({[ne](t){const n=H(t,"outputs");n&&e.report({node:n.parent,messageId:"noOutputsMetadataProperty"})}})}),dc=J({name:"no-pipe-impure",meta:{type:"suggestion",docs:{description:"Disallows the declaration of impure pipes.",category:"Best Practices",recommended:!1},schema:[],messages:{noPipeImpure:"Impure pipes should be avoided because they are invoked on each change-detection cycle."}},defaultOptions:[],create:e=>({[ie](t){const n=q(t,"pure");n&&b(n.value)&&!n.value.value&&e.report({node:n.value,messageId:"noPipeImpure"})}})}),mc=J({name:"no-queries-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `queries` metadata property. See more at https://angular.io/styleguide#style-05-12.",category:"Best Practices",recommended:!1},schema:[],messages:{noQueriesMetadataProperty:`Use @${o.Output} rather than the \`queries\` metadata property (https://angular.io/styleguide#style-05-12)`}},defaultOptions:[],create:e=>({[ne](t){const n=H(t,"queries");n&&e.report({node:n.parent,messageId:"noQueriesMetadataProperty"})}})}),gc=J({name:"no-empty-lifecycle-method",meta:{type:"suggestion",docs:{description:"Disallows declaring empty lifecycle hook methods",category:"Best Practices",recommended:"error"},schema:[],messages:{noEmptyLifecycleMethod:"Lifecycle method {{methodName}} should not be empty"}},defaultOptions:[],create(e){const t=e=>!e.value.body||0===e.value.body.body.length;return{[ne](n){const s=W(n.parent);for(const n of s){const s=z(n);V(s)&&t(n)&&e.report({node:n.key,messageId:"noEmptyLifecycleMethod",data:{methodName:s}})}}}}});const fc="prefer-on-push-component-change-detection";var vc=J({name:fc,meta:{type:"suggestion",docs:{description:"Enforces component's change detection to ChangeDetectionStrategy.OnPush.",category:"Best Practices",recommended:!1},schema:[],messages:{preferOnPushComponentChangeDetection:"The changeDetection value of a component should be set to ChangeDetectionStrategy.OnPush"}},defaultOptions:[],create:e=>({[se](t){const n=H(t,"changeDetection");n?E(n.property)&&"OnPush"===n.property.name||e.report({node:n,messageId:"preferOnPushComponentChangeDetection"}):e.report({node:t,messageId:"preferOnPushComponentChangeDetection"})}})}),yc=J({name:"prefer-output-readonly",meta:{type:"suggestion",docs:{description:"Prefer to declare `@Output` as readonly since they are not supposed to be reassigned",category:"Best Practices",recommended:!1},schema:[],messages:{preferOutputReadonly:"Prefer to declare `@Output` as readonly since they are not supposed to be reassigned"}},defaultOptions:[],create:e=>({'ClassProperty[readonly=undefined] > Decorator[expression.callee.name="Output"]'({parent:t}){e.report({node:t.key,messageId:"preferOutputReadonly"})}})});const xc=/^\.{1,2}\/[^.\/]/;var Sc=J({name:"relative-url-prefix",meta:{type:"suggestion",docs:{description:"The ./ and ../ prefix is standard syntax for relative URLs; don't depend on Angular's current ability to do without that prefix. See more at https://angular.io/styleguide#style-05-04.",category:"Best Practices",recommended:!1},schema:[],messages:{relativeUrlPrefix:"The ./ and ../ prefix is standard syntax for relative URLs. (https://angular.io/styleguide#style-05-04)"}},defaultOptions:[],create:e=>({[se](t){const n=q(t,"templateUrl");n&&A(n.value)&&(xc.test(n.value.value)||e.report({node:n.value,messageId:"relativeUrlPrefix"}));const s=q(t,"styleUrls");s&&s.value&&w(s.value)&&s.value.elements.length>0&&s.value.elements.forEach(t=>{A(t)&&!xc.test(t.value)&&e.report({node:t,messageId:"relativeUrlPrefix"})})}})}),Ec=J({name:"use-component-selector",meta:{type:"suggestion",docs:{description:"Component selector must be declared",category:"Best Practices",recommended:!1},schema:[],messages:{useComponentSelector:"The selector of the component '{{className}}' is mandatory"}},defaultOptions:[],create:e=>({[se](t){const n=t.parent;if(!n||!n.id||!n.id.name)return;const s=H(t,"selector");s&&A(s)&&s.value.length||e.report({node:t,messageId:"useComponentSelector",data:{className:n.id.name}})}})}),_c=J({name:"use-component-view-encapsulation",meta:{type:"suggestion",docs:{description:"Disallows using ViewEncapsulation.None",category:"Best Practices",recommended:!1},schema:[],messages:{useComponentViewEncapsulation:"Using ViewEncapsulation.None makes your styles global, which may have an unintended effect"}},defaultOptions:[],create:e=>({[se](t){const n=H(t,"encapsulation");!n||_(n)&&E(n.property)&&"None"!==n.property.name||e.report({node:n,messageId:"useComponentViewEncapsulation"})}})}),Cc=J({name:"use-injectable-provided-in",meta:{type:"suggestion",docs:{description:`"Using the 'providedIn' property makes classes decorated with @${s.Injectable} tree shakeable`,category:"Best Practices",recommended:!1},schema:[],messages:{useInjectableProvidedIn:`Classes decorated with @${s.Injectable} should use the 'providedIn' property`}},defaultOptions:[],create:e=>({'ClassDeclaration > Decorator[expression.callee.name="Injectable"]'(t){H(t,"providedIn")||e.report({node:t,messageId:"useInjectableProvidedIn"})}})}),wc=J({name:"use-lifecycle-interface",meta:{type:"suggestion",docs:{description:"Ensures classes implement lifecycle interfaces corresponding to the declared lifecycle methods",category:"Best Practices",recommended:"warn"},schema:[],messages:{useLifecycleInterface:"Lifecycle interface '{{interfaceName}}' should be implemented for method '{{methodName}}'. (https://angular.io/styleguide#style-09-01)"}},defaultOptions:[],create:e=>({ClassDeclaration(t){const n=D(t),s=W(t);for(const t of s){const s=z(t);if(!V(s))continue;const r=K(s);n.includes(l[r])||e.report({node:t.key,messageId:"useLifecycleInterface",data:{interfaceName:r,methodName:s}})}}})}),bc=J({name:"use-pipe-decorator",meta:{type:"suggestion",docs:{description:`Ensures that classes implementing PipeTransform interface use @${s.Pipe} decorator`,category:"Best Practices",recommended:!1},schema:[],messages:{usePipeDecorator:"Classes that implement the PipeTransform interface should be decorated with @"+s.Pipe}},defaultOptions:[],create:e=>({'ClassDeclaration > TSClassImplements:matches([expression.name="PipeTransform"], [expression.property.name="PipeTransform"])'(t){const n=t.parent;(e=>((e,t)=>{if(e.decorators)return e.decorators.find(e=>S(e.expression)&&e.expression.arguments&&e.expression.arguments.length>0&&"Pipe"===O(e))})(e))(n)||e.report({node:n,messageId:"usePipeDecorator"})}})}),Ic=J({name:"use-pipe-transform-interface",meta:{type:"suggestion",docs:{description:`Ensures tht classes decorated with @${s.Pipe} implement PipeTransform interface`,category:"Best Practices",recommended:"error"},schema:[],messages:{usePipeTransformInterface:`Classes decorated with @${s.Pipe} decorator should implement PipeTransform interface`}},defaultOptions:[],create:e=>({[ie](t){const n=t.parent;((e,t)=>R(e).find(e=>"PipeTransform"===e))(n)||e.report({node:n,messageId:"usePipeTransformInterface"})}})}),Tc=J({name:"pipe-prefix",meta:{type:"suggestion",docs:{description:"Enforce consistent prefix for pipes.",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{prefixes:{type:"array",items:{type:"string"},minimum:1,uniqueItems:!0}},additionalProperties:!1}],messages:{pipePrefix:"@Pipe's name should be prefixed by {{prefixes}}"}},defaultOptions:[{prefixes:[]}],create:(e,[{prefixes:t}])=>({[ie](n){const s=H(n,"name");if(!s)return;if(!function(e){return Array.isArray(e)&&e.length>0}(t))return;const r=t.join("|"),i=Q.prefix(r,"camelCase");let a;A(s)?a=s.value:I(s)&&s.quasis[0]&&(a=s.quasis[0].value.raw),a&&(i.apply(this,[a])||e.report({node:s,messageId:"pipePrefix",data:{prefixes:Z(t)}}))}})});module.exports={configs:{all:{extends:"./configs/base.json",rules:{"@angular-eslint/component-class-suffix":"error","@angular-eslint/component-max-inline-declarations":"error","@angular-eslint/component-selector":"error","@angular-eslint/contextual-decorator":"error","@angular-eslint/contextual-lifecycle":"error","@angular-eslint/directive-class-suffix":"error","@angular-eslint/directive-selector":"error","@angular-eslint/no-attribute-decorator":"error","@angular-eslint/no-conflicting-lifecycle":"error","@angular-eslint/no-empty-lifecycle-method":"error","@angular-eslint/no-forward-ref":"error","@angular-eslint/no-host-metadata-property":"error","@angular-eslint/no-input-prefix":"error","@angular-eslint/no-input-rename":"error","@angular-eslint/no-inputs-metadata-property":"error","@angular-eslint/no-lifecycle-call":"error","@angular-eslint/no-output-native":"error","@angular-eslint/no-output-on-prefix":"error","@angular-eslint/no-output-rename":"error","@angular-eslint/no-outputs-metadata-property":"error","@angular-eslint/no-pipe-impure":"error","@angular-eslint/no-queries-metadata-property":"error","@angular-eslint/pipe-prefix":"error","@angular-eslint/prefer-on-push-component-change-detection":"error","@angular-eslint/prefer-output-readonly":"error","@angular-eslint/relative-url-prefix":"error","@angular-eslint/use-component-selector":"error","@angular-eslint/use-component-view-encapsulation":"error","@angular-eslint/use-injectable-provided-in":"error","@angular-eslint/use-lifecycle-interface":"error","@angular-eslint/use-pipe-decorator":"error","@angular-eslint/use-pipe-transform-interface":"error"}},base:{parser:"@typescript-eslint/parser",parserOptions:{ecmaVersion:2020,sourceType:"module",project:"./tsconfig.json"},plugins:["@typescript-eslint","@angular-eslint"]},recommended:{extends:"./configs/base.json",rules:{"no-restricted-imports":["error",{paths:[{name:"rxjs/Rx",message:"Please import directly from 'rxjs' instead"}]}],"@typescript-eslint/member-ordering":["error",{default:["static-field","instance-field","static-method","instance-method"]}],"no-restricted-syntax":["error",{selector:'CallExpression[callee.object.name="console"][callee.property.name=/^(debug|info|time|timeEnd|trace)$/]',message:"Unexpected property on console object was called"}],"@typescript-eslint/no-inferrable-types":["error",{ignoreParameters:!0}],"@typescript-eslint/no-non-null-assertion":"error","no-fallthrough":"error","@angular-eslint/component-class-suffix":"error","@angular-eslint/contextual-lifecycle":"error","@angular-eslint/directive-class-suffix":"error","@angular-eslint/no-conflicting-lifecycle":"error","@angular-eslint/no-empty-lifecycle-method":"error","@angular-eslint/no-host-metadata-property":"error","@angular-eslint/no-input-rename":"error","@angular-eslint/no-inputs-metadata-property":"error","@angular-eslint/no-output-native":"error","@angular-eslint/no-output-on-prefix":"error","@angular-eslint/no-output-rename":"error","@angular-eslint/no-outputs-metadata-property":"error","@angular-eslint/use-lifecycle-interface":"warn","@angular-eslint/use-pipe-transform-interface":"error"}},"ng-cli-compat":{extends:["./configs/base.json"],env:{browser:!0,es6:!0,node:!0},plugins:["eslint-plugin-import","eslint-plugin-jsdoc","eslint-plugin-prefer-arrow"],rules:{"@typescript-eslint/interface-name-prefix":"off","@typescript-eslint/explicit-member-accessibility":"off","sort-keys":"off","@angular-eslint/component-class-suffix":"error","@angular-eslint/component-selector":["error",{type:"element",prefix:"app",style:"kebab-case"}],"@angular-eslint/contextual-lifecycle":"error","@angular-eslint/directive-class-suffix":"error","@angular-eslint/directive-selector":["error",{type:"attribute",prefix:"app",style:"camelCase"}],"@angular-eslint/no-conflicting-lifecycle":"error","@angular-eslint/no-host-metadata-property":"error","@angular-eslint/no-input-rename":"error","@angular-eslint/no-inputs-metadata-property":"error","@angular-eslint/no-output-native":"error","@angular-eslint/no-output-on-prefix":"error","@angular-eslint/no-output-rename":"error","@angular-eslint/no-outputs-metadata-property":"error","@angular-eslint/use-lifecycle-interface":"error","@angular-eslint/use-pipe-transform-interface":"error","@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":"off","@typescript-eslint/ban-types":["error",{types:{Object:{message:"Avoid using the `Object` type. Did you mean `object`?"},Function:{message:"Avoid using the `Function` type. Prefer a specific function type, like `() => void`."},Boolean:{message:"Avoid using the `Boolean` type. Did you mean `boolean`?"},Number:{message:"Avoid using the `Number` type. Did you mean `number`?"},String:{message:"Avoid using the `String` type. Did you mean `string`?"},Symbol:{message:"Avoid using the `Symbol` type. Did you mean `symbol`?"}}}],"@typescript-eslint/consistent-type-assertions":"error","@typescript-eslint/dot-notation":"error","@typescript-eslint/member-ordering":"error","@typescript-eslint/naming-convention":"error","@typescript-eslint/no-empty-function":"off","@typescript-eslint/no-empty-interface":"error","@typescript-eslint/no-explicit-any":"off","@typescript-eslint/no-inferrable-types":["error",{ignoreParameters:!0}],"@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-parameter-properties":"off","@typescript-eslint/no-unused-expressions":"error","@typescript-eslint/no-use-before-define":"off","@typescript-eslint/no-var-requires":"off","@typescript-eslint/prefer-for-of":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-namespace-keyword":"error","@typescript-eslint/triple-slash-reference":["error",{path:"always",types:"prefer-import",lib:"always"}],"@typescript-eslint/unified-signatures":"error",complexity:"off","constructor-super":"error",eqeqeq:["error","smart"],"guard-for-in":"error","id-blacklist":["error","any","Number","number","String","string","Boolean","boolean","Undefined","undefined"],"id-match":"error","import/no-deprecated":"warn","jsdoc/newline-after-description":"error","jsdoc/no-types":"error","max-classes-per-file":"off","no-bitwise":"error","no-caller":"error","no-cond-assign":"error","no-console":["error",{allow:["log","warn","dir","timeLog","assert","clear","count","countReset","group","groupEnd","table","dirxml","error","groupCollapsed","Console","profile","profileEnd","timeStamp","context"]}],"no-debugger":"error","no-empty":"off","no-eval":"error","no-fallthrough":"error","no-invalid-this":"off","no-new-wrappers":"error","no-restricted-imports":["error",{name:"rxjs/Rx",message:"Please import directly from 'rxjs' instead"}],"no-shadow":["error",{hoist:"all"}],"no-throw-literal":"error","no-undef-init":"error","no-underscore-dangle":"error","no-unsafe-finally":"error","no-unused-labels":"error","no-var":"error","object-shorthand":"error","one-var":["error","never"],"prefer-arrow/prefer-arrow-functions":"error","prefer-const":"error",radix:"error","use-isnan":"error","valid-typeof":"off"}},"ng-cli-compat--formatting-add-on":{plugins:["eslint-plugin-jsdoc"],rules:{"arrow-body-style":"error","arrow-parens":"off","comma-dangle":"off",curly:"error","eol-last":"error","jsdoc/check-alignment":"error","max-len":["error",{code:140}],"new-parens":"error","no-multiple-empty-lines":"off","no-trailing-spaces":"error","quote-props":["error","as-needed"],"space-before-function-paren":["error",{anonymous:"never",asyncArrow:"always",named:"never"}],"@typescript-eslint/member-delimiter-style":["error",{multiline:{delimiter:"semi",requireLast:!0},singleline:{delimiter:"semi",requireLast:!1}}],quotes:"off","@typescript-eslint/quotes":["error","single",{allowTemplateLiterals:!0}],"@typescript-eslint/semi":["error","always"],"@typescript-eslint/type-annotation-spacing":"error"}}},rules:{"contextual-decorator":ee,"component-class-suffix":ae,"component-max-inline-declarations":pe,"component-selector":Kl,"contextual-lifecycle":Xl,"directive-class-suffix":Gl,"directive-selector":Ql,"no-attribute-decorator":Yl,"no-conflicting-lifecycle":ec,"no-forward-ref":tc,"no-host-metadata-property":nc,"no-input-prefix":sc,"no-input-rename":ic,"no-inputs-metadata-property":ac,"no-lifecycle-call":oc,"no-output-native":lc,"no-output-on-prefix":uc,"no-output-rename":pc,"no-outputs-metadata-property":hc,"no-pipe-impure":dc,"no-queries-metadata-property":mc,"no-empty-lifecycle-method":gc,[fc]:vc,"prefer-output-readonly":yc,"relative-url-prefix":Sc,"use-component-selector":Ec,"use-component-view-encapsulation":_c,"use-injectable-provided-in":Cc,"use-lifecycle-interface":wc,"use-pipe-decorator":bc,"use-pipe-transform-interface":Ic,"pipe-prefix":Tc}};
1
+ var e=require("@typescript-eslint/experimental-utils");function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(this,arguments)}const n=Object.keys;var s,r,i,a;!function(e){e.Component="Component",e.Directive="Directive",e.Injectable="Injectable",e.NgModule="NgModule",e.Pipe="Pipe"}(s||(s={})),function(e){e.Attribute="Attribute",e.Host="Host",e.Inject="Inject",e.Optional="Optional",e.Self="Self",e.SkipSelf="SkipSelf"}(r||(r={})),function(e){e.HostListener="HostListener"}(i||(i={})),function(e){e.ContentChild="ContentChild",e.ContentChildren="ContentChildren",e.HostBinding="HostBinding",e.Input="Input",e.Output="Output",e.ViewChild="ViewChild",e.ViewChildren="ViewChildren"}(a||(a={}));const o=t({},r,i,a);var l,c;!function(e){e.AfterContentChecked="AfterContentChecked",e.AfterContentInit="AfterContentInit",e.AfterViewChecked="AfterViewChecked",e.AfterViewInit="AfterViewInit",e.DoBootstrap="DoBootstrap",e.DoCheck="DoCheck",e.OnChanges="OnChanges",e.OnDestroy="OnDestroy",e.OnInit="OnInit"}(l||(l={})),function(e){e.ngAfterContentChecked="ngAfterContentChecked",e.ngAfterContentInit="ngAfterContentInit",e.ngAfterViewChecked="ngAfterViewChecked",e.ngAfterViewInit="ngAfterViewInit",e.ngDoBootstrap="ngDoBootstrap",e.ngDoCheck="ngDoCheck",e.ngOnChanges="ngOnChanges",e.ngOnDestroy="ngOnDestroy",e.ngOnInit="ngOnInit"}(c||(c={}));const u="camelCase",p="kebab-case",h=n(s),d=n(o),m=n(l),g=n(c),f=new Map([[s.Component,new Set([c.ngAfterContentChecked,c.ngAfterContentInit,c.ngAfterViewChecked,c.ngAfterViewInit,c.ngOnChanges,c.ngOnDestroy,c.ngOnInit,c.ngDoCheck])],[s.Directive,new Set([c.ngAfterContentChecked,c.ngAfterContentInit,c.ngAfterViewChecked,c.ngAfterViewInit,c.ngOnChanges,c.ngOnDestroy,c.ngOnInit,c.ngDoCheck])],[s.Injectable,new Set([c.ngOnDestroy])],[s.NgModule,new Set([c.ngDoBootstrap])],[s.Pipe,new Set([c.ngOnDestroy])]]),v=new Set(d),y=new Set(h),x=new Map([[s.Component,v],[s.Directive,v],[s.Injectable,new Set([o.Host,o.Inject,o.Optional,o.Self,o.SkipSelf])],[s.NgModule,new Set([o.Host,o.Inject,o.Optional,o.Self,o.SkipSelf])],[s.Pipe,new Set([o.Host,o.Inject,o.Optional,o.Self,o.SkipSelf])]]);function S(e){return"CallExpression"===e.type}function E(e){return"Identifier"===e.type}function _(e){return"MemberExpression"===e.type}function C(e){return"ObjectExpression"===e.type}function w(e){return"ArrayExpression"===e.type}function b(e){return"Literal"===e.type}function I(e){return"TemplateLiteral"===e.type}function T(e){return"ImportDeclaration"===e.type}function N(e){return"ImportSpecifier"===e.type}function A(e){return"Literal"===e.type&&"string"==typeof e.value}function P(e){return"MethodDefinition"===e.type}const k=e=>function(e){return"ClassDeclaration"===e.type}(e)?e.id?e.id.name:void 0:e.parent?k(e.parent):void 0,O=({decorators:e})=>null==e?void 0:e.map(M).filter(G).find(U),M=e=>{const{expression:t}=e;return E(t)?t.name:S(t)&&E(t.callee)?t.callee.name:void 0},L=e=>{const{expression:t}=e;return _(t)?t.property.name:t.name},R=e=>e.implements||[],D=e=>R(e).map(L),F=e=>D(e).filter(V),B=new Set(m),$=new Set(g),V=e=>B.has(e),j=e=>$.has(e),U=e=>y.has(e);function q(e){if("Identifier"===e.key.type)return e.key.name;if("Literal"===e.key.type)return e.key.raw;throw new Error('Unexpected "ClassProperty.key.type" provided: '+e.key.type)}const H=(e,t)=>{const n=(e=>{const{expression:t}=e;if(!S(t)||!t.arguments||0===t.arguments.length)return;const n=t.arguments[0];return C(n)&&n.properties?n:void 0})(e);if(!n||!C(n))return;const s=n.properties.find(e=>e.key&&E(e.key)&&e.key.name===t);return s&&"Property"===s.type?s:void 0},W=(e,t)=>{const n=H(e,t);if(n)return n.value},z=e=>e.body.body.filter(P),K=e=>b(e.key)?e.key.value:e.key.name;function X(e){return Array.isArray(e)?e:null!=e?[e]:[]}const G=e=>null!=e,Q={attribute:e=>0!==e.length,camelCase:e=>/^[a-zA-Z0-9\[\]]+$/.test(e),element:e=>null!==e,kebabCase:e=>/^[a-z0-9\-]+-[a-z0-9\-]+$/.test(e),prefix(e,t){const n=new RegExp(`^\\[?(${e})`);return s=>{if(!e)return!0;if(!n.test(s))return!1;const r=s.replace(n,"");if(t===u)return!r||r[0]===r[0].toUpperCase();if(t===p)return!r||"-"===r[0];throw Error("Invalid selector style!")}}};function Y(e,t){let n=e;for(;n=n.parent;)if("Program"===n.type)return n.body.some(n=>T(n)&&n.source.value===t&&n.specifiers.some(t=>N(t)&&t.imported.name===e.name&&t.local.name===e.name));return!1}const Z=e=>{const t=e.length;return 1===t?`"${e[0]}"`:`${e.map(e=>`"${e}"`).slice(0,t-1).join(", ")} or "${[...e].pop()}"`},J=e=>RegExp(`^(${e.join("|")})$`),ee=e.ESLintUtils.RuleCreator(()=>"");var te=ee({name:"contextual-decorator",meta:{type:"suggestion",docs:{description:"Ensures that classes use contextual decorators in its body.",category:"Best Practices",recommended:!1},schema:[],messages:{contextualDecorator:'Decorator out of context for "@{{classDecoratorName}}()"'}},defaultOptions:[],create:e=>({"MethodDefinition[kind=/^(get|set|method)$/], ClassProperty, TSParameterProperty"(t){!function(e,t){var n;if(!(null==(n=t.decorators)?void 0:n.length))return;const s=function(e){for(;e.parent;){if("ClassDeclaration"===e.type)return e;e=e.parent}return null}(t);if(!s)return;const r=O(s);if(r)for(const n of t.decorators)ne(e,n,r)}(e,t)}})});function ne(e,t,n){const s=M(t);if(!s||!v.has(s))return;const r=x.get(n);r&&!r.has(s)&&e.report({node:t,messageId:"contextualDecorator",data:{classDecoratorName:n}})}const se='ClassDeclaration > Decorator:matches([expression.callee.name="Component"], [expression.callee.name="Directive"])',re='ClassDeclaration > Decorator[expression.callee.name="Component"]',ie='ClassDeclaration > Decorator[expression.callee.name="Directive"]',ae='ClassDeclaration > Decorator[expression.callee.name="Pipe"]';var oe=ee({name:"component-class-suffix",meta:{type:"suggestion",docs:{description:'Classes decorated with @Component must have suffix "Component" (or custom) in their name. See more at https://angular.io/styleguide#style-02-03.',category:"Best Practices",recommended:"error"},schema:[{type:"object",properties:{suffixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{componentClassSuffix:"The name of the class {{className}} should end with the suffix {{suffixes}} (https://angular.io/styleguide#style-02-03)"}},defaultOptions:[{suffixes:["Component"]}],create(e,[t]){const{suffixes:n}=t;return{[re](t){const s=t.parent,r=k(s);r&&n.some(e=>r.endsWith(e))||e.report({node:s.id?s.id:s,messageId:"componentClassSuffix",data:{className:r,suffixes:n}})}}}});const le="componentMaxInlineDeclarations",ce=/\r\n|\r|\n/;function ue(e){return I(e)?e.quasis[0].value.raw.trim().split(ce).length:b(e)?e.raw.trim().split(ce).length:0}var pe,he=ee({name:"component-max-inline-declarations",meta:{type:"suggestion",docs:{description:"Disallows having too many lines in inline template and styles. Forces separate template or styles file creation.",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{template:{type:"number"},styles:{type:"number"},animations:{type:"number"}},additionalProperties:!1}],messages:{componentMaxInlineDeclarations:"Exceeds the maximum allowed inline lines for {{propertyType}}. Defined limit: {{definedLimit}} / total lines: {{totalLines}} (https://angular.io/guide/styleguide#style-05-04.)"}},defaultOptions:[{template:3,styles:3,animations:15}],create:(e,[{template:t=-1,styles:n=-1,animations:s=-1}])=>(t=t>-1?t:3,n=n>-1?n:3,s=s>-1?s:15,{[re](r){const i=W(r,"template");if(i){const n=ue(i);n>t&&e.report({node:i,messageId:le,data:{propertyType:"template",definedLimit:t,totalLines:n}})}const a=W(r,"styles");if(a&&w(a)){const t=a.elements.reduce((e,t)=>e+ue(t),0);t>n&&e.report({node:a,messageId:le,data:{propertyType:"styles",definedLimit:n,totalLines:t}})}const o=W(r,"animations");if(o&&w(o)){const t=o.elements.reduce((e,t)=>e+ue(t),0);t>s&&e.report({node:o,messageId:le,data:{propertyType:"animations",definedLimit:s,totalLines:t}})}}})});function de(e){if(":"!=e[0])return[null,e];const t=e.indexOf(":",1);if(-1==t)throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);return[e.slice(1,t),e.slice(t+1)]}function me(e){return"ng-container"===de(e)[1]}function ge(e){return"ng-content"===de(e)[1]}function fe(e){return null===e?null:de(e)[0]}function ve(e,t){return e?`:${e}:${t}`:t}!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"}(pe||(pe={}));const ye={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:"‌",ngsp:""};class xe{constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:n=pe.PARSABLE_DATA,closedByParent:s=!1,isVoid:r=!1,ignoreFirstLf:i=!1,preventNamespaceInheritance:a=!1}={}){this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,e&&e.length>0&&e.forEach(e=>this.closedByChildren[e]=!0),this.isVoid=r,this.closedByParent=s||r,this.implicitNamespacePrefix=t||null,this.contentType=n,this.ignoreFirstLf=i,this.preventNamespaceInheritance=a}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}}let Se,Ee;function _e(e){var t,n;return Ee||(Se=new xe,Ee={base:new xe({isVoid:!0}),meta:new xe({isVoid:!0}),area:new xe({isVoid:!0}),embed:new xe({isVoid:!0}),link:new xe({isVoid:!0}),img:new xe({isVoid:!0}),input:new xe({isVoid:!0}),param:new xe({isVoid:!0}),hr:new xe({isVoid:!0}),br:new xe({isVoid:!0}),source:new xe({isVoid:!0}),track:new xe({isVoid:!0}),wbr:new xe({isVoid:!0}),p:new xe({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 xe({closedByChildren:["tbody","tfoot"]}),tbody:new xe({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new xe({closedByChildren:["tbody"],closedByParent:!0}),tr:new xe({closedByChildren:["tr"],closedByParent:!0}),td:new xe({closedByChildren:["td","th"],closedByParent:!0}),th:new xe({closedByChildren:["td","th"],closedByParent:!0}),col:new xe({isVoid:!0}),svg:new xe({implicitNamespacePrefix:"svg"}),foreignObject:new xe({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new xe({implicitNamespacePrefix:"math"}),li:new xe({closedByChildren:["li"],closedByParent:!0}),dt:new xe({closedByChildren:["dt","dd"]}),dd:new xe({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new xe({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new xe({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new xe({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new xe({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new xe({closedByChildren:["optgroup"],closedByParent:!0}),option:new xe({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new xe({ignoreFirstLf:!0}),listing:new xe({ignoreFirstLf:!0}),style:new xe({contentType:pe.RAW_TEXT}),script:new xe({contentType:pe.RAW_TEXT}),title:new xe({contentType:pe.ESCAPABLE_RAW_TEXT}),textarea:new xe({contentType:pe.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),null!==(n=null!==(t=Ee[e])&&void 0!==t?t:Ee[e.toLowerCase()])&&void 0!==n?n:Se}const Ce=new RegExp("(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*]+)(?:=([\"']?)([^\\]\"']*)\\5)?\\])|(\\))|(\\s*,\\s*)","g");class we{constructor(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}static parse(e){const t=[],n=(e,t)=>{t.notSelectors.length>0&&!t.element&&0==t.classNames.length&&0==t.attrs.length&&(t.element="*"),e.push(t)};let s,r=new we,i=r,a=!1;for(Ce.lastIndex=0;s=Ce.exec(e);){if(s[1]){if(a)throw new Error("Nesting :not in a selector is not allowed");a=!0,i=new we,r.notSelectors.push(i)}const e=s[2];if(e){const t=s[3];"#"===t?i.addAttribute("id",e.substr(1)):"."===t?i.addClassName(e.substr(1)):i.setElement(e)}const o=s[4];if(o&&i.addAttribute(o,s[6]),s[7]&&(a=!1,i=r),s[8]){if(a)throw new Error("Multiple selectors in :not are not supported");n(t,r),r=i=new we}}return n(t,r),t}isElementSelector(){return this.hasElementSelector()&&0==this.classNames.length&&0==this.attrs.length&&0===this.notSelectors.length}hasElementSelector(){return!!this.element}setElement(e=null){this.element=e}getMatchingElementTemplate(){const e=this.element||"div",t=this.classNames.length>0?` class="${this.classNames.join(" ")}"`:"";let n="";for(let e=0;e<this.attrs.length;e+=2)n+=` ${this.attrs[e]}${""!==this.attrs[e+1]?`="${this.attrs[e+1]}"`:""}`;return _e(e).isVoid?`<${e}${t}${n}/>`:`<${e}${t}${n}></${e}>`}getAttrs(){const e=[];return this.classNames.length>0&&e.push("class",this.classNames.join(" ")),e.concat(this.attrs)}addAttribute(e,t=""){this.attrs.push(e,t&&t.toLowerCase()||"")}addClassName(e){this.classNames.push(e.toLowerCase())}toString(){let e=this.element||"";if(this.classNames&&this.classNames.forEach(t=>e+="."+t),this.attrs)for(let t=0;t<this.attrs.length;t+=2){const n=this.attrs[t+1];e+=`[${this.attrs[t]}${n?"="+n:""}]`}return this.notSelectors.forEach(t=>e+=`:not(${t})`),e}}class be{constructor(){this._elementMap=new Map,this._elementPartialMap=new Map,this._classMap=new Map,this._classPartialMap=new Map,this._attrValueMap=new Map,this._attrValuePartialMap=new Map,this._listContexts=[]}static createNotMatcher(e){const t=new be;return t.addSelectables(e,null),t}addSelectables(e,t){let n=null;e.length>1&&(n=new Ie(e),this._listContexts.push(n));for(let s=0;s<e.length;s++)this._addSelectable(e[s],t,n)}_addSelectable(e,t,n){let s=this;const r=e.element,i=e.classNames,a=e.attrs,o=new Te(e,t,n);if(r&&(0===a.length&&0===i.length?this._addTerminal(s._elementMap,r,o):s=this._addPartial(s._elementPartialMap,r)),i)for(let e=0;e<i.length;e++){const t=i[e];0===a.length&&e===i.length-1?this._addTerminal(s._classMap,t,o):s=this._addPartial(s._classPartialMap,t)}if(a)for(let e=0;e<a.length;e+=2){const t=a[e],n=a[e+1];if(e===a.length-2){const e=s._attrValueMap;let r=e.get(t);r||(r=new Map,e.set(t,r)),this._addTerminal(r,n,o)}else{const e=s._attrValuePartialMap;let r=e.get(t);r||(r=new Map,e.set(t,r)),s=this._addPartial(r,n)}}}_addTerminal(e,t,n){let s=e.get(t);s||(s=[],e.set(t,s)),s.push(n)}_addPartial(e,t){let n=e.get(t);return n||(n=new be,e.set(t,n)),n}match(e,t){let n=!1;const s=e.element,r=e.classNames,i=e.attrs;for(let e=0;e<this._listContexts.length;e++)this._listContexts[e].alreadyMatched=!1;if(n=this._matchTerminal(this._elementMap,s,e,t)||n,n=this._matchPartial(this._elementPartialMap,s,e,t)||n,r)for(let s=0;s<r.length;s++){const i=r[s];n=this._matchTerminal(this._classMap,i,e,t)||n,n=this._matchPartial(this._classPartialMap,i,e,t)||n}if(i)for(let s=0;s<i.length;s+=2){const r=i[s],a=i[s+1],o=this._attrValueMap.get(r);a&&(n=this._matchTerminal(o,"",e,t)||n),n=this._matchTerminal(o,a,e,t)||n;const l=this._attrValuePartialMap.get(r);a&&(n=this._matchPartial(l,"",e,t)||n),n=this._matchPartial(l,a,e,t)||n}return n}_matchTerminal(e,t,n,s){if(!e||"string"!=typeof t)return!1;let r=e.get(t)||[];const i=e.get("*");if(i&&(r=r.concat(i)),0===r.length)return!1;let a,o=!1;for(let e=0;e<r.length;e++)a=r[e],o=a.finalize(n,s)||o;return o}_matchPartial(e,t,n,s){if(!e||"string"!=typeof t)return!1;const r=e.get(t);return!!r&&r.match(n,s)}}class Ie{constructor(e){this.selectors=e,this.alreadyMatched=!1}}class Te{constructor(e,t,n){this.selector=e,this.cbContext=t,this.listContext=n,this.notSelectors=e.notSelectors}finalize(e,t){let n=!0;return!(this.notSelectors.length>0)||this.listContext&&this.listContext.alreadyMatched||(n=!be.createNotMatcher(this.notSelectors).match(e,null)),!n||!t||this.listContext&&this.listContext.alreadyMatched||(this.listContext&&(this.listContext.alreadyMatched=!0),t(this.selector,this.cbContext)),n}}var Ne,Ae,Pe,ke,Oe,Me;function Le(e){const t=function(e){const t=e.classNames&&e.classNames.length?[8,...e.classNames]:[];return[e.element&&"*"!==e.element?e.element:"",...e.attrs,...t]}(e),n=e.notSelectors&&e.notSelectors.length?e.notSelectors.map(e=>function(e){const t=e.classNames&&e.classNames.length?[8,...e.classNames]:[];return e.element?[5,e.element,...e.attrs,...t]:e.attrs.length?[3,...e.attrs,...t]:e.classNames&&e.classNames.length?[9,...e.classNames]:[]}(e)):[];return t.concat(...n)}function Re(e){return e?we.parse(e).map(Le):[]}!function(e){e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom"}(Ne||(Ne={})),function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"}(Ae||(Ae={})),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"}(Pe||(Pe={})),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Ignore=2]="Ignore"}(ke||(ke={})),function(e){e[e.Const=0]="Const"}(Oe||(Oe={}));class De{constructor(e=[]){this.modifiers=e}hasModifier(e){return-1!==this.modifiers.indexOf(e)}}!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",e[e.Inferred=6]="Inferred",e[e.None=7]="None"}(Me||(Me={}));class Fe extends De{constructor(e,t){super(t),this.name=e}visitType(e,t){return e.visitBuiltinType(this,t)}}class Be extends De{constructor(e,t,n=null){super(t),this.value=e,this.typeParams=n}visitType(e,t){return e.visitExpressionType(this,t)}}const $e=new Fe(Me.Dynamic),Ve=new Fe(Me.Inferred),je=new Fe(Me.Bool),Ue=(new Fe(Me.Int),new Fe(Me.Number)),qe=new Fe(Me.String),He=(new Fe(Me.Function),new Fe(Me.None));var We,ze,Ke,Xe;function Ge(e,t){const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(!e[s].isEquivalent(t[s]))return!1;return!0}!function(e){e[e.Minus=0]="Minus",e[e.Plus=1]="Plus"}(We||(We={})),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.BitwiseAnd=11]="BitwiseAnd",e[e.Lower=12]="Lower",e[e.LowerEquals=13]="LowerEquals",e[e.Bigger=14]="Bigger",e[e.BiggerEquals=15]="BiggerEquals"}(ze||(ze={}));class Qe{constructor(e,t){this.type=e||null,this.sourceSpan=t||null}prop(e,t){return new wt(this,e,null,t)}key(e,t,n){return new bt(this,e,t,n)}callMethod(e,t,n){return new st(this,e,t,null,n)}callFn(e,t,n){return new rt(this,e,null,t,n)}instantiate(e,t,n){return new it(this,e,t,n)}conditional(e,t=null,n){return new ft(this,e,t,null,n)}equals(e,t){return new Ct(ze.Equals,this,e,null,t)}notEquals(e,t){return new Ct(ze.NotEquals,this,e,null,t)}identical(e,t){return new Ct(ze.Identical,this,e,null,t)}notIdentical(e,t){return new Ct(ze.NotIdentical,this,e,null,t)}minus(e,t){return new Ct(ze.Minus,this,e,null,t)}plus(e,t){return new Ct(ze.Plus,this,e,null,t)}divide(e,t){return new Ct(ze.Divide,this,e,null,t)}multiply(e,t){return new Ct(ze.Multiply,this,e,null,t)}modulo(e,t){return new Ct(ze.Modulo,this,e,null,t)}and(e,t){return new Ct(ze.And,this,e,null,t)}bitwiseAnd(e,t,n=!0){return new Ct(ze.BitwiseAnd,this,e,null,t,n)}or(e,t){return new Ct(ze.Or,this,e,null,t)}lower(e,t){return new Ct(ze.Lower,this,e,null,t)}lowerEquals(e,t){return new Ct(ze.LowerEquals,this,e,null,t)}bigger(e,t){return new Ct(ze.Bigger,this,e,null,t)}biggerEquals(e,t){return new Ct(ze.BiggerEquals,this,e,null,t)}isBlank(e){return this.equals(Pt,e)}cast(e,t){return new xt(this,e,t)}toStmt(){return new Dt(this,null)}}!function(e){e[e.This=0]="This",e[e.Super=1]="Super",e[e.CatchError=2]="CatchError",e[e.CatchStack=3]="CatchStack"}(Ke||(Ke={}));class Ye extends Qe{constructor(e,t,n){super(t,n),"string"==typeof e?(this.name=e,this.builtin=null):(this.name=null,this.builtin=e)}isEquivalent(e){return e instanceof Ye&&this.name===e.name&&this.builtin===e.builtin}isConstant(){return!1}visitExpression(e,t){return e.visitReadVarExpr(this,t)}set(e){if(!this.name)throw new Error(`Built in variable ${this.builtin} can not be assigned to.`);return new et(this.name,e,null,this.sourceSpan)}}class Ze extends Qe{constructor(e,t,n){super(t,n),this.expr=e}visitExpression(e,t){return e.visitTypeofExpr(this,t)}isEquivalent(e){return e instanceof Ze&&e.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}}class Je extends Qe{constructor(e,t,n){super(t,n),this.node=e}isEquivalent(e){return e instanceof Je&&this.node===e.node}isConstant(){return!1}visitExpression(e,t){return e.visitWrappedNodeExpr(this,t)}}class et extends Qe{constructor(e,t,n,s){super(n||t.type,s),this.name=e,this.value=t}isEquivalent(e){return e instanceof et&&this.name===e.name&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitWriteVarExpr(this,t)}toDeclStmt(e,t){return new Lt(this.name,this.value,e,t,this.sourceSpan)}toConstDecl(){return this.toDeclStmt(Ve,[kt.Final])}}class tt extends Qe{constructor(e,t,n,s,r){super(s||n.type,r),this.receiver=e,this.index=t,this.value=n}isEquivalent(e){return e instanceof tt&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitWriteKeyExpr(this,t)}}class nt extends Qe{constructor(e,t,n,s,r){super(s||n.type,r),this.receiver=e,this.name=t,this.value=n}isEquivalent(e){return e instanceof nt&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitWritePropExpr(this,t)}}!function(e){e[e.ConcatArray=0]="ConcatArray",e[e.SubscribeObservable=1]="SubscribeObservable",e[e.Bind=2]="Bind"}(Xe||(Xe={}));class st extends Qe{constructor(e,t,n,s,r){super(s,r),this.receiver=e,this.args=n,"string"==typeof t?(this.name=t,this.builtin=null):(this.name=null,this.builtin=t)}isEquivalent(e){return e instanceof st&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.builtin===e.builtin&&Ge(this.args,e.args)}isConstant(){return!1}visitExpression(e,t){return e.visitInvokeMethodExpr(this,t)}}class rt extends Qe{constructor(e,t,n,s,r=!1){super(n,s),this.fn=e,this.args=t,this.pure=r}isEquivalent(e){return e instanceof rt&&this.fn.isEquivalent(e.fn)&&Ge(this.args,e.args)&&this.pure===e.pure}isConstant(){return!1}visitExpression(e,t){return e.visitInvokeFunctionExpr(this,t)}}class it extends Qe{constructor(e,t,n,s){super(n,s),this.classExpr=e,this.args=t}isEquivalent(e){return e instanceof it&&this.classExpr.isEquivalent(e.classExpr)&&Ge(this.args,e.args)}isConstant(){return!1}visitExpression(e,t){return e.visitInstantiateExpr(this,t)}}class at extends Qe{constructor(e,t,n){super(t,n),this.value=e}isEquivalent(e){return e instanceof at&&this.value===e.value}isConstant(){return!0}visitExpression(e,t){return e.visitLiteralExpr(this,t)}}class ot{constructor(e,t){this.text=e,this.sourceSpan=t}}class lt extends ot{}class ct extends ot{}class ut extends Qe{constructor(e,t,n,s,r){super(qe,r),this.metaBlock=e,this.messageParts=t,this.placeHolderNames=n,this.expressions=s}isEquivalent(e){return!1}isConstant(){return!1}visitExpression(e,t){return e.visitLocalizedString(this,t)}serializeI18nHead(){let e=this.metaBlock.description||"";return this.metaBlock.meaning&&(e=`${this.metaBlock.meaning}|${e}`),this.metaBlock.customId&&(e=`${e}@@${this.metaBlock.customId}`),this.metaBlock.legacyIds&&this.metaBlock.legacyIds.forEach(t=>{e=`${e}␟${t}`}),mt(e,this.messageParts[0].text,this.getMessagePartSourceSpan(0))}getMessagePartSourceSpan(e){var t,n;return null!==(n=null===(t=this.messageParts[e])||void 0===t?void 0:t.sourceSpan)&&void 0!==n?n:this.sourceSpan}getPlaceholderSourceSpan(e){var t,n,s,r;return null!==(r=null!==(n=null===(t=this.placeHolderNames[e])||void 0===t?void 0:t.sourceSpan)&&void 0!==n?n:null===(s=this.expressions[e])||void 0===s?void 0:s.sourceSpan)&&void 0!==r?r:this.sourceSpan}serializeI18nTemplatePart(e){return mt(this.placeHolderNames[e-1].text,this.messageParts[e].text,this.getMessagePartSourceSpan(e))}}const pt=e=>e.replace(/\\/g,"\\\\"),ht=e=>e.replace(/:/g,"\\:"),dt=e=>e.replace(/`/g,"\\`").replace(/\${/g,"$\\{");function mt(e,t,n){return""===e?{cooked:t,raw:dt((s=pt(t),s.replace(/^:/,"\\:"))),range:n}:{cooked:`:${e}:${t}`,raw:dt(`:${ht(pt(e))}:${pt(t)}`),range:n};var s}class gt extends Qe{constructor(e,t,n=null,s){super(t,s),this.value=e,this.typeParams=n}isEquivalent(e){return e instanceof gt&&this.value.name===e.value.name&&this.value.moduleName===e.value.moduleName&&this.value.runtime===e.value.runtime}isConstant(){return!1}visitExpression(e,t){return e.visitExternalExpr(this,t)}}class ft extends Qe{constructor(e,t,n=null,s,r){super(s||t.type,r),this.condition=e,this.falseCase=n,this.trueCase=t}isEquivalent(e){return e instanceof ft&&this.condition.isEquivalent(e.condition)&&this.trueCase.isEquivalent(e.trueCase)&&(n=e.falseCase,null==(t=this.falseCase)||null==n?t==n:t.isEquivalent(n));var t,n}isConstant(){return!1}visitExpression(e,t){return e.visitConditionalExpr(this,t)}}class vt extends Qe{constructor(e,t){super(je,t),this.condition=e}isEquivalent(e){return e instanceof vt&&this.condition.isEquivalent(e.condition)}isConstant(){return!1}visitExpression(e,t){return e.visitNotExpr(this,t)}}class yt extends Qe{constructor(e,t){super(e.type,t),this.condition=e}isEquivalent(e){return e instanceof yt&&this.condition.isEquivalent(e.condition)}isConstant(){return!1}visitExpression(e,t){return e.visitAssertNotNullExpr(this,t)}}class xt extends Qe{constructor(e,t,n){super(t,n),this.value=e}isEquivalent(e){return e instanceof xt&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,t){return e.visitCastExpr(this,t)}}class St{constructor(e,t=null){this.name=e,this.type=t}isEquivalent(e){return this.name===e.name}}class Et extends Qe{constructor(e,t,n,s,r){super(n,s),this.params=e,this.statements=t,this.name=r}isEquivalent(e){return e instanceof Et&&Ge(this.params,e.params)&&Ge(this.statements,e.statements)}isConstant(){return!1}visitExpression(e,t){return e.visitFunctionExpr(this,t)}toDeclStmt(e,t){return new Rt(e,this.params,this.statements,this.type,t,this.sourceSpan)}}class _t extends Qe{constructor(e,t,n,s,r=!0){super(n||Ue,s),this.operator=e,this.expr=t,this.parens=r}isEquivalent(e){return e instanceof _t&&this.operator===e.operator&&this.expr.isEquivalent(e.expr)}isConstant(){return!1}visitExpression(e,t){return e.visitUnaryOperatorExpr(this,t)}}class Ct extends Qe{constructor(e,t,n,s,r,i=!0){super(s||t.type,r),this.operator=e,this.rhs=n,this.parens=i,this.lhs=t}isEquivalent(e){return e instanceof Ct&&this.operator===e.operator&&this.lhs.isEquivalent(e.lhs)&&this.rhs.isEquivalent(e.rhs)}isConstant(){return!1}visitExpression(e,t){return e.visitBinaryOperatorExpr(this,t)}}class wt extends Qe{constructor(e,t,n,s){super(n,s),this.receiver=e,this.name=t}isEquivalent(e){return e instanceof wt&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name}isConstant(){return!1}visitExpression(e,t){return e.visitReadPropExpr(this,t)}set(e){return new nt(this.receiver,this.name,e,null,this.sourceSpan)}}class bt extends Qe{constructor(e,t,n,s){super(n,s),this.receiver=e,this.index=t}isEquivalent(e){return e instanceof bt&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)}isConstant(){return!1}visitExpression(e,t){return e.visitReadKeyExpr(this,t)}set(e){return new tt(this.receiver,this.index,e,null,this.sourceSpan)}}class It extends Qe{constructor(e,t,n){super(t,n),this.entries=e}isConstant(){return this.entries.every(e=>e.isConstant())}isEquivalent(e){return e instanceof It&&Ge(this.entries,e.entries)}visitExpression(e,t){return e.visitLiteralArrayExpr(this,t)}}class Tt{constructor(e,t,n){this.key=e,this.value=t,this.quoted=n}isEquivalent(e){return this.key===e.key&&this.value.isEquivalent(e.value)}}class Nt extends Qe{constructor(e,t,n){super(t,n),this.entries=e,this.valueType=null,t&&(this.valueType=t.valueType)}isEquivalent(e){return e instanceof Nt&&Ge(this.entries,e.entries)}isConstant(){return this.entries.every(e=>e.value.isConstant())}visitExpression(e,t){return e.visitLiteralMapExpr(this,t)}}new Ye(Ke.This,null,null),new Ye(Ke.Super,null,null),new Ye(Ke.CatchError,null,null),new Ye(Ke.CatchStack,null,null);const At=new at(null,null,null),Pt=new at(null,Ve,null);var kt;!function(e){e[e.Final=0]="Final",e[e.Private=1]="Private",e[e.Exported=2]="Exported",e[e.Static=3]="Static"}(kt||(kt={}));class Ot extends class{constructor(e,t,n){this.text=e,this.multiline=t,this.trailingNewline=n}toString(){return this.multiline?` ${this.text} `:this.text}}{constructor(e){super("",!0,!0),this.tags=e}toString(){return function(e){if(0===e.length)return"";if(1===e.length&&e[0].tagName&&!e[0].text)return`*${Gt(e[0])} `;let t="*\n";for(const n of e)t+=" *",t+=Gt(n).replace(/\n/g,"\n * "),t+="\n";return t+=" ",t}(this.tags)}}class Mt{constructor(e=[],t=null,n){this.modifiers=e,this.sourceSpan=t,this.leadingComments=n}hasModifier(e){return-1!==this.modifiers.indexOf(e)}addLeadingComment(e){var t;this.leadingComments=null!==(t=this.leadingComments)&&void 0!==t?t:[],this.leadingComments.push(e)}}class Lt extends Mt{constructor(e,t,n,s,r,i){super(s,r,i),this.name=e,this.value=t,this.type=n||t&&t.type||null}isEquivalent(e){return e instanceof Lt&&this.name===e.name&&(this.value?!!e.value&&this.value.isEquivalent(e.value):!e.value)}visitStatement(e,t){return e.visitDeclareVarStmt(this,t)}}class Rt extends Mt{constructor(e,t,n,s,r,i,a){super(r,i,a),this.name=e,this.params=t,this.statements=n,this.type=s||null}isEquivalent(e){return e instanceof Rt&&Ge(this.params,e.params)&&Ge(this.statements,e.statements)}visitStatement(e,t){return e.visitDeclareFunctionStmt(this,t)}}class Dt extends Mt{constructor(e,t,n){super([],t,n),this.expr=e}isEquivalent(e){return e instanceof Dt&&this.expr.isEquivalent(e.expr)}visitStatement(e,t){return e.visitExpressionStmt(this,t)}}class Ft extends Mt{constructor(e,t=null,n){super([],t,n),this.value=e}isEquivalent(e){return e instanceof Ft&&this.value.isEquivalent(e.value)}visitStatement(e,t){return e.visitReturnStmt(this,t)}}class Bt extends Mt{constructor(e,t,n=[],s,r){super([],s,r),this.condition=e,this.trueCase=t,this.falseCase=n}isEquivalent(e){return e instanceof Bt&&this.condition.isEquivalent(e.condition)&&Ge(this.trueCase,e.trueCase)&&Ge(this.falseCase,e.falseCase)}visitStatement(e,t){return e.visitIfStmt(this,t)}}function $t(e,t,n){return new Ye(e,t,n)}function Vt(e,t=null,n){return new gt(e,null,t,n)}function jt(e,t,n){return new Be(e,t,n)}function Ut(e){return new Ze(e)}function qt(e,t,n){return new It(e,t,n)}function Ht(e,t=null){return new Nt(e.map(e=>new Tt(e.key,e.value,e.quoted)),t,null)}function Wt(e,t,n,s,r){return new Et(e,t,n,s,r)}function zt(e,t,n,s,r){return new Bt(e,t,n,s,r)}function Kt(e,t,n){return new at(e,t,n)}function Xt(e){return e instanceof at&&null===e.value}function Gt(e){let t="";if(e.tagName&&(t+=" @"+e.tagName),e.text){if(e.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');t+=" "+e.text.replace(/@/g,"\\@")}return t}const Qt=/-+([a-z0-9])/g;function Yt(e,t){return Zt(e,":",t)}function Zt(e,t,n){const s=e.indexOf(t);return-1==s?n:[e.slice(0,s).trim(),e.slice(s+1).trim()]}function Jt(e){throw new Error("Internal Error: "+e)}function en(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function tn(e){let t="";for(let n=0;n<e.length;n++){let s=e.charCodeAt(n);if(s>=55296&&s<=56319&&e.length>n+1){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(n++,s=(s-55296<<10)+t-56320+65536)}s<=127?t+=String.fromCharCode(s):s<=2047?t+=String.fromCharCode(s>>6&31|192,63&s|128):s<=65535?t+=String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128):s<=2097151&&(t+=String.fromCharCode(s>>18&7|240,s>>12&63|128,s>>6&63|128,63&s|128))}return t}function nn(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(nn).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;if(!e.toString)return"object";const t=e.toString();if(null==t)return""+t;const n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}const sn="undefined"!=typeof window&&window,rn="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,an="undefined"!=typeof global&&global||sn||rn,on=$t("<unknown>"),ln={};class cn extends Qe{constructor(e){super(e.type),this.resolved=e,this.original=e}visitExpression(e,t){return t===ln?this.original.visitExpression(e,t):this.resolved.visitExpression(e,t)}isEquivalent(e){return e instanceof cn&&this.resolved.isEquivalent(e.resolved)}isConstant(){return!0}fixup(e){this.resolved=e,this.shared=!0}}class un{constructor(e=!1){this.isClosureCompilerEnabled=e,this.statements=[],this.literals=new Map,this.literalFactories=new Map,this.injectorDefinitions=new Map,this.directiveDefinitions=new Map,this.componentDefinitions=new Map,this.pipeDefinitions=new Map,this.nextNameIndex=0}getConstLiteral(e,t){if(e instanceof at&&!mn(e)||e instanceof cn)return e;const n=this.keyOf(e);let s=this.literals.get(n),r=!1;if(s||(s=new cn(e),this.literals.set(n,s),r=!0),!r&&!s.shared||r&&t){const t=this.freshName();let n,r;this.isClosureCompilerEnabled&&mn(e)?(n=$t(t).set(new Et([],[new Ft(e)])),r=$t(t).callFn([])):(n=$t(t).set(e),r=$t(t)),this.statements.push(n.toDeclStmt(Ve,[kt.Final])),s.fixup(r)}return s}getDefinition(e,t,n,s=!1){const r=this.definitionsOf(t);let i=r.get(e),a=!1;if(!i){const s=this.propertyNameOf(t);i=new cn(n.importExpr(e).prop(s)),r.set(e,i),a=!0}if(!a&&!i.shared||a&&s){const e=this.freshName();this.statements.push($t(e).set(i.resolved).toDeclStmt(Ve,[kt.Final])),i.fixup($t(e))}return i}getLiteralFactory(e){if(e instanceof It){const t=e.entries.map(e=>e.isConstant()?e:on),n=this.keyOf(qt(t));return this._getLiteralFactory(n,e.entries,e=>qt(e))}{const t=Ht(e.entries.map(e=>({key:e.key,value:e.value.isConstant()?e.value:on,quoted:e.quoted}))),n=this.keyOf(t);return this._getLiteralFactory(n,e.entries.map(e=>e.value),t=>Ht(t.map((t,n)=>({key:e.entries[n].key,value:t,quoted:e.entries[n].quoted}))))}}_getLiteralFactory(e,t,n){let s=this.literalFactories.get(e);const r=t.filter(e=>!e.isConstant());if(!s){const r=t.map((e,t)=>e.isConstant()?this.getConstLiteral(e,!0):$t("a"+t)),i=Wt(r.filter(dn).map(e=>new St(e.name,$e)),[new Ft(n(r))],Ve),a=this.freshName();this.statements.push($t(a).set(i).toDeclStmt(Ve,[kt.Final])),s=$t(a),this.literalFactories.set(e,s)}return{literalFactory:s,literalFactoryArguments:r}}uniqueName(e){return`${e}${this.nextNameIndex++}`}definitionsOf(e){switch(e){case 2:return this.componentDefinitions;case 1:return this.directiveDefinitions;case 0:return this.injectorDefinitions;case 3:return this.pipeDefinitions}return Jt("Unknown definition kind "+e),this.componentDefinitions}propertyNameOf(e){switch(e){case 2:return"ɵcmp";case 1:return"ɵdir";case 0:return"ɵinj";case 3:return"ɵpipe"}return Jt("Unknown definition kind "+e),"<unknown>"}freshName(){return this.uniqueName("_c")}keyOf(e){return e.visitExpression(new pn,ln)}}class pn{constructor(){this.visitWrappedNodeExpr=hn,this.visitWriteVarExpr=hn,this.visitWriteKeyExpr=hn,this.visitWritePropExpr=hn,this.visitInvokeMethodExpr=hn,this.visitInvokeFunctionExpr=hn,this.visitInstantiateExpr=hn,this.visitConditionalExpr=hn,this.visitNotExpr=hn,this.visitAssertNotNullExpr=hn,this.visitCastExpr=hn,this.visitFunctionExpr=hn,this.visitUnaryOperatorExpr=hn,this.visitBinaryOperatorExpr=hn,this.visitReadPropExpr=hn,this.visitReadKeyExpr=hn,this.visitCommaExpr=hn,this.visitLocalizedString=hn}visitLiteralExpr(e){return""+("string"==typeof e.value?'"'+e.value+'"':e.value)}visitLiteralArrayExpr(e,t){return`[${e.entries.map(e=>e.visitExpression(this,t)).join(",")}]`}visitLiteralMapExpr(e,t){return"{"+e.entries.map(e=>`${(e=>{const t=e.quoted?'"':"";return`${t}${e.key}${t}`})(e)}:${e.value.visitExpression(this,t)}`).join(",")}visitExternalExpr(e){return e.value.moduleName?`EX:${e.value.moduleName}:${e.value.name}`:"EX:"+e.value.runtime.name}visitReadVarExpr(e){return"VAR:"+e.name}visitTypeofExpr(e,t){return"TYPEOF:"+e.expr.visitExpression(this,t)}}function hn(e){throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${e.constructor.name}`)}function dn(e){return e instanceof Ye}function mn(e){return e instanceof at&&"string"==typeof e.value&&e.value.length>=50}const gn="@angular/core";class fn{}function vn(e){return e.replace(/\W/g,"_")}fn.ANALYZE_FOR_ENTRY_COMPONENTS={name:"ANALYZE_FOR_ENTRY_COMPONENTS",moduleName:gn},fn.ElementRef={name:"ElementRef",moduleName:gn},fn.NgModuleRef={name:"NgModuleRef",moduleName:gn},fn.ViewContainerRef={name:"ViewContainerRef",moduleName:gn},fn.ChangeDetectorRef={name:"ChangeDetectorRef",moduleName:gn},fn.QueryList={name:"QueryList",moduleName:gn},fn.TemplateRef={name:"TemplateRef",moduleName:gn},fn.Renderer2={name:"Renderer2",moduleName:gn},fn.CodegenComponentFactoryResolver={name:"ɵCodegenComponentFactoryResolver",moduleName:gn},fn.ComponentFactoryResolver={name:"ComponentFactoryResolver",moduleName:gn},fn.ComponentFactory={name:"ComponentFactory",moduleName:gn},fn.ComponentRef={name:"ComponentRef",moduleName:gn},fn.NgModuleFactory={name:"NgModuleFactory",moduleName:gn},fn.createModuleFactory={name:"ɵcmf",moduleName:gn},fn.moduleDef={name:"ɵmod",moduleName:gn},fn.moduleProviderDef={name:"ɵmpd",moduleName:gn},fn.RegisterModuleFactoryFn={name:"ɵregisterModuleFactory",moduleName:gn},fn.inject={name:"ɵɵinject",moduleName:gn},fn.directiveInject={name:"ɵɵdirectiveInject",moduleName:gn},fn.INJECTOR={name:"INJECTOR",moduleName:gn},fn.Injector={name:"Injector",moduleName:gn},fn.ɵɵdefineInjectable={name:"ɵɵdefineInjectable",moduleName:gn},fn.InjectableDef={name:"ɵɵInjectableDef",moduleName:gn},fn.ViewEncapsulation={name:"ViewEncapsulation",moduleName:gn},fn.ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:gn},fn.SecurityContext={name:"SecurityContext",moduleName:gn},fn.LOCALE_ID={name:"LOCALE_ID",moduleName:gn},fn.TRANSLATIONS_FORMAT={name:"TRANSLATIONS_FORMAT",moduleName:gn},fn.inlineInterpolate={name:"ɵinlineInterpolate",moduleName:gn},fn.interpolate={name:"ɵinterpolate",moduleName:gn},fn.EMPTY_ARRAY={name:"ɵEMPTY_ARRAY",moduleName:gn},fn.EMPTY_MAP={name:"ɵEMPTY_MAP",moduleName:gn},fn.Renderer={name:"Renderer",moduleName:gn},fn.viewDef={name:"ɵvid",moduleName:gn},fn.elementDef={name:"ɵeld",moduleName:gn},fn.anchorDef={name:"ɵand",moduleName:gn},fn.textDef={name:"ɵted",moduleName:gn},fn.directiveDef={name:"ɵdid",moduleName:gn},fn.providerDef={name:"ɵprd",moduleName:gn},fn.queryDef={name:"ɵqud",moduleName:gn},fn.pureArrayDef={name:"ɵpad",moduleName:gn},fn.pureObjectDef={name:"ɵpod",moduleName:gn},fn.purePipeDef={name:"ɵppd",moduleName:gn},fn.pipeDef={name:"ɵpid",moduleName:gn},fn.nodeValue={name:"ɵnov",moduleName:gn},fn.ngContentDef={name:"ɵncd",moduleName:gn},fn.unwrapValue={name:"ɵunv",moduleName:gn},fn.createRendererType2={name:"ɵcrt",moduleName:gn},fn.RendererType2={name:"RendererType2",moduleName:gn},fn.ViewDefinition={name:"ɵViewDefinition",moduleName:gn},fn.createComponentFactory={name:"ɵccf",moduleName:gn},fn.setClassMetadata={name:"ɵsetClassMetadata",moduleName:gn};let yn=0;var xn;!function(e){e[e.Pipe=0]="Pipe",e[e.Directive=1]="Directive",e[e.NgModule=2]="NgModule",e[e.Injectable=3]="Injectable"}(xn||(xn={}));const Sn="@angular/core";class En{}function _n(e){return Ht(Object.keys(e).map(t=>({key:t,value:e[t],quoted:!1})))}function Cn(e,t){if(0===t)return jt(e);const n=[];for(let e=0;e<t;e++)n.push($e);return jt(e,void 0,n)}function wn(e){return"@"+e}function bn(e,t){return`animation_${e}_${t}`}En.NEW_METHOD="factory",En.TRANSFORM_METHOD="transform",En.PATCH_DEPS="patchedDeps",En.namespaceHTML={name:"ɵɵnamespaceHTML",moduleName:Sn},En.namespaceMathML={name:"ɵɵnamespaceMathML",moduleName:Sn},En.namespaceSVG={name:"ɵɵnamespaceSVG",moduleName:Sn},En.element={name:"ɵɵelement",moduleName:Sn},En.elementStart={name:"ɵɵelementStart",moduleName:Sn},En.elementEnd={name:"ɵɵelementEnd",moduleName:Sn},En.advance={name:"ɵɵadvance",moduleName:Sn},En.syntheticHostProperty={name:"ɵɵsyntheticHostProperty",moduleName:Sn},En.syntheticHostListener={name:"ɵɵsyntheticHostListener",moduleName:Sn},En.attribute={name:"ɵɵattribute",moduleName:Sn},En.attributeInterpolate1={name:"ɵɵattributeInterpolate1",moduleName:Sn},En.attributeInterpolate2={name:"ɵɵattributeInterpolate2",moduleName:Sn},En.attributeInterpolate3={name:"ɵɵattributeInterpolate3",moduleName:Sn},En.attributeInterpolate4={name:"ɵɵattributeInterpolate4",moduleName:Sn},En.attributeInterpolate5={name:"ɵɵattributeInterpolate5",moduleName:Sn},En.attributeInterpolate6={name:"ɵɵattributeInterpolate6",moduleName:Sn},En.attributeInterpolate7={name:"ɵɵattributeInterpolate7",moduleName:Sn},En.attributeInterpolate8={name:"ɵɵattributeInterpolate8",moduleName:Sn},En.attributeInterpolateV={name:"ɵɵattributeInterpolateV",moduleName:Sn},En.classProp={name:"ɵɵclassProp",moduleName:Sn},En.elementContainerStart={name:"ɵɵelementContainerStart",moduleName:Sn},En.elementContainerEnd={name:"ɵɵelementContainerEnd",moduleName:Sn},En.elementContainer={name:"ɵɵelementContainer",moduleName:Sn},En.styleMap={name:"ɵɵstyleMap",moduleName:Sn},En.styleMapInterpolate1={name:"ɵɵstyleMapInterpolate1",moduleName:Sn},En.styleMapInterpolate2={name:"ɵɵstyleMapInterpolate2",moduleName:Sn},En.styleMapInterpolate3={name:"ɵɵstyleMapInterpolate3",moduleName:Sn},En.styleMapInterpolate4={name:"ɵɵstyleMapInterpolate4",moduleName:Sn},En.styleMapInterpolate5={name:"ɵɵstyleMapInterpolate5",moduleName:Sn},En.styleMapInterpolate6={name:"ɵɵstyleMapInterpolate6",moduleName:Sn},En.styleMapInterpolate7={name:"ɵɵstyleMapInterpolate7",moduleName:Sn},En.styleMapInterpolate8={name:"ɵɵstyleMapInterpolate8",moduleName:Sn},En.styleMapInterpolateV={name:"ɵɵstyleMapInterpolateV",moduleName:Sn},En.classMap={name:"ɵɵclassMap",moduleName:Sn},En.classMapInterpolate1={name:"ɵɵclassMapInterpolate1",moduleName:Sn},En.classMapInterpolate2={name:"ɵɵclassMapInterpolate2",moduleName:Sn},En.classMapInterpolate3={name:"ɵɵclassMapInterpolate3",moduleName:Sn},En.classMapInterpolate4={name:"ɵɵclassMapInterpolate4",moduleName:Sn},En.classMapInterpolate5={name:"ɵɵclassMapInterpolate5",moduleName:Sn},En.classMapInterpolate6={name:"ɵɵclassMapInterpolate6",moduleName:Sn},En.classMapInterpolate7={name:"ɵɵclassMapInterpolate7",moduleName:Sn},En.classMapInterpolate8={name:"ɵɵclassMapInterpolate8",moduleName:Sn},En.classMapInterpolateV={name:"ɵɵclassMapInterpolateV",moduleName:Sn},En.styleProp={name:"ɵɵstyleProp",moduleName:Sn},En.stylePropInterpolate1={name:"ɵɵstylePropInterpolate1",moduleName:Sn},En.stylePropInterpolate2={name:"ɵɵstylePropInterpolate2",moduleName:Sn},En.stylePropInterpolate3={name:"ɵɵstylePropInterpolate3",moduleName:Sn},En.stylePropInterpolate4={name:"ɵɵstylePropInterpolate4",moduleName:Sn},En.stylePropInterpolate5={name:"ɵɵstylePropInterpolate5",moduleName:Sn},En.stylePropInterpolate6={name:"ɵɵstylePropInterpolate6",moduleName:Sn},En.stylePropInterpolate7={name:"ɵɵstylePropInterpolate7",moduleName:Sn},En.stylePropInterpolate8={name:"ɵɵstylePropInterpolate8",moduleName:Sn},En.stylePropInterpolateV={name:"ɵɵstylePropInterpolateV",moduleName:Sn},En.nextContext={name:"ɵɵnextContext",moduleName:Sn},En.templateCreate={name:"ɵɵtemplate",moduleName:Sn},En.text={name:"ɵɵtext",moduleName:Sn},En.enableBindings={name:"ɵɵenableBindings",moduleName:Sn},En.disableBindings={name:"ɵɵdisableBindings",moduleName:Sn},En.getCurrentView={name:"ɵɵgetCurrentView",moduleName:Sn},En.textInterpolate={name:"ɵɵtextInterpolate",moduleName:Sn},En.textInterpolate1={name:"ɵɵtextInterpolate1",moduleName:Sn},En.textInterpolate2={name:"ɵɵtextInterpolate2",moduleName:Sn},En.textInterpolate3={name:"ɵɵtextInterpolate3",moduleName:Sn},En.textInterpolate4={name:"ɵɵtextInterpolate4",moduleName:Sn},En.textInterpolate5={name:"ɵɵtextInterpolate5",moduleName:Sn},En.textInterpolate6={name:"ɵɵtextInterpolate6",moduleName:Sn},En.textInterpolate7={name:"ɵɵtextInterpolate7",moduleName:Sn},En.textInterpolate8={name:"ɵɵtextInterpolate8",moduleName:Sn},En.textInterpolateV={name:"ɵɵtextInterpolateV",moduleName:Sn},En.restoreView={name:"ɵɵrestoreView",moduleName:Sn},En.pureFunction0={name:"ɵɵpureFunction0",moduleName:Sn},En.pureFunction1={name:"ɵɵpureFunction1",moduleName:Sn},En.pureFunction2={name:"ɵɵpureFunction2",moduleName:Sn},En.pureFunction3={name:"ɵɵpureFunction3",moduleName:Sn},En.pureFunction4={name:"ɵɵpureFunction4",moduleName:Sn},En.pureFunction5={name:"ɵɵpureFunction5",moduleName:Sn},En.pureFunction6={name:"ɵɵpureFunction6",moduleName:Sn},En.pureFunction7={name:"ɵɵpureFunction7",moduleName:Sn},En.pureFunction8={name:"ɵɵpureFunction8",moduleName:Sn},En.pureFunctionV={name:"ɵɵpureFunctionV",moduleName:Sn},En.pipeBind1={name:"ɵɵpipeBind1",moduleName:Sn},En.pipeBind2={name:"ɵɵpipeBind2",moduleName:Sn},En.pipeBind3={name:"ɵɵpipeBind3",moduleName:Sn},En.pipeBind4={name:"ɵɵpipeBind4",moduleName:Sn},En.pipeBindV={name:"ɵɵpipeBindV",moduleName:Sn},En.hostProperty={name:"ɵɵhostProperty",moduleName:Sn},En.property={name:"ɵɵproperty",moduleName:Sn},En.propertyInterpolate={name:"ɵɵpropertyInterpolate",moduleName:Sn},En.propertyInterpolate1={name:"ɵɵpropertyInterpolate1",moduleName:Sn},En.propertyInterpolate2={name:"ɵɵpropertyInterpolate2",moduleName:Sn},En.propertyInterpolate3={name:"ɵɵpropertyInterpolate3",moduleName:Sn},En.propertyInterpolate4={name:"ɵɵpropertyInterpolate4",moduleName:Sn},En.propertyInterpolate5={name:"ɵɵpropertyInterpolate5",moduleName:Sn},En.propertyInterpolate6={name:"ɵɵpropertyInterpolate6",moduleName:Sn},En.propertyInterpolate7={name:"ɵɵpropertyInterpolate7",moduleName:Sn},En.propertyInterpolate8={name:"ɵɵpropertyInterpolate8",moduleName:Sn},En.propertyInterpolateV={name:"ɵɵpropertyInterpolateV",moduleName:Sn},En.i18n={name:"ɵɵi18n",moduleName:Sn},En.i18nAttributes={name:"ɵɵi18nAttributes",moduleName:Sn},En.i18nExp={name:"ɵɵi18nExp",moduleName:Sn},En.i18nStart={name:"ɵɵi18nStart",moduleName:Sn},En.i18nEnd={name:"ɵɵi18nEnd",moduleName:Sn},En.i18nApply={name:"ɵɵi18nApply",moduleName:Sn},En.i18nPostprocess={name:"ɵɵi18nPostprocess",moduleName:Sn},En.pipe={name:"ɵɵpipe",moduleName:Sn},En.projection={name:"ɵɵprojection",moduleName:Sn},En.projectionDef={name:"ɵɵprojectionDef",moduleName:Sn},En.reference={name:"ɵɵreference",moduleName:Sn},En.inject={name:"ɵɵinject",moduleName:Sn},En.injectAttribute={name:"ɵɵinjectAttribute",moduleName:Sn},En.injectPipeChangeDetectorRef={name:"ɵɵinjectPipeChangeDetectorRef",moduleName:Sn},En.directiveInject={name:"ɵɵdirectiveInject",moduleName:Sn},En.invalidFactory={name:"ɵɵinvalidFactory",moduleName:Sn},En.invalidFactoryDep={name:"ɵɵinvalidFactoryDep",moduleName:Sn},En.templateRefExtractor={name:"ɵɵtemplateRefExtractor",moduleName:Sn},En.resolveWindow={name:"ɵɵresolveWindow",moduleName:Sn},En.resolveDocument={name:"ɵɵresolveDocument",moduleName:Sn},En.resolveBody={name:"ɵɵresolveBody",moduleName:Sn},En.defineComponent={name:"ɵɵdefineComponent",moduleName:Sn},En.setComponentScope={name:"ɵɵsetComponentScope",moduleName:Sn},En.ComponentDefWithMeta={name:"ɵɵComponentDefWithMeta",moduleName:Sn},En.FactoryDef={name:"ɵɵFactoryDef",moduleName:Sn},En.defineDirective={name:"ɵɵdefineDirective",moduleName:Sn},En.DirectiveDefWithMeta={name:"ɵɵDirectiveDefWithMeta",moduleName:Sn},En.InjectorDef={name:"ɵɵInjectorDef",moduleName:Sn},En.defineInjector={name:"ɵɵdefineInjector",moduleName:Sn},En.NgModuleDefWithMeta={name:"ɵɵNgModuleDefWithMeta",moduleName:Sn},En.ModuleWithProviders={name:"ModuleWithProviders",moduleName:Sn},En.defineNgModule={name:"ɵɵdefineNgModule",moduleName:Sn},En.setNgModuleScope={name:"ɵɵsetNgModuleScope",moduleName:Sn},En.PipeDefWithMeta={name:"ɵɵPipeDefWithMeta",moduleName:Sn},En.definePipe={name:"ɵɵdefinePipe",moduleName:Sn},En.queryRefresh={name:"ɵɵqueryRefresh",moduleName:Sn},En.viewQuery={name:"ɵɵviewQuery",moduleName:Sn},En.staticViewQuery={name:"ɵɵstaticViewQuery",moduleName:Sn},En.staticContentQuery={name:"ɵɵstaticContentQuery",moduleName:Sn},En.loadQuery={name:"ɵɵloadQuery",moduleName:Sn},En.contentQuery={name:"ɵɵcontentQuery",moduleName:Sn},En.NgOnChangesFeature={name:"ɵɵNgOnChangesFeature",moduleName:Sn},En.InheritDefinitionFeature={name:"ɵɵInheritDefinitionFeature",moduleName:Sn},En.CopyDefinitionFeature={name:"ɵɵCopyDefinitionFeature",moduleName:Sn},En.ProvidersFeature={name:"ɵɵProvidersFeature",moduleName:Sn},En.listener={name:"ɵɵlistener",moduleName:Sn},En.getFactoryOf={name:"ɵɵgetFactoryOf",moduleName:Sn},En.getInheritedFactory={name:"ɵɵgetInheritedFactory",moduleName:Sn},En.sanitizeHtml={name:"ɵɵsanitizeHtml",moduleName:Sn},En.sanitizeStyle={name:"ɵɵsanitizeStyle",moduleName:Sn},En.sanitizeResourceUrl={name:"ɵɵsanitizeResourceUrl",moduleName:Sn},En.sanitizeScript={name:"ɵɵsanitizeScript",moduleName:Sn},En.sanitizeUrl={name:"ɵɵsanitizeUrl",moduleName:Sn},En.sanitizeUrlOrResourceUrl={name:"ɵɵsanitizeUrlOrResourceUrl",moduleName:Sn},En.trustConstantHtml={name:"ɵɵtrustConstantHtml",moduleName:Sn},En.trustConstantScript={name:"ɵɵtrustConstantScript",moduleName:Sn},En.trustConstantResourceUrl={name:"ɵɵtrustConstantResourceUrl",moduleName:Sn};class In{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e){return e.visitText(this)}}class Tn{constructor(e,t,n){this.value=e,this.sourceSpan=t,this.i18n=n}visit(e){return e.visitBoundText(this)}}class Nn{constructor(e,t,n,s,r){this.name=e,this.value=t,this.sourceSpan=n,this.valueSpan=s,this.i18n=r}visit(e){return e.visitTextAttribute(this)}}class An{constructor(e,t,n,s,r,i,a,o,l){this.name=e,this.type=t,this.securityContext=n,this.value=s,this.unit=r,this.sourceSpan=i,this.keySpan=a,this.valueSpan=o,this.i18n=l}static fromBoundElementProperty(e,t){if(void 0===e.keySpan)throw new Error(`Unexpected state: keySpan must be defined for bound attributes but was not for ${e.name}: ${e.sourceSpan}`);return new An(e.name,e.type,e.securityContext,e.value,e.unit,e.sourceSpan,e.keySpan,e.valueSpan,t)}visit(e){return e.visitBoundAttribute(this)}}class Pn{constructor(e,t,n,s,r,i,a){this.name=e,this.type=t,this.handler=n,this.target=s,this.phase=r,this.sourceSpan=i,this.handlerSpan=a}static fromParsedEvent(e){return new Pn(e.name,e.type,e.handler,0===e.type?e.targetOrPhase:null,1===e.type?e.targetOrPhase:null,e.sourceSpan,e.handlerSpan)}visit(e){return e.visitBoundEvent(this)}}class kn{constructor(e,t,n,s,r,i,a,o,l,c){this.name=e,this.attributes=t,this.inputs=n,this.outputs=s,this.children=r,this.references=i,this.sourceSpan=a,this.startSourceSpan=o,this.endSourceSpan=l,this.i18n=c}visit(e){return e.visitElement(this)}}class On{constructor(e,t,n,s,r,i,a,o,l,c,u,p){this.tagName=e,this.attributes=t,this.inputs=n,this.outputs=s,this.templateAttrs=r,this.children=i,this.references=a,this.variables=o,this.sourceSpan=l,this.startSourceSpan=c,this.endSourceSpan=u,this.i18n=p}visit(e){return e.visitTemplate(this)}}class Mn{constructor(e,t,n,s){this.selector=e,this.attributes=t,this.sourceSpan=n,this.i18n=s,this.name="ng-content"}visit(e){return e.visitContent(this)}}class Ln{constructor(e,t,n,s,r){this.name=e,this.value=t,this.sourceSpan=n,this.keySpan=s,this.valueSpan=r}visit(e){return e.visitVariable(this)}}class Rn{constructor(e,t,n,s){this.name=e,this.value=t,this.sourceSpan=n,this.valueSpan=s}visit(e){return e.visitReference(this)}}class Dn{constructor(e,t,n,s){this.vars=e,this.placeholders=t,this.sourceSpan=n,this.i18n=s}visit(e){return e.visitIcu(this)}}function Fn(e,t){const n=[];if(e.visit)for(const n of t)e.visit(n)||n.visit(e);else for(const s of t){const t=s.visit(e);t&&n.push(t)}return n}class Bn{constructor(e,t,n,s,r,i){this.nodes=e,this.placeholders=t,this.placeholderToMessage=n,this.meaning=s,this.description=r,this.customId=i,this.id=this.customId,this.legacyIds=[],this.sources=e.length?[{filePath:e[0].sourceSpan.start.file.url,startLine:e[0].sourceSpan.start.line+1,startCol:e[0].sourceSpan.start.col+1,endLine:e[e.length-1].sourceSpan.end.line+1,endCol:e[0].sourceSpan.start.col+1}]:[]}}class $n{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitText(this,t)}}class Vn{constructor(e,t){this.children=e,this.sourceSpan=t}visit(e,t){return e.visitContainer(this,t)}}class jn{constructor(e,t,n,s){this.expression=e,this.type=t,this.cases=n,this.sourceSpan=s}visit(e,t){return e.visitIcu(this,t)}}class Un{constructor(e,t,n,s,r,i,a,o,l){this.tag=e,this.attrs=t,this.startName=n,this.closeName=s,this.children=r,this.isVoid=i,this.sourceSpan=a,this.startSourceSpan=o,this.endSourceSpan=l}visit(e,t){return e.visitTagPlaceholder(this,t)}}class qn{constructor(e,t,n){this.value=e,this.name=t,this.sourceSpan=n}visit(e,t){return e.visitPlaceholder(this,t)}}class Hn{constructor(e,t,n){this.value=e,this.name=t,this.sourceSpan=n}visit(e,t){return e.visitIcuPlaceholder(this,t)}}function Wn(e){return function(e){const t=tn(e),n=function(e,t){const n=e.length+3>>>2,s=[];for(let r=0;r<n;r++)s[r]=as(e,4*r,t);return s}(t,es.Big),s=8*t.length,r=function(e,t){const n=[];for(let e=0;e<80;e++)n.push(void 0);return n}();let i=1732584193,a=4023233417,o=2562383102,l=271733878,c=3285377520;n[s>>5]|=128<<24-s%32,n[15+(s+64>>9<<4)]=s;for(let e=0;e<n.length;e+=16){const t=i,s=a,u=o,p=l,h=c;for(let t=0;t<80;t++){r[t]=t<16?n[e+t]:rs(r[t-3]^r[t-8]^r[t-14]^r[t-16],1);const s=Qn(t,a,o,l),u=s[0],p=s[1],h=[rs(i,5),u,c,p,r[t]].reduce(ts);c=l,l=o,o=rs(a,30),a=i,i=h}i=ts(i,t),a=ts(a,s),o=ts(o,u),l=ts(l,p),c=ts(c,h)}return function(e){let t="";for(let n=0;n<e.length;n++){const s=is(e,n);t+=(s>>>4).toString(16)+(15&s).toString(16)}return t.toLowerCase()}(os([i,a,o,l,c]))}((t=e.nodes,t.map(e=>e.visit(Xn,null))).join("")+`[${e.meaning}]`);var t}function zn(e){const t=new Gn;return function(e,t=""){let n=Yn(e);if(t){const e=Yn(t);n=function(e,t){const n=e[0],s=t[0],r=ns(e[1],t[1]),i=r[0],a=r[1];return[ts(ts(n,s),i),a]}(function(e,t){const n=e[0],s=e[1];return[n<<1|s>>>31,s<<1|n>>>31]}(n),e)}return function(e){let t="",n="1";for(let s=e.length-1;s>=0;s--)t=ls(t,cs(is(e,s),n)),n=cs(256,n);return t.split("").reverse().join("")}(os([2147483647&n[0],n[1]]))}(e.nodes.map(e=>e.visit(t,null)).join(""),e.meaning)}class Kn{visitText(e,t){return e.value}visitContainer(e,t){return`[${e.children.map(e=>e.visit(this)).join(", ")}]`}visitIcu(e,t){const n=Object.keys(e.cases).map(t=>`${t} {${e.cases[t].visit(this)}}`);return`{${e.expression}, ${e.type}, ${n.join(", ")}}`}visitTagPlaceholder(e,t){return e.isVoid?`<ph tag name="${e.startName}"/>`:`<ph tag name="${e.startName}">${e.children.map(e=>e.visit(this)).join(", ")}</ph name="${e.closeName}">`}visitPlaceholder(e,t){return e.value?`<ph name="${e.name}">${e.value}</ph>`:`<ph name="${e.name}"/>`}visitIcuPlaceholder(e,t){return`<ph icu name="${e.name}">${e.value.visit(this)}</ph>`}}const Xn=new Kn;class Gn extends Kn{visitIcu(e,t){let n=Object.keys(e.cases).map(t=>`${t} {${e.cases[t].visit(this)}}`);return`{${e.type}, ${n.join(", ")}}`}}function Qn(e,t,n,s){return e<20?[t&n|~t&s,1518500249]:e<40?[t^n^s,1859775393]:e<60?[t&n|t&s|n&s,2400959708]:[t^n^s,3395469782]}function Yn(e){const t=tn(e);let n=Zn(t,0),s=Zn(t,102072);return 0!=n||0!=s&&1!=s||(n^=319790063,s^=-1801410264),[n,s]}function Zn(e,t){let n,s=2654435769,r=2654435769;const i=e.length;for(n=0;n+12<=i;n+=12){s=ts(s,as(e,n,es.Little)),r=ts(r,as(e,n+4,es.Little));const i=Jn(s,r,t=ts(t,as(e,n+8,es.Little)));s=i[0],r=i[1],t=i[2]}return s=ts(s,as(e,n,es.Little)),r=ts(r,as(e,n+4,es.Little)),t=ts(t,i),Jn(s,r,t=ts(t,as(e,n+8,es.Little)<<8))[2]}function Jn(e,t,n){return e=ss(e,t),e=ss(e,n),e^=n>>>13,t=ss(t,n),t=ss(t,e),t^=e<<8,n=ss(n,e),n=ss(n,t),n^=t>>>13,e=ss(e,t),e=ss(e,n),e^=n>>>12,t=ss(t,n),t=ss(t,e),t^=e<<16,n=ss(n,e),n=ss(n,t),n^=t>>>5,e=ss(e,t),e=ss(e,n),e^=n>>>3,t=ss(t,n),t=ss(t,e),t^=e<<10,n=ss(n,e),n=ss(n,t),[e,t,n^=t>>>15]}var es;function ts(e,t){return ns(e,t)[1]}function ns(e,t){const n=(65535&e)+(65535&t),s=(e>>>16)+(t>>>16)+(n>>>16);return[s>>>16,s<<16|65535&n]}function ss(e,t){const n=(65535&e)-(65535&t);return(e>>16)-(t>>16)+(n>>16)<<16|65535&n}function rs(e,t){return e<<t|e>>>32-t}function is(e,t){return t>=e.length?0:255&e.charCodeAt(t)}function as(e,t,n){let s=0;if(n===es.Big)for(let n=0;n<4;n++)s+=is(e,t+n)<<24-8*n;else for(let n=0;n<4;n++)s+=is(e,t+n)<<8*n;return s}function os(e){return e.reduce((e,t)=>e+function(e){let t="";for(let n=0;n<4;n++)t+=String.fromCharCode(e>>>8*(3-n)&255);return t}(t),"")}function ls(e,t){let n="";const s=Math.max(e.length,t.length);for(let r=0,i=0;r<s||i;r++){const s=i+ +(e[r]||0)+ +(t[r]||0);s>=10?(i=1,n+=s-10):(i=0,n+=s)}return n}function cs(e,t){let n="",s=t;for(;0!==e;e>>>=1)1&e&&(n=ls(n,s)),s=ls(s,s);return n}function us(e){return"i18n"===e||e.startsWith("i18n-")}function ps(e){return e instanceof Bn}function hs(e){return ps(e)&&1===e.nodes.length&&e.nodes[0]instanceof jn}function ds(e){return!!e.i18n}function ms(e){return e.nodes[0]}function gs(e,t=0){return`�${e}${t>0?":"+t:""}�`}function fs(e=0){let t=e;return()=>t++}function vs(e){const t={};return e.forEach((e,n)=>{t[n]=Kt(e.length>1?`[${e.join("|")}]`:e[0])}),t}function ys(e,t,...n){const s=e.get(t)||[];s.push(...n),e.set(t,s)}function xs(e,t=0,n=0){const s=t,r=new Map,i=e instanceof Bn?e.nodes.find(e=>e instanceof Vn):e;return i&&i.children.filter(e=>e instanceof qn).forEach((e,t)=>{const i=gs(s+t,n);ys(r,e.name,i)}),r}function Ss(e={},t){const n={};return e&&Object.keys(e).length&&Object.keys(e).forEach(s=>n[Es(s,t)]=e[s]),n}function Es(e,t=!0){const n=e.toUpperCase().replace(/[^A-Z0-9_]/g,"_");if(!t)return n;const s=n.split("_");if(1===s.length)return e.toLowerCase();let r;/^\d+$/.test(s[s.length-1])&&(r=s.pop());let i=s.shift().toLowerCase();return s.length&&(i+=s.map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")),r?`${i}_${r}`:i}function _s(e){return("MSG_"+e).toUpperCase()}function Cs(e){return new Lt(e.name,void 0,Ve,void 0,e.sourceSpan)}!function(e){e[e.Little=0]="Little",e[e.Big=1]="Big"}(es||(es={}));const ws=/[-.]/;function bs(e,t){let n=null;return()=>(n||(e.push(new Lt("_t",void 0,$e)),n=$t(t)),n)}function Is(e){if(this)throw new Error(`Builder ${this.constructor.name} doesn't support ${e} yet`);throw new Error(`Feature ${e} is not supported yet`)}function Ts(e){throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${e.constructor.name}`)}function Ns(e){return Array.isArray(e)?qt(e.map(Ns)):Kt(e,Ve)}function As(e,t){return Object.getOwnPropertyNames(e).length>0?function(e,t){return Ht(Object.getOwnPropertyNames(e).map(n=>{const s=e[n];let r,i,a;return Array.isArray(s)?[i,r]=s:[r,i]=Yt(n,[n,s]),a=r,{key:a,quoted:ws.test(a),value:t&&i!==r?qt([Ns(i),Ns(r)]):Ns(i)}}))}(e,t):null}function Ps(e){for(;Xt(e[e.length-1]);)e.pop();return e}function ks(e,t){if(Array.isArray(e.predicate)){let n=[];return e.predicate.forEach(e=>{const t=e.split(",").map(e=>Kt(e.trim()));n.push(...t)}),t.getConstLiteral(qt(n),!0)}return e.predicate}class Os{constructor(){this.values=[]}set(e,t){t&&this.values.push({key:e,value:t,quoted:!1})}toLiteralMap(){return Ht(this.values)}}function Ms(e,t,n){let s=Vt(e,null,n);if(t.length>0)for(let e=0;e<t.length;e++)s=s.callFn(t[e],n);else s=s.callFn([],n);return s}function Ls(e){const{expressions:t,strings:n}=e;return 1===t.length&&2===n.length&&""===n[0]&&""===n[1]?1:t.length+n.length}var Rs,Ds,Fs;function Bs(e){const t=$t("t"),n=[];let s=He;const r=Vs(e)?t:new Ct(ze.Or,t,e.internalType);let i=null;if(null!==e.deps)"invalid"!==e.deps&&(i=new it(r,$s(e.deps,e.injectFn,e.target===Ds.Pipe)),s=function(e){let t=!1;const n=e.map(e=>{const n=function(e){const t=[];return e.resolved===Fs.Attribute&&null!==e.attribute&&t.push({key:"attribute",value:e.attribute,quoted:!1}),e.optional&&t.push({key:"optional",value:Kt(!0),quoted:!1}),e.host&&t.push({key:"host",value:Kt(!0),quoted:!1}),e.self&&t.push({key:"self",value:Kt(!0),quoted:!1}),e.skipSelf&&t.push({key:"skipSelf",value:Kt(!0),quoted:!1}),t.length>0?Ht(t):null}(e);return null!==n?(t=!0,n):Kt(null)});return t?jt(qt(n)):He}(e.deps));else{const t=$t(`ɵ${e.name}_BaseFactory`),s=Vt(En.getInheritedFactory),a=t.set(s.callFn([e.internalType],void 0,!0)).toDeclStmt(Ve,[kt.Exported,kt.Final]);n.push(a),i=t.callFn([r])}const a=i,o=[];let l=null;function c(e){const n=$t("r");o.push(n.set(At).toDeclStmt());let s=null;return s=null!==a?n.set(a).toStmt():Vt(En.invalidFactory).callFn([]).toStmt(),o.push(zt(t,[s],[n.set(e).toStmt()])),n}if(Vs(e)&&e.delegateType===Rs.Factory){const t=$t(`ɵ${e.name}_BaseFactory`),s=Vt(En.getFactoryOf);if(e.delegate.isEquivalent(e.internalType))throw new Error("Illegal state: compiling factory that delegates to itself");const r=t.set(s.callFn([e.delegate])).toDeclStmt(Ve,[kt.Exported,kt.Final]);n.push(r),l=c(t.callFn([]))}else if(Vs(e)){const t=$s(e.delegateDeps,e.injectFn,e.target===Ds.Pipe);l=c(new(e.delegateType===Rs.Class?it:rt)(e.delegate,t))}else l=function(e){return void 0!==e.expression}(e)?c(e.expression):i;return o.push(null!==l?new Ft(l):Vt(En.invalidFactory).callFn([]).toStmt()),{factory:Wt([new St("t",$e)],o,Ve,void 0,e.name+"_Factory"),statements:n,type:jt(Vt(En.FactoryDef,[Cn(e.type.type,e.typeArgumentCount),s]))}}function $s(e,t,n){return e.map((e,s)=>function(e,t,n,s){switch(e.resolved){case Fs.Token:case Fs.ChangeDetectorRef:const r=0|(e.self?2:0)|(e.skipSelf?4:0)|(e.host?1:0)|(e.optional?8:0);let i=0!==r||e.optional?Kt(r):null;if(n&&e.resolved===Fs.ChangeDetectorRef)return Vt(En.injectPipeChangeDetectorRef).callFn(i?[i]:[]);const a=[e.token];return i&&a.push(i),Vt(t).callFn(a);case Fs.Attribute:return Vt(En.injectAttribute).callFn([e.token]);case Fs.Invalid:return Vt(En.invalidFactoryDep).callFn([Kt(s)]);default:return Is("Unknown R3ResolvedDependencyType: "+Fs[e.resolved])}}(e,t,n,s))}function Vs(e){return void 0!==e.delegateType}function js(e,t){return{statements:[],factory:e.node===t.node?t.prop("ɵfac"):Wt([new St("t",$e)],[new Ft(t.callMethod("ɵfac",[$t("t")]))])}}!function(e){e[e.Class=0]="Class",e[e.Function=1]="Function",e[e.Factory=2]="Factory"}(Rs||(Rs={})),function(e){e[e.Directive=0]="Directive",e[e.Component=1]="Component",e[e.Injectable=2]="Injectable",e[e.Pipe=3]="Pipe",e[e.NgModule=4]="NgModule"}(Ds||(Ds={})),function(e){e[e.Token=0]="Token",e[e.Attribute=1]="Attribute",e[e.ChangeDetectorRef=2]="ChangeDetectorRef",e[e.Invalid=3]="Invalid"}(Fs||(Fs={}));const Us=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];class qs{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error("Expected 'interpolation' to be an array, [start, end].");if(null!=t){const e=t[0],n=t[1];Us.forEach(t=>{if(t.test(e)||t.test(n))throw new Error(`['${e}', '${n}'] contains unusable interpolation symbol.`)})}}(0,e),new qs(e[0],e[1])):Hs}}const Hs=new qs("{{","}}");class Ws{constructor(e=null){this.file=e,this.sourcesContent=new Map,this.lines=[],this.lastCol0=0,this.hasMappings=!1}addSource(e,t=null){return this.sourcesContent.has(e)||this.sourcesContent.set(e,t),this}addLine(){return this.lines.push([]),this.lastCol0=0,this}addMapping(e,t,n,s){if(!this.currentLine)throw new Error("A line must be added before mappings can be added");if(null!=t&&!this.sourcesContent.has(t))throw new Error(`Unknown source file "${t}"`);if(null==e)throw new Error("The column in the generated code must be provided");if(e<this.lastCol0)throw new Error("Mapping should be added in output order");if(t&&(null==n||null==s))throw new Error("The source location must be provided when a source url is provided");return this.hasMappings=!0,this.lastCol0=e,this.currentLine.push({col0:e,sourceUrl:t,sourceLine0:n,sourceCol0:s}),this}get currentLine(){return this.lines.slice(-1)[0]}toJSON(){if(!this.hasMappings)return null;const e=new Map,t=[],n=[];Array.from(this.sourcesContent.keys()).forEach((s,r)=>{e.set(s,r),t.push(s),n.push(this.sourcesContent.get(s)||null)});let s="",r=0,i=0,a=0,o=0;return this.lines.forEach(t=>{r=0,s+=t.map(t=>{let n=zs(t.col0-r);return r=t.col0,null!=t.sourceUrl&&(n+=zs(e.get(t.sourceUrl)-i),i=e.get(t.sourceUrl),n+=zs(t.sourceLine0-a),a=t.sourceLine0,n+=zs(t.sourceCol0-o),o=t.sourceCol0),n}).join(","),s+=";"}),s=s.slice(0,-1),{file:this.file||"",version:3,sourceRoot:"",sources:t,sourcesContent:n,mappings:s}}toJsComment(){return this.hasMappings?"//# sourceMappingURL=data:application/json;base64,"+function(e){let t="";e=tn(e);for(let n=0;n<e.length;){const s=e.charCodeAt(n++),r=e.charCodeAt(n++),i=e.charCodeAt(n++);t+=Ks(s>>2),t+=Ks((3&s)<<4|(isNaN(r)?0:r>>4)),t+=isNaN(r)?"=":Ks((15&r)<<2|i>>6),t+=isNaN(r)||isNaN(i)?"=":Ks(63&i)}return t}(JSON.stringify(this,null,0)):""}}function zs(e){e=e<0?1+(-e<<1):e<<1;let t="";do{let n=31&e;(e>>=5)>0&&(n|=32),t+=Ks(n)}while(e>0);return t}function Ks(e){if(e<0||e>=64)throw new Error("Can only encode value in the range [0, 63]");return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e]}const Xs=/'|\\|\n|\r|\$/g,Gs=/^[$A-Z_][0-9A-Z_$]*$/i,Qs=$t("error",null,null),Ys=$t("stack",null,null);class Zs{constructor(e){this.indent=e,this.partsLength=0,this.parts=[],this.srcSpans=[]}}class Js{constructor(e){this._indent=e,this._classes=[],this._preambleLineCount=0,this._lines=[new Zs(e)]}static createRoot(){return new Js(0)}get _currentLine(){return this._lines[this._lines.length-1]}println(e,t=""){this.print(e||null,t,!0)}lineIsEmpty(){return 0===this._currentLine.parts.length}lineLength(){return this._currentLine.indent*" ".length+this._currentLine.partsLength}print(e,t,n=!1){t.length>0&&(this._currentLine.parts.push(t),this._currentLine.partsLength+=t.length,this._currentLine.srcSpans.push(e&&e.sourceSpan||null)),n&&this._lines.push(new Zs(this._indent))}removeEmptyLastLine(){this.lineIsEmpty()&&this._lines.pop()}incIndent(){this._indent++,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}decIndent(){this._indent--,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}pushClass(e){this._classes.push(e)}popClass(){return this._classes.pop()}get currentClass(){return this._classes.length>0?this._classes[this._classes.length-1]:null}toSource(){return this.sourceLines.map(e=>e.parts.length>0?tr(e.indent)+e.parts.join(""):"").join("\n")}toSourceMapGenerator(e,t=0){const n=new Ws(e);let s=!1;const r=()=>{s||(n.addSource(e," ").addMapping(0,e,0,0),s=!0)};for(let e=0;e<t;e++)n.addLine(),r();return this.sourceLines.forEach((e,t)=>{n.addLine();const i=e.srcSpans,a=e.parts;let o=e.indent*" ".length,l=0;for(;l<i.length&&!i[l];)o+=a[l].length,l++;for(l<i.length&&0===t&&0===o?s=!0:r();l<i.length;){const e=i[l],t=e.start.file,s=e.start.line,r=e.start.col;for(n.addSource(t.url,t.content).addMapping(o,t.url,s,r),o+=a[l].length,l++;l<i.length&&(e===i[l]||!i[l]);)o+=a[l].length,l++}}),n}setPreambleLineCount(e){return this._preambleLineCount=e}spanOf(e,t){const n=this._lines[e-this._preambleLineCount];if(n){let e=t-tr(n.indent).length;for(let t=0;t<n.parts.length;t++){const s=n.parts[t];if(s.length>e)return n.srcSpans[t];e-=s.length}}return null}get sourceLines(){return this._lines.length&&0===this._lines[this._lines.length-1].parts.length?this._lines.slice(0,-1):this._lines}}function er(e,t,n=!0){if(null==e)return null;const s=e.replace(Xs,(...e)=>"$"==e[0]?t?"\\$":"$":"\n"==e[0]?"\\n":"\r"==e[0]?"\\r":"\\"+e[0]);return n||!Gs.test(s)?`'${s}'`:s}function tr(e){let t="";for(let n=0;n<e;n++)t+=" ";return t}class nr{evaluateStatements(e,t,n,s){const r=new sr(n),i=Js.createRoot();return t.length>0&&!t[0].isEquivalent(Kt("use strict").toStmt())&&(t=[Kt("use strict").toStmt(),...t]),r.visitAllStatements(t,i),r.createReturnStmt(i),this.evaluateCode(e,i,r.getArgs(),s)}evaluateCode(e,t,n,s){let r=`"use strict";${t.toSource()}\n//# sourceURL=${e}`;const i=[],a=[];for(const e in n)a.push(n[e]),i.push(e);if(s){const n=new Function(...i.concat("return null;")).toString(),s=n.slice(0,n.indexOf("return null;")).split("\n").length-1;r+="\n"+t.toSourceMapGenerator(e,s).toJsComment()}const o=new Function(...i.concat(r));return this.executeFunction(o,a)}executeFunction(e,t){return e(...t)}}class sr extends class extends class{constructor(e){this._escapeDollarInStrings=e}printLeadingComments(e,t){if(void 0!==e.leadingComments)for(const n of e.leadingComments)n instanceof Ot?t.print(e,`/*${n.toString()}*/`,n.trailingNewline):n.multiline?t.print(e,`/* ${n.text} */`,n.trailingNewline):n.text.split("\n").forEach(n=>{t.println(e,"// "+n)})}visitExpressionStmt(e,t){return this.printLeadingComments(e,t),e.expr.visitExpression(this,t),t.println(e,";"),null}visitReturnStmt(e,t){return this.printLeadingComments(e,t),t.print(e,"return "),e.value.visitExpression(this,t),t.println(e,";"),null}visitIfStmt(e,t){this.printLeadingComments(e,t),t.print(e,"if ("),e.condition.visitExpression(this,t),t.print(e,") {");const n=null!=e.falseCase&&e.falseCase.length>0;return e.trueCase.length<=1&&!n?(t.print(e," "),this.visitAllStatements(e.trueCase,t),t.removeEmptyLastLine(),t.print(e," ")):(t.println(),t.incIndent(),this.visitAllStatements(e.trueCase,t),t.decIndent(),n&&(t.println(e,"} else {"),t.incIndent(),this.visitAllStatements(e.falseCase,t),t.decIndent())),t.println(e,"}"),null}visitThrowStmt(e,t){return this.printLeadingComments(e,t),t.print(e,"throw "),e.error.visitExpression(this,t),t.println(e,";"),null}visitWriteVarExpr(e,t){const n=t.lineIsEmpty();return n||t.print(e,"("),t.print(e,e.name+" = "),e.value.visitExpression(this,t),n||t.print(e,")"),null}visitWriteKeyExpr(e,t){const n=t.lineIsEmpty();return n||t.print(e,"("),e.receiver.visitExpression(this,t),t.print(e,"["),e.index.visitExpression(this,t),t.print(e,"] = "),e.value.visitExpression(this,t),n||t.print(e,")"),null}visitWritePropExpr(e,t){const n=t.lineIsEmpty();return n||t.print(e,"("),e.receiver.visitExpression(this,t),t.print(e,`.${e.name} = `),e.value.visitExpression(this,t),n||t.print(e,")"),null}visitInvokeMethodExpr(e,t){e.receiver.visitExpression(this,t);let n=e.name;return null!=e.builtin&&(n=this.getBuiltinMethodName(e.builtin),null==n)||(t.print(e,`.${n}(`),this.visitAllExpressions(e.args,t,","),t.print(e,")")),null}visitInvokeFunctionExpr(e,t){return e.fn.visitExpression(this,t),t.print(e,"("),this.visitAllExpressions(e.args,t,","),t.print(e,")"),null}visitWrappedNodeExpr(e,t){throw new Error("Abstract emitter cannot visit WrappedNodeExpr.")}visitTypeofExpr(e,t){t.print(e,"typeof "),e.expr.visitExpression(this,t)}visitReadVarExpr(e,t){let n=e.name;if(null!=e.builtin)switch(e.builtin){case Ke.Super:n="super";break;case Ke.This:n="this";break;case Ke.CatchError:n=Qs.name;break;case Ke.CatchStack:n=Ys.name;break;default:throw new Error("Unknown builtin variable "+e.builtin)}return t.print(e,n),null}visitInstantiateExpr(e,t){return t.print(e,"new "),e.classExpr.visitExpression(this,t),t.print(e,"("),this.visitAllExpressions(e.args,t,","),t.print(e,")"),null}visitLiteralExpr(e,t){const n=e.value;return t.print(e,"string"==typeof n?er(n,this._escapeDollarInStrings):""+n),null}visitLocalizedString(e,t){const n=e.serializeI18nHead();t.print(e,"$localize `"+n.raw);for(let n=1;n<e.messageParts.length;n++)t.print(e,"${"),e.expressions[n-1].visitExpression(this,t),t.print(e,"}"+e.serializeI18nTemplatePart(n).raw);return t.print(e,"`"),null}visitConditionalExpr(e,t){return t.print(e,"("),e.condition.visitExpression(this,t),t.print(e,"? "),e.trueCase.visitExpression(this,t),t.print(e,": "),e.falseCase.visitExpression(this,t),t.print(e,")"),null}visitNotExpr(e,t){return t.print(e,"!"),e.condition.visitExpression(this,t),null}visitAssertNotNullExpr(e,t){return e.condition.visitExpression(this,t),null}visitUnaryOperatorExpr(e,t){let n;switch(e.operator){case We.Plus:n="+";break;case We.Minus:n="-";break;default:throw new Error("Unknown operator "+e.operator)}return e.parens&&t.print(e,"("),t.print(e,n),e.expr.visitExpression(this,t),e.parens&&t.print(e,")"),null}visitBinaryOperatorExpr(e,t){let n;switch(e.operator){case ze.Equals:n="==";break;case ze.Identical:n="===";break;case ze.NotEquals:n="!=";break;case ze.NotIdentical:n="!==";break;case ze.And:n="&&";break;case ze.BitwiseAnd:n="&";break;case ze.Or:n="||";break;case ze.Plus:n="+";break;case ze.Minus:n="-";break;case ze.Divide:n="/";break;case ze.Multiply:n="*";break;case ze.Modulo:n="%";break;case ze.Lower:n="<";break;case ze.LowerEquals:n="<=";break;case ze.Bigger:n=">";break;case ze.BiggerEquals:n=">=";break;default:throw new Error("Unknown operator "+e.operator)}return e.parens&&t.print(e,"("),e.lhs.visitExpression(this,t),t.print(e,` ${n} `),e.rhs.visitExpression(this,t),e.parens&&t.print(e,")"),null}visitReadPropExpr(e,t){return e.receiver.visitExpression(this,t),t.print(e,"."),t.print(e,e.name),null}visitReadKeyExpr(e,t){return e.receiver.visitExpression(this,t),t.print(e,"["),e.index.visitExpression(this,t),t.print(e,"]"),null}visitLiteralArrayExpr(e,t){return t.print(e,"["),this.visitAllExpressions(e.entries,t,","),t.print(e,"]"),null}visitLiteralMapExpr(e,t){return t.print(e,"{"),this.visitAllObjects(n=>{t.print(e,er(n.key,this._escapeDollarInStrings,n.quoted)+":"),n.value.visitExpression(this,t)},e.entries,t,","),t.print(e,"}"),null}visitCommaExpr(e,t){return t.print(e,"("),this.visitAllExpressions(e.parts,t,","),t.print(e,")"),null}visitAllExpressions(e,t,n){this.visitAllObjects(e=>e.visitExpression(this,t),e,t,n)}visitAllObjects(e,t,n,s){let r=!1;for(let i=0;i<t.length;i++)i>0&&(n.lineLength()>80?(n.print(null,s,!0),r||(n.incIndent(),n.incIndent(),r=!0)):n.print(null,s,!1)),e(t[i]);r&&(n.decIndent(),n.decIndent())}visitAllStatements(e,t){e.forEach(e=>e.visitStatement(this,t))}}{constructor(){super(!1)}visitDeclareClassStmt(e,t){return t.pushClass(e),this._visitClassConstructor(e,t),null!=e.parent&&(t.print(e,e.name+".prototype = Object.create("),e.parent.visitExpression(this,t),t.println(e,".prototype);")),e.getters.forEach(n=>this._visitClassGetter(e,n,t)),e.methods.forEach(n=>this._visitClassMethod(e,n,t)),t.popClass(),null}_visitClassConstructor(e,t){t.print(e,`function ${e.name}(`),null!=e.constructorMethod&&this._visitParams(e.constructorMethod.params,t),t.println(e,") {"),t.incIndent(),null!=e.constructorMethod&&e.constructorMethod.body.length>0&&(t.println(e,"var self = this;"),this.visitAllStatements(e.constructorMethod.body,t)),t.decIndent(),t.println(e,"}")}_visitClassGetter(e,t,n){n.println(e,`Object.defineProperty(${e.name}.prototype, '${t.name}', { get: function() {`),n.incIndent(),t.body.length>0&&(n.println(e,"var self = this;"),this.visitAllStatements(t.body,n)),n.decIndent(),n.println(e,"}});")}_visitClassMethod(e,t,n){n.print(e,`${e.name}.prototype.${t.name} = function(`),this._visitParams(t.params,n),n.println(e,") {"),n.incIndent(),t.body.length>0&&(n.println(e,"var self = this;"),this.visitAllStatements(t.body,n)),n.decIndent(),n.println(e,"};")}visitWrappedNodeExpr(e,t){throw new Error("Cannot emit a WrappedNodeExpr in Javascript.")}visitReadVarExpr(e,t){if(e.builtin===Ke.This)t.print(e,"self");else{if(e.builtin===Ke.Super)throw new Error("'super' needs to be handled at a parent ast node, not at the variable level!");super.visitReadVarExpr(e,t)}return null}visitDeclareVarStmt(e,t){return t.print(e,"var "+e.name),e.value&&(t.print(e," = "),e.value.visitExpression(this,t)),t.println(e,";"),null}visitCastExpr(e,t){return e.value.visitExpression(this,t),null}visitInvokeFunctionExpr(e,t){const n=e.fn;return n instanceof Ye&&n.builtin===Ke.Super?(t.currentClass.parent.visitExpression(this,t),t.print(e,".call(this"),e.args.length>0&&(t.print(e,", "),this.visitAllExpressions(e.args,t,",")),t.print(e,")")):super.visitInvokeFunctionExpr(e,t),null}visitFunctionExpr(e,t){return t.print(e,`function${e.name?" "+e.name:""}(`),this._visitParams(e.params,t),t.println(e,") {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.print(e,"}"),null}visitDeclareFunctionStmt(e,t){return t.print(e,`function ${e.name}(`),this._visitParams(e.params,t),t.println(e,") {"),t.incIndent(),this.visitAllStatements(e.statements,t),t.decIndent(),t.println(e,"}"),null}visitTryCatchStmt(e,t){t.println(e,"try {"),t.incIndent(),this.visitAllStatements(e.bodyStmts,t),t.decIndent(),t.println(e,`} catch (${Qs.name}) {`),t.incIndent();const n=[Ys.set(Qs.prop("stack")).toDeclStmt(null,[kt.Final])].concat(e.catchStmts);return this.visitAllStatements(n,t),t.decIndent(),t.println(e,"}"),null}visitLocalizedString(e,t){t.print(e,'$localize((this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})(');const n=[e.serializeI18nHead()];for(let t=1;t<e.messageParts.length;t++)n.push(e.serializeI18nTemplatePart(t));return t.print(e,`[${n.map(e=>er(e.cooked,!1)).join(", ")}], `),t.print(e,`[${n.map(e=>er(e.raw,!1)).join(", ")}])`),e.expressions.forEach(n=>{t.print(e,", "),n.visitExpression(this,t)}),t.print(e,")"),null}_visitParams(e,t){this.visitAllObjects(e=>t.print(null,e.name),e,t,",")}getBuiltinMethodName(e){let t;switch(e){case Xe.ConcatArray:t="concat";break;case Xe.SubscribeObservable:t="subscribe";break;case Xe.Bind:t="bind";break;default:throw new Error("Unknown builtin method: "+e)}return t}}{constructor(e){super(),this.reflector=e,this._evalArgNames=[],this._evalArgValues=[],this._evalExportedVars=[]}createReturnStmt(e){new Ft(new Nt(this._evalExportedVars.map(e=>new Tt(e,$t(e),!1)))).visitStatement(this,e)}getArgs(){const e={};for(let t=0;t<this._evalArgNames.length;t++)e[this._evalArgNames[t]]=this._evalArgValues[t];return e}visitExternalExpr(e,t){return this._emitReferenceToExternal(e,this.reflector.resolveExternalReference(e.value),t),null}visitWrappedNodeExpr(e,t){return this._emitReferenceToExternal(e,e.node,t),null}visitDeclareVarStmt(e,t){return e.hasModifier(kt.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareVarStmt(e,t)}visitDeclareFunctionStmt(e,t){return e.hasModifier(kt.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareFunctionStmt(e,t)}visitDeclareClassStmt(e,t){return e.hasModifier(kt.Exported)&&this._evalExportedVars.push(e.name),super.visitDeclareClassStmt(e,t)}_emitReferenceToExternal(e,t,n){let s=this._evalArgValues.indexOf(t);if(-1===s){s=this._evalArgValues.length,this._evalArgValues.push(t);const e=function(e){if(!e||!e.reference)return null;const t=e.reference;if(t instanceof class{constructor(e,t,n){this.filePath=e,this.name=t,this.members=n}assertNoMembers(){if(this.members.length)throw new Error(`Illegal state: symbol without members expected, but got ${JSON.stringify(this)}.`)}})return t.name;if(t.__anonymousType)return t.__anonymousType;let n=nn(t);return n.indexOf("(")>=0?(n="anonymous_"+yn++,t.__anonymousType=n):n=vn(n),n}({reference:t})||"val";this._evalArgNames.push(`jit_${e}_${s}`)}n.print(e,this._evalArgNames[s])}}function rr(e){return e>=9&&e<=32||160==e}function ir(e){return 48<=e&&e<=57}function ar(e){return e>=97&&e<=122||e>=65&&e<=90}function or(e){return 10===e||13===e}function lr(e){return 48<=e&&e<=55}class cr{constructor(e,t,n,s){this.file=e,this.offset=t,this.line=n,this.col=s}toString(){return null!=this.offset?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){const t=this.file.content,n=t.length;let s=this.offset,r=this.line,i=this.col;for(;s>0&&e<0;)if(s--,e++,10==t.charCodeAt(s)){r--;const e=t.substr(0,s-1).lastIndexOf(String.fromCharCode(10));i=e>0?s-e:s}else i--;for(;s<n&&e>0;){const n=t.charCodeAt(s);s++,e--,10==n?(r++,i=0):i++}return new cr(this.file,s,r,i)}getContext(e,t){const n=this.file.content;let s=this.offset;if(null!=s){s>n.length-1&&(s=n.length-1);let r=s,i=0,a=0;for(;i<e&&s>0&&(s--,i++,"\n"!=n[s]||++a!=t););for(i=0,a=0;i<e&&r<n.length-1&&(r++,i++,"\n"!=n[r]||++a!=t););return{before:n.substring(s,this.offset),after:n.substring(this.offset,r+1)}}return null}}class ur{constructor(e,t){this.content=e,this.url=t}}class pr{constructor(e,t,n=e,s=null){this.start=e,this.end=t,this.fullStart=n,this.details=s}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}var hr,dr,mr,gr;!function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"}(hr||(hr={}));class fr{constructor(e,t,n=hr.ERROR){this.span=e,this.msg=t,this.level=n}contextualMessage(){const e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${hr[this.level]} ->]${e.after}")`:this.msg}toString(){const e=this.span.details?", "+this.span.details:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}}class vr{constructor(e){this.context=e}resolveExternalReference(e){if("@angular/core"!==e.moduleName)throw new Error(`Cannot resolve external reference to ${e.moduleName}, only references to @angular/core are supported.`);if(!this.context.hasOwnProperty(e.name))throw new Error(`No value provided for @angular/core symbol '${e.name}'.`);return this.context[e.name]}parameters(e){throw new Error("Not implemented.")}annotations(e){throw new Error("Not implemented.")}shallowAnnotations(e){throw new Error("Not implemented.")}tryAnnotations(e){throw new Error("Not implemented.")}propMetadata(e){throw new Error("Not implemented.")}hasLifecycleHook(e,t){throw new Error("Not implemented.")}guards(e){throw new Error("Not implemented.")}componentModuleUrl(e,t){throw new Error("Not implemented.")}}function yr(e,t=!1){return Ht(Object.keys(e).map(n=>({key:n,quoted:t,value:e[n]})))}function xr(e){const t=e.map(e=>Ut(e.type));return e.length>0?jt(qt(t)):He}function Sr(e,t){const n=qt(e.map(e=>e.value));return t?Wt([],[new Ft(n)]):n}class Er{constructor(e,t,n,s){this.input=t,this.errLocation=n,this.ctxLocation=s,this.message=`Parser Error: ${e} ${n} [${t}] in ${s}`}}class _r{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new Xr(e+this.start,e+this.end)}}class Cr{constructor(e,t){this.span=e,this.sourceSpan=t}visit(e,t=null){return null}toString(){return"AST"}}class wr extends Cr{constructor(e,t,n){super(e,t),this.nameSpan=n}}class br extends Cr{constructor(e,t,n,s,r){super(e,t),this.prefix=n,this.uninterpretedExpression=s,this.location=r}visit(e,t=null){return e.visitQuote(this,t)}toString(){return"Quote"}}class Ir extends Cr{visit(e,t=null){}}class Tr extends Cr{visit(e,t=null){return e.visitImplicitReceiver(this,t)}}class Nr extends Tr{visit(e,t=null){var n;return null===(n=e.visitThisReceiver)||void 0===n?void 0:n.call(e,this,t)}}class Ar extends Cr{constructor(e,t,n){super(e,t),this.expressions=n}visit(e,t=null){return e.visitChain(this,t)}}class Pr extends Cr{constructor(e,t,n,s,r){super(e,t),this.condition=n,this.trueExp=s,this.falseExp=r}visit(e,t=null){return e.visitConditional(this,t)}}class kr extends wr{constructor(e,t,n,s,r){super(e,t,n),this.receiver=s,this.name=r}visit(e,t=null){return e.visitPropertyRead(this,t)}}class Or extends wr{constructor(e,t,n,s,r,i){super(e,t,n),this.receiver=s,this.name=r,this.value=i}visit(e,t=null){return e.visitPropertyWrite(this,t)}}class Mr extends wr{constructor(e,t,n,s,r){super(e,t,n),this.receiver=s,this.name=r}visit(e,t=null){return e.visitSafePropertyRead(this,t)}}class Lr extends Cr{constructor(e,t,n,s){super(e,t),this.obj=n,this.key=s}visit(e,t=null){return e.visitKeyedRead(this,t)}}class Rr extends Cr{constructor(e,t,n,s,r){super(e,t),this.obj=n,this.key=s,this.value=r}visit(e,t=null){return e.visitKeyedWrite(this,t)}}class Dr extends wr{constructor(e,t,n,s,r,i){super(e,t,i),this.exp=n,this.name=s,this.args=r}visit(e,t=null){return e.visitPipe(this,t)}}class Fr extends Cr{constructor(e,t,n){super(e,t),this.value=n}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}}class Br extends Cr{constructor(e,t,n){super(e,t),this.expressions=n}visit(e,t=null){return e.visitLiteralArray(this,t)}}class $r extends Cr{constructor(e,t,n,s){super(e,t),this.keys=n,this.values=s}visit(e,t=null){return e.visitLiteralMap(this,t)}}class Vr extends Cr{constructor(e,t,n,s){super(e,t),this.strings=n,this.expressions=s}visit(e,t=null){return e.visitInterpolation(this,t)}}class jr extends Cr{constructor(e,t,n,s,r){super(e,t),this.operation=n,this.left=s,this.right=r}visit(e,t=null){return e.visitBinary(this,t)}}class Ur extends jr{constructor(e,t,n,s,r,i,a){super(e,t,r,i,a),this.operator=n,this.expr=s}static createMinus(e,t,n){return new Ur(e,t,"-",n,"-",new Fr(e,t,0),n)}static createPlus(e,t,n){return new Ur(e,t,"+",n,"-",n,new Fr(e,t,0))}visit(e,t=null){return void 0!==e.visitUnary?e.visitUnary(this,t):e.visitBinary(this,t)}}class qr extends Cr{constructor(e,t,n){super(e,t),this.expression=n}visit(e,t=null){return e.visitPrefixNot(this,t)}}class Hr extends Cr{constructor(e,t,n){super(e,t),this.expression=n}visit(e,t=null){return e.visitNonNullAssert(this,t)}}class Wr extends wr{constructor(e,t,n,s,r,i){super(e,t,n),this.receiver=s,this.name=r,this.args=i}visit(e,t=null){return e.visitMethodCall(this,t)}}class zr extends wr{constructor(e,t,n,s,r,i){super(e,t,n),this.receiver=s,this.name=r,this.args=i}visit(e,t=null){return e.visitSafeMethodCall(this,t)}}class Kr extends Cr{constructor(e,t,n,s){super(e,t),this.target=n,this.args=s}visit(e,t=null){return e.visitFunctionCall(this,t)}}class Xr{constructor(e,t){this.start=e,this.end=t}}class Gr extends Cr{constructor(e,t,n,s,r){super(new _r(0,null===t?0:t.length),new Xr(s,null===t?s:s+t.length)),this.ast=e,this.source=t,this.location=n,this.errors=r}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}}class Qr{constructor(e,t,n){this.sourceSpan=e,this.key=t,this.value=n}}class Yr{constructor(e,t,n){this.sourceSpan=e,this.key=t,this.value=n}}class Zr{visit(e,t){e.visit(this,t)}visitUnary(e,t){this.visit(e.expr,t)}visitBinary(e,t){this.visit(e.left,t),this.visit(e.right,t)}visitChain(e,t){this.visitAll(e.expressions,t)}visitConditional(e,t){this.visit(e.condition,t),this.visit(e.trueExp,t),this.visit(e.falseExp,t)}visitPipe(e,t){this.visit(e.exp,t),this.visitAll(e.args,t)}visitFunctionCall(e,t){e.target&&this.visit(e.target,t),this.visitAll(e.args,t)}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){this.visitAll(e.expressions,t)}visitKeyedRead(e,t){this.visit(e.obj,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.obj,t),this.visit(e.key,t),this.visit(e.value,t)}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitLiteralPrimitive(e,t){}visitMethodCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitPrefixNot(e,t){this.visit(e.expression,t)}visitNonNullAssert(e,t){this.visit(e.expression,t)}visitPropertyRead(e,t){this.visit(e.receiver,t)}visitPropertyWrite(e,t){this.visit(e.receiver,t),this.visit(e.value,t)}visitSafePropertyRead(e,t){this.visit(e.receiver,t)}visitSafeMethodCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitQuote(e,t){}visitAll(e,t){for(const n of e)this.visit(n,t)}}class Jr{constructor(e,t,n,s,r,i){this.name=e,this.expression=t,this.type=n,this.sourceSpan=s,this.keySpan=r,this.valueSpan=i,this.isLiteral=this.type===dr.LITERAL_ATTR,this.isAnimation=this.type===dr.ANIMATION}}!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.LITERAL_ATTR=1]="LITERAL_ATTR",e[e.ANIMATION=2]="ANIMATION"}(dr||(dr={}));class ei{constructor(e,t,n,s,r,i){this.name=e,this.targetOrPhase=t,this.type=n,this.handler=s,this.sourceSpan=r,this.handlerSpan=i}}class ti{constructor(e,t,n,s,r){this.name=e,this.value=t,this.sourceSpan=n,this.keySpan=s,this.valueSpan=r}}class ni{constructor(e,t,n,s,r,i,a,o){this.name=e,this.type=t,this.securityContext=n,this.value=s,this.unit=r,this.sourceSpan=i,this.keySpan=a,this.valueSpan=o}}class si{}si.event=$t("$event");class ri{constructor(e,t){this.stmts=e,this.allowDefault=t,this.render3Stmts=e.map(e=>e instanceof Lt&&e.name==t.name&&e.value instanceof Ct?new Ft(e.value.lhs.value):e)}}class ii{constructor(e,t){this.stmts=e,this.currValExpr=t}}function ai(e,t,n,s,r,i){e||(e=new mi);const a=new di(e,t,s,i),o=n.visit(a,gr.Expression),l=oi(a,s);if(a.usesImplicitReceiver&&e.notifyImplicitReceiverUse(),0===a.temporaryCount&&r==mr.TrySimple)return new ii([],o);if(r===mr.Expression)return new ii(l,o);const c=function(e){return $t("currVal_"+e)}(s);return l.push(c.set(o).toDeclStmt($e,[kt.Final])),new ii(l,c)}function oi(e,t){const n=[];for(let s=0;s<e.temporaryCount;s++)n.push(ci(t,s));return n}function li(e,t){return`tmp_${e}_${t}`}function ci(e,t){return new Lt(li(e,t),At)}function ui(e,t){if(e!==gr.Expression)throw new Error("Expected an expression, but saw "+t)}function pi(e,t){return e===gr.Statement?t.toStmt():t}!function(e){e[e.General=0]="General",e[e.TrySimple=1]="TrySimple",e[e.Expression=2]="Expression"}(mr||(mr={})),function(e){e[e.Statement=0]="Statement",e[e.Expression=1]="Expression"}(gr||(gr={}));class hi extends class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){return new Vr(e.span,e.sourceSpan,e.strings,this.visitAll(e.expressions))}visitLiteralPrimitive(e,t){return new Fr(e.span,e.sourceSpan,e.value)}visitPropertyRead(e,t){return new kr(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitPropertyWrite(e,t){return new Or(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,e.value.visit(this))}visitSafePropertyRead(e,t){return new Mr(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitMethodCall(e,t){return new Wr(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args))}visitSafeMethodCall(e,t){return new zr(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args))}visitFunctionCall(e,t){return new Kr(e.span,e.sourceSpan,e.target.visit(this),this.visitAll(e.args))}visitLiteralArray(e,t){return new Br(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitLiteralMap(e,t){return new $r(e.span,e.sourceSpan,e.keys,this.visitAll(e.values))}visitUnary(e,t){switch(e.operator){case"+":return Ur.createPlus(e.span,e.sourceSpan,e.expr.visit(this));case"-":return Ur.createMinus(e.span,e.sourceSpan,e.expr.visit(this));default:throw new Error("Unknown unary operator "+e.operator)}}visitBinary(e,t){return new jr(e.span,e.sourceSpan,e.operation,e.left.visit(this),e.right.visit(this))}visitPrefixNot(e,t){return new qr(e.span,e.sourceSpan,e.expression.visit(this))}visitNonNullAssert(e,t){return new Hr(e.span,e.sourceSpan,e.expression.visit(this))}visitConditional(e,t){return new Pr(e.span,e.sourceSpan,e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))}visitPipe(e,t){return new Dr(e.span,e.sourceSpan,e.exp.visit(this),e.name,this.visitAll(e.args),e.nameSpan)}visitKeyedRead(e,t){return new Lr(e.span,e.sourceSpan,e.obj.visit(this),e.key.visit(this))}visitKeyedWrite(e,t){return new Rr(e.span,e.sourceSpan,e.obj.visit(this),e.key.visit(this),e.value.visit(this))}visitAll(e){const t=[];for(let n=0;n<e.length;++n)t[n]=e[n].visit(this);return t}visitChain(e,t){return new Ar(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitQuote(e,t){return new br(e.span,e.sourceSpan,e.prefix,e.uninterpretedExpression,e.location)}}{constructor(e){super(),this._converterFactory=e}visitPipe(e,t){const n=[e.exp,...e.args].map(e=>e.visit(this,t));return new gi(e.span,e.sourceSpan,n,this._converterFactory.createPipeConverter(e.name,n.length))}visitLiteralArray(e,t){const n=e.expressions.map(e=>e.visit(this,t));return new gi(e.span,e.sourceSpan,n,this._converterFactory.createLiteralArrayConverter(e.expressions.length))}visitLiteralMap(e,t){const n=e.values.map(e=>e.visit(this,t));return new gi(e.span,e.sourceSpan,n,this._converterFactory.createLiteralMapConverter(e.keys))}}class di{constructor(e,t,n,s,r,i){this._localResolver=e,this._implicitReceiver=t,this.bindingId=n,this.interpolationFunction=s,this.baseSourceSpan=r,this.implicitReceiverAccesses=i,this._nodeMap=new Map,this._resultMap=new Map,this._currentTemporary=0,this.temporaryCount=0,this.usesImplicitReceiver=!1}visitUnary(e,t){let n;switch(e.operator){case"+":n=We.Plus;break;case"-":n=We.Minus;break;default:throw new Error("Unsupported operator "+e.operator)}return pi(t,new _t(n,this._visit(e.expr,gr.Expression),void 0,this.convertSourceSpan(e.span)))}visitBinary(e,t){let n;switch(e.operation){case"+":n=ze.Plus;break;case"-":n=ze.Minus;break;case"*":n=ze.Multiply;break;case"/":n=ze.Divide;break;case"%":n=ze.Modulo;break;case"&&":n=ze.And;break;case"||":n=ze.Or;break;case"==":n=ze.Equals;break;case"!=":n=ze.NotEquals;break;case"===":n=ze.Identical;break;case"!==":n=ze.NotIdentical;break;case"<":n=ze.Lower;break;case">":n=ze.Bigger;break;case"<=":n=ze.LowerEquals;break;case">=":n=ze.BiggerEquals;break;default:throw new Error("Unsupported operation "+e.operation)}return pi(t,new Ct(n,this._visit(e.left,gr.Expression),this._visit(e.right,gr.Expression),void 0,this.convertSourceSpan(e.span)))}visitChain(e,t){return function(e,t){if(e!==gr.Statement)throw new Error("Expected a statement, but saw "+t)}(t,e),this.visitAll(e.expressions,t)}visitConditional(e,t){return pi(t,this._visit(e.condition,gr.Expression).conditional(this._visit(e.trueExp,gr.Expression),this._visit(e.falseExp,gr.Expression),this.convertSourceSpan(e.span)))}visitPipe(e,t){throw new Error("Illegal state: Pipes should have been converted into functions. Pipe: "+e.name)}visitFunctionCall(e,t){const n=this.visitAll(e.args,gr.Expression);let s;return s=e instanceof gi?e.converter(n):this._visit(e.target,gr.Expression).callFn(n,this.convertSourceSpan(e.span)),pi(t,s)}visitImplicitReceiver(e,t){return ui(t,e),this.usesImplicitReceiver=!0,this._implicitReceiver}visitThisReceiver(e,t){return this.visitImplicitReceiver(e,t)}visitInterpolation(e,t){ui(t,e);const n=[Kt(e.expressions.length)];for(let t=0;t<e.strings.length-1;t++)n.push(Kt(e.strings[t])),n.push(this._visit(e.expressions[t],gr.Expression));return n.push(Kt(e.strings[e.strings.length-1])),this.interpolationFunction?this.interpolationFunction(n):e.expressions.length<=9?Vt(fn.inlineInterpolate).callFn(n):Vt(fn.interpolate).callFn([n[0],qt(n.slice(1),void 0,this.convertSourceSpan(e.span))])}visitKeyedRead(e,t){const n=this.leftMostSafeNode(e);return n?this.convertSafeAccess(e,n,t):pi(t,this._visit(e.obj,gr.Expression).key(this._visit(e.key,gr.Expression)))}visitKeyedWrite(e,t){const n=this._visit(e.obj,gr.Expression),s=this._visit(e.key,gr.Expression),r=this._visit(e.value,gr.Expression);return pi(t,n.key(s).set(r))}visitLiteralArray(e,t){throw new Error("Illegal State: literal arrays should have been converted into functions")}visitLiteralMap(e,t){throw new Error("Illegal State: literal maps should have been converted into functions")}visitLiteralPrimitive(e,t){return pi(t,Kt(e.value,null==e.value||!0===e.value||!0===e.value?Ve:void 0,this.convertSourceSpan(e.span)))}_getLocal(e,t){var n;return(null===(n=this._localResolver.globals)||void 0===n?void 0:n.has(e))&&t instanceof Nr?null:this._localResolver.getLocal(e)}visitMethodCall(e,t){if(e.receiver instanceof Tr&&!(e.receiver instanceof Nr)&&"$any"===e.name){const t=this.visitAll(e.args,gr.Expression);if(1!=t.length)throw new Error("Invalid call to $any, expected 1 argument but received "+(t.length||"none"));return t[0].cast($e,this.convertSourceSpan(e.span))}const n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);{const n=this.visitAll(e.args,gr.Expression),s=this.usesImplicitReceiver;let r=null;const i=this._visit(e.receiver,gr.Expression);if(i===this._implicitReceiver){const t=this._getLocal(e.name,e.receiver);t&&(this.usesImplicitReceiver=s,r=t.callFn(n),this.addImplicitReceiverAccess(e.name))}return null==r&&(r=i.callMethod(e.name,n,this.convertSourceSpan(e.span))),pi(t,r)}}visitPrefixNot(e,t){return pi(t,(n=this._visit(e.expression,gr.Expression),new vt(n,void 0)));var n}visitNonNullAssert(e,t){return pi(t,(n=this._visit(e.expression,gr.Expression),new yt(n,void 0)));var n}visitPropertyRead(e,t){const n=this.leftMostSafeNode(e);if(n)return this.convertSafeAccess(e,n,t);{let n=null;const s=this.usesImplicitReceiver,r=this._visit(e.receiver,gr.Expression);return r===this._implicitReceiver&&(n=this._getLocal(e.name,e.receiver),n&&(this.usesImplicitReceiver=s,this.addImplicitReceiverAccess(e.name))),null==n&&(n=r.prop(e.name)),pi(t,n)}}visitPropertyWrite(e,t){const n=this._visit(e.receiver,gr.Expression),s=this.usesImplicitReceiver;let r=null;if(n===this._implicitReceiver){const t=this._getLocal(e.name,e.receiver);if(t){if(!(t instanceof wt))throw new Error(`Cannot assign value "${e.value instanceof kr?e.value.name:void 0}" to template variable "${e.name}". Template variables are read-only.`);r=t,this.usesImplicitReceiver=s,this.addImplicitReceiverAccess(e.name)}}return null===r&&(r=n.prop(e.name)),pi(t,r.set(this._visit(e.value,gr.Expression)))}visitSafePropertyRead(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)}visitSafeMethodCall(e,t){return this.convertSafeAccess(e,this.leftMostSafeNode(e),t)}visitAll(e,t){return e.map(e=>this._visit(e,t))}visitQuote(e,t){throw new Error(`Quotes are not supported for evaluation!\n Statement: ${e.uninterpretedExpression} located at ${e.location}`)}_visit(e,t){return this._resultMap.get(e)||(this._nodeMap.get(e)||e).visit(this,t)}convertSafeAccess(e,t,n){let s=this._visit(t.receiver,gr.Expression),r=void 0;this.needsTemporary(t.receiver)&&(r=this.allocateTemporary(),s=r.set(s),this._resultMap.set(t.receiver,r));const i=s.isBlank();this._nodeMap.set(t,t instanceof zr?new Wr(t.span,t.sourceSpan,t.nameSpan,t.receiver,t.name,t.args):new kr(t.span,t.sourceSpan,t.nameSpan,t.receiver,t.name));const a=this._visit(e,gr.Expression);return this._nodeMap.delete(t),r&&this.releaseTemporary(r),pi(n,i.conditional(Kt(null),a))}leftMostSafeNode(e){const t=(e,t)=>(this._nodeMap.get(t)||t).visit(e);return e.visit({visitUnary:e=>null,visitBinary:e=>null,visitChain:e=>null,visitConditional:e=>null,visitFunctionCall:e=>null,visitImplicitReceiver:e=>null,visitThisReceiver:e=>null,visitInterpolation:e=>null,visitKeyedRead(e){return t(this,e.obj)},visitKeyedWrite:e=>null,visitLiteralArray:e=>null,visitLiteralMap:e=>null,visitLiteralPrimitive:e=>null,visitMethodCall(e){return t(this,e.receiver)},visitPipe:e=>null,visitPrefixNot:e=>null,visitNonNullAssert:e=>null,visitPropertyRead(e){return t(this,e.receiver)},visitPropertyWrite:e=>null,visitQuote:e=>null,visitSafeMethodCall(e){return t(this,e.receiver)||e},visitSafePropertyRead(e){return t(this,e.receiver)||e}})}needsTemporary(e){const t=(e,t)=>t&&(this._nodeMap.get(t)||t).visit(e);return e.visit({visitUnary(e){return t(this,e.expr)},visitBinary(e){return t(this,e.left)||t(this,e.right)},visitChain:e=>!1,visitConditional(e){return t(this,e.condition)||t(this,e.trueExp)||t(this,e.falseExp)},visitFunctionCall:e=>!0,visitImplicitReceiver:e=>!1,visitThisReceiver:e=>!1,visitInterpolation(e){return((e,n)=>n.some(n=>t(e,n)))(this,e.expressions)},visitKeyedRead:e=>!1,visitKeyedWrite:e=>!1,visitLiteralArray:e=>!0,visitLiteralMap:e=>!0,visitLiteralPrimitive:e=>!1,visitMethodCall:e=>!0,visitPipe:e=>!0,visitPrefixNot(e){return t(this,e.expression)},visitNonNullAssert(e){return t(this,e.expression)},visitPropertyRead:e=>!1,visitPropertyWrite:e=>!1,visitQuote:e=>!1,visitSafeMethodCall:e=>!0,visitSafePropertyRead:e=>!1})}allocateTemporary(){const e=this._currentTemporary++;return this.temporaryCount=Math.max(this._currentTemporary,this.temporaryCount),new Ye(li(this.bindingId,e))}releaseTemporary(e){if(this._currentTemporary--,e.name!=li(this.bindingId,this._currentTemporary))throw new Error(`Temporary ${e.name} released out of order`)}convertSourceSpan(e){if(this.baseSourceSpan){const t=this.baseSourceSpan.start.moveBy(e.start),n=this.baseSourceSpan.start.moveBy(e.end),s=this.baseSourceSpan.fullStart.moveBy(e.start);return new pr(t,n,s)}return null}addImplicitReceiverAccess(e){this.implicitReceiverAccesses&&this.implicitReceiverAccesses.add(e)}}class mi{constructor(e){this.globals=e}notifyImplicitReceiverUse(){}getLocal(e){return e===si.event.name?si.event:null}}class gi extends Kr{constructor(e,t,n,s){super(e,t,null,n),this.args=n,this.converter=s}}class fi{constructor(){this.strictStyling=!0}shimCssText(e,t,n=""){const s=e.match(Ri)||[];return e=function(e){return e.replace(Li,"")}(e),e=this._insertDirectives(e),[this._scopeCssText(e,t,n),...s].join("\n")}_insertDirectives(e){return e=this._insertPolyfillDirectivesInCssText(e),this._insertPolyfillRulesInCssText(e)}_insertPolyfillDirectivesInCssText(e){return e.replace(yi,function(...e){return e[2]+"{"})}_insertPolyfillRulesInCssText(e){return e.replace(xi,(...e)=>{const t=e[0].replace(e[1],"").replace(e[2],"");return e[4]+t})}_scopeCssText(e,t,n){const s=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,n)),(e=e+"\n"+s).trim()}_extractUnscopedRulesFromCssText(e){let t,n="";for(Si.lastIndex=0;null!==(t=Si.exec(e));)n+=t[0].replace(t[2],"").replace(t[1],t[4])+"\n\n";return n}_convertColonHost(e){return this._convertColonRule(e,wi,this._colonHostPartReplacer)}_convertColonHostContext(e){return this._convertColonRule(e,bi,this._colonHostContextPartReplacer)}_convertColonRule(e,t,n){return e.replace(t,function(...e){if(e[2]){const t=e[2].split(","),s=[];for(let r=0;r<t.length;r++){const i=t[r].trim();if(!i)break;s.push(n(Ii,i,e[3]))}return s.join(",")}return Ii+e[3]})}_colonHostContextPartReplacer(e,t,n){return t.indexOf(Ei)>-1?this._colonHostPartReplacer(e,t,n):e+t+n+", "+t+" "+e+n}_colonHostPartReplacer(e,t,n){return e+t.replace(Ei,"")+n}_convertShadowDOMSelectors(e){return Ni.reduce((e,t)=>e.replace(t," "),e)}_scopeSelectors(e,t,n){return function(e,t){const n=Ui(e,$i,"%QUOTED%"),s=Ui(n.escapedString,Bi,"%BLOCK%");let r=0,i=0;return s.escapedString.replace(Di,(...e)=>{const n=e[2];let i="",a=e[4],o="";a&&a.startsWith("{%BLOCK%")&&(i=s.blocks[r++],a=a.substring("%BLOCK%".length+1),o="{");const l=t(new Vi(n,i));return`${e[1]}${l.selector}${e[3]}${o}${l.content}${a}`}).replace(Fi,()=>n.blocks[i++])}(e,e=>{let s=e.selector,r=e.content;return"@"!=e.selector[0]?s=this._scopeSelector(e.selector,t,n,this.strictStyling):(e.selector.startsWith("@media")||e.selector.startsWith("@supports")||e.selector.startsWith("@page")||e.selector.startsWith("@document"))&&(r=this._scopeSelectors(e.content,t,n)),new Vi(s,r)})}_scopeSelector(e,t,n,s){return e.split(",").map(e=>e.trim().split(Ai)).map(e=>{const[r,...i]=e;return[(e=>this._selectorNeedsScoping(e,t)?s?this._applyStrictSelectorScope(e,t,n):this._applySelectorScope(e,t,n):e)(r),...i].join(" ")}).join(", ")}_selectorNeedsScoping(e,t){return!this._makeScopeMatcher(t).test(e)}_makeScopeMatcher(e){return e=e.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),new RegExp("^("+e+")"+Pi,"m")}_applySelectorScope(e,t,n){return this._applySimpleSelectorScope(e,t,n)}_applySimpleSelectorScope(e,t,n){if(ki.lastIndex=0,ki.test(e)){const s=this.strictStyling?`[${n}]`:t;return e.replace(Ti,(e,t)=>t.replace(/([^:]*)(:*)(.*)/,(e,t,n,r)=>t+s+n+r)).replace(ki,s+" ")}return t+" "+e}_applyStrictSelectorScope(e,t,n){const s="["+(t=t.replace(/\[is=([^\]]*)\]/g,(e,...t)=>t[0]))+"]",r=e=>{let r=e.trim();if(!r)return"";if(e.indexOf(Ii)>-1)r=this._applySimpleSelectorScope(e,t,n);else{const t=e.replace(ki,"");if(t.length>0){const e=t.match(/([^:]*)(:*)(.*)/);e&&(r=e[1]+s+e[2]+e[3])}}return r},i=new vi(e);let a,o="",l=0;const c=/( |>|\+|~(?!=))\s*/g;let u=!((e=i.content()).indexOf(Ii)>-1);for(;null!==(a=c.exec(e));){const t=a[1],n=e.slice(l,a.index).trim();u=u||n.indexOf(Ii)>-1,o+=`${u?r(n):n} ${t} `,l=c.lastIndex}const p=e.substring(l);return u=u||p.indexOf(Ii)>-1,o+=u?r(p):p,i.restore(o)}_insertPolyfillHostInCssText(e){return e.replace(Mi,_i).replace(Oi,Ei)}}class vi{constructor(e){this.placeholders=[],this.index=0,e=e.replace(/(\[[^\]]*\])/g,(e,t)=>{const n=`__ph-${this.index}__`;return this.placeholders.push(t),this.index++,n}),this._content=e.replace(/(:nth-[-\w]+)(\([^)]+\))/g,(e,t,n)=>{const s=`__ph-${this.index}__`;return this.placeholders.push(n),this.index++,t+s})}restore(e){return e.replace(/__ph-(\d+)__/g,(e,t)=>this.placeholders[+t])}content(){return this._content}}const yi=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,xi=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,Si=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,Ei="-shadowcsshost",_i="-shadowcsscontext",Ci=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",wi=new RegExp("("+Ei+Ci,"gim"),bi=new RegExp("("+_i+Ci,"gim"),Ii=Ei+"-no-combinator",Ti=/-shadowcsshost-no-combinator([^\s]*)/,Ni=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],Ai=/(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g,Pi="([>\\s~+[.,{:][\\s\\S]*)?$",ki=/-shadowcsshost/gim,Oi=/:host/gim,Mi=/:host-context/gim,Li=/\/\*\s*[\s\S]*?\*\//g,Ri=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g,Di=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,Fi=/%QUOTED%/g,Bi=new Map([["{","}"]]),$i=new Map([['"','"'],["'","'"]]);class Vi{constructor(e,t){this.selector=e,this.content=t}}class ji{constructor(e,t){this.escapedString=e,this.blocks=t}}function Ui(e,t,n){const s=[],r=[];let i,a,o=0,l=0,c=-1;for(let u=0;u<e.length;u++){const p=e[u];"\\"===p?u++:p===a?(o--,0===o&&(r.push(e.substring(c,u)),s.push(n),l=u,c=-1,i=a=void 0)):p===i?o++:0===o&&t.has(p)&&(i=p,a=t.get(p),o=1,c=u+1,s.push(e.substring(l,c)))}return-1!==c?(r.push(e.substring(c)),s.push(n)):s.push(e.substring(l)),new ji(s.join(""),r)}class qi{constructor(e,t){this.sourceSpan=e,this.i18n=t}}class Hi extends qi{constructor(e,t,n){super(t,n),this.value=e}visit(e,t){return e.visitText(this,t)}}class Wi extends qi{constructor(e,t,n,s,r,i){super(s,i),this.switchValue=e,this.type=t,this.cases=n,this.switchValueSourceSpan=r}visit(e,t){return e.visitExpansion(this,t)}}class zi{constructor(e,t,n,s,r){this.value=e,this.expression=t,this.sourceSpan=n,this.valueSourceSpan=s,this.expSourceSpan=r}visit(e,t){return e.visitExpansionCase(this,t)}}class Ki extends qi{constructor(e,t,n,s,r){super(n,r),this.name=e,this.value=t,this.valueSpan=s}visit(e,t){return e.visitAttribute(this,t)}}class Xi extends qi{constructor(e,t,n,s,r,i=null,a){super(s,a),this.name=e,this.attrs=t,this.children=n,this.startSourceSpan=r,this.endSourceSpan=i}visit(e,t){return e.visitElement(this,t)}}class Gi{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitComment(this,t)}}function Qi(e,t,n=null){const s=[],r=e.visit?t=>e.visit(t,n)||t.visit(e,n):t=>t.visit(e,n);return t.forEach(e=>{const t=r(e);t&&s.push(t)}),s}var Yi;!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.INCOMPLETE_TAG_OPEN=4]="INCOMPLETE_TAG_OPEN",e[e.TEXT=5]="TEXT",e[e.ESCAPABLE_RAW_TEXT=6]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=7]="RAW_TEXT",e[e.COMMENT_START=8]="COMMENT_START",e[e.COMMENT_END=9]="COMMENT_END",e[e.CDATA_START=10]="CDATA_START",e[e.CDATA_END=11]="CDATA_END",e[e.ATTR_NAME=12]="ATTR_NAME",e[e.ATTR_QUOTE=13]="ATTR_QUOTE",e[e.ATTR_VALUE=14]="ATTR_VALUE",e[e.DOC_TYPE=15]="DOC_TYPE",e[e.EXPANSION_FORM_START=16]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=17]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=18]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=19]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=20]="EXPANSION_FORM_END",e[e.EOF=21]="EOF"}(Yi||(Yi={}));class Zi{constructor(e,t,n){this.type=e,this.parts=t,this.sourceSpan=n}}class Ji extends fr{constructor(e,t,n){super(n,e),this.tokenType=t}}class ea{constructor(e,t,n){this.tokens=e,this.errors=t,this.nonNormalizedIcuExpressions=n}}const ta=/\r\n?/g;function na(e){return`Unexpected character "${0===e?"EOF":String.fromCharCode(e)}"`}function sa(e){return`Unknown entity "${e}" - use the "&#<decimal>;" or "&#x<hex>;" syntax`}var ra;!function(e){e.HEX="hexadecimal",e.DEC="decimal"}(ra||(ra={}));class ia{constructor(e){this.error=e}}class aa{constructor(e,t,n){this._getTagDefinition=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._interpolationConfig=n.interpolationConfig||Hs,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map(e=>e.codePointAt(0)||0);const s=n.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new da(e,s):new ha(e,s),this._preserveLineEndings=n.preserveLineEndings||!1,this._escapedString=n.escapedString||!1,this._i18nNormalizeLineEndingsInICUs=n.i18nNormalizeLineEndingsInICUs||!1;try{this._cursor.init()}catch(e){this.handleError(e)}}_processCarriageReturns(e){return this._preserveLineEndings?e:e.replace(ta,"\n")}tokenize(){for(;0!==this._cursor.peek();){const e=this._cursor.clone();try{this._attemptCharCode(60)?this._attemptCharCode(33)?this._attemptCharCode(91)?this._consumeCdata(e):this._attemptCharCode(45)?this._consumeComment(e):this._consumeDocType(e):this._attemptCharCode(47)?this._consumeTagClose(e):this._consumeTagOpen(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){this.handleError(e)}}this._beginToken(Yi.EOF),this._endToken([])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(125!==this._cursor.peek()&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(125===this._cursor.peek()){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,t=this._cursor.clone()){this._currentTokenStart=t,this._currentTokenType=e}_endToken(e,t){if(null===this._currentTokenStart)throw new Ji("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(t));if(null===this._currentTokenType)throw new Ji("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));const n=new Zi(this._currentTokenType,e,this._cursor.getSpan(this._currentTokenStart,this._leadingTriviaCodePoints));return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}_createError(e,t){this._isInExpansionForm()&&(e+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');const n=new Ji(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new ia(n)}handleError(e){if(e instanceof ma&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),!(e instanceof ia))throw e;this.errors.push(e.error)}_attemptCharCode(e){return this._cursor.peek()===e&&(this._cursor.advance(),!0)}_attemptCharCodeCaseInsensitive(e){return t=e,pa(this._cursor.peek())==pa(t)&&(this._cursor.advance(),!0);var t}_requireCharCode(e){const t=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(na(this._cursor.peek()),this._cursor.getSpan(t))}_attemptStr(e){const t=e.length;if(this._cursor.charsLeft()<t)return!1;const n=this._cursor.clone();for(let s=0;s<t;s++)if(!this._attemptCharCode(e.charCodeAt(s)))return this._cursor=n,!1;return!0}_attemptStrCaseInsensitive(e){for(let t=0;t<e.length;t++)if(!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t)))return!1;return!0}_requireStr(e){const t=this._cursor.clone();if(!this._attemptStr(e))throw this._createError(na(this._cursor.peek()),this._cursor.getSpan(t))}_attemptCharCodeUntilFn(e){for(;!e(this._cursor.peek());)this._cursor.advance()}_requireCharCodeUntilFn(e,t){const n=this._cursor.clone();if(this._attemptCharCodeUntilFn(e),this._cursor.diff(n)<t)throw this._createError(na(this._cursor.peek()),this._cursor.getSpan(n))}_attemptUntilChar(e){for(;this._cursor.peek()!==e;)this._cursor.advance()}_readChar(e){if(e&&38===this._cursor.peek())return this._decodeEntity();{const e=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),e}}_decodeEntity(){const e=this._cursor.clone();if(this._cursor.advance(),!this._attemptCharCode(35)){const t=this._cursor.clone();if(this._attemptCharCodeUntilFn(ua),59!=this._cursor.peek())return this._cursor=t,"&";const n=this._cursor.getChars(t);this._cursor.advance();const s=ye[n];if(!s)throw this._createError(sa(n),this._cursor.getSpan(e));return s}{const n=this._attemptCharCode(120)||this._attemptCharCode(88),s=this._cursor.clone();if(this._attemptCharCodeUntilFn(ca),59!=this._cursor.peek())throw this._cursor.advance(),this._createError((t=n?ra.HEX:ra.DEC,`Unable to parse entity "${this._cursor.getChars(e)}" - ${t} character reference entities must end with ";"`),this._cursor.getSpan());const r=this._cursor.getChars(s);this._cursor.advance();try{const e=parseInt(r,n?16:10);return String.fromCharCode(e)}catch(t){throw this._createError(sa(this._cursor.getChars(e)),this._cursor.getSpan())}}var t}_consumeRawText(e,t){this._beginToken(e?Yi.ESCAPABLE_RAW_TEXT:Yi.RAW_TEXT);const n=[];for(;;){const s=this._cursor.clone(),r=t();if(this._cursor=s,r)break;n.push(this._readChar(e))}return this._endToken([this._processCarriageReturns(n.join(""))])}_consumeComment(e){this._beginToken(Yi.COMMENT_START,e),this._requireCharCode(45),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("--\x3e")),this._beginToken(Yi.COMMENT_END),this._requireStr("--\x3e"),this._endToken([])}_consumeCdata(e){this._beginToken(Yi.CDATA_START,e),this._requireStr("CDATA["),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(Yi.CDATA_END),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(Yi.DOC_TYPE,e);const t=this._cursor.clone();this._attemptUntilChar(62);const n=this._cursor.getChars(t);this._cursor.advance(),this._endToken([n])}_consumePrefixAndName(){const e=this._cursor.clone();let t="";for(;58!==this._cursor.peek()&&!(((n=this._cursor.peek())<97||122<n)&&(n<65||90<n)&&(n<48||n>57));)this._cursor.advance();var n;let s;return 58===this._cursor.peek()?(t=this._cursor.getChars(e),this._cursor.advance(),s=this._cursor.clone()):s=e,this._requireCharCodeUntilFn(la,""===t?0:1),[t,this._cursor.getChars(s)]}_consumeTagOpen(e){let t,n,s;try{if(!ar(this._cursor.peek()))throw this._createError(na(this._cursor.peek()),this._cursor.getSpan(e));for(s=this._consumeTagOpenStart(e),n=s.parts[0],t=s.parts[1],this._attemptCharCodeUntilFn(oa);47!==this._cursor.peek()&&62!==this._cursor.peek()&&60!==this._cursor.peek();)this._consumeAttributeName(),this._attemptCharCodeUntilFn(oa),this._attemptCharCode(61)&&(this._attemptCharCodeUntilFn(oa),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(oa);this._consumeTagOpenEnd()}catch(t){if(t instanceof ia)return void(s?s.type=Yi.INCOMPLETE_TAG_OPEN:(this._beginToken(Yi.TEXT,e),this._endToken(["<"])));throw t}const r=this._getTagDefinition(t).contentType;r===pe.RAW_TEXT?this._consumeRawTextWithTagClose(n,t,!1):r===pe.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,t,!0)}_consumeRawTextWithTagClose(e,t,n){this._consumeRawText(n,()=>!!this._attemptCharCode(60)&&!!this._attemptCharCode(47)&&(this._attemptCharCodeUntilFn(oa),!!this._attemptStrCaseInsensitive(t)&&(this._attemptCharCodeUntilFn(oa),this._attemptCharCode(62)))),this._beginToken(Yi.TAG_CLOSE),this._requireCharCodeUntilFn(e=>62===e,3),this._cursor.advance(),this._endToken([e,t])}_consumeTagOpenStart(e){this._beginToken(Yi.TAG_OPEN_START,e);const t=this._consumePrefixAndName();return this._endToken(t)}_consumeAttributeName(){const e=this._cursor.peek();if(39===e||34===e)throw this._createError(na(e),this._cursor.getSpan());this._beginToken(Yi.ATTR_NAME);const t=this._consumePrefixAndName();this._endToken(t)}_consumeAttributeValue(){let e;if(39===this._cursor.peek()||34===this._cursor.peek()){this._beginToken(Yi.ATTR_QUOTE);const t=this._cursor.peek();this._cursor.advance(),this._endToken([String.fromCodePoint(t)]),this._beginToken(Yi.ATTR_VALUE);const n=[];for(;this._cursor.peek()!==t;)n.push(this._readChar(!0));e=n.join(""),this._endToken([this._processCarriageReturns(e)]),this._beginToken(Yi.ATTR_QUOTE),this._cursor.advance(),this._endToken([String.fromCodePoint(t)])}else{this._beginToken(Yi.ATTR_VALUE);const t=this._cursor.clone();this._requireCharCodeUntilFn(la,1),e=this._cursor.getChars(t),this._endToken([this._processCarriageReturns(e)])}}_consumeTagOpenEnd(){const e=this._attemptCharCode(47)?Yi.TAG_OPEN_END_VOID:Yi.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(62),this._endToken([])}_consumeTagClose(e){this._beginToken(Yi.TAG_CLOSE,e),this._attemptCharCodeUntilFn(oa);const t=this._consumePrefixAndName();this._attemptCharCodeUntilFn(oa),this._requireCharCode(62),this._endToken(t)}_consumeExpansionFormStart(){this._beginToken(Yi.EXPANSION_FORM_START),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(Yi.EXPANSION_FORM_START),this._beginToken(Yi.RAW_TEXT);const e=this._readUntil(44),t=this._processCarriageReturns(e);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([t]);else{const n=this._endToken([e]);t!==e&&this.nonNormalizedIcuExpressions.push(n)}this._requireCharCode(44),this._attemptCharCodeUntilFn(oa),this._beginToken(Yi.RAW_TEXT);const n=this._readUntil(44);this._endToken([n]),this._requireCharCode(44),this._attemptCharCodeUntilFn(oa)}_consumeExpansionCaseStart(){this._beginToken(Yi.EXPANSION_CASE_VALUE);const e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(oa),this._beginToken(Yi.EXPANSION_CASE_EXP_START),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(oa),this._expansionCaseStack.push(Yi.EXPANSION_CASE_EXP_START)}_consumeExpansionCaseEnd(){this._beginToken(Yi.EXPANSION_CASE_EXP_END),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(oa),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(Yi.EXPANSION_FORM_END),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeText(){const e=this._cursor.clone();this._beginToken(Yi.TEXT,e);const t=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(t.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(t.push(this._interpolationConfig.end),this._inInterpolation=!1):t.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(t.join(""))])}_isTextEnd(){if(60===this._cursor.peek()||0===this._cursor.peek())return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(this.isExpansionFormStart())return!0;if(125===this._cursor.peek()&&this._isInExpansionCase())return!0}return!1}_readUntil(e){const t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Yi.EXPANSION_CASE_EXP_START}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===Yi.EXPANSION_FORM_START}isExpansionFormStart(){if(123!==this._cursor.peek())return!1;if(this._interpolationConfig){const e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0}}function oa(e){return!rr(e)||0===e}function la(e){return rr(e)||62===e||60===e||47===e||39===e||34===e||61===e}function ca(e){return 59==e||0==e||!function(e){return e>=97&&e<=102||e>=65&&e<=70||ir(e)}(e)}function ua(e){return 59==e||0==e||!ar(e)}function pa(e){return e>=97&&e<=122?e-97+65:e}class ha{constructor(e,t){if(e instanceof ha){this.file=e.file,this.input=e.input,this.end=e.end;const t=e.state;this.state={peek:t.peek,offset:t.offset,line:t.line,column:t.column}}else{if(!t)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=e,this.input=e.content,this.end=t.endPos,this.state={peek:-1,offset:t.startPos,line:t.startLine,column:t.startCol}}}clone(){return new ha(this)}peek(){return this.state.peek}charsLeft(){return this.end-this.state.offset}diff(e){return this.state.offset-e.state.offset}advance(){this.advanceState(this.state)}init(){this.updatePeek(this.state)}getSpan(e,t){let n=e=e||this;if(t)for(;this.diff(e)>0&&-1!==t.indexOf(e.peek());)n===e&&(e=e.clone()),e.advance();const s=this.locationFromCursor(e),r=this.locationFromCursor(this),i=n!==e?this.locationFromCursor(n):s;return new pr(s,r,i)}getChars(e){return this.input.substring(e.state.offset,this.state.offset)}charAt(e){return this.input.charCodeAt(e)}advanceState(e){if(e.offset>=this.end)throw this.state=e,new ma('Unexpected character "EOF"',this);const t=this.charAt(e.offset);10===t?(e.line++,e.column=0):or(t)||e.column++,e.offset++,this.updatePeek(e)}updatePeek(e){e.peek=e.offset>=this.end?0:this.charAt(e.offset)}locationFromCursor(e){return new cr(e.file,e.state.offset,e.state.line,e.state.column)}}class da extends ha{constructor(e,t){e instanceof da?(super(e),this.internalState=Object.assign({},e.internalState)):(super(e,t),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new da(this)}getChars(e){const t=e.clone();let n="";for(;t.internalState.offset<this.internalState.offset;)n+=String.fromCodePoint(t.peek()),t.advance();return n}processEscapeSequence(){const e=()=>this.internalState.peek;if(92===e())if(this.internalState=Object.assign({},this.state),this.advanceState(this.internalState),110===e())this.state.peek=10;else if(114===e())this.state.peek=13;else if(118===e())this.state.peek=11;else if(116===e())this.state.peek=9;else if(98===e())this.state.peek=8;else if(102===e())this.state.peek=12;else if(117===e())if(this.advanceState(this.internalState),123===e()){this.advanceState(this.internalState);const t=this.clone();let n=0;for(;125!==e();)this.advanceState(this.internalState),n++;this.state.peek=this.decodeHexDigits(t,n)}else{const e=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,4)}else if(120===e()){this.advanceState(this.internalState);const e=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,2)}else if(lr(e())){let t="",n=0,s=this.clone();for(;lr(e())&&n<3;)s=this.clone(),t+=String.fromCodePoint(e()),this.advanceState(this.internalState),n++;this.state.peek=parseInt(t,8),this.internalState=s.internalState}else or(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(e,t){const n=this.input.substr(e.internalState.offset,t),s=parseInt(n,16);if(isNaN(s))throw e.state=e.internalState,new ma("Invalid hexadecimal escape sequence",e);return s}}class ma{constructor(e,t){this.msg=e,this.cursor=t}}class ga extends fr{constructor(e,t,n){super(t,n),this.elementName=e}static create(e,t,n){return new ga(e,t,n)}}class fa{constructor(e,t){this.rootNodes=e,this.errors=t}}class va{constructor(e,t){this.tokens=e,this.getTagDefinition=t,this._index=-1,this._elementStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==Yi.EOF;)this._peek.type===Yi.TAG_OPEN_START||this._peek.type===Yi.INCOMPLETE_TAG_OPEN?this._consumeStartTag(this._advance()):this._peek.type===Yi.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===Yi.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===Yi.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===Yi.TEXT||this._peek.type===Yi.RAW_TEXT||this._peek.type===Yi.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===Yi.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance()}_advance(){const e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e}_advanceIf(e){return this._peek.type===e?this._advance():null}_consumeCdata(e){this._consumeText(this._advance()),this._advanceIf(Yi.CDATA_END)}_consumeComment(e){const t=this._advanceIf(Yi.RAW_TEXT);this._advanceIf(Yi.COMMENT_END);const n=null!=t?t.parts[0].trim():null;this._addToParent(new Gi(n,e.sourceSpan))}_consumeExpansion(e){const t=this._advance(),n=this._advance(),s=[];for(;this._peek.type===Yi.EXPANSION_CASE_VALUE;){const e=this._parseExpansionCase();if(!e)return;s.push(e)}if(this._peek.type!==Yi.EXPANSION_FORM_END)return void this.errors.push(ga.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."));const r=new pr(e.sourceSpan.start,this._peek.sourceSpan.end,e.sourceSpan.fullStart);this._addToParent(new Wi(t.parts[0],n.parts[0],s,r,t.sourceSpan)),this._advance()}_parseExpansionCase(){const e=this._advance();if(this._peek.type!==Yi.EXPANSION_CASE_EXP_START)return this.errors.push(ga.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;const t=this._advance(),n=this._collectExpansionExpTokens(t);if(!n)return null;const s=this._advance();n.push(new Zi(Yi.EOF,[],s.sourceSpan));const r=new va(n,this.getTagDefinition);if(r.build(),r.errors.length>0)return this.errors=this.errors.concat(r.errors),null;const i=new pr(e.sourceSpan.start,s.sourceSpan.end,e.sourceSpan.fullStart),a=new pr(t.sourceSpan.start,s.sourceSpan.end,t.sourceSpan.fullStart);return new zi(e.parts[0],r.rootNodes,i,e.sourceSpan,a)}_collectExpansionExpTokens(e){const t=[],n=[Yi.EXPANSION_CASE_EXP_START];for(;;){if(this._peek.type!==Yi.EXPANSION_FORM_START&&this._peek.type!==Yi.EXPANSION_CASE_EXP_START||n.push(this._peek.type),this._peek.type===Yi.EXPANSION_CASE_EXP_END){if(!ya(n,Yi.EXPANSION_CASE_EXP_START))return this.errors.push(ga.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(n.pop(),0==n.length)return t}if(this._peek.type===Yi.EXPANSION_FORM_END){if(!ya(n,Yi.EXPANSION_FORM_START))return this.errors.push(ga.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;n.pop()}if(this._peek.type===Yi.EOF)return this.errors.push(ga.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}}_consumeText(e){let t=e.parts[0];if(t.length>0&&"\n"==t[0]){const e=this._getParentElement();null!=e&&0==e.children.length&&this.getTagDefinition(e.name).ignoreFirstLf&&(t=t.substring(1))}t.length>0&&this._addToParent(new Hi(t,e.sourceSpan))}_closeVoidElement(){const e=this._getParentElement();e&&this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()}_consumeStartTag(e){const[t,n]=e.parts,s=[];for(;this._peek.type===Yi.ATTR_NAME;)s.push(this._consumeAttr(this._advance()));const r=this._getElementFullName(t,n,this._getParentElement());let i=!1;if(this._peek.type===Yi.TAG_OPEN_END_VOID){this._advance(),i=!0;const t=this.getTagDefinition(r);t.canSelfClose||null!==fe(r)||t.isVoid||this.errors.push(ga.create(r,e.sourceSpan,`Only void and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===Yi.TAG_OPEN_END&&(this._advance(),i=!1);const a=this._peek.sourceSpan.start,o=new pr(e.sourceSpan.start,a,e.sourceSpan.fullStart),l=new pr(e.sourceSpan.start,a,e.sourceSpan.fullStart),c=new Xi(r,s,[],o,l,void 0);this._pushElement(c),i?this._popElement(r,o):e.type===Yi.INCOMPLETE_TAG_OPEN&&(this._popElement(r,null),this.errors.push(ga.create(r,o,`Opening tag "${r}" not terminated.`)))}_pushElement(e){const t=this._getParentElement();t&&this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop(),this._addToParent(e),this._elementStack.push(e)}_consumeEndTag(e){const t=this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());this.getTagDefinition(t).isVoid?this.errors.push(ga.create(t,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`)):this._popElement(t,e.sourceSpan)||this.errors.push(ga.create(t,e.sourceSpan,`Unexpected closing tag "${t}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`))}_popElement(e,t){for(let n=this._elementStack.length-1;n>=0;n--){const s=this._elementStack[n];if(s.name==e)return s.endSourceSpan=t,s.sourceSpan.end=null!==t?t.end:s.sourceSpan.end,this._elementStack.splice(n,this._elementStack.length-n),!0;if(!this.getTagDefinition(s.name).closedByParent)return!1}return!1}_consumeAttr(e){const t=ve(e.parts[0],e.parts[1]);let n=e.sourceSpan.end,s="",r=void 0;if(this._peek.type===Yi.ATTR_QUOTE&&this._advance(),this._peek.type===Yi.ATTR_VALUE){const e=this._advance();s=e.parts[0],n=e.sourceSpan.end,r=e.sourceSpan}return this._peek.type===Yi.ATTR_QUOTE&&(n=this._advance().sourceSpan.end),new Ki(t,s,new pr(e.sourceSpan.start,n,e.sourceSpan.fullStart),r)}_getParentElement(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null}_addToParent(e){const t=this._getParentElement();null!=t?t.children.push(e):this.rootNodes.push(e)}_getElementFullName(e,t,n){if(""===e&&""===(e=this.getTagDefinition(t).implicitNamespacePrefix||"")&&null!=n){const t=de(n.name)[1];this.getTagDefinition(t).preventNamespaceInheritance||(e=fe(n.name))}return ve(e,t)}}function ya(e,t){return e.length>0&&e[e.length-1]===t}class xa extends class{constructor(e){this.getTagDefinition=e}parse(e,t,n){const s=function(e,t,n,s={}){const r=new aa(new ur(e,t),n,s);return r.tokenize(),new ea(function(e){const t=[];let n=void 0;for(let s=0;s<e.length;s++){const r=e[s];n&&n.type==Yi.TEXT&&r.type==Yi.TEXT?(n.parts[0]+=r.parts[0],n.sourceSpan.end=r.sourceSpan.end):(n=r,t.push(n))}return t}(r.tokens),r.errors,r.nonNormalizedIcuExpressions)}(e,t,this.getTagDefinition,n),r=new va(s.tokens,this.getTagDefinition);return r.build(),new fa(r.rootNodes,s.errors.concat(r.errors))}}{constructor(){super(_e)}parse(e,t,n){return super.parse(e,t,n)}}const Sa=new Set(["pre","template","textarea","script","style"]),Ea=new RegExp("[^ \f\n\r\t\v ᠎ - \u2028\u2029   \ufeff]"),_a=new RegExp("[ \f\n\r\t\v ᠎ - \u2028\u2029   \ufeff]{2,}","g");function Ca(e){return e.replace(new RegExp("","g")," ")}class wa{visitElement(e,t){return Sa.has(e.name)||e.attrs.some(e=>"ngPreserveWhitespaces"===e.name)?new Xi(e.name,Qi(this,e.attrs),e.children,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n):new Xi(e.name,e.attrs,function(e,t){const n=[];return t.forEach((s,r)=>{const i=s.visit(e,{prev:t[r-1],next:t[r+1]});i&&n.push(i)}),n}(this,e.children),e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}visitAttribute(e,t){return"ngPreserveWhitespaces"!==e.name?e:null}visitText(e,t){return e.value.match(Ea)||t&&(t.prev instanceof Wi||t.next instanceof Wi)?new Hi(Ca(e.value).replace(_a," "),e.sourceSpan,e.i18n):null}visitComment(e,t){return e}visitExpansion(e,t){return e}visitExpansionCase(e,t){return e}}var ba;!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"}(ba||(ba={}));const Ia=/^([^:/?#]+):/;class Ta{constructor(e,t,n,s,r){if(this._exprParser=e,this._interpolationConfig=t,this._schemaRegistry=n,this.errors=r,this.pipesByName=null,this._usedPipes=new Map,s){const e=new Map;s.forEach(t=>e.set(t.name,t)),this.pipesByName=e}}get interpolationConfig(){return this._interpolationConfig}getUsedPipes(){return Array.from(this._usedPipes.values())}createBoundHostProperties(e,t){if(e.hostProperties){const n=[];return Object.keys(e.hostProperties).forEach(s=>{const r=e.hostProperties[s];"string"==typeof r?this.parsePropertyBinding(s,r,!0,t,t.start.offset,void 0,[],n,t):this._reportError(`Value of the host property binding "${s}" needs to be a string representing an expression but got "${r}" (${typeof r})`,t)}),n}return null}createDirectiveHostPropertyAsts(e,t,n){const s=this.createBoundHostProperties(e,n);return s&&s.map(e=>this.createBoundElementProperty(t,e))}createDirectiveHostEventAsts(e,t){if(e.hostListeners){const n=[];return Object.keys(e.hostListeners).forEach(s=>{const r=e.hostListeners[s];"string"==typeof r?this.parseEvent(s,r,t,t,[],n):this._reportError(`Value of the host listener "${s}" needs to be a string representing an expression but got "${r}" (${typeof r})`,t)}),n}return null}parseInterpolation(e,t){const n=t.start.toString();try{const s=this._exprParser.parseInterpolation(e,n,t.start.offset,this._interpolationConfig);return s&&this._reportExpressionParserErrors(s.errors,t),this._checkPipes(s,t),s}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n,t.start.offset)}}parseInterpolationExpression(e,t){const n=t.start.toString();try{const s=this._exprParser.parseInterpolationExpression(e,n,t.start.offset);return s&&this._reportExpressionParserErrors(s.errors,t),this._checkPipes(s,t),s}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n,t.start.offset)}}parseInlineTemplateBinding(e,t,n,s,r,i,a,o){const l=this._parseTemplateBindings(e,t,n,n.start.offset+"*".length,s);for(const e of l){const t=ka(n,e.sourceSpan),l=e.key.source,c=ka(n,e.key.span);if(e instanceof Qr){const s=e.value?e.value.source:"$implicit",r=e.value?ka(n,e.value.span):void 0;a.push(new ti(l,s,t,c,r))}else if(e.value){const s=o?t:n,a=ka(n,e.value.ast.sourceSpan);this._parsePropertyAst(l,e.value,s,c,a,r,i)}else r.push([l,""]),this.parseLiteralAttr(l,null,c,s,void 0,r,i,c)}}_parseTemplateBindings(e,t,n,s,r){const i=n.start.toString();try{const a=this._exprParser.parseTemplateBindings(e,t,i,s,r);return this._reportExpressionParserErrors(a.errors,n),a.templateBindings.forEach(e=>{e.value instanceof Gr&&this._checkPipes(e.value,n)}),a.warnings.forEach(e=>{this._reportError(e,n,hr.WARNING)}),a.templateBindings}catch(e){return this._reportError(""+e,n),[]}}parseLiteralAttr(e,t,n,s,r,i,a,o){Aa(e)?(e=e.substring(1),t&&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.',n,hr.ERROR),this._parseAnimation(e,t,n,s,o,r,i,a)):a.push(new Jr(e,this._exprParser.wrapLiteralPrimitive(t,"",s),dr.LITERAL_ATTR,n,o,r))}parsePropertyBinding(e,t,n,s,r,i,a,o,l){0===e.length&&this._reportError("Property name is missing in binding",s);let c=!1;e.startsWith("animate-")?(c=!0,e=e.substring("animate-".length)):Aa(e)&&(c=!0,e=e.substring(1)),c?this._parseAnimation(e,t,s,r,l,i,a,o):this._parsePropertyAst(e,this._parseBinding(t,n,i||s,r),s,l,i,a,o)}parsePropertyInterpolation(e,t,n,s,r,i,a){const o=this.parseInterpolation(t,s||n);return!!o&&(this._parsePropertyAst(e,o,n,a,s,r,i),!0)}_parsePropertyAst(e,t,n,s,r,i,a){i.push([e,t.source]),a.push(new Jr(e,t,dr.DEFAULT,n,s,r))}_parseAnimation(e,t,n,s,r,i,a,o){0===e.length&&this._reportError("Animation trigger is missing",n);const l=this._parseBinding(t||"undefined",!1,i||n,s);a.push([e,l.source]),o.push(new Jr(e,l,dr.ANIMATION,n,r,i))}_parseBinding(e,t,n,s){const r=(n&&n.start||"(unknown)").toString();try{const i=t?this._exprParser.parseSimpleBinding(e,r,s,this._interpolationConfig):this._exprParser.parseBinding(e,r,s,this._interpolationConfig);return i&&this._reportExpressionParserErrors(i.errors,n),this._checkPipes(i,n),i}catch(e){return this._reportError(""+e,n),this._exprParser.wrapLiteralPrimitive("ERROR",r,s)}}createBoundElementProperty(e,t,n=!1,s=!0){if(t.isAnimation)return new ni(t.name,4,Pe.NONE,t.expression,null,t.sourceSpan,t.keySpan,t.valueSpan);let r=null,i=void 0,a=null;const o=t.name.split(".");let l=void 0;if(o.length>1)if("attr"==o[0]){a=o.slice(1).join("."),n||this._validatePropertyOrAttributeName(a,t.sourceSpan,!0),l=Pa(this._schemaRegistry,e,a,!0);const s=a.indexOf(":");if(s>-1){const e=a.substring(0,s),t=a.substring(s+1);a=ve(e,t)}i=1}else"class"==o[0]?(a=o[1],i=2,l=[Pe.NONE]):"style"==o[0]&&(r=o.length>2?o[2]:null,a=o[1],i=3,l=[Pe.STYLE]);if(null===a){const r=this._schemaRegistry.getMappedPropName(t.name);a=s?r:t.name,l=Pa(this._schemaRegistry,e,r,!1),i=0,n||this._validatePropertyOrAttributeName(r,t.sourceSpan,!1)}return new ni(a,i,l[0],t.expression,r,t.sourceSpan,t.keySpan,t.valueSpan)}parseEvent(e,t,n,s,r,i){0===e.length&&this._reportError("Event name is missing in binding",n),Aa(e)?(e=e.substr(1),this._parseAnimationEvent(e,t,n,s,i)):this._parseRegularEvent(e,t,n,s,r,i)}calcPossibleSecurityContexts(e,t,n){const s=this._schemaRegistry.getMappedPropName(t);return Pa(this._schemaRegistry,e,s,n)}_parseAnimationEvent(e,t,n,s,r){const i=Zt(e,".",[e,""]),a=i[0],o=i[1].toLowerCase();if(o)switch(o){case"start":case"done":const e=this._parseAction(t,s);r.push(new ei(a,o,1,e,n,s));break;default:this._reportError(`The provided animation output phase value "${o}" for "@${a}" is not supported (use start or done)`,n)}else this._reportError(`The animation trigger output event (@${a}) is missing its phase value name (start or done are currently supported)`,n)}_parseRegularEvent(e,t,n,s,r,i){const[a,o]=Yt(e,[null,e]),l=this._parseAction(t,s);r.push([e,l.source]),i.push(new ei(o,a,0,l,n,s))}_parseAction(e,t){const n=(t&&t.start||"(unknown").toString(),s=t&&t.start?t.start.offset:0;try{const r=this._exprParser.parseAction(e,n,s,this._interpolationConfig);return r&&this._reportExpressionParserErrors(r.errors,t),!r||r.ast instanceof Ir?(this._reportError("Empty expressions are not allowed",t),this._exprParser.wrapLiteralPrimitive("ERROR",n,s)):(this._checkPipes(r,t),r)}catch(e){return this._reportError(""+e,t),this._exprParser.wrapLiteralPrimitive("ERROR",n,s)}}_reportError(e,t,n=hr.ERROR){this.errors.push(new fr(t,e,n))}_reportExpressionParserErrors(e,t){for(const n of e)this._reportError(n.message,t)}_checkPipes(e,t){if(e&&this.pipesByName){const n=new Na;e.visit(n),n.pipes.forEach((e,n)=>{const s=this.pipesByName.get(n);s?this._usedPipes.set(n,s):this._reportError(`The pipe '${n}' could not be found`,new pr(t.start.moveBy(e.span.start),t.start.moveBy(e.span.end)))})}}_validatePropertyOrAttributeName(e,t,n){const s=n?this._schemaRegistry.validateAttribute(e):this._schemaRegistry.validateProperty(e);s.error&&this._reportError(s.msg,t,hr.ERROR)}}class Na extends Zr{constructor(){super(...arguments),this.pipes=new Map}visitPipe(e,t){return this.pipes.set(e.name,e),e.exp.visit(this),this.visitAll(e.args,t),null}}function Aa(e){return"@"==e[0]}function Pa(e,t,n,s){const r=[];return we.parse(t).forEach(t=>{const i=t.element?[t.element]:e.allKnownElementNames(),a=new Set(t.notSelectors.filter(e=>e.isElementSelector()).map(e=>e.element)),o=i.filter(e=>!a.has(e));r.push(...o.map(t=>e.securityContext(t,n,s)))}),0===r.length?[Pe.NONE]:Array.from(new Set(r)).sort()}function ka(e,t){const n=t.start-e.start.offset,s=t.end-e.end.offset;return new pr(e.start.moveBy(n),e.end.moveBy(s),e.fullStart.moveBy(n),e.details)}function Oa(e){let t=null,n=null,s=null,r=!1,i="";e.attrs.forEach(e=>{const a=e.name.toLowerCase();"select"==a?t=e.value:"href"==a?n=e.value:"rel"==a?s=e.value:"ngNonBindable"==e.name?r=!0:"ngProjectAs"==e.name&&e.value.length>0&&(i=e.value)}),t=function(e){return null===e||0===e.length?"*":e}(t);const a=e.name.toLowerCase();let o=Ma.OTHER;return ge(a)?o=Ma.NG_CONTENT:"style"==a?o=Ma.STYLE:"script"==a?o=Ma.SCRIPT:"link"==a&&"stylesheet"==s&&(o=Ma.STYLESHEET),new Ra(o,t,n,r,i)}var Ma,La;!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"}(Ma||(Ma={}));class Ra{constructor(e,t,n,s,r){this.type=e,this.selectAttr=t,this.hrefAttr=n,this.nonBindable=s,this.projectAs=r}}function Da(e){return e instanceof Gr&&(e=e.ast),e instanceof Ir}function Fa(e){const t=e.charCodeAt(0);if(t==e.charCodeAt(e.length-1)&&(39==t||34==t)){const t=e.substring(1,e.length-1);-1==t.indexOf("'")&&-1==t.indexOf('"')&&(e=t)}return e}function Ba(e){return e.replace(/[a-z][A-Z]/g,e=>e.charAt(0)+"-"+e.charAt(1)).toLowerCase()}class $a{constructor(e){this._directiveExpr=e,this._hasInitialValues=!1,this.hasBindings=!1,this.hasBindingsWithPipes=!1,this._classMapInput=null,this._styleMapInput=null,this._singleStyleInputs=null,this._singleClassInputs=null,this._lastStylingInput=null,this._firstStylingInput=null,this._stylesIndex=new Map,this._classesIndex=new Map,this._initialStyleValues=[],this._initialClassValues=[]}registerBoundInput(e){let t=null,n=e.name;switch(e.type){case 0:t=this.registerInputBasedOnName(n,e.value,e.sourceSpan);break;case 3:t=this.registerStyleInput(n,!1,e.value,e.sourceSpan,e.unit);break;case 2:t=this.registerClassInput(n,!1,e.value,e.sourceSpan)}return!!t}registerInputBasedOnName(e,t,n){let s=null;const r=e.substring(0,6),i="style"===e||"style."===r||"style!"===r;if(i||!i&&("class"===e||"class."===r||"class!"===r)){const r="."!==e.charAt(5),a=e.substr(r?5:6);s=i?this.registerStyleInput(a,r,t,n):this.registerClassInput(a,r,t,n)}return s}registerStyleInput(e,t,n,s,r){if(Da(n))return null;e=Ba(e);const{property:i,hasOverrideFlag:a,suffix:o}=ja(e),l={name:i,suffix:r="string"==typeof r&&0!==r.length?r:o,value:n,sourceSpan:s,hasOverrideFlag:a};return t?this._styleMapInput=l:((this._singleStyleInputs=this._singleStyleInputs||[]).push(l),Va(this._stylesIndex,i)),this._lastStylingInput=l,this._firstStylingInput=this._firstStylingInput||l,this._checkForPipes(n),this.hasBindings=!0,l}registerClassInput(e,t,n,s){if(Da(n))return null;const{property:r,hasOverrideFlag:i}=ja(e),a={name:r,value:n,sourceSpan:s,hasOverrideFlag:i,suffix:null};if(t){if(this._classMapInput)throw new Error("[class] and [className] bindings cannot be used on the same element simultaneously");this._classMapInput=a}else(this._singleClassInputs=this._singleClassInputs||[]).push(a),Va(this._classesIndex,r);return this._lastStylingInput=a,this._firstStylingInput=this._firstStylingInput||a,this._checkForPipes(n),this.hasBindings=!0,a}_checkForPipes(e){e instanceof Gr&&e.ast instanceof Dr&&(this.hasBindingsWithPipes=!0)}registerStyleAttr(e){this._initialStyleValues=function(e){const t=[];let n=0,s=0,r=0,i=0,a=0,o=null,l=!1;for(;n<e.length;)switch(e.charCodeAt(n++)){case 40:s++;break;case 41:s--;break;case 39:l=l||i>0,0===r?r=39:39===r&&92!==e.charCodeAt(n-1)&&(r=0);break;case 34:l=l||i>0,0===r?r=34:34===r&&92!==e.charCodeAt(n-1)&&(r=0);break;case 58:o||0!==s||0!==r||(o=Ba(e.substring(a,n-1).trim()),i=n);break;case 59:if(o&&i>0&&0===s&&0===r){const s=e.substring(i,n-1).trim();t.push(o,l?Fa(s):s),a=n,i=0,o=null,l=!1}}if(o&&i){const n=e.substr(i).trim();t.push(o,l?Fa(n):n)}return t}(e),this._hasInitialValues=!0}registerClassAttr(e){this._initialClassValues=e.trim().split(/\s+/g),this._hasInitialValues=!0}populateInitialStylingAttrs(e){if(this._initialClassValues.length){e.push(Kt(1));for(let t=0;t<this._initialClassValues.length;t++)e.push(Kt(this._initialClassValues[t]))}if(this._initialStyleValues.length){e.push(Kt(2));for(let t=0;t<this._initialStyleValues.length;t+=2)e.push(Kt(this._initialStyleValues[t]),Kt(this._initialStyleValues[t+1]))}}assignHostAttrs(e,t){this._directiveExpr&&(e.length||this._hasInitialValues)&&(this.populateInitialStylingAttrs(e),t.set("hostAttrs",qt(e)))}buildClassMapInstruction(e){return this._classMapInput?this._buildMapBasedInstruction(e,!0,this._classMapInput):null}buildStyleMapInstruction(e){return this._styleMapInput?this._buildMapBasedInstruction(e,!1,this._styleMapInput):null}_buildMapBasedInstruction(e,t,n){let s=2;const r=n.value.visit(e);let i;return r instanceof Vr?(s+=r.expressions.length,i=t?function(e){switch(Ls(e)){case 1:return En.classMap;case 3:return En.classMapInterpolate1;case 5:return En.classMapInterpolate2;case 7:return En.classMapInterpolate3;case 9:return En.classMapInterpolate4;case 11:return En.classMapInterpolate5;case 13:return En.classMapInterpolate6;case 15:return En.classMapInterpolate7;case 17:return En.classMapInterpolate8;default:return En.classMapInterpolateV}}(r):function(e){switch(Ls(e)){case 1:return En.styleMap;case 3:return En.styleMapInterpolate1;case 5:return En.styleMapInterpolate2;case 7:return En.styleMapInterpolate3;case 9:return En.styleMapInterpolate4;case 11:return En.styleMapInterpolate5;case 13:return En.styleMapInterpolate6;case 15:return En.styleMapInterpolate7;case 17:return En.styleMapInterpolate8;default:return En.styleMapInterpolateV}}(r)):i=t?En.classMap:En.styleMap,{reference:i,calls:[{supportsInterpolation:!0,sourceSpan:n.sourceSpan,allocateBindingSlots:s,params:e=>{const t=e(r);return Array.isArray(t)?t:[t]}}]}}_buildSingleInputs(e,t,n,s,r){const i=[];return t.forEach(t=>{const a=i[i.length-1],o=t.value.visit(n);let l=e,c=2;o instanceof Vr&&(c+=o.expressions.length,s&&(l=s(o)));const u={sourceSpan:t.sourceSpan,allocateBindingSlots:c,supportsInterpolation:!!s,params:e=>{const n=[];n.push(Kt(t.name));const s=e(o);return Array.isArray(s)?n.push(...s):n.push(s),r||null===t.suffix||n.push(Kt(t.suffix)),n}};a&&a.reference===l?a.calls.push(u):i.push({reference:l,calls:[u]})}),i}_buildClassInputs(e){return this._singleClassInputs?this._buildSingleInputs(En.classProp,this._singleClassInputs,e,null,!0):[]}_buildStyleInputs(e){return this._singleStyleInputs?this._buildSingleInputs(En.styleProp,this._singleStyleInputs,e,Ua,!1):[]}buildUpdateLevelInstructions(e){const t=[];if(this.hasBindings){const n=this.buildStyleMapInstruction(e);n&&t.push(n);const s=this.buildClassMapInstruction(e);s&&t.push(s),t.push(...this._buildStyleInputs(e)),t.push(...this._buildClassInputs(e))}return t}}function Va(e,t){e.has(t)||e.set(t,e.size)}function ja(e){let t=!1;const n=e.indexOf("!important");-1!==n&&(e=n>0?e.substring(0,n):"",t=!0);let s=null,r=e;const i=e.lastIndexOf(".");return i>0&&(s=e.substr(i+1),r=e.substring(0,i)),{property:r,suffix:s,hasOverrideFlag:t}}function Ua(e){switch(Ls(e)){case 1:return En.styleProp;case 3:return En.stylePropInterpolate1;case 5:return En.stylePropInterpolate2;case 7:return En.stylePropInterpolate3;case 9:return En.stylePropInterpolate4;case 11:return En.stylePropInterpolate5;case 13:return En.stylePropInterpolate6;case 15:return En.stylePropInterpolate7;case 17:return En.stylePropInterpolate8;default:return En.stylePropInterpolateV}}!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"}(La||(La={}));const qa=["var","let","as","null","undefined","true","false","if","else","this"];class Ha{tokenize(e){const t=new Ga(e),n=[];let s=t.scanToken();for(;null!=s;)n.push(s),s=t.scanToken();return n}}class Wa{constructor(e,t,n,s,r){this.index=e,this.end=t,this.type=n,this.numValue=s,this.strValue=r}isCharacter(e){return this.type==La.Character&&this.numValue==e}isNumber(){return this.type==La.Number}isString(){return this.type==La.String}isOperator(e){return this.type==La.Operator&&this.strValue==e}isIdentifier(){return this.type==La.Identifier}isKeyword(){return this.type==La.Keyword}isKeywordLet(){return this.type==La.Keyword&&"let"==this.strValue}isKeywordAs(){return this.type==La.Keyword&&"as"==this.strValue}isKeywordNull(){return this.type==La.Keyword&&"null"==this.strValue}isKeywordUndefined(){return this.type==La.Keyword&&"undefined"==this.strValue}isKeywordTrue(){return this.type==La.Keyword&&"true"==this.strValue}isKeywordFalse(){return this.type==La.Keyword&&"false"==this.strValue}isKeywordThis(){return this.type==La.Keyword&&"this"==this.strValue}isError(){return this.type==La.Error}toNumber(){return this.type==La.Number?this.numValue:-1}toString(){switch(this.type){case La.Character:case La.Identifier:case La.Keyword:case La.Operator:case La.String:case La.Error:return this.strValue;case La.Number:return this.numValue.toString();default:return null}}}function za(e,t,n){return new Wa(e,t,La.Character,n,String.fromCharCode(n))}function Ka(e,t,n){return new Wa(e,t,La.Operator,0,n)}const Xa=new Wa(-1,-1,La.Character,0,"");class Ga{constructor(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){const e=this.input,t=this.length;let n=this.peek,s=this.index;for(;n<=32;){if(++s>=t){n=0;break}n=e.charCodeAt(s)}if(this.peek=n,this.index=s,s>=t)return null;if(Qa(n))return this.scanIdentifier();if(ir(n))return this.scanNumber(s);const r=s;switch(n){case 46:return this.advance(),ir(this.peek)?this.scanNumber(r):za(r,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(r,n);case 39:case 34:return this.scanString();case 35:case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(r,String.fromCharCode(n));case 63:return this.scanComplexOperator(r,"?",46,".");case 60:case 62:return this.scanComplexOperator(r,String.fromCharCode(n),61,"=");case 33:case 61:return this.scanComplexOperator(r,String.fromCharCode(n),61,"=",61,"=");case 38:return this.scanComplexOperator(r,"&",38,"&");case 124:return this.scanComplexOperator(r,"|",124,"|");case 160:for(;rr(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(n)}]`,0)}scanCharacter(e,t){return this.advance(),za(e,this.index,t)}scanOperator(e,t){return this.advance(),Ka(e,this.index,t)}scanComplexOperator(e,t,n,s,r,i){this.advance();let a=t;return this.peek==n&&(this.advance(),a+=s),null!=r&&this.peek==r&&(this.advance(),a+=i),Ka(e,this.index,a)}scanIdentifier(){const e=this.index;for(this.advance();Ya(this.peek);)this.advance();const t=this.input.substring(e,this.index);return qa.indexOf(t)>-1?new Wa(e,this.index,La.Keyword,0,t):function(e,t,n){return new Wa(e,t,La.Identifier,0,n)}(e,this.index,t)}scanNumber(e){let t=this.index===e;for(this.advance();;){if(ir(this.peek));else if(46==this.peek)t=!1;else{if(101!=(n=this.peek)&&69!=n)break;if(this.advance(),Za(this.peek)&&this.advance(),!ir(this.peek))return this.error("Invalid exponent",-1);t=!1}this.advance()}var n;const s=this.input.substring(e,this.index),r=t?function(e){const t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}(s):parseFloat(s);return new Wa(e,this.index,La.Number,r,"")}scanString(){const e=this.index,t=this.peek;this.advance();let n="",s=this.index;const r=this.input;for(;this.peek!=t;)if(92==this.peek){let e;if(n+=r.substring(s,this.index),this.advance(),this.peek=this.peek,117==this.peek){const t=r.substring(this.index+1,this.index+5);if(!/^[0-9a-f]+$/i.test(t))return this.error(`Invalid unicode escape [\\u${t}]`,0);e=parseInt(t,16);for(let e=0;e<5;e++)this.advance()}else e=Ja(this.peek),this.advance();n+=String.fromCharCode(e),s=this.index}else{if(0==this.peek)return this.error("Unterminated quote",0);this.advance()}const i=r.substring(s,this.index);return this.advance(),new Wa(e,this.index,La.String,0,n+i)}error(e,t){const n=this.index+t;return function(e,t,n){return new Wa(e,t,La.Error,0,n)}(n,this.index,`Lexer Error: ${e} at column ${n} in expression [${this.input}]`)}}function Qa(e){return 97<=e&&e<=122||65<=e&&e<=90||95==e||36==e}function Ya(e){return ar(e)||ir(e)||95==e||36==e}function Za(e){return 45==e||43==e}function Ja(e){switch(e){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return e}}class eo{constructor(e,t,n,s,r){this.strings=e,this.stringSpans=t,this.expressions=n,this.expressionsSpans=s,this.offsets=r}}class to{constructor(e,t,n){this.templateBindings=e,this.warnings=t,this.errors=n}}const no=so(Hs);function so(e){const t=en(e.start)+"([\\s\\S]*?)"+en(e.end);return new RegExp(t,"g")}class ro{constructor(e){this._lexer=e,this.errors=[],this.simpleExpressionChecker=lo}parseAction(e,t,n,s=Hs){this._checkNoInterpolation(e,t,s);const r=this._stripComments(e),i=this._lexer.tokenize(this._stripComments(e)),a=new oo(e,t,n,i,r.length,!0,this.errors,e.length-r.length).parseChain();return new Gr(a,e,t,n,this.errors)}parseBinding(e,t,n,s=Hs){const r=this._parseBindingAst(e,t,n,s);return new Gr(r,e,t,n,this.errors)}checkSimpleExpression(e){const t=new this.simpleExpressionChecker;return e.visit(t),t.errors}parseSimpleBinding(e,t,n,s=Hs){const r=this._parseBindingAst(e,t,n,s),i=this.checkSimpleExpression(r);return i.length>0&&this._reportError("Host binding expression cannot contain "+i.join(" "),e,t),new Gr(r,e,t,n,this.errors)}_reportError(e,t,n,s){this.errors.push(new Er(e,t,n,s))}_parseBindingAst(e,t,n,s){const r=this._parseQuote(e,t,n);if(null!=r)return r;this._checkNoInterpolation(e,t,s);const i=this._stripComments(e),a=this._lexer.tokenize(i);return new oo(e,t,n,a,i.length,!1,this.errors,e.length-i.length).parseChain()}_parseQuote(e,t,n){if(null==e)return null;const s=e.indexOf(":");if(-1==s)return null;const r=e.substring(0,s).trim();if(!function(e){if(0==e.length)return!1;const t=new Ga(e);if(!Qa(t.peek))return!1;for(t.advance();0!==t.peek;){if(!Ya(t.peek))return!1;t.advance()}return!0}(r))return null;const i=e.substring(s+1),a=new _r(0,e.length);return new br(a,a.toAbsolute(n),r,i,t)}parseTemplateBindings(e,t,n,s,r){const i=this._lexer.tokenize(t);return new oo(t,n,r,i,t.length,!1,this.errors,0).parseTemplateBindings({source:e,span:new Xr(s,s+e.length)})}parseInterpolation(e,t,n,s=Hs){const r=this.splitInterpolation(e,t,s);if(null==r)return null;const i=[];for(let s=0;s<r.expressions.length;++s){const a=r.expressions[s],o=this._stripComments(a),l=this._lexer.tokenize(o),c=new oo(e,t,n,l,o.length,!1,this.errors,r.offsets[s]+(a.length-o.length)).parseChain();i.push(c)}return this.createInterpolationAst(r.strings,i,e,t,n)}parseInterpolationExpression(e,t,n){const s=this._stripComments(e),r=this._lexer.tokenize(s),i=new oo(e,t,n,r,s.length,!1,this.errors,0).parseChain();return this.createInterpolationAst(["",""],[i],e,t,n)}createInterpolationAst(e,t,n,s,r){const i=new _r(0,n.length),a=new Vr(i,i.toAbsolute(r),e,t);return new Gr(a,n,s,r,this.errors)}splitInterpolation(e,t,n=Hs){const s=[],r=[],i=[],a=[],o=[];let l=0,c=!1,u=!1,{start:p,end:h}=n;for(;l<e.length;)if(c){const n=l,s=n+p.length,a=e.indexOf(h,s);if(-1===a){c=!1,u=!0;break}const d=a+h.length,m=e.substring(s,a);m.trim().length>0?r.push(m):(this._reportError("Blank expressions are not allowed in interpolated strings",e,`at column ${l} in`,t),r.push("$implicit")),i.push(s),o.push({start:n,end:d}),l=d,c=!1}else{const t=l;l=e.indexOf(p,l),-1===l&&(l=e.length);const n=e.substring(t,l);s.push(n),a.push({start:t,end:l}),c=!0}return c||(u?(s[s.length-1]+=e.substring(l),a[a.length-1].end=e.length):(s.push(e.substring(l)),a.push({start:l,end:e.length}))),0===r.length?null:new eo(s,a,r,o,i)}wrapLiteralPrimitive(e,t,n){const s=new _r(0,null==e?0:e.length);return new Gr(new Fr(s,s.toAbsolute(n),e),e,t,n,this.errors)}_stripComments(e){const t=this._commentStart(e);return null!=t?e.substring(0,t).trim():e}_commentStart(e){let t=null;for(let s=0;s<e.length-1;s++){const r=e.charCodeAt(s),i=e.charCodeAt(s+1);if(47===r&&47==i&&null==t)return s;t===r?t=null:null==t&&(39===(n=r)||34===n||96===n)&&(t=r)}var n;return null}_checkNoInterpolation(e,t,n){const s=(r=n)===Hs?no:so(r);var r;const i=e.split(s);i.length>1&&this._reportError(`Got interpolation (${n.start}${n.end}) where expression was expected`,e,`at column ${this._findInterpolationErrorColumn(i,1,n)} in`,t)}_findInterpolationErrorColumn(e,t,n){let s="";for(let r=0;r<t;r++)s+=r%2==0?e[r]:`${n.start}${e[r]}${n.end}`;return s.length}}class io extends ro{constructor(){super(...arguments),this.simpleExpressionChecker=co}}var ao;!function(e){e[e.None=0]="None",e[e.Writable=1]="Writable"}(ao||(ao={}));class oo{constructor(e,t,n,s,r,i,a,o){this.input=e,this.location=t,this.absoluteOffset=n,this.tokens=s,this.inputLength=r,this.parseAction=i,this.errors=a,this.offset=o,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=ao.None,this.sourceSpanCache=new Map,this.index=0}peek(e){const t=this.index+e;return t<this.tokens.length?this.tokens[t]:Xa}get next(){return this.peek(0)}get atEOF(){return this.index>=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){return this.index>0?this.peek(-1).end+this.offset:0===this.tokens.length?this.inputLength+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e){return new _r(e,this.currentEndIndex)}sourceSpan(e){const t=`${e}@${this.inputIndex}`;return this.sourceSpanCache.has(t)||this.sourceSpanCache.set(t,this.span(e).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(t)}advance(){this.index++}withContext(e,t){this.context|=e;const n=t();return this.context^=e,n}consumeOptionalCharacter(e){return!!this.next.isCharacter(e)&&(this.advance(),!0)}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(e){this.consumeOptionalCharacter(e)||this.error("Missing expected "+String.fromCharCode(e))}consumeOptionalOperator(e){return!!this.next.isOperator(e)&&(this.advance(),!0)}expectOperator(e){this.consumeOptionalOperator(e)||this.error("Missing expected operator "+e)}prettyPrintToken(e){return e===Xa?"end of input":"token "+e}expectIdentifierOrKeyword(){const e=this.next;return e.isIdentifier()||e.isKeyword()?(this.advance(),e.toString()):(this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),"")}expectIdentifierOrKeywordOrString(){const e=this.next;return e.isIdentifier()||e.isKeyword()||e.isString()?(this.advance(),e.toString()):(this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),"")}parseChain(){const e=[],t=this.inputIndex;for(;this.index<this.tokens.length;){const t=this.parsePipe();if(e.push(t),this.consumeOptionalCharacter(59))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.consumeOptionalCharacter(59););else this.index<this.tokens.length&&this.error(`Unexpected token '${this.next}'`)}return 0==e.length?new Ir(this.span(t),this.sourceSpan(t)):1==e.length?e[0]:new Ar(this.span(t),this.sourceSpan(t),e)}parsePipe(){let e=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{const t=this.inputIndex,n=this.expectIdentifierOrKeyword(),s=this.sourceSpan(t),r=[];for(;this.consumeOptionalCharacter(58);)r.push(this.parseExpression());const{start:i}=e.span;e=new Dr(this.span(i),this.sourceSpan(i),e,n,r,s)}while(this.consumeOptionalOperator("|"))}return e}parseExpression(){return this.parseConditional()}parseConditional(){const e=this.inputIndex,t=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){const n=this.parsePipe();let s;if(this.consumeOptionalCharacter(58))s=this.parsePipe();else{const t=this.input.substring(e,this.inputIndex);this.error(`Conditional expression ${t} requires all 3 expressions`),s=new Ir(this.span(e),this.sourceSpan(e))}return new Pr(this.span(e),this.sourceSpan(e),t,n,s)}return t}parseLogicalOr(){let e=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){const t=this.parseLogicalAnd(),{start:n}=e.span;e=new jr(this.span(n),this.sourceSpan(n),"||",e,t)}return e}parseLogicalAnd(){let e=this.parseEquality();for(;this.consumeOptionalOperator("&&");){const t=this.parseEquality(),{start:n}=e.span;e=new jr(this.span(n),this.sourceSpan(n),"&&",e,t)}return e}parseEquality(){let e=this.parseRelational();for(;this.next.type==La.Operator;){const t=this.next.strValue;switch(t){case"==":case"===":case"!=":case"!==":this.advance();const n=this.parseRelational(),{start:s}=e.span;e=new jr(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parseRelational(){let e=this.parseAdditive();for(;this.next.type==La.Operator;){const t=this.next.strValue;switch(t){case"<":case">":case"<=":case">=":this.advance();const n=this.parseAdditive(),{start:s}=e.span;e=new jr(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parseAdditive(){let e=this.parseMultiplicative();for(;this.next.type==La.Operator;){const t=this.next.strValue;switch(t){case"+":case"-":this.advance();let n=this.parseMultiplicative();const{start:s}=e.span;e=new jr(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parseMultiplicative(){let e=this.parsePrefix();for(;this.next.type==La.Operator;){const t=this.next.strValue;switch(t){case"*":case"%":case"/":this.advance();let n=this.parsePrefix();const{start:s}=e.span;e=new jr(this.span(s),this.sourceSpan(s),t,e,n);continue}break}return e}parsePrefix(){if(this.next.type==La.Operator){const e=this.inputIndex;let t;switch(this.next.strValue){case"+":return this.advance(),t=this.parsePrefix(),Ur.createPlus(this.span(e),this.sourceSpan(e),t);case"-":return this.advance(),t=this.parsePrefix(),Ur.createMinus(this.span(e),this.sourceSpan(e),t);case"!":return this.advance(),t=this.parsePrefix(),new qr(this.span(e),this.sourceSpan(e),t)}}return this.parseCallChain()}parseCallChain(){let e=this.parsePrimary();const t=e.span.start;for(;;)if(this.consumeOptionalCharacter(46))e=this.parseAccessMemberOrMethodCall(e,!1);else if(this.consumeOptionalOperator("?."))e=this.parseAccessMemberOrMethodCall(e,!0);else if(this.consumeOptionalCharacter(91))this.withContext(ao.Writable,()=>{this.rbracketsExpected++;const n=this.parsePipe();if(n instanceof Ir&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("=")){const s=this.parseConditional();e=new Rr(this.span(t),this.sourceSpan(t),e,n,s)}else e=new Lr(this.span(t),this.sourceSpan(t),e,n)});else if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const n=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(41),e=new Kr(this.span(t),this.sourceSpan(t),e,n)}else{if(!this.consumeOptionalOperator("!"))return e;e=new Hr(this.span(t),this.sourceSpan(t),e)}}parsePrimary(){const e=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const e=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),e}if(this.next.isKeywordNull())return this.advance(),new Fr(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new Fr(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new Fr(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new Fr(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new Nr(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;const t=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new Br(this.span(e),this.sourceSpan(e),t)}if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new Tr(this.span(e),this.sourceSpan(e)),!1);if(this.next.isNumber()){const t=this.next.toNumber();return this.advance(),new Fr(this.span(e),this.sourceSpan(e),t)}if(this.next.isString()){const t=this.next.toString();return this.advance(),new Fr(this.span(e),this.sourceSpan(e),t)}return this.index>=this.tokens.length?(this.error("Unexpected end of expression: "+this.input),new Ir(this.span(e),this.sourceSpan(e))):(this.error("Unexpected token "+this.next),new Ir(this.span(e),this.sourceSpan(e)))}parseExpressionList(e){const t=[];if(!this.next.isCharacter(e))do{t.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return t}parseLiteralMap(){const e=[],t=[],n=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{const n=this.next.isString(),s=this.expectIdentifierOrKeywordOrString();e.push({key:s,quoted:n}),this.expectCharacter(58),t.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));this.rbracesExpected--,this.expectCharacter(125)}return new $r(this.span(n),this.sourceSpan(n),e,t)}parseAccessMemberOrMethodCall(e,t=!1){const n=e.span.start,s=this.inputIndex,r=this.expectIdentifierOrKeyword(),i=this.sourceSpan(s);if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const s=this.parseCallArguments();this.expectCharacter(41),this.rparensExpected--;const a=this.span(n),o=this.sourceSpan(n);return t?new zr(a,o,i,e,r,s):new Wr(a,o,i,e,r,s)}if(t)return this.consumeOptionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new Ir(this.span(n),this.sourceSpan(n))):new Mr(this.span(n),this.sourceSpan(n),i,e,r);if(this.consumeOptionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new Ir(this.span(n),this.sourceSpan(n));const t=this.parseConditional();return new Or(this.span(n),this.sourceSpan(n),i,e,r,t)}return new kr(this.span(n),this.sourceSpan(n),i,e,r)}parseCallArguments(){if(this.next.isCharacter(41))return[];const e=[];do{e.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return e}expectTemplateBindingKey(){let e="",t=!1;const n=this.currentAbsoluteOffset;do{e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-")}while(t);return{source:e,span:new Xr(n,n+e.length)}}parseTemplateBindings(e){const t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index<this.tokens.length;){const n=this.parseLetBinding();if(n)t.push(n);else{const n=this.expectTemplateBindingKey(),s=this.parseAsBinding(n);s?t.push(s):(n.source=e.source+n.source[0].toUpperCase()+n.source.substring(1),t.push(...this.parseDirectiveKeywordBindings(n)))}this.consumeStatementTerminator()}return new to(t,[],this.errors)}parseDirectiveKeywordBindings(e){const t=[];this.consumeOptionalCharacter(58);const n=this.getDirectiveBoundTarget();let s=this.currentAbsoluteOffset;const r=this.parseAsBinding(e);r||(this.consumeStatementTerminator(),s=this.currentAbsoluteOffset);const i=new Xr(e.span.start,s);return t.push(new Yr(i,e,n)),r&&t.push(r),t}getDirectiveBoundTarget(){if(this.next===Xa||this.peekKeywordAs()||this.peekKeywordLet())return null;const e=this.parsePipe(),{start:t,end:n}=e.span,s=this.input.substring(t,n);return new Gr(e,s,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();const t=this.expectTemplateBindingKey();this.consumeStatementTerminator();const n=new Xr(e.span.start,this.currentAbsoluteOffset);return new Qr(n,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;const e=this.currentAbsoluteOffset;this.advance();const t=this.expectTemplateBindingKey();let n=null;this.consumeOptionalOperator("=")&&(n=this.expectTemplateBindingKey()),this.consumeStatementTerminator();const s=new Xr(e,this.currentAbsoluteOffset);return new Qr(s,t,n)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(e,t=null){this.errors.push(new Er(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(e=null){return null==e&&(e=this.index),e<this.tokens.length?`at column ${this.tokens[e].index+1} in`:"at the end of the expression"}skip(){let e=this.next;for(;this.index<this.tokens.length&&!e.isCharacter(59)&&(this.rparensExpected<=0||!e.isCharacter(41))&&(this.rbracesExpected<=0||!e.isCharacter(125))&&(this.rbracketsExpected<=0||!e.isCharacter(93))&&!(this.context&ao.Writable&&e.isOperator("="));)this.next.isError()&&this.errors.push(new Er(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next}}class lo{constructor(){this.errors=[]}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){}visitLiteralPrimitive(e,t){}visitPropertyRead(e,t){}visitPropertyWrite(e,t){}visitSafePropertyRead(e,t){}visitMethodCall(e,t){}visitSafeMethodCall(e,t){}visitFunctionCall(e,t){}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitUnary(e,t){}visitBinary(e,t){}visitPrefixNot(e,t){}visitNonNullAssert(e,t){}visitConditional(e,t){}visitPipe(e,t){this.errors.push("pipes")}visitKeyedRead(e,t){}visitKeyedWrite(e,t){}visitAll(e,t){return e.map(e=>e.visit(this,t))}visitChain(e,t){}visitQuote(e,t){}}class co extends Zr{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}}let uo;function po(){return uo||(uo={},ho(Pe.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),ho(Pe.STYLE,["*|style"]),ho(Pe.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"]),ho(Pe.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"])),uo}function ho(e,t){for(const n of t)uo[n.toLowerCase()]=e}const mo=["[Element]|textContent,%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate","abbr,address,article,aside,b,bdi,bdo,cite,code,dd,dfn,dt,em,figcaption,figure,footer,header,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,src,%srcObject,#volume",":svg:^[HTMLElement]|*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex",":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,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,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","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,referrerPolicy,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]|","slot^[HTMLElement]|name","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: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","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|"],go={class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"};class fo extends class{}{constructor(){super(),this._schema={},mo.forEach(e=>{const t={},[n,s]=e.split("|"),r=s.split(","),[i,a]=n.split("^");i.split(",").forEach(e=>this._schema[e.toLowerCase()]=t);const o=a&&this._schema[a.toLowerCase()];o&&Object.keys(o).forEach(e=>{t[e]=o[e]}),r.forEach(e=>{if(e.length>0)switch(e[0]){case"*":break;case"!":t[e.substring(1)]="boolean";break;case"#":t[e.substring(1)]="number";break;case"%":t[e.substring(1)]="object";break;default:t[e]="string"}})})}hasProperty(e,t,n){if(n.some(e=>"no-errors-schema"===e.name))return!0;if(e.indexOf("-")>-1){if(me(e)||ge(e))return!1;if(n.some(e=>"custom-elements"===e.name))return!0}return!!(this._schema[e.toLowerCase()]||this._schema.unknown)[t]}hasElement(e,t){if(t.some(e=>"no-errors-schema"===e.name))return!0;if(e.indexOf("-")>-1){if(me(e)||ge(e))return!0;if(t.some(e=>"custom-elements"===e.name))return!0}return!!this._schema[e.toLowerCase()]}securityContext(e,t,n){n&&(t=this.getMappedPropName(t)),e=e.toLowerCase(),t=t.toLowerCase();let s=po()[e+"|"+t];return s||(s=po()["*|"+t],s||Pe.NONE)}getMappedPropName(e){return go[e]||e}getDefaultComponentElementName(){return"ng-component"}validateProperty(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`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.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Object.keys(this._schema)}normalizeAnimationStyleProperty(e){return e.replace(Qt,(...e)=>e[1].toUpperCase())}normalizeAnimationStyleValue(e,t,n){let s="";const r=n.toString().trim();let i=null;if(function(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}}(e)&&0!==n&&"0"!==n)if("number"==typeof n)s="px";else{const e=n.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&(i=`Please provide a CSS unit value for ${t}:${n}`)}return{error:i,value:r+s}}}const vo=/^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/;class yo{constructor(e){this.bindingParser=e,this.errors=[],this.styles=[],this.styleUrls=[],this.ngContentSelectors=[],this.inI18nBlock=!1}visitElement(e){const t=ps(e.i18n);t&&(this.inI18nBlock&&this.reportError("Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.",e.sourceSpan),this.inI18nBlock=!0);const n=Oa(e);if(n.type===Ma.SCRIPT)return null;if(n.type===Ma.STYLE){const t=1===(s=e).children.length&&s.children[0]instanceof Hi?s.children[0].value:null;return null!==t&&this.styles.push(t),null}if(n.type===Ma.STYLESHEET&&function(e){if(null==e||0===e.length||"/"==e[0])return!1;const t=e.match(Ia);return null===t||"package"==t[1]||"asset"==t[1]}(n.hrefAttr))return this.styleUrls.push(n.hrefAttr),null;var s;const r="ng-template"===de(e.name)[1],i=[],a=[],o=[],l=[],c=[],u={},p=[],h=[];let d=!1;for(const t of e.attrs){let e=!1;const n=So(t.name);let s=!1;if(t.i18n&&(u[t.name]=t.i18n),n.startsWith("*")){d&&this.reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",t.sourceSpan),s=!0,d=!0;const e=t.value,r=n.substring("*".length),i=[];this.bindingParser.parseInlineTemplateBinding(r,e,t.sourceSpan,t.valueSpan?t.valueSpan.start.offset:t.sourceSpan.start.offset+t.name.length,[],p,i,!0),h.push(...i.map(e=>new Ln(e.name,e.value,e.sourceSpan,e.keySpan,e.valueSpan)))}else e=this.parseAttribute(r,t,[],i,a,o,l);e||s||c.push(this.visitAttribute(t))}const m=Qi(n.nonBindable?xo:this,e.children);let g;if(n.type===Ma.NG_CONTENT){e.children&&!e.children.every(e=>function(e){return e instanceof Hi&&0==e.value.trim().length}(e)||function(e){return e instanceof Gi}(e))&&this.reportError("<ng-content> element cannot have content.",e.sourceSpan);const t=n.selectAttr,s=e.attrs.map(e=>this.visitAttribute(e));g=new Mn(t,s,e.sourceSpan,e.i18n),this.ngContentSelectors.push(t)}else if(r){const t=this.extractAttributes(e.name,i,u);g=new On(e.name,c,t.bound,a,[],m,l,o,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}else{const t=this.extractAttributes(e.name,i,u);g=new kn(e.name,c,t.bound,a,m,l,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}if(d){const n=this.extractAttributes("ng-template",p,u),s=[];n.literal.forEach(e=>s.push(e)),n.bound.forEach(e=>s.push(e));const i=g instanceof kn?{attributes:g.attributes,inputs:g.inputs,outputs:g.outputs}:{attributes:[],inputs:[],outputs:[]};g=new On(g.name,i.attributes,i.inputs,i.outputs,s,[g],[],h,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,r&&t?void 0:e.i18n)}return t&&(this.inI18nBlock=!1),g}visitAttribute(e){return new Nn(e.name,e.value,e.sourceSpan,e.valueSpan,e.i18n)}visitText(e){return this._visitTextWithInterpolation(e.value,e.sourceSpan,e.i18n)}visitExpansion(e){if(!e.i18n)return null;if(!ps(e.i18n))throw new Error(`Invalid type "${e.i18n.constructor}" for "i18n" property of ${e.sourceSpan.toString()}. Expected a "Message"`);const t=e.i18n,n={},s={};return Object.keys(t.placeholders).forEach(e=>{const r=t.placeholders[e];if(e.startsWith("VAR_")){const t=e.trim(),s=this.bindingParser.parseInterpolationExpression(r.text,r.sourceSpan);n[t]=new Tn(s,r.sourceSpan)}else s[e]=this._visitTextWithInterpolation(r.text,r.sourceSpan)}),new Dn(n,s,e.sourceSpan,t)}visitExpansionCase(e){return null}visitComment(e){return null}extractAttributes(e,t,n){const s=[],r=[];return t.forEach(t=>{const i=n[t.name];if(t.isLiteral)r.push(new Nn(t.name,t.expression.source||"",t.sourceSpan,void 0,i));else{const n=this.bindingParser.createBoundElementProperty(e,t,!0,!1);s.push(An.fromBoundElementProperty(n,i))}}),{bound:s,literal:r}}parseAttribute(e,t,n,s,r,i,a){const o=So(t.name),l=t.value,c=t.sourceSpan,u=t.valueSpan?t.valueSpan.start.offset:c.start.offset;function p(e,n,s){const r=e.start.moveBy(n.length+(t.name.length-o.length)),i=r.moveBy(s.length);return new pr(r,i,r,s)}const h=o.match(vo);let d=!1;if(h){if(d=!0,null!=h[1]){const e=h[7],r=p(c,h[1],e);this.bindingParser.parsePropertyBinding(e,l,!1,c,u,t.valueSpan,n,s,r)}else if(h[2])if(e){const e=h[7],n=p(c,h[2],e);this.parseVariable(e,l,c,n,t.valueSpan,i)}else this.reportError('"let-" is only supported on ng-template elements.',c);else if(h[3])this.parseReference(h[7],l,c,t.valueSpan,a);else if(h[4]){const e=[];this.bindingParser.parseEvent(h[7],l,c,t.valueSpan||c,n,e),Eo(e,r)}else if(h[5]){const e=h[7],i=p(c,h[5],e);this.bindingParser.parsePropertyBinding(e,l,!1,c,u,t.valueSpan,n,s,i),this.parseAssignmentEvent(e,l,c,t.valueSpan,n,r)}else if(h[6]){const e=p(c,"",o);this.bindingParser.parseLiteralAttr(o,l,c,u,t.valueSpan,n,s,e)}else if(h[8]){const e=p(c,"[(",h[8]);this.bindingParser.parsePropertyBinding(h[8],l,!1,c,u,t.valueSpan,n,s,e),this.parseAssignmentEvent(h[8],l,c,t.valueSpan,n,r)}else if(h[9]){const e=p(c,"[",h[9]);this.bindingParser.parsePropertyBinding(h[9],l,!1,c,u,t.valueSpan,n,s,e)}else if(h[10]){const e=[];this.bindingParser.parseEvent(h[10],l,c,t.valueSpan||c,n,e),Eo(e,r)}}else{const e=p(c,"",o);d=this.bindingParser.parsePropertyInterpolation(o,l,c,t.valueSpan,n,s,e)}return d}_visitTextWithInterpolation(e,t,n){const s=Ca(e),r=this.bindingParser.parseInterpolation(s,t);return r?new Tn(r,t,n):new In(s,t)}parseVariable(e,t,n,s,r,i){e.indexOf("-")>-1?this.reportError('"-" is not allowed in variable names',n):0===e.length&&this.reportError("Variable does not have a name",n),i.push(new Ln(e,t,n,s,r))}parseReference(e,t,n,s,r){e.indexOf("-")>-1?this.reportError('"-" is not allowed in reference names',n):0===e.length&&this.reportError("Reference does not have a name",n),r.push(new Rn(e,t,n,s))}parseAssignmentEvent(e,t,n,s,r,i){const a=[];this.bindingParser.parseEvent(e+"Change",t+"=$event",n,s||n,r,a),Eo(a,i)}reportError(e,t,n=hr.ERROR){this.errors.push(new fr(t,e,n))}}const xo=new class{visitElement(e){const t=Oa(e);if(t.type===Ma.SCRIPT||t.type===Ma.STYLE||t.type===Ma.STYLESHEET)return null;const n=Qi(this,e.children,null);return new kn(e.name,Qi(this,e.attrs),[],[],n,[],e.sourceSpan,e.startSourceSpan,e.endSourceSpan)}visitComment(e){return null}visitAttribute(e){return new Nn(e.name,e.value,e.sourceSpan,void 0,e.i18n)}visitText(e){return new In(e.value,e.sourceSpan)}visitExpansion(e){return null}visitExpansionCase(e){return null}};function So(e){return/^data-/i.test(e)?e.substring(5):e}function Eo(e,t){t.push(...e.map(e=>Pn.fromParsedEvent(e)))}var _o;!function(e){e[e.ELEMENT=0]="ELEMENT",e[e.TEMPLATE=1]="TEMPLATE"}(_o||(_o={}));class Co{constructor(e,t,n=0,s=null,r,i){this.index=e,this.ref=t,this.level=n,this.templateIndex=s,this.meta=r,this.registry=i,this.bindings=new Set,this.placeholders=new Map,this.isEmitted=!1,this._unresolvedCtxCount=0,this._registry=i||{getUniqueId:fs(),icus:new Map},this.id=this._registry.getUniqueId()}appendTag(e,t,n,s){t.isVoid&&s||ys(this.placeholders,t.isVoid||!s?t.startName:t.closeName,{type:e,index:n,ctx:this.id,isVoid:t.isVoid,closed:s})}get icus(){return this._registry.icus}get isRoot(){return 0===this.level}get isResolved(){return 0===this._unresolvedCtxCount}getSerializedPlaceholders(){const e=new Map;return this.placeholders.forEach((t,n)=>e.set(n,t.map(To))),e}appendBinding(e){this.bindings.add(e)}appendIcu(e,t){ys(this._registry.icus,e,t)}appendBoundText(e){xs(e,this.bindings.size,this.id).forEach((e,t)=>ys(this.placeholders,t,...e))}appendTemplate(e,t){this.appendTag(_o.TEMPLATE,e,t,!1),this.appendTag(_o.TEMPLATE,e,t,!0),this._unresolvedCtxCount++}appendElement(e,t,n){this.appendTag(_o.ELEMENT,e,t,n)}appendProjection(e,t){this.appendTag(_o.ELEMENT,e,t,!1),this.appendTag(_o.ELEMENT,e,t,!0)}forkChildContext(e,t,n){return new Co(e,this.ref,this.level+1,t,n,this._registry)}reconcileChildContext(e){["start","close"].forEach(t=>{const n=(this.placeholders.get(e.meta[t+"Name"])||[]).find(Io(this.id,e.templateIndex));n&&(n.ctx=e.id)}),e.placeholders.forEach((t,n)=>{const s=this.placeholders.get(n);if(!s)return void this.placeholders.set(n,t);const r=s.findIndex(Io(e.id,e.templateIndex));if(r>=0){const e=n.startsWith("CLOSE");n.endsWith("NG-TEMPLATE")?s.splice(r+(e?0:1),0,...t):(t[e?t.length-1:0].tmpl=s[r],s.splice(r,1,...t))}else s.push(...t);this.placeholders.set(n,s)}),this._unresolvedCtxCount--}}function wo(e,t,n,s){return gs(`${s?"/":""}${e}${t}`,n)}function bo(e,{index:t,ctx:n,isVoid:s},r){return s?wo(e,t,n)+wo(e,t,n,!0):wo(e,t,n,r)}function Io(e,t){return n=>"object"==typeof n&&n.type===_o.TEMPLATE&&n.index===t&&n.ctx===e}function To(e){const t=(e,t)=>bo("#",e,t),n=(e,t)=>bo("*",e,t);switch(e.type){case _o.ELEMENT:return e.closed?t(e,!0)+(e.tmpl?n(e.tmpl,!0):""):e.tmpl?n(e.tmpl)+t(e)+(e.isVoid?n(e.tmpl,!0):""):t(e);case _o.TEMPLATE:return n(e,e.closed);default:return e}}const No=new class{visitText(e){return e.value}visitContainer(e){return e.children.map(e=>e.visit(this)).join("")}visitIcu(e){const t=Object.keys(e.cases).map(t=>`${t} {${e.cases[t].visit(this)}}`);return`{${e.expressionPlaceholder}, ${e.type}, ${t.join(" ")}}`}visitTagPlaceholder(e){return e.isVoid?this.formatPh(e.startName):`${this.formatPh(e.startName)}${e.children.map(e=>e.visit(this)).join("")}${this.formatPh(e.closeName)}`}visitPlaceholder(e){return this.formatPh(e.name)}visitIcuPlaceholder(e,t){return this.formatPh(e.name)}formatPh(e){return`{${Es(e,!1)}}`}};function Ao(e){return e.visit(No)}const Po={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"};class ko{constructor(){this._placeHolderNameCounts={},this._signatureToName={}}getStartTagPlaceholderName(e,t,n){const s=this._hashTag(e,t,n);if(this._signatureToName[s])return this._signatureToName[s];const r=e.toUpperCase(),i=Po[r]||"TAG_"+r,a=this._generateUniqueName(n?i:"START_"+i);return this._signatureToName[s]=a,a}getCloseTagPlaceholderName(e){const t=this._hashClosingTag(e);if(this._signatureToName[t])return this._signatureToName[t];const n=e.toUpperCase(),s=this._generateUniqueName("CLOSE_"+(Po[n]||"TAG_"+n));return this._signatureToName[t]=s,s}getPlaceholderName(e,t){const n=e.toUpperCase(),s=`PH: ${n}=${t}`;if(this._signatureToName[s])return this._signatureToName[s];const r=this._generateUniqueName(n);return this._signatureToName[s]=r,r}getUniquePlaceholder(e){return this._generateUniqueName(e.toUpperCase())}_hashTag(e,t,n){return"<"+e+Object.keys(t).sort().map(e=>` ${e}=${t[e]}`).join("")+(n?"/>":`></${e}>`)}_hashClosingTag(e){return this._hashTag("/"+e,{},!1)}_generateUniqueName(e){if(!this._placeHolderNameCounts.hasOwnProperty(e))return this._placeHolderNameCounts[e]=1,e;const t=this._placeHolderNameCounts[e];return this._placeHolderNameCounts[e]=t+1,`${e}_${t}`}}const Oo=new ro(new Ha);function Mo(e,t){return t}class Lo{constructor(e,t){this._expressionParser=e,this._interpolationConfig=t}toI18nMessage(e,t="",n="",s="",r){const i={isIcu:1==e.length&&e[0]instanceof Wi,icuDepth:0,placeholderRegistry:new ko,placeholderToContent:{},placeholderToMessage:{},visitNodeFn:r||Mo},a=Qi(this,e,i);return new Bn(a,i.placeholderToContent,i.placeholderToMessage,t,n,s)}visitElement(e,t){var n;const s=Qi(this,e.children,t),r={};e.attrs.forEach(e=>{r[e.name]=e.value});const i=_e(e.name).isVoid,a=t.placeholderRegistry.getStartTagPlaceholderName(e.name,r,i);t.placeholderToContent[a]={text:e.startSourceSpan.toString(),sourceSpan:e.startSourceSpan};let o="";i||(o=t.placeholderRegistry.getCloseTagPlaceholderName(e.name),t.placeholderToContent[o]={text:`</${e.name}>`,sourceSpan:null!==(n=e.endSourceSpan)&&void 0!==n?n:e.sourceSpan});const l=new Un(e.name,r,a,o,s,i,e.sourceSpan,e.startSourceSpan,e.endSourceSpan);return t.visitNodeFn(e,l)}visitAttribute(e,t){const n=this._visitTextWithInterpolation(e.value,e.sourceSpan,t);return t.visitNodeFn(e,n)}visitText(e,t){const n=this._visitTextWithInterpolation(e.value,e.sourceSpan,t);return t.visitNodeFn(e,n)}visitComment(e,t){return null}visitExpansion(e,t){t.icuDepth++;const n={},s=new jn(e.switchValue,e.type,n,e.sourceSpan);if(e.cases.forEach(e=>{n[e.value]=new Vn(e.expression.map(e=>e.visit(this,t)),e.expSourceSpan)}),t.icuDepth--,t.isIcu||t.icuDepth>0){const n=t.placeholderRegistry.getUniquePlaceholder("VAR_"+e.type);return s.expressionPlaceholder=n,t.placeholderToContent[n]={text:e.switchValue,sourceSpan:e.switchValueSourceSpan},t.visitNodeFn(e,s)}const r=t.placeholderRegistry.getPlaceholderName("ICU",e.sourceSpan.toString());t.placeholderToMessage[r]=this.toI18nMessage([e],"","","",void 0);const i=new Hn(s,r,e.sourceSpan);return t.visitNodeFn(e,i)}visitExpansionCase(e,t){throw new Error("Unreachable code")}_visitTextWithInterpolation(e,t,n){const s=this._expressionParser.splitInterpolation(e,t.start.toString(),this._interpolationConfig);if(!s)return new $n(e,t);const r=[],i=new Vn(r,t),{start:a,end:o}=this._interpolationConfig;for(let e=0;e<s.strings.length-1;e++){const i=s.expressions[e],l=i.split(Do)[2]||"INTERPOLATION",c=n.placeholderRegistry.getPlaceholderName(l,i);if(s.strings[e].length){const n=Ro(t,s.stringSpans[e]);r.push(new $n(s.strings[e],n))}const u=Ro(t,s.expressionsSpans[e]);r.push(new qn(i,c,u)),n.placeholderToContent[c]={text:a+i+o,sourceSpan:u}}const l=s.strings.length-1;if(s.strings[l].length){const e=Ro(t,s.stringSpans[l]);r.push(new $n(s.strings[l],e))}return i}}function Ro(e,{start:t,end:n}){return new pr(e.fullStart.moveBy(t),e.fullStart.moveBy(n))}const Do=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g,Fo=(e,t)=>(e instanceof qi&&(t instanceof Hn&&e.i18n instanceof Bn&&(t.previousMessage=e.i18n),e.i18n=t),t);class Bo{constructor(e=Hs,t=!1,n=!1){this.interpolationConfig=e,this.keepI18nAttrs=t,this.enableI18nLegacyMessageIdFormat=n,this.hasI18nMeta=!1,this._createI18nMessage=function(e){const t=new Lo(Oo,e);return(e,n,s,r,i)=>t.toI18nMessage(e,n,s,r,i)}(this.interpolationConfig)}_generateI18nMessage(e,t="",n){const{meaning:s,description:r,customId:i}=this._parseMetadata(t),a=this._createI18nMessage(e,s,r,i,n);return this._setMessageId(a,t),this._setLegacyIds(a,t),a}visitElement(e){if(function(e){return e.attrs.some(e=>us(e.name))}(e)){this.hasI18nMeta=!0;const t=[],n={};for(const s of e.attrs)if("i18n"===s.name){const t=this._generateI18nMessage(e.children,e.i18n||s.value,Fo);t.nodes.length&&(e.i18n=t)}else s.name.startsWith("i18n-")?n[s.name.slice("i18n-".length)]=s.value:t.push(s);if(Object.keys(n).length)for(const e of t){const t=n[e.name];void 0!==t&&e.value&&(e.i18n=this._generateI18nMessage([e],e.i18n||t))}this.keepI18nAttrs||(e.attrs=t)}return Qi(this,e.children,e.i18n),e}visitExpansion(e,t){let n;const s=e.i18n;if(this.hasI18nMeta=!0,s instanceof Hn){const t=s.name;n=this._generateI18nMessage([e],s),ms(n).name=t}else n=this._generateI18nMessage([e],t||s);return e.i18n=n,e}visitText(e){return e}visitAttribute(e){return e}visitComment(e){return e}visitExpansionCase(e){return e}_parseMetadata(e){return"string"==typeof e?function(e=""){let t,n,s;if(e=e.trim()){const r=e.indexOf("@@"),i=e.indexOf("|");let a;[a,t]=r>-1?[e.slice(0,r),e.slice(r+2)]:[e,""],[n,s]=i>-1?[a.slice(0,i),a.slice(i+1)]:["",a]}return{customId:t,meaning:n,description:s}}(e):e instanceof Bn?e:{}}_setMessageId(e,t){e.id||(e.id=t instanceof Bn&&t.id||function(e){return e.id||zn(e)}(e))}_setLegacyIds(e,t){if(this.enableI18nLegacyMessageIdFormat)e.legacyIds=[Wn(e),zn(e)];else if("string"!=typeof t){const n=t instanceof Bn?t:t instanceof Hn?t.previousMessage:void 0;e.legacyIds=n?n.legacyIds:[]}}}function $o(e,t,n,s){const r=[Kt(function(e){return e.nodes.map(e=>e.visit(Vo,null)).join("")}(t))];Object.keys(s).length&&r.push(yr(s,!0));const i=n.set($t("goog.getMsg").callFn(r)).toConstDecl(),a=function(e){const t=[];return e.description&&t.push({tagName:"desc",text:e.description}),e.meaning&&t.push({tagName:"meaning",text:e.meaning}),0==t.length?null:function(e=[]){return new Ot(e)}(t)}(t);return null!==a&&i.addLeadingComment(a),[i,new Dt(e.set(n))]}const Vo=new class{formatPh(e){return`{$${Es(e)}}`}visitText(e){return e.value}visitContainer(e){return e.children.map(e=>e.visit(this)).join("")}visitIcu(e){return Ao(e)}visitTagPlaceholder(e){return e.isVoid?this.formatPh(e.startName):`${this.formatPh(e.startName)}${e.children.map(e=>e.visit(this)).join("")}${this.formatPh(e.closeName)}`}visitPlaceholder(e){return this.formatPh(e.name)}visitIcuPlaceholder(e,t){return this.formatPh(e.name)}};function jo(e,t,n){const{messageParts:s,placeHolders:r}=function(e){const t=[];return e.nodes.forEach(e=>e.visit(Uo,t)),function(e){const t=[],n=[];e[0]instanceof ct&&t.push(qo(e[0].sourceSpan.start));for(let s=0;s<e.length;s++){const r=e[s];r instanceof lt?t.push(r):(n.push(r),e[s-1]instanceof ct&&t.push(qo(e[s-1].sourceSpan.end)))}return e[e.length-1]instanceof ct&&t.push(qo(e[e.length-1].sourceSpan.end)),{messageParts:t,placeHolders:n}}(t)}(t),i=function(e){const t=e.nodes[0];return new pr(t.sourceSpan.start,e.nodes[e.nodes.length-1].sourceSpan.end,t.sourceSpan.fullStart,t.sourceSpan.details)}(t),a=r.map(e=>n[e.text]),o=function(e,t,n,s,r){return new ut(e,t,n,s,r)}(t,s,r,a,i),l=e.set(o);return[new Dt(l)]}const Uo=new class{visitText(e,t){t[t.length-1]instanceof lt?t[t.length-1].text+=e.value:t.push(new lt(e.value,e.sourceSpan))}visitContainer(e,t){e.children.forEach(e=>e.visit(this,t))}visitIcu(e,t){t.push(new lt(Ao(e),e.sourceSpan))}visitTagPlaceholder(e,t){var n,s;t.push(this.createPlaceholderPiece(e.startName,null!==(n=e.startSourceSpan)&&void 0!==n?n:e.sourceSpan)),e.isVoid||(e.children.forEach(e=>e.visit(this,t)),t.push(this.createPlaceholderPiece(e.closeName,null!==(s=e.endSourceSpan)&&void 0!==s?s:e.sourceSpan)))}visitPlaceholder(e,t){t.push(this.createPlaceholderPiece(e.name,e.sourceSpan))}visitIcuPlaceholder(e,t){t.push(this.createPlaceholderPiece(e.name,e.sourceSpan))}createPlaceholderPiece(e,t){return new ct(Es(e,!1),t)}};function qo(e){return new lt("",new pr(e,e))}const Ho=new Set(["$event"]),Wo=new Map([["window",En.resolveWindow],["document",En.resolveDocument],["body",En.resolveBody]]),zo=[" ","\n","\r","\t"];function Ko(e,t){return zt($t("rf").bitwiseAnd(Kt(e),null,!1),t)}function Xo(e,t=null,n=null){const{type:s,name:r,target:i,phase:a,handler:o}=e;if(i&&!Wo.has(i))throw new Error(`Unexpected global target '${i}' defined for '${r}' event.\n Supported list of global targets: ${Array.from(Wo.keys())}.`);const l=new Set,c=null===n||0===n.bindingLevel?$t("ctx"):n.getOrCreateSharedContextVar(0),u=function(e,t,n,s,r,i,a,o){e||(e=new mi(Ho));const l=function(e,t){const n=new hi(e);return t.visit(n)}({createLiteralArrayConverter:e=>e=>qt(e),createLiteralMapConverter:e=>t=>Ht(e.map((e,n)=>({key:e.key,value:t[n],quoted:e.quoted}))),createPipeConverter:e=>{throw new Error("Illegal State: Actions are not allowed to contain pipes. Pipe: "+e)}},n),c=new di(e,t,"b",()=>Jt("Unexpected interpolation"),i,a),u=[];!function e(t,n){Array.isArray(t)?t.forEach(t=>e(t,n)):n.push(t)}(l.visit(c,gr.Statement),u),function(e,t,n){for(let t=e-1;t>=0;t--)n.unshift(ci("b",t))}(c.temporaryCount,0,u),c.usesImplicitReceiver&&e.notifyImplicitReceiverUse();const p=u.length-1;let h=null;if(p>=0){const e=(d=u[p])instanceof Dt?d.expr:d instanceof Ft?d.value:null;e&&(h=$t("pd_b"),u[p]=h.set(e.cast($e).notIdentical(Kt(!1))).toDeclStmt(null,[kt.Final]))}var d;return new ri(u,h)}(n,c,o,0,0,e.handlerSpan,l),p=[];n&&(p.push(...n.restoreViewStatement()),p.push(...n.variableDeclarations())),p.push(...u.render3Stmts);const h=1===s?function(e,t){return`@${e}.${t}`}(r,a):r,d=t&&vn(t),m=[];l.has("$event")&&m.push(new St("$event",$e));const g=Wt(m,p,Ve,null,d),f=[Kt(h),g];return i&&f.push(Kt(!1),Vt(Wo.get(i))),f}class Go{constructor(e,t,n=0,s,r,i,a,o,l,c,u,p,h,d,m={prepareStatements:[],constExpressions:[]}){this.constantPool=e,this.level=n,this.contextName=s,this.i18nContext=r,this.templateIndex=i,this.templateName=a,this.directiveMatcher=o,this.directives=l,this.pipeTypeByName=c,this.pipes=u,this._namespace=p,this.i18nUseExternalIds=d,this._constants=m,this._dataIndex=0,this._bindingContext=0,this._prefixCode=[],this._creationCodeFns=[],this._updateCodeFns=[],this._currentIndex=0,this._tempVariables=[],this._nestedTemplateFns=[],this._unsupported=Is,this.i18n=null,this._pureFunctionSlots=0,this._bindingSlots=0,this._ngContentReservedSlots=[],this._ngContentSelectorsOffset=0,this._implicitReceiverExpr=null,this.visitReference=Ts,this.visitVariable=Ts,this.visitTextAttribute=Ts,this.visitBoundAttribute=Ts,this.visitBoundEvent=Ts,this._bindingScope=t.nestedScope(n),this.fileBasedI18nSuffix=h.replace(/[^A-Za-z0-9]/g,"_")+"_",this._valueConverter=new Qo(e,()=>this.allocateDataSlot(),e=>this.allocatePureFunctionSlots(e),(e,t,n,s)=>{const r=c.get(e);r&&this.pipes.add(r),this._bindingScope.set(this.level,t,s),this.creationInstruction(null,En.pipe,[Kt(n),Kt(e)])})}buildTemplateFunction(e,t,n=0,s){this._ngContentSelectorsOffset=n,this._namespace!==En.namespaceHTML&&this.creationInstruction(null,this._namespace),t.forEach(e=>this.registerContextVariables(e));const r=this.i18nContext||ps(s)&&!hs(s)&&!(1===(i=e).length&&i[0]instanceof kn&&e[0].i18n===s);var i;const a=ul(e);if(r&&this.i18nStart(null,s,a),Fn(this,e),this._pureFunctionSlots+=this._bindingSlots,this._valueConverter.updatePipeSlotOffsets(this._bindingSlots),this._nestedTemplateFns.forEach(e=>e()),0===this.level&&this._ngContentReservedSlots.length){const e=[];if(this._ngContentReservedSlots.length>1||"*"!==this._ngContentReservedSlots[0]){const t=this._ngContentReservedSlots.map(e=>"*"!==e?Re(e):e);e.push(this.constantPool.getConstLiteral(Ns(t),!0))}this.creationInstruction(null,En.projectionDef,e,!0)}r&&this.i18nEnd(null,a);const o=this._creationCodeFns.map(e=>e()),l=this._updateCodeFns.map(e=>e()),c=this._bindingScope.viewSnapshotStatements(),u=this._bindingScope.variableDeclarations().concat(this._tempVariables),p=o.length>0?[Ko(1,c.concat(o))]:[],h=l.length>0?[Ko(2,u.concat(l))]:[];return Wt([new St("rf",Ue),new St("ctx",null)],[...this._prefixCode,...p,...h],Ve,null,this.templateName)}getLocal(e){return this._bindingScope.get(e)}notifyImplicitReceiverUse(){this._bindingScope.notifyImplicitReceiverUse()}i18nTranslate(e,t={},n,s){const r=n||this.i18nGenerateMainBlockVar(),i=function(e,t,n,s={},r){const i=[Cs(t),zt(pl(),$o(t,e,n,Ss(s,!0)),jo(t,e,Ss(s,!1)))];return r&&i.push(new Dt(t.set(r(t)))),i}(e,r,this.i18nGenerateClosureVar(e.id),t,s);return this._constants.prepareStatements.push(...i),r}registerContextVariables(e){const t=this._bindingScope.freshReferenceName(),n=this.level,s=$t(e.name+t);this._bindingScope.set(n,e.name,s,1,(t,r)=>{let i;return i=t.bindingLevel===n?$t("ctx"):t.getSharedContextName(n)||el(r),[s.set(i.prop(e.value||"$implicit")).toConstDecl()]})}i18nAppendBindings(e){e.length>0&&e.forEach(e=>this.i18n.appendBinding(e))}i18nBindProps(e){const t={};return Object.keys(e).forEach(n=>{const s=e[n];if(s instanceof In)t[n]=Kt(s.value);else{const e=s.value.visit(this._valueConverter);if(this.allocateBindingSlots(e),e instanceof Vr){const{strings:s,expressions:r}=e,{id:i,bindings:a}=this.i18n,o=function(e,t=0,n=0){if(!e.length)return"";let s="";const r=e.length-1;for(let i=0;i<r;i++)s+=`${e[i]}${gs(t+i,n)}`;return s+=e[r],s}(s,a.size,i);this.i18nAppendBindings(r),t[n]=Kt(o)}}}),t}i18nGenerateMainBlockVar(){return $t(this.constantPool.uniqueName("i18n_"))}i18nGenerateClosureVar(e){let t;const n=this.fileBasedI18nSuffix.toUpperCase();if(this.i18nUseExternalIds){const s=_s("EXTERNAL_"),r=this.constantPool.uniqueName(n);t=`${s}${vn(e)}$$${r}`}else{const e=_s(n);t=this.constantPool.uniqueName(e)}return $t(t)}i18nUpdateRef(e){const{icus:t,meta:n,isRoot:s,isResolved:r,isEmitted:i}=e;if(s&&r&&!i&&!hs(n)){e.isEmitted=!0;const s=e.getSerializedPlaceholders();let r,i={},a=s.size?vs(s):{};t.size&&t.forEach((e,t)=>{if(1===e.length)a[t]=e[0];else{const n=gs("I18N_EXP_"+t);a[t]=Kt(n),i[t]=qt(e)}}),(Array.from(s.values()).some(e=>e.length>1)||Object.keys(i).length)&&(r=e=>{const t=[e];return Object.keys(i).length&&t.push(yr(i,!0)),Jo(null,En.i18nPostprocess,t)}),this.i18nTranslate(n,a,e.ref,r)}}i18nStart(e=null,t,n){const s=this.allocateDataSlot();this.i18n=this.i18nContext?this.i18nContext.forkChildContext(s,this.templateIndex,t):new Co(s,this.i18nGenerateMainBlockVar(),0,this.templateIndex,t);const{id:r,ref:i}=this.i18n,a=[Kt(s),this.addToConsts(i)];r>0&&a.push(Kt(r)),this.creationInstruction(e,n?En.i18n:En.i18nStart,a)}i18nEnd(e=null,t){if(!this.i18n)throw new Error("i18nEnd is executed with no i18n context present");this.i18nContext?(this.i18nContext.reconcileChildContext(this.i18n),this.i18nUpdateRef(this.i18nContext)):this.i18nUpdateRef(this.i18n);const{index:n,bindings:s}=this.i18n;if(s.size){const t=[];s.forEach(n=>{t.push({sourceSpan:e,value:()=>this.convertPropertyBinding(n)})}),this.updateInstructionChainWithAdvance(this.getConstCount()-1,En.i18nExp,t),this.updateInstruction(e,En.i18nApply,[Kt(n)])}t||this.creationInstruction(e,En.i18nEnd),this.i18n=null}i18nAttributesInstruction(e,t,n){let s=!1;const r=[],i=[];if(t.forEach(e=>{const t=e.i18n,a=e.value.visit(this._valueConverter);if(this.allocateBindingSlots(a),a instanceof Vr){const o=vs(xs(t));r.push(Kt(e.name),this.i18nTranslate(t,o)),a.expressions.forEach(e=>{s=!0,i.push({sourceSpan:n,value:()=>this.convertPropertyBinding(e)})})}}),i.length>0&&this.updateInstructionChainWithAdvance(e,En.i18nExp,i),r.length>0){const e=Kt(this.allocateDataSlot()),t=this.addToConsts(qt(r));this.creationInstruction(n,En.i18nAttributes,[e,t]),s&&this.updateInstruction(n,En.i18nApply,[e])}}getNamespaceInstruction(e){switch(e){case"math":return En.namespaceMathML;case"svg":return En.namespaceSVG;default:return En.namespaceHTML}}addNamespaceInstruction(e,t){this._namespace=e,this.creationInstruction(t.startSourceSpan,e)}interpolatedUpdateInstruction(e,t,n,s,r,i){this.updateInstructionWithAdvance(t,s.sourceSpan,e,()=>[Kt(n),...this.getUpdateInstructionArguments(r),...i])}visitContent(e){const t=this.allocateDataSlot(),n=this._ngContentSelectorsOffset+this._ngContentReservedSlots.length,s=[Kt(t)];this._ngContentReservedSlots.push(e.selector);const r=e.attributes.filter(e=>"select"!==e.name.toLowerCase()),i=this.getAttributeExpressions(e.name,r,[],[]);i.length>0?s.push(Kt(n),qt(i)):0!==n&&s.push(Kt(n)),this.creationInstruction(e.sourceSpan,En.projection,s),this.i18n&&this.i18n.appendProjection(e.i18n,t)}visitElement(e){var t,n;const s=this.allocateDataSlot(),r=new $a(null);let i=!1;const a=ps(e.i18n)&&!hs(e.i18n),o=[],[l,c]=de(e.name),u=me(e.name);for(const t of e.attributes){const{name:e,value:n}=t;"ngNonBindable"===e?i=!0:"style"===e?r.registerStyleAttr(n):"class"===e?r.registerClassAttr(n):o.push(t)}this.matchDirectives(e.name,e);const p=[Kt(s)];u||p.push(Kt(c));const h=[],d=[];e.inputs.forEach(e=>{r.registerBoundInput(e)||(0===e.type&&e.i18n?d.push(e):h.push(e))});const m=this.getAttributeExpressions(e.name,o,h,e.outputs,r,[],d);p.push(this.addAttrsToConsts(m));const g=this.prepareRefsArray(e.references);p.push(this.addToConsts(g));const f=this._namespace,v=this.getNamespaceInstruction(l);v!==f&&this.addNamespaceInstruction(v,e),this.i18n&&this.i18n.appendElement(e.i18n,s);const y=!a&&this.i18n?!ul(e.children):e.children.length>0,x=!r.hasBindingsWithPipes&&0===e.outputs.length&&0===d.length&&!y,S=!x&&ul(e.children);if(x)this.creationInstruction(e.sourceSpan,u?En.elementContainer:En.element,Ps(p));else{if(this.creationInstruction(e.startSourceSpan,u?En.elementContainerStart:En.elementStart,Ps(p)),i&&this.creationInstruction(e.startSourceSpan,En.disableBindings),d.length>0&&this.i18nAttributesInstruction(s,d,null!==(t=e.startSourceSpan)&&void 0!==t?t:e.sourceSpan),e.outputs.length>0){const t=e.outputs.map(t=>({sourceSpan:t.sourceSpan,params:this.prepareListenerParameter(e.name,t,s)}));this.creationInstructionChain(En.listener,t)}a&&this.i18nStart(e.startSourceSpan,e.i18n,S)}const E=r.buildUpdateLevelInstructions(this._valueConverter),_=E.length-1;for(let e=0;e<=_;e++)this._bindingSlots+=this.processStylingUpdateInstruction(s,E[e]);const C=Kt(void 0),w=[],b=[];if(h.forEach(e=>{const t=e.type;if(4===t){const t=e.value.visit(this._valueConverter),n=!(t instanceof Fr&&!t.value);this.allocateBindingSlots(t),w.push({name:wn(e.name),sourceSpan:e.sourceSpan,value:()=>n?this.convertPropertyBinding(t):C})}else{if(e.i18n)return;const n=e.value.visit(this._valueConverter);if(void 0!==n){const r=[],[i,a]=de(e.name),o=ol(e.securityContext,1===t);if(o&&r.push(o),i){const e=Kt(i);o?r.push(e):r.push(Kt(null),e)}if(this.allocateBindingSlots(n),0===t)n instanceof Vr?this.interpolatedUpdateInstruction(rl(n),s,a,e,n,r):w.push({name:a,sourceSpan:e.sourceSpan,value:()=>this.convertPropertyBinding(n),params:r});else if(1===t)if(n instanceof Vr&&Ls(n)>1)this.interpolatedUpdateInstruction(function(e){switch(Ls(e)){case 3:return En.attributeInterpolate1;case 5:return En.attributeInterpolate2;case 7:return En.attributeInterpolate3;case 9:return En.attributeInterpolate4;case 11:return En.attributeInterpolate5;case 13:return En.attributeInterpolate6;case 15:return En.attributeInterpolate7;case 17:return En.attributeInterpolate8;default:return En.attributeInterpolateV}}(n),s,a,e,n,r);else{const t=n instanceof Vr?n.expressions[0]:n;b.push({name:a,sourceSpan:e.sourceSpan,value:()=>this.convertPropertyBinding(t),params:r})}else this.updateInstructionWithAdvance(s,e.sourceSpan,En.classProp,()=>[Kt(s),Kt(a),this.convertPropertyBinding(n),...r])}}}),w.length>0&&this.updateInstructionChainWithAdvance(s,En.property,w),b.length>0&&this.updateInstructionChainWithAdvance(s,En.attribute,b),Fn(this,e.children),!a&&this.i18n&&this.i18n.appendElement(e.i18n,s,!0),!x){const t=null!==(n=e.endSourceSpan)&&void 0!==n?n:e.sourceSpan;a&&this.i18nEnd(t,S),i&&this.creationInstruction(t,En.enableBindings),this.creationInstruction(t,u?En.elementContainerEnd:En.elementEnd)}}visitTemplate(e){var t;const n=this.allocateDataSlot();this.i18n&&this.i18n.appendTemplate(e.i18n,n);const s=vn(e.tagName||""),r=`${this.contextName}${s?"_"+s:""}_${n}`,i=r+"_Template",a=[Kt(n),$t(i),Kt(e.tagName?de(e.tagName)[1]:e.tagName)];this.matchDirectives("ng-template",e);const o=this.getAttributeExpressions("ng-template",e.attributes,e.inputs,e.outputs,void 0,e.templateAttrs);if(a.push(this.addAttrsToConsts(o)),e.references&&e.references.length){const t=this.prepareRefsArray(e.references);a.push(this.addToConsts(t)),a.push(Vt(En.templateRefExtractor))}const l=new Go(this.constantPool,this._bindingScope,this.level+1,r,this.i18n,n,i,this.directiveMatcher,this.directives,this.pipeTypeByName,this.pipes,this._namespace,this.fileBasedI18nSuffix,this.i18nUseExternalIds,this._constants);if(this._nestedTemplateFns.push(()=>{const t=l.buildTemplateFunction(e.children,e.variables,this._ngContentReservedSlots.length+this._ngContentSelectorsOffset,e.i18n);this.constantPool.statements.push(t.toDeclStmt(i)),l._ngContentReservedSlots.length&&this._ngContentReservedSlots.push(...l._ngContentReservedSlots)}),this.creationInstruction(e.sourceSpan,En.templateCreate,()=>(a.splice(2,0,Kt(l.getConstCount()),Kt(l.getVarCount())),Ps(a))),this.templatePropertyBindings(n,e.templateAttrs),"ng-template"===e.tagName){const[s,r]=function(e,t){const n=[],s=[];for(const r of e)(t(r)?n:s).push(r);return[n,s]}(e.inputs,ds);if(s.length>0&&this.i18nAttributesInstruction(n,s,null!==(t=e.startSourceSpan)&&void 0!==t?t:e.sourceSpan),r.length>0&&this.templatePropertyBindings(n,r),e.outputs.length>0){const t=e.outputs.map(e=>({sourceSpan:e.sourceSpan,params:this.prepareListenerParameter("ng_template",e,n)}));this.creationInstructionChain(En.listener,t)}}}visitBoundText(e){if(this.i18n){const t=e.value.visit(this._valueConverter);return this.allocateBindingSlots(t),void(t instanceof Vr&&(this.i18n.appendBoundText(e.i18n),this.i18nAppendBindings(t.expressions)))}const t=this.allocateDataSlot();this.creationInstruction(e.sourceSpan,En.text,[Kt(t)]);const n=e.value.visit(this._valueConverter);this.allocateBindingSlots(n),n instanceof Vr?this.updateInstructionWithAdvance(t,e.sourceSpan,function(e){switch(Ls(e)){case 1:return En.textInterpolate;case 3:return En.textInterpolate1;case 5:return En.textInterpolate2;case 7:return En.textInterpolate3;case 9:return En.textInterpolate4;case 11:return En.textInterpolate5;case 13:return En.textInterpolate6;case 15:return En.textInterpolate7;case 17:return En.textInterpolate8;default:return En.textInterpolateV}}(n),()=>this.getUpdateInstructionArguments(n)):Jt("Text nodes should be interpolated and never bound directly.")}visitText(e){this.i18n||this.creationInstruction(e.sourceSpan,En.text,[Kt(this.allocateDataSlot()),Kt(e.value)])}visitIcu(e){let t=!1;this.i18n||(t=!0,this.i18nStart(null,e.i18n,!0));const n=this.i18n,s=this.i18nBindProps(e.vars),r=this.i18nBindProps(e.placeholders),i=e.i18n,a=e=>{const t=Ss(Object.assign(Object.assign({},s),r),!1);return Jo(null,En.i18nPostprocess,[e,yr(t,!0)])};if(hs(n.meta))this.i18nTranslate(i,{},n.ref,a);else{const e=this.i18nTranslate(i,{},void 0,a);n.appendIcu(ms(i).name,e)}return t&&this.i18nEnd(null,!0),null}allocateDataSlot(){return this._dataIndex++}getConstCount(){return this._dataIndex}getVarCount(){return this._pureFunctionSlots}getConsts(){return this._constants}getNgContentSelectors(){return this._ngContentReservedSlots.length?this.constantPool.getConstLiteral(Ns(this._ngContentReservedSlots),!0):null}bindingContext(){return""+this._bindingContext++}templatePropertyBindings(e,t){const n=[];t.forEach(t=>{if(t instanceof An){const s=t.value.visit(this._valueConverter);if(void 0!==s)if(this.allocateBindingSlots(s),s instanceof Vr){const n=[];this.interpolatedUpdateInstruction(rl(s),e,t.name,t,s,n)}else n.push({name:t.name,sourceSpan:t.sourceSpan,value:()=>this.convertPropertyBinding(s)})}}),n.length>0&&this.updateInstructionChainWithAdvance(e,En.property,n)}instructionFn(e,t,n,s,r=!1){e[r?"unshift":"push"](()=>{const e=Array.isArray(s)?s:s();return Jo(t,n,e).toStmt()})}processStylingUpdateInstruction(e,t){let n=0;if(t){const s=[];t.calls.forEach(e=>{n+=e.allocateBindingSlots,s.push({sourceSpan:e.sourceSpan,value:()=>e.params(t=>e.supportsInterpolation&&t instanceof Vr?this.getUpdateInstructionArguments(t):this.convertPropertyBinding(t))})}),this.updateInstructionChainWithAdvance(e,t.reference,s)}return n}creationInstruction(e,t,n,s){this.instructionFn(this._creationCodeFns,e,t,n||[],s)}creationInstructionChain(e,t){const n=t.length?t[0].sourceSpan:null;this._creationCodeFns.push(()=>Ms(e,t.map(e=>e.params()),n).toStmt())}updateInstructionWithAdvance(e,t,n,s){this.addAdvanceInstructionIfNecessary(e,t),this.updateInstruction(t,n,s)}updateInstruction(e,t,n){this.instructionFn(this._updateCodeFns,e,t,n||[])}updateInstructionChain(e,t){const n=t.length?t[0].sourceSpan:null;this._updateCodeFns.push(()=>{const s=t.map(e=>{const t=e.value(),n=Array.isArray(t)?t:[t];return e.params&&n.push(...e.params),e.name&&n.unshift(Kt(e.name)),n});return Ms(e,s,n).toStmt()})}updateInstructionChainWithAdvance(e,t,n){this.addAdvanceInstructionIfNecessary(e,n.length?n[0].sourceSpan:null),this.updateInstructionChain(t,n)}addAdvanceInstructionIfNecessary(e,t){if(e!==this._currentIndex){const n=e-this._currentIndex;if(n<1)throw new Error("advance instruction can only go forwards");this.instructionFn(this._updateCodeFns,t,En.advance,[Kt(n)]),this._currentIndex=e}}allocatePureFunctionSlots(e){const t=this._pureFunctionSlots;return this._pureFunctionSlots+=e,t}allocateBindingSlots(e){this._bindingSlots+=e instanceof Vr?e.expressions.length:1}getImplicitReceiverExpr(){return this._implicitReceiverExpr?this._implicitReceiverExpr:this._implicitReceiverExpr=0===this.level?$t("ctx"):this._bindingScope.getOrCreateSharedContextVar(0)}convertPropertyBinding(e){const t=ai(this,this.getImplicitReceiverExpr(),e,this.bindingContext(),mr.Expression,()=>Jt("Unexpected interpolation")),n=t.currValExpr;return this._tempVariables.push(...t.stmts),n}getUpdateInstructionArguments(e){const{args:t,stmts:n}=function(e,t,n,s){const r=new di(e,t,s,void 0),i=n.visit(r,gr.Expression);r.usesImplicitReceiver&&e.notifyImplicitReceiverUse();const a=oi(r,s);let o=i.args.slice(1);if(n instanceof Vr){const e=n.strings;3===o.length&&""===e[0]&&""===e[1]?o=[o[1]]:o.length>=19&&(o=[qt(o)])}return{stmts:a,args:o}}(this,this.getImplicitReceiverExpr(),e,this.bindingContext());return this._tempVariables.push(...n),t}matchDirectives(e,t){if(this.directiveMatcher){const n=function(e,t){const n=new we,s=de(e)[1];return n.setElement(s),Object.getOwnPropertyNames(t).forEach(e=>{const s=de(e)[1],r=t[e];n.addAttribute(s,r),"class"===e.toLowerCase()&&r.trim().split(/\s+/).forEach(e=>n.addClassName(e))}),n}(e,function(e){const t={};return e instanceof On&&"ng-template"!==e.tagName?e.templateAttrs.forEach(e=>t[e.name]=""):(e.attributes.forEach(e=>{us(e.name)||(t[e.name]=e.value)}),e.inputs.forEach(e=>{t[e.name]=""}),e.outputs.forEach(e=>{t[e.name]=""})),t}(t));this.directiveMatcher.match(n,(e,t)=>{this.directives.add(t)})}}getAttributeExpressions(e,t,n,s,r,i=[],a=[]){const o=new Set,l=[];let c;for(const n of t)"ngProjectAs"===n.name&&(c=n),n.i18n?l.push(Kt(n.name),this.i18nTranslate(n.i18n)):l.push(...nl(n.name),ll(e,n));function u(e,t){"string"==typeof e?o.has(e)||(l.push(...nl(e)),void 0!==t&&l.push(t),o.add(e)):l.push(Kt(e))}if(c&&l.push(...function(e){const t=Re(e.value)[0];return[Kt(5),Ns(t)]}(c)),r&&r.populateInitialStylingAttrs(l),n.length||s.length){const e=l.length;for(let e=0;e<n.length;e++){const t=n[e];4!==t.type&&1!==t.type&&u(t.name)}for(let e=0;e<s.length;e++){const t=s[e];1!==t.type&&u(t.name)}l.length!==e&&l.splice(e,0,Kt(3))}return i.length&&(l.push(Kt(4)),i.forEach(e=>u(e.name))),a.length&&(l.push(Kt(6)),a.forEach(e=>u(e.name))),l}addToConsts(e){if(Xt(e))return Pt;const t=this._constants.constExpressions;for(let n=0;n<t.length;n++)if(t[n].isEquivalent(e))return Kt(n);return Kt(t.push(e)-1)}addAttrsToConsts(e){return e.length>0?this.addToConsts(qt(e)):Pt}prepareRefsArray(e){return e&&0!==e.length?Ns(function e(t){return t.reduce((t,n)=>{const s=Array.isArray(n)?e(n):n;return t.concat(s)},[])}(e.map(e=>{const t=this.allocateDataSlot(),n=this._bindingScope.freshReferenceName(),s=this.level,r=$t(n);return this._bindingScope.set(s,e.name,r,0,(e,n)=>{const s=n>0?[el(n).toStmt()]:[],i=r.set(Vt(En.reference).callFn([Kt(t)]));return s.concat(i.toConstDecl())},!0),[e.name,e.value]}))):Pt}prepareListenerParameter(e,t,n){return()=>{const s=t.name,r=1===t.type?bn(s,t.phase):vn(s),i=`${this.templateName}_${e}_${r}_${n}_listener`,a=this._bindingScope.nestedScope(this._bindingScope.bindingLevel,Ho);return Xo(t,i,a)}}}class Qo extends class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){const n=this.visitAll(e.expressions);return n!==e.expressions?new Vr(e.span,e.sourceSpan,e.strings,n):e}visitLiteralPrimitive(e,t){return e}visitPropertyRead(e,t){const n=e.receiver.visit(this);return n!==e.receiver?new kr(e.span,e.sourceSpan,e.nameSpan,n,e.name):e}visitPropertyWrite(e,t){const n=e.receiver.visit(this),s=e.value.visit(this);return n!==e.receiver||s!==e.value?new Or(e.span,e.sourceSpan,e.nameSpan,n,e.name,s):e}visitSafePropertyRead(e,t){const n=e.receiver.visit(this);return n!==e.receiver?new Mr(e.span,e.sourceSpan,e.nameSpan,n,e.name):e}visitMethodCall(e,t){const n=e.receiver.visit(this),s=this.visitAll(e.args);return n!==e.receiver||s!==e.args?new Wr(e.span,e.sourceSpan,e.nameSpan,n,e.name,s):e}visitSafeMethodCall(e,t){const n=e.receiver.visit(this),s=this.visitAll(e.args);return n!==e.receiver||s!==e.args?new zr(e.span,e.sourceSpan,e.nameSpan,n,e.name,s):e}visitFunctionCall(e,t){const n=e.target&&e.target.visit(this),s=this.visitAll(e.args);return n!==e.target||s!==e.args?new Kr(e.span,e.sourceSpan,n,s):e}visitLiteralArray(e,t){const n=this.visitAll(e.expressions);return n!==e.expressions?new Br(e.span,e.sourceSpan,n):e}visitLiteralMap(e,t){const n=this.visitAll(e.values);return n!==e.values?new $r(e.span,e.sourceSpan,e.keys,n):e}visitUnary(e,t){const n=e.expr.visit(this);if(n!==e.expr)switch(e.operator){case"+":return Ur.createPlus(e.span,e.sourceSpan,n);case"-":return Ur.createMinus(e.span,e.sourceSpan,n);default:throw new Error("Unknown unary operator "+e.operator)}return e}visitBinary(e,t){const n=e.left.visit(this),s=e.right.visit(this);return n!==e.left||s!==e.right?new jr(e.span,e.sourceSpan,e.operation,n,s):e}visitPrefixNot(e,t){const n=e.expression.visit(this);return n!==e.expression?new qr(e.span,e.sourceSpan,n):e}visitNonNullAssert(e,t){const n=e.expression.visit(this);return n!==e.expression?new Hr(e.span,e.sourceSpan,n):e}visitConditional(e,t){const n=e.condition.visit(this),s=e.trueExp.visit(this),r=e.falseExp.visit(this);return n!==e.condition||s!==e.trueExp||r!==e.falseExp?new Pr(e.span,e.sourceSpan,n,s,r):e}visitPipe(e,t){const n=e.exp.visit(this),s=this.visitAll(e.args);return n!==e.exp||s!==e.args?new Dr(e.span,e.sourceSpan,n,e.name,s,e.nameSpan):e}visitKeyedRead(e,t){const n=e.obj.visit(this),s=e.key.visit(this);return n!==e.obj||s!==e.key?new Lr(e.span,e.sourceSpan,n,s):e}visitKeyedWrite(e,t){const n=e.obj.visit(this),s=e.key.visit(this),r=e.value.visit(this);return n!==e.obj||s!==e.key||r!==e.value?new Rr(e.span,e.sourceSpan,n,s,r):e}visitAll(e){const t=[];let n=!1;for(let s=0;s<e.length;++s){const r=e[s],i=r.visit(this);t[s]=i,n=n||i!==r}return n?t:e}visitChain(e,t){const n=this.visitAll(e.expressions);return n!==e.expressions?new Ar(e.span,e.sourceSpan,n):e}visitQuote(e,t){return e}}{constructor(e,t,n,s){super(),this.constantPool=e,this.allocateSlot=t,this.allocatePureFunctionSlots=n,this.definePipe=s,this._pipeBindExprs=[]}visitPipe(e,t){const n=this.allocateSlot(),s="PIPE:"+n,r=this.allocatePureFunctionSlots(2+e.args.length),i=new kr(e.span,e.sourceSpan,e.nameSpan,new Tr(e.span,e.sourceSpan),s),{identifier:a,isVarLength:o}=function(e){const t=Yo[e.length];return{identifier:t||En.pipeBindV,isVarLength:!t}}(e.args);this.definePipe(e.name,s,n,Vt(a));const l=[e.exp,...e.args],c=this.visitAll(o?[new Br(e.span,e.sourceSpan,l)]:l),u=new Kr(e.span,e.sourceSpan,i,[new Fr(e.span,e.sourceSpan,n),new Fr(e.span,e.sourceSpan,r),...c]);return this._pipeBindExprs.push(u),u}updatePipeSlotOffsets(e){this._pipeBindExprs.forEach(t=>{t.args[1].value+=e})}visitLiteralArray(e,t){return new gi(e.span,e.sourceSpan,this.visitAll(e.expressions),e=>{const t=qt(e);return tl(this.constantPool,t,this.allocatePureFunctionSlots)})}visitLiteralMap(e,t){return new gi(e.span,e.sourceSpan,this.visitAll(e.values),t=>{const n=Ht(t.map((t,n)=>({key:e.keys[n].key,value:t,quoted:e.keys[n].quoted})));return tl(this.constantPool,n,this.allocatePureFunctionSlots)})}}const Yo=[En.pipeBind1,En.pipeBind2,En.pipeBind3,En.pipeBind4],Zo=[En.pureFunction0,En.pureFunction1,En.pureFunction2,En.pureFunction3,En.pureFunction4,En.pureFunction5,En.pureFunction6,En.pureFunction7,En.pureFunction8];function Jo(e,t,n){return Vt(t,null,e).callFn(n,e)}function el(e){return Vt(En.nextContext).callFn(e>1?[Kt(e)]:[])}function tl(e,t,n){const{literalFactory:s,literalFactoryArguments:r}=e.getLiteralFactory(t),i=n(1+r.length),{identifier:a,isVarLength:o}=function(e){const t=Zo[e.length];return{identifier:t||En.pureFunctionV,isVarLength:!t}}(r),l=[Kt(i),s];return o?l.push(qt(r)):l.push(...r),Vt(a).callFn(l)}function nl(e){const[t,n]=de(e),s=Kt(n);return t?[Kt(0),Kt(t),s]:[s]}class sl{constructor(e=0,t=null,n){if(this.bindingLevel=e,this.parent=t,this.globals=n,this.map=new Map,this.referenceNameIndex=0,this.restoreViewVariable=null,void 0!==n)for(const e of n)this.set(0,e,$t(e))}static createRootScope(){return new sl}get(e){let t=this;for(;t;){let n=t.map.get(e);if(null!=n)return t!==this&&(n={retrievalLevel:n.retrievalLevel,lhs:n.lhs,declareLocalCallback:n.declareLocalCallback,declare:!1,priority:n.priority,localRef:n.localRef},this.map.set(e,n),this.maybeGenerateSharedContextVar(n),this.maybeRestoreView(n.retrievalLevel,n.localRef)),n.declareLocalCallback&&!n.declare&&(n.declare=!0),n.lhs;t=t.parent}return 0===this.bindingLevel?null:this.getComponentProperty(e)}set(e,t,n,s=0,r,i){if(this.map.has(t)){if(i)return this;Jt(`The name ${t} is already defined in scope to be ${this.map.get(t)}`)}return this.map.set(t,{retrievalLevel:e,lhs:n,declare:!1,declareLocalCallback:r,priority:s,localRef:i||!1}),this}getLocal(e){return this.get(e)}notifyImplicitReceiverUse(){0!==this.bindingLevel&&(this.map.get("$$shared_ctx$$0").declare=!0)}nestedScope(e,t){const n=new sl(e,this,t);return e>0&&n.generateSharedContextVar(0),n}getOrCreateSharedContextVar(e){const t="$$shared_ctx$$"+e;return this.map.has(t)||this.generateSharedContextVar(e),this.map.get(t).lhs}getSharedContextName(e){const t=this.map.get("$$shared_ctx$$"+e);return t&&t.declare?t.lhs:null}maybeGenerateSharedContextVar(e){if(1===e.priority&&e.retrievalLevel<this.bindingLevel){const t=this.map.get("$$shared_ctx$$"+e.retrievalLevel);t?t.declare=!0:this.generateSharedContextVar(e.retrievalLevel)}}generateSharedContextVar(e){const t=$t("ctx"+this.freshReferenceName());this.map.set("$$shared_ctx$$"+e,{retrievalLevel:e,lhs:t,declareLocalCallback:(e,n)=>[t.set(el(n)).toConstDecl()],declare:!1,priority:2,localRef:!1})}getComponentProperty(e){const t=this.map.get("$$shared_ctx$$0");return t.declare=!0,this.maybeRestoreView(0,!1),t.lhs.prop(e)}maybeRestoreView(e,t){this.isListenerScope()&&(e<this.bindingLevel||t)&&(this.parent.restoreViewVariable||(this.parent.restoreViewVariable=$t(this.parent.freshReferenceName())),this.restoreViewVariable=this.parent.restoreViewVariable)}restoreViewStatement(){return this.restoreViewVariable?[Jo(null,En.restoreView,[this.restoreViewVariable]).toStmt()]:[]}viewSnapshotStatements(){const e=Jo(null,En.getCurrentView,[]);return this.restoreViewVariable?[this.restoreViewVariable.set(e).toConstDecl()]:[]}isListenerScope(){return this.parent&&this.parent.bindingLevel===this.bindingLevel}variableDeclarations(){let e=0;return Array.from(this.map.values()).filter(e=>e.declare).sort((e,t)=>t.retrievalLevel-e.retrievalLevel||t.priority-e.priority).reduce((t,n)=>{const s=this.bindingLevel-n.retrievalLevel,r=n.declareLocalCallback(this,s-e);return e=s,t.concat(r)},[])}freshReferenceName(){let e=this;for(;e.parent;)e=e.parent;return"_r"+e.referenceNameIndex++}}function rl(e){switch(Ls(e)){case 1:return En.propertyInterpolate;case 3:return En.propertyInterpolate1;case 5:return En.propertyInterpolate2;case 7:return En.propertyInterpolate3;case 9:return En.propertyInterpolate4;case 11:return En.propertyInterpolate5;case 13:return En.propertyInterpolate6;case 15:return En.propertyInterpolate7;case 17:return En.propertyInterpolate8;default:return En.propertyInterpolateV}}const il=new fo;function al(e=Hs){return new Ta(new io(new Ha),e,il,null,[])}function ol(e,t){switch(e){case Pe.HTML:return Vt(En.sanitizeHtml);case Pe.SCRIPT:return Vt(En.sanitizeScript);case Pe.STYLE:return t?Vt(En.sanitizeStyle):null;case Pe.URL:return Vt(En.sanitizeUrl);case Pe.RESOURCE_URL:return Vt(En.sanitizeResourceUrl);default:return null}}function ll(e,t){const n=Ns(t.value);switch(il.securityContext(e,t.name,!0)){case Pe.HTML:return Vt(En.trustConstantHtml).callFn([n],t.valueSpan);case Pe.SCRIPT:return Vt(En.trustConstantScript).callFn([n],t.valueSpan);case Pe.RESOURCE_URL:return Vt(En.trustConstantResourceUrl).callFn([n],t.valueSpan);default:return n}}function cl(e){return e instanceof In||e instanceof Tn||e instanceof Dn}function ul(e){return e.every(cl)}function pl(){return Ut($t("ngI18nClosureMode")).notIdentical(Kt("undefined",qe)).and($t("ngI18nClosureMode"))}const hl=/attr\.([^\]]+)/;function dl(e,t,n){const s=new Os,r=Re(e.selector);return s.set("type",e.internalType),r.length>0&&s.set("selectors",Ns(r)),e.queries.length>0&&s.set("contentQueries",function(e,t,n){const s=[],r=[],i=bs(r,"_t");for(const n of e){s.push(Vt(n.static?En.staticContentQuery:En.contentQuery).callFn([$t("dirIndex"),...gl(n,t)]).toStmt());const e=i(),a=Vt(En.loadQuery).callFn([]),o=Vt(En.queryRefresh).callFn([e.set(a)]),l=$t("ctx").prop(n.propertyName).set(n.first?e.prop("first"):e);r.push(o.and(l).toStmt())}const a=n?n+"_ContentQueries":null;return Wt([new St("rf",Ue),new St("ctx",null),new St("dirIndex",null)],[Ko(1,s),Ko(2,r)],Ve,null,a)}(e.queries,t,e.name)),e.viewQueries.length&&s.set("viewQuery",function(e,t,n){const s=[],r=[],i=bs(r,"_t");e.forEach(e=>{const n=Vt(e.static?En.staticViewQuery:En.viewQuery).callFn(gl(e,t));s.push(n.toStmt());const a=i(),o=Vt(En.loadQuery).callFn([]),l=Vt(En.queryRefresh).callFn([a.set(o)]),c=$t("ctx").prop(e.propertyName).set(e.first?a.prop("first"):a);r.push(l.and(c).toStmt())});const a=n?n+"_Query":null;return Wt([new St("rf",Ue),new St("ctx",null)],[Ko(1,s),Ko(2,r)],Ve,null,a)}(e.viewQueries,t,e.name)),s.set("hostBindings",function(e,t,n,s,r,i,a){const o=$t("ctx"),l=new $a(o),{styleAttr:c,classAttr:u}=e.specialAttributes;void 0!==c&&l.registerStyleAttr(c),void 0!==u&&l.registerClassAttr(u);const p=[],h=[],d=t,m=Sl(e),g=n.createDirectiveHostEventAsts(m,d);if(g&&g.length){const e=function(e,t){const n=[],s=[],r=[];return e.forEach(e=>{let r=e.name&&vn(e.name);const i=1===e.type?bn(r,e.targetOrPhase):r,a=t&&r?`${t}_${i}_HostBindingHandler`:null,o=Xo(Pn.fromParsedEvent(e),a);1==e.type?s.push(o):n.push(o)}),s.length>0&&r.push(Ms(En.syntheticHostListener,s).toStmt()),n.length>0&&r.push(Ms(En.listener,n).toStmt()),r}(g,i);p.push(...e)}const f=n.createBoundHostProperties(m,d),v=[];let y,x=0;f&&f.forEach(e=>{l.registerInputBasedOnName(e.name,e.expression,d)?x+=2:(v.push(e),x++)});const S=()=>(y||(y=new Qo(s,()=>Jt("Unexpected node"),e=>{const t=x;return x+=e,t},()=>Jt("Unexpected pipe"))),y),E=[],_=[],C=[];v.forEach(e=>{const t=e.expression.visit(S()),s=xl(o,t),{bindingName:i,instruction:a,isAttribute:l}=function(e){let t,n=e.name;const s=n.match(hl);return s?(n=s[1],t=En.attribute):e.isAnimation?(n=wn(n),t=En.syntheticHostProperty):t=En.hostProperty,{bindingName:n,instruction:t,isAttribute:!!s}}(e),c=n.calcPossibleSecurityContexts(r,i,l).filter(e=>e!==Pe.NONE);let u=null;c.length&&(u=2===c.length&&c.indexOf(Pe.URL)>-1&&c.indexOf(Pe.RESOURCE_URL)>-1?Vt(En.sanitizeUrlOrResourceUrl):ol(c[0],l));const p=[Kt(i),s.currValExpr];u&&p.push(u),h.push(...s.stmts),a===En.hostProperty?E.push(p):a===En.attribute?_.push(p):a===En.syntheticHostProperty?C.push(p):h.push(Vt(a).callFn(p).toStmt())}),E.length>0&&h.push(Ms(En.hostProperty,E).toStmt()),_.length>0&&h.push(Ms(En.attribute,_).toStmt()),C.length>0&&h.push(Ms(En.syntheticHostProperty,C).toStmt());const w=function(e){const t=[];for(let n of Object.getOwnPropertyNames(e)){const s=e[n];t.push(Kt(n),s)}return t}(e.attributes);if(l.assignHostAttrs(w,a),l.hasBindings&&l.buildUpdateLevelInstructions(S()).forEach(e=>{if(e.calls.length>0){const t=[];e.calls.forEach(e=>{x+=Math.max(e.allocateBindingSlots-2,0),t.push(function(e,t,n){return e.params(e=>n(t,e).currValExpr)}(e,o,xl))}),h.push(Ms(e.reference,t).toStmt())}}),x&&a.set("hostVars",Kt(x)),p.length>0||h.length>0){const e=i?i+"_HostBindings":null,t=[];return p.length>0&&t.push(Ko(1,p)),h.length>0&&t.push(Ko(2,h)),Wt([new St("rf",Ue),new St("ctx",null)],t,Ve,null,e)}return null}(e.host,e.typeSourceSpan,n,t,e.selector||"",e.name,s)),s.set("inputs",As(e.inputs,!0)),s.set("outputs",As(e.outputs)),null!==e.exportAs&&s.set("exportAs",qt(e.exportAs.map(e=>Kt(e)))),s}function ml(e,t){const n=[],s=t.providers,r=t.viewProviders;if(s||r){const e=[s||new It([])];r&&e.push(r),n.push(Vt(En.ProvidersFeature).callFn(e))}t.usesInheritance&&n.push(Vt(En.InheritDefinitionFeature)),t.fullInheritance&&n.push(Vt(En.CopyDefinitionFeature)),t.lifecycle.usesOnChanges&&n.push(Vt(En.NgOnChangesFeature)),n.length&&e.set("features",qt(n))}function gl(e,t){const n=[ks(e,t),Kt(e.descendants)];return e.read&&n.push(e.read),n}function fl(e){return jt(Ht(Object.keys(e).map(t=>({key:t,value:Kt(Array.isArray(e[t])?e[t][0]:e[t]),quoted:!0}))))}function vl(e){return e.length>0?jt(qt(e.map(e=>Kt(e)))):He}function yl(e){const t=null!==e.selector?e.selector.replace(/\n/g,""):null;return[Cn(e.type.type,e.typeArgumentCount),null!==t?(n=t,jt(Kt(n))):He,null!==e.exportAs?vl(e.exportAs):He,fl(e.inputs),fl(e.outputs),vl(e.queries.map(e=>e.propertyName))];var n}function xl(e,t){return ai(null,e,t,"b",mr.Expression,()=>Jt("Unexpected interpolation"))}function Sl(e){return{hostAttributes:{},hostListeners:e.listeners,hostProperties:e.properties}}const El=/^(?:\[([^\]]+)\])|(?:\(([^\)]+)\))$/;class _l{get(e){return""}}const Cl=Object.keys({useClass:null})[0],wl=Object.keys({useFactory:null})[0],bl=Object.keys({useValue:null})[0],Il=Object.keys({useExisting:null})[0],Tl=function(e){const t=new Je(e);return{value:t,type:t}};function Nl(e){return Object.assign(Object.assign({},e),{predicate:Array.isArray(e.predicate)?e.predicate:new Je(e.predicate),read:e.read?new Je(e.read):null,static:e.static})}function Al(e){const t=Dl(e.inputs||[]),n=Dl(e.outputs||[]),s=e.propMetadata,r={},i={};for(const e in s)s.hasOwnProperty(e)&&s[e].forEach(t=>{"Input"===t.ngMetadataName?r[e]=t.bindingPropertyName?[t.bindingPropertyName,e]:e:Rl(t)&&(i[e]=t.bindingPropertyName||e)});return Object.assign(Object.assign({},e),{typeSourceSpan:e.typeSourceSpan,type:Tl(e.type),internalType:new Je(e.type),deps:Ol(e.deps),host:Ml(e.propMetadata,e.typeSourceSpan,e.host),inputs:Object.assign(Object.assign({},t),r),outputs:Object.assign(Object.assign({},n),i),queries:e.queries.map(Nl),providers:null!=e.providers?new Je(e.providers):null,viewQueries:e.viewQueries.map(Nl),fullInheritance:!1})}function Pl(e,t){return e.hasOwnProperty(t)?new Je(e[t]):void 0}function kl(e){let t;return t=null===e.token?new at(null):e.resolved===Fs.Attribute?new at(e.token):new Je(e.token),{token:t,attribute:null,resolved:e.resolved,host:e.host,optional:e.optional,self:e.self,skipSelf:e.skipSelf}}function Ol(e){return null==e?null:e.map(kl)}function Ml(e,t,n){const s=function(e){const t={},n={},s={},r={};for(const i of Object.keys(e)){const a=e[i],o=i.match(El);if(null===o)switch(i){case"class":if("string"!=typeof a)throw new Error("Class binding must be string");r.classAttr=a;break;case"style":if("string"!=typeof a)throw new Error("Style binding must be string");r.styleAttr=a;break;default:t[i]="string"==typeof a?Kt(a):a}else if(null!=o[1]){if("string"!=typeof a)throw new Error("Property binding must be string");s[o[1]]=a}else if(null!=o[2]){if("string"!=typeof a)throw new Error("Event binding must be string");n[o[2]]=a}}return{attributes:t,listeners:n,properties:s,specialAttributes:r}}(n||{}),r=function(e,t){const n=Sl(e),s=al();return s.createDirectiveHostEventAsts(n,t),s.createBoundHostProperties(n,t),s.errors}(s,t);if(r.length)throw new Error(r.map(e=>e.msg).join("\n"));for(const t in e)e.hasOwnProperty(t)&&e[t].forEach(e=>{"HostBinding"===e.ngMetadataName?s.properties[e.hostPropertyName||t]=t:Ll(e)&&(s.listeners[e.eventName||t]=`${t}(${(e.args||[]).join(",")})`)});return s}function Ll(e){return"HostListener"===e.ngMetadataName}function Rl(e){return"Output"===e.ngMetadataName}function Dl(e){return e.reduce((e,t)=>{const[n,s]=t.split(",").map(e=>e.trim());return e[n]=s||n,e},{})}var Fl,Bl,$l;new class{constructor(e){this.full=e;const t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}}("11.0.0"),function(e){e[e.Extract=0]="Extract",e[e.Merge=1]="Merge"}(Fl||(Fl={})),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"}(Bl||(Bl={})),$t("_l"),$t("_l"),$t("_v"),$t("_ck"),$t("_co"),$t("en"),$t("ad"),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"}($l||($l={})),(an.ng||(an.ng={})).ɵcompilerFacade=new class{constructor(e=new nr){this.jitEvaluator=e,this.R3ResolvedDependencyType=Fs,this.R3FactoryTarget=Ds,this.ResourceLoader=_l,this.elementSchemaRegistry=new fo}compilePipe(e,t,n){const s=function(e){const t=[];return t.push({key:"name",value:Kt(e.pipeName),quoted:!1}),t.push({key:"type",value:e.type.value,quoted:!1}),t.push({key:"pure",value:Kt(e.pure),quoted:!1}),{expression:Vt(En.definePipe).callFn([Ht(t)]),type:new Be(Vt(En.PipeDefWithMeta,[Cn(e.type.type,e.typeArgumentCount),new Be(new at(e.pipeName))]))}}({name:n.name,type:Tl(n.type),internalType:new Je(n.type),typeArgumentCount:n.typeArgumentCount,deps:Ol(n.deps),pipeName:n.pipeName,pure:n.pure});return this.jitExpression(s.expression,e,t,[])}compileInjectable(e,t,n){const{expression:s,statements:r}=function(e){let t=null;const n={name:e.name,type:e.type,internalType:e.internalType,typeArgumentCount:e.typeArgumentCount,deps:[],injectFn:fn.inject,target:Ds.Injectable};if(void 0!==e.useClass){const s=e.useClass.isEquivalent(e.internalType);let r=void 0;void 0!==e.userDeps&&(r=e.userDeps),t=void 0!==r?Bs(Object.assign(Object.assign({},n),{delegate:e.useClass,delegateDeps:r,delegateType:Rs.Class})):s?Bs(n):js(e.type.value,e.useClass)}else t=void 0!==e.useFactory?void 0!==e.userDeps?Bs(Object.assign(Object.assign({},n),{delegate:e.useFactory,delegateDeps:e.userDeps||[],delegateType:Rs.Function})):{statements:[],factory:Wt([],[new Ft(e.useFactory.callFn([]))])}:void 0!==e.useValue?Bs(Object.assign(Object.assign({},n),{expression:e.useValue})):void 0!==e.useExisting?Bs(Object.assign(Object.assign({},n),{expression:Vt(fn.inject).callFn([e.useExisting])})):js(e.type.value,e.internalType);const s={token:e.internalType,factory:t.factory};return null!==e.providedIn.value&&(s.providedIn=e.providedIn),{expression:Vt(fn.ɵɵdefineInjectable).callFn([_n(s)]),type:new Be(Vt(fn.InjectableDef,[Cn(e.type.type,e.typeArgumentCount)])),statements:t.statements}}({name:n.name,type:Tl(n.type),internalType:new Je(n.type),typeArgumentCount:n.typeArgumentCount,providedIn:(i=n.providedIn,null==i||"string"==typeof i?new at(i):new Je(i)),useClass:Pl(n,Cl),useFactory:Pl(n,wl),useValue:Pl(n,bl),useExisting:Pl(n,Il),userDeps:Ol(n.userDeps)||void 0});var i;return this.jitExpression(s,e,t,r)}compileInjector(e,t,n){const s=function(e){const t=Bs({name:e.name,type:e.type,internalType:e.internalType,typeArgumentCount:0,deps:e.deps,injectFn:En.inject,target:Ds.NgModule}),n={factory:t.factory};return null!==e.providers&&(n.providers=e.providers),e.imports.length>0&&(n.imports=qt(e.imports)),{expression:Vt(En.defineInjector).callFn([_n(n)]),type:new Be(Vt(En.InjectorDef,[new Be(e.type.type)])),statements:t.statements}}({name:n.name,type:Tl(n.type),internalType:new Je(n.type),deps:Ol(n.deps),providers:new Je(n.providers),imports:n.imports.map(e=>new Je(e))});return this.jitExpression(s.expression,e,t,s.statements)}compileNgModule(e,t,n){const s=function(e){const{internalType:t,type:n,bootstrap:s,declarations:r,imports:i,exports:a,schemas:o,containsForwardDecls:l,emitInline:c,id:u}=e,p=[],h={type:t};if(s.length&&(h.bootstrap=Sr(s,l)),c)r.length&&(h.declarations=Sr(r,l)),i.length&&(h.imports=Sr(i,l)),a.length&&(h.exports=Sr(a,l));else{const t=function(e){const{adjacentType:t,declarations:n,imports:s,exports:r,containsForwardDecls:i}=e,a={};if(n.length&&(a.declarations=Sr(n,i)),s.length&&(a.imports=Sr(s,i)),r.length&&(a.exports=Sr(r,i)),0===Object.keys(a).length)return null;const o=function(e){const t=new gt({name:"ngJitMode",moduleName:null}),n=new Ct(ze.Identical,new Ze(t),Kt("undefined")),s=new Ct(ze.Or,n,t,void 0,void 0,!0);return new Ct(ze.And,s,e)}(new rt(Vt(En.setNgModuleScope),[t,_n(a)])),l=new Et([],[o.toStmt()]);return new rt(l,[]).toStmt()}(e);null!==t&&p.push(t)}return o&&o.length&&(h.schemas=qt(o.map(e=>e.value))),u&&(h.id=u),{expression:Vt(En.defineNgModule).callFn([_n(h)]),type:new Be(Vt(En.NgModuleDefWithMeta,[new Be(n.type),xr(r),xr(i),xr(a)])),additionalStatements:p}}({type:Tl(n.type),internalType:new Je(n.type),adjacentType:new Je(n.type),bootstrap:n.bootstrap.map(Tl),declarations:n.declarations.map(Tl),imports:n.imports.map(Tl),exports:n.exports.map(Tl),emitInline:!0,containsForwardDecls:!1,schemas:n.schemas?n.schemas.map(Tl):null,id:n.id?new Je(n.id):null});return this.jitExpression(s.expression,e,t,[])}compileDirective(e,t,n){const s=new un,r=al(),i=function(e,t,n){const s=dl(e,t,n);ml(s,e);const r=Vt(En.defineDirective).callFn([s.toLiteralMap()]),i=yl(e);return{expression:r,type:jt(Vt(En.DirectiveDefWithMeta,i))}}(Al(n),s,r);return this.jitExpression(i.expression,e,t,s.statements)}compileComponent(e,t,n){const s=new un,r=n.interpolation?qs.fromArray(n.interpolation):Hs,i=function(e,t,n={}){const{interpolationConfig:s,preserveWhitespaces:r,enableI18nLegacyMessageIdFormat:i}=n,a=al(s),o=(new xa).parse(e,t,Object.assign(Object.assign({leadingTriviaChars:zo},n),{tokenizeExpansionForms:!0}));if(o.errors&&o.errors.length>0)return{interpolationConfig:s,preserveWhitespaces:r,template:e,errors:o.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};let l=o.rootNodes;const c=new Bo(s,!r,i);l=Qi(c,l),r||(l=Qi(new wa,l),c.hasI18nMeta&&(l=Qi(new Bo(s,!1),l)));const{nodes:u,errors:p,styleUrls:h,styles:d,ngContentSelectors:m}=function(e,t){const n=new yo(t);return{nodes:Qi(n,e),errors:t.errors.concat(n.errors),styleUrls:n.styleUrls,styles:n.styles,ngContentSelectors:n.ngContentSelectors}}(l,a);return{interpolationConfig:s,preserveWhitespaces:r,errors:p.length>0?p:null,template:e,nodes:u,styleUrls:h,styles:d,ngContentSelectors:m}}(n.template,t,{preserveWhitespaces:n.preserveWhitespaces,interpolationConfig:r});if(null!==i.errors){const e=i.errors.map(e=>e.toString()).join(", ");throw new Error(`Errors during JIT compilation of template for ${n.name}: ${e}`)}const a=function(e,t,n){const s=dl(e,t,n);ml(s,e);const r=e.selector&&we.parse(e.selector),i=r&&r[0];if(i){const e=i.getAttrs();e.length&&s.set("attrs",t.getConstLiteral(qt(e.map(e=>Kt(null!=e?e:void 0))),!0))}let a=null;if(e.directives.length>0){const t=new be;for(const{selector:n,expression:s}of e.directives)t.addSelectables(we.parse(n),s);a=t}const o=e.name,l=o?o+"_Template":null,c=new Set,u=new Set,p=e.changeDetection,h=e.template,d=new Go(t,sl.createRootScope(),0,o,null,null,l,a,c,e.pipes,u,En.namespaceHTML,e.relativeContextFilePath,e.i18nUseExternalIds),m=d.buildTemplateFunction(h.nodes,[]),g=d.getNgContentSelectors();g&&s.set("ngContentSelectors",g),s.set("decls",Kt(d.getConstCount())),s.set("vars",Kt(d.getVarCount()));const{constExpressions:f,prepareStatements:v}=d.getConsts();if(f.length>0){let e=qt(f);v.length>0&&(e=Wt([],[...v,new Ft(e)])),s.set("consts",e)}if(s.set("template",m),c.size){let t=qt(Array.from(c));e.wrapDirectivesAndPipesInClosure&&(t=Wt([],[new Ft(t)])),s.set("directives",t)}if(u.size){let t=qt(Array.from(u));e.wrapDirectivesAndPipesInClosure&&(t=Wt([],[new Ft(t)])),s.set("pipes",t)}if(null===e.encapsulation&&(e.encapsulation=Ne.Emulated),e.styles&&e.styles.length){const n=(e.encapsulation==Ne.Emulated?function(e,t,n){const s=new fi;return e.map(e=>s.shimCssText(e,"_ngcontent-%COMP%","_nghost-%COMP%"))}(e.styles):e.styles).map(e=>t.getConstLiteral(Kt(e)));s.set("styles",qt(n))}else e.encapsulation===Ne.Emulated&&(e.encapsulation=Ne.None);e.encapsulation!==Ne.Emulated&&s.set("encapsulation",Kt(e.encapsulation)),null!==e.animations&&s.set("data",Ht([{key:"animation",value:e.animations,quoted:!1}])),null!=p&&p!==Ae.Default&&s.set("changeDetection",Kt(p));const y=Vt(En.defineComponent).callFn([s.toLiteralMap()]),x=yl(e);return x.push(vl(e.template.ngContentSelectors)),{expression:y,type:jt(Vt(En.ComponentDefWithMeta,x))}}(Object.assign(Object.assign(Object.assign({},n),Al(n)),{selector:n.selector||this.elementSchemaRegistry.getDefaultComponentElementName(),template:i,wrapDirectivesAndPipesInClosure:!1,styles:[...n.styles,...i.styles],encapsulation:n.encapsulation,interpolation:r,changeDetection:n.changeDetection,animations:null!=n.animations?new Je(n.animations):null,viewProviders:null!=n.viewProviders?new Je(n.viewProviders):null,relativeContextFilePath:"",i18nUseExternalIds:!0}),s,al(r));return this.jitExpression(a.expression,e,`ng:///${n.name}.js`,s.statements)}compileFactory(e,t,n){const s=Bs({name:n.name,type:Tl(n.type),internalType:new Je(n.type),typeArgumentCount:n.typeArgumentCount,deps:Ol(n.deps),injectFn:"directiveInject"===n.injectFn?fn.directiveInject:fn.inject,target:n.target});return this.jitExpression(s.factory,e,t,s.statements)}createParseSourceSpan(e,t,n){return function(e,t,n){const s=new ur("",`in ${e} ${t} in ${n}`);return new pr(new cr(s,-1,-1,-1),new cr(s,-1,-1,-1))}(e,t,n)}jitExpression(e,t,n,s){const r=[...s,new Lt("$def",e,void 0,[kt.Exported])];return this.jitEvaluator.evaluateStatements(n,r,new vr(t),!0).$def}};const Vl="attribute",jl="element",Ul={[Vl]:"attrs",[jl]:jl},ql=(e,t,n)=>{n.report({node:e,messageId:"prefixFailure",data:{prefix:t}})},Hl=(e,t,n)=>{n.report({node:e,messageId:"styleFailure",data:{style:t}})},Wl=(e,t,n)=>{n.report({node:e,messageId:"typeFailure",data:{type:t}})},zl=(e,t,n)=>{const s=X(e),r=n,i=s.length>0&&s.every(e=>-1!==[jl,Vl].indexOf(e)),a=t.length>0,o=-1!==[u,p].indexOf(r);return i&&a&&o},Kl=(e,t,n,s)=>{const r=X(t||["attrs",jl]).reduce((e,t)=>e.concat(Ul[t]),[]),i=s===p?Q.kebabCase:Q.camelCase;let a=null;if(e&&b(e)?a=we.parse(e.raw):e&&I(e)&&e.quasis[0]&&(a=we.parse(e.quasis[0].value.raw)),!a)return null;const o=((e,t)=>e.reduce((e,n)=>{const s=t.reduce((e,t)=>{const s=n[t];return s?e.concat(s):e},[]);return e.concat(s)},[]))(a,r),l=o.some(e=>n.some(t=>Q.prefix(t,s)(e))),c=o.some(e=>i(e));return{hasExpectedPrefix:l,hasExpectedType:o.length>0,hasExpectedStyle:c}};var Xl=ee({name:"component-selector",meta:{type:"suggestion",docs:{description:"Component selectors should follow given naming rules. See more at https://angular.io/guide/styleguide#style-02-07, https://angular.io/guide/styleguide#style-05-02\n and https://angular.io/guide/styleguide#style-05-03.",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{type:{oneOf:[{type:"string"},{type:"array",items:{enum:[jl,Vl]}}]},prefix:{oneOf:[{type:"string"},{type:"array"}]},style:{type:"string",enum:[u,p]}},additionalProperties:!1}],messages:{prefixFailure:"The selector should be prefixed by one of the prefixes: '{{prefix}}' (https://angular.io/guide/styleguide#style-02-07)",styleFailure:"The selector should be {{style}} (https://angular.io/guide/styleguide#style-05-02)",typeFailure:"The selector should be used as an {{type}} (https://angular.io/guide/styleguide#style-05-03)"}},defaultOptions:[{type:"",prefix:"",style:""}],create(e,[t]){const{type:n,prefix:s,style:r}=t;return{[re](t){const i=W(t,"selector");if(!i)return;if(!zl(n,s,r))return;const a=Kl(i,n,X(s),r);null!==a&&(a.hasExpectedType?a.hasExpectedStyle?a.hasExpectedPrefix||ql(i,s,e):Hl(i,r,e):Wl(i,n,e))}}}}),Gl=ee({name:"contextual-lifecycle",meta:{type:"problem",docs:{description:"Ensures that lifecycle methods are used in a correct context",category:"Possible Errors",recommended:"error"},schema:[],messages:{contextuaLifecycle:"This lifecycle method is not called for {{decorator}}"}},defaultOptions:[],create(e){function t({parent:t},n){const s=t,r=f.get(n),i=z(s);for(const t of i){const s=K(t);j(s)&&!(null==r?void 0:r.has(s))&&e.report({node:t.key,messageId:"contextuaLifecycle",data:{decorator:n}})}}return{[re](e){t(e,s.Component)},[ie](e){t(e,s.Directive)},'ClassDeclaration > Decorator[expression.callee.name="Injectable"]'(e){t(e,s.Injectable)},'ClassDeclaration > Decorator[expression.callee.name="NgModule"]'(e){t(e,s.NgModule)},[ae](e){t(e,s.Pipe)}}}}),Ql=ee({name:"directive-class-suffix",meta:{type:"suggestion",docs:{description:'Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. See more at https://angular.io/styleguide#style-02-03.',category:"Best Practices",recommended:"error"},schema:[{type:"object",properties:{suffixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{directiveClassSuffix:"The name of the class {{className}} should end with the suffix {{suffixes}} (https://angular.io/styleguide#style-02-03)"}},defaultOptions:[{suffixes:["Directive"]}],create(e,[t]){const{suffixes:n}=t;return{[ie](t){const s=t.parent,r=k(s);D(s).some(e=>e.endsWith("Validator"))&&n.push("Validator"),r&&n.some(e=>r.endsWith(e))||e.report({node:s.id?s.id:s,messageId:"directiveClassSuffix",data:{className:r,suffixes:n}})}}}}),Yl=ee({name:"directive-selector",meta:{type:"suggestion",docs:{description:"Directive selectors should follow given naming rules. See more at https://angular.io/guide/styleguide#style-02-06 and https://angular.io/guide/styleguide#style-02-08.",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{type:{oneOf:[{type:"string"},{type:"array",items:{enum:[jl,Vl]}}]},prefix:{oneOf:[{type:"string"},{type:"array"}]},style:{type:"string",enum:[u,p]}},additionalProperties:!1}],messages:{prefixFailure:"The selector should be prefixed by one of the prefixes: '{{prefix}}' (https://angular.io/guide/styleguide#style-02-08)",styleFailure:"The selector should be {{style}} (https://angular.io/guide/styleguide#style-02-06)",typeFailure:"The selector should be used as an {{type}} (https://angular.io/guide/styleguide#style-02-06)"}},defaultOptions:[{type:"",prefix:"",style:""}],create(e,[t]){const{type:n,prefix:s,style:r}=t;return{[ie](t){const i=W(t,"selector");if(!i)return;if(!zl(n,s,r))return;const a=Kl(i,n,X(s),r);null!==a&&(a.hasExpectedType?a.hasExpectedStyle?a.hasExpectedPrefix||ql(i,s,e):Hl(i,r,e):Wl(i,n,e))}}}}),Zl=ee({name:"no-attribute-decorator",meta:{type:"problem",docs:{description:`Disallows usage of @${o.Attribute} decorator.`,category:"Possible Errors",recommended:!1},schema:[],messages:{noAttributeDecorator:`@${o.Attribute} is considered bad practice. Use @Input instead`}},defaultOptions:[],create:t=>({MethodDefinition(n){n.value&&n.value.type===e.AST_NODE_TYPES.FunctionExpression&&function(e){return"constructor"===e.kind}(n)&&function(e){e.value.params.forEach(e=>{if(null!=e.decorators)for(const n of e.decorators)if(M(n)===o.Attribute){t.report({node:e,messageId:"noAttributeDecorator"});break}})}(n)}})});const Jl=[l.DoCheck,l.OnChanges],ec=[c.ngDoCheck,c.ngOnChanges];var tc=ee({name:"no-conflicting-lifecycle",meta:{type:"suggestion",docs:{description:"Ensures that directives not implement conflicting lifecycle interfaces.",category:"Best Practices",recommended:"error"},schema:[],messages:{noConflictingLifecycleInterface:`Implementing ${l.DoCheck} and ${l.OnChanges} in a class is not recommended`,noConflictingLifecycleMethod:`Declaring ${c.ngDoCheck} and ${c.ngOnChanges} method in a class is not recommended`}},defaultOptions:[],create:e=>({ClassDeclaration(t){(t=>{const n=F(t);if(!Jl.every(e=>n.includes(e)))return;const s=R(t).filter(e=>E(e.expression)&&V(e.expression.name));for(const t of s)e.report({node:t,messageId:"noConflictingLifecycleInterface"})})(t),(t=>{const n=(e=>z(e).map(K).filter(j))(t);if(!ec.every(e=>n.includes(e)))return;const s=z(t).filter(e=>E(e.key)&&j(e.key.name));for(const t of s)e.report({node:t,messageId:"noConflictingLifecycleMethod"})})(t)}})}),nc=ee({name:"no-forward-ref",meta:{type:"suggestion",docs:{description:"Disallows usage of `forwardRef` references for DI",category:"Best Practices",recommended:!1},schema:[],messages:{noForwardRef:"Avoid using `forwardRef`"}},defaultOptions:[],create:e=>({'CallExpression[callee.type="Identifier"][callee.name="forwardRef"]'(t){e.report({node:t,messageId:"noForwardRef"})}})}),sc=ee({name:"no-host-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `host` metadata property. See more at https://angular.io/styleguide#style-06-03.",category:"Best Practices",recommended:"error"},schema:[],messages:{noHostMetadataProperty:`Use @${o.HostBinding} or @${o.HostListener} rather than the \`host\` metadata property (https://angular.io/styleguide#style-06-03)`}},defaultOptions:[],create:e=>({[se](t){const n=W(t,"host");n&&e.report({node:n.parent,messageId:"noHostMetadataProperty"})}})}),rc=ee({name:"no-input-prefix",meta:{type:"suggestion",docs:{description:"Input names should not be prefixed by the configured disallowed prefixes.",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{prefixes:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{noInputPrefix:"@Inputs should not be prefixed by {{disallowedPrefixes}}"}},defaultOptions:[{prefixes:[]}],create:(e,[t])=>({':matches(ClassProperty, MethodDefinition[kind="set"]) > Decorator[expression.callee.name="Input"]'(n){if(!Y(n.expression.callee,"@angular/core"))return;const s=n.parent,r=q(s),i=t.prefixes;i.some(e=>e===r||new RegExp(`^${e}[^a-z]`).test(r))&&e.report({node:s,messageId:"noInputPrefix",data:{disallowedPrefixes:i.join(", ")}})}})});const ic=new Set(["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-controls","aria-current","aria-describedby","aria-disabled","aria-dragged","aria-dropeffect","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-label","aria-labelledby","aria-level","aria-live","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"]);var ac=ee({name:"no-input-rename",meta:{type:"suggestion",docs:{description:"Disallows renaming directive inputs by providing a string to the decorator.",category:"Best Practices",recommended:"error"},schema:[],messages:{noInputRename:"In the class {{className}}, the directive input property {{propertyName}} should not be renamed"}},defaultOptions:[],create:e=>({':matches(ClassProperty, MethodDefinition[kind="set"]) > Decorator[expression.callee.name="Input"]'(t){const n=t.expression;if(!Y(n.callee,"@angular/core"))return;if(0===n.arguments.length)return;let r;const i=t.parent,a=i.parent.parent,o=a.decorators&&a.decorators.find(e=>S(e.expression)&&E(e.expression.callee)&&e.expression.callee.name===s.Directive);if(o){const e=W(o,"selector");e&&b(e)&&e.value&&(r=(e.value.toString()||"").replace(/[\[\]\s]/g,"").split(","))}const l=n.arguments[0].value;l&&E(i.key)&&((e,t)=>{return!!(e!==t&&r&&r.some(n=>new RegExp(`^${n}((${t[0].toUpperCase()+t.slice(1)}$)|(?=$))`).test(e))||ic.has(e)&&t===(n=e,n.replace(/-[a-zA-Z]/g,e=>e[1].toUpperCase())));var n})(l.toString(),i.key.name)||e.report({node:i,messageId:"noInputRename",data:{className:a.id&&a.id.name,propertyName:i.key.name}})}})}),oc=ee({name:"no-inputs-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `inputs` metadata property. See more at https://angular.io/styleguide#style-05-12.",category:"Best Practices",recommended:"error"},schema:[],messages:{noInputsMetadataProperty:`Use @${o.Input} rather than the \`inputs\` metadata property (https://angular.io/styleguide#style-05-12)`}},defaultOptions:[],create:e=>({[se](t){const n=W(t,"inputs");n&&e.report({node:n.parent,messageId:"noInputsMetadataProperty"})}})}),lc=ee({name:"no-lifecycle-call",meta:{type:"suggestion",docs:{description:"Disallows explicit calls to lifecycle methods.",category:"Best Practices",recommended:!1},schema:[],messages:{noLifecycleCall:"Avoid explicit calls to lifecycle methods"}},defaultOptions:[],create:e=>({MemberExpression:({object:{type:t},parent:n,property:s})=>{const r="Super"===t;n&&E(s)&&j(s.name)&&!r&&e.report({node:n,messageId:"noLifecycleCall"})}})}),cc=ee({name:"no-output-native",meta:{type:"suggestion",docs:{description:"Disallows naming directive outputs as standard DOM event.",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputNative:"The output property should not be named or renamed as a native event"}},defaultOptions:[],create:e=>({'ClassProperty > Decorator[expression.callee.name="Output"]'(t){const n=t.parent;if(!k(t))return;const s=q(n),r=t.expression.arguments[0],i=r&&b(r)&&r.value||s;i&&(uc||(uc=new Set(["abort","afterprint","animationend","animationiteration","animationstart","appinstalled","audioprocess","audioend","audiostart","beforeprint","beforeunload","beginEvent","blocked","blur","boundary","cached","canplay","canplaythrough","change","chargingchange","chargingtimechange","checking","click","close","complete","compositionend","compositionstart","compositionupdate","contextmenu","copy","cut","dblclick","devicechange","devicelight","devicemotion","deviceorientation","deviceproximity","dischargingtimechange","DOMAttributeNameChanged","DOMAttrModified","DOMCharacterDataModified","DOMContentLoaded","DOMElementNameChanged","focus","focusin","focusout","DOMNodeInserted","DOMNodeInsertedIntoDocument","DOMNodeRemoved","DOMNodeRemovedFromDocument","DOMSubtreeModified","downloading","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","end","ended","endEvent","error","fullscreenchange","fullscreenerror","gamepadconnected","gamepaddisconnected","gotpointercapture","hashchange","lostpointercapture","input","invalid","keydown","keypress","keyup","languagechange","levelchange","load","loadeddata","loadedmetadata","loadend","loadstart","mark","message","messageerror","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","nomatch","notificationclick","noupdate","obsolete","offline","online","open","orientationchange","pagehide","pageshow","paste","pause","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","pointerlockerror","pointermove","pointerout","pointerover","pointerup","play","playing","popstate","progress","push","pushsubscriptionchange","ratechange","readystatechange","repeatEvent","reset","resize","resourcetimingbufferfull","result","resume","scroll","seeked","seeking","select","selectstart","selectionchange","show","soundend","soundstart","speechend","speechstart","stalled","start","storage","submit","success","suspend","SVGAbort","SVGError","SVGLoad","SVGResize","SVGScroll","SVGUnload","SVGZoom","timeout","timeupdate","touchcancel","touchend","touchmove","touchstart","transitionend","unload","updateready","upgradeneeded","userproximity","voiceschanged","versionchange","visibilitychange","volumechange","waiting","wheel"]))).has(i.toString())&&e.report({node:n,messageId:"noOutputNative"})}})});let uc=null;var pc=ee({name:"no-output-on-prefix",meta:{type:"suggestion",docs:{description:"Name events without the prefix on. See more at https://angular.io/guide/styleguide#dont-prefix-output-properties.",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputOnPrefix:'In the class "{{className}}", the output property "{{memberName}}" should not be prefixed with on'}},defaultOptions:[],create:e=>({'ClassProperty > Decorator[expression.callee.name="Output"]'(t){const n=t.parent,s=k(t),r=q(n);r&&/^on((?![a-z])|(?=$))/.test(r)&&e.report({node:n,messageId:"noOutputOnPrefix",data:{className:s,memberName:r}})}})}),hc=ee({name:"no-output-rename",meta:{type:"suggestion",docs:{description:"Disallows renaming directive outputs by providing a string to the decorator.",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputRename:"@Outputs should not be renamed"}},defaultOptions:[],create:e=>({'ClassProperty > Decorator[expression.callee.name="Output"]'(t){const n=t.expression;if(!Y(n.callee,"@angular/core"))return;if(0===n.arguments.length)return;let r;const i=t.parent,a=i.parent.parent,o=a.decorators&&a.decorators.find(e=>S(e.expression)&&E(e.expression.callee)&&e.expression.callee.name===s.Directive);if(o){const e=W(o,"selector");e&&b(e)&&e.value&&(r=new Set((e.value.toString()||"").replace(/[\[\]\s]/g,"").split(",")))}const l=n.arguments[0].value;l&&E(i.key)&&((e,t)=>!(!r||!r.has(e)||e===t))(l.toString(),i.key.name)||e.report({node:i,messageId:"noOutputRename"})}})}),dc=ee({name:"no-outputs-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `outputs` metadata property. See more at https://angular.io/styleguide#style-05-12.",category:"Best Practices",recommended:"error"},schema:[],messages:{noOutputsMetadataProperty:`Use @${o.Output} rather than the \`outputs\` metadata property (https://angular.io/styleguide#style-05-12)`}},defaultOptions:[],create:e=>({[se](t){const n=W(t,"outputs");n&&e.report({node:n.parent,messageId:"noOutputsMetadataProperty"})}})}),mc=ee({name:"no-pipe-impure",meta:{type:"suggestion",docs:{description:"Disallows the declaration of impure pipes.",category:"Best Practices",recommended:!1},schema:[],messages:{noPipeImpure:"Impure pipes should be avoided because they are invoked on each change-detection cycle."}},defaultOptions:[],create:e=>({[ae](t){const n=H(t,"pure");n&&b(n.value)&&!n.value.value&&e.report({node:n.value,messageId:"noPipeImpure"})}})}),gc=ee({name:"no-queries-metadata-property",meta:{type:"suggestion",docs:{description:"Disallows usage of the `queries` metadata property. See more at https://angular.io/styleguide#style-05-12.",category:"Best Practices",recommended:!1},schema:[],messages:{noQueriesMetadataProperty:`Use @${o.Output} rather than the \`queries\` metadata property (https://angular.io/styleguide#style-05-12)`}},defaultOptions:[],create:e=>({[se](t){const n=W(t,"queries");n&&e.report({node:n.parent,messageId:"noQueriesMetadataProperty"})}})}),fc=ee({name:"no-empty-lifecycle-method",meta:{type:"suggestion",docs:{description:"Disallows declaring empty lifecycle methods",category:"Best Practices",recommended:"error"},schema:[],messages:{noEmptyLifecycleMethod:"Lifecycle methods should not be empty"}},defaultOptions:[],create:e=>({[`MethodDefinition[key.name=${J([...$])}][value.body.body.length=0]`](t){O(t.parent.parent)&&e.report({node:t.key,messageId:"noEmptyLifecycleMethod"})}})});const vc="prefer-on-push-component-change-detection";var yc=ee({name:vc,meta:{type:"suggestion",docs:{description:"Enforces component's change detection to ChangeDetectionStrategy.OnPush.",category:"Best Practices",recommended:!1},schema:[],messages:{preferOnPushComponentChangeDetection:"The changeDetection value of a component should be set to ChangeDetectionStrategy.OnPush"}},defaultOptions:[],create:e=>({[re](t){const n=W(t,"changeDetection");n?E(n.property)&&"OnPush"===n.property.name||e.report({node:n,messageId:"preferOnPushComponentChangeDetection"}):e.report({node:t,messageId:"preferOnPushComponentChangeDetection"})}})}),xc=ee({name:"prefer-output-readonly",meta:{type:"suggestion",docs:{description:"Prefer to declare `@Output` as readonly since they are not supposed to be reassigned",category:"Best Practices",recommended:!1},schema:[],messages:{preferOutputReadonly:"Prefer to declare `@Output` as readonly since they are not supposed to be reassigned"}},defaultOptions:[],create:e=>({'ClassProperty[readonly=undefined] > Decorator[expression.callee.name="Output"]'({parent:t}){e.report({node:t.key,messageId:"preferOutputReadonly"})}})});const Sc=/^\.{1,2}\/[^.\/]/;var Ec=ee({name:"relative-url-prefix",meta:{type:"suggestion",docs:{description:"The ./ and ../ prefix is standard syntax for relative URLs; don't depend on Angular's current ability to do without that prefix. See more at https://angular.io/styleguide#style-05-04.",category:"Best Practices",recommended:!1},schema:[],messages:{relativeUrlPrefix:"The ./ and ../ prefix is standard syntax for relative URLs. (https://angular.io/styleguide#style-05-04)"}},defaultOptions:[],create:e=>({[re](t){const n=H(t,"templateUrl");n&&A(n.value)&&(Sc.test(n.value.value)||e.report({node:n.value,messageId:"relativeUrlPrefix"}));const s=H(t,"styleUrls");s&&s.value&&w(s.value)&&s.value.elements.length>0&&s.value.elements.forEach(t=>{A(t)&&!Sc.test(t.value)&&e.report({node:t,messageId:"relativeUrlPrefix"})})}})}),_c=ee({name:"use-component-selector",meta:{type:"suggestion",docs:{description:"Component selector must be declared",category:"Best Practices",recommended:!1},schema:[],messages:{useComponentSelector:"The selector of the component '{{className}}' is mandatory"}},defaultOptions:[],create:e=>({[re](t){const n=t.parent;if(!n||!n.id||!n.id.name)return;const s=W(t,"selector");s&&A(s)&&s.value.length||e.report({node:t,messageId:"useComponentSelector",data:{className:n.id.name}})}})}),Cc=ee({name:"use-component-view-encapsulation",meta:{type:"suggestion",docs:{description:"Disallows using ViewEncapsulation.None",category:"Best Practices",recommended:!1},schema:[],messages:{useComponentViewEncapsulation:"Using ViewEncapsulation.None makes your styles global, which may have an unintended effect"}},defaultOptions:[],create:e=>({[re](t){const n=W(t,"encapsulation");!n||_(n)&&E(n.property)&&"None"!==n.property.name||e.report({node:n,messageId:"useComponentViewEncapsulation"})}})}),wc=ee({name:"use-injectable-provided-in",meta:{type:"suggestion",docs:{description:`"Using the 'providedIn' property makes classes decorated with @${s.Injectable} tree shakeable`,category:"Best Practices",recommended:!1},schema:[],messages:{useInjectableProvidedIn:`Classes decorated with @${s.Injectable} should use the 'providedIn' property`}},defaultOptions:[],create:e=>({'ClassDeclaration > Decorator[expression.callee.name="Injectable"]'(t){W(t,"providedIn")||e.report({node:t,messageId:"useInjectableProvidedIn"})}})}),bc=ee({name:"use-lifecycle-interface",meta:{type:"suggestion",docs:{description:"Ensures that classes implement lifecycle interfaces corresponding to the declared lifecycle methods",category:"Best Practices",recommended:"warn"},schema:[],messages:{useLifecycleInterface:"Lifecycle interface '{{interfaceName}}' should be implemented for method '{{methodName}}'. (https://angular.io/styleguide#style-09-01)"}},defaultOptions:[],create:e=>({[`MethodDefinition[key.name=${J([...$])}]`]({key:t,parent:n}){const s=n.parent;if(!O(s))return;const r=F(s),i=t.name,a=(e=>e.slice(2))(i);r.includes(l[a])||e.report({node:t,messageId:"useLifecycleInterface",data:{interfaceName:a,methodName:i}})}})}),Ic=ee({name:"use-pipe-decorator",meta:{type:"suggestion",docs:{description:`Ensures that classes implementing PipeTransform interface use @${s.Pipe} decorator`,category:"Best Practices",recommended:!1},schema:[],messages:{usePipeDecorator:"Classes that implement the PipeTransform interface should be decorated with @"+s.Pipe}},defaultOptions:[],create:e=>({'ClassDeclaration > TSClassImplements:matches([expression.name="PipeTransform"], [expression.property.name="PipeTransform"])'(t){const n=t.parent;(e=>((e,t)=>{if(e.decorators)return e.decorators.find(e=>S(e.expression)&&e.expression.arguments&&e.expression.arguments.length>0&&"Pipe"===M(e))})(e))(n)||e.report({node:n,messageId:"usePipeDecorator"})}})}),Tc=ee({name:"use-pipe-transform-interface",meta:{type:"suggestion",docs:{description:`Ensures tht classes decorated with @${s.Pipe} implement PipeTransform interface`,category:"Best Practices",recommended:"error"},schema:[],messages:{usePipeTransformInterface:`Classes decorated with @${s.Pipe} decorator should implement PipeTransform interface`}},defaultOptions:[],create:e=>({[ae](t){const n=t.parent;((e,t)=>D(e).find(e=>"PipeTransform"===e))(n)||e.report({node:n,messageId:"usePipeTransformInterface"})}})}),Nc=ee({name:"pipe-prefix",meta:{type:"suggestion",docs:{description:"Enforce consistent prefix for pipes.",category:"Stylistic Issues",recommended:!1},schema:[{type:"object",properties:{prefixes:{type:"array",items:{type:"string"},minimum:1,uniqueItems:!0}},additionalProperties:!1}],messages:{pipePrefix:"@Pipe's name should be prefixed by {{prefixes}}"}},defaultOptions:[{prefixes:[]}],create:(e,[{prefixes:t}])=>({[ae](n){const s=W(n,"name");if(!s)return;if(!function(e){return Array.isArray(e)&&e.length>0}(t))return;const r=t.join("|"),i=Q.prefix(r,"camelCase");let a;A(s)?a=s.value:I(s)&&s.quasis[0]&&(a=s.quasis[0].value.raw),a&&(i.apply(this,[a])||e.report({node:s,messageId:"pipePrefix",data:{prefixes:Z(t)}}))}})});module.exports={configs:{all:{extends:"./configs/base.json",rules:{"@angular-eslint/component-class-suffix":"error","@angular-eslint/component-max-inline-declarations":"error","@angular-eslint/component-selector":"error","@angular-eslint/contextual-decorator":"error","@angular-eslint/contextual-lifecycle":"error","@angular-eslint/directive-class-suffix":"error","@angular-eslint/directive-selector":"error","@angular-eslint/no-attribute-decorator":"error","@angular-eslint/no-conflicting-lifecycle":"error","@angular-eslint/no-empty-lifecycle-method":"error","@angular-eslint/no-forward-ref":"error","@angular-eslint/no-host-metadata-property":"error","@angular-eslint/no-input-prefix":"error","@angular-eslint/no-input-rename":"error","@angular-eslint/no-inputs-metadata-property":"error","@angular-eslint/no-lifecycle-call":"error","@angular-eslint/no-output-native":"error","@angular-eslint/no-output-on-prefix":"error","@angular-eslint/no-output-rename":"error","@angular-eslint/no-outputs-metadata-property":"error","@angular-eslint/no-pipe-impure":"error","@angular-eslint/no-queries-metadata-property":"error","@angular-eslint/pipe-prefix":"error","@angular-eslint/prefer-on-push-component-change-detection":"error","@angular-eslint/prefer-output-readonly":"error","@angular-eslint/relative-url-prefix":"error","@angular-eslint/use-component-selector":"error","@angular-eslint/use-component-view-encapsulation":"error","@angular-eslint/use-injectable-provided-in":"error","@angular-eslint/use-lifecycle-interface":"error","@angular-eslint/use-pipe-decorator":"error","@angular-eslint/use-pipe-transform-interface":"error"}},base:{parser:"@typescript-eslint/parser",parserOptions:{ecmaVersion:2020,sourceType:"module",project:"./tsconfig.json"},plugins:["@typescript-eslint","@angular-eslint"]},recommended:{extends:"./configs/base.json",rules:{"no-restricted-imports":["error",{paths:[{name:"rxjs/Rx",message:"Please import directly from 'rxjs' instead"}]}],"@typescript-eslint/member-ordering":["error",{default:["static-field","instance-field","static-method","instance-method"]}],"no-restricted-syntax":["error",{selector:'CallExpression[callee.object.name="console"][callee.property.name=/^(debug|info|time|timeEnd|trace)$/]',message:"Unexpected property on console object was called"}],"@typescript-eslint/no-inferrable-types":["error",{ignoreParameters:!0}],"@typescript-eslint/no-non-null-assertion":"error","no-fallthrough":"error","@angular-eslint/component-class-suffix":"error","@angular-eslint/contextual-lifecycle":"error","@angular-eslint/directive-class-suffix":"error","@angular-eslint/no-conflicting-lifecycle":"error","@angular-eslint/no-empty-lifecycle-method":"error","@angular-eslint/no-host-metadata-property":"error","@angular-eslint/no-input-rename":"error","@angular-eslint/no-inputs-metadata-property":"error","@angular-eslint/no-output-native":"error","@angular-eslint/no-output-on-prefix":"error","@angular-eslint/no-output-rename":"error","@angular-eslint/no-outputs-metadata-property":"error","@angular-eslint/use-lifecycle-interface":"warn","@angular-eslint/use-pipe-transform-interface":"error"}},"ng-cli-compat":{extends:["./configs/base.json"],env:{browser:!0,es6:!0,node:!0},plugins:["eslint-plugin-import","eslint-plugin-jsdoc","eslint-plugin-prefer-arrow"],rules:{"@typescript-eslint/interface-name-prefix":"off","@typescript-eslint/explicit-member-accessibility":"off","sort-keys":"off","@angular-eslint/component-class-suffix":"error","@angular-eslint/component-selector":["error",{type:"element",prefix:"app",style:"kebab-case"}],"@angular-eslint/contextual-lifecycle":"error","@angular-eslint/directive-class-suffix":"error","@angular-eslint/directive-selector":["error",{type:"attribute",prefix:"app",style:"camelCase"}],"@angular-eslint/no-conflicting-lifecycle":"error","@angular-eslint/no-host-metadata-property":"error","@angular-eslint/no-input-rename":"error","@angular-eslint/no-inputs-metadata-property":"error","@angular-eslint/no-output-native":"error","@angular-eslint/no-output-on-prefix":"error","@angular-eslint/no-output-rename":"error","@angular-eslint/no-outputs-metadata-property":"error","@angular-eslint/use-lifecycle-interface":"error","@angular-eslint/use-pipe-transform-interface":"error","@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":"off","@typescript-eslint/ban-types":["error",{types:{Object:{message:"Avoid using the `Object` type. Did you mean `object`?"},Function:{message:"Avoid using the `Function` type. Prefer a specific function type, like `() => void`."},Boolean:{message:"Avoid using the `Boolean` type. Did you mean `boolean`?"},Number:{message:"Avoid using the `Number` type. Did you mean `number`?"},String:{message:"Avoid using the `String` type. Did you mean `string`?"},Symbol:{message:"Avoid using the `Symbol` type. Did you mean `symbol`?"}}}],"@typescript-eslint/consistent-type-assertions":"error","@typescript-eslint/dot-notation":"error","@typescript-eslint/member-ordering":"error","@typescript-eslint/naming-convention":"error","@typescript-eslint/no-empty-function":"off","@typescript-eslint/no-empty-interface":"error","@typescript-eslint/no-explicit-any":"off","@typescript-eslint/no-inferrable-types":["error",{ignoreParameters:!0}],"@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-parameter-properties":"off","@typescript-eslint/no-unused-expressions":"error","@typescript-eslint/no-use-before-define":"off","@typescript-eslint/no-var-requires":"off","@typescript-eslint/prefer-for-of":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-namespace-keyword":"error","@typescript-eslint/triple-slash-reference":["error",{path:"always",types:"prefer-import",lib:"always"}],"@typescript-eslint/unified-signatures":"error",complexity:"off","constructor-super":"error",eqeqeq:["error","smart"],"guard-for-in":"error","id-blacklist":["error","any","Number","number","String","string","Boolean","boolean","Undefined","undefined"],"id-match":"error","import/no-deprecated":"warn","jsdoc/newline-after-description":"error","jsdoc/no-types":"error","max-classes-per-file":"off","no-bitwise":"error","no-caller":"error","no-cond-assign":"error","no-console":["error",{allow:["log","warn","dir","timeLog","assert","clear","count","countReset","group","groupEnd","table","dirxml","error","groupCollapsed","Console","profile","profileEnd","timeStamp","context"]}],"no-debugger":"error","no-empty":"off","no-eval":"error","no-fallthrough":"error","no-invalid-this":"off","no-new-wrappers":"error","no-restricted-imports":["error",{name:"rxjs/Rx",message:"Please import directly from 'rxjs' instead"}],"no-shadow":["error",{hoist:"all"}],"no-throw-literal":"error","no-undef-init":"error","no-underscore-dangle":"error","no-unsafe-finally":"error","no-unused-labels":"error","no-var":"error","object-shorthand":"error","one-var":["error","never"],"prefer-arrow/prefer-arrow-functions":"error","prefer-const":"error",radix:"error","use-isnan":"error","valid-typeof":"off"}},"ng-cli-compat--formatting-add-on":{plugins:["eslint-plugin-jsdoc"],rules:{"arrow-body-style":"error","arrow-parens":"off","comma-dangle":"off",curly:"error","eol-last":"error","jsdoc/check-alignment":"error","max-len":["error",{code:140}],"new-parens":"error","no-multiple-empty-lines":"off","no-trailing-spaces":"error","quote-props":["error","as-needed"],"space-before-function-paren":["error",{anonymous:"never",asyncArrow:"always",named:"never"}],"@typescript-eslint/member-delimiter-style":["error",{multiline:{delimiter:"semi",requireLast:!0},singleline:{delimiter:"semi",requireLast:!1}}],quotes:"off","@typescript-eslint/quotes":["error","single",{allowTemplateLiterals:!0}],"@typescript-eslint/semi":["error","always"],"@typescript-eslint/type-annotation-spacing":"error"}}},rules:{"contextual-decorator":te,"component-class-suffix":oe,"component-max-inline-declarations":he,"component-selector":Xl,"contextual-lifecycle":Gl,"directive-class-suffix":Ql,"directive-selector":Yl,"no-attribute-decorator":Zl,"no-conflicting-lifecycle":tc,"no-forward-ref":nc,"no-host-metadata-property":sc,"no-input-prefix":rc,"no-input-rename":ac,"no-inputs-metadata-property":oc,"no-lifecycle-call":lc,"no-output-native":cc,"no-output-on-prefix":pc,"no-output-rename":hc,"no-outputs-metadata-property":dc,"no-pipe-impure":mc,"no-queries-metadata-property":gc,"no-empty-lifecycle-method":fc,[vc]:yc,"prefer-output-readonly":xc,"relative-url-prefix":Ec,"use-component-selector":_c,"use-component-view-encapsulation":Cc,"use-injectable-provided-in":wc,"use-lifecycle-interface":bc,"use-pipe-decorator":Ic,"use-pipe-transform-interface":Tc,"pipe-prefix":Nc}};