@angular/core 18.0.0-next.1 → 18.0.0-next.3
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/rxjs-interop/src/to_signal.mjs +2 -2
- package/esm2022/src/application/application_init.mjs +2 -2
- package/esm2022/src/application/application_ref.mjs +10 -15
- package/esm2022/src/application/application_tokens.mjs +3 -3
- package/esm2022/src/authoring/input/input.mjs +37 -14
- package/esm2022/src/authoring/input/input_signal.mjs +1 -1
- package/esm2022/src/authoring/input/input_signal_node.mjs +1 -1
- package/esm2022/src/authoring/input/input_type_checking.mjs +1 -1
- package/esm2022/src/authoring/model/model.mjs +35 -15
- package/esm2022/src/authoring/output/output.mjs +32 -10
- package/esm2022/src/authoring/queries.mjs +11 -1
- package/esm2022/src/change_detection/scheduling/ng_zone_scheduling.mjs +38 -4
- package/esm2022/src/change_detection/scheduling/zoneless_scheduling.mjs +5 -1
- package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +91 -22
- package/esm2022/src/compiler/compiler_facade_interface.mjs +1 -1
- package/esm2022/src/core_private_export.mjs +4 -4
- package/esm2022/src/core_render3_private_export.mjs +2 -2
- package/esm2022/src/defer/instructions.mjs +23 -9
- package/esm2022/src/di/interface/provider.mjs +1 -1
- package/esm2022/src/di/metadata.mjs +1 -1
- package/esm2022/src/hydration/annotate.mjs +35 -49
- package/esm2022/src/hydration/api.mjs +36 -13
- package/esm2022/src/hydration/cleanup.mjs +4 -18
- package/esm2022/src/hydration/i18n.mjs +378 -0
- package/esm2022/src/hydration/interfaces.mjs +2 -1
- package/esm2022/src/hydration/node_lookup_utils.mjs +24 -10
- package/esm2022/src/hydration/utils.mjs +61 -2
- package/esm2022/src/linker/component_factory.mjs +1 -1
- package/esm2022/src/linker/view_container_ref.mjs +2 -2
- package/esm2022/src/linker/view_ref.mjs +4 -4
- package/esm2022/src/metadata/directives.mjs +1 -1
- package/esm2022/src/metadata/ng_module.mjs +1 -1
- package/esm2022/src/platform/platform_ref.mjs +3 -2
- package/esm2022/src/render3/component_ref.mjs +1 -1
- package/esm2022/src/render3/debug/framework_injector_profiler.mjs +2 -2
- package/esm2022/src/render3/i18n/i18n_apply.mjs +28 -6
- package/esm2022/src/render3/i18n/i18n_parse.mjs +2 -5
- package/esm2022/src/render3/i18n/i18n_util.mjs +6 -1
- package/esm2022/src/render3/instructions/control_flow.mjs +24 -15
- package/esm2022/src/render3/instructions/i18n.mjs +3 -1
- package/esm2022/src/render3/instructions/projection.mjs +35 -9
- package/esm2022/src/render3/instructions/template.mjs +45 -24
- package/esm2022/src/render3/jit/partial.mjs +13 -2
- package/esm2022/src/render3/util/injector_discovery_utils.mjs +13 -9
- package/esm2022/src/render3/util/view_utils.mjs +4 -14
- package/esm2022/src/util/callback_scheduler.mjs +25 -30
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/src/zone/ng_zone.mjs +3 -3
- package/esm2022/testing/src/component_fixture.mjs +24 -59
- package/esm2022/testing/src/fake_async.mjs +6 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/private_export.mjs +9 -0
- package/esm2022/testing/src/test_bed.mjs +4 -4
- package/esm2022/testing/src/test_hooks.mjs +3 -3
- package/esm2022/testing/src/testing.mjs +3 -2
- package/fesm2022/core.mjs +1499 -823
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +2 -2
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +64 -94
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +269 -149
- package/package.json +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +2 -2
- package/schematics/migrations/block-template-entities/bundle.js +313 -255
- package/schematics/migrations/block-template-entities/bundle.js.map +3 -3
- package/schematics/migrations/compiler-options/bundle.js +13 -13
- package/schematics/migrations/invalid-two-way-bindings/bundle.js +316 -257
- package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +3 -3
- package/schematics/migrations/transfer-state/bundle.js +13 -13
- package/schematics/ng-generate/control-flow-migration/bundle.js +349 -276
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +3 -3
- package/schematics/ng-generate/standalone-migration/bundle.js +1811 -1330
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +10 -3
- package/esm2022/src/change_detection/flags.mjs +0 -17
|
@@ -63,7 +63,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
// bazel-out/
|
|
66
|
+
// bazel-out/k8-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/k8-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/k8-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/k8-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/k8-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/k8-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/k8-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/k8-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/k8-fastbuild/bin/packages/compiler/src/core.mjs
|
|
449
449
|
var ViewEncapsulation;
|
|
450
450
|
(function(ViewEncapsulation2) {
|
|
451
451
|
ViewEncapsulation2[ViewEncapsulation2["Emulated"] = 0] = "Emulated";
|
|
@@ -513,7 +513,7 @@ function parseSelectorToR3Selector(selector) {
|
|
|
513
513
|
return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];
|
|
514
514
|
}
|
|
515
515
|
|
|
516
|
-
// bazel-out/
|
|
516
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/digest.mjs
|
|
517
517
|
var textEncoder;
|
|
518
518
|
function computeDigest(message) {
|
|
519
519
|
return sha1(serializeNodes(message.nodes).join("") + `[${message.meaning}]`);
|
|
@@ -753,7 +753,7 @@ function wordAt(bytes, index, endian) {
|
|
|
753
753
|
return word;
|
|
754
754
|
}
|
|
755
755
|
|
|
756
|
-
// bazel-out/
|
|
756
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/output_ast.mjs
|
|
757
757
|
var TypeModifier;
|
|
758
758
|
(function(TypeModifier2) {
|
|
759
759
|
TypeModifier2[TypeModifier2["None"] = 0] = "None";
|
|
@@ -1691,7 +1691,7 @@ function serializeTags(tags) {
|
|
|
1691
1691
|
return out;
|
|
1692
1692
|
}
|
|
1693
1693
|
|
|
1694
|
-
// bazel-out/
|
|
1694
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/constant_pool.mjs
|
|
1695
1695
|
var CONSTANT_PREFIX = "_c";
|
|
1696
1696
|
var UNKNOWN_VALUE_KEY = variable("<unknown>");
|
|
1697
1697
|
var KEY_CONTEXT = {};
|
|
@@ -1802,12 +1802,12 @@ var ConstantPool = class {
|
|
|
1802
1802
|
if (isArrow && current instanceof DeclareVarStmt && ((_a2 = current.value) == null ? void 0 : _a2.isEquivalent(fn2))) {
|
|
1803
1803
|
return variable(current.name);
|
|
1804
1804
|
}
|
|
1805
|
-
if (!isArrow && current instanceof DeclareFunctionStmt && fn2.isEquivalent(current)) {
|
|
1805
|
+
if (!isArrow && current instanceof DeclareFunctionStmt && fn2 instanceof FunctionExpr && fn2.isEquivalent(current)) {
|
|
1806
1806
|
return variable(current.name);
|
|
1807
1807
|
}
|
|
1808
1808
|
}
|
|
1809
1809
|
const name = useUniqueName ? this.uniqueName(prefix) : prefix;
|
|
1810
|
-
this.statements.push(fn2.toDeclStmt(name, StmtModifier.Final));
|
|
1810
|
+
this.statements.push(fn2 instanceof FunctionExpr ? fn2.toDeclStmt(name, StmtModifier.Final) : new DeclareVarStmt(name, fn2, INFERRED_TYPE, StmtModifier.Final, fn2.sourceSpan));
|
|
1811
1811
|
return variable(name);
|
|
1812
1812
|
}
|
|
1813
1813
|
_getLiteralFactory(key, values, resultMap) {
|
|
@@ -1879,7 +1879,7 @@ function isLongStringLiteral(expr) {
|
|
|
1879
1879
|
return expr instanceof LiteralExpr && typeof expr.value === "string" && expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;
|
|
1880
1880
|
}
|
|
1881
1881
|
|
|
1882
|
-
// bazel-out/
|
|
1882
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_identifiers.mjs
|
|
1883
1883
|
var CORE = "@angular/core";
|
|
1884
1884
|
var _Identifiers = class {
|
|
1885
1885
|
};
|
|
@@ -2433,6 +2433,9 @@ var Identifiers = _Identifiers;
|
|
|
2433
2433
|
(() => {
|
|
2434
2434
|
_Identifiers.declareClassMetadata = { name: "\u0275\u0275ngDeclareClassMetadata", moduleName: CORE };
|
|
2435
2435
|
})();
|
|
2436
|
+
(() => {
|
|
2437
|
+
_Identifiers.declareClassMetadataAsync = { name: "\u0275\u0275ngDeclareClassMetadataAsync", moduleName: CORE };
|
|
2438
|
+
})();
|
|
2436
2439
|
(() => {
|
|
2437
2440
|
_Identifiers.setClassMetadata = { name: "\u0275setClassMetadata", moduleName: CORE };
|
|
2438
2441
|
})();
|
|
@@ -2545,7 +2548,7 @@ var Identifiers = _Identifiers;
|
|
|
2545
2548
|
_Identifiers.unwrapWritableSignal = { name: "\u0275unwrapWritableSignal", moduleName: CORE };
|
|
2546
2549
|
})();
|
|
2547
2550
|
|
|
2548
|
-
// bazel-out/
|
|
2551
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/util.mjs
|
|
2549
2552
|
var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
|
2550
2553
|
function dashCaseToCamelCase(input) {
|
|
2551
2554
|
return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
|
|
@@ -2622,7 +2625,7 @@ var Version = class {
|
|
|
2622
2625
|
};
|
|
2623
2626
|
var _global = globalThis;
|
|
2624
2627
|
|
|
2625
|
-
// bazel-out/
|
|
2628
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/source_map.mjs
|
|
2626
2629
|
var VERSION = 3;
|
|
2627
2630
|
var JS_B64_PREFIX = "# sourceMappingURL=data:application/json;base64,";
|
|
2628
2631
|
var SourceMapGenerator = class {
|
|
@@ -2751,7 +2754,7 @@ function toBase64Digit(value) {
|
|
|
2751
2754
|
return B64_DIGITS[value];
|
|
2752
2755
|
}
|
|
2753
2756
|
|
|
2754
|
-
// bazel-out/
|
|
2757
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/abstract_emitter.mjs
|
|
2755
2758
|
var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
|
|
2756
2759
|
var _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
|
|
2757
2760
|
var _INDENT_WITH = " ";
|
|
@@ -3239,7 +3242,7 @@ function _createIndent(count) {
|
|
|
3239
3242
|
return res;
|
|
3240
3243
|
}
|
|
3241
3244
|
|
|
3242
|
-
// bazel-out/
|
|
3245
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/util.mjs
|
|
3243
3246
|
function typeWithParameters(type, numParams) {
|
|
3244
3247
|
if (numParams === 0) {
|
|
3245
3248
|
return expressionType(type);
|
|
@@ -3294,7 +3297,7 @@ function generateForwardRef(expr) {
|
|
|
3294
3297
|
return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr)]);
|
|
3295
3298
|
}
|
|
3296
3299
|
|
|
3297
|
-
// bazel-out/
|
|
3300
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_factory.mjs
|
|
3298
3301
|
var R3FactoryDelegateType;
|
|
3299
3302
|
(function(R3FactoryDelegateType2) {
|
|
3300
3303
|
R3FactoryDelegateType2[R3FactoryDelegateType2["Class"] = 0] = "Class";
|
|
@@ -3439,7 +3442,7 @@ function getInjectFn(target) {
|
|
|
3439
3442
|
}
|
|
3440
3443
|
}
|
|
3441
3444
|
|
|
3442
|
-
// bazel-out/
|
|
3445
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/expression_parser/ast.mjs
|
|
3443
3446
|
var ParserError = class {
|
|
3444
3447
|
constructor(message, input, errLocation, ctxLocation) {
|
|
3445
3448
|
this.input = input;
|
|
@@ -3877,7 +3880,7 @@ var BoundElementProperty = class {
|
|
|
3877
3880
|
}
|
|
3878
3881
|
};
|
|
3879
3882
|
|
|
3880
|
-
// bazel-out/
|
|
3883
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/tags.mjs
|
|
3881
3884
|
var TagContentType;
|
|
3882
3885
|
(function(TagContentType2) {
|
|
3883
3886
|
TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
|
|
@@ -3914,7 +3917,7 @@ function mergeNsAndName(prefix, localName) {
|
|
|
3914
3917
|
return prefix ? `:${prefix}:${localName}` : localName;
|
|
3915
3918
|
}
|
|
3916
3919
|
|
|
3917
|
-
// bazel-out/
|
|
3920
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_ast.mjs
|
|
3918
3921
|
var Comment = class {
|
|
3919
3922
|
constructor(value, sourceSpan) {
|
|
3920
3923
|
this.value = value;
|
|
@@ -4232,9 +4235,10 @@ var Template = class {
|
|
|
4232
4235
|
}
|
|
4233
4236
|
};
|
|
4234
4237
|
var Content = class {
|
|
4235
|
-
constructor(selector, attributes, sourceSpan, i18n2) {
|
|
4238
|
+
constructor(selector, attributes, children, sourceSpan, i18n2) {
|
|
4236
4239
|
this.selector = selector;
|
|
4237
4240
|
this.attributes = attributes;
|
|
4241
|
+
this.children = children;
|
|
4238
4242
|
this.sourceSpan = sourceSpan;
|
|
4239
4243
|
this.i18n = i18n2;
|
|
4240
4244
|
this.name = "ng-content";
|
|
@@ -4295,7 +4299,7 @@ function visitAll(visitor, nodes) {
|
|
|
4295
4299
|
return result;
|
|
4296
4300
|
}
|
|
4297
4301
|
|
|
4298
|
-
// bazel-out/
|
|
4302
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/i18n_ast.mjs
|
|
4299
4303
|
var Message = class {
|
|
4300
4304
|
constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {
|
|
4301
4305
|
this.nodes = nodes;
|
|
@@ -4433,7 +4437,7 @@ var LocalizeMessageStringVisitor = class {
|
|
|
4433
4437
|
}
|
|
4434
4438
|
};
|
|
4435
4439
|
|
|
4436
|
-
// bazel-out/
|
|
4440
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/serializers/xml_helper.mjs
|
|
4437
4441
|
var _Visitor = class {
|
|
4438
4442
|
visitTag(tag) {
|
|
4439
4443
|
const strAttrs = this._serializeAttributes(tag.attrs);
|
|
@@ -4461,12 +4465,12 @@ ${doctype.dtd}
|
|
|
4461
4465
|
};
|
|
4462
4466
|
var _visitor = new _Visitor();
|
|
4463
4467
|
|
|
4464
|
-
// bazel-out/
|
|
4468
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/serializers/xmb.mjs
|
|
4465
4469
|
function toPublicName(internalName) {
|
|
4466
4470
|
return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, "_");
|
|
4467
4471
|
}
|
|
4468
4472
|
|
|
4469
|
-
// bazel-out/
|
|
4473
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/util.mjs
|
|
4470
4474
|
var I18N_ATTR = "i18n";
|
|
4471
4475
|
var I18N_ATTR_PREFIX = "i18n-";
|
|
4472
4476
|
var I18N_ICU_VAR_PREFIX = "VAR_";
|
|
@@ -4506,7 +4510,7 @@ function formatI18nPlaceholderName(name, useCamelCase = true) {
|
|
|
4506
4510
|
return postfix ? `${raw}_${postfix}` : raw;
|
|
4507
4511
|
}
|
|
4508
4512
|
|
|
4509
|
-
// bazel-out/
|
|
4513
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/util.mjs
|
|
4510
4514
|
var UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;
|
|
4511
4515
|
var TEMPORARY_NAME = "_t";
|
|
4512
4516
|
var CONTEXT_NAME = "ctx";
|
|
@@ -4643,7 +4647,7 @@ function getAttrsForDirectiveMatching(elOrTpl) {
|
|
|
4643
4647
|
return attributesMap;
|
|
4644
4648
|
}
|
|
4645
4649
|
|
|
4646
|
-
// bazel-out/
|
|
4650
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/injectable_compiler_2.mjs
|
|
4647
4651
|
function compileInjectable(meta, resolveForwardRefs) {
|
|
4648
4652
|
let result = null;
|
|
4649
4653
|
const factoryMeta = {
|
|
@@ -4728,7 +4732,7 @@ function createFactoryFunction(type) {
|
|
|
4728
4732
|
return arrowFn([new FnParam("t", DYNAMIC_TYPE)], type.prop("\u0275fac").callFn([variable("t")]));
|
|
4729
4733
|
}
|
|
4730
4734
|
|
|
4731
|
-
// bazel-out/
|
|
4735
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/assertions.mjs
|
|
4732
4736
|
var UNUSABLE_INTERPOLATION_REGEXPS = [
|
|
4733
4737
|
/^\s*$/,
|
|
4734
4738
|
/[<>]/,
|
|
@@ -4750,7 +4754,7 @@ function assertInterpolationSymbols(identifier, value) {
|
|
|
4750
4754
|
}
|
|
4751
4755
|
}
|
|
4752
4756
|
|
|
4753
|
-
// bazel-out/
|
|
4757
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/defaults.mjs
|
|
4754
4758
|
var InterpolationConfig = class {
|
|
4755
4759
|
static fromArray(markers) {
|
|
4756
4760
|
if (!markers) {
|
|
@@ -4767,7 +4771,7 @@ var InterpolationConfig = class {
|
|
|
4767
4771
|
var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
|
|
4768
4772
|
var DEFAULT_CONTAINER_BLOCKS = /* @__PURE__ */ new Set(["switch"]);
|
|
4769
4773
|
|
|
4770
|
-
// bazel-out/
|
|
4774
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/chars.mjs
|
|
4771
4775
|
var $EOF = 0;
|
|
4772
4776
|
var $BSPACE = 8;
|
|
4773
4777
|
var $TAB = 9;
|
|
@@ -4849,7 +4853,7 @@ function isQuote(code) {
|
|
|
4849
4853
|
return code === $SQ || code === $DQ || code === $BT;
|
|
4850
4854
|
}
|
|
4851
4855
|
|
|
4852
|
-
// bazel-out/
|
|
4856
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/parse_util.mjs
|
|
4853
4857
|
var ParseLocation = class {
|
|
4854
4858
|
constructor(file, offset, line, col) {
|
|
4855
4859
|
this.file = file;
|
|
@@ -4996,7 +5000,7 @@ function sanitizeIdentifier(name) {
|
|
|
4996
5000
|
return name.replace(/\W/g, "_");
|
|
4997
5001
|
}
|
|
4998
5002
|
|
|
4999
|
-
// bazel-out/
|
|
5003
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/abstract_js_emitter.mjs
|
|
5000
5004
|
var makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})';
|
|
5001
5005
|
var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
5002
5006
|
constructor() {
|
|
@@ -5089,7 +5093,7 @@ var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
|
5089
5093
|
}
|
|
5090
5094
|
};
|
|
5091
5095
|
|
|
5092
|
-
// bazel-out/
|
|
5096
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/output_jit_trusted_types.mjs
|
|
5093
5097
|
var policy;
|
|
5094
5098
|
function getPolicy() {
|
|
5095
5099
|
if (policy === void 0) {
|
|
@@ -5127,7 +5131,7 @@ function newTrustedFunctionForJIT(...args) {
|
|
|
5127
5131
|
return fn2.bind(_global);
|
|
5128
5132
|
}
|
|
5129
5133
|
|
|
5130
|
-
// bazel-out/
|
|
5134
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/output_jit.mjs
|
|
5131
5135
|
var JitEvaluator = class {
|
|
5132
5136
|
evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {
|
|
5133
5137
|
const converter = new JitEmitterVisitor(refResolver);
|
|
@@ -5218,7 +5222,7 @@ function isUseStrictStatement(statement) {
|
|
|
5218
5222
|
return statement.isEquivalent(literal("use strict").toStmt());
|
|
5219
5223
|
}
|
|
5220
5224
|
|
|
5221
|
-
// bazel-out/
|
|
5225
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_injector_compiler.mjs
|
|
5222
5226
|
function compileInjector(meta) {
|
|
5223
5227
|
const definitionMap = new DefinitionMap();
|
|
5224
5228
|
if (meta.providers !== null) {
|
|
@@ -5235,7 +5239,7 @@ function createInjectorType(meta) {
|
|
|
5235
5239
|
return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
|
|
5236
5240
|
}
|
|
5237
5241
|
|
|
5238
|
-
// bazel-out/
|
|
5242
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_jit.mjs
|
|
5239
5243
|
var R3JitReflector = class {
|
|
5240
5244
|
constructor(context) {
|
|
5241
5245
|
this.context = context;
|
|
@@ -5251,7 +5255,7 @@ var R3JitReflector = class {
|
|
|
5251
5255
|
}
|
|
5252
5256
|
};
|
|
5253
5257
|
|
|
5254
|
-
// bazel-out/
|
|
5258
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_module_compiler.mjs
|
|
5255
5259
|
var R3SelectorScopeMode;
|
|
5256
5260
|
(function(R3SelectorScopeMode2) {
|
|
5257
5261
|
R3SelectorScopeMode2[R3SelectorScopeMode2["Inline"] = 0] = "Inline";
|
|
@@ -5392,7 +5396,7 @@ function tupleOfTypes(types) {
|
|
|
5392
5396
|
return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;
|
|
5393
5397
|
}
|
|
5394
5398
|
|
|
5395
|
-
// bazel-out/
|
|
5399
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_pipe_compiler.mjs
|
|
5396
5400
|
function compilePipeFromMetadata(metadata) {
|
|
5397
5401
|
const definitionMapValues = [];
|
|
5398
5402
|
definitionMapValues.push({ key: "name", value: literal(metadata.pipeName), quoted: false });
|
|
@@ -5413,7 +5417,7 @@ function createPipeType(metadata) {
|
|
|
5413
5417
|
]));
|
|
5414
5418
|
}
|
|
5415
5419
|
|
|
5416
|
-
// bazel-out/
|
|
5420
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/api.mjs
|
|
5417
5421
|
var R3TemplateDependencyKind;
|
|
5418
5422
|
(function(R3TemplateDependencyKind2) {
|
|
5419
5423
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["Directive"] = 0] = "Directive";
|
|
@@ -5421,7 +5425,7 @@ var R3TemplateDependencyKind;
|
|
|
5421
5425
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["NgModule"] = 2] = "NgModule";
|
|
5422
5426
|
})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
|
|
5423
5427
|
|
|
5424
|
-
// bazel-out/
|
|
5428
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/shadow_css.mjs
|
|
5425
5429
|
var animationKeywords = /* @__PURE__ */ new Set([
|
|
5426
5430
|
"inherit",
|
|
5427
5431
|
"initial",
|
|
@@ -5893,7 +5897,7 @@ function repeatGroups(groups, multiples) {
|
|
|
5893
5897
|
}
|
|
5894
5898
|
}
|
|
5895
5899
|
|
|
5896
|
-
// bazel-out/
|
|
5900
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/enums.mjs
|
|
5897
5901
|
var OpKind;
|
|
5898
5902
|
(function(OpKind2) {
|
|
5899
5903
|
OpKind2[OpKind2["ListEnd"] = 0] = "ListEnd";
|
|
@@ -6047,7 +6051,7 @@ var TemplateKind;
|
|
|
6047
6051
|
TemplateKind2[TemplateKind2["Block"] = 2] = "Block";
|
|
6048
6052
|
})(TemplateKind || (TemplateKind = {}));
|
|
6049
6053
|
|
|
6050
|
-
// bazel-out/
|
|
6054
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
|
|
6051
6055
|
var ConsumesSlot = Symbol("ConsumesSlot");
|
|
6052
6056
|
var DependsOnSlotContext = Symbol("DependsOnSlotContext");
|
|
6053
6057
|
var ConsumesVarsTrait = Symbol("ConsumesVars");
|
|
@@ -6075,7 +6079,7 @@ function hasUsesVarOffsetTrait(expr) {
|
|
|
6075
6079
|
return expr[UsesVarOffset] === true;
|
|
6076
6080
|
}
|
|
6077
6081
|
|
|
6078
|
-
// bazel-out/
|
|
6082
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
|
|
6079
6083
|
function createStatementOp(statement) {
|
|
6080
6084
|
return __spreadValues({
|
|
6081
6085
|
kind: OpKind.Statement,
|
|
@@ -6097,7 +6101,7 @@ var NEW_OP = {
|
|
|
6097
6101
|
next: null
|
|
6098
6102
|
};
|
|
6099
6103
|
|
|
6100
|
-
// bazel-out/
|
|
6104
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
|
|
6101
6105
|
function createInterpolateTextOp(xref, interpolation, sourceSpan) {
|
|
6102
6106
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
6103
6107
|
kind: OpKind.InterpolateText,
|
|
@@ -6278,7 +6282,7 @@ function createI18nApplyOp(owner, handle, sourceSpan) {
|
|
|
6278
6282
|
}, NEW_OP);
|
|
6279
6283
|
}
|
|
6280
6284
|
|
|
6281
|
-
// bazel-out/
|
|
6285
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
|
|
6282
6286
|
var _a;
|
|
6283
6287
|
var _b;
|
|
6284
6288
|
var _c;
|
|
@@ -7140,7 +7144,7 @@ function isStringLiteral(expr) {
|
|
|
7140
7144
|
return expr instanceof LiteralExpr && typeof expr.value === "string";
|
|
7141
7145
|
}
|
|
7142
7146
|
|
|
7143
|
-
// bazel-out/
|
|
7147
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
|
|
7144
7148
|
var _OpList = class {
|
|
7145
7149
|
constructor() {
|
|
7146
7150
|
this.debugListId = _OpList.nextListId++;
|
|
@@ -7331,14 +7335,14 @@ var OpList = _OpList;
|
|
|
7331
7335
|
_OpList.nextListId = 0;
|
|
7332
7336
|
})();
|
|
7333
7337
|
|
|
7334
|
-
// bazel-out/
|
|
7338
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/handle.mjs
|
|
7335
7339
|
var SlotHandle = class {
|
|
7336
7340
|
constructor() {
|
|
7337
7341
|
this.slot = null;
|
|
7338
7342
|
}
|
|
7339
7343
|
};
|
|
7340
7344
|
|
|
7341
|
-
// bazel-out/
|
|
7345
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
|
|
7342
7346
|
var elementContainerOpKinds = /* @__PURE__ */ new Set([
|
|
7343
7347
|
OpKind.Element,
|
|
7344
7348
|
OpKind.ElementStart,
|
|
@@ -7494,18 +7498,21 @@ function createProjectionDefOp(def) {
|
|
|
7494
7498
|
def
|
|
7495
7499
|
}, NEW_OP);
|
|
7496
7500
|
}
|
|
7497
|
-
function createProjectionOp(xref, selector, i18nPlaceholder, sourceSpan) {
|
|
7498
|
-
return __spreadValues(__spreadValues({
|
|
7501
|
+
function createProjectionOp(xref, selector, i18nPlaceholder, fallbackView, sourceSpan) {
|
|
7502
|
+
return __spreadProps(__spreadValues(__spreadValues({
|
|
7499
7503
|
kind: OpKind.Projection,
|
|
7500
7504
|
xref,
|
|
7501
7505
|
handle: new SlotHandle(),
|
|
7502
7506
|
selector,
|
|
7503
7507
|
i18nPlaceholder,
|
|
7508
|
+
fallbackView,
|
|
7504
7509
|
projectionSlotIndex: 0,
|
|
7505
7510
|
attributes: null,
|
|
7506
7511
|
localRefs: [],
|
|
7507
7512
|
sourceSpan
|
|
7508
|
-
}, NEW_OP), TRAIT_CONSUMES_SLOT)
|
|
7513
|
+
}, NEW_OP), TRAIT_CONSUMES_SLOT), {
|
|
7514
|
+
numSlotsUsed: fallbackView === null ? 1 : 2
|
|
7515
|
+
});
|
|
7509
7516
|
}
|
|
7510
7517
|
function createExtractedAttributeOp(target, bindingKind, namespace, name, expression, i18nContext, i18nMessage, securityContext) {
|
|
7511
7518
|
return __spreadValues({
|
|
@@ -7639,7 +7646,7 @@ function createI18nAttributesOp(xref, handle, target) {
|
|
|
7639
7646
|
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
7640
7647
|
}
|
|
7641
7648
|
|
|
7642
|
-
// bazel-out/
|
|
7649
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
|
|
7643
7650
|
function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext, securityContext, sourceSpan) {
|
|
7644
7651
|
return __spreadValues(__spreadValues({
|
|
7645
7652
|
kind: OpKind.HostProperty,
|
|
@@ -7653,10 +7660,10 @@ function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext,
|
|
|
7653
7660
|
}, TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7654
7661
|
}
|
|
7655
7662
|
|
|
7656
|
-
// bazel-out/
|
|
7663
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
|
|
7657
7664
|
var CTX_REF = "CTX_REF_MARKER";
|
|
7658
7665
|
|
|
7659
|
-
// bazel-out/
|
|
7666
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
|
|
7660
7667
|
var CompilationJobKind;
|
|
7661
7668
|
(function(CompilationJobKind2) {
|
|
7662
7669
|
CompilationJobKind2[CompilationJobKind2["Tmpl"] = 0] = "Tmpl";
|
|
@@ -7764,7 +7771,7 @@ var HostBindingCompilationUnit = class extends CompilationUnit {
|
|
|
7764
7771
|
}
|
|
7765
7772
|
};
|
|
7766
7773
|
|
|
7767
|
-
// bazel-out/
|
|
7774
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
|
|
7768
7775
|
function deleteAnyCasts(job) {
|
|
7769
7776
|
for (const unit of job.units) {
|
|
7770
7777
|
for (const op of unit.ops()) {
|
|
@@ -7782,7 +7789,7 @@ function removeAnys(e) {
|
|
|
7782
7789
|
return e;
|
|
7783
7790
|
}
|
|
7784
7791
|
|
|
7785
|
-
// bazel-out/
|
|
7792
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
|
|
7786
7793
|
function applyI18nExpressions(job) {
|
|
7787
7794
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
7788
7795
|
for (const unit of job.units) {
|
|
@@ -7825,7 +7832,7 @@ function needsApplication(i18nContexts, op) {
|
|
|
7825
7832
|
return false;
|
|
7826
7833
|
}
|
|
7827
7834
|
|
|
7828
|
-
// bazel-out/
|
|
7835
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs
|
|
7829
7836
|
function assignI18nSlotDependencies(job) {
|
|
7830
7837
|
for (const unit of job.units) {
|
|
7831
7838
|
let updateOp = unit.update.head;
|
|
@@ -7870,7 +7877,7 @@ function assignI18nSlotDependencies(job) {
|
|
|
7870
7877
|
}
|
|
7871
7878
|
}
|
|
7872
7879
|
|
|
7873
|
-
// bazel-out/
|
|
7880
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
|
|
7874
7881
|
function createOpXrefMap(unit) {
|
|
7875
7882
|
const map = /* @__PURE__ */ new Map();
|
|
7876
7883
|
for (const op of unit.create) {
|
|
@@ -7885,7 +7892,7 @@ function createOpXrefMap(unit) {
|
|
|
7885
7892
|
return map;
|
|
7886
7893
|
}
|
|
7887
7894
|
|
|
7888
|
-
// bazel-out/
|
|
7895
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
|
|
7889
7896
|
function extractAttributes(job) {
|
|
7890
7897
|
for (const unit of job.units) {
|
|
7891
7898
|
const elements = createOpXrefMap(unit);
|
|
@@ -8014,7 +8021,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
8014
8021
|
}
|
|
8015
8022
|
}
|
|
8016
8023
|
|
|
8017
|
-
// bazel-out/
|
|
8024
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
|
|
8018
8025
|
function lookupElement2(elements, xref) {
|
|
8019
8026
|
const el = elements.get(xref);
|
|
8020
8027
|
if (el === void 0) {
|
|
@@ -8071,7 +8078,7 @@ function specializeBindings(job) {
|
|
|
8071
8078
|
}
|
|
8072
8079
|
}
|
|
8073
8080
|
|
|
8074
|
-
// bazel-out/
|
|
8081
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
|
|
8075
8082
|
var CHAINABLE = /* @__PURE__ */ new Set([
|
|
8076
8083
|
Identifiers.attribute,
|
|
8077
8084
|
Identifiers.classProp,
|
|
@@ -8139,7 +8146,7 @@ function chainOperationsInList(opList) {
|
|
|
8139
8146
|
}
|
|
8140
8147
|
}
|
|
8141
8148
|
|
|
8142
|
-
// bazel-out/
|
|
8149
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/collapse_singleton_interpolations.mjs
|
|
8143
8150
|
function collapseSingletonInterpolations(job) {
|
|
8144
8151
|
for (const unit of job.units) {
|
|
8145
8152
|
for (const op of unit.update) {
|
|
@@ -8151,7 +8158,7 @@ function collapseSingletonInterpolations(job) {
|
|
|
8151
8158
|
}
|
|
8152
8159
|
}
|
|
8153
8160
|
|
|
8154
|
-
// bazel-out/
|
|
8161
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
|
|
8155
8162
|
function generateConditionalExpressions(job) {
|
|
8156
8163
|
for (const unit of job.units) {
|
|
8157
8164
|
for (const op of unit.ops()) {
|
|
@@ -8188,7 +8195,7 @@ function generateConditionalExpressions(job) {
|
|
|
8188
8195
|
}
|
|
8189
8196
|
}
|
|
8190
8197
|
|
|
8191
|
-
// bazel-out/
|
|
8198
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
8192
8199
|
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
8193
8200
|
["&&", BinaryOperator.And],
|
|
8194
8201
|
[">", BinaryOperator.Bigger],
|
|
@@ -8239,7 +8246,7 @@ function literalOrArrayLiteral(value) {
|
|
|
8239
8246
|
return literal(value);
|
|
8240
8247
|
}
|
|
8241
8248
|
|
|
8242
|
-
// bazel-out/
|
|
8249
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
|
|
8243
8250
|
function collectElementConsts(job) {
|
|
8244
8251
|
const allElementAttributes = /* @__PURE__ */ new Map();
|
|
8245
8252
|
for (const unit of job.units) {
|
|
@@ -8408,7 +8415,7 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
|
|
|
8408
8415
|
return literalArr(attrArray);
|
|
8409
8416
|
}
|
|
8410
8417
|
|
|
8411
|
-
// bazel-out/
|
|
8418
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/convert_i18n_bindings.mjs
|
|
8412
8419
|
function convertI18nBindings(job) {
|
|
8413
8420
|
const i18nAttributesByElem = /* @__PURE__ */ new Map();
|
|
8414
8421
|
for (const unit of job.units) {
|
|
@@ -8449,7 +8456,7 @@ function convertI18nBindings(job) {
|
|
|
8449
8456
|
}
|
|
8450
8457
|
}
|
|
8451
8458
|
|
|
8452
|
-
// bazel-out/
|
|
8459
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_defer_deps_fns.mjs
|
|
8453
8460
|
function resolveDeferDepsFns(job) {
|
|
8454
8461
|
var _a2;
|
|
8455
8462
|
for (const unit of job.units) {
|
|
@@ -8474,7 +8481,7 @@ function resolveDeferDepsFns(job) {
|
|
|
8474
8481
|
}
|
|
8475
8482
|
}
|
|
8476
8483
|
|
|
8477
|
-
// bazel-out/
|
|
8484
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_i18n_contexts.mjs
|
|
8478
8485
|
function createI18nContexts(job) {
|
|
8479
8486
|
const attrContextByMessage = /* @__PURE__ */ new Map();
|
|
8480
8487
|
for (const unit of job.units) {
|
|
@@ -8552,7 +8559,7 @@ function createI18nContexts(job) {
|
|
|
8552
8559
|
}
|
|
8553
8560
|
}
|
|
8554
8561
|
|
|
8555
|
-
// bazel-out/
|
|
8562
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/deduplicate_text_bindings.mjs
|
|
8556
8563
|
function deduplicateTextBindings(job) {
|
|
8557
8564
|
const seen = /* @__PURE__ */ new Map();
|
|
8558
8565
|
for (const unit of job.units) {
|
|
@@ -8574,7 +8581,7 @@ function deduplicateTextBindings(job) {
|
|
|
8574
8581
|
}
|
|
8575
8582
|
}
|
|
8576
8583
|
|
|
8577
|
-
// bazel-out/
|
|
8584
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_configs.mjs
|
|
8578
8585
|
function configureDeferInstructions(job) {
|
|
8579
8586
|
for (const unit of job.units) {
|
|
8580
8587
|
for (const op of unit.create) {
|
|
@@ -8591,7 +8598,7 @@ function configureDeferInstructions(job) {
|
|
|
8591
8598
|
}
|
|
8592
8599
|
}
|
|
8593
8600
|
|
|
8594
|
-
// bazel-out/
|
|
8601
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_resolve_targets.mjs
|
|
8595
8602
|
function resolveDeferTargetNames(job) {
|
|
8596
8603
|
const scopes = /* @__PURE__ */ new Map();
|
|
8597
8604
|
function getScopeForView2(view) {
|
|
@@ -8685,7 +8692,7 @@ var Scope = class {
|
|
|
8685
8692
|
}
|
|
8686
8693
|
};
|
|
8687
8694
|
|
|
8688
|
-
// bazel-out/
|
|
8695
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
|
|
8689
8696
|
var REPLACEMENTS = /* @__PURE__ */ new Map([
|
|
8690
8697
|
[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
|
|
8691
8698
|
[OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],
|
|
@@ -8712,7 +8719,7 @@ function collapseEmptyInstructions(job) {
|
|
|
8712
8719
|
}
|
|
8713
8720
|
}
|
|
8714
8721
|
|
|
8715
|
-
// bazel-out/
|
|
8722
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
|
|
8716
8723
|
function expandSafeReads(job) {
|
|
8717
8724
|
for (const unit of job.units) {
|
|
8718
8725
|
for (const op of unit.ops()) {
|
|
@@ -8848,7 +8855,7 @@ function ternaryTransform(e) {
|
|
|
8848
8855
|
return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
|
|
8849
8856
|
}
|
|
8850
8857
|
|
|
8851
|
-
// bazel-out/
|
|
8858
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/extract_i18n_messages.mjs
|
|
8852
8859
|
var ESCAPE = "\uFFFD";
|
|
8853
8860
|
var ELEMENT_MARKER = "#";
|
|
8854
8861
|
var TEMPLATE_MARKER = "*";
|
|
@@ -8984,7 +8991,7 @@ function formatValue(value) {
|
|
|
8984
8991
|
return `${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
8985
8992
|
}
|
|
8986
8993
|
|
|
8987
|
-
// bazel-out/
|
|
8994
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
|
|
8988
8995
|
function generateAdvance(job) {
|
|
8989
8996
|
for (const unit of job.units) {
|
|
8990
8997
|
const slotMap = /* @__PURE__ */ new Map();
|
|
@@ -9016,7 +9023,7 @@ function generateAdvance(job) {
|
|
|
9016
9023
|
}
|
|
9017
9024
|
}
|
|
9018
9025
|
|
|
9019
|
-
// bazel-out/
|
|
9026
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
|
|
9020
9027
|
function generateProjectionDefs(job) {
|
|
9021
9028
|
const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;
|
|
9022
9029
|
const selectors = [];
|
|
@@ -9040,7 +9047,7 @@ function generateProjectionDefs(job) {
|
|
|
9040
9047
|
}
|
|
9041
9048
|
}
|
|
9042
9049
|
|
|
9043
|
-
// bazel-out/
|
|
9050
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
|
|
9044
9051
|
function generateVariables(job) {
|
|
9045
9052
|
recursivelyProcessView(job.root, null);
|
|
9046
9053
|
}
|
|
@@ -9051,6 +9058,11 @@ function recursivelyProcessView(view, parentScope) {
|
|
|
9051
9058
|
case OpKind.Template:
|
|
9052
9059
|
recursivelyProcessView(view.job.views.get(op.xref), scope);
|
|
9053
9060
|
break;
|
|
9061
|
+
case OpKind.Projection:
|
|
9062
|
+
if (op.fallbackView !== null) {
|
|
9063
|
+
recursivelyProcessView(view.job.views.get(op.fallbackView), scope);
|
|
9064
|
+
}
|
|
9065
|
+
break;
|
|
9054
9066
|
case OpKind.RepeaterCreate:
|
|
9055
9067
|
recursivelyProcessView(view.job.views.get(op.xref), scope);
|
|
9056
9068
|
if (op.emptyView) {
|
|
@@ -9134,7 +9146,7 @@ function generateVariablesInScopeForView(view, scope) {
|
|
|
9134
9146
|
return newOps;
|
|
9135
9147
|
}
|
|
9136
9148
|
|
|
9137
|
-
// bazel-out/
|
|
9149
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_expression_collection.mjs
|
|
9138
9150
|
function collectConstExpressions(job) {
|
|
9139
9151
|
for (const unit of job.units) {
|
|
9140
9152
|
for (const op of unit.ops()) {
|
|
@@ -9148,7 +9160,7 @@ function collectConstExpressions(job) {
|
|
|
9148
9160
|
}
|
|
9149
9161
|
}
|
|
9150
9162
|
|
|
9151
|
-
// bazel-out/
|
|
9163
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
|
|
9152
9164
|
var STYLE_DOT = "style.";
|
|
9153
9165
|
var CLASS_DOT = "class.";
|
|
9154
9166
|
var STYLE_BANG = "style!";
|
|
@@ -9206,7 +9218,7 @@ function parseProperty(name) {
|
|
|
9206
9218
|
return { property: property2, suffix };
|
|
9207
9219
|
}
|
|
9208
9220
|
|
|
9209
|
-
// bazel-out/
|
|
9221
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/map_util.mjs
|
|
9210
9222
|
function mapLiteral(obj, quoted = false) {
|
|
9211
9223
|
return literalMap(Object.keys(obj).map((key) => ({
|
|
9212
9224
|
key,
|
|
@@ -9215,7 +9227,7 @@ function mapLiteral(obj, quoted = false) {
|
|
|
9215
9227
|
})));
|
|
9216
9228
|
}
|
|
9217
9229
|
|
|
9218
|
-
// bazel-out/
|
|
9230
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
|
|
9219
9231
|
var IcuSerializerVisitor = class {
|
|
9220
9232
|
visitText(text2) {
|
|
9221
9233
|
return text2.value;
|
|
@@ -9249,7 +9261,7 @@ function serializeIcuNode(icu) {
|
|
|
9249
9261
|
return icu.visit(serializer);
|
|
9250
9262
|
}
|
|
9251
9263
|
|
|
9252
|
-
// bazel-out/
|
|
9264
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
|
|
9253
9265
|
var TokenType;
|
|
9254
9266
|
(function(TokenType2) {
|
|
9255
9267
|
TokenType2[TokenType2["Character"] = 0] = "Character";
|
|
@@ -9610,7 +9622,7 @@ function parseIntAutoRadix(text2) {
|
|
|
9610
9622
|
return result;
|
|
9611
9623
|
}
|
|
9612
9624
|
|
|
9613
|
-
// bazel-out/
|
|
9625
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
|
|
9614
9626
|
var SplitInterpolation = class {
|
|
9615
9627
|
constructor(strings, expressions, offsets) {
|
|
9616
9628
|
this.strings = strings;
|
|
@@ -10492,7 +10504,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
|
|
|
10492
10504
|
return offsetMap;
|
|
10493
10505
|
}
|
|
10494
10506
|
|
|
10495
|
-
// bazel-out/
|
|
10507
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
|
|
10496
10508
|
var NodeWithI18n = class {
|
|
10497
10509
|
constructor(sourceSpan, i18n2) {
|
|
10498
10510
|
this.sourceSpan = sourceSpan;
|
|
@@ -10644,7 +10656,7 @@ var RecursiveVisitor = class {
|
|
|
10644
10656
|
}
|
|
10645
10657
|
};
|
|
10646
10658
|
|
|
10647
|
-
// bazel-out/
|
|
10659
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/dom_security_schema.mjs
|
|
10648
10660
|
var _SECURITY_SCHEMA;
|
|
10649
10661
|
function SECURITY_SCHEMA() {
|
|
10650
10662
|
if (!_SECURITY_SCHEMA) {
|
|
@@ -10702,11 +10714,11 @@ function isIframeSecuritySensitiveAttr(attrName) {
|
|
|
10702
10714
|
return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
|
|
10703
10715
|
}
|
|
10704
10716
|
|
|
10705
|
-
// bazel-out/
|
|
10717
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
|
|
10706
10718
|
var ElementSchemaRegistry = class {
|
|
10707
10719
|
};
|
|
10708
10720
|
|
|
10709
|
-
// bazel-out/
|
|
10721
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
|
|
10710
10722
|
var BOOLEAN = "boolean";
|
|
10711
10723
|
var NUMBER = "number";
|
|
10712
10724
|
var STRING = "string";
|
|
@@ -11059,7 +11071,7 @@ function _isPixelDimensionStyle(prop) {
|
|
|
11059
11071
|
}
|
|
11060
11072
|
}
|
|
11061
11073
|
|
|
11062
|
-
// bazel-out/
|
|
11074
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
|
|
11063
11075
|
var HtmlTagDefinition = class {
|
|
11064
11076
|
constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false } = {}) {
|
|
11065
11077
|
this.closedByChildren = {};
|
|
@@ -11177,7 +11189,7 @@ function getHtmlTagDefinition(tagName) {
|
|
|
11177
11189
|
return (_b2 = (_a2 = TAG_DEFINITIONS[tagName]) != null ? _a2 : TAG_DEFINITIONS[tagName.toLowerCase()]) != null ? _b2 : DEFAULT_TAG_DEFINITION;
|
|
11178
11190
|
}
|
|
11179
11191
|
|
|
11180
|
-
// bazel-out/
|
|
11192
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
|
|
11181
11193
|
var TAG_TO_PLACEHOLDER_NAMES = {
|
|
11182
11194
|
"A": "LINK",
|
|
11183
11195
|
"B": "BOLD_TEXT",
|
|
@@ -11299,7 +11311,7 @@ var PlaceholderRegistry = class {
|
|
|
11299
11311
|
}
|
|
11300
11312
|
};
|
|
11301
11313
|
|
|
11302
|
-
// bazel-out/
|
|
11314
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
|
|
11303
11315
|
var _expParser = new Parser(new Lexer());
|
|
11304
11316
|
function createI18nMessageFactory(interpolationConfig, containerBlocks) {
|
|
11305
11317
|
const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks);
|
|
@@ -11478,14 +11490,14 @@ function extractPlaceholderName(input) {
|
|
|
11478
11490
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
11479
11491
|
}
|
|
11480
11492
|
|
|
11481
|
-
// bazel-out/
|
|
11493
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
|
|
11482
11494
|
var I18nError = class extends ParseError {
|
|
11483
11495
|
constructor(span, msg) {
|
|
11484
11496
|
super(span, msg);
|
|
11485
11497
|
}
|
|
11486
11498
|
};
|
|
11487
11499
|
|
|
11488
|
-
// bazel-out/
|
|
11500
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
|
|
11489
11501
|
var NAMED_ENTITIES = {
|
|
11490
11502
|
"AElig": "\xC6",
|
|
11491
11503
|
"AMP": "&",
|
|
@@ -13616,7 +13628,7 @@ var NAMED_ENTITIES = {
|
|
|
13616
13628
|
var NGSP_UNICODE = "\uE500";
|
|
13617
13629
|
NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
|
|
13618
13630
|
|
|
13619
|
-
// bazel-out/
|
|
13631
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
|
|
13620
13632
|
var TokenError = class extends ParseError {
|
|
13621
13633
|
constructor(errorMsg, tokenType, span) {
|
|
13622
13634
|
super(span, errorMsg);
|
|
@@ -14537,7 +14549,7 @@ var CursorError = class {
|
|
|
14537
14549
|
}
|
|
14538
14550
|
};
|
|
14539
14551
|
|
|
14540
|
-
// bazel-out/
|
|
14552
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
|
|
14541
14553
|
var TreeError = class extends ParseError {
|
|
14542
14554
|
static create(elementName, span, msg) {
|
|
14543
14555
|
return new TreeError(elementName, span, msg);
|
|
@@ -14921,7 +14933,7 @@ function decodeEntity(match, entity) {
|
|
|
14921
14933
|
return match;
|
|
14922
14934
|
}
|
|
14923
14935
|
|
|
14924
|
-
// bazel-out/
|
|
14936
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
|
|
14925
14937
|
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
|
|
14926
14938
|
"iframe|srcdoc",
|
|
14927
14939
|
"*|innerhtml",
|
|
@@ -14936,7 +14948,7 @@ function isTrustedTypesSink(tagName, propName) {
|
|
|
14936
14948
|
return TRUSTED_TYPES_SINKS.has(tagName + "|" + propName) || TRUSTED_TYPES_SINKS.has("*|" + propName);
|
|
14937
14949
|
}
|
|
14938
14950
|
|
|
14939
|
-
// bazel-out/
|
|
14951
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
|
|
14940
14952
|
var setI18nRefs = (htmlNode, i18nNode) => {
|
|
14941
14953
|
if (htmlNode instanceof NodeWithI18n) {
|
|
14942
14954
|
if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {
|
|
@@ -15093,7 +15105,7 @@ function i18nMetaToJSDoc(meta) {
|
|
|
15093
15105
|
return jsDocComment(tags);
|
|
15094
15106
|
}
|
|
15095
15107
|
|
|
15096
|
-
// bazel-out/
|
|
15108
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
|
|
15097
15109
|
var GOOG_GET_MSG = "goog.getMsg";
|
|
15098
15110
|
function createGoogleGetMsgStatements(variable2, message, closureVar, placeholderValues) {
|
|
15099
15111
|
const messageString = serializeI18nMessageForGetMsg(message);
|
|
@@ -15144,7 +15156,7 @@ function serializeI18nMessageForGetMsg(message) {
|
|
|
15144
15156
|
return message.nodes.map((node) => node.visit(serializerVisitor2, null)).join("");
|
|
15145
15157
|
}
|
|
15146
15158
|
|
|
15147
|
-
// bazel-out/
|
|
15159
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
|
|
15148
15160
|
function createLocalizeStatements(variable2, message, params) {
|
|
15149
15161
|
const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);
|
|
15150
15162
|
const sourceSpan = getSourceSpan(message);
|
|
@@ -15233,7 +15245,7 @@ function createEmptyMessagePart(location) {
|
|
|
15233
15245
|
return new LiteralPiece("", new ParseSourceSpan(location, location));
|
|
15234
15246
|
}
|
|
15235
15247
|
|
|
15236
|
-
// bazel-out/
|
|
15248
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
|
|
15237
15249
|
var NG_I18N_CLOSURE_MODE = "ngI18nClosureMode";
|
|
15238
15250
|
var TRANSLATION_VAR_PREFIX = "i18n_";
|
|
15239
15251
|
var I18N_ICU_MAPPING_PREFIX = "I18N_EXP_";
|
|
@@ -15401,7 +15413,7 @@ function i18nGenerateClosureVar(pool, messageId, fileBasedI18nSuffix, useExterna
|
|
|
15401
15413
|
return variable(name);
|
|
15402
15414
|
}
|
|
15403
15415
|
|
|
15404
|
-
// bazel-out/
|
|
15416
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
|
|
15405
15417
|
function convertI18nText(job) {
|
|
15406
15418
|
var _a2, _b2, _c2;
|
|
15407
15419
|
for (const unit of job.units) {
|
|
@@ -15471,7 +15483,7 @@ function convertI18nText(job) {
|
|
|
15471
15483
|
}
|
|
15472
15484
|
}
|
|
15473
15485
|
|
|
15474
|
-
// bazel-out/
|
|
15486
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
|
|
15475
15487
|
function liftLocalRefs(job) {
|
|
15476
15488
|
for (const unit of job.units) {
|
|
15477
15489
|
for (const op of unit.create) {
|
|
@@ -15501,7 +15513,7 @@ function serializeLocalRefs(refs) {
|
|
|
15501
15513
|
return literalArr(constRefs);
|
|
15502
15514
|
}
|
|
15503
15515
|
|
|
15504
|
-
// bazel-out/
|
|
15516
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
15505
15517
|
function emitNamespaceChanges(job) {
|
|
15506
15518
|
for (const unit of job.units) {
|
|
15507
15519
|
let activeNamespace = Namespace.HTML;
|
|
@@ -15517,7 +15529,7 @@ function emitNamespaceChanges(job) {
|
|
|
15517
15529
|
}
|
|
15518
15530
|
}
|
|
15519
15531
|
|
|
15520
|
-
// bazel-out/
|
|
15532
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
|
|
15521
15533
|
function parse(value) {
|
|
15522
15534
|
const styles = [];
|
|
15523
15535
|
let i = 0;
|
|
@@ -15611,7 +15623,7 @@ function parseExtractedStyles(job) {
|
|
|
15611
15623
|
}
|
|
15612
15624
|
}
|
|
15613
15625
|
|
|
15614
|
-
// bazel-out/
|
|
15626
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
|
|
15615
15627
|
function nameFunctionsAndVariables(job) {
|
|
15616
15628
|
addNamesToView(job.root, job.componentName, { index: 0 }, job.compatibility === CompatibilityMode.TemplateDefinitionBuilder);
|
|
15617
15629
|
}
|
|
@@ -15672,6 +15684,18 @@ function addNamesToView(unit, baseName, state, compatibility) {
|
|
|
15672
15684
|
}
|
|
15673
15685
|
addNamesToView(unit.job.views.get(op.xref), `${baseName}_${op.functionNameSuffix}_${op.handle.slot + 1}`, state, compatibility);
|
|
15674
15686
|
break;
|
|
15687
|
+
case OpKind.Projection:
|
|
15688
|
+
if (!(unit instanceof ViewCompilationUnit)) {
|
|
15689
|
+
throw new Error(`AssertionError: must be compiling a component`);
|
|
15690
|
+
}
|
|
15691
|
+
if (op.handle.slot === null) {
|
|
15692
|
+
throw new Error(`Expected slot to be assigned`);
|
|
15693
|
+
}
|
|
15694
|
+
if (op.fallbackView !== null) {
|
|
15695
|
+
const fallbackView = unit.job.views.get(op.fallbackView);
|
|
15696
|
+
addNamesToView(fallbackView, `${baseName}_ProjectionFallback_${op.handle.slot}`, state, compatibility);
|
|
15697
|
+
}
|
|
15698
|
+
break;
|
|
15675
15699
|
case OpKind.Template:
|
|
15676
15700
|
if (!(unit instanceof ViewCompilationUnit)) {
|
|
15677
15701
|
throw new Error(`AssertionError: must be compiling a component`);
|
|
@@ -15740,7 +15764,7 @@ function stripImportant(name) {
|
|
|
15740
15764
|
return name;
|
|
15741
15765
|
}
|
|
15742
15766
|
|
|
15743
|
-
// bazel-out/
|
|
15767
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
|
|
15744
15768
|
function mergeNextContextExpressions(job) {
|
|
15745
15769
|
for (const unit of job.units) {
|
|
15746
15770
|
for (const op of unit.create) {
|
|
@@ -15786,7 +15810,7 @@ function mergeNextContextsInOps(ops) {
|
|
|
15786
15810
|
}
|
|
15787
15811
|
}
|
|
15788
15812
|
|
|
15789
|
-
// bazel-out/
|
|
15813
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
|
|
15790
15814
|
var CONTAINER_TAG = "ng-container";
|
|
15791
15815
|
function generateNgContainerOps(job) {
|
|
15792
15816
|
for (const unit of job.units) {
|
|
@@ -15803,7 +15827,7 @@ function generateNgContainerOps(job) {
|
|
|
15803
15827
|
}
|
|
15804
15828
|
}
|
|
15805
15829
|
|
|
15806
|
-
// bazel-out/
|
|
15830
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
|
|
15807
15831
|
function lookupElement3(elements, xref) {
|
|
15808
15832
|
const el = elements.get(xref);
|
|
15809
15833
|
if (el === void 0) {
|
|
@@ -15833,7 +15857,7 @@ function disableBindings(job) {
|
|
|
15833
15857
|
}
|
|
15834
15858
|
}
|
|
15835
15859
|
|
|
15836
|
-
// bazel-out/
|
|
15860
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
|
|
15837
15861
|
function generateNullishCoalesceExpressions(job) {
|
|
15838
15862
|
for (const unit of job.units) {
|
|
15839
15863
|
for (const op of unit.ops()) {
|
|
@@ -15849,7 +15873,7 @@ function generateNullishCoalesceExpressions(job) {
|
|
|
15849
15873
|
}
|
|
15850
15874
|
}
|
|
15851
15875
|
|
|
15852
|
-
// bazel-out/
|
|
15876
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
|
|
15853
15877
|
function kindTest(kind) {
|
|
15854
15878
|
return (op) => op.kind === kind;
|
|
15855
15879
|
}
|
|
@@ -15939,7 +15963,7 @@ function keepLast(ops) {
|
|
|
15939
15963
|
return ops.slice(ops.length - 1);
|
|
15940
15964
|
}
|
|
15941
15965
|
|
|
15942
|
-
// bazel-out/
|
|
15966
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
|
|
15943
15967
|
function removeContentSelectors(job) {
|
|
15944
15968
|
for (const unit of job.units) {
|
|
15945
15969
|
const elements = createOpXrefMap(unit);
|
|
@@ -15966,7 +15990,7 @@ function lookupInXrefMap(map, xref) {
|
|
|
15966
15990
|
return el;
|
|
15967
15991
|
}
|
|
15968
15992
|
|
|
15969
|
-
// bazel-out/
|
|
15993
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
|
|
15970
15994
|
function createPipes(job) {
|
|
15971
15995
|
for (const unit of job.units) {
|
|
15972
15996
|
processPipeBindingsInView(unit);
|
|
@@ -16014,7 +16038,7 @@ function addPipeToCreationBlock(unit, afterTargetXref, binding) {
|
|
|
16014
16038
|
throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);
|
|
16015
16039
|
}
|
|
16016
16040
|
|
|
16017
|
-
// bazel-out/
|
|
16041
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
|
|
16018
16042
|
function createVariadicPipes(job) {
|
|
16019
16043
|
for (const unit of job.units) {
|
|
16020
16044
|
for (const op of unit.update) {
|
|
@@ -16031,7 +16055,7 @@ function createVariadicPipes(job) {
|
|
|
16031
16055
|
}
|
|
16032
16056
|
}
|
|
16033
16057
|
|
|
16034
|
-
// bazel-out/
|
|
16058
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs
|
|
16035
16059
|
function propagateI18nBlocks(job) {
|
|
16036
16060
|
propagateI18nBlocksToTemplates(job.root, 0);
|
|
16037
16061
|
}
|
|
@@ -16085,7 +16109,7 @@ function wrapTemplateWithI18n(unit, parentI18n) {
|
|
|
16085
16109
|
}
|
|
16086
16110
|
}
|
|
16087
16111
|
|
|
16088
|
-
// bazel-out/
|
|
16112
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
|
|
16089
16113
|
function extractPureFunctions(job) {
|
|
16090
16114
|
for (const view of job.units) {
|
|
16091
16115
|
for (const op of view.ops()) {
|
|
@@ -16127,7 +16151,7 @@ var PureFunctionConstant = class extends GenericKeyFn {
|
|
|
16127
16151
|
}
|
|
16128
16152
|
};
|
|
16129
16153
|
|
|
16130
|
-
// bazel-out/
|
|
16154
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
|
|
16131
16155
|
function generatePureLiteralStructures(job) {
|
|
16132
16156
|
for (const unit of job.units) {
|
|
16133
16157
|
for (const op of unit.update) {
|
|
@@ -16174,7 +16198,7 @@ function transformLiteralMap(expr) {
|
|
|
16174
16198
|
return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
|
|
16175
16199
|
}
|
|
16176
16200
|
|
|
16177
|
-
// bazel-out/
|
|
16201
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
|
|
16178
16202
|
function element(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
16179
16203
|
return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
16180
16204
|
}
|
|
@@ -16338,13 +16362,19 @@ function deferOn(trigger, args, prefetch, sourceSpan) {
|
|
|
16338
16362
|
function projectionDef(def) {
|
|
16339
16363
|
return call(Identifiers.projectionDef, def ? [def] : [], null);
|
|
16340
16364
|
}
|
|
16341
|
-
function projection(slot, projectionSlotIndex, attributes, sourceSpan) {
|
|
16365
|
+
function projection(slot, projectionSlotIndex, attributes, fallbackFnName, fallbackDecls, fallbackVars, sourceSpan) {
|
|
16342
16366
|
const args = [literal(slot)];
|
|
16343
|
-
if (projectionSlotIndex !== 0 || attributes !== null) {
|
|
16367
|
+
if (projectionSlotIndex !== 0 || attributes !== null || fallbackFnName !== null) {
|
|
16344
16368
|
args.push(literal(projectionSlotIndex));
|
|
16345
16369
|
if (attributes !== null) {
|
|
16346
16370
|
args.push(attributes);
|
|
16347
16371
|
}
|
|
16372
|
+
if (fallbackFnName !== null) {
|
|
16373
|
+
if (attributes === null) {
|
|
16374
|
+
args.push(literal(null));
|
|
16375
|
+
}
|
|
16376
|
+
args.push(variable(fallbackFnName), literal(fallbackDecls), literal(fallbackVars));
|
|
16377
|
+
}
|
|
16348
16378
|
}
|
|
16349
16379
|
return call(Identifiers.projection, args, sourceSpan);
|
|
16350
16380
|
}
|
|
@@ -16709,7 +16739,7 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
|
|
|
16709
16739
|
return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
|
|
16710
16740
|
}
|
|
16711
16741
|
|
|
16712
|
-
// bazel-out/
|
|
16742
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
|
|
16713
16743
|
var GLOBAL_TARGET_RESOLVERS = /* @__PURE__ */ new Map([
|
|
16714
16744
|
["window", Identifiers.resolveWindow],
|
|
16715
16745
|
["document", Identifiers.resolveDocument],
|
|
@@ -16847,7 +16877,25 @@ function reifyCreateOperations(unit, ops) {
|
|
|
16847
16877
|
if (op.handle.slot === null) {
|
|
16848
16878
|
throw new Error("No slot was assigned for project instruction");
|
|
16849
16879
|
}
|
|
16850
|
-
|
|
16880
|
+
let fallbackViewFnName = null;
|
|
16881
|
+
let fallbackDecls = null;
|
|
16882
|
+
let fallbackVars = null;
|
|
16883
|
+
if (op.fallbackView !== null) {
|
|
16884
|
+
if (!(unit instanceof ViewCompilationUnit)) {
|
|
16885
|
+
throw new Error(`AssertionError: must be compiling a component`);
|
|
16886
|
+
}
|
|
16887
|
+
const fallbackView = unit.job.views.get(op.fallbackView);
|
|
16888
|
+
if (fallbackView === void 0) {
|
|
16889
|
+
throw new Error("AssertionError: projection had fallback view xref, but fallback view was not found");
|
|
16890
|
+
}
|
|
16891
|
+
if (fallbackView.fnName === null || fallbackView.decls === null || fallbackView.vars === null) {
|
|
16892
|
+
throw new Error(`AssertionError: expected projection fallback view to have been named and counted`);
|
|
16893
|
+
}
|
|
16894
|
+
fallbackViewFnName = fallbackView.fnName;
|
|
16895
|
+
fallbackDecls = fallbackView.decls;
|
|
16896
|
+
fallbackVars = fallbackView.vars;
|
|
16897
|
+
}
|
|
16898
|
+
OpList.replace(op, projection(op.handle.slot, op.projectionSlotIndex, op.attributes, fallbackViewFnName, fallbackDecls, fallbackVars, op.sourceSpan));
|
|
16851
16899
|
break;
|
|
16852
16900
|
case OpKind.RepeaterCreate:
|
|
16853
16901
|
if (op.handle.slot === null) {
|
|
@@ -17050,7 +17098,7 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
|
|
|
17050
17098
|
return fn(params, handlerStmts, void 0, void 0, name);
|
|
17051
17099
|
}
|
|
17052
17100
|
|
|
17053
|
-
// bazel-out/
|
|
17101
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
|
|
17054
17102
|
function removeEmptyBindings(job) {
|
|
17055
17103
|
for (const unit of job.units) {
|
|
17056
17104
|
for (const op of unit.update) {
|
|
@@ -17071,7 +17119,7 @@ function removeEmptyBindings(job) {
|
|
|
17071
17119
|
}
|
|
17072
17120
|
}
|
|
17073
17121
|
|
|
17074
|
-
// bazel-out/
|
|
17122
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_i18n_contexts.mjs
|
|
17075
17123
|
function removeI18nContexts(job) {
|
|
17076
17124
|
for (const unit of job.units) {
|
|
17077
17125
|
for (const op of unit.create) {
|
|
@@ -17087,7 +17135,7 @@ function removeI18nContexts(job) {
|
|
|
17087
17135
|
}
|
|
17088
17136
|
}
|
|
17089
17137
|
|
|
17090
|
-
// bazel-out/
|
|
17138
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_unused_i18n_attrs.mjs
|
|
17091
17139
|
function removeUnusedI18nAttributesOps(job) {
|
|
17092
17140
|
for (const unit of job.units) {
|
|
17093
17141
|
const ownersWithI18nExpressions = /* @__PURE__ */ new Set();
|
|
@@ -17109,7 +17157,7 @@ function removeUnusedI18nAttributesOps(job) {
|
|
|
17109
17157
|
}
|
|
17110
17158
|
}
|
|
17111
17159
|
|
|
17112
|
-
// bazel-out/
|
|
17160
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
|
|
17113
17161
|
function resolveContexts(job) {
|
|
17114
17162
|
for (const unit of job.units) {
|
|
17115
17163
|
processLexicalScope(unit, unit.create);
|
|
@@ -17151,7 +17199,7 @@ function processLexicalScope(view, ops) {
|
|
|
17151
17199
|
}
|
|
17152
17200
|
}
|
|
17153
17201
|
|
|
17154
|
-
// bazel-out/
|
|
17202
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
|
|
17155
17203
|
function resolveDollarEvent(job) {
|
|
17156
17204
|
for (const unit of job.units) {
|
|
17157
17205
|
transformDollarEvent(unit.create);
|
|
@@ -17174,7 +17222,7 @@ function transformDollarEvent(ops) {
|
|
|
17174
17222
|
}
|
|
17175
17223
|
}
|
|
17176
17224
|
|
|
17177
|
-
// bazel-out/
|
|
17225
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_element_placeholders.mjs
|
|
17178
17226
|
function resolveI18nElementPlaceholders(job) {
|
|
17179
17227
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
17180
17228
|
const elements = /* @__PURE__ */ new Map();
|
|
@@ -17353,7 +17401,7 @@ function addParam(params, placeholder, value, subTemplateIndex, flags) {
|
|
|
17353
17401
|
params.set(placeholder, values);
|
|
17354
17402
|
}
|
|
17355
17403
|
|
|
17356
|
-
// bazel-out/
|
|
17404
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
|
|
17357
17405
|
function resolveI18nExpressionPlaceholders(job) {
|
|
17358
17406
|
var _a2;
|
|
17359
17407
|
const subTemplateIndices = /* @__PURE__ */ new Map();
|
|
@@ -17406,7 +17454,7 @@ function updatePlaceholder(op, value, i18nContexts, icuPlaceholders) {
|
|
|
17406
17454
|
}
|
|
17407
17455
|
}
|
|
17408
17456
|
|
|
17409
|
-
// bazel-out/
|
|
17457
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
|
|
17410
17458
|
function resolveNames(job) {
|
|
17411
17459
|
for (const unit of job.units) {
|
|
17412
17460
|
processLexicalScope2(unit, unit.create, null);
|
|
@@ -17471,7 +17519,7 @@ function processLexicalScope2(unit, ops, savedView) {
|
|
|
17471
17519
|
}
|
|
17472
17520
|
}
|
|
17473
17521
|
|
|
17474
|
-
// bazel-out/
|
|
17522
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
|
|
17475
17523
|
var sanitizerFns = /* @__PURE__ */ new Map([
|
|
17476
17524
|
[SecurityContext.HTML, Identifiers.sanitizeHtml],
|
|
17477
17525
|
[SecurityContext.RESOURCE_URL, Identifiers.sanitizeResourceUrl],
|
|
@@ -17541,7 +17589,7 @@ function getOnlySecurityContext(securityContext) {
|
|
|
17541
17589
|
return securityContext;
|
|
17542
17590
|
}
|
|
17543
17591
|
|
|
17544
|
-
// bazel-out/
|
|
17592
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/transform_two_way_binding_set.mjs
|
|
17545
17593
|
function transformTwoWayBindingSet(job) {
|
|
17546
17594
|
for (const unit of job.units) {
|
|
17547
17595
|
for (const op of unit.create) {
|
|
@@ -17591,7 +17639,7 @@ function wrapAction(target, value) {
|
|
|
17591
17639
|
throw new Error(`Unsupported expression in two-way action binding.`);
|
|
17592
17640
|
}
|
|
17593
17641
|
|
|
17594
|
-
// bazel-out/
|
|
17642
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
|
|
17595
17643
|
function saveAndRestoreView(job) {
|
|
17596
17644
|
for (const unit of job.units) {
|
|
17597
17645
|
unit.create.prepend([
|
|
@@ -17636,7 +17684,7 @@ function addSaveRestoreViewOperationToListener(unit, op) {
|
|
|
17636
17684
|
}
|
|
17637
17685
|
}
|
|
17638
17686
|
|
|
17639
|
-
// bazel-out/
|
|
17687
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
|
|
17640
17688
|
function allocateSlots(job) {
|
|
17641
17689
|
const slotMap = /* @__PURE__ */ new Map();
|
|
17642
17690
|
for (const unit of job.units) {
|
|
@@ -17661,7 +17709,7 @@ function allocateSlots(job) {
|
|
|
17661
17709
|
}
|
|
17662
17710
|
}
|
|
17663
17711
|
|
|
17664
|
-
// bazel-out/
|
|
17712
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
|
|
17665
17713
|
function specializeStyleBindings(job) {
|
|
17666
17714
|
for (const unit of job.units) {
|
|
17667
17715
|
for (const op of unit.update) {
|
|
@@ -17691,7 +17739,7 @@ function specializeStyleBindings(job) {
|
|
|
17691
17739
|
}
|
|
17692
17740
|
}
|
|
17693
17741
|
|
|
17694
|
-
// bazel-out/
|
|
17742
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
|
|
17695
17743
|
function generateTemporaryVariables(job) {
|
|
17696
17744
|
for (const unit of job.units) {
|
|
17697
17745
|
unit.create.prepend(generateTemporaries(unit.create));
|
|
@@ -17749,7 +17797,7 @@ function assignName(names, expr) {
|
|
|
17749
17797
|
expr.name = name;
|
|
17750
17798
|
}
|
|
17751
17799
|
|
|
17752
|
-
// bazel-out/
|
|
17800
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_generation.mjs
|
|
17753
17801
|
function generateTrackFns(job) {
|
|
17754
17802
|
for (const unit of job.units) {
|
|
17755
17803
|
for (const op of unit.create) {
|
|
@@ -17782,7 +17830,7 @@ function generateTrackFns(job) {
|
|
|
17782
17830
|
}
|
|
17783
17831
|
}
|
|
17784
17832
|
|
|
17785
|
-
// bazel-out/
|
|
17833
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_optimization.mjs
|
|
17786
17834
|
function optimizeTrackFns(job) {
|
|
17787
17835
|
for (const unit of job.units) {
|
|
17788
17836
|
for (const op of unit.create) {
|
|
@@ -17794,6 +17842,7 @@ function optimizeTrackFns(job) {
|
|
|
17794
17842
|
} else if (op.track instanceof ReadVarExpr && op.track.name === "$item") {
|
|
17795
17843
|
op.trackByFn = importExpr(Identifiers.repeaterTrackByIdentity);
|
|
17796
17844
|
} else if (isTrackByFunctionCall(job.root.xref, op.track)) {
|
|
17845
|
+
op.usesComponentInstance = true;
|
|
17797
17846
|
if (op.track.receiver.receiver.view === unit.xref) {
|
|
17798
17847
|
op.trackByFn = op.track.receiver;
|
|
17799
17848
|
} else {
|
|
@@ -17829,7 +17878,7 @@ function isTrackByFunctionCall(rootView, expr) {
|
|
|
17829
17878
|
return true;
|
|
17830
17879
|
}
|
|
17831
17880
|
|
|
17832
|
-
// bazel-out/
|
|
17881
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_variables.mjs
|
|
17833
17882
|
function generateTrackVariables(job) {
|
|
17834
17883
|
for (const unit of job.units) {
|
|
17835
17884
|
for (const op of unit.create) {
|
|
@@ -17838,7 +17887,7 @@ function generateTrackVariables(job) {
|
|
|
17838
17887
|
}
|
|
17839
17888
|
op.track = transformExpressionsInExpression(op.track, (expr) => {
|
|
17840
17889
|
if (expr instanceof LexicalReadExpr) {
|
|
17841
|
-
if (
|
|
17890
|
+
if (op.varNames.$index.has(expr.name)) {
|
|
17842
17891
|
return variable("$index");
|
|
17843
17892
|
} else if (expr.name === op.varNames.$implicit) {
|
|
17844
17893
|
return variable("$item");
|
|
@@ -17850,7 +17899,7 @@ function generateTrackVariables(job) {
|
|
|
17850
17899
|
}
|
|
17851
17900
|
}
|
|
17852
17901
|
|
|
17853
|
-
// bazel-out/
|
|
17902
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
|
|
17854
17903
|
function countVariables(job) {
|
|
17855
17904
|
for (const unit of job.units) {
|
|
17856
17905
|
let varCount = 0;
|
|
@@ -17960,7 +18009,7 @@ function isSingletonInterpolation(expr) {
|
|
|
17960
18009
|
return true;
|
|
17961
18010
|
}
|
|
17962
18011
|
|
|
17963
|
-
// bazel-out/
|
|
18012
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
|
|
17964
18013
|
function optimizeVariables(job) {
|
|
17965
18014
|
for (const unit of job.units) {
|
|
17966
18015
|
inlineAlwaysInlineVariables(unit.create);
|
|
@@ -18209,7 +18258,7 @@ function allowConservativeInlining(decl, target) {
|
|
|
18209
18258
|
}
|
|
18210
18259
|
}
|
|
18211
18260
|
|
|
18212
|
-
// bazel-out/
|
|
18261
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/wrap_icus.mjs
|
|
18213
18262
|
function wrapI18nIcus(job) {
|
|
18214
18263
|
for (const unit of job.units) {
|
|
18215
18264
|
let currentI18nOp = null;
|
|
@@ -18239,7 +18288,7 @@ function wrapI18nIcus(job) {
|
|
|
18239
18288
|
}
|
|
18240
18289
|
}
|
|
18241
18290
|
|
|
18242
|
-
// bazel-out/
|
|
18291
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
|
|
18243
18292
|
var phases = [
|
|
18244
18293
|
{ kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },
|
|
18245
18294
|
{ kind: CompilationJobKind.Host, fn: parseHostStyleProperties },
|
|
@@ -18405,7 +18454,7 @@ function emitHostBindingFunction(job) {
|
|
|
18405
18454
|
);
|
|
18406
18455
|
}
|
|
18407
18456
|
|
|
18408
|
-
// bazel-out/
|
|
18457
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
|
|
18409
18458
|
var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
|
|
18410
18459
|
var domSchema = new DomElementSchemaRegistry();
|
|
18411
18460
|
var NG_TEMPLATE_TAG_NAME = "ng-template";
|
|
@@ -18555,10 +18604,17 @@ function ingestTemplate(unit, tmpl) {
|
|
|
18555
18604
|
}
|
|
18556
18605
|
}
|
|
18557
18606
|
function ingestContent(unit, content) {
|
|
18607
|
+
var _a2;
|
|
18558
18608
|
if (content.i18n !== void 0 && !(content.i18n instanceof TagPlaceholder)) {
|
|
18559
18609
|
throw Error(`Unhandled i18n metadata type for element: ${content.i18n.constructor.name}`);
|
|
18560
18610
|
}
|
|
18561
|
-
const
|
|
18611
|
+
const id = unit.job.allocateXrefId();
|
|
18612
|
+
let fallbackView = null;
|
|
18613
|
+
if (content.children.some((child) => !(child instanceof Comment) && (!(child instanceof Text) || child.value.trim().length > 0))) {
|
|
18614
|
+
fallbackView = unit.job.allocateView(unit.xref);
|
|
18615
|
+
ingestNodes(fallbackView, content.children);
|
|
18616
|
+
}
|
|
18617
|
+
const op = createProjectionOp(id, content.selector, content.i18n, (_a2 = fallbackView == null ? void 0 : fallbackView.xref) != null ? _a2 : null, content.sourceSpan);
|
|
18562
18618
|
for (const attr of content.attributes) {
|
|
18563
18619
|
const securityContext = domSchema.securityContext(content.name, attr.name, true);
|
|
18564
18620
|
unit.update.push(createBindingOp(op.xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
|
|
@@ -18597,10 +18653,7 @@ function ingestIfBlock(unit, ifBlock) {
|
|
|
18597
18653
|
for (let i = 0; i < ifBlock.branches.length; i++) {
|
|
18598
18654
|
const ifCase = ifBlock.branches[i];
|
|
18599
18655
|
const cView = unit.job.allocateView(unit.xref);
|
|
18600
|
-
|
|
18601
|
-
if (i === 0) {
|
|
18602
|
-
tagName = ingestControlFlowInsertionPoint(unit, cView.xref, ifCase);
|
|
18603
|
-
}
|
|
18656
|
+
const tagName = ingestControlFlowInsertionPoint(unit, cView.xref, ifCase);
|
|
18604
18657
|
if (ifCase.expressionAlias !== null) {
|
|
18605
18658
|
cView.contextVariables.set(ifCase.expressionAlias.name, CTX_REF);
|
|
18606
18659
|
}
|
|
@@ -18635,6 +18688,7 @@ function ingestSwitchBlock(unit, switchBlock) {
|
|
|
18635
18688
|
let conditions = [];
|
|
18636
18689
|
for (const switchCase of switchBlock.cases) {
|
|
18637
18690
|
const cView = unit.job.allocateView(unit.xref);
|
|
18691
|
+
const tagName = ingestControlFlowInsertionPoint(unit, cView.xref, switchCase);
|
|
18638
18692
|
let switchCaseI18nMeta = void 0;
|
|
18639
18693
|
if (switchCase.i18n !== void 0) {
|
|
18640
18694
|
if (!(switchCase.i18n instanceof BlockPlaceholder)) {
|
|
@@ -18642,7 +18696,7 @@ function ingestSwitchBlock(unit, switchBlock) {
|
|
|
18642
18696
|
}
|
|
18643
18697
|
switchCaseI18nMeta = switchCase.i18n;
|
|
18644
18698
|
}
|
|
18645
|
-
const templateOp = createTemplateOp(cView.xref, TemplateKind.Block,
|
|
18699
|
+
const templateOp = createTemplateOp(cView.xref, TemplateKind.Block, tagName, "Case", Namespace.HTML, switchCaseI18nMeta, switchCase.startSourceSpan, switchCase.sourceSpan);
|
|
18646
18700
|
unit.create.push(templateOp);
|
|
18647
18701
|
if (firstXref === null) {
|
|
18648
18702
|
firstXref = cView.xref;
|
|
@@ -18776,37 +18830,27 @@ function ingestIcu(unit, icu) {
|
|
|
18776
18830
|
function ingestForBlock(unit, forBlock) {
|
|
18777
18831
|
var _a2, _b2, _c2;
|
|
18778
18832
|
const repeaterView = unit.job.allocateView(unit.xref);
|
|
18833
|
+
const indexName = `\u0275$index_${repeaterView.xref}`;
|
|
18834
|
+
const countName = `\u0275$count_${repeaterView.xref}`;
|
|
18835
|
+
const indexVarNames = /* @__PURE__ */ new Set();
|
|
18779
18836
|
repeaterView.contextVariables.set(forBlock.item.name, forBlock.item.value);
|
|
18780
|
-
|
|
18781
|
-
|
|
18782
|
-
|
|
18783
|
-
|
|
18784
|
-
|
|
18785
|
-
|
|
18786
|
-
|
|
18787
|
-
|
|
18788
|
-
|
|
18789
|
-
|
|
18790
|
-
|
|
18791
|
-
|
|
18792
|
-
|
|
18793
|
-
|
|
18794
|
-
|
|
18795
|
-
|
|
18796
|
-
|
|
18797
|
-
});
|
|
18798
|
-
repeaterView.aliases.add({
|
|
18799
|
-
kind: SemanticVariableKind.Alias,
|
|
18800
|
-
name: null,
|
|
18801
|
-
identifier: forBlock.contextVariables.$even.name,
|
|
18802
|
-
expression: new LexicalReadExpr(indexName).modulo(literal(2)).identical(literal(0))
|
|
18803
|
-
});
|
|
18804
|
-
repeaterView.aliases.add({
|
|
18805
|
-
kind: SemanticVariableKind.Alias,
|
|
18806
|
-
name: null,
|
|
18807
|
-
identifier: forBlock.contextVariables.$odd.name,
|
|
18808
|
-
expression: new LexicalReadExpr(indexName).modulo(literal(2)).notIdentical(literal(0))
|
|
18809
|
-
});
|
|
18837
|
+
for (const variable2 of forBlock.contextVariables) {
|
|
18838
|
+
if (variable2.value === "$index") {
|
|
18839
|
+
indexVarNames.add(variable2.name);
|
|
18840
|
+
}
|
|
18841
|
+
if (variable2.name === "$index") {
|
|
18842
|
+
repeaterView.contextVariables.set("$index", variable2.value).set(indexName, variable2.value);
|
|
18843
|
+
} else if (variable2.name === "$count") {
|
|
18844
|
+
repeaterView.contextVariables.set("$count", variable2.value).set(countName, variable2.value);
|
|
18845
|
+
} else {
|
|
18846
|
+
repeaterView.aliases.add({
|
|
18847
|
+
kind: SemanticVariableKind.Alias,
|
|
18848
|
+
name: null,
|
|
18849
|
+
identifier: variable2.name,
|
|
18850
|
+
expression: getComputedForLoopVariableExpression(variable2, indexName, countName)
|
|
18851
|
+
});
|
|
18852
|
+
}
|
|
18853
|
+
}
|
|
18810
18854
|
const sourceSpan = convertSourceSpan(forBlock.trackBy.span, forBlock.sourceSpan);
|
|
18811
18855
|
const track = convertAst(forBlock.trackBy, unit.job, sourceSpan);
|
|
18812
18856
|
ingestNodes(repeaterView, forBlock.children);
|
|
@@ -18818,12 +18862,7 @@ function ingestForBlock(unit, forBlock) {
|
|
|
18818
18862
|
emptyTagName = ingestControlFlowInsertionPoint(unit, emptyView.xref, forBlock.empty);
|
|
18819
18863
|
}
|
|
18820
18864
|
const varNames = {
|
|
18821
|
-
$index:
|
|
18822
|
-
$count: forBlock.contextVariables.$count.name,
|
|
18823
|
-
$first: forBlock.contextVariables.$first.name,
|
|
18824
|
-
$last: forBlock.contextVariables.$last.name,
|
|
18825
|
-
$even: forBlock.contextVariables.$even.name,
|
|
18826
|
-
$odd: forBlock.contextVariables.$odd.name,
|
|
18865
|
+
$index: indexVarNames,
|
|
18827
18866
|
$implicit: forBlock.item.name
|
|
18828
18867
|
};
|
|
18829
18868
|
if (forBlock.i18n !== void 0 && !(forBlock.i18n instanceof BlockPlaceholder)) {
|
|
@@ -18841,6 +18880,24 @@ function ingestForBlock(unit, forBlock) {
|
|
|
18841
18880
|
const repeater2 = createRepeaterOp(repeaterCreate2.xref, repeaterCreate2.handle, expression, forBlock.sourceSpan);
|
|
18842
18881
|
unit.update.push(repeater2);
|
|
18843
18882
|
}
|
|
18883
|
+
function getComputedForLoopVariableExpression(variable2, indexName, countName) {
|
|
18884
|
+
switch (variable2.value) {
|
|
18885
|
+
case "$index":
|
|
18886
|
+
return new LexicalReadExpr(indexName);
|
|
18887
|
+
case "$count":
|
|
18888
|
+
return new LexicalReadExpr(countName);
|
|
18889
|
+
case "$first":
|
|
18890
|
+
return new LexicalReadExpr(indexName).identical(literal(0));
|
|
18891
|
+
case "$last":
|
|
18892
|
+
return new LexicalReadExpr(indexName).identical(new LexicalReadExpr(countName).minus(literal(1)));
|
|
18893
|
+
case "$even":
|
|
18894
|
+
return new LexicalReadExpr(indexName).modulo(literal(2)).identical(literal(0));
|
|
18895
|
+
case "$odd":
|
|
18896
|
+
return new LexicalReadExpr(indexName).modulo(literal(2)).notIdentical(literal(0));
|
|
18897
|
+
default:
|
|
18898
|
+
throw new Error(`AssertionError: unknown @for loop variable ${variable2.value}`);
|
|
18899
|
+
}
|
|
18900
|
+
}
|
|
18844
18901
|
function convertAst(ast, job, baseSourceSpan) {
|
|
18845
18902
|
if (ast instanceof ASTWithSource) {
|
|
18846
18903
|
return convertAst(ast.ast, job, baseSourceSpan);
|
|
@@ -19142,7 +19199,7 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
19142
19199
|
return null;
|
|
19143
19200
|
}
|
|
19144
19201
|
|
|
19145
|
-
// bazel-out/
|
|
19202
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/query_generation.mjs
|
|
19146
19203
|
function renderFlagCheckIfStmt(flags, statements) {
|
|
19147
19204
|
return ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(flags), null, false), statements);
|
|
19148
19205
|
}
|
|
@@ -19262,7 +19319,7 @@ function createContentQueriesFunction(queries, constantPool, name) {
|
|
|
19262
19319
|
], INFERRED_TYPE, null, contentQueriesFnName);
|
|
19263
19320
|
}
|
|
19264
19321
|
|
|
19265
|
-
// bazel-out/
|
|
19322
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
19266
19323
|
var HtmlParser = class extends Parser2 {
|
|
19267
19324
|
constructor() {
|
|
19268
19325
|
super(getHtmlTagDefinition);
|
|
@@ -19272,7 +19329,7 @@ var HtmlParser = class extends Parser2 {
|
|
|
19272
19329
|
}
|
|
19273
19330
|
};
|
|
19274
19331
|
|
|
19275
|
-
// bazel-out/
|
|
19332
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
19276
19333
|
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
19277
19334
|
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
19278
19335
|
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
@@ -19338,7 +19395,7 @@ function visitAllWithSiblings(visitor, nodes) {
|
|
|
19338
19395
|
return result;
|
|
19339
19396
|
}
|
|
19340
19397
|
|
|
19341
|
-
// bazel-out/
|
|
19398
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
19342
19399
|
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
19343
19400
|
var ATTRIBUTE_PREFIX = "attr";
|
|
19344
19401
|
var CLASS_PREFIX = "class";
|
|
@@ -19679,7 +19736,7 @@ function moveParseSourceSpan(sourceSpan, absoluteSpan) {
|
|
|
19679
19736
|
return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);
|
|
19680
19737
|
}
|
|
19681
19738
|
|
|
19682
|
-
// bazel-out/
|
|
19739
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
|
|
19683
19740
|
function isStyleUrlResolvable(url) {
|
|
19684
19741
|
if (url == null || url.length === 0 || url[0] == "/")
|
|
19685
19742
|
return false;
|
|
@@ -19688,7 +19745,7 @@ function isStyleUrlResolvable(url) {
|
|
|
19688
19745
|
}
|
|
19689
19746
|
var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
|
|
19690
19747
|
|
|
19691
|
-
// bazel-out/
|
|
19748
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
|
|
19692
19749
|
var NG_CONTENT_SELECT_ATTR = "select";
|
|
19693
19750
|
var LINK_ELEMENT = "link";
|
|
19694
19751
|
var LINK_STYLE_REL_ATTR = "rel";
|
|
@@ -19758,7 +19815,7 @@ function normalizeNgContentSelect(selectAttr) {
|
|
|
19758
19815
|
return selectAttr;
|
|
19759
19816
|
}
|
|
19760
19817
|
|
|
19761
|
-
// bazel-out/
|
|
19818
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
|
|
19762
19819
|
var FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/;
|
|
19763
19820
|
var FOR_LOOP_TRACK_PATTERN = /^track\s+([\S\s]*)/;
|
|
19764
19821
|
var CONDITIONAL_ALIAS_PATTERN = /^(as\s)+(.*)/;
|
|
@@ -19876,19 +19933,25 @@ function parseForLoopParameters(block, errors, bindingParser) {
|
|
|
19876
19933
|
return null;
|
|
19877
19934
|
}
|
|
19878
19935
|
const [, itemName, rawExpression] = match;
|
|
19936
|
+
if (ALLOWED_FOR_LOOP_LET_VARIABLES.has(itemName)) {
|
|
19937
|
+
errors.push(new ParseError(expressionParam.sourceSpan, `@for loop item name cannot be one of ${Array.from(ALLOWED_FOR_LOOP_LET_VARIABLES).join(", ")}.`));
|
|
19938
|
+
}
|
|
19879
19939
|
const variableName = expressionParam.expression.split(" ")[0];
|
|
19880
19940
|
const variableSpan = new ParseSourceSpan(expressionParam.sourceSpan.start, expressionParam.sourceSpan.start.moveBy(variableName.length));
|
|
19881
19941
|
const result = {
|
|
19882
19942
|
itemName: new Variable(itemName, "$implicit", variableSpan, variableSpan),
|
|
19883
19943
|
trackBy: null,
|
|
19884
19944
|
expression: parseBlockParameterToBinding(expressionParam, bindingParser, rawExpression),
|
|
19885
|
-
context: {
|
|
19945
|
+
context: Array.from(ALLOWED_FOR_LOOP_LET_VARIABLES, (variableName2) => {
|
|
19946
|
+
const emptySpanAfterForBlockStart = new ParseSourceSpan(block.startSourceSpan.end, block.startSourceSpan.end);
|
|
19947
|
+
return new Variable(variableName2, variableName2, emptySpanAfterForBlockStart, emptySpanAfterForBlockStart);
|
|
19948
|
+
})
|
|
19886
19949
|
};
|
|
19887
19950
|
for (const param of secondaryParams) {
|
|
19888
19951
|
const letMatch = param.expression.match(FOR_LOOP_LET_PATTERN);
|
|
19889
19952
|
if (letMatch !== null) {
|
|
19890
19953
|
const variablesSpan = new ParseSourceSpan(param.sourceSpan.start.moveBy(letMatch[0].length - letMatch[1].length), param.sourceSpan.end);
|
|
19891
|
-
parseLetParameter(param.sourceSpan, letMatch[1], variablesSpan, result.context, errors);
|
|
19954
|
+
parseLetParameter(param.sourceSpan, letMatch[1], variablesSpan, itemName, result.context, errors);
|
|
19892
19955
|
continue;
|
|
19893
19956
|
}
|
|
19894
19957
|
const trackMatch = param.expression.match(FOR_LOOP_TRACK_PATTERN);
|
|
@@ -19907,15 +19970,9 @@ function parseForLoopParameters(block, errors, bindingParser) {
|
|
|
19907
19970
|
}
|
|
19908
19971
|
errors.push(new ParseError(param.sourceSpan, `Unrecognized @for loop paramater "${param.expression}"`));
|
|
19909
19972
|
}
|
|
19910
|
-
for (const variableName2 of ALLOWED_FOR_LOOP_LET_VARIABLES) {
|
|
19911
|
-
if (!result.context.hasOwnProperty(variableName2)) {
|
|
19912
|
-
const emptySpanAfterForBlockStart = new ParseSourceSpan(block.startSourceSpan.end, block.startSourceSpan.end);
|
|
19913
|
-
result.context[variableName2] = new Variable(variableName2, variableName2, emptySpanAfterForBlockStart, emptySpanAfterForBlockStart);
|
|
19914
|
-
}
|
|
19915
|
-
}
|
|
19916
19973
|
return result;
|
|
19917
19974
|
}
|
|
19918
|
-
function parseLetParameter(sourceSpan, expression, span, context, errors) {
|
|
19975
|
+
function parseLetParameter(sourceSpan, expression, span, loopItemName, context, errors) {
|
|
19919
19976
|
var _a2, _b2, _c2;
|
|
19920
19977
|
const parts = expression.split(",");
|
|
19921
19978
|
let startSpan = span.start;
|
|
@@ -19927,7 +19984,9 @@ function parseLetParameter(sourceSpan, expression, span, context, errors) {
|
|
|
19927
19984
|
errors.push(new ParseError(sourceSpan, `Invalid @for loop "let" parameter. Parameter should match the pattern "<name> = <variable name>"`));
|
|
19928
19985
|
} else if (!ALLOWED_FOR_LOOP_LET_VARIABLES.has(variableName)) {
|
|
19929
19986
|
errors.push(new ParseError(sourceSpan, `Unknown "let" parameter variable "${variableName}". The allowed variables are: ${Array.from(ALLOWED_FOR_LOOP_LET_VARIABLES).join(", ")}`));
|
|
19930
|
-
} else if (
|
|
19987
|
+
} else if (name === loopItemName) {
|
|
19988
|
+
errors.push(new ParseError(sourceSpan, `Invalid @for loop "let" parameter. Variable cannot be called "${loopItemName}"`));
|
|
19989
|
+
} else if (context.some((v) => v.name === name)) {
|
|
19931
19990
|
errors.push(new ParseError(sourceSpan, `Duplicate "let" parameter variable "${variableName}"`));
|
|
19932
19991
|
} else {
|
|
19933
19992
|
const [, keyLeadingWhitespace, keyName] = (_a2 = expressionParts[0].match(CHARACTERS_IN_SURROUNDING_WHITESPACE_PATTERN)) != null ? _a2 : [];
|
|
@@ -19941,7 +20000,7 @@ function parseLetParameter(sourceSpan, expression, span, context, errors) {
|
|
|
19941
20000
|
valueSpan = valueLeadingWhitespace !== void 0 ? new ParseSourceSpan(startSpan.moveBy(expressionParts[0].length + 1 + valueLeadingWhitespace.length), startSpan.moveBy(expressionParts[0].length + 1 + valueLeadingWhitespace.length + implicit.length)) : void 0;
|
|
19942
20001
|
}
|
|
19943
20002
|
const sourceSpan2 = new ParseSourceSpan(keySpan.start, (_c2 = valueSpan == null ? void 0 : valueSpan.end) != null ? _c2 : keySpan.end);
|
|
19944
|
-
context
|
|
20003
|
+
context.push(new Variable(name, variableName, sourceSpan2, keySpan, valueSpan));
|
|
19945
20004
|
}
|
|
19946
20005
|
startSpan = startSpan.moveBy(part.length + 1);
|
|
19947
20006
|
}
|
|
@@ -20072,7 +20131,7 @@ function stripOptionalParentheses(param, errors) {
|
|
|
20072
20131
|
return expression.slice(start, end);
|
|
20073
20132
|
}
|
|
20074
20133
|
|
|
20075
|
-
// bazel-out/
|
|
20134
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
|
|
20076
20135
|
var TIME_PATTERN = /^\d+\.?\d*(ms|s)?$/;
|
|
20077
20136
|
var SEPARATOR_PATTERN = /^\s$/;
|
|
20078
20137
|
var COMMA_DELIMITED_SYNTAX = /* @__PURE__ */ new Map([
|
|
@@ -20336,7 +20395,7 @@ function parseDeferredTime(value) {
|
|
|
20336
20395
|
return parseFloat(time) * (units === "s" ? 1e3 : 1);
|
|
20337
20396
|
}
|
|
20338
20397
|
|
|
20339
|
-
// bazel-out/
|
|
20398
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
|
|
20340
20399
|
var PREFETCH_WHEN_PATTERN = /^prefetch\s+when\s/;
|
|
20341
20400
|
var PREFETCH_ON_PATTERN = /^prefetch\s+on\s/;
|
|
20342
20401
|
var MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
|
|
@@ -20471,7 +20530,7 @@ function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
|
20471
20530
|
return { triggers, prefetchTriggers };
|
|
20472
20531
|
}
|
|
20473
20532
|
|
|
20474
|
-
// bazel-out/
|
|
20533
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
|
|
20475
20534
|
var BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;
|
|
20476
20535
|
var KW_BIND_IDX = 1;
|
|
20477
20536
|
var KW_LET_IDX = 2;
|
|
@@ -20579,12 +20638,9 @@ var HtmlAstToIvyAst = class {
|
|
|
20579
20638
|
}
|
|
20580
20639
|
let parsedElement;
|
|
20581
20640
|
if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {
|
|
20582
|
-
if (element2.children && !element2.children.every((node) => isEmptyTextNode(node) || isCommentNode(node))) {
|
|
20583
|
-
this.reportError(`<ng-content> element cannot have content.`, element2.sourceSpan);
|
|
20584
|
-
}
|
|
20585
20641
|
const selector = preparsedElement.selectAttr;
|
|
20586
20642
|
const attrs = element2.attrs.map((attr) => this.visitAttribute(attr));
|
|
20587
|
-
parsedElement = new Content(selector, attrs, element2.sourceSpan, element2.i18n);
|
|
20643
|
+
parsedElement = new Content(selector, attrs, children, element2.sourceSpan, element2.i18n);
|
|
20588
20644
|
this.ngContentSelectors.push(selector);
|
|
20589
20645
|
} else if (isTemplateElement) {
|
|
20590
20646
|
const attrs = this.extractAttributes(element2.name, parsedProperties, i18nAttrsMeta);
|
|
@@ -20888,12 +20944,6 @@ function normalizeAttributeName(attrName) {
|
|
|
20888
20944
|
function addEvents(events, boundEvents) {
|
|
20889
20945
|
boundEvents.push(...events.map((e) => BoundEvent.fromParsedEvent(e)));
|
|
20890
20946
|
}
|
|
20891
|
-
function isEmptyTextNode(node) {
|
|
20892
|
-
return node instanceof Text4 && node.value.trim().length == 0;
|
|
20893
|
-
}
|
|
20894
|
-
function isCommentNode(node) {
|
|
20895
|
-
return node instanceof Comment2;
|
|
20896
|
-
}
|
|
20897
20947
|
function textContents(node) {
|
|
20898
20948
|
if (node.children.length !== 1 || !(node.children[0] instanceof Text4)) {
|
|
20899
20949
|
return null;
|
|
@@ -20902,7 +20952,7 @@ function textContents(node) {
|
|
|
20902
20952
|
}
|
|
20903
20953
|
}
|
|
20904
20954
|
|
|
20905
|
-
// bazel-out/
|
|
20955
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
|
|
20906
20956
|
var LEADING_TRIVIA_CHARS = [" ", "\n", "\r", " "];
|
|
20907
20957
|
function parseTemplate(template2, templateUrl, options = {}) {
|
|
20908
20958
|
var _a2;
|
|
@@ -20976,7 +21026,7 @@ function makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
|
|
|
20976
21026
|
return new BindingParser(new Parser(new Lexer()), interpolationConfig, elementRegistry, []);
|
|
20977
21027
|
}
|
|
20978
21028
|
|
|
20979
|
-
// bazel-out/
|
|
21029
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
|
|
20980
21030
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
20981
21031
|
var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
|
|
20982
21032
|
var CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;
|
|
@@ -21070,7 +21120,7 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
21070
21120
|
let allDeferrableDepsFn = null;
|
|
21071
21121
|
if (meta.defer.mode === 1 && meta.defer.dependenciesFn !== null) {
|
|
21072
21122
|
const fnName = `${templateTypeName}_DeferFn`;
|
|
21073
|
-
constantPool.statements.push(meta.defer.dependenciesFn
|
|
21123
|
+
constantPool.statements.push(new DeclareVarStmt(fnName, meta.defer.dependenciesFn, void 0, StmtModifier.Final));
|
|
21074
21124
|
allDeferrableDepsFn = variable(fnName);
|
|
21075
21125
|
}
|
|
21076
21126
|
const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.defer, allDeferrableDepsFn);
|
|
@@ -21338,7 +21388,7 @@ function createHostDirectivesMappingArray(mapping) {
|
|
|
21338
21388
|
return elements.length > 0 ? literalArr(elements) : null;
|
|
21339
21389
|
}
|
|
21340
21390
|
|
|
21341
|
-
// bazel-out/
|
|
21391
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
|
|
21342
21392
|
var R3TargetBinder = class {
|
|
21343
21393
|
constructor(directiveMatcher) {
|
|
21344
21394
|
this.directiveMatcher = directiveMatcher;
|
|
@@ -21382,9 +21432,9 @@ var Scope2 = class {
|
|
|
21382
21432
|
nodeOrNodes.children.forEach((node) => node.visit(this));
|
|
21383
21433
|
} else if (nodeOrNodes instanceof ForLoopBlock) {
|
|
21384
21434
|
this.visitVariable(nodeOrNodes.item);
|
|
21385
|
-
|
|
21435
|
+
nodeOrNodes.contextVariables.forEach((v) => this.visitVariable(v));
|
|
21386
21436
|
nodeOrNodes.children.forEach((node) => node.visit(this));
|
|
21387
|
-
} else if (nodeOrNodes instanceof SwitchBlockCase || nodeOrNodes instanceof ForLoopBlockEmpty || nodeOrNodes instanceof DeferredBlock || nodeOrNodes instanceof DeferredBlockError || nodeOrNodes instanceof DeferredBlockPlaceholder || nodeOrNodes instanceof DeferredBlockLoading) {
|
|
21437
|
+
} else if (nodeOrNodes instanceof SwitchBlockCase || nodeOrNodes instanceof ForLoopBlockEmpty || nodeOrNodes instanceof DeferredBlock || nodeOrNodes instanceof DeferredBlockError || nodeOrNodes instanceof DeferredBlockPlaceholder || nodeOrNodes instanceof DeferredBlockLoading || nodeOrNodes instanceof Content) {
|
|
21388
21438
|
nodeOrNodes.children.forEach((node) => node.visit(this));
|
|
21389
21439
|
} else {
|
|
21390
21440
|
nodeOrNodes.forEach((node) => node.visit(this));
|
|
@@ -21442,6 +21492,7 @@ var Scope2 = class {
|
|
|
21442
21492
|
this.ingestScopedNode(block);
|
|
21443
21493
|
}
|
|
21444
21494
|
visitContent(content) {
|
|
21495
|
+
this.ingestScopedNode(content);
|
|
21445
21496
|
}
|
|
21446
21497
|
visitBoundAttribute(attr) {
|
|
21447
21498
|
}
|
|
@@ -21580,7 +21631,7 @@ var DirectiveBinder = class {
|
|
|
21580
21631
|
visitForLoopBlock(block) {
|
|
21581
21632
|
var _a2;
|
|
21582
21633
|
block.item.visit(this);
|
|
21583
|
-
|
|
21634
|
+
block.contextVariables.forEach((v) => v.visit(this));
|
|
21584
21635
|
block.children.forEach((node) => node.visit(this));
|
|
21585
21636
|
(_a2 = block.empty) == null ? void 0 : _a2.visit(this);
|
|
21586
21637
|
}
|
|
@@ -21596,6 +21647,7 @@ var DirectiveBinder = class {
|
|
|
21596
21647
|
block.children.forEach((node) => node.visit(this));
|
|
21597
21648
|
}
|
|
21598
21649
|
visitContent(content) {
|
|
21650
|
+
content.children.forEach((child) => child.visit(this));
|
|
21599
21651
|
}
|
|
21600
21652
|
visitVariable(variable2) {
|
|
21601
21653
|
}
|
|
@@ -21648,7 +21700,7 @@ var TemplateBinder = class extends RecursiveAstVisitor {
|
|
|
21648
21700
|
const usedPipes = /* @__PURE__ */ new Set();
|
|
21649
21701
|
const eagerPipes = /* @__PURE__ */ new Set();
|
|
21650
21702
|
const template2 = nodes instanceof Template ? nodes : null;
|
|
21651
|
-
const deferBlocks =
|
|
21703
|
+
const deferBlocks = [];
|
|
21652
21704
|
const binder = new TemplateBinder(expressions, symbols, usedPipes, eagerPipes, deferBlocks, nestingLevel, scope, template2, 0);
|
|
21653
21705
|
binder.ingest(nodes);
|
|
21654
21706
|
return { expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks };
|
|
@@ -21666,7 +21718,7 @@ var TemplateBinder = class extends RecursiveAstVisitor {
|
|
|
21666
21718
|
this.nestingLevel.set(nodeOrNodes, this.level);
|
|
21667
21719
|
} else if (nodeOrNodes instanceof ForLoopBlock) {
|
|
21668
21720
|
this.visitNode(nodeOrNodes.item);
|
|
21669
|
-
|
|
21721
|
+
nodeOrNodes.contextVariables.forEach((v) => this.visitNode(v));
|
|
21670
21722
|
nodeOrNodes.trackBy.visit(this);
|
|
21671
21723
|
nodeOrNodes.children.forEach(this.visitNode);
|
|
21672
21724
|
this.nestingLevel.set(nodeOrNodes, this.level);
|
|
@@ -21674,10 +21726,10 @@ var TemplateBinder = class extends RecursiveAstVisitor {
|
|
|
21674
21726
|
if (this.scope.rootNode !== nodeOrNodes) {
|
|
21675
21727
|
throw new Error(`Assertion error: resolved incorrect scope for deferred block ${nodeOrNodes}`);
|
|
21676
21728
|
}
|
|
21677
|
-
this.deferBlocks.
|
|
21729
|
+
this.deferBlocks.push([nodeOrNodes, this.scope]);
|
|
21678
21730
|
nodeOrNodes.children.forEach((node) => node.visit(this));
|
|
21679
21731
|
this.nestingLevel.set(nodeOrNodes, this.level);
|
|
21680
|
-
} else if (nodeOrNodes instanceof SwitchBlockCase || nodeOrNodes instanceof ForLoopBlockEmpty || nodeOrNodes instanceof DeferredBlockError || nodeOrNodes instanceof DeferredBlockPlaceholder || nodeOrNodes instanceof DeferredBlockLoading) {
|
|
21732
|
+
} else if (nodeOrNodes instanceof SwitchBlockCase || nodeOrNodes instanceof ForLoopBlockEmpty || nodeOrNodes instanceof DeferredBlockError || nodeOrNodes instanceof DeferredBlockPlaceholder || nodeOrNodes instanceof DeferredBlockLoading || nodeOrNodes instanceof Content) {
|
|
21681
21733
|
nodeOrNodes.children.forEach((node) => node.visit(this));
|
|
21682
21734
|
this.nestingLevel.set(nodeOrNodes, this.level);
|
|
21683
21735
|
} else {
|
|
@@ -21709,8 +21761,6 @@ var TemplateBinder = class extends RecursiveAstVisitor {
|
|
|
21709
21761
|
}
|
|
21710
21762
|
visitText(text2) {
|
|
21711
21763
|
}
|
|
21712
|
-
visitContent(content) {
|
|
21713
|
-
}
|
|
21714
21764
|
visitTextAttribute(attribute2) {
|
|
21715
21765
|
}
|
|
21716
21766
|
visitUnknownBlock(block) {
|
|
@@ -21771,6 +21821,9 @@ var TemplateBinder = class extends RecursiveAstVisitor {
|
|
|
21771
21821
|
(_a2 = block.expression) == null ? void 0 : _a2.visit(this);
|
|
21772
21822
|
this.ingestScopedNode(block);
|
|
21773
21823
|
}
|
|
21824
|
+
visitContent(content) {
|
|
21825
|
+
this.ingestScopedNode(content);
|
|
21826
|
+
}
|
|
21774
21827
|
visitBoundText(text2) {
|
|
21775
21828
|
text2.value.visit(this);
|
|
21776
21829
|
}
|
|
@@ -21809,7 +21862,7 @@ var TemplateBinder = class extends RecursiveAstVisitor {
|
|
|
21809
21862
|
}
|
|
21810
21863
|
};
|
|
21811
21864
|
var R3BoundTarget = class {
|
|
21812
|
-
constructor(target, directives, eagerDirectives, bindings, references, exprTargets, symbols, nestingLevel, scopedNodeEntities, usedPipes, eagerPipes,
|
|
21865
|
+
constructor(target, directives, eagerDirectives, bindings, references, exprTargets, symbols, nestingLevel, scopedNodeEntities, usedPipes, eagerPipes, rawDeferred) {
|
|
21813
21866
|
this.target = target;
|
|
21814
21867
|
this.directives = directives;
|
|
21815
21868
|
this.eagerDirectives = eagerDirectives;
|
|
@@ -21821,7 +21874,8 @@ var R3BoundTarget = class {
|
|
|
21821
21874
|
this.scopedNodeEntities = scopedNodeEntities;
|
|
21822
21875
|
this.usedPipes = usedPipes;
|
|
21823
21876
|
this.eagerPipes = eagerPipes;
|
|
21824
|
-
this.
|
|
21877
|
+
this.deferredBlocks = rawDeferred.map((current) => current[0]);
|
|
21878
|
+
this.deferredScopes = new Map(rawDeferred);
|
|
21825
21879
|
}
|
|
21826
21880
|
getEntitiesInScope(node) {
|
|
21827
21881
|
var _a2;
|
|
@@ -21861,7 +21915,7 @@ var R3BoundTarget = class {
|
|
|
21861
21915
|
return Array.from(this.eagerPipes);
|
|
21862
21916
|
}
|
|
21863
21917
|
getDeferBlocks() {
|
|
21864
|
-
return
|
|
21918
|
+
return this.deferredBlocks;
|
|
21865
21919
|
}
|
|
21866
21920
|
getDeferredTriggerTarget(block, trigger) {
|
|
21867
21921
|
if (!(trigger instanceof InteractionDeferredTrigger) && !(trigger instanceof ViewportDeferredTrigger) && !(trigger instanceof HoverDeferredTrigger)) {
|
|
@@ -21902,8 +21956,11 @@ var R3BoundTarget = class {
|
|
|
21902
21956
|
return null;
|
|
21903
21957
|
}
|
|
21904
21958
|
isDeferred(element2) {
|
|
21905
|
-
for (const
|
|
21906
|
-
|
|
21959
|
+
for (const block of this.deferredBlocks) {
|
|
21960
|
+
if (!this.deferredScopes.has(block)) {
|
|
21961
|
+
continue;
|
|
21962
|
+
}
|
|
21963
|
+
const stack = [this.deferredScopes.get(block)];
|
|
21907
21964
|
while (stack.length > 0) {
|
|
21908
21965
|
const current = stack.pop();
|
|
21909
21966
|
if (current.elementsInScope.has(element2)) {
|
|
@@ -21916,9 +21973,9 @@ var R3BoundTarget = class {
|
|
|
21916
21973
|
}
|
|
21917
21974
|
findEntityInScope(rootNode, name) {
|
|
21918
21975
|
const entities = this.getEntitiesInScope(rootNode);
|
|
21919
|
-
for (const
|
|
21920
|
-
if (
|
|
21921
|
-
return
|
|
21976
|
+
for (const entity of entities) {
|
|
21977
|
+
if (entity.name === name) {
|
|
21978
|
+
return entity;
|
|
21922
21979
|
}
|
|
21923
21980
|
}
|
|
21924
21981
|
return null;
|
|
@@ -21964,11 +22021,11 @@ function extractScopedNodeEntities(rootScope) {
|
|
|
21964
22021
|
return templateEntities;
|
|
21965
22022
|
}
|
|
21966
22023
|
|
|
21967
|
-
// bazel-out/
|
|
22024
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/resource_loader.mjs
|
|
21968
22025
|
var ResourceLoader = class {
|
|
21969
22026
|
};
|
|
21970
22027
|
|
|
21971
|
-
// bazel-out/
|
|
22028
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
|
|
21972
22029
|
var CompilerFacadeImpl = class {
|
|
21973
22030
|
constructor(jitEvaluator = new JitEvaluator()) {
|
|
21974
22031
|
this.jitEvaluator = jitEvaluator;
|
|
@@ -22084,7 +22141,7 @@ var CompilerFacadeImpl = class {
|
|
|
22084
22141
|
}
|
|
22085
22142
|
compileComponent(angularCoreEnv, sourceMapUrl, facade) {
|
|
22086
22143
|
var _a2;
|
|
22087
|
-
const { template: template2, interpolation, defer: defer2 } = parseJitTemplate(facade.template, facade.name, sourceMapUrl, facade.preserveWhitespaces, facade.interpolation);
|
|
22144
|
+
const { template: template2, interpolation, defer: defer2 } = parseJitTemplate(facade.template, facade.name, sourceMapUrl, facade.preserveWhitespaces, facade.interpolation, void 0);
|
|
22088
22145
|
const meta = __spreadProps(__spreadValues(__spreadValues({}, facade), convertDirectiveFacadeToMetadata(facade)), {
|
|
22089
22146
|
selector: facade.selector || this.elementSchemaRegistry.getDefaultComponentElementName(),
|
|
22090
22147
|
template: template2,
|
|
@@ -22273,7 +22330,7 @@ function convertOpaqueValuesToExpressions(obj) {
|
|
|
22273
22330
|
}
|
|
22274
22331
|
function convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMapUrl) {
|
|
22275
22332
|
var _a2, _b2, _c2, _d2;
|
|
22276
|
-
const { template: template2, interpolation, defer: defer2 } = parseJitTemplate(decl.template, decl.type.name, sourceMapUrl, (_a2 = decl.preserveWhitespaces) != null ? _a2 : false, decl.interpolation);
|
|
22333
|
+
const { template: template2, interpolation, defer: defer2 } = parseJitTemplate(decl.template, decl.type.name, sourceMapUrl, (_a2 = decl.preserveWhitespaces) != null ? _a2 : false, decl.interpolation, decl.deferBlockDependencies);
|
|
22277
22334
|
const declarations = [];
|
|
22278
22335
|
if (decl.dependencies) {
|
|
22279
22336
|
for (const innerDep of decl.dependencies) {
|
|
@@ -22343,7 +22400,7 @@ function convertPipeDeclarationToMetadata(pipe2) {
|
|
|
22343
22400
|
type: new WrappedNodeExpr(pipe2.type)
|
|
22344
22401
|
};
|
|
22345
22402
|
}
|
|
22346
|
-
function parseJitTemplate(template2, typeName, sourceMapUrl, preserveWhitespaces, interpolation) {
|
|
22403
|
+
function parseJitTemplate(template2, typeName, sourceMapUrl, preserveWhitespaces, interpolation, deferBlockDependencies) {
|
|
22347
22404
|
const interpolationConfig = interpolation ? InterpolationConfig.fromArray(interpolation) : DEFAULT_INTERPOLATION_CONFIG;
|
|
22348
22405
|
const parsed = parseTemplate(template2, sourceMapUrl, { preserveWhitespaces, interpolationConfig });
|
|
22349
22406
|
if (parsed.errors !== null) {
|
|
@@ -22355,7 +22412,7 @@ function parseJitTemplate(template2, typeName, sourceMapUrl, preserveWhitespaces
|
|
|
22355
22412
|
return {
|
|
22356
22413
|
template: parsed,
|
|
22357
22414
|
interpolation: interpolationConfig,
|
|
22358
|
-
defer: createR3ComponentDeferMetadata(boundTarget)
|
|
22415
|
+
defer: createR3ComponentDeferMetadata(boundTarget, deferBlockDependencies)
|
|
22359
22416
|
};
|
|
22360
22417
|
}
|
|
22361
22418
|
function convertToProviderExpression(obj, property2) {
|
|
@@ -22395,11 +22452,12 @@ function createR3DependencyMetadata(token, isAttributeDep, host, optional, self,
|
|
|
22395
22452
|
const attributeNameType = isAttributeDep ? literal("unknown") : null;
|
|
22396
22453
|
return { token, attributeNameType, host, optional, self, skipSelf };
|
|
22397
22454
|
}
|
|
22398
|
-
function createR3ComponentDeferMetadata(boundTarget) {
|
|
22455
|
+
function createR3ComponentDeferMetadata(boundTarget, deferBlockDependencies) {
|
|
22399
22456
|
const deferredBlocks = boundTarget.getDeferBlocks();
|
|
22400
22457
|
const blocks = /* @__PURE__ */ new Map();
|
|
22401
|
-
for (
|
|
22402
|
-
|
|
22458
|
+
for (let i = 0; i < deferredBlocks.length; i++) {
|
|
22459
|
+
const dependencyFn = deferBlockDependencies == null ? void 0 : deferBlockDependencies[i];
|
|
22460
|
+
blocks.set(deferredBlocks[i], dependencyFn ? new WrappedNodeExpr(dependencyFn) : null);
|
|
22403
22461
|
}
|
|
22404
22462
|
return { mode: 0, blocks };
|
|
22405
22463
|
}
|
|
@@ -22528,17 +22586,17 @@ function publishFacade(global) {
|
|
|
22528
22586
|
ng.\u0275compilerFacade = new CompilerFacadeImpl();
|
|
22529
22587
|
}
|
|
22530
22588
|
|
|
22531
|
-
// bazel-out/
|
|
22532
|
-
var VERSION2 = new Version("18.0.0-next.
|
|
22589
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
|
|
22590
|
+
var VERSION2 = new Version("18.0.0-next.3");
|
|
22533
22591
|
|
|
22534
|
-
// bazel-out/
|
|
22592
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
22535
22593
|
var _VisitorMode;
|
|
22536
22594
|
(function(_VisitorMode2) {
|
|
22537
22595
|
_VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
|
|
22538
22596
|
_VisitorMode2[_VisitorMode2["Merge"] = 1] = "Merge";
|
|
22539
22597
|
})(_VisitorMode || (_VisitorMode = {}));
|
|
22540
22598
|
|
|
22541
|
-
// bazel-out/
|
|
22599
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
|
|
22542
22600
|
var XmlTagDefinition = class {
|
|
22543
22601
|
constructor() {
|
|
22544
22602
|
this.closedByParent = false;
|
|
@@ -22560,7 +22618,7 @@ var XmlTagDefinition = class {
|
|
|
22560
22618
|
};
|
|
22561
22619
|
var _TAG_DEFINITION = new XmlTagDefinition();
|
|
22562
22620
|
|
|
22563
|
-
// bazel-out/
|
|
22621
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
|
|
22564
22622
|
var FactoryTarget2;
|
|
22565
22623
|
(function(FactoryTarget3) {
|
|
22566
22624
|
FactoryTarget3[FactoryTarget3["Directive"] = 0] = "Directive";
|
|
@@ -22570,10 +22628,10 @@ var FactoryTarget2;
|
|
|
22570
22628
|
FactoryTarget3[FactoryTarget3["NgModule"] = 4] = "NgModule";
|
|
22571
22629
|
})(FactoryTarget2 || (FactoryTarget2 = {}));
|
|
22572
22630
|
|
|
22573
|
-
// bazel-out/
|
|
22631
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/compiler.mjs
|
|
22574
22632
|
publishFacade(_global);
|
|
22575
22633
|
|
|
22576
|
-
// bazel-out/
|
|
22634
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/identifier-lookup.mjs
|
|
22577
22635
|
var import_typescript5 = __toESM(require("typescript"), 1);
|
|
22578
22636
|
function lookupIdentifiersInSourceFile(sourceFile, names) {
|
|
22579
22637
|
const results = /* @__PURE__ */ new Set();
|
|
@@ -22587,7 +22645,7 @@ function lookupIdentifiersInSourceFile(sourceFile, names) {
|
|
|
22587
22645
|
return results;
|
|
22588
22646
|
}
|
|
22589
22647
|
|
|
22590
|
-
// bazel-out/
|
|
22648
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/types.mjs
|
|
22591
22649
|
var ngtemplate = "ng-template";
|
|
22592
22650
|
var boundngifelse = "[ngIfElse]";
|
|
22593
22651
|
var boundngifthenelse = "[ngIfThenElse]";
|
|
@@ -22920,7 +22978,7 @@ var TemplateCollector = class extends RecursiveVisitor {
|
|
|
22920
22978
|
}
|
|
22921
22979
|
};
|
|
22922
22980
|
|
|
22923
|
-
// bazel-out/
|
|
22981
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/util.mjs
|
|
22924
22982
|
var import_path2 = require("path");
|
|
22925
22983
|
var import_typescript6 = __toESM(require("typescript"), 1);
|
|
22926
22984
|
var startMarkerRegex = new RegExp(startMarker, "gm");
|
|
@@ -22971,8 +23029,11 @@ function updateImportClause(clause, removeCommonModule) {
|
|
|
22971
23029
|
function updateClassImports(propAssignment, removeCommonModule) {
|
|
22972
23030
|
const printer = import_typescript6.default.createPrinter();
|
|
22973
23031
|
const importList = propAssignment.initializer;
|
|
23032
|
+
if (!import_typescript6.default.isArrayLiteralExpression(importList)) {
|
|
23033
|
+
return null;
|
|
23034
|
+
}
|
|
22974
23035
|
const removals = removeCommonModule ? importWithCommonRemovals : importRemovals;
|
|
22975
|
-
const elements = importList.elements.filter((el) => !removals.includes(el.
|
|
23036
|
+
const elements = importList.elements.filter((el) => !import_typescript6.default.isIdentifier(el) || !removals.includes(el.text));
|
|
22976
23037
|
if (elements.length === importList.elements.length) {
|
|
22977
23038
|
return null;
|
|
22978
23039
|
}
|
|
@@ -23103,6 +23164,15 @@ function validateI18nStructure(parsed, fileName) {
|
|
|
23103
23164
|
function isChildOf(parent, el) {
|
|
23104
23165
|
return parent.sourceSpan.start.offset < el.sourceSpan.start.offset && parent.sourceSpan.end.offset > el.sourceSpan.end.offset;
|
|
23105
23166
|
}
|
|
23167
|
+
var PlaceholderKind;
|
|
23168
|
+
(function(PlaceholderKind2) {
|
|
23169
|
+
PlaceholderKind2[PlaceholderKind2["Default"] = 0] = "Default";
|
|
23170
|
+
PlaceholderKind2[PlaceholderKind2["Alternate"] = 1] = "Alternate";
|
|
23171
|
+
})(PlaceholderKind || (PlaceholderKind = {}));
|
|
23172
|
+
function getPlaceholder(value, kind = PlaceholderKind.Default) {
|
|
23173
|
+
const name = `<<<\u0275\u0275ngControlFlowMigration_${kind}\u0275\u0275>>>`;
|
|
23174
|
+
return `___${name}${value}${name}___`;
|
|
23175
|
+
}
|
|
23106
23176
|
function calculateNesting(visitor, hasLineBreaks2) {
|
|
23107
23177
|
let nestedQueue = [];
|
|
23108
23178
|
for (let i = 0; i < visitor.elements.length; i++) {
|
|
@@ -23171,8 +23241,8 @@ function processNgTemplates(template2) {
|
|
|
23171
23241
|
try {
|
|
23172
23242
|
const templates = getTemplates(template2);
|
|
23173
23243
|
for (const [name, t] of templates) {
|
|
23174
|
-
const replaceRegex = new RegExp(
|
|
23175
|
-
const forRegex = new RegExp(
|
|
23244
|
+
const replaceRegex = new RegExp(getPlaceholder(name.slice(1)), "g");
|
|
23245
|
+
const forRegex = new RegExp(getPlaceholder(name.slice(1), PlaceholderKind.Alternate), "g");
|
|
23176
23246
|
const forMatches = [...template2.matchAll(forRegex)];
|
|
23177
23247
|
const matches = [...forMatches, ...template2.matchAll(replaceRegex)];
|
|
23178
23248
|
let safeToRemove = true;
|
|
@@ -23205,11 +23275,14 @@ function processNgTemplates(template2) {
|
|
|
23205
23275
|
}
|
|
23206
23276
|
}
|
|
23207
23277
|
function replaceRemainingPlaceholders(template2) {
|
|
23208
|
-
const
|
|
23278
|
+
const pattern = ".*";
|
|
23279
|
+
const placeholderPattern = getPlaceholder(pattern);
|
|
23280
|
+
const replaceRegex = new RegExp(placeholderPattern, "g");
|
|
23281
|
+
const [placeholderStart, placeholderEnd] = placeholderPattern.split(pattern);
|
|
23209
23282
|
const placeholders = [...template2.matchAll(replaceRegex)];
|
|
23210
23283
|
for (let ph of placeholders) {
|
|
23211
23284
|
const placeholder = ph[0];
|
|
23212
|
-
const name = placeholder.slice(
|
|
23285
|
+
const name = placeholder.slice(placeholderStart.length, placeholder.length - placeholderEnd.length);
|
|
23213
23286
|
template2 = template2.replace(placeholder, `<ng-template [ngTemplateOutlet]="${name}"></ng-template>`);
|
|
23214
23287
|
}
|
|
23215
23288
|
return template2;
|
|
@@ -23420,7 +23493,7 @@ function forEachClass(sourceFile, callback) {
|
|
|
23420
23493
|
});
|
|
23421
23494
|
}
|
|
23422
23495
|
|
|
23423
|
-
// bazel-out/
|
|
23496
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/cases.mjs
|
|
23424
23497
|
var boundcase = "[ngSwitchCase]";
|
|
23425
23498
|
var switchcase = "*ngSwitchCase";
|
|
23426
23499
|
var nakedcase = "ngSwitchCase";
|
|
@@ -23498,7 +23571,7 @@ function migrateNgSwitchDefault(etm, tmpl, offset) {
|
|
|
23498
23571
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
23499
23572
|
}
|
|
23500
23573
|
|
|
23501
|
-
// bazel-out/
|
|
23574
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/fors.mjs
|
|
23502
23575
|
var ngfor = "*ngFor";
|
|
23503
23576
|
var nakedngfor2 = "ngFor";
|
|
23504
23577
|
var fors = [
|
|
@@ -23572,7 +23645,7 @@ function migrateStandardNgFor(etm, tmpl, offset) {
|
|
|
23572
23645
|
trackBy = `${trackByFn}($index, ${loopVar})`;
|
|
23573
23646
|
}
|
|
23574
23647
|
if (part.startsWith("template:")) {
|
|
23575
|
-
tmplPlaceholder =
|
|
23648
|
+
tmplPlaceholder = getPlaceholder(part.split(":")[1].trim(), PlaceholderKind.Alternate);
|
|
23576
23649
|
}
|
|
23577
23650
|
if (part.match(aliasWithEqualRegexp)) {
|
|
23578
23651
|
const aliasParts = part.split("=");
|
|
@@ -23672,7 +23745,7 @@ function getNgForParts(expression) {
|
|
|
23672
23745
|
return parts;
|
|
23673
23746
|
}
|
|
23674
23747
|
|
|
23675
|
-
// bazel-out/
|
|
23748
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/ifs.mjs
|
|
23676
23749
|
var ngif = "*ngIf";
|
|
23677
23750
|
var boundngif = "[ngIf]";
|
|
23678
23751
|
var nakedngif = "ngIf";
|
|
@@ -23749,7 +23822,7 @@ function buildIfBlock(etm, tmpl, offset) {
|
|
|
23749
23822
|
}
|
|
23750
23823
|
function buildStandardIfElseBlock(etm, tmpl, elseString, offset) {
|
|
23751
23824
|
const condition = etm.getCondition().replace(" as ", "; as ").replace(/;\s*let/g, "; as");
|
|
23752
|
-
const elsePlaceholder =
|
|
23825
|
+
const elsePlaceholder = getPlaceholder(etm.getTemplateName(elseString));
|
|
23753
23826
|
return buildIfElseBlock(etm, tmpl, condition, elsePlaceholder, offset);
|
|
23754
23827
|
}
|
|
23755
23828
|
function buildBoundIfElseBlock(etm, tmpl, offset) {
|
|
@@ -23764,9 +23837,9 @@ function buildBoundIfElseBlock(etm, tmpl, offset) {
|
|
|
23764
23837
|
} else if (aliases.length === 1) {
|
|
23765
23838
|
condition += `; as ${aliases[0]}`;
|
|
23766
23839
|
}
|
|
23767
|
-
const elsePlaceholder =
|
|
23840
|
+
const elsePlaceholder = getPlaceholder(etm.elseAttr.value.trim());
|
|
23768
23841
|
if (etm.thenAttr !== void 0) {
|
|
23769
|
-
const thenPlaceholder =
|
|
23842
|
+
const thenPlaceholder = getPlaceholder(etm.thenAttr.value.trim());
|
|
23770
23843
|
return buildIfThenElseBlock(etm, tmpl, condition, thenPlaceholder, elsePlaceholder, offset);
|
|
23771
23844
|
}
|
|
23772
23845
|
return buildIfElseBlock(etm, tmpl, condition, elsePlaceholder, offset);
|
|
@@ -23788,13 +23861,13 @@ function buildIfElseBlock(etm, tmpl, condition, elsePlaceholder, offset) {
|
|
|
23788
23861
|
}
|
|
23789
23862
|
function buildStandardIfThenElseBlock(etm, tmpl, thenString, elseString, offset) {
|
|
23790
23863
|
const condition = etm.getCondition().replace(" as ", "; as ").replace(/;\s*let/g, "; as");
|
|
23791
|
-
const thenPlaceholder =
|
|
23792
|
-
const elsePlaceholder =
|
|
23864
|
+
const thenPlaceholder = getPlaceholder(etm.getTemplateName(thenString, elseString));
|
|
23865
|
+
const elsePlaceholder = getPlaceholder(etm.getTemplateName(elseString));
|
|
23793
23866
|
return buildIfThenElseBlock(etm, tmpl, condition, thenPlaceholder, elsePlaceholder, offset);
|
|
23794
23867
|
}
|
|
23795
23868
|
function buildStandardIfThenBlock(etm, tmpl, thenString, offset) {
|
|
23796
23869
|
const condition = etm.getCondition().replace(" as ", "; as ").replace(/;\s*let/g, "; as");
|
|
23797
|
-
const thenPlaceholder =
|
|
23870
|
+
const thenPlaceholder = getPlaceholder(etm.getTemplateName(thenString));
|
|
23798
23871
|
return buildIfThenBlock(etm, tmpl, condition, thenPlaceholder, offset);
|
|
23799
23872
|
}
|
|
23800
23873
|
function buildIfThenElseBlock(etm, tmpl, condition, thenPlaceholder, elsePlaceholder, offset) {
|
|
@@ -23825,7 +23898,7 @@ function buildIfThenBlock(etm, tmpl, condition, thenPlaceholder, offset) {
|
|
|
23825
23898
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
23826
23899
|
}
|
|
23827
23900
|
|
|
23828
|
-
// bazel-out/
|
|
23901
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/switches.mjs
|
|
23829
23902
|
var ngswitch = "[ngSwitch]";
|
|
23830
23903
|
var switches = [
|
|
23831
23904
|
ngswitch
|
|
@@ -23893,7 +23966,7 @@ function migrateNgSwitch(etm, tmpl, offset) {
|
|
|
23893
23966
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
23894
23967
|
}
|
|
23895
23968
|
|
|
23896
|
-
// bazel-out/
|
|
23969
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/migration.mjs
|
|
23897
23970
|
function migrateTemplate(template2, templateType, node, file, format = true, analyzedFiles) {
|
|
23898
23971
|
let errors = [];
|
|
23899
23972
|
let migrated = template2;
|
|
@@ -23944,7 +24017,7 @@ function migrateTemplate(template2, templateType, node, file, format = true, ana
|
|
|
23944
24017
|
return { migrated, errors };
|
|
23945
24018
|
}
|
|
23946
24019
|
|
|
23947
|
-
// bazel-out/
|
|
24020
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/index.mjs
|
|
23948
24021
|
function control_flow_migration_default(options) {
|
|
23949
24022
|
return (tree, context) => __async(this, null, function* () {
|
|
23950
24023
|
const basePath = process.cwd();
|