@angular/core 17.0.4 → 17.0.5
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/esm2022/src/application_init.mjs +2 -2
- package/esm2022/src/render3/features/host_directives_feature.mjs +20 -13
- package/esm2022/src/render3/instructions/change_detection.mjs +3 -4
- package/esm2022/src/render3/util/view_utils.mjs +11 -12
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/test_bed.mjs +3 -3
- package/esm2022/testing/src/test_bed_compiler.mjs +19 -10
- package/fesm2022/core.mjs +32 -27
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +21 -12
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +3 -3
- package/package.json +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/block-template-entities/bundle.js +307 -302
- package/schematics/migrations/block-template-entities/bundle.js.map +4 -4
- package/schematics/migrations/compiler-options/bundle.js +13 -13
- package/schematics/migrations/transfer-state/bundle.js +13 -13
- package/schematics/ng-generate/control-flow-migration/bundle.js +510 -382
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
- package/schematics/ng-generate/standalone-migration/bundle.js +571 -560
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +1 -1
|
@@ -63,7 +63,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
// bazel-out/
|
|
66
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/index.mjs
|
|
67
67
|
var control_flow_migration_exports = {};
|
|
68
68
|
__export(control_flow_migration_exports, {
|
|
69
69
|
default: () => control_flow_migration_default
|
|
@@ -72,22 +72,22 @@ module.exports = __toCommonJS(control_flow_migration_exports);
|
|
|
72
72
|
var import_schematics = require("@angular-devkit/schematics");
|
|
73
73
|
var import_path3 = require("path");
|
|
74
74
|
|
|
75
|
-
// bazel-out/
|
|
75
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
|
|
76
76
|
var import_typescript2 = __toESM(require("typescript"), 1);
|
|
77
77
|
|
|
78
|
-
// bazel-out/
|
|
78
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/import_manager.mjs
|
|
79
79
|
var import_typescript = __toESM(require("typescript"), 1);
|
|
80
80
|
|
|
81
|
-
// bazel-out/
|
|
81
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
|
|
82
82
|
function normalizePath(path2) {
|
|
83
83
|
return path2.replace(/\\/g, "/");
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
// bazel-out/
|
|
86
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
87
87
|
var import_path = require("path");
|
|
88
88
|
var import_typescript4 = __toESM(require("typescript"), 1);
|
|
89
89
|
|
|
90
|
-
// bazel-out/
|
|
90
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
|
|
91
91
|
var path = __toESM(require("path"), 1);
|
|
92
92
|
var import_typescript3 = __toESM(require("typescript"), 1);
|
|
93
93
|
function parseTsconfigFile(tsconfigPath, basePath) {
|
|
@@ -104,7 +104,7 @@ function parseTsconfigFile(tsconfigPath, basePath) {
|
|
|
104
104
|
return import_typescript3.default.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
// bazel-out/
|
|
107
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
108
108
|
function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
|
|
109
109
|
const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles);
|
|
110
110
|
return import_typescript4.default.createProgram(rootNames, options, host);
|
|
@@ -137,7 +137,7 @@ function canMigrateFile(basePath, sourceFile, program) {
|
|
|
137
137
|
return !(0, import_path.relative)(basePath, sourceFile.fileName).startsWith("..");
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
// bazel-out/
|
|
140
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/selector.mjs
|
|
141
141
|
var _SELECTOR_REGEXP = new RegExp(
|
|
142
142
|
`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,
|
|
143
143
|
"g"
|
|
@@ -445,7 +445,7 @@ var SelectorContext = class {
|
|
|
445
445
|
}
|
|
446
446
|
};
|
|
447
447
|
|
|
448
|
-
// bazel-out/
|
|
448
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/core.mjs
|
|
449
449
|
var ViewEncapsulation;
|
|
450
450
|
(function(ViewEncapsulation2) {
|
|
451
451
|
ViewEncapsulation2[ViewEncapsulation2["Emulated"] = 0] = "Emulated";
|
|
@@ -507,7 +507,7 @@ function parseSelectorToR3Selector(selector) {
|
|
|
507
507
|
return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
-
// bazel-out/
|
|
510
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/digest.mjs
|
|
511
511
|
var textEncoder;
|
|
512
512
|
function computeDigest(message) {
|
|
513
513
|
return sha1(serializeNodes(message.nodes).join("") + `[${message.meaning}]`);
|
|
@@ -747,7 +747,7 @@ function wordAt(bytes, index, endian) {
|
|
|
747
747
|
return word;
|
|
748
748
|
}
|
|
749
749
|
|
|
750
|
-
// bazel-out/
|
|
750
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_ast.mjs
|
|
751
751
|
var TypeModifier;
|
|
752
752
|
(function(TypeModifier2) {
|
|
753
753
|
TypeModifier2[TypeModifier2["None"] = 0] = "None";
|
|
@@ -1702,7 +1702,7 @@ function serializeTags(tags) {
|
|
|
1702
1702
|
return out;
|
|
1703
1703
|
}
|
|
1704
1704
|
|
|
1705
|
-
// bazel-out/
|
|
1705
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/constant_pool.mjs
|
|
1706
1706
|
var CONSTANT_PREFIX = "_c";
|
|
1707
1707
|
var UNKNOWN_VALUE_KEY = variable("<unknown>");
|
|
1708
1708
|
var KEY_CONTEXT = {};
|
|
@@ -1885,7 +1885,7 @@ function isLongStringLiteral(expr) {
|
|
|
1885
1885
|
return expr instanceof LiteralExpr && typeof expr.value === "string" && expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;
|
|
1886
1886
|
}
|
|
1887
1887
|
|
|
1888
|
-
// bazel-out/
|
|
1888
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_identifiers.mjs
|
|
1889
1889
|
var CORE = "@angular/core";
|
|
1890
1890
|
var _Identifiers = class {
|
|
1891
1891
|
};
|
|
@@ -2518,7 +2518,7 @@ var Identifiers = _Identifiers;
|
|
|
2518
2518
|
_Identifiers.validateIframeAttribute = { name: "\u0275\u0275validateIframeAttribute", moduleName: CORE };
|
|
2519
2519
|
})();
|
|
2520
2520
|
|
|
2521
|
-
// bazel-out/
|
|
2521
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/util.mjs
|
|
2522
2522
|
var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
|
2523
2523
|
function dashCaseToCamelCase(input) {
|
|
2524
2524
|
return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
|
|
@@ -2606,7 +2606,7 @@ function partitionArray(arr, conditionFn) {
|
|
|
2606
2606
|
return [truthy, falsy];
|
|
2607
2607
|
}
|
|
2608
2608
|
|
|
2609
|
-
// bazel-out/
|
|
2609
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/source_map.mjs
|
|
2610
2610
|
var VERSION = 3;
|
|
2611
2611
|
var JS_B64_PREFIX = "# sourceMappingURL=data:application/json;base64,";
|
|
2612
2612
|
var SourceMapGenerator = class {
|
|
@@ -2735,7 +2735,7 @@ function toBase64Digit(value) {
|
|
|
2735
2735
|
return B64_DIGITS[value];
|
|
2736
2736
|
}
|
|
2737
2737
|
|
|
2738
|
-
// bazel-out/
|
|
2738
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_emitter.mjs
|
|
2739
2739
|
var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
|
|
2740
2740
|
var _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
|
|
2741
2741
|
var _INDENT_WITH = " ";
|
|
@@ -3220,7 +3220,7 @@ function _createIndent(count) {
|
|
|
3220
3220
|
return res;
|
|
3221
3221
|
}
|
|
3222
3222
|
|
|
3223
|
-
// bazel-out/
|
|
3223
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/util.mjs
|
|
3224
3224
|
function typeWithParameters(type, numParams) {
|
|
3225
3225
|
if (numParams === 0) {
|
|
3226
3226
|
return expressionType(type);
|
|
@@ -3285,7 +3285,7 @@ function generateForwardRef(expr) {
|
|
|
3285
3285
|
return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr)]);
|
|
3286
3286
|
}
|
|
3287
3287
|
|
|
3288
|
-
// bazel-out/
|
|
3288
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_factory.mjs
|
|
3289
3289
|
var R3FactoryDelegateType;
|
|
3290
3290
|
(function(R3FactoryDelegateType2) {
|
|
3291
3291
|
R3FactoryDelegateType2[R3FactoryDelegateType2["Class"] = 0] = "Class";
|
|
@@ -3430,7 +3430,7 @@ function getInjectFn(target) {
|
|
|
3430
3430
|
}
|
|
3431
3431
|
}
|
|
3432
3432
|
|
|
3433
|
-
// bazel-out/
|
|
3433
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_ast.mjs
|
|
3434
3434
|
var Comment = class {
|
|
3435
3435
|
constructor(value, sourceSpan) {
|
|
3436
3436
|
this.value = value;
|
|
@@ -3811,7 +3811,7 @@ function visitAll(visitor, nodes) {
|
|
|
3811
3811
|
return result;
|
|
3812
3812
|
}
|
|
3813
3813
|
|
|
3814
|
-
// bazel-out/
|
|
3814
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_ast.mjs
|
|
3815
3815
|
var Message = class {
|
|
3816
3816
|
constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {
|
|
3817
3817
|
this.nodes = nodes;
|
|
@@ -3971,7 +3971,7 @@ var LocalizeMessageStringVisitor = class {
|
|
|
3971
3971
|
}
|
|
3972
3972
|
};
|
|
3973
3973
|
|
|
3974
|
-
// bazel-out/
|
|
3974
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xml_helper.mjs
|
|
3975
3975
|
var _Visitor = class {
|
|
3976
3976
|
visitTag(tag) {
|
|
3977
3977
|
const strAttrs = this._serializeAttributes(tag.attrs);
|
|
@@ -3999,12 +3999,12 @@ ${doctype.dtd}
|
|
|
3999
3999
|
};
|
|
4000
4000
|
var _visitor = new _Visitor();
|
|
4001
4001
|
|
|
4002
|
-
// bazel-out/
|
|
4002
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xmb.mjs
|
|
4003
4003
|
function toPublicName(internalName) {
|
|
4004
4004
|
return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, "_");
|
|
4005
4005
|
}
|
|
4006
4006
|
|
|
4007
|
-
// bazel-out/
|
|
4007
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/util.mjs
|
|
4008
4008
|
var CLOSURE_TRANSLATION_VAR_PREFIX = "MSG_";
|
|
4009
4009
|
var TRANSLATION_VAR_PREFIX = "i18n_";
|
|
4010
4010
|
var I18N_ATTR = "i18n";
|
|
@@ -4106,7 +4106,7 @@ function declareI18nVariable(variable2) {
|
|
|
4106
4106
|
return new DeclareVarStmt(variable2.name, void 0, INFERRED_TYPE, void 0, variable2.sourceSpan);
|
|
4107
4107
|
}
|
|
4108
4108
|
|
|
4109
|
-
// bazel-out/
|
|
4109
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/util.mjs
|
|
4110
4110
|
var UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;
|
|
4111
4111
|
var TEMPORARY_NAME = "_t";
|
|
4112
4112
|
var CONTEXT_NAME = "ctx";
|
|
@@ -4329,7 +4329,7 @@ function getInstructionStatements(instructions) {
|
|
|
4329
4329
|
return statements;
|
|
4330
4330
|
}
|
|
4331
4331
|
|
|
4332
|
-
// bazel-out/
|
|
4332
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/injectable_compiler_2.mjs
|
|
4333
4333
|
function compileInjectable(meta, resolveForwardRefs) {
|
|
4334
4334
|
let result = null;
|
|
4335
4335
|
const factoryMeta = {
|
|
@@ -4414,7 +4414,7 @@ function createFactoryFunction(type) {
|
|
|
4414
4414
|
return arrowFn([new FnParam("t", DYNAMIC_TYPE)], type.prop("\u0275fac").callFn([variable("t")]));
|
|
4415
4415
|
}
|
|
4416
4416
|
|
|
4417
|
-
// bazel-out/
|
|
4417
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/assertions.mjs
|
|
4418
4418
|
var UNUSABLE_INTERPOLATION_REGEXPS = [
|
|
4419
4419
|
/^\s*$/,
|
|
4420
4420
|
/[<>]/,
|
|
@@ -4436,7 +4436,7 @@ function assertInterpolationSymbols(identifier, value) {
|
|
|
4436
4436
|
}
|
|
4437
4437
|
}
|
|
4438
4438
|
|
|
4439
|
-
// bazel-out/
|
|
4439
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/defaults.mjs
|
|
4440
4440
|
var InterpolationConfig = class {
|
|
4441
4441
|
static fromArray(markers) {
|
|
4442
4442
|
if (!markers) {
|
|
@@ -4453,7 +4453,7 @@ var InterpolationConfig = class {
|
|
|
4453
4453
|
var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
|
|
4454
4454
|
var DEFAULT_CONTAINER_BLOCKS = /* @__PURE__ */ new Set(["switch"]);
|
|
4455
4455
|
|
|
4456
|
-
// bazel-out/
|
|
4456
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/chars.mjs
|
|
4457
4457
|
var $EOF = 0;
|
|
4458
4458
|
var $BSPACE = 8;
|
|
4459
4459
|
var $TAB = 9;
|
|
@@ -4535,7 +4535,7 @@ function isQuote(code) {
|
|
|
4535
4535
|
return code === $SQ || code === $DQ || code === $BT;
|
|
4536
4536
|
}
|
|
4537
4537
|
|
|
4538
|
-
// bazel-out/
|
|
4538
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/parse_util.mjs
|
|
4539
4539
|
var ParseLocation = class {
|
|
4540
4540
|
constructor(file, offset, line, col) {
|
|
4541
4541
|
this.file = file;
|
|
@@ -4682,7 +4682,7 @@ function sanitizeIdentifier(name) {
|
|
|
4682
4682
|
return name.replace(/\W/g, "_");
|
|
4683
4683
|
}
|
|
4684
4684
|
|
|
4685
|
-
// bazel-out/
|
|
4685
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_js_emitter.mjs
|
|
4686
4686
|
var makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})';
|
|
4687
4687
|
var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
4688
4688
|
constructor() {
|
|
@@ -4775,7 +4775,7 @@ var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
|
4775
4775
|
}
|
|
4776
4776
|
};
|
|
4777
4777
|
|
|
4778
|
-
// bazel-out/
|
|
4778
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit_trusted_types.mjs
|
|
4779
4779
|
var policy;
|
|
4780
4780
|
function getPolicy() {
|
|
4781
4781
|
if (policy === void 0) {
|
|
@@ -4813,7 +4813,7 @@ function newTrustedFunctionForJIT(...args) {
|
|
|
4813
4813
|
return fn2.bind(_global);
|
|
4814
4814
|
}
|
|
4815
4815
|
|
|
4816
|
-
// bazel-out/
|
|
4816
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit.mjs
|
|
4817
4817
|
var JitEvaluator = class {
|
|
4818
4818
|
evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {
|
|
4819
4819
|
const converter = new JitEmitterVisitor(refResolver);
|
|
@@ -4904,7 +4904,7 @@ function isUseStrictStatement(statement) {
|
|
|
4904
4904
|
return statement.isEquivalent(literal("use strict").toStmt());
|
|
4905
4905
|
}
|
|
4906
4906
|
|
|
4907
|
-
// bazel-out/
|
|
4907
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_injector_compiler.mjs
|
|
4908
4908
|
function compileInjector(meta) {
|
|
4909
4909
|
const definitionMap = new DefinitionMap();
|
|
4910
4910
|
if (meta.providers !== null) {
|
|
@@ -4921,7 +4921,7 @@ function createInjectorType(meta) {
|
|
|
4921
4921
|
return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
|
|
4922
4922
|
}
|
|
4923
4923
|
|
|
4924
|
-
// bazel-out/
|
|
4924
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_jit.mjs
|
|
4925
4925
|
var R3JitReflector = class {
|
|
4926
4926
|
constructor(context) {
|
|
4927
4927
|
this.context = context;
|
|
@@ -4937,7 +4937,7 @@ var R3JitReflector = class {
|
|
|
4937
4937
|
}
|
|
4938
4938
|
};
|
|
4939
4939
|
|
|
4940
|
-
// bazel-out/
|
|
4940
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_module_compiler.mjs
|
|
4941
4941
|
var R3SelectorScopeMode;
|
|
4942
4942
|
(function(R3SelectorScopeMode2) {
|
|
4943
4943
|
R3SelectorScopeMode2[R3SelectorScopeMode2["Inline"] = 0] = "Inline";
|
|
@@ -5078,7 +5078,7 @@ function tupleOfTypes(types) {
|
|
|
5078
5078
|
return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;
|
|
5079
5079
|
}
|
|
5080
5080
|
|
|
5081
|
-
// bazel-out/
|
|
5081
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_pipe_compiler.mjs
|
|
5082
5082
|
function compilePipeFromMetadata(metadata) {
|
|
5083
5083
|
const definitionMapValues = [];
|
|
5084
5084
|
definitionMapValues.push({ key: "name", value: literal(metadata.pipeName), quoted: false });
|
|
@@ -5099,7 +5099,7 @@ function createPipeType(metadata) {
|
|
|
5099
5099
|
]));
|
|
5100
5100
|
}
|
|
5101
5101
|
|
|
5102
|
-
// bazel-out/
|
|
5102
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/api.mjs
|
|
5103
5103
|
var R3TemplateDependencyKind;
|
|
5104
5104
|
(function(R3TemplateDependencyKind2) {
|
|
5105
5105
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["Directive"] = 0] = "Directive";
|
|
@@ -5107,7 +5107,7 @@ var R3TemplateDependencyKind;
|
|
|
5107
5107
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["NgModule"] = 2] = "NgModule";
|
|
5108
5108
|
})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
|
|
5109
5109
|
|
|
5110
|
-
// bazel-out/
|
|
5110
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/ast.mjs
|
|
5111
5111
|
var ParserError = class {
|
|
5112
5112
|
constructor(message, input, errLocation, ctxLocation) {
|
|
5113
5113
|
this.input = input;
|
|
@@ -5773,7 +5773,7 @@ var BoundElementProperty = class {
|
|
|
5773
5773
|
}
|
|
5774
5774
|
};
|
|
5775
5775
|
|
|
5776
|
-
// bazel-out/
|
|
5776
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler_util/expression_converter.mjs
|
|
5777
5777
|
var _EventHandlerVars = class {
|
|
5778
5778
|
};
|
|
5779
5779
|
var EventHandlerVars = _EventHandlerVars;
|
|
@@ -6414,7 +6414,7 @@ var BuiltinFunctionCall = class extends Call {
|
|
|
6414
6414
|
}
|
|
6415
6415
|
};
|
|
6416
6416
|
|
|
6417
|
-
// bazel-out/
|
|
6417
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_security_schema.mjs
|
|
6418
6418
|
var _SECURITY_SCHEMA;
|
|
6419
6419
|
function SECURITY_SCHEMA() {
|
|
6420
6420
|
if (!_SECURITY_SCHEMA) {
|
|
@@ -6472,7 +6472,7 @@ function isIframeSecuritySensitiveAttr(attrName) {
|
|
|
6472
6472
|
return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
|
|
6473
6473
|
}
|
|
6474
6474
|
|
|
6475
|
-
// bazel-out/
|
|
6475
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/shadow_css.mjs
|
|
6476
6476
|
var animationKeywords = /* @__PURE__ */ new Set([
|
|
6477
6477
|
"inherit",
|
|
6478
6478
|
"initial",
|
|
@@ -6943,7 +6943,7 @@ function repeatGroups(groups, multiples) {
|
|
|
6943
6943
|
}
|
|
6944
6944
|
}
|
|
6945
6945
|
|
|
6946
|
-
// bazel-out/
|
|
6946
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/enums.mjs
|
|
6947
6947
|
var OpKind;
|
|
6948
6948
|
(function(OpKind2) {
|
|
6949
6949
|
OpKind2[OpKind2["ListEnd"] = 0] = "ListEnd";
|
|
@@ -7097,8 +7097,13 @@ var DerivedRepeaterVarIdentity;
|
|
|
7097
7097
|
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Even"] = 2] = "Even";
|
|
7098
7098
|
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Odd"] = 3] = "Odd";
|
|
7099
7099
|
})(DerivedRepeaterVarIdentity || (DerivedRepeaterVarIdentity = {}));
|
|
7100
|
+
var I18nContextKind;
|
|
7101
|
+
(function(I18nContextKind2) {
|
|
7102
|
+
I18nContextKind2[I18nContextKind2["RootI18n"] = 0] = "RootI18n";
|
|
7103
|
+
I18nContextKind2[I18nContextKind2["Icu"] = 1] = "Icu";
|
|
7104
|
+
})(I18nContextKind || (I18nContextKind = {}));
|
|
7100
7105
|
|
|
7101
|
-
// bazel-out/
|
|
7106
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
|
|
7102
7107
|
var ConsumesSlot = Symbol("ConsumesSlot");
|
|
7103
7108
|
var DependsOnSlotContext = Symbol("DependsOnSlotContext");
|
|
7104
7109
|
var ConsumesVarsTrait = Symbol("ConsumesVars");
|
|
@@ -7130,7 +7135,7 @@ function hasUsesVarOffsetTrait(expr) {
|
|
|
7130
7135
|
return expr[UsesVarOffset] === true;
|
|
7131
7136
|
}
|
|
7132
7137
|
|
|
7133
|
-
// bazel-out/
|
|
7138
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
|
|
7134
7139
|
function createStatementOp(statement) {
|
|
7135
7140
|
return __spreadValues({
|
|
7136
7141
|
kind: OpKind.Statement,
|
|
@@ -7152,7 +7157,7 @@ var NEW_OP = {
|
|
|
7152
7157
|
next: null
|
|
7153
7158
|
};
|
|
7154
7159
|
|
|
7155
|
-
// bazel-out/
|
|
7160
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
|
|
7156
7161
|
function createInterpolateTextOp(xref, interpolation, i18nPlaceholders, sourceSpan) {
|
|
7157
7162
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7158
7163
|
kind: OpKind.InterpolateText,
|
|
@@ -7301,7 +7306,7 @@ function createI18nApplyOp(target, handle, sourceSpan) {
|
|
|
7301
7306
|
}, NEW_OP);
|
|
7302
7307
|
}
|
|
7303
7308
|
|
|
7304
|
-
// bazel-out/
|
|
7309
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
|
|
7305
7310
|
var _a;
|
|
7306
7311
|
var _b;
|
|
7307
7312
|
var _c;
|
|
@@ -8152,7 +8157,7 @@ function isStringLiteral(expr) {
|
|
|
8152
8157
|
return expr instanceof LiteralExpr && typeof expr.value === "string";
|
|
8153
8158
|
}
|
|
8154
8159
|
|
|
8155
|
-
// bazel-out/
|
|
8160
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
|
|
8156
8161
|
var _OpList = class {
|
|
8157
8162
|
constructor() {
|
|
8158
8163
|
this.debugListId = _OpList.nextListId++;
|
|
@@ -8343,14 +8348,14 @@ var OpList = _OpList;
|
|
|
8343
8348
|
_OpList.nextListId = 0;
|
|
8344
8349
|
})();
|
|
8345
8350
|
|
|
8346
|
-
// bazel-out/
|
|
8351
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/handle.mjs
|
|
8347
8352
|
var SlotHandle = class {
|
|
8348
8353
|
constructor() {
|
|
8349
8354
|
this.slot = null;
|
|
8350
8355
|
}
|
|
8351
8356
|
};
|
|
8352
8357
|
|
|
8353
|
-
// bazel-out/
|
|
8358
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
|
|
8354
8359
|
var elementContainerOpKinds = /* @__PURE__ */ new Set([
|
|
8355
8360
|
OpKind.Element,
|
|
8356
8361
|
OpKind.ElementStart,
|
|
@@ -8582,9 +8587,10 @@ function createIcuEndOp(xref) {
|
|
|
8582
8587
|
xref
|
|
8583
8588
|
}, NEW_OP);
|
|
8584
8589
|
}
|
|
8585
|
-
function createI18nContextOp(xref, i18nBlock, message, sourceSpan) {
|
|
8590
|
+
function createI18nContextOp(contextKind, xref, i18nBlock, message, sourceSpan) {
|
|
8586
8591
|
return __spreadValues({
|
|
8587
8592
|
kind: OpKind.I18nContext,
|
|
8593
|
+
contextKind,
|
|
8588
8594
|
xref,
|
|
8589
8595
|
i18nBlock,
|
|
8590
8596
|
message,
|
|
@@ -8594,7 +8600,7 @@ function createI18nContextOp(xref, i18nBlock, message, sourceSpan) {
|
|
|
8594
8600
|
}, NEW_OP);
|
|
8595
8601
|
}
|
|
8596
8602
|
|
|
8597
|
-
// bazel-out/
|
|
8603
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
|
|
8598
8604
|
function createHostPropertyOp(name, expression, isAnimationTrigger, sourceSpan) {
|
|
8599
8605
|
return __spreadValues(__spreadValues({
|
|
8600
8606
|
kind: OpKind.HostProperty,
|
|
@@ -8605,10 +8611,10 @@ function createHostPropertyOp(name, expression, isAnimationTrigger, sourceSpan)
|
|
|
8605
8611
|
}, TRAIT_CONSUMES_VARS), NEW_OP);
|
|
8606
8612
|
}
|
|
8607
8613
|
|
|
8608
|
-
// bazel-out/
|
|
8614
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
|
|
8609
8615
|
var CTX_REF = "CTX_REF_MARKER";
|
|
8610
8616
|
|
|
8611
|
-
// bazel-out/
|
|
8617
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
|
|
8612
8618
|
var CompilationJobKind;
|
|
8613
8619
|
(function(CompilationJobKind2) {
|
|
8614
8620
|
CompilationJobKind2[CompilationJobKind2["Tmpl"] = 0] = "Tmpl";
|
|
@@ -8715,7 +8721,7 @@ var HostBindingCompilationUnit = class extends CompilationUnit {
|
|
|
8715
8721
|
}
|
|
8716
8722
|
};
|
|
8717
8723
|
|
|
8718
|
-
// bazel-out/
|
|
8724
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
|
|
8719
8725
|
function deleteAnyCasts(job) {
|
|
8720
8726
|
for (const unit of job.units) {
|
|
8721
8727
|
for (const op of unit.ops()) {
|
|
@@ -8733,7 +8739,7 @@ function removeAnys(e) {
|
|
|
8733
8739
|
return e;
|
|
8734
8740
|
}
|
|
8735
8741
|
|
|
8736
|
-
// bazel-out/
|
|
8742
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
|
|
8737
8743
|
function applyI18nExpressions(job) {
|
|
8738
8744
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
8739
8745
|
for (const unit of job.units) {
|
|
@@ -8764,10 +8770,9 @@ function needsApplication(i18nContexts, op) {
|
|
|
8764
8770
|
return false;
|
|
8765
8771
|
}
|
|
8766
8772
|
|
|
8767
|
-
// bazel-out/
|
|
8773
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs
|
|
8768
8774
|
function assignI18nSlotDependencies(job) {
|
|
8769
8775
|
const i18nLastSlotConsumers = /* @__PURE__ */ new Map();
|
|
8770
|
-
const i18nContexts = /* @__PURE__ */ new Map();
|
|
8771
8776
|
let lastSlotConsumer = null;
|
|
8772
8777
|
let currentI18nOp = null;
|
|
8773
8778
|
for (const unit of job.units) {
|
|
@@ -8783,21 +8788,17 @@ function assignI18nSlotDependencies(job) {
|
|
|
8783
8788
|
i18nLastSlotConsumers.set(currentI18nOp.xref, lastSlotConsumer);
|
|
8784
8789
|
currentI18nOp = null;
|
|
8785
8790
|
break;
|
|
8786
|
-
case OpKind.I18nContext:
|
|
8787
|
-
i18nContexts.set(op.xref, op);
|
|
8788
|
-
break;
|
|
8789
8791
|
}
|
|
8790
8792
|
}
|
|
8791
8793
|
for (const op of unit.update) {
|
|
8792
8794
|
if (op.kind === OpKind.I18nExpression) {
|
|
8793
|
-
|
|
8794
|
-
op.target = i18nLastSlotConsumers.get(i18nContext.i18nBlock);
|
|
8795
|
+
op.target = i18nLastSlotConsumers.get(op.target);
|
|
8795
8796
|
}
|
|
8796
8797
|
}
|
|
8797
8798
|
}
|
|
8798
8799
|
}
|
|
8799
8800
|
|
|
8800
|
-
// bazel-out/
|
|
8801
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
|
|
8801
8802
|
function createOpXrefMap(unit) {
|
|
8802
8803
|
const map = /* @__PURE__ */ new Map();
|
|
8803
8804
|
for (const op of unit.create) {
|
|
@@ -8809,7 +8810,7 @@ function createOpXrefMap(unit) {
|
|
|
8809
8810
|
return map;
|
|
8810
8811
|
}
|
|
8811
8812
|
|
|
8812
|
-
// bazel-out/
|
|
8813
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
|
|
8813
8814
|
function extractAttributes(job) {
|
|
8814
8815
|
for (const unit of job.units) {
|
|
8815
8816
|
const elements = createOpXrefMap(unit);
|
|
@@ -8876,7 +8877,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
8876
8877
|
}
|
|
8877
8878
|
}
|
|
8878
8879
|
|
|
8879
|
-
// bazel-out/
|
|
8880
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
|
|
8880
8881
|
function lookupElement2(elements, xref) {
|
|
8881
8882
|
const el = elements.get(xref);
|
|
8882
8883
|
if (el === void 0) {
|
|
@@ -8926,7 +8927,7 @@ function specializeBindings(job) {
|
|
|
8926
8927
|
}
|
|
8927
8928
|
}
|
|
8928
8929
|
|
|
8929
|
-
// bazel-out/
|
|
8930
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
|
|
8930
8931
|
var CHAINABLE = /* @__PURE__ */ new Set([
|
|
8931
8932
|
Identifiers.attribute,
|
|
8932
8933
|
Identifiers.classProp,
|
|
@@ -8992,7 +8993,7 @@ function chainOperationsInList(opList) {
|
|
|
8992
8993
|
}
|
|
8993
8994
|
}
|
|
8994
8995
|
|
|
8995
|
-
// bazel-out/
|
|
8996
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/collapse_singleton_interpolations.mjs
|
|
8996
8997
|
function collapseSingletonInterpolations(job) {
|
|
8997
8998
|
for (const unit of job.units) {
|
|
8998
8999
|
for (const op of unit.update) {
|
|
@@ -9004,7 +9005,7 @@ function collapseSingletonInterpolations(job) {
|
|
|
9004
9005
|
}
|
|
9005
9006
|
}
|
|
9006
9007
|
|
|
9007
|
-
// bazel-out/
|
|
9008
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
|
|
9008
9009
|
function generateConditionalExpressions(job) {
|
|
9009
9010
|
for (const unit of job.units) {
|
|
9010
9011
|
for (const op of unit.ops()) {
|
|
@@ -9041,7 +9042,7 @@ function generateConditionalExpressions(job) {
|
|
|
9041
9042
|
}
|
|
9042
9043
|
}
|
|
9043
9044
|
|
|
9044
|
-
// bazel-out/
|
|
9045
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/tags.mjs
|
|
9045
9046
|
var TagContentType;
|
|
9046
9047
|
(function(TagContentType2) {
|
|
9047
9048
|
TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
|
|
@@ -9074,7 +9075,7 @@ function mergeNsAndName(prefix, localName) {
|
|
|
9074
9075
|
return prefix ? `:${prefix}:${localName}` : localName;
|
|
9075
9076
|
}
|
|
9076
9077
|
|
|
9077
|
-
// bazel-out/
|
|
9078
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
9078
9079
|
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
9079
9080
|
["&&", BinaryOperator.And],
|
|
9080
9081
|
[">", BinaryOperator.Bigger],
|
|
@@ -9124,7 +9125,7 @@ function literalOrArrayLiteral(value) {
|
|
|
9124
9125
|
return literal(value);
|
|
9125
9126
|
}
|
|
9126
9127
|
|
|
9127
|
-
// bazel-out/
|
|
9128
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
|
|
9128
9129
|
function collectElementConsts(job) {
|
|
9129
9130
|
const allElementAttributes = /* @__PURE__ */ new Map();
|
|
9130
9131
|
for (const unit of job.units) {
|
|
@@ -9258,7 +9259,7 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
|
|
|
9258
9259
|
return literalArr(attrArray);
|
|
9259
9260
|
}
|
|
9260
9261
|
|
|
9261
|
-
// bazel-out/
|
|
9262
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_defer_deps_fns.mjs
|
|
9262
9263
|
function createDeferDepsFns(job) {
|
|
9263
9264
|
for (const unit of job.units) {
|
|
9264
9265
|
for (const op of unit.create) {
|
|
@@ -9286,18 +9287,22 @@ function createDeferDepsFns(job) {
|
|
|
9286
9287
|
}
|
|
9287
9288
|
}
|
|
9288
9289
|
|
|
9289
|
-
// bazel-out/
|
|
9290
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_i18n_contexts.mjs
|
|
9290
9291
|
function createI18nContexts(job) {
|
|
9292
|
+
const rootContexts = /* @__PURE__ */ new Map();
|
|
9291
9293
|
let currentI18nOp = null;
|
|
9292
9294
|
let xref;
|
|
9293
9295
|
for (const unit of job.units) {
|
|
9294
9296
|
for (const op of unit.create) {
|
|
9295
9297
|
switch (op.kind) {
|
|
9296
9298
|
case OpKind.I18nStart:
|
|
9297
|
-
xref = job.allocateXrefId();
|
|
9298
|
-
unit.create.push(createI18nContextOp(xref, op.xref, op.message, null));
|
|
9299
|
-
op.context = xref;
|
|
9300
9299
|
currentI18nOp = op;
|
|
9300
|
+
if (op.xref === op.root) {
|
|
9301
|
+
xref = job.allocateXrefId();
|
|
9302
|
+
unit.create.push(createI18nContextOp(I18nContextKind.RootI18n, xref, op.xref, op.message, null));
|
|
9303
|
+
op.context = xref;
|
|
9304
|
+
rootContexts.set(op.xref, xref);
|
|
9305
|
+
}
|
|
9301
9306
|
break;
|
|
9302
9307
|
case OpKind.I18nEnd:
|
|
9303
9308
|
currentI18nOp = null;
|
|
@@ -9308,7 +9313,7 @@ function createI18nContexts(job) {
|
|
|
9308
9313
|
}
|
|
9309
9314
|
if (op.message.id !== currentI18nOp.message.id) {
|
|
9310
9315
|
xref = job.allocateXrefId();
|
|
9311
|
-
unit.create.push(createI18nContextOp(xref, currentI18nOp.xref, op.message, null));
|
|
9316
|
+
unit.create.push(createI18nContextOp(I18nContextKind.Icu, xref, currentI18nOp.xref, op.message, null));
|
|
9312
9317
|
op.context = xref;
|
|
9313
9318
|
} else {
|
|
9314
9319
|
op.context = currentI18nOp.context;
|
|
@@ -9317,9 +9322,16 @@ function createI18nContexts(job) {
|
|
|
9317
9322
|
}
|
|
9318
9323
|
}
|
|
9319
9324
|
}
|
|
9325
|
+
for (const unit of job.units) {
|
|
9326
|
+
for (const op of unit.create) {
|
|
9327
|
+
if (op.kind === OpKind.I18nStart && op.xref !== op.root) {
|
|
9328
|
+
op.context = rootContexts.get(op.root);
|
|
9329
|
+
}
|
|
9330
|
+
}
|
|
9331
|
+
}
|
|
9320
9332
|
}
|
|
9321
9333
|
|
|
9322
|
-
// bazel-out/
|
|
9334
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_configs.mjs
|
|
9323
9335
|
function configureDeferInstructions(job) {
|
|
9324
9336
|
for (const unit of job.units) {
|
|
9325
9337
|
for (const op of unit.create) {
|
|
@@ -9336,7 +9348,7 @@ function configureDeferInstructions(job) {
|
|
|
9336
9348
|
}
|
|
9337
9349
|
}
|
|
9338
9350
|
|
|
9339
|
-
// bazel-out/
|
|
9351
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_resolve_targets.mjs
|
|
9340
9352
|
function resolveDeferTargetNames(job) {
|
|
9341
9353
|
const scopes = /* @__PURE__ */ new Map();
|
|
9342
9354
|
function getScopeForView2(view) {
|
|
@@ -9430,7 +9442,7 @@ var Scope = class {
|
|
|
9430
9442
|
}
|
|
9431
9443
|
};
|
|
9432
9444
|
|
|
9433
|
-
// bazel-out/
|
|
9445
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
|
|
9434
9446
|
var REPLACEMENTS = /* @__PURE__ */ new Map([
|
|
9435
9447
|
[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
|
|
9436
9448
|
[OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],
|
|
@@ -9457,7 +9469,7 @@ function collapseEmptyInstructions(job) {
|
|
|
9457
9469
|
}
|
|
9458
9470
|
}
|
|
9459
9471
|
|
|
9460
|
-
// bazel-out/
|
|
9472
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
|
|
9461
9473
|
function expandSafeReads(job) {
|
|
9462
9474
|
for (const unit of job.units) {
|
|
9463
9475
|
for (const op of unit.ops()) {
|
|
@@ -9593,7 +9605,7 @@ function ternaryTransform(e) {
|
|
|
9593
9605
|
return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
|
|
9594
9606
|
}
|
|
9595
9607
|
|
|
9596
|
-
// bazel-out/
|
|
9608
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/extract_i18n_messages.mjs
|
|
9597
9609
|
var ESCAPE = "\uFFFD";
|
|
9598
9610
|
var ELEMENT_MARKER = "#";
|
|
9599
9611
|
var TEMPLATE_MARKER = "*";
|
|
@@ -9604,7 +9616,7 @@ var LIST_END_MARKER = "]";
|
|
|
9604
9616
|
var LIST_DELIMITER = "|";
|
|
9605
9617
|
function extractI18nMessages(job) {
|
|
9606
9618
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
9607
|
-
const
|
|
9619
|
+
const i18nBlocks = /* @__PURE__ */ new Map();
|
|
9608
9620
|
for (const unit of job.units) {
|
|
9609
9621
|
for (const op of unit.create) {
|
|
9610
9622
|
switch (op.kind) {
|
|
@@ -9612,7 +9624,7 @@ function extractI18nMessages(job) {
|
|
|
9612
9624
|
i18nContexts.set(op.xref, op);
|
|
9613
9625
|
break;
|
|
9614
9626
|
case OpKind.I18nStart:
|
|
9615
|
-
|
|
9627
|
+
i18nBlocks.set(op.xref, op);
|
|
9616
9628
|
break;
|
|
9617
9629
|
}
|
|
9618
9630
|
}
|
|
@@ -9637,11 +9649,12 @@ function extractI18nMessages(job) {
|
|
|
9637
9649
|
if (!op.context) {
|
|
9638
9650
|
throw Error("ICU op should have its context set.");
|
|
9639
9651
|
}
|
|
9640
|
-
|
|
9641
|
-
|
|
9652
|
+
const i18nContext = i18nContexts.get(op.context);
|
|
9653
|
+
if (i18nContext.contextKind === I18nContextKind.Icu) {
|
|
9642
9654
|
const subMessage = createI18nMessage(job, i18nContext, op.messagePlaceholder);
|
|
9643
9655
|
unit.create.push(subMessage);
|
|
9644
|
-
const
|
|
9656
|
+
const rootI18nId = i18nBlocks.get(i18nContext.i18nBlock).root;
|
|
9657
|
+
const parentMessage = i18nBlockMessages.get(rootI18nId);
|
|
9645
9658
|
parentMessage == null ? void 0 : parentMessage.subMessages.push(subMessage.xref);
|
|
9646
9659
|
}
|
|
9647
9660
|
OpList.remove(op);
|
|
@@ -9654,30 +9667,67 @@ function extractI18nMessages(job) {
|
|
|
9654
9667
|
}
|
|
9655
9668
|
}
|
|
9656
9669
|
function createI18nMessage(job, context, messagePlaceholder) {
|
|
9657
|
-
let needsPostprocessing = context.
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
}
|
|
9662
|
-
}
|
|
9663
|
-
return createI18nMessageOp(job.allocateXrefId(), context.i18nBlock, context.message, messagePlaceholder != null ? messagePlaceholder : null, formatParams(context.params), formatParams(context.postprocessingParams), needsPostprocessing);
|
|
9670
|
+
let [formattedParams, needsPostprocessing] = formatParams(context.params);
|
|
9671
|
+
const [formattedPostprocessingParams] = formatParams(context.postprocessingParams);
|
|
9672
|
+
needsPostprocessing || (needsPostprocessing = formattedPostprocessingParams.size > 0);
|
|
9673
|
+
return createI18nMessageOp(job.allocateXrefId(), context.i18nBlock, context.message, messagePlaceholder != null ? messagePlaceholder : null, formattedParams, formattedPostprocessingParams, needsPostprocessing);
|
|
9664
9674
|
}
|
|
9665
9675
|
function formatParams(params) {
|
|
9666
|
-
const
|
|
9676
|
+
const formattedParams = /* @__PURE__ */ new Map();
|
|
9677
|
+
let needsPostprocessing = false;
|
|
9667
9678
|
for (const [placeholder, placeholderValues] of params) {
|
|
9668
|
-
const serializedValues = formatParamValues(placeholderValues);
|
|
9679
|
+
const [serializedValues, paramNeedsPostprocessing] = formatParamValues(placeholderValues);
|
|
9680
|
+
needsPostprocessing || (needsPostprocessing = paramNeedsPostprocessing);
|
|
9669
9681
|
if (serializedValues !== null) {
|
|
9670
|
-
|
|
9682
|
+
formattedParams.set(placeholder, literal(serializedValues));
|
|
9671
9683
|
}
|
|
9672
9684
|
}
|
|
9673
|
-
return
|
|
9685
|
+
return [formattedParams, needsPostprocessing];
|
|
9674
9686
|
}
|
|
9675
9687
|
function formatParamValues(values) {
|
|
9676
9688
|
if (values.length === 0) {
|
|
9677
|
-
return null;
|
|
9689
|
+
return [null, false];
|
|
9678
9690
|
}
|
|
9691
|
+
collapseElementTemplatePairs(values);
|
|
9679
9692
|
const serializedValues = values.map((value) => formatValue(value));
|
|
9680
|
-
return serializedValues.length === 1 ? serializedValues[0] : `${LIST_START_MARKER}${serializedValues.join(LIST_DELIMITER)}${LIST_END_MARKER}
|
|
9693
|
+
return serializedValues.length === 1 ? [serializedValues[0], false] : [`${LIST_START_MARKER}${serializedValues.join(LIST_DELIMITER)}${LIST_END_MARKER}`, true];
|
|
9694
|
+
}
|
|
9695
|
+
function collapseElementTemplatePairs(values) {
|
|
9696
|
+
var _a2;
|
|
9697
|
+
const valueIndiciesBySubTemplateIndex = /* @__PURE__ */ new Map();
|
|
9698
|
+
for (let i = 0; i < values.length; i++) {
|
|
9699
|
+
const value = values[i];
|
|
9700
|
+
if (value.subTemplateIndex !== null && value.flags & (I18nParamValueFlags.ElementTag | I18nParamValueFlags.TemplateTag)) {
|
|
9701
|
+
const valueIndicies = (_a2 = valueIndiciesBySubTemplateIndex.get(value.subTemplateIndex)) != null ? _a2 : [];
|
|
9702
|
+
valueIndicies.push(i);
|
|
9703
|
+
valueIndiciesBySubTemplateIndex.set(value.subTemplateIndex, valueIndicies);
|
|
9704
|
+
}
|
|
9705
|
+
}
|
|
9706
|
+
for (const [subTemplateIndex, valueIndicies] of valueIndiciesBySubTemplateIndex) {
|
|
9707
|
+
if (valueIndicies.length > 1) {
|
|
9708
|
+
const elementIndex = valueIndicies.find((index) => values[index].flags & I18nParamValueFlags.ElementTag);
|
|
9709
|
+
const templateIndex = valueIndicies.find((index) => values[index].flags & I18nParamValueFlags.TemplateTag);
|
|
9710
|
+
if (elementIndex !== void 0 && templateIndex !== void 0) {
|
|
9711
|
+
const elementValue = values[elementIndex];
|
|
9712
|
+
const templateValue = values[templateIndex];
|
|
9713
|
+
let compundValue;
|
|
9714
|
+
if (elementValue.flags & I18nParamValueFlags.OpenTag && elementValue.flags & I18nParamValueFlags.CloseTag) {
|
|
9715
|
+
compundValue = `${formatValue(templateValue)}${formatValue(elementValue)}${formatValue(templateValue)}`;
|
|
9716
|
+
} else if (elementValue.flags & I18nParamValueFlags.OpenTag) {
|
|
9717
|
+
compundValue = `${formatValue(templateValue)}${formatValue(elementValue)}`;
|
|
9718
|
+
} else {
|
|
9719
|
+
compundValue = `${formatValue(elementValue)}${formatValue(templateValue)}`;
|
|
9720
|
+
}
|
|
9721
|
+
values.splice(elementIndex, 1, { value: compundValue, subTemplateIndex, flags: I18nParamValueFlags.None });
|
|
9722
|
+
values.splice(templateIndex, 1, null);
|
|
9723
|
+
}
|
|
9724
|
+
}
|
|
9725
|
+
}
|
|
9726
|
+
for (let i = values.length - 1; i >= 0; i--) {
|
|
9727
|
+
if (values[i] === null) {
|
|
9728
|
+
values.splice(i, 1);
|
|
9729
|
+
}
|
|
9730
|
+
}
|
|
9681
9731
|
}
|
|
9682
9732
|
function formatValue(value) {
|
|
9683
9733
|
if (value.flags === I18nParamValueFlags.None) {
|
|
@@ -9700,7 +9750,7 @@ function formatValue(value) {
|
|
|
9700
9750
|
return `${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
9701
9751
|
}
|
|
9702
9752
|
|
|
9703
|
-
// bazel-out/
|
|
9753
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
|
|
9704
9754
|
function generateAdvance(job) {
|
|
9705
9755
|
for (const unit of job.units) {
|
|
9706
9756
|
const slotMap = /* @__PURE__ */ new Map();
|
|
@@ -9732,7 +9782,7 @@ function generateAdvance(job) {
|
|
|
9732
9782
|
}
|
|
9733
9783
|
}
|
|
9734
9784
|
|
|
9735
|
-
// bazel-out/
|
|
9785
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
|
|
9736
9786
|
function generateProjectionDefs(job) {
|
|
9737
9787
|
const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;
|
|
9738
9788
|
const selectors = [];
|
|
@@ -9756,7 +9806,7 @@ function generateProjectionDefs(job) {
|
|
|
9756
9806
|
}
|
|
9757
9807
|
}
|
|
9758
9808
|
|
|
9759
|
-
// bazel-out/
|
|
9809
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
|
|
9760
9810
|
function generateVariables(job) {
|
|
9761
9811
|
recursivelyProcessView(job.root, null);
|
|
9762
9812
|
}
|
|
@@ -9844,7 +9894,7 @@ function generateVariablesInScopeForView(view, scope) {
|
|
|
9844
9894
|
return newOps;
|
|
9845
9895
|
}
|
|
9846
9896
|
|
|
9847
|
-
// bazel-out/
|
|
9897
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_expression_collection.mjs
|
|
9848
9898
|
function collectConstExpressions(job) {
|
|
9849
9899
|
for (const unit of job.units) {
|
|
9850
9900
|
for (const op of unit.ops()) {
|
|
@@ -9858,7 +9908,7 @@ function collectConstExpressions(job) {
|
|
|
9858
9908
|
}
|
|
9859
9909
|
}
|
|
9860
9910
|
|
|
9861
|
-
// bazel-out/
|
|
9911
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
|
|
9862
9912
|
var STYLE_DOT = "style.";
|
|
9863
9913
|
var CLASS_DOT = "class.";
|
|
9864
9914
|
var STYLE_BANG = "style!";
|
|
@@ -9916,7 +9966,7 @@ function parseProperty(name) {
|
|
|
9916
9966
|
return { property: property2, suffix };
|
|
9917
9967
|
}
|
|
9918
9968
|
|
|
9919
|
-
// bazel-out/
|
|
9969
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/map_util.mjs
|
|
9920
9970
|
function mapLiteral(obj, quoted = false) {
|
|
9921
9971
|
return literalMap(Object.keys(obj).map((key) => ({
|
|
9922
9972
|
key,
|
|
@@ -9925,7 +9975,7 @@ function mapLiteral(obj, quoted = false) {
|
|
|
9925
9975
|
})));
|
|
9926
9976
|
}
|
|
9927
9977
|
|
|
9928
|
-
// bazel-out/
|
|
9978
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
|
|
9929
9979
|
var IcuSerializerVisitor = class {
|
|
9930
9980
|
visitText(text2) {
|
|
9931
9981
|
return text2.value;
|
|
@@ -9959,7 +10009,7 @@ function serializeIcuNode(icu) {
|
|
|
9959
10009
|
return icu.visit(serializer);
|
|
9960
10010
|
}
|
|
9961
10011
|
|
|
9962
|
-
// bazel-out/
|
|
10012
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
|
|
9963
10013
|
var TokenType;
|
|
9964
10014
|
(function(TokenType2) {
|
|
9965
10015
|
TokenType2[TokenType2["Character"] = 0] = "Character";
|
|
@@ -10320,7 +10370,7 @@ function parseIntAutoRadix(text2) {
|
|
|
10320
10370
|
return result;
|
|
10321
10371
|
}
|
|
10322
10372
|
|
|
10323
|
-
// bazel-out/
|
|
10373
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
|
|
10324
10374
|
var SplitInterpolation = class {
|
|
10325
10375
|
constructor(strings, expressions, offsets) {
|
|
10326
10376
|
this.strings = strings;
|
|
@@ -11214,7 +11264,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
|
|
|
11214
11264
|
return offsetMap;
|
|
11215
11265
|
}
|
|
11216
11266
|
|
|
11217
|
-
// bazel-out/
|
|
11267
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
|
|
11218
11268
|
var NodeWithI18n = class {
|
|
11219
11269
|
constructor(sourceSpan, i18n2) {
|
|
11220
11270
|
this.sourceSpan = sourceSpan;
|
|
@@ -11366,11 +11416,11 @@ var RecursiveVisitor = class {
|
|
|
11366
11416
|
}
|
|
11367
11417
|
};
|
|
11368
11418
|
|
|
11369
|
-
// bazel-out/
|
|
11419
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
|
|
11370
11420
|
var ElementSchemaRegistry = class {
|
|
11371
11421
|
};
|
|
11372
11422
|
|
|
11373
|
-
// bazel-out/
|
|
11423
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
|
|
11374
11424
|
var BOOLEAN = "boolean";
|
|
11375
11425
|
var NUMBER = "number";
|
|
11376
11426
|
var STRING = "string";
|
|
@@ -11723,7 +11773,7 @@ function _isPixelDimensionStyle(prop) {
|
|
|
11723
11773
|
}
|
|
11724
11774
|
}
|
|
11725
11775
|
|
|
11726
|
-
// bazel-out/
|
|
11776
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
|
|
11727
11777
|
var HtmlTagDefinition = class {
|
|
11728
11778
|
constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false } = {}) {
|
|
11729
11779
|
this.closedByChildren = {};
|
|
@@ -11841,7 +11891,7 @@ function getHtmlTagDefinition(tagName) {
|
|
|
11841
11891
|
return (_b2 = (_a2 = TAG_DEFINITIONS[tagName]) != null ? _a2 : TAG_DEFINITIONS[tagName.toLowerCase()]) != null ? _b2 : DEFAULT_TAG_DEFINITION;
|
|
11842
11892
|
}
|
|
11843
11893
|
|
|
11844
|
-
// bazel-out/
|
|
11894
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
|
|
11845
11895
|
var TAG_TO_PLACEHOLDER_NAMES = {
|
|
11846
11896
|
"A": "LINK",
|
|
11847
11897
|
"B": "BOLD_TEXT",
|
|
@@ -11963,7 +12013,7 @@ var PlaceholderRegistry = class {
|
|
|
11963
12013
|
}
|
|
11964
12014
|
};
|
|
11965
12015
|
|
|
11966
|
-
// bazel-out/
|
|
12016
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
|
|
11967
12017
|
var _expParser = new Parser(new Lexer());
|
|
11968
12018
|
function createI18nMessageFactory(interpolationConfig, containerBlocks) {
|
|
11969
12019
|
const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks);
|
|
@@ -12142,14 +12192,14 @@ function extractPlaceholderName(input) {
|
|
|
12142
12192
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
12143
12193
|
}
|
|
12144
12194
|
|
|
12145
|
-
// bazel-out/
|
|
12195
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
|
|
12146
12196
|
var I18nError = class extends ParseError {
|
|
12147
12197
|
constructor(span, msg) {
|
|
12148
12198
|
super(span, msg);
|
|
12149
12199
|
}
|
|
12150
12200
|
};
|
|
12151
12201
|
|
|
12152
|
-
// bazel-out/
|
|
12202
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
|
|
12153
12203
|
var NAMED_ENTITIES = {
|
|
12154
12204
|
"AElig": "\xC6",
|
|
12155
12205
|
"AMP": "&",
|
|
@@ -14280,7 +14330,7 @@ var NAMED_ENTITIES = {
|
|
|
14280
14330
|
var NGSP_UNICODE = "\uE500";
|
|
14281
14331
|
NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
|
|
14282
14332
|
|
|
14283
|
-
// bazel-out/
|
|
14333
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
|
|
14284
14334
|
var TokenError = class extends ParseError {
|
|
14285
14335
|
constructor(errorMsg, tokenType, span) {
|
|
14286
14336
|
super(span, errorMsg);
|
|
@@ -15201,7 +15251,7 @@ var CursorError = class {
|
|
|
15201
15251
|
}
|
|
15202
15252
|
};
|
|
15203
15253
|
|
|
15204
|
-
// bazel-out/
|
|
15254
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
|
|
15205
15255
|
var TreeError = class extends ParseError {
|
|
15206
15256
|
static create(elementName, span, msg) {
|
|
15207
15257
|
return new TreeError(elementName, span, msg);
|
|
@@ -15585,7 +15635,7 @@ function decodeEntity(match, entity) {
|
|
|
15585
15635
|
return match;
|
|
15586
15636
|
}
|
|
15587
15637
|
|
|
15588
|
-
// bazel-out/
|
|
15638
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
|
|
15589
15639
|
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
|
|
15590
15640
|
"iframe|srcdoc",
|
|
15591
15641
|
"*|innerhtml",
|
|
@@ -15600,7 +15650,7 @@ function isTrustedTypesSink(tagName, propName) {
|
|
|
15600
15650
|
return TRUSTED_TYPES_SINKS.has(tagName + "|" + propName) || TRUSTED_TYPES_SINKS.has("*|" + propName);
|
|
15601
15651
|
}
|
|
15602
15652
|
|
|
15603
|
-
// bazel-out/
|
|
15653
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
|
|
15604
15654
|
var setI18nRefs = (htmlNode, i18nNode) => {
|
|
15605
15655
|
if (htmlNode instanceof NodeWithI18n) {
|
|
15606
15656
|
if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {
|
|
@@ -15757,7 +15807,7 @@ function i18nMetaToJSDoc(meta) {
|
|
|
15757
15807
|
return jsDocComment(tags);
|
|
15758
15808
|
}
|
|
15759
15809
|
|
|
15760
|
-
// bazel-out/
|
|
15810
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
|
|
15761
15811
|
var GOOG_GET_MSG = "goog.getMsg";
|
|
15762
15812
|
function createGoogleGetMsgStatements(variable2, message, closureVar, placeholderValues) {
|
|
15763
15813
|
const messageString = serializeI18nMessageForGetMsg(message);
|
|
@@ -15808,7 +15858,7 @@ function serializeI18nMessageForGetMsg(message) {
|
|
|
15808
15858
|
return message.nodes.map((node) => node.visit(serializerVisitor2, null)).join("");
|
|
15809
15859
|
}
|
|
15810
15860
|
|
|
15811
|
-
// bazel-out/
|
|
15861
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
|
|
15812
15862
|
function createLocalizeStatements(variable2, message, params) {
|
|
15813
15863
|
const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);
|
|
15814
15864
|
const sourceSpan = getSourceSpan(message);
|
|
@@ -15897,7 +15947,7 @@ function createEmptyMessagePart(location) {
|
|
|
15897
15947
|
return new LiteralPiece("", new ParseSourceSpan(location, location));
|
|
15898
15948
|
}
|
|
15899
15949
|
|
|
15900
|
-
// bazel-out/
|
|
15950
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
|
|
15901
15951
|
var NG_I18N_CLOSURE_MODE = "ngI18nClosureMode";
|
|
15902
15952
|
var TRANSLATION_VAR_PREFIX2 = "i18n_";
|
|
15903
15953
|
function collectI18nConsts(job) {
|
|
@@ -15992,7 +16042,7 @@ function assertAllParamsResolved(op) {
|
|
|
15992
16042
|
}
|
|
15993
16043
|
}
|
|
15994
16044
|
|
|
15995
|
-
// bazel-out/
|
|
16045
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
|
|
15996
16046
|
function extractI18nText(job) {
|
|
15997
16047
|
var _a2;
|
|
15998
16048
|
for (const unit of job.units) {
|
|
@@ -16051,7 +16101,7 @@ function extractI18nText(job) {
|
|
|
16051
16101
|
}
|
|
16052
16102
|
}
|
|
16053
16103
|
|
|
16054
|
-
// bazel-out/
|
|
16104
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
|
|
16055
16105
|
function liftLocalRefs(job) {
|
|
16056
16106
|
for (const unit of job.units) {
|
|
16057
16107
|
for (const op of unit.create) {
|
|
@@ -16081,48 +16131,7 @@ function serializeLocalRefs(refs) {
|
|
|
16081
16131
|
return literalArr(constRefs);
|
|
16082
16132
|
}
|
|
16083
16133
|
|
|
16084
|
-
// bazel-out/
|
|
16085
|
-
function mergeI18nContexts(job) {
|
|
16086
|
-
const i18nOps = /* @__PURE__ */ new Map();
|
|
16087
|
-
const i18nContexts = /* @__PURE__ */ new Map();
|
|
16088
|
-
for (const unit of job.units) {
|
|
16089
|
-
for (const op of unit.create) {
|
|
16090
|
-
switch (op.kind) {
|
|
16091
|
-
case OpKind.I18nStart:
|
|
16092
|
-
if (!op.context) {
|
|
16093
|
-
throw Error("I18n op should have its context set.");
|
|
16094
|
-
}
|
|
16095
|
-
i18nOps.set(op.xref, op);
|
|
16096
|
-
break;
|
|
16097
|
-
case OpKind.I18nContext:
|
|
16098
|
-
i18nContexts.set(op.xref, op);
|
|
16099
|
-
break;
|
|
16100
|
-
}
|
|
16101
|
-
}
|
|
16102
|
-
}
|
|
16103
|
-
for (const childI18nOp of i18nOps.values()) {
|
|
16104
|
-
if (childI18nOp.xref !== childI18nOp.root) {
|
|
16105
|
-
const childContext = i18nContexts.get(childI18nOp.context);
|
|
16106
|
-
const rootI18nOp = i18nOps.get(childI18nOp.root);
|
|
16107
|
-
const rootContext = i18nContexts.get(rootI18nOp.context);
|
|
16108
|
-
mergeParams(rootContext.params, childContext.params);
|
|
16109
|
-
mergeParams(rootContext.postprocessingParams, childContext.postprocessingParams);
|
|
16110
|
-
}
|
|
16111
|
-
}
|
|
16112
|
-
}
|
|
16113
|
-
function mergeParams(to, from) {
|
|
16114
|
-
for (const [placeholder, fromValues] of from) {
|
|
16115
|
-
const toValues = to.get(placeholder) || [];
|
|
16116
|
-
const flags = fromValues[0].flags;
|
|
16117
|
-
if (flags & I18nParamValueFlags.CloseTag && !(flags & I18nParamValueFlags.OpenTag)) {
|
|
16118
|
-
to.set(placeholder, [...fromValues, ...toValues]);
|
|
16119
|
-
} else {
|
|
16120
|
-
to.set(placeholder, [...toValues, ...fromValues]);
|
|
16121
|
-
}
|
|
16122
|
-
}
|
|
16123
|
-
}
|
|
16124
|
-
|
|
16125
|
-
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
16134
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
16126
16135
|
function emitNamespaceChanges(job) {
|
|
16127
16136
|
for (const unit of job.units) {
|
|
16128
16137
|
let activeNamespace = Namespace.HTML;
|
|
@@ -16138,7 +16147,7 @@ function emitNamespaceChanges(job) {
|
|
|
16138
16147
|
}
|
|
16139
16148
|
}
|
|
16140
16149
|
|
|
16141
|
-
// bazel-out/
|
|
16150
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/style_parser.mjs
|
|
16142
16151
|
function parse(value) {
|
|
16143
16152
|
const styles = [];
|
|
16144
16153
|
let i = 0;
|
|
@@ -16199,7 +16208,7 @@ function hyphenate2(value) {
|
|
|
16199
16208
|
}).toLowerCase();
|
|
16200
16209
|
}
|
|
16201
16210
|
|
|
16202
|
-
// bazel-out/
|
|
16211
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
|
|
16203
16212
|
function nameFunctionsAndVariables(job) {
|
|
16204
16213
|
addNamesToView(job.root, job.componentName, { index: 0 }, job.compatibility === CompatibilityMode.TemplateDefinitionBuilder);
|
|
16205
16214
|
}
|
|
@@ -16314,7 +16323,7 @@ function stripImportant(name) {
|
|
|
16314
16323
|
return name;
|
|
16315
16324
|
}
|
|
16316
16325
|
|
|
16317
|
-
// bazel-out/
|
|
16326
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
|
|
16318
16327
|
function mergeNextContextExpressions(job) {
|
|
16319
16328
|
for (const unit of job.units) {
|
|
16320
16329
|
for (const op of unit.create) {
|
|
@@ -16360,7 +16369,7 @@ function mergeNextContextsInOps(ops) {
|
|
|
16360
16369
|
}
|
|
16361
16370
|
}
|
|
16362
16371
|
|
|
16363
|
-
// bazel-out/
|
|
16372
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
|
|
16364
16373
|
var CONTAINER_TAG = "ng-container";
|
|
16365
16374
|
function generateNgContainerOps(job) {
|
|
16366
16375
|
for (const unit of job.units) {
|
|
@@ -16377,7 +16386,7 @@ function generateNgContainerOps(job) {
|
|
|
16377
16386
|
}
|
|
16378
16387
|
}
|
|
16379
16388
|
|
|
16380
|
-
// bazel-out/
|
|
16389
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
|
|
16381
16390
|
function lookupElement3(elements, xref) {
|
|
16382
16391
|
const el = elements.get(xref);
|
|
16383
16392
|
if (el === void 0) {
|
|
@@ -16407,7 +16416,7 @@ function disableBindings(job) {
|
|
|
16407
16416
|
}
|
|
16408
16417
|
}
|
|
16409
16418
|
|
|
16410
|
-
// bazel-out/
|
|
16419
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
|
|
16411
16420
|
function generateNullishCoalesceExpressions(job) {
|
|
16412
16421
|
for (const unit of job.units) {
|
|
16413
16422
|
for (const op of unit.ops()) {
|
|
@@ -16423,7 +16432,7 @@ function generateNullishCoalesceExpressions(job) {
|
|
|
16423
16432
|
}
|
|
16424
16433
|
}
|
|
16425
16434
|
|
|
16426
|
-
// bazel-out/
|
|
16435
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
|
|
16427
16436
|
function kindTest(kind) {
|
|
16428
16437
|
return (op) => op.kind === kind;
|
|
16429
16438
|
}
|
|
@@ -16497,7 +16506,7 @@ function keepLast(ops) {
|
|
|
16497
16506
|
return ops.slice(ops.length - 1);
|
|
16498
16507
|
}
|
|
16499
16508
|
|
|
16500
|
-
// bazel-out/
|
|
16509
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
|
|
16501
16510
|
function parseExtractedStyles(job) {
|
|
16502
16511
|
for (const unit of job.units) {
|
|
16503
16512
|
for (const op of unit.create) {
|
|
@@ -16520,7 +16529,7 @@ function parseExtractedStyles(job) {
|
|
|
16520
16529
|
}
|
|
16521
16530
|
}
|
|
16522
16531
|
|
|
16523
|
-
// bazel-out/
|
|
16532
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
|
|
16524
16533
|
function removeContentSelectors(job) {
|
|
16525
16534
|
for (const unit of job.units) {
|
|
16526
16535
|
const elements = createOpXrefMap(unit);
|
|
@@ -16544,7 +16553,7 @@ function lookupInXrefMap(map, xref) {
|
|
|
16544
16553
|
return el;
|
|
16545
16554
|
}
|
|
16546
16555
|
|
|
16547
|
-
// bazel-out/
|
|
16556
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
|
|
16548
16557
|
function createPipes(job) {
|
|
16549
16558
|
for (const unit of job.units) {
|
|
16550
16559
|
processPipeBindingsInView(unit);
|
|
@@ -16592,7 +16601,7 @@ function addPipeToCreationBlock(unit, afterTargetXref, binding) {
|
|
|
16592
16601
|
throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);
|
|
16593
16602
|
}
|
|
16594
16603
|
|
|
16595
|
-
// bazel-out/
|
|
16604
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
|
|
16596
16605
|
function createVariadicPipes(job) {
|
|
16597
16606
|
for (const unit of job.units) {
|
|
16598
16607
|
for (const op of unit.update) {
|
|
@@ -16609,7 +16618,7 @@ function createVariadicPipes(job) {
|
|
|
16609
16618
|
}
|
|
16610
16619
|
}
|
|
16611
16620
|
|
|
16612
|
-
// bazel-out/
|
|
16621
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs
|
|
16613
16622
|
function propagateI18nBlocks(job) {
|
|
16614
16623
|
propagateI18nBlocksToTemplates(job.root, 0);
|
|
16615
16624
|
}
|
|
@@ -16633,9 +16642,10 @@ function propagateI18nBlocksToTemplates(unit, subTemplateIndex) {
|
|
|
16633
16642
|
subTemplateIndex++;
|
|
16634
16643
|
wrapTemplateWithI18n(templateView, i18nBlock);
|
|
16635
16644
|
}
|
|
16636
|
-
propagateI18nBlocksToTemplates(templateView, subTemplateIndex);
|
|
16645
|
+
subTemplateIndex = propagateI18nBlocksToTemplates(templateView, subTemplateIndex);
|
|
16637
16646
|
}
|
|
16638
16647
|
}
|
|
16648
|
+
return subTemplateIndex;
|
|
16639
16649
|
}
|
|
16640
16650
|
function wrapTemplateWithI18n(unit, parentI18n) {
|
|
16641
16651
|
var _a2;
|
|
@@ -16646,7 +16656,7 @@ function wrapTemplateWithI18n(unit, parentI18n) {
|
|
|
16646
16656
|
}
|
|
16647
16657
|
}
|
|
16648
16658
|
|
|
16649
|
-
// bazel-out/
|
|
16659
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
|
|
16650
16660
|
function extractPureFunctions(job) {
|
|
16651
16661
|
for (const view of job.units) {
|
|
16652
16662
|
for (const op of view.ops()) {
|
|
@@ -16688,7 +16698,7 @@ var PureFunctionConstant = class extends GenericKeyFn {
|
|
|
16688
16698
|
}
|
|
16689
16699
|
};
|
|
16690
16700
|
|
|
16691
|
-
// bazel-out/
|
|
16701
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
|
|
16692
16702
|
function generatePureLiteralStructures(job) {
|
|
16693
16703
|
for (const unit of job.units) {
|
|
16694
16704
|
for (const op of unit.update) {
|
|
@@ -16735,7 +16745,7 @@ function transformLiteralMap(expr) {
|
|
|
16735
16745
|
return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
|
|
16736
16746
|
}
|
|
16737
16747
|
|
|
16738
|
-
// bazel-out/
|
|
16748
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
|
|
16739
16749
|
function element(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
16740
16750
|
return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
16741
16751
|
}
|
|
@@ -17246,7 +17256,7 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
|
|
|
17246
17256
|
return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
|
|
17247
17257
|
}
|
|
17248
17258
|
|
|
17249
|
-
// bazel-out/
|
|
17259
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
|
|
17250
17260
|
var sanitizerIdentifierMap = /* @__PURE__ */ new Map([
|
|
17251
17261
|
[SanitizerFn.Html, Identifiers.sanitizeHtml],
|
|
17252
17262
|
[SanitizerFn.IframeAttribute, Identifiers.validateIframeAttribute],
|
|
@@ -17575,7 +17585,7 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
|
|
|
17575
17585
|
return fn(params, handlerStmts, void 0, void 0, name);
|
|
17576
17586
|
}
|
|
17577
17587
|
|
|
17578
|
-
// bazel-out/
|
|
17588
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
|
|
17579
17589
|
function removeEmptyBindings(job) {
|
|
17580
17590
|
for (const unit of job.units) {
|
|
17581
17591
|
for (const op of unit.update) {
|
|
@@ -17596,7 +17606,7 @@ function removeEmptyBindings(job) {
|
|
|
17596
17606
|
}
|
|
17597
17607
|
}
|
|
17598
17608
|
|
|
17599
|
-
// bazel-out/
|
|
17609
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_i18n_contexts.mjs
|
|
17600
17610
|
function removeI18nContexts(job) {
|
|
17601
17611
|
for (const unit of job.units) {
|
|
17602
17612
|
for (const op of unit.create) {
|
|
@@ -17612,7 +17622,7 @@ function removeI18nContexts(job) {
|
|
|
17612
17622
|
}
|
|
17613
17623
|
}
|
|
17614
17624
|
|
|
17615
|
-
// bazel-out/
|
|
17625
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/repeater_derived_vars.mjs
|
|
17616
17626
|
function generateRepeaterDerivedVars(job) {
|
|
17617
17627
|
const repeaters = /* @__PURE__ */ new Map();
|
|
17618
17628
|
for (const unit of job.units) {
|
|
@@ -17644,7 +17654,7 @@ function generateRepeaterDerivedVars(job) {
|
|
|
17644
17654
|
}
|
|
17645
17655
|
}
|
|
17646
17656
|
|
|
17647
|
-
// bazel-out/
|
|
17657
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
|
|
17648
17658
|
function resolveContexts(job) {
|
|
17649
17659
|
for (const unit of job.units) {
|
|
17650
17660
|
processLexicalScope(unit, unit.create);
|
|
@@ -17685,7 +17695,7 @@ function processLexicalScope(view, ops) {
|
|
|
17685
17695
|
}
|
|
17686
17696
|
}
|
|
17687
17697
|
|
|
17688
|
-
// bazel-out/
|
|
17698
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
|
|
17689
17699
|
function resolveDollarEvent(job) {
|
|
17690
17700
|
for (const unit of job.units) {
|
|
17691
17701
|
transformDollarEvent(unit, unit.create);
|
|
@@ -17706,7 +17716,7 @@ function transformDollarEvent(unit, ops) {
|
|
|
17706
17716
|
}
|
|
17707
17717
|
}
|
|
17708
17718
|
|
|
17709
|
-
// bazel-out/
|
|
17719
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_element_placeholders.mjs
|
|
17710
17720
|
function resolveI18nElementPlaceholders(job) {
|
|
17711
17721
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
17712
17722
|
const elements = /* @__PURE__ */ new Map();
|
|
@@ -17722,55 +17732,67 @@ function resolveI18nElementPlaceholders(job) {
|
|
|
17722
17732
|
}
|
|
17723
17733
|
}
|
|
17724
17734
|
}
|
|
17725
|
-
|
|
17726
|
-
|
|
17727
|
-
|
|
17728
|
-
|
|
17729
|
-
|
|
17730
|
-
|
|
17731
|
-
|
|
17735
|
+
resolvePlaceholdersForView(job, job.root, i18nContexts, elements);
|
|
17736
|
+
}
|
|
17737
|
+
function resolvePlaceholdersForView(job, unit, i18nContexts, elements) {
|
|
17738
|
+
let currentOps = null;
|
|
17739
|
+
for (const op of unit.create) {
|
|
17740
|
+
switch (op.kind) {
|
|
17741
|
+
case OpKind.I18nStart:
|
|
17742
|
+
if (!op.context) {
|
|
17743
|
+
throw Error("Could not find i18n context for i18n op");
|
|
17744
|
+
}
|
|
17745
|
+
currentOps = { i18nBlock: op, i18nContext: i18nContexts.get(op.context) };
|
|
17746
|
+
break;
|
|
17747
|
+
case OpKind.I18nEnd:
|
|
17748
|
+
currentOps = null;
|
|
17749
|
+
break;
|
|
17750
|
+
case OpKind.ElementStart:
|
|
17751
|
+
if (op.i18nPlaceholder !== void 0) {
|
|
17752
|
+
if (currentOps === null) {
|
|
17753
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17732
17754
|
}
|
|
17733
|
-
|
|
17734
|
-
|
|
17735
|
-
|
|
17736
|
-
|
|
17737
|
-
break;
|
|
17738
|
-
case OpKind.ElementStart:
|
|
17739
|
-
if (op.i18nPlaceholder !== void 0) {
|
|
17740
|
-
if (currentOps === null) {
|
|
17741
|
-
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17742
|
-
}
|
|
17743
|
-
const { startName, closeName } = op.i18nPlaceholder;
|
|
17744
|
-
let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.OpenTag;
|
|
17745
|
-
if (closeName === "") {
|
|
17746
|
-
flags |= I18nParamValueFlags.CloseTag;
|
|
17747
|
-
}
|
|
17748
|
-
addParam(currentOps.i18nContext.params, startName, op.handle.slot, currentOps.i18nBlock.subTemplateIndex, flags);
|
|
17755
|
+
const { startName, closeName } = op.i18nPlaceholder;
|
|
17756
|
+
let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.OpenTag;
|
|
17757
|
+
if (closeName === "") {
|
|
17758
|
+
flags |= I18nParamValueFlags.CloseTag;
|
|
17749
17759
|
}
|
|
17750
|
-
|
|
17751
|
-
|
|
17752
|
-
|
|
17753
|
-
|
|
17754
|
-
|
|
17755
|
-
|
|
17756
|
-
|
|
17757
|
-
|
|
17758
|
-
if (closeName !== "") {
|
|
17759
|
-
addParam(currentOps.i18nContext.params, closeName, startOp.handle.slot, currentOps.i18nBlock.subTemplateIndex, I18nParamValueFlags.ElementTag | I18nParamValueFlags.CloseTag);
|
|
17760
|
-
}
|
|
17760
|
+
addParam(currentOps.i18nContext.params, startName, op.handle.slot, currentOps.i18nBlock.subTemplateIndex, flags);
|
|
17761
|
+
}
|
|
17762
|
+
break;
|
|
17763
|
+
case OpKind.ElementEnd:
|
|
17764
|
+
const startOp = elements.get(op.xref);
|
|
17765
|
+
if (startOp && startOp.i18nPlaceholder !== void 0) {
|
|
17766
|
+
if (currentOps === null) {
|
|
17767
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17761
17768
|
}
|
|
17762
|
-
|
|
17763
|
-
|
|
17764
|
-
|
|
17765
|
-
if (currentOps === null) {
|
|
17766
|
-
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17767
|
-
}
|
|
17768
|
-
const subTemplateIndex = getSubTemplateIndexForTemplateTag(job, currentOps.i18nBlock, op);
|
|
17769
|
-
addParam(currentOps.i18nContext.params, op.i18nPlaceholder.startName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag);
|
|
17770
|
-
addParam(currentOps.i18nContext.params, op.i18nPlaceholder.closeName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag);
|
|
17769
|
+
const { closeName } = startOp.i18nPlaceholder;
|
|
17770
|
+
if (closeName !== "") {
|
|
17771
|
+
addParam(currentOps.i18nContext.params, closeName, startOp.handle.slot, currentOps.i18nBlock.subTemplateIndex, I18nParamValueFlags.ElementTag | I18nParamValueFlags.CloseTag);
|
|
17771
17772
|
}
|
|
17772
|
-
|
|
17773
|
-
|
|
17773
|
+
}
|
|
17774
|
+
break;
|
|
17775
|
+
case OpKind.Template:
|
|
17776
|
+
if (op.i18nPlaceholder !== void 0) {
|
|
17777
|
+
if (currentOps === null) {
|
|
17778
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17779
|
+
}
|
|
17780
|
+
let startFlags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.OpenTag;
|
|
17781
|
+
const subTemplateIndex = getSubTemplateIndexForTemplateTag(job, currentOps.i18nBlock, op);
|
|
17782
|
+
const { startName, closeName } = op.i18nPlaceholder;
|
|
17783
|
+
const isSelfClosing = closeName === "";
|
|
17784
|
+
if (isSelfClosing) {
|
|
17785
|
+
startFlags |= I18nParamValueFlags.CloseTag;
|
|
17786
|
+
}
|
|
17787
|
+
addParam(currentOps.i18nContext.params, startName, op.handle.slot, subTemplateIndex, startFlags);
|
|
17788
|
+
resolvePlaceholdersForView(job, job.views.get(op.xref), i18nContexts, elements);
|
|
17789
|
+
if (!isSelfClosing) {
|
|
17790
|
+
addParam(currentOps.i18nContext.params, closeName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag);
|
|
17791
|
+
}
|
|
17792
|
+
} else {
|
|
17793
|
+
resolvePlaceholdersForView(job, job.views.get(op.xref), i18nContexts, elements);
|
|
17794
|
+
}
|
|
17795
|
+
break;
|
|
17774
17796
|
}
|
|
17775
17797
|
}
|
|
17776
17798
|
}
|
|
@@ -17789,7 +17811,7 @@ function addParam(params, placeholder, value, subTemplateIndex, flags) {
|
|
|
17789
17811
|
params.set(placeholder, values);
|
|
17790
17812
|
}
|
|
17791
17813
|
|
|
17792
|
-
// bazel-out/
|
|
17814
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
|
|
17793
17815
|
function resolveI18nExpressionPlaceholders(job) {
|
|
17794
17816
|
const subTemplateIndicies = /* @__PURE__ */ new Map();
|
|
17795
17817
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
@@ -17810,8 +17832,8 @@ function resolveI18nExpressionPlaceholders(job) {
|
|
|
17810
17832
|
for (const op of unit.update) {
|
|
17811
17833
|
if (op.kind === OpKind.I18nExpression) {
|
|
17812
17834
|
const i18nContext = i18nContexts.get(op.context);
|
|
17813
|
-
const index = expressionIndices.get(
|
|
17814
|
-
const subTemplateIndex = subTemplateIndicies.get(
|
|
17835
|
+
const index = expressionIndices.get(op.target) || 0;
|
|
17836
|
+
const subTemplateIndex = subTemplateIndicies.get(op.target);
|
|
17815
17837
|
const params = op.resolutionTime === I18nParamResolutionTime.Creation ? i18nContext.params : i18nContext.postprocessingParams;
|
|
17816
17838
|
const values = params.get(op.i18nPlaceholder) || [];
|
|
17817
17839
|
values.push({
|
|
@@ -17820,36 +17842,20 @@ function resolveI18nExpressionPlaceholders(job) {
|
|
|
17820
17842
|
flags: I18nParamValueFlags.ExpressionIndex
|
|
17821
17843
|
});
|
|
17822
17844
|
params.set(op.i18nPlaceholder, values);
|
|
17823
|
-
expressionIndices.set(
|
|
17845
|
+
expressionIndices.set(op.target, index + 1);
|
|
17824
17846
|
}
|
|
17825
17847
|
}
|
|
17826
17848
|
}
|
|
17827
17849
|
}
|
|
17828
17850
|
|
|
17829
|
-
// bazel-out/
|
|
17851
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_icu_placeholders.mjs
|
|
17830
17852
|
function resolveI18nIcuPlaceholders(job) {
|
|
17831
|
-
const contextOps = /* @__PURE__ */ new Map();
|
|
17832
|
-
for (const unit of job.units) {
|
|
17833
|
-
for (const op of unit.create) {
|
|
17834
|
-
switch (op.kind) {
|
|
17835
|
-
case OpKind.I18nContext:
|
|
17836
|
-
contextOps.set(op.xref, op);
|
|
17837
|
-
break;
|
|
17838
|
-
}
|
|
17839
|
-
}
|
|
17840
|
-
}
|
|
17841
17853
|
for (const unit of job.units) {
|
|
17842
17854
|
for (const op of unit.create) {
|
|
17843
|
-
|
|
17844
|
-
|
|
17845
|
-
|
|
17846
|
-
|
|
17847
|
-
}
|
|
17848
|
-
const i18nContext = contextOps.get(op.context);
|
|
17849
|
-
for (const node of op.message.nodes) {
|
|
17850
|
-
node.visit(new ResolveIcuPlaceholdersVisitor(i18nContext.postprocessingParams));
|
|
17851
|
-
}
|
|
17852
|
-
break;
|
|
17855
|
+
if (op.kind === OpKind.I18nContext && op.contextKind === I18nContextKind.Icu) {
|
|
17856
|
+
for (const node of op.message.nodes) {
|
|
17857
|
+
node.visit(new ResolveIcuPlaceholdersVisitor(op.postprocessingParams));
|
|
17858
|
+
}
|
|
17853
17859
|
}
|
|
17854
17860
|
}
|
|
17855
17861
|
}
|
|
@@ -17886,7 +17892,7 @@ var ResolveIcuPlaceholdersVisitor = class extends RecurseVisitor {
|
|
|
17886
17892
|
}
|
|
17887
17893
|
};
|
|
17888
17894
|
|
|
17889
|
-
// bazel-out/
|
|
17895
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
|
|
17890
17896
|
function resolveNames(job) {
|
|
17891
17897
|
for (const unit of job.units) {
|
|
17892
17898
|
processLexicalScope2(unit, unit.create, null);
|
|
@@ -17950,7 +17956,7 @@ function processLexicalScope2(unit, ops, savedView) {
|
|
|
17950
17956
|
}
|
|
17951
17957
|
}
|
|
17952
17958
|
|
|
17953
|
-
// bazel-out/
|
|
17959
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
|
|
17954
17960
|
var sanitizers = /* @__PURE__ */ new Map([
|
|
17955
17961
|
[SecurityContext.HTML, SanitizerFn.Html],
|
|
17956
17962
|
[SecurityContext.SCRIPT, SanitizerFn.Script],
|
|
@@ -17987,7 +17993,7 @@ function isIframeElement(op) {
|
|
|
17987
17993
|
return op.kind === OpKind.ElementStart && ((_a2 = op.tag) == null ? void 0 : _a2.toLowerCase()) === "iframe";
|
|
17988
17994
|
}
|
|
17989
17995
|
|
|
17990
|
-
// bazel-out/
|
|
17996
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
|
|
17991
17997
|
function saveAndRestoreView(job) {
|
|
17992
17998
|
for (const unit of job.units) {
|
|
17993
17999
|
unit.create.prepend([
|
|
@@ -18032,7 +18038,7 @@ function addSaveRestoreViewOperationToListener(unit, op) {
|
|
|
18032
18038
|
}
|
|
18033
18039
|
}
|
|
18034
18040
|
|
|
18035
|
-
// bazel-out/
|
|
18041
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
|
|
18036
18042
|
function allocateSlots(job) {
|
|
18037
18043
|
const slotMap = /* @__PURE__ */ new Map();
|
|
18038
18044
|
for (const unit of job.units) {
|
|
@@ -18057,7 +18063,7 @@ function allocateSlots(job) {
|
|
|
18057
18063
|
}
|
|
18058
18064
|
}
|
|
18059
18065
|
|
|
18060
|
-
// bazel-out/
|
|
18066
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
|
|
18061
18067
|
function specializeStyleBindings(job) {
|
|
18062
18068
|
for (const unit of job.units) {
|
|
18063
18069
|
for (const op of unit.update) {
|
|
@@ -18087,7 +18093,7 @@ function specializeStyleBindings(job) {
|
|
|
18087
18093
|
}
|
|
18088
18094
|
}
|
|
18089
18095
|
|
|
18090
|
-
// bazel-out/
|
|
18096
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
|
|
18091
18097
|
function generateTemporaryVariables(job) {
|
|
18092
18098
|
for (const unit of job.units) {
|
|
18093
18099
|
unit.create.prepend(generateTemporaries(unit.create));
|
|
@@ -18145,7 +18151,7 @@ function assignName(names, expr) {
|
|
|
18145
18151
|
expr.name = name;
|
|
18146
18152
|
}
|
|
18147
18153
|
|
|
18148
|
-
// bazel-out/
|
|
18154
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_generation.mjs
|
|
18149
18155
|
function generateTrackFns(job) {
|
|
18150
18156
|
for (const unit of job.units) {
|
|
18151
18157
|
for (const op of unit.create) {
|
|
@@ -18175,7 +18181,7 @@ function generateTrackFns(job) {
|
|
|
18175
18181
|
}
|
|
18176
18182
|
}
|
|
18177
18183
|
|
|
18178
|
-
// bazel-out/
|
|
18184
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_optimization.mjs
|
|
18179
18185
|
function optimizeTrackFns(job) {
|
|
18180
18186
|
for (const unit of job.units) {
|
|
18181
18187
|
for (const op of unit.create) {
|
|
@@ -18222,7 +18228,7 @@ function isTrackByFunctionCall(rootView, expr) {
|
|
|
18222
18228
|
return true;
|
|
18223
18229
|
}
|
|
18224
18230
|
|
|
18225
|
-
// bazel-out/
|
|
18231
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_variables.mjs
|
|
18226
18232
|
function generateTrackVariables(job) {
|
|
18227
18233
|
for (const unit of job.units) {
|
|
18228
18234
|
for (const op of unit.create) {
|
|
@@ -18243,7 +18249,7 @@ function generateTrackVariables(job) {
|
|
|
18243
18249
|
}
|
|
18244
18250
|
}
|
|
18245
18251
|
|
|
18246
|
-
// bazel-out/
|
|
18252
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
|
|
18247
18253
|
function countVariables(job) {
|
|
18248
18254
|
for (const unit of job.units) {
|
|
18249
18255
|
let varCount = 0;
|
|
@@ -18348,7 +18354,7 @@ function isSingletonInterpolation(expr) {
|
|
|
18348
18354
|
return true;
|
|
18349
18355
|
}
|
|
18350
18356
|
|
|
18351
|
-
// bazel-out/
|
|
18357
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
|
|
18352
18358
|
function optimizeVariables(job) {
|
|
18353
18359
|
for (const unit of job.units) {
|
|
18354
18360
|
inlineAlwaysInlineVariables(unit.create);
|
|
@@ -18598,7 +18604,7 @@ function allowConservativeInlining(decl, target) {
|
|
|
18598
18604
|
}
|
|
18599
18605
|
}
|
|
18600
18606
|
|
|
18601
|
-
// bazel-out/
|
|
18607
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/wrap_icus.mjs
|
|
18602
18608
|
function wrapI18nIcus(job) {
|
|
18603
18609
|
for (const unit of job.units) {
|
|
18604
18610
|
let currentI18nOp = null;
|
|
@@ -18628,7 +18634,7 @@ function wrapI18nIcus(job) {
|
|
|
18628
18634
|
}
|
|
18629
18635
|
}
|
|
18630
18636
|
|
|
18631
|
-
// bazel-out/
|
|
18637
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
|
|
18632
18638
|
var phases = [
|
|
18633
18639
|
{ kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },
|
|
18634
18640
|
{ kind: CompilationJobKind.Host, fn: parseHostStyleProperties },
|
|
@@ -18671,7 +18677,6 @@ var phases = [
|
|
|
18671
18677
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nElementPlaceholders },
|
|
18672
18678
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nExpressionPlaceholders },
|
|
18673
18679
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nIcuPlaceholders },
|
|
18674
|
-
{ kind: CompilationJobKind.Tmpl, fn: mergeI18nContexts },
|
|
18675
18680
|
{ kind: CompilationJobKind.Tmpl, fn: extractI18nMessages },
|
|
18676
18681
|
{ kind: CompilationJobKind.Tmpl, fn: generateTrackFns },
|
|
18677
18682
|
{ kind: CompilationJobKind.Tmpl, fn: collectI18nConsts },
|
|
@@ -18793,7 +18798,7 @@ function emitHostBindingFunction(job) {
|
|
|
18793
18798
|
);
|
|
18794
18799
|
}
|
|
18795
18800
|
|
|
18796
|
-
// bazel-out/
|
|
18801
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
|
|
18797
18802
|
var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
|
|
18798
18803
|
function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta) {
|
|
18799
18804
|
const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta);
|
|
@@ -19374,10 +19379,10 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
19374
19379
|
return null;
|
|
19375
19380
|
}
|
|
19376
19381
|
|
|
19377
|
-
// bazel-out/
|
|
19382
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/switch/index.mjs
|
|
19378
19383
|
var USE_TEMPLATE_PIPELINE = false;
|
|
19379
19384
|
|
|
19380
|
-
// bazel-out/
|
|
19385
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/styling_builder.mjs
|
|
19381
19386
|
var IMPORTANT_FLAG = "!important";
|
|
19382
19387
|
var MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;
|
|
19383
19388
|
var StylingBuilder = class {
|
|
@@ -19710,7 +19715,7 @@ function isEmptyExpression(ast) {
|
|
|
19710
19715
|
return ast instanceof EmptyExpr;
|
|
19711
19716
|
}
|
|
19712
19717
|
|
|
19713
|
-
// bazel-out/
|
|
19718
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
19714
19719
|
var HtmlParser = class extends Parser2 {
|
|
19715
19720
|
constructor() {
|
|
19716
19721
|
super(getHtmlTagDefinition);
|
|
@@ -19720,7 +19725,7 @@ var HtmlParser = class extends Parser2 {
|
|
|
19720
19725
|
}
|
|
19721
19726
|
};
|
|
19722
19727
|
|
|
19723
|
-
// bazel-out/
|
|
19728
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
19724
19729
|
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
19725
19730
|
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
19726
19731
|
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
@@ -19786,7 +19791,7 @@ function visitAllWithSiblings(visitor, nodes) {
|
|
|
19786
19791
|
return result;
|
|
19787
19792
|
}
|
|
19788
19793
|
|
|
19789
|
-
// bazel-out/
|
|
19794
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
19790
19795
|
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
19791
19796
|
var ATTRIBUTE_PREFIX = "attr";
|
|
19792
19797
|
var CLASS_PREFIX = "class";
|
|
@@ -20106,7 +20111,7 @@ function moveParseSourceSpan(sourceSpan, absoluteSpan) {
|
|
|
20106
20111
|
return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);
|
|
20107
20112
|
}
|
|
20108
20113
|
|
|
20109
|
-
// bazel-out/
|
|
20114
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
|
|
20110
20115
|
function isStyleUrlResolvable(url) {
|
|
20111
20116
|
if (url == null || url.length === 0 || url[0] == "/")
|
|
20112
20117
|
return false;
|
|
@@ -20115,7 +20120,7 @@ function isStyleUrlResolvable(url) {
|
|
|
20115
20120
|
}
|
|
20116
20121
|
var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
|
|
20117
20122
|
|
|
20118
|
-
// bazel-out/
|
|
20123
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
|
|
20119
20124
|
var NG_CONTENT_SELECT_ATTR = "select";
|
|
20120
20125
|
var LINK_ELEMENT = "link";
|
|
20121
20126
|
var LINK_STYLE_REL_ATTR = "rel";
|
|
@@ -20185,7 +20190,7 @@ function normalizeNgContentSelect(selectAttr) {
|
|
|
20185
20190
|
return selectAttr;
|
|
20186
20191
|
}
|
|
20187
20192
|
|
|
20188
|
-
// bazel-out/
|
|
20193
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
|
|
20189
20194
|
var FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/;
|
|
20190
20195
|
var FOR_LOOP_TRACK_PATTERN = /^track\s+([\S\s]*)/;
|
|
20191
20196
|
var CONDITIONAL_ALIAS_PATTERN = /^as\s+(.*)/;
|
|
@@ -20476,7 +20481,7 @@ function stripOptionalParentheses(param, errors) {
|
|
|
20476
20481
|
return expression.slice(start, end);
|
|
20477
20482
|
}
|
|
20478
20483
|
|
|
20479
|
-
// bazel-out/
|
|
20484
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
|
|
20480
20485
|
var TIME_PATTERN = /^\d+\.?\d*(ms|s)?$/;
|
|
20481
20486
|
var SEPARATOR_PATTERN = /^\s$/;
|
|
20482
20487
|
var COMMA_DELIMITED_SYNTAX = /* @__PURE__ */ new Map([
|
|
@@ -20740,7 +20745,7 @@ function parseDeferredTime(value) {
|
|
|
20740
20745
|
return parseFloat(time) * (units === "s" ? 1e3 : 1);
|
|
20741
20746
|
}
|
|
20742
20747
|
|
|
20743
|
-
// bazel-out/
|
|
20748
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
|
|
20744
20749
|
var PREFETCH_WHEN_PATTERN = /^prefetch\s+when\s/;
|
|
20745
20750
|
var PREFETCH_ON_PATTERN = /^prefetch\s+on\s/;
|
|
20746
20751
|
var MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
|
|
@@ -20875,7 +20880,7 @@ function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
|
20875
20880
|
return { triggers, prefetchTriggers };
|
|
20876
20881
|
}
|
|
20877
20882
|
|
|
20878
|
-
// bazel-out/
|
|
20883
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
|
|
20879
20884
|
var BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;
|
|
20880
20885
|
var KW_BIND_IDX = 1;
|
|
20881
20886
|
var KW_LET_IDX = 2;
|
|
@@ -21306,7 +21311,7 @@ function textContents(node) {
|
|
|
21306
21311
|
}
|
|
21307
21312
|
}
|
|
21308
21313
|
|
|
21309
|
-
// bazel-out/
|
|
21314
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/context.mjs
|
|
21310
21315
|
var TagType;
|
|
21311
21316
|
(function(TagType2) {
|
|
21312
21317
|
TagType2[TagType2["ELEMENT"] = 0] = "ELEMENT";
|
|
@@ -21451,7 +21456,7 @@ function serializePlaceholderValue(value) {
|
|
|
21451
21456
|
}
|
|
21452
21457
|
}
|
|
21453
21458
|
|
|
21454
|
-
// bazel-out/
|
|
21459
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
|
|
21455
21460
|
var NG_CONTENT_SELECT_ATTR2 = "select";
|
|
21456
21461
|
var NG_PROJECT_AS_ATTR_NAME = "ngProjectAs";
|
|
21457
21462
|
var EVENT_BINDING_SCOPE_GLOBALS = /* @__PURE__ */ new Set(["$event"]);
|
|
@@ -23143,7 +23148,7 @@ function createClosureModeGuard2() {
|
|
|
23143
23148
|
return typeofExpr(variable(NG_I18N_CLOSURE_MODE2)).notIdentical(literal("undefined", STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE2));
|
|
23144
23149
|
}
|
|
23145
23150
|
|
|
23146
|
-
// bazel-out/
|
|
23151
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
|
|
23147
23152
|
var ATTR_REGEX = /attr\.([^\]]+)/;
|
|
23148
23153
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
23149
23154
|
var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
|
|
@@ -23194,6 +23199,9 @@ function addFeatures(definitionMap, meta) {
|
|
|
23194
23199
|
break;
|
|
23195
23200
|
}
|
|
23196
23201
|
}
|
|
23202
|
+
if ((_a2 = meta.hostDirectives) == null ? void 0 : _a2.length) {
|
|
23203
|
+
features.push(importExpr(Identifiers.HostDirectivesFeature).callFn([createHostDirectivesFeatureArg(meta.hostDirectives)]));
|
|
23204
|
+
}
|
|
23197
23205
|
if (meta.usesInheritance) {
|
|
23198
23206
|
features.push(importExpr(Identifiers.InheritDefinitionFeature));
|
|
23199
23207
|
}
|
|
@@ -23206,9 +23214,6 @@ function addFeatures(definitionMap, meta) {
|
|
|
23206
23214
|
if (meta.hasOwnProperty("template") && meta.isStandalone) {
|
|
23207
23215
|
features.push(importExpr(Identifiers.StandaloneFeature));
|
|
23208
23216
|
}
|
|
23209
|
-
if ((_a2 = meta.hostDirectives) == null ? void 0 : _a2.length) {
|
|
23210
|
-
features.push(importExpr(Identifiers.HostDirectivesFeature).callFn([createHostDirectivesFeatureArg(meta.hostDirectives)]));
|
|
23211
|
-
}
|
|
23212
23217
|
if (features.length) {
|
|
23213
23218
|
definitionMap.set("features", literalArr(features));
|
|
23214
23219
|
}
|
|
@@ -23745,7 +23750,7 @@ function createHostDirectivesMappingArray(mapping) {
|
|
|
23745
23750
|
return elements.length > 0 ? literalArr(elements) : null;
|
|
23746
23751
|
}
|
|
23747
23752
|
|
|
23748
|
-
// bazel-out/
|
|
23753
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
|
|
23749
23754
|
var R3TargetBinder = class {
|
|
23750
23755
|
constructor(directiveMatcher) {
|
|
23751
23756
|
this.directiveMatcher = directiveMatcher;
|
|
@@ -24350,11 +24355,11 @@ function extractScopedNodeEntities(rootScope) {
|
|
|
24350
24355
|
return templateEntities;
|
|
24351
24356
|
}
|
|
24352
24357
|
|
|
24353
|
-
// bazel-out/
|
|
24358
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/resource_loader.mjs
|
|
24354
24359
|
var ResourceLoader = class {
|
|
24355
24360
|
};
|
|
24356
24361
|
|
|
24357
|
-
// bazel-out/
|
|
24362
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
|
|
24358
24363
|
var CompilerFacadeImpl = class {
|
|
24359
24364
|
constructor(jitEvaluator = new JitEvaluator()) {
|
|
24360
24365
|
this.jitEvaluator = jitEvaluator;
|
|
@@ -24906,17 +24911,17 @@ function publishFacade(global) {
|
|
|
24906
24911
|
ng.\u0275compilerFacade = new CompilerFacadeImpl();
|
|
24907
24912
|
}
|
|
24908
24913
|
|
|
24909
|
-
// bazel-out/
|
|
24910
|
-
var VERSION2 = new Version("17.0.
|
|
24914
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
|
|
24915
|
+
var VERSION2 = new Version("17.0.5");
|
|
24911
24916
|
|
|
24912
|
-
// bazel-out/
|
|
24917
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
24913
24918
|
var _VisitorMode;
|
|
24914
24919
|
(function(_VisitorMode2) {
|
|
24915
24920
|
_VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
|
|
24916
24921
|
_VisitorMode2[_VisitorMode2["Merge"] = 1] = "Merge";
|
|
24917
24922
|
})(_VisitorMode || (_VisitorMode = {}));
|
|
24918
24923
|
|
|
24919
|
-
// bazel-out/
|
|
24924
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
|
|
24920
24925
|
var XmlTagDefinition = class {
|
|
24921
24926
|
constructor() {
|
|
24922
24927
|
this.closedByParent = false;
|
|
@@ -24938,7 +24943,7 @@ var XmlTagDefinition = class {
|
|
|
24938
24943
|
};
|
|
24939
24944
|
var _TAG_DEFINITION = new XmlTagDefinition();
|
|
24940
24945
|
|
|
24941
|
-
// bazel-out/
|
|
24946
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
|
|
24942
24947
|
var FactoryTarget2;
|
|
24943
24948
|
(function(FactoryTarget3) {
|
|
24944
24949
|
FactoryTarget3[FactoryTarget3["Directive"] = 0] = "Directive";
|
|
@@ -24948,13 +24953,14 @@ var FactoryTarget2;
|
|
|
24948
24953
|
FactoryTarget3[FactoryTarget3["NgModule"] = 4] = "NgModule";
|
|
24949
24954
|
})(FactoryTarget2 || (FactoryTarget2 = {}));
|
|
24950
24955
|
|
|
24951
|
-
// bazel-out/
|
|
24956
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler.mjs
|
|
24952
24957
|
publishFacade(_global);
|
|
24953
24958
|
|
|
24954
|
-
// bazel-out/
|
|
24959
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/types.mjs
|
|
24955
24960
|
var ngtemplate = "ng-template";
|
|
24956
24961
|
var boundngifelse = "[ngIfElse]";
|
|
24957
24962
|
var boundngifthenelse = "[ngIfThenElse]";
|
|
24963
|
+
var boundngifthen = "[ngIfThen]";
|
|
24958
24964
|
var nakedngfor = "ngFor";
|
|
24959
24965
|
function allFormsOf(selector) {
|
|
24960
24966
|
return [
|
|
@@ -25011,17 +25017,44 @@ var ElementToMigrate = class {
|
|
|
25011
25017
|
this.thenAttr = thenAttr;
|
|
25012
25018
|
this.forAttrs = forAttrs;
|
|
25013
25019
|
}
|
|
25014
|
-
getCondition(
|
|
25015
|
-
const
|
|
25016
|
-
|
|
25020
|
+
getCondition() {
|
|
25021
|
+
const chunks = this.attr.value.split(";");
|
|
25022
|
+
let condition = chunks[0];
|
|
25023
|
+
const elseIx = condition.indexOf(" else ");
|
|
25024
|
+
const thenIx = condition.indexOf(" then ");
|
|
25025
|
+
if (thenIx > -1) {
|
|
25026
|
+
condition = condition.slice(0, thenIx);
|
|
25027
|
+
} else if (elseIx > -1) {
|
|
25028
|
+
condition = condition.slice(0, elseIx);
|
|
25029
|
+
}
|
|
25030
|
+
let letVar = chunks.find((c) => c.search(/\s*let\s/) > -1);
|
|
25031
|
+
return condition + (letVar ? ";" + letVar : "");
|
|
25017
25032
|
}
|
|
25018
25033
|
getTemplateName(targetStr, secondStr) {
|
|
25019
25034
|
const targetLocation = this.attr.value.indexOf(targetStr);
|
|
25020
|
-
|
|
25021
|
-
|
|
25022
|
-
|
|
25035
|
+
const secondTargetLocation = secondStr ? this.attr.value.indexOf(secondStr) : void 0;
|
|
25036
|
+
return this.attr.value.slice(targetLocation + targetStr.length, secondTargetLocation).replace(":", "").trim().split(";")[0].trim();
|
|
25037
|
+
}
|
|
25038
|
+
getValueEnd(offset) {
|
|
25039
|
+
return (this.attr.valueSpan ? this.attr.valueSpan.end.offset + 1 : this.attr.keySpan.end.offset) - offset;
|
|
25040
|
+
}
|
|
25041
|
+
hasChildren() {
|
|
25042
|
+
return this.el.children.length > 0;
|
|
25043
|
+
}
|
|
25044
|
+
getChildSpan(offset) {
|
|
25045
|
+
const childStart = this.el.children[0].sourceSpan.start.offset - offset;
|
|
25046
|
+
const childEnd = this.el.children[this.el.children.length - 1].sourceSpan.end.offset - offset;
|
|
25047
|
+
return { childStart, childEnd };
|
|
25048
|
+
}
|
|
25049
|
+
shouldRemoveElseAttr() {
|
|
25050
|
+
return (this.el.name === "ng-template" || this.el.name === "ng-container") && this.elseAttr !== void 0;
|
|
25051
|
+
}
|
|
25052
|
+
getElseAttrStr() {
|
|
25053
|
+
if (this.elseAttr !== void 0) {
|
|
25054
|
+
const elseValStr = this.elseAttr.value !== "" ? `="${this.elseAttr.value}"` : "";
|
|
25055
|
+
return `${this.elseAttr.name}${elseValStr}`;
|
|
25023
25056
|
}
|
|
25024
|
-
return
|
|
25057
|
+
return "";
|
|
25025
25058
|
}
|
|
25026
25059
|
start(offset) {
|
|
25027
25060
|
var _a2;
|
|
@@ -25037,17 +25070,34 @@ var ElementToMigrate = class {
|
|
|
25037
25070
|
}
|
|
25038
25071
|
};
|
|
25039
25072
|
var Template2 = class {
|
|
25040
|
-
constructor(el, i18n2) {
|
|
25073
|
+
constructor(el, name, i18n2) {
|
|
25041
25074
|
__publicField(this, "el");
|
|
25075
|
+
__publicField(this, "name");
|
|
25042
25076
|
__publicField(this, "count", 0);
|
|
25043
25077
|
__publicField(this, "contents", "");
|
|
25044
25078
|
__publicField(this, "children", "");
|
|
25045
25079
|
__publicField(this, "i18n", null);
|
|
25080
|
+
__publicField(this, "attributes");
|
|
25046
25081
|
this.el = el;
|
|
25082
|
+
this.name = name;
|
|
25083
|
+
this.attributes = el.attrs;
|
|
25047
25084
|
this.i18n = i18n2;
|
|
25048
25085
|
}
|
|
25086
|
+
get isNgTemplateOutlet() {
|
|
25087
|
+
return this.attributes.find((attr) => attr.name === "*ngTemplateOutlet") !== void 0;
|
|
25088
|
+
}
|
|
25089
|
+
get outletContext() {
|
|
25090
|
+
const letVar = this.attributes.find((attr) => attr.name.startsWith("let-"));
|
|
25091
|
+
return letVar ? `; context: {$implicit: ${letVar.name.split("-")[1]}}` : "";
|
|
25092
|
+
}
|
|
25093
|
+
generateTemplateOutlet() {
|
|
25094
|
+
var _a2;
|
|
25095
|
+
const attr = this.attributes.find((attr2) => attr2.name === "*ngTemplateOutlet");
|
|
25096
|
+
const outletValue = (_a2 = attr == null ? void 0 : attr.value) != null ? _a2 : this.name.slice(1);
|
|
25097
|
+
return `<ng-container *ngTemplateOutlet="${outletValue}${this.outletContext}"></ng-container>`;
|
|
25098
|
+
}
|
|
25049
25099
|
generateContents(tmpl) {
|
|
25050
|
-
this.contents = tmpl.slice(this.el.sourceSpan.start.offset, this.el.sourceSpan.end.offset
|
|
25100
|
+
this.contents = tmpl.slice(this.el.sourceSpan.start.offset, this.el.sourceSpan.end.offset);
|
|
25051
25101
|
this.children = "";
|
|
25052
25102
|
if (this.el.children.length > 0) {
|
|
25053
25103
|
this.children = tmpl.slice(this.el.children[0].sourceSpan.start.offset, this.el.children[this.el.children.length - 1].sourceSpan.end.offset);
|
|
@@ -25058,16 +25108,18 @@ var AnalyzedFile = class {
|
|
|
25058
25108
|
constructor() {
|
|
25059
25109
|
__publicField(this, "ranges", []);
|
|
25060
25110
|
__publicField(this, "removeCommonModule", false);
|
|
25111
|
+
__publicField(this, "sourceFilePath", "");
|
|
25061
25112
|
}
|
|
25062
25113
|
getSortedRanges() {
|
|
25063
|
-
const templateRanges = this.ranges.slice().filter((x) => x.type
|
|
25114
|
+
const templateRanges = this.ranges.slice().filter((x) => x.type !== "import").sort((aStart, bStart) => bStart.start - aStart.start);
|
|
25064
25115
|
const importRanges = this.ranges.slice().filter((x) => x.type === "import").sort((aStart, bStart) => bStart.start - aStart.start);
|
|
25065
25116
|
return [...templateRanges, ...importRanges];
|
|
25066
25117
|
}
|
|
25067
|
-
static addRange(path2, analyzedFiles, range) {
|
|
25118
|
+
static addRange(path2, sourceFilePath, analyzedFiles, range) {
|
|
25068
25119
|
let analysis = analyzedFiles.get(path2);
|
|
25069
25120
|
if (!analysis) {
|
|
25070
25121
|
analysis = new AnalyzedFile();
|
|
25122
|
+
analysis.sourceFilePath = sourceFilePath;
|
|
25071
25123
|
analyzedFiles.set(path2, analysis);
|
|
25072
25124
|
}
|
|
25073
25125
|
const duplicate = analysis.ranges.find((current) => current.start === range.start && current.end === range.end);
|
|
@@ -25115,7 +25167,7 @@ var ElementCollector = class extends RecursiveVisitor {
|
|
|
25115
25167
|
for (const attr of el.attrs) {
|
|
25116
25168
|
if (this._attributes.includes(attr.name)) {
|
|
25117
25169
|
const elseAttr = el.attrs.find((x) => x.name === boundngifelse);
|
|
25118
|
-
const thenAttr = el.attrs.find((x) => x.name === boundngifthenelse);
|
|
25170
|
+
const thenAttr = el.attrs.find((x) => x.name === boundngifthenelse || x.name === boundngifthen);
|
|
25119
25171
|
const forAttrs = attr.name === nakedngfor ? this.getForAttrs(el) : void 0;
|
|
25120
25172
|
this.elements.push(new ElementToMigrate(el, attr, elseAttr, thenAttr, forAttrs));
|
|
25121
25173
|
}
|
|
@@ -25164,16 +25216,18 @@ var TemplateCollector = class extends RecursiveVisitor {
|
|
|
25164
25216
|
templateAttr = attr;
|
|
25165
25217
|
}
|
|
25166
25218
|
}
|
|
25167
|
-
if (templateAttr !== null) {
|
|
25219
|
+
if (templateAttr !== null && !this.templates.has(templateAttr.name)) {
|
|
25220
|
+
this.templates.set(templateAttr.name, new Template2(el, templateAttr.name, i18n2));
|
|
25168
25221
|
this.elements.push(new ElementToMigrate(el, templateAttr));
|
|
25169
|
-
|
|
25222
|
+
} else if (templateAttr !== null) {
|
|
25223
|
+
throw new Error(`A duplicate ng-template name "${templateAttr.name}" was found. The control flow migration requires unique ng-template names within a component.`);
|
|
25170
25224
|
}
|
|
25171
25225
|
}
|
|
25172
25226
|
super.visitElement(el, null);
|
|
25173
25227
|
}
|
|
25174
25228
|
};
|
|
25175
25229
|
|
|
25176
|
-
// bazel-out/
|
|
25230
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/util.mjs
|
|
25177
25231
|
var import_path2 = require("path");
|
|
25178
25232
|
var import_typescript5 = __toESM(require("typescript"), 1);
|
|
25179
25233
|
var importRemovals = [
|
|
@@ -25225,10 +25279,15 @@ function updateImportClause(clause, removeCommonModule) {
|
|
|
25225
25279
|
return clause;
|
|
25226
25280
|
}
|
|
25227
25281
|
function updateClassImports(propAssignment, removeCommonModule) {
|
|
25228
|
-
const printer = import_typescript5.default.createPrinter(
|
|
25282
|
+
const printer = import_typescript5.default.createPrinter({
|
|
25283
|
+
removeComments: true
|
|
25284
|
+
});
|
|
25229
25285
|
const importList = propAssignment.initializer;
|
|
25230
25286
|
const removals = removeCommonModule ? importWithCommonRemovals : importRemovals;
|
|
25231
25287
|
const elements = importList.elements.filter((el) => !removals.includes(el.getText()));
|
|
25288
|
+
if (elements.length === importList.elements.length) {
|
|
25289
|
+
return null;
|
|
25290
|
+
}
|
|
25232
25291
|
const updatedElements = import_typescript5.default.factory.updateArrayLiteralExpression(importList, elements);
|
|
25233
25292
|
const updatedAssignment = import_typescript5.default.factory.updatePropertyAssignment(propAssignment, propAssignment.name, updatedElements);
|
|
25234
25293
|
return printer.printNode(import_typescript5.default.EmitHint.Unspecified, updatedAssignment, updatedAssignment.getSourceFile());
|
|
@@ -25241,7 +25300,7 @@ function analyzeImportDeclarations(node, sourceFile, analyzedFiles) {
|
|
|
25241
25300
|
if (clause.namedBindings && import_typescript5.default.isNamedImports(clause.namedBindings)) {
|
|
25242
25301
|
const elements = clause.namedBindings.elements.filter((el) => importWithCommonRemovals.includes(el.getText()));
|
|
25243
25302
|
if (elements.length > 0) {
|
|
25244
|
-
AnalyzedFile.addRange(sourceFile.fileName, analyzedFiles, { start: node.getStart(), end: node.getEnd(), node, type: "import" });
|
|
25303
|
+
AnalyzedFile.addRange(sourceFile.fileName, sourceFile.fileName, analyzedFiles, { start: node.getStart(), end: node.getEnd(), node, type: "import" });
|
|
25245
25304
|
}
|
|
25246
25305
|
}
|
|
25247
25306
|
}
|
|
@@ -25260,7 +25319,7 @@ function analyzeDecorators(node, sourceFile, analyzedFiles) {
|
|
|
25260
25319
|
}
|
|
25261
25320
|
switch (prop.name.text) {
|
|
25262
25321
|
case "template":
|
|
25263
|
-
AnalyzedFile.addRange(sourceFile.fileName, analyzedFiles, {
|
|
25322
|
+
AnalyzedFile.addRange(sourceFile.fileName, sourceFile.fileName, analyzedFiles, {
|
|
25264
25323
|
start: prop.initializer.getStart() + 1,
|
|
25265
25324
|
end: prop.initializer.getEnd() - 1,
|
|
25266
25325
|
node: prop,
|
|
@@ -25268,7 +25327,7 @@ function analyzeDecorators(node, sourceFile, analyzedFiles) {
|
|
|
25268
25327
|
});
|
|
25269
25328
|
break;
|
|
25270
25329
|
case "imports":
|
|
25271
|
-
AnalyzedFile.addRange(sourceFile.fileName, analyzedFiles, {
|
|
25330
|
+
AnalyzedFile.addRange(sourceFile.fileName, sourceFile.fileName, analyzedFiles, {
|
|
25272
25331
|
start: prop.name.getStart(),
|
|
25273
25332
|
end: prop.initializer.getEnd(),
|
|
25274
25333
|
node: prop,
|
|
@@ -25278,7 +25337,7 @@ function analyzeDecorators(node, sourceFile, analyzedFiles) {
|
|
|
25278
25337
|
case "templateUrl":
|
|
25279
25338
|
if (import_typescript5.default.isStringLiteralLike(prop.initializer)) {
|
|
25280
25339
|
const path2 = (0, import_path2.join)((0, import_path2.dirname)(sourceFile.fileName), prop.initializer.text);
|
|
25281
|
-
AnalyzedFile.addRange(path2, analyzedFiles, { start: 0, node: prop, type: "
|
|
25340
|
+
AnalyzedFile.addRange(path2, sourceFile.fileName, analyzedFiles, { start: 0, node: prop, type: "templateUrl" });
|
|
25282
25341
|
}
|
|
25283
25342
|
break;
|
|
25284
25343
|
}
|
|
@@ -25344,7 +25403,7 @@ function reduceNestingOffset(el, nestLevel, offset, postOffsets) {
|
|
|
25344
25403
|
}
|
|
25345
25404
|
return offset;
|
|
25346
25405
|
}
|
|
25347
|
-
function
|
|
25406
|
+
function getTemplates(template2) {
|
|
25348
25407
|
var _a2;
|
|
25349
25408
|
const parsed = parseTemplate2(template2);
|
|
25350
25409
|
if (parsed !== null) {
|
|
@@ -25352,7 +25411,7 @@ function countTemplateUsage(template2) {
|
|
|
25352
25411
|
visitAll2(visitor, parsed.rootNodes);
|
|
25353
25412
|
for (let [key, tmpl] of visitor.templates) {
|
|
25354
25413
|
const escapeKey = escapeRegExp(key.slice(1));
|
|
25355
|
-
const regex = new RegExp(`[^a-zA-Z0-9-<]${escapeKey}\\W`, "gm");
|
|
25414
|
+
const regex = new RegExp(`[^a-zA-Z0-9-<']${escapeKey}\\W`, "gm");
|
|
25356
25415
|
const matches = template2.match(regex);
|
|
25357
25416
|
tmpl.count = (_a2 = matches == null ? void 0 : matches.length) != null ? _a2 : 0;
|
|
25358
25417
|
tmpl.generateContents(template2);
|
|
@@ -25362,27 +25421,47 @@ function countTemplateUsage(template2) {
|
|
|
25362
25421
|
return /* @__PURE__ */ new Map();
|
|
25363
25422
|
}
|
|
25364
25423
|
function wrapIntoI18nContainer(i18nAttr, content) {
|
|
25424
|
+
const { start, middle, end } = generatei18nContainer(i18nAttr, content);
|
|
25425
|
+
return `${start}${middle}${end}`;
|
|
25426
|
+
}
|
|
25427
|
+
function generatei18nContainer(i18nAttr, middle) {
|
|
25365
25428
|
const i18n2 = i18nAttr.value === "" ? "i18n" : `i18n="${i18nAttr.value}"`;
|
|
25366
|
-
return `<ng-container ${i18n2}
|
|
25429
|
+
return { start: `<ng-container ${i18n2}>`, middle, end: `</ng-container>` };
|
|
25367
25430
|
}
|
|
25368
25431
|
function processNgTemplates(template2) {
|
|
25369
|
-
|
|
25370
|
-
|
|
25371
|
-
const
|
|
25372
|
-
|
|
25373
|
-
|
|
25374
|
-
|
|
25375
|
-
|
|
25376
|
-
|
|
25377
|
-
|
|
25378
|
-
|
|
25379
|
-
|
|
25380
|
-
|
|
25381
|
-
|
|
25432
|
+
try {
|
|
25433
|
+
const templates = getTemplates(template2);
|
|
25434
|
+
for (const [name, t] of templates) {
|
|
25435
|
+
const replaceRegex = new RegExp(`${name}\\|`, "g");
|
|
25436
|
+
const forRegex = new RegExp(`${name}\\#`, "g");
|
|
25437
|
+
const forMatches = [...template2.matchAll(forRegex)];
|
|
25438
|
+
const matches = [...forMatches, ...template2.matchAll(replaceRegex)];
|
|
25439
|
+
let safeToRemove = true;
|
|
25440
|
+
if (matches.length > 0) {
|
|
25441
|
+
if (t.i18n !== null) {
|
|
25442
|
+
const container = wrapIntoI18nContainer(t.i18n, t.children);
|
|
25443
|
+
template2 = template2.replace(replaceRegex, container);
|
|
25444
|
+
} else if (t.children.trim() === "" && t.isNgTemplateOutlet) {
|
|
25445
|
+
template2 = template2.replace(replaceRegex, t.generateTemplateOutlet());
|
|
25446
|
+
} else if (forMatches.length > 0) {
|
|
25447
|
+
if (t.count === 2) {
|
|
25448
|
+
template2 = template2.replace(forRegex, t.children);
|
|
25449
|
+
} else {
|
|
25450
|
+
template2 = template2.replace(forRegex, t.generateTemplateOutlet());
|
|
25451
|
+
safeToRemove = false;
|
|
25452
|
+
}
|
|
25453
|
+
} else {
|
|
25454
|
+
template2 = template2.replace(replaceRegex, t.children);
|
|
25455
|
+
}
|
|
25456
|
+
if (t.count === matches.length + 1 && safeToRemove) {
|
|
25457
|
+
template2 = template2.replace(t.contents, "");
|
|
25458
|
+
}
|
|
25382
25459
|
}
|
|
25383
25460
|
}
|
|
25461
|
+
return { migrated: template2, err: void 0 };
|
|
25462
|
+
} catch (err) {
|
|
25463
|
+
return { migrated: template2, err };
|
|
25384
25464
|
}
|
|
25385
|
-
return template2;
|
|
25386
25465
|
}
|
|
25387
25466
|
function canRemoveCommonModule(template2) {
|
|
25388
25467
|
const parsed = parseTemplate2(template2);
|
|
@@ -25396,7 +25475,8 @@ function canRemoveCommonModule(template2) {
|
|
|
25396
25475
|
}
|
|
25397
25476
|
function removeImports(template2, node, removeCommonModule) {
|
|
25398
25477
|
if (template2.startsWith("imports") && import_typescript5.default.isPropertyAssignment(node)) {
|
|
25399
|
-
|
|
25478
|
+
const updatedImport = updateClassImports(node, removeCommonModule);
|
|
25479
|
+
return updatedImport != null ? updatedImport : template2;
|
|
25400
25480
|
} else if (import_typescript5.default.isImportDeclaration(node) && checkIfShouldChange(node, removeCommonModule)) {
|
|
25401
25481
|
return updateImportDeclaration(node, removeCommonModule);
|
|
25402
25482
|
}
|
|
@@ -25423,53 +25503,71 @@ function isRemovableContainer(etm) {
|
|
|
25423
25503
|
function getMainBlock(etm, tmpl, offset) {
|
|
25424
25504
|
const i18nAttr = etm.el.attrs.find((x) => x.name === "i18n");
|
|
25425
25505
|
if (isRemovableContainer(etm)) {
|
|
25426
|
-
|
|
25427
|
-
|
|
25428
|
-
|
|
25506
|
+
let middle2 = "";
|
|
25507
|
+
if (etm.hasChildren()) {
|
|
25508
|
+
const { childStart: childStart2, childEnd: childEnd2 } = etm.getChildSpan(offset);
|
|
25509
|
+
middle2 = tmpl.slice(childStart2, childEnd2);
|
|
25510
|
+
}
|
|
25429
25511
|
return { start: "", middle: middle2, end: "" };
|
|
25430
25512
|
} else if (isI18nTemplate(etm, i18nAttr)) {
|
|
25431
|
-
const childStart2 = etm.
|
|
25432
|
-
|
|
25433
|
-
const middle2 = wrapIntoI18nContainer(i18nAttr, tmpl.slice(childStart2, childEnd2));
|
|
25434
|
-
return { start: "", middle: middle2, end: "" };
|
|
25513
|
+
const { childStart: childStart2, childEnd: childEnd2 } = etm.getChildSpan(offset);
|
|
25514
|
+
return generatei18nContainer(i18nAttr, tmpl.slice(childStart2, childEnd2));
|
|
25435
25515
|
}
|
|
25436
25516
|
const attrStart = etm.attr.keySpan.start.offset - 1 - offset;
|
|
25437
|
-
const valEnd =
|
|
25438
|
-
|
|
25439
|
-
let
|
|
25440
|
-
if (etm.
|
|
25441
|
-
|
|
25442
|
-
childEnd = etm.el.children[etm.el.children.length - 1].sourceSpan.end.offset - offset;
|
|
25517
|
+
const valEnd = etm.getValueEnd(offset);
|
|
25518
|
+
const { childStart, childEnd } = etm.hasChildren() ? etm.getChildSpan(offset) : { childStart: valEnd, childEnd: valEnd };
|
|
25519
|
+
let start = tmpl.slice(etm.start(offset), attrStart) + tmpl.slice(valEnd, childStart);
|
|
25520
|
+
if (etm.shouldRemoveElseAttr()) {
|
|
25521
|
+
start = start.replace(etm.getElseAttrStr(), "");
|
|
25443
25522
|
}
|
|
25444
|
-
let start = tmpl.slice(etm.start(offset), attrStart);
|
|
25445
|
-
start += tmpl.slice(valEnd, childStart);
|
|
25446
25523
|
const middle = tmpl.slice(childStart, childEnd);
|
|
25447
25524
|
const end = tmpl.slice(childEnd, etm.end(offset));
|
|
25448
25525
|
return { start, middle, end };
|
|
25449
25526
|
}
|
|
25450
|
-
|
|
25527
|
+
var selfClosingList = "input|br|img|base|wbr|area|col|embed|hr|link|meta|param|source|track";
|
|
25528
|
+
function formatTemplate(tmpl, templateType) {
|
|
25451
25529
|
if (tmpl.indexOf("\n") > -1) {
|
|
25530
|
+
let openSelfClosingEl = false;
|
|
25452
25531
|
const openBlockRegex = /^\s*\@(if|switch|case|default|for)|^\s*\}\s\@else/;
|
|
25453
25532
|
const openElRegex = /^\s*<([a-z0-9]+)(?![^>]*\/>)[^>]*>?/;
|
|
25533
|
+
const selfClosingRegex = new RegExp(`^\\s*<(${selfClosingList}).+\\/?>`);
|
|
25534
|
+
const openSelfClosingRegex = new RegExp(`^\\s*<(${selfClosingList})(?![^>]*\\/>)[^>]*$`);
|
|
25454
25535
|
const closeBlockRegex = /^\s*\}\s*$|^\s*\}\s\@else/;
|
|
25455
|
-
const closeElRegex = /\s*<\/([a-
|
|
25456
|
-
const closeMultiLineElRegex = /^\s*([a-
|
|
25457
|
-
const
|
|
25536
|
+
const closeElRegex = /\s*<\/([a-zA-Z0-9\-]+)*>/;
|
|
25537
|
+
const closeMultiLineElRegex = /^\s*([a-zA-Z0-9\-\[\]]+)?=?"?([^”<]+)?"?\s?\/>$/;
|
|
25538
|
+
const closeSelfClosingMultiLineRegex = /^\s*([a-zA-Z0-9\-\[\]]+)?=?"?([^”\/<]+)?"?\s?>$/;
|
|
25539
|
+
const singleLineElRegex = /\s*<([a-zA-Z0-9]+)(?![^>]*\/>)[^>]*>.*<\/([a-zA-Z0-9\-]+)*>/;
|
|
25458
25540
|
const lines = tmpl.split("\n");
|
|
25459
25541
|
const formatted = [];
|
|
25460
25542
|
let indent = "";
|
|
25543
|
+
let mindent = "";
|
|
25461
25544
|
for (let [index, line] of lines.entries()) {
|
|
25462
25545
|
if (line.trim() === "" && index !== 0 && index !== lines.length - 1) {
|
|
25463
25546
|
continue;
|
|
25464
25547
|
}
|
|
25548
|
+
if (templateType === "template" && index <= 1) {
|
|
25549
|
+
const ind = line.search(/\S/);
|
|
25550
|
+
mindent = ind > -1 ? line.slice(0, ind) : "";
|
|
25551
|
+
}
|
|
25465
25552
|
if ((closeBlockRegex.test(line) || closeElRegex.test(line) && (!singleLineElRegex.test(line) && !closeMultiLineElRegex.test(line))) && indent !== "") {
|
|
25466
25553
|
indent = indent.slice(2);
|
|
25467
25554
|
}
|
|
25468
|
-
formatted.push(indent + line.trim());
|
|
25555
|
+
formatted.push(mindent + indent + line.trim());
|
|
25469
25556
|
if (closeMultiLineElRegex.test(line)) {
|
|
25470
25557
|
indent = indent.slice(2);
|
|
25558
|
+
if (openSelfClosingEl) {
|
|
25559
|
+
openSelfClosingEl = false;
|
|
25560
|
+
}
|
|
25561
|
+
}
|
|
25562
|
+
if (closeSelfClosingMultiLineRegex.test(line) && openSelfClosingEl) {
|
|
25563
|
+
openSelfClosingEl = false;
|
|
25564
|
+
indent = indent.slice(2);
|
|
25565
|
+
}
|
|
25566
|
+
if ((openBlockRegex.test(line) || openElRegex.test(line)) && !singleLineElRegex.test(line) && !selfClosingRegex.test(line) && !openSelfClosingRegex.test(line)) {
|
|
25567
|
+
indent += " ";
|
|
25471
25568
|
}
|
|
25472
|
-
if (
|
|
25569
|
+
if (openSelfClosingRegex.test(line)) {
|
|
25570
|
+
openSelfClosingEl = true;
|
|
25473
25571
|
indent += " ";
|
|
25474
25572
|
}
|
|
25475
25573
|
}
|
|
@@ -25486,7 +25584,7 @@ function forEachClass(sourceFile, callback) {
|
|
|
25486
25584
|
});
|
|
25487
25585
|
}
|
|
25488
25586
|
|
|
25489
|
-
// bazel-out/
|
|
25587
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/cases.mjs
|
|
25490
25588
|
var boundcase = "[ngSwitchCase]";
|
|
25491
25589
|
var switchcase = "*ngSwitchCase";
|
|
25492
25590
|
var nakedcase = "ngSwitchCase";
|
|
@@ -25564,7 +25662,7 @@ function migrateNgSwitchDefault(etm, tmpl, offset) {
|
|
|
25564
25662
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
25565
25663
|
}
|
|
25566
25664
|
|
|
25567
|
-
// bazel-out/
|
|
25665
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/fors.mjs
|
|
25568
25666
|
var ngfor = "*ngFor";
|
|
25569
25667
|
var nakedngfor2 = "ngFor";
|
|
25570
25668
|
var fors = [
|
|
@@ -25623,15 +25721,23 @@ function migrateStandardNgFor(etm, tmpl, offset) {
|
|
|
25623
25721
|
const parts = getNgForParts(etm.attr.value);
|
|
25624
25722
|
const originals = getOriginals(etm, tmpl, offset);
|
|
25625
25723
|
const condition = parts[0].replace("let ", "");
|
|
25724
|
+
if (condition.indexOf(" as ") > -1) {
|
|
25725
|
+
let errorMessage = `Found an aliased collection on an ngFor: "${condition}". Collection aliasing is not supported with @for. Refactor the code to remove the \`as\` alias and re-run the migration.`;
|
|
25726
|
+
throw new Error(errorMessage);
|
|
25727
|
+
}
|
|
25626
25728
|
const loopVar = condition.split(" of ")[0];
|
|
25627
25729
|
let trackBy = loopVar;
|
|
25628
25730
|
let aliasedIndex = null;
|
|
25731
|
+
let tmplPlaceholder = "";
|
|
25629
25732
|
for (let i = 1; i < parts.length; i++) {
|
|
25630
25733
|
const part = parts[i].trim();
|
|
25631
25734
|
if (part.startsWith("trackBy:")) {
|
|
25632
25735
|
const trackByFn = part.replace("trackBy:", "").trim();
|
|
25633
25736
|
trackBy = `${trackByFn}($index, ${loopVar})`;
|
|
25634
25737
|
}
|
|
25738
|
+
if (part.startsWith("template:")) {
|
|
25739
|
+
tmplPlaceholder = `#${part.split(":")[1].trim()}#`;
|
|
25740
|
+
}
|
|
25635
25741
|
if (part.match(aliasWithEqualRegexp)) {
|
|
25636
25742
|
const aliasParts = part.split("=");
|
|
25637
25743
|
aliases.push(` ${aliasParts[0].trim()} = $${aliasParts[1].trim()}`);
|
|
@@ -25651,10 +25757,18 @@ function migrateStandardNgFor(etm, tmpl, offset) {
|
|
|
25651
25757
|
trackBy = trackBy.replace("$index", aliasedIndex);
|
|
25652
25758
|
}
|
|
25653
25759
|
const aliasStr = aliases.length > 0 ? `;${aliases.join(";")}` : "";
|
|
25654
|
-
|
|
25655
|
-
|
|
25656
|
-
|
|
25657
|
-
|
|
25760
|
+
let startBlock = `@for (${condition}; track ${trackBy}${aliasStr}) {${lbString}`;
|
|
25761
|
+
let endBlock = `${lbString}}`;
|
|
25762
|
+
let forBlock = "";
|
|
25763
|
+
if (tmplPlaceholder !== "") {
|
|
25764
|
+
startBlock = startBlock + tmplPlaceholder;
|
|
25765
|
+
forBlock = startBlock + endBlock;
|
|
25766
|
+
} else {
|
|
25767
|
+
const { start, middle, end } = getMainBlock(etm, tmpl, offset);
|
|
25768
|
+
startBlock += start;
|
|
25769
|
+
endBlock = end + endBlock;
|
|
25770
|
+
forBlock = startBlock + middle + endBlock;
|
|
25771
|
+
}
|
|
25658
25772
|
const updatedTmpl = tmpl.slice(0, etm.start(offset)) + forBlock + tmpl.slice(etm.end(offset));
|
|
25659
25773
|
const pre = originals.start.length - startBlock.length;
|
|
25660
25774
|
const post = originals.end.length - endBlock.length;
|
|
@@ -25721,7 +25835,7 @@ function getNgForParts(expression) {
|
|
|
25721
25835
|
return parts;
|
|
25722
25836
|
}
|
|
25723
25837
|
|
|
25724
|
-
// bazel-out/
|
|
25838
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/ifs.mjs
|
|
25725
25839
|
var ngif = "*ngIf";
|
|
25726
25840
|
var boundngif = "[ngIf]";
|
|
25727
25841
|
var nakedngif = "ngIf";
|
|
@@ -25760,8 +25874,8 @@ function migrateIf(template2) {
|
|
|
25760
25874
|
return { migrated: result, errors, changed };
|
|
25761
25875
|
}
|
|
25762
25876
|
function migrateNgIf(etm, tmpl, offset) {
|
|
25763
|
-
const matchThen = etm.attr.value.match(
|
|
25764
|
-
const matchElse = etm.attr.value.match(
|
|
25877
|
+
const matchThen = etm.attr.value.match(/;?\s*then/gm);
|
|
25878
|
+
const matchElse = etm.attr.value.match(/;?\s*else/gm);
|
|
25765
25879
|
if (etm.thenAttr !== void 0 || etm.elseAttr !== void 0) {
|
|
25766
25880
|
return buildBoundIfElseBlock(etm, tmpl, offset);
|
|
25767
25881
|
} else if (matchThen && matchThen.length > 0) {
|
|
@@ -25785,7 +25899,7 @@ function buildIfBlock(etm, tmpl, offset) {
|
|
|
25785
25899
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
25786
25900
|
}
|
|
25787
25901
|
function buildStandardIfElseBlock(etm, tmpl, elseString, offset) {
|
|
25788
|
-
const condition = etm.getCondition(
|
|
25902
|
+
const condition = etm.getCondition().replace(" as ", "; as ").replace(/;\s*let/g, "; as");
|
|
25789
25903
|
const elsePlaceholder = `#${etm.getTemplateName(elseString)}|`;
|
|
25790
25904
|
return buildIfElseBlock(etm, tmpl, condition, elsePlaceholder, offset);
|
|
25791
25905
|
}
|
|
@@ -25814,7 +25928,7 @@ function buildIfElseBlock(etm, tmpl, condition, elsePlaceholder, offset) {
|
|
|
25814
25928
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
25815
25929
|
}
|
|
25816
25930
|
function buildStandardIfThenElseBlock(etm, tmpl, thenString, elseString, offset) {
|
|
25817
|
-
const condition = etm.getCondition(
|
|
25931
|
+
const condition = etm.getCondition().replace(" as ", "; as ").replace(/;\s*let/g, "; as");
|
|
25818
25932
|
const thenPlaceholder = `#${etm.getTemplateName(thenString, elseString)}|`;
|
|
25819
25933
|
const elsePlaceholder = `#${etm.getTemplateName(elseString)}|`;
|
|
25820
25934
|
return buildIfThenElseBlock(etm, tmpl, condition, thenPlaceholder, elsePlaceholder, offset);
|
|
@@ -25834,7 +25948,7 @@ function buildIfThenElseBlock(etm, tmpl, condition, thenPlaceholder, elsePlaceho
|
|
|
25834
25948
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
25835
25949
|
}
|
|
25836
25950
|
|
|
25837
|
-
// bazel-out/
|
|
25951
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/switches.mjs
|
|
25838
25952
|
var ngswitch = "[ngSwitch]";
|
|
25839
25953
|
var switches = [
|
|
25840
25954
|
ngswitch
|
|
@@ -25884,21 +25998,29 @@ function migrateNgSwitch(etm, tmpl, offset) {
|
|
|
25884
25998
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
25885
25999
|
}
|
|
25886
26000
|
|
|
25887
|
-
// bazel-out/
|
|
25888
|
-
function migrateTemplate(template2, templateType, node, file, format = true) {
|
|
26001
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/migration.mjs
|
|
26002
|
+
function migrateTemplate(template2, templateType, node, file, format = true, analyzedFiles) {
|
|
25889
26003
|
let errors = [];
|
|
25890
26004
|
let migrated = template2;
|
|
25891
|
-
if (templateType === "template") {
|
|
26005
|
+
if (templateType === "template" || templateType === "templateUrl") {
|
|
25892
26006
|
const ifResult = migrateIf(template2);
|
|
25893
26007
|
const forResult = migrateFor(ifResult.migrated);
|
|
25894
26008
|
const switchResult = migrateSwitch(forResult.migrated);
|
|
25895
26009
|
const caseResult = migrateCase(switchResult.migrated);
|
|
25896
|
-
|
|
26010
|
+
const templateResult = processNgTemplates(caseResult.migrated);
|
|
26011
|
+
if (templateResult.err !== void 0) {
|
|
26012
|
+
return { migrated: template2, errors: [{ type: "template", error: templateResult.err }] };
|
|
26013
|
+
}
|
|
26014
|
+
migrated = templateResult.migrated;
|
|
25897
26015
|
const changed = ifResult.changed || forResult.changed || switchResult.changed || caseResult.changed;
|
|
25898
26016
|
if (format && changed) {
|
|
25899
|
-
migrated = formatTemplate(migrated);
|
|
26017
|
+
migrated = formatTemplate(migrated, templateType);
|
|
25900
26018
|
}
|
|
25901
26019
|
file.removeCommonModule = canRemoveCommonModule(template2);
|
|
26020
|
+
if (templateType === "templateUrl" && analyzedFiles !== null && analyzedFiles.has(file.sourceFilePath)) {
|
|
26021
|
+
const componentFile = analyzedFiles.get(file.sourceFilePath);
|
|
26022
|
+
componentFile.removeCommonModule = file.removeCommonModule;
|
|
26023
|
+
}
|
|
25902
26024
|
errors = [
|
|
25903
26025
|
...ifResult.errors,
|
|
25904
26026
|
...forResult.errors,
|
|
@@ -25911,7 +26033,7 @@ function migrateTemplate(template2, templateType, node, file, format = true) {
|
|
|
25911
26033
|
return { migrated, errors };
|
|
25912
26034
|
}
|
|
25913
26035
|
|
|
25914
|
-
// bazel-out/
|
|
26036
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/index.mjs
|
|
25915
26037
|
function control_flow_migration_default(options) {
|
|
25916
26038
|
return (tree, context) => __async(this, null, function* () {
|
|
25917
26039
|
const basePath = process.cwd();
|
|
@@ -25952,7 +26074,9 @@ function runControlFlowMigration(tree, tsconfigPath, basePath, pathToMigrate, sc
|
|
|
25952
26074
|
for (const sourceFile of sourceFiles) {
|
|
25953
26075
|
analyze(sourceFile, analysis);
|
|
25954
26076
|
}
|
|
25955
|
-
|
|
26077
|
+
const paths = sortFilePaths([...analysis.keys()]);
|
|
26078
|
+
for (const path2 of paths) {
|
|
26079
|
+
const file = analysis.get(path2);
|
|
25956
26080
|
const ranges = file.getSortedRanges();
|
|
25957
26081
|
const relativePath = (0, import_path3.relative)(basePath, path2);
|
|
25958
26082
|
const content = tree.readText(relativePath);
|
|
@@ -25960,7 +26084,7 @@ function runControlFlowMigration(tree, tsconfigPath, basePath, pathToMigrate, sc
|
|
|
25960
26084
|
for (const { start, end, node, type } of ranges) {
|
|
25961
26085
|
const template2 = content.slice(start, end);
|
|
25962
26086
|
const length = (end != null ? end : content.length) - start;
|
|
25963
|
-
const { migrated, errors } = migrateTemplate(template2, type, node, file, schematicOptions.format);
|
|
26087
|
+
const { migrated, errors } = migrateTemplate(template2, type, node, file, schematicOptions.format, analysis);
|
|
25964
26088
|
if (migrated !== null) {
|
|
25965
26089
|
update.remove(start, length);
|
|
25966
26090
|
update.insertLeft(start, migrated);
|
|
@@ -25977,6 +26101,10 @@ function runControlFlowMigration(tree, tsconfigPath, basePath, pathToMigrate, sc
|
|
|
25977
26101
|
}
|
|
25978
26102
|
return errorList;
|
|
25979
26103
|
}
|
|
26104
|
+
function sortFilePaths(names) {
|
|
26105
|
+
names.sort((a, _) => a.endsWith(".html") ? -1 : 0);
|
|
26106
|
+
return names;
|
|
26107
|
+
}
|
|
25980
26108
|
function generateErrorMessage(path2, errors) {
|
|
25981
26109
|
let errorMessage = `Template "${path2}" encountered ${errors.length} errors during migration:
|
|
25982
26110
|
`;
|