@angular/compiler-cli 13.2.0-next.2 → 14.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,6 +27,8 @@ import {
27
27
  getSourceFile,
28
28
  identifierOfNode,
29
29
  isDeclaration,
30
+ isDtsPath,
31
+ isNonDeclarationTsPath,
30
32
  makeDiagnostic,
31
33
  makeRelatedInformation,
32
34
  nodeDebugInfo,
@@ -37,6 +39,7 @@ import {
37
39
  import {
38
40
  absoluteFrom,
39
41
  absoluteFromSourceFile,
42
+ basename,
40
43
  relative
41
44
  } from "./chunk-676MI6WZ.js";
42
45
  import {
@@ -1414,7 +1417,7 @@ function toFactoryMetadata(meta, target) {
1414
1417
 
1415
1418
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/component.mjs
1416
1419
  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";
1417
- import ts18 from "typescript";
1420
+ import ts21 from "typescript";
1418
1421
 
1419
1422
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
1420
1423
  import ts4 from "typescript";
@@ -2220,8 +2223,406 @@ function aliasTransformFactory(exportStatements) {
2220
2223
  }
2221
2224
 
2222
2225
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
2226
+ import ts12 from "typescript";
2227
+
2228
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
2223
2229
  import ts9 from "typescript";
2224
2230
 
2231
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/expando.mjs
2232
+ var NgExtension = Symbol("NgExtension");
2233
+ function isExtended(sf) {
2234
+ return sf[NgExtension] !== void 0;
2235
+ }
2236
+ function sfExtensionData(sf) {
2237
+ const extSf = sf;
2238
+ if (extSf[NgExtension] !== void 0) {
2239
+ return extSf[NgExtension];
2240
+ }
2241
+ const extension = {
2242
+ isTopLevelShim: false,
2243
+ fileShim: null,
2244
+ originalReferencedFiles: null,
2245
+ taggedReferenceFiles: null
2246
+ };
2247
+ extSf[NgExtension] = extension;
2248
+ return extension;
2249
+ }
2250
+ function isFileShimSourceFile(sf) {
2251
+ return isExtended(sf) && sf[NgExtension].fileShim !== null;
2252
+ }
2253
+ function isShim(sf) {
2254
+ return isExtended(sf) && (sf[NgExtension].fileShim !== null || sf[NgExtension].isTopLevelShim);
2255
+ }
2256
+ function copyFileShimData(from, to) {
2257
+ if (!isFileShimSourceFile(from)) {
2258
+ return;
2259
+ }
2260
+ sfExtensionData(to).fileShim = sfExtensionData(from).fileShim;
2261
+ }
2262
+ function untagAllTsFiles(program) {
2263
+ for (const sf of program.getSourceFiles()) {
2264
+ untagTsFile(sf);
2265
+ }
2266
+ }
2267
+ function retagAllTsFiles(program) {
2268
+ for (const sf of program.getSourceFiles()) {
2269
+ retagTsFile(sf);
2270
+ }
2271
+ }
2272
+ function untagTsFile(sf) {
2273
+ if (sf.isDeclarationFile || !isExtended(sf)) {
2274
+ return;
2275
+ }
2276
+ const ext = sfExtensionData(sf);
2277
+ if (ext.originalReferencedFiles !== null) {
2278
+ sf.referencedFiles = ext.originalReferencedFiles;
2279
+ }
2280
+ }
2281
+ function retagTsFile(sf) {
2282
+ if (sf.isDeclarationFile || !isExtended(sf)) {
2283
+ return;
2284
+ }
2285
+ const ext = sfExtensionData(sf);
2286
+ if (ext.taggedReferenceFiles !== null) {
2287
+ sf.referencedFiles = ext.taggedReferenceFiles;
2288
+ }
2289
+ }
2290
+
2291
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/util.mjs
2292
+ var TS_EXTENSIONS = /\.tsx?$/i;
2293
+ function makeShimFileName(fileName, suffix) {
2294
+ return absoluteFrom(fileName.replace(TS_EXTENSIONS, suffix));
2295
+ }
2296
+ function generatedModuleName(originalModuleName, originalFileName, genSuffix) {
2297
+ let moduleName;
2298
+ if (originalFileName.endsWith("/index.ts")) {
2299
+ moduleName = originalModuleName + "/index" + genSuffix;
2300
+ } else {
2301
+ moduleName = originalModuleName + genSuffix;
2302
+ }
2303
+ return moduleName;
2304
+ }
2305
+
2306
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
2307
+ var ShimAdapter = class {
2308
+ constructor(delegate, tsRootFiles, topLevelGenerators, perFileGenerators, oldProgram) {
2309
+ this.delegate = delegate;
2310
+ this.shims = /* @__PURE__ */ new Map();
2311
+ this.priorShims = /* @__PURE__ */ new Map();
2312
+ this.notShims = /* @__PURE__ */ new Set();
2313
+ this.generators = [];
2314
+ this.ignoreForEmit = /* @__PURE__ */ new Set();
2315
+ this.extensionPrefixes = [];
2316
+ for (const gen of perFileGenerators) {
2317
+ const pattern = `^(.*)\\.${gen.extensionPrefix}\\.ts$`;
2318
+ const regexp = new RegExp(pattern, "i");
2319
+ this.generators.push({
2320
+ generator: gen,
2321
+ test: regexp,
2322
+ suffix: `.${gen.extensionPrefix}.ts`
2323
+ });
2324
+ this.extensionPrefixes.push(gen.extensionPrefix);
2325
+ }
2326
+ const extraInputFiles = [];
2327
+ for (const gen of topLevelGenerators) {
2328
+ const sf = gen.makeTopLevelShim();
2329
+ sfExtensionData(sf).isTopLevelShim = true;
2330
+ if (!gen.shouldEmit) {
2331
+ this.ignoreForEmit.add(sf);
2332
+ }
2333
+ const fileName = absoluteFromSourceFile(sf);
2334
+ this.shims.set(fileName, sf);
2335
+ extraInputFiles.push(fileName);
2336
+ }
2337
+ for (const rootFile of tsRootFiles) {
2338
+ for (const gen of this.generators) {
2339
+ extraInputFiles.push(makeShimFileName(rootFile, gen.suffix));
2340
+ }
2341
+ }
2342
+ this.extraInputFiles = extraInputFiles;
2343
+ if (oldProgram !== null) {
2344
+ for (const oldSf of oldProgram.getSourceFiles()) {
2345
+ if (oldSf.isDeclarationFile || !isFileShimSourceFile(oldSf)) {
2346
+ continue;
2347
+ }
2348
+ this.priorShims.set(absoluteFromSourceFile(oldSf), oldSf);
2349
+ }
2350
+ }
2351
+ }
2352
+ maybeGenerate(fileName) {
2353
+ if (this.notShims.has(fileName)) {
2354
+ return null;
2355
+ } else if (this.shims.has(fileName)) {
2356
+ return this.shims.get(fileName);
2357
+ }
2358
+ if (isDtsPath(fileName)) {
2359
+ this.notShims.add(fileName);
2360
+ return null;
2361
+ }
2362
+ for (const record of this.generators) {
2363
+ const match = record.test.exec(fileName);
2364
+ if (match === null) {
2365
+ continue;
2366
+ }
2367
+ const prefix = match[1];
2368
+ let baseFileName = absoluteFrom(prefix + ".ts");
2369
+ if (!this.delegate.fileExists(baseFileName)) {
2370
+ baseFileName = absoluteFrom(prefix + ".tsx");
2371
+ if (!this.delegate.fileExists(baseFileName)) {
2372
+ return void 0;
2373
+ }
2374
+ }
2375
+ const inputFile = this.delegate.getSourceFile(baseFileName, ts9.ScriptTarget.Latest);
2376
+ if (inputFile === void 0 || isShim(inputFile)) {
2377
+ return void 0;
2378
+ }
2379
+ return this.generateSpecific(fileName, record.generator, inputFile);
2380
+ }
2381
+ this.notShims.add(fileName);
2382
+ return null;
2383
+ }
2384
+ generateSpecific(fileName, generator, inputFile) {
2385
+ let priorShimSf = null;
2386
+ if (this.priorShims.has(fileName)) {
2387
+ priorShimSf = this.priorShims.get(fileName);
2388
+ this.priorShims.delete(fileName);
2389
+ }
2390
+ const shimSf = generator.generateShimForFile(inputFile, fileName, priorShimSf);
2391
+ sfExtensionData(shimSf).fileShim = {
2392
+ extension: generator.extensionPrefix,
2393
+ generatedFrom: absoluteFromSourceFile(inputFile)
2394
+ };
2395
+ if (!generator.shouldEmit) {
2396
+ this.ignoreForEmit.add(shimSf);
2397
+ }
2398
+ this.shims.set(fileName, shimSf);
2399
+ return shimSf;
2400
+ }
2401
+ };
2402
+
2403
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/factory_generator.mjs
2404
+ import ts10 from "typescript";
2405
+ var TS_DTS_SUFFIX = /(\.d)?\.ts$/;
2406
+ var STRIP_NG_FACTORY = /(.*)NgFactory$/;
2407
+ var FactoryGenerator = class {
2408
+ constructor() {
2409
+ this.sourceInfo = /* @__PURE__ */ new Map();
2410
+ this.sourceToFactorySymbols = /* @__PURE__ */ new Map();
2411
+ this.shouldEmit = true;
2412
+ this.extensionPrefix = "ngfactory";
2413
+ }
2414
+ generateShimForFile(sf, genFilePath) {
2415
+ const absoluteSfPath = absoluteFromSourceFile(sf);
2416
+ const relativePathToSource = "./" + basename(sf.fileName).replace(TS_DTS_SUFFIX, "");
2417
+ const symbolNames = sf.statements.filter(ts10.isClassDeclaration).filter((decl) => isExported(decl) && decl.decorators !== void 0 && decl.name !== void 0).map((decl) => decl.name.text);
2418
+ let sourceText = "";
2419
+ const leadingComment = getFileoverviewComment(sf);
2420
+ if (leadingComment !== null) {
2421
+ sourceText = leadingComment + "\n\n";
2422
+ }
2423
+ if (symbolNames.length > 0) {
2424
+ const varLines = symbolNames.map((name) => `export const ${name}NgFactory: i0.\u0275NgModuleFactory<any> = new i0.\u0275NgModuleFactory(${name});`);
2425
+ sourceText += [
2426
+ `import * as i0 from '@angular/core';`,
2427
+ `import {${symbolNames.join(", ")}} from '${relativePathToSource}';`,
2428
+ ...varLines
2429
+ ].join("\n");
2430
+ }
2431
+ sourceText += "\nexport const \u0275NonEmptyModule = true;";
2432
+ const genFile = ts10.createSourceFile(genFilePath, sourceText, sf.languageVersion, true, ts10.ScriptKind.TS);
2433
+ if (sf.moduleName !== void 0) {
2434
+ genFile.moduleName = generatedModuleName(sf.moduleName, sf.fileName, ".ngfactory");
2435
+ }
2436
+ const moduleSymbols = /* @__PURE__ */ new Map();
2437
+ this.sourceToFactorySymbols.set(absoluteSfPath, moduleSymbols);
2438
+ this.sourceInfo.set(genFilePath, {
2439
+ sourceFilePath: absoluteSfPath,
2440
+ moduleSymbols
2441
+ });
2442
+ return genFile;
2443
+ }
2444
+ track(sf, moduleInfo) {
2445
+ if (this.sourceToFactorySymbols.has(sf.fileName)) {
2446
+ this.sourceToFactorySymbols.get(sf.fileName).set(moduleInfo.name, moduleInfo);
2447
+ }
2448
+ }
2449
+ };
2450
+ function isExported(decl) {
2451
+ return decl.modifiers !== void 0 && decl.modifiers.some((mod) => mod.kind == ts10.SyntaxKind.ExportKeyword);
2452
+ }
2453
+ function generatedFactoryTransform(factoryMap, importRewriter) {
2454
+ return (context) => {
2455
+ return (file) => {
2456
+ return transformFactorySourceFile(factoryMap, context, importRewriter, file);
2457
+ };
2458
+ };
2459
+ }
2460
+ function transformFactorySourceFile(factoryMap, context, importRewriter, file) {
2461
+ if (!factoryMap.has(file.fileName)) {
2462
+ return file;
2463
+ }
2464
+ const { moduleSymbols, sourceFilePath } = factoryMap.get(file.fileName);
2465
+ const transformedStatements = [];
2466
+ let nonEmptyExport = null;
2467
+ const coreImportIdentifiers = /* @__PURE__ */ new Set();
2468
+ for (const stmt of file.statements) {
2469
+ if (ts10.isImportDeclaration(stmt) && ts10.isStringLiteral(stmt.moduleSpecifier) && stmt.moduleSpecifier.text === "@angular/core") {
2470
+ const rewrittenModuleSpecifier = importRewriter.rewriteSpecifier("@angular/core", sourceFilePath);
2471
+ if (rewrittenModuleSpecifier !== stmt.moduleSpecifier.text) {
2472
+ transformedStatements.push(ts10.updateImportDeclaration(stmt, stmt.decorators, stmt.modifiers, stmt.importClause, ts10.createStringLiteral(rewrittenModuleSpecifier), void 0));
2473
+ if (stmt.importClause !== void 0 && stmt.importClause.namedBindings !== void 0 && ts10.isNamespaceImport(stmt.importClause.namedBindings)) {
2474
+ coreImportIdentifiers.add(stmt.importClause.namedBindings.name.text);
2475
+ }
2476
+ } else {
2477
+ transformedStatements.push(stmt);
2478
+ }
2479
+ } else if (ts10.isVariableStatement(stmt) && stmt.declarationList.declarations.length === 1) {
2480
+ const decl = stmt.declarationList.declarations[0];
2481
+ if (ts10.isIdentifier(decl.name)) {
2482
+ if (decl.name.text === "\u0275NonEmptyModule") {
2483
+ nonEmptyExport = stmt;
2484
+ continue;
2485
+ }
2486
+ const match = STRIP_NG_FACTORY.exec(decl.name.text);
2487
+ const module = match ? moduleSymbols.get(match[1]) : null;
2488
+ if (module) {
2489
+ const moduleIsTreeShakable = !module.hasId;
2490
+ const newStmt = !moduleIsTreeShakable ? stmt : updateInitializers(stmt, (init) => init ? wrapInNoSideEffects(init) : void 0);
2491
+ transformedStatements.push(newStmt);
2492
+ }
2493
+ } else {
2494
+ transformedStatements.push(stmt);
2495
+ }
2496
+ } else {
2497
+ transformedStatements.push(stmt);
2498
+ }
2499
+ }
2500
+ if (!transformedStatements.some(ts10.isVariableStatement) && nonEmptyExport !== null) {
2501
+ transformedStatements.push(nonEmptyExport);
2502
+ }
2503
+ file = ts10.updateSourceFileNode(file, transformedStatements);
2504
+ if (coreImportIdentifiers.size > 0) {
2505
+ const visit2 = (node) => {
2506
+ node = ts10.visitEachChild(node, (child) => visit2(child), context);
2507
+ if (ts10.isPropertyAccessExpression(node) && ts10.isIdentifier(node.expression) && coreImportIdentifiers.has(node.expression.text)) {
2508
+ const rewrittenSymbol = importRewriter.rewriteSymbol(node.name.text, "@angular/core");
2509
+ if (rewrittenSymbol !== node.name.text) {
2510
+ const updated = ts10.updatePropertyAccess(node, node.expression, ts10.createIdentifier(rewrittenSymbol));
2511
+ node = updated;
2512
+ }
2513
+ }
2514
+ return node;
2515
+ };
2516
+ file = visit2(file);
2517
+ }
2518
+ return file;
2519
+ }
2520
+ function getFileoverviewComment(sourceFile) {
2521
+ const text = sourceFile.getFullText();
2522
+ const trivia = text.substring(0, sourceFile.getStart());
2523
+ const leadingComments = ts10.getLeadingCommentRanges(trivia, 0);
2524
+ if (!leadingComments || leadingComments.length === 0) {
2525
+ return null;
2526
+ }
2527
+ const comment = leadingComments[0];
2528
+ if (comment.kind !== ts10.SyntaxKind.MultiLineCommentTrivia) {
2529
+ return null;
2530
+ }
2531
+ if (text.substring(comment.end, comment.end + 2) !== "\n\n") {
2532
+ return null;
2533
+ }
2534
+ const commentText = text.substring(comment.pos, comment.end);
2535
+ if (commentText.indexOf("@license") !== -1) {
2536
+ return null;
2537
+ }
2538
+ return commentText;
2539
+ }
2540
+ function wrapInNoSideEffects(expr) {
2541
+ const noSideEffects = ts10.createPropertyAccess(ts10.createIdentifier("i0"), "\u0275noSideEffects");
2542
+ return ts10.createCall(noSideEffects, [], [
2543
+ ts10.createFunctionExpression([], void 0, void 0, [], [], void 0, ts10.createBlock([
2544
+ ts10.createReturn(expr)
2545
+ ]))
2546
+ ]);
2547
+ }
2548
+ function updateInitializers(stmt, update) {
2549
+ 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)))));
2550
+ }
2551
+
2552
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/reference_tagger.mjs
2553
+ var ShimReferenceTagger = class {
2554
+ constructor(shimExtensions) {
2555
+ this.tagged = /* @__PURE__ */ new Set();
2556
+ this.enabled = true;
2557
+ this.suffixes = shimExtensions.map((extension) => `.${extension}.ts`);
2558
+ }
2559
+ tag(sf) {
2560
+ if (!this.enabled || sf.isDeclarationFile || isShim(sf) || this.tagged.has(sf) || !isNonDeclarationTsPath(sf.fileName)) {
2561
+ return;
2562
+ }
2563
+ const ext = sfExtensionData(sf);
2564
+ if (ext.originalReferencedFiles === null) {
2565
+ ext.originalReferencedFiles = sf.referencedFiles;
2566
+ }
2567
+ const referencedFiles = [...ext.originalReferencedFiles];
2568
+ const sfPath = absoluteFromSourceFile(sf);
2569
+ for (const suffix of this.suffixes) {
2570
+ referencedFiles.push({
2571
+ fileName: makeShimFileName(sfPath, suffix),
2572
+ pos: 0,
2573
+ end: 0
2574
+ });
2575
+ }
2576
+ ext.taggedReferenceFiles = referencedFiles;
2577
+ sf.referencedFiles = referencedFiles;
2578
+ this.tagged.add(sf);
2579
+ }
2580
+ finalize() {
2581
+ this.enabled = false;
2582
+ this.tagged.clear();
2583
+ }
2584
+ };
2585
+
2586
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/summary_generator.mjs
2587
+ import ts11 from "typescript";
2588
+ var SummaryGenerator = class {
2589
+ constructor() {
2590
+ this.shouldEmit = true;
2591
+ this.extensionPrefix = "ngsummary";
2592
+ }
2593
+ generateShimForFile(sf, genFilePath) {
2594
+ const symbolNames = [];
2595
+ for (const stmt of sf.statements) {
2596
+ if (ts11.isClassDeclaration(stmt)) {
2597
+ if (!isExported2(stmt) || stmt.decorators === void 0 || stmt.name === void 0) {
2598
+ continue;
2599
+ }
2600
+ symbolNames.push(stmt.name.text);
2601
+ } else if (ts11.isExportDeclaration(stmt)) {
2602
+ if (stmt.exportClause === void 0 || stmt.moduleSpecifier !== void 0 || !ts11.isNamedExports(stmt.exportClause)) {
2603
+ continue;
2604
+ }
2605
+ for (const specifier of stmt.exportClause.elements) {
2606
+ symbolNames.push(specifier.name.text);
2607
+ }
2608
+ }
2609
+ }
2610
+ const varLines = symbolNames.map((name) => `export const ${name}NgSummary: any = null;`);
2611
+ if (varLines.length === 0) {
2612
+ varLines.push(`export const \u0275empty = null;`);
2613
+ }
2614
+ const sourceText = varLines.join("\n");
2615
+ const genFile = ts11.createSourceFile(genFilePath, sourceText, sf.languageVersion, true, ts11.ScriptKind.TS);
2616
+ if (sf.moduleName !== void 0) {
2617
+ genFile.moduleName = generatedModuleName(sf.moduleName, sf.fileName, ".ngsummary");
2618
+ }
2619
+ return genFile;
2620
+ }
2621
+ };
2622
+ function isExported2(decl) {
2623
+ return decl.modifiers !== void 0 && decl.modifiers.some((mod) => mod.kind == ts11.SyntaxKind.ExportKeyword);
2624
+ }
2625
+
2225
2626
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/trait.mjs
2226
2627
  var TraitState;
