prettier 2.7.1 → 3.0.0-alpha.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/LICENSE +129 -1033
- package/bin-prettier.js +9 -4
- package/{cli.js → cli.mjs} +12185 -13902
- package/doc.js +1235 -1325
- package/esm/parser-angular.mjs +2 -2
- package/esm/parser-babel.mjs +16 -25
- package/esm/parser-espree.mjs +13 -24
- package/esm/parser-flow.mjs +21 -33
- package/esm/parser-glimmer.mjs +20 -22
- package/esm/parser-graphql.mjs +7 -13
- package/esm/parser-html.mjs +13 -21
- package/esm/parser-markdown.mjs +38 -54
- package/esm/parser-meriyah.mjs +7 -18
- package/esm/parser-postcss.mjs +47 -70
- package/esm/parser-typescript.mjs +58 -69
- package/esm/parser-yaml.mjs +141 -143
- package/esm/standalone.mjs +93 -85
- package/index.js +34653 -34790
- package/package.json +3 -2
- package/parser-angular.js +2 -2
- package/parser-babel.js +16 -25
- package/parser-espree.js +13 -24
- package/parser-flow.js +21 -33
- package/parser-glimmer.js +20 -22
- package/parser-graphql.js +7 -13
- package/parser-html.js +13 -21
- package/parser-markdown.js +38 -54
- package/parser-meriyah.js +7 -18
- package/parser-postcss.js +47 -70
- package/parser-typescript.js +58 -69
- package/parser-yaml.js +141 -143
- package/standalone.js +93 -85
- package/third-party.js +626 -556
package/esm/parser-angular.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
`,n="\r",r=function(){function s(a){this.string=a;for(var i=[0],h=0;h<a.length;)switch(a[h]){case t:h+=t.length,i.push(h);break;case n:h+=n.length,a[h]===t&&(h+=t.length),i.push(h);break;default:h++;break}this.offsets=i}return s.prototype.locationForIndex=function(a){if(a<0||a>this.string.length)return null;for(var i=0,h=this.offsets;h[i+1]<=a;)i++;var l=a-h[i];return{line:i,column:l}},s.prototype.indexForLocation=function(a){var i=a.line,h=a.column;return i<0||i>=this.offsets.length||h<0||h>this.lengthOfLine(i)?null:this.offsets[i]+h},s.prototype.lengthOfLine=function(a){var i=this.offsets[a],h=a===this.offsets.length-1?this.string.length:this.offsets[a+1];return h-i},s}();e.LinesAndColumns=r,e.default=r}}),dn=W({"node_modules/angular-estree-parser/lib/context.js"(e){"use strict";L(),Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0;var t=pn(),n=class{constructor(s){this.text=s,this.locator=new r(this.text)}};e.Context=n;var r=class{constructor(s){this._lineAndColumn=new t.default(s)}locationForIndex(s){let{line:a,column:i}=this._lineAndColumn.locationForIndex(s);return{line:a+1,column:i}}}}}),Xe={};He(Xe,{AST:()=>k,ASTWithName:()=>G,ASTWithSource:()=>V,AbsoluteSourceSpan:()=>U,AstMemoryEfficientTransformer:()=>Pt,AstTransformer:()=>wt,Binary:()=>K,BindingPipe:()=>fe,BoundElementProperty:()=>_t,Chain:()=>oe,Conditional:()=>ce,EmptyExpr:()=>M,ExpressionBinding:()=>Ye,FunctionCall:()=>Pe,ImplicitReceiver:()=>Oe,Interpolation:()=>me,KeyedRead:()=>he,KeyedWrite:()=>de,LiteralArray:()=>ge,LiteralMap:()=>ve,LiteralPrimitive:()=>B,MethodCall:()=>ye,NonNullAssert:()=>Se,ParseSpan:()=>q,ParsedEvent:()=>Et,ParsedProperty:()=>Ct,ParsedPropertyType:()=>se,ParsedVariable:()=>At,ParserError:()=>ae,PrefixNot:()=>xe,PropertyRead:()=>re,PropertyWrite:()=>ue,Quote:()=>be,RecursiveAstVisitor:()=>Ze,SafeKeyedRead:()=>pe,SafeMethodCall:()=>we,SafePropertyRead:()=>le,ThisReceiver:()=>Je,Unary:()=>F,VariableBinding:()=>Le});var ae,q,k,G,be,M,Oe,Je,oe,ce,re,ue,le,he,pe,de,fe,B,ge,ve,me,K,F,xe,Se,ye,we,Pe,U,V,Le,Ye,Ze,wt,Pt,Ct,se,Et,At,_t,et=Y({"node_modules/@angular/compiler/esm2015/src/expression_parser/ast.js"(){L(),ae=class{constructor(e,t,n,r){this.input=t,this.errLocation=n,this.ctxLocation=r,this.message="Parser Error: ".concat(e," ").concat(n," [").concat(t,"] in ").concat(r)}},q=class{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new U(e+this.start,e+this.end)}},k=class{constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return"AST"}},G=class extends k{constructor(e,t,n){super(e,t),this.nameSpan=n}},be=class extends k{constructor(e,t,n,r,s){super(e,t),this.prefix=n,this.uninterpretedExpression=r,this.location=s}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitQuote(this,t)}toString(){return"Quote"}},M=class extends k{visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null}},Oe=class extends k{visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitImplicitReceiver(this,t)}},Je=class extends Oe{visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;var n;return(n=e.visitThisReceiver)===null||n===void 0?void 0:n.call(e,this,t)}},oe=class extends k{constructor(e,t,n){super(e,t),this.expressions=n}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitChain(this,t)}},ce=class extends k{constructor(e,t,n,r,s){super(e,t),this.condition=n,this.trueExp=r,this.falseExp=s}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitConditional(this,t)}},re=class extends G{constructor(e,t,n,r,s){super(e,t,n),this.receiver=r,this.name=s}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitPropertyRead(this,t)}},ue=class extends G{constructor(e,t,n,r,s,a){super(e,t,n),this.receiver=r,this.name=s,this.value=a}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitPropertyWrite(this,t)}},le=class extends G{constructor(e,t,n,r,s){super(e,t,n),this.receiver=r,this.name=s}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitSafePropertyRead(this,t)}},he=class extends k{constructor(e,t,n,r){super(e,t),this.receiver=n,this.key=r}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitKeyedRead(this,t)}},pe=class extends k{constructor(e,t,n,r){super(e,t),this.receiver=n,this.key=r}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitSafeKeyedRead(this,t)}},de=class extends k{constructor(e,t,n,r,s){super(e,t),this.receiver=n,this.key=r,this.value=s}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitKeyedWrite(this,t)}},fe=class extends G{constructor(e,t,n,r,s,a){super(e,t,a),this.exp=n,this.name=r,this.args=s}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitPipe(this,t)}},B=class extends k{constructor(e,t,n){super(e,t),this.value=n}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitLiteralPrimitive(this,t)}},ge=class extends k{constructor(e,t,n){super(e,t),this.expressions=n}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitLiteralArray(this,t)}},ve=class extends k{constructor(e,t,n,r){super(e,t),this.keys=n,this.values=r}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitLiteralMap(this,t)}},me=class extends k{constructor(e,t,n,r){super(e,t),this.strings=n,this.expressions=r}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitInterpolation(this,t)}},K=class extends k{constructor(e,t,n,r,s){super(e,t),this.operation=n,this.left=r,this.right=s}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitBinary(this,t)}},F=class extends K{constructor(e,t,n,r,s,a,i){super(e,t,s,a,i),this.operator=n,this.expr=r}static createMinus(e,t,n){return new F(e,t,"-",n,"-",new B(e,t,0),n)}static createPlus(e,t,n){return new F(e,t,"+",n,"-",n,new B(e,t,0))}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitUnary!==void 0?e.visitUnary(this,t):e.visitBinary(this,t)}},xe=class extends k{constructor(e,t,n){super(e,t),this.expression=n}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitPrefixNot(this,t)}},Se=class extends k{constructor(e,t,n){super(e,t),this.expression=n}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitNonNullAssert(this,t)}},ye=class extends G{constructor(e,t,n,r,s,a,i){super(e,t,n),this.receiver=r,this.name=s,this.args=a,this.argumentSpan=i}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitMethodCall(this,t)}},we=class extends G{constructor(e,t,n,r,s,a,i){super(e,t,n),this.receiver=r,this.name=s,this.args=a,this.argumentSpan=i}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitSafeMethodCall(this,t)}},Pe=class extends k{constructor(e,t,n,r){super(e,t),this.target=n,this.args=r}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitFunctionCall(this,t)}},U=class{constructor(e,t){this.start=e,this.end=t}},V=class extends k{constructor(e,t,n,r,s){super(new q(0,t===null?0:t.length),new U(r,t===null?r:r+t.length)),this.ast=e,this.source=t,this.location=n,this.errors=s}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return"".concat(this.source," in ").concat(this.location)}},Le=class{constructor(e,t,n){this.sourceSpan=e,this.key=t,this.value=n}},Ye=class{constructor(e,t,n){this.sourceSpan=e,this.key=t,this.value=n}},Ze=class{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.receiver,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.receiver,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)}visitSafeKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitQuote(e,t){}visitAll(e,t){for(let n of e)this.visit(n,t)}},wt=class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){return new me(e.span,e.sourceSpan,e.strings,this.visitAll(e.expressions))}visitLiteralPrimitive(e,t){return new B(e.span,e.sourceSpan,e.value)}visitPropertyRead(e,t){return new re(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitPropertyWrite(e,t){return new ue(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,e.value.visit(this))}visitSafePropertyRead(e,t){return new le(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitMethodCall(e,t){return new ye(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args),e.argumentSpan)}visitSafeMethodCall(e,t){return new we(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args),e.argumentSpan)}visitFunctionCall(e,t){return new Pe(e.span,e.sourceSpan,e.target.visit(this),this.visitAll(e.args))}visitLiteralArray(e,t){return new ge(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitLiteralMap(e,t){return new ve(e.span,e.sourceSpan,e.keys,this.visitAll(e.values))}visitUnary(e,t){switch(e.operator){case"+":return F.createPlus(e.span,e.sourceSpan,e.expr.visit(this));case"-":return F.createMinus(e.span,e.sourceSpan,e.expr.visit(this));default:throw new Error("Unknown unary operator ".concat(e.operator))}}visitBinary(e,t){return new K(e.span,e.sourceSpan,e.operation,e.left.visit(this),e.right.visit(this))}visitPrefixNot(e,t){return new xe(e.span,e.sourceSpan,e.expression.visit(this))}visitNonNullAssert(e,t){return new Se(e.span,e.sourceSpan,e.expression.visit(this))}visitConditional(e,t){return new ce(e.span,e.sourceSpan,e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))}visitPipe(e,t){return new fe(e.span,e.sourceSpan,e.exp.visit(this),e.name,this.visitAll(e.args),e.nameSpan)}visitKeyedRead(e,t){return new he(e.span,e.sourceSpan,e.receiver.visit(this),e.key.visit(this))}visitKeyedWrite(e,t){return new de(e.span,e.sourceSpan,e.receiver.visit(this),e.key.visit(this),e.value.visit(this))}visitAll(e){let t=[];for(let n=0;n<e.length;++n)t[n]=e[n].visit(this);return t}visitChain(e,t){return new oe(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitQuote(e,t){return new be(e.span,e.sourceSpan,e.prefix,e.uninterpretedExpression,e.location)}visitSafeKeyedRead(e,t){return new pe(e.span,e.sourceSpan,e.receiver.visit(this),e.key.visit(this))}},Pt=class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){let n=this.visitAll(e.expressions);return n!==e.expressions?new me(e.span,e.sourceSpan,e.strings,n):e}visitLiteralPrimitive(e,t){return e}visitPropertyRead(e,t){let n=e.receiver.visit(this);return n!==e.receiver?new re(e.span,e.sourceSpan,e.nameSpan,n,e.name):e}visitPropertyWrite(e,t){let n=e.receiver.visit(this),r=e.value.visit(this);return n!==e.receiver||r!==e.value?new ue(e.span,e.sourceSpan,e.nameSpan,n,e.name,r):e}visitSafePropertyRead(e,t){let n=e.receiver.visit(this);return n!==e.receiver?new le(e.span,e.sourceSpan,e.nameSpan,n,e.name):e}visitMethodCall(e,t){let n=e.receiver.visit(this),r=this.visitAll(e.args);return n!==e.receiver||r!==e.args?new ye(e.span,e.sourceSpan,e.nameSpan,n,e.name,r,e.argumentSpan):e}visitSafeMethodCall(e,t){let n=e.receiver.visit(this),r=this.visitAll(e.args);return n!==e.receiver||r!==e.args?new we(e.span,e.sourceSpan,e.nameSpan,n,e.name,r,e.argumentSpan):e}visitFunctionCall(e,t){let n=e.target&&e.target.visit(this),r=this.visitAll(e.args);return n!==e.target||r!==e.args?new Pe(e.span,e.sourceSpan,n,r):e}visitLiteralArray(e,t){let n=this.visitAll(e.expressions);return n!==e.expressions?new ge(e.span,e.sourceSpan,n):e}visitLiteralMap(e,t){let n=this.visitAll(e.values);return n!==e.values?new ve(e.span,e.sourceSpan,e.keys,n):e}visitUnary(e,t){let n=e.expr.visit(this);if(n!==e.expr)switch(e.operator){case"+":return F.createPlus(e.span,e.sourceSpan,n);case"-":return F.createMinus(e.span,e.sourceSpan,n);default:throw new Error("Unknown unary operator ".concat(e.operator))}return e}visitBinary(e,t){let n=e.left.visit(this),r=e.right.visit(this);return n!==e.left||r!==e.right?new K(e.span,e.sourceSpan,e.operation,n,r):e}visitPrefixNot(e,t){let n=e.expression.visit(this);return n!==e.expression?new xe(e.span,e.sourceSpan,n):e}visitNonNullAssert(e,t){let n=e.expression.visit(this);return n!==e.expression?new Se(e.span,e.sourceSpan,n):e}visitConditional(e,t){let n=e.condition.visit(this),r=e.trueExp.visit(this),s=e.falseExp.visit(this);return n!==e.condition||r!==e.trueExp||s!==e.falseExp?new ce(e.span,e.sourceSpan,n,r,s):e}visitPipe(e,t){let n=e.exp.visit(this),r=this.visitAll(e.args);return n!==e.exp||r!==e.args?new fe(e.span,e.sourceSpan,n,e.name,r,e.nameSpan):e}visitKeyedRead(e,t){let n=e.receiver.visit(this),r=e.key.visit(this);return n!==e.receiver||r!==e.key?new he(e.span,e.sourceSpan,n,r):e}visitKeyedWrite(e,t){let n=e.receiver.visit(this),r=e.key.visit(this),s=e.value.visit(this);return n!==e.receiver||r!==e.key||s!==e.value?new de(e.span,e.sourceSpan,n,r,s):e}visitAll(e){let t=[],n=!1;for(let r=0;r<e.length;++r){let s=e[r],a=s.visit(this);t[r]=a,n=n||a!==s}return n?t:e}visitChain(e,t){let n=this.visitAll(e.expressions);return n!==e.expressions?new oe(e.span,e.sourceSpan,n):e}visitQuote(e,t){return e}visitSafeKeyedRead(e,t){let n=e.receiver.visit(this),r=e.key.visit(this);return n!==e.receiver||r!==e.key?new pe(e.span,e.sourceSpan,n,r):e}},Ct=class{constructor(e,t,n,r,s,a){this.name=e,this.expression=t,this.type=n,this.sourceSpan=r,this.keySpan=s,this.valueSpan=a,this.isLiteral=this.type===se.LITERAL_ATTR,this.isAnimation=this.type===se.ANIMATION}},function(e){e[e.DEFAULT=0]="DEFAULT",e[e.LITERAL_ATTR=1]="LITERAL_ATTR",e[e.ANIMATION=2]="ANIMATION"}(se||(se={})),Et=class{constructor(e,t,n,r,s,a,i){this.name=e,this.targetOrPhase=t,this.type=n,this.handler=r,this.sourceSpan=s,this.handlerSpan=a,this.keySpan=i}},At=class{constructor(e,t,n,r,s){this.name=e,this.value=t,this.sourceSpan=n,this.keySpan=r,this.valueSpan=s}},_t=class{constructor(e,t,n,r,s,a,i,h){this.name=e,this.type=t,this.securityContext=n,this.value=r,this.unit=s,this.sourceSpan=a,this.keySpan=i,this.valueSpan=h}}}});function fn(e){return e>=tt&&e<=nt||e==pt}function Q(e){return Mt<=e&&e<=$t}function gn(e){return e>=lt&&e<=ht||e>=ct&&e<=ut}function vt(e){return e===it||e===rt||e===Ht}var Ce,tt,It,Ot,kt,Nt,nt,bt,rt,Lt,st,Rt,$e,it,Ee,z,Tt,at,ee,ot,H,Re,X,te,Bt,ie,Kt,je,Mt,$t,ct,jt,ut,Ae,Ft,ne,Ut,Be,lt,Wt,Gt,Vt,qt,Qt,Dt,zt,ht,Te,Fe,_e,pt,Ht,Xt=Y({"node_modules/@angular/compiler/esm2015/src/chars.js"(){L(),Ce=0,tt=9,It=10,Ot=11,kt=12,Nt=13,nt=32,bt=33,rt=34,Lt=35,st=36,Rt=37,$e=38,it=39,Ee=40,z=41,Tt=42,at=43,ee=44,ot=45,H=46,Re=47,X=58,te=59,Bt=60,ie=61,Kt=62,je=63,Mt=48,$t=57,ct=65,jt=69,ut=90,Ae=91,Ft=92,ne=93,Ut=94,Be=95,lt=97,Wt=101,Gt=102,Vt=110,qt=114,Qt=116,Dt=117,zt=118,ht=122,Te=123,Fe=124,_e=125,pt=160,Ht=96}}),Jt={};He(Jt,{EOF:()=>Ie,Lexer:()=>Zt,Token:()=>$,TokenType:()=>S,isIdentifier:()=>Yt});function mt(e,t,n){return new $(e,t,S.Character,n,String.fromCharCode(n))}function vn(e,t,n){return new $(e,t,S.Identifier,0,n)}function mn(e,t,n){return new $(e,t,S.PrivateIdentifier,0,n)}function xn(e,t,n){return new $(e,t,S.Keyword,0,n)}function Ke(e,t,n){return new $(e,t,S.Operator,0,n)}function Sn(e,t,n){return new $(e,t,S.String,0,n)}function yn(e,t,n){return new $(e,t,S.Number,n,"")}function wn(e,t,n){return new $(e,t,S.Error,0,n)}function Ue(e){return lt<=e&&e<=ht||ct<=e&&e<=ut||e==Be||e==st}function Yt(e){if(e.length==0)return!1;let t=new Ge(e);if(!Ue(t.peek))return!1;for(t.advance();t.peek!==Ce;){if(!We(t.peek))return!1;t.advance()}return!0}function We(e){return gn(e)||Q(e)||e==Be||e==st}function Pn(e){return e==Wt||e==jt}function Cn(e){return e==ot||e==at}function En(e){switch(e){case Vt:return It;case Gt:return kt;case qt:return Nt;case Qt:return tt;case zt:return Ot;default:return e}}function An(e){let t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}var S,xt,Zt,$,Ie,Ge,en=Y({"node_modules/@angular/compiler/esm2015/src/expression_parser/lexer.js"(){L(),Xt(),function(e){e[e.Character=0]="Character",e[e.Identifier=1]="Identifier",e[e.PrivateIdentifier=2]="PrivateIdentifier",e[e.Keyword=3]="Keyword",e[e.String=4]="String",e[e.Operator=5]="Operator",e[e.Number=6]="Number",e[e.Error=7]="Error"}(S||(S={})),xt=["var","let","as","null","undefined","true","false","if","else","this"],Zt=class{tokenize(e){let t=new Ge(e),n=[],r=t.scanToken();for(;r!=null;)n.push(r),r=t.scanToken();return n}},$=class{constructor(e,t,n,r,s){this.index=e,this.end=t,this.type=n,this.numValue=r,this.strValue=s}isCharacter(e){return this.type==S.Character&&this.numValue==e}isNumber(){return this.type==S.Number}isString(){return this.type==S.String}isOperator(e){return this.type==S.Operator&&this.strValue==e}isIdentifier(){return this.type==S.Identifier}isPrivateIdentifier(){return this.type==S.PrivateIdentifier}isKeyword(){return this.type==S.Keyword}isKeywordLet(){return this.type==S.Keyword&&this.strValue=="let"}isKeywordAs(){return this.type==S.Keyword&&this.strValue=="as"}isKeywordNull(){return this.type==S.Keyword&&this.strValue=="null"}isKeywordUndefined(){return this.type==S.Keyword&&this.strValue=="undefined"}isKeywordTrue(){return this.type==S.Keyword&&this.strValue=="true"}isKeywordFalse(){return this.type==S.Keyword&&this.strValue=="false"}isKeywordThis(){return this.type==S.Keyword&&this.strValue=="this"}isError(){return this.type==S.Error}toNumber(){return this.type==S.Number?this.numValue:-1}toString(){switch(this.type){case S.Character:case S.Identifier:case S.Keyword:case S.Operator:case S.PrivateIdentifier:case S.String:case S.Error:return this.strValue;case S.Number:return this.numValue.toString();default:return null}}},Ie=new $(-1,-1,S.Character,0,""),Ge=class{constructor(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}advance(){this.peek=++this.index>=this.length?Ce:this.input.charCodeAt(this.index)}scanToken(){let e=this.input,t=this.length,n=this.peek,r=this.index;for(;n<=nt;)if(++r>=t){n=Ce;break}else n=e.charCodeAt(r);if(this.peek=n,this.index=r,r>=t)return null;if(Ue(n))return this.scanIdentifier();if(Q(n))return this.scanNumber(r);let s=r;switch(n){case H:return this.advance(),Q(this.peek)?this.scanNumber(s):mt(s,this.index,H);case Ee:case z:case Te:case _e:case Ae:case ne:case ee:case X:case te:return this.scanCharacter(s,n);case it:case rt:return this.scanString();case Lt:return this.scanPrivateIdentifier();case at:case ot:case Tt:case Re:case Rt:case Ut:return this.scanOperator(s,String.fromCharCode(n));case je:return this.scanQuestion(s);case Bt:case Kt:return this.scanComplexOperator(s,String.fromCharCode(n),ie,"=");case bt:case ie:return this.scanComplexOperator(s,String.fromCharCode(n),ie,"=",ie,"=");case $e:return this.scanComplexOperator(s,"&",$e,"&");case Fe:return this.scanComplexOperator(s,"|",Fe,"|");case pt:for(;fn(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error("Unexpected character [".concat(String.fromCharCode(n),"]"),0)}scanCharacter(e,t){return this.advance(),mt(e,this.index,t)}scanOperator(e,t){return this.advance(),Ke(e,this.index,t)}scanComplexOperator(e,t,n,r,s,a){this.advance();let i=t;return this.peek==n&&(this.advance(),i+=r),s!=null&&this.peek==s&&(this.advance(),i+=a),Ke(e,this.index,i)}scanIdentifier(){let e=this.index;for(this.advance();We(this.peek);)this.advance();let t=this.input.substring(e,this.index);return xt.indexOf(t)>-1?xn(e,this.index,t):vn(e,this.index,t)}scanPrivateIdentifier(){let e=this.index;if(this.advance(),!Ue(this.peek))return this.error("Invalid character [#]",-1);for(;We(this.peek);)this.advance();let t=this.input.substring(e,this.index);return mn(e,this.index,t)}scanNumber(e){let t=this.index===e,n=!1;for(this.advance();;){if(!Q(this.peek))if(this.peek===Be){if(!Q(this.input.charCodeAt(this.index-1))||!Q(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);n=!0}else if(this.peek===H)t=!1;else if(Pn(this.peek)){if(this.advance(),Cn(this.peek)&&this.advance(),!Q(this.peek))return this.error("Invalid exponent",-1);t=!1}else break;this.advance()}let r=this.input.substring(e,this.index);n&&(r=r.replace(/_/g,""));let s=t?An(r):parseFloat(r);return yn(e,this.index,s)}scanString(){let e=this.index,t=this.peek;this.advance();let n="",r=this.index,s=this.input;for(;this.peek!=t;)if(this.peek==Ft){n+=s.substring(r,this.index),this.advance();let i;if(this.peek=this.peek,this.peek==Dt){let h=s.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(h))i=parseInt(h,16);else return this.error("Invalid unicode escape [\\u".concat(h,"]"),0);for(let l=0;l<5;l++)this.advance()}else i=En(this.peek),this.advance();n+=String.fromCharCode(i),r=this.index}else{if(this.peek==Ce)return this.error("Unterminated quote",0);this.advance()}let a=s.substring(r,this.index);return this.advance(),Sn(e,this.index,n+a)}scanQuestion(e){this.advance();let t="?";return(this.peek===je||this.peek===H)&&(t+=this.peek===H?".":"?",this.advance()),Ke(e,this.index,t)}error(e,t){let n=this.index+t;return wn(n,this.index,"Lexer Error: ".concat(e," at column ").concat(n," in expression [").concat(this.input,"]"))}}}});function _n(e,t){if(t!=null&&!(Array.isArray(t)&&t.length==2))throw new Error("Expected '".concat(e,"' to be an array, [start, end]."));if(t!=null){let n=t[0],r=t[1];tn.forEach(s=>{if(s.test(n)||s.test(r))throw new Error("['".concat(n,"', '").concat(r,"'] contains unusable interpolation symbol."))})}}var tn,In=Y({"node_modules/@angular/compiler/esm2015/src/assertions.js"(){L(),tn=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//]}}),Me,J,On=Y({"node_modules/@angular/compiler/esm2015/src/ml_parser/interpolation_config.js"(){L(),In(),Me=class{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(_n("interpolation",e),new Me(e[0],e[1])):J}},J=new Me("{{","}}")}}),nn={};He(nn,{IvyParser:()=>rn,Parser:()=>Qe,SplitInterpolation:()=>Ve,TemplateBindingParseResult:()=>qe,_ParseAST:()=>D});var Ve,qe,Qe,rn,Z,D,St,yt,kn=Y({"node_modules/@angular/compiler/esm2015/src/expression_parser/parser.js"(){L(),Xt(),On(),et(),en(),Ve=class{constructor(e,t,n){this.strings=e,this.expressions=t,this.offsets=n}},qe=class{constructor(e,t,n){this.templateBindings=e,this.warnings=t,this.errors=n}},Qe=class{constructor(e){this._lexer=e,this.errors=[],this.simpleExpressionChecker=St}parseAction(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:J;this._checkNoInterpolation(e,t,r);let s=this._stripComments(e),a=this._lexer.tokenize(this._stripComments(e)),i=new D(e,t,n,a,s.length,!0,this.errors,e.length-s.length).parseChain();return new V(i,e,t,n,this.errors)}parseBinding(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:J,s=this._parseBindingAst(e,t,n,r);return new V(s,e,t,n,this.errors)}checkSimpleExpression(e){let t=new this.simpleExpressionChecker;return e.visit(t),t.errors}parseSimpleBinding(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:J,s=this._parseBindingAst(e,t,n,r),a=this.checkSimpleExpression(s);return a.length>0&&this._reportError("Host binding expression cannot contain ".concat(a.join(" ")),e,t),new V(s,e,t,n,this.errors)}_reportError(e,t,n,r){this.errors.push(new ae(e,t,n,r))}_parseBindingAst(e,t,n,r){let s=this._parseQuote(e,t,n);if(s!=null)return s;this._checkNoInterpolation(e,t,r);let a=this._stripComments(e),i=this._lexer.tokenize(a);return new D(e,t,n,i,a.length,!1,this.errors,e.length-a.length).parseChain()}_parseQuote(e,t,n){if(e==null)return null;let r=e.indexOf(":");if(r==-1)return null;let s=e.substring(0,r).trim();if(!Yt(s))return null;let a=e.substring(r+1),i=new q(0,e.length);return new be(i,i.toAbsolute(n),s,a,t)}parseTemplateBindings(e,t,n,r,s){let a=this._lexer.tokenize(t);return new D(t,n,s,a,t.length,!1,this.errors,0).parseTemplateBindings({source:e,span:new U(r,r+e.length)})}parseInterpolation(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:J,{strings:s,expressions:a,offsets:i}=this.splitInterpolation(e,t,r);if(a.length===0)return null;let h=[];for(let l=0;l<a.length;++l){let P=a[l].text,p=this._stripComments(P),x=this._lexer.tokenize(p),A=new D(e,t,n,x,p.length,!1,this.errors,i[l]+(P.length-p.length)).parseChain();h.push(A)}return this.createInterpolationAst(s.map(l=>l.text),h,e,t,n)}parseInterpolationExpression(e,t,n){let r=this._stripComments(e),s=this._lexer.tokenize(r),a=new D(e,t,n,s,r.length,!1,this.errors,0).parseChain(),i=["",""];return this.createInterpolationAst(i,[a],e,t,n)}createInterpolationAst(e,t,n,r,s){let a=new q(0,n.length),i=new me(a,a.toAbsolute(s),e,t);return new V(i,n,r,s,this.errors)}splitInterpolation(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J,r=[],s=[],a=[],i=0,h=!1,l=!1,{start:P,end:p}=n;for(;i<e.length;)if(h){let x=i,A=x+P.length,b=this._getInterpolationEndIndex(e,p,A);if(b===-1){h=!1,l=!0;break}let _=b+p.length,R=e.substring(A,b);R.trim().length===0&&this._reportError("Blank expressions are not allowed in interpolated strings",e,"at column ".concat(i," in"),t),s.push({text:R,start:x,end:_}),a.push(A),i=_,h=!1}else{let x=i;i=e.indexOf(P,i),i===-1&&(i=e.length);let A=e.substring(x,i);r.push({text:A,start:x,end:i}),h=!0}if(!h)if(l){let x=r[r.length-1];x.text+=e.substring(i),x.end=e.length}else r.push({text:e.substring(i),start:i,end:e.length});return new Ve(r,s,a)}wrapLiteralPrimitive(e,t,n){let r=new q(0,e==null?0:e.length);return new V(new B(r,r.toAbsolute(n),e),e,t,n,this.errors)}_stripComments(e){let t=this._commentStart(e);return t!=null?e.substring(0,t).trim():e}_commentStart(e){let t=null;for(let n=0;n<e.length-1;n++){let r=e.charCodeAt(n),s=e.charCodeAt(n+1);if(r===Re&&s==Re&&t==null)return n;t===r?t=null:t==null&&vt(r)&&(t=r)}return null}_checkNoInterpolation(e,t,n){let{start:r,end:s}=n,a=-1,i=-1;for(let h of this._forEachUnquotedChar(e,0))if(a===-1)e.startsWith(r)&&(a=h);else if(i=this._getInterpolationEndIndex(e,s,h),i>-1)break;a>-1&&i>-1&&this._reportError("Got interpolation (".concat(r).concat(s,") where expression was expected"),e,"at column ".concat(a," in"),t)}_getInterpolationEndIndex(e,t,n){for(let r of this._forEachUnquotedChar(e,n)){if(e.startsWith(t,r))return r;if(e.startsWith("//",r))return e.indexOf(t,r)}return-1}*_forEachUnquotedChar(e,t){let n=null,r=0;for(let s=t;s<e.length;s++){let a=e[s];vt(e.charCodeAt(s))&&(n===null||n===a)&&r%2===0?n=n===null?a:null:n===null&&(yield s),r=a==="\\"?r+1:0}}},rn=class extends Qe{constructor(){super(...arguments),this.simpleExpressionChecker=yt}},function(e){e[e.None=0]="None",e[e.Writable=1]="Writable"}(Z||(Z={})),D=class{constructor(e,t,n,r,s,a,i,h){this.input=e,this.location=t,this.absoluteOffset=n,this.tokens=r,this.inputLength=s,this.parseAction=a,this.errors=i,this.offset=h,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=Z.None,this.sourceSpanCache=new Map,this.index=0}peek(e){let t=this.index+e;return t<this.tokens.length?this.tokens[t]:Ie}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:this.tokens.length===0?this.inputLength+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e,t){let n=this.currentEndIndex;if(t!==void 0&&t>this.currentEndIndex&&(n=t),e>n){let r=n;n=e,e=r}return new q(e,n)}sourceSpan(e,t){let n="".concat(e,"@").concat(this.inputIndex,":").concat(t);return this.sourceSpanCache.has(n)||this.sourceSpanCache.set(n,this.span(e,t).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(n)}advance(){this.index++}withContext(e,t){this.context|=e;let n=t();return this.context^=e,n}consumeOptionalCharacter(e){return this.next.isCharacter(e)?(this.advance(),!0):!1}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(e){this.consumeOptionalCharacter(e)||this.error("Missing expected ".concat(String.fromCharCode(e)))}consumeOptionalOperator(e){return this.next.isOperator(e)?(this.advance(),!0):!1}expectOperator(e){this.consumeOptionalOperator(e)||this.error("Missing expected operator ".concat(e))}prettyPrintToken(e){return e===Ie?"end of input":"token ".concat(e)}expectIdentifierOrKeyword(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier or keyword"):this.error("Unexpected ".concat(this.prettyPrintToken(e),", expected identifier or keyword")),null):(this.advance(),e.toString())}expectIdentifierOrKeywordOrString(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()&&!e.isString()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier, keyword or string"):this.error("Unexpected ".concat(this.prettyPrintToken(e),", expected identifier, keyword, or string")),""):(this.advance(),e.toString())}parseChain(){let e=[],t=this.inputIndex;for(;this.index<this.tokens.length;){let n=this.parsePipe();if(e.push(n),this.consumeOptionalCharacter(te))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.consumeOptionalCharacter(te););else this.index<this.tokens.length&&this.error("Unexpected token '".concat(this.next,"'"))}if(e.length==0){let n=this.offset,r=this.offset+this.inputLength;return new M(this.span(n,r),this.sourceSpan(n,r))}return e.length==1?e[0]:new oe(this.span(t),this.sourceSpan(t),e)}parsePipe(){let e=this.inputIndex,t=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{let n=this.inputIndex,r=this.expectIdentifierOrKeyword(),s,a;r!==null?s=this.sourceSpan(n):(r="",a=this.next.index!==-1?this.next.index:this.inputLength+this.offset,s=new q(a,a).toAbsolute(this.absoluteOffset));let i=[];for(;this.consumeOptionalCharacter(X);)i.push(this.parseExpression());t=new fe(this.span(e),this.sourceSpan(e,a),t,r,i,s)}while(this.consumeOptionalOperator("|"))}return t}parseExpression(){return this.parseConditional()}parseConditional(){let e=this.inputIndex,t=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){let n=this.parsePipe(),r;if(this.consumeOptionalCharacter(X))r=this.parsePipe();else{let s=this.inputIndex,a=this.input.substring(e,s);this.error("Conditional expression ".concat(a," requires all 3 expressions")),r=new M(this.span(e),this.sourceSpan(e))}return new ce(this.span(e),this.sourceSpan(e),t,n,r)}else return t}parseLogicalOr(){let e=this.inputIndex,t=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){let n=this.parseLogicalAnd();t=new K(this.span(e),this.sourceSpan(e),"||",t,n)}return t}parseLogicalAnd(){let e=this.inputIndex,t=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){let n=this.parseNullishCoalescing();t=new K(this.span(e),this.sourceSpan(e),"&&",t,n)}return t}parseNullishCoalescing(){let e=this.inputIndex,t=this.parseEquality();for(;this.consumeOptionalOperator("??");){let n=this.parseEquality();t=new K(this.span(e),this.sourceSpan(e),"??",t,n)}return t}parseEquality(){let e=this.inputIndex,t=this.parseRelational();for(;this.next.type==S.Operator;){let n=this.next.strValue;switch(n){case"==":case"===":case"!=":case"!==":this.advance();let r=this.parseRelational();t=new K(this.span(e),this.sourceSpan(e),n,t,r);continue}break}return t}parseRelational(){let e=this.inputIndex,t=this.parseAdditive();for(;this.next.type==S.Operator;){let n=this.next.strValue;switch(n){case"<":case">":case"<=":case">=":this.advance();let r=this.parseAdditive();t=new K(this.span(e),this.sourceSpan(e),n,t,r);continue}break}return t}parseAdditive(){let e=this.inputIndex,t=this.parseMultiplicative();for(;this.next.type==S.Operator;){let n=this.next.strValue;switch(n){case"+":case"-":this.advance();let r=this.parseMultiplicative();t=new K(this.span(e),this.sourceSpan(e),n,t,r);continue}break}return t}parseMultiplicative(){let e=this.inputIndex,t=this.parsePrefix();for(;this.next.type==S.Operator;){let n=this.next.strValue;switch(n){case"*":case"%":case"/":this.advance();let r=this.parsePrefix();t=new K(this.span(e),this.sourceSpan(e),n,t,r);continue}break}return t}parsePrefix(){if(this.next.type==S.Operator){let e=this.inputIndex,t=this.next.strValue,n;switch(t){case"+":return this.advance(),n=this.parsePrefix(),F.createPlus(this.span(e),this.sourceSpan(e),n);case"-":return this.advance(),n=this.parsePrefix(),F.createMinus(this.span(e),this.sourceSpan(e),n);case"!":return this.advance(),n=this.parsePrefix(),new xe(this.span(e),this.sourceSpan(e),n)}}return this.parseCallChain()}parseCallChain(){let e=this.inputIndex,t=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(H))t=this.parseAccessMemberOrMethodCall(t,e,!1);else if(this.consumeOptionalOperator("?."))t=this.consumeOptionalCharacter(Ae)?this.parseKeyedReadOrWrite(t,e,!0):this.parseAccessMemberOrMethodCall(t,e,!0);else if(this.consumeOptionalCharacter(Ae))t=this.parseKeyedReadOrWrite(t,e,!1);else if(this.consumeOptionalCharacter(Ee)){this.rparensExpected++;let n=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(z),t=new Pe(this.span(e),this.sourceSpan(e),t,n)}else if(this.consumeOptionalOperator("!"))t=new Se(this.span(e),this.sourceSpan(e),t);else return t}parsePrimary(){let e=this.inputIndex;if(this.consumeOptionalCharacter(Ee)){this.rparensExpected++;let t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(z),t}else{if(this.next.isKeywordNull())return this.advance(),new B(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new B(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new B(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new B(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new Je(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(Ae)){this.rbracketsExpected++;let t=this.parseExpressionList(ne);return this.rbracketsExpected--,this.expectCharacter(ne),new ge(this.span(e),this.sourceSpan(e),t)}else{if(this.next.isCharacter(Te))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new Oe(this.span(e),this.sourceSpan(e)),e,!1);if(this.next.isNumber()){let t=this.next.toNumber();return this.advance(),new B(this.span(e),this.sourceSpan(e),t)}else if(this.next.isString()){let t=this.next.toString();return this.advance(),new B(this.span(e),this.sourceSpan(e),t)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new M(this.span(e),this.sourceSpan(e))):this.index>=this.tokens.length?(this.error("Unexpected end of expression: ".concat(this.input)),new M(this.span(e),this.sourceSpan(e))):(this.error("Unexpected token ".concat(this.next)),new M(this.span(e),this.sourceSpan(e)))}}}parseExpressionList(e){let t=[];do if(!this.next.isCharacter(e))t.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(ee));return t}parseLiteralMap(){let e=[],t=[],n=this.inputIndex;if(this.expectCharacter(Te),!this.consumeOptionalCharacter(_e)){this.rbracesExpected++;do{let r=this.inputIndex,s=this.next.isString(),a=this.expectIdentifierOrKeywordOrString();if(e.push({key:a,quoted:s}),s)this.expectCharacter(X),t.push(this.parsePipe());else if(this.consumeOptionalCharacter(X))t.push(this.parsePipe());else{let i=this.span(r),h=this.sourceSpan(r);t.push(new re(i,h,h,new Oe(i,h),a))}}while(this.consumeOptionalCharacter(ee));this.rbracesExpected--,this.expectCharacter(_e)}return new ve(this.span(n),this.sourceSpan(n),e,t)}parseAccessMemberOrMethodCall(e,t,n){let r=this.inputIndex,s=this.withContext(Z.Writable,()=>{var i;let h=(i=this.expectIdentifierOrKeyword())!==null&&i!==void 0?i:"";return h.length===0&&this.error("Expected identifier for property access",e.span.end),h}),a=this.sourceSpan(r);if(this.consumeOptionalCharacter(Ee)){let i=this.inputIndex;this.rparensExpected++;let h=this.parseCallArguments(),l=this.span(i,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(z),this.rparensExpected--;let P=this.span(t),p=this.sourceSpan(t);return n?new we(P,p,a,e,s,h,l):new ye(P,p,a,e,s,h,l)}else{if(n)return this.consumeOptionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new M(this.span(t),this.sourceSpan(t))):new le(this.span(t),this.sourceSpan(t),a,e,s);if(this.consumeOptionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new M(this.span(t),this.sourceSpan(t));let i=this.parseConditional();return new ue(this.span(t),this.sourceSpan(t),a,e,s,i)}else return new re(this.span(t),this.sourceSpan(t),a,e,s)}}parseCallArguments(){if(this.next.isCharacter(z))return[];let e=[];do e.push(this.parsePipe());while(this.consumeOptionalCharacter(ee));return e}expectTemplateBindingKey(){let e="",t=!1,n=this.currentAbsoluteOffset;do e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-");while(t);return{source:e,span:new U(n,n+e.length)}}parseTemplateBindings(e){let t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index<this.tokens.length;){let n=this.parseLetBinding();if(n)t.push(n);else{let r=this.expectTemplateBindingKey(),s=this.parseAsBinding(r);s?t.push(s):(r.source=e.source+r.source.charAt(0).toUpperCase()+r.source.substring(1),t.push(...this.parseDirectiveKeywordBindings(r)))}this.consumeStatementTerminator()}return new qe(t,[],this.errors)}parseKeyedReadOrWrite(e,t,n){return this.withContext(Z.Writable,()=>{this.rbracketsExpected++;let r=this.parsePipe();if(r instanceof M&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(ne),this.consumeOptionalOperator("="))if(n)this.error("The '?.' operator cannot be used in the assignment");else{let s=this.parseConditional();return new de(this.span(t),this.sourceSpan(t),e,r,s)}else return n?new pe(this.span(t),this.sourceSpan(t),e,r):new he(this.span(t),this.sourceSpan(t),e,r);return new M(this.span(t),this.sourceSpan(t))})}parseDirectiveKeywordBindings(e){let t=[];this.consumeOptionalCharacter(X);let n=this.getDirectiveBoundTarget(),r=this.currentAbsoluteOffset,s=this.parseAsBinding(e);s||(this.consumeStatementTerminator(),r=this.currentAbsoluteOffset);let a=new U(e.span.start,r);return t.push(new Ye(a,e,n)),s&&t.push(s),t}getDirectiveBoundTarget(){if(this.next===Ie||this.peekKeywordAs()||this.peekKeywordLet())return null;let e=this.parsePipe(),{start:t,end:n}=e.span,r=this.input.substring(t,n);return new V(e,r,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();let t=this.expectTemplateBindingKey();this.consumeStatementTerminator();let n=new U(e.span.start,this.currentAbsoluteOffset);return new Le(n,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;let e=this.currentAbsoluteOffset;this.advance();let t=this.expectTemplateBindingKey(),n=null;this.consumeOptionalOperator("=")&&(n=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let r=new U(e,this.currentAbsoluteOffset);return new Le(r,t,n)}consumeStatementTerminator(){this.consumeOptionalCharacter(te)||this.consumeOptionalCharacter(ee)}error(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.errors.push(new ae(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return e==null&&(e=this.index),e<this.tokens.length?"at column ".concat(this.tokens[e].index+1," in"):"at the end of the expression"}_reportErrorForPrivateIdentifier(e,t){let n="Private identifiers are not supported. Unexpected private identifier: ".concat(e);t!==null&&(n+=", ".concat(t)),this.error(n)}skip(){let e=this.next;for(;this.index<this.tokens.length&&!e.isCharacter(te)&&!e.isOperator("|")&&(this.rparensExpected<=0||!e.isCharacter(z))&&(this.rbracesExpected<=0||!e.isCharacter(_e))&&(this.rbracketsExpected<=0||!e.isCharacter(ne))&&(!(this.context&Z.Writable)||!e.isOperator("="));)this.next.isError()&&this.errors.push(new ae(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next}},St=class{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(n=>n.visit(this,t))}visitChain(e,t){}visitQuote(e,t){}visitSafeKeyedRead(e,t){}},yt=class extends Ze{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}}}}),dt=W({"node_modules/angular-estree-parser/lib/utils.js"(e){"use strict";L(),Object.defineProperty(e,"__esModule",{value:!0}),e.getLast=e.toLowerCamelCase=e.findBackChar=e.findFrontChar=e.fitSpans=e.getNgType=e.parseNgInterpolation=e.parseNgTemplateBindings=e.parseNgAction=e.parseNgSimpleBinding=e.parseNgBinding=e.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX=void 0;var t=(et(),Ne(Xe)),n=(en(),Ne(Jt)),r=(kn(),Ne(nn)),s="angular-estree-parser";e.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX="NgEstreeParser";var a=0,i=[s,a];function h(){return new r.Parser(new n.Lexer)}function l(o,d){let y=h(),{astInput:C,comments:E}=T(o,y),{ast:I,errors:j}=d(C,y);return R(j),{ast:I,comments:E}}function P(o){return l(o,(d,y)=>y.parseBinding(d,...i))}e.parseNgBinding=P;function p(o){return l(o,(d,y)=>y.parseSimpleBinding(d,...i))}e.parseNgSimpleBinding=p;function x(o){return l(o,(d,y)=>y.parseAction(d,...i))}e.parseNgAction=x;function A(o){let d=h(),{templateBindings:y,errors:C}=d.parseTemplateBindings(e.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX,o,s,a,a);return R(C),y}e.parseNgTemplateBindings=A;function b(o){let d=h(),{astInput:y,comments:C}=T(o,d),E="{{",I="}}",{ast:j,errors:an}=d.parseInterpolation(E+y+I,...i);R(an);let ft=j.expressions[0],gt=new Set;return _(ft,ke=>{gt.has(ke)||(ke.start-=E.length,ke.end-=E.length,gt.add(ke))}),{ast:ft,comments:C}}e.parseNgInterpolation=b;function _(o,d){if(!(!o||typeof o!="object")){if(Array.isArray(o))return o.forEach(y=>_(y,d));for(let y of Object.keys(o)){let C=o[y];y==="span"?d(C):_(C,d)}}}function R(o){if(o.length!==0){let[{message:d}]=o;throw new SyntaxError(d.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}}function T(o,d){let y=d._commentStart(o);return y===null?{astInput:o,comments:[]}:{astInput:o.slice(0,y),comments:[{type:"Comment",value:o.slice(y+2),span:{start:y,end:o.length}}]}}function O(o){return t.Unary&&o instanceof t.Unary?"Unary":o instanceof t.Binary?"Binary":o instanceof t.BindingPipe?"BindingPipe":o instanceof t.Chain?"Chain":o instanceof t.Conditional?"Conditional":o instanceof t.EmptyExpr?"EmptyExpr":o instanceof t.FunctionCall?"FunctionCall":o instanceof t.ImplicitReceiver?"ImplicitReceiver":o instanceof t.KeyedRead?"KeyedRead":o instanceof t.KeyedWrite?"KeyedWrite":o instanceof t.LiteralArray?"LiteralArray":o instanceof t.LiteralMap?"LiteralMap":o instanceof t.LiteralPrimitive?"LiteralPrimitive":o instanceof t.MethodCall?"MethodCall":o instanceof t.NonNullAssert?"NonNullAssert":o instanceof t.PrefixNot?"PrefixNot":o instanceof t.PropertyRead?"PropertyRead":o instanceof t.PropertyWrite?"PropertyWrite":o instanceof t.Quote?"Quote":o instanceof t.SafeMethodCall?"SafeMethodCall":o instanceof t.SafePropertyRead?"SafePropertyRead":o.type}e.getNgType=O;function N(o,d){let{start:y,end:C}=o,E=y,I=C;for(;I!==E&&/\s/.test(d[I-1]);)I--;for(;E!==I&&/\s/.test(d[E]);)E++;return{start:E,end:I}}function c(o,d){let{start:y,end:C}=o,E=y,I=C;for(;I!==d.length&&/\s/.test(d[I]);)I++;for(;E!==0&&/\s/.test(d[E-1]);)E--;return{start:E,end:I}}function g(o,d){return d[o.start-1]==="("&&d[o.end]===")"?{start:o.start-1,end:o.end+1}:o}function u(o,d,y){let C=0,E={start:o.start,end:o.end};for(;;){let I=c(E,d),j=g(I,d);if(I.start===j.start&&I.end===j.end)break;E.start=j.start,E.end=j.end,C++}return{hasParens:(y?C-1:C)!==0,outerSpan:N(y?{start:E.start+1,end:E.end-1}:E,d),innerSpan:N(o,d)}}e.fitSpans=u;function v(o,d,y){let C=d;for(;!o.test(y[C]);)if(--C<0)throw new Error("Cannot find front char ".concat(o," from index ").concat(d," in ").concat(JSON.stringify(y)));return C}e.findFrontChar=v;function m(o,d,y){let C=d;for(;!o.test(y[C]);)if(++C>=y.length)throw new Error("Cannot find back char ".concat(o," from index ").concat(d," in ").concat(JSON.stringify(y)));return C}e.findBackChar=m;function f(o){return o.slice(0,1).toLowerCase()+o.slice(1)}e.toLowerCamelCase=f;function w(o){return o.length===0?void 0:o[o.length-1]}e.getLast=w}}),sn=W({"node_modules/angular-estree-parser/lib/transform.js"(e){"use strict";L(),Object.defineProperty(e,"__esModule",{value:!0}),e.transformSpan=e.transform=void 0;var t=dt(),n=function(s,a){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,h=t.getNgType(s);switch(h){case"Unary":{let{operator:c,expr:g}=s,u=l(g);return p("UnaryExpression",{prefix:!0,argument:u,operator:c},s.span,{hasParentParens:i})}case"Binary":{let{left:c,operation:g,right:u}=s,v=u.span.start===u.span.end,m=c.span.start===c.span.end;if(v||m){let o=c.span.start===c.span.end?l(u):l(c);return p("UnaryExpression",{prefix:!0,argument:o,operator:v?"+":"-"},{start:s.span.start,end:N(o)},{hasParentParens:i})}let f=l(c),w=l(u);return p(g==="&&"||g==="||"?"LogicalExpression":"BinaryExpression",{left:f,right:w,operator:g},{start:O(f),end:N(w)},{hasParentParens:i})}case"BindingPipe":{let{exp:c,name:g,args:u}=s,v=l(c),m=b(/\S/,b(/\|/,N(v))+1),f=p("Identifier",{name:g},{start:m,end:m+g.length}),w=u.map(l);return p("NGPipeExpression",{left:v,right:f,arguments:w},{start:O(v),end:N(w.length===0?f:t.getLast(w))},{hasParentParens:i})}case"Chain":{let{expressions:c}=s;return p("NGChainedExpression",{expressions:c.map(l)},s.span,{hasParentParens:i})}case"Comment":{let{value:c}=s;return p("CommentLine",{value:c},s.span,{processSpan:!1})}case"Conditional":{let{condition:c,trueExp:g,falseExp:u}=s,v=l(c),m=l(g),f=l(u);return p("ConditionalExpression",{test:v,consequent:m,alternate:f},{start:O(v),end:N(f)},{hasParentParens:i})}case"EmptyExpr":return p("NGEmptyExpression",{},s.span,{hasParentParens:i});case"FunctionCall":{let{target:c,args:g}=s,u=g.length===1?[P(g[0])]:g.map(l),v=l(c);return p("CallExpression",{callee:v,arguments:u},{start:O(v),end:s.span.end},{hasParentParens:i})}case"ImplicitReceiver":return p("ThisExpression",{},s.span,{hasParentParens:i});case"KeyedRead":{let{key:c}=s,g=Object.prototype.hasOwnProperty.call(s,"receiver")?s.receiver:s.obj,u=l(c);return x(g,u,{computed:!0,optional:!1},{end:s.span.end,hasParentParens:i})}case"LiteralArray":{let{expressions:c}=s;return p("ArrayExpression",{elements:c.map(l)},s.span,{hasParentParens:i})}case"LiteralMap":{let{keys:c,values:g}=s,u=g.map(m=>l(m)),v=c.map((m,f)=>{let{key:w,quoted:o}=m,d=u[f],y=b(/\S/,f===0?s.span.start+1:b(/,/,N(u[f-1]))+1),C=A(/\S/,A(/:/,O(d)-1)-1)+1,E={start:y,end:C},I=o?p("StringLiteral",{value:w},E):p("Identifier",{name:w},E),j=I.end<I.start;return p("ObjectProperty",{key:I,value:d,method:!1,shorthand:j,computed:!1},{start:O(I),end:N(d)})});return p("ObjectExpression",{properties:v},s.span,{hasParentParens:i})}case"LiteralPrimitive":{let{value:c}=s;switch(typeof c){case"boolean":return p("BooleanLiteral",{value:c},s.span,{hasParentParens:i});case"number":return p("NumericLiteral",{value:c},s.span,{hasParentParens:i});case"object":return p("NullLiteral",{},s.span,{hasParentParens:i});case"string":return p("StringLiteral",{value:c},s.span,{hasParentParens:i});case"undefined":return p("Identifier",{name:"undefined"},s.span,{hasParentParens:i});default:throw new Error("Unexpected LiteralPrimitive value type ".concat(typeof c))}}case"MethodCall":case"SafeMethodCall":{let c=h==="SafeMethodCall",{receiver:g,name:u,args:v}=s,m=v.length===1?[P(v[0])]:v.map(l),f=A(/\S/,A(/\(/,(m.length===0?A(/\)/,s.span.end-1):O(m[0]))-1)-1)+1,w=p("Identifier",{name:u},{start:f-u.length,end:f}),o=x(g,w,{computed:!1,optional:c}),d=R(o);return p(c||d?"OptionalCallExpression":"CallExpression",{callee:o,arguments:m},{start:O(o),end:s.span.end},{hasParentParens:i})}case"NonNullAssert":{let{expression:c}=s,g=l(c);return p("TSNonNullExpression",{expression:g},{start:O(g),end:s.span.end},{hasParentParens:i})}case"PrefixNot":{let{expression:c}=s,g=l(c);return p("UnaryExpression",{prefix:!0,operator:"!",argument:g},{start:s.span.start,end:N(g)},{hasParentParens:i})}case"PropertyRead":case"SafePropertyRead":{let c=h==="SafePropertyRead",{receiver:g,name:u}=s,v=A(/\S/,s.span.end-1)+1,m=p("Identifier",{name:u},{start:v-u.length,end:v},_(g)?{hasParentParens:i}:{});return x(g,m,{computed:!1,optional:c},{hasParentParens:i})}case"KeyedWrite":{let{key:c,value:g}=s,u=Object.prototype.hasOwnProperty.call(s,"receiver")?s.receiver:s.obj,v=l(c),m=l(g),f=x(u,v,{computed:!0,optional:!1},{end:b(/\]/,N(v))+1});return p("AssignmentExpression",{left:f,operator:"=",right:m},{start:O(f),end:N(m)},{hasParentParens:i})}case"PropertyWrite":{let{receiver:c,name:g,value:u}=s,v=l(u),m=A(/\S/,A(/=/,O(v)-1)-1)+1,f=p("Identifier",{name:g},{start:m-g.length,end:m}),w=x(c,f,{computed:!1,optional:!1});return p("AssignmentExpression",{left:w,operator:"=",right:v},{start:O(w),end:N(v)},{hasParentParens:i})}case"Quote":{let{prefix:c,uninterpretedExpression:g}=s;return p("NGQuotedExpression",{prefix:c,value:g},s.span,{hasParentParens:i})}default:throw new Error("Unexpected node ".concat(h))}function l(c){return e.transform(c,a)}function P(c){return e.transform(c,a,!0)}function p(c,g,u){let{processSpan:v=!0,hasParentParens:m=!1}=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},f=Object.assign(Object.assign({type:c},r(u,a,v,m)),g);switch(c){case"Identifier":{let w=f;w.loc.identifierName=w.name;break}case"NumericLiteral":{let w=f;w.extra=Object.assign(Object.assign({},w.extra),{raw:a.text.slice(w.start,w.end),rawValue:w.value});break}case"StringLiteral":{let w=f;w.extra=Object.assign(Object.assign({},w.extra),{raw:a.text.slice(w.start,w.end),rawValue:w.value});break}}return f}function x(c,g,u){let{end:v=N(g),hasParentParens:m=!1}=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(_(c)||c.span.start===g.start)return g;let f=l(c),w=R(f);return p(u.optional||w?"OptionalMemberExpression":"MemberExpression",Object.assign({object:f,property:g,computed:u.computed},u.optional?{optional:!0}:w?{optional:!1}:null),{start:O(f),end:v},{hasParentParens:m})}function A(c,g){return t.findFrontChar(c,g,a.text)}function b(c,g){return t.findBackChar(c,g,a.text)}function _(c){return c.span.start>=c.span.end||/^\s+$/.test(a.text.slice(c.span.start,c.span.end))}function R(c){return(c.type==="OptionalCallExpression"||c.type==="OptionalMemberExpression")&&!T(c)}function T(c){return c.extra&&c.extra.parenthesized}function O(c){return T(c)?c.extra.parenStart:c.start}function N(c){return T(c)?c.extra.parenEnd:c.end}};e.transform=n;function r(s,a){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!i){let{start:x,end:A}=s;return{start:x,end:A,loc:{start:a.locator.locationForIndex(x),end:a.locator.locationForIndex(A)}}}let{outerSpan:l,innerSpan:P,hasParens:p}=t.fitSpans(s,a.text,h);return Object.assign({start:P.start,end:P.end,loc:{start:a.locator.locationForIndex(P.start),end:a.locator.locationForIndex(P.end)}},p&&{extra:{parenthesized:!0,parenStart:l.start,parenEnd:l.end}})}e.transformSpan=r}}),Nn=W({"node_modules/angular-estree-parser/lib/transform-microsyntax.js"(e){"use strict";L(),Object.defineProperty(e,"__esModule",{value:!0}),e.transformTemplateBindings=void 0;var t=(et(),Ne(Xe)),n=sn(),r=dt();function s(a,i){a.forEach(N);let[h]=a,{key:l}=h,P=i.text.slice(h.sourceSpan.start,h.sourceSpan.end).trim().length===0?a.slice(1):a,p=[],x=null;for(let u=0;u<P.length;u++){let v=P[u];if(x&&T(x)&&O(v)&&v.value&&v.value.source===x.key.source){let m=_("NGMicrosyntaxKey",{name:v.key.source},v.key.span),f=(d,y)=>Object.assign(Object.assign({},d),n.transformSpan({start:d.start,end:y},i)),w=d=>Object.assign(Object.assign({},f(d,m.end)),{alias:m}),o=p.pop();if(o.type==="NGMicrosyntaxExpression")p.push(w(o));else if(o.type==="NGMicrosyntaxKeyedExpression"){let d=w(o.expression);p.push(f(Object.assign(Object.assign({},o),{expression:d}),d.end))}else throw new Error("Unexpected type ".concat(o.type))}else p.push(A(v,u));x=v}return _("NGMicrosyntax",{body:p},p.length===0?a[0].sourceSpan:{start:p[0].start,end:p[p.length-1].end});function A(u,v){if(T(u)){let{key:m,value:f}=u;return f?v===0?_("NGMicrosyntaxExpression",{expression:b(f.ast),alias:null},f.sourceSpan):_("NGMicrosyntaxKeyedExpression",{key:_("NGMicrosyntaxKey",{name:R(m.source)},m.span),expression:_("NGMicrosyntaxExpression",{expression:b(f.ast),alias:null},f.sourceSpan)},{start:m.span.start,end:f.sourceSpan.end}):_("NGMicrosyntaxKey",{name:R(m.source)},m.span)}else{let{key:m,sourceSpan:f}=u;if(/^let\s$/.test(i.text.slice(f.start,f.start+4))){let{value:o}=u;return _("NGMicrosyntaxLet",{key:_("NGMicrosyntaxKey",{name:m.source},m.span),value:o?_("NGMicrosyntaxKey",{name:o.source},o.span):null},{start:f.start,end:o?o.span.end:m.span.end})}else{let o=g(u);return _("NGMicrosyntaxAs",{key:_("NGMicrosyntaxKey",{name:o.source},o.span),alias:_("NGMicrosyntaxKey",{name:m.source},m.span)},{start:o.span.start,end:m.span.end})}}}function b(u){return n.transform(u,i)}function _(u,v,m){let f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Object.assign(Object.assign({type:u},n.transformSpan(m,i,f)),v)}function R(u){return r.toLowerCamelCase(u.slice(l.source.length))}function T(u){return u instanceof t.ExpressionBinding}function O(u){return u instanceof t.VariableBinding}function N(u){c(u.key.span),O(u)&&u.value&&c(u.value.span)}function c(u){if(i.text[u.start]!=='"'&&i.text[u.start]!=="'")return;let v=i.text[u.start],m=!1;for(let f=u.start+1;f<i.text.length;f++)switch(i.text[f]){case v:if(!m){u.end=f+1;return}default:m=!1;break;case"\\":m=!m;break}}function g(u){if(!u.value||u.value.source!==r.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX)return u.value;let v=r.findBackChar(/\S/,u.sourceSpan.start,i.text);return{source:"$implicit",span:{start:v,end:v}}}}e.transformTemplateBindings=s}}),bn=W({"node_modules/angular-estree-parser/lib/index.js"(e){"use strict";L(),Object.defineProperty(e,"__esModule",{value:!0}),e.parseTemplateBindings=e.parseAction=e.parseInterpolation=e.parseSimpleBinding=e.parseBinding=void 0;var t=dn(),n=sn(),r=Nn(),s=dt();function a(x,A){let{ast:b,comments:_}=A(x),R=new t.Context(x),T=N=>n.transform(N,R),O=T(b);return O.comments=_.map(T),O}function i(x){return a(x,s.parseNgBinding)}e.parseBinding=i;function h(x){return a(x,s.parseNgSimpleBinding)}e.parseSimpleBinding=h;function l(x){return a(x,s.parseNgInterpolation)}e.parseInterpolation=l;function P(x){return a(x,s.parseNgAction)}e.parseAction=P;function p(x){return r.transformTemplateBindings(s.parseNgTemplateBindings(x),new t.Context(x))}e.parseTemplateBindings=p}}),Ln=W({"src/language-js/parse/angular.js"(e,t){L();var{locStart:n,locEnd:r}=hn();function s(a){return{astFormat:"estree",parse:(h,l,P)=>{let p=bn(),x=a(h,p);return{type:"NGRoot",node:P.parser==="__ng_action"&&x.type!=="NGChainedExpression"?Object.assign(Object.assign({},x),{},{type:"NGChainedExpression",expressions:[x]}):x}},locStart:n,locEnd:r}}t.exports={parsers:{__ng_action:s((a,i)=>i.parseAction(a)),__ng_binding:s((a,i)=>i.parseBinding(a)),__ng_interpolation:s((a,i)=>i.parseInterpolation(a)),__ng_directive:s((a,i)=>i.parseTemplateBindings(a))}}}}),Rn=Ln();export{Rn as default};
|
|
1
|
+
var cs=Object.create;var _e=Object.defineProperty;var hs=Object.getOwnPropertyDescriptor;var ps=Object.getOwnPropertyNames;var us=Object.getPrototypeOf,ls=Object.prototype.hasOwnProperty;var j=(r,e)=>()=>(r&&(e=r(r=0)),e);var le=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Ze=(r,e)=>{for(var t in e)_e(r,t,{get:e[t],enumerable:!0})},Pt=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ps(e))!ls.call(r,n)&&n!==t&&_e(r,n,{get:()=>e[n],enumerable:!(s=hs(e,n))||s.enumerable});return r};var ds=(r,e,t)=>(t=r!=null?cs(us(r)):{},Pt(e||!r||!r.__esModule?_e(t,"default",{value:r,enumerable:!0}):t,r)),be=r=>Pt(_e({},"__esModule",{value:!0}),r);var m=j(()=>{});var bt=le(we=>{"use strict";m();we.__esModule=!0;we.LinesAndColumns=void 0;var Be=`
|
|
2
|
+
`,Lt="\r",_t=function(){function r(e){this.string=e;for(var t=[0],s=0;s<e.length;)switch(e[s]){case Be:s+=Be.length,t.push(s);break;case Lt:s+=Lt.length,e[s]===Be&&(s+=Be.length),t.push(s);break;default:s++;break}this.offsets=t}return r.prototype.locationForIndex=function(e){if(e<0||e>this.string.length)return null;for(var t=0,s=this.offsets;s[t+1]<=e;)t++;var n=e-s[t];return{line:t,column:n}},r.prototype.indexForLocation=function(e){var t=e.line,s=e.column;return t<0||t>=this.offsets.length||s<0||s>this.lengthOfLine(t)?null:this.offsets[t]+s},r.prototype.lengthOfLine=function(e){var t=this.offsets[e],s=e===this.offsets.length-1?this.string.length:this.offsets[e+1];return s-t},r}();we.LinesAndColumns=_t;we.default=_t});var Bt=le(Te=>{"use strict";m();Object.defineProperty(Te,"__esModule",{value:!0});Te.Context=void 0;var fs=bt(),Ye=class{constructor(e){this.text=e,this.locator=new et(this.text)}};Te.Context=Ye;var et=class{constructor(e){this._lineAndColumn=new fs.default(e)}locationForIndex(e){let{line:t,column:s}=this._lineAndColumn.locationForIndex(e);return{line:t+1,column:s}}}});var ot={};Ze(ot,{AST:()=>E,ASTWithName:()=>M,ASTWithSource:()=>K,AbsoluteSourceSpan:()=>B,AstMemoryEfficientTransformer:()=>st,AstTransformer:()=>tt,Binary:()=>I,BindingPipe:()=>Y,BoundElementProperty:()=>at,Chain:()=>V,Conditional:()=>q,EmptyExpr:()=>R,ExpressionBinding:()=>Ee,FunctionCall:()=>oe,ImplicitReceiver:()=>W,Interpolation:()=>se,KeyedRead:()=>X,KeyedWrite:()=>J,LiteralArray:()=>ee,LiteralMap:()=>te,LiteralPrimitive:()=>P,MethodCall:()=>ie,NonNullAssert:()=>ne,ParseSpan:()=>T,ParsedEvent:()=>nt,ParsedProperty:()=>rt,ParsedPropertyType:()=>Ce,ParsedVariable:()=>it,ParserError:()=>Q,PrefixNot:()=>re,PropertyRead:()=>F,PropertyWrite:()=>H,Quote:()=>de,RecursiveAstVisitor:()=>Ae,SafeKeyedRead:()=>Z,SafeMethodCall:()=>ae,SafePropertyRead:()=>z,ThisReceiver:()=>ye,Unary:()=>L,VariableBinding:()=>xe});var Q,T,E,M,de,R,W,ye,V,q,F,H,z,X,Z,J,Y,P,ee,te,se,I,L,re,ne,ie,ae,oe,B,K,xe,Ee,Ae,tt,st,rt,Ce,nt,it,at,Ke=j(()=>{m();Q=class{constructor(e,t,s,n){this.input=t,this.errLocation=s,this.ctxLocation=n,this.message=`Parser Error: ${e} ${s} [${t}] in ${n}`}},T=class{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new B(e+this.start,e+this.end)}},E=class{constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return"AST"}},M=class extends E{constructor(e,t,s){super(e,t),this.nameSpan=s}},de=class extends E{constructor(e,t,s,n,i){super(e,t),this.prefix=s,this.uninterpretedExpression=n,this.location=i}visit(e,t=null){return e.visitQuote(this,t)}toString(){return"Quote"}},R=class extends E{visit(e,t=null){}},W=class extends E{visit(e,t=null){return e.visitImplicitReceiver(this,t)}},ye=class extends W{visit(e,t=null){var s;return(s=e.visitThisReceiver)===null||s===void 0?void 0:s.call(e,this,t)}},V=class extends E{constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitChain(this,t)}},q=class extends E{constructor(e,t,s,n,i){super(e,t),this.condition=s,this.trueExp=n,this.falseExp=i}visit(e,t=null){return e.visitConditional(this,t)}},F=class extends M{constructor(e,t,s,n,i){super(e,t,s),this.receiver=n,this.name=i}visit(e,t=null){return e.visitPropertyRead(this,t)}},H=class extends M{constructor(e,t,s,n,i,a){super(e,t,s),this.receiver=n,this.name=i,this.value=a}visit(e,t=null){return e.visitPropertyWrite(this,t)}},z=class extends M{constructor(e,t,s,n,i){super(e,t,s),this.receiver=n,this.name=i}visit(e,t=null){return e.visitSafePropertyRead(this,t)}},X=class extends E{constructor(e,t,s,n){super(e,t),this.receiver=s,this.key=n}visit(e,t=null){return e.visitKeyedRead(this,t)}},Z=class extends E{constructor(e,t,s,n){super(e,t),this.receiver=s,this.key=n}visit(e,t=null){return e.visitSafeKeyedRead(this,t)}},J=class extends E{constructor(e,t,s,n,i){super(e,t),this.receiver=s,this.key=n,this.value=i}visit(e,t=null){return e.visitKeyedWrite(this,t)}},Y=class extends M{constructor(e,t,s,n,i,a){super(e,t,a),this.exp=s,this.name=n,this.args=i}visit(e,t=null){return e.visitPipe(this,t)}},P=class extends E{constructor(e,t,s){super(e,t),this.value=s}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}},ee=class extends E{constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitLiteralArray(this,t)}},te=class extends E{constructor(e,t,s,n){super(e,t),this.keys=s,this.values=n}visit(e,t=null){return e.visitLiteralMap(this,t)}},se=class extends E{constructor(e,t,s,n){super(e,t),this.strings=s,this.expressions=n}visit(e,t=null){return e.visitInterpolation(this,t)}},I=class extends E{constructor(e,t,s,n,i){super(e,t),this.operation=s,this.left=n,this.right=i}visit(e,t=null){return e.visitBinary(this,t)}},L=class extends I{constructor(e,t,s,n,i,a,h){super(e,t,i,a,h),this.operator=s,this.expr=n}static createMinus(e,t,s){return new L(e,t,"-",s,"-",new P(e,t,0),s)}static createPlus(e,t,s){return new L(e,t,"+",s,"-",s,new P(e,t,0))}visit(e,t=null){return e.visitUnary!==void 0?e.visitUnary(this,t):e.visitBinary(this,t)}},re=class extends E{constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitPrefixNot(this,t)}},ne=class extends E{constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitNonNullAssert(this,t)}},ie=class extends M{constructor(e,t,s,n,i,a,h){super(e,t,s),this.receiver=n,this.name=i,this.args=a,this.argumentSpan=h}visit(e,t=null){return e.visitMethodCall(this,t)}},ae=class extends M{constructor(e,t,s,n,i,a,h){super(e,t,s),this.receiver=n,this.name=i,this.args=a,this.argumentSpan=h}visit(e,t=null){return e.visitSafeMethodCall(this,t)}},oe=class extends E{constructor(e,t,s,n){super(e,t),this.target=s,this.args=n}visit(e,t=null){return e.visitFunctionCall(this,t)}},B=class{constructor(e,t){this.start=e,this.end=t}},K=class extends E{constructor(e,t,s,n,i){super(new T(0,t===null?0:t.length),new B(n,t===null?n:n+t.length)),this.ast=e,this.source=t,this.location=s,this.errors=i}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}},xe=class{constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},Ee=class{constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},Ae=class{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.receiver,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.receiver,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)}visitSafeKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitQuote(e,t){}visitAll(e,t){for(let s of e)this.visit(s,t)}},tt=class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){return new se(e.span,e.sourceSpan,e.strings,this.visitAll(e.expressions))}visitLiteralPrimitive(e,t){return new P(e.span,e.sourceSpan,e.value)}visitPropertyRead(e,t){return new F(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitPropertyWrite(e,t){return new H(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,e.value.visit(this))}visitSafePropertyRead(e,t){return new z(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitMethodCall(e,t){return new ie(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args),e.argumentSpan)}visitSafeMethodCall(e,t){return new ae(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args),e.argumentSpan)}visitFunctionCall(e,t){return new oe(e.span,e.sourceSpan,e.target.visit(this),this.visitAll(e.args))}visitLiteralArray(e,t){return new ee(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitLiteralMap(e,t){return new te(e.span,e.sourceSpan,e.keys,this.visitAll(e.values))}visitUnary(e,t){switch(e.operator){case"+":return L.createPlus(e.span,e.sourceSpan,e.expr.visit(this));case"-":return L.createMinus(e.span,e.sourceSpan,e.expr.visit(this));default:throw new Error(`Unknown unary operator ${e.operator}`)}}visitBinary(e,t){return new I(e.span,e.sourceSpan,e.operation,e.left.visit(this),e.right.visit(this))}visitPrefixNot(e,t){return new re(e.span,e.sourceSpan,e.expression.visit(this))}visitNonNullAssert(e,t){return new ne(e.span,e.sourceSpan,e.expression.visit(this))}visitConditional(e,t){return new q(e.span,e.sourceSpan,e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))}visitPipe(e,t){return new Y(e.span,e.sourceSpan,e.exp.visit(this),e.name,this.visitAll(e.args),e.nameSpan)}visitKeyedRead(e,t){return new X(e.span,e.sourceSpan,e.receiver.visit(this),e.key.visit(this))}visitKeyedWrite(e,t){return new J(e.span,e.sourceSpan,e.receiver.visit(this),e.key.visit(this),e.value.visit(this))}visitAll(e){let t=[];for(let s=0;s<e.length;++s)t[s]=e[s].visit(this);return t}visitChain(e,t){return new V(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitQuote(e,t){return new de(e.span,e.sourceSpan,e.prefix,e.uninterpretedExpression,e.location)}visitSafeKeyedRead(e,t){return new Z(e.span,e.sourceSpan,e.receiver.visit(this),e.key.visit(this))}},st=class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){let s=this.visitAll(e.expressions);return s!==e.expressions?new se(e.span,e.sourceSpan,e.strings,s):e}visitLiteralPrimitive(e,t){return e}visitPropertyRead(e,t){let s=e.receiver.visit(this);return s!==e.receiver?new F(e.span,e.sourceSpan,e.nameSpan,s,e.name):e}visitPropertyWrite(e,t){let s=e.receiver.visit(this),n=e.value.visit(this);return s!==e.receiver||n!==e.value?new H(e.span,e.sourceSpan,e.nameSpan,s,e.name,n):e}visitSafePropertyRead(e,t){let s=e.receiver.visit(this);return s!==e.receiver?new z(e.span,e.sourceSpan,e.nameSpan,s,e.name):e}visitMethodCall(e,t){let s=e.receiver.visit(this),n=this.visitAll(e.args);return s!==e.receiver||n!==e.args?new ie(e.span,e.sourceSpan,e.nameSpan,s,e.name,n,e.argumentSpan):e}visitSafeMethodCall(e,t){let s=e.receiver.visit(this),n=this.visitAll(e.args);return s!==e.receiver||n!==e.args?new ae(e.span,e.sourceSpan,e.nameSpan,s,e.name,n,e.argumentSpan):e}visitFunctionCall(e,t){let s=e.target&&e.target.visit(this),n=this.visitAll(e.args);return s!==e.target||n!==e.args?new oe(e.span,e.sourceSpan,s,n):e}visitLiteralArray(e,t){let s=this.visitAll(e.expressions);return s!==e.expressions?new ee(e.span,e.sourceSpan,s):e}visitLiteralMap(e,t){let s=this.visitAll(e.values);return s!==e.values?new te(e.span,e.sourceSpan,e.keys,s):e}visitUnary(e,t){let s=e.expr.visit(this);if(s!==e.expr)switch(e.operator){case"+":return L.createPlus(e.span,e.sourceSpan,s);case"-":return L.createMinus(e.span,e.sourceSpan,s);default:throw new Error(`Unknown unary operator ${e.operator}`)}return e}visitBinary(e,t){let s=e.left.visit(this),n=e.right.visit(this);return s!==e.left||n!==e.right?new I(e.span,e.sourceSpan,e.operation,s,n):e}visitPrefixNot(e,t){let s=e.expression.visit(this);return s!==e.expression?new re(e.span,e.sourceSpan,s):e}visitNonNullAssert(e,t){let s=e.expression.visit(this);return s!==e.expression?new ne(e.span,e.sourceSpan,s):e}visitConditional(e,t){let s=e.condition.visit(this),n=e.trueExp.visit(this),i=e.falseExp.visit(this);return s!==e.condition||n!==e.trueExp||i!==e.falseExp?new q(e.span,e.sourceSpan,s,n,i):e}visitPipe(e,t){let s=e.exp.visit(this),n=this.visitAll(e.args);return s!==e.exp||n!==e.args?new Y(e.span,e.sourceSpan,s,e.name,n,e.nameSpan):e}visitKeyedRead(e,t){let s=e.receiver.visit(this),n=e.key.visit(this);return s!==e.receiver||n!==e.key?new X(e.span,e.sourceSpan,s,n):e}visitKeyedWrite(e,t){let s=e.receiver.visit(this),n=e.key.visit(this),i=e.value.visit(this);return s!==e.receiver||n!==e.key||i!==e.value?new J(e.span,e.sourceSpan,s,n,i):e}visitAll(e){let t=[],s=!1;for(let n=0;n<e.length;++n){let i=e[n],a=i.visit(this);t[n]=a,s=s||a!==i}return s?t:e}visitChain(e,t){let s=this.visitAll(e.expressions);return s!==e.expressions?new V(e.span,e.sourceSpan,s):e}visitQuote(e,t){return e}visitSafeKeyedRead(e,t){let s=e.receiver.visit(this),n=e.key.visit(this);return s!==e.receiver||n!==e.key?new Z(e.span,e.sourceSpan,s,n):e}},rt=class{constructor(e,t,s,n,i,a){this.name=e,this.expression=t,this.type=s,this.sourceSpan=n,this.keySpan=i,this.valueSpan=a,this.isLiteral=this.type===Ce.LITERAL_ATTR,this.isAnimation=this.type===Ce.ANIMATION}};(function(r){r[r.DEFAULT=0]="DEFAULT",r[r.LITERAL_ATTR=1]="LITERAL_ATTR",r[r.ANIMATION=2]="ANIMATION"})(Ce||(Ce={}));nt=class{constructor(e,t,s,n,i,a,h){this.name=e,this.targetOrPhase=t,this.type=s,this.handler=n,this.sourceSpan=i,this.handlerSpan=a,this.keySpan=h}},it=class{constructor(e,t,s,n,i){this.name=e,this.value=t,this.sourceSpan=s,this.keySpan=n,this.valueSpan=i}},at=class{constructor(e,t,s,n,i,a,h,x){this.name=e,this.type=t,this.securityContext=s,this.value=n,this.unit=i,this.sourceSpan=a,this.keySpan=h,this.valueSpan=x}}});function Tt(r){return r>=9&&r<=32||r==160}function U(r){return 48<=r&&r<=57}function Kt(r){return r>=97&&r<=122||r>=65&&r<=90}function ct(r){return r===39||r===34||r===96}var ht=j(()=>{m();});var Vt={};Ze(Vt,{EOF:()=>ke,Lexer:()=>ut,Token:()=>_,TokenType:()=>f,isIdentifier:()=>ft});function Dt(r,e,t){return new _(r,e,f.Character,t,String.fromCharCode(t))}function Vs(r,e,t){return new _(r,e,f.Identifier,0,t)}function qs(r,e,t){return new _(r,e,f.PrivateIdentifier,0,t)}function Hs(r,e,t){return new _(r,e,f.Keyword,0,t)}function pt(r,e,t){return new _(r,e,f.Operator,0,t)}function zs(r,e,t){return new _(r,e,f.String,0,t)}function Xs(r,e,t){return new _(r,e,f.Number,t,"")}function Zs(r,e,t){return new _(r,e,f.Error,0,t)}function lt(r){return 97<=r&&r<=122||65<=r&&r<=90||r==95||r==36}function ft(r){if(r.length==0)return!1;let e=new Ue(r);if(!lt(e.peek))return!1;for(e.advance();e.peek!==0;){if(!dt(e.peek))return!1;e.advance()}return!0}function dt(r){return Kt(r)||U(r)||r==95||r==36}function Js(r){return r==101||r==69}function Ys(r){return r==45||r==43}function er(r){switch(r){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return r}}function tr(r){let e=parseInt(r);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+r);return e}var f,Ws,ut,_,ke,Ue,vt=j(()=>{m();ht();(function(r){r[r.Character=0]="Character",r[r.Identifier=1]="Identifier",r[r.PrivateIdentifier=2]="PrivateIdentifier",r[r.Keyword=3]="Keyword",r[r.String=4]="String",r[r.Operator=5]="Operator",r[r.Number=6]="Number",r[r.Error=7]="Error"})(f||(f={}));Ws=["var","let","as","null","undefined","true","false","if","else","this"],ut=class{tokenize(e){let t=new Ue(e),s=[],n=t.scanToken();for(;n!=null;)s.push(n),n=t.scanToken();return s}},_=class{constructor(e,t,s,n,i){this.index=e,this.end=t,this.type=s,this.numValue=n,this.strValue=i}isCharacter(e){return this.type==f.Character&&this.numValue==e}isNumber(){return this.type==f.Number}isString(){return this.type==f.String}isOperator(e){return this.type==f.Operator&&this.strValue==e}isIdentifier(){return this.type==f.Identifier}isPrivateIdentifier(){return this.type==f.PrivateIdentifier}isKeyword(){return this.type==f.Keyword}isKeywordLet(){return this.type==f.Keyword&&this.strValue=="let"}isKeywordAs(){return this.type==f.Keyword&&this.strValue=="as"}isKeywordNull(){return this.type==f.Keyword&&this.strValue=="null"}isKeywordUndefined(){return this.type==f.Keyword&&this.strValue=="undefined"}isKeywordTrue(){return this.type==f.Keyword&&this.strValue=="true"}isKeywordFalse(){return this.type==f.Keyword&&this.strValue=="false"}isKeywordThis(){return this.type==f.Keyword&&this.strValue=="this"}isError(){return this.type==f.Error}toNumber(){return this.type==f.Number?this.numValue:-1}toString(){switch(this.type){case f.Character:case f.Identifier:case f.Keyword:case f.Operator:case f.PrivateIdentifier:case f.String:case f.Error:return this.strValue;case f.Number:return this.numValue.toString();default:return null}}};ke=new _(-1,-1,f.Character,0,""),Ue=class{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(){let e=this.input,t=this.length,s=this.peek,n=this.index;for(;s<=32;)if(++n>=t){s=0;break}else s=e.charCodeAt(n);if(this.peek=s,this.index=n,n>=t)return null;if(lt(s))return this.scanIdentifier();if(U(s))return this.scanNumber(n);let i=n;switch(s){case 46:return this.advance(),U(this.peek)?this.scanNumber(i):Dt(i,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(i,s);case 39:case 34:return this.scanString();case 35:return this.scanPrivateIdentifier();case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(i,String.fromCharCode(s));case 63:return this.scanQuestion(i);case 60:case 62:return this.scanComplexOperator(i,String.fromCharCode(s),61,"=");case 33:case 61:return this.scanComplexOperator(i,String.fromCharCode(s),61,"=",61,"=");case 38:return this.scanComplexOperator(i,"&",38,"&");case 124:return this.scanComplexOperator(i,"|",124,"|");case 160:for(;Tt(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(s)}]`,0)}scanCharacter(e,t){return this.advance(),Dt(e,this.index,t)}scanOperator(e,t){return this.advance(),pt(e,this.index,t)}scanComplexOperator(e,t,s,n,i,a){this.advance();let h=t;return this.peek==s&&(this.advance(),h+=n),i!=null&&this.peek==i&&(this.advance(),h+=a),pt(e,this.index,h)}scanIdentifier(){let e=this.index;for(this.advance();dt(this.peek);)this.advance();let t=this.input.substring(e,this.index);return Ws.indexOf(t)>-1?Hs(e,this.index,t):Vs(e,this.index,t)}scanPrivateIdentifier(){let e=this.index;if(this.advance(),!lt(this.peek))return this.error("Invalid character [#]",-1);for(;dt(this.peek);)this.advance();let t=this.input.substring(e,this.index);return qs(e,this.index,t)}scanNumber(e){let t=this.index===e,s=!1;for(this.advance();;){if(!U(this.peek))if(this.peek===95){if(!U(this.input.charCodeAt(this.index-1))||!U(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);s=!0}else if(this.peek===46)t=!1;else if(Js(this.peek)){if(this.advance(),Ys(this.peek)&&this.advance(),!U(this.peek))return this.error("Invalid exponent",-1);t=!1}else break;this.advance()}let n=this.input.substring(e,this.index);s&&(n=n.replace(/_/g,""));let i=t?tr(n):parseFloat(n);return Xs(e,this.index,i)}scanString(){let e=this.index,t=this.peek;this.advance();let s="",n=this.index,i=this.input;for(;this.peek!=t;)if(this.peek==92){s+=i.substring(n,this.index),this.advance();let h;if(this.peek=this.peek,this.peek==117){let x=i.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(x))h=parseInt(x,16);else return this.error(`Invalid unicode escape [\\u${x}]`,0);for(let v=0;v<5;v++)this.advance()}else h=er(this.peek),this.advance();s+=String.fromCharCode(h),n=this.index}else{if(this.peek==0)return this.error("Unterminated quote",0);this.advance()}let a=i.substring(n,this.index);return this.advance(),zs(e,this.index,s+a)}scanQuestion(e){this.advance();let t="?";return(this.peek===63||this.peek===46)&&(t+=this.peek===46?".":"?",this.advance()),pt(e,this.index,t)}error(e,t){let s=this.index+t;return Zs(s,this.index,`Lexer Error: ${e} at column ${s} in expression [${this.input}]`)}}});function qt(r,e){if(e!=null&&!(Array.isArray(e)&&e.length==2))throw new Error(`Expected '${r}' to be an array, [start, end].`);if(e!=null){let t=e[0],s=e[1];sr.forEach(n=>{if(n.test(t)||n.test(s))throw new Error(`['${t}', '${s}'] contains unusable interpolation symbol.`)})}}var sr,Ht=j(()=>{m();sr=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//]});var Pe,ue,zt=j(()=>{m();Ht();Pe=class{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(qt("interpolation",e),new Pe(e[0],e[1])):ue}},ue=new Pe("{{","}}")});var Xt={};Ze(Xt,{IvyParser:()=>gt,Parser:()=>We,SplitInterpolation:()=>je,TemplateBindingParseResult:()=>Qe,_ParseAST:()=>G});var je,Qe,We,gt,me,G,mt,St,Zt=j(()=>{m();ht();zt();Ke();vt();je=class{constructor(e,t,s){this.strings=e,this.expressions=t,this.offsets=s}},Qe=class{constructor(e,t,s){this.templateBindings=e,this.warnings=t,this.errors=s}},We=class{constructor(e){this._lexer=e,this.errors=[],this.simpleExpressionChecker=mt}parseAction(e,t,s,n=ue){this._checkNoInterpolation(e,t,n);let i=this._stripComments(e),a=this._lexer.tokenize(this._stripComments(e)),h=new G(e,t,s,a,i.length,!0,this.errors,e.length-i.length).parseChain();return new K(h,e,t,s,this.errors)}parseBinding(e,t,s,n=ue){let i=this._parseBindingAst(e,t,s,n);return new K(i,e,t,s,this.errors)}checkSimpleExpression(e){let t=new this.simpleExpressionChecker;return e.visit(t),t.errors}parseSimpleBinding(e,t,s,n=ue){let i=this._parseBindingAst(e,t,s,n),a=this.checkSimpleExpression(i);return a.length>0&&this._reportError(`Host binding expression cannot contain ${a.join(" ")}`,e,t),new K(i,e,t,s,this.errors)}_reportError(e,t,s,n){this.errors.push(new Q(e,t,s,n))}_parseBindingAst(e,t,s,n){let i=this._parseQuote(e,t,s);if(i!=null)return i;this._checkNoInterpolation(e,t,n);let a=this._stripComments(e),h=this._lexer.tokenize(a);return new G(e,t,s,h,a.length,!1,this.errors,e.length-a.length).parseChain()}_parseQuote(e,t,s){if(e==null)return null;let n=e.indexOf(":");if(n==-1)return null;let i=e.substring(0,n).trim();if(!ft(i))return null;let a=e.substring(n+1),h=new T(0,e.length);return new de(h,h.toAbsolute(s),i,a,t)}parseTemplateBindings(e,t,s,n,i){let a=this._lexer.tokenize(t);return new G(t,s,i,a,t.length,!1,this.errors,0).parseTemplateBindings({source:e,span:new B(n,n+e.length)})}parseInterpolation(e,t,s,n=ue){let{strings:i,expressions:a,offsets:h}=this.splitInterpolation(e,t,n);if(a.length===0)return null;let x=[];for(let v=0;v<a.length;++v){let A=a[v].text,N=this._stripComments(A),O=this._lexer.tokenize(N),w=new G(e,t,s,O,N.length,!1,this.errors,h[v]+(A.length-N.length)).parseChain();x.push(w)}return this.createInterpolationAst(i.map(v=>v.text),x,e,t,s)}parseInterpolationExpression(e,t,s){let n=this._stripComments(e),i=this._lexer.tokenize(n),a=new G(e,t,s,i,n.length,!1,this.errors,0).parseChain(),h=["",""];return this.createInterpolationAst(h,[a],e,t,s)}createInterpolationAst(e,t,s,n,i){let a=new T(0,s.length),h=new se(a,a.toAbsolute(i),e,t);return new K(h,s,n,i,this.errors)}splitInterpolation(e,t,s=ue){let n=[],i=[],a=[],h=0,x=!1,v=!1,{start:A,end:N}=s;for(;h<e.length;)if(x){let O=h,w=O+A.length,C=this._getInterpolationEndIndex(e,N,w);if(C===-1){x=!1,v=!0;break}let c=C+N.length,o=e.substring(w,C);o.trim().length===0&&this._reportError("Blank expressions are not allowed in interpolated strings",e,`at column ${h} in`,t),i.push({text:o,start:O,end:c}),a.push(w),h=c,x=!1}else{let O=h;h=e.indexOf(A,h),h===-1&&(h=e.length);let w=e.substring(O,h);n.push({text:w,start:O,end:h}),x=!0}if(!x)if(v){let O=n[n.length-1];O.text+=e.substring(h),O.end=e.length}else n.push({text:e.substring(h),start:h,end:e.length});return new je(n,i,a)}wrapLiteralPrimitive(e,t,s){let n=new T(0,e==null?0:e.length);return new K(new P(n,n.toAbsolute(s),e),e,t,s,this.errors)}_stripComments(e){let t=this._commentStart(e);return t!=null?e.substring(0,t).trim():e}_commentStart(e){let t=null;for(let s=0;s<e.length-1;s++){let n=e.charCodeAt(s),i=e.charCodeAt(s+1);if(n===47&&i==47&&t==null)return s;t===n?t=null:t==null&&ct(n)&&(t=n)}return null}_checkNoInterpolation(e,t,{start:s,end:n}){let i=-1,a=-1;for(let h of this._forEachUnquotedChar(e,0))if(i===-1)e.startsWith(s)&&(i=h);else if(a=this._getInterpolationEndIndex(e,n,h),a>-1)break;i>-1&&a>-1&&this._reportError(`Got interpolation (${s}${n}) where expression was expected`,e,`at column ${i} in`,t)}_getInterpolationEndIndex(e,t,s){for(let n of this._forEachUnquotedChar(e,s)){if(e.startsWith(t,n))return n;if(e.startsWith("//",n))return e.indexOf(t,n)}return-1}*_forEachUnquotedChar(e,t){let s=null,n=0;for(let i=t;i<e.length;i++){let a=e[i];ct(e.charCodeAt(i))&&(s===null||s===a)&&n%2===0?s=s===null?a:null:s===null&&(yield i),n=a==="\\"?n+1:0}}},gt=class extends We{constructor(){super(...arguments),this.simpleExpressionChecker=St}};(function(r){r[r.None=0]="None",r[r.Writable=1]="Writable"})(me||(me={}));G=class{constructor(e,t,s,n,i,a,h,x){this.input=e,this.location=t,this.absoluteOffset=s,this.tokens=n,this.inputLength=i,this.parseAction=a,this.errors=h,this.offset=x,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=me.None,this.sourceSpanCache=new Map,this.index=0}peek(e){let t=this.index+e;return t<this.tokens.length?this.tokens[t]:ke}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:this.tokens.length===0?this.inputLength+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e,t){let s=this.currentEndIndex;if(t!==void 0&&t>this.currentEndIndex&&(s=t),e>s){let n=s;s=e,e=n}return new T(e,s)}sourceSpan(e,t){let s=`${e}@${this.inputIndex}:${t}`;return this.sourceSpanCache.has(s)||this.sourceSpanCache.set(s,this.span(e,t).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(s)}advance(){this.index++}withContext(e,t){this.context|=e;let s=t();return this.context^=e,s}consumeOptionalCharacter(e){return this.next.isCharacter(e)?(this.advance(),!0):!1}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):!1}expectOperator(e){this.consumeOptionalOperator(e)||this.error(`Missing expected operator ${e}`)}prettyPrintToken(e){return e===ke?"end of input":`token ${e}`}expectIdentifierOrKeyword(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),null):(this.advance(),e.toString())}expectIdentifierOrKeywordOrString(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()&&!e.isString()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),""):(this.advance(),e.toString())}parseChain(){let e=[],t=this.inputIndex;for(;this.index<this.tokens.length;){let s=this.parsePipe();if(e.push(s),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}'`)}if(e.length==0){let s=this.offset,n=this.offset+this.inputLength;return new R(this.span(s,n),this.sourceSpan(s,n))}return e.length==1?e[0]:new V(this.span(t),this.sourceSpan(t),e)}parsePipe(){let e=this.inputIndex,t=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{let s=this.inputIndex,n=this.expectIdentifierOrKeyword(),i,a;n!==null?i=this.sourceSpan(s):(n="",a=this.next.index!==-1?this.next.index:this.inputLength+this.offset,i=new T(a,a).toAbsolute(this.absoluteOffset));let h=[];for(;this.consumeOptionalCharacter(58);)h.push(this.parseExpression());t=new Y(this.span(e),this.sourceSpan(e,a),t,n,h,i)}while(this.consumeOptionalOperator("|"))}return t}parseExpression(){return this.parseConditional()}parseConditional(){let e=this.inputIndex,t=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){let s=this.parsePipe(),n;if(this.consumeOptionalCharacter(58))n=this.parsePipe();else{let i=this.inputIndex,a=this.input.substring(e,i);this.error(`Conditional expression ${a} requires all 3 expressions`),n=new R(this.span(e),this.sourceSpan(e))}return new q(this.span(e),this.sourceSpan(e),t,s,n)}else return t}parseLogicalOr(){let e=this.inputIndex,t=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){let s=this.parseLogicalAnd();t=new I(this.span(e),this.sourceSpan(e),"||",t,s)}return t}parseLogicalAnd(){let e=this.inputIndex,t=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){let s=this.parseNullishCoalescing();t=new I(this.span(e),this.sourceSpan(e),"&&",t,s)}return t}parseNullishCoalescing(){let e=this.inputIndex,t=this.parseEquality();for(;this.consumeOptionalOperator("??");){let s=this.parseEquality();t=new I(this.span(e),this.sourceSpan(e),"??",t,s)}return t}parseEquality(){let e=this.inputIndex,t=this.parseRelational();for(;this.next.type==f.Operator;){let s=this.next.strValue;switch(s){case"==":case"===":case"!=":case"!==":this.advance();let n=this.parseRelational();t=new I(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parseRelational(){let e=this.inputIndex,t=this.parseAdditive();for(;this.next.type==f.Operator;){let s=this.next.strValue;switch(s){case"<":case">":case"<=":case">=":this.advance();let n=this.parseAdditive();t=new I(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parseAdditive(){let e=this.inputIndex,t=this.parseMultiplicative();for(;this.next.type==f.Operator;){let s=this.next.strValue;switch(s){case"+":case"-":this.advance();let n=this.parseMultiplicative();t=new I(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parseMultiplicative(){let e=this.inputIndex,t=this.parsePrefix();for(;this.next.type==f.Operator;){let s=this.next.strValue;switch(s){case"*":case"%":case"/":this.advance();let n=this.parsePrefix();t=new I(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parsePrefix(){if(this.next.type==f.Operator){let e=this.inputIndex,t=this.next.strValue,s;switch(t){case"+":return this.advance(),s=this.parsePrefix(),L.createPlus(this.span(e),this.sourceSpan(e),s);case"-":return this.advance(),s=this.parsePrefix(),L.createMinus(this.span(e),this.sourceSpan(e),s);case"!":return this.advance(),s=this.parsePrefix(),new re(this.span(e),this.sourceSpan(e),s)}}return this.parseCallChain()}parseCallChain(){let e=this.inputIndex,t=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(46))t=this.parseAccessMemberOrMethodCall(t,e,!1);else if(this.consumeOptionalOperator("?."))t=this.consumeOptionalCharacter(91)?this.parseKeyedReadOrWrite(t,e,!0):this.parseAccessMemberOrMethodCall(t,e,!0);else if(this.consumeOptionalCharacter(91))t=this.parseKeyedReadOrWrite(t,e,!1);else if(this.consumeOptionalCharacter(40)){this.rparensExpected++;let s=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(41),t=new oe(this.span(e),this.sourceSpan(e),t,s)}else if(this.consumeOptionalOperator("!"))t=new ne(this.span(e),this.sourceSpan(e),t);else return t}parsePrimary(){let e=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;let t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),t}else{if(this.next.isKeywordNull())return this.advance(),new P(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new P(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new P(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new P(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new ye(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;let t=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new ee(this.span(e),this.sourceSpan(e),t)}else{if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new W(this.span(e),this.sourceSpan(e)),e,!1);if(this.next.isNumber()){let t=this.next.toNumber();return this.advance(),new P(this.span(e),this.sourceSpan(e),t)}else if(this.next.isString()){let t=this.next.toString();return this.advance(),new P(this.span(e),this.sourceSpan(e),t)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new R(this.span(e),this.sourceSpan(e))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new R(this.span(e),this.sourceSpan(e))):(this.error(`Unexpected token ${this.next}`),new R(this.span(e),this.sourceSpan(e)))}}}parseExpressionList(e){let t=[];do if(!this.next.isCharacter(e))t.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(44));return t}parseLiteralMap(){let e=[],t=[],s=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{let n=this.inputIndex,i=this.next.isString(),a=this.expectIdentifierOrKeywordOrString();if(e.push({key:a,quoted:i}),i)this.expectCharacter(58),t.push(this.parsePipe());else if(this.consumeOptionalCharacter(58))t.push(this.parsePipe());else{let h=this.span(n),x=this.sourceSpan(n);t.push(new F(h,x,x,new W(h,x),a))}}while(this.consumeOptionalCharacter(44));this.rbracesExpected--,this.expectCharacter(125)}return new te(this.span(s),this.sourceSpan(s),e,t)}parseAccessMemberOrMethodCall(e,t,s){let n=this.inputIndex,i=this.withContext(me.Writable,()=>{var h;let x=(h=this.expectIdentifierOrKeyword())!==null&&h!==void 0?h:"";return x.length===0&&this.error("Expected identifier for property access",e.span.end),x}),a=this.sourceSpan(n);if(this.consumeOptionalCharacter(40)){let h=this.inputIndex;this.rparensExpected++;let x=this.parseCallArguments(),v=this.span(h,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(41),this.rparensExpected--;let A=this.span(t),N=this.sourceSpan(t);return s?new ae(A,N,a,e,i,x,v):new ie(A,N,a,e,i,x,v)}else{if(s)return this.consumeOptionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new R(this.span(t),this.sourceSpan(t))):new z(this.span(t),this.sourceSpan(t),a,e,i);if(this.consumeOptionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new R(this.span(t),this.sourceSpan(t));let h=this.parseConditional();return new H(this.span(t),this.sourceSpan(t),a,e,i,h)}else return new F(this.span(t),this.sourceSpan(t),a,e,i)}}parseCallArguments(){if(this.next.isCharacter(41))return[];let e=[];do e.push(this.parsePipe());while(this.consumeOptionalCharacter(44));return e}expectTemplateBindingKey(){let e="",t=!1,s=this.currentAbsoluteOffset;do e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-");while(t);return{source:e,span:new B(s,s+e.length)}}parseTemplateBindings(e){let t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index<this.tokens.length;){let s=this.parseLetBinding();if(s)t.push(s);else{let n=this.expectTemplateBindingKey(),i=this.parseAsBinding(n);i?t.push(i):(n.source=e.source+n.source.charAt(0).toUpperCase()+n.source.substring(1),t.push(...this.parseDirectiveKeywordBindings(n)))}this.consumeStatementTerminator()}return new Qe(t,[],this.errors)}parseKeyedReadOrWrite(e,t,s){return this.withContext(me.Writable,()=>{this.rbracketsExpected++;let n=this.parsePipe();if(n instanceof R&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("="))if(s)this.error("The '?.' operator cannot be used in the assignment");else{let i=this.parseConditional();return new J(this.span(t),this.sourceSpan(t),e,n,i)}else return s?new Z(this.span(t),this.sourceSpan(t),e,n):new X(this.span(t),this.sourceSpan(t),e,n);return new R(this.span(t),this.sourceSpan(t))})}parseDirectiveKeywordBindings(e){let t=[];this.consumeOptionalCharacter(58);let s=this.getDirectiveBoundTarget(),n=this.currentAbsoluteOffset,i=this.parseAsBinding(e);i||(this.consumeStatementTerminator(),n=this.currentAbsoluteOffset);let a=new B(e.span.start,n);return t.push(new Ee(a,e,s)),i&&t.push(i),t}getDirectiveBoundTarget(){if(this.next===ke||this.peekKeywordAs()||this.peekKeywordLet())return null;let e=this.parsePipe(),{start:t,end:s}=e.span,n=this.input.substring(t,s);return new K(e,n,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();let t=this.expectTemplateBindingKey();this.consumeStatementTerminator();let s=new B(e.span.start,this.currentAbsoluteOffset);return new xe(s,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;let e=this.currentAbsoluteOffset;this.advance();let t=this.expectTemplateBindingKey(),s=null;this.consumeOptionalOperator("=")&&(s=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let n=new B(e,this.currentAbsoluteOffset);return new xe(n,t,s)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(e,t=null){this.errors.push(new Q(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(e=null){return e==null&&(e=this.index),e<this.tokens.length?`at column ${this.tokens[e].index+1} in`:"at the end of the expression"}_reportErrorForPrivateIdentifier(e,t){let s=`Private identifiers are not supported. Unexpected private identifier: ${e}`;t!==null&&(s+=`, ${t}`),this.error(s)}skip(){let e=this.next;for(;this.index<this.tokens.length&&!e.isCharacter(59)&&!e.isOperator("|")&&(this.rparensExpected<=0||!e.isCharacter(41))&&(this.rbracesExpected<=0||!e.isCharacter(125))&&(this.rbracketsExpected<=0||!e.isCharacter(93))&&(!(this.context&me.Writable)||!e.isOperator("="));)this.next.isError()&&this.errors.push(new Q(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next}},mt=class{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(s=>s.visit(this,t))}visitChain(e,t){}visitQuote(e,t){}visitSafeKeyedRead(e,t){}},St=class extends Ae{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}}});var qe=le(S=>{"use strict";m();Object.defineProperty(S,"__esModule",{value:!0});S.getLast=S.toLowerCamelCase=S.findBackChar=S.findFrontChar=S.fitSpans=S.getNgType=S.parseNgInterpolation=S.parseNgTemplateBindings=S.parseNgAction=S.parseNgSimpleBinding=S.parseNgBinding=S.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX=void 0;var y=(Ke(),be(ot)),rr=(vt(),be(Vt)),nr=(Zt(),be(Xt)),Yt="angular-estree-parser";S.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX="NgEstreeParser";var wt=0,Ve=[Yt,wt];function Et(){return new nr.Parser(new rr.Lexer)}function At(r,e){let t=Et(),{astInput:s,comments:n}=es(r,t),{ast:i,errors:a}=e(s,t);return Ct(a),{ast:i,comments:n}}function ir(r){return At(r,(e,t)=>t.parseBinding(e,...Ve))}S.parseNgBinding=ir;function ar(r){return At(r,(e,t)=>t.parseSimpleBinding(e,...Ve))}S.parseNgSimpleBinding=ar;function or(r){return At(r,(e,t)=>t.parseAction(e,...Ve))}S.parseNgAction=or;function cr(r){let e=Et(),{templateBindings:t,errors:s}=e.parseTemplateBindings(S.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX,r,Yt,wt,wt);return Ct(s),t}S.parseNgTemplateBindings=cr;function hr(r){let e=Et(),{astInput:t,comments:s}=es(r,e),n="{{",i="}}",{ast:a,errors:h}=e.parseInterpolation(n+t+i,...Ve);Ct(h);let x=a.expressions[0],v=new Set;return yt(x,A=>{v.has(A)||(A.start-=n.length,A.end-=n.length,v.add(A))}),{ast:x,comments:s}}S.parseNgInterpolation=hr;function yt(r,e){if(!(!r||typeof r!="object")){if(Array.isArray(r))return r.forEach(t=>yt(t,e));for(let t of Object.keys(r)){let s=r[t];t==="span"?e(s):yt(s,e)}}}function Ct(r){if(r.length!==0){let[{message:e}]=r;throw new SyntaxError(e.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}}function es(r,e){let t=e._commentStart(r);return t===null?{astInput:r,comments:[]}:{astInput:r.slice(0,t),comments:[{type:"Comment",value:r.slice(t+2),span:{start:t,end:r.length}}]}}function pr(r){return y.Unary&&r instanceof y.Unary?"Unary":r instanceof y.Binary?"Binary":r instanceof y.BindingPipe?"BindingPipe":r instanceof y.Chain?"Chain":r instanceof y.Conditional?"Conditional":r instanceof y.EmptyExpr?"EmptyExpr":r instanceof y.FunctionCall?"FunctionCall":r instanceof y.ImplicitReceiver?"ImplicitReceiver":r instanceof y.KeyedRead?"KeyedRead":r instanceof y.KeyedWrite?"KeyedWrite":r instanceof y.LiteralArray?"LiteralArray":r instanceof y.LiteralMap?"LiteralMap":r instanceof y.LiteralPrimitive?"LiteralPrimitive":r instanceof y.MethodCall?"MethodCall":r instanceof y.NonNullAssert?"NonNullAssert":r instanceof y.PrefixNot?"PrefixNot":r instanceof y.PropertyRead?"PropertyRead":r instanceof y.PropertyWrite?"PropertyWrite":r instanceof y.Quote?"Quote":r instanceof y.SafeMethodCall?"SafeMethodCall":r instanceof y.SafePropertyRead?"SafePropertyRead":r.type}S.getNgType=pr;function Jt({start:r,end:e},t){let s=r,n=e;for(;n!==s&&/\s/.test(t[n-1]);)n--;for(;s!==n&&/\s/.test(t[s]);)s++;return{start:s,end:n}}function ur({start:r,end:e},t){let s=r,n=e;for(;n!==t.length&&/\s/.test(t[n]);)n++;for(;s!==0&&/\s/.test(t[s-1]);)s--;return{start:s,end:n}}function lr(r,e){return e[r.start-1]==="("&&e[r.end]===")"?{start:r.start-1,end:r.end+1}:r}function dr(r,e,t){let s=0,n={start:r.start,end:r.end};for(;;){let i=ur(n,e),a=lr(i,e);if(i.start===a.start&&i.end===a.end)break;n.start=a.start,n.end=a.end,s++}return{hasParens:(t?s-1:s)!==0,outerSpan:Jt(t?{start:n.start+1,end:n.end-1}:n,e),innerSpan:Jt(r,e)}}S.fitSpans=dr;function xr(r,e,t){let s=e;for(;!r.test(t[s]);)if(--s<0)throw new Error(`Cannot find front char ${r} from index ${e} in ${JSON.stringify(t)}`);return s}S.findFrontChar=xr;function fr(r,e,t){let s=e;for(;!r.test(t[s]);)if(++s>=t.length)throw new Error(`Cannot find back char ${r} from index ${e} in ${JSON.stringify(t)}`);return s}S.findBackChar=fr;function vr(r){return r.slice(0,1).toLowerCase()+r.slice(1)}S.toLowerCamelCase=vr;function gr(r){return r.length===0?void 0:r[r.length-1]}S.getLast=gr});var $t=le(D=>{"use strict";m();Object.defineProperty(D,"__esModule",{value:!0});D.transformSpan=D.transform=void 0;var Ie=qe(),mr=(r,e,t=!1)=>{let s=Ie.getNgType(r);switch(s){case"Unary":{let{operator:c,expr:o}=r,u=n(o);return a("UnaryExpression",{prefix:!0,argument:u,operator:c},r.span,{hasParentParens:t})}case"Binary":{let{left:c,operation:o,right:u}=r,p=u.span.start===u.span.end,d=c.span.start===c.span.end;if(p||d){let $=c.span.start===c.span.end?n(u):n(c);return a("UnaryExpression",{prefix:!0,argument:$,operator:p?"+":"-"},{start:r.span.start,end:C($)},{hasParentParens:t})}let g=n(c),l=n(u);return a(o==="&&"||o==="||"?"LogicalExpression":"BinaryExpression",{left:g,right:l,operator:o},{start:w(g),end:C(l)},{hasParentParens:t})}case"BindingPipe":{let{exp:c,name:o,args:u}=r,p=n(c),d=v(/\S/,v(/\|/,C(p))+1),g=a("Identifier",{name:o},{start:d,end:d+o.length}),l=u.map(n);return a("NGPipeExpression",{left:p,right:g,arguments:l},{start:w(p),end:C(l.length===0?g:Ie.getLast(l))},{hasParentParens:t})}case"Chain":{let{expressions:c}=r;return a("NGChainedExpression",{expressions:c.map(n)},r.span,{hasParentParens:t})}case"Comment":{let{value:c}=r;return a("CommentLine",{value:c},r.span,{processSpan:!1})}case"Conditional":{let{condition:c,trueExp:o,falseExp:u}=r,p=n(c),d=n(o),g=n(u);return a("ConditionalExpression",{test:p,consequent:d,alternate:g},{start:w(p),end:C(g)},{hasParentParens:t})}case"EmptyExpr":return a("NGEmptyExpression",{},r.span,{hasParentParens:t});case"FunctionCall":{let{target:c,args:o}=r,u=o.length===1?[i(o[0])]:o.map(n),p=n(c);return a("CallExpression",{callee:p,arguments:u},{start:w(p),end:r.span.end},{hasParentParens:t})}case"ImplicitReceiver":return a("ThisExpression",{},r.span,{hasParentParens:t});case"KeyedRead":{let{key:c}=r,o=Object.prototype.hasOwnProperty.call(r,"receiver")?r.receiver:r.obj,u=n(c);return h(o,u,{computed:!0,optional:!1},{end:r.span.end,hasParentParens:t})}case"LiteralArray":{let{expressions:c}=r;return a("ArrayExpression",{elements:c.map(n)},r.span,{hasParentParens:t})}case"LiteralMap":{let{keys:c,values:o}=r,u=o.map(d=>n(d)),p=c.map(({key:d,quoted:g},l)=>{let $=u[l],Se=v(/\S/,l===0?r.span.start+1:v(/,/,C(u[l-1]))+1),as=x(/\S/,x(/:/,w($)-1)-1)+1,kt={start:Se,end:as},Le=g?a("StringLiteral",{value:d},kt):a("Identifier",{name:d},kt),os=Le.end<Le.start;return a("ObjectProperty",{key:Le,value:$,method:!1,shorthand:os,computed:!1},{start:w(Le),end:C($)})});return a("ObjectExpression",{properties:p},r.span,{hasParentParens:t})}case"LiteralPrimitive":{let{value:c}=r;switch(typeof c){case"boolean":return a("BooleanLiteral",{value:c},r.span,{hasParentParens:t});case"number":return a("NumericLiteral",{value:c},r.span,{hasParentParens:t});case"object":return a("NullLiteral",{},r.span,{hasParentParens:t});case"string":return a("StringLiteral",{value:c},r.span,{hasParentParens:t});case"undefined":return a("Identifier",{name:"undefined"},r.span,{hasParentParens:t});default:throw new Error(`Unexpected LiteralPrimitive value type ${typeof c}`)}}case"MethodCall":case"SafeMethodCall":{let c=s==="SafeMethodCall",{receiver:o,name:u,args:p}=r,d=p.length===1?[i(p[0])]:p.map(n),g=x(/\S/,x(/\(/,(d.length===0?x(/\)/,r.span.end-1):w(d[0]))-1)-1)+1,l=a("Identifier",{name:u},{start:g-u.length,end:g}),$=h(o,l,{computed:!1,optional:c}),Se=N($);return a(c||Se?"OptionalCallExpression":"CallExpression",{callee:$,arguments:d},{start:w($),end:r.span.end},{hasParentParens:t})}case"NonNullAssert":{let{expression:c}=r,o=n(c);return a("TSNonNullExpression",{expression:o},{start:w(o),end:r.span.end},{hasParentParens:t})}case"PrefixNot":{let{expression:c}=r,o=n(c);return a("UnaryExpression",{prefix:!0,operator:"!",argument:o},{start:r.span.start,end:C(o)},{hasParentParens:t})}case"PropertyRead":case"SafePropertyRead":{let c=s==="SafePropertyRead",{receiver:o,name:u}=r,p=x(/\S/,r.span.end-1)+1,d=a("Identifier",{name:u},{start:p-u.length,end:p},A(o)?{hasParentParens:t}:{});return h(o,d,{computed:!1,optional:c},{hasParentParens:t})}case"KeyedWrite":{let{key:c,value:o}=r,u=Object.prototype.hasOwnProperty.call(r,"receiver")?r.receiver:r.obj,p=n(c),d=n(o),g=h(u,p,{computed:!0,optional:!1},{end:v(/\]/,C(p))+1});return a("AssignmentExpression",{left:g,operator:"=",right:d},{start:w(g),end:C(d)},{hasParentParens:t})}case"PropertyWrite":{let{receiver:c,name:o,value:u}=r,p=n(u),d=x(/\S/,x(/=/,w(p)-1)-1)+1,g=a("Identifier",{name:o},{start:d-o.length,end:d}),l=h(c,g,{computed:!1,optional:!1});return a("AssignmentExpression",{left:l,operator:"=",right:p},{start:w(l),end:C(p)},{hasParentParens:t})}case"Quote":{let{prefix:c,uninterpretedExpression:o}=r;return a("NGQuotedExpression",{prefix:c,value:o},r.span,{hasParentParens:t})}default:throw new Error(`Unexpected node ${s}`)}function n(c){return D.transform(c,e)}function i(c){return D.transform(c,e,!0)}function a(c,o,u,{processSpan:p=!0,hasParentParens:d=!1}={}){let g=Object.assign(Object.assign({type:c},ts(u,e,p,d)),o);switch(c){case"Identifier":{let l=g;l.loc.identifierName=l.name;break}case"NumericLiteral":{let l=g;l.extra=Object.assign(Object.assign({},l.extra),{raw:e.text.slice(l.start,l.end),rawValue:l.value});break}case"StringLiteral":{let l=g;l.extra=Object.assign(Object.assign({},l.extra),{raw:e.text.slice(l.start,l.end),rawValue:l.value});break}}return g}function h(c,o,u,{end:p=C(o),hasParentParens:d=!1}={}){if(A(c)||c.span.start===o.start)return o;let g=n(c),l=N(g);return a(u.optional||l?"OptionalMemberExpression":"MemberExpression",Object.assign({object:g,property:o,computed:u.computed},u.optional?{optional:!0}:l?{optional:!1}:null),{start:w(g),end:p},{hasParentParens:d})}function x(c,o){return Ie.findFrontChar(c,o,e.text)}function v(c,o){return Ie.findBackChar(c,o,e.text)}function A(c){return c.span.start>=c.span.end||/^\s+$/.test(e.text.slice(c.span.start,c.span.end))}function N(c){return(c.type==="OptionalCallExpression"||c.type==="OptionalMemberExpression")&&!O(c)}function O(c){return c.extra&&c.extra.parenthesized}function w(c){return O(c)?c.extra.parenStart:c.start}function C(c){return O(c)?c.extra.parenEnd:c.end}};D.transform=mr;function ts(r,e,t=!1,s=!1){if(!t){let{start:h,end:x}=r;return{start:h,end:x,loc:{start:e.locator.locationForIndex(h),end:e.locator.locationForIndex(x)}}}let{outerSpan:n,innerSpan:i,hasParens:a}=Ie.fitSpans(r,e.text,s);return Object.assign({start:i.start,end:i.end,loc:{start:e.locator.locationForIndex(i.start),end:e.locator.locationForIndex(i.end)}},a&&{extra:{parenthesized:!0,parenStart:n.start,parenEnd:n.end}})}D.transformSpan=ts});var rs=le(He=>{"use strict";m();Object.defineProperty(He,"__esModule",{value:!0});He.transformTemplateBindings=void 0;var ss=(Ke(),be(ot)),Ot=$t(),Nt=qe();function Sr(r,e){r.forEach(w);let[t]=r,{key:s}=t,n=e.text.slice(t.sourceSpan.start,t.sourceSpan.end).trim().length===0?r.slice(1):r,i=[],a=null;for(let o=0;o<n.length;o++){let u=n[o];if(a&&N(a)&&O(u)&&u.value&&u.value.source===a.key.source){let p=v("NGMicrosyntaxKey",{name:u.key.source},u.key.span),d=($,Se)=>Object.assign(Object.assign({},$),Ot.transformSpan({start:$.start,end:Se},e)),g=$=>Object.assign(Object.assign({},d($,p.end)),{alias:p}),l=i.pop();if(l.type==="NGMicrosyntaxExpression")i.push(g(l));else if(l.type==="NGMicrosyntaxKeyedExpression"){let $=g(l.expression);i.push(d(Object.assign(Object.assign({},l),{expression:$}),$.end))}else throw new Error(`Unexpected type ${l.type}`)}else i.push(h(u,o));a=u}return v("NGMicrosyntax",{body:i},i.length===0?r[0].sourceSpan:{start:i[0].start,end:i[i.length-1].end});function h(o,u){if(N(o)){let{key:p,value:d}=o;return d?u===0?v("NGMicrosyntaxExpression",{expression:x(d.ast),alias:null},d.sourceSpan):v("NGMicrosyntaxKeyedExpression",{key:v("NGMicrosyntaxKey",{name:A(p.source)},p.span),expression:v("NGMicrosyntaxExpression",{expression:x(d.ast),alias:null},d.sourceSpan)},{start:p.span.start,end:d.sourceSpan.end}):v("NGMicrosyntaxKey",{name:A(p.source)},p.span)}else{let{key:p,sourceSpan:d}=o;if(/^let\s$/.test(e.text.slice(d.start,d.start+4))){let{value:l}=o;return v("NGMicrosyntaxLet",{key:v("NGMicrosyntaxKey",{name:p.source},p.span),value:l?v("NGMicrosyntaxKey",{name:l.source},l.span):null},{start:d.start,end:l?l.span.end:p.span.end})}else{let l=c(o);return v("NGMicrosyntaxAs",{key:v("NGMicrosyntaxKey",{name:l.source},l.span),alias:v("NGMicrosyntaxKey",{name:p.source},p.span)},{start:l.span.start,end:p.span.end})}}}function x(o){return Ot.transform(o,e)}function v(o,u,p,d=!0){return Object.assign(Object.assign({type:o},Ot.transformSpan(p,e,d)),u)}function A(o){return Nt.toLowerCamelCase(o.slice(s.source.length))}function N(o){return o instanceof ss.ExpressionBinding}function O(o){return o instanceof ss.VariableBinding}function w(o){C(o.key.span),O(o)&&o.value&&C(o.value.span)}function C(o){if(e.text[o.start]!=='"'&&e.text[o.start]!=="'")return;let u=e.text[o.start],p=!1;for(let d=o.start+1;d<e.text.length;d++)switch(e.text[d]){case u:if(!p){o.end=d+1;return}default:p=!1;break;case"\\":p=!p;break}}function c(o){if(!o.value||o.value.source!==Nt.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX)return o.value;let u=Nt.findBackChar(/\S/,o.sourceSpan.start,e.text);return{source:"$implicit",span:{start:u,end:u}}}}He.transformTemplateBindings=Sr});var is=le(b=>{"use strict";m();Object.defineProperty(b,"__esModule",{value:!0});b.parseTemplateBindings=b.parseAction=b.parseInterpolation=b.parseSimpleBinding=b.parseBinding=void 0;var ns=Bt(),wr=$t(),yr=rs(),Re=qe();function ze(r,e){let{ast:t,comments:s}=e(r),n=new ns.Context(r),i=h=>wr.transform(h,n),a=i(t);return a.comments=s.map(i),a}function Er(r){return ze(r,Re.parseNgBinding)}b.parseBinding=Er;function Ar(r){return ze(r,Re.parseNgSimpleBinding)}b.parseSimpleBinding=Ar;function Cr(r){return ze(r,Re.parseNgInterpolation)}b.parseInterpolation=Cr;function $r(r){return ze(r,Re.parseNgAction)}b.parseAction=$r;function Or(r){return yr.transformTemplateBindings(Re.parseNgTemplateBindings(r),new ns.Context(r))}b.parseTemplateBindings=Or});m();m();m();function xs(r){return Array.isArray(r)&&r.length>0}var It=xs;function Je(r,e){let{ignoreDecorators:t}=e||{};if(!t){let s=r.declaration&&r.declaration.decorators||r.decorators;if(It(s))return Je(s[0])}return r.range?r.range[0]:r.start}function Rt(r){return r.range?r.range[1]:r.end}function Xe(r){return{astFormat:"estree",parse:async(t,s)=>{let n=await Promise.resolve().then(()=>ds(is(),1)),i=r(t,n);return{type:"NGRoot",node:s.parser==="__ng_action"&&i.type!=="NGChainedExpression"?{...i,type:"NGChainedExpression",expressions:[i]}:i}},locStart:Je,locEnd:Rt}}var Nr={parsers:{__ng_action:Xe((r,e)=>e.parseAction(r)),__ng_binding:Xe((r,e)=>e.parseBinding(r)),__ng_interpolation:Xe((r,e)=>e.parseInterpolation(r)),__ng_directive:Xe((r,e)=>e.parseTemplateBindings(r))}},qr=Nr;export{qr as default};
|