@absolutejs/absolute 0.19.0-beta.1091 → 0.19.0-beta.1093

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -23977,23 +23977,55 @@ var init_compileSvelte = __esm(() => {
23977
23977
  });
23978
23978
 
23979
23979
  // src/build/parseVueSpaRoutes.ts
23980
- var ROUTES_BLOCK_RE, ROUTE_ENTRY_RE, parseVueSpaRoutes = (source) => {
23981
- const blockMatch = source.match(ROUTES_BLOCK_RE);
23982
- if (!blockMatch?.[1])
23983
- return [];
23984
- const block = blockMatch[1];
23985
- const entries = [];
23986
- for (const match of block.matchAll(ROUTE_ENTRY_RE)) {
23987
- const [, path, importPath] = match;
23988
- if (path && importPath)
23989
- entries.push({ importPath, path });
23980
+ import ts11 from "typescript";
23981
+ var propertyName = (node) => ts11.isIdentifier(node) || ts11.isStringLiteralLike(node) ? node.text : null, stringValue = (node) => ts11.isStringLiteralLike(node) ? node.text : null, findVueImport = (node) => {
23982
+ if (ts11.isCallExpression(node) && node.expression.kind === ts11.SyntaxKind.ImportKeyword) {
23983
+ const [specifier] = node.arguments;
23984
+ if (specifier && ts11.isStringLiteralLike(specifier)) {
23985
+ return specifier.text.endsWith(".vue") ? specifier.text : null;
23986
+ }
23990
23987
  }
23988
+ let found = null;
23989
+ ts11.forEachChild(node, (child) => {
23990
+ if (found === null)
23991
+ found = findVueImport(child);
23992
+ });
23993
+ return found;
23994
+ }, parseRoute = (node) => {
23995
+ if (!ts11.isObjectLiteralExpression(node))
23996
+ return null;
23997
+ let path = null;
23998
+ let importPath = null;
23999
+ for (const property of node.properties) {
24000
+ if (!ts11.isPropertyAssignment(property))
24001
+ continue;
24002
+ const name = propertyName(property.name);
24003
+ if (name === "path")
24004
+ path = stringValue(property.initializer);
24005
+ if (name === "component")
24006
+ importPath = findVueImport(property.initializer);
24007
+ }
24008
+ return path && importPath ? { importPath, path } : null;
24009
+ }, parseVueSpaRoutes = (source) => {
24010
+ const sourceFile = ts11.createSourceFile("absolute-vue-routes.ts", source, ts11.ScriptTarget.Latest, true, ts11.ScriptKind.TS);
24011
+ const entries = [];
24012
+ const visit = (node) => {
24013
+ if (ts11.isCallExpression(node) && ts11.isIdentifier(node.expression) && node.expression.text === "defineRoutes") {
24014
+ const [routes] = node.arguments;
24015
+ if (routes && ts11.isArrayLiteralExpression(routes)) {
24016
+ for (const element of routes.elements) {
24017
+ const route = parseRoute(element);
24018
+ if (route)
24019
+ entries.push(route);
24020
+ }
24021
+ }
24022
+ }
24023
+ ts11.forEachChild(node, visit);
24024
+ };
24025
+ ts11.forEachChild(sourceFile, visit);
23991
24026
  return entries;
23992
24027
  };
23993
- var init_parseVueSpaRoutes = __esm(() => {
23994
- ROUTES_BLOCK_RE = /export\s+const\s+routes\s*=\s*defineRoutes\s*\(\s*\[([\s\S]*?)\]\s*\)\s*;?/;
23995
- ROUTE_ENTRY_RE = /path:\s*['"`]([^'"`]+)['"`][\s\S]*?import\(\s*['"`]([^'"`]+\.vue)['"`]\s*\)/g;
23996
- });
24028
+ var init_parseVueSpaRoutes = () => {};
23997
24029
 
23998
24030
  // src/build/chainInlineSourcemaps.ts
23999
24031
  var exports_chainInlineSourcemaps = {};
@@ -25436,14 +25468,14 @@ __export(exports_compileAngular, {
25436
25468
  import { existsSync as existsSync26, readFileSync as readFileSync23, promises as fs5 } from "fs";
25437
25469
  import { join as join34, basename as basename10, sep as sep3, dirname as dirname17, resolve as resolve24, relative as relative12 } from "path";
25438
25470
  var {Glob: Glob6 } = globalThis.Bun;
25439
- import ts11 from "typescript";
25471
+ import ts12 from "typescript";
25440
25472
  var traceAngularPhase = async (name, fn2, metadata2) => {
25441
25473
  const tracePhase = globalThis.__absoluteBuildTracePhase;
25442
25474
  return tracePhase ? tracePhase(`compile/angular/${name}`, fn2, metadata2) : await fn2();
25443
25475
  }, readTsconfigPathAliases = () => {
25444
25476
  try {
25445
25477
  const configPath2 = resolve24(process.cwd(), "tsconfig.json");
25446
- const config2 = ts11.readConfigFile(configPath2, ts11.sys.readFile).config;
25478
+ const config2 = ts12.readConfigFile(configPath2, ts12.sys.readFile).config;
25447
25479
  const compilerOptions = config2?.compilerOptions ?? {};
25448
25480
  const baseUrl = resolve24(process.cwd(), compilerOptions.baseUrl ?? ".");
25449
25481
  const aliases = Object.entries(compilerOptions.paths ?? {}).map(([pattern, replacements]) => ({ pattern, replacements }));
@@ -25572,7 +25604,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
25572
25604
  return resolve24(import.meta.dir, "./dev/client");
25573
25605
  }, devClientDir4, hmrClientPath5, formatDiagnosticMessage = (diagnostic) => {
25574
25606
  try {
25575
- return ts11.flattenDiagnosticMessageText(diagnostic.messageText, `
25607
+ return ts12.flattenDiagnosticMessageText(diagnostic.messageText, `
25576
25608
  `);
25577
25609
  } catch {
25578
25610
  return String(diagnostic.messageText || "Unknown error");
@@ -25580,7 +25612,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
25580
25612
  }, throwOnCompilationErrors = (diagnostics) => {
25581
25613
  if (!diagnostics?.length)
25582
25614
  return;
25583
- const errors = diagnostics.filter((diag) => diag.category === ts11.DiagnosticCategory.Error);
25615
+ const errors = diagnostics.filter((diag) => diag.category === ts12.DiagnosticCategory.Error);
25584
25616
  if (!errors.length)
25585
25617
  return;
25586
25618
  const fullMessage = errors.map(formatDiagnosticMessage).join(`
@@ -25622,22 +25654,22 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
25622
25654
  }
25623
25655
  return `${path}.js${query}`;
25624
25656
  }, isRelativeModuleSpecifier = (specifier) => specifier.startsWith("./") || specifier.startsWith("../"), extractLocalImportSpecifiers = (source, fileName) => {
25625
- const sourceFile = ts11.createSourceFile(fileName, source, ts11.ScriptTarget.Latest, true, ts11.ScriptKind.TS);
25657
+ const sourceFile = ts12.createSourceFile(fileName, source, ts12.ScriptTarget.Latest, true, ts12.ScriptKind.TS);
25626
25658
  const specifiers = [];
25627
25659
  const addSpecifier = (node) => {
25628
- if (!node || !ts11.isStringLiteralLike(node))
25660
+ if (!node || !ts12.isStringLiteralLike(node))
25629
25661
  return;
25630
25662
  const specifier = node.text;
25631
25663
  if (isRelativeModuleSpecifier(specifier))
25632
25664
  specifiers.push(specifier);
25633
25665
  };
25634
25666
  const visit = (node) => {
25635
- if (ts11.isImportDeclaration(node) || ts11.isExportDeclaration(node)) {
25667
+ if (ts12.isImportDeclaration(node) || ts12.isExportDeclaration(node)) {
25636
25668
  addSpecifier(node.moduleSpecifier);
25637
- } else if (ts11.isCallExpression(node) && node.expression.kind === ts11.SyntaxKind.ImportKeyword) {
25669
+ } else if (ts12.isCallExpression(node) && node.expression.kind === ts12.SyntaxKind.ImportKeyword) {
25638
25670
  addSpecifier(node.arguments[0]);
25639
25671
  }
25640
- ts11.forEachChild(node, visit);
25672
+ ts12.forEachChild(node, visit);
25641
25673
  };
25642
25674
  visit(sourceFile);
25643
25675
  return specifiers;
@@ -25785,25 +25817,25 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
25785
25817
  emitDecoratorMetadata: true,
25786
25818
  esModuleInterop: true,
25787
25819
  experimentalDecorators: true,
25788
- module: ts11.ModuleKind.ESNext,
25789
- moduleResolution: ts11.ModuleResolutionKind.Bundler,
25790
- newLine: ts11.NewLineKind.LineFeed,
25820
+ module: ts12.ModuleKind.ESNext,
25821
+ moduleResolution: ts12.ModuleResolutionKind.Bundler,
25822
+ newLine: ts12.NewLineKind.LineFeed,
25791
25823
  noLib: false,
25792
25824
  outDir,
25793
25825
  skipLibCheck: true,
25794
- target: ts11.ScriptTarget.ES2022,
25826
+ target: ts12.ScriptTarget.ES2022,
25795
25827
  ...config2.options
25796
25828
  };
25797
- options.target = ts11.ScriptTarget.ES2022;
25829
+ options.target = ts12.ScriptTarget.ES2022;
25798
25830
  options.experimentalDecorators = true;
25799
25831
  options.emitDecoratorMetadata = true;
25800
- options.newLine = ts11.NewLineKind.LineFeed;
25832
+ options.newLine = ts12.NewLineKind.LineFeed;
25801
25833
  options.outDir = outDir;
25802
25834
  options.noEmit = false;
25803
25835
  options.incremental = false;
25804
25836
  options.tsBuildInfoFile = undefined;
25805
25837
  options.rootDir = process.cwd();
25806
- const host = await traceAngularPhase("aot/create-compiler-host", () => ts11.createCompilerHost(options));
25838
+ const host = await traceAngularPhase("aot/create-compiler-host", () => ts12.createCompilerHost(options));
25807
25839
  const originalGetDefaultLibLocation = host.getDefaultLibLocation;
25808
25840
  host.getDefaultLibLocation = () => tsLibDir || (originalGetDefaultLibLocation ? originalGetDefaultLibLocation() : "");
25809
25841
  const originalGetDefaultLibFileName = host.getDefaultLibFileName;
@@ -25849,7 +25881,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
25849
25881
  host.getSourceFile = (fileName, languageVersion, onError) => {
25850
25882
  const source = transformedSources.get(resolve24(fileName));
25851
25883
  if (source) {
25852
- return ts11.createSourceFile(fileName, source, languageVersion, true);
25884
+ return ts12.createSourceFile(fileName, source, languageVersion, true);
25853
25885
  }
25854
25886
  return originalGetSourceFileForCompile?.call(host, fileName, languageVersion, onError);
25855
25887
  };
@@ -26738,18 +26770,18 @@ var init_compileAngular = __esm(() => {
26738
26770
  });
26739
26771
 
26740
26772
  // src/dev/angular/hmrImportGenerator.ts
26741
- import ts12 from "typescript";
26773
+ import ts13 from "typescript";
26742
26774
  var createHmrImportGenerator = (namespaceMap) => ({
26743
26775
  addImport(request) {
26744
26776
  const ns = namespaceMap.get(request.exportModuleSpecifier);
26745
26777
  if (!ns) {
26746
26778
  throw new Error(`HMR import generator has no namespace mapping for ${request.exportModuleSpecifier}. ` + `Add it to namespaceDependencies before calling compileHmrUpdateCallback.`);
26747
26779
  }
26748
- const namespaceId = ts12.factory.createIdentifier(ns);
26780
+ const namespaceId = ts13.factory.createIdentifier(ns);
26749
26781
  if (request.exportSymbolName === null) {
26750
26782
  return namespaceId;
26751
26783
  }
26752
- return ts12.factory.createPropertyAccessExpression(namespaceId, ts12.factory.createIdentifier(request.exportSymbolName));
26784
+ return ts13.factory.createPropertyAccessExpression(namespaceId, ts13.factory.createIdentifier(request.exportSymbolName));
26753
26785
  }
26754
26786
  });
26755
26787
  var init_hmrImportGenerator = () => {};
@@ -27122,13 +27154,13 @@ var init_translator = __esm(() => {
27122
27154
  });
27123
27155
 
27124
27156
  // src/dev/angular/vendor/translator/ts_util.ts
27125
- import ts13 from "typescript";
27157
+ import ts14 from "typescript";
27126
27158
  function tsNumericExpression(value) {
27127
27159
  if (value < 0) {
27128
- const operand = ts13.factory.createNumericLiteral(Math.abs(value));
27129
- return ts13.factory.createPrefixUnaryExpression(ts13.SyntaxKind.MinusToken, operand);
27160
+ const operand = ts14.factory.createNumericLiteral(Math.abs(value));
27161
+ return ts14.factory.createPrefixUnaryExpression(ts14.SyntaxKind.MinusToken, operand);
27130
27162
  }
27131
- return ts13.factory.createNumericLiteral(value);
27163
+ return ts14.factory.createNumericLiteral(value);
27132
27164
  }
27133
27165
  var init_ts_util = __esm(() => {
27134
27166
  /*!
@@ -27141,142 +27173,142 @@ var init_ts_util = __esm(() => {
27141
27173
  });
27142
27174
 
27143
27175
  // src/dev/angular/vendor/translator/typescript_ast_factory.ts
27144
- import ts14 from "typescript";
27176
+ import ts15 from "typescript";
27145
27177
 
27146
27178
  class TypeScriptAstFactory {
27147
27179
  annotateForClosureCompiler;
27148
27180
  externalSourceFiles = new Map;
27149
27181
  UNARY_OPERATORS = /* @__PURE__ */ (() => ({
27150
- "+": ts14.SyntaxKind.PlusToken,
27151
- "-": ts14.SyntaxKind.MinusToken,
27152
- "!": ts14.SyntaxKind.ExclamationToken
27182
+ "+": ts15.SyntaxKind.PlusToken,
27183
+ "-": ts15.SyntaxKind.MinusToken,
27184
+ "!": ts15.SyntaxKind.ExclamationToken
27153
27185
  }))();
27154
27186
  BINARY_OPERATORS = /* @__PURE__ */ (() => ({
27155
- "&&": ts14.SyntaxKind.AmpersandAmpersandToken,
27156
- ">": ts14.SyntaxKind.GreaterThanToken,
27157
- ">=": ts14.SyntaxKind.GreaterThanEqualsToken,
27158
- "&": ts14.SyntaxKind.AmpersandToken,
27159
- "|": ts14.SyntaxKind.BarToken,
27160
- "/": ts14.SyntaxKind.SlashToken,
27161
- "==": ts14.SyntaxKind.EqualsEqualsToken,
27162
- "===": ts14.SyntaxKind.EqualsEqualsEqualsToken,
27163
- "<": ts14.SyntaxKind.LessThanToken,
27164
- "<=": ts14.SyntaxKind.LessThanEqualsToken,
27165
- "-": ts14.SyntaxKind.MinusToken,
27166
- "%": ts14.SyntaxKind.PercentToken,
27167
- "*": ts14.SyntaxKind.AsteriskToken,
27168
- "**": ts14.SyntaxKind.AsteriskAsteriskToken,
27169
- "!=": ts14.SyntaxKind.ExclamationEqualsToken,
27170
- "!==": ts14.SyntaxKind.ExclamationEqualsEqualsToken,
27171
- "||": ts14.SyntaxKind.BarBarToken,
27172
- "+": ts14.SyntaxKind.PlusToken,
27173
- "??": ts14.SyntaxKind.QuestionQuestionToken,
27174
- "=": ts14.SyntaxKind.EqualsToken,
27175
- "+=": ts14.SyntaxKind.PlusEqualsToken,
27176
- "-=": ts14.SyntaxKind.MinusEqualsToken,
27177
- "*=": ts14.SyntaxKind.AsteriskEqualsToken,
27178
- "/=": ts14.SyntaxKind.SlashEqualsToken,
27179
- "%=": ts14.SyntaxKind.PercentEqualsToken,
27180
- "**=": ts14.SyntaxKind.AsteriskAsteriskEqualsToken,
27181
- "&&=": ts14.SyntaxKind.AmpersandAmpersandEqualsToken,
27182
- "||=": ts14.SyntaxKind.BarBarEqualsToken,
27183
- "??=": ts14.SyntaxKind.QuestionQuestionEqualsToken,
27184
- in: ts14.SyntaxKind.InKeyword,
27185
- instanceof: ts14.SyntaxKind.InstanceOfKeyword
27187
+ "&&": ts15.SyntaxKind.AmpersandAmpersandToken,
27188
+ ">": ts15.SyntaxKind.GreaterThanToken,
27189
+ ">=": ts15.SyntaxKind.GreaterThanEqualsToken,
27190
+ "&": ts15.SyntaxKind.AmpersandToken,
27191
+ "|": ts15.SyntaxKind.BarToken,
27192
+ "/": ts15.SyntaxKind.SlashToken,
27193
+ "==": ts15.SyntaxKind.EqualsEqualsToken,
27194
+ "===": ts15.SyntaxKind.EqualsEqualsEqualsToken,
27195
+ "<": ts15.SyntaxKind.LessThanToken,
27196
+ "<=": ts15.SyntaxKind.LessThanEqualsToken,
27197
+ "-": ts15.SyntaxKind.MinusToken,
27198
+ "%": ts15.SyntaxKind.PercentToken,
27199
+ "*": ts15.SyntaxKind.AsteriskToken,
27200
+ "**": ts15.SyntaxKind.AsteriskAsteriskToken,
27201
+ "!=": ts15.SyntaxKind.ExclamationEqualsToken,
27202
+ "!==": ts15.SyntaxKind.ExclamationEqualsEqualsToken,
27203
+ "||": ts15.SyntaxKind.BarBarToken,
27204
+ "+": ts15.SyntaxKind.PlusToken,
27205
+ "??": ts15.SyntaxKind.QuestionQuestionToken,
27206
+ "=": ts15.SyntaxKind.EqualsToken,
27207
+ "+=": ts15.SyntaxKind.PlusEqualsToken,
27208
+ "-=": ts15.SyntaxKind.MinusEqualsToken,
27209
+ "*=": ts15.SyntaxKind.AsteriskEqualsToken,
27210
+ "/=": ts15.SyntaxKind.SlashEqualsToken,
27211
+ "%=": ts15.SyntaxKind.PercentEqualsToken,
27212
+ "**=": ts15.SyntaxKind.AsteriskAsteriskEqualsToken,
27213
+ "&&=": ts15.SyntaxKind.AmpersandAmpersandEqualsToken,
27214
+ "||=": ts15.SyntaxKind.BarBarEqualsToken,
27215
+ "??=": ts15.SyntaxKind.QuestionQuestionEqualsToken,
27216
+ in: ts15.SyntaxKind.InKeyword,
27217
+ instanceof: ts15.SyntaxKind.InstanceOfKeyword
27186
27218
  }))();
27187
27219
  VAR_TYPES = /* @__PURE__ */ (() => ({
27188
- const: ts14.NodeFlags.Const,
27189
- let: ts14.NodeFlags.Let,
27190
- var: ts14.NodeFlags.None
27220
+ const: ts15.NodeFlags.Const,
27221
+ let: ts15.NodeFlags.Let,
27222
+ var: ts15.NodeFlags.None
27191
27223
  }))();
27192
27224
  constructor(annotateForClosureCompiler) {
27193
27225
  this.annotateForClosureCompiler = annotateForClosureCompiler;
27194
27226
  }
27195
27227
  attachComments = attachComments;
27196
- createArrayLiteral = ts14.factory.createArrayLiteralExpression;
27228
+ createArrayLiteral = ts15.factory.createArrayLiteralExpression;
27197
27229
  createAssignment(target, operator, value) {
27198
- return ts14.factory.createBinaryExpression(target, this.BINARY_OPERATORS[operator], value);
27230
+ return ts15.factory.createBinaryExpression(target, this.BINARY_OPERATORS[operator], value);
27199
27231
  }
27200
27232
  createBinaryExpression(leftOperand, operator, rightOperand) {
27201
- return ts14.factory.createBinaryExpression(leftOperand, this.BINARY_OPERATORS[operator], rightOperand);
27233
+ return ts15.factory.createBinaryExpression(leftOperand, this.BINARY_OPERATORS[operator], rightOperand);
27202
27234
  }
27203
27235
  createBlock(body) {
27204
- return ts14.factory.createBlock(body);
27236
+ return ts15.factory.createBlock(body);
27205
27237
  }
27206
27238
  createCallExpression(callee, args, pure) {
27207
- const call = ts14.factory.createCallExpression(callee, undefined, args);
27239
+ const call = ts15.factory.createCallExpression(callee, undefined, args);
27208
27240
  if (pure) {
27209
- ts14.addSyntheticLeadingComment(call, ts14.SyntaxKind.MultiLineCommentTrivia, this.annotateForClosureCompiler ? "* @pureOrBreakMyCode " /* CLOSURE */ : "@__PURE__" /* TERSER */, false);
27241
+ ts15.addSyntheticLeadingComment(call, ts15.SyntaxKind.MultiLineCommentTrivia, this.annotateForClosureCompiler ? "* @pureOrBreakMyCode " /* CLOSURE */ : "@__PURE__" /* TERSER */, false);
27210
27242
  }
27211
27243
  return call;
27212
27244
  }
27213
27245
  createConditional(condition, whenTrue, whenFalse) {
27214
- return ts14.factory.createConditionalExpression(condition, undefined, whenTrue, undefined, whenFalse);
27246
+ return ts15.factory.createConditionalExpression(condition, undefined, whenTrue, undefined, whenFalse);
27215
27247
  }
27216
- createElementAccess = ts14.factory.createElementAccessExpression;
27217
- createExpressionStatement = ts14.factory.createExpressionStatement;
27248
+ createElementAccess = ts15.factory.createElementAccessExpression;
27249
+ createExpressionStatement = ts15.factory.createExpressionStatement;
27218
27250
  createDynamicImport(url2) {
27219
- return ts14.factory.createCallExpression(ts14.factory.createToken(ts14.SyntaxKind.ImportKeyword), undefined, [
27220
- typeof url2 === "string" ? ts14.factory.createStringLiteral(url2) : url2
27251
+ return ts15.factory.createCallExpression(ts15.factory.createToken(ts15.SyntaxKind.ImportKeyword), undefined, [
27252
+ typeof url2 === "string" ? ts15.factory.createStringLiteral(url2) : url2
27221
27253
  ]);
27222
27254
  }
27223
27255
  createFunctionDeclaration(functionName, parameters, body) {
27224
- if (!ts14.isBlock(body)) {
27225
- throw new Error(`Invalid syntax, expected a block, but got ${ts14.SyntaxKind[body.kind]}.`);
27256
+ if (!ts15.isBlock(body)) {
27257
+ throw new Error(`Invalid syntax, expected a block, but got ${ts15.SyntaxKind[body.kind]}.`);
27226
27258
  }
27227
- return ts14.factory.createFunctionDeclaration(undefined, undefined, functionName, undefined, parameters.map((param) => this.createParameter(param)), undefined, body);
27259
+ return ts15.factory.createFunctionDeclaration(undefined, undefined, functionName, undefined, parameters.map((param) => this.createParameter(param)), undefined, body);
27228
27260
  }
27229
27261
  createFunctionExpression(functionName, parameters, body) {
27230
- if (!ts14.isBlock(body)) {
27231
- throw new Error(`Invalid syntax, expected a block, but got ${ts14.SyntaxKind[body.kind]}.`);
27262
+ if (!ts15.isBlock(body)) {
27263
+ throw new Error(`Invalid syntax, expected a block, but got ${ts15.SyntaxKind[body.kind]}.`);
27232
27264
  }
27233
- return ts14.factory.createFunctionExpression(undefined, undefined, functionName ?? undefined, undefined, parameters.map((param) => this.createParameter(param)), undefined, body);
27265
+ return ts15.factory.createFunctionExpression(undefined, undefined, functionName ?? undefined, undefined, parameters.map((param) => this.createParameter(param)), undefined, body);
27234
27266
  }
27235
27267
  createArrowFunctionExpression(parameters, body) {
27236
- if (ts14.isStatement(body) && !ts14.isBlock(body)) {
27237
- throw new Error(`Invalid syntax, expected a block, but got ${ts14.SyntaxKind[body.kind]}.`);
27268
+ if (ts15.isStatement(body) && !ts15.isBlock(body)) {
27269
+ throw new Error(`Invalid syntax, expected a block, but got ${ts15.SyntaxKind[body.kind]}.`);
27238
27270
  }
27239
- return ts14.factory.createArrowFunction(undefined, undefined, parameters.map((param) => this.createParameter(param)), undefined, undefined, body);
27271
+ return ts15.factory.createArrowFunction(undefined, undefined, parameters.map((param) => this.createParameter(param)), undefined, undefined, body);
27240
27272
  }
27241
27273
  createParameter(param) {
27242
- return ts14.factory.createParameterDeclaration(undefined, undefined, param.name, undefined, param.type ?? undefined);
27274
+ return ts15.factory.createParameterDeclaration(undefined, undefined, param.name, undefined, param.type ?? undefined);
27243
27275
  }
27244
- createIdentifier = ts14.factory.createIdentifier;
27276
+ createIdentifier = ts15.factory.createIdentifier;
27245
27277
  createIfStatement(condition, thenStatement, elseStatement) {
27246
- return ts14.factory.createIfStatement(condition, thenStatement, elseStatement ?? undefined);
27278
+ return ts15.factory.createIfStatement(condition, thenStatement, elseStatement ?? undefined);
27247
27279
  }
27248
27280
  createLiteral(value) {
27249
27281
  if (value === undefined) {
27250
- return ts14.factory.createIdentifier("undefined");
27282
+ return ts15.factory.createIdentifier("undefined");
27251
27283
  } else if (value === null) {
27252
- return ts14.factory.createNull();
27284
+ return ts15.factory.createNull();
27253
27285
  } else if (typeof value === "boolean") {
27254
- return value ? ts14.factory.createTrue() : ts14.factory.createFalse();
27286
+ return value ? ts15.factory.createTrue() : ts15.factory.createFalse();
27255
27287
  } else if (typeof value === "number") {
27256
27288
  return tsNumericExpression(value);
27257
27289
  } else {
27258
- return ts14.factory.createStringLiteral(value);
27290
+ return ts15.factory.createStringLiteral(value);
27259
27291
  }
27260
27292
  }
27261
27293
  createNewExpression(expression, args) {
27262
- return ts14.factory.createNewExpression(expression, undefined, args);
27294
+ return ts15.factory.createNewExpression(expression, undefined, args);
27263
27295
  }
27264
27296
  createObjectLiteral(properties) {
27265
- return ts14.factory.createObjectLiteralExpression(properties.map((prop) => {
27297
+ return ts15.factory.createObjectLiteralExpression(properties.map((prop) => {
27266
27298
  if (prop.kind === "spread") {
27267
- return ts14.factory.createSpreadAssignment(prop.expression);
27299
+ return ts15.factory.createSpreadAssignment(prop.expression);
27268
27300
  }
27269
- return ts14.factory.createPropertyAssignment(prop.quoted ? ts14.factory.createStringLiteral(prop.propertyName) : ts14.factory.createIdentifier(prop.propertyName), prop.value);
27301
+ return ts15.factory.createPropertyAssignment(prop.quoted ? ts15.factory.createStringLiteral(prop.propertyName) : ts15.factory.createIdentifier(prop.propertyName), prop.value);
27270
27302
  }));
27271
27303
  }
27272
- createParenthesizedExpression = ts14.factory.createParenthesizedExpression;
27273
- createPropertyAccess = ts14.factory.createPropertyAccessExpression;
27274
- createSpreadElement = ts14.factory.createSpreadElement;
27304
+ createParenthesizedExpression = ts15.factory.createParenthesizedExpression;
27305
+ createPropertyAccess = ts15.factory.createPropertyAccessExpression;
27306
+ createSpreadElement = ts15.factory.createSpreadElement;
27275
27307
  createReturnStatement(expression) {
27276
- return ts14.factory.createReturnStatement(expression ?? undefined);
27308
+ return ts15.factory.createReturnStatement(expression ?? undefined);
27277
27309
  }
27278
27310
  createTaggedTemplate(tag, template) {
27279
- return ts14.factory.createTaggedTemplateExpression(tag, undefined, this.createTemplateLiteral(template));
27311
+ return ts15.factory.createTaggedTemplateExpression(tag, undefined, this.createTemplateLiteral(template));
27280
27312
  }
27281
27313
  createTemplateLiteral(template) {
27282
27314
  let templateLiteral;
@@ -27286,7 +27318,7 @@ class TypeScriptAstFactory {
27286
27318
  throw new Error("createTemplateLiteral: template has no elements");
27287
27319
  }
27288
27320
  if (length === 1) {
27289
- templateLiteral = ts14.factory.createNoSubstitutionTemplateLiteral(head.cooked, head.raw);
27321
+ templateLiteral = ts15.factory.createNoSubstitutionTemplateLiteral(head.cooked, head.raw);
27290
27322
  } else {
27291
27323
  const spans = [];
27292
27324
  for (let i = 1;i < length - 1; i++) {
@@ -27300,7 +27332,7 @@ class TypeScriptAstFactory {
27300
27332
  if (range !== null) {
27301
27333
  this.setSourceMapRange(middle, range);
27302
27334
  }
27303
- spans.push(ts14.factory.createTemplateSpan(expression, middle));
27335
+ spans.push(ts15.factory.createTemplateSpan(expression, middle));
27304
27336
  }
27305
27337
  const resolvedExpression = template.expressions[length - 2];
27306
27338
  const templatePart = template.elements[length - 1];
@@ -27311,27 +27343,27 @@ class TypeScriptAstFactory {
27311
27343
  if (templatePart.range !== null) {
27312
27344
  this.setSourceMapRange(templateTail, templatePart.range);
27313
27345
  }
27314
- spans.push(ts14.factory.createTemplateSpan(resolvedExpression, templateTail));
27315
- templateLiteral = ts14.factory.createTemplateExpression(ts14.factory.createTemplateHead(head.cooked, head.raw), spans);
27346
+ spans.push(ts15.factory.createTemplateSpan(resolvedExpression, templateTail));
27347
+ templateLiteral = ts15.factory.createTemplateExpression(ts15.factory.createTemplateHead(head.cooked, head.raw), spans);
27316
27348
  }
27317
27349
  if (head.range !== null) {
27318
27350
  this.setSourceMapRange(templateLiteral, head.range);
27319
27351
  }
27320
27352
  return templateLiteral;
27321
27353
  }
27322
- createThrowStatement = ts14.factory.createThrowStatement;
27323
- createTypeOfExpression = ts14.factory.createTypeOfExpression;
27324
- createVoidExpression = ts14.factory.createVoidExpression;
27354
+ createThrowStatement = ts15.factory.createThrowStatement;
27355
+ createTypeOfExpression = ts15.factory.createTypeOfExpression;
27356
+ createVoidExpression = ts15.factory.createVoidExpression;
27325
27357
  createUnaryExpression(operator, operand) {
27326
- return ts14.factory.createPrefixUnaryExpression(this.UNARY_OPERATORS[operator], operand);
27358
+ return ts15.factory.createPrefixUnaryExpression(this.UNARY_OPERATORS[operator], operand);
27327
27359
  }
27328
27360
  createVariableDeclaration(variableName, initializer3, variableType, type) {
27329
- return ts14.factory.createVariableStatement(undefined, ts14.factory.createVariableDeclarationList([
27330
- ts14.factory.createVariableDeclaration(variableName, undefined, type ?? undefined, initializer3 ?? undefined)
27361
+ return ts15.factory.createVariableStatement(undefined, ts15.factory.createVariableDeclarationList([
27362
+ ts15.factory.createVariableDeclaration(variableName, undefined, type ?? undefined, initializer3 ?? undefined)
27331
27363
  ], this.VAR_TYPES[variableType]));
27332
27364
  }
27333
27365
  createRegularExpressionLiteral(body, flags) {
27334
- return ts14.factory.createRegularExpressionLiteral(`/${body}/${flags ?? ""}`);
27366
+ return ts15.factory.createRegularExpressionLiteral(`/${body}/${flags ?? ""}`);
27335
27367
  }
27336
27368
  setSourceMapRange(node, sourceMapRange) {
27337
27369
  if (sourceMapRange === null) {
@@ -27339,10 +27371,10 @@ class TypeScriptAstFactory {
27339
27371
  }
27340
27372
  const url2 = sourceMapRange.url;
27341
27373
  if (!this.externalSourceFiles.has(url2)) {
27342
- this.externalSourceFiles.set(url2, ts14.createSourceMapSource(url2, sourceMapRange.content, (pos) => pos));
27374
+ this.externalSourceFiles.set(url2, ts15.createSourceMapSource(url2, sourceMapRange.content, (pos) => pos));
27343
27375
  }
27344
27376
  const source = this.externalSourceFiles.get(url2);
27345
- ts14.setSourceMapRange(node, {
27377
+ ts15.setSourceMapRange(node, {
27346
27378
  pos: sourceMapRange.start.offset,
27347
27379
  end: sourceMapRange.end.offset,
27348
27380
  source
@@ -27352,77 +27384,77 @@ class TypeScriptAstFactory {
27352
27384
  createBuiltInType(type) {
27353
27385
  switch (type) {
27354
27386
  case "any":
27355
- return ts14.factory.createKeywordTypeNode(ts14.SyntaxKind.AnyKeyword);
27387
+ return ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.AnyKeyword);
27356
27388
  case "boolean":
27357
- return ts14.factory.createKeywordTypeNode(ts14.SyntaxKind.BooleanKeyword);
27389
+ return ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.BooleanKeyword);
27358
27390
  case "number":
27359
- return ts14.factory.createKeywordTypeNode(ts14.SyntaxKind.NumberKeyword);
27391
+ return ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.NumberKeyword);
27360
27392
  case "string":
27361
- return ts14.factory.createKeywordTypeNode(ts14.SyntaxKind.StringKeyword);
27393
+ return ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.StringKeyword);
27362
27394
  case "function":
27363
- return ts14.factory.createTypeReferenceNode(ts14.factory.createIdentifier("Function"));
27395
+ return ts15.factory.createTypeReferenceNode(ts15.factory.createIdentifier("Function"));
27364
27396
  case "never":
27365
- return ts14.factory.createKeywordTypeNode(ts14.SyntaxKind.NeverKeyword);
27397
+ return ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.NeverKeyword);
27366
27398
  case "unknown":
27367
- return ts14.factory.createKeywordTypeNode(ts14.SyntaxKind.UnknownKeyword);
27399
+ return ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.UnknownKeyword);
27368
27400
  }
27369
27401
  }
27370
27402
  createExpressionType(expression, typeParams) {
27371
27403
  const typeName = getEntityTypeFromExpression(expression);
27372
- return ts14.factory.createTypeReferenceNode(typeName, typeParams ?? undefined);
27404
+ return ts15.factory.createTypeReferenceNode(typeName, typeParams ?? undefined);
27373
27405
  }
27374
27406
  createArrayType(elementType) {
27375
- return ts14.factory.createArrayTypeNode(elementType);
27407
+ return ts15.factory.createArrayTypeNode(elementType);
27376
27408
  }
27377
27409
  createMapType(valueType) {
27378
- return ts14.factory.createTypeLiteralNode([
27379
- ts14.factory.createIndexSignature(undefined, [
27380
- ts14.factory.createParameterDeclaration(undefined, undefined, "key", undefined, ts14.factory.createKeywordTypeNode(ts14.SyntaxKind.StringKeyword))
27410
+ return ts15.factory.createTypeLiteralNode([
27411
+ ts15.factory.createIndexSignature(undefined, [
27412
+ ts15.factory.createParameterDeclaration(undefined, undefined, "key", undefined, ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.StringKeyword))
27381
27413
  ], valueType)
27382
27414
  ]);
27383
27415
  }
27384
27416
  transplantType(type) {
27385
- if (typeof type.kind === "number" && typeof type.getSourceFile === "function" && ts14.isTypeNode(type)) {
27417
+ if (typeof type.kind === "number" && typeof type.getSourceFile === "function" && ts15.isTypeNode(type)) {
27386
27418
  return type;
27387
27419
  }
27388
27420
  throw new Error("Attempting to transplant a type node from a non-TypeScript AST: " + type);
27389
27421
  }
27390
27422
  }
27391
27423
  function createTemplateMiddle(cooked, raw) {
27392
- const node = ts14.factory.createTemplateHead(cooked, raw);
27393
- node.kind = ts14.SyntaxKind.TemplateMiddle;
27424
+ const node = ts15.factory.createTemplateHead(cooked, raw);
27425
+ node.kind = ts15.SyntaxKind.TemplateMiddle;
27394
27426
  return node;
27395
27427
  }
27396
27428
  function createTemplateTail(cooked, raw) {
27397
- const node = ts14.factory.createTemplateHead(cooked, raw);
27398
- node.kind = ts14.SyntaxKind.TemplateTail;
27429
+ const node = ts15.factory.createTemplateHead(cooked, raw);
27430
+ node.kind = ts15.SyntaxKind.TemplateTail;
27399
27431
  return node;
27400
27432
  }
27401
27433
  function attachComments(statement, leadingComments) {
27402
27434
  for (const comment of leadingComments) {
27403
- const commentKind = comment.multiline ? ts14.SyntaxKind.MultiLineCommentTrivia : ts14.SyntaxKind.SingleLineCommentTrivia;
27435
+ const commentKind = comment.multiline ? ts15.SyntaxKind.MultiLineCommentTrivia : ts15.SyntaxKind.SingleLineCommentTrivia;
27404
27436
  if (comment.multiline) {
27405
- ts14.addSyntheticLeadingComment(statement, commentKind, comment.toString(), comment.trailingNewline);
27437
+ ts15.addSyntheticLeadingComment(statement, commentKind, comment.toString(), comment.trailingNewline);
27406
27438
  } else {
27407
27439
  for (const line of comment.toString().split(`
27408
27440
  `)) {
27409
- ts14.addSyntheticLeadingComment(statement, commentKind, line, comment.trailingNewline);
27441
+ ts15.addSyntheticLeadingComment(statement, commentKind, line, comment.trailingNewline);
27410
27442
  }
27411
27443
  }
27412
27444
  }
27413
27445
  }
27414
27446
  function getEntityTypeFromExpression(expression) {
27415
- if (ts14.isIdentifier(expression)) {
27447
+ if (ts15.isIdentifier(expression)) {
27416
27448
  return expression;
27417
27449
  }
27418
- if (ts14.isPropertyAccessExpression(expression)) {
27450
+ if (ts15.isPropertyAccessExpression(expression)) {
27419
27451
  const left = getEntityTypeFromExpression(expression.expression);
27420
- if (!ts14.isIdentifier(expression.name)) {
27452
+ if (!ts15.isIdentifier(expression.name)) {
27421
27453
  throw new Error(`Unsupported property access for type reference: ${expression.name.text}`);
27422
27454
  }
27423
- return ts14.factory.createQualifiedName(left, expression.name);
27455
+ return ts15.factory.createQualifiedName(left, expression.name);
27424
27456
  }
27425
- throw new Error(`Unsupported expression for type reference: ${ts14.SyntaxKind[expression.kind]}`);
27457
+ throw new Error(`Unsupported expression for type reference: ${ts15.SyntaxKind[expression.kind]}`);
27426
27458
  }
27427
27459
  var init_typescript_ast_factory = __esm(() => {
27428
27460
  init_ts_util();
@@ -27457,7 +27489,7 @@ __export(exports_fastHmrCompiler, {
27457
27489
  });
27458
27490
  import { existsSync as existsSync27, readFileSync as readFileSync24, statSync as statSync2 } from "fs";
27459
27491
  import { dirname as dirname18, extname as extname7, relative as relative13, resolve as resolve25 } from "path";
27460
- import ts15 from "typescript";
27492
+ import ts16 from "typescript";
27461
27493
  var fail = (reason, detail, location) => ({
27462
27494
  ok: false,
27463
27495
  reason,
@@ -27542,23 +27574,23 @@ var fail = (reason, detail, location) => ({
27542
27574
  }
27543
27575
  let sourceFile;
27544
27576
  try {
27545
- sourceFile = ts15.createSourceFile(componentFilePath, source, ts15.ScriptTarget.Latest, true, ts15.ScriptKind.TS);
27577
+ sourceFile = ts16.createSourceFile(componentFilePath, source, ts16.ScriptTarget.Latest, true, ts16.ScriptKind.TS);
27546
27578
  } catch {
27547
27579
  return;
27548
27580
  }
27549
27581
  for (const stmt of sourceFile.statements) {
27550
- if (!ts15.isClassDeclaration(stmt))
27582
+ if (!ts16.isClassDeclaration(stmt))
27551
27583
  continue;
27552
27584
  const className = stmt.name?.text;
27553
27585
  if (!className)
27554
27586
  continue;
27555
- const decorators = ts15.getDecorators(stmt) ?? [];
27587
+ const decorators = ts16.getDecorators(stmt) ?? [];
27556
27588
  const decoratorName = (() => {
27557
27589
  for (const d2 of decorators) {
27558
- if (!ts15.isCallExpression(d2.expression))
27590
+ if (!ts16.isCallExpression(d2.expression))
27559
27591
  continue;
27560
27592
  const expr = d2.expression.expression;
27561
- if (!ts15.isIdentifier(expr))
27593
+ if (!ts16.isIdentifier(expr))
27562
27594
  continue;
27563
27595
  if (expr.text === "Component" || expr.text === "Directive" || expr.text === "Pipe" || expr.text === "Injectable") {
27564
27596
  return expr.text;
@@ -27572,16 +27604,16 @@ var fail = (reason, detail, location) => ({
27572
27604
  const id = encodeURIComponent(`${projectRel}@${className}`);
27573
27605
  if (decoratorName === "Component") {
27574
27606
  const componentDecorator = decorators.find((d2) => {
27575
- if (!ts15.isCallExpression(d2.expression))
27607
+ if (!ts16.isCallExpression(d2.expression))
27576
27608
  return false;
27577
27609
  const expr = d2.expression.expression;
27578
- return ts15.isIdentifier(expr) && expr.text === "Component";
27610
+ return ts16.isIdentifier(expr) && expr.text === "Component";
27579
27611
  });
27580
27612
  if (!componentDecorator)
27581
27613
  continue;
27582
27614
  const decoratorCall = componentDecorator.expression;
27583
27615
  const args = decoratorCall.arguments[0];
27584
- if (!args || !ts15.isObjectLiteralExpression(args))
27616
+ if (!args || !ts16.isObjectLiteralExpression(args))
27585
27617
  continue;
27586
27618
  const decoratorMeta = readDecoratorMeta(args);
27587
27619
  const { inputs, outputs } = extractInputsAndOutputs(stmt, null);
@@ -27614,11 +27646,11 @@ var fail = (reason, detail, location) => ({
27614
27646
  return false;
27615
27647
  return true;
27616
27648
  }, ENTITY_DECORATOR_NAMES, findEntityDecorator = (cls) => {
27617
- for (const dec of ts15.getDecorators(cls) ?? []) {
27649
+ for (const dec of ts16.getDecorators(cls) ?? []) {
27618
27650
  const expr = dec.expression;
27619
- if (!ts15.isCallExpression(expr))
27651
+ if (!ts16.isCallExpression(expr))
27620
27652
  continue;
27621
- if (!ts15.isIdentifier(expr.expression))
27653
+ if (!ts16.isIdentifier(expr.expression))
27622
27654
  continue;
27623
27655
  if (ENTITY_DECORATOR_NAMES.has(expr.expression.text))
27624
27656
  return dec;
@@ -27636,18 +27668,18 @@ var fail = (reason, detail, location) => ({
27636
27668
  }
27637
27669
  const ctorParamTypes = [];
27638
27670
  for (const member of cls.members) {
27639
- if (!ts15.isConstructorDeclaration(member))
27671
+ if (!ts16.isConstructorDeclaration(member))
27640
27672
  continue;
27641
27673
  for (const param of member.parameters) {
27642
27674
  const typeText = param.type ? param.type.getText() : "";
27643
- const decorators = ts15.getDecorators(param) ?? [];
27675
+ const decorators = ts16.getDecorators(param) ?? [];
27644
27676
  const decoratorSig = decorators.length === 0 ? "" : decorators.map((d2) => {
27645
27677
  const e = d2.expression;
27646
- if (ts15.isCallExpression(e) && ts15.isIdentifier(e.expression)) {
27678
+ if (ts16.isCallExpression(e) && ts16.isIdentifier(e.expression)) {
27647
27679
  const args = e.arguments.map((a) => a.getText()).join(",");
27648
27680
  return `@${e.expression.text}(${args})`;
27649
27681
  }
27650
- if (ts15.isIdentifier(e))
27682
+ if (ts16.isIdentifier(e))
27651
27683
  return `@${e.text}`;
27652
27684
  return "@<unknown>";
27653
27685
  }).join("");
@@ -27669,23 +27701,23 @@ var fail = (reason, detail, location) => ({
27669
27701
  const walk = (node) => {
27670
27702
  if (found)
27671
27703
  return;
27672
- if (ts15.isClassDeclaration(node) && node.name?.text === className) {
27704
+ if (ts16.isClassDeclaration(node) && node.name?.text === className) {
27673
27705
  found = node;
27674
27706
  return;
27675
27707
  }
27676
- ts15.forEachChild(node, walk);
27708
+ ts16.forEachChild(node, walk);
27677
27709
  };
27678
27710
  walk(sourceFile);
27679
27711
  return found;
27680
27712
  }, getClassDecorators = (cls) => {
27681
- const modifiers = ts15.getDecorators(cls) ?? [];
27713
+ const modifiers = ts16.getDecorators(cls) ?? [];
27682
27714
  return [...modifiers];
27683
27715
  }, findComponentDecorator = (cls) => {
27684
27716
  for (const decorator of getClassDecorators(cls)) {
27685
27717
  const expr = decorator.expression;
27686
- if (ts15.isCallExpression(expr)) {
27718
+ if (ts16.isCallExpression(expr)) {
27687
27719
  const fn2 = expr.expression;
27688
- if (ts15.isIdentifier(fn2) && fn2.text === "Component") {
27720
+ if (ts16.isIdentifier(fn2) && fn2.text === "Component") {
27689
27721
  return decorator;
27690
27722
  }
27691
27723
  }
@@ -27693,15 +27725,15 @@ var fail = (reason, detail, location) => ({
27693
27725
  return null;
27694
27726
  }, getDecoratorArgsObject = (decorator) => {
27695
27727
  const call = decorator.expression;
27696
- if (!ts15.isCallExpression(call))
27728
+ if (!ts16.isCallExpression(call))
27697
27729
  return null;
27698
27730
  const arg = call.arguments[0];
27699
- if (!arg || !ts15.isObjectLiteralExpression(arg))
27731
+ if (!arg || !ts16.isObjectLiteralExpression(arg))
27700
27732
  return null;
27701
27733
  return arg;
27702
27734
  }, getProperty = (obj, name) => {
27703
27735
  for (const prop of obj.properties) {
27704
- if (ts15.isPropertyAssignment(prop) && (ts15.isIdentifier(prop.name) && prop.name.text === name || ts15.isStringLiteral(prop.name) && prop.name.text === name)) {
27736
+ if (ts16.isPropertyAssignment(prop) && (ts16.isIdentifier(prop.name) && prop.name.text === name || ts16.isStringLiteral(prop.name) && prop.name.text === name)) {
27705
27737
  return prop.initializer;
27706
27738
  }
27707
27739
  }
@@ -27710,7 +27742,7 @@ var fail = (reason, detail, location) => ({
27710
27742
  const expr = getProperty(obj, name);
27711
27743
  if (!expr)
27712
27744
  return null;
27713
- if (ts15.isStringLiteral(expr) || ts15.isNoSubstitutionTemplateLiteral(expr)) {
27745
+ if (ts16.isStringLiteral(expr) || ts16.isNoSubstitutionTemplateLiteral(expr)) {
27714
27746
  return expr.text;
27715
27747
  }
27716
27748
  return null;
@@ -27718,22 +27750,22 @@ var fail = (reason, detail, location) => ({
27718
27750
  const expr = getProperty(obj, name);
27719
27751
  if (!expr)
27720
27752
  return null;
27721
- if (expr.kind === ts15.SyntaxKind.TrueKeyword)
27753
+ if (expr.kind === ts16.SyntaxKind.TrueKeyword)
27722
27754
  return true;
27723
- if (expr.kind === ts15.SyntaxKind.FalseKeyword)
27755
+ if (expr.kind === ts16.SyntaxKind.FalseKeyword)
27724
27756
  return false;
27725
27757
  return null;
27726
27758
  }, isAngularDecoratorIdentifier = (name) => name === "Component" || name === "Directive" || name === "Pipe" || name === "Injectable", classHasAngularDecorator = (cls) => {
27727
- for (const dec of ts15.getDecorators(cls) ?? []) {
27759
+ for (const dec of ts16.getDecorators(cls) ?? []) {
27728
27760
  const expr = dec.expression;
27729
- if (ts15.isCallExpression(expr) && ts15.isIdentifier(expr.expression) && isAngularDecoratorIdentifier(expr.expression.text)) {
27761
+ if (ts16.isCallExpression(expr) && ts16.isIdentifier(expr.expression) && isAngularDecoratorIdentifier(expr.expression.text)) {
27730
27762
  return true;
27731
27763
  }
27732
27764
  }
27733
27765
  return false;
27734
27766
  }, findClassInSourceFile = (sf, className) => {
27735
27767
  for (const stmt of sf.statements) {
27736
- if (ts15.isClassDeclaration(stmt) && stmt.name?.text === className) {
27768
+ if (ts16.isClassDeclaration(stmt) && stmt.name?.text === className) {
27737
27769
  return stmt;
27738
27770
  }
27739
27771
  }
@@ -27743,15 +27775,15 @@ var fail = (reason, detail, location) => ({
27743
27775
  if (sameFile)
27744
27776
  return classHasAngularDecorator(sameFile);
27745
27777
  for (const stmt of sourceFile.statements) {
27746
- if (!ts15.isImportDeclaration(stmt))
27778
+ if (!ts16.isImportDeclaration(stmt))
27747
27779
  continue;
27748
- if (!ts15.isStringLiteral(stmt.moduleSpecifier))
27780
+ if (!ts16.isStringLiteral(stmt.moduleSpecifier))
27749
27781
  continue;
27750
27782
  const clause = stmt.importClause;
27751
27783
  if (!clause || clause.isTypeOnly)
27752
27784
  continue;
27753
27785
  const named = clause.namedBindings;
27754
- if (!named || !ts15.isNamedImports(named))
27786
+ if (!named || !ts16.isNamedImports(named))
27755
27787
  continue;
27756
27788
  const found = named.elements.find((el) => el.name.text === parentClassName);
27757
27789
  if (!found)
@@ -27776,7 +27808,7 @@ var fail = (reason, detail, location) => ({
27776
27808
  } catch {
27777
27809
  continue;
27778
27810
  }
27779
- const parentSf = ts15.createSourceFile(candidate, content, ts15.ScriptTarget.Latest, true);
27811
+ const parentSf = ts16.createSourceFile(candidate, content, ts16.ScriptTarget.Latest, true);
27780
27812
  const parentCls = findClassInSourceFile(parentSf, parentClassName);
27781
27813
  if (!parentCls)
27782
27814
  continue;
@@ -27788,11 +27820,11 @@ var fail = (reason, detail, location) => ({
27788
27820
  }, inheritsDecoratedClass = (cls, sourceFile, componentDir, projectRoot) => {
27789
27821
  const heritage = cls.heritageClauses ?? [];
27790
27822
  for (const clause of heritage) {
27791
- if (clause.token !== ts15.SyntaxKind.ExtendsKeyword)
27823
+ if (clause.token !== ts16.SyntaxKind.ExtendsKeyword)
27792
27824
  continue;
27793
27825
  for (const typeNode of clause.types) {
27794
27826
  const expr = typeNode.expression;
27795
- if (!ts15.isIdentifier(expr)) {
27827
+ if (!ts16.isIdentifier(expr)) {
27796
27828
  return true;
27797
27829
  }
27798
27830
  if (parentHasAngularDecoratorAcrossFiles(expr.text, sourceFile, componentDir, projectRoot)) {
@@ -27803,18 +27835,18 @@ var fail = (reason, detail, location) => ({
27803
27835
  return false;
27804
27836
  }, CONTROL_CREATE_METHOD_NAME = "\u0275ngControlCreate", extractControlCreate = (cls) => {
27805
27837
  for (const member of cls.members) {
27806
- if (!ts15.isMethodDeclaration(member))
27838
+ if (!ts16.isMethodDeclaration(member))
27807
27839
  continue;
27808
- if (member.modifiers?.some((m) => m.kind === ts15.SyntaxKind.StaticKeyword))
27840
+ if (member.modifiers?.some((m) => m.kind === ts16.SyntaxKind.StaticKeyword))
27809
27841
  continue;
27810
27842
  const { name } = member;
27811
27843
  if (name === undefined)
27812
27844
  continue;
27813
- const nameText = ts15.isIdentifier(name) ? name.text : name.getText();
27845
+ const nameText = ts16.isIdentifier(name) ? name.text : name.getText();
27814
27846
  if (nameText !== CONTROL_CREATE_METHOD_NAME)
27815
27847
  continue;
27816
27848
  const firstParam = member.parameters[0];
27817
- if (firstParam === undefined || firstParam.type === undefined || !ts15.isTypeReferenceNode(firstParam.type)) {
27849
+ if (firstParam === undefined || firstParam.type === undefined || !ts16.isTypeReferenceNode(firstParam.type)) {
27818
27850
  return { passThroughInput: null };
27819
27851
  }
27820
27852
  const typeArgs = firstParam.type.typeArguments;
@@ -27822,16 +27854,16 @@ var fail = (reason, detail, location) => ({
27822
27854
  return { passThroughInput: null };
27823
27855
  }
27824
27856
  const arg = typeArgs[0];
27825
- if (arg === undefined || !ts15.isLiteralTypeNode(arg) || !ts15.isStringLiteral(arg.literal)) {
27857
+ if (arg === undefined || !ts16.isLiteralTypeNode(arg) || !ts16.isStringLiteral(arg.literal)) {
27826
27858
  return { passThroughInput: null };
27827
27859
  }
27828
27860
  return { passThroughInput: arg.literal.text };
27829
27861
  }
27830
27862
  return null;
27831
27863
  }, resolveEnumPropertyAccess = (expr, enumName, values) => {
27832
- if (!ts15.isPropertyAccessExpression(expr))
27864
+ if (!ts16.isPropertyAccessExpression(expr))
27833
27865
  return null;
27834
- if (!ts15.isIdentifier(expr.expression))
27866
+ if (!ts16.isIdentifier(expr.expression))
27835
27867
  return null;
27836
27868
  if (expr.expression.text !== enumName)
27837
27869
  return null;
@@ -27850,21 +27882,21 @@ var fail = (reason, detail, location) => ({
27850
27882
  const hostExpr = getProperty(args, "host");
27851
27883
  const schemasExpr = getProperty(args, "schemas");
27852
27884
  const styleUrls = [];
27853
- if (styleUrlsExpr && ts15.isArrayLiteralExpression(styleUrlsExpr)) {
27885
+ if (styleUrlsExpr && ts16.isArrayLiteralExpression(styleUrlsExpr)) {
27854
27886
  for (const el of styleUrlsExpr.elements) {
27855
- if (ts15.isStringLiteral(el))
27887
+ if (ts16.isStringLiteral(el))
27856
27888
  styleUrls.push(el.text);
27857
27889
  }
27858
27890
  }
27859
27891
  const styles = [];
27860
27892
  if (stylesExpr) {
27861
- if (ts15.isArrayLiteralExpression(stylesExpr)) {
27893
+ if (ts16.isArrayLiteralExpression(stylesExpr)) {
27862
27894
  for (const el of stylesExpr.elements) {
27863
- if (ts15.isStringLiteral(el) || ts15.isNoSubstitutionTemplateLiteral(el)) {
27895
+ if (ts16.isStringLiteral(el) || ts16.isNoSubstitutionTemplateLiteral(el)) {
27864
27896
  styles.push(el.text);
27865
27897
  }
27866
27898
  }
27867
- } else if (ts15.isStringLiteral(stylesExpr) || ts15.isNoSubstitutionTemplateLiteral(stylesExpr)) {
27899
+ } else if (ts16.isStringLiteral(stylesExpr) || ts16.isNoSubstitutionTemplateLiteral(stylesExpr)) {
27868
27900
  styles.push(stylesExpr.text);
27869
27901
  }
27870
27902
  }
@@ -27877,15 +27909,15 @@ var fail = (reason, detail, location) => ({
27877
27909
  encapsulation,
27878
27910
  hasProviders: getProperty(args, "providers") !== null,
27879
27911
  hasViewProviders: getProperty(args, "viewProviders") !== null,
27880
- importsExpr: importsExpr && ts15.isArrayLiteralExpression(importsExpr) ? importsExpr : null,
27881
- hostDirectivesExpr: hostDirectivesExpr && ts15.isArrayLiteralExpression(hostDirectivesExpr) ? hostDirectivesExpr : null,
27882
- animationsExpr: animationsExpr && ts15.isArrayLiteralExpression(animationsExpr) ? animationsExpr : null,
27883
- providersExpr: providersExpr && ts15.isArrayLiteralExpression(providersExpr) ? providersExpr : null,
27884
- viewProvidersExpr: viewProvidersExpr && ts15.isArrayLiteralExpression(viewProvidersExpr) ? viewProvidersExpr : null,
27885
- inputsArrayExpr: inputsArrayExpr && ts15.isArrayLiteralExpression(inputsArrayExpr) ? inputsArrayExpr : null,
27886
- outputsArrayExpr: outputsArrayExpr && ts15.isArrayLiteralExpression(outputsArrayExpr) ? outputsArrayExpr : null,
27887
- hostExpr: hostExpr && ts15.isObjectLiteralExpression(hostExpr) ? hostExpr : null,
27888
- schemasExpr: schemasExpr && ts15.isArrayLiteralExpression(schemasExpr) ? schemasExpr : null,
27912
+ importsExpr: importsExpr && ts16.isArrayLiteralExpression(importsExpr) ? importsExpr : null,
27913
+ hostDirectivesExpr: hostDirectivesExpr && ts16.isArrayLiteralExpression(hostDirectivesExpr) ? hostDirectivesExpr : null,
27914
+ animationsExpr: animationsExpr && ts16.isArrayLiteralExpression(animationsExpr) ? animationsExpr : null,
27915
+ providersExpr: providersExpr && ts16.isArrayLiteralExpression(providersExpr) ? providersExpr : null,
27916
+ viewProvidersExpr: viewProvidersExpr && ts16.isArrayLiteralExpression(viewProvidersExpr) ? viewProvidersExpr : null,
27917
+ inputsArrayExpr: inputsArrayExpr && ts16.isArrayLiteralExpression(inputsArrayExpr) ? inputsArrayExpr : null,
27918
+ outputsArrayExpr: outputsArrayExpr && ts16.isArrayLiteralExpression(outputsArrayExpr) ? outputsArrayExpr : null,
27919
+ hostExpr: hostExpr && ts16.isObjectLiteralExpression(hostExpr) ? hostExpr : null,
27920
+ schemasExpr: schemasExpr && ts16.isArrayLiteralExpression(schemasExpr) ? schemasExpr : null,
27889
27921
  preserveWhitespaces: getBooleanProperty(args, "preserveWhitespaces") ?? projectDefaults.preserveWhitespaces ?? false,
27890
27922
  selector: getStringProperty(args, "selector"),
27891
27923
  standalone: getBooleanProperty(args, "standalone") ?? true,
@@ -27896,13 +27928,13 @@ var fail = (reason, detail, location) => ({
27896
27928
  templateUrl: getStringProperty(args, "templateUrl")
27897
27929
  };
27898
27930
  }, extractDecoratorInput = (prop, compiler) => {
27899
- const decorators = ts15.getDecorators(prop) ?? [];
27931
+ const decorators = ts16.getDecorators(prop) ?? [];
27900
27932
  for (const decorator of decorators) {
27901
27933
  const expr = decorator.expression;
27902
- if (!ts15.isCallExpression(expr))
27934
+ if (!ts16.isCallExpression(expr))
27903
27935
  continue;
27904
27936
  const fn2 = expr.expression;
27905
- if (!ts15.isIdentifier(fn2) || fn2.text !== "Input")
27937
+ if (!ts16.isIdentifier(fn2) || fn2.text !== "Input")
27906
27938
  continue;
27907
27939
  const classPropertyName = prop.name.getText();
27908
27940
  let bindingPropertyName = classPropertyName;
@@ -27910,9 +27942,9 @@ var fail = (reason, detail, location) => ({
27910
27942
  let transformFunction = null;
27911
27943
  const arg = expr.arguments[0];
27912
27944
  if (arg) {
27913
- if (ts15.isStringLiteral(arg)) {
27945
+ if (ts16.isStringLiteral(arg)) {
27914
27946
  bindingPropertyName = arg.text;
27915
- } else if (ts15.isObjectLiteralExpression(arg)) {
27947
+ } else if (ts16.isObjectLiteralExpression(arg)) {
27916
27948
  const aliasNode = getStringProperty(arg, "alias");
27917
27949
  if (aliasNode !== null)
27918
27950
  bindingPropertyName = aliasNode;
@@ -27936,11 +27968,11 @@ var fail = (reason, detail, location) => ({
27936
27968
  }
27937
27969
  return null;
27938
27970
  }, isInputSignalCall = (init) => {
27939
- if (ts15.isCallExpression(init)) {
27971
+ if (ts16.isCallExpression(init)) {
27940
27972
  const fn2 = init.expression;
27941
- if (ts15.isIdentifier(fn2) && fn2.text === "input")
27973
+ if (ts16.isIdentifier(fn2) && fn2.text === "input")
27942
27974
  return true;
27943
- if (ts15.isPropertyAccessExpression(fn2) && ts15.isIdentifier(fn2.expression) && fn2.expression.text === "input") {
27975
+ if (ts16.isPropertyAccessExpression(fn2) && ts16.isIdentifier(fn2.expression) && fn2.expression.text === "input") {
27944
27976
  return true;
27945
27977
  }
27946
27978
  }
@@ -27951,13 +27983,13 @@ var fail = (reason, detail, location) => ({
27951
27983
  const classPropertyName = prop.name.getText();
27952
27984
  const call = prop.initializer;
27953
27985
  let required2 = false;
27954
- if (ts15.isPropertyAccessExpression(call.expression) && ts15.isIdentifier(call.expression.name) && call.expression.name.text === "required") {
27986
+ if (ts16.isPropertyAccessExpression(call.expression) && ts16.isIdentifier(call.expression.name) && call.expression.name.text === "required") {
27955
27987
  required2 = true;
27956
27988
  }
27957
27989
  let bindingPropertyName = classPropertyName;
27958
27990
  let transformFunction = null;
27959
27991
  const optsArg = call.arguments[required2 ? 0 : 1];
27960
- if (optsArg && ts15.isObjectLiteralExpression(optsArg)) {
27992
+ if (optsArg && ts16.isObjectLiteralExpression(optsArg)) {
27961
27993
  const aliasNode = getStringProperty(optsArg, "alias");
27962
27994
  if (aliasNode !== null)
27963
27995
  bindingPropertyName = aliasNode;
@@ -27977,28 +28009,28 @@ var fail = (reason, detail, location) => ({
27977
28009
  }
27978
28010
  };
27979
28011
  }, extractDecoratorOutput = (prop) => {
27980
- const decorators = ts15.getDecorators(prop) ?? [];
28012
+ const decorators = ts16.getDecorators(prop) ?? [];
27981
28013
  for (const decorator of decorators) {
27982
28014
  const expr = decorator.expression;
27983
- if (!ts15.isCallExpression(expr))
28015
+ if (!ts16.isCallExpression(expr))
27984
28016
  continue;
27985
28017
  const fn2 = expr.expression;
27986
- if (!ts15.isIdentifier(fn2) || fn2.text !== "Output")
28018
+ if (!ts16.isIdentifier(fn2) || fn2.text !== "Output")
27987
28019
  continue;
27988
28020
  const classPropertyName = prop.name.getText();
27989
28021
  let bindingName = classPropertyName;
27990
28022
  const arg = expr.arguments[0];
27991
- if (arg && ts15.isStringLiteral(arg))
28023
+ if (arg && ts16.isStringLiteral(arg))
27992
28024
  bindingName = arg.text;
27993
28025
  return { bindingName, classPropertyName };
27994
28026
  }
27995
28027
  return null;
27996
28028
  }, isOutputSignalCall = (init) => {
27997
- if (ts15.isCallExpression(init)) {
28029
+ if (ts16.isCallExpression(init)) {
27998
28030
  const fn2 = init.expression;
27999
- if (ts15.isIdentifier(fn2) && fn2.text === "output")
28031
+ if (ts16.isIdentifier(fn2) && fn2.text === "output")
28000
28032
  return true;
28001
- if (ts15.isPropertyAccessExpression(fn2) && ts15.isIdentifier(fn2.expression) && fn2.expression.text === "output") {
28033
+ if (ts16.isPropertyAccessExpression(fn2) && ts16.isIdentifier(fn2.expression) && fn2.expression.text === "output") {
28002
28034
  return true;
28003
28035
  }
28004
28036
  }
@@ -28010,7 +28042,7 @@ var fail = (reason, detail, location) => ({
28010
28042
  const call = prop.initializer;
28011
28043
  let bindingName = classPropertyName;
28012
28044
  const optsArg = call.arguments[0];
28013
- if (optsArg && ts15.isObjectLiteralExpression(optsArg)) {
28045
+ if (optsArg && ts16.isObjectLiteralExpression(optsArg)) {
28014
28046
  const aliasNode = getStringProperty(optsArg, "alias");
28015
28047
  if (aliasNode !== null)
28016
28048
  bindingName = aliasNode;
@@ -28022,7 +28054,7 @@ var fail = (reason, detail, location) => ({
28022
28054
  let hasDecoratorIO = false;
28023
28055
  let hasSignalIO = false;
28024
28056
  for (const member of cls.members) {
28025
- if (!ts15.isPropertyDeclaration(member))
28057
+ if (!ts16.isPropertyDeclaration(member))
28026
28058
  continue;
28027
28059
  const decoratorIn = extractDecoratorInput(member, compiler);
28028
28060
  if (decoratorIn) {
@@ -28056,21 +28088,21 @@ var fail = (reason, detail, location) => ({
28056
28088
  specialAttributes: {}
28057
28089
  }), parseHostObjectInto = (host, args, hostExprNode, compiler) => {
28058
28090
  const hostNode = getProperty(args, "host");
28059
- if (!hostNode || !ts15.isObjectLiteralExpression(hostNode)) {
28091
+ if (!hostNode || !ts16.isObjectLiteralExpression(hostNode)) {
28060
28092
  if (!hostExprNode)
28061
28093
  return;
28062
28094
  }
28063
- const obj = hostNode && ts15.isObjectLiteralExpression(hostNode) ? hostNode : hostExprNode;
28095
+ const obj = hostNode && ts16.isObjectLiteralExpression(hostNode) ? hostNode : hostExprNode;
28064
28096
  if (!obj)
28065
28097
  return;
28066
28098
  for (const prop of obj.properties) {
28067
- if (!ts15.isPropertyAssignment(prop))
28099
+ if (!ts16.isPropertyAssignment(prop))
28068
28100
  continue;
28069
28101
  const keyNode = prop.name;
28070
28102
  let key;
28071
- if (ts15.isStringLiteral(keyNode) || ts15.isNoSubstitutionTemplateLiteral(keyNode)) {
28103
+ if (ts16.isStringLiteral(keyNode) || ts16.isNoSubstitutionTemplateLiteral(keyNode)) {
28072
28104
  key = keyNode.text;
28073
- } else if (ts15.isIdentifier(keyNode)) {
28105
+ } else if (ts16.isIdentifier(keyNode)) {
28074
28106
  key = keyNode.text;
28075
28107
  } else {
28076
28108
  continue;
@@ -28087,36 +28119,36 @@ var fail = (reason, detail, location) => ({
28087
28119
  }
28088
28120
  }, mergeMemberHostDecorators = (host, cls) => {
28089
28121
  for (const member of cls.members) {
28090
- if (!ts15.canHaveDecorators(member))
28122
+ if (!ts16.canHaveDecorators(member))
28091
28123
  continue;
28092
- const decorators = ts15.getDecorators(member) ?? [];
28124
+ const decorators = ts16.getDecorators(member) ?? [];
28093
28125
  for (const dec of decorators) {
28094
28126
  const expr = dec.expression;
28095
- if (!ts15.isCallExpression(expr))
28127
+ if (!ts16.isCallExpression(expr))
28096
28128
  continue;
28097
28129
  const fn2 = expr.expression;
28098
- if (!ts15.isIdentifier(fn2))
28130
+ if (!ts16.isIdentifier(fn2))
28099
28131
  continue;
28100
28132
  if (fn2.text === "HostBinding") {
28101
- if (!ts15.isPropertyDeclaration(member) && !ts15.isGetAccessor(member))
28133
+ if (!ts16.isPropertyDeclaration(member) && !ts16.isGetAccessor(member))
28102
28134
  continue;
28103
- const propertyName = member.name.text;
28135
+ const propertyName2 = member.name.text;
28104
28136
  const target = expr.arguments[0];
28105
- const key = target && ts15.isStringLiteral(target) ? target.text : propertyName;
28106
- host.properties[key] = propertyName;
28137
+ const key = target && ts16.isStringLiteral(target) ? target.text : propertyName2;
28138
+ host.properties[key] = propertyName2;
28107
28139
  } else if (fn2.text === "HostListener") {
28108
- if (!ts15.isMethodDeclaration(member))
28140
+ if (!ts16.isMethodDeclaration(member))
28109
28141
  continue;
28110
28142
  const methodName = member.name.text;
28111
28143
  const eventArg = expr.arguments[0];
28112
- if (!eventArg || !ts15.isStringLiteral(eventArg))
28144
+ if (!eventArg || !ts16.isStringLiteral(eventArg))
28113
28145
  continue;
28114
28146
  const event = eventArg.text;
28115
28147
  const argsArg = expr.arguments[1];
28116
28148
  const argsList = [];
28117
- if (argsArg && ts15.isArrayLiteralExpression(argsArg)) {
28149
+ if (argsArg && ts16.isArrayLiteralExpression(argsArg)) {
28118
28150
  for (const el of argsArg.elements) {
28119
- if (ts15.isStringLiteral(el))
28151
+ if (ts16.isStringLiteral(el))
28120
28152
  argsList.push(el.text);
28121
28153
  }
28122
28154
  }
@@ -28129,14 +28161,14 @@ var fail = (reason, detail, location) => ({
28129
28161
  let descendants = true;
28130
28162
  let emitDistinctChangesOnly = true;
28131
28163
  const opts = args[1];
28132
- if (opts && ts15.isObjectLiteralExpression(opts)) {
28164
+ if (opts && ts16.isObjectLiteralExpression(opts)) {
28133
28165
  static_ = getBooleanProperty(opts, "static") ?? false;
28134
28166
  descendants = getBooleanProperty(opts, "descendants") ?? true;
28135
28167
  emitDistinctChangesOnly = getBooleanProperty(opts, "emitDistinctChangesOnly") ?? true;
28136
28168
  }
28137
28169
  return { descendants, emitDistinctChangesOnly, static_ };
28138
28170
  }, queryPredicateFromArg = (arg, compiler) => {
28139
- if (ts15.isStringLiteral(arg)) {
28171
+ if (ts16.isStringLiteral(arg)) {
28140
28172
  return arg.text.split(",").map((s2) => s2.trim()).filter(Boolean);
28141
28173
  }
28142
28174
  return {
@@ -28147,17 +28179,17 @@ var fail = (reason, detail, location) => ({
28147
28179
  const contentQueries = [];
28148
28180
  const viewQueries = [];
28149
28181
  for (const member of cls.members) {
28150
- if (!ts15.isPropertyDeclaration(member))
28182
+ if (!ts16.isPropertyDeclaration(member))
28151
28183
  continue;
28152
- const decorators = ts15.getDecorators(member) ?? [];
28184
+ const decorators = ts16.getDecorators(member) ?? [];
28153
28185
  for (const dec of decorators) {
28154
28186
  const expr = dec.expression;
28155
- if (!ts15.isCallExpression(expr))
28187
+ if (!ts16.isCallExpression(expr))
28156
28188
  continue;
28157
28189
  const fn2 = expr.expression;
28158
- if (!ts15.isIdentifier(fn2) || !QUERY_DECORATORS.has(fn2.text))
28190
+ if (!ts16.isIdentifier(fn2) || !QUERY_DECORATORS.has(fn2.text))
28159
28191
  continue;
28160
- const propertyName = member.name.text;
28192
+ const propertyName2 = member.name.text;
28161
28193
  const tokenArg = expr.arguments[0];
28162
28194
  if (!tokenArg)
28163
28195
  continue;
@@ -28167,7 +28199,7 @@ var fail = (reason, detail, location) => ({
28167
28199
  const { static_, descendants, emitDistinctChangesOnly } = parseQueryDecoratorOptions(expr.arguments);
28168
28200
  const opts = expr.arguments[1];
28169
28201
  let read = null;
28170
- if (opts && ts15.isObjectLiteralExpression(opts)) {
28202
+ if (opts && ts16.isObjectLiteralExpression(opts)) {
28171
28203
  const readNode = getProperty(opts, "read");
28172
28204
  if (readNode) {
28173
28205
  read = new compiler.WrappedNodeExpr(readNode);
@@ -28179,7 +28211,7 @@ var fail = (reason, detail, location) => ({
28179
28211
  first: fn2.text === "ViewChild" || fn2.text === "ContentChild",
28180
28212
  isSignal: false,
28181
28213
  predicate,
28182
- propertyName,
28214
+ propertyName: propertyName2,
28183
28215
  read,
28184
28216
  static: static_
28185
28217
  };
@@ -28195,15 +28227,15 @@ var fail = (reason, detail, location) => ({
28195
28227
  const contentQueries = [];
28196
28228
  const viewQueries = [];
28197
28229
  for (const member of cls.members) {
28198
- if (!ts15.isPropertyDeclaration(member) || !member.initializer)
28230
+ if (!ts16.isPropertyDeclaration(member) || !member.initializer)
28199
28231
  continue;
28200
28232
  const init = member.initializer;
28201
- if (!ts15.isCallExpression(init))
28233
+ if (!ts16.isCallExpression(init))
28202
28234
  continue;
28203
28235
  let queryName;
28204
- if (ts15.isIdentifier(init.expression)) {
28236
+ if (ts16.isIdentifier(init.expression)) {
28205
28237
  queryName = init.expression.text;
28206
- } else if (ts15.isPropertyAccessExpression(init.expression) && ts15.isIdentifier(init.expression.expression) && init.expression.name.text === "required") {
28238
+ } else if (ts16.isPropertyAccessExpression(init.expression) && ts16.isIdentifier(init.expression.expression) && init.expression.name.text === "required") {
28207
28239
  queryName = init.expression.expression.text;
28208
28240
  } else {
28209
28241
  continue;
@@ -28211,7 +28243,7 @@ var fail = (reason, detail, location) => ({
28211
28243
  const runtime = SIGNAL_QUERY_TO_RUNTIME[queryName];
28212
28244
  if (!runtime)
28213
28245
  continue;
28214
- const propertyName = member.name.text;
28246
+ const propertyName2 = member.name.text;
28215
28247
  const tokenArg = init.arguments[0];
28216
28248
  if (!tokenArg)
28217
28249
  continue;
@@ -28221,7 +28253,7 @@ var fail = (reason, detail, location) => ({
28221
28253
  let descendants = true;
28222
28254
  let read = null;
28223
28255
  const opts = init.arguments[1];
28224
- if (opts && ts15.isObjectLiteralExpression(opts)) {
28256
+ if (opts && ts16.isObjectLiteralExpression(opts)) {
28225
28257
  descendants = getBooleanProperty(opts, "descendants") ?? true;
28226
28258
  const readNode = getProperty(opts, "read");
28227
28259
  if (readNode)
@@ -28233,7 +28265,7 @@ var fail = (reason, detail, location) => ({
28233
28265
  first: runtime.first,
28234
28266
  isSignal: true,
28235
28267
  predicate,
28236
- propertyName,
28268
+ propertyName: propertyName2,
28237
28269
  read,
28238
28270
  static: false
28239
28271
  };
@@ -28247,13 +28279,13 @@ var fail = (reason, detail, location) => ({
28247
28279
  const node = getProperty(args, "exportAs");
28248
28280
  if (!node)
28249
28281
  return null;
28250
- if (ts15.isStringLiteral(node)) {
28282
+ if (ts16.isStringLiteral(node)) {
28251
28283
  return node.text.split(",").map((s2) => s2.trim()).filter(Boolean);
28252
28284
  }
28253
- if (ts15.isArrayLiteralExpression(node)) {
28285
+ if (ts16.isArrayLiteralExpression(node)) {
28254
28286
  const out = [];
28255
28287
  for (const el of node.elements) {
28256
- if (ts15.isStringLiteral(el))
28288
+ if (ts16.isStringLiteral(el))
28257
28289
  out.push(el.text);
28258
28290
  }
28259
28291
  return out.length > 0 ? out : null;
@@ -28261,11 +28293,11 @@ var fail = (reason, detail, location) => ({
28261
28293
  return null;
28262
28294
  }, extractHostDirectives = (args, compiler) => {
28263
28295
  const node = getProperty(args, "hostDirectives");
28264
- if (!node || !ts15.isArrayLiteralExpression(node))
28296
+ if (!node || !ts16.isArrayLiteralExpression(node))
28265
28297
  return null;
28266
28298
  const out = [];
28267
28299
  for (const el of node.elements) {
28268
- if (ts15.isIdentifier(el)) {
28300
+ if (ts16.isIdentifier(el)) {
28269
28301
  out.push({
28270
28302
  directive: {
28271
28303
  type: new compiler.WrappedNodeExpr(el),
@@ -28277,7 +28309,7 @@ var fail = (reason, detail, location) => ({
28277
28309
  });
28278
28310
  continue;
28279
28311
  }
28280
- if (!ts15.isObjectLiteralExpression(el))
28312
+ if (!ts16.isObjectLiteralExpression(el))
28281
28313
  continue;
28282
28314
  const directiveNode = getProperty(el, "directive");
28283
28315
  if (!directiveNode)
@@ -28285,11 +28317,11 @@ var fail = (reason, detail, location) => ({
28285
28317
  const inputsNode = getProperty(el, "inputs");
28286
28318
  const outputsNode = getProperty(el, "outputs");
28287
28319
  const collectMap = (n) => {
28288
- if (!n || !ts15.isArrayLiteralExpression(n))
28320
+ if (!n || !ts16.isArrayLiteralExpression(n))
28289
28321
  return null;
28290
28322
  const map3 = {};
28291
28323
  for (const item of n.elements) {
28292
- if (!ts15.isStringLiteral(item))
28324
+ if (!ts16.isStringLiteral(item))
28293
28325
  continue;
28294
28326
  const [name, alias] = item.text.split(":").map((s2) => s2.trim());
28295
28327
  if (name)
@@ -28359,10 +28391,10 @@ var fail = (reason, detail, location) => ({
28359
28391
  });
28360
28392
  return null;
28361
28393
  }
28362
- const sf = ts15.createSourceFile(filePath, source, ts15.ScriptTarget.Latest, true);
28394
+ const sf = ts16.createSourceFile(filePath, source, ts16.ScriptTarget.Latest, true);
28363
28395
  let info = null;
28364
28396
  for (const stmt of sf.statements) {
28365
- if (!ts15.isClassDeclaration(stmt))
28397
+ if (!ts16.isClassDeclaration(stmt))
28366
28398
  continue;
28367
28399
  if (!stmt.name || stmt.name.text !== className)
28368
28400
  continue;
@@ -28497,9 +28529,9 @@ var fail = (reason, detail, location) => ({
28497
28529
  }, buildClassToSpecMap = (sourceFile) => {
28498
28530
  const result = new Map;
28499
28531
  for (const stmt of sourceFile.statements) {
28500
- if (!ts15.isImportDeclaration(stmt))
28532
+ if (!ts16.isImportDeclaration(stmt))
28501
28533
  continue;
28502
- if (!ts15.isStringLiteral(stmt.moduleSpecifier))
28534
+ if (!ts16.isStringLiteral(stmt.moduleSpecifier))
28503
28535
  continue;
28504
28536
  const spec = stmt.moduleSpecifier.text;
28505
28537
  const clause = stmt.importClause;
@@ -28508,7 +28540,7 @@ var fail = (reason, detail, location) => ({
28508
28540
  if (clause.name)
28509
28541
  result.set(clause.name.text, spec);
28510
28542
  const named = clause.namedBindings;
28511
- if (named && ts15.isNamedImports(named)) {
28543
+ if (named && ts16.isNamedImports(named)) {
28512
28544
  for (const el of named.elements) {
28513
28545
  if (el.isTypeOnly)
28514
28546
  continue;
@@ -28621,7 +28653,7 @@ var fail = (reason, detail, location) => ({
28621
28653
  return result;
28622
28654
  const classToSpec = buildClassToSpecMap(sourceFile);
28623
28655
  for (const el of importsExpr.elements) {
28624
- if (!ts15.isIdentifier(el))
28656
+ if (!ts16.isIdentifier(el))
28625
28657
  continue;
28626
28658
  const className = el.text;
28627
28659
  const spec = classToSpec.get(className);
@@ -28640,35 +28672,35 @@ var fail = (reason, detail, location) => ({
28640
28672
  }
28641
28673
  return (h2 >>> 0).toString(36);
28642
28674
  }, initializerShapeIsStructural = (node) => {
28643
- if (ts15.isArrowFunction(node) || ts15.isFunctionExpression(node) || ts15.isCallExpression(node) || ts15.isNewExpression(node)) {
28675
+ if (ts16.isArrowFunction(node) || ts16.isFunctionExpression(node) || ts16.isCallExpression(node) || ts16.isNewExpression(node)) {
28644
28676
  return true;
28645
28677
  }
28646
- if (ts15.isConditionalExpression(node)) {
28678
+ if (ts16.isConditionalExpression(node)) {
28647
28679
  return initializerShapeIsStructural(node.whenTrue) || initializerShapeIsStructural(node.whenFalse);
28648
28680
  }
28649
- if (ts15.isParenthesizedExpression(node)) {
28681
+ if (ts16.isParenthesizedExpression(node)) {
28650
28682
  return initializerShapeIsStructural(node.expression);
28651
28683
  }
28652
- if (ts15.isAsExpression(node) || ts15.isTypeAssertionExpression(node)) {
28684
+ if (ts16.isAsExpression(node) || ts16.isTypeAssertionExpression(node)) {
28653
28685
  return initializerShapeIsStructural(node.expression);
28654
28686
  }
28655
- if (ts15.isNonNullExpression(node)) {
28687
+ if (ts16.isNonNullExpression(node)) {
28656
28688
  return initializerShapeIsStructural(node.expression);
28657
28689
  }
28658
- if (ts15.isObjectLiteralExpression(node)) {
28690
+ if (ts16.isObjectLiteralExpression(node)) {
28659
28691
  for (const prop of node.properties) {
28660
- if (ts15.isPropertyAssignment(prop) && initializerShapeIsStructural(prop.initializer)) {
28692
+ if (ts16.isPropertyAssignment(prop) && initializerShapeIsStructural(prop.initializer)) {
28661
28693
  return true;
28662
28694
  }
28663
- if (ts15.isShorthandPropertyAssignment(prop))
28695
+ if (ts16.isShorthandPropertyAssignment(prop))
28664
28696
  continue;
28665
- if (ts15.isSpreadAssignment(prop) && initializerShapeIsStructural(prop.expression)) {
28697
+ if (ts16.isSpreadAssignment(prop) && initializerShapeIsStructural(prop.expression)) {
28666
28698
  return true;
28667
28699
  }
28668
28700
  }
28669
28701
  return false;
28670
28702
  }
28671
- if (ts15.isArrayLiteralExpression(node)) {
28703
+ if (ts16.isArrayLiteralExpression(node)) {
28672
28704
  for (const el of node.elements) {
28673
28705
  if (initializerShapeIsStructural(el))
28674
28706
  return true;
@@ -28679,7 +28711,7 @@ var fail = (reason, detail, location) => ({
28679
28711
  }, extractArrowFieldSig = (cls) => {
28680
28712
  const entries = [];
28681
28713
  for (const member of cls.members) {
28682
- if (!ts15.isPropertyDeclaration(member))
28714
+ if (!ts16.isPropertyDeclaration(member))
28683
28715
  continue;
28684
28716
  const init = member.initializer;
28685
28717
  if (!init)
@@ -28689,12 +28721,12 @@ var fail = (reason, detail, location) => ({
28689
28721
  const name = member.name.getText();
28690
28722
  let bodyText;
28691
28723
  try {
28692
- const printer = ts15.createPrinter({
28693
- newLine: ts15.NewLineKind.LineFeed,
28724
+ const printer = ts16.createPrinter({
28725
+ newLine: ts16.NewLineKind.LineFeed,
28694
28726
  omitTrailingSemicolon: true,
28695
28727
  removeComments: true
28696
28728
  });
28697
- bodyText = printer.printNode(ts15.EmitHint.Unspecified, init, cls.getSourceFile());
28729
+ bodyText = printer.printNode(ts16.EmitHint.Unspecified, init, cls.getSourceFile());
28698
28730
  } catch {
28699
28731
  bodyText = init.getText();
28700
28732
  }
@@ -28705,9 +28737,9 @@ var fail = (reason, detail, location) => ({
28705
28737
  }, INPUT_OUTPUT_DECORATORS, extractMemberDecoratorSig = (cls) => {
28706
28738
  const entries = [];
28707
28739
  for (const member of cls.members) {
28708
- if (!ts15.canHaveDecorators(member))
28740
+ if (!ts16.canHaveDecorators(member))
28709
28741
  continue;
28710
- const decorators = ts15.getDecorators(member) ?? [];
28742
+ const decorators = ts16.getDecorators(member) ?? [];
28711
28743
  if (decorators.length === 0)
28712
28744
  continue;
28713
28745
  const memberName = member.name?.getText() ?? "<anon>";
@@ -28715,14 +28747,14 @@ var fail = (reason, detail, location) => ({
28715
28747
  const expr = decorator.expression;
28716
28748
  let decName = "<unknown>";
28717
28749
  let argText = "";
28718
- if (ts15.isCallExpression(expr)) {
28719
- if (ts15.isIdentifier(expr.expression)) {
28750
+ if (ts16.isCallExpression(expr)) {
28751
+ if (ts16.isIdentifier(expr.expression)) {
28720
28752
  decName = expr.expression.text;
28721
28753
  }
28722
28754
  if (expr.arguments.length > 0) {
28723
28755
  argText = expr.arguments.map((a) => a.getText()).join(",");
28724
28756
  }
28725
- } else if (ts15.isIdentifier(expr)) {
28757
+ } else if (ts16.isIdentifier(expr)) {
28726
28758
  decName = expr.text;
28727
28759
  }
28728
28760
  if (INPUT_OUTPUT_DECORATORS.has(decName))
@@ -28747,18 +28779,18 @@ var fail = (reason, detail, location) => ({
28747
28779
  } catch {
28748
28780
  return true;
28749
28781
  }
28750
- const sf = ts15.createSourceFile(filePath, source, ts15.ScriptTarget.ES2022, true, ts15.ScriptKind.TS);
28782
+ const sf = ts16.createSourceFile(filePath, source, ts16.ScriptTarget.ES2022, true, ts16.ScriptKind.TS);
28751
28783
  let hasProviders = false;
28752
28784
  const visit = (node) => {
28753
28785
  if (hasProviders)
28754
28786
  return;
28755
- if (ts15.isClassDeclaration(node)) {
28756
- for (const decorator of ts15.getDecorators(node) ?? []) {
28787
+ if (ts16.isClassDeclaration(node)) {
28788
+ for (const decorator of ts16.getDecorators(node) ?? []) {
28757
28789
  const expr = decorator.expression;
28758
- if (!ts15.isCallExpression(expr))
28790
+ if (!ts16.isCallExpression(expr))
28759
28791
  continue;
28760
28792
  const arg = expr.arguments[0];
28761
- if (!arg || !ts15.isObjectLiteralExpression(arg))
28793
+ if (!arg || !ts16.isObjectLiteralExpression(arg))
28762
28794
  continue;
28763
28795
  if (getProperty(arg, "providers") !== null) {
28764
28796
  hasProviders = true;
@@ -28766,7 +28798,7 @@ var fail = (reason, detail, location) => ({
28766
28798
  }
28767
28799
  }
28768
28800
  }
28769
- ts15.forEachChild(node, visit);
28801
+ ts16.forEachChild(node, visit);
28770
28802
  };
28771
28803
  visit(sf);
28772
28804
  providerProbeCache.set(filePath, {
@@ -28776,10 +28808,10 @@ var fail = (reason, detail, location) => ({
28776
28808
  return hasProviders;
28777
28809
  }, TS_EXTENSIONS, resolveImportSource = (identifierName, sourceFile, componentDir) => {
28778
28810
  for (const stmt of sourceFile.statements) {
28779
- if (!ts15.isImportDeclaration(stmt))
28811
+ if (!ts16.isImportDeclaration(stmt))
28780
28812
  continue;
28781
28813
  const moduleSpec = stmt.moduleSpecifier;
28782
- if (!ts15.isStringLiteral(moduleSpec))
28814
+ if (!ts16.isStringLiteral(moduleSpec))
28783
28815
  continue;
28784
28816
  const spec = moduleSpec.text;
28785
28817
  if (!spec.startsWith(".") && !spec.startsWith("/"))
@@ -28793,7 +28825,7 @@ var fail = (reason, detail, location) => ({
28793
28825
  }
28794
28826
  if (importClause.namedBindings) {
28795
28827
  const nb = importClause.namedBindings;
28796
- if (ts15.isNamespaceImport(nb)) {
28828
+ if (ts16.isNamespaceImport(nb)) {
28797
28829
  if (nb.name.text === identifierName)
28798
28830
  matches = true;
28799
28831
  } else {
@@ -28823,7 +28855,7 @@ var fail = (reason, detail, location) => ({
28823
28855
  return [];
28824
28856
  const sig = [];
28825
28857
  for (const entry of importsExpr.elements) {
28826
- if (ts15.isIdentifier(entry)) {
28858
+ if (ts16.isIdentifier(entry)) {
28827
28859
  const importPath = resolveImportSource(entry.text, sourceFile, componentDir);
28828
28860
  if (importPath) {
28829
28861
  if (fileHasModuleProviders(importPath)) {
@@ -28842,13 +28874,13 @@ var fail = (reason, detail, location) => ({
28842
28874
  }, extractPropertyFieldNames = (cls) => {
28843
28875
  const names = [];
28844
28876
  for (const member of cls.members) {
28845
- if (!ts15.isPropertyDeclaration(member) && !ts15.isMethodDeclaration(member) && !ts15.isGetAccessorDeclaration(member) && !ts15.isSetAccessorDeclaration(member)) {
28877
+ if (!ts16.isPropertyDeclaration(member) && !ts16.isMethodDeclaration(member) && !ts16.isGetAccessorDeclaration(member) && !ts16.isSetAccessorDeclaration(member)) {
28846
28878
  continue;
28847
28879
  }
28848
28880
  const { name } = member;
28849
28881
  if (name === undefined)
28850
28882
  continue;
28851
- const text = ts15.isIdentifier(name) ? name.text : ts15.isStringLiteral(name) || ts15.isNoSubstitutionTemplateLiteral(name) ? name.text : name.getText();
28883
+ const text = ts16.isIdentifier(name) ? name.text : ts16.isStringLiteral(name) || ts16.isNoSubstitutionTemplateLiteral(name) ? name.text : name.getText();
28852
28884
  if (text.length > 0)
28853
28885
  names.push(text);
28854
28886
  }
@@ -28856,7 +28888,7 @@ var fail = (reason, detail, location) => ({
28856
28888
  }, extractTopLevelImports = (sourceFile) => {
28857
28889
  const names = new Set;
28858
28890
  for (const stmt of sourceFile.statements) {
28859
- if (!ts15.isImportDeclaration(stmt))
28891
+ if (!ts16.isImportDeclaration(stmt))
28860
28892
  continue;
28861
28893
  const clause = stmt.importClause;
28862
28894
  if (!clause)
@@ -28868,9 +28900,9 @@ var fail = (reason, detail, location) => ({
28868
28900
  const bindings = clause.namedBindings;
28869
28901
  if (!bindings)
28870
28902
  continue;
28871
- if (ts15.isNamespaceImport(bindings)) {
28903
+ if (ts16.isNamespaceImport(bindings)) {
28872
28904
  names.add(bindings.name.text);
28873
- } else if (ts15.isNamedImports(bindings)) {
28905
+ } else if (ts16.isNamedImports(bindings)) {
28874
28906
  for (const el of bindings.elements) {
28875
28907
  if (el.isTypeOnly)
28876
28908
  continue;
@@ -28882,18 +28914,18 @@ var fail = (reason, detail, location) => ({
28882
28914
  }, extractFingerprint = (cls, className, decoratorMeta, inputs, outputs, sourceFile, componentDir) => {
28883
28915
  const ctorParamTypes = [];
28884
28916
  for (const member of cls.members) {
28885
- if (!ts15.isConstructorDeclaration(member))
28917
+ if (!ts16.isConstructorDeclaration(member))
28886
28918
  continue;
28887
28919
  for (const param of member.parameters) {
28888
28920
  const typeText = param.type ? param.type.getText() : "";
28889
- const decorators = ts15.getDecorators(param) ?? [];
28921
+ const decorators = ts16.getDecorators(param) ?? [];
28890
28922
  const decoratorSig = decorators.length === 0 ? "" : decorators.map((d2) => {
28891
28923
  const expr = d2.expression;
28892
- if (ts15.isCallExpression(expr) && ts15.isIdentifier(expr.expression)) {
28924
+ if (ts16.isCallExpression(expr) && ts16.isIdentifier(expr.expression)) {
28893
28925
  const args = expr.arguments.map((a) => a.getText()).join(",");
28894
28926
  return `@${expr.expression.text}(${args})`;
28895
28927
  }
28896
- if (ts15.isIdentifier(expr)) {
28928
+ if (ts16.isIdentifier(expr)) {
28897
28929
  return `@${expr.text}`;
28898
28930
  }
28899
28931
  return "@<unknown>";
@@ -28909,12 +28941,12 @@ var fail = (reason, detail, location) => ({
28909
28941
  const providerImportSig = extractProviderImportSig(decoratorMeta.importsExpr, sourceFile, componentDir);
28910
28942
  const topLevelImports = extractTopLevelImports(sourceFile);
28911
28943
  const propertyFieldNames = extractPropertyFieldNames(cls);
28912
- const printer = ts15.createPrinter({
28913
- newLine: ts15.NewLineKind.LineFeed,
28944
+ const printer = ts16.createPrinter({
28945
+ newLine: ts16.NewLineKind.LineFeed,
28914
28946
  omitTrailingSemicolon: true,
28915
28947
  removeComments: true
28916
28948
  });
28917
- const canonicalText = (node) => printer.printNode(ts15.EmitHint.Unspecified, node, sourceFile);
28949
+ const canonicalText = (node) => printer.printNode(ts16.EmitHint.Unspecified, node, sourceFile);
28918
28950
  const importsArraySig = decoratorMeta.importsExpr ? djb2Hash(canonicalText(decoratorMeta.importsExpr)) : "";
28919
28951
  const hostDirectivesSig = decoratorMeta.hostDirectivesExpr ? djb2Hash(canonicalText(decoratorMeta.hostDirectivesExpr)) : "";
28920
28952
  const animationsArraySig = decoratorMeta.animationsExpr ? djb2Hash(canonicalText(decoratorMeta.animationsExpr)) : "";
@@ -28927,13 +28959,13 @@ var fail = (reason, detail, location) => ({
28927
28959
  const PAGE_EXPORT_NAMES = new Set(["providers", "routes"]);
28928
28960
  const pageExportEntries = [];
28929
28961
  for (const stmt of sourceFile.statements) {
28930
- if (!ts15.isVariableStatement(stmt))
28962
+ if (!ts16.isVariableStatement(stmt))
28931
28963
  continue;
28932
- const isExported = stmt.modifiers?.some((m) => m.kind === ts15.SyntaxKind.ExportKeyword);
28964
+ const isExported = stmt.modifiers?.some((m) => m.kind === ts16.SyntaxKind.ExportKeyword);
28933
28965
  if (!isExported)
28934
28966
  continue;
28935
28967
  for (const decl of stmt.declarationList.declarations) {
28936
- if (!ts15.isIdentifier(decl.name))
28968
+ if (!ts16.isIdentifier(decl.name))
28937
28969
  continue;
28938
28970
  if (!PAGE_EXPORT_NAMES.has(decl.name.text))
28939
28971
  continue;
@@ -28974,35 +29006,35 @@ var fail = (reason, detail, location) => ({
28974
29006
  }, buildFreshClassMethodsBlock = (classNode, className) => {
28975
29007
  const memberSources = [];
28976
29008
  let hasStatic = false;
28977
- const printer = ts15.createPrinter({ removeComments: true });
29009
+ const printer = ts16.createPrinter({ removeComments: true });
28978
29010
  for (const member of classNode.members) {
28979
- if (ts15.isPropertyDeclaration(member)) {
28980
- const modifiers = (ts15.getModifiers(member) ?? []).filter((m) => m.kind !== ts15.SyntaxKind.PrivateKeyword && m.kind !== ts15.SyntaxKind.PublicKeyword && m.kind !== ts15.SyntaxKind.ProtectedKeyword && m.kind !== ts15.SyntaxKind.ReadonlyKeyword && m.kind !== ts15.SyntaxKind.OverrideKeyword);
28981
- const cleaned = ts15.factory.createPropertyDeclaration(modifiers, member.name, undefined, undefined, member.initializer);
28982
- memberSources.push(printer.printNode(ts15.EmitHint.Unspecified, cleaned, classNode.getSourceFile()));
29011
+ if (ts16.isPropertyDeclaration(member)) {
29012
+ const modifiers = (ts16.getModifiers(member) ?? []).filter((m) => m.kind !== ts16.SyntaxKind.PrivateKeyword && m.kind !== ts16.SyntaxKind.PublicKeyword && m.kind !== ts16.SyntaxKind.ProtectedKeyword && m.kind !== ts16.SyntaxKind.ReadonlyKeyword && m.kind !== ts16.SyntaxKind.OverrideKeyword);
29013
+ const cleaned = ts16.factory.createPropertyDeclaration(modifiers, member.name, undefined, undefined, member.initializer);
29014
+ memberSources.push(printer.printNode(ts16.EmitHint.Unspecified, cleaned, classNode.getSourceFile()));
28983
29015
  continue;
28984
29016
  }
28985
- if (ts15.isConstructorDeclaration(member)) {
28986
- const cleanedParams = member.parameters.map((param) => ts15.factory.updateParameterDeclaration(param, (ts15.getModifiers(param) ?? []).filter((m) => m.kind !== ts15.SyntaxKind.PrivateKeyword && m.kind !== ts15.SyntaxKind.PublicKeyword && m.kind !== ts15.SyntaxKind.ProtectedKeyword && m.kind !== ts15.SyntaxKind.ReadonlyKeyword && m.kind !== ts15.SyntaxKind.OverrideKeyword), param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer));
28987
- const cleaned = ts15.factory.createConstructorDeclaration([], cleanedParams, member.body);
28988
- memberSources.push(printer.printNode(ts15.EmitHint.Unspecified, cleaned, classNode.getSourceFile()));
29017
+ if (ts16.isConstructorDeclaration(member)) {
29018
+ const cleanedParams = member.parameters.map((param) => ts16.factory.updateParameterDeclaration(param, (ts16.getModifiers(param) ?? []).filter((m) => m.kind !== ts16.SyntaxKind.PrivateKeyword && m.kind !== ts16.SyntaxKind.PublicKeyword && m.kind !== ts16.SyntaxKind.ProtectedKeyword && m.kind !== ts16.SyntaxKind.ReadonlyKeyword && m.kind !== ts16.SyntaxKind.OverrideKeyword), param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer));
29019
+ const cleaned = ts16.factory.createConstructorDeclaration([], cleanedParams, member.body);
29020
+ memberSources.push(printer.printNode(ts16.EmitHint.Unspecified, cleaned, classNode.getSourceFile()));
28989
29021
  continue;
28990
29022
  }
28991
- if (ts15.isMethodDeclaration(member) || ts15.isGetAccessorDeclaration(member) || ts15.isSetAccessorDeclaration(member)) {
28992
- const modifiers = ts15.getModifiers(member) ?? [];
28993
- const isStatic = modifiers.some((m) => m.kind === ts15.SyntaxKind.StaticKeyword);
29023
+ if (ts16.isMethodDeclaration(member) || ts16.isGetAccessorDeclaration(member) || ts16.isSetAccessorDeclaration(member)) {
29024
+ const modifiers = ts16.getModifiers(member) ?? [];
29025
+ const isStatic = modifiers.some((m) => m.kind === ts16.SyntaxKind.StaticKeyword);
28994
29026
  if (isStatic)
28995
29027
  hasStatic = true;
28996
- const cleanedParams = member.parameters.map((param) => ts15.factory.updateParameterDeclaration(param, ts15.getModifiers(param) ?? [], param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer));
29028
+ const cleanedParams = member.parameters.map((param) => ts16.factory.updateParameterDeclaration(param, ts16.getModifiers(param) ?? [], param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer));
28997
29029
  let cleaned;
28998
- if (ts15.isMethodDeclaration(member)) {
28999
- cleaned = ts15.factory.createMethodDeclaration(modifiers, member.asteriskToken, member.name, member.questionToken, member.typeParameters, cleanedParams, member.type, member.body);
29000
- } else if (ts15.isGetAccessorDeclaration(member)) {
29001
- cleaned = ts15.factory.createGetAccessorDeclaration(modifiers, member.name, cleanedParams, member.type, member.body);
29030
+ if (ts16.isMethodDeclaration(member)) {
29031
+ cleaned = ts16.factory.createMethodDeclaration(modifiers, member.asteriskToken, member.name, member.questionToken, member.typeParameters, cleanedParams, member.type, member.body);
29032
+ } else if (ts16.isGetAccessorDeclaration(member)) {
29033
+ cleaned = ts16.factory.createGetAccessorDeclaration(modifiers, member.name, cleanedParams, member.type, member.body);
29002
29034
  } else {
29003
- cleaned = ts15.factory.createSetAccessorDeclaration(modifiers, member.name, cleanedParams, member.body);
29035
+ cleaned = ts16.factory.createSetAccessorDeclaration(modifiers, member.name, cleanedParams, member.body);
29004
29036
  }
29005
- const printed = printer.printNode(ts15.EmitHint.Unspecified, cleaned, classNode.getSourceFile());
29037
+ const printed = printer.printNode(ts16.EmitHint.Unspecified, cleaned, classNode.getSourceFile());
29006
29038
  memberSources.push(printed);
29007
29039
  }
29008
29040
  }
@@ -29014,10 +29046,10 @@ ${memberSources.join(`
29014
29046
  }`;
29015
29047
  let transpiled;
29016
29048
  try {
29017
- transpiled = ts15.transpileModule(wrappedSource, {
29049
+ transpiled = ts16.transpileModule(wrappedSource, {
29018
29050
  compilerOptions: {
29019
- module: ts15.ModuleKind.ES2022,
29020
- target: ts15.ScriptTarget.ES2022
29051
+ module: ts16.ModuleKind.ES2022,
29052
+ target: ts16.ScriptTarget.ES2022
29021
29053
  },
29022
29054
  reportDiagnostics: false
29023
29055
  }).outputText;
@@ -29091,7 +29123,7 @@ ${block}
29091
29123
  if (existsSync27(tsconfigPath)) {
29092
29124
  try {
29093
29125
  const text = readFileSync24(tsconfigPath, "utf8");
29094
- const parsed = ts15.parseConfigFileTextToJson(tsconfigPath, text);
29126
+ const parsed = ts16.parseConfigFileTextToJson(tsconfigPath, text);
29095
29127
  if (!parsed.error && parsed.config) {
29096
29128
  const cfg = parsed.config;
29097
29129
  const ang = cfg.angularCompilerOptions ?? {};
@@ -29125,7 +29157,7 @@ ${block}
29125
29157
  return fail("unexpected-error", `import @angular/compiler: ${err}`);
29126
29158
  }
29127
29159
  const tsSource = readFileSync24(componentFilePath, "utf8");
29128
- const sourceFile = ts15.createSourceFile(componentFilePath, tsSource, ts15.ScriptTarget.ES2022, true, ts15.ScriptKind.TS);
29160
+ const sourceFile = ts16.createSourceFile(componentFilePath, tsSource, ts16.ScriptTarget.ES2022, true, ts16.ScriptKind.TS);
29129
29161
  const classNode = findClassDeclaration(sourceFile, className);
29130
29162
  if (!classNode) {
29131
29163
  return fail("class-not-found", `${className} in ${componentFilePath}`);
@@ -29252,7 +29284,7 @@ ${block}
29252
29284
  isSignal: (hasSignalIO || advancedMetadata.contentQueries.some((q2) => q2.isSignal) || advancedMetadata.viewQueries.some((q2) => q2.isSignal)) && !hasDecoratorIO && !advancedMetadata.contentQueries.some((q2) => !q2.isSignal) && !advancedMetadata.viewQueries.some((q2) => !q2.isSignal),
29253
29285
  isStandalone: decoratorMeta.standalone,
29254
29286
  lifecycle: {
29255
- usesOnChanges: classNode.members.some((m) => ts15.isMethodDeclaration(m) && m.name !== undefined && ts15.isIdentifier(m.name) && m.name.text === "ngOnChanges")
29287
+ usesOnChanges: classNode.members.some((m) => ts16.isMethodDeclaration(m) && m.name !== undefined && ts16.isIdentifier(m.name) && m.name.text === "ngOnChanges")
29256
29288
  },
29257
29289
  name: className,
29258
29290
  outputs,
@@ -29301,15 +29333,15 @@ ${block}
29301
29333
  }
29302
29334
  const importGenerator = createHmrImportGenerator(namespaceMap);
29303
29335
  const tsFunctionDecl = translateStatement(sourceFile, callback, importGenerator);
29304
- const exportedDecl = ts15.factory.updateFunctionDeclaration(tsFunctionDecl, [
29305
- ts15.factory.createToken(ts15.SyntaxKind.ExportKeyword),
29306
- ts15.factory.createToken(ts15.SyntaxKind.DefaultKeyword)
29336
+ const exportedDecl = ts16.factory.updateFunctionDeclaration(tsFunctionDecl, [
29337
+ ts16.factory.createToken(ts16.SyntaxKind.ExportKeyword),
29338
+ ts16.factory.createToken(ts16.SyntaxKind.DefaultKeyword)
29307
29339
  ], tsFunctionDecl.asteriskToken, tsFunctionDecl.name, tsFunctionDecl.typeParameters, tsFunctionDecl.parameters, tsFunctionDecl.type, tsFunctionDecl.body);
29308
- const printer = ts15.createPrinter({
29309
- newLine: ts15.NewLineKind.LineFeed,
29340
+ const printer = ts16.createPrinter({
29341
+ newLine: ts16.NewLineKind.LineFeed,
29310
29342
  removeComments: false
29311
29343
  });
29312
- const fnText = printer.printNode(ts15.EmitHint.Unspecified, exportedDecl, sourceFile);
29344
+ const fnText = printer.printNode(ts16.EmitHint.Unspecified, exportedDecl, sourceFile);
29313
29345
  const provisionalMethodsBlock = buildFreshClassMethodsBlock(classNode, className) ?? "";
29314
29346
  const referencedNames = new Set;
29315
29347
  const identRe = /[A-Za-z_$][A-Za-z0-9_$]*/g;
@@ -29319,33 +29351,33 @@ ${block}
29319
29351
  }
29320
29352
  const sourceScopeNames = new Set;
29321
29353
  for (const stmt of sourceFile.statements) {
29322
- if (ts15.isImportDeclaration(stmt)) {
29323
- if (!ts15.isStringLiteral(stmt.moduleSpecifier))
29354
+ if (ts16.isImportDeclaration(stmt)) {
29355
+ if (!ts16.isStringLiteral(stmt.moduleSpecifier))
29324
29356
  continue;
29325
29357
  const clause = stmt.importClause;
29326
29358
  if (clause?.name)
29327
29359
  sourceScopeNames.add(clause.name.text);
29328
- if (clause?.namedBindings && ts15.isNamedImports(clause.namedBindings)) {
29360
+ if (clause?.namedBindings && ts16.isNamedImports(clause.namedBindings)) {
29329
29361
  for (const el of clause.namedBindings.elements) {
29330
29362
  if (el.isTypeOnly)
29331
29363
  continue;
29332
29364
  sourceScopeNames.add(el.name.text);
29333
29365
  }
29334
- } else if (clause?.namedBindings && ts15.isNamespaceImport(clause.namedBindings)) {
29366
+ } else if (clause?.namedBindings && ts16.isNamespaceImport(clause.namedBindings)) {
29335
29367
  sourceScopeNames.add(clause.namedBindings.name.text);
29336
29368
  }
29337
29369
  continue;
29338
29370
  }
29339
- if (ts15.isVariableStatement(stmt) || stmt.kind === ts15.SyntaxKind.VariableStatement) {
29371
+ if (ts16.isVariableStatement(stmt) || stmt.kind === ts16.SyntaxKind.VariableStatement) {
29340
29372
  const varStmt = stmt;
29341
29373
  for (const decl of varStmt.declarationList.declarations) {
29342
- if (ts15.isIdentifier(decl.name)) {
29374
+ if (ts16.isIdentifier(decl.name)) {
29343
29375
  sourceScopeNames.add(decl.name.text);
29344
29376
  }
29345
29377
  }
29346
29378
  continue;
29347
29379
  }
29348
- if (ts15.isFunctionDeclaration(stmt) || ts15.isClassDeclaration(stmt)) {
29380
+ if (ts16.isFunctionDeclaration(stmt) || ts16.isClassDeclaration(stmt)) {
29349
29381
  if (stmt.name)
29350
29382
  sourceScopeNames.add(stmt.name.text);
29351
29383
  }
@@ -29356,7 +29388,7 @@ ${block}
29356
29388
  }
29357
29389
  const allImportedNames = new Set;
29358
29390
  for (const stmt of sourceFile.statements) {
29359
- if (!ts15.isImportDeclaration(stmt))
29391
+ if (!ts16.isImportDeclaration(stmt))
29360
29392
  continue;
29361
29393
  const clause = stmt.importClause;
29362
29394
  if (!clause || clause.isTypeOnly)
@@ -29366,7 +29398,7 @@ ${block}
29366
29398
  const bindings = clause.namedBindings;
29367
29399
  if (!bindings)
29368
29400
  continue;
29369
- if (ts15.isNamespaceImport(bindings)) {
29401
+ if (ts16.isNamespaceImport(bindings)) {
29370
29402
  allImportedNames.add(bindings.name.text);
29371
29403
  } else {
29372
29404
  for (const el of bindings.elements) {
@@ -29378,10 +29410,10 @@ ${block}
29378
29410
  }
29379
29411
  const depsToDestructure = [...sourceScopeNames].filter((n) => referencedNames.has(n) || allImportedNames.has(n));
29380
29412
  const tsSourceText = fnText;
29381
- const transpiled = ts15.transpileModule(tsSourceText, {
29413
+ const transpiled = ts16.transpileModule(tsSourceText, {
29382
29414
  compilerOptions: {
29383
- module: ts15.ModuleKind.ES2022,
29384
- target: ts15.ScriptTarget.ES2022
29415
+ module: ts16.ModuleKind.ES2022,
29416
+ target: ts16.ScriptTarget.ES2022
29385
29417
  },
29386
29418
  fileName: componentFilePath,
29387
29419
  reportDiagnostics: false
@@ -33734,7 +33766,7 @@ __export(exports_resolveOwningComponents, {
33734
33766
  });
33735
33767
  import { readdirSync as readdirSync8, readFileSync as readFileSync29, statSync as statSync5 } from "fs";
33736
33768
  import { dirname as dirname23, extname as extname10, join as join43, resolve as resolve36 } from "path";
33737
- import ts16 from "typescript";
33769
+ import ts17 from "typescript";
33738
33770
  var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") || file5.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
33739
33771
  const out = [];
33740
33772
  const visit = (dir) => {
@@ -33760,13 +33792,13 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
33760
33792
  return out;
33761
33793
  }, getStringPropertyValue = (obj, name) => {
33762
33794
  for (const prop of obj.properties) {
33763
- if (!ts16.isPropertyAssignment(prop))
33795
+ if (!ts17.isPropertyAssignment(prop))
33764
33796
  continue;
33765
- const propName = ts16.isIdentifier(prop.name) || ts16.isStringLiteral(prop.name) ? prop.name.text : null;
33797
+ const propName = ts17.isIdentifier(prop.name) || ts17.isStringLiteral(prop.name) ? prop.name.text : null;
33766
33798
  if (propName !== name)
33767
33799
  continue;
33768
33800
  const init = prop.initializer;
33769
- if (ts16.isStringLiteral(init) || ts16.isNoSubstitutionTemplateLiteral(init)) {
33801
+ if (ts17.isStringLiteral(init) || ts17.isNoSubstitutionTemplateLiteral(init)) {
33770
33802
  return init.text;
33771
33803
  }
33772
33804
  }
@@ -33774,16 +33806,16 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
33774
33806
  }, getStringArrayProperty = (obj, name) => {
33775
33807
  const out = [];
33776
33808
  for (const prop of obj.properties) {
33777
- if (!ts16.isPropertyAssignment(prop))
33809
+ if (!ts17.isPropertyAssignment(prop))
33778
33810
  continue;
33779
- const propName = ts16.isIdentifier(prop.name) || ts16.isStringLiteral(prop.name) ? prop.name.text : null;
33811
+ const propName = ts17.isIdentifier(prop.name) || ts17.isStringLiteral(prop.name) ? prop.name.text : null;
33780
33812
  if (propName !== name)
33781
33813
  continue;
33782
33814
  const init = prop.initializer;
33783
- if (!ts16.isArrayLiteralExpression(init))
33815
+ if (!ts17.isArrayLiteralExpression(init))
33784
33816
  continue;
33785
33817
  for (const element of init.elements) {
33786
- if (ts16.isStringLiteral(element) || ts16.isNoSubstitutionTemplateLiteral(element)) {
33818
+ if (ts17.isStringLiteral(element) || ts17.isNoSubstitutionTemplateLiteral(element)) {
33787
33819
  out.push(element.text);
33788
33820
  }
33789
33821
  }
@@ -33796,27 +33828,27 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
33796
33828
  } catch {
33797
33829
  return [];
33798
33830
  }
33799
- const sourceFile = ts16.createSourceFile(filePath, source, ts16.ScriptTarget.ES2022, true, ts16.ScriptKind.TS);
33831
+ const sourceFile = ts17.createSourceFile(filePath, source, ts17.ScriptTarget.ES2022, true, ts17.ScriptKind.TS);
33800
33832
  const out = [];
33801
33833
  const visit = (node) => {
33802
- if (ts16.isClassDeclaration(node) && node.name) {
33803
- for (const decorator of ts16.getDecorators(node) ?? []) {
33834
+ if (ts17.isClassDeclaration(node) && node.name) {
33835
+ for (const decorator of ts17.getDecorators(node) ?? []) {
33804
33836
  const expr = decorator.expression;
33805
- if (!ts16.isCallExpression(expr))
33837
+ if (!ts17.isCallExpression(expr))
33806
33838
  continue;
33807
33839
  const fn2 = expr.expression;
33808
- if (!ts16.isIdentifier(fn2))
33840
+ if (!ts17.isIdentifier(fn2))
33809
33841
  continue;
33810
33842
  const kind = ENTITY_DECORATORS[fn2.text];
33811
33843
  if (!kind)
33812
33844
  continue;
33813
33845
  let extendsName = null;
33814
33846
  for (const heritage of node.heritageClauses ?? []) {
33815
- if (heritage.token !== ts16.SyntaxKind.ExtendsKeyword) {
33847
+ if (heritage.token !== ts17.SyntaxKind.ExtendsKeyword) {
33816
33848
  continue;
33817
33849
  }
33818
33850
  const first = heritage.types[0];
33819
- if (first && ts16.isIdentifier(first.expression)) {
33851
+ if (first && ts17.isIdentifier(first.expression)) {
33820
33852
  extendsName = first.expression.text;
33821
33853
  }
33822
33854
  break;
@@ -33829,7 +33861,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
33829
33861
  templateUrls: []
33830
33862
  };
33831
33863
  const arg = expr.arguments[0];
33832
- if (arg && ts16.isObjectLiteralExpression(arg) && kind === "component") {
33864
+ if (arg && ts17.isObjectLiteralExpression(arg) && kind === "component") {
33833
33865
  const tplUrl = getStringPropertyValue(arg, "templateUrl");
33834
33866
  if (tplUrl)
33835
33867
  entry.templateUrls.push(tplUrl);
@@ -33842,7 +33874,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
33842
33874
  break;
33843
33875
  }
33844
33876
  }
33845
- ts16.forEachChild(node, visit);
33877
+ ts17.forEachChild(node, visit);
33846
33878
  };
33847
33879
  visit(sourceFile);
33848
33880
  return out;
@@ -33886,12 +33918,12 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
33886
33918
  } catch {
33887
33919
  return null;
33888
33920
  }
33889
- const sf = ts16.createSourceFile(childFilePath, source, ts16.ScriptTarget.ES2022, true, ts16.ScriptKind.TS);
33921
+ const sf = ts17.createSourceFile(childFilePath, source, ts17.ScriptTarget.ES2022, true, ts17.ScriptKind.TS);
33890
33922
  const childDir = dirname23(childFilePath);
33891
33923
  for (const stmt of sf.statements) {
33892
- if (!ts16.isImportDeclaration(stmt))
33924
+ if (!ts17.isImportDeclaration(stmt))
33893
33925
  continue;
33894
- if (!ts16.isStringLiteral(stmt.moduleSpecifier))
33926
+ if (!ts17.isStringLiteral(stmt.moduleSpecifier))
33895
33927
  continue;
33896
33928
  const clause = stmt.importClause;
33897
33929
  if (!clause || clause.isTypeOnly)
@@ -33899,7 +33931,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
33899
33931
  let matchesName = false;
33900
33932
  if (clause.name && clause.name.text === parentName)
33901
33933
  matchesName = true;
33902
- if (!matchesName && clause.namedBindings && ts16.isNamedImports(clause.namedBindings)) {
33934
+ if (!matchesName && clause.namedBindings && ts17.isNamedImports(clause.namedBindings)) {
33903
33935
  for (const el of clause.namedBindings.elements) {
33904
33936
  if (el.isTypeOnly)
33905
33937
  continue;
@@ -45958,10 +45990,10 @@ function FromObject21(schema, references, value) {
45958
45990
  }
45959
45991
  if (typeof schema.additionalProperties === "object") {
45960
45992
  const propertyNames = Object.getOwnPropertyNames(schema.properties);
45961
- for (const propertyName of Object.getOwnPropertyNames(value)) {
45962
- if (propertyNames.includes(propertyName))
45993
+ for (const propertyName2 of Object.getOwnPropertyNames(value)) {
45994
+ if (propertyNames.includes(propertyName2))
45963
45995
  continue;
45964
- result[propertyName] = Visit12(schema.additionalProperties, references, value[propertyName]);
45996
+ result[propertyName2] = Visit12(schema.additionalProperties, references, value[propertyName2]);
45965
45997
  }
45966
45998
  }
45967
45999
  return result;
@@ -47726,5 +47758,5 @@ export {
47726
47758
  ANGULAR_INIT_TIMEOUT_MS
47727
47759
  };
47728
47760
 
47729
- //# debugId=E5478C474D918A3C64756E2164756E21
47761
+ //# debugId=6C22D61C20057C5D64756E2164756E21
47730
47762
  //# sourceMappingURL=index.js.map