2227
2628
  (function(TraitState2) {
@@ -2304,7 +2705,7 @@ var TraitCompiler = class {
2304
2705
  return this.analyze(sf, true);
2305
2706
  }
2306
2707
  analyze(sf, preanalyze) {
2307
- if (sf.isDeclarationFile) {
2708
+ if (sf.isDeclarationFile || isShim(sf)) {
2308
2709
  return void 0;
2309
2710
  }
2310
2711
  const promises = [];
@@ -2325,9 +2726,12 @@ var TraitCompiler = class {
2325
2726
  if (this.reflector.isClass(node)) {
2326
2727
  this.analyzeClass(node, preanalyze ? promises : null);
2327
2728
  }
2328
- ts9.forEachChild(node, visit2);
2729
+ ts12.forEachChild(node, visit2);
2329
2730
  };
2330
2731
  visit2(sf);
2732
+ if (!this.fileToClasses.has(sf)) {
2733
+ this.filesWithoutTraits.add(sf);
2734
+ }
2331
2735
  if (preanalyze && promises.length > 0) {
2332
2736
  return Promise.all(promises).then(() => void 0);
2333
2737
  } else {
@@ -2436,7 +2840,7 @@ var TraitCompiler = class {
2436
2840
  }
2437
2841
  if (isPrimaryHandler && record.hasPrimaryHandler) {
2438
2842
  record.metaDiagnostics = [{
2439
- category: ts9.DiagnosticCategory.Error,
2843
+ category: ts12.DiagnosticCategory.Error,
2440
2844
  code: Number("-99" + ErrorCode.DECORATOR_COLLISION),
2441
2845
  file: getSourceFile(clazz),
2442
2846
  start: clazz.getStart(void 0, false),
@@ -2644,7 +3048,7 @@ var TraitCompiler = class {
2644
3048
  }
2645
3049
  }
2646
3050
  compile(clazz, constantPool) {
2647
- const original = ts9.getOriginalNode(clazz);
3051
+ const original = ts12.getOriginalNode(clazz);
2648
3052
  if (!this.reflector.isClass(clazz) || !this.reflector.isClass(original) || !this.classes.has(original)) {
2649
3053
  return null;
2650
3054
  }
@@ -2675,7 +3079,7 @@ var TraitCompiler = class {
2675
3079
  return res.length > 0 ? res : null;
2676
3080
  }
2677
3081
  decoratorsFor(node) {
2678
- const original = ts9.getOriginalNode(node);
3082
+ const original = ts12.getOriginalNode(node);
2679
3083
  if (!this.reflector.isClass(original) || !this.classes.has(original)) {
2680
3084
  return [];
2681
3085
  }
@@ -2685,7 +3089,7 @@ var TraitCompiler = class {
2685
3089
  if (trait.state !== TraitState.Resolved) {
2686
3090
  continue;
2687
3091
  }
2688
- if (trait.detected.trigger !== null && ts9.isDecorator(trait.detected.trigger)) {
3092
+ if (trait.detected.trigger !== null && ts12.isDecorator(trait.detected.trigger)) {
2689
3093
  decorators.push(trait.detected.trigger);
2690
3094
  }
2691
3095
  }
@@ -2715,23 +3119,23 @@ var TraitCompiler = class {
2715
3119
  };
2716
3120
 
2717
3121
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
2718
- import ts11 from "typescript";
3122
+ import ts14 from "typescript";
2719
3123
 
2720
3124
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/utils.mjs
2721
- import ts10 from "typescript";
3125
+ import ts13 from "typescript";
2722
3126
  function addImports(importManager, sf, extraStatements = []) {
2723
3127
  const addedImports = importManager.getAllImports(sf.fileName).map((i) => {
2724
- const qualifier = ts10.createIdentifier(i.qualifier.text);
2725
- const importClause = ts10.createImportClause(void 0, ts10.createNamespaceImport(qualifier));
2726
- const decl = ts10.createImportDeclaration(void 0, void 0, importClause, ts10.createLiteral(i.specifier));
2727
- ts10.setOriginalNode(i.qualifier, decl);
3128
+ const qualifier = ts13.createIdentifier(i.qualifier.text);
3129
+ const importClause = ts13.createImportClause(void 0, ts13.createNamespaceImport(qualifier));
3130
+ const decl = ts13.createImportDeclaration(void 0, void 0, importClause, ts13.createLiteral(i.specifier));
3131
+ ts13.setOriginalNode(i.qualifier, decl);
2728
3132
  return decl;
2729
3133
  });
2730
3134
  const existingImports = sf.statements.filter((stmt) => isImportStatement(stmt));
2731
3135
  const body = sf.statements.filter((stmt) => !isImportStatement(stmt));
2732
3136
  if (addedImports.length > 0) {
2733
- const fileoverviewAnchorStmt = ts10.createNotEmittedStatement(sf);
2734
- return ts10.updateSourceFileNode(sf, ts10.createNodeArray([
3137
+ const fileoverviewAnchorStmt = ts13.createNotEmittedStatement(sf);
3138
+ return ts13.updateSourceFileNode(sf, ts13.createNodeArray([
2735
3139
  fileoverviewAnchorStmt,
2736
3140
  ...existingImports,
2737
3141
  ...addedImports,
@@ -2742,7 +3146,7 @@ function addImports(importManager, sf, extraStatements = []) {
2742
3146
  return sf;
2743
3147
  }
2744
3148
  function isImportStatement(stmt) {
2745
- return ts10.isImportDeclaration(stmt) || ts10.isImportEqualsDeclaration(stmt) || ts10.isNamespaceImport(stmt);
3149
+ return ts13.isImportDeclaration(stmt) || ts13.isImportEqualsDeclaration(stmt) || ts13.isNamespaceImport(stmt);
2746
3150
  }
2747
3151
 
2748
3152
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
@@ -2760,7 +3164,7 @@ var DtsTransformRegistry = class {
2760
3164
  if (!sf.isDeclarationFile) {
2761
3165
  return null;
2762
3166
  }
2763
- const originalSf = ts11.getOriginalNode(sf);
3167
+ const originalSf = ts14.getOriginalNode(sf);
2764
3168
  let transforms = null;
2765
3169
  if (this.ivyDeclarationTransforms.has(originalSf)) {
2766
3170
  transforms = [];
@@ -2773,7 +3177,7 @@ function declarationTransformFactory(transformRegistry, importRewriter, importPr
2773
3177
  return (context) => {
2774
3178
  const transformer = new DtsTransformer(context, importRewriter, importPrefix);
2775
3179
  return (fileOrBundle) => {
2776
- if (ts11.isBundle(fileOrBundle)) {
3180
+ if (ts14.isBundle(fileOrBundle)) {
2777
3181
  return fileOrBundle;
2778
3182
  }
2779
3183
  const transforms = transformRegistry.getAllTransforms(fileOrBundle);
@@ -2793,15 +3197,15 @@ var DtsTransformer = class {
2793
3197
  transform(sf, transforms) {
2794
3198
  const imports = new ImportManager(this.importRewriter, this.importPrefix);
2795
3199
  const visitor = (node) => {
2796
- if (ts11.isClassDeclaration(node)) {
3200
+ if (ts14.isClassDeclaration(node)) {
2797
3201
  return this.transformClassDeclaration(node, transforms, imports);
2798
- } else if (ts11.isFunctionDeclaration(node)) {
3202
+ } else if (ts14.isFunctionDeclaration(node)) {
2799
3203
  return this.transformFunctionDeclaration(node, transforms, imports);
2800
3204
  } else {
2801
- return ts11.visitEachChild(node, visitor, this.ctx);
3205
+ return ts14.visitEachChild(node, visitor, this.ctx);
2802
3206
  }
2803
3207
  };
2804
- sf = ts11.visitNode(sf, visitor);
3208
+ sf = ts14.visitNode(sf, visitor);
2805
3209
  return addImports(imports, sf);
2806
3210
  }
2807
3211
  transformClassDeclaration(clazz, transforms, imports) {
@@ -2829,7 +3233,7 @@ var DtsTransformer = class {
2829
3233
  }
2830
3234
  }
2831
3235
  if (elementsChanged && clazz === newClazz) {
2832
- newClazz = ts11.updateClassDeclaration(clazz, clazz.decorators, clazz.modifiers, clazz.name, clazz.typeParameters, clazz.heritageClauses, elements);
3236
+ newClazz = ts14.updateClassDeclaration(clazz, clazz.decorators, clazz.modifiers, clazz.name, clazz.typeParameters, clazz.heritageClauses, elements);
2833
3237
  }
2834
3238
  return newClazz;
2835
3239
  }
@@ -2851,31 +3255,31 @@ var IvyDeclarationDtsTransform = class {
2851
3255
  this.declarationFields.set(decl, fields);
2852
3256
  }
2853
3257
  transformClass(clazz, members, imports) {
2854
- const original = ts11.getOriginalNode(clazz);
3258
+ const original = ts14.getOriginalNode(clazz);
2855
3259
  if (!this.declarationFields.has(original)) {
2856
3260
  return clazz;
2857
3261
  }
2858
3262
  const fields = this.declarationFields.get(original);
2859
3263
  const newMembers = fields.map((decl) => {
2860
- const modifiers = [ts11.createModifier(ts11.SyntaxKind.StaticKeyword)];
3264
+ const modifiers = [ts14.createModifier(ts14.SyntaxKind.StaticKeyword)];
2861
3265
  const typeRef = translateType(decl.type, imports);
2862
3266
  markForEmitAsSingleLine(typeRef);
2863
- return ts11.createProperty(void 0, modifiers, decl.name, void 0, typeRef, void 0);
3267
+ return ts14.createProperty(void 0, modifiers, decl.name, void 0, typeRef, void 0);
2864
3268
  });
2865
- return ts11.updateClassDeclaration(clazz, clazz.decorators, clazz.modifiers, clazz.name, clazz.typeParameters, clazz.heritageClauses, [...members, ...newMembers]);
3269
+ return ts14.updateClassDeclaration(clazz, clazz.decorators, clazz.modifiers, clazz.name, clazz.typeParameters, clazz.heritageClauses, [...members, ...newMembers]);
2866
3270
  }
2867
3271
  };
2868
3272
  function markForEmitAsSingleLine(node) {
2869
- ts11.setEmitFlags(node, ts11.EmitFlags.SingleLine);
2870
- ts11.forEachChild(node, markForEmitAsSingleLine);
3273
+ ts14.setEmitFlags(node, ts14.EmitFlags.SingleLine);
3274
+ ts14.forEachChild(node, markForEmitAsSingleLine);
2871
3275
  }
2872
3276
 
2873
3277
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
2874
3278
  import { ConstantPool } from "@angular/compiler";
2875
- import ts13 from "typescript";
3279
+ import ts16 from "typescript";
2876
3280
 
2877
3281
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/visitor.mjs
2878
- import ts12 from "typescript";
3282
+ import ts15 from "typescript";
2879
3283
  function visit(node, visitor, context) {
2880
3284
  return visitor._visit(node, context);
2881
3285
  }
@@ -2899,8 +3303,8 @@ var Visitor = class {
2899
3303
  }
2900
3304
  _visit(node, context) {
2901
3305
  let visitedNode = null;
2902
- node = ts12.visitEachChild(node, (child) => this._visit(child, context), context);
2903
- if (ts12.isClassDeclaration(node)) {
3306
+ node = ts15.visitEachChild(node, (child) => this._visit(child, context), context);
3307
+ if (ts15.isClassDeclaration(node)) {
2904
3308
  visitedNode = this._visitListEntryNode(node, (node2) => this.visitClassDeclaration(node2));
2905
3309
  } else {
2906
3310
  visitedNode = this.visitOtherNode(node);
@@ -2914,7 +3318,7 @@ var Visitor = class {
2914
3318
  if (node.statements.every((stmt) => !this._before.has(stmt) && !this._after.has(stmt))) {
2915
3319
  return node;
2916
3320
  }
2917
- const clone = ts12.getMutableClone(node);
3321
+ const clone = ts15.getMutableClone(node);
2918
3322
  const newStatements = [];
2919
3323
  clone.statements.forEach((stmt) => {
2920
3324
  if (this._before.has(stmt)) {
@@ -2927,7 +3331,7 @@ var Visitor = class {
2927
3331
  this._after.delete(stmt);
2928
3332
  }
2929
3333
  });
2930
- clone.statements = ts12.createNodeArray(newStatements, node.statements.hasTrailingComma);
3334
+ clone.statements = ts15.createNodeArray(newStatements, node.statements.hasTrailingComma);
2931
3335
  return clone;
2932
3336
  }
2933
3337
  };
@@ -2985,14 +3389,14 @@ var IvyTransformationVisitor = class extends Visitor {
2985
3389
  const members = [...node.members];
2986
3390
  for (const field of this.classCompilationMap.get(node)) {
2987
3391
  const exprNode = translateExpression(field.initializer, this.importManager, translateOptions);
2988
- const property = ts13.createProperty(void 0, [ts13.createToken(ts13.SyntaxKind.StaticKeyword)], field.name, void 0, void 0, exprNode);
3392
+ const property = ts16.createProperty(void 0, [ts16.createToken(ts16.SyntaxKind.StaticKeyword)], field.name, void 0, void 0, exprNode);
2989
3393
  if (this.isClosureCompilerEnabled) {
2990
- ts13.addSyntheticLeadingComment(property, ts13.SyntaxKind.MultiLineCommentTrivia, "* @nocollapse ", false);
3394
+ ts16.addSyntheticLeadingComment(property, ts16.SyntaxKind.MultiLineCommentTrivia, "* @nocollapse ", false);
2991
3395
  }
2992
3396
  field.statements.map((stmt) => translateStatement(stmt, this.importManager, translateOptions)).forEach((stmt) => statements.push(stmt));
2993
3397
  members.push(property);
2994
3398
  }
2995
- 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)));
3399
+ 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)));
2996
3400
  return { node, after: statements };
2997
3401
  }
2998
3402
  _angularCoreDecorators(decl) {
@@ -3021,25 +3425,25 @@ var IvyTransformationVisitor = class extends Visitor {
3021
3425
  if (filtered.length === 0) {
3022
3426
  return void 0;
3023
3427
  }
3024
- const array = ts13.createNodeArray(filtered);
3428
+ const array = ts16.createNodeArray(filtered);
3025
3429
  array.pos = node.decorators.pos;
3026
3430
  array.end = node.decorators.end;
3027
3431
  return array;
3028
3432
  }
3029
3433
  _stripAngularDecorators(node) {
3030
- if (ts13.isParameter(node)) {
3031
- node = ts13.updateParameter(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer);
3032
- } else if (ts13.isMethodDeclaration(node) && node.decorators !== void 0) {
3033
- node = ts13.updateMethod(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body);
3034
- } else if (ts13.isPropertyDeclaration(node) && node.decorators !== void 0) {
3035
- node = ts13.updateProperty(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.name, node.questionToken, node.type, node.initializer);
3036
- } else if (ts13.isGetAccessor(node)) {
3037
- node = ts13.updateGetAccessor(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.name, node.parameters, node.type, node.body);
3038
- } else if (ts13.isSetAccessor(node)) {
3039
- node = ts13.updateSetAccessor(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.name, node.parameters, node.body);
3040
- } else if (ts13.isConstructorDeclaration(node)) {
3434
+ if (ts16.isParameter(node)) {
3435
+ node = ts16.updateParameter(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer);
3436
+ } else if (ts16.isMethodDeclaration(node) && node.decorators !== void 0) {
3437
+ node = ts16.updateMethod(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body);
3438
+ } else if (ts16.isPropertyDeclaration(node) && node.decorators !== void 0) {
3439
+ node = ts16.updateProperty(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.name, node.questionToken, node.type, node.initializer);
3440
+ } else if (ts16.isGetAccessor(node)) {
3441
+ node = ts16.updateGetAccessor(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.name, node.parameters, node.type, node.body);
3442
+ } else if (ts16.isSetAccessor(node)) {
3443
+ node = ts16.updateSetAccessor(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.name, node.parameters, node.body);
3444
+ } else if (ts16.isConstructorDeclaration(node)) {
3041
3445
  const parameters = node.parameters.map((param) => this._stripAngularDecorators(param));
3042
- node = ts13.updateConstructor(node, node.decorators, node.modifiers, parameters, node.body);
3446
+ node = ts16.updateConstructor(node, node.decorators, node.modifiers, parameters, node.body);
3043
3447
  }
3044
3448
  return node;
3045
3449
  }
@@ -3051,7 +3455,7 @@ function transformIvySourceFile(compilation, context, reflector, importRewriter,
3051
3455
  visit(file, compilationVisitor, context);
3052
3456
  const transformationVisitor = new IvyTransformationVisitor(compilation, compilationVisitor.classCompilationMap, reflector, importManager, recordWrappedNode, isClosureCompilerEnabled, isCore);
3053
3457
  let sf = visit(file, transformationVisitor, context);
3054
- const downlevelTranslatedCode = getLocalizeCompileTarget(context) < ts13.ScriptTarget.ES2015;
3458
+ const downlevelTranslatedCode = getLocalizeCompileTarget(context) < ts16.ScriptTarget.ES2015;
3055
3459
  const constants = constantPool.statements.map((stmt) => translateStatement(stmt, importManager, {
3056
3460
  recordWrappedNode,
3057
3461
  downlevelTaggedTemplates: downlevelTranslatedCode,
@@ -3066,17 +3470,17 @@ function transformIvySourceFile(compilation, context, reflector, importRewriter,
3066
3470
  return sf;
3067
3471
  }
3068
3472
  function getLocalizeCompileTarget(context) {
3069
- const target = context.getCompilerOptions().target || ts13.ScriptTarget.ES2015;
3070
- return target !== ts13.ScriptTarget.JSON ? target : ts13.ScriptTarget.ES2015;
3473
+ const target = context.getCompilerOptions().target || ts16.ScriptTarget.ES2015;
3474
+ return target !== ts16.ScriptTarget.JSON ? target : ts16.ScriptTarget.ES2015;
3071
3475
  }
3072
3476
  function getFileOverviewComment(statements) {
3073
3477
  if (statements.length > 0) {
3074
3478
  const host = statements[0];
3075
3479
  let trailing = false;
3076
- let comments = ts13.getSyntheticLeadingComments(host);
3480
+ let comments = ts16.getSyntheticLeadingComments(host);
3077
3481
  if (!comments || comments.length === 0) {
3078
3482
  trailing = true;
3079
- comments = ts13.getSyntheticTrailingComments(host);
3483
+ comments = ts16.getSyntheticTrailingComments(host);
3080
3484
  }
3081
3485
  if (comments && comments.length > 0 && CLOSURE_FILE_OVERVIEW_REGEXP.test(comments[0].text)) {
3082
3486
  return { comments, host, trailing };
@@ -3088,22 +3492,22 @@ function setFileOverviewComment(sf, fileoverview) {
3088
3492
  const { comments, host, trailing } = fileoverview;
3089
3493
  if (sf.statements.length > 0 && host !== sf.statements[0]) {
3090
3494
  if (trailing) {
3091
- ts13.setSyntheticTrailingComments(host, void 0);
3495
+ ts16.setSyntheticTrailingComments(host, void 0);
3092
3496
  } else {
3093
- ts13.setSyntheticLeadingComments(host, void 0);
3497
+ ts16.setSyntheticLeadingComments(host, void 0);
3094
3498
  }
3095
- ts13.setSyntheticLeadingComments(sf.statements[0], comments);
3499
+ ts16.setSyntheticLeadingComments(sf.statements[0], comments);
3096
3500
  }
3097
3501
  }
3098
3502
  function maybeFilterDecorator(decorators, toRemove) {
3099
3503
  if (decorators === void 0) {
3100
3504
  return void 0;
3101
3505
  }
3102
- const filtered = decorators.filter((dec) => toRemove.find((decToRemove) => ts13.getOriginalNode(dec) === decToRemove) === void 0);
3506
+ const filtered = decorators.filter((dec) => toRemove.find((decToRemove) => ts16.getOriginalNode(dec) === decToRemove) === void 0);
3103
3507
  if (filtered.length === 0) {
3104
3508
  return void 0;
3105
3509
  }
3106
- return ts13.createNodeArray(filtered);
3510
+ return ts16.createNodeArray(filtered);
3107
3511
  }
3108
3512
  function isFromAngularCore(decorator) {
3109
3513
  return decorator.import !== null && decorator.import.from === "@angular/core";
@@ -3118,7 +3522,7 @@ function createRecorderFn(defaultImportTracker) {
3118
3522
  }
3119
3523
 
3120
3524
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/diagnostics.mjs
3121
- import ts14 from "typescript";
3525
+ import ts17 from "typescript";
3122
3526
  function createValueHasWrongTypeError(node, value, messageText) {
3123
3527
  var _a;
3124
3528
  let chainedMessage;
@@ -3136,11 +3540,11 @@ function createValueHasWrongTypeError(node, value, messageText) {
3136
3540
  }
3137
3541
  const chain = {
3138
3542
  messageText,
3139
- category: ts14.DiagnosticCategory.Error,
3543
+ category: ts17.DiagnosticCategory.Error,
3140
3544
  code: 0,
3141
3545
  next: [{
3142
3546
  messageText: chainedMessage,
3143
- category: ts14.DiagnosticCategory.Message,
3547
+ category: ts17.DiagnosticCategory.Message,
3144
3548
  code: 0
3145
3549
  }]
3146
3550
  };
@@ -3216,7 +3620,7 @@ function getInheritedUndecoratedCtorDiagnostic(node, baseClass, reader) {
3216
3620
 
3217
3621
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/directive.mjs
3218
3622
  import { compileClassMetadata, compileDeclareClassMetadata, compileDeclareDirectiveFromMetadata, compileDirectiveFromMetadata, createMayBeForwardRefExpression, emitDistinctChangesOnlyDefaultValue, ExternalExpr as ExternalExpr3, FactoryTarget, getSafePropertyAccessString, makeBindingParser, parseHostBindings, verifyHostBindings, WrappedNodeExpr as WrappedNodeExpr3 } from "@angular/compiler";
3219
- import ts16 from "typescript";
3623
+ import ts19 from "typescript";
3220
3624
 
3221
3625
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/factory.mjs
3222
3626
  import { compileDeclareFactoryFunction, compileFactoryFunction } from "@angular/compiler";
@@ -3231,7 +3635,7 @@ function compileDeclareFactory(metadata) {
3231
3635
 
3232
3636
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/metadata.mjs
3233
3637
  import { FunctionExpr, LiteralArrayExpr, LiteralExpr as LiteralExpr2, literalMap, ReturnStatement, WrappedNodeExpr as WrappedNodeExpr2 } from "@angular/compiler";
3234
- import ts15 from "typescript";
3638
+ import ts18 from "typescript";
3235
3639
  function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompiler, angularDecoratorTransform = (dec) => dec) {
3236
3640
  if (!reflection.isClass(clazz)) {
3237
3641
  return null;
@@ -3245,7 +3649,7 @@ function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompi
3245
3649
  if (ngClassDecorators.length === 0) {
3246
3650
  return null;
3247
3651
  }
3248
- const metaDecorators = new WrappedNodeExpr2(ts15.createArrayLiteral(ngClassDecorators));
3652
+ const metaDecorators = new WrappedNodeExpr2(ts18.createArrayLiteral(ngClassDecorators));
3249
3653
  let metaCtorParameters = null;
3250
3654
  const classCtorParameters = reflection.getConstructorParameters(clazz);
3251
3655
  if (classCtorParameters !== null) {
@@ -3265,7 +3669,7 @@ function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompi
3265
3669
  return classMemberToMetadata((_a = member.nameNode) != null ? _a : member.name, member.decorators, isCore);
3266
3670
  });
3267
3671
  if (decoratedMembers.length > 0) {
3268
- metaPropDecorators = new WrappedNodeExpr2(ts15.createObjectLiteral(decoratedMembers));
3672
+ metaPropDecorators = new WrappedNodeExpr2(ts18.createObjectLiteral(decoratedMembers));
3269
3673
  }
3270
3674
  return {
3271
3675
  type: new WrappedNodeExpr2(id),
@@ -3281,38 +3685,38 @@ function ctorParameterToMetadata(param, isCore) {
3281
3685
  ];
3282
3686
  if (param.decorators !== null) {
3283
3687
  const ngDecorators = param.decorators.filter((dec) => isAngularDecorator2(dec, isCore)).map((decorator) => decoratorToMetadata(decorator));
3284
- const value = new WrappedNodeExpr2(ts15.createArrayLiteral(ngDecorators));
3688
+ const value = new WrappedNodeExpr2(ts18.createArrayLiteral(ngDecorators));
3285
3689
  mapEntries.push({ key: "decorators", value, quoted: false });
3286
3690
  }
3287
3691
  return literalMap(mapEntries);
3288
3692
  }
3289
3693
  function classMemberToMetadata(name, decorators, isCore) {
3290
3694
  const ngDecorators = decorators.filter((dec) => isAngularDecorator2(dec, isCore)).map((decorator) => decoratorToMetadata(decorator));
3291
- const decoratorMeta = ts15.createArrayLiteral(ngDecorators);
3292
- return ts15.createPropertyAssignment(name, decoratorMeta);
3695
+ const decoratorMeta = ts18.createArrayLiteral(ngDecorators);
3696
+ return ts18.createPropertyAssignment(name, decoratorMeta);
3293
3697
  }
3294
3698
  function decoratorToMetadata(decorator, wrapFunctionsInParens) {
3295
3699
  if (decorator.identifier === null) {
3296
3700
  throw new Error("Illegal state: synthesized decorator cannot be emitted in class metadata.");
3297
3701
  }
3298
3702
  const properties = [
3299
- ts15.createPropertyAssignment("type", ts15.getMutableClone(decorator.identifier))
3703
+ ts18.createPropertyAssignment("type", ts18.getMutableClone(decorator.identifier))
3300
3704
  ];
3301
3705
  if (decorator.args !== null && decorator.args.length > 0) {
3302
3706
  const args = decorator.args.map((arg) => {
3303
- const expr = ts15.getMutableClone(arg);
3707
+ const expr = ts18.getMutableClone(arg);
3304
3708
  return wrapFunctionsInParens ? wrapFunctionExpressionsInParens(expr) : expr;
3305
3709
  });
3306
- properties.push(ts15.createPropertyAssignment("args", ts15.createArrayLiteral(args)));
3710
+ properties.push(ts18.createPropertyAssignment("args", ts18.createArrayLiteral(args)));
3307
3711
  }
3308
- return ts15.createObjectLiteral(properties, true);
3712
+ return ts18.createObjectLiteral(properties, true);
3309
3713
  }
3310
3714
  function isAngularDecorator2(decorator, isCore) {
3311
3715
  return isCore || decorator.import !== null && decorator.import.from === "@angular/core";
3312
3716
  }
3313
3717
  function removeIdentifierReferences(node, name) {
3314
- const result = ts15.transform(node, [(context) => (root) => ts15.visitNode(root, function walk(current) {
3315
- return ts15.isIdentifier(current) && current.text === name ? ts15.createIdentifier(current.text) : ts15.visitEachChild(current, walk, context);
3718
+ const result = ts18.transform(node, [(context) => (root) => ts18.visitNode(root, function walk(current) {
3719
+ return ts18.isIdentifier(current) && current.text === name ? ts18.createIdentifier(current.text) : ts18.visitEachChild(current, walk, context);
3316
3720
  })]);
3317
3721
  return result.transformed[0];
3318
3722
  }
@@ -3538,7 +3942,7 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, isCore
3538
3942
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, Decorator.nodeForError(decorator), `Incorrect number of arguments to @${decorator.name} decorator`);
3539
3943
  } else {
3540
3944
  const meta = unwrapExpression(decorator.args[0]);
3541
- if (!ts16.isObjectLiteralExpression(meta)) {
3945
+ if (!ts19.isObjectLiteralExpression(meta)) {
3542
3946
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, `@${decorator.name} argument must be an object literal`);
3543
3947
  }
3544
3948
  directive = reflectObjectLiteral(meta);
@@ -3649,7 +4053,7 @@ function extractQueryMetadata(exprNode, name, args, propertyName, reflector, eva
3649
4053
  let emitDistinctChangesOnly = emitDistinctChangesOnlyDefaultValue;
3650
4054
  if (args.length === 2) {
3651
4055
  const optionsExpr = unwrapExpression(args[1]);
3652
- if (!ts16.isObjectLiteralExpression(optionsExpr)) {
4056
+ if (!ts19.isObjectLiteralExpression(optionsExpr)) {
3653
4057
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, optionsExpr, `@${name} options must be an object literal`);
3654
4058
  }
3655
4059
  const options = reflectObjectLiteral(optionsExpr);
@@ -3694,16 +4098,16 @@ function extractQueryMetadata(exprNode, name, args, propertyName, reflector, eva
3694
4098
  }
3695
4099
  function extractQueriesFromDecorator(queryData, reflector, evaluator, isCore) {
3696
4100
  const content = [], view = [];
3697
- if (!ts16.isObjectLiteralExpression(queryData)) {
4101
+ if (!ts19.isObjectLiteralExpression(queryData)) {
3698
4102
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator queries metadata must be an object literal");
3699
4103
  }
3700
4104
  reflectObjectLiteral(queryData).forEach((queryExpr, propertyName) => {
3701
4105
  queryExpr = unwrapExpression(queryExpr);
3702
- if (!ts16.isNewExpression(queryExpr)) {
4106
+ if (!ts19.isNewExpression(queryExpr)) {
3703
4107
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator query metadata must be an instance of a query type");
3704
4108
  }
3705
- const queryType = ts16.isPropertyAccessExpression(queryExpr.expression) ? queryExpr.expression.name : queryExpr.expression;
3706
- if (!ts16.isIdentifier(queryType)) {
4109
+ const queryType = ts19.isPropertyAccessExpression(queryExpr.expression) ? queryExpr.expression.name : queryExpr.expression;
4110
+ if (!ts19.isIdentifier(queryType)) {
3707
4111
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator query metadata must be an instance of a query type");
3708
4112
  }
3709
4113
  const type = reflector.getImportOfIdentifier(queryType);
@@ -3882,7 +4286,7 @@ var QUERY_TYPES = /* @__PURE__ */ new Set([
3882
4286
 
3883
4287
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/ng_module.mjs
3884
4288
  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";
3885
- import ts17 from "typescript";
4289
+ import ts20 from "typescript";
3886
4290
  var NgModuleSymbol = class extends SemanticSymbol {
3887
4291
  constructor() {
3888
4292
  super(...arguments);
@@ -3965,8 +4369,8 @@ var NgModuleDecoratorHandler = class {
3965
4369
  if (decorator.args === null || decorator.args.length > 1) {
3966
4370
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, Decorator.nodeForError(decorator), `Incorrect number of arguments to @NgModule decorator`);
3967
4371
  }
3968
- const meta = decorator.args.length === 1 ? unwrapExpression(decorator.args[0]) : ts17.createObjectLiteral([]);
3969
- if (!ts17.isObjectLiteralExpression(meta)) {
4372
+ const meta = decorator.args.length === 1 ? unwrapExpression(decorator.args[0]) : ts20.createObjectLiteral([]);
4373
+ if (!ts20.isObjectLiteralExpression(meta)) {
3970
4374
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, "@NgModule argument must be an object literal");
3971
4375
  }
3972
4376
  const ngModule = reflectObjectLiteral(meta);
@@ -4257,10 +4661,10 @@ var NgModuleDecoratorHandler = class {
4257
4661
  return type && (this._reflectModuleFromTypeParam(type, node) || this._reflectModuleFromLiteralType(type));
4258
4662
  }
4259
4663
  _reflectModuleFromTypeParam(type, node) {
4260
- if (!ts17.isTypeReferenceNode(type)) {
4664
+ if (!ts20.isTypeReferenceNode(type)) {
4261
4665
  return null;
4262
4666
  }
4263
- const typeName = type && (ts17.isIdentifier(type.typeName) && type.typeName || ts17.isQualifiedName(type.typeName) && type.typeName.right) || null;
4667
+ const typeName = type && (ts20.isIdentifier(type.typeName) && type.typeName || ts20.isQualifiedName(type.typeName) && type.typeName.right) || null;
4264
4668
  if (typeName === null) {
4265
4669
  return null;
4266
4670
  }
@@ -4272,7 +4676,7 @@ var NgModuleDecoratorHandler = class {
4272
4676
  return null;
4273
4677
  }
4274
4678
  if (type.typeArguments === void 0 || type.typeArguments.length !== 1) {
4275
- const parent = ts17.isMethodDeclaration(node) && ts17.isClassDeclaration(node.parent) ? node.parent : null;
4679
+ const parent = ts20.isMethodDeclaration(node) && ts20.isClassDeclaration(node.parent) ? node.parent : null;
4276
4680
  const symbolName = (parent && parent.name ? parent.name.getText() + "." : "") + (node.name ? node.name.getText() : "anonymous");
4277
4681
  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.`);
4278
4682
  }
@@ -4280,13 +4684,13 @@ var NgModuleDecoratorHandler = class {
4280
4684
  return typeNodeToValueExpr(arg);
4281
4685
  }
4282
4686
  _reflectModuleFromLiteralType(type) {
4283
- if (!ts17.isIntersectionTypeNode(type)) {
4687
+ if (!ts20.isIntersectionTypeNode(type)) {
4284
4688
  return null;
4285
4689
  }
4286
4690
  for (const t of type.types) {
4287
- if (ts17.isTypeLiteralNode(t)) {
4691
+ if (ts20.isTypeLiteralNode(t)) {
4288
4692
  for (const m of t.members) {
4289
- const ngModuleType = ts17.isPropertySignature(m) && ts17.isIdentifier(m.name) && m.name.text === "ngModule" && m.type || null;
4693
+ const ngModuleType = ts20.isPropertySignature(m) && ts20.isIdentifier(m.name) && m.name.text === "ngModule" && m.type || null;
4290
4694
  const ngModuleExpression = ngModuleType && typeNodeToValueExpr(ngModuleType);
4291
4695
  if (ngModuleExpression) {
4292
4696
  return ngModuleExpression;
@@ -4653,7 +5057,7 @@ var ComponentDecoratorHandler = class {
4653
5057
  });
4654
5058
  }
4655
5059
  typeCheck(ctx, node, meta) {
4656
- if (this.typeCheckScopeRegistry === null || !ts18.isClassDeclaration(node)) {
5060
+ if (this.typeCheckScopeRegistry === null || !ts21.isClassDeclaration(node)) {
4657
5061
  return;
4658
5062
  }
4659
5063
  if (meta.isPoisoned && !this.usePoisonedData) {
@@ -4864,17 +5268,17 @@ var ComponentDecoratorHandler = class {
4864
5268
  const metadata = new Map(component);
4865
5269
  if (metadata.has("templateUrl")) {
4866
5270
  metadata.delete("templateUrl");
4867
- metadata.set("template", ts18.createStringLiteral(template.content));
5271
+ metadata.set("template", ts21.createStringLiteral(template.content));
4868
5272
  }
4869
5273
  if (metadata.has("styleUrls")) {
4870
5274
  metadata.delete("styleUrls");
4871
- metadata.set("styles", ts18.createArrayLiteral(styles.map((s) => ts18.createStringLiteral(s))));
5275
+ metadata.set("styles", ts21.createArrayLiteral(styles.map((s) => ts21.createStringLiteral(s))));
4872
5276
  }
4873
5277
  const newMetadataFields = [];
4874
5278
  for (const [name, value] of metadata.entries()) {
4875
- newMetadataFields.push(ts18.createPropertyAssignment(name, value));
5279
+ newMetadataFields.push(ts21.createPropertyAssignment(name, value));
4876
5280
  }
4877
- return __spreadProps(__spreadValues({}, dec), { args: [ts18.createObjectLiteral(newMetadataFields)] });
5281
+ return __spreadProps(__spreadValues({}, dec), { args: [ts21.createObjectLiteral(newMetadataFields)] });
4878
5282
  }
4879
5283
  _resolveLiteral(decorator) {
4880
5284
  if (this.literalCache.has(decorator)) {
@@ -4884,7 +5288,7 @@ var ComponentDecoratorHandler = class {
4884
5288
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, Decorator.nodeForError(decorator), `Incorrect number of arguments to @Component decorator`);
4885
5289
  }
4886
5290
  const meta = unwrapExpression(decorator.args[0]);
4887
- if (!ts18.isObjectLiteralExpression(meta)) {
5291
+ if (!ts21.isObjectLiteralExpression(meta)) {
4888
5292
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, `Decorator argument must be literal.`);
4889
5293
  }
4890
5294
  this.literalCache.set(decorator, meta);
@@ -4911,9 +5315,9 @@ var ComponentDecoratorHandler = class {
4911
5315
  }
4912
5316
  _extractStyleUrlsFromExpression(styleUrlsExpr) {
4913
5317
  const styleUrls = [];
4914
- if (ts18.isArrayLiteralExpression(styleUrlsExpr)) {
5318
+ if (ts21.isArrayLiteralExpression(styleUrlsExpr)) {
4915
5319
  for (const styleUrlExpr of styleUrlsExpr.elements) {
4916
- if (ts18.isSpreadElement(styleUrlExpr)) {
5320
+ if (ts21.isSpreadElement(styleUrlExpr)) {
4917
5321
  styleUrls.push(...this._extractStyleUrlsFromExpression(styleUrlExpr.expression));
4918
5322
  } else {
4919
5323
  const styleUrl = this.evaluator.evaluate(styleUrlExpr);
@@ -4945,10 +5349,10 @@ var ComponentDecoratorHandler = class {
4945
5349
  _extractStyleResources(component, containingFile) {
4946
5350
  const styles = /* @__PURE__ */ new Set();
4947
5351
  function stringLiteralElements(array) {
4948
- return array.elements.filter((e) => ts18.isStringLiteralLike(e));
5352
+ return array.elements.filter((e) => ts21.isStringLiteralLike(e));
4949
5353
  }
4950
5354
  const styleUrlsExpr = component.get("styleUrls");
4951
- if (styleUrlsExpr !== void 0 && ts18.isArrayLiteralExpression(styleUrlsExpr)) {
5355
+ if (styleUrlsExpr !== void 0 && ts21.isArrayLiteralExpression(styleUrlsExpr)) {
4952
5356
  for (const expression of stringLiteralElements(styleUrlsExpr)) {
4953
5357
  try {
4954
5358
  const resourceUrl = this.resourceLoader.resolve(expression.text, containingFile);
@@ -4958,7 +5362,7 @@ var ComponentDecoratorHandler = class {
4958
5362
  }
4959
5363
  }
4960
5364
  const stylesExpr = component.get("styles");
4961
- if (stylesExpr !== void 0 && ts18.isArrayLiteralExpression(stylesExpr)) {
5365
+ if (stylesExpr !== void 0 && ts21.isArrayLiteralExpression(stylesExpr)) {
4962
5366
  for (const expression of stringLiteralElements(stylesExpr)) {
4963
5367
  styles.add({ path: null, expression });
4964
5368
  }
@@ -5003,7 +5407,7 @@ var ComponentDecoratorHandler = class {
5003
5407
  let sourceMapping;
5004
5408
  let escapedString = false;
5005
5409
  let sourceMapUrl;
5006
- if (ts18.isStringLiteral(template.expression) || ts18.isNoSubstitutionTemplateLiteral(template.expression)) {
5410
+ if (ts21.isStringLiteral(template.expression) || ts21.isNoSubstitutionTemplateLiteral(template.expression)) {
5007
5411
  sourceParseRange = getTemplateRange(template.expression);
5008
5412
  sourceStr = template.expression.getSourceFile().text;
5009
5413
  templateContent = template.expression.text;
@@ -5177,7 +5581,7 @@ var ComponentDecoratorHandler = class {
5177
5581
  };
5178
5582
  function getTemplateRange(templateExpr) {
5179
5583
  const startPos = templateExpr.getStart() + 1;
5180
- const { line, character } = ts18.getLineAndCharacterOfPosition(templateExpr.getSourceFile(), startPos);
5584
+ const { line, character } = ts21.getLineAndCharacterOfPosition(templateExpr.getSourceFile(), startPos);
5181
5585
  return {
5182
5586
  startPos,
5183
5587
  startLine: line,
@@ -5236,7 +5640,7 @@ function collectAnimationNames(value, animationTriggerNames) {
5236
5640
 
5237
5641
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/injectable.mjs
5238
5642
  import { compileClassMetadata as compileClassMetadata4, compileDeclareClassMetadata as compileDeclareClassMetadata4, compileDeclareInjectableFromMetadata, compileInjectable, createMayBeForwardRefExpression as createMayBeForwardRefExpression2, FactoryTarget as FactoryTarget4, LiteralExpr as LiteralExpr3, WrappedNodeExpr as WrappedNodeExpr6 } from "@angular/compiler";
5239
- import ts19 from "typescript";
5643
+ import ts22 from "typescript";
5240
5644
  var InjectableDecoratorHandler = class {
5241
5645
  constructor(reflector, isCore, strictCtorDeps, injectableRegistry, perf, errorOnDuplicateProv = true) {
5242
5646
  this.reflector = reflector;
@@ -5327,7 +5731,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
5327
5731
  };
5328
5732
  } else if (decorator.args.length === 1) {
5329
5733
  const metaNode = decorator.args[0];
5330
- if (!ts19.isObjectLiteralExpression(metaNode)) {
5734
+ if (!ts22.isObjectLiteralExpression(metaNode)) {
5331
5735
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, metaNode, `@Injectable argument must be an object literal`);
5332
5736
  }
5333
5737
  const meta = reflectObjectLiteral(metaNode);
@@ -5335,7 +5739,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
5335
5739
  let deps = void 0;
5336
5740
  if ((meta.has("useClass") || meta.has("useFactory")) && meta.has("deps")) {
5337
5741
  const depsExpr = meta.get("deps");
5338
- if (!ts19.isArrayLiteralExpression(depsExpr)) {
5742
+ if (!ts22.isArrayLiteralExpression(depsExpr)) {
5339
5743
  throw new FatalDiagnosticError(ErrorCode.VALUE_NOT_LITERAL, depsExpr, `@Injectable deps metadata must be an inline array`);
5340
5744
  }
5341
5745
  deps = depsExpr.elements.map((dep) => getDep(dep, reflector));
@@ -5417,12 +5821,12 @@ function getDep(dep, reflector) {
5417
5821
  }
5418
5822
  return true;
5419
5823
  }
5420
- if (ts19.isArrayLiteralExpression(dep)) {
5824
+ if (ts22.isArrayLiteralExpression(dep)) {
5421
5825
  dep.elements.forEach((el) => {
5422
5826
  let isDecorator = false;
5423
- if (ts19.isIdentifier(el)) {
5827
+ if (ts22.isIdentifier(el)) {
5424
5828
  isDecorator = maybeUpdateDecorator(el, reflector);
5425
- } else if (ts19.isNewExpression(el) && ts19.isIdentifier(el.expression)) {
5829
+ } else if (ts22.isNewExpression(el) && ts22.isIdentifier(el.expression)) {
5426
5830
  const token = el.arguments && el.arguments.length > 0 && el.arguments[0] || void 0;
5427
5831
  isDecorator = maybeUpdateDecorator(el.expression, reflector, token);
5428
5832
  }
@@ -5436,7 +5840,7 @@ function getDep(dep, reflector) {
5436
5840
 
5437
5841
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/pipe.mjs
5438
5842
  import { compileClassMetadata as compileClassMetadata5, compileDeclareClassMetadata as compileDeclareClassMetadata5, compileDeclarePipeFromMetadata, compilePipeFromMetadata, FactoryTarget as FactoryTarget5, WrappedNodeExpr as WrappedNodeExpr7 } from "@angular/compiler";
5439
- import ts20 from "typescript";
5843
+ import ts23 from "typescript";
5440
5844
  var PipeSymbol = class extends SemanticSymbol {
5441
5845
  constructor(decl, name) {
5442
5846
  super(decl);
@@ -5491,7 +5895,7 @@ var PipeDecoratorHandler = class {
5491
5895
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, Decorator.nodeForError(decorator), "@Pipe must have exactly one argument");
5492
5896
  }
5493
5897
  const meta = unwrapExpression(decorator.args[0]);
5494
- if (!ts20.isObjectLiteralExpression(meta)) {
5898
+ if (!ts23.isObjectLiteralExpression(meta)) {
5495
5899
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, "@Pipe must have a literal argument");
5496
5900
  }
5497
5901
  const pipe = reflectObjectLiteral(meta);
@@ -5580,6 +5984,15 @@ export {
5580
5984
  CompilationMode,
5581
5985
  HandlerFlags,
5582
5986
  aliasTransformFactory,
5987
+ isShim,
5988
+ copyFileShimData,
5989
+ untagAllTsFiles,
5990
+ retagAllTsFiles,
5991
+ ShimAdapter,
5992
+ FactoryGenerator,
5993
+ generatedFactoryTransform,
5994
+ ShimReferenceTagger,
5995
+ SummaryGenerator,
5583
5996
  TraitState,
5584
5997
  TraitCompiler,
5585
5998
  DtsTransformRegistry,
@@ -5601,4 +6014,5 @@ export {
5601
6014
  * Use of this source code is governed by an MIT-style license that can be
5602
6015
  * found in the LICENSE file at https://angular.io/license
5603
6016
  */
5604
- //# sourceMappingURL=chunk-L2JNRKLG.js.map
6017
+ // Closure Compiler ignores @suppress and similar if the comment contains @license.
6018
+ //# sourceMappingURL=chunk-LMCFGUUV.js.map