@tanstack/ai-mcp
Version:
Host-side Model Context Protocol client for TanStack AI: discover and run MCP server tools, resources, and prompts in any adapter's chat() loop, with generated end-to-end types.
3,721 lines • 178 kB
JavaScript
#!/usr/bin/env node
import {
__esm,
init_esm_shims
} from "./chunk-A4N5BRUW.js";
// ../../node_modules/.pnpm/prettier@3.9.9/node_modules/prettier/plugins/angular.mjs
function pr(t30) {
return typeof t30 == "string" ? (e) => e === t30 : (e) => t30.test(e);
}
function An(t30, e, n) {
let s = pr(e);
for (let i = n; i < t30.length; i++) {
let r = t30[i];
if (s(r)) return i;
}
throw new Error(`Cannot find character ${e} from index ${n} in ${JSON.stringify(t30)}`);
}
function Pn(t30) {
return t30.slice(0, 1).toLowerCase() + t30.slice(1);
}
function Be(t30) {
let { start: e, end: n } = t30;
return { start: e, end: n, range: [e, n] };
}
function Nn(t30) {
return !!t30.extra?.parenthesized;
}
function ye(t30) {
return t30.type === "TSNonNullExpression" && !Nn(t30) ? ye(t30.expression) : (t30.type === "OptionalCallExpression" || t30.type === "OptionalMemberExpression") && !Nn(t30);
}
function fr() {
return K || (K = yt(), B(x.HTML, void 0, [["iframe", ["srcdoc"]], ["*", ["innerHTML", "outerHTML"]]]), B(x.STYLE, void 0, [["*", ["style"]]]), B(x.URL, void 0, [["*", ["formAction"]], ["area", ["href"]], ["a", ["href", "xlink:href"]], ["form", ["action"]], ["img", ["src"]], ["video", ["src"]]]), B(x.URL, hr, [["*", ["href", "xlink:href"]]]), B(x.RESOURCE_URL, void 0, [["base", ["href"]], ["embed", ["src"]], ["frame", ["src"]], ["iframe", ["src"]], ["link", ["href"]], ["object", ["codebase", "data"]]]), B(x.URL, Ln, [["a", ["href", "xlink:href"]]]), B(x.ATTRIBUTE_NO_BINDING, Ln, [["animate", ["attributeName", "values", "to", "from"]], ["set", ["to", "attributeName"]], ["animateMotion", ["attributeName"]], ["animateTransform", ["attributeName"]]]), B(x.ATTRIBUTE_NO_BINDING, void 0, [["unknown", ["attributeName", "values", "to", "from", "sandbox", "allow", "allowFullscreen", "referrerPolicy", "csp", "fetchPriority", "credentialless"]], ["iframe", ["sandbox", "allow", "allowFullscreen", "referrerPolicy", "csp", "fetchPriority", "credentialless"]]]), K);
}
function B(t30, e, n) {
let s = e ?? Bs;
for (let [i, r] of n) {
let a = i.toLowerCase();
for (let u of r) {
let h = u.toLowerCase(), d = K[h] ?? (K[h] = yt()), g = d[s] ?? (d[s] = yt());
g[a] = t30;
}
}
}
function dr(t30, e, n) {
let i = fr()[e.toLowerCase()];
if (!i) return x.NONE;
let r = t30.toLowerCase(), a;
if (n) {
let u = i[n];
u && (a = u[r] ?? u[$n]);
}
if (a === void 0) {
let u = i[Bs];
u && (a = u[r] ?? u[$n]);
}
return a ?? x.NONE;
}
function mr(t30, e) {
return t30 == null || e == null ? t30 == e : t30.isEquivalent(e);
}
function gr(t30, e, n) {
let s = t30.length;
if (s !== e.length) return false;
for (let i = 0; i < s; i++) if (!n(t30[i], e[i])) return false;
return true;
}
function ue(t30, e) {
return gr(t30, e, (n, s) => n.isEquivalent(s));
}
function wr(t30) {
return t30.replace(vr, (...e) => e[1].toUpperCase());
}
function ot(t30, e = true) {
if (t30[0] != ":") return [null, t30];
let n = t30.indexOf(":", 1);
if (n === -1) {
if (e) throw new Error(`Unsupported format "${t30}" expecting ":namespace:name"`);
return [null, t30];
}
return [t30.slice(1, n), t30.slice(n + 1)];
}
function Kn(t30) {
return ot(t30)[1] === "ng-container";
}
function Zn(t30) {
return ot(t30)[1] === "ng-content";
}
function Fr(t30) {
return t30 >= Fs && t30 <= Vs || t30 == Gs;
}
function X(t30) {
return Ir <= t30 && t30 <= Nr;
}
function en(t30) {
return t30 >= js && t30 <= zs || t30 >= pn && t30 <= hn;
}
function rs(t30) {
return t30 === Us || t30 === Hs || t30 === Zt;
}
function Qr(t30) {
return { kind: l.Statement, statement: t30, ...Jr };
}
function Kr(t30, e) {
st(t30, (n, s) => (e(n, s), n), q.None);
}
function xt(t30, e, n) {
for (let s = 0; s < t30.expressions.length; s++) t30.expressions[s] = (t30.expressions[s], void 0);
}
function st(t30, e, n) {
switch (t30.kind) {
case l.StyleProp:
case l.StyleMap:
case l.ClassProp:
case l.ClassMap:
case l.AnimationString:
case l.AnimationBinding:
case l.Binding:
t30.expression instanceof me ? xt(t30.expression, e, n) : t30.expression = (t30.expression, void 0);
break;
case l.Property:
case l.DomProperty:
case l.Attribute:
t30.expression instanceof me ? xt(t30.expression, e, n) : t30.expression = (t30.expression, void 0), t30.sanitizer = t30.sanitizer && (t30.sanitizer, void 0);
break;
case l.TwoWayProperty:
t30.expression = (t30.expression, void 0), t30.sanitizer = t30.sanitizer && (t30.sanitizer, void 0);
break;
case l.I18nExpression:
t30.expression = (t30.expression, void 0);
break;
case l.InterpolateText:
xt(t30.interpolation, e, n);
break;
case l.Statement:
sn(t30.statement, e, n);
break;
case l.Variable:
t30.initializer = (t30.initializer, void 0);
break;
case l.Conditional:
for (let s of t30.conditions) s.expr !== null && (s.expr = (s.expr, void 0));
t30.processed !== null && (t30.processed = (t30.processed, void 0)), t30.contextValue !== null && (t30.contextValue = (t30.contextValue, void 0));
break;
case l.Animation:
case l.AnimationListener:
case l.Listener:
case l.TwoWayListener:
for (let s of t30.handlerOps) st(s, e, n | q.InChildOperation);
break;
case l.ExtractedAttribute:
t30.expression = t30.expression && (t30.expression, void 0), t30.trustedValueFn = t30.trustedValueFn && (t30.trustedValueFn, void 0);
break;
case l.RepeaterCreate:
if (t30.trackByOps === null) t30.track = (t30.track, void 0);
else for (let s of t30.trackByOps) st(s, e, n | q.InChildOperation);
t30.trackByFn !== null && (t30.trackByFn = (t30.trackByFn, void 0));
break;
case l.Repeater:
t30.collection = (t30.collection, void 0);
break;
case l.Defer:
t30.loadingConfig !== null && (t30.loadingConfig = (t30.loadingConfig, void 0)), t30.placeholderConfig !== null && (t30.placeholderConfig = (t30.placeholderConfig, void 0)), t30.resolverFn !== null && (t30.resolverFn = (t30.resolverFn, void 0));
break;
case l.I18nMessage:
for (let [s, i] of t30.params) t30.params.set(s, void 0);
for (let [s, i] of t30.postprocessingParams) t30.postprocessingParams.set(s, void 0);
break;
case l.DeferWhen:
t30.expr = (t30.expr, void 0);
break;
case l.StoreLet:
t30.value = (t30.value, void 0);
break;
case l.Advance:
case l.Container:
case l.ContainerEnd:
case l.ContainerStart:
case l.DeferOn:
case l.DisableBindings:
case l.Element:
case l.ElementEnd:
case l.ElementStart:
case l.EnableBindings:
case l.I18n:
case l.I18nApply:
case l.I18nContext:
case l.I18nEnd:
case l.I18nStart:
case l.IcuEnd:
case l.IcuStart:
case l.Namespace:
case l.Pipe:
case l.Projection:
case l.ProjectionDef:
case l.EnableIncrementalHydrationRuntime:
case l.Template:
case l.Text:
case l.I18nAttributes:
case l.IcuPlaceholder:
case l.DeclareLet:
case l.SourceLocation:
case l.ConditionalCreate:
case l.ConditionalBranchCreate:
case l.Control:
case l.ControlCreate:
break;
default:
throw new Error(`AssertionError: transformExpressionsInOp doesn't handle ${l[t30.kind]}`);
}
}
function sn(t30, e, n) {
if (t30 instanceof Ue) t30.expr = (t30.expr, void 0);
else if (t30 instanceof We) t30.value = (t30.value, void 0);
else if (t30 instanceof Rt) t30.value !== void 0 && (t30.value = (t30.value, void 0));
else if (t30 instanceof Ot) {
t30.condition = (t30.condition, void 0);
for (let s of t30.trueCase) sn(s, e, n);
for (let s of t30.falseCase) sn(s, e, n);
} else throw new Error(`Unhandled statement kind: ${t30.constructor.name}`);
}
function Ce(t30, e, n) {
return new I(t30, e, f.Character, n, String.fromCharCode(n));
}
function no(t30, e, n) {
return new I(t30, e, f.Identifier, 0, n);
}
function so(t30, e, n) {
return new I(t30, e, f.PrivateIdentifier, 0, n);
}
function io(t30, e, n) {
return new I(t30, e, f.Keyword, 0, n);
}
function F(t30, e, n) {
return new I(t30, e, f.Operator, 0, n);
}
function ro(t30, e, n) {
return new I(t30, e, f.Number, n, "");
}
function oo(t30, e, n) {
return new I(t30, e, f.Error, 0, n);
}
function ao(t30, e, n) {
return new I(t30, e, f.RegExpBody, 0, n);
}
function lo(t30, e, n) {
return new I(t30, e, f.RegExpFlags, 0, n);
}
function Ts(t30) {
return js <= t30 && t30 <= zs || pn <= t30 && t30 <= hn || t30 == at || t30 == un;
}
function ks(t30) {
return en(t30) || X(t30) || t30 == at || t30 == un;
}
function co(t30) {
return t30 == Lr || t30 == Ar;
}
function uo(t30) {
return t30 == qs || t30 == Ws;
}
function po(t30) {
switch (t30) {
case Mr:
return Ve;
case $r:
return Er;
case Rr:
return Cr;
case Or:
return Fs;
case Br:
return yr;
default:
return t30;
}
}
function ho(t30) {
let e = parseInt(t30);
if (isNaN(e)) throw new Error("Invalid integer literal when parsing " + t30);
return e;
}
function H(t30) {
return t30.start.toString() || "(unknown)";
}
function le(t30, e, n, s) {
n.length > 0 && (n = ` ${n} `);
let i = H(s), r = `Parser Error: ${t30}${n}[${e}] in ${i}`;
return new Re(s, r);
}
function fo(t30) {
let e = /* @__PURE__ */ new Map(), n = 0, s = 0, i = 0;
for (; i < t30.length; ) {
let r = t30[i];
if (r.type === 9) {
let [a, u] = r.parts;
n += u.length, s += a.length;
} else {
let a = r.parts.reduce((u, h) => u + h.length, 0);
s += a, n += a;
}
e.set(s, n), i++;
}
return e;
}
function Fe(t30) {
let e = t30.toLowerCase(), [n, s] = ot(e, false);
return n === mo || n === go ? `:${n}:${s}` : s;
}
function Co(t30) {
switch (t30) {
case "width":
case "height":
case "minWidth":
case "minHeight":
case "maxWidth":
case "maxHeight":
case "left":
case "top":
case "bottom":
case "right":
case "fontSize":
case "outlineWidth":
case "outlineOffset":
case "paddingTop":
case "paddingLeft":
case "paddingBottom":
case "paddingRight":
case "marginTop":
case "marginLeft":
case "marginBottom":
case "marginRight":
case "borderRadius":
case "borderWidth":
case "borderTopWidth":
case "borderLeftWidth":
case "borderRightWidth":
case "borderBottomWidth":
case "textIndent":
return true;
default:
return false;
}
}
function $(t30) {
return (e) => e.kind === t30;
}
function Pe(t30, e) {
return (n) => n.kind === t30 && e === n.expression instanceof me;
}
function bo(t30) {
return (t30.kind === l.Property || t30.kind === l.TwoWayProperty) && !(t30.expression instanceof me);
}
function rt(t30) {
return t30.slice(t30.length - 1);
}
function ei(t30) {
let e = new et(t30, ko), n = new Ze(e, 0, 0, 0), s = n.moveBy(t30.length);
return { text: t30, file: e, start: n, end: s, sourceSpan: new tt(n, s) };
}
function ti() {
return _o ?? (_o = new ge(new Oe()));
}
function No(t30) {
let e = Io(t30);
return e === null ? [] : [{ type: "CommentLine", value: t30.slice(e + 2), ...Be({ start: e, end: t30.length }) }];
}
function ni(t30) {
let { result: e } = t30;
if (e.errors.length !== 0) {
let [n] = e.errors;
if (!(n instanceof Re)) throw n;
let { message: s } = n;
{
let a = s.match(/ in .*?@\d+:\d+$/);
a && (s = s.slice(0, a.index));
}
let i = t30.start;
{
let a = s.match(/at column (?<index>\d+)/);
a && (s = s.slice(0, a.index), i = i.moveBy(Number(a.groups.index)));
}
let r = new SyntaxError(s.trim(), { cause: n });
throw Object.assign(r, { location: i, span: n.span }), r.cause ?? (r.cause = n), r;
}
return t30;
}
function Fo(t30) {
return this[t30 < 0 ? this.length + t30 : t30];
}
function Gi(t30) {
return t30 instanceof Me;
}
function Xi(t30) {
return t30 instanceof de;
}
function er(t30, e) {
return new Ho(t30, e).expressions;
}
function Wo(t30, e) {
let n = new SyntaxError(t30 + " (" + e.loc.start.line + ":" + e.loc.start.column + ")");
return Object.assign(n, e);
}
function nr(t30) {
let e = new Set(t30);
return (n) => e.has(n?.type);
}
function En(t30) {
return t30.range?.[1] ?? t30.end;
}
function ie(t30) {
let e = t30.range?.[0] ?? t30.start, n = (t30.declaration?.decorators ?? t30.decorators)?.[0];
return n ? Math.min(ie(n), e) : e;
}
function re(t30) {
let { type: e } = t30;
return e === "IfStatement" ? re(t30.alternate ?? t30.consequent) : e === "ForInStatement" || e === "ForOfStatement" || e === "ForStatement" || e === "LabeledStatement" || e === "WithStatement" || e === "WhileStatement" ? re(t30.body) : Xo.get(e)?.(t30) ?? En(t30);
}
function Jo(t30) {
let { type: e = "JsExpressionRoot", expression: n, comments: s = n?.comments ?? [], text: i, rootMarker: r } = t30, a = { type: e, comments: s, range: [0, i.length], rootMarker: r };
return n && (delete n.comments, a.node = n), a;
}
function Yo(t30) {
if (!t30?.location) return t30;
let { message: e, location: { line: n, col: s } } = t30;
return tr(e, { loc: { start: { line: n + 1, column: Math.max(s, 1) } }, cause: t30 });
}
function gt(t30) {
return { astFormat: "estree", parse(e) {
let n;
try {
n = t30(e);
} catch (i) {
throw Yo(i);
}
let { comments: s } = n;
return delete n.comments, t30 === mt && n.type !== "NGChainedExpression" && (n = { ...n, type: "NGChainedExpression", expressions: [n] }), rr({ type: "NGRoot", expression: n, comments: s, text: e });
}, locStart: ie, locEnd: re };
}
var lr, cr, ur, kn, _n, vt, z, De, wt, w, In, or, Cn, ra, x, K, Ln, hr, Bs, $n, yt, Mn, Rn, On, Dn, Bn, Fn, Vn, Hn, Un, Wn, qn, jn, zn, p, y, Et, Ct, bt, Tt, kt, He, _t, It, S, Nt, At, Pt, Lt, $t, Mt, pe, he, Rt, Ue, We, Ot, Gn, o, c, vr, Dt, oa, Xn, ee, v, Le, N, fe, Bt, Ft, Vt, ke, Ht, qe, Ut, _e, Wt, A, qt, jt, zt, Sr, E, Ie, je, ze, Ge, Gt, Xe, Xt, Qe, Je, Ye, $e, Qt, Jt, Yt, D, U, de, Me, Kt, Qn, Jn, M, Yn, xr, Ee, Fs, Ve, yr, Er, Cr, Vs, br, Hs, Tr, un, kr, es, Us, Q, L, ts, Ws, V, qs, G, Ke, J, Te, _r, C, ns, ss, Ir, Nr, pn, Ar, hn, ce, St, Z, Pr, at, js, Lr, $r, Mr, Rr, Or, Dr, Br, zs, Ne, is, oe, Gs, Zt, Ze, et, tt, nt, Re, os, as, ls, Vr, Xs, Hr, tn, Ur, Wr, fn, ca, ua, qr, pa, jr, ha, Qs, fa, da, zr, Gr, Xr, ma, ga, va, l, te, cs, us, R, ps, hs, fs, ds, O, ms, gs, nn, Jr, Yr, Js, ve, lt, wa, Sa, xa, me, ne, vs, ws, Ss, xs, ys, q, ya, Es, Cs, Ea, Ca, ba, Ta, ka, _a, Ia, Zr, eo, bs, Ys, Na, Aa, f, W, to, Oe, I, Ae, be, rn, on, an, ge, ae, _s, Y, ln, mo, go, cn, vo, wo, So, xo, yo, Ks, Eo, it, Pa, La, $a, Ma, Ra, Oa, Da, Ba, Fa, Va, Is, Ha, Ns, As, Zs, Ua, Wa, Ps, Ls, qa, $s, Ms, Rs, Os, Ds, To, ja, za, Ga, ko, _o, Io, ct, si, ii, ri, oi, ai, ut, li, ci, ui, Ao, pi, hi, Po, fi, Lo, $o, di, mi, gi, vi, wi, Si, xi, yi, Ei, Mo, Ro, Oo, Do, pt, Ci, bi, Ti, ki, _i, Ii, Ni, Ai, Pi, Li, $i, Mi, Ri, dn, Oi, Di, Bi, Fi, Bo, Vi, Hi, Ui, ht, Wi, qi, ji, zi, Vo, ft, we, se, m, Qi, T, gn, vn, wn, Ji, Yi, Ki, Zi, Se, Ho, dt, mt, Sn, Uo, xn, yn, tr, qo, jo, zo, sr, Go, ir, Xo, Qo, rr, Ko, Zo, ea, ta;
var init_angular = __esm({
"../../node_modules/.pnpm/prettier@3.9.9/node_modules/prettier/plugins/angular.mjs"() {
init_esm_shims();
lr = Object.defineProperty;
cr = Object.getPrototypeOf;
ur = Reflect.get;
kn = (t30) => {
throw TypeError(t30);
};
_n = (t30, e) => {
for (var n in e) lr(t30, n, { get: e[n], enumerable: true });
};
vt = (t30, e, n) => e.has(t30) || kn("Cannot " + n);
z = (t30, e, n) => (vt(t30, e, "read from private field"), n ? n.call(t30) : e.get(t30));
De = (t30, e, n) => e.has(t30) ? kn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t30) : e.set(t30, n);
wt = (t30, e, n, s) => (vt(t30, e, "write to private field"), s ? s.call(t30, n) : e.set(t30, n), n);
w = (t30, e, n) => (vt(t30, e, "access private method"), n);
In = (t30, e, n) => ur(cr(t30), n, e);
or = {};
_n(or, { parsers: () => Cn });
Cn = {};
_n(Cn, { __ng_action: () => Ko, __ng_binding: () => Zo, __ng_directive: () => ta, __ng_interpolation: () => ea });
ra = new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`, "g");
(function(t30) {
t30[t30.NONE = 0] = "NONE", t30[t30.HTML = 1] = "HTML", t30[t30.STYLE = 2] = "STYLE", t30[t30.SCRIPT = 3] = "SCRIPT", t30[t30.URL = 4] = "URL", t30[t30.RESOURCE_URL = 5] = "RESOURCE_URL", t30[t30.ATTRIBUTE_NO_BINDING = 6] = "ATTRIBUTE_NO_BINDING";
})(x || (x = {}));
Ln = "svg";
hr = "math";
Bs = "";
$n = "*";
yt = () => /* @__PURE__ */ Object.create(null);
(function(t30) {
t30[t30.Emulated = 0] = "Emulated", t30[t30.None = 2] = "None", t30[t30.ShadowDom = 3] = "ShadowDom", t30[t30.ExperimentalIsolatedShadowDom = 4] = "ExperimentalIsolatedShadowDom";
})(Mn || (Mn = {}));
(function(t30) {
t30[t30.OnPush = 0] = "OnPush", t30[t30.Default = 1] = "Default", t30[t30.Eager = 1] = "Eager";
})(Rn || (Rn = {}));
(function(t30) {
t30[t30.None = 0] = "None", t30[t30.SignalBased = 1] = "SignalBased", t30[t30.HasDecoratorInputTransform = 2] = "HasDecoratorInputTransform";
})(On || (On = {}));
Dn = { name: "custom-elements" };
Bn = { name: "no-errors-schema" };
(function(t30) {
t30[t30.Error = 0] = "Error", t30[t30.Warning = 1] = "Warning", t30[t30.Ignore = 2] = "Ignore";
})(Fn || (Fn = {}));
(function(t30) {
t30[t30.Directive = 0] = "Directive", t30[t30.Component = 1] = "Component", t30[t30.Injectable = 2] = "Injectable", t30[t30.Pipe = 3] = "Pipe", t30[t30.NgModule = 4] = "NgModule", t30[t30.Service = 5] = "Service";
})(Vn || (Vn = {}));
(function(t30) {
t30[t30.Directive = 0] = "Directive", t30[t30.Pipe = 1] = "Pipe", t30[t30.NgModule = 2] = "NgModule";
})(Hn || (Hn = {}));
(function(t30) {
t30[t30.Emulated = 0] = "Emulated", t30[t30.None = 2] = "None", t30[t30.ShadowDom = 3] = "ShadowDom", t30[t30.ExperimentalIsolatedShadowDom = 4] = "ExperimentalIsolatedShadowDom";
})(Un || (Un = {}));
(function(t30) {
t30[t30.Little = 0] = "Little", t30[t30.Big = 1] = "Big";
})(Wn || (Wn = {}));
(function(t30) {
t30[t30.None = 0] = "None", t30[t30.Const = 1] = "Const";
})(qn || (qn = {}));
(function(t30) {
t30[t30.Dynamic = 0] = "Dynamic", t30[t30.Bool = 1] = "Bool", t30[t30.String = 2] = "String", t30[t30.Int = 3] = "Int", t30[t30.Number = 4] = "Number", t30[t30.Function = 5] = "Function", t30[t30.Inferred = 6] = "Inferred", t30[t30.None = 7] = "None";
})(jn || (jn = {}));
(function(t30) {
t30[t30.Minus = 0] = "Minus", t30[t30.Plus = 1] = "Plus";
})(zn || (zn = {}));
(function(t30) {
t30[t30.Equals = 0] = "Equals", t30[t30.NotEquals = 1] = "NotEquals", t30[t30.Assign = 2] = "Assign", t30[t30.Identical = 3] = "Identical", t30[t30.NotIdentical = 4] = "NotIdentical", t30[t30.Minus = 5] = "Minus", t30[t30.Plus = 6] = "Plus", t30[t30.Divide = 7] = "Divide", t30[t30.Multiply = 8] = "Multiply", t30[t30.Modulo = 9] = "Modulo", t30[t30.And = 10] = "And", t30[t30.Or = 11] = "Or", t30[t30.BitwiseOr = 12] = "BitwiseOr", t30[t30.BitwiseAnd = 13] = "BitwiseAnd", t30[t30.Lower = 14] = "Lower", t30[t30.LowerEquals = 15] = "LowerEquals", t30[t30.Bigger = 16] = "Bigger", t30[t30.BiggerEquals = 17] = "BiggerEquals", t30[t30.NullishCoalesce = 18] = "NullishCoalesce", t30[t30.Exponentiation = 19] = "Exponentiation", t30[t30.In = 20] = "In", t30[t30.InstanceOf = 21] = "InstanceOf", t30[t30.AdditionAssignment = 22] = "AdditionAssignment", t30[t30.SubtractionAssignment = 23] = "SubtractionAssignment", t30[t30.MultiplicationAssignment = 24] = "MultiplicationAssignment", t30[t30.DivisionAssignment = 25] = "DivisionAssignment", t30[t30.RemainderAssignment = 26] = "RemainderAssignment", t30[t30.ExponentiationAssignment = 27] = "ExponentiationAssignment", t30[t30.AndAssignment = 28] = "AndAssignment", t30[t30.OrAssignment = 29] = "OrAssignment", t30[t30.NullishCoalesceAssignment = 30] = "NullishCoalesceAssignment";
})(p || (p = {}));
y = class {
leadingComments;
type;
sourceSpan;
constructor(e, n, s) {
this.leadingComments = s, this.type = e || null, this.sourceSpan = n || null;
}
prop(e, n) {
return new Nt(this, e, null, n);
}
key(e, n, s) {
return new At(this, e, n, s);
}
callFn(e, n, s, i) {
return new bt(this, e, null, n, s, i);
}
instantiate(e, n, s, i) {
return new Tt(this, e, n, s);
}
conditional(e, n = null, s, i) {
return new It(this, e, n, null, s);
}
equals(e, n) {
return new S(p.Equals, this, e, null, n);
}
notEquals(e, n) {
return new S(p.NotEquals, this, e, null, n);
}
identical(e, n) {
return new S(p.Identical, this, e, null, n);
}
notIdentical(e, n) {
return new S(p.NotIdentical, this, e, null, n);
}
minus(e, n) {
return new S(p.Minus, this, e, null, n);
}
plus(e, n) {
return new S(p.Plus, this, e, null, n);
}
divide(e, n) {
return new S(p.Divide, this, e, null, n);
}
multiply(e, n) {
return new S(p.Multiply, this, e, null, n);
}
modulo(e, n) {
return new S(p.Modulo, this, e, null, n);
}
power(e, n) {
return new S(p.Exponentiation, this, e, null, n);
}
and(e, n) {
return new S(p.And, this, e, null, n);
}
bitwiseOr(e, n) {
return new S(p.BitwiseOr, this, e, null, n);
}
bitwiseAnd(e, n) {
return new S(p.BitwiseAnd, this, e, null, n);
}
or(e, n) {
return new S(p.Or, this, e, null, n);
}
lower(e, n) {
return new S(p.Lower, this, e, null, n);
}
lowerEquals(e, n) {
return new S(p.LowerEquals, this, e, null, n);
}
bigger(e, n) {
return new S(p.Bigger, this, e, null, n);
}
biggerEquals(e, n) {
return new S(p.BiggerEquals, this, e, null, n);
}
isBlank(e) {
return this.equals(TYPED_NULL_EXPR, e);
}
nullishCoalesce(e, n) {
return new S(p.NullishCoalesce, this, e, null, n);
}
toStmt(e) {
return new Ue(this, null, e);
}
};
Et = class t extends y {
name;
constructor(e, n, s, i) {
super(n, s, i), this.name = e;
}
isEquivalent(e) {
return e instanceof t && this.name === e.name;
}
isConstant() {
return false;
}
visitExpression(e, n) {
return e.visitReadVarExpr(this, n);
}
clone() {
return new t(this.name, this.type, this.sourceSpan);
}
set(e) {
return new S(p.Assign, this, e, null, this.sourceSpan);
}
};
Ct = class t2 extends y {
expr;
constructor(e, n, s, i) {
super(n, s, i), this.expr = e;
}
visitExpression(e, n) {
return e.visitTypeofExpr(this, n);
}
isEquivalent(e) {
return e instanceof t2 && e.expr.isEquivalent(this.expr);
}
isConstant() {
return this.expr.isConstant();
}
clone() {
return new t2(this.expr.clone());
}
};
bt = class t3 extends y {
fn;
args;
pure;
isOptional;
constructor(e, n, s, i, r = false, a, u = false) {
super(s, i, a), this.fn = e, this.args = n, this.pure = r, this.isOptional = u;
}
get receiver() {
return this.fn;
}
isEquivalent(e) {
return e instanceof t3 && this.fn.isEquivalent(e.fn) && ue(this.args, e.args) && this.pure === e.pure;
}
isConstant() {
return false;
}
visitExpression(e, n) {
return e.visitInvokeFunctionExpr(this, n);
}
clone() {
return new t3(this.fn.clone(), this.args.map((e) => e.clone()), this.type, this.sourceSpan, this.pure, [], this.isOptional);
}
};
Tt = class t4 extends y {
classExpr;
args;
constructor(e, n, s, i, r) {
super(s, i, r), this.classExpr = e, this.args = n;
}
isEquivalent(e) {
return e instanceof t4 && this.classExpr.isEquivalent(e.classExpr) && ue(this.args, e.args);
}
isConstant() {
return false;
}
visitExpression(e, n) {
return e.visitInstantiateExpr(this, n);
}
clone() {
return new t4(this.classExpr.clone(), this.args.map((e) => e.clone()), this.type, this.sourceSpan);
}
};
kt = class t5 extends y {
body;
flags;
constructor(e, n, s, i) {
super(null, s, i), this.body = e, this.flags = n;
}
isEquivalent(e) {
return e instanceof t5 && this.body === e.body && this.flags === e.flags;
}
isConstant() {
return true;
}
visitExpression(e, n) {
return e.visitRegularExpressionLiteral(this, n);
}
clone() {
return new t5(this.body, this.flags, this.sourceSpan);
}
};
He = class t6 extends y {
value;
constructor(e, n, s, i) {
super(n, s, i), this.value = e;
}
isEquivalent(e) {
return e instanceof t6 && this.value === e.value;
}
isConstant() {
return true;
}
visitExpression(e, n) {
return e.visitLiteralExpr(this, n);
}
clone() {
return new t6(this.value, this.type, this.sourceSpan);
}
};
_t = class t7 extends y {
value;
typeParams;
constructor(e, n, s = null, i, r) {
super(n, i, r), this.value = e, this.typeParams = s;
}
isEquivalent(e) {
return e instanceof t7 && this.value.name === e.value.name && this.value.moduleName === e.value.moduleName;
}
isConstant() {
return false;
}
visitExpression(e, n) {
return e.visitExternalExpr(this, n);
}
clone() {
return new t7(this.value, this.type, this.typeParams, this.sourceSpan);
}
};
It = class t8 extends y {
condition;
falseCase;
trueCase;
constructor(e, n, s = null, i, r, a) {
super(i || n.type, r, a), this.condition = e, this.falseCase = s, this.trueCase = n;
}
isEquivalent(e) {
return e instanceof t8 && this.condition.isEquivalent(e.condition) && this.trueCase.isEquivalent(e.trueCase) && mr(this.falseCase, e.falseCase);
}
isConstant() {
return false;
}
visitExpression(e, n) {
return e.visitConditionalExpr(this, n);
}
clone() {
return new t8(this.condition.clone(), this.trueCase.clone(), this.falseCase?.clone(), this.type, this.sourceSpan);
}
};
S = class t9 extends y {
operator;
rhs;
lhs;
constructor(e, n, s, i, r, a) {
super(i || n.type, r, a), this.operator = e, this.rhs = s, this.lhs = n;
}
isEquivalent(e) {
return e instanceof t9 && this.operator === e.operator && this.lhs.isEquivalent(e.lhs) && this.rhs.isEquivalent(e.rhs);
}
isConstant() {
return false;
}
visitExpression(e, n) {
return e.visitBinaryOperatorExpr(this, n);
}
clone() {
return new t9(this.operator, this.lhs.clone(), this.rhs.clone(), this.type, this.sourceSpan);
}
isAssignment() {
let e = this.operator;
return e === p.Assign || e === p.AdditionAssignment || e === p.SubtractionAssignment || e === p.MultiplicationAssignment || e === p.DivisionAssignment || e === p.RemainderAssignment || e === p.ExponentiationAssignment || e === p.AndAssignment || e === p.OrAssignment || e === p.NullishCoalesceAssignment;
}
};
Nt = class t10 extends y {
receiver;
name;
isOptional;
constructor(e, n, s, i, r, a = false) {
super(s, i, r), this.receiver = e, this.name = n, this.isOptional = a;
}
get index() {
return this.name;
}
isEquivalent(e) {
return e instanceof t10 && this.receiver.isEquivalent(e.receiver) && this.name === e.name && this.isOptional === e.isOptional;
}
isConstant() {
return false;
}
visitExpression(e, n) {
return e.visitReadPropExpr(this, n);
}
set(e) {
return new S(p.Assign, this.receiver.prop(this.name), e, null, this.sourceSpan);
}
clone() {
return new t10(this.receiver.clone(), this.name, this.type, this.sourceSpan, [], this.isOptional);
}
};
At = class t11 extends y {
receiver;
index;
isOptional;
constructor(e, n, s, i, r, a = false) {
super(s, i, r), this.receiver = e, this.index = n, this.isOptional = a;
}
isEquivalent(e) {
return e instanceof t11 && this.receiver.isEquivalent(e.receiver) && this.index.isEquivalent(e.index) && this.isOptional === e.isOptional;
}
isConstant() {
return false;
}
visitExpression(e, n) {
return e.visitReadKeyExpr(this, n);
}
set(e) {
return new S(p.Assign, this.receiver.key(this.index), e, null, this.sourceSpan);
}
clone() {
return new t11(this.receiver.clone(), this.index.clone(), this.type, this.sourceSpan, [], this.isOptional);
}
};
Pt = class t12 extends y {
entries;
constructor(e, n, s, i) {
super(n, s, i), this.entries = e;
}
isConstant() {
return this.entries.every((e) => e.isConstant());
}
isEquivalent(e) {
return e instanceof t12 && ue(this.entries, e.entries);
}
visitExpression(e, n) {
return e.visitLiteralArrayExpr(this, n);
}
clone() {
return new t12(this.entries.map((e) => e.clone()), this.type, this.sourceSpan);
}
};
Lt = class t13 {
expression;
constructor(e) {
this.expression = e;
}
isEquivalent(e) {
return e instanceof t13 && this.expression.isEquivalent(e.expression);
}
clone() {
return new t13(this.expression.clone());
}
isConstant() {
return this.expression.isConstant();
}
};
$t = class t14 extends y {
entries;
valueType = null;
constructor(e, n, s, i) {
super(n, s, i), this.entries = e, n && (this.valueType = n.valueType);
}
isEquivalent(e) {
return e instanceof t14 && ue(this.entries, e.entries);
}
isConstant() {
return this.entries.every((e) => e.isConstant());
}
visitExpression(e, n) {
return e.visitLiteralMapExpr(this, n);
}
clone() {
let e = this.entries.map((n) => n.clone());
return new t14(e, this.type, this.sourceSpan);
}
};
Mt = class t15 extends y {
expression;
constructor(e, n, s) {
super(null, n, s), this.expression = e;
}
isEquivalent(e) {
return e instanceof t15 && this.expression.isEquivalent(e.expression);
}
isConstant() {
return this.expression.isConstant();
}
visitExpression(e, n) {
return e.visitSpreadElementExpr(this, n);
}
clone() {
return new t15(this.expression.clone(), this.sourceSpan);
}
};
(function(t30) {
t30[t30.None = 0] = "None", t30[t30.Final = 1] = "Final", t30[t30.Private = 2] = "Private", t30[t30.Exported = 4] = "Exported", t30[t30.Static = 8] = "Static";
})(pe || (pe = {}));
he = class {
modifiers;
sourceSpan;
leadingComments;
constructor(e = pe.None, n = null, s) {
this.modifiers = e, this.sourceSpan = n, this.leadingComments = s;
}
hasModifier(e) {
return (this.modifiers & e) !== 0;
}
addLeadingComment(e) {
this.leadingComments = this.leadingComments ?? [], this.leadingComments.push(e);
}
};
Rt = class t16 extends he {
name;
value;
type;
constructor(e, n, s, i, r, a) {
super(i, r, a), this.name = e, this.value = n, this.type = s || n && n.type || null;
}
isEquivalent(e) {
return e instanceof t16 && this.name === e.name && (this.value ? !!e.value && this.value.isEquivalent(e.value) : !e.value);
}
visitStatement(e, n) {
return e.visitDeclareVarStmt(this, n);
}
};
Ue = class t17 extends he {
expr;
constructor(e, n, s) {
super(pe.None, n, s), this.expr = e;
}
isEquivalent(e) {
return e instanceof t17 && this.expr.isEquivalent(e.expr);
}
visitStatement(e, n) {
return e.visitExpressionStmt(this, n);
}
};
We = class t18 extends he {
value;
constructor(e, n = null, s) {
super(pe.None, n, s), this.value = e;
}
isEquivalent(e) {
return e instanceof t18 && this.value.isEquivalent(e.value);
}
visitStatement(e, n) {
return e.visitReturnStmt(this, n);
}
};
Ot = class t19 extends he {
condition;
trueCase;
falseCase;
constructor(e, n, s = [], i, r) {
super(pe.None, i, r), this.condition = e, this.trueCase = n, this.falseCase = s;
}
isEquivalent(e) {
return e instanceof t19 && this.condition.isEquivalent(e.condition) && ue(this.trueCase, e.trueCase) && ue(this.falseCase, e.falseCase);
}
visitStatement(e, n) {
return e.visitIfStmt(this, n);
}
};
Gn = class t20 {
static INSTANCE = new t20();
keyOf(e) {
if (e instanceof He && typeof e.value == "string") return `"${e.value}"`;
if (e instanceof He) return String(e.value);
if (e instanceof kt) return `/${e.body}/${e.flags ?? ""}`;
if (e instanceof Pt) {
let n = [];
for (let s of e.entries) n.push(this.keyOf(s));
return `[${n.join(",")}]`;
} else if (e instanceof $t) {
let n = [];
for (let s of e.entries) if (s instanceof Lt) n.push("..." + this.keyOf(s.expression));
else {
let i = s.key;
s.quoted && (i = `"${i}"`), n.push(i + ":" + this.keyOf(s.value));
}
return `{${n.join(",")}}`;
} else {
if (e instanceof _t) return `import("${e.value.moduleName}", ${e.value.name})`;
if (e instanceof Et) return `read(${e.name})`;
if (e instanceof Ct) return `typeof(${this.keyOf(e.expr)})`;
if (e instanceof Mt) return `...${this.keyOf(e.expression)}`;
throw new Error(`${this.constructor.name} does not handle expressions of type ${e.constructor.name}`);
}
}
};
o = "@angular/core";
c = class {
static core = { name: null, moduleName: o };
static namespaceHTML = { name: "\u0275\u0275namespaceHTML", moduleName: o };
static namespaceMathML = { name: "\u0275\u0275namespaceMathML", moduleName: o };
static namespaceSVG = { name: "\u0275\u0275namespaceSVG", moduleName: o };
static element = { name: "\u0275\u0275element", moduleName: o };
static elementStart = { name: "\u0275\u0275elementStart", moduleName: o };
static elementEnd = { name: "\u0275\u0275elementEnd", moduleName: o };
static domElement = { name: "\u0275\u0275domElement", moduleName: o };
static domElementStart = { name: "\u0275\u0275domElementStart", moduleName: o };
static domElementEnd = { name: "\u0275\u0275domElementEnd", moduleName: o };
static domElementContainer = { name: "\u0275\u0275domElementContainer", moduleName: o };
static domElementContainerStart = { name: "\u0275\u0275domElementContainerStart", moduleName: o };
static domElementContainerEnd = { name: "\u0275\u0275domElementContainerEnd", moduleName: o };
static domTemplate = { name: "\u0275\u0275domTemplate", moduleName: o };
static domListener = { name: "\u0275\u0275domListener", moduleName: o };
static advance = { name: "\u0275\u0275advance", moduleName: o };
static syntheticHostProperty = { name: "\u0275\u0275syntheticHostProperty", moduleName: o };
static syntheticHostListener = { name: "\u0275\u0275syntheticHostListener", moduleName: o };
static attribute = { name: "\u0275\u0275attribute", moduleName: o };
static classProp = { name: "\u0275\u0275classProp", moduleName: o };
static elementContainerStart = { name: "\u0275\u0275elementContainerStart", moduleName: o };
static elementContainerEnd = { name: "\u0275\u0275elementContainerEnd", moduleName: o };
static elementContainer = { name: "\u0275\u0275elementContainer", moduleName: o };
static styleMap = { name: "\u0275\u0275styleMap", moduleName: o };
static classMap = { name: "\u0275\u0275classMap", moduleName: o };
static styleProp = { name: "\u0275\u0275styleProp", moduleName: o };
static interpolate = { name: "\u0275\u0275interpolate", moduleName: o };
static interpolate1 = { name: "\u0275\u0275interpolate1", moduleName: o };
static interpolate2 = { name: "\u0275\u0275interpolate2", moduleName: o };
static interpolate3 = { name: "\u0275\u0275interpolate3", moduleName: o };
static interpolate4 = { name: "\u0275\u0275interpolate4", moduleName: o };
static interpolate5 = { name: "\u0275\u0275interpolate5", moduleName: o };
static interpolate6 = { name: "\u0275\u0275interpolate6", moduleName: o };
static interpolate7 = { name: "\u0275\u0275interpolate7", moduleName: o };
static interpolate8 = { name: "\u0275\u0275interpolate8", moduleName: o };
static interpolateV = { name: "\u0275\u0275interpolateV", moduleName: o };
static nextContext = { name: "\u0275\u0275nextContext", moduleName: o };
static resetView = { name: "\u0275\u0275resetView", moduleName: o };
static templateCreate = { name: "\u0275\u0275template", moduleName: o };
static defer = { name: "\u0275\u0275defer", moduleName: o };
static deferWhen = { name: "\u0275\u0275deferWhen", moduleName: o };
static deferOnIdle = { name: "\u0275\u0275deferOnIdle", moduleName: o };
static deferOnImmediate = { name: "\u0275\u0275deferOnImmediate", moduleName: o };
static deferOnTimer = { name: "\u0275\u0275deferOnTimer", moduleName: o };
static deferOnHover = { name: "\u0275\u0275deferOnHover", moduleName: o };
static deferOnInteraction = { name: "\u0275\u0275deferOnInteraction", moduleName: o };
static deferOnViewport = { name: "\u0275\u0275deferOnViewport", moduleName: o };
static deferPrefetchWhen = { name: "\u0275\u0275deferPrefetchWhen", moduleName: o };
static deferPrefetchOnIdle = { name: "\u0275\u0275deferPrefetchOnIdle", moduleName: o };
static deferPrefetchOnImmediate = { name: "\u0275\u0275deferPrefetchOnImmediate", moduleName: o };
static deferPrefetchOnTimer = { name: "\u0275\u0275deferPrefetchOnTimer", moduleName: o };
static deferPrefetchOnHover = { name: "\u0275\u0275deferPrefetchOnHover", moduleName: o };
static deferPrefetchOnInteraction = { name: "\u0275\u0275deferPrefetchOnInteraction", moduleName: o };
static deferPrefetchOnViewport = { name: "\u0275\u0275deferPrefetchOnViewport", moduleName: o };
static deferHydrateWhen = { name: "\u0275\u0275deferHydrateWhen", moduleName: o };
static deferHydrateNever = { name: "\u0275\u0275deferHydrateNever", moduleName: o };
static deferHydrateOnIdle = { name: "\u0275\u0275deferHydrateOnIdle", moduleName: o };
static deferHydrateOnImmediate = { name: "\u0275\u0275deferHydrateOnImmediate", moduleName: o };
static deferHydrateOnTimer = { name: "\u0275\u0275deferHydrateOnTimer", moduleName: o };
static deferHydrateOnHover = { name: "\u0275\u0275deferHydrateOnHover", moduleName: o };
static deferHydrateOnInteraction = { name: "\u0275\u0275deferHydrateOnInteraction", moduleName: o };
static deferHydrateOnViewport = { name: "\u0275\u0275deferHydrateOnViewport", moduleName: o };
static deferEnableTimerScheduling = { name: "\u0275\u0275deferEnableTimerScheduling", moduleName: o };
static enableIncrementalHydrationRuntime = { name: "\u0275\u0275enableIncrementalHydrationRuntime", moduleName: o };
static conditionalCreate = { name: "\u0275\u0275conditionalCreate", moduleName: o };
static conditionalBranchCreate = { name: "\u0275\u0275conditionalBranchCreate", moduleName: o };
static conditional = { name: "\u0275\u0275conditional", moduleName: o };
static repeater = { name: "\u0275\u0275repeater", moduleName: o };
static repeaterCreate = { name: "\u0275\u0275repeaterCreate", moduleName: o };
static repeaterTrackByIndex = { name: "\u0275\u0275repeaterTrackByIndex", moduleName: o };
static repeaterTrackByIdentity = { name: "\u0275\u0275repeaterTrackByIdentity", moduleName: o };
static componentInstance = { name: "\u0275\u0275componentInstance", moduleName: o };
static text = { name: "\u0275\u0275text", moduleName: o };
static enableBindings = { name: "\u0275\u0275enableBindings", moduleName: o };
static disableBindings = { name: "\u0275\u0275disableBindings", moduleName: o };
static getCurrentView = { name: "\u0275\u0275getCurrentView", moduleName: o };
static textInterpolate = { name: "\u0275\u0275textInterpolate", moduleName: o };
static textInterpolate1 = { name: "\u0275\u0275textInterpolate1", moduleName: o };
static textInterpolate2 = { name: "\u0275\u0275textInterpolate2", moduleName: o };
static textInterpolate3 = { name: "\u0275\u0275textInterpolate3", moduleName: o };
static textInterpolate4 = { name: "\u0275\u0275textInterpolate4", moduleName: o };
static textInterpolate5 = { name: "\u0275\u0275textInterpolate5", moduleName: o };
static textInterpolate6 = { name: "\u0275\u0275textInterpolate6", moduleName: o };
static textInterpolate7 = { name: "\u0275\u0275textInterpolate7", moduleName: o };
static textInterpolate8 = { name: "\u0275\u0275textInterpolate8", moduleName: o };
static textInterpolateV = { name: "\u0275\u0275textInterpolateV", moduleName: o };
static restoreView = { name: "\u0275\u0275restoreView", moduleName: o };
static pureFunction0 = { name: "\u0275\u0275pureFunction0", moduleName: o };
static pureFunction1 = { name: "\u0275\u0275pureFunction1", moduleName: o };
static pureFunction2 = { name: "\u0275\u0275pureFunction2", moduleName: o };
static pureFunction3 = { name: "\u0275\u0275pureFunction3", moduleName: o };
static pureFunction4 = { name: "\u0275\u0275pureFunction4", moduleName: o };
static pureFunction5 = { name: "\u0275\u0275pureFunction5", moduleName: o };
static pureFunction6 = { name: "\u0275\u0275pureFunction6", moduleName: o };
static pureFunction7 = { name: "\u0275\u0275pureFunction7", moduleName: o };
static pureFunction8 = { name: "\u0275\u0275pureFunction8", moduleName: o };
static pureFunctionV = { name: "\u0275\u0275pureFunctionV", moduleName: o };
static pipeBind1 = { name: "\u0275\u0275pipeBind1", moduleName: o };
static pipeBind2 = { name: "\u0275\u0275pipeBind2", moduleName: o };
static pipeBind3 = { name: "\u0275\u0275pipeBind3", moduleName: o };
static pipeBind4 = { name: "\u0275\u0275pipeBind4", moduleName: o };
static pipeBindV = { name: "\u0275\u0275pipeBindV", moduleName: o };
static domProperty = { name: "\u0275\u0275domProperty", moduleName: o };
static ariaProperty = { name: "\u0275\u0275ariaProperty", moduleName: o };
static property = { name: "\u0275\u0275property", moduleName: o };
static control = { name: "\u0275\u0275control", moduleName: o };
static controlCreate = { name: "\u0275\u0275controlCreate", moduleName: o };
static animationEnterListener = { name: "\u0275\u0275animateEnterListener", moduleName: o };
static animationLeaveListener = { name: "\u0275\u0275animateLeaveListener", moduleName: o };
static animationEnter = { name: "\u0275\u0275animateEnter", moduleName: o };
static animationLeave = { name: "\u0275\u0275animateLeave", moduleName: o };
static i18n = { name: "\u0275\u0275i18n", moduleName: o };
static i18nAttributes = { name: "\u0275\u0275i18nAttributes", moduleName: o };
static i18nExp = { name: "\u0275\u0275i18nExp", moduleName: o };
static i18nStart = { name: "\u0275\u0275i18nStart", moduleName: o };
static i18nEnd = { name: "\u0275\u0275i18nEnd", moduleName: o };
static i18nApply = { name: "\u0275\u0275i18nApply", moduleName: o };
static i18nPostprocess = { name: "\u0275\u0275i18nPostprocess", moduleName: o };
static pipe = { name: "\u0275\u0275pipe", moduleName: o };
static projection = { name: "\u0275\u0275projection", moduleName: o };
static projectionDef = { name: "\u0275\u0275projectionDef", moduleName: o };
static reference = { name: "\u0275\u0275reference", moduleName: o };
static inject = { name: "\u0275\u0275inject", moduleName: o };
static injectAttribute = { name: "\u0275\u0275injectAttribute", moduleName: o };
static directiveInject = { name: "\u0275\u0275directiveInject", moduleName: o };
static invalidFactory = { name: "\u0275\u0275invalidFactory", moduleName: o };
static invalidFactoryDep = { name: "\u0275\u0275invalidFactoryDep", moduleName: o };
static templateRefExtractor = { name: "\u0275\u0275templateRefExtractor", moduleName: o };
static forwardRef = { name: "forwardRef", moduleName: o };
static resolveForwardRef = { name: "resolveForwardRef", moduleName: o };
static replaceMetadata = { name: "\u0275\u0275replaceMetadata", moduleName: o };
static getReplaceMetadataURL = { name: "\u0275\u0275getReplaceMetadataURL", moduleName: o };
static \u0275\u0275defineInjectable = { name: "\u0275\u0275defineInjectable", moduleName: o };
static declareInjectable = { name: "\u0275\u0275ngDeclareInjectable", moduleName: o };
static InjectableDeclaration = { name: "\u0275\u0275InjectableDeclaration", moduleName: o };
static defineService = { name: "\u0275\u0275defineService", moduleName: o };
static declareService = { name: "\u0275\u0275ngDeclareService", moduleName: o };
static resolveWindow = { name: "\u0275\u0275resolveWindow", moduleName: o };
static resolveDocument = { name: "\u0275\u0275resolveDocument", moduleName: o };
static resolveBody = { name: "\u0275\u0275resolveBody", moduleName: o };
static getComponentDepsFactory = { name: "\u0275\u0275getComponentDepsFactory", moduleName: o };
static defineComponent = { name: "\u0275\u0275defineComponent", moduleName: o };
static declareComponent = { name: "\u0275\u0275ngDeclareComponent", moduleName: o };
static setComponentScope = { name: "\u0275\u0275setComponentScope", moduleName: o };
static ChangeDetectionStrategy = { name: "ChangeDetectionStrategy", moduleName: o };
static ViewEncapsulation = { name: "ViewEncapsulation", moduleName: o };
static ComponentDeclaration = { name: "\u0275\u0275ComponentDeclaration", moduleName: o };
static FactoryDeclaration = { name: "\u0275\u0275FactoryDeclaration", moduleName: o };
static declareFactory = { name: "\u0275\u0275ngDeclareFactory", moduleName: o };
static FactoryTarget = { name: "\u0275\u0275FactoryTarget", moduleName: o };
static defineDirective = { name: "\u0275\u0275defineDirective", moduleName: o };
static declareDirective = { name: "\u0275\u0275ngDeclareDirective", moduleName: o };
static DirectiveDeclaration = { name: "\u0275\u0275DirectiveDeclaration", moduleName: o };
static InjectorDef = { name: "\u0275\u0275InjectorDef", moduleName: o };
static InjectorDeclaration = { name: "\u0275\u0275InjectorDeclaration", moduleName: o };
static defineInjector = { name: "\u0275\u0275defineInjector", moduleName: o };
static declareInjector = { name: "\u0275\u0275ngDeclareInjector", moduleName: o };
static NgModuleDeclaration = { name: "\u0275\u0275NgModuleDeclaration", moduleName: o };
static ModuleWithProviders = { name: "ModuleWithProviders", moduleName: o };
static defineNgModule = { name: "\u0275\u0275defineNgModule", moduleName: o };
static declareNgModule = { name: "\u0275\u0275ngDeclareNgModule", moduleName: o };
static setNgModuleScope = { name: "\u0275\u0275setNgModuleScope", moduleName: o };
static registerNgModuleType = { name: "\u0275\u0275registerNgModuleType", moduleName: o };
static PipeDeclaration = { name: "\u0275\u0275PipeDeclaration", moduleName: o };
static definePipe = { name: "\u0275\u0275definePipe", moduleName: o };
static declarePipe = { name: "\u0275\u0275ngDeclarePipe", moduleName: o };
static declareClassMetadata = { name: "\u0275\u0275ngDeclareClassMetadata", moduleName: o };
static declareClassMetadataAsync = { name: "\u0275\u0275ngDeclareClassMetadataAsync", moduleName: o };
static setClassMetadata = { name: "\u0275setClassMetadata", moduleName: o };
static setClassMetadataAsync = { name: "\u0275setClassMetadataAsync", moduleName: o };
static setClassDebugInfo = { name: "\u0275setClassDebugInfo", moduleName: o };
static queryRefresh = { name: "\u0275\u0275queryRefresh", moduleName: o };
static viewQuery = { name: "\u0275\u0275viewQuery", moduleName: o };
static loadQuery = { name: "\u0275\u0275loadQuery", moduleName: o };
static contentQuery = { name: "\u0275\u0275contentQuery", moduleName: o };
static viewQuerySignal = { name: "\u0275\u0275viewQuerySignal", moduleName: o };
static contentQuerySignal = { name: "\u0275\u0275contentQuerySignal", moduleName: o };
static queryAdvance = { name: "\u0275\u0275queryAdvance", moduleName: o };
static twoWayProperty = { name: "\u0275\u0275twoWayProperty", moduleName: o };
static twoWayBindingSet = { name: "\u0275\u0275twoWayBindingSet", moduleName: o };
static twoWayListener = { name: "\u0275\u0275twoWayListener", moduleName: o };
static declareLet = { name: "\u0275\u0275declareLet", moduleName: o };
static storeLet = { name: "\u0275\u0275storeLet", moduleName: o };
static readContextLet = { name: "\u0275\u0275readContextLet", moduleName: o };
static arrowFunction = { name: "\u0275\u0275arrowFunction", moduleName: o };
static attachSourceLocations = { name: "\u0275\u0275attachSourceLocations", moduleName: o };
static NgOnChangesFeature = { name: "\u0275\u0275NgOnChangesFeature", moduleName: o };
static ControlFeature = { name: "\u0275\u0275ControlFeature", moduleName: o };
static InheritDefinitionFeature = { name: "\u0275\u0275InheritDefinitionFeature", moduleName: o };
static ProvidersFeature = { name: "\u0275\u0275ProvidersFeature", moduleName: o };
static HostDirectivesFeature = { name: "\u0275\u0275HostDirectivesFeature", moduleName: o };
static ExternalStylesFeature = { name: "\u0275\u0275ExternalStylesFeature", moduleName: o };
static listener = { name: "\u0275\u0275listener", moduleName: o };
static getInheritedFactory = { name: "\u0275\u0275getInheritedFactory", moduleName: o };
static sanitizeHtml = { name: "\u0275\u0275sanitizeHtml", moduleName: o };
static sanitizeStyle = { name: "\u0275\u0275sanitizeStyle", moduleName: o };
static validateAttribute = { name: "\u0275\u0275validateAttribute", moduleName: o };
static sanitizeResourceUrl = { name: "\u0275\u0275sanitizeResourceUrl", moduleName: o };
static sanitizeScript = { name: "\u0275\u0275sanitizeScript", moduleName: o };
static sanitizeUrl = { name: "\u0275\u0275sanitizeUrl", moduleName: o };
static sanitizeUrlOrResourceUrl = { name: "\u0275\u0275sanitizeUrlOrResourceUrl", moduleName: o };
static trustConstantHtml = { name: "\u0275\u0275trustConstantHtml", moduleName: o };
static trustConstantResourceUrl = { name: "\u0275\u0275trustConstantResourceUrl", moduleName: o };
static inputDecorator = { name: "Input", moduleName: o };
static outputDecorator = { name: "Output", moduleName: o };
static viewChildDecorator = { name: "ViewChild", moduleName: o };
static viewChildrenDecorator = { name: "ViewChildren", moduleName: o };
static contentChildDecorator = { name: "ContentChild", moduleName: o };
static contentChildrenDecorator = { name: "ContentChildren", moduleName: o };
static InputSignalBrandWriteType = { name: "\u0275INPUT_SIGNAL_BRAND_WRITE_TYPE", moduleName: o };
static UnwrapDirectiveSignalInputs = { name: "\u0275UnwrapDirectiveSignalInputs", moduleName: o };
static unwrapWritableSignal = { name: "\u0275unwrapWritableSignal", moduleName: o };
static assertType = { name: "\u0275assertType", moduleName: o };
};
vr = /-+([a-z0-9])/g;
Dt = class {
full;
major;
minor;
patch;
constructor(e) {
this.full = e;
let n = e.split(".");
this.major = n[0], this.minor = n[1], this.patch = n.slice(2).join(".");
}
};
oa = /* @__PURE__ */ new Map([[p.And, "&&"], [p.Bigger, ">"], [p.BiggerEquals, ">="], [p.BitwiseOr, "|"], [p.BitwiseAnd, "&"], [p.Divide, "/"], [p.Assign, "="], [p.Equals, "=="], [p.Identical, "==="], [p.Lower, "<"], [p.LowerEquals, "<="], [p.Minus, "-"], [p.Modulo, "%"], [p.Exponentiation, "**"], [p.Multiply, "*"], [p.NotEquals, "!="], [p.NotIdentical, "!=="], [p.NullishCoalesce, "??"], [p.Or, "||"], [p.Plus, "+"], [p.In, "in"], [p.InstanceOf, "instanceof"], [p.AdditionAssignment, "+="], [p.SubtractionAssignment, "-="], [p.MultiplicationAssignment, "*="], [p.DivisionAssignment, "/="], [p.RemainderAssignment, "%="], [p.ExponentiationAssignment, "**="], [p.AndAssignment, "&&="], [p.OrAssignment, "||="], [p.NullishCoalesceAssignment, "??="]]);
(function(t30) {
t30[t30.Class = 0] = "Class", t30[t30.Function = 1] = "Function";
})(Xn || (Xn = {}));
ee = class {
start;
end;
constructor(e, n) {
this.start = e, this.end = n;
}
toAbsolute(e) {
return new D(e + this.start, e + this.end);
}
};
v = class {
span;
sourceSpan;
constructor(e, n) {
this.span = e, this.sourceSpan = n;
}
toString() {
return "AST";
}
};
Le = class extends v {
nameSpan;
constructor(e, n, s) {
super(e, n), this.nameSpan = s;
}
};
N = class extends v {
visit(e, n = null) {
return e.visitEmptyExpr?.(this, n);
}
};
fe = class extends v {
visit(e, n = null) {
return e.visitImplicitReceiver(this, n);
}
};
Bt = class extends v {
visit(e, n = null) {
return e.visitThisReceiver?.(this, n);
}
};
Ft = class extends v {
expressions;
constructor(e, n, s) {
super(e, n), this.expressions = s;
}
visit(e, n = null) {
return e.visitChain(this, n);
}
};
Vt = class extends v {
condition;
trueExp;
falseExp;
constructor(e, n, s, i, r) {
super(e, n), this.condition = s, this.trueExp = i, this.falseExp = r;
}
visit(e, n = null) {
return e.visitConditional(this, n);
}
};
ke = class extends Le {
receiver;
name;
constructor(e, n, s, i, r) {
super(e, n, s), this.receiver = i, this.name = r;
}
visit(e, n = null) {
return e.visitPropertyRead(this, n);
}
};
Ht = class extends Le {
receiver;
name;
constructor(e, n, s, i, r) {
super(e, n, s), this.receiver = i, this.name = r;
}
visit(e, n = null) {
return e.visitSafePropertyRead(this, n);
}
};
qe = class extends v {
receiver;
key;
constructor(e, n, s, i) {
super(e, n), this.receiver = s, this.key = i;
}
visit(e, n = null) {
return e.visitKeyedRead(this, n);
}
};
Ut = class extends v {
receiver;
key;
constructor(e, n, s, i) {
super(e, n), this.receiver = s, this.key = i;
}
visit(e, n = null) {
return e.visitSafeKeyedRead(this, n);
}
};
(function(t30) {
t30[t30.ReferencedByName = 0] = "ReferencedByName", t30[t30.ReferencedDirectly = 1] = "ReferencedDirectly";
})(_e || (_e = {}));
Wt = class extends Le {
exp;
name;
args;
type;
constructor(e, n, s, i, r, a, u) {
super(e, n, u), this.exp = s, this.name = i, this.args = r, this.type = a;
}
visit(e, n = null) {
return e.visitPipe(this, n);
}
};
A = class extends v {
value;
constructor(e, n, s) {
super(e, n), this.value = s;
}
visit(e, n = null) {
return e.visitLiteralPrimitive(this, n);
}
};
qt = class extends v {
expressions;
constructor(e, n, s) {
super(e, n), this.expressions = s;
}
visit(e, n = null) {
return e.visitLiteralArray(this, n);
}
};
jt = class extends v {
expression;
constructor(e, n, s) {
super(e, n), this.expression = s;
}
visit(e, n = null) {
return e.visitSpreadElement(this, n);
}
};
zt = class extends v {
keys;
values;
constructor(e, n, s, i) {
super(e, n), this.keys = s, this.values = i;
}
visit(e, n = null) {
return e.visitLiteralMap(this, n);
}
};
Sr = class extends v {
strings;
expressions;
constructor(e, n, s, i) {
super(e, n), this.strings = s, this.expressions = i;
}
visit(e, n = null) {
return e.visitInterpolation(this, n);
}
};
E = class extends v {
operation;
left;
right;
constructor(e, n, s, i, r) {
super(e, n), this.operation = s, this.left = i, this.right = r;
}
visit(e, n = null) {
return e.visitBinary(this, n);
}
static isAssignmentOperation(e) {
return e === "=" || e === "+=" || e === "-=" || e === "*=" || e === "/=" || e === "%=" || e === "**=" || e === "&&=" || e === "||=" || e === "??=";
}
};
Ie = class t21 extends E {
operator;
expr;
left = null;
right = null;
operation = null;
static createMinus(e, n, s) {
return new t21(e, n, "-", s, "-", new A(e, n, 0), s);
}
static createPlus(e, n, s) {
return new t21(e, n, "+", s, "-", s, new A(e, n, 0));
}
constructor(e, n, s, i, r, a, u) {
super(e, n, r, a, u), this.operator = s, this.expr = i;
}
visit(e, n = null) {
return e.visitUnary !== void 0 ? e.visitUnary(this, n) : e.visitBinary(this, n);
}
};
je = class extends v {
expression;
constructor(e, n, s) {
super(e, n), this.expression = s;
}
visit(e, n = null) {
return e.visitPrefixNot(this, n);
}
};
ze = class extends v {
expression;
constructor(e, n, s) {
super(e, n), this.expression = s;
}
visit(e, n = null) {
return e.visitTypeofExpression(this, n);
}
};
Ge = class extends v {
expression;
constructor(e, n, s) {
super(e, n), this.expression = s;
}
visit(e, n = null) {
return e.visitVoidExpression(this, n);
}
};
Gt = class extends v {
expression;
constructor(e, n, s) {
super(e, n), this.expression = s;
}
visit(e, n = null) {
return e.visitNonNullAssert(this, n);
}
};
Xe = class extends v {
receiver;
args;
argumentSpan;
constructor(e, n, s, i, r) {
super(e, n), this.receiver = s, this.args = i, this.argumentSpan = r;
}
visit(e, n = null) {
return e.visitCall(this, n);
}
};
Xt = class extends v {
receiver;
args;
argumentSpan;
constructor(e, n, s, i, r) {
super(e, n), this.receiver = s, this.args = i, this.argumentSpan = r;
}
visit(e, n = null) {
return e.visitSafeCall(this, n);
}
};
Qe = class extends v {
tag;
template;
constructor(e, n, s, i) {
super(e, n), this.tag = s, this.template = i;
}
visit(e, n) {
return e.visitTaggedTemplateLiteral(this, n);
}
};
Je = class extends v {
elements;
expressions;
constructor(e, n, s, i) {
super(e, n), this.elements = s, this.expressions = i;
}
visit(e, n) {
return e.visitTemplateLiteral(this, n);
}
};
Ye = class extends v {
text;
constructor(e, n, s) {
super(e, n), this.text = s;
}
visit(e, n) {
return e.visitTemplateLiteralElement(this, n);
}
};
$e = class extends v {
expression;
constructor(e, n, s) {
super(e, n), this.expression = s;
}
visit(e, n) {
return e.visitParenthesizedExpression(this, n);
}
};
Qt = class {
name;
span;
sourceSpan;
constructor(e, n, s) {
this.name = e, this.span = n, this.sourceSpan = s;
}
};
Jt = class extends v {
parameters;
body;
constructor(e, n, s, i) {
super(e, n), this.parameters = s, this.body = i;
}
visit(e, n) {
return e.visitArrowFunction(this, n);
}
};
Yt = class extends v {
body;
flags;
constructor(e, n, s, i) {
super(e, n), this.body = s, this.flags = i;
}
visit(e, n) {
return e.visitRegularExpressionLiteral(this, n);
}
};
D = class {
start;
end;
constructor(e, n) {
this.start = e, this.end = n;
}
};
U = class extends v {
ast;
source;
location;
errors;
constructor(e, n, s, i, r) {
super(new ee(0, n === null ? 0 : n.length), new D(i, n === null ? i : i + n.length)), this.ast = e, this.source = n, this.location = s, this.errors = r;
}
visit(e, n = null) {
return e.visitASTWithSource ? e.visitASTWithSource(this, n) : this.ast.visit(e, n);
}
toString() {
return `${this.source} in ${this.location}`;
}
};
de = class {
sourceSpan;
key;
value;
constructor(e, n, s) {
this.sourceSpan = e, this.key = n, this.value = s;
}
};
Me = class {
sourceSpan;
key;
value;
constructor(e, n, s) {
this.sourceSpan = e, this.key = n, this.value = s;
}
};
Kt = class {
visit(e, n) {
e.visit(this, n);
}
visitUnary(e, n) {
this.visit(e.expr, n);
}
visitBinary(e, n) {
this.visit(e.left, n), this.visit(e.right, n);
}
visitChain(e, n) {
this.visitAll(e.expressions, n);
}
visitConditional(e, n) {
this.visit(e.condition, n), this.visit(e.trueExp, n), this.visit(e.falseExp, n);
}
visitPipe(e, n) {
this.visit(e.exp, n), this.visitAll(e.args, n);
}
visitImplicitReceiver(e, n) {
}
visitThisReceiver(e, n) {
}
visitInterpolation(e, n) {
this.visitAll(e.expressions, n);
}
visitKeyedRead(e, n) {
this.visit(e.receiver, n), this.visit(e.key, n);
}
visitLiteralArray(e, n) {
this.visitAll(e.expressions, n);
}
visitLiteralMap(e, n) {
this.visitAll(e.values, n);
}
visitLiteralPrimitive(e, n) {
}
visitPrefixNot(e, n) {
this.visit(e.expression, n);
}
visitTypeofExpression(e, n) {
this.visit(e.expression, n);
}
visitVoidExpression(e, n) {
this.visit(e.expression, n);
}
visitNonNullAssert(e, n) {
this.visit(e.expression, n);
}
visitPropertyRead(e, n) {
this.visit(e.receiver, n);
}
visitSafePropertyRead(e, n) {
this.visit(e.receiver, n);
}
visitSafeKeyedRead(e, n) {
this.visit(e.receiver, n), this.visit(e.key, n);
}
visitCall(e, n) {
this.visit(e.receiver, n), this.visitAll(e.args, n);
}
visitSafeCall(e, n) {
this.visit(e.receiver, n), this.visitAll(e.args, n);
}
visitTemplateLiteral(e, n) {
for (let s = 0; s < e.elements.length; s++) {
this.visit(e.elements[s], n);
let i = s < e.expressions.length ? e.expressions[s] : null;
i !== null && this.visit(i, n);
}
}
visitTemplateLiteralElement(e, n) {
}
visitTaggedTemplateLiteral(e, n) {
this.visit(e.tag, n), this.visit(e.template, n);
}
visitParenthesizedExpression(e, n) {
this.visit(e.expression, n);
}
visitArrowFunction(e, n) {
this.visit(e.body, n);
}
visitRegularExpressionLiteral(e, n) {
}
visitSpreadElement(e, n) {
this.visit(e.expression, n);
}
visitEmptyExpr(e, n) {
}
visitAll(e, n) {
for (let s of e) this.visit(s, n);
}
};
(function(t30) {
t30[t30.DEFAULT = 0] = "DEFAULT", t30[t30.LITERAL_ATTR = 1] = "LITERAL_ATTR", t30[t30.LEGACY_ANIMATION = 2] = "LEGACY_ANIMATION", t30[t30.TWO_WAY = 3] = "TWO_WAY", t30[t30.ANIMATION = 4] = "ANIMATION";
})(Qn || (Qn = {}));
(function(t30) {
t30[t30.Regular = 0] = "Regular", t30[t30.LegacyAnimation = 1] = "LegacyAnimation", t30[t30.TwoWay = 2] = "TwoWay", t30[t30.Animation = 3] = "Animation";
})(Jn || (Jn = {}));
(function(t30) {
t30[t30.Property = 0] = "Property", t30[t30.Attribute = 1] = "Attribute", t30[t30.Class = 2] = "Class", t30[t30.Style = 3] = "Style", t30[t30.LegacyAnimation = 4] = "LegacyAnimation", t30[t30.TwoWay = 5] = "TwoWay", t30[t30.Animation = 6] = "Animation";
})(M || (M = {}));
(function(t30) {
t30[t30.RAW_TEXT = 0] = "RAW_TEXT", t30[t30.ESCAPABLE_RAW_TEXT = 1] = "ESCAPABLE_RAW_TEXT", t30[t30.PARSABLE_DATA = 2] = "PARSABLE_DATA";
})(Yn || (Yn = {}));
xr = "ctx";
Ee = 0;
Fs = 9;
Ve = 10;
yr = 11;
Er = 12;
Cr = 13;
Vs = 32;
br = 33;
Hs = 34;
Tr = 35;
un = 36;
kr = 37;
es = 38;
Us = 39;
Q = 40;
L = 41;
ts = 42;
Ws = 43;
V = 44;
qs = 45;
G = 46;
Ke = 47;
J = 58;
Te = 59;
_r = 60;
C = 61;
ns = 62;
ss = 63;
Ir = 48;
Nr = 57;
pn = 65;
Ar = 69;
hn = 90;
ce = 91;
St = 92;
Z = 93;
Pr = 94;
at = 95;
js = 97;
Lr = 101;
$r = 102;
Mr = 110;
Rr = 114;
Or = 116;
Dr = 117;
Br = 118;
zs = 122;
Ne = 123;
is = 124;
oe = 125;
Gs = 160;
Zt = 96;
Ze = class t22 {
file;
offset;
line;
col;
constructor(e, n, s, i) {
this.file = e, this.offset = n, this.line = s, this.col = i;
}
toString() {
return this.offset != null ? `${this.file.url}@${this.line}:${this.col}` : this.file.url;
}
moveBy(e) {
let n = this.file.content, s = n.length, i = this.offset, r = this.line, a = this.col;
for (; i > 0 && e < 0; ) if (i--, e++, n.charCodeAt(i) == Ve) {
r--;
let h = n.substring(0, i - 1).lastIndexOf(String.fromCharCode(Ve));
a = h > 0 ? i - h : i;
} else a--;
for (; i < s && e > 0; ) {
let u = n.charCodeAt(i);
i++, e--, u == Ve ? (r++, a = 0) : a++;
}
return new t22(this.file, i, r, a);
}
getContext(e, n) {
let s = this.file.content, i = this.offset;
if (i != null) {
i > s.length - 1 && (i = s.length - 1);
let r = i, a = 0, u = 0;
for (; a < e && i > 0 && (i--, a++, !(s[i] == `
` && ++u == n)); ) ;
for (a = 0, u = 0; a < e && r < s.length - 1 && (r++, a++, !(s[r] == `
` && ++u == n)); ) ;
return { before: s.substring(i, this.offset), after: s.substring(this.offset, r + 1) };
}
return null;
}
};
et = class {
content;
url;
constructor(e, n) {
this.content = e, this.url = n;
}
};
tt = class {
start;
end;
fullStart;
details;
constructor(e, n, s = e, i = null) {
this.start = e, this.end = n, this.fullStart = s, this.details = i;
}
toString() {
return this.start.file.content.substring(this.start.offset, this.end.offset);
}
};
(function(t30) {
t30[t30.WARNING = 0] = "WARNING", t30[t30.ERROR = 1] = "ERROR";
})(nt || (nt = {}));
Re = class extends Error {
span;
msg;
level;
relatedError;
constructor(e, n, s = nt.ERROR, i) {
super(n), this.span = e, this.msg = n, this.level = s, this.relatedError = i, Object.setPrototypeOf(this, new.target.prototype);
}
contextualMessage() {
let e = this.span.start.getContext(100, 3);
return e ? `${this.msg} ("${e.before}[${nt[this.level]} ->]${e.after}")` : this.msg;
}
toString() {
let e = this.span.details ? `, ${this.span.details}` : "";
return `${this.contextualMessage()}: ${this.span.start}${e}`;
}
};
(function(t30) {
t30[t30.Inline = 0] = "Inline", t30[t30.SideEffect = 1] = "SideEffect", t30[t30.Omit = 2] = "Omit";
})(os || (os = {}));
(function(t30) {
t30[t30.Global = 0] = "Global", t30[t30.Local = 1] = "Local", t30[t30.Isolated = 2] = "Isolated";
})(as || (as = {}));
(function(t30) {
t30[t30.Directive = 0] = "Directive", t30[t30.Pipe = 1] = "Pipe", t30[t30.NgModule = 2] = "NgModule";
})(ls || (ls = {}));
Vr = "(:(where|is)\\()?";
Xs = "-shadowcsshost";
Hr = "-shadowcsscontext";
tn = "[^)(]*";
Ur = `(?:\\(${tn}\\)|${tn})+?`;
Wr = `(?:\\(${Ur}\\)|${tn})+?`;
fn = `(?:\\((${Wr})\\))`;
ca = new RegExp("(:nth-[-\\w]+)" + fn, "g");
ua = new RegExp(Xs + fn + "?([^,{]*)", "gim");
qr = Hr + fn + "([^{]*)";
pa = new RegExp(`${Vr}(${qr})`, "gim");
jr = Xs + "-no-combinator";
ha = new RegExp(`${jr}(?![^(]*\\))`, "g");
Qs = "%COMMENT%";
fa = new RegExp(Qs, "g");
da = new RegExp(`(\\s*(?:${Qs}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`, "g");
zr = "%COMMA_IN_PLACEHOLDER%";
Gr = "%SEMI_IN_PLACEHOLDER%";
Xr = "%COLON_IN_PLACEHOLDER%";
ma = new RegExp(zr, "g");
ga = new RegExp(Gr, "g");
va = new RegExp(Xr, "g");
(function(t30) {
t30[t30.ListEnd = 0] = "ListEnd", t30[t30.Statement = 1] = "Statement", t30[t30.Variable = 2] = "Variable", t30[t30.ElementStart = 3] = "ElementStart", t30[t30.Element = 4] = "Element", t30[t30.Template = 5] = "Template", t30[t30.ElementEnd = 6] = "ElementEnd", t30[t30.ContainerStart = 7] = "ContainerStart", t30[t30.Container = 8] = "Container", t30[t30.ContainerEnd = 9] = "ContainerEnd", t30[t30.DisableBindings = 10] = "DisableBindings", t30[t30.ConditionalCreate = 11] = "ConditionalCreate", t30[t30.ConditionalBranchCreate = 12] = "ConditionalBranchCreate", t30[t30.Conditional = 13] = "Conditional", t30[t30.EnableBindings = 14] = "EnableBindings", t30[t30.Text = 15] = "Text", t30[t30.Listener = 16] = "Listener", t30[t30.InterpolateText = 17] = "InterpolateText", t30[t30.Binding = 18] = "Binding", t30[t30.Property = 19] = "Property", t30[t30.StyleProp = 20] = "StyleProp", t30[t30.ClassProp = 21] = "ClassProp", t30[t30.StyleMap = 22] = "StyleMap", t30[t30.ClassMap = 23] = "ClassMap", t30[t30.Advance = 24] = "Advance", t30[t30.Pipe = 25] = "Pipe", t30[t30.Attribute = 26] = "Attribute", t30[t30.ExtractedAttribute = 27] = "ExtractedAttribute", t30[t30.Defer = 28] = "Defer", t30[t30.DeferOn = 29] = "DeferOn", t30[t30.DeferWhen = 30] = "DeferWhen", t30[t30.I18nMessage = 31] = "I18nMessage", t30[t30.DomProperty = 32] = "DomProperty", t30[t30.Namespace = 33] = "Namespace", t30[t30.ProjectionDef = 34] = "ProjectionDef", t30[t30.EnableIncrementalHydrationRuntime = 35] = "EnableIncrementalHydrationRuntime", t30[t30.Projection = 36] = "Projection", t30[t30.RepeaterCreate = 37] = "RepeaterCreate", t30[t30.Repeater = 38] = "Repeater", t30[t30.TwoWayProperty = 39] = "TwoWayProperty", t30[t30.TwoWayListener = 40] = "TwoWayListener", t30[t30.DeclareLet = 41] = "DeclareLet", t30[t30.StoreLet = 42] = "StoreLet", t30[t30.I18nStart = 43] = "I18nStart", t30[t30.I18n = 44] = "I18n", t30[t30.I18nEnd = 45] = "I18nEnd", t30[t30.I18nExpression = 46] = "I18nExpression", t30[t30.I18nApply = 47] = "I18nApply", t30[t30.IcuStart = 48] = "IcuStart", t30[t30.IcuEnd = 49] = "IcuEnd", t30[t30.IcuPlaceholder = 50] = "IcuPlaceholder", t30[t30.I18nContext = 51] = "I18nContext", t30[t30.I18nAttributes = 52] = "I18nAttributes", t30[t30.SourceLocation = 53] = "SourceLocation", t30[t30.Animation = 54] = "Animation", t30[t30.AnimationString = 55] = "AnimationString", t30[t30.AnimationBinding = 56] = "AnimationBinding", t30[t30.AnimationListener = 57] = "AnimationListener", t30[t30.Control = 58] = "Control", t30[t30.ControlCreate = 59] = "ControlCreate";
})(l || (l = {}));
(function(t30) {
t30[t30.LexicalRead = 0] = "LexicalRead", t30[t30.Context = 1] = "Context", t30[t30.TrackContext = 2] = "TrackContext", t30[t30.ReadVariable = 3] = "ReadVariable", t30[t30.NextContext = 4] = "NextContext", t30[t30.Reference = 5] = "Reference", t30[t30.StoreLet = 6] = "StoreLet", t30[t30.ContextLetReference = 7] = "ContextLetReference", t30[t30.GetCurrentView = 8] = "GetCurrentView", t30[t30.RestoreView = 9] = "RestoreView", t30[t30.ResetView = 10] = "ResetView", t30[t30.PureFunctionExpr = 11] = "PureFunctionExpr", t30[t30.PureFunctionParameterExpr = 12] = "PureFunctionParameterExpr", t30[t30.PipeBinding = 13] = "PipeBinding", t30[t30.PipeBindingVariadic = 14] = "PipeBindingVariadic", t30[t30.SafePropertyRead = 15] = "SafePropertyRead", t30[t30.SafeKeyedRead = 16] = "SafeKeyedRead", t30[t30.SafeNavigationMigration = 17] = "SafeNavigationMigration", t30[t30.SafeTernaryExpr = 18] = "SafeTernaryExpr", t30[t30.EmptyExpr = 19] = "EmptyExpr", t30[t30.AssignTemporaryExpr = 20] = "AssignTemporaryExpr", t30[t30.ReadTemporaryExpr = 21] = "ReadTemporaryExpr", t30[t30.SlotLiteralExpr = 22] = "SlotLiteralExpr", t30[t30.ConditionalCase = 23] = "ConditionalCase", t30[t30.ConstCollected = 24] = "ConstCollected", t30[t30.TwoWayBindingSet = 25] = "TwoWayBindingSet", t30[t30.ArrowFunction = 26] = "ArrowFunction";
})(te || (te = {}));
(function(t30) {
t30[t30.None = 0] = "None", t30[t30.AlwaysInline = 1] = "AlwaysInline";
})(cs || (cs = {}));
(function(t30) {
t30[t30.Context = 0] = "Context", t30[t30.Identifier = 1] = "Identifier", t30[t30.SavedView = 2] = "SavedView", t30[t30.Alias = 3] = "Alias";
})(us || (us = {}));
(function(t30) {
t30[t30.Attribute = 0] = "Attribute", t30[t30.ClassName = 1] = "ClassName", t30[t30.StyleProperty = 2] = "StyleProperty", t30[t30.Property = 3] = "Property", t30[t30.Template = 4] = "Template", t30[t30.I18n = 5] = "I18n", t30[t30.LegacyAnimation = 6] = "LegacyAnimation", t30[t30.TwoWayProperty = 7] = "TwoWayProperty", t30[t30.Animation = 8] = "Animation";
})(R || (R = {}));
(function(t30) {
t30[t30.Creation = 0] = "Creation", t30[t30.Postproccessing = 1] = "Postproccessing";
})(ps || (ps = {}));
(function(t30) {
t30[t30.I18nText = 0] = "I18nText", t30[t30.I18nAttribute = 1] = "I18nAttribute";
})(hs || (hs = {}));
(function(t30) {
t30[t30.None = 0] = "None", t30[t30.ElementTag = 1] = "ElementTag", t30[t30.TemplateTag = 2] = "TemplateTag", t30[t30.OpenTag = 4] = "OpenTag", t30[t30.CloseTag = 8] = "CloseTag", t30[t30.ExpressionIndex = 16] = "ExpressionIndex";
})(fs || (fs = {}));
(function(t30) {
t30[t30.HTML = 0] = "HTML", t30[t30.SVG = 1] = "SVG", t30[t30.Math = 2] = "Math";
})(ds || (ds = {}));
(function(t30) {
t30[t30.Idle = 0] = "Idle", t30[t30.Immediate = 1] = "Immediate", t30[t30.Timer = 2] = "Timer", t30[t30.Hover = 3] = "Hover", t30[t30.Interaction = 4] = "Interaction", t30[t30.Viewport = 5] = "Viewport", t30[t30.Never = 6] = "Never";
})(O || (O = {}));
(function(t30) {
t30[t30.RootI18n = 0] = "RootI18n", t30[t30.Icu = 1] = "Icu", t30[t30.Attr = 2] = "Attr";
})(ms || (ms = {}));
(function(t30) {
t30[t30.NgTemplate = 0] = "NgTemplate", t30[t30.Structural = 1] = "Structural", t30[t30.Block = 2] = "Block";
})(gs || (gs = {}));
nn = class t23 {
static nextListId = 0;
debugListId = t23.nextListId++;
head = { kind: l.ListEnd, next: null, prev: null, debugListId: this.debugListId };
tail = { kind: l.ListEnd, next: null, prev: null, debugListId: this.debugListId };
constructor() {
this.head.next = this.tail, this.tail.prev = this.head;
}
push(e) {
if (Array.isArray(e)) {
for (let s of e) this.push(s);
return;
}
t23.assertIsNotEnd(e), t23.assertIsUnowned(e), e.debugListId = this.debugListId;
let n = this.tail.prev;
e.prev = n, n.next = e, e.next = this.tail, this.tail.prev = e;
}
prepend(e) {
if (e.length === 0) return;
for (let i of e) t23.assertIsNotEnd(i), t23.assertIsUnowned(i), i.debugListId = this.debugListId;
let n = this.head.next, s = this.head;
for (let i of e) s.next = i, i.prev = s, s = i;
s.next = n, n.prev = s;
}
*[Symbol.iterator]() {
let e = this.head.next;
for (; e !== this.tail; ) {
t23.assertIsOwned(e, this.debugListId);
let n = e.next;
yield e, e = n;
}
}
*reversed() {
let e = this.tail.prev;
for (; e !== this.head; ) {
t23.assertIsOwned(e, this.debugListId);
let n = e.prev;
yield e, e = n;
}
}
static replace(e, n) {
t23.assertIsNotEnd(e), t23.assertIsNotEnd(n), t23.assertIsOwned(e), t23.assertIsUnowned(n), n.debugListId = e.debugListId, e.prev !== null && (e.prev.next = n, n.prev = e.prev), e.next !== null && (e.next.prev = n, n.next = e.next), e.debugListId = null, e.prev = null, e.next = null;
}
static replaceWithMany(e, n) {
if (n.length === 0) {
t23.remove(e);
return;
}
t23.assertIsNotEnd(e), t23.assertIsOwned(e);
let s = e.debugListId;
e.debugListId = null;
for (let d of n) t23.assertIsNotEnd(d), t23.assertIsUnowned(d);
let { prev: i, next: r } = e;
e.prev = null, e.next = null;
let a = i;
for (let d of n) t23.assertIsUnowned(d), d.debugListId = s, a.next = d, d.prev = a, d.next = null, a = d;
let u = n[0], h = a;
i !== null && (i.next = u, u.prev = i), r !== null && (r.prev = h, h.next = r);
}
static remove(e) {
t23.assertIsNotEnd(e), t23.assertIsOwned(e), e.prev.next = e.next, e.next.prev = e.prev, e.debugListId = null, e.prev = null, e.next = null;
}
static insertBefore(e, n) {
if (Array.isArray(e)) {
for (let s of e) t23.insertBefore(s, n);
return;
}
if (t23.assertIsOwned(n), n.prev === null) throw new Error("AssertionError: illegal operation on list start");
t23.assertIsNotEnd(e), t23.assertIsUnowned(e), e.debugListId = n.debugListId, e.prev = null, n.prev.next = e, e.prev = n.prev, e.next = n, n.prev = e;
}
static insertAfter(e, n) {
if (t23.assertIsOwned(n), n.next === null) throw new Error("AssertionError: illegal operation on list end");
t23.assertIsNotEnd(e), t23.assertIsUnowned(e), e.debugListId = n.debugListId, n.next.prev = e, e.next = n.next, e.prev = n, n.next = e;
}
static assertIsUnowned(e) {
if (e.debugListId !== null) throw new Error(`AssertionError: illegal operation on owned node: ${l[e.kind]}`);
}
static assertIsOwned(e, n) {
if (e.debugListId === null) throw new Error(`AssertionError: illegal operation on unowned node: ${l[e.kind]}`);
if (n !== void 0 && e.debugListId !== n) throw new Error(`AssertionError: node belongs to the wrong list (expected ${n}, actual ${e.debugListId})`);
}
static assertIsNotEnd(e) {
if (e.kind === l.ListEnd) throw new Error("AssertionError: illegal operation on list head or tail");
}
};
Jr = { debugListId: null, prev: null, next: null };
Yr = /* @__PURE__ */ Symbol("ConsumesSlot");
Js = /* @__PURE__ */ Symbol("DependsOnSlotContext");
ve = /* @__PURE__ */ Symbol("ConsumesVars");
lt = /* @__PURE__ */ Symbol("UsesVarOffset");
wa = { [Yr]: true, numSlotsUsed: 1 };
Sa = { [Js]: true };
xa = { [ve]: true };
me = class {
strings;
expressions;
i18nPlaceholders;
constructor(e, n, s) {
if (this.strings = e, this.expressions = n, this.i18nPlaceholders = s, s.length !== 0 && s.length !== n.length) throw new Error(`Expected ${n.length} placeholders to match interpolation expression count, but got ${s.length}`);
}
};
ne = class extends y {
constructor(e = null) {
super(null, e);
}
};
vs = class t24 extends ne {
target;
value;
sourceSpan;
kind = te.StoreLet;
[ve] = true;
[Js] = true;
constructor(e, n, s) {
super(), this.target = e, this.value = n, this.sourceSpan = s;
}
visitExpression() {
}
isEquivalent(e) {
return e instanceof t24 && e.target === this.target && e.value.isEquivalent(this.value);
}
isConstant() {
return false;
}
transformInternalExpressions(e, n) {
this.value = (this.value, void 0);
}
clone() {
return new t24(this.target, this.value, this.sourceSpan);
}
};
ws = class t25 extends ne {
kind = te.PureFunctionExpr;
[ve] = true;
[lt] = true;
varOffset = null;
body;
args;
fn = null;
constructor(e, n) {
super(), this.body = e, this.args = n;
}
visitExpression(e, n) {
this.body?.visitExpression(e, n);
for (let s of this.args) s.visitExpression(e, n);
}
isEquivalent(e) {
return !(e instanceof t25) || e.args.length !== this.args.length ? false : e.body !== null && this.body !== null && e.body.isEquivalent(this.body) && e.args.every((n, s) => n.isEquivalent(this.args[s]));
}
isConstant() {
return false;
}
transformInternalExpressions(e, n) {
this.body !== null ? this.body = (this.body, n | q.InChildOperation, void 0) : this.fn !== null && (this.fn = (this.fn, void 0));
for (let s = 0; s < this.args.length; s++) this.args[s] = (this.args[s], void 0);
}
clone() {
let e = new t25(this.body?.clone() ?? null, this.args.map((n) => n.clone()));
return e.fn = this.fn?.clone() ?? null, e.varOffset = this.varOffset, e;
}
};
Ss = class t26 extends ne {
target;
targetSlot;
name;
args;
kind = te.PipeBinding;
[ve] = true;
[lt] = true;
varOffset = null;
constructor(e, n, s, i) {
super(), this.target = e, this.targetSlot = n, this.name = s, this.args = i;
}
visitExpression(e, n) {
for (let s of this.args) s.visitExpression(e, n);
}
isEquivalent() {
return false;
}
isConstant() {
return false;
}
transformInternalExpressions(e, n) {
for (let s = 0; s < this.args.length; s++) this.args[s] = (this.args[s], void 0);
}
clone() {
let e = new t26(this.target, this.targetSlot, this.name, this.args.map((n) => n.clone()));
return e.varOffset = this.varOffset, e;
}
};
xs = class t27 extends ne {
target;
targetSlot;
name;
args;
numArgs;
kind = te.PipeBindingVariadic;
[ve] = true;
[lt] = true;
varOffset = null;
constructor(e, n, s, i, r) {
super(), this.target = e, this.targetSlot = n, this.name = s, this.args = i, this.numArgs = r;
}
visitExpression(e, n) {
this.args.visitExpression(e, n);
}
isEquivalent() {
return false;
}
isConstant() {
return false;
}
transformInternalExpressions(e, n) {
this.args = (this.args, void 0);
}
clone() {
let e = new t27(this.target, this.targetSlot, this.name, this.args.clone(), this.numArgs);
return e.varOffset = this.varOffset, e;
}
};
ys = class t28 extends ne {
parameters;
body;
kind = te.ArrowFunction;
[ve] = true;
[lt] = true;
contextName = xr;
currentViewName = "view";
varOffset = null;
ops;
constructor(e, n) {
super(), this.parameters = e, this.body = n, this.ops = new nn(), this.ops.push([Qr(new We(n, n.sourceSpan))]);
}
visitExpression(e, n) {
for (let s of this.ops) Kr(s, (i) => {
i.visitExpression(e, n);
});
}
isEquivalent(e) {
return e instanceof t28 && e.parameters.length === this.parameters.length && e.parameters.every((n, s) => n.isEquivalent(this.parameters[s])) && e.body.isEquivalent(this.body);
}
isConstant() {
return false;
}
transformInternalExpressions(e, n) {
for (let s of this.ops) st(s, e, n | (q.InChildOperation | q.InArrowFunctionOperation));
}
clone() {
let e = new t28(this.parameters, this.body);
return e.varOffset = this.varOffset, e.ops = this.ops, e;
}
};
(function(t30) {
t30[t30.None = 0] = "None", t30[t30.InChildOperation = 1] = "InChildOperation", t30[t30.InArrowFunctionOperation = 2] = "InArrowFunctionOperation", t30[t30.InSafeNavigationMigration = 4] = "InSafeNavigationMigration";
})(q || (q = {}));
ya = /* @__PURE__ */ new Set([l.Element, l.ElementStart, l.Container, l.ContainerStart, l.Template, l.RepeaterCreate, l.ConditionalCreate, l.ConditionalBranchCreate]);
(function(t30) {
t30[t30.Tmpl = 0] = "Tmpl", t30[t30.Host = 1] = "Host", t30[t30.Both = 2] = "Both";
})(Es || (Es = {}));
(function(t30) {
t30[t30.Full = 0] = "Full", t30[t30.DomOnly = 1] = "DomOnly";
})(Cs || (Cs = {}));
Ea = /* @__PURE__ */ new Map([[c.ariaProperty, c.ariaProperty], [c.attribute, c.attribute], [c.classProp, c.classProp], [c.element, c.element], [c.elementContainer, c.elementContainer], [c.elementContainerEnd, c.elementContainerEnd], [c.elementContainerStart, c.elementContainerStart], [c.elementEnd, c.elementEnd], [c.elementStart, c.elementStart], [c.domProperty, c.domProperty], [c.i18nExp, c.i18nExp], [c.listener, c.listener], [c.listener, c.listener], [c.property, c.property], [c.styleProp, c.styleProp], [c.syntheticHostListener, c.syntheticHostListener], [c.syntheticHostProperty, c.syntheticHostProperty], [c.templateCreate, c.templateCreate], [c.twoWayProperty, c.twoWayProperty], [c.twoWayListener, c.twoWayListener], [c.declareLet, c.declareLet], [c.conditionalCreate, c.conditionalBranchCreate], [c.conditionalBranchCreate, c.conditionalBranchCreate], [c.domElement, c.domElement], [c.domElementStart, c.domElementStart], [c.domElementEnd, c.domElementEnd], [c.domElementContainer, c.domElementContainer], [c.domElementContainerStart, c.domElementContainerStart], [c.domElementContainerEnd, c.domElementContainerEnd], [c.domListener, c.domListener], [c.domTemplate, c.domTemplate], [c.animationEnter, c.animationEnter], [c.animationLeave, c.animationLeave], [c.animationEnterListener, c.animationEnterListener], [c.animationLeaveListener, c.animationLeaveListener]]);
Ca = /* @__PURE__ */ new Map([["&&", p.And], [">", p.Bigger], [">=", p.BiggerEquals], ["|", p.BitwiseOr], ["&", p.BitwiseAnd], ["/", p.Divide], ["=", p.Assign], ["==", p.Equals], ["===", p.Identical], ["<", p.Lower], ["<=", p.LowerEquals], ["-", p.Minus], ["%", p.Modulo], ["**", p.Exponentiation], ["*", p.Multiply], ["!=", p.NotEquals], ["!==", p.NotIdentical], ["??", p.NullishCoalesce], ["||", p.Or], ["+", p.Plus], ["in", p.In], ["instanceof", p.InstanceOf], ["+=", p.AdditionAssignment], ["-=", p.SubtractionAssignment], ["*=", p.MultiplicationAssignment], ["/=", p.DivisionAssignment], ["%=", p.RemainderAssignment], ["**=", p.ExponentiationAssignment], ["&&=", p.AndAssignment], ["||=", p.OrAssignment], ["??=", p.NullishCoalesceAssignment]]);
ba = Object.freeze([]);
Ta = /* @__PURE__ */ new Map([["formField", /* @__PURE__ */ new Set([l.Property])], ["formControl", /* @__PURE__ */ new Set([l.Property])], ["formControlName", /* @__PURE__ */ new Set([l.Property, l.Attribute])], ["ngModel", /* @__PURE__ */ new Set([l.Attribute, l.Property, l.TwoWayProperty])]]);
ka = /* @__PURE__ */ new Set([l.Container, l.ContainerStart, l.ContainerEnd, l.Element, l.ElementStart, l.ElementEnd, l.Template]);
_a = /* @__PURE__ */ new Map([[l.ElementEnd, [l.ElementStart, l.Element]], [l.ContainerEnd, [l.ContainerStart, l.Container]], [l.I18nEnd, [l.I18nStart, l.I18n]]]);
Ia = /* @__PURE__ */ new Set([l.Pipe]);
Zr = {};
eo = "\uE500";
Zr.ngsp = eo;
(function(t30) {
t30.HEX = "hexadecimal", t30.DEC = "decimal";
})(bs || (bs = {}));
Ys = ` \f
\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`;
Na = new RegExp(`[^${Ys}]`);
Aa = new RegExp(`[${Ys}]{2,}`, "g");
(function(t30) {
t30[t30.Character = 0] = "Character", t30[t30.Identifier = 1] = "Identifier", t30[t30.PrivateIdentifier = 2] = "PrivateIdentifier", t30[t30.Keyword = 3] = "Keyword", t30[t30.String = 4] = "String", t30[t30.Operator = 5] = "Operator", t30[t30.Number = 6] = "Number", t30[t30.RegExpBody = 7] = "RegExpBody", t30[t30.RegExpFlags = 8] = "RegExpFlags", t30[t30.Error = 9] = "Error";
})(f || (f = {}));
(function(t30) {
t30[t30.Plain = 0] = "Plain", t30[t30.TemplateLiteralPart = 1] = "TemplateLiteralPart", t30[t30.TemplateLiteralEnd = 2] = "TemplateLiteralEnd";
})(W || (W = {}));
to = ["var", "let", "as", "null", "undefined", "true", "false", "if", "else", "this", "typeof", "void", "in", "instanceof"];
Oe = class {
tokenize(e) {
return new rn(e).scan();
}
};
I = class {
index;
end;
type;
numValue;
strValue;
constructor(e, n, s, i, r) {
this.index = e, this.end = n, this.type = s, this.numValue = i, this.strValue = r;
}
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";
}
isKeywordTypeof() {
return this.type === f.Keyword && this.strValue === "typeof";
}
isKeywordVoid() {
return this.type === f.Keyword && this.strValue === "void";
}
isKeywordIn() {
return this.type === f.Keyword && this.strValue === "in";
}
isKeywordInstanceOf() {
return this.type === f.Keyword && this.strValue === "instanceof";
}
isError() {
return this.type === f.Error;
}
isRegExpBody() {
return this.type === f.RegExpBody;
}
isRegExpFlags() {
return this.type === f.RegExpFlags;
}
toNumber() {
return this.type === f.Number ? this.numValue : -1;
}
isTemplateLiteralPart() {
return this.isString() && this.kind === W.TemplateLiteralPart;
}
isTemplateLiteralEnd() {
return this.isString() && this.kind === W.TemplateLiteralEnd;
}
isTemplateLiteralInterpolationStart() {
return this.isOperator("${");
}
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:
case f.RegExpBody:
case f.RegExpFlags:
return this.strValue;
case f.Number:
return this.numValue.toString();
default:
return null;
}
}
};
Ae = class extends I {
kind;
constructor(e, n, s, i) {
super(e, n, f.String, 0, s), this.kind = i;
}
};
be = new I(-1, -1, f.Character, 0, "");
rn = class {
input;
tokens = [];
length;
peek = 0;
index = -1;
braceStack = [];
constructor(e) {
this.input = e, this.length = e.length, this.advance();
}
scan() {
let e = this.scanToken();
for (; e !== null; ) this.tokens.push(e), e = this.scanToken();
return this.tokens;
}
advance() {
this.peek = ++this.index >= this.length ? Ee : this.input.charCodeAt(this.index);
}
scanToken() {
let e = this.input, n = this.length, s = this.peek, i = this.index;
for (; s <= Vs; ) if (++i >= n) {
s = Ee;
break;
} else s = e.charCodeAt(i);
if (this.peek = s, this.index = i, i >= n) return null;
if (Ts(s)) return this.scanIdentifier();
if (X(s)) return this.scanNumber(i);
let r = i;
switch (s) {
case G:
return this.advance(), X(this.peek) ? this.scanNumber(r) : this.peek !== G ? Ce(r, this.index, G) : (this.advance(), this.peek === G ? (this.advance(), F(r, this.index, "...")) : this.error(`Unexpected character [${String.fromCharCode(s)}]`, 0));
case Q:
case L:
case ce:
case Z:
case V:
case J:
case Te:
return this.scanCharacter(r, s);
case Ne:
return this.scanOpenBrace(r, s);
case oe:
return this.scanCloseBrace(r, s);
case Us:
case Hs:
return this.scanString();
case Zt:
return this.advance(), this.scanTemplateLiteralPart(r);
case Tr:
return this.scanPrivateIdentifier();
case Ws:
return this.scanComplexOperator(r, "+", C, "=");
case qs:
return this.scanComplexOperator(r, "-", C, "=");
case Ke:
return this.isStartOfRegex() ? this.scanRegex(i) : this.scanComplexOperator(r, "/", C, "=");
case kr:
return this.scanComplexOperator(r, "%", C, "=");
case Pr:
return this.scanOperator(r, "^");
case ts:
return this.scanStar(r);
case ss:
return this.scanQuestion(r);
case _r:
case ns:
return this.scanComplexOperator(r, String.fromCharCode(s), C, "=");
case br:
return this.scanComplexOperator(r, "!", C, "=", C, "=");
case C:
return this.scanEquals(r);
case es:
return this.scanComplexOperator(r, "&", es, "&", C, "=");
case is:
return this.scanComplexOperator(r, "|", is, "|", C, "=");
case Gs:
for (; Fr(this.peek); ) this.advance();
return this.scanToken();
}
return this.advance(), this.error(`Unexpected character [${String.fromCharCode(s)}]`, 0);
}
scanCharacter(e, n) {
return this.advance(), Ce(e, this.index, n);
}
scanOperator(e, n) {
return this.advance(), F(e, this.index, n);
}
scanOpenBrace(e, n) {
return this.braceStack.push("expression"), this.advance(), Ce(e, this.index, n);
}
scanCloseBrace(e, n) {
return this.advance(), this.braceStack.pop() === "interpolation" ? (this.tokens.push(Ce(e, this.index, oe)), this.scanTemplateLiteralPart(this.index)) : Ce(e, this.index, n);
}
scanComplexOperator(e, n, s, i, r, a) {
this.advance();
let u = n;
return this.peek == s && (this.advance(), u += i), r != null && this.peek == r && (this.advance(), u += a), F(e, this.index, u);
}
scanEquals(e) {
this.advance();
let n = "=";
if (this.peek === C) this.advance(), n += "=";
else if (this.peek === ns) return this.advance(), n += ">", F(e, this.index, n);
return this.peek === C && (this.advance(), n += "="), F(e, this.index, n);
}
scanIdentifier() {
let e = this.index;
for (this.advance(); ks(this.peek); ) this.advance();
let n = this.input.substring(e, this.index);
return to.indexOf(n) > -1 ? io(e, this.index, n) : no(e, this.index, n);
}
scanPrivateIdentifier() {
let e = this.index;
if (this.advance(), !Ts(this.peek)) return this.error("Invalid character [#]", -1);
for (; ks(this.peek); ) this.advance();
let n = this.input.substring(e, this.index);
return so(e, this.index, n);
}
scanNumber(e) {
let n = this.index === e, s = false;
for (this.advance(); ; ) {
if (!X(this.peek)) if (this.peek === at) {
if (!X(this.input.charCodeAt(this.index - 1)) || !X(this.input.charCodeAt(this.index + 1))) return this.error("Invalid numeric separator", 0);
s = true;
} else if (this.peek === G) n = false;
else if (co(this.peek)) {
if (this.advance(), uo(this.peek) && this.advance(), !X(this.peek)) return this.error("Invalid exponent", -1);
n = false;
} else break;
this.advance();
}
let i = this.input.substring(e, this.index);
s && (i = i.replace(/_/g, ""));
let r = n ? ho(i) : parseFloat(i);
return ro(e, this.index, r);
}
scanString() {
let e = this.index, n = this.peek;
this.advance();
let s = "", i = this.index, r = this.input;
for (; this.peek != n; ) if (this.peek == St) {
let u = this.scanStringBackslash(s, i);
if (typeof u != "string") return u;
s = u, i = this.index;
} else {
if (this.peek == Ee) return this.error("Unterminated quote", 0);
this.advance();
}
let a = r.substring(i, this.index);
return this.advance(), new Ae(e, this.index, s + a, W.Plain);
}
scanQuestion(e) {
this.advance();
let n = "?";
return this.peek === ss ? (n += "?", this.advance(), this.peek === C && (n += "=", this.advance())) : this.peek === G && (n += ".", this.advance()), F(e, this.index, n);
}
scanTemplateLiteralPart(e) {
let n = "", s = this.index;
for (; this.peek !== Zt; ) if (this.peek === St) {
let r = this.scanStringBackslash(n, s);
if (typeof r != "string") return r;
n = r, s = this.index;
} else if (this.peek === un) {
let r = this.index;
if (this.advance(), this.peek === Ne) return this.braceStack.push("interpolation"), this.tokens.push(new Ae(e, r, n + this.input.substring(s, r), W.TemplateLiteralPart)), this.advance(), F(r, this.index, this.input.substring(r, this.index));
} else {
if (this.peek === Ee) return this.error("Unterminated template literal", 0);
this.advance();
}
let i = this.input.substring(s, this.index);
return this.advance(), new Ae(e, this.index, n + i, W.TemplateLiteralEnd);
}
error(e, n) {
let s = this.index + n;
return oo(s, this.index, `Lexer Error: ${e} at column ${s} in expression [${this.input}]`);
}
scanStringBackslash(e, n) {
e += this.input.substring(n, this.index);
let s;
if (this.advance(), this.peek === Dr) {
let i = this.input.substring(this.index + 1, this.index + 5);
if (/^[0-9a-f]+$/i.test(i)) s = parseInt(i, 16);
else return this.error(`Invalid unicode escape [\\u${i}]`, 0);
for (let r = 0; r < 5; r++) this.advance();
} else s = po(this.peek), this.advance();
return e += String.fromCharCode(s), e;
}
scanStar(e) {
this.advance();
let n = "*";
return this.peek === ts ? (n += "*", this.advance(), this.peek === C && (n += "=", this.advance())) : this.peek === C && (n += "=", this.advance()), F(e, this.index, n);
}
isStartOfRegex() {
if (this.tokens.length === 0) return true;
let e = this.tokens[this.tokens.length - 1];
if (e.isOperator("!")) {
let n = this.tokens.length > 1 ? this.tokens[this.tokens.length - 2] : null;
return n === null || n.type !== f.Identifier && !n.isCharacter(L) && !n.isCharacter(Z);
}
return e.type === f.Operator || e.isCharacter(Q) || e.isCharacter(ce) || e.isCharacter(V) || e.isCharacter(J);
}
scanRegex(e) {
this.advance();
let n = this.index, s = false, i = false;
for (; ; ) {
let h = this.peek;
if (h === Ee) return this.error("Unterminated regular expression", 0);
if (s) s = false;
else if (h === St) s = true;
else if (h === ce) i = true;
else if (h === Z) i = false;
else if (h === Ke && !i) break;
this.advance();
}
let r = this.input.substring(n, this.index);
this.advance();
let a = ao(e, this.index, r), u = this.scanRegexFlags(this.index);
return u !== null ? (this.tokens.push(a), u) : a;
}
scanRegexFlags(e) {
if (!en(this.peek)) return null;
for (; en(this.peek); ) this.advance();
return lo(e, this.index, this.input.substring(e, this.index));
}
};
on = class {
strings;
expressions;
offsets;
constructor(e, n, s) {
this.strings = e, this.expressions = n, this.offsets = s;
}
};
an = class {
templateBindings;
warnings;
errors;
constructor(e, n, s) {
this.templateBindings = e, this.warnings = n, this.errors = s;
}
};
ge = class {
_lexer;
_supportsDirectPipeReferences;
constructor(e, n = false) {
this._lexer = e, this._supportsDirectPipeReferences = n;
}
parseAction(e, n, s) {
let i = [];
this._checkNoInterpolation(i, e, n);
let { stripped: r } = this._stripComments(e), a = this._lexer.tokenize(r), u = new Y(e, n, s, a, 1, i, 0, this._supportsDirectPipeReferences).parseChain();
return new U(u, e, H(n), s, i);
}
parseBinding(e, n, s) {
let i = [], r = this._parseBindingAst(e, n, s, i);
return new U(r, e, H(n), s, i);
}
checkSimpleExpression(e) {
let n = new ln();
return e.visit(n), n.errors;
}
parseSimpleBinding(e, n, s) {
let i = [], r = this._parseBindingAst(e, n, s, i), a = this.checkSimpleExpression(r);
return a.length > 0 && i.push(le(`Host binding expression cannot contain ${a.join(" ")}`, e, "", n)), new U(r, e, H(n), s, i);
}
_parseBindingAst(e, n, s, i) {
this._checkNoInterpolation(i, e, n);
let { stripped: r } = this._stripComments(e), a = this._lexer.tokenize(r);
return new Y(e, n, s, a, 0, i, 0, this._supportsDirectPipeReferences).parseChain();
}
parseTemplateBindings(e, n, s, i, r) {
let a = this._lexer.tokenize(n), u = [];
return new Y(n, s, r, a, 0, u, 0, this._supportsDirectPipeReferences).parseTemplateBindings({ source: e, span: new D(i, i + e.length) });
}
parseInterpolation(e, n, s, i) {
let r = [], { strings: a, expressions: u, offsets: h } = this.splitInterpolation(e, n, r, i);
if (u.length === 0) return null;
let d = [];
for (let g = 0; g < u.length; ++g) {
let P = i?.[g * 2 + 1]?.sourceSpan, k = u[g].text, { stripped: _, hasComments: b } = this._stripComments(k), j = this._lexer.tokenize(_);
if (b && _.trim().length === 0 && j.length === 0) {
r.push(le("Interpolation expression cannot only contain a comment", e, `at column ${u[g].start} in`, n));
continue;
}
let xe = new Y(P ? k : e, P || n, s, j, 0, r, h[g], this._supportsDirectPipeReferences).parseChain();
d.push(xe);
}
return this.createInterpolationAst(a.map((g) => g.text), d, e, H(n), s, r);
}
parseInterpolationExpression(e, n, s) {
let { stripped: i } = this._stripComments(e), r = this._lexer.tokenize(i), a = [], u = new Y(e, n, s, r, 0, a, 0, this._supportsDirectPipeReferences).parseChain(), h = ["", ""];
return this.createInterpolationAst(h, [u], e, H(n), s, a);
}
createInterpolationAst(e, n, s, i, r, a) {
let u = new ee(0, s.length), h = new Sr(u, u.toAbsolute(r), e, n);
return new U(h, s, i, r, a);
}
splitInterpolation(e, n, s, i) {
let r = [], a = [], u = [], h = i ? fo(i) : null, d = 0, g = false, P = false, k = "{{", _ = "}}";
for (; d < e.length; ) if (g) {
let b = d, j = b + k.length, xe = this._getInterpolationEndIndex(e, _, j);
if (xe === -1) {
g = false, P = true;
break;
}
let bn = xe + _.length, Tn = e.substring(j, xe);
Tn.trim().length === 0 && s.push(le("Blank expressions are not allowed in interpolated strings", e, `at column ${d} in`, n)), a.push({ text: Tn, start: b, end: bn });
let ar = (h?.get(b) ?? b) + k.length;
u.push(ar), d = bn, g = false;
} else {
let b = d;
d = e.indexOf(k, d), d === -1 && (d = e.length);
let j = e.substring(b, d);
r.push({ text: j, start: b, end: d }), g = true;
}
if (!g) if (P) {
let b = r[r.length - 1];
b.text += e.substring(d), b.end = e.length;
} else r.push({ text: e.substring(d), start: d, end: e.length });
return new on(r, a, u);
}
wrapLiteralPrimitive(e, n, s) {
let i = new ee(0, e == null ? 0 : e.length);
return new U(new A(i, i.toAbsolute(s), e), e, typeof n == "string" ? n : H(n), s, []);
}
_stripComments(e) {
let n = this._commentStart(e);
return n != null ? { stripped: e.substring(0, n), hasComments: true } : { stripped: e, hasComments: false };
}
_commentStart(e) {
let n = null;
for (let s = 0; s < e.length - 1; s++) {
let i = e.charCodeAt(s), r = e.charCodeAt(s + 1);
if (i === Ke && r == Ke && n == null) return s;
n === i ? n = null : n == null && rs(i) && (n = i);
}
return null;
}
_checkNoInterpolation(e, n, s) {
let i = -1, r = -1;
for (let a of this._forEachUnquotedChar(n, 0)) if (i === -1) n.startsWith("{{") && (i = a);
else if (r = this._getInterpolationEndIndex(n, "}}", a), r > -1) break;
i > -1 && r > -1 && e.push(le("Got interpolation ({{}}) where expression was expected", n, `at column ${i} in`, s));
}
_getInterpolationEndIndex(e, n, s) {
for (let i of this._forEachUnquotedChar(e, s)) {
if (e.startsWith(n, i)) return i;
if (e.startsWith("//", i)) return e.indexOf(n, i);
}
return -1;
}
*_forEachUnquotedChar(e, n) {
let s = null, i = 0;
for (let r = n; r < e.length; r++) {
let a = e[r];
rs(e.charCodeAt(r)) && (s === null || s === a) && i % 2 === 0 ? s = s === null ? a : null : s === null && (yield r), i = a === "\\" ? i + 1 : 0;
}
}
};
(function(t30) {
t30[t30.None = 0] = "None", t30[t30.Writable = 1] = "Writable";
})(ae || (ae = {}));
_s = /* @__PURE__ */ new Set(["d", "g", "i", "m", "s", "u", "v", "y"]);
Y = class {
input;
parseSourceSpan;
absoluteOffset;
tokens;
parseFlags;
errors;
offset;
supportsDirectPipeReferences;
rparensExpected = 0;
rbracketsExpected = 0;
rbracesExpected = 0;
context = ae.None;
sourceSpanCache = /* @__PURE__ */ new Map();
index = 0;
constructor(e, n, s, i, r, a, u, h) {
this.input = e, this.parseSourceSpan = n, this.absoluteOffset = s, this.tokens = i, this.parseFlags = r, this.errors = a, this.offset = u, this.supportsDirectPipeReferences = h;
}
peek(e) {
let n = this.index + e;
return n < this.tokens.length ? this.tokens[n] : be;
}
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.input.length + this.offset : this.next.index + this.offset;
}
get currentAbsoluteOffset() {
return this.absoluteOffset + this.inputIndex;
}
span(e, n) {
let s = this.currentEndIndex;
if (n !== void 0 && n > this.currentEndIndex && (s = n), e > s) {
let i = s;
s = e, e = i;
}
return new ee(e, s);
}
sourceSpan(e, n) {
let s = `${e}@${this.inputIndex}:${n}`;
return this.sourceSpanCache.has(s) || this.sourceSpanCache.set(s, this.span(e, n).toAbsolute(this.absoluteOffset)), this.sourceSpanCache.get(s);
}
advance() {
this.index++;
}
withContext(e, n) {
this.context |= e;
let s = n();
return this.context ^= e, s;
}
consumeOptionalCharacter(e) {
return this.next.isCharacter(e) ? (this.advance(), true) : false;
}
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(), true) : false;
}
isAssignmentOperator(e) {
return e.type === f.Operator && E.isAssignmentOperation(e.strValue);
}
expectOperator(e) {
this.consumeOptionalOperator(e) || this.error(`Missing expected operator ${e}`);
}
prettyPrintToken(e) {
return e === be ? "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 = [], n = this.inputIndex;
for (; this.index < this.tokens.length; ) {
let s = this.parsePipe();
if (e.push(s), this.consumeOptionalCharacter(Te)) for (this.parseFlags & 1 || this.error("Binding expression cannot contain chained expression"); this.consumeOptionalCharacter(Te); ) ;
else if (this.index < this.tokens.length) {
let i = this.index;
if (this.error(`Unexpected token '${this.next}'`), this.index === i) break;
}
}
if (e.length === 0) {
let s = this.offset, i = this.offset + this.input.length;
return new N(this.span(s, i), this.sourceSpan(s, i));
}
return e.length == 1 ? e[0] : new Ft(this.span(n), this.sourceSpan(n), e);
}
parsePipe() {
let e = this.inputIndex, n = this.parseExpression();
if (this.consumeOptionalOperator("|")) {
this.parseFlags & 1 && this.error("Cannot have a pipe in an action expression");
do {
let s = this.inputIndex, i = this.expectIdentifierOrKeyword(), r, a;
i !== null ? r = this.sourceSpan(s) : (i = "", a = this.next.index !== -1 ? this.next.index : this.input.length + this.offset, r = new ee(a, a).toAbsolute(this.absoluteOffset));
let u = [];
for (; this.consumeOptionalCharacter(J); ) u.push(this.parseExpression());
let h;
if (this.supportsDirectPipeReferences) {
let d = i.charCodeAt(0);
h = d === at || d >= pn && d <= hn ? _e.ReferencedDirectly : _e.ReferencedByName;
} else h = _e.ReferencedByName;
n = new Wt(this.span(e), this.sourceSpan(e, a), n, i, u, h, r);
} while (this.consumeOptionalOperator("|"));
}
return n;
}
parseExpression() {
return this.parseConditional();
}
parseConditional() {
let e = this.inputIndex, n = this.parseLogicalOr();
if (this.consumeOptionalOperator("?")) {
let s = this.parsePipe(), i;
if (this.consumeOptionalCharacter(J)) i = this.parsePipe();
else {
let r = this.inputIndex, a = this.input.substring(e, r);
this.error(`Conditional expression ${a} requires all 3 expressions`), i = new N(this.span(e), this.sourceSpan(e));
}
return new Vt(this.span(e), this.sourceSpan(e), n, s, i);
} else return n;
}
parseLogicalOr() {
let e = this.inputIndex, n = this.parseLogicalAnd();
for (; this.consumeOptionalOperator("||"); ) {
let s = this.parseLogicalAnd();
n = new E(this.span(e), this.sourceSpan(e), "||", n, s);
}
return n;
}
parseLogicalAnd() {
let e = this.inputIndex, n = this.parseNullishCoalescing();
for (; this.consumeOptionalOperator("&&"); ) {
let s = this.parseNullishCoalescing();
n = new E(this.span(e), this.sourceSpan(e), "&&", n, s);
}
return n;
}
parseNullishCoalescing() {
let e = this.inputIndex, n = this.parseEquality();
for (; this.consumeOptionalOperator("??"); ) {
let s = this.parseEquality();
n = new E(this.span(e), this.sourceSpan(e), "??", n, s);
}
return n;
}
parseEquality() {
let e = this.inputIndex, n = this.parseRelational();
for (; this.next.type == f.Operator; ) {
let s = this.next.strValue;
switch (s) {
case "==":
case "===":
case "!=":
case "!==":
this.advance();
let i = this.parseRelational();
n = new E(this.span(e), this.sourceSpan(e), s, n, i);
continue;
}
break;
}
return n;
}
parseRelational() {
let e = this.inputIndex, n = this.parseAdditive();
for (; this.next.type == f.Operator || this.next.isKeywordIn() || this.next.isKeywordInstanceOf(); ) {
let s = this.next.strValue;
switch (s) {
case "<":
case ">":
case "<=":
case ">=":
case "in":
case "instanceof":
this.advance();
let i = this.parseAdditive();
n = new E(this.span(e), this.sourceSpan(e), s, n, i);
continue;
}
break;
}
return n;
}
parseAdditive() {
let e = this.inputIndex, n = this.parseMultiplicative();
for (; this.next.type == f.Operator; ) {
let s = this.next.strValue;
switch (s) {
case "+":
case "-":
this.advance();
let i = this.parseMultiplicative();
n = new E(this.span(e), this.sourceSpan(e), s, n, i);
continue;
}
break;
}
return n;
}
parseMultiplicative() {
let e = this.inputIndex, n = this.parseExponentiation();
for (; this.next.type == f.Operator; ) {
let s = this.next.strValue;
switch (s) {
case "*":
case "%":
case "/":
this.advance();
let i = this.parseExponentiation();
n = new E(this.span(e), this.sourceSpan(e), s, n, i);
continue;
}
break;
}
return n;
}
parseExponentiation() {
let e = this.inputIndex, n = this.parsePrefix();
for (; this.next.type == f.Operator && this.next.strValue === "**"; ) {
(n instanceof Ie || n instanceof je || n instanceof ze || n instanceof Ge) && this.error("Unary operator used immediately before exponentiation expression. Parenthesis must be used to disambiguate operator precedence"), this.advance();
let s = this.parseExponentiation();
n = new E(this.span(e), this.sourceSpan(e), "**", n, s);
}
return n;
}
parsePrefix() {
if (this.next.type == f.Operator) {
let e = this.inputIndex, n = this.next.strValue, s;
switch (n) {
case "+":
return this.advance(), s = this.parsePrefix(), Ie.createPlus(this.span(e), this.sourceSpan(e), s);
case "-":
return this.advance(), s = this.parsePrefix(), Ie.createMinus(this.span(e), this.sourceSpan(e), s);
case "!":
return this.advance(), s = this.parsePrefix(), new je(this.span(e), this.sourceSpan(e), s);
}
} else if (this.next.isKeywordTypeof()) {
let e = this.inputIndex;
this.advance();
let n = this.parsePrefix();
return new ze(this.span(e), this.sourceSpan(e), n);
} else if (this.next.isKeywordVoid()) {
let e = this.inputIndex;
this.advance();
let n = this.parsePrefix();
return new Ge(this.span(e), this.sourceSpan(e), n);
}
return this.parseCallChain();
}
parseCallChain() {
let e = this.inputIndex, n = this.parsePrimary();
for (; ; ) if (this.consumeOptionalCharacter(G)) n = this.parseAccessMember(n, e, false);
else if (this.consumeOptionalOperator("?.")) this.consumeOptionalCharacter(Q) ? n = this.parseCall(n, e, true) : n = this.consumeOptionalCharacter(ce) ? this.parseKeyedReadOrWrite(n, e, true) : this.parseAccessMember(n, e, true);
else if (this.consumeOptionalCharacter(ce)) n = this.parseKeyedReadOrWrite(n, e, false);
else if (this.consumeOptionalCharacter(Q)) n = this.parseCall(n, e, false);
else if (this.consumeOptionalOperator("!")) n = new Gt(this.span(e), this.sourceSpan(e), n);
else if (this.next.isTemplateLiteralEnd()) n = this.parseNoInterpolationTaggedTemplateLiteral(n, e);
else if (this.next.isTemplateLiteralPart()) n = this.parseTaggedTemplateLiteral(n, e);
else return n;
}
parsePrimary() {
let e = this.inputIndex;
if (this.isArrowFunction()) return this.parseArrowFunction(e);
if (this.consumeOptionalCharacter(Q)) {
this.rparensExpected++;
let n = this.parsePipe();
return this.consumeOptionalCharacter(L) || (this.error("Missing closing parentheses"), this.consumeOptionalCharacter(L)), this.rparensExpected--, new $e(this.span(e), this.sourceSpan(e), n);
} else {
if (this.next.isKeywordNull()) return this.advance(), new A(this.span(e), this.sourceSpan(e), null);
if (this.next.isKeywordUndefined()) return this.advance(), new A(this.span(e), this.sourceSpan(e), void 0);
if (this.next.isKeywordTrue()) return this.advance(), new A(this.span(e), this.sourceSpan(e), true);
if (this.next.isKeywordFalse()) return this.advance(), new A(this.span(e), this.sourceSpan(e), false);
if (this.next.isKeywordThis()) return this.advance(), new Bt(this.span(e), this.sourceSpan(e));
if (this.consumeOptionalCharacter(ce)) return this.parseLiteralArray(e);
if (this.next.isCharacter(Ne)) return this.parseLiteralMap();
if (this.next.isIdentifier()) return this.parseAccessMember(new fe(this.span(e), this.sourceSpan(e)), e, false);
if (this.next.isNumber()) {
let n = this.next.toNumber();
return this.advance(), new A(this.span(e), this.sourceSpan(e), n);
} else {
if (this.next.isTemplateLiteralEnd()) return this.parseNoInterpolationTemplateLiteral();
if (this.next.isTemplateLiteralPart()) return this.parseTemplateLiteral();
if (this.next.isString() && this.next.kind === W.Plain) {
let n = this.next.toString();
return this.advance(), new A(this.span(e), this.sourceSpan(e), n);
} else return this.next.isPrivateIdentifier() ? (this._reportErrorForPrivateIdentifier(this.next, null), new N(this.span(e), this.sourceSpan(e))) : this.next.isRegExpBody() ? this.parseRegularExpressionLiteral() : this.index >= this.tokens.length ? (this.error(`Unexpected end of expression: ${this.input}`), new N(this.span(e), this.sourceSpan(e))) : (this.error(`Unexpected token ${this.next}`), new N(this.span(e), this.sourceSpan(e)));
}
}
}
parseLiteralArray(e) {
this.rbracketsExpected++;
let n = [];
do
if (this.next.isOperator("...")) n.push(this.parseSpreadElement());
else if (!this.next.isCharacter(Z)) n.push(this.parsePipe());
else break;
while (this.consumeOptionalCharacter(V));
return this.rbracketsExpected--, this.expectCharacter(Z), new qt(this.span(e), this.sourceSpan(e), n);
}
parseLiteralMap() {
let e = [], n = [], s = this.inputIndex;
if (this.expectCharacter(Ne), !this.consumeOptionalCharacter(oe)) {
this.rbracesExpected++;
do {
let i = this.inputIndex;
if (this.next.isOperator("...")) {
this.advance(), e.push({ kind: "spread", span: this.span(i), sourceSpan: this.sourceSpan(i) }), n.push(this.parsePipe());
continue;
}
let r = this.next.isString(), a = this.expectIdentifierOrKeywordOrString(), u = this.span(i), h = this.sourceSpan(i), d = { kind: "property", key: a, quoted: r, span: u, sourceSpan: h };
e.push(d), r ? (this.expectCharacter(J), n.push(this.parsePipe())) : this.consumeOptionalCharacter(J) ? n.push(this.parsePipe()) : (d.isShorthandInitialized = true, n.push(new ke(u, h, h, new fe(u, h), a)));
} while (this.consumeOptionalCharacter(V) && !this.next.isCharacter(oe));
this.rbracesExpected--, this.expectCharacter(oe);
}
return new zt(this.span(s), this.sourceSpan(s), e, n);
}
parseAccessMember(e, n, s) {
let i = this.inputIndex, r = this.withContext(ae.Writable, () => {
let u = this.expectIdentifierOrKeyword() ?? "";
return u.length === 0 && this.error("Expected identifier for property access", e.span.end), u;
}), a = this.sourceSpan(i);
if (s) return this.isAssignmentOperator(this.next) ? (this.advance(), this.error("The '?.' operator cannot be used in the assignment"), new N(this.span(n), this.sourceSpan(n))) : new Ht(this.span(n), this.sourceSpan(n), a, e, r);
if (this.isAssignmentOperator(this.next)) {
let u = this.next.strValue;
if (!(this.parseFlags & 1)) return this.advance(), this.error("Bindings cannot contain assignments"), new N(this.span(n), this.sourceSpan(n));
let h = new ke(this.span(n), this.sourceSpan(n), a, e, r);
this.advance();
let d = this.parseConditional();
return new E(this.span(n), this.sourceSpan(n), u, h, d);
} else return new ke(this.span(n), this.sourceSpan(n), a, e, r);
}
parseCall(e, n, s) {
let i = this.inputIndex;
this.rparensExpected++;
let r = this.parseCallArguments(), a = this.span(i, this.inputIndex).toAbsolute(this.absoluteOffset);
this.expectCharacter(L), this.rparensExpected--;
let u = this.span(n), h = this.sourceSpan(n);
return s ? new Xt(u, h, e, r, a) : new Xe(u, h, e, r, a);
}
parseCallArguments() {
if (this.next.isCharacter(L)) return [];
let e = [];
do
e.push(this.next.isOperator("...") ? this.parseSpreadElement() : this.parsePipe());
while (this.consumeOptionalCharacter(V));
return e;
}
parseSpreadElement() {
this.next.isOperator("...") || this.error("Spread element must start with '...' operator");
let e = this.inputIndex;
this.advance();
let n = this.parsePipe(), s = this.span(e), i = this.sourceSpan(e);
return new jt(s, i, n);
}
expectTemplateBindingKey() {
let e = "", n = false, s = this.currentAbsoluteOffset;
do
e += this.expectIdentifierOrKeywordOrString(), n = this.consumeOptionalOperator("-"), n && (e += "-");
while (n);
return { source: e, span: new D(s, s + e.length) };
}
parseTemplateBindings(e) {
let n = [];
for (n.push(...this.parseDirectiveKeywordBindings(e)); this.index < this.tokens.length; ) {
let s = this.parseLetBinding();
if (s) n.push(s);
else {
let i = this.expectTemplateBindingKey(), r = this.parseAsBinding(i);
r ? n.push(r) : (i.source = e.source + i.source.charAt(0).toUpperCase() + i.source.substring(1), n.push(...this.parseDirectiveKeywordBindings(i)));
}
this.consumeStatementTerminator();
}
return new an(n, [], this.errors);
}
parseKeyedReadOrWrite(e, n, s) {
return this.withContext(ae.Writable, () => {
this.rbracketsExpected++;
let i = this.parsePipe();
if (i instanceof N && this.error("Key access cannot be empty"), this.rbracketsExpected--, this.expectCharacter(Z), this.isAssignmentOperator(this.next)) {
let r = this.next.strValue;
if (s) this.advance(), this.error("The '?.' operator cannot be used in the assignment");
else {
let a = new qe(this.span(n), this.sourceSpan(n), e, i);
this.advance();
let u = this.parseConditional();
return new E(this.span(n), this.sourceSpan(n), r, a, u);
}
} else return s ? new Ut(this.span(n), this.sourceSpan(n), e, i) : new qe(this.span(n), this.sourceSpan(n), e, i);
return new N(this.span(n), this.sourceSpan(n));
});
}
parseDirectiveKeywordBindings(e) {
let n = [];
this.consumeOptionalCharacter(J);
let s = this.getDirectiveBoundTarget(), i = this.currentAbsoluteOffset, r = this.parseAsBinding(e);
r || (this.consumeStatementTerminator(), i = this.currentAbsoluteOffset);
let a = new D(e.span.start, i);
return n.push(new Me(a, e, s)), r && n.push(r), n;
}
getDirectiveBoundTarget() {
if (this.next === be || this.peekKeywordAs() || this.peekKeywordLet()) return null;
let e = this.parsePipe(), { start: n, end: s } = e.span, i = this.input.substring(n, s);
return new U(e, i, H(this.parseSourceSpan), this.absoluteOffset + n, this.errors);
}
parseAsBinding(e) {
if (!this.peekKeywordAs()) return null;
this.advance();
let n = this.expectTemplateBindingKey();
this.consumeStatementTerminator();
let s = new D(e.span.start, this.currentAbsoluteOffset);
return new de(s, n, e);
}
parseLetBinding() {
if (!this.peekKeywordLet()) return null;
let e = this.currentAbsoluteOffset;
this.advance();
let n = this.expectTemplateBindingKey(), s = null;
this.consumeOptionalOperator("=") && (s = this.expectTemplateBindingKey()), this.consumeStatementTerminator();
let i = new D(e, this.currentAbsoluteOffset);
return new de(i, n, s);
}
parseNoInterpolationTaggedTemplateLiteral(e, n) {
let s = this.parseNoInterpolationTemplateLiteral();
return new Qe(this.span(n), this.sourceSpan(n), e, s);
}
parseNoInterpolationTemplateLiteral() {
let e = this.next.strValue, n = this.inputIndex;
this.advance();
let s = this.span(n), i = this.sourceSpan(n);
return new Je(s, i, [new Ye(s, i, e)], []);
}
parseTaggedTemplateLiteral(e, n) {
let s = this.parseTemplateLiteral();
return new Qe(this.span(n), this.sourceSpan(n), e, s);
}
parseTemplateLiteral() {
let e = [], n = [], s = this.inputIndex;
for (; this.next !== be; ) {
let i = this.next;
if (i.isTemplateLiteralPart() || i.isTemplateLiteralEnd()) {
let r = this.inputIndex;
if (this.advance(), e.push(new Ye(this.span(r), this.sourceSpan(r), i.strValue)), i.isTemplateLiteralEnd()) break;
} else if (i.isTemplateLiteralInterpolationStart()) {
this.advance(), this.rbracesExpected++;
let r = this.parsePipe();
r instanceof N ? this.error("Template literal interpolation cannot be empty") : n.push(r), this.rbracesExpected--;
} else this.advance();
}
return new Je(this.span(s), this.sourceSpan(s), e, n);
}
parseRegularExpressionLiteral() {
let e = this.next;
if (this.advance(), !e.isRegExpBody()) return new N(this.span(this.inputIndex), this.sourceSpan(this.inputIndex));
let n = null;
if (this.next.isRegExpFlags()) {
n = this.next, this.advance();
let r = /* @__PURE__ */ new Set();
for (let a = 0; a < n.strValue.length; a++) {
let u = n.strValue[a];
_s.has(u) ? r.has(u) ? this.error(`Duplicate regular expression flag "${u}"`, n.index + a) : r.add(u) : this.error(`Unsupported regular expression flag "${u}". The supported flags are: ` + Array.from(_s, (h) => `"${h}"`).join(", "), n.index + a);
}
}
let s = e.index, i = n ? n.end : e.end;
return new Yt(this.span(s, i), this.sourceSpan(s, i), e.strValue, n ? n.strValue : null);
}
parseArrowFunction(e) {
let n;
if (this.next.isIdentifier()) {
let i = this.next;
this.advance(), n = [this.getArrowFunctionIdentifierArg(i)];
} else this.next.isCharacter(Q) ? (this.rparensExpected++, this.advance(), n = this.parseArrowFunctionParameters(), this.rparensExpected--) : (n = [], this.error(`Unexpected token ${this.next}`));
this.expectOperator("=>");
let s;
if (this.next.isCharacter(Ne)) this.error("Multi-line arrow functions are not supported. If you meant to return an object literal, wrap it with parentheses."), s = new N(this.span(e), this.sourceSpan(e));
else {
let i = this.parseFlags;
this.parseFlags = 1, s = this.parseExpression(), this.parseFlags = i;
}
return new Jt(this.span(e), this.sourceSpan(e), n, s);
}
parseArrowFunctionParameters() {
let e = [];
if (!this.consumeOptionalCharacter(L)) for (; this.next !== be; ) if (this.next.isIdentifier()) {
let n = this.next;
if (this.advance(), e.push(this.getArrowFunctionIdentifierArg(n)), this.consumeOptionalCharacter(L)) break;
this.expectCharacter(V);
} else {
this.error(`Unexpected token ${this.next}`);
break;
}
return e;
}
getArrowFunctionIdentifierArg(e) {
return new Qt(e.strValue, this.span(e.index), this.sourceSpan(e.index));
}
isArrowFunction() {
let e = this.index, n = this.tokens;
if (e > n.length - 2) return false;
if (n[e].isIdentifier() && n[e + 1].isOperator("=>")) return true;
if (n[e].isCharacter(Q)) {
let s = e + 1;
for (s; s < n.length && !(!n[s].isIdentifier() && !n[s].isCharacter(V)); s++) ;
return s < n.length - 1 && n[s].isCharacter(L) && n[s + 1].isOperator("=>");
}
return false;
}
consumeStatementTerminator() {
this.consumeOptionalCharacter(Te) || this.consumeOptionalCharacter(V);
}
error(e, n = this.index) {
this.errors.push(le(e, this.input, this.getErrorLocationText(n), this.parseSourceSpan)), this.skip();
}
getErrorLocationText(e) {
return e < this.tokens.length ? `at column ${this.tokens[e].index + 1} in` : "at the end of the expression";
}
_reportErrorForPrivateIdentifier(e, n) {
let s = `Private identifiers are not supported. Unexpected private identifier: ${e}`;
n !== null && (s += `, ${n}`), this.error(s);
}
skip() {
let e = this.next;
for (; this.index < this.tokens.length && !e.isCharacter(Te) && !e.isOperator("|") && (this.rparensExpected <= 0 || !e.isCharacter(L)) && (this.rbracesExpected <= 0 || !e.isCharacter(oe)) && (this.rbracketsExpected <= 0 || !e.isCharacter(Z)) && (!(this.context & ae.Writable) || !this.isAssignmentOperator(e)); ) this.next.isError() && this.errors.push(le(this.next.toString(), this.input, this.getErrorLocationText(this.next.index), this.parseSourceSpan)), this.advance(), e = this.next;
}
};
ln = class extends Kt {
errors = [];
visitPipe() {
this.errors.push("pipes");
}
};
mo = "svg";
go = "math";
cn = class {
};
vo = "boolean";
wo = "number";
So = "string";
xo = "object";
yo = ["[Element]|textContent,%ariaActiveDescendantElement,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColIndexText,%ariaColSpan,%ariaControlsElements,%ariaCurrent,%ariaDescribedByElements,%ariaDescription,%ariaDetailsElements,%ariaDisabled,%ariaErrorMessageElements,%ariaExpanded,%ariaFlowToElements,%ariaHasPopup,%ariaHidden,%ariaInvalid,%ariaKeyShortcuts,%ariaLabel,%ariaLabelledByElements,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaOwnsElements,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowIndexText,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored", "[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy", "abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,search,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy", "media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume", ":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex", ":svg:graphics^:svg:|", ":svg:animation^:svg:|*begin,*end,*repeat", ":svg:geometry^:svg:|", ":svg:componentTransferFunction^:svg:|", ":svg:gradient^:svg:|", ":svg:textContent^:svg:graphics|", ":svg:textPositioning^:svg:textContent|", "a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username", "area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username", "audio^media|", "br^[HTMLElement]|clear", "base^[HTMLElement]|href,target", "body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink", "button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value", "canvas^[HTMLElement]|#height,#width", "content^[HTMLElement]|select", "dl^[HTMLElement]|!compact", "data^[HTMLElement]|value", "datalist^[HTMLElement]|", "details^[HTMLElement]|!open", "dialog^[HTMLElement]|!open,returnValue", "dir^[HTMLElement]|!compact", "div^[HTMLElement]|align", "embed^[HTMLElement]|align,height,name,src,type,width", "fieldset^[HTMLElement]|!disabled,name", "font^[HTMLElement]|color,face,size", "form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target", "frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src", "frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows", "geolocation^[HTMLElement]|accuracymode,!autolocate,*location,*promptaction,*promptdismiss,*validationstatuschange,!watch", "hr^[HTMLElement]|align,color,!noShade,size,width", "head^[HTMLElement]|", "h1,h2,h3,h4,h5,h6^[HTMLElement]|align", "html^[HTMLElement]|version", "iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,!credentialless,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width", "img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width", "input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width", "li^[HTMLElement]|type,#value", "label^[HTMLElement]|htmlFor", "legend^[HTMLElement]|align", "link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type", "map^[HTMLElement]|name", "marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width", "menu^[HTMLElement]|!compact", "meta^[HTMLElement]|content,httpEquiv,media,name,scheme", "meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value", "ins,del^[HTMLElement]|cite,dateTime", "ol^[HTMLElement]|!compact,!reversed,#start,type", "object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width", "optgroup^[HTMLElement]|!disabled,label", "option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value", "output^[HTMLElement]|defaultValue,%htmlFor,name,value", "p^[HTMLElement]|align", "param^[HTMLElement]|name,type,value,valueType", "picture^[HTMLElement]|", "pre^[HTMLElement]|#width", "progress^[HTMLElement]|#max,#value", "q,blockquote,cite^[HTMLElement]|", "script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type", "select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value", "selectedcontent^[HTMLElement]|", "slot^[HTMLElement]|name", "source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width", "span^[HTMLElement]|", "style^[HTMLElement]|!disabled,media,type", "search^[HTMLELement]|", "caption^[HTMLElement]|align", "th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width", "col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width", "table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width", "tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign", "tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign", "template^[HTMLElement]|", "textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap", "time^[HTMLElement]|dateTime", "title^[HTMLElement]|text", "track^[HTMLElement]|!default,kind,label,src,srclang", "ul^[HTMLElement]|!compact,type", "unknown^[HTMLElement]|", "video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width", ":svg:a^:svg:graphics|", ":svg:animate^:svg:animation|", ":svg:animateMotion^:svg:animation|", ":svg:animateTransform^:svg:animation|", ":svg:circle^:svg:geometry|", ":svg:clipPath^:svg:graphics|", ":svg:defs^:svg:graphics|", ":svg:desc^:svg:|", ":svg:discard^:svg:|", ":svg:ellipse^:svg:geometry|", ":svg:feBlend^:svg:|", ":svg:feColorMatrix^:svg:|", ":svg:feComponentTransfer^:svg:|", ":svg:feComposite^:svg:|", ":svg:feConvolveMatrix^:svg:|", ":svg:feDiffuseLighting^:svg:|", ":svg:feDisplacementMap^:svg:|", ":svg:feDistantLight^:svg:|", ":svg:feDropShadow^:svg:|", ":svg:feFlood^:svg:|", ":svg:feFuncA^:svg:componentTransferFunction|", ":svg:feFuncB^:svg:componentTransferFunction|", ":svg:feFuncG^:svg:componentTransferFunction|", ":svg:feFuncR^:svg:componentTransferFunction|", ":svg:feGaussianBlur^:svg:|", ":svg:feImage^:svg:|", ":svg:feMerge^:svg:|", ":svg:feMergeNode^:svg:|", ":svg:feMorphology^:svg:|", ":svg:feOffset^:svg:|", ":svg:fePointLight^:svg:|", ":svg:feSpecularLighting^:svg:|", ":svg:feSpotLight^:svg:|", ":svg:feTile^:svg:|", ":svg:feTurbulence^:svg:|", ":svg:filter^:svg:|", ":svg:foreignObject^:svg:graphics|", ":svg:g^:svg:graphics|", ":svg:image^:svg:graphics|decoding", ":svg:line^:svg:geometry|", ":svg:linearGradient^:svg:gradient|", ":svg:mpath^:svg:|", ":svg:marker^:svg:|", ":svg:mask^:svg:|", ":svg:metadata^:svg:|", ":svg:path^:svg:geometry|", ":svg:pattern^:svg:|", ":svg:polygon^:svg:geometry|", ":svg:polyline^:svg:geometry|", ":svg:radialGradient^:svg:gradient|", ":svg:rect^:svg:geometry|", ":svg:svg^:svg:graphics|#currentScale,#zoomAndPan", ":svg:script^:svg:|type", ":svg:set^:svg:animation|", ":svg:stop^:svg:|", ":svg:style^:svg:|!disabled,media,title,type", ":svg:switch^:svg:graphics|", ":svg:symbol^:svg:|", ":svg:tspan^:svg:textPositioning|", ":svg:text^:svg:textPositioning|", ":svg:textPath^:svg:textContent|", ":svg:title^:svg:|", ":svg:use^:svg:graphics|", ":svg:view^:svg:|#zoomAndPan", "data^[HTMLElement]|value", "keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name", "menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default", "summary^[HTMLElement]|", "time^[HTMLElement]|dateTime", ":svg:cursor^:svg:|", ":math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*scrollend,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex", ":math:math^:math:|", ":math:maction^:math:|", ":math:menclose^:math:|", ":math:merror^:math:|", ":math:mfenced^:math:|", ":math:mfrac^:math:|", ":math:mi^:math:|", ":math:mmultiscripts^:math:|", ":math:mn^:math:|", ":math:mo^:math:|", ":math:mover^:math:|", ":math:mpadded^:math:|", ":math:mphantom^:math:|", ":math:mroot^:math:|", ":math:mrow^:math:|", ":math:ms^:math:|", ":math:mspace^:math:|", ":math:msqrt^:math:|", ":math:mstyle^:math:|", ":math:msub^:math:|", ":math:msubsup^:math:|", ":math:msup^:math:|", ":math:mtable^:math:|", ":math:mtd^:math:|", ":math:mtext^:math:|", ":math:mtr^:math:|", ":math:munder^:math:|", ":math:munderover^:math:|", ":math:semantics^:math:|"];
Ks = new Map(Object.entries({ class: "className", for: "htmlFor", formaction: "formAction", innerHtml: "innerHTML", readonly: "readOnly", tabindex: "tabIndex", "aria-activedescendant": "ariaActiveDescendantElement", "aria-atomic": "ariaAtomic", "aria-autocomplete": "ariaAutoComplete", "aria-busy": "ariaBusy", "aria-checked": "ariaChecked", "aria-colcount": "ariaColCount", "aria-colindex": "ariaColIndex", "aria-colindextext": "ariaColIndexText", "aria-colspan": "ariaColSpan", "aria-controls": "ariaControlsElements", "aria-current": "ariaCurrent", "aria-describedby": "ariaDescribedByElements", "aria-description": "ariaDescription", "aria-details": "ariaDetailsElements", "aria-disabled": "ariaDisabled", "aria-errormessage": "ariaErrorMessageElements", "aria-expanded": "ariaExpanded", "aria-flowto": "ariaFlowToElements", "aria-haspopup": "ariaHasPopup", "aria-hidden": "ariaHidden", "aria-invalid": "ariaInvalid", "aria-keyshortcuts": "ariaKeyShortcuts", "aria-label": "ariaLabel", "aria-labelledby": "ariaLabelledByElements", "aria-level": "ariaLevel", "aria-live": "ariaLive", "aria-modal": "ariaModal", "aria-multiline": "ariaMultiLine", "aria-multiselectable": "ariaMultiSelectable", "aria-orientation": "ariaOrientation", "aria-owns": "ariaOwnsElements", "aria-placeholder": "ariaPlaceholder", "aria-posinset": "ariaPosInSet", "aria-pressed": "ariaPressed", "aria-readonly": "ariaReadOnly", "aria-required": "ariaRequired", "aria-roledescription": "ariaRoleDescription", "aria-rowcount": "ariaRowCount", "aria-rowindex": "ariaRowIndex", "aria-rowindextext": "ariaRowIndexText", "aria-rowspan": "ariaRowSpan", "aria-selected": "ariaSelected", "aria-setsize": "ariaSetSize", "aria-sort": "ariaSort", "aria-valuemax": "ariaValueMax", "aria-valuemin": "ariaValueMin", "aria-valuenow": "ariaValueNow", "aria-valuetext": "ariaValueText" }));
Eo = Array.from(Ks).reduce((t30, [e, n]) => (t30.set(e, n), t30), /* @__PURE__ */ new Map());
it = class extends cn {
_schema = /* @__PURE__ */ new Map();
_eventSchema = /* @__PURE__ */ new Map();
constructor() {
super(), yo.forEach((e) => {
let n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), [i, r] = e.split("|"), a = r.split(","), [u, h] = i.split("^");
u.split(",").forEach((g) => {
this._schema.set(g.toLowerCase(), n), this._eventSchema.set(g.toLowerCase(), s);
});
let d = h && this._schema.get(h.toLowerCase());
if (d) {
for (let [g, P] of d) n.set(g, P);
for (let g of this._eventSchema.get(h.toLowerCase())) s.add(g);
}
a.forEach((g) => {
if (g.length > 0) switch (g[0]) {
case "*":
s.add(g.substring(1));
break;
case "!":
n.set(g.substring(1), vo);
break;
case "#":
n.set(g.substring(1), wo);
break;
case "%":
n.set(g.substring(1), xo);
break;
default:
n.set(g, So);
}
});
});
}
hasProperty(e, n, s) {
if (s.some((a) => a.name === Bn.name)) return true;
let i = Fe(e);
if (i.includes("-")) {
if (Kn(i) || Zn(i)) return false;
if (s.some((a) => a.name === Dn.name)) return true;
}
return (this._schema.get(i) || this._schema.get("unknown")).has(n);
}
hasElement(e, n) {
if (n.some((i) => i.name === Bn.name)) return true;
let s = Fe(e);
return s.includes("-") && (Kn(s) || Zn(s) || n.some((i) => i.name === Dn.name)) ? true : this._schema.has(s);
}
securityContext(e, n, s) {
s && (n = this.getMappedPropName(n));
let [i, r] = ot(e, false);
return dr(r, n, i);
}
getMappedPropName(e) {
return Ks.get(e) ?? e;
}
getDefaultComponentElementName() {
return "ng-component";
}
validateProperty(e) {
return e.toLowerCase().startsWith("on") ? { error: true, msg: `Binding to event property '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...
If '${e}' is a directive input, make sure the directive is imported by the current module.` } : { error: false };
}
validateAttribute(e) {
return e.toLowerCase().startsWith("on") ? { error: true, msg: `Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...` } : { error: false };
}
allKnownElementNames() {
return Array.from(this._schema.keys());
}
allKnownAttributesOfElement(e) {
let n = Fe(e), s = this._schema.get(n) || this._schema.get("unknown");
return Array.from(s.keys()).map((i) => Eo.get(i) ?? i);
}
allKnownEventsOfElement(e) {
let n = Fe(e);
return Array.from(this._eventSchema.get(n) ?? []);
}
normalizeAnimationStyleProperty(e) {
return wr(e);
}
normalizeAnimationStyleValue(e, n, s) {
let i = "", r = s.toString().trim(), a = null;
if (Co(e) && s !== 0 && s !== "0") if (typeof s == "number") i = "px";
else {
let u = s.match(/^[+-]?[\d\.]+([a-z]*)$/);
u && u[1].length == 0 && (a = `Please provide a CSS unit value for ${n}:${s}`);
}
return { error: a, value: r + i };
}
};
Pa = new ge(new Oe());
La = [{ test: $(l.StyleMap), transform: rt }, { test: $(l.ClassMap), transform: rt }, { test: $(l.StyleProp) }, { test: $(l.ClassProp) }, { test: Pe(l.Attribute, true) }, { test: Pe(l.Property, true) }, { test: bo }, { test: Pe(l.Attribute, false) }, { test: $(l.Control) }];
$a = [{ test: Pe(l.DomProperty, true) }, { test: Pe(l.DomProperty, false) }, { test: $(l.Attribute) }, { test: $(l.StyleMap), transform: rt }, { test: $(l.ClassMap), transform: rt }, { test: $(l.StyleProp) }, { test: $(l.ClassProp) }];
Ma = /* @__PURE__ */ new Set([l.Listener, l.TwoWayListener, l.AnimationListener, l.StyleMap, l.ClassMap, l.StyleProp, l.ClassProp, l.Property, l.TwoWayProperty, l.DomProperty, l.Attribute, l.Animation, l.Control]);
Ra = /* @__PURE__ */ new Map([[O.Idle, { none: c.deferOnIdle, prefetch: c.deferPrefetchOnIdle, hydrate: c.deferHydrateOnIdle }], [O.Immediate, { none: c.deferOnImmediate, prefetch: c.deferPrefetchOnImmediate, hydrate: c.deferHydrateOnImmediate }], [O.Timer, { none: c.deferOnTimer, prefetch: c.deferPrefetchOnTimer, hydrate: c.deferHydrateOnTimer }], [O.Hover, { none: c.deferOnHover, prefetch: c.deferPrefetchOnHover, hydrate: c.deferHydrateOnHover }], [O.Interaction, { none: c.deferOnInteraction, prefetch: c.deferPrefetchOnInteraction, hydrate: c.deferHydrateOnInteraction }], [O.Viewport, { none: c.deferOnViewport, prefetch: c.deferPrefetchOnViewport, hydrate: c.deferHydrateOnViewport }], [O.Never, { none: c.deferHydrateNever, prefetch: c.deferHydrateNever, hydrate: c.deferHydrateNever }]]);
Oa = [c.pipeBind1, c.pipeBind2, c.pipeBind3, c.pipeBind4];
Da = { constant: [c.interpolate, c.interpolate1, c.interpolate2, c.interpolate3, c.interpolate4, c.interpolate5, c.interpolate6, c.interpolate7, c.interpolate8], variable: c.interpolateV, mapping: (t30) => {
if (t30 % 2 === 0) throw new Error("Expected odd number of arguments");
return (t30 - 1) / 2;
} };
Ba = /* @__PURE__ */ new Map([["window", c.resolveWindow], ["document", c.resolveDocument], ["body", c.resolveBody]]);
Fa = /* @__PURE__ */ new Map([[x.HTML, c.sanitizeHtml], [x.RESOURCE_URL, c.sanitizeResourceUrl], [x.SCRIPT, c.sanitizeScript], [x.STYLE, c.sanitizeStyle], [x.URL, c.sanitizeUrl], [x.ATTRIBUTE_NO_BINDING, c.validateAttribute]]);
Va = /* @__PURE__ */ new Map([[x.HTML, c.trustConstantHtml], [x.RESOURCE_URL, c.trustConstantResourceUrl]]);
(function(t30) {
t30[t30.None = 0] = "None", t30[t30.ViewContextRead = 1] = "ViewContextRead", t30[t30.ViewContextWrite = 2] = "ViewContextWrite", t30[t30.SideEffectful = 4] = "SideEffectful";
})(Is || (Is = {}));
Ha = /* @__PURE__ */ new Map([[M.Property, R.Property], [M.TwoWay, R.TwoWayProperty], [M.Attribute, R.Attribute], [M.Class, R.ClassName], [M.Style, R.StyleProperty], [M.LegacyAnimation, R.LegacyAnimation], [M.Animation, R.Animation]]);
(function(t30) {
t30[t30.NG_CONTENT = 0] = "NG_CONTENT", t30[t30.STYLE = 1] = "STYLE", t30[t30.STYLESHEET = 2] = "STYLESHEET", t30[t30.SCRIPT = 3] = "SCRIPT", t30[t30.OTHER = 4] = "OTHER";
})(Ns || (Ns = {}));
(function(t30) {
t30.IDLE = "idle", t30.TIMER = "timer", t30.INTERACTION = "interaction", t30.IMMEDIATE = "immediate", t30.HOVER = "hover", t30.VIEWPORT = "viewport", t30.NEVER = "never";
})(As || (As = {}));
Zs = "%COMP%";
Ua = `_nghost-${Zs}`;
Wa = `_ngcontent-${Zs}`;
(function(t30) {
t30[t30.Selector = 0] = "Selector", t30[t30.HostDirective = 1] = "HostDirective";
})(Ps || (Ps = {}));
(function(t30) {
t30[t30.Extract = 0] = "Extract", t30[t30.Merge = 1] = "Merge";
})(Ls || (Ls = {}));
qa = new Dt("22.0.6");
(function(t30) {
t30.DIAGNOSTIC = "D", t30.EXPRESSION_TYPE_IDENTIFIER = "T";
})($s || ($s = {}));
(function(t30) {
t30.DIRECTIVE = "DIR", t30.HOST_DIRECTIVE = "HOSTDIR", t30.COMPONENT_COMPLETION = "COMPCOMP", t30.EVENT_PARAMETER = "EP", t30.VARIABLE_AS_EXPRESSION = "VAE";
})(Ms || (Ms = {}));
(function(t30) {
t30[t30.Error = 0] = "Error", t30[t30.Warning = 1] = "Warning";
})(Rs || (Rs = {}));
(function(t30) {
t30[t30.UseEmitter = 0] = "UseEmitter", t30[t30.CopyClassNodes = 1] = "CopyClassNodes", t30[t30.FallbackToAny = 2] = "FallbackToAny";
})(Os || (Os = {}));
Ds = class t29 {
static SINGLETON = new t29();
static veWillInferAnyFor(e) {
let n = t29.SINGLETON;
return e instanceof Xe ? e.visit(n) : e.receiver.visit(n);
}
visitUnary(e) {
return e.expr.visit(this);
}
visitBinary(e) {
return e.left.visit(this) || e.right.visit(this);
}
visitChain() {
return false;
}
visitConditional(e) {
return e.condition.visit(this) || e.trueExp.visit(this) || e.falseExp.visit(this);
}
visitCall() {
return true;
}
visitSafeCall() {
return false;
}
visitImplicitReceiver() {
return false;
}
visitThisReceiver() {
return false;
}
visitInterpolation(e) {
return e.expressions.some((n) => n.visit(this));
}
visitKeyedRead() {
return false;
}
visitLiteralArray() {
return true;
}
visitLiteralMap() {
return true;
}
visitLiteralPrimitive() {
return false;
}
visitPipe() {
return true;
}
visitPrefixNot(e) {
return e.expression.visit(this);
}
visitTypeofExpression(e) {
return e.expression.visit(this);
}
visitVoidExpression(e) {
return e.expression.visit(this);
}
visitNonNullAssert(e) {
return e.expression.visit(this);
}
visitPropertyRead() {
return false;
}
visitSafePropertyRead() {
return false;
}
visitSafeKeyedRead() {
return false;
}
visitTemplateLiteral() {
return false;
}
visitTemplateLiteralElement() {
return false;
}
visitTaggedTemplateLiteral() {
return false;
}
visitParenthesizedExpression(e) {
return e.expression.visit(this);
}
visitRegularExpressionLiteral() {
return false;
}
visitSpreadElement(e) {
return e.expression.visit(this);
}
visitArrowFunction(e, n) {
return false;
}
};
To = ["errors", "dirty", "disabled", "disabledReasons", "hidden", "invalid", "name", "pending", "readonly", "touched", "max", "maxLength", "min", "minLength", "pattern", "required"];
ja = /* @__PURE__ */ new Set([...To, "value", "checked"]);
za = new it();
Ga = new it();
ko = "test.html";
Io = (t30) => ge.prototype._commentStart(t30);
ct = (t30) => (e) => {
let n = ei(e);
return ni({ ...n, result: ti()[t30](e, n.sourceSpan, 0), comments: No(e) });
};
si = ct("parseAction");
ii = ct("parseBinding");
ri = ct("parseSimpleBinding");
oi = ct("parseInterpolationExpression");
ai = (t30) => {
let e = ei(t30);
return ni({ ...e, result: ti().parseTemplateBindings("", t30, e.sourceSpan, 0, 0), comments: [] });
};
ut = class {
text;
constructor(t30) {
this.text = t30;
}
getCharacterIndex(t30, e) {
return An(this.text, t30, e);
}
transformSpan(t30) {
return Be(t30);
}
createNode(t30, e) {
let n = t30.start, s = t30.end, i = t30.range;
e && (Array.isArray(e) ? ([n, s] = e, i = e) : ({ start: n, end: s } = e.sourceSpan ?? e, i = [n, s]));
i ? [n, s] = i : typeof n == "number" && typeof s == "number" && (i = [n, s]);
if (!(typeof n == "number" && typeof s == "number" && i)) throw new Error("Missing location information");
let r = { ...t30, start: n, end: s, range: i };
switch (r.type) {
case "NumericLiteral":
case "StringLiteral":
case "RegExpLiteral": {
let a = this.text.slice(n, s), { value: u } = r;
r.extra = { ...r.extra, raw: a, rawValue: u };
break;
}
}
return r;
}
};
li = Object.defineProperty;
ci = (t30, e) => {
let n = {};
for (var s in t30) li(n, s, { get: t30[s], enumerable: true });
return e || li(n, Symbol.toStringTag, { value: "Module" }), n;
};
ui = (t30, e) => ({ type: "ArrayExpression", elements: e.transformChildren(t30.expressions) });
Ao = { id: null, generator: false, async: false, expression: true };
pi = (t30, e) => ({ type: "ArrowFunctionExpression", params: t30.parameters.map((n) => e.createNode({ type: "Identifier", name: n.name }, n.sourceSpan)), body: e.transformChild(t30.body), ...Ao });
hi = (t30, e) => e.transformChild(t30.ast);
Po = (t30) => t30 === "&&" || t30 === "||" || t30 === "??";
fi = (t30, e) => {
let { operation: n } = t30, [s, i] = e.transformChildren([t30.left, t30.right]);
return Po(n) ? { type: "LogicalExpression", operator: n, left: s, right: i } : E.isAssignmentOperation(n) ? { type: "AssignmentExpression", left: s, right: i, operator: n } : { left: s, right: i, type: "BinaryExpression", operator: n };
};
Lo = { optional: false };
$o = { optional: true };
di = ({ optional: t30 }) => (e, n) => {
let s = n.transformChildren(e.args), i = n.transformChild(e.receiver);
return t30 || ye(i) ? { type: "OptionalCallExpression", callee: i, arguments: s, optional: t30 } : { type: "CallExpression", callee: i, arguments: s };
};
mi = di(Lo);
gi = di($o);
vi = (t30, e) => ({ type: "NGChainedExpression", expressions: e.transformChildren(t30.expressions) });
wi = (t30, e) => {
let [n, s, i] = e.transformChildren([t30.condition, t30.trueExp, t30.falseExp]);
return { type: "ConditionalExpression", test: n, consequent: s, alternate: i };
};
Si = () => ({ type: "NGEmptyExpression" });
xi = (t30, e) => {
let { expressions: n } = t30;
if (n.length !== 1) throw new Error("Unexpected 'Interpolation'");
return e.transformChild(n[0]);
};
yi = (t30) => {
let { value: e } = t30;
switch (typeof e) {
case "boolean":
return { type: "BooleanLiteral", value: e };
case "number":
return { type: "NumericLiteral", value: e };
case "object":
return { type: "NullLiteral" };
case "string":
return { type: "StringLiteral", value: e };
case "undefined":
return { type: "Identifier", name: "undefined" };
default:
throw new Error(`Unexpected 'LiteralPrimitive' value type ${typeof e}`);
}
};
Ei = (t30) => ({ type: "RegExpLiteral", pattern: t30.body, flags: t30.flags ?? "" });
Mo = { computed: true, optional: false };
Ro = { computed: true, optional: true };
Oo = { computed: false, optional: false };
Do = { computed: false, optional: true };
pt = ({ computed: t30, optional: e }) => (n, s) => {
let { receiver: i } = n, r;
if (t30) {
let { key: u } = n;
r = s.transformChild(u);
} else {
let u = i instanceof fe, { name: h, nameSpan: d } = n;
if (r = s.create({ type: "Identifier", name: h }, d, u ? s.ancestors : []), u) return r;
}
let a = s.transformChild(i);
return e || ye(a) ? { type: "OptionalMemberExpression", optional: e, property: r, object: a, computed: t30 } : { type: "MemberExpression", property: r, object: a, computed: t30 };
};
Ci = pt(Mo);
bi = pt(Ro);
Ti = pt(Oo);
ki = pt(Do);
_i = (t30, e) => ({ type: "TSNonNullExpression", expression: e.transformChild(t30.expression) });
Ii = (t30, e) => {
let { keys: n, values: s } = t30, i = (r, a = t30) => e.create(r, a, [t30, ...e.ancestors]);
return { type: "ObjectExpression", properties: n.map((r, a) => {
let u = s[a], h = [r.sourceSpan.start, u.sourceSpan.end];
if (r.kind === "spread") return i({ type: "SpreadElement", argument: e.transformChild(u) }, h);
let d = !!r.isShorthandInitialized;
return i({ type: "ObjectProperty", key: i(r.quoted ? { type: "StringLiteral", value: r.key } : { type: "Identifier", name: r.key }, r.sourceSpan), value: e.transformChild(u), shorthand: d, computed: false, method: false }, h);
}) };
};
Ni = (t30, e) => e.transformChild(t30.expression);
Ai = (t30, e) => ({ type: "NGPipeExpression", left: e.transformChild(t30.exp), right: e.create({ type: "Identifier", name: t30.name }, t30.nameSpan), arguments: e.transformChildren(t30.args) });
Pi = (t30, e) => ({ type: "SpreadElement", argument: e.transformChild(t30.expression) });
Li = (t30, e) => ({ type: "TaggedTemplateExpression", tag: e.transformChild(t30.tag), quasi: e.transformChild(t30.template) });
$i = (t30, e) => ({ type: "TemplateLiteral", quasis: e.transformChildren(t30.elements), expressions: e.transformChildren(t30.expressions) });
Mi = (t30, e) => {
let [n] = e.ancestors, { elements: s } = n, i = s.indexOf(t30), r = i === 0, a = i === s.length - 1, u = t30.sourceSpan.end - (a ? 1 : 0), h = t30.sourceSpan.start + (r ? 1 : 0), d = e.text.slice(h, u);
return { type: "TemplateElement", value: { cooked: t30.text, raw: d }, tail: a, range: [h, u] };
};
Ri = () => ({ type: "ThisExpression" });
dn = (t30) => (e, n) => ({ type: "UnaryExpression", prefix: true, operator: t30, argument: n.transformChild(e.expression) });
Oi = dn("!");
Di = dn("typeof");
Bi = dn("void");
Fi = (t30, e) => ({ type: "UnaryExpression", prefix: true, argument: e.transformChild(t30.expr), operator: t30.operator });
Bo = (t30) => {
throw new Error(`Unexpected node type '${t30.constructor.name}'`);
};
Vi = Bo;
Hi = ci({ visitASTWithSource: () => hi, visitArrowFunction: () => pi, visitBinary: () => fi, visitCall: () => mi, visitChain: () => vi, visitConditional: () => wi, visitEmptyExpr: () => Si, visitImplicitReceiver: () => Vi, visitInterpolation: () => xi, visitKeyedRead: () => Ci, visitLiteralArray: () => ui, visitLiteralMap: () => Ii, visitLiteralPrimitive: () => yi, visitNonNullAssert: () => _i, visitParenthesizedExpression: () => Ni, visitPipe: () => Ai, visitPrefixNot: () => Oi, visitPropertyRead: () => Ti, visitRegularExpressionLiteral: () => Ei, visitSafeCall: () => gi, visitSafeKeyedRead: () => bi, visitSafePropertyRead: () => ki, visitSpreadElement: () => Pi, visitTaggedTemplateLiteral: () => Li, visitTemplateLiteral: () => $i, visitTemplateLiteralElement: () => Mi, visitThisReceiver: () => Ri, visitTypeofExpression: () => Di, visitUnary: () => Fi, visitVoidExpression: () => Bi });
Ui = Hi;
ht = class mn extends ut {
node;
ancestors;
constructor({ node: e, text: n, ancestors: s = [] }) {
super(n), this.node = e, this.ancestors = s;
}
create(e, n, s = this.ancestors) {
return s[0] instanceof $e && (e.extra = { ...e.extra, parenthesized: true }), super.createNode(e, e.range ?? n ?? this.node);
}
transformChild(e) {
return new mn({ node: e, ancestors: [this.node, ...this.ancestors], text: this.text }).transform();
}
transformChildren(e) {
return e.map((n) => this.transformChild(n));
}
transform() {
let { node: e } = this, n = e.visit(Ui, this);
return this.create(n, this.node);
}
static transform(e, n) {
return new mn({ node: e, text: n, ancestors: [] }).transform();
}
};
Wi = class extends ht {
constructor(t30) {
super({ node: t30, text: t30.source });
}
};
qi = (t30, e) => ht.transform(t30, e);
ji = (t30) => new Wi(t30).transform();
zi = (t30, e) => (n, s, ...i) => n | 1 && s == null ? void 0 : (e.call(s) ?? s[t30]).apply(s, i);
Vo = zi("at", function() {
if (Array.isArray(this) || typeof this == "string") return Fo;
});
ft = Vo;
Ho = (Se = class extends ut {
constructor(n, s) {
super(s);
De(this, m);
De(this, we);
De(this, se);
wt(this, we, n), wt(this, se, s);
for (let i of n) w(this, m, Ji).call(this, i);
}
get expressions() {
return w(this, m, Ki).call(this);
}
}, we = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakSet(), Qi = function() {
return z(this, we)[0].key;
}, T = function(n, s) {
return In(Se.prototype, this, "createNode").call(this, n, s);
}, gn = function(n) {
return qi(n, this.text);
}, vn = function(n) {
return Pn(n.slice(z(this, m, Qi).source.length));
}, wn = function(n) {
let s = z(this, se);
if (s[n.start] !== '"' && s[n.start] !== "'") return;
let i = s[n.start], r = false;
for (let a = n.start + 1; a < s.length; a++) switch (s[a]) {
case i:
if (!r) {
n.end = a + 1;
return;
}
default:
r = false;
break;
case "\\":
r = !r;
break;
}
}, Ji = function(n) {
w(this, m, wn).call(this, n.key.span), Xi(n) && n.value && w(this, m, wn).call(this, n.value.span);
}, Yi = function(n) {
if (!n.value || n.value.source) return n.value;
let s = this.getCharacterIndex(/\S/, n.sourceSpan.start);
return { source: "$implicit", span: { start: s, end: s } };
}, Ki = function() {
let n = z(this, we), [s] = n, i = z(this, se).slice(s.sourceSpan.start, s.sourceSpan.end).trim().length === 0 ? n.slice(1) : n, r = [], a = null;
for (let [u, h] of i.entries()) {
if (a && Gi(a) && Xi(h) && h.value && h.value.source === a.key.source) {
let d = w(this, m, T).call(this, { type: "NGMicrosyntaxKey", name: h.key.source }, h.key.span), g = (_, b) => ({ ..._, ...this.transformSpan({ start: _.start, end: b }) }), P = (_) => ({ ...g(_, d.end), alias: d }), k = r.pop();
if (k.type === "NGMicrosyntaxExpression") r.push(P(k));
else if (k.type === "NGMicrosyntaxKeyedExpression") {
let _ = P(k.expression);
r.push(g({ ...k, expression: _ }, _.end));
} else throw new Error(`Unexpected type ${k.type}`);
} else r.push(w(this, m, Zi).call(this, h, u));
a = h;
}
return w(this, m, T).call(this, { type: "NGMicrosyntax", body: r }, r.length === 0 ? n[0].sourceSpan : { start: r[0].start, end: ft(0, r, -1).end });
}, Zi = function(n, s) {
if (Gi(n)) {
let { key: i, value: r } = n;
return r ? s === 0 ? w(this, m, T).call(this, { type: "NGMicrosyntaxExpression", expression: w(this, m, gn).call(this, r.ast), alias: null }, r) : w(this, m, T).call(this, { type: "NGMicrosyntaxKeyedExpression", key: w(this, m, T).call(this, { type: "NGMicrosyntaxKey", name: w(this, m, vn).call(this, i.source) }, i.span), expression: w(this, m, T).call(this, { type: "NGMicrosyntaxExpression", expression: w(this, m, gn).call(this, r.ast), alias: null }, r) }, [i.span.start, r.sourceSpan.end]) : w(this, m, T).call(this, { type: "NGMicrosyntaxKey", name: w(this, m, vn).call(this, i.source) }, i.span);
} else {
let { key: i, sourceSpan: r } = n;
if (/^let\s$/.test(z(this, se).slice(r.start, r.start + 4))) {
let { value: a } = n;
return w(this, m, T).call(this, { type: "NGMicrosyntaxLet", key: w(this, m, T).call(this, { type: "NGMicrosyntaxKey", name: i.source }, i.span), value: a ? w(this, m, T).call(this, { type: "NGMicrosyntaxKey", name: a.source }, a.span) : null }, [r.start, a ? a.span.end : i.span.end]);
} else {
let a = w(this, m, Yi).call(this, n);
return w(this, m, T).call(this, { type: "NGMicrosyntaxAs", key: w(this, m, T).call(this, { type: "NGMicrosyntaxKey", name: a.source }, a.span), alias: w(this, m, T).call(this, { type: "NGMicrosyntaxKey", name: i.source }, i.span) }, [a.span.start, i.span.end]);
}
}
}, Se);
dt = (t30) => (e) => {
let { result: n, comments: s } = t30(e);
return Object.assign(ji(n), { comments: s });
};
mt = dt(si);
Sn = dt(ii);
Uo = dt(ri);
xn = dt(oi);
yn = (t30) => er(ai(t30).result.templateBindings, t30);
tr = Wo;
qo = 5;
jo = 8;
zo = 8;
sr = (t30) => (e) => e.label ? re(e.label) : ie(e) + t30;
Go = (t30) => t30.__contentEnd ?? En(t30);
ir = ["ExpressionStatement", "Directive", "ImportDeclaration", "ExportDefaultDeclaration", "ExportNamedDeclaration", "ExportAllDeclaration", "ReturnStatement", "ThrowStatement", "DoWhileStatement"];
Xo = new Map([["BreakStatement", sr(qo)], ["ContinueStatement", sr(jo)], ["DebuggerStatement", (t30) => ie(t30) + zo], ["VariableDeclaration", (t30) => re(ft(0, t30.declarations, -1))], ...ir.map((t30) => [t30, Go])]);
Qo = nr(ir);
rr = Jo;
Ko = gt(mt);
Zo = gt(Sn);
ea = gt(xn);
ta = gt(yn);
}
});
init_angular();
export {
or as default,
Cn as parsers
};