@angular/compiler-cli 13.3.5 → 13.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,8 +27,6 @@ import {
27
27
  getSourceFile,
28
28
  identifierOfNode,
29
29
  isDeclaration,
30
- isDtsPath,
31
- isNonDeclarationTsPath,
32
30
  makeDiagnostic,
33
31
  makeRelatedInformation,
34
32
  nodeDebugInfo,
@@ -39,7 +37,6 @@ import {
39
37
  import {
40
38
  absoluteFrom,
41
39
  absoluteFromSourceFile,
42
- basename,
43
40
  relative
44
41
  } from "./chunk-CLV7JFJQ.js";
45
42
  import {
@@ -1434,7 +1431,7 @@ var animationTriggerResolver = (ref, args) => {
1434
1431
 
1435
1432
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/component.mjs
1436
1433
  import { compileClassMetadata as compileClassMetadata3, compileComponentFromMetadata, compileDeclareClassMetadata as compileDeclareClassMetadata3, compileDeclareComponentFromMetadata, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DomElementSchemaRegistry, ExternalExpr as ExternalExpr5, FactoryTarget as FactoryTarget3, InterpolationConfig, makeBindingParser as makeBindingParser2, ParseSourceFile as ParseSourceFile2, parseTemplate, R3TargetBinder, SelectorMatcher, ViewEncapsulation, WrappedNodeExpr as WrappedNodeExpr5 } from "@angular/compiler";
1437
- import ts21 from "typescript";
1434
+ import ts18 from "typescript";
1438
1435
 
1439
1436
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
1440
1437
  import ts4 from "typescript";
@@ -2240,406 +2237,8 @@ function aliasTransformFactory(exportStatements) {
2240
2237
  }
2241
2238
 
2242
2239
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
2243
- import ts12 from "typescript";
2244
-
2245
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
2246
2240
  import ts9 from "typescript";
2247
2241
 
2248
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/expando.mjs
2249
- var NgExtension = Symbol("NgExtension");
2250
- function isExtended(sf) {
2251
- return sf[NgExtension] !== void 0;
2252
- }
2253
- function sfExtensionData(sf) {
2254
- const extSf = sf;
2255
- if (extSf[NgExtension] !== void 0) {
2256
- return extSf[NgExtension];
2257
- }
2258
- const extension = {
2259
- isTopLevelShim: false,
2260
- fileShim: null,
2261
- originalReferencedFiles: null,
2262
- taggedReferenceFiles: null
2263
- };
2264
- extSf[NgExtension] = extension;
2265
- return extension;
2266
- }
2267
- function isFileShimSourceFile(sf) {
2268
- return isExtended(sf) && sf[NgExtension].fileShim !== null;
2269
- }
2270
- function isShim(sf) {
2271
- return isExtended(sf) && (sf[NgExtension].fileShim !== null || sf[NgExtension].isTopLevelShim);
2272
- }
2273
- function copyFileShimData(from, to) {
2274
- if (!isFileShimSourceFile(from)) {
2275
- return;
2276
- }
2277
- sfExtensionData(to).fileShim = sfExtensionData(from).fileShim;
2278
- }
2279
- function untagAllTsFiles(program) {
2280
- for (const sf of program.getSourceFiles()) {
2281
- untagTsFile(sf);
2282
- }
2283
- }
2284
- function retagAllTsFiles(program) {
2285
- for (const sf of program.getSourceFiles()) {
2286
- retagTsFile(sf);
2287
- }
2288
- }
2289
- function untagTsFile(sf) {
2290
- if (sf.isDeclarationFile || !isExtended(sf)) {
2291
- return;
2292
- }
2293
- const ext = sfExtensionData(sf);
2294
- if (ext.originalReferencedFiles !== null) {
2295
- sf.referencedFiles = ext.originalReferencedFiles;
2296
- }
2297
- }
2298
- function retagTsFile(sf) {
2299
- if (sf.isDeclarationFile || !isExtended(sf)) {
2300
- return;
2301
- }
2302
- const ext = sfExtensionData(sf);
2303
- if (ext.taggedReferenceFiles !== null) {
2304
- sf.referencedFiles = ext.taggedReferenceFiles;
2305
- }
2306
- }
2307
-
2308
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/util.mjs
2309
- var TS_EXTENSIONS = /\.tsx?$/i;
2310
- function makeShimFileName(fileName, suffix) {
2311
- return absoluteFrom(fileName.replace(TS_EXTENSIONS, suffix));
2312
- }
2313
- function generatedModuleName(originalModuleName, originalFileName, genSuffix) {
2314
- let moduleName;
2315
- if (originalFileName.endsWith("/index.ts")) {
2316
- moduleName = originalModuleName + "/index" + genSuffix;
2317
- } else {
2318
- moduleName = originalModuleName + genSuffix;
2319
- }
2320
- return moduleName;
2321
- }
2322
-
2323
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
2324
- var ShimAdapter = class {
2325
- constructor(delegate, tsRootFiles, topLevelGenerators, perFileGenerators, oldProgram) {
2326
- this.delegate = delegate;
2327
- this.shims = /* @__PURE__ */ new Map();
2328
- this.priorShims = /* @__PURE__ */ new Map();
2329
- this.notShims = /* @__PURE__ */ new Set();
2330
- this.generators = [];
2331
- this.ignoreForEmit = /* @__PURE__ */ new Set();
2332
- this.extensionPrefixes = [];
2333
- for (const gen of perFileGenerators) {
2334
- const pattern = `^(.*)\\.${gen.extensionPrefix}\\.ts$`;
2335
- const regexp = new RegExp(pattern, "i");
2336
- this.generators.push({
2337
- generator: gen,
2338
- test: regexp,
2339
- suffix: `.${gen.extensionPrefix}.ts`
2340
- });
2341
- this.extensionPrefixes.push(gen.extensionPrefix);
2342
- }
2343
- const extraInputFiles = [];
2344
- for (const gen of topLevelGenerators) {
2345
- const sf = gen.makeTopLevelShim();
2346
- sfExtensionData(sf).isTopLevelShim = true;
2347
- if (!gen.shouldEmit) {
2348
- this.ignoreForEmit.add(sf);
2349
- }
2350
- const fileName = absoluteFromSourceFile(sf);
2351
- this.shims.set(fileName, sf);
2352
- extraInputFiles.push(fileName);
2353
- }
2354
- for (const rootFile of tsRootFiles) {
2355
- for (const gen of this.generators) {
2356
- extraInputFiles.push(makeShimFileName(rootFile, gen.suffix));
2357
- }
2358
- }
2359
- this.extraInputFiles = extraInputFiles;
2360
- if (oldProgram !== null) {
2361
- for (const oldSf of oldProgram.getSourceFiles()) {
2362
- if (oldSf.isDeclarationFile || !isFileShimSourceFile(oldSf)) {
2363
- continue;
2364
- }
2365
- this.priorShims.set(absoluteFromSourceFile(oldSf), oldSf);
2366
- }
2367
- }
2368
- }
2369
- maybeGenerate(fileName) {
2370
- if (this.notShims.has(fileName)) {
2371
- return null;
2372
- } else if (this.shims.has(fileName)) {
2373
- return this.shims.get(fileName);
2374
- }
2375
- if (isDtsPath(fileName)) {
2376
- this.notShims.add(fileName);
2377
- return null;
2378
- }
2379
- for (const record of this.generators) {
2380
- const match = record.test.exec(fileName);
2381
- if (match === null) {
2382
- continue;
2383
- }
2384
- const prefix = match[1];
2385
- let baseFileName = absoluteFrom(prefix + ".ts");
2386
- if (!this.delegate.fileExists(baseFileName)) {
2387
- baseFileName = absoluteFrom(prefix + ".tsx");
2388
- if (!this.delegate.fileExists(baseFileName)) {
2389
- return void 0;
2390
- }
2391
- }
2392
- const inputFile = this.delegate.getSourceFile(baseFileName, ts9.ScriptTarget.Latest);
2393
- if (inputFile === void 0 || isShim(inputFile)) {
2394
- return void 0;
2395
- }
2396
- return this.generateSpecific(fileName, record.generator, inputFile);
2397
- }
2398
- this.notShims.add(fileName);
2399
- return null;
2400
- }
2401
- generateSpecific(fileName, generator, inputFile) {
2402
- let priorShimSf = null;
2403
- if (this.priorShims.has(fileName)) {
2404
- priorShimSf = this.priorShims.get(fileName);
2405
- this.priorShims.delete(fileName);
2406
- }
2407
- const shimSf = generator.generateShimForFile(inputFile, fileName, priorShimSf);
2408
- sfExtensionData(shimSf).fileShim = {
2409
- extension: generator.extensionPrefix,
2410
- generatedFrom: absoluteFromSourceFile(inputFile)
2411
- };
2412
- if (!generator.shouldEmit) {
2413
- this.ignoreForEmit.add(shimSf);
2414
- }
2415
- this.shims.set(fileName, shimSf);
2416
- return shimSf;
2417
- }
2418
- };
2419
-
2420
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/factory_generator.mjs
2421
- import ts10 from "typescript";
2422
- var TS_DTS_SUFFIX = /(\.d)?\.ts$/;
2423
- var STRIP_NG_FACTORY = /(.*)NgFactory$/;
2424
- var FactoryGenerator = class {
2425
- constructor() {
2426
- this.sourceInfo = /* @__PURE__ */ new Map();
2427
- this.sourceToFactorySymbols = /* @__PURE__ */ new Map();
2428
- this.shouldEmit = true;
2429
- this.extensionPrefix = "ngfactory";
2430
- }
2431
- generateShimForFile(sf, genFilePath) {
2432
- const absoluteSfPath = absoluteFromSourceFile(sf);
2433
- const relativePathToSource = "./" + basename(sf.fileName).replace(TS_DTS_SUFFIX, "");
2434
- const symbolNames = sf.statements.filter(ts10.isClassDeclaration).filter((decl) => isExported(decl) && decl.decorators !== void 0 && decl.name !== void 0).map((decl) => decl.name.text);
2435
- let sourceText = "";
2436
- const leadingComment = getFileoverviewComment(sf);
2437
- if (leadingComment !== null) {
2438
- sourceText = leadingComment + "\n\n";
2439
- }
2440
- if (symbolNames.length > 0) {
2441
- const varLines = symbolNames.map((name) => `export const ${name}NgFactory: i0.\u0275NgModuleFactory<any> = new i0.\u0275NgModuleFactory(${name});`);
2442
- sourceText += [
2443
- `import * as i0 from '@angular/core';`,
2444
- `import {${symbolNames.join(", ")}} from '${relativePathToSource}';`,
2445
- ...varLines
2446
- ].join("\n");
2447
- }
2448
- sourceText += "\nexport const \u0275NonEmptyModule = true;";
2449
- const genFile = ts10.createSourceFile(genFilePath, sourceText, sf.languageVersion, true, ts10.ScriptKind.TS);
2450
- if (sf.moduleName !== void 0) {
2451
- genFile.moduleName = generatedModuleName(sf.moduleName, sf.fileName, ".ngfactory");
2452
- }
2453
- const moduleSymbols = /* @__PURE__ */ new Map();
2454
- this.sourceToFactorySymbols.set(absoluteSfPath, moduleSymbols);
2455
- this.sourceInfo.set(genFilePath, {
2456
- sourceFilePath: absoluteSfPath,
2457
- moduleSymbols
2458
- });
2459
- return genFile;
2460
- }
2461
- track(sf, moduleInfo) {
2462
- if (this.sourceToFactorySymbols.has(sf.fileName)) {
2463
- this.sourceToFactorySymbols.get(sf.fileName).set(moduleInfo.name, moduleInfo);
2464
- }
2465
- }
2466
- };
2467
- function isExported(decl) {
2468
- return decl.modifiers !== void 0 && decl.modifiers.some((mod) => mod.kind == ts10.SyntaxKind.ExportKeyword);
2469
- }
2470
- function generatedFactoryTransform(factoryMap, importRewriter) {
2471
- return (context) => {
2472
- return (file) => {
2473
- return transformFactorySourceFile(factoryMap, context, importRewriter, file);
2474
- };
2475
- };
2476
- }
2477
- function transformFactorySourceFile(factoryMap, context, importRewriter, file) {
2478
- if (!factoryMap.has(file.fileName)) {
2479
- return file;
2480
- }
2481
- const { moduleSymbols, sourceFilePath } = factoryMap.get(file.fileName);
2482
- const transformedStatements = [];
2483
- let nonEmptyExport = null;
2484
- const coreImportIdentifiers = /* @__PURE__ */ new Set();
2485
- for (const stmt of file.statements) {
2486
- if (ts10.isImportDeclaration(stmt) && ts10.isStringLiteral(stmt.moduleSpecifier) && stmt.moduleSpecifier.text === "@angular/core") {
2487
- const rewrittenModuleSpecifier = importRewriter.rewriteSpecifier("@angular/core", sourceFilePath);
2488
- if (rewrittenModuleSpecifier !== stmt.moduleSpecifier.text) {
2489
- transformedStatements.push(ts10.updateImportDeclaration(stmt, stmt.decorators, stmt.modifiers, stmt.importClause, ts10.createStringLiteral(rewrittenModuleSpecifier), void 0));
2490
- if (stmt.importClause !== void 0 && stmt.importClause.namedBindings !== void 0 && ts10.isNamespaceImport(stmt.importClause.namedBindings)) {
2491
- coreImportIdentifiers.add(stmt.importClause.namedBindings.name.text);
2492
- }
2493
- } else {
2494
- transformedStatements.push(stmt);
2495
- }
2496
- } else if (ts10.isVariableStatement(stmt) && stmt.declarationList.declarations.length === 1) {
2497
- const decl = stmt.declarationList.declarations[0];
2498
- if (ts10.isIdentifier(decl.name)) {
2499
- if (decl.name.text === "\u0275NonEmptyModule") {
2500
- nonEmptyExport = stmt;
2501
- continue;
2502
- }
2503
- const match = STRIP_NG_FACTORY.exec(decl.name.text);
2504
- const module = match ? moduleSymbols.get(match[1]) : null;
2505
- if (module) {
2506
- const moduleIsTreeShakable = !module.hasId;
2507
- const newStmt = !moduleIsTreeShakable ? stmt : updateInitializers(stmt, (init) => init ? wrapInNoSideEffects(init) : void 0);
2508
- transformedStatements.push(newStmt);
2509
- }
2510
- } else {
2511
- transformedStatements.push(stmt);
2512
- }
2513
- } else {
2514
- transformedStatements.push(stmt);
2515
- }
2516
- }
2517
- if (!transformedStatements.some(ts10.isVariableStatement) && nonEmptyExport !== null) {
2518
- transformedStatements.push(nonEmptyExport);
2519
- }
2520
- file = ts10.updateSourceFileNode(file, transformedStatements);
2521
- if (coreImportIdentifiers.size > 0) {
2522
- const visit2 = (node) => {
2523
- node = ts10.visitEachChild(node, (child) => visit2(child), context);
2524
- if (ts10.isPropertyAccessExpression(node) && ts10.isIdentifier(node.expression) && coreImportIdentifiers.has(node.expression.text)) {
2525
- const rewrittenSymbol = importRewriter.rewriteSymbol(node.name.text, "@angular/core");
2526
- if (rewrittenSymbol !== node.name.text) {
2527
- const updated = ts10.updatePropertyAccess(node, node.expression, ts10.createIdentifier(rewrittenSymbol));
2528
- node = updated;
2529
- }
2530
- }
2531
- return node;
2532
- };
2533
- file = visit2(file);
2534
- }
2535
- return file;
2536
- }
2537
- function getFileoverviewComment(sourceFile) {
2538
- const text = sourceFile.getFullText();
2539
- const trivia = text.substring(0, sourceFile.getStart());
2540
- const leadingComments = ts10.getLeadingCommentRanges(trivia, 0);
2541
- if (!leadingComments || leadingComments.length === 0) {
2542
- return null;
2543
- }
2544
- const comment = leadingComments[0];
2545
- if (comment.kind !== ts10.SyntaxKind.MultiLineCommentTrivia) {
2546
- return null;
2547
- }
2548
- if (text.substring(comment.end, comment.end + 2) !== "\n\n") {
2549
- return null;
2550
- }
2551
- const commentText = text.substring(comment.pos, comment.end);
2552
- if (commentText.indexOf("@license") !== -1) {
2553
- return null;
2554
- }
2555
- return commentText;
2556
- }
2557
- function wrapInNoSideEffects(expr) {
2558
- const noSideEffects = ts10.createPropertyAccess(ts10.createIdentifier("i0"), "\u0275noSideEffects");
2559
- return ts10.createCall(noSideEffects, [], [
2560
- ts10.createFunctionExpression([], void 0, void 0, [], [], void 0, ts10.createBlock([
2561
- ts10.createReturn(expr)
2562
- ]))
2563
- ]);
2564
- }
2565
- function updateInitializers(stmt, update) {
2566
- return ts10.updateVariableStatement(stmt, stmt.modifiers, ts10.updateVariableDeclarationList(stmt.declarationList, stmt.declarationList.declarations.map((decl) => ts10.updateVariableDeclaration(decl, decl.name, decl.type, update(decl.initializer)))));
2567
- }
2568
-
2569
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/reference_tagger.mjs
2570
- var ShimReferenceTagger = class {
2571
- constructor(shimExtensions) {
2572
- this.tagged = /* @__PURE__ */ new Set();
2573
- this.enabled = true;
2574
- this.suffixes = shimExtensions.map((extension) => `.${extension}.ts`);
2575
- }
2576
- tag(sf) {
2577
- if (!this.enabled || sf.isDeclarationFile || isShim(sf) || this.tagged.has(sf) || !isNonDeclarationTsPath(sf.fileName)) {
2578
- return;
2579
- }
2580
- const ext = sfExtensionData(sf);
2581
- if (ext.originalReferencedFiles === null) {
2582
- ext.originalReferencedFiles = sf.referencedFiles;
2583
- }
2584
- const referencedFiles = [...ext.originalReferencedFiles];
2585
- const sfPath = absoluteFromSourceFile(sf);
2586
- for (const suffix of this.suffixes) {
2587
- referencedFiles.push({
2588
- fileName: makeShimFileName(sfPath, suffix),
2589
- pos: 0,
2590
- end: 0
2591
- });
2592
- }
2593
- ext.taggedReferenceFiles = referencedFiles;
2594
- sf.referencedFiles = referencedFiles;
2595
- this.tagged.add(sf);
2596
- }
2597
- finalize() {
2598
- this.enabled = false;
2599
- this.tagged.clear();
2600
- }
2601
- };
2602
-
2603
- // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/summary_generator.mjs
2604
- import ts11 from "typescript";
2605
- var SummaryGenerator = class {
2606
- constructor() {
2607
- this.shouldEmit = true;
2608
- this.extensionPrefix = "ngsummary";
2609
- }
2610
- generateShimForFile(sf, genFilePath) {
2611
- const symbolNames = [];
2612
- for (const stmt of sf.statements) {
2613
- if (ts11.isClassDeclaration(stmt)) {
2614
- if (!isExported2(stmt) || stmt.decorators === void 0 || stmt.name === void 0) {
2615
- continue;
2616
- }
2617
- symbolNames.push(stmt.name.text);
2618
- } else if (ts11.isExportDeclaration(stmt)) {
2619
- if (stmt.exportClause === void 0 || stmt.moduleSpecifier !== void 0 || !ts11.isNamedExports(stmt.exportClause)) {
2620
- continue;
2621
- }
2622
- for (const specifier of stmt.exportClause.elements) {
2623
- symbolNames.push(specifier.name.text);
2624
- }
2625
- }
2626
- }
2627
- const varLines = symbolNames.map((name) => `export const ${name}NgSummary: any = null;`);
2628
- if (varLines.length === 0) {
2629
- varLines.push(`export const \u0275empty = null;`);
2630
- }
2631
- const sourceText = varLines.join("\n");
2632
- const genFile = ts11.createSourceFile(genFilePath, sourceText, sf.languageVersion, true, ts11.ScriptKind.TS);
2633
- if (sf.moduleName !== void 0) {
2634
- genFile.moduleName = generatedModuleName(sf.moduleName, sf.fileName, ".ngsummary");
2635
- }
2636
- return genFile;
2637
- }
2638
- };
2639
- function isExported2(decl) {
2640
- return decl.modifiers !== void 0 && decl.modifiers.some((mod) => mod.kind == ts11.SyntaxKind.ExportKeyword);
2641
- }
2642
-
2643
2242
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/trait.mjs
2644
2243
  var TraitState;
2645
2244
  (function(TraitState2) {
@@ -2697,7 +2296,7 @@ var TraitImpl = class {
2697
2296
 
2698
2297
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
2699
2298
  var TraitCompiler = class {
2700
- constructor(handlers, reflector, perf, incrementalBuild, compileNonExportedClasses, compilationMode, dtsTransforms, semanticDepGraphUpdater) {
2299
+ constructor(handlers, reflector, perf, incrementalBuild, compileNonExportedClasses, compilationMode, dtsTransforms, semanticDepGraphUpdater, sourceFileTypeIdentifier) {
2701
2300
  this.handlers = handlers;
2702
2301
  this.reflector = reflector;
2703
2302
  this.perf = perf;
@@ -2706,6 +2305,7 @@ var TraitCompiler = class {
2706
2305
  this.compilationMode = compilationMode;
2707
2306
  this.dtsTransforms = dtsTransforms;
2708
2307
  this.semanticDepGraphUpdater = semanticDepGraphUpdater;
2308
+ this.sourceFileTypeIdentifier = sourceFileTypeIdentifier;
2709
2309
  this.classes = /* @__PURE__ */ new Map();
2710
2310
  this.fileToClasses = /* @__PURE__ */ new Map();
2711
2311
  this.filesWithoutTraits = /* @__PURE__ */ new Set();
@@ -2722,7 +2322,7 @@ var TraitCompiler = class {
2722
2322
  return this.analyze(sf, true);
2723
2323
  }
2724
2324
  analyze(sf, preanalyze) {
2725
- if (sf.isDeclarationFile || isShim(sf)) {
2325
+ if (sf.isDeclarationFile || this.sourceFileTypeIdentifier.isShim(sf) || this.sourceFileTypeIdentifier.isResource(sf)) {
2726
2326
  return void 0;
2727
2327
  }
2728
2328
  const promises = [];
@@ -2743,7 +2343,7 @@ var TraitCompiler = class {
2743
2343
  if (this.reflector.isClass(node)) {
2744
2344
  this.analyzeClass(node, preanalyze ? promises : null);
2745
2345
  }
2746
- ts12.forEachChild(node, visit2);
2346
+ ts9.forEachChild(node, visit2);
2747
2347
  };
2748
2348
  visit2(sf);
2749
2349
  if (!this.fileToClasses.has(sf)) {
@@ -2857,7 +2457,7 @@ var TraitCompiler = class {
2857
2457
  }
2858
2458
  if (isPrimaryHandler && record.hasPrimaryHandler) {
2859
2459
  record.metaDiagnostics = [{
2860
- category: ts12.DiagnosticCategory.Error,
2460
+ category: ts9.DiagnosticCategory.Error,
2861
2461
  code: Number("-99" + ErrorCode.DECORATOR_COLLISION),
2862
2462
  file: getSourceFile(clazz),
2863
2463
  start: clazz.getStart(void 0, false),
@@ -3065,7 +2665,7 @@ var TraitCompiler = class {
3065
2665
  }
3066
2666
  }
3067
2667
  compile(clazz, constantPool) {
3068
- const original = ts12.getOriginalNode(clazz);
2668
+ const original = ts9.getOriginalNode(clazz);
3069
2669
  if (!this.reflector.isClass(clazz) || !this.reflector.isClass(original) || !this.classes.has(original)) {
3070
2670
  return null;
3071
2671
  }
@@ -3096,7 +2696,7 @@ var TraitCompiler = class {
3096
2696
  return res.length > 0 ? res : null;
3097
2697
  }
3098
2698
  decoratorsFor(node) {
3099
- const original = ts12.getOriginalNode(node);
2699
+ const original = ts9.getOriginalNode(node);
3100
2700
  if (!this.reflector.isClass(original) || !this.classes.has(original)) {
3101
2701
  return [];
3102
2702
  }
@@ -3106,7 +2706,7 @@ var TraitCompiler = class {
3106
2706
  if (trait.state !== TraitState.Resolved) {
3107
2707
  continue;
3108
2708
  }
3109
- if (trait.detected.trigger !== null && ts12.isDecorator(trait.detected.trigger)) {
2709
+ if (trait.detected.trigger !== null && ts9.isDecorator(trait.detected.trigger)) {
3110
2710
  decorators.push(trait.detected.trigger);
3111
2711
  }
3112
2712
  }
@@ -3136,23 +2736,23 @@ var TraitCompiler = class {
3136
2736
  };
3137
2737
 
3138
2738
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
3139
- import ts14 from "typescript";
2739
+ import ts11 from "typescript";
3140
2740
 
3141
2741
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/utils.mjs
3142
- import ts13 from "typescript";
2742
+ import ts10 from "typescript";
3143
2743
  function addImports(importManager, sf, extraStatements = []) {
3144
2744
  const addedImports = importManager.getAllImports(sf.fileName).map((i) => {
3145
- const qualifier = ts13.createIdentifier(i.qualifier.text);
3146
- const importClause = ts13.createImportClause(void 0, ts13.createNamespaceImport(qualifier));
3147
- const decl = ts13.createImportDeclaration(void 0, void 0, importClause, ts13.createLiteral(i.specifier));
3148
- ts13.setOriginalNode(i.qualifier, decl);
2745
+ const qualifier = ts10.createIdentifier(i.qualifier.text);
2746
+ const importClause = ts10.createImportClause(void 0, ts10.createNamespaceImport(qualifier));
2747
+ const decl = ts10.createImportDeclaration(void 0, void 0, importClause, ts10.createLiteral(i.specifier));
2748
+ ts10.setOriginalNode(i.qualifier, decl);
3149
2749
  return decl;
3150
2750
  });
3151
2751
  const existingImports = sf.statements.filter((stmt) => isImportStatement(stmt));
3152
2752
  const body = sf.statements.filter((stmt) => !isImportStatement(stmt));
3153
2753
  if (addedImports.length > 0) {
3154
- const fileoverviewAnchorStmt = ts13.createNotEmittedStatement(sf);
3155
- return ts13.updateSourceFileNode(sf, ts13.createNodeArray([
2754
+ const fileoverviewAnchorStmt = ts10.createNotEmittedStatement(sf);
2755
+ return ts10.updateSourceFileNode(sf, ts10.createNodeArray([
3156
2756
  fileoverviewAnchorStmt,
3157
2757
  ...existingImports,
3158
2758
  ...addedImports,
@@ -3163,7 +2763,7 @@ function addImports(importManager, sf, extraStatements = []) {
3163
2763
  return sf;
3164
2764
  }
3165
2765
  function isImportStatement(stmt) {
3166
- return ts13.isImportDeclaration(stmt) || ts13.isImportEqualsDeclaration(stmt) || ts13.isNamespaceImport(stmt);
2766
+ return ts10.isImportDeclaration(stmt) || ts10.isImportEqualsDeclaration(stmt) || ts10.isNamespaceImport(stmt);
3167
2767
  }
3168
2768
 
3169
2769
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
@@ -3181,7 +2781,7 @@ var DtsTransformRegistry = class {
3181
2781
  if (!sf.isDeclarationFile) {
3182
2782
  return null;
3183
2783
  }
3184
- const originalSf = ts14.getOriginalNode(sf);
2784
+ const originalSf = ts11.getOriginalNode(sf);
3185
2785
  let transforms = null;
3186
2786
  if (this.ivyDeclarationTransforms.has(originalSf)) {
3187
2787
  transforms = [];
@@ -3194,7 +2794,7 @@ function declarationTransformFactory(transformRegistry, importRewriter, importPr
3194
2794
  return (context) => {
3195
2795
  const transformer = new DtsTransformer(context, importRewriter, importPrefix);
3196
2796
  return (fileOrBundle) => {
3197
- if (ts14.isBundle(fileOrBundle)) {
2797
+ if (ts11.isBundle(fileOrBundle)) {
3198
2798
  return fileOrBundle;
3199
2799
  }
3200
2800
  const transforms = transformRegistry.getAllTransforms(fileOrBundle);
@@ -3214,15 +2814,15 @@ var DtsTransformer = class {
3214
2814
  transform(sf, transforms) {
3215
2815
  const imports = new ImportManager(this.importRewriter, this.importPrefix);
3216
2816
  const visitor = (node) => {
3217
- if (ts14.isClassDeclaration(node)) {
2817
+ if (ts11.isClassDeclaration(node)) {
3218
2818
  return this.transformClassDeclaration(node, transforms, imports);
3219
- } else if (ts14.isFunctionDeclaration(node)) {
2819
+ } else if (ts11.isFunctionDeclaration(node)) {
3220
2820
  return this.transformFunctionDeclaration(node, transforms, imports);
3221
2821
  } else {
3222
- return ts14.visitEachChild(node, visitor, this.ctx);
2822
+ return ts11.visitEachChild(node, visitor, this.ctx);
3223
2823
  }
3224
2824
  };
3225
- sf = ts14.visitNode(sf, visitor);
2825
+ sf = ts11.visitNode(sf, visitor);
3226
2826
  return addImports(imports, sf);
3227
2827
  }
3228
2828
  transformClassDeclaration(clazz, transforms, imports) {
@@ -3250,7 +2850,7 @@ var DtsTransformer = class {
3250
2850
  }
3251
2851
  }
3252
2852
  if (elementsChanged && clazz === newClazz) {
3253
- newClazz = ts14.updateClassDeclaration(clazz, clazz.decorators, clazz.modifiers, clazz.name, clazz.typeParameters, clazz.heritageClauses, elements);
2853
+ newClazz = ts11.updateClassDeclaration(clazz, clazz.decorators, clazz.modifiers, clazz.name, clazz.typeParameters, clazz.heritageClauses, elements);
3254
2854
  }
3255
2855
  return newClazz;
3256
2856
  }
@@ -3272,31 +2872,31 @@ var IvyDeclarationDtsTransform = class {
3272
2872
  this.declarationFields.set(decl, fields);
3273
2873
  }
3274
2874
  transformClass(clazz, members, imports) {
3275
- const original = ts14.getOriginalNode(clazz);
2875
+ const original = ts11.getOriginalNode(clazz);
3276
2876
  if (!this.declarationFields.has(original)) {
3277
2877
  return clazz;
3278
2878
  }
3279
2879
  const fields = this.declarationFields.get(original);
3280
2880
  const newMembers = fields.map((decl) => {
3281
- const modifiers = [ts14.createModifier(ts14.SyntaxKind.StaticKeyword)];
2881
+ const modifiers = [ts11.createModifier(ts11.SyntaxKind.StaticKeyword)];
3282
2882
  const typeRef = translateType(decl.type, imports);
3283
2883
  markForEmitAsSingleLine(typeRef);
3284
- return ts14.createProperty(void 0, modifiers, decl.name, void 0, typeRef, void 0);
2884
+ return ts11.createProperty(void 0, modifiers, decl.name, void 0, typeRef, void 0);
3285
2885
  });
3286
- return ts14.updateClassDeclaration(clazz, clazz.decorators, clazz.modifiers, clazz.name, clazz.typeParameters, clazz.heritageClauses, [...members, ...newMembers]);
2886
+ return ts11.updateClassDeclaration(clazz, clazz.decorators, clazz.modifiers, clazz.name, clazz.typeParameters, clazz.heritageClauses, [...members, ...newMembers]);
3287
2887
  }
3288
2888
  };
3289
2889
  function markForEmitAsSingleLine(node) {
3290
- ts14.setEmitFlags(node, ts14.EmitFlags.SingleLine);
3291
- ts14.forEachChild(node, markForEmitAsSingleLine);
2890
+ ts11.setEmitFlags(node, ts11.EmitFlags.SingleLine);
2891
+ ts11.forEachChild(node, markForEmitAsSingleLine);
3292
2892
  }
3293
2893
 
3294
2894
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
3295
2895
  import { ConstantPool } from "@angular/compiler";
3296
- import ts16 from "typescript";
2896
+ import ts13 from "typescript";
3297
2897
 
3298
2898
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/visitor.mjs
3299
- import ts15 from "typescript";
2899
+ import ts12 from "typescript";
3300
2900
  function visit(node, visitor, context) {
3301
2901
  return visitor._visit(node, context);
3302
2902
  }
@@ -3320,8 +2920,8 @@ var Visitor = class {
3320
2920
  }
3321
2921
  _visit(node, context) {
3322
2922
  let visitedNode = null;
3323
- node = ts15.visitEachChild(node, (child) => this._visit(child, context), context);
3324
- if (ts15.isClassDeclaration(node)) {
2923
+ node = ts12.visitEachChild(node, (child) => this._visit(child, context), context);
2924
+ if (ts12.isClassDeclaration(node)) {
3325
2925
  visitedNode = this._visitListEntryNode(node, (node2) => this.visitClassDeclaration(node2));
3326
2926
  } else {
3327
2927
  visitedNode = this.visitOtherNode(node);
@@ -3335,7 +2935,7 @@ var Visitor = class {
3335
2935
  if (node.statements.every((stmt) => !this._before.has(stmt) && !this._after.has(stmt))) {
3336
2936
  return node;
3337
2937
  }
3338
- const clone = ts15.getMutableClone(node);
2938
+ const clone = ts12.getMutableClone(node);
3339
2939
  const newStatements = [];
3340
2940
  clone.statements.forEach((stmt) => {
3341
2941
  if (this._before.has(stmt)) {
@@ -3348,7 +2948,7 @@ var Visitor = class {
3348
2948
  this._after.delete(stmt);
3349
2949
  }
3350
2950
  });
3351
- clone.statements = ts15.createNodeArray(newStatements, node.statements.hasTrailingComma);
2951
+ clone.statements = ts12.createNodeArray(newStatements, node.statements.hasTrailingComma);
3352
2952
  return clone;
3353
2953
  }
3354
2954
  };
@@ -3406,14 +3006,14 @@ var IvyTransformationVisitor = class extends Visitor {
3406
3006
  const members = [...node.members];
3407
3007
  for (const field of this.classCompilationMap.get(node)) {
3408
3008
  const exprNode = translateExpression(field.initializer, this.importManager, translateOptions);
3409
- const property = ts16.createProperty(void 0, [ts16.createToken(ts16.SyntaxKind.StaticKeyword)], field.name, void 0, void 0, exprNode);
3009
+ const property = ts13.createProperty(void 0, [ts13.createToken(ts13.SyntaxKind.StaticKeyword)], field.name, void 0, void 0, exprNode);
3410
3010
  if (this.isClosureCompilerEnabled) {
3411
- ts16.addSyntheticLeadingComment(property, ts16.SyntaxKind.MultiLineCommentTrivia, "* @nocollapse ", false);
3011
+ ts13.addSyntheticLeadingComment(property, ts13.SyntaxKind.MultiLineCommentTrivia, "* @nocollapse ", false);
3412
3012
  }
3413
3013
  field.statements.map((stmt) => translateStatement(stmt, this.importManager, translateOptions)).forEach((stmt) => statements.push(stmt));
3414
3014
  members.push(property);
3415
3015
  }
3416
- node = ts16.updateClassDeclaration(node, maybeFilterDecorator(node.decorators, this.compilation.decoratorsFor(node)), node.modifiers, node.name, node.typeParameters, node.heritageClauses || [], members.map((member) => this._stripAngularDecorators(member)));
3016
+ node = ts13.updateClassDeclaration(node, maybeFilterDecorator(node.decorators, this.compilation.decoratorsFor(node)), node.modifiers, node.name, node.typeParameters, node.heritageClauses || [], members.map((member) => this._stripAngularDecorators(member)));
3417
3017
  return { node, after: statements };
3418
3018
  }
3419
3019
  _angularCoreDecorators(decl) {
@@ -3442,25 +3042,25 @@ var IvyTransformationVisitor = class extends Visitor {
3442
3042
  if (filtered.length === 0) {
3443
3043
  return void 0;
3444
3044
  }
3445
- const array = ts16.createNodeArray(filtered);
3045
+ const array = ts13.createNodeArray(filtered);
3446
3046
  array.pos = node.decorators.pos;
3447
3047
  array.end = node.decorators.end;
3448
3048
  return array;
3449
3049
  }
3450
3050
  _stripAngularDecorators(node) {
3451
- if (ts16.isParameter(node)) {
3452
- node = ts16.updateParameter(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer);
3453
- } else if (ts16.isMethodDeclaration(node) && node.decorators !== void 0) {
3454
- node = ts16.updateMethod(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body);
3455
- } else if (ts16.isPropertyDeclaration(node) && node.decorators !== void 0) {
3456
- node = ts16.updateProperty(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.name, node.questionToken, node.type, node.initializer);
3457
- } else if (ts16.isGetAccessor(node)) {
3458
- node = ts16.updateGetAccessor(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.name, node.parameters, node.type, node.body);
3459
- } else if (ts16.isSetAccessor(node)) {
3460
- node = ts16.updateSetAccessor(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.name, node.parameters, node.body);
3461
- } else if (ts16.isConstructorDeclaration(node)) {
3051
+ if (ts13.isParameter(node)) {
3052
+ node = ts13.updateParameter(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer);
3053
+ } else if (ts13.isMethodDeclaration(node) && node.decorators !== void 0) {
3054
+ node = ts13.updateMethod(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body);
3055
+ } else if (ts13.isPropertyDeclaration(node) && node.decorators !== void 0) {
3056
+ node = ts13.updateProperty(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.name, node.questionToken, node.type, node.initializer);
3057
+ } else if (ts13.isGetAccessor(node)) {
3058
+ node = ts13.updateGetAccessor(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.name, node.parameters, node.type, node.body);
3059
+ } else if (ts13.isSetAccessor(node)) {
3060
+ node = ts13.updateSetAccessor(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.name, node.parameters, node.body);
3061
+ } else if (ts13.isConstructorDeclaration(node)) {
3462
3062
  const parameters = node.parameters.map((param) => this._stripAngularDecorators(param));
3463
- node = ts16.updateConstructor(node, node.decorators, node.modifiers, parameters, node.body);
3063
+ node = ts13.updateConstructor(node, node.decorators, node.modifiers, parameters, node.body);
3464
3064
  }
3465
3065
  return node;
3466
3066
  }
@@ -3472,7 +3072,7 @@ function transformIvySourceFile(compilation, context, reflector, importRewriter,
3472
3072
  visit(file, compilationVisitor, context);
3473
3073
  const transformationVisitor = new IvyTransformationVisitor(compilation, compilationVisitor.classCompilationMap, reflector, importManager, recordWrappedNode, isClosureCompilerEnabled, isCore);
3474
3074
  let sf = visit(file, transformationVisitor, context);
3475
- const downlevelTranslatedCode = getLocalizeCompileTarget(context) < ts16.ScriptTarget.ES2015;
3075
+ const downlevelTranslatedCode = getLocalizeCompileTarget(context) < ts13.ScriptTarget.ES2015;
3476
3076
  const constants = constantPool.statements.map((stmt) => translateStatement(stmt, importManager, {
3477
3077
  recordWrappedNode,
3478
3078
  downlevelTaggedTemplates: downlevelTranslatedCode,
@@ -3487,17 +3087,17 @@ function transformIvySourceFile(compilation, context, reflector, importRewriter,
3487
3087
  return sf;
3488
3088
  }
3489
3089
  function getLocalizeCompileTarget(context) {
3490
- const target = context.getCompilerOptions().target || ts16.ScriptTarget.ES2015;
3491
- return target !== ts16.ScriptTarget.JSON ? target : ts16.ScriptTarget.ES2015;
3090
+ const target = context.getCompilerOptions().target || ts13.ScriptTarget.ES2015;
3091
+ return target !== ts13.ScriptTarget.JSON ? target : ts13.ScriptTarget.ES2015;
3492
3092
  }
3493
3093
  function getFileOverviewComment(statements) {
3494
3094
  if (statements.length > 0) {
3495
3095
  const host = statements[0];
3496
3096
  let trailing = false;
3497
- let comments = ts16.getSyntheticLeadingComments(host);
3097
+ let comments = ts13.getSyntheticLeadingComments(host);
3498
3098
  if (!comments || comments.length === 0) {
3499
3099
  trailing = true;
3500
- comments = ts16.getSyntheticTrailingComments(host);
3100
+ comments = ts13.getSyntheticTrailingComments(host);
3501
3101
  }
3502
3102
  if (comments && comments.length > 0 && CLOSURE_FILE_OVERVIEW_REGEXP.test(comments[0].text)) {
3503
3103
  return { comments, host, trailing };
@@ -3509,22 +3109,22 @@ function setFileOverviewComment(sf, fileoverview) {
3509
3109
  const { comments, host, trailing } = fileoverview;
3510
3110
  if (sf.statements.length > 0 && host !== sf.statements[0]) {
3511
3111
  if (trailing) {
3512
- ts16.setSyntheticTrailingComments(host, void 0);
3112
+ ts13.setSyntheticTrailingComments(host, void 0);
3513
3113
  } else {
3514
- ts16.setSyntheticLeadingComments(host, void 0);
3114
+ ts13.setSyntheticLeadingComments(host, void 0);
3515
3115
  }
3516
- ts16.setSyntheticLeadingComments(sf.statements[0], comments);
3116
+ ts13.setSyntheticLeadingComments(sf.statements[0], comments);
3517
3117
  }
3518
3118
  }
3519
3119
  function maybeFilterDecorator(decorators, toRemove) {
3520
3120
  if (decorators === void 0) {
3521
3121
  return void 0;
3522
3122
  }
3523
- const filtered = decorators.filter((dec) => toRemove.find((decToRemove) => ts16.getOriginalNode(dec) === decToRemove) === void 0);
3123
+ const filtered = decorators.filter((dec) => toRemove.find((decToRemove) => ts13.getOriginalNode(dec) === decToRemove) === void 0);
3524
3124
  if (filtered.length === 0) {
3525
3125
  return void 0;
3526
3126
  }
3527
- return ts16.createNodeArray(filtered);
3127
+ return ts13.createNodeArray(filtered);
3528
3128
  }
3529
3129
  function isFromAngularCore(decorator) {
3530
3130
  return decorator.import !== null && decorator.import.from === "@angular/core";
@@ -3539,7 +3139,7 @@ function createRecorderFn(defaultImportTracker) {
3539
3139
  }
3540
3140
 
3541
3141
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/diagnostics.mjs
3542
- import ts17 from "typescript";
3142
+ import ts14 from "typescript";
3543
3143
  function createValueHasWrongTypeError(node, value, messageText) {
3544
3144
  var _a;
3545
3145
  let chainedMessage;
@@ -3557,11 +3157,11 @@ function createValueHasWrongTypeError(node, value, messageText) {
3557
3157
  }
3558
3158
  const chain = {
3559
3159
  messageText,
3560
- category: ts17.DiagnosticCategory.Error,
3160
+ category: ts14.DiagnosticCategory.Error,
3561
3161
  code: 0,
3562
3162
  next: [{
3563
3163
  messageText: chainedMessage,
3564
- category: ts17.DiagnosticCategory.Message,
3164
+ category: ts14.DiagnosticCategory.Message,
3565
3165
  code: 0
3566
3166
  }]
3567
3167
  };
@@ -3637,7 +3237,7 @@ function getInheritedUndecoratedCtorDiagnostic(node, baseClass, reader) {
3637
3237
 
3638
3238
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/directive.mjs
3639
3239
  import { compileClassMetadata, compileDeclareClassMetadata, compileDeclareDirectiveFromMetadata, compileDirectiveFromMetadata, createMayBeForwardRefExpression, emitDistinctChangesOnlyDefaultValue, ExternalExpr as ExternalExpr3, FactoryTarget, getSafePropertyAccessString, makeBindingParser, parseHostBindings, verifyHostBindings, WrappedNodeExpr as WrappedNodeExpr3 } from "@angular/compiler";
3640
- import ts19 from "typescript";
3240
+ import ts16 from "typescript";
3641
3241
 
3642
3242
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/factory.mjs
3643
3243
  import { compileDeclareFactoryFunction, compileFactoryFunction } from "@angular/compiler";
@@ -3652,7 +3252,7 @@ function compileDeclareFactory(metadata) {
3652
3252
 
3653
3253
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/metadata.mjs
3654
3254
  import { FunctionExpr, LiteralArrayExpr, LiteralExpr as LiteralExpr2, literalMap, ReturnStatement, WrappedNodeExpr as WrappedNodeExpr2 } from "@angular/compiler";
3655
- import ts18 from "typescript";
3255
+ import ts15 from "typescript";
3656
3256
  function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompiler, angularDecoratorTransform = (dec) => dec) {
3657
3257
  if (!reflection.isClass(clazz)) {
3658
3258
  return null;
@@ -3666,7 +3266,7 @@ function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompi
3666
3266
  if (ngClassDecorators.length === 0) {
3667
3267
  return null;
3668
3268
  }
3669
- const metaDecorators = new WrappedNodeExpr2(ts18.createArrayLiteral(ngClassDecorators));
3269
+ const metaDecorators = new WrappedNodeExpr2(ts15.createArrayLiteral(ngClassDecorators));
3670
3270
  let metaCtorParameters = null;
3671
3271
  const classCtorParameters = reflection.getConstructorParameters(clazz);
3672
3272
  if (classCtorParameters !== null) {
@@ -3686,7 +3286,7 @@ function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompi
3686
3286
  return classMemberToMetadata((_a = member.nameNode) != null ? _a : member.name, member.decorators, isCore);
3687
3287
  });
3688
3288
  if (decoratedMembers.length > 0) {
3689
- metaPropDecorators = new WrappedNodeExpr2(ts18.createObjectLiteral(decoratedMembers));
3289
+ metaPropDecorators = new WrappedNodeExpr2(ts15.createObjectLiteral(decoratedMembers));
3690
3290
  }
3691
3291
  return {
3692
3292
  type: new WrappedNodeExpr2(id),
@@ -3702,38 +3302,38 @@ function ctorParameterToMetadata(param, isCore) {
3702
3302
  ];
3703
3303
  if (param.decorators !== null) {
3704
3304
  const ngDecorators = param.decorators.filter((dec) => isAngularDecorator2(dec, isCore)).map((decorator) => decoratorToMetadata(decorator));
3705
- const value = new WrappedNodeExpr2(ts18.createArrayLiteral(ngDecorators));
3305
+ const value = new WrappedNodeExpr2(ts15.createArrayLiteral(ngDecorators));
3706
3306
  mapEntries.push({ key: "decorators", value, quoted: false });
3707
3307
  }
3708
3308
  return literalMap(mapEntries);
3709
3309
  }
3710
3310
  function classMemberToMetadata(name, decorators, isCore) {
3711
3311
  const ngDecorators = decorators.filter((dec) => isAngularDecorator2(dec, isCore)).map((decorator) => decoratorToMetadata(decorator));
3712
- const decoratorMeta = ts18.createArrayLiteral(ngDecorators);
3713
- return ts18.createPropertyAssignment(name, decoratorMeta);
3312
+ const decoratorMeta = ts15.createArrayLiteral(ngDecorators);
3313
+ return ts15.createPropertyAssignment(name, decoratorMeta);
3714
3314
  }
3715
3315
  function decoratorToMetadata(decorator, wrapFunctionsInParens) {
3716
3316
  if (decorator.identifier === null) {
3717
3317
  throw new Error("Illegal state: synthesized decorator cannot be emitted in class metadata.");
3718
3318
  }
3719
3319
  const properties = [
3720
- ts18.createPropertyAssignment("type", ts18.getMutableClone(decorator.identifier))
3320
+ ts15.createPropertyAssignment("type", ts15.getMutableClone(decorator.identifier))
3721
3321
  ];
3722
3322
  if (decorator.args !== null && decorator.args.length > 0) {
3723
3323
  const args = decorator.args.map((arg) => {
3724
- const expr = ts18.getMutableClone(arg);
3324
+ const expr = ts15.getMutableClone(arg);
3725
3325
  return wrapFunctionsInParens ? wrapFunctionExpressionsInParens(expr) : expr;
3726
3326
  });
3727
- properties.push(ts18.createPropertyAssignment("args", ts18.createArrayLiteral(args)));
3327
+ properties.push(ts15.createPropertyAssignment("args", ts15.createArrayLiteral(args)));
3728
3328
  }
3729
- return ts18.createObjectLiteral(properties, true);
3329
+ return ts15.createObjectLiteral(properties, true);
3730
3330
  }
3731
3331
  function isAngularDecorator2(decorator, isCore) {
3732
3332
  return isCore || decorator.import !== null && decorator.import.from === "@angular/core";
3733
3333
  }
3734
3334
  function removeIdentifierReferences(node, name) {
3735
- const result = ts18.transform(node, [(context) => (root) => ts18.visitNode(root, function walk(current) {
3736
- return ts18.isIdentifier(current) && current.text === name ? ts18.createIdentifier(current.text) : ts18.visitEachChild(current, walk, context);
3335
+ const result = ts15.transform(node, [(context) => (root) => ts15.visitNode(root, function walk(current) {
3336
+ return ts15.isIdentifier(current) && current.text === name ? ts15.createIdentifier(current.text) : ts15.visitEachChild(current, walk, context);
3737
3337
  })]);
3738
3338
  return result.transformed[0];
3739
3339
  }
@@ -3959,7 +3559,7 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, isCore
3959
3559
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, Decorator.nodeForError(decorator), `Incorrect number of arguments to @${decorator.name} decorator`);
3960
3560
  } else {
3961
3561
  const meta = unwrapExpression(decorator.args[0]);
3962
- if (!ts19.isObjectLiteralExpression(meta)) {
3562
+ if (!ts16.isObjectLiteralExpression(meta)) {
3963
3563
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, `@${decorator.name} argument must be an object literal`);
3964
3564
  }
3965
3565
  directive = reflectObjectLiteral(meta);
@@ -4070,7 +3670,7 @@ function extractQueryMetadata(exprNode, name, args, propertyName, reflector, eva
4070
3670
  let emitDistinctChangesOnly = emitDistinctChangesOnlyDefaultValue;
4071
3671
  if (args.length === 2) {
4072
3672
  const optionsExpr = unwrapExpression(args[1]);
4073
- if (!ts19.isObjectLiteralExpression(optionsExpr)) {
3673
+ if (!ts16.isObjectLiteralExpression(optionsExpr)) {
4074
3674
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, optionsExpr, `@${name} options must be an object literal`);
4075
3675
  }
4076
3676
  const options = reflectObjectLiteral(optionsExpr);
@@ -4115,16 +3715,16 @@ function extractQueryMetadata(exprNode, name, args, propertyName, reflector, eva
4115
3715
  }
4116
3716
  function extractQueriesFromDecorator(queryData, reflector, evaluator, isCore) {
4117
3717
  const content = [], view = [];
4118
- if (!ts19.isObjectLiteralExpression(queryData)) {
3718
+ if (!ts16.isObjectLiteralExpression(queryData)) {
4119
3719
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator queries metadata must be an object literal");
4120
3720
  }
4121
3721
  reflectObjectLiteral(queryData).forEach((queryExpr, propertyName) => {
4122
3722
  queryExpr = unwrapExpression(queryExpr);
4123
- if (!ts19.isNewExpression(queryExpr)) {
3723
+ if (!ts16.isNewExpression(queryExpr)) {
4124
3724
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator query metadata must be an instance of a query type");
4125
3725
  }
4126
- const queryType = ts19.isPropertyAccessExpression(queryExpr.expression) ? queryExpr.expression.name : queryExpr.expression;
4127
- if (!ts19.isIdentifier(queryType)) {
3726
+ const queryType = ts16.isPropertyAccessExpression(queryExpr.expression) ? queryExpr.expression.name : queryExpr.expression;
3727
+ if (!ts16.isIdentifier(queryType)) {
4128
3728
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator query metadata must be an instance of a query type");
4129
3729
  }
4130
3730
  const type = reflector.getImportOfIdentifier(queryType);
@@ -4303,7 +3903,7 @@ var QUERY_TYPES = /* @__PURE__ */ new Set([
4303
3903
 
4304
3904
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/ng_module.mjs
4305
3905
  import { compileClassMetadata as compileClassMetadata2, compileDeclareClassMetadata as compileDeclareClassMetadata2, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileInjector, compileNgModule, CUSTOM_ELEMENTS_SCHEMA, ExternalExpr as ExternalExpr4, FactoryTarget as FactoryTarget2, InvokeFunctionExpr, LiteralArrayExpr as LiteralArrayExpr2, NO_ERRORS_SCHEMA, R3Identifiers, WrappedNodeExpr as WrappedNodeExpr4 } from "@angular/compiler";
4306
- import ts20 from "typescript";
3906
+ import ts17 from "typescript";
4307
3907
  var NgModuleSymbol = class extends SemanticSymbol {
4308
3908
  constructor() {
4309
3909
  super(...arguments);
@@ -4386,8 +3986,8 @@ var NgModuleDecoratorHandler = class {
4386
3986
  if (decorator.args === null || decorator.args.length > 1) {
4387
3987
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, Decorator.nodeForError(decorator), `Incorrect number of arguments to @NgModule decorator`);
4388
3988
  }
4389
- const meta = decorator.args.length === 1 ? unwrapExpression(decorator.args[0]) : ts20.createObjectLiteral([]);
4390
- if (!ts20.isObjectLiteralExpression(meta)) {
3989
+ const meta = decorator.args.length === 1 ? unwrapExpression(decorator.args[0]) : ts17.createObjectLiteral([]);
3990
+ if (!ts17.isObjectLiteralExpression(meta)) {
4391
3991
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, "@NgModule argument must be an object literal");
4392
3992
  }
4393
3993
  const ngModule = reflectObjectLiteral(meta);
@@ -4678,10 +4278,10 @@ var NgModuleDecoratorHandler = class {
4678
4278
  return type && (this._reflectModuleFromTypeParam(type, node) || this._reflectModuleFromLiteralType(type));
4679
4279
  }
4680
4280
  _reflectModuleFromTypeParam(type, node) {
4681
- if (!ts20.isTypeReferenceNode(type)) {
4281
+ if (!ts17.isTypeReferenceNode(type)) {
4682
4282
  return null;
4683
4283
  }
4684
- const typeName = type && (ts20.isIdentifier(type.typeName) && type.typeName || ts20.isQualifiedName(type.typeName) && type.typeName.right) || null;
4284
+ const typeName = type && (ts17.isIdentifier(type.typeName) && type.typeName || ts17.isQualifiedName(type.typeName) && type.typeName.right) || null;
4685
4285
  if (typeName === null) {
4686
4286
  return null;
4687
4287
  }
@@ -4693,7 +4293,7 @@ var NgModuleDecoratorHandler = class {
4693
4293
  return null;
4694
4294
  }
4695
4295
  if (type.typeArguments === void 0 || type.typeArguments.length !== 1) {
4696
- const parent = ts20.isMethodDeclaration(node) && ts20.isClassDeclaration(node.parent) ? node.parent : null;
4296
+ const parent = ts17.isMethodDeclaration(node) && ts17.isClassDeclaration(node.parent) ? node.parent : null;
4697
4297
  const symbolName = (parent && parent.name ? parent.name.getText() + "." : "") + (node.name ? node.name.getText() : "anonymous");
4698
4298
  throw new FatalDiagnosticError(ErrorCode.NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC, type, `${symbolName} returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.`);
4699
4299
  }
@@ -4701,13 +4301,13 @@ var NgModuleDecoratorHandler = class {
4701
4301
  return typeNodeToValueExpr(arg);
4702
4302
  }
4703
4303
  _reflectModuleFromLiteralType(type) {
4704
- if (!ts20.isIntersectionTypeNode(type)) {
4304
+ if (!ts17.isIntersectionTypeNode(type)) {
4705
4305
  return null;
4706
4306
  }
4707
4307
  for (const t of type.types) {
4708
- if (ts20.isTypeLiteralNode(t)) {
4308
+ if (ts17.isTypeLiteralNode(t)) {
4709
4309
  for (const m of t.members) {
4710
- const ngModuleType = ts20.isPropertySignature(m) && ts20.isIdentifier(m.name) && m.name.text === "ngModule" && m.type || null;
4310
+ const ngModuleType = ts17.isPropertySignature(m) && ts17.isIdentifier(m.name) && m.name.text === "ngModule" && m.type || null;
4711
4311
  const ngModuleExpression = ngModuleType && typeNodeToValueExpr(ngModuleType);
4712
4312
  if (ngModuleExpression) {
4713
4313
  return ngModuleExpression;
@@ -5074,7 +4674,7 @@ var ComponentDecoratorHandler = class {
5074
4674
  });
5075
4675
  }
5076
4676
  typeCheck(ctx, node, meta) {
5077
- if (this.typeCheckScopeRegistry === null || !ts21.isClassDeclaration(node)) {
4677
+ if (this.typeCheckScopeRegistry === null || !ts18.isClassDeclaration(node)) {
5078
4678
  return;
5079
4679
  }
5080
4680
  if (meta.isPoisoned && !this.usePoisonedData) {
@@ -5285,17 +4885,17 @@ var ComponentDecoratorHandler = class {
5285
4885
  const metadata = new Map(component);
5286
4886
  if (metadata.has("templateUrl")) {
5287
4887
  metadata.delete("templateUrl");
5288
- metadata.set("template", ts21.createStringLiteral(template.content));
4888
+ metadata.set("template", ts18.createStringLiteral(template.content));
5289
4889
  }
5290
4890
  if (metadata.has("styleUrls")) {
5291
4891
  metadata.delete("styleUrls");
5292
- metadata.set("styles", ts21.createArrayLiteral(styles.map((s) => ts21.createStringLiteral(s))));
4892
+ metadata.set("styles", ts18.createArrayLiteral(styles.map((s) => ts18.createStringLiteral(s))));
5293
4893
  }
5294
4894
  const newMetadataFields = [];
5295
4895
  for (const [name, value] of metadata.entries()) {
5296
- newMetadataFields.push(ts21.createPropertyAssignment(name, value));
4896
+ newMetadataFields.push(ts18.createPropertyAssignment(name, value));
5297
4897
  }
5298
- return __spreadProps(__spreadValues({}, dec), { args: [ts21.createObjectLiteral(newMetadataFields)] });
4898
+ return __spreadProps(__spreadValues({}, dec), { args: [ts18.createObjectLiteral(newMetadataFields)] });
5299
4899
  }
5300
4900
  _resolveLiteral(decorator) {
5301
4901
  if (this.literalCache.has(decorator)) {
@@ -5305,7 +4905,7 @@ var ComponentDecoratorHandler = class {
5305
4905
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, Decorator.nodeForError(decorator), `Incorrect number of arguments to @Component decorator`);
5306
4906
  }
5307
4907
  const meta = unwrapExpression(decorator.args[0]);
5308
- if (!ts21.isObjectLiteralExpression(meta)) {
4908
+ if (!ts18.isObjectLiteralExpression(meta)) {
5309
4909
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, `Decorator argument must be literal.`);
5310
4910
  }
5311
4911
  this.literalCache.set(decorator, meta);
@@ -5332,9 +4932,9 @@ var ComponentDecoratorHandler = class {
5332
4932
  }
5333
4933
  _extractStyleUrlsFromExpression(styleUrlsExpr) {
5334
4934
  const styleUrls = [];
5335
- if (ts21.isArrayLiteralExpression(styleUrlsExpr)) {
4935
+ if (ts18.isArrayLiteralExpression(styleUrlsExpr)) {
5336
4936
  for (const styleUrlExpr of styleUrlsExpr.elements) {
5337
- if (ts21.isSpreadElement(styleUrlExpr)) {
4937
+ if (ts18.isSpreadElement(styleUrlExpr)) {
5338
4938
  styleUrls.push(...this._extractStyleUrlsFromExpression(styleUrlExpr.expression));
5339
4939
  } else {
5340
4940
  const styleUrl = this.evaluator.evaluate(styleUrlExpr);
@@ -5366,10 +4966,10 @@ var ComponentDecoratorHandler = class {
5366
4966
  _extractStyleResources(component, containingFile) {
5367
4967
  const styles = /* @__PURE__ */ new Set();
5368
4968
  function stringLiteralElements(array) {
5369
- return array.elements.filter((e) => ts21.isStringLiteralLike(e));
4969
+ return array.elements.filter((e) => ts18.isStringLiteralLike(e));
5370
4970
  }
5371
4971
  const styleUrlsExpr = component.get("styleUrls");
5372
- if (styleUrlsExpr !== void 0 && ts21.isArrayLiteralExpression(styleUrlsExpr)) {
4972
+ if (styleUrlsExpr !== void 0 && ts18.isArrayLiteralExpression(styleUrlsExpr)) {
5373
4973
  for (const expression of stringLiteralElements(styleUrlsExpr)) {
5374
4974
  try {
5375
4975
  const resourceUrl = this.resourceLoader.resolve(expression.text, containingFile);
@@ -5379,7 +4979,7 @@ var ComponentDecoratorHandler = class {
5379
4979
  }
5380
4980
  }
5381
4981
  const stylesExpr = component.get("styles");
5382
- if (stylesExpr !== void 0 && ts21.isArrayLiteralExpression(stylesExpr)) {
4982
+ if (stylesExpr !== void 0 && ts18.isArrayLiteralExpression(stylesExpr)) {
5383
4983
  for (const expression of stringLiteralElements(stylesExpr)) {
5384
4984
  styles.add({ path: null, expression });
5385
4985
  }
@@ -5424,7 +5024,7 @@ var ComponentDecoratorHandler = class {
5424
5024
  let sourceMapping;
5425
5025
  let escapedString = false;
5426
5026
  let sourceMapUrl;
5427
- if (ts21.isStringLiteral(template.expression) || ts21.isNoSubstitutionTemplateLiteral(template.expression)) {
5027
+ if (ts18.isStringLiteral(template.expression) || ts18.isNoSubstitutionTemplateLiteral(template.expression)) {
5428
5028
  sourceParseRange = getTemplateRange(template.expression);
5429
5029
  sourceStr = template.expression.getSourceFile().text;
5430
5030
  templateContent = template.expression.text;
@@ -5598,7 +5198,7 @@ var ComponentDecoratorHandler = class {
5598
5198
  };
5599
5199
  function getTemplateRange(templateExpr) {
5600
5200
  const startPos = templateExpr.getStart() + 1;
5601
- const { line, character } = ts21.getLineAndCharacterOfPosition(templateExpr.getSourceFile(), startPos);
5201
+ const { line, character } = ts18.getLineAndCharacterOfPosition(templateExpr.getSourceFile(), startPos);
5602
5202
  return {
5603
5203
  startPos,
5604
5204
  startLine: line,
@@ -5657,7 +5257,7 @@ function collectAnimationNames(value, animationTriggerNames) {
5657
5257
 
5658
5258
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/injectable.mjs
5659
5259
  import { compileClassMetadata as compileClassMetadata4, compileDeclareClassMetadata as compileDeclareClassMetadata4, compileDeclareInjectableFromMetadata, compileInjectable, createMayBeForwardRefExpression as createMayBeForwardRefExpression2, FactoryTarget as FactoryTarget4, LiteralExpr as LiteralExpr3, WrappedNodeExpr as WrappedNodeExpr6 } from "@angular/compiler";
5660
- import ts22 from "typescript";
5260
+ import ts19 from "typescript";
5661
5261
  var InjectableDecoratorHandler = class {
5662
5262
  constructor(reflector, isCore, strictCtorDeps, injectableRegistry, perf, errorOnDuplicateProv = true) {
5663
5263
  this.reflector = reflector;
@@ -5748,7 +5348,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
5748
5348
  };
5749
5349
  } else if (decorator.args.length === 1) {
5750
5350
  const metaNode = decorator.args[0];
5751
- if (!ts22.isObjectLiteralExpression(metaNode)) {
5351
+ if (!ts19.isObjectLiteralExpression(metaNode)) {
5752
5352
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, metaNode, `@Injectable argument must be an object literal`);
5753
5353
  }
5754
5354
  const meta = reflectObjectLiteral(metaNode);
@@ -5756,7 +5356,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
5756
5356
  let deps = void 0;
5757
5357
  if ((meta.has("useClass") || meta.has("useFactory")) && meta.has("deps")) {
5758
5358
  const depsExpr = meta.get("deps");
5759
- if (!ts22.isArrayLiteralExpression(depsExpr)) {
5359
+ if (!ts19.isArrayLiteralExpression(depsExpr)) {
5760
5360
  throw new FatalDiagnosticError(ErrorCode.VALUE_NOT_LITERAL, depsExpr, `@Injectable deps metadata must be an inline array`);
5761
5361
  }
5762
5362
  deps = depsExpr.elements.map((dep) => getDep(dep, reflector));
@@ -5838,12 +5438,12 @@ function getDep(dep, reflector) {
5838
5438
  }
5839
5439
  return true;
5840
5440
  }
5841
- if (ts22.isArrayLiteralExpression(dep)) {
5441
+ if (ts19.isArrayLiteralExpression(dep)) {
5842
5442
  dep.elements.forEach((el) => {
5843
5443
  let isDecorator = false;
5844
- if (ts22.isIdentifier(el)) {
5444
+ if (ts19.isIdentifier(el)) {
5845
5445
  isDecorator = maybeUpdateDecorator(el, reflector);
5846
- } else if (ts22.isNewExpression(el) && ts22.isIdentifier(el.expression)) {
5446
+ } else if (ts19.isNewExpression(el) && ts19.isIdentifier(el.expression)) {
5847
5447
  const token = el.arguments && el.arguments.length > 0 && el.arguments[0] || void 0;
5848
5448
  isDecorator = maybeUpdateDecorator(el.expression, reflector, token);
5849
5449
  }
@@ -5857,7 +5457,7 @@ function getDep(dep, reflector) {
5857
5457
 
5858
5458
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/pipe.mjs
5859
5459
  import { compileClassMetadata as compileClassMetadata5, compileDeclareClassMetadata as compileDeclareClassMetadata5, compileDeclarePipeFromMetadata, compilePipeFromMetadata, FactoryTarget as FactoryTarget5, WrappedNodeExpr as WrappedNodeExpr7 } from "@angular/compiler";
5860
- import ts23 from "typescript";
5460
+ import ts20 from "typescript";
5861
5461
  var PipeSymbol = class extends SemanticSymbol {
5862
5462
  constructor(decl, name) {
5863
5463
  super(decl);
@@ -5912,7 +5512,7 @@ var PipeDecoratorHandler = class {
5912
5512
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, Decorator.nodeForError(decorator), "@Pipe must have exactly one argument");
5913
5513
  }
5914
5514
  const meta = unwrapExpression(decorator.args[0]);
5915
- if (!ts23.isObjectLiteralExpression(meta)) {
5515
+ if (!ts20.isObjectLiteralExpression(meta)) {
5916
5516
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, "@Pipe must have a literal argument");
5917
5517
  }
5918
5518
  const pipe = reflectObjectLiteral(meta);
@@ -6001,15 +5601,6 @@ export {
6001
5601
  CompilationMode,
6002
5602
  HandlerFlags,
6003
5603
  aliasTransformFactory,
6004
- isShim,
6005
- copyFileShimData,
6006
- untagAllTsFiles,
6007
- retagAllTsFiles,
6008
- ShimAdapter,
6009
- FactoryGenerator,
6010
- generatedFactoryTransform,
6011
- ShimReferenceTagger,
6012
- SummaryGenerator,
6013
5604
  TraitState,
6014
5605
  TraitCompiler,
6015
5606
  DtsTransformRegistry,
@@ -6031,5 +5622,4 @@ export {
6031
5622
  * Use of this source code is governed by an MIT-style license that can be
6032
5623
  * found in the LICENSE file at https://angular.io/license
6033
5624
  */
6034
- // Closure Compiler ignores @suppress and similar if the comment contains @license.
6035
- //# sourceMappingURL=chunk-MSOUQGBK.js.map
5625
+ //# sourceMappingURL=chunk-KAJ5EOEG.js.map