@angular/core 17.0.0-rc.2 → 17.0.0-rc.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/primitives/signals/src/signal.mjs +8 -4
- package/esm2022/src/core_private_export.mjs +2 -1
- package/esm2022/src/core_reactivity_export_internal.mjs +1 -1
- package/esm2022/src/defer/instructions.mjs +3 -2
- package/esm2022/src/hydration/api.mjs +3 -2
- package/esm2022/src/render3/after_render_hooks.mjs +4 -3
- package/esm2022/src/render3/debug/framework_injector_profiler.mjs +13 -4
- package/esm2022/src/render3/features/standalone_feature.mjs +3 -2
- package/esm2022/src/render3/instructions/change_detection.mjs +2 -5
- package/esm2022/src/render3/instructions/control_flow.mjs +4 -3
- package/esm2022/src/render3/node_manipulation.mjs +2 -2
- package/esm2022/src/render3/reactivity/effect.mjs +3 -1
- package/esm2022/src/render3/util/injector_discovery_utils.mjs +2 -2
- package/esm2022/src/util/performance.mjs +19 -0
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/fesm2022/core.mjs +46 -26
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +8 -4
- package/fesm2022/primitives/signals.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/index.d.ts +22 -2
- package/package.json +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/block-template-entities/bundle.js +617 -404
- package/schematics/migrations/block-template-entities/bundle.js.map +4 -4
- package/schematics/migrations/compiler-options/bundle.js +13 -13
- package/schematics/migrations/transfer-state/bundle.js +13 -13
- package/schematics/ng-generate/control-flow-migration/bundle.js +667 -414
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
- package/schematics/ng-generate/standalone-migration/bundle.js +873 -660
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +1 -1
- package/esm2022/src/render3/instructions/change_detection_flags.mjs +0 -12
|
@@ -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,18 +72,18 @@ 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/project_tsconfig_paths.mjs
|
|
87
87
|
var import_core = require("@angular-devkit/core");
|
|
88
88
|
function getProjectTsConfigPaths(tree) {
|
|
89
89
|
return __async(this, null, function* () {
|
|
@@ -163,11 +163,11 @@ function getWorkspace(tree) {
|
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
// bazel-out/
|
|
166
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
167
167
|
var import_path = require("path");
|
|
168
168
|
var import_typescript4 = __toESM(require("typescript"), 1);
|
|
169
169
|
|
|
170
|
-
// bazel-out/
|
|
170
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
|
|
171
171
|
var path = __toESM(require("path"), 1);
|
|
172
172
|
var import_typescript3 = __toESM(require("typescript"), 1);
|
|
173
173
|
function parseTsconfigFile(tsconfigPath, basePath) {
|
|
@@ -184,7 +184,7 @@ function parseTsconfigFile(tsconfigPath, basePath) {
|
|
|
184
184
|
return import_typescript3.default.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
// bazel-out/
|
|
187
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
188
188
|
function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
|
|
189
189
|
const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles);
|
|
190
190
|
return import_typescript4.default.createProgram(rootNames, options, host);
|
|
@@ -217,7 +217,7 @@ function canMigrateFile(basePath, sourceFile, program) {
|
|
|
217
217
|
return !(0, import_path.relative)(basePath, sourceFile.fileName).startsWith("..");
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
// bazel-out/
|
|
220
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/selector.mjs
|
|
221
221
|
var _SELECTOR_REGEXP = new RegExp(
|
|
222
222
|
`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,
|
|
223
223
|
"g"
|
|
@@ -525,7 +525,7 @@ var SelectorContext = class {
|
|
|
525
525
|
}
|
|
526
526
|
};
|
|
527
527
|
|
|
528
|
-
// bazel-out/
|
|
528
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/core.mjs
|
|
529
529
|
var ViewEncapsulation;
|
|
530
530
|
(function(ViewEncapsulation2) {
|
|
531
531
|
ViewEncapsulation2[ViewEncapsulation2["Emulated"] = 0] = "Emulated";
|
|
@@ -587,7 +587,7 @@ function parseSelectorToR3Selector(selector) {
|
|
|
587
587
|
return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];
|
|
588
588
|
}
|
|
589
589
|
|
|
590
|
-
// bazel-out/
|
|
590
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/digest.mjs
|
|
591
591
|
var textEncoder;
|
|
592
592
|
function computeDigest(message) {
|
|
593
593
|
return sha1(serializeNodes(message.nodes).join("") + `[${message.meaning}]`);
|
|
@@ -824,7 +824,7 @@ function wordAt(bytes, index, endian) {
|
|
|
824
824
|
return word;
|
|
825
825
|
}
|
|
826
826
|
|
|
827
|
-
// bazel-out/
|
|
827
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/output_ast.mjs
|
|
828
828
|
var TypeModifier;
|
|
829
829
|
(function(TypeModifier2) {
|
|
830
830
|
TypeModifier2[TypeModifier2["None"] = 0] = "None";
|
|
@@ -1779,7 +1779,7 @@ function serializeTags(tags) {
|
|
|
1779
1779
|
return out;
|
|
1780
1780
|
}
|
|
1781
1781
|
|
|
1782
|
-
// bazel-out/
|
|
1782
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/constant_pool.mjs
|
|
1783
1783
|
var CONSTANT_PREFIX = "_c";
|
|
1784
1784
|
var UNKNOWN_VALUE_KEY = variable("<unknown>");
|
|
1785
1785
|
var KEY_CONTEXT = {};
|
|
@@ -1962,7 +1962,7 @@ function isLongStringLiteral(expr) {
|
|
|
1962
1962
|
return expr instanceof LiteralExpr && typeof expr.value === "string" && expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;
|
|
1963
1963
|
}
|
|
1964
1964
|
|
|
1965
|
-
// bazel-out/
|
|
1965
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_identifiers.mjs
|
|
1966
1966
|
var CORE = "@angular/core";
|
|
1967
1967
|
var _Identifiers = class {
|
|
1968
1968
|
};
|
|
@@ -2595,7 +2595,7 @@ var Identifiers = _Identifiers;
|
|
|
2595
2595
|
_Identifiers.validateIframeAttribute = { name: "\u0275\u0275validateIframeAttribute", moduleName: CORE };
|
|
2596
2596
|
})();
|
|
2597
2597
|
|
|
2598
|
-
// bazel-out/
|
|
2598
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/util.mjs
|
|
2599
2599
|
var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
|
2600
2600
|
function dashCaseToCamelCase(input) {
|
|
2601
2601
|
return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
|
|
@@ -2683,7 +2683,7 @@ function partitionArray(arr, conditionFn) {
|
|
|
2683
2683
|
return [truthy, falsy];
|
|
2684
2684
|
}
|
|
2685
2685
|
|
|
2686
|
-
// bazel-out/
|
|
2686
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/source_map.mjs
|
|
2687
2687
|
var VERSION = 3;
|
|
2688
2688
|
var JS_B64_PREFIX = "# sourceMappingURL=data:application/json;base64,";
|
|
2689
2689
|
var SourceMapGenerator = class {
|
|
@@ -2812,7 +2812,7 @@ function toBase64Digit(value) {
|
|
|
2812
2812
|
return B64_DIGITS[value];
|
|
2813
2813
|
}
|
|
2814
2814
|
|
|
2815
|
-
// bazel-out/
|
|
2815
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/abstract_emitter.mjs
|
|
2816
2816
|
var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
|
|
2817
2817
|
var _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
|
|
2818
2818
|
var _INDENT_WITH = " ";
|
|
@@ -3297,7 +3297,7 @@ function _createIndent(count) {
|
|
|
3297
3297
|
return res;
|
|
3298
3298
|
}
|
|
3299
3299
|
|
|
3300
|
-
// bazel-out/
|
|
3300
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/util.mjs
|
|
3301
3301
|
function typeWithParameters(type, numParams) {
|
|
3302
3302
|
if (numParams === 0) {
|
|
3303
3303
|
return expressionType(type);
|
|
@@ -3362,7 +3362,7 @@ function generateForwardRef(expr) {
|
|
|
3362
3362
|
return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr)]);
|
|
3363
3363
|
}
|
|
3364
3364
|
|
|
3365
|
-
// bazel-out/
|
|
3365
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_factory.mjs
|
|
3366
3366
|
var R3FactoryDelegateType;
|
|
3367
3367
|
(function(R3FactoryDelegateType2) {
|
|
3368
3368
|
R3FactoryDelegateType2[R3FactoryDelegateType2["Class"] = 0] = "Class";
|
|
@@ -3507,7 +3507,7 @@ function getInjectFn(target) {
|
|
|
3507
3507
|
}
|
|
3508
3508
|
}
|
|
3509
3509
|
|
|
3510
|
-
// bazel-out/
|
|
3510
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_ast.mjs
|
|
3511
3511
|
var Comment = class {
|
|
3512
3512
|
constructor(value, sourceSpan) {
|
|
3513
3513
|
this.value = value;
|
|
@@ -3880,7 +3880,7 @@ function visitAll(visitor, nodes) {
|
|
|
3880
3880
|
return result;
|
|
3881
3881
|
}
|
|
3882
3882
|
|
|
3883
|
-
// bazel-out/
|
|
3883
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/i18n_ast.mjs
|
|
3884
3884
|
var Message = class {
|
|
3885
3885
|
constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {
|
|
3886
3886
|
this.nodes = nodes;
|
|
@@ -3999,7 +3999,7 @@ var LocalizeMessageStringVisitor = class {
|
|
|
3999
3999
|
}
|
|
4000
4000
|
};
|
|
4001
4001
|
|
|
4002
|
-
// bazel-out/
|
|
4002
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/serializers/xml_helper.mjs
|
|
4003
4003
|
var _Visitor = class {
|
|
4004
4004
|
visitTag(tag) {
|
|
4005
4005
|
const strAttrs = this._serializeAttributes(tag.attrs);
|
|
@@ -4027,12 +4027,12 @@ ${doctype.dtd}
|
|
|
4027
4027
|
};
|
|
4028
4028
|
var _visitor = new _Visitor();
|
|
4029
4029
|
|
|
4030
|
-
// bazel-out/
|
|
4030
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/serializers/xmb.mjs
|
|
4031
4031
|
function toPublicName(internalName) {
|
|
4032
4032
|
return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, "_");
|
|
4033
4033
|
}
|
|
4034
4034
|
|
|
4035
|
-
// bazel-out/
|
|
4035
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/util.mjs
|
|
4036
4036
|
var CLOSURE_TRANSLATION_VAR_PREFIX = "MSG_";
|
|
4037
4037
|
var TRANSLATION_VAR_PREFIX = "i18n_";
|
|
4038
4038
|
var I18N_ATTR = "i18n";
|
|
@@ -4134,7 +4134,7 @@ function declareI18nVariable(variable2) {
|
|
|
4134
4134
|
return new DeclareVarStmt(variable2.name, void 0, INFERRED_TYPE, void 0, variable2.sourceSpan);
|
|
4135
4135
|
}
|
|
4136
4136
|
|
|
4137
|
-
// bazel-out/
|
|
4137
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/util.mjs
|
|
4138
4138
|
var UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;
|
|
4139
4139
|
var TEMPORARY_NAME = "_t";
|
|
4140
4140
|
var CONTEXT_NAME = "ctx";
|
|
@@ -4357,7 +4357,7 @@ function getInstructionStatements(instructions) {
|
|
|
4357
4357
|
return statements;
|
|
4358
4358
|
}
|
|
4359
4359
|
|
|
4360
|
-
// bazel-out/
|
|
4360
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/injectable_compiler_2.mjs
|
|
4361
4361
|
function compileInjectable(meta, resolveForwardRefs) {
|
|
4362
4362
|
let result = null;
|
|
4363
4363
|
const factoryMeta = {
|
|
@@ -4442,7 +4442,7 @@ function createFactoryFunction(type) {
|
|
|
4442
4442
|
return arrowFn([new FnParam("t", DYNAMIC_TYPE)], type.prop("\u0275fac").callFn([variable("t")]));
|
|
4443
4443
|
}
|
|
4444
4444
|
|
|
4445
|
-
// bazel-out/
|
|
4445
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/assertions.mjs
|
|
4446
4446
|
var UNUSABLE_INTERPOLATION_REGEXPS = [
|
|
4447
4447
|
/^\s*$/,
|
|
4448
4448
|
/[<>]/,
|
|
@@ -4464,7 +4464,7 @@ function assertInterpolationSymbols(identifier, value) {
|
|
|
4464
4464
|
}
|
|
4465
4465
|
}
|
|
4466
4466
|
|
|
4467
|
-
// bazel-out/
|
|
4467
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/interpolation_config.mjs
|
|
4468
4468
|
var InterpolationConfig = class {
|
|
4469
4469
|
static fromArray(markers) {
|
|
4470
4470
|
if (!markers) {
|
|
@@ -4480,7 +4480,7 @@ var InterpolationConfig = class {
|
|
|
4480
4480
|
};
|
|
4481
4481
|
var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
|
|
4482
4482
|
|
|
4483
|
-
// bazel-out/
|
|
4483
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/chars.mjs
|
|
4484
4484
|
var $EOF = 0;
|
|
4485
4485
|
var $BSPACE = 8;
|
|
4486
4486
|
var $TAB = 9;
|
|
@@ -4562,7 +4562,7 @@ function isQuote(code) {
|
|
|
4562
4562
|
return code === $SQ || code === $DQ || code === $BT;
|
|
4563
4563
|
}
|
|
4564
4564
|
|
|
4565
|
-
// bazel-out/
|
|
4565
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/parse_util.mjs
|
|
4566
4566
|
var ParseLocation = class {
|
|
4567
4567
|
constructor(file, offset, line, col) {
|
|
4568
4568
|
this.file = file;
|
|
@@ -4709,7 +4709,7 @@ function sanitizeIdentifier(name) {
|
|
|
4709
4709
|
return name.replace(/\W/g, "_");
|
|
4710
4710
|
}
|
|
4711
4711
|
|
|
4712
|
-
// bazel-out/
|
|
4712
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/abstract_js_emitter.mjs
|
|
4713
4713
|
var makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})';
|
|
4714
4714
|
var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
4715
4715
|
constructor() {
|
|
@@ -4802,7 +4802,7 @@ var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
|
4802
4802
|
}
|
|
4803
4803
|
};
|
|
4804
4804
|
|
|
4805
|
-
// bazel-out/
|
|
4805
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/output_jit_trusted_types.mjs
|
|
4806
4806
|
var policy;
|
|
4807
4807
|
function getPolicy() {
|
|
4808
4808
|
if (policy === void 0) {
|
|
@@ -4840,7 +4840,7 @@ function newTrustedFunctionForJIT(...args) {
|
|
|
4840
4840
|
return fn2.bind(_global);
|
|
4841
4841
|
}
|
|
4842
4842
|
|
|
4843
|
-
// bazel-out/
|
|
4843
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/output_jit.mjs
|
|
4844
4844
|
var JitEvaluator = class {
|
|
4845
4845
|
evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {
|
|
4846
4846
|
const converter = new JitEmitterVisitor(refResolver);
|
|
@@ -4931,7 +4931,7 @@ function isUseStrictStatement(statement) {
|
|
|
4931
4931
|
return statement.isEquivalent(literal("use strict").toStmt());
|
|
4932
4932
|
}
|
|
4933
4933
|
|
|
4934
|
-
// bazel-out/
|
|
4934
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_injector_compiler.mjs
|
|
4935
4935
|
function compileInjector(meta) {
|
|
4936
4936
|
const definitionMap = new DefinitionMap();
|
|
4937
4937
|
if (meta.providers !== null) {
|
|
@@ -4948,7 +4948,7 @@ function createInjectorType(meta) {
|
|
|
4948
4948
|
return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
|
|
4949
4949
|
}
|
|
4950
4950
|
|
|
4951
|
-
// bazel-out/
|
|
4951
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_jit.mjs
|
|
4952
4952
|
var R3JitReflector = class {
|
|
4953
4953
|
constructor(context) {
|
|
4954
4954
|
this.context = context;
|
|
@@ -4964,7 +4964,7 @@ var R3JitReflector = class {
|
|
|
4964
4964
|
}
|
|
4965
4965
|
};
|
|
4966
4966
|
|
|
4967
|
-
// bazel-out/
|
|
4967
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_module_compiler.mjs
|
|
4968
4968
|
var R3SelectorScopeMode;
|
|
4969
4969
|
(function(R3SelectorScopeMode2) {
|
|
4970
4970
|
R3SelectorScopeMode2[R3SelectorScopeMode2["Inline"] = 0] = "Inline";
|
|
@@ -5105,7 +5105,7 @@ function tupleOfTypes(types) {
|
|
|
5105
5105
|
return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;
|
|
5106
5106
|
}
|
|
5107
5107
|
|
|
5108
|
-
// bazel-out/
|
|
5108
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_pipe_compiler.mjs
|
|
5109
5109
|
function compilePipeFromMetadata(metadata) {
|
|
5110
5110
|
const definitionMapValues = [];
|
|
5111
5111
|
definitionMapValues.push({ key: "name", value: literal(metadata.pipeName), quoted: false });
|
|
@@ -5126,7 +5126,7 @@ function createPipeType(metadata) {
|
|
|
5126
5126
|
]));
|
|
5127
5127
|
}
|
|
5128
5128
|
|
|
5129
|
-
// bazel-out/
|
|
5129
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/api.mjs
|
|
5130
5130
|
var R3TemplateDependencyKind;
|
|
5131
5131
|
(function(R3TemplateDependencyKind2) {
|
|
5132
5132
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["Directive"] = 0] = "Directive";
|
|
@@ -5134,7 +5134,7 @@ var R3TemplateDependencyKind;
|
|
|
5134
5134
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["NgModule"] = 2] = "NgModule";
|
|
5135
5135
|
})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
|
|
5136
5136
|
|
|
5137
|
-
// bazel-out/
|
|
5137
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/expression_parser/ast.mjs
|
|
5138
5138
|
var ParserError = class {
|
|
5139
5139
|
constructor(message, input, errLocation, ctxLocation) {
|
|
5140
5140
|
this.input = input;
|
|
@@ -5800,7 +5800,7 @@ var BoundElementProperty = class {
|
|
|
5800
5800
|
}
|
|
5801
5801
|
};
|
|
5802
5802
|
|
|
5803
|
-
// bazel-out/
|
|
5803
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/compiler_util/expression_converter.mjs
|
|
5804
5804
|
var _EventHandlerVars = class {
|
|
5805
5805
|
};
|
|
5806
5806
|
var EventHandlerVars = _EventHandlerVars;
|
|
@@ -6441,7 +6441,7 @@ var BuiltinFunctionCall = class extends Call {
|
|
|
6441
6441
|
}
|
|
6442
6442
|
};
|
|
6443
6443
|
|
|
6444
|
-
// bazel-out/
|
|
6444
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/dom_security_schema.mjs
|
|
6445
6445
|
var _SECURITY_SCHEMA;
|
|
6446
6446
|
function SECURITY_SCHEMA() {
|
|
6447
6447
|
if (!_SECURITY_SCHEMA) {
|
|
@@ -6499,7 +6499,7 @@ function isIframeSecuritySensitiveAttr(attrName) {
|
|
|
6499
6499
|
return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
|
|
6500
6500
|
}
|
|
6501
6501
|
|
|
6502
|
-
// bazel-out/
|
|
6502
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/shadow_css.mjs
|
|
6503
6503
|
var animationKeywords = /* @__PURE__ */ new Set([
|
|
6504
6504
|
"inherit",
|
|
6505
6505
|
"initial",
|
|
@@ -6970,7 +6970,7 @@ function repeatGroups(groups, multiples) {
|
|
|
6970
6970
|
}
|
|
6971
6971
|
}
|
|
6972
6972
|
|
|
6973
|
-
// bazel-out/
|
|
6973
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/enums.mjs
|
|
6974
6974
|
var OpKind;
|
|
6975
6975
|
(function(OpKind2) {
|
|
6976
6976
|
OpKind2[OpKind2["ListEnd"] = 0] = "ListEnd";
|
|
@@ -7001,20 +7001,22 @@ var OpKind;
|
|
|
7001
7001
|
OpKind2[OpKind2["ExtractedAttribute"] = 25] = "ExtractedAttribute";
|
|
7002
7002
|
OpKind2[OpKind2["Defer"] = 26] = "Defer";
|
|
7003
7003
|
OpKind2[OpKind2["DeferOn"] = 27] = "DeferOn";
|
|
7004
|
-
OpKind2[OpKind2["
|
|
7005
|
-
OpKind2[OpKind2["
|
|
7006
|
-
OpKind2[OpKind2["
|
|
7007
|
-
OpKind2[OpKind2["
|
|
7008
|
-
OpKind2[OpKind2["
|
|
7009
|
-
OpKind2[OpKind2["
|
|
7010
|
-
OpKind2[OpKind2["
|
|
7011
|
-
OpKind2[OpKind2["
|
|
7012
|
-
OpKind2[OpKind2["
|
|
7013
|
-
OpKind2[OpKind2["
|
|
7014
|
-
OpKind2[OpKind2["
|
|
7015
|
-
OpKind2[OpKind2["
|
|
7016
|
-
OpKind2[OpKind2["
|
|
7017
|
-
OpKind2[OpKind2["
|
|
7004
|
+
OpKind2[OpKind2["DeferWhen"] = 28] = "DeferWhen";
|
|
7005
|
+
OpKind2[OpKind2["I18nMessage"] = 29] = "I18nMessage";
|
|
7006
|
+
OpKind2[OpKind2["HostProperty"] = 30] = "HostProperty";
|
|
7007
|
+
OpKind2[OpKind2["Namespace"] = 31] = "Namespace";
|
|
7008
|
+
OpKind2[OpKind2["ProjectionDef"] = 32] = "ProjectionDef";
|
|
7009
|
+
OpKind2[OpKind2["Projection"] = 33] = "Projection";
|
|
7010
|
+
OpKind2[OpKind2["RepeaterCreate"] = 34] = "RepeaterCreate";
|
|
7011
|
+
OpKind2[OpKind2["Repeater"] = 35] = "Repeater";
|
|
7012
|
+
OpKind2[OpKind2["I18nStart"] = 36] = "I18nStart";
|
|
7013
|
+
OpKind2[OpKind2["I18n"] = 37] = "I18n";
|
|
7014
|
+
OpKind2[OpKind2["I18nEnd"] = 38] = "I18nEnd";
|
|
7015
|
+
OpKind2[OpKind2["I18nExpression"] = 39] = "I18nExpression";
|
|
7016
|
+
OpKind2[OpKind2["I18nApply"] = 40] = "I18nApply";
|
|
7017
|
+
OpKind2[OpKind2["Icu"] = 41] = "Icu";
|
|
7018
|
+
OpKind2[OpKind2["IcuUpdate"] = 42] = "IcuUpdate";
|
|
7019
|
+
OpKind2[OpKind2["I18nContext"] = 43] = "I18nContext";
|
|
7018
7020
|
})(OpKind || (OpKind = {}));
|
|
7019
7021
|
var ExpressionKind;
|
|
7020
7022
|
(function(ExpressionKind2) {
|
|
@@ -7122,7 +7124,7 @@ var DerivedRepeaterVarIdentity;
|
|
|
7122
7124
|
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Odd"] = 3] = "Odd";
|
|
7123
7125
|
})(DerivedRepeaterVarIdentity || (DerivedRepeaterVarIdentity = {}));
|
|
7124
7126
|
|
|
7125
|
-
// bazel-out/
|
|
7127
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
|
|
7126
7128
|
var ConsumesSlot = Symbol("ConsumesSlot");
|
|
7127
7129
|
var DependsOnSlotContext = Symbol("DependsOnSlotContext");
|
|
7128
7130
|
var ConsumesVarsTrait = Symbol("ConsumesVars");
|
|
@@ -7154,7 +7156,7 @@ function hasUsesVarOffsetTrait(expr) {
|
|
|
7154
7156
|
return expr[UsesVarOffset] === true;
|
|
7155
7157
|
}
|
|
7156
7158
|
|
|
7157
|
-
// bazel-out/
|
|
7159
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
|
|
7158
7160
|
function createStatementOp(statement) {
|
|
7159
7161
|
return __spreadValues({
|
|
7160
7162
|
kind: OpKind.Statement,
|
|
@@ -7176,7 +7178,7 @@ var NEW_OP = {
|
|
|
7176
7178
|
next: null
|
|
7177
7179
|
};
|
|
7178
7180
|
|
|
7179
|
-
// bazel-out/
|
|
7181
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
|
|
7180
7182
|
function createInterpolateTextOp(xref, interpolation, i18nPlaceholders, sourceSpan) {
|
|
7181
7183
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7182
7184
|
kind: OpKind.InterpolateText,
|
|
@@ -7295,23 +7297,32 @@ function createRepeaterOp(repeaterCreate2, targetSlot, collection, sourceSpan) {
|
|
|
7295
7297
|
sourceSpan
|
|
7296
7298
|
}, NEW_OP);
|
|
7297
7299
|
}
|
|
7298
|
-
function
|
|
7300
|
+
function createDeferWhenOp(target, expr, prefetch, sourceSpan) {
|
|
7301
|
+
return __spreadValues(__spreadValues({
|
|
7302
|
+
kind: OpKind.DeferWhen,
|
|
7303
|
+
target,
|
|
7304
|
+
expr,
|
|
7305
|
+
prefetch,
|
|
7306
|
+
sourceSpan
|
|
7307
|
+
}, NEW_OP), TRAIT_DEPENDS_ON_SLOT_CONTEXT);
|
|
7308
|
+
}
|
|
7309
|
+
function createI18nExpressionOp(context, target, handle, expression, i18nPlaceholder, resolutionTime, sourceSpan) {
|
|
7299
7310
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7300
7311
|
kind: OpKind.I18nExpression,
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7312
|
+
context,
|
|
7313
|
+
target,
|
|
7314
|
+
handle,
|
|
7304
7315
|
expression,
|
|
7305
7316
|
i18nPlaceholder,
|
|
7306
7317
|
resolutionTime,
|
|
7307
7318
|
sourceSpan
|
|
7308
7319
|
}, NEW_OP), TRAIT_CONSUMES_VARS), TRAIT_DEPENDS_ON_SLOT_CONTEXT);
|
|
7309
7320
|
}
|
|
7310
|
-
function createI18nApplyOp(target,
|
|
7321
|
+
function createI18nApplyOp(target, handle, sourceSpan) {
|
|
7311
7322
|
return __spreadValues({
|
|
7312
7323
|
kind: OpKind.I18nApply,
|
|
7313
7324
|
target,
|
|
7314
|
-
|
|
7325
|
+
handle,
|
|
7315
7326
|
sourceSpan
|
|
7316
7327
|
}, NEW_OP);
|
|
7317
7328
|
}
|
|
@@ -7323,7 +7334,7 @@ function createIcuUpdateOp(xref, sourceSpan) {
|
|
|
7323
7334
|
}, NEW_OP);
|
|
7324
7335
|
}
|
|
7325
7336
|
|
|
7326
|
-
// bazel-out/
|
|
7337
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
|
|
7327
7338
|
var _a;
|
|
7328
7339
|
var _b;
|
|
7329
7340
|
var _c;
|
|
@@ -8059,6 +8070,17 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8059
8070
|
op.placeholderConfig = transformExpressionsInExpression(op.placeholderConfig, transform2, flags);
|
|
8060
8071
|
}
|
|
8061
8072
|
break;
|
|
8073
|
+
case OpKind.I18nMessage:
|
|
8074
|
+
for (const [placeholder, expr] of op.params) {
|
|
8075
|
+
op.params.set(placeholder, transformExpressionsInExpression(expr, transform2, flags));
|
|
8076
|
+
}
|
|
8077
|
+
for (const [placeholder, expr] of op.postprocessingParams) {
|
|
8078
|
+
op.postprocessingParams.set(placeholder, transformExpressionsInExpression(expr, transform2, flags));
|
|
8079
|
+
}
|
|
8080
|
+
break;
|
|
8081
|
+
case OpKind.DeferWhen:
|
|
8082
|
+
op.expr = transformExpressionsInExpression(op.expr, transform2, flags);
|
|
8083
|
+
break;
|
|
8062
8084
|
case OpKind.Advance:
|
|
8063
8085
|
case OpKind.Container:
|
|
8064
8086
|
case OpKind.ContainerEnd:
|
|
@@ -8069,9 +8091,9 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8069
8091
|
case OpKind.ElementEnd:
|
|
8070
8092
|
case OpKind.ElementStart:
|
|
8071
8093
|
case OpKind.EnableBindings:
|
|
8072
|
-
case OpKind.ExtractedMessage:
|
|
8073
8094
|
case OpKind.I18n:
|
|
8074
8095
|
case OpKind.I18nApply:
|
|
8096
|
+
case OpKind.I18nContext:
|
|
8075
8097
|
case OpKind.I18nEnd:
|
|
8076
8098
|
case OpKind.I18nStart:
|
|
8077
8099
|
case OpKind.Icu:
|
|
@@ -8163,7 +8185,7 @@ function isStringLiteral(expr) {
|
|
|
8163
8185
|
return expr instanceof LiteralExpr && typeof expr.value === "string";
|
|
8164
8186
|
}
|
|
8165
8187
|
|
|
8166
|
-
// bazel-out/
|
|
8188
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
|
|
8167
8189
|
var _OpList = class {
|
|
8168
8190
|
constructor() {
|
|
8169
8191
|
this.debugListId = _OpList.nextListId++;
|
|
@@ -8354,14 +8376,14 @@ var OpList = _OpList;
|
|
|
8354
8376
|
_OpList.nextListId = 0;
|
|
8355
8377
|
})();
|
|
8356
8378
|
|
|
8357
|
-
// bazel-out/
|
|
8379
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/handle.mjs
|
|
8358
8380
|
var SlotHandle = class {
|
|
8359
8381
|
constructor() {
|
|
8360
8382
|
this.slot = null;
|
|
8361
8383
|
}
|
|
8362
8384
|
};
|
|
8363
8385
|
|
|
8364
|
-
// bazel-out/
|
|
8386
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
|
|
8365
8387
|
var elementContainerOpKinds = /* @__PURE__ */ new Set([
|
|
8366
8388
|
OpKind.Element,
|
|
8367
8389
|
OpKind.ElementStart,
|
|
@@ -8512,7 +8534,7 @@ function createExtractedAttributeOp(target, bindingKind, name, expression) {
|
|
|
8512
8534
|
expression
|
|
8513
8535
|
}, NEW_OP);
|
|
8514
8536
|
}
|
|
8515
|
-
function createDeferOp(xref, main, mainSlot, sourceSpan) {
|
|
8537
|
+
function createDeferOp(xref, main, mainSlot, metadata, sourceSpan) {
|
|
8516
8538
|
return __spreadProps(__spreadValues(__spreadValues({
|
|
8517
8539
|
kind: OpKind.Defer,
|
|
8518
8540
|
xref,
|
|
@@ -8530,6 +8552,8 @@ function createDeferOp(xref, main, mainSlot, sourceSpan) {
|
|
|
8530
8552
|
placeholderMinimumTime: null,
|
|
8531
8553
|
errorView: null,
|
|
8532
8554
|
errorSlot: null,
|
|
8555
|
+
metadata,
|
|
8556
|
+
resolverFn: null,
|
|
8533
8557
|
sourceSpan
|
|
8534
8558
|
}, NEW_OP), TRAIT_CONSUMES_SLOT), {
|
|
8535
8559
|
numSlotsUsed: 2
|
|
@@ -8544,17 +8568,17 @@ function createDeferOnOp(defer2, trigger, prefetch, sourceSpan) {
|
|
|
8544
8568
|
sourceSpan
|
|
8545
8569
|
}, NEW_OP);
|
|
8546
8570
|
}
|
|
8547
|
-
function
|
|
8571
|
+
function createI18nMessageOp(xref, i18nBlock, message, messagePlaceholder, params, postprocessingParams, needsPostprocessing) {
|
|
8548
8572
|
return __spreadValues({
|
|
8549
|
-
kind: OpKind.
|
|
8550
|
-
|
|
8573
|
+
kind: OpKind.I18nMessage,
|
|
8574
|
+
xref,
|
|
8575
|
+
i18nBlock,
|
|
8551
8576
|
message,
|
|
8552
|
-
|
|
8553
|
-
params
|
|
8554
|
-
postprocessingParams
|
|
8555
|
-
needsPostprocessing
|
|
8556
|
-
|
|
8557
|
-
formattedPostprocessingParams: null
|
|
8577
|
+
messagePlaceholder,
|
|
8578
|
+
params,
|
|
8579
|
+
postprocessingParams,
|
|
8580
|
+
needsPostprocessing,
|
|
8581
|
+
subMessages: []
|
|
8558
8582
|
}, NEW_OP);
|
|
8559
8583
|
}
|
|
8560
8584
|
function createI18nStartOp(xref, message, root) {
|
|
@@ -8565,7 +8589,8 @@ function createI18nStartOp(xref, message, root) {
|
|
|
8565
8589
|
root: root != null ? root : xref,
|
|
8566
8590
|
message,
|
|
8567
8591
|
messageIndex: null,
|
|
8568
|
-
subTemplateIndex: null
|
|
8592
|
+
subTemplateIndex: null,
|
|
8593
|
+
context: null
|
|
8569
8594
|
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8570
8595
|
}
|
|
8571
8596
|
function createI18nEndOp(xref) {
|
|
@@ -8574,16 +8599,30 @@ function createI18nEndOp(xref) {
|
|
|
8574
8599
|
xref
|
|
8575
8600
|
}, NEW_OP);
|
|
8576
8601
|
}
|
|
8577
|
-
function createIcuOp(xref, message, sourceSpan) {
|
|
8602
|
+
function createIcuOp(xref, message, icu, messagePlaceholder, sourceSpan) {
|
|
8578
8603
|
return __spreadValues({
|
|
8579
8604
|
kind: OpKind.Icu,
|
|
8580
8605
|
xref,
|
|
8581
8606
|
message,
|
|
8607
|
+
icu,
|
|
8608
|
+
messagePlaceholder,
|
|
8609
|
+
context: null,
|
|
8582
8610
|
sourceSpan
|
|
8583
8611
|
}, NEW_OP);
|
|
8584
8612
|
}
|
|
8613
|
+
function createI18nContextOp(xref, i18nBlock, message, sourceSpan) {
|
|
8614
|
+
return __spreadValues({
|
|
8615
|
+
kind: OpKind.I18nContext,
|
|
8616
|
+
xref,
|
|
8617
|
+
i18nBlock,
|
|
8618
|
+
message,
|
|
8619
|
+
sourceSpan,
|
|
8620
|
+
params: /* @__PURE__ */ new Map(),
|
|
8621
|
+
postprocessingParams: /* @__PURE__ */ new Map()
|
|
8622
|
+
}, NEW_OP);
|
|
8623
|
+
}
|
|
8585
8624
|
|
|
8586
|
-
// bazel-out/
|
|
8625
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
|
|
8587
8626
|
function createHostPropertyOp(name, expression, isAnimationTrigger, sourceSpan) {
|
|
8588
8627
|
return __spreadValues(__spreadValues({
|
|
8589
8628
|
kind: OpKind.HostProperty,
|
|
@@ -8594,10 +8633,10 @@ function createHostPropertyOp(name, expression, isAnimationTrigger, sourceSpan)
|
|
|
8594
8633
|
}, TRAIT_CONSUMES_VARS), NEW_OP);
|
|
8595
8634
|
}
|
|
8596
8635
|
|
|
8597
|
-
// bazel-out/
|
|
8636
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
|
|
8598
8637
|
var CTX_REF = "CTX_REF_MARKER";
|
|
8599
8638
|
|
|
8600
|
-
// bazel-out/
|
|
8639
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
|
|
8601
8640
|
var CompilationJobKind;
|
|
8602
8641
|
(function(CompilationJobKind2) {
|
|
8603
8642
|
CompilationJobKind2[CompilationJobKind2["Tmpl"] = 0] = "Tmpl";
|
|
@@ -8617,10 +8656,11 @@ var CompilationJob = class {
|
|
|
8617
8656
|
}
|
|
8618
8657
|
};
|
|
8619
8658
|
var ComponentCompilationJob = class extends CompilationJob {
|
|
8620
|
-
constructor(componentName, pool, compatibility, relativeContextFilePath, i18nUseExternalIds) {
|
|
8659
|
+
constructor(componentName, pool, compatibility, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta) {
|
|
8621
8660
|
super(componentName, pool, compatibility);
|
|
8622
8661
|
this.relativeContextFilePath = relativeContextFilePath;
|
|
8623
8662
|
this.i18nUseExternalIds = i18nUseExternalIds;
|
|
8663
|
+
this.deferBlocksMeta = deferBlocksMeta;
|
|
8624
8664
|
this.kind = CompilationJobKind.Tmpl;
|
|
8625
8665
|
this.fnSuffix = "Template";
|
|
8626
8666
|
this.views = /* @__PURE__ */ new Map();
|
|
@@ -8703,7 +8743,7 @@ var HostBindingCompilationUnit = class extends CompilationUnit {
|
|
|
8703
8743
|
}
|
|
8704
8744
|
};
|
|
8705
8745
|
|
|
8706
|
-
// bazel-out/
|
|
8746
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
|
|
8707
8747
|
function deleteAnyCasts(job) {
|
|
8708
8748
|
for (const unit of job.units) {
|
|
8709
8749
|
for (const op of unit.ops()) {
|
|
@@ -8721,12 +8761,12 @@ function removeAnys(e) {
|
|
|
8721
8761
|
return e;
|
|
8722
8762
|
}
|
|
8723
8763
|
|
|
8724
|
-
// bazel-out/
|
|
8764
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
|
|
8725
8765
|
function applyI18nExpressions(job) {
|
|
8726
8766
|
for (const unit of job.units) {
|
|
8727
8767
|
for (const op of unit.update) {
|
|
8728
8768
|
if (op.kind === OpKind.I18nExpression && needsApplication(op)) {
|
|
8729
|
-
OpList.insertAfter(createI18nApplyOp(op.
|
|
8769
|
+
OpList.insertAfter(createI18nApplyOp(op.target, op.handle, null), op);
|
|
8730
8770
|
}
|
|
8731
8771
|
}
|
|
8732
8772
|
}
|
|
@@ -8736,34 +8776,46 @@ function needsApplication(op) {
|
|
|
8736
8776
|
if (((_a2 = op.next) == null ? void 0 : _a2.kind) !== OpKind.I18nExpression) {
|
|
8737
8777
|
return true;
|
|
8738
8778
|
}
|
|
8739
|
-
if (op.next.
|
|
8779
|
+
if (op.next.context !== op.context) {
|
|
8740
8780
|
return true;
|
|
8741
8781
|
}
|
|
8742
8782
|
return false;
|
|
8743
8783
|
}
|
|
8744
8784
|
|
|
8745
|
-
// bazel-out/
|
|
8785
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs
|
|
8746
8786
|
function assignI18nSlotDependencies(job) {
|
|
8747
8787
|
const i18nLastSlotConsumers = /* @__PURE__ */ new Map();
|
|
8788
|
+
const i18nContexts = /* @__PURE__ */ new Map();
|
|
8748
8789
|
let lastSlotConsumer = null;
|
|
8790
|
+
let currentI18nOp = null;
|
|
8749
8791
|
for (const unit of job.units) {
|
|
8750
8792
|
for (const op of unit.create) {
|
|
8751
|
-
if (op.kind === OpKind.I18nEnd) {
|
|
8752
|
-
i18nLastSlotConsumers.set(op.xref, lastSlotConsumer);
|
|
8753
|
-
}
|
|
8754
8793
|
if (hasConsumesSlotTrait(op)) {
|
|
8755
8794
|
lastSlotConsumer = op.xref;
|
|
8756
8795
|
}
|
|
8796
|
+
switch (op.kind) {
|
|
8797
|
+
case OpKind.I18nStart:
|
|
8798
|
+
currentI18nOp = op;
|
|
8799
|
+
break;
|
|
8800
|
+
case OpKind.I18nEnd:
|
|
8801
|
+
i18nLastSlotConsumers.set(currentI18nOp.xref, lastSlotConsumer);
|
|
8802
|
+
currentI18nOp = null;
|
|
8803
|
+
break;
|
|
8804
|
+
case OpKind.I18nContext:
|
|
8805
|
+
i18nContexts.set(op.xref, op);
|
|
8806
|
+
break;
|
|
8807
|
+
}
|
|
8757
8808
|
}
|
|
8758
8809
|
for (const op of unit.update) {
|
|
8759
8810
|
if (op.kind === OpKind.I18nExpression) {
|
|
8760
|
-
|
|
8811
|
+
const i18nContext = i18nContexts.get(op.context);
|
|
8812
|
+
op.target = i18nLastSlotConsumers.get(i18nContext.i18nBlock);
|
|
8761
8813
|
}
|
|
8762
8814
|
}
|
|
8763
8815
|
}
|
|
8764
8816
|
}
|
|
8765
8817
|
|
|
8766
|
-
// bazel-out/
|
|
8818
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
|
|
8767
8819
|
function createOpXrefMap(unit) {
|
|
8768
8820
|
const map = /* @__PURE__ */ new Map();
|
|
8769
8821
|
for (const op of unit.create) {
|
|
@@ -8775,7 +8827,7 @@ function createOpXrefMap(unit) {
|
|
|
8775
8827
|
return map;
|
|
8776
8828
|
}
|
|
8777
8829
|
|
|
8778
|
-
// bazel-out/
|
|
8830
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
|
|
8779
8831
|
function extractAttributes(job) {
|
|
8780
8832
|
for (const unit of job.units) {
|
|
8781
8833
|
const elements = createOpXrefMap(unit);
|
|
@@ -8842,7 +8894,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
8842
8894
|
}
|
|
8843
8895
|
}
|
|
8844
8896
|
|
|
8845
|
-
// bazel-out/
|
|
8897
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
|
|
8846
8898
|
function lookupElement2(elements, xref) {
|
|
8847
8899
|
const el = elements.get(xref);
|
|
8848
8900
|
if (el === void 0) {
|
|
@@ -8892,7 +8944,7 @@ function specializeBindings(job) {
|
|
|
8892
8944
|
}
|
|
8893
8945
|
}
|
|
8894
8946
|
|
|
8895
|
-
// bazel-out/
|
|
8947
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
|
|
8896
8948
|
var CHAINABLE = /* @__PURE__ */ new Set([
|
|
8897
8949
|
Identifiers.attribute,
|
|
8898
8950
|
Identifiers.classProp,
|
|
@@ -8958,7 +9010,7 @@ function chainOperationsInList(opList) {
|
|
|
8958
9010
|
}
|
|
8959
9011
|
}
|
|
8960
9012
|
|
|
8961
|
-
// bazel-out/
|
|
9013
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/collapse_singleton_interpolations.mjs
|
|
8962
9014
|
function collapseSingletonInterpolations(job) {
|
|
8963
9015
|
for (const unit of job.units) {
|
|
8964
9016
|
for (const op of unit.update) {
|
|
@@ -8970,7 +9022,7 @@ function collapseSingletonInterpolations(job) {
|
|
|
8970
9022
|
}
|
|
8971
9023
|
}
|
|
8972
9024
|
|
|
8973
|
-
// bazel-out/
|
|
9025
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
|
|
8974
9026
|
function generateConditionalExpressions(job) {
|
|
8975
9027
|
for (const unit of job.units) {
|
|
8976
9028
|
for (const op of unit.ops()) {
|
|
@@ -9007,7 +9059,7 @@ function generateConditionalExpressions(job) {
|
|
|
9007
9059
|
}
|
|
9008
9060
|
}
|
|
9009
9061
|
|
|
9010
|
-
// bazel-out/
|
|
9062
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/tags.mjs
|
|
9011
9063
|
var TagContentType;
|
|
9012
9064
|
(function(TagContentType2) {
|
|
9013
9065
|
TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
|
|
@@ -9040,7 +9092,7 @@ function mergeNsAndName(prefix, localName) {
|
|
|
9040
9092
|
return prefix ? `:${prefix}:${localName}` : localName;
|
|
9041
9093
|
}
|
|
9042
9094
|
|
|
9043
|
-
// bazel-out/
|
|
9095
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
9044
9096
|
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
9045
9097
|
["&&", BinaryOperator.And],
|
|
9046
9098
|
[">", BinaryOperator.Bigger],
|
|
@@ -9090,7 +9142,7 @@ function literalOrArrayLiteral(value) {
|
|
|
9090
9142
|
return literal(value);
|
|
9091
9143
|
}
|
|
9092
9144
|
|
|
9093
|
-
// bazel-out/
|
|
9145
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
|
|
9094
9146
|
function collectElementConsts(job) {
|
|
9095
9147
|
const allElementAttributes = /* @__PURE__ */ new Map();
|
|
9096
9148
|
for (const unit of job.units) {
|
|
@@ -9224,7 +9276,114 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
|
|
|
9224
9276
|
return literalArr(attrArray);
|
|
9225
9277
|
}
|
|
9226
9278
|
|
|
9227
|
-
// bazel-out/
|
|
9279
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_defer_deps_fns.mjs
|
|
9280
|
+
function createDeferDepsFns(job) {
|
|
9281
|
+
for (const unit of job.units) {
|
|
9282
|
+
for (const op of unit.create) {
|
|
9283
|
+
if (op.kind === OpKind.Defer) {
|
|
9284
|
+
if (op.metadata.deps.length === 0) {
|
|
9285
|
+
continue;
|
|
9286
|
+
}
|
|
9287
|
+
const dependencies = [];
|
|
9288
|
+
for (const dep of op.metadata.deps) {
|
|
9289
|
+
if (dep.isDeferrable) {
|
|
9290
|
+
const innerFn = arrowFn([new FnParam("m", DYNAMIC_TYPE)], variable("m").prop(dep.symbolName));
|
|
9291
|
+
const importExpr2 = new DynamicImportExpr(dep.importPath).prop("then").callFn([innerFn]);
|
|
9292
|
+
dependencies.push(importExpr2);
|
|
9293
|
+
} else {
|
|
9294
|
+
dependencies.push(dep.type);
|
|
9295
|
+
}
|
|
9296
|
+
}
|
|
9297
|
+
const depsFnExpr = arrowFn([], literalArr(dependencies));
|
|
9298
|
+
if (op.handle.slot === null) {
|
|
9299
|
+
throw new Error("AssertionError: slot must be assigned bfore extracting defer deps functions");
|
|
9300
|
+
}
|
|
9301
|
+
op.resolverFn = job.pool.getSharedFunctionReference(depsFnExpr, `${job.componentName}_Defer_${op.handle.slot}_DepsFn`);
|
|
9302
|
+
}
|
|
9303
|
+
}
|
|
9304
|
+
}
|
|
9305
|
+
}
|
|
9306
|
+
|
|
9307
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_i18n_contexts.mjs
|
|
9308
|
+
function createI18nContexts(job) {
|
|
9309
|
+
let currentI18nOp = null;
|
|
9310
|
+
let xref;
|
|
9311
|
+
for (const unit of job.units) {
|
|
9312
|
+
for (const op of unit.create) {
|
|
9313
|
+
switch (op.kind) {
|
|
9314
|
+
case OpKind.I18nStart:
|
|
9315
|
+
xref = job.allocateXrefId();
|
|
9316
|
+
unit.create.push(createI18nContextOp(xref, op.xref, op.message, null));
|
|
9317
|
+
op.context = xref;
|
|
9318
|
+
currentI18nOp = op;
|
|
9319
|
+
break;
|
|
9320
|
+
case OpKind.I18nEnd:
|
|
9321
|
+
currentI18nOp = null;
|
|
9322
|
+
break;
|
|
9323
|
+
case OpKind.Icu:
|
|
9324
|
+
if (currentI18nOp === null) {
|
|
9325
|
+
throw Error("Unexpected ICU outside of an i18n block.");
|
|
9326
|
+
}
|
|
9327
|
+
if (op.message.id !== currentI18nOp.message.id) {
|
|
9328
|
+
xref = job.allocateXrefId();
|
|
9329
|
+
unit.create.push(createI18nContextOp(xref, currentI18nOp.xref, op.message, null));
|
|
9330
|
+
op.context = xref;
|
|
9331
|
+
} else {
|
|
9332
|
+
op.context = currentI18nOp.context;
|
|
9333
|
+
}
|
|
9334
|
+
break;
|
|
9335
|
+
}
|
|
9336
|
+
}
|
|
9337
|
+
}
|
|
9338
|
+
}
|
|
9339
|
+
|
|
9340
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_i18n_icu_expressions.mjs
|
|
9341
|
+
function createI18nIcuExpressions(job) {
|
|
9342
|
+
const icus = /* @__PURE__ */ new Map();
|
|
9343
|
+
const i18nContexts = /* @__PURE__ */ new Map();
|
|
9344
|
+
const i18nBlocks = /* @__PURE__ */ new Map();
|
|
9345
|
+
for (const unit of job.units) {
|
|
9346
|
+
for (const op of unit.create) {
|
|
9347
|
+
switch (op.kind) {
|
|
9348
|
+
case OpKind.Icu:
|
|
9349
|
+
icus.set(op.xref, op);
|
|
9350
|
+
break;
|
|
9351
|
+
case OpKind.I18nContext:
|
|
9352
|
+
i18nContexts.set(op.xref, op);
|
|
9353
|
+
break;
|
|
9354
|
+
case OpKind.I18nStart:
|
|
9355
|
+
i18nBlocks.set(op.xref, op);
|
|
9356
|
+
break;
|
|
9357
|
+
}
|
|
9358
|
+
}
|
|
9359
|
+
for (const op of unit.update) {
|
|
9360
|
+
switch (op.kind) {
|
|
9361
|
+
case OpKind.IcuUpdate:
|
|
9362
|
+
const icuOp = icus.get(op.xref);
|
|
9363
|
+
if ((icuOp == null ? void 0 : icuOp.icu.expressionPlaceholder) === void 0) {
|
|
9364
|
+
throw Error("ICU should have an i18n placeholder");
|
|
9365
|
+
}
|
|
9366
|
+
if (icuOp.context === null) {
|
|
9367
|
+
throw Error("ICU should have its i18n context set");
|
|
9368
|
+
}
|
|
9369
|
+
const i18nContext = i18nContexts.get(icuOp.context);
|
|
9370
|
+
const i18nBlock = i18nBlocks.get(i18nContext.i18nBlock);
|
|
9371
|
+
OpList.replace(op, createI18nExpressionOp(
|
|
9372
|
+
i18nContext.xref,
|
|
9373
|
+
i18nBlock.xref,
|
|
9374
|
+
i18nBlock.handle,
|
|
9375
|
+
new LexicalReadExpr(icuOp.icu.expression),
|
|
9376
|
+
icuOp.icu.expressionPlaceholder,
|
|
9377
|
+
I18nParamResolutionTime.Postproccessing,
|
|
9378
|
+
null
|
|
9379
|
+
));
|
|
9380
|
+
break;
|
|
9381
|
+
}
|
|
9382
|
+
}
|
|
9383
|
+
}
|
|
9384
|
+
}
|
|
9385
|
+
|
|
9386
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_configs.mjs
|
|
9228
9387
|
function configureDeferInstructions(job) {
|
|
9229
9388
|
for (const unit of job.units) {
|
|
9230
9389
|
for (const op of unit.create) {
|
|
@@ -9241,7 +9400,7 @@ function configureDeferInstructions(job) {
|
|
|
9241
9400
|
}
|
|
9242
9401
|
}
|
|
9243
9402
|
|
|
9244
|
-
// bazel-out/
|
|
9403
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_resolve_targets.mjs
|
|
9245
9404
|
function resolveDeferTargetNames(job) {
|
|
9246
9405
|
const scopes = /* @__PURE__ */ new Map();
|
|
9247
9406
|
function getScopeForView2(view) {
|
|
@@ -9276,6 +9435,22 @@ function resolveDeferTargetNames(job) {
|
|
|
9276
9435
|
case DeferTriggerKind.Interaction:
|
|
9277
9436
|
case DeferTriggerKind.Viewport:
|
|
9278
9437
|
if (op.trigger.targetName === null) {
|
|
9438
|
+
if (placeholderView === null) {
|
|
9439
|
+
throw new Error("defer on trigger with no target name must have a placeholder block");
|
|
9440
|
+
}
|
|
9441
|
+
const placeholder = job.views.get(placeholderView);
|
|
9442
|
+
if (placeholder == void 0) {
|
|
9443
|
+
throw new Error("AssertionError: could not find placeholder view for defer on trigger");
|
|
9444
|
+
}
|
|
9445
|
+
for (const placeholderOp of placeholder.create) {
|
|
9446
|
+
if (hasConsumesSlotTrait(placeholderOp) && (isElementOrContainerOp(placeholderOp) || placeholderOp.kind === OpKind.Projection)) {
|
|
9447
|
+
op.trigger.targetXref = placeholderOp.xref;
|
|
9448
|
+
op.trigger.targetView = placeholderView;
|
|
9449
|
+
op.trigger.targetSlotViewSteps = -1;
|
|
9450
|
+
op.trigger.targetSlot = placeholderOp.handle;
|
|
9451
|
+
return;
|
|
9452
|
+
}
|
|
9453
|
+
}
|
|
9279
9454
|
return;
|
|
9280
9455
|
}
|
|
9281
9456
|
let view = placeholderView !== null ? job.views.get(placeholderView) : deferOwnerView;
|
|
@@ -9319,7 +9494,7 @@ var Scope = class {
|
|
|
9319
9494
|
}
|
|
9320
9495
|
};
|
|
9321
9496
|
|
|
9322
|
-
// bazel-out/
|
|
9497
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
|
|
9323
9498
|
var REPLACEMENTS = /* @__PURE__ */ new Map([
|
|
9324
9499
|
[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
|
|
9325
9500
|
[OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],
|
|
@@ -9346,7 +9521,7 @@ function collapseEmptyInstructions(job) {
|
|
|
9346
9521
|
}
|
|
9347
9522
|
}
|
|
9348
9523
|
|
|
9349
|
-
// bazel-out/
|
|
9524
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
|
|
9350
9525
|
function expandSafeReads(job) {
|
|
9351
9526
|
for (const unit of job.units) {
|
|
9352
9527
|
for (const op of unit.ops()) {
|
|
@@ -9482,7 +9657,7 @@ function ternaryTransform(e) {
|
|
|
9482
9657
|
return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
|
|
9483
9658
|
}
|
|
9484
9659
|
|
|
9485
|
-
// bazel-out/
|
|
9660
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/extract_i18n_messages.mjs
|
|
9486
9661
|
var ESCAPE = "\uFFFD";
|
|
9487
9662
|
var ELEMENT_MARKER = "#";
|
|
9488
9663
|
var TEMPLATE_MARKER = "*";
|
|
@@ -9491,24 +9666,61 @@ var CONTEXT_MARKER = ":";
|
|
|
9491
9666
|
var LIST_START_MARKER = "[";
|
|
9492
9667
|
var LIST_END_MARKER = "]";
|
|
9493
9668
|
var LIST_DELIMITER = "|";
|
|
9494
|
-
function
|
|
9669
|
+
function extractI18nMessages(job) {
|
|
9670
|
+
const i18nContexts = /* @__PURE__ */ new Map();
|
|
9671
|
+
const i18nBlockContexts = /* @__PURE__ */ new Set();
|
|
9495
9672
|
for (const unit of job.units) {
|
|
9496
9673
|
for (const op of unit.create) {
|
|
9497
|
-
|
|
9498
|
-
|
|
9499
|
-
op.
|
|
9500
|
-
|
|
9501
|
-
|
|
9502
|
-
|
|
9503
|
-
|
|
9504
|
-
|
|
9505
|
-
|
|
9506
|
-
|
|
9674
|
+
switch (op.kind) {
|
|
9675
|
+
case OpKind.I18nContext:
|
|
9676
|
+
i18nContexts.set(op.xref, op);
|
|
9677
|
+
break;
|
|
9678
|
+
case OpKind.I18nStart:
|
|
9679
|
+
i18nBlockContexts.add(op.context);
|
|
9680
|
+
break;
|
|
9681
|
+
}
|
|
9682
|
+
}
|
|
9683
|
+
}
|
|
9684
|
+
const i18nBlockMessages = /* @__PURE__ */ new Map();
|
|
9685
|
+
for (const unit of job.units) {
|
|
9686
|
+
for (const op of unit.create) {
|
|
9687
|
+
if (op.kind === OpKind.I18nStart && op.xref === op.root) {
|
|
9688
|
+
if (!op.context) {
|
|
9689
|
+
throw Error("I18n start op should have its context set.");
|
|
9690
|
+
}
|
|
9691
|
+
const i18nMessageOp = createI18nMessage(job, i18nContexts.get(op.context));
|
|
9692
|
+
i18nBlockMessages.set(op.xref, i18nMessageOp);
|
|
9693
|
+
unit.create.push(i18nMessageOp);
|
|
9694
|
+
}
|
|
9695
|
+
}
|
|
9696
|
+
}
|
|
9697
|
+
for (const unit of job.units) {
|
|
9698
|
+
for (const op of unit.create) {
|
|
9699
|
+
if (op.kind === OpKind.Icu) {
|
|
9700
|
+
if (!op.context) {
|
|
9701
|
+
throw Error("ICU op should have its context set.");
|
|
9702
|
+
}
|
|
9703
|
+
if (!i18nBlockContexts.has(op.context)) {
|
|
9704
|
+
const i18nContext = i18nContexts.get(op.context);
|
|
9705
|
+
const subMessage = createI18nMessage(job, i18nContext, op.messagePlaceholder);
|
|
9706
|
+
unit.create.push(subMessage);
|
|
9707
|
+
const parentMessage = i18nBlockMessages.get(i18nContext.i18nBlock);
|
|
9708
|
+
parentMessage == null ? void 0 : parentMessage.subMessages.push(subMessage.xref);
|
|
9507
9709
|
}
|
|
9710
|
+
OpList.remove(op);
|
|
9508
9711
|
}
|
|
9509
9712
|
}
|
|
9510
9713
|
}
|
|
9511
9714
|
}
|
|
9715
|
+
function createI18nMessage(job, context, messagePlaceholder) {
|
|
9716
|
+
let needsPostprocessing = context.postprocessingParams.size > 0;
|
|
9717
|
+
for (const values of context.params.values()) {
|
|
9718
|
+
if (values.length > 1) {
|
|
9719
|
+
needsPostprocessing = true;
|
|
9720
|
+
}
|
|
9721
|
+
}
|
|
9722
|
+
return createI18nMessageOp(job.allocateXrefId(), context.i18nBlock, context.message, messagePlaceholder != null ? messagePlaceholder : null, formatParams(context.params), formatParams(context.postprocessingParams), needsPostprocessing);
|
|
9723
|
+
}
|
|
9512
9724
|
function formatParams(params) {
|
|
9513
9725
|
const result = /* @__PURE__ */ new Map();
|
|
9514
9726
|
for (const [placeholder, placeholderValues] of [...params].sort()) {
|
|
@@ -9544,7 +9756,7 @@ function formatValue(value) {
|
|
|
9544
9756
|
return `${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
9545
9757
|
}
|
|
9546
9758
|
|
|
9547
|
-
// bazel-out/
|
|
9759
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
|
|
9548
9760
|
function generateAdvance(job) {
|
|
9549
9761
|
for (const unit of job.units) {
|
|
9550
9762
|
const slotMap = /* @__PURE__ */ new Map();
|
|
@@ -9576,7 +9788,7 @@ function generateAdvance(job) {
|
|
|
9576
9788
|
}
|
|
9577
9789
|
}
|
|
9578
9790
|
|
|
9579
|
-
// bazel-out/
|
|
9791
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
|
|
9580
9792
|
function generateProjectionDefs(job) {
|
|
9581
9793
|
const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;
|
|
9582
9794
|
const selectors = [];
|
|
@@ -9600,7 +9812,7 @@ function generateProjectionDefs(job) {
|
|
|
9600
9812
|
}
|
|
9601
9813
|
}
|
|
9602
9814
|
|
|
9603
|
-
// bazel-out/
|
|
9815
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
|
|
9604
9816
|
function generateVariables(job) {
|
|
9605
9817
|
recursivelyProcessView(job.root, null);
|
|
9606
9818
|
}
|
|
@@ -9688,7 +9900,7 @@ function generateVariablesInScopeForView(view, scope) {
|
|
|
9688
9900
|
return newOps;
|
|
9689
9901
|
}
|
|
9690
9902
|
|
|
9691
|
-
// bazel-out/
|
|
9903
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_expression_collection.mjs
|
|
9692
9904
|
function collectConstExpressions(job) {
|
|
9693
9905
|
for (const unit of job.units) {
|
|
9694
9906
|
for (const op of unit.ops()) {
|
|
@@ -9702,7 +9914,7 @@ function collectConstExpressions(job) {
|
|
|
9702
9914
|
}
|
|
9703
9915
|
}
|
|
9704
9916
|
|
|
9705
|
-
// bazel-out/
|
|
9917
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
|
|
9706
9918
|
var STYLE_DOT = "style.";
|
|
9707
9919
|
var CLASS_DOT = "class.";
|
|
9708
9920
|
var STYLE_BANG = "style!";
|
|
@@ -9760,7 +9972,7 @@ function parseProperty(name) {
|
|
|
9760
9972
|
return { property: property2, suffix };
|
|
9761
9973
|
}
|
|
9762
9974
|
|
|
9763
|
-
// bazel-out/
|
|
9975
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/map_util.mjs
|
|
9764
9976
|
function mapLiteral(obj, quoted = false) {
|
|
9765
9977
|
return literalMap(Object.keys(obj).map((key) => ({
|
|
9766
9978
|
key,
|
|
@@ -9769,7 +9981,7 @@ function mapLiteral(obj, quoted = false) {
|
|
|
9769
9981
|
})));
|
|
9770
9982
|
}
|
|
9771
9983
|
|
|
9772
|
-
// bazel-out/
|
|
9984
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
|
|
9773
9985
|
var IcuSerializerVisitor = class {
|
|
9774
9986
|
visitText(text2) {
|
|
9775
9987
|
return text2.value;
|
|
@@ -9800,7 +10012,7 @@ function serializeIcuNode(icu) {
|
|
|
9800
10012
|
return icu.visit(serializer);
|
|
9801
10013
|
}
|
|
9802
10014
|
|
|
9803
|
-
// bazel-out/
|
|
10015
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
|
|
9804
10016
|
var TokenType;
|
|
9805
10017
|
(function(TokenType2) {
|
|
9806
10018
|
TokenType2[TokenType2["Character"] = 0] = "Character";
|
|
@@ -10161,7 +10373,7 @@ function parseIntAutoRadix(text2) {
|
|
|
10161
10373
|
return result;
|
|
10162
10374
|
}
|
|
10163
10375
|
|
|
10164
|
-
// bazel-out/
|
|
10376
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
|
|
10165
10377
|
var SplitInterpolation = class {
|
|
10166
10378
|
constructor(strings, expressions, offsets) {
|
|
10167
10379
|
this.strings = strings;
|
|
@@ -11055,7 +11267,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
|
|
|
11055
11267
|
return offsetMap;
|
|
11056
11268
|
}
|
|
11057
11269
|
|
|
11058
|
-
// bazel-out/
|
|
11270
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
|
|
11059
11271
|
var NodeWithI18n = class {
|
|
11060
11272
|
constructor(sourceSpan, i18n2) {
|
|
11061
11273
|
this.sourceSpan = sourceSpan;
|
|
@@ -11207,11 +11419,11 @@ var RecursiveVisitor = class {
|
|
|
11207
11419
|
}
|
|
11208
11420
|
};
|
|
11209
11421
|
|
|
11210
|
-
// bazel-out/
|
|
11422
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
|
|
11211
11423
|
var ElementSchemaRegistry = class {
|
|
11212
11424
|
};
|
|
11213
11425
|
|
|
11214
|
-
// bazel-out/
|
|
11426
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
|
|
11215
11427
|
var BOOLEAN = "boolean";
|
|
11216
11428
|
var NUMBER = "number";
|
|
11217
11429
|
var STRING = "string";
|
|
@@ -11564,7 +11776,7 @@ function _isPixelDimensionStyle(prop) {
|
|
|
11564
11776
|
}
|
|
11565
11777
|
}
|
|
11566
11778
|
|
|
11567
|
-
// bazel-out/
|
|
11779
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
|
|
11568
11780
|
var HtmlTagDefinition = class {
|
|
11569
11781
|
constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false } = {}) {
|
|
11570
11782
|
this.closedByChildren = {};
|
|
@@ -11682,7 +11894,7 @@ function getHtmlTagDefinition(tagName) {
|
|
|
11682
11894
|
return (_b2 = (_a2 = TAG_DEFINITIONS[tagName]) != null ? _a2 : TAG_DEFINITIONS[tagName.toLowerCase()]) != null ? _b2 : DEFAULT_TAG_DEFINITION;
|
|
11683
11895
|
}
|
|
11684
11896
|
|
|
11685
|
-
// bazel-out/
|
|
11897
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
|
|
11686
11898
|
var TAG_TO_PLACEHOLDER_NAMES = {
|
|
11687
11899
|
"A": "LINK",
|
|
11688
11900
|
"B": "BOLD_TEXT",
|
|
@@ -11776,7 +11988,7 @@ var PlaceholderRegistry = class {
|
|
|
11776
11988
|
}
|
|
11777
11989
|
};
|
|
11778
11990
|
|
|
11779
|
-
// bazel-out/
|
|
11991
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
|
|
11780
11992
|
var _expParser = new Parser(new Lexer());
|
|
11781
11993
|
function createI18nMessageFactory(interpolationConfig) {
|
|
11782
11994
|
const visitor = new _I18nVisitor(_expParser, interpolationConfig);
|
|
@@ -11938,14 +12150,14 @@ function extractPlaceholderName(input) {
|
|
|
11938
12150
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
11939
12151
|
}
|
|
11940
12152
|
|
|
11941
|
-
// bazel-out/
|
|
12153
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
|
|
11942
12154
|
var I18nError = class extends ParseError {
|
|
11943
12155
|
constructor(span, msg) {
|
|
11944
12156
|
super(span, msg);
|
|
11945
12157
|
}
|
|
11946
12158
|
};
|
|
11947
12159
|
|
|
11948
|
-
// bazel-out/
|
|
12160
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
|
|
11949
12161
|
var NAMED_ENTITIES = {
|
|
11950
12162
|
"AElig": "\xC6",
|
|
11951
12163
|
"AMP": "&",
|
|
@@ -14076,7 +14288,7 @@ var NAMED_ENTITIES = {
|
|
|
14076
14288
|
var NGSP_UNICODE = "\uE500";
|
|
14077
14289
|
NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
|
|
14078
14290
|
|
|
14079
|
-
// bazel-out/
|
|
14291
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
|
|
14080
14292
|
var TokenError = class extends ParseError {
|
|
14081
14293
|
constructor(errorMsg, tokenType, span) {
|
|
14082
14294
|
super(span, errorMsg);
|
|
@@ -14997,7 +15209,7 @@ var CursorError = class {
|
|
|
14997
15209
|
}
|
|
14998
15210
|
};
|
|
14999
15211
|
|
|
15000
|
-
// bazel-out/
|
|
15212
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
|
|
15001
15213
|
var TreeError = class extends ParseError {
|
|
15002
15214
|
static create(elementName, span, msg) {
|
|
15003
15215
|
return new TreeError(elementName, span, msg);
|
|
@@ -15381,7 +15593,7 @@ function decodeEntity(match, entity) {
|
|
|
15381
15593
|
return match;
|
|
15382
15594
|
}
|
|
15383
15595
|
|
|
15384
|
-
// bazel-out/
|
|
15596
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
|
|
15385
15597
|
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
|
|
15386
15598
|
"iframe|srcdoc",
|
|
15387
15599
|
"*|innerhtml",
|
|
@@ -15396,7 +15608,7 @@ function isTrustedTypesSink(tagName, propName) {
|
|
|
15396
15608
|
return TRUSTED_TYPES_SINKS.has(tagName + "|" + propName) || TRUSTED_TYPES_SINKS.has("*|" + propName);
|
|
15397
15609
|
}
|
|
15398
15610
|
|
|
15399
|
-
// bazel-out/
|
|
15611
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
|
|
15400
15612
|
var setI18nRefs = (htmlNode, i18nNode) => {
|
|
15401
15613
|
if (htmlNode instanceof NodeWithI18n) {
|
|
15402
15614
|
if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {
|
|
@@ -15416,8 +15628,8 @@ var I18nMetaVisitor = class {
|
|
|
15416
15628
|
}
|
|
15417
15629
|
_generateI18nMessage(nodes, meta = "", visitNodeFn) {
|
|
15418
15630
|
const { meaning, description, customId } = this._parseMetadata(meta);
|
|
15419
|
-
const
|
|
15420
|
-
const message =
|
|
15631
|
+
const createI18nMessage2 = createI18nMessageFactory(this.interpolationConfig);
|
|
15632
|
+
const message = createI18nMessage2(nodes, meaning, description, customId, visitNodeFn);
|
|
15421
15633
|
this._setMessageId(message, meta);
|
|
15422
15634
|
this._setLegacyIds(message, meta);
|
|
15423
15635
|
return message;
|
|
@@ -15552,7 +15764,7 @@ function i18nMetaToJSDoc(meta) {
|
|
|
15552
15764
|
return jsDocComment(tags);
|
|
15553
15765
|
}
|
|
15554
15766
|
|
|
15555
|
-
// bazel-out/
|
|
15767
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
|
|
15556
15768
|
var GOOG_GET_MSG = "goog.getMsg";
|
|
15557
15769
|
function createGoogleGetMsgStatements(variable2, message, closureVar, placeholderValues) {
|
|
15558
15770
|
const messageString = serializeI18nMessageForGetMsg(message);
|
|
@@ -15600,7 +15812,7 @@ function serializeI18nMessageForGetMsg(message) {
|
|
|
15600
15812
|
return message.nodes.map((node) => node.visit(serializerVisitor2, null)).join("");
|
|
15601
15813
|
}
|
|
15602
15814
|
|
|
15603
|
-
// bazel-out/
|
|
15815
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
|
|
15604
15816
|
function createLocalizeStatements(variable2, message, params) {
|
|
15605
15817
|
const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);
|
|
15606
15818
|
const sourceSpan = getSourceSpan(message);
|
|
@@ -15683,34 +15895,27 @@ function createEmptyMessagePart(location) {
|
|
|
15683
15895
|
return new LiteralPiece("", new ParseSourceSpan(location, location));
|
|
15684
15896
|
}
|
|
15685
15897
|
|
|
15686
|
-
// bazel-out/
|
|
15898
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
|
|
15687
15899
|
var NG_I18N_CLOSURE_MODE = "ngI18nClosureMode";
|
|
15688
15900
|
var TRANSLATION_VAR_PREFIX2 = "i18n_";
|
|
15689
15901
|
function collectI18nConsts(job) {
|
|
15690
15902
|
const fileBasedI18nSuffix = job.relativeContextFilePath.replace(/[^A-Za-z0-9]/g, "_").toUpperCase() + "_";
|
|
15691
15903
|
const messageConstIndices = /* @__PURE__ */ new Map();
|
|
15904
|
+
const messages = /* @__PURE__ */ new Map();
|
|
15692
15905
|
for (const unit of job.units) {
|
|
15693
15906
|
for (const op of unit.create) {
|
|
15694
|
-
if (op.kind === OpKind.
|
|
15695
|
-
|
|
15696
|
-
assertAllParamsResolved(op);
|
|
15697
|
-
const mainVar = variable(job.pool.uniqueName(TRANSLATION_VAR_PREFIX2));
|
|
15698
|
-
const closureVar = i18nGenerateClosureVar(job.pool, op.message.id, fileBasedI18nSuffix, job.i18nUseExternalIds);
|
|
15699
|
-
let transformFn = void 0;
|
|
15700
|
-
if (op.needsPostprocessing) {
|
|
15701
|
-
const extraTransformFnParams = [];
|
|
15702
|
-
if (op.formattedPostprocessingParams.size > 0) {
|
|
15703
|
-
extraTransformFnParams.push(literalMap([...op.formattedPostprocessingParams].map(([key, value]) => ({ key, value, quoted: true }))));
|
|
15704
|
-
}
|
|
15705
|
-
transformFn = (expr) => importExpr(Identifiers.i18nPostprocess).callFn([expr, ...extraTransformFnParams]);
|
|
15706
|
-
}
|
|
15707
|
-
const statements = getTranslationDeclStmts(op.message, mainVar, closureVar, op.formattedParams, transformFn);
|
|
15708
|
-
messageConstIndices.set(op.owner, job.addConst(mainVar, statements));
|
|
15709
|
-
}
|
|
15907
|
+
if (op.kind === OpKind.I18nMessage) {
|
|
15908
|
+
messages.set(op.xref, op);
|
|
15710
15909
|
OpList.remove(op);
|
|
15711
15910
|
}
|
|
15712
15911
|
}
|
|
15713
15912
|
}
|
|
15913
|
+
for (const op of messages.values()) {
|
|
15914
|
+
if (op.kind === OpKind.I18nMessage && op.messagePlaceholder === null) {
|
|
15915
|
+
const { mainVar, statements } = collectMessage(job, fileBasedI18nSuffix, messages, op);
|
|
15916
|
+
messageConstIndices.set(op.i18nBlock, job.addConst(mainVar, statements));
|
|
15917
|
+
}
|
|
15918
|
+
}
|
|
15714
15919
|
for (const unit of job.units) {
|
|
15715
15920
|
for (const op of unit.create) {
|
|
15716
15921
|
if (op.kind === OpKind.I18nStart) {
|
|
@@ -15719,6 +15924,28 @@ function collectI18nConsts(job) {
|
|
|
15719
15924
|
}
|
|
15720
15925
|
}
|
|
15721
15926
|
}
|
|
15927
|
+
function collectMessage(job, fileBasedI18nSuffix, messages, messageOp) {
|
|
15928
|
+
const statements = [];
|
|
15929
|
+
for (const subMessageId of messageOp.subMessages) {
|
|
15930
|
+
const subMessage = messages.get(subMessageId);
|
|
15931
|
+
const { mainVar: subMessageVar, statements: subMessageStatements } = collectMessage(job, fileBasedI18nSuffix, messages, subMessage);
|
|
15932
|
+
statements.push(...subMessageStatements);
|
|
15933
|
+
messageOp.params.set(subMessage.messagePlaceholder, subMessageVar);
|
|
15934
|
+
}
|
|
15935
|
+
assertAllParamsResolved(messageOp);
|
|
15936
|
+
const mainVar = variable(job.pool.uniqueName(TRANSLATION_VAR_PREFIX2));
|
|
15937
|
+
const closureVar = i18nGenerateClosureVar(job.pool, messageOp.message.id, fileBasedI18nSuffix, job.i18nUseExternalIds);
|
|
15938
|
+
let transformFn = void 0;
|
|
15939
|
+
if (messageOp.needsPostprocessing) {
|
|
15940
|
+
const extraTransformFnParams = [];
|
|
15941
|
+
if (messageOp.postprocessingParams.size > 0) {
|
|
15942
|
+
extraTransformFnParams.push(literalMap([...messageOp.postprocessingParams].map(([key, value]) => ({ key, value, quoted: true }))));
|
|
15943
|
+
}
|
|
15944
|
+
transformFn = (expr) => importExpr(Identifiers.i18nPostprocess).callFn([expr, ...extraTransformFnParams]);
|
|
15945
|
+
}
|
|
15946
|
+
statements.push(...getTranslationDeclStmts(messageOp.message, mainVar, closureVar, messageOp.params, transformFn));
|
|
15947
|
+
return { mainVar, statements };
|
|
15948
|
+
}
|
|
15722
15949
|
function getTranslationDeclStmts(message, variable2, closureVar, params, transformFn) {
|
|
15723
15950
|
const paramsObject = Object.fromEntries(params);
|
|
15724
15951
|
const statements = [
|
|
@@ -15747,52 +15974,38 @@ function i18nGenerateClosureVar(pool, messageId, fileBasedI18nSuffix, useExterna
|
|
|
15747
15974
|
return variable(name);
|
|
15748
15975
|
}
|
|
15749
15976
|
function assertAllParamsResolved(op) {
|
|
15750
|
-
if (op.formattedParams === null || op.formattedPostprocessingParams === null) {
|
|
15751
|
-
throw Error("Params should have been formatted.");
|
|
15752
|
-
}
|
|
15753
15977
|
for (const placeholder in op.message.placeholders) {
|
|
15754
|
-
if (!op.
|
|
15978
|
+
if (!op.params.has(placeholder) && !op.postprocessingParams.has(placeholder)) {
|
|
15755
15979
|
throw Error(`Failed to resolve i18n placeholder: ${placeholder}`);
|
|
15756
15980
|
}
|
|
15757
15981
|
}
|
|
15758
15982
|
for (const placeholder in op.message.placeholderToMessage) {
|
|
15759
|
-
if (!op.
|
|
15983
|
+
if (!op.params.has(placeholder) && !op.postprocessingParams.has(placeholder)) {
|
|
15760
15984
|
throw Error(`Failed to resolve i18n message placeholder: ${placeholder}`);
|
|
15761
15985
|
}
|
|
15762
15986
|
}
|
|
15763
15987
|
}
|
|
15764
15988
|
|
|
15765
|
-
// bazel-out/
|
|
15766
|
-
function extractI18nMessages(job) {
|
|
15767
|
-
for (const unit of job.units) {
|
|
15768
|
-
for (const op of unit.create) {
|
|
15769
|
-
if (op.kind === OpKind.I18nStart) {
|
|
15770
|
-
unit.create.push(createExtractedMessageOp(op.xref, op.message, op.xref === op.root));
|
|
15771
|
-
}
|
|
15772
|
-
}
|
|
15773
|
-
}
|
|
15774
|
-
}
|
|
15775
|
-
|
|
15776
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
|
|
15989
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
|
|
15777
15990
|
function extractI18nText(job) {
|
|
15778
15991
|
var _a2;
|
|
15779
15992
|
for (const unit of job.units) {
|
|
15780
|
-
let
|
|
15781
|
-
|
|
15782
|
-
const textNodes = /* @__PURE__ */ new Map();
|
|
15993
|
+
let currentI18n = null;
|
|
15994
|
+
const textNodeI18nBlocks = /* @__PURE__ */ new Map();
|
|
15783
15995
|
for (const op of unit.create) {
|
|
15784
15996
|
switch (op.kind) {
|
|
15785
15997
|
case OpKind.I18nStart:
|
|
15786
|
-
|
|
15787
|
-
|
|
15998
|
+
if (op.context === null) {
|
|
15999
|
+
throw Error("I18n op should have its context set.");
|
|
16000
|
+
}
|
|
16001
|
+
currentI18n = op;
|
|
15788
16002
|
break;
|
|
15789
16003
|
case OpKind.I18nEnd:
|
|
15790
|
-
|
|
15791
|
-
currentI18nSlot = null;
|
|
16004
|
+
currentI18n = null;
|
|
15792
16005
|
break;
|
|
15793
16006
|
case OpKind.Text:
|
|
15794
|
-
if (
|
|
15795
|
-
|
|
16007
|
+
if (currentI18n !== null) {
|
|
16008
|
+
textNodeI18nBlocks.set(op.xref, currentI18n);
|
|
15796
16009
|
OpList.remove(op);
|
|
15797
16010
|
}
|
|
15798
16011
|
break;
|
|
@@ -15801,17 +16014,15 @@ function extractI18nText(job) {
|
|
|
15801
16014
|
for (const op of unit.update) {
|
|
15802
16015
|
switch (op.kind) {
|
|
15803
16016
|
case OpKind.InterpolateText:
|
|
15804
|
-
if (!
|
|
16017
|
+
if (!textNodeI18nBlocks.has(op.target)) {
|
|
15805
16018
|
continue;
|
|
15806
16019
|
}
|
|
15807
|
-
const
|
|
16020
|
+
const i18nOp = textNodeI18nBlocks.get(op.target);
|
|
15808
16021
|
const ops = [];
|
|
15809
16022
|
for (let i = 0; i < op.interpolation.expressions.length; i++) {
|
|
15810
16023
|
const expr = op.interpolation.expressions[i];
|
|
15811
16024
|
const placeholder = op.i18nPlaceholders[i];
|
|
15812
|
-
ops.push(createI18nExpressionOp(
|
|
15813
|
-
}
|
|
15814
|
-
if (ops.length > 0) {
|
|
16025
|
+
ops.push(createI18nExpressionOp(i18nOp.context, i18nOp.xref, i18nOp.handle, expr, placeholder.name, I18nParamResolutionTime.Creation, (_a2 = expr.sourceSpan) != null ? _a2 : op.sourceSpan));
|
|
15815
16026
|
}
|
|
15816
16027
|
OpList.replaceWithMany(op, ops);
|
|
15817
16028
|
break;
|
|
@@ -15820,50 +16031,7 @@ function extractI18nText(job) {
|
|
|
15820
16031
|
}
|
|
15821
16032
|
}
|
|
15822
16033
|
|
|
15823
|
-
// bazel-out/
|
|
15824
|
-
function extractI18nICUs(job) {
|
|
15825
|
-
for (const unit of job.units) {
|
|
15826
|
-
const icus = /* @__PURE__ */ new Map();
|
|
15827
|
-
let currentI18nId = null;
|
|
15828
|
-
let currentI18nSlot = null;
|
|
15829
|
-
for (const op of unit.create) {
|
|
15830
|
-
switch (op.kind) {
|
|
15831
|
-
case OpKind.I18nStart:
|
|
15832
|
-
currentI18nId = op.xref;
|
|
15833
|
-
currentI18nSlot = op.handle;
|
|
15834
|
-
break;
|
|
15835
|
-
case OpKind.I18nEnd:
|
|
15836
|
-
currentI18nId = null;
|
|
15837
|
-
currentI18nSlot = null;
|
|
15838
|
-
break;
|
|
15839
|
-
case OpKind.Icu:
|
|
15840
|
-
if (currentI18nId === null) {
|
|
15841
|
-
throw Error("Unexpected ICU outside of an i18n block.");
|
|
15842
|
-
}
|
|
15843
|
-
icus.set(op.xref, { message: op.message, i18nBlockId: currentI18nId, i18nBlockSlot: currentI18nSlot });
|
|
15844
|
-
OpList.remove(op);
|
|
15845
|
-
break;
|
|
15846
|
-
}
|
|
15847
|
-
}
|
|
15848
|
-
for (const op of unit.update) {
|
|
15849
|
-
switch (op.kind) {
|
|
15850
|
-
case OpKind.IcuUpdate:
|
|
15851
|
-
const { message, i18nBlockId, i18nBlockSlot } = icus.get(op.xref);
|
|
15852
|
-
const icuNode = message.nodes.find((n) => n instanceof Icu2);
|
|
15853
|
-
if (icuNode === void 0) {
|
|
15854
|
-
throw Error("Could not find ICU in i18n AST");
|
|
15855
|
-
}
|
|
15856
|
-
if (icuNode.expressionPlaceholder === void 0) {
|
|
15857
|
-
throw Error("ICU is missing an i18n placeholder");
|
|
15858
|
-
}
|
|
15859
|
-
OpList.replace(op, createI18nExpressionOp(i18nBlockId, i18nBlockSlot, new LexicalReadExpr(icuNode.expression), icuNode.expressionPlaceholder, I18nParamResolutionTime.Postproccessing, null));
|
|
15860
|
-
break;
|
|
15861
|
-
}
|
|
15862
|
-
}
|
|
15863
|
-
}
|
|
15864
|
-
}
|
|
15865
|
-
|
|
15866
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
|
|
16034
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
|
|
15867
16035
|
function liftLocalRefs(job) {
|
|
15868
16036
|
for (const unit of job.units) {
|
|
15869
16037
|
for (const op of unit.create) {
|
|
@@ -15893,7 +16061,48 @@ function serializeLocalRefs(refs) {
|
|
|
15893
16061
|
return literalArr(constRefs);
|
|
15894
16062
|
}
|
|
15895
16063
|
|
|
15896
|
-
// bazel-out/
|
|
16064
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/merge_i18n_contexts.mjs
|
|
16065
|
+
function mergeI18nContexts(job) {
|
|
16066
|
+
const i18nOps = /* @__PURE__ */ new Map();
|
|
16067
|
+
const i18nContexts = /* @__PURE__ */ new Map();
|
|
16068
|
+
for (const unit of job.units) {
|
|
16069
|
+
for (const op of unit.create) {
|
|
16070
|
+
switch (op.kind) {
|
|
16071
|
+
case OpKind.I18nStart:
|
|
16072
|
+
if (!op.context) {
|
|
16073
|
+
throw Error("I18n op should have its context set.");
|
|
16074
|
+
}
|
|
16075
|
+
i18nOps.set(op.xref, op);
|
|
16076
|
+
break;
|
|
16077
|
+
case OpKind.I18nContext:
|
|
16078
|
+
i18nContexts.set(op.xref, op);
|
|
16079
|
+
break;
|
|
16080
|
+
}
|
|
16081
|
+
}
|
|
16082
|
+
}
|
|
16083
|
+
for (const childI18nOp of i18nOps.values()) {
|
|
16084
|
+
if (childI18nOp.xref !== childI18nOp.root) {
|
|
16085
|
+
const childContext = i18nContexts.get(childI18nOp.context);
|
|
16086
|
+
const rootI18nOp = i18nOps.get(childI18nOp.root);
|
|
16087
|
+
const rootContext = i18nContexts.get(rootI18nOp.context);
|
|
16088
|
+
mergeParams(rootContext.params, childContext.params);
|
|
16089
|
+
mergeParams(rootContext.postprocessingParams, childContext.postprocessingParams);
|
|
16090
|
+
}
|
|
16091
|
+
}
|
|
16092
|
+
}
|
|
16093
|
+
function mergeParams(to, from) {
|
|
16094
|
+
for (const [placeholder, fromValues] of from) {
|
|
16095
|
+
const toValues = to.get(placeholder) || [];
|
|
16096
|
+
const flags = fromValues[0].flags;
|
|
16097
|
+
if (flags & I18nParamValueFlags.CloseTag && !(flags & I18nParamValueFlags.OpenTag)) {
|
|
16098
|
+
to.set(placeholder, [...fromValues, ...toValues]);
|
|
16099
|
+
} else {
|
|
16100
|
+
to.set(placeholder, [...toValues, ...fromValues]);
|
|
16101
|
+
}
|
|
16102
|
+
}
|
|
16103
|
+
}
|
|
16104
|
+
|
|
16105
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
15897
16106
|
function emitNamespaceChanges(job) {
|
|
15898
16107
|
for (const unit of job.units) {
|
|
15899
16108
|
let activeNamespace = Namespace.HTML;
|
|
@@ -15909,7 +16118,7 @@ function emitNamespaceChanges(job) {
|
|
|
15909
16118
|
}
|
|
15910
16119
|
}
|
|
15911
16120
|
|
|
15912
|
-
// bazel-out/
|
|
16121
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/style_parser.mjs
|
|
15913
16122
|
function parse(value) {
|
|
15914
16123
|
const styles = [];
|
|
15915
16124
|
let i = 0;
|
|
@@ -15970,7 +16179,7 @@ function hyphenate2(value) {
|
|
|
15970
16179
|
}).toLowerCase();
|
|
15971
16180
|
}
|
|
15972
16181
|
|
|
15973
|
-
// bazel-out/
|
|
16182
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
|
|
15974
16183
|
function nameFunctionsAndVariables(job) {
|
|
15975
16184
|
addNamesToView(job.root, job.componentName, { index: 0 }, job.compatibility === CompatibilityMode.TemplateDefinitionBuilder);
|
|
15976
16185
|
}
|
|
@@ -16085,7 +16294,7 @@ function stripImportant(name) {
|
|
|
16085
16294
|
return name;
|
|
16086
16295
|
}
|
|
16087
16296
|
|
|
16088
|
-
// bazel-out/
|
|
16297
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
|
|
16089
16298
|
function mergeNextContextExpressions(job) {
|
|
16090
16299
|
for (const unit of job.units) {
|
|
16091
16300
|
for (const op of unit.create) {
|
|
@@ -16131,7 +16340,7 @@ function mergeNextContextsInOps(ops) {
|
|
|
16131
16340
|
}
|
|
16132
16341
|
}
|
|
16133
16342
|
|
|
16134
|
-
// bazel-out/
|
|
16343
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
|
|
16135
16344
|
var CONTAINER_TAG = "ng-container";
|
|
16136
16345
|
function generateNgContainerOps(job) {
|
|
16137
16346
|
for (const unit of job.units) {
|
|
@@ -16148,7 +16357,7 @@ function generateNgContainerOps(job) {
|
|
|
16148
16357
|
}
|
|
16149
16358
|
}
|
|
16150
16359
|
|
|
16151
|
-
// bazel-out/
|
|
16360
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
|
|
16152
16361
|
function lookupElement3(elements, xref) {
|
|
16153
16362
|
const el = elements.get(xref);
|
|
16154
16363
|
if (el === void 0) {
|
|
@@ -16178,7 +16387,7 @@ function disableBindings(job) {
|
|
|
16178
16387
|
}
|
|
16179
16388
|
}
|
|
16180
16389
|
|
|
16181
|
-
// bazel-out/
|
|
16390
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
|
|
16182
16391
|
function generateNullishCoalesceExpressions(job) {
|
|
16183
16392
|
for (const unit of job.units) {
|
|
16184
16393
|
for (const op of unit.ops()) {
|
|
@@ -16194,7 +16403,7 @@ function generateNullishCoalesceExpressions(job) {
|
|
|
16194
16403
|
}
|
|
16195
16404
|
}
|
|
16196
16405
|
|
|
16197
|
-
// bazel-out/
|
|
16406
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
|
|
16198
16407
|
function kindTest(kind) {
|
|
16199
16408
|
return (op) => op.kind === kind;
|
|
16200
16409
|
}
|
|
@@ -16268,7 +16477,7 @@ function keepLast(ops) {
|
|
|
16268
16477
|
return ops.slice(ops.length - 1);
|
|
16269
16478
|
}
|
|
16270
16479
|
|
|
16271
|
-
// bazel-out/
|
|
16480
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
|
|
16272
16481
|
function parseExtractedStyles(job) {
|
|
16273
16482
|
for (const unit of job.units) {
|
|
16274
16483
|
for (const op of unit.create) {
|
|
@@ -16291,7 +16500,7 @@ function parseExtractedStyles(job) {
|
|
|
16291
16500
|
}
|
|
16292
16501
|
}
|
|
16293
16502
|
|
|
16294
|
-
// bazel-out/
|
|
16503
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
|
|
16295
16504
|
function removeContentSelectors(job) {
|
|
16296
16505
|
for (const unit of job.units) {
|
|
16297
16506
|
const elements = createOpXrefMap(unit);
|
|
@@ -16315,7 +16524,7 @@ function lookupInXrefMap(map, xref) {
|
|
|
16315
16524
|
return el;
|
|
16316
16525
|
}
|
|
16317
16526
|
|
|
16318
|
-
// bazel-out/
|
|
16527
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
|
|
16319
16528
|
function createPipes(job) {
|
|
16320
16529
|
for (const unit of job.units) {
|
|
16321
16530
|
processPipeBindingsInView(unit);
|
|
@@ -16363,7 +16572,7 @@ function addPipeToCreationBlock(unit, afterTargetXref, binding) {
|
|
|
16363
16572
|
throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);
|
|
16364
16573
|
}
|
|
16365
16574
|
|
|
16366
|
-
// bazel-out/
|
|
16575
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
|
|
16367
16576
|
function createVariadicPipes(job) {
|
|
16368
16577
|
for (const unit of job.units) {
|
|
16369
16578
|
for (const op of unit.update) {
|
|
@@ -16380,7 +16589,7 @@ function createVariadicPipes(job) {
|
|
|
16380
16589
|
}
|
|
16381
16590
|
}
|
|
16382
16591
|
|
|
16383
|
-
// bazel-out/
|
|
16592
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs
|
|
16384
16593
|
function propagateI18nBlocks(job) {
|
|
16385
16594
|
propagateI18nBlocksToTemplates(job.root, 0);
|
|
16386
16595
|
}
|
|
@@ -16417,50 +16626,7 @@ function wrapTemplateWithI18n(unit, parentI18n) {
|
|
|
16417
16626
|
}
|
|
16418
16627
|
}
|
|
16419
16628
|
|
|
16420
|
-
// bazel-out/
|
|
16421
|
-
function propogateI18nPlaceholders(job) {
|
|
16422
|
-
const i18nOps = /* @__PURE__ */ new Map();
|
|
16423
|
-
const extractedMessageOps = /* @__PURE__ */ new Map();
|
|
16424
|
-
for (const unit of job.units) {
|
|
16425
|
-
for (const op of unit.create) {
|
|
16426
|
-
switch (op.kind) {
|
|
16427
|
-
case OpKind.I18nStart:
|
|
16428
|
-
i18nOps.set(op.xref, op);
|
|
16429
|
-
break;
|
|
16430
|
-
case OpKind.ExtractedMessage:
|
|
16431
|
-
extractedMessageOps.set(op.owner, op);
|
|
16432
|
-
break;
|
|
16433
|
-
}
|
|
16434
|
-
}
|
|
16435
|
-
}
|
|
16436
|
-
for (const [xref, childExtractedMessageOp] of extractedMessageOps) {
|
|
16437
|
-
if (!childExtractedMessageOp.isRoot) {
|
|
16438
|
-
const i18nOp = i18nOps.get(xref);
|
|
16439
|
-
if (i18nOp === void 0) {
|
|
16440
|
-
throw Error("Could not find owner i18n block for extracted message.");
|
|
16441
|
-
}
|
|
16442
|
-
const rootExtractedMessageOp = extractedMessageOps.get(i18nOp.root);
|
|
16443
|
-
if (rootExtractedMessageOp === void 0) {
|
|
16444
|
-
throw Error("Could not find extracted message op for root i18n block.");
|
|
16445
|
-
}
|
|
16446
|
-
mergeParams(rootExtractedMessageOp.params, childExtractedMessageOp.params);
|
|
16447
|
-
mergeParams(rootExtractedMessageOp.postprocessingParams, childExtractedMessageOp.postprocessingParams);
|
|
16448
|
-
}
|
|
16449
|
-
}
|
|
16450
|
-
}
|
|
16451
|
-
function mergeParams(to, from) {
|
|
16452
|
-
for (const [placeholder, fromValues] of from) {
|
|
16453
|
-
const toValues = to.get(placeholder) || [];
|
|
16454
|
-
const flags = fromValues[0].flags;
|
|
16455
|
-
if (flags & I18nParamValueFlags.CloseTag && !(flags & I18nParamValueFlags.OpenTag)) {
|
|
16456
|
-
to.set(placeholder, [...fromValues, ...toValues]);
|
|
16457
|
-
} else {
|
|
16458
|
-
to.set(placeholder, [...toValues, ...fromValues]);
|
|
16459
|
-
}
|
|
16460
|
-
}
|
|
16461
|
-
}
|
|
16462
|
-
|
|
16463
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
|
|
16629
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
|
|
16464
16630
|
function extractPureFunctions(job) {
|
|
16465
16631
|
for (const view of job.units) {
|
|
16466
16632
|
for (const op of view.ops()) {
|
|
@@ -16502,7 +16668,7 @@ var PureFunctionConstant = class extends GenericKeyFn {
|
|
|
16502
16668
|
}
|
|
16503
16669
|
};
|
|
16504
16670
|
|
|
16505
|
-
// bazel-out/
|
|
16671
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
|
|
16506
16672
|
function generatePureLiteralStructures(job) {
|
|
16507
16673
|
for (const unit of job.units) {
|
|
16508
16674
|
for (const op of unit.update) {
|
|
@@ -16549,7 +16715,7 @@ function transformLiteralMap(expr) {
|
|
|
16549
16715
|
return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
|
|
16550
16716
|
}
|
|
16551
16717
|
|
|
16552
|
-
// bazel-out/
|
|
16718
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
|
|
16553
16719
|
function element(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
16554
16720
|
return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
16555
16721
|
}
|
|
@@ -16583,13 +16749,21 @@ function elementContainer(slot, constIndex, localRefIndex, sourceSpan) {
|
|
|
16583
16749
|
function elementContainerEnd() {
|
|
16584
16750
|
return call(Identifiers.elementContainerEnd, [], null);
|
|
16585
16751
|
}
|
|
16586
|
-
function template(slot, templateFnRef, decls, vars, tag, constIndex, sourceSpan) {
|
|
16587
|
-
const args = [
|
|
16588
|
-
|
|
16589
|
-
|
|
16590
|
-
|
|
16591
|
-
|
|
16592
|
-
|
|
16752
|
+
function template(slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan) {
|
|
16753
|
+
const args = [
|
|
16754
|
+
literal(slot),
|
|
16755
|
+
templateFnRef,
|
|
16756
|
+
literal(decls),
|
|
16757
|
+
literal(vars),
|
|
16758
|
+
literal(tag),
|
|
16759
|
+
literal(constIndex)
|
|
16760
|
+
];
|
|
16761
|
+
if (localRefs !== null) {
|
|
16762
|
+
args.push(literal(localRefs));
|
|
16763
|
+
args.push(importExpr(Identifiers.templateRefExtractor));
|
|
16764
|
+
}
|
|
16765
|
+
while (args[args.length - 1].isEquivalent(NULL_EXPR)) {
|
|
16766
|
+
args.pop();
|
|
16593
16767
|
}
|
|
16594
16768
|
return call(Identifiers.templateCreate, args, sourceSpan);
|
|
16595
16769
|
}
|
|
@@ -16663,7 +16837,7 @@ function defer(selfSlot, primarySlot, dependencyResolverFn, loadingSlot, placeho
|
|
|
16663
16837
|
const args = [
|
|
16664
16838
|
literal(selfSlot),
|
|
16665
16839
|
literal(primarySlot),
|
|
16666
|
-
literal(
|
|
16840
|
+
dependencyResolverFn != null ? dependencyResolverFn : literal(null),
|
|
16667
16841
|
literal(loadingSlot),
|
|
16668
16842
|
literal(placeholderSlot),
|
|
16669
16843
|
literal(errorSlot),
|
|
@@ -16743,6 +16917,9 @@ function repeaterCreate(slot, viewFnName, decls, vars, tag, constIndex, trackByF
|
|
|
16743
16917
|
function repeater(metadataSlot, collection, sourceSpan) {
|
|
16744
16918
|
return call(Identifiers.repeater, [literal(metadataSlot), collection], sourceSpan);
|
|
16745
16919
|
}
|
|
16920
|
+
function deferWhen(prefetch, expr, sourceSpan) {
|
|
16921
|
+
return call(prefetch ? Identifiers.deferPrefetchWhen : Identifiers.deferWhen, [expr], sourceSpan);
|
|
16922
|
+
}
|
|
16746
16923
|
function i18n(slot, constIndex, subTemplateIndex) {
|
|
16747
16924
|
const args = [literal(slot), literal(constIndex)];
|
|
16748
16925
|
if (subTemplateIndex) {
|
|
@@ -17049,7 +17226,7 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
|
|
|
17049
17226
|
return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
|
|
17050
17227
|
}
|
|
17051
17228
|
|
|
17052
|
-
// bazel-out/
|
|
17229
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
|
|
17053
17230
|
var sanitizerIdentifierMap = /* @__PURE__ */ new Map([
|
|
17054
17231
|
[SanitizerFn.Html, Identifiers.sanitizeHtml],
|
|
17055
17232
|
[SanitizerFn.IframeAttribute, Identifiers.validateIframeAttribute],
|
|
@@ -17103,8 +17280,11 @@ function reifyCreateOperations(unit, ops) {
|
|
|
17103
17280
|
if (!(unit instanceof ViewCompilationUnit)) {
|
|
17104
17281
|
throw new Error(`AssertionError: must be compiling a component`);
|
|
17105
17282
|
}
|
|
17283
|
+
if (Array.isArray(op.localRefs)) {
|
|
17284
|
+
throw new Error(`AssertionError: local refs array should have been extracted into a constant`);
|
|
17285
|
+
}
|
|
17106
17286
|
const childView = unit.job.views.get(op.xref);
|
|
17107
|
-
OpList.replace(op, template(op.handle.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes, op.sourceSpan));
|
|
17287
|
+
OpList.replace(op, template(op.handle.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes, op.localRefs, op.sourceSpan));
|
|
17108
17288
|
break;
|
|
17109
17289
|
case OpKind.DisableBindings:
|
|
17110
17290
|
OpList.replace(op, disableBindings2());
|
|
@@ -17141,7 +17321,7 @@ function reifyCreateOperations(unit, ops) {
|
|
|
17141
17321
|
break;
|
|
17142
17322
|
case OpKind.Defer:
|
|
17143
17323
|
const timerScheduling = !!op.loadingMinimumTime || !!op.loadingAfterTime || !!op.placeholderMinimumTime;
|
|
17144
|
-
OpList.replace(op, defer(op.handle.slot, op.mainSlot.slot,
|
|
17324
|
+
OpList.replace(op, defer(op.handle.slot, op.mainSlot.slot, op.resolverFn, (_b2 = (_a2 = op.loadingSlot) == null ? void 0 : _a2.slot) != null ? _b2 : null, (_d2 = (_c2 = op.placeholderSlot) == null ? void 0 : _c2.slot) != null ? _d2 : null, (_f2 = (_e2 = op.errorSlot) == null ? void 0 : _e2.slot) != null ? _f2 : null, op.loadingConfig, op.placeholderConfig, timerScheduling, op.sourceSpan));
|
|
17145
17325
|
break;
|
|
17146
17326
|
case OpKind.DeferOn:
|
|
17147
17327
|
let args = [];
|
|
@@ -17254,7 +17434,7 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
17254
17434
|
OpList.replace(op, i18nExp(op.expression, op.sourceSpan));
|
|
17255
17435
|
break;
|
|
17256
17436
|
case OpKind.I18nApply:
|
|
17257
|
-
OpList.replace(op, i18nApply(op.
|
|
17437
|
+
OpList.replace(op, i18nApply(op.handle.slot, op.sourceSpan));
|
|
17258
17438
|
break;
|
|
17259
17439
|
case OpKind.InterpolateText:
|
|
17260
17440
|
OpList.replace(op, textInterpolate(op.interpolation.strings, op.interpolation.expressions, op.sourceSpan));
|
|
@@ -17295,6 +17475,9 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
17295
17475
|
case OpKind.Repeater:
|
|
17296
17476
|
OpList.replace(op, repeater(op.targetSlot.slot, op.collection, op.sourceSpan));
|
|
17297
17477
|
break;
|
|
17478
|
+
case OpKind.DeferWhen:
|
|
17479
|
+
OpList.replace(op, deferWhen(op.prefetch, op.expr, op.sourceSpan));
|
|
17480
|
+
break;
|
|
17298
17481
|
case OpKind.Statement:
|
|
17299
17482
|
break;
|
|
17300
17483
|
default:
|
|
@@ -17372,7 +17555,7 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
|
|
|
17372
17555
|
return fn(params, handlerStmts, void 0, void 0, name);
|
|
17373
17556
|
}
|
|
17374
17557
|
|
|
17375
|
-
// bazel-out/
|
|
17558
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
|
|
17376
17559
|
function removeEmptyBindings(job) {
|
|
17377
17560
|
for (const unit of job.units) {
|
|
17378
17561
|
for (const op of unit.update) {
|
|
@@ -17393,7 +17576,23 @@ function removeEmptyBindings(job) {
|
|
|
17393
17576
|
}
|
|
17394
17577
|
}
|
|
17395
17578
|
|
|
17396
|
-
// bazel-out/
|
|
17579
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_i18n_contexts.mjs
|
|
17580
|
+
function removeI18nContexts(job) {
|
|
17581
|
+
for (const unit of job.units) {
|
|
17582
|
+
for (const op of unit.create) {
|
|
17583
|
+
switch (op.kind) {
|
|
17584
|
+
case OpKind.I18nContext:
|
|
17585
|
+
OpList.remove(op);
|
|
17586
|
+
break;
|
|
17587
|
+
case OpKind.I18nStart:
|
|
17588
|
+
op.context = null;
|
|
17589
|
+
break;
|
|
17590
|
+
}
|
|
17591
|
+
}
|
|
17592
|
+
}
|
|
17593
|
+
}
|
|
17594
|
+
|
|
17595
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/repeater_derived_vars.mjs
|
|
17397
17596
|
function generateRepeaterDerivedVars(job) {
|
|
17398
17597
|
const repeaters = /* @__PURE__ */ new Map();
|
|
17399
17598
|
for (const unit of job.units) {
|
|
@@ -17425,7 +17624,7 @@ function generateRepeaterDerivedVars(job) {
|
|
|
17425
17624
|
}
|
|
17426
17625
|
}
|
|
17427
17626
|
|
|
17428
|
-
// bazel-out/
|
|
17627
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
|
|
17429
17628
|
function resolveContexts(job) {
|
|
17430
17629
|
for (const unit of job.units) {
|
|
17431
17630
|
processLexicalScope(unit, unit.create);
|
|
@@ -17466,7 +17665,7 @@ function processLexicalScope(view, ops) {
|
|
|
17466
17665
|
}
|
|
17467
17666
|
}
|
|
17468
17667
|
|
|
17469
|
-
// bazel-out/
|
|
17668
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
|
|
17470
17669
|
function resolveDollarEvent(job) {
|
|
17471
17670
|
for (const unit of job.units) {
|
|
17472
17671
|
transformDollarEvent(unit, unit.create);
|
|
@@ -17487,15 +17686,15 @@ function transformDollarEvent(unit, ops) {
|
|
|
17487
17686
|
}
|
|
17488
17687
|
}
|
|
17489
17688
|
|
|
17490
|
-
// bazel-out/
|
|
17689
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_element_placeholders.mjs
|
|
17491
17690
|
function resolveI18nElementPlaceholders(job) {
|
|
17492
|
-
const
|
|
17691
|
+
const i18nContexts = /* @__PURE__ */ new Map();
|
|
17493
17692
|
const elements = /* @__PURE__ */ new Map();
|
|
17494
17693
|
for (const unit of job.units) {
|
|
17495
17694
|
for (const op of unit.create) {
|
|
17496
17695
|
switch (op.kind) {
|
|
17497
|
-
case OpKind.
|
|
17498
|
-
|
|
17696
|
+
case OpKind.I18nContext:
|
|
17697
|
+
i18nContexts.set(op.xref, op);
|
|
17499
17698
|
break;
|
|
17500
17699
|
case OpKind.ElementStart:
|
|
17501
17700
|
elements.set(op.xref, op);
|
|
@@ -17508,10 +17707,10 @@ function resolveI18nElementPlaceholders(job) {
|
|
|
17508
17707
|
for (const op of unit.create) {
|
|
17509
17708
|
switch (op.kind) {
|
|
17510
17709
|
case OpKind.I18nStart:
|
|
17511
|
-
if (!
|
|
17512
|
-
throw Error("Could not find
|
|
17710
|
+
if (!op.context) {
|
|
17711
|
+
throw Error("Could not find i18n context for i18n op");
|
|
17513
17712
|
}
|
|
17514
|
-
currentOps = {
|
|
17713
|
+
currentOps = { i18nBlock: op, i18nContext: i18nContexts.get(op.context) };
|
|
17515
17714
|
break;
|
|
17516
17715
|
case OpKind.I18nEnd:
|
|
17517
17716
|
currentOps = null;
|
|
@@ -17526,7 +17725,7 @@ function resolveI18nElementPlaceholders(job) {
|
|
|
17526
17725
|
if (closeName === "") {
|
|
17527
17726
|
flags |= I18nParamValueFlags.CloseTag;
|
|
17528
17727
|
}
|
|
17529
|
-
addParam(currentOps.
|
|
17728
|
+
addParam(currentOps.i18nContext.params, startName, op.handle.slot, currentOps.i18nBlock.subTemplateIndex, flags);
|
|
17530
17729
|
}
|
|
17531
17730
|
break;
|
|
17532
17731
|
case OpKind.ElementEnd:
|
|
@@ -17537,7 +17736,7 @@ function resolveI18nElementPlaceholders(job) {
|
|
|
17537
17736
|
}
|
|
17538
17737
|
const { closeName } = startOp.i18nPlaceholder;
|
|
17539
17738
|
if (closeName !== "") {
|
|
17540
|
-
addParam(currentOps.
|
|
17739
|
+
addParam(currentOps.i18nContext.params, closeName, startOp.handle.slot, currentOps.i18nBlock.subTemplateIndex, I18nParamValueFlags.ElementTag | I18nParamValueFlags.CloseTag);
|
|
17541
17740
|
}
|
|
17542
17741
|
}
|
|
17543
17742
|
break;
|
|
@@ -17546,9 +17745,9 @@ function resolveI18nElementPlaceholders(job) {
|
|
|
17546
17745
|
if (currentOps === null) {
|
|
17547
17746
|
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17548
17747
|
}
|
|
17549
|
-
const subTemplateIndex = getSubTemplateIndexForTemplateTag(job, currentOps.
|
|
17550
|
-
addParam(currentOps.
|
|
17551
|
-
addParam(currentOps.
|
|
17748
|
+
const subTemplateIndex = getSubTemplateIndexForTemplateTag(job, currentOps.i18nBlock, op);
|
|
17749
|
+
addParam(currentOps.i18nContext.params, op.i18nPlaceholder.startName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag);
|
|
17750
|
+
addParam(currentOps.i18nContext.params, op.i18nPlaceholder.closeName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag);
|
|
17552
17751
|
}
|
|
17553
17752
|
break;
|
|
17554
17753
|
}
|
|
@@ -17570,18 +17769,18 @@ function addParam(params, placeholder, value, subTemplateIndex, flags = I18nPara
|
|
|
17570
17769
|
params.set(placeholder, values);
|
|
17571
17770
|
}
|
|
17572
17771
|
|
|
17573
|
-
// bazel-out/
|
|
17772
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
|
|
17574
17773
|
function resolveI18nExpressionPlaceholders(job) {
|
|
17575
|
-
const
|
|
17576
|
-
const
|
|
17774
|
+
const subTemplateIndicies = /* @__PURE__ */ new Map();
|
|
17775
|
+
const i18nContexts = /* @__PURE__ */ new Map();
|
|
17577
17776
|
for (const unit of job.units) {
|
|
17578
17777
|
for (const op of unit.create) {
|
|
17579
17778
|
switch (op.kind) {
|
|
17580
17779
|
case OpKind.I18nStart:
|
|
17581
|
-
|
|
17780
|
+
subTemplateIndicies.set(op.xref, op.subTemplateIndex);
|
|
17582
17781
|
break;
|
|
17583
|
-
case OpKind.
|
|
17584
|
-
|
|
17782
|
+
case OpKind.I18nContext:
|
|
17783
|
+
i18nContexts.set(op.xref, op);
|
|
17585
17784
|
break;
|
|
17586
17785
|
}
|
|
17587
17786
|
}
|
|
@@ -17590,30 +17789,20 @@ function resolveI18nExpressionPlaceholders(job) {
|
|
|
17590
17789
|
for (const unit of job.units) {
|
|
17591
17790
|
for (const op of unit.update) {
|
|
17592
17791
|
if (op.kind === OpKind.I18nExpression) {
|
|
17593
|
-
const
|
|
17594
|
-
|
|
17595
|
-
|
|
17596
|
-
|
|
17597
|
-
}
|
|
17598
|
-
const extractedMessageOp = extractedMessageOps.get(i18nOp.xref);
|
|
17599
|
-
if (!extractedMessageOp) {
|
|
17600
|
-
throw Error("Cannot find extracted message for i18n block");
|
|
17601
|
-
}
|
|
17602
|
-
const params = op.resolutionTime === I18nParamResolutionTime.Creation ? extractedMessageOp.params : extractedMessageOp.postprocessingParams;
|
|
17792
|
+
const index = expressionIndices.get(op.context) || 0;
|
|
17793
|
+
const i18nContext = i18nContexts.get(op.context);
|
|
17794
|
+
const subTemplateIndex = subTemplateIndicies.get(i18nContext.i18nBlock);
|
|
17795
|
+
const params = op.resolutionTime === I18nParamResolutionTime.Creation ? i18nContext.params : i18nContext.postprocessingParams;
|
|
17603
17796
|
const values = params.get(op.i18nPlaceholder) || [];
|
|
17604
|
-
values.push({
|
|
17605
|
-
value: index,
|
|
17606
|
-
subTemplateIndex: i18nOp.subTemplateIndex,
|
|
17607
|
-
flags: I18nParamValueFlags.None
|
|
17608
|
-
});
|
|
17797
|
+
values.push({ value: index, subTemplateIndex, flags: I18nParamValueFlags.None });
|
|
17609
17798
|
params.set(op.i18nPlaceholder, values);
|
|
17610
|
-
expressionIndices.set(op.
|
|
17799
|
+
expressionIndices.set(op.context, index + 1);
|
|
17611
17800
|
}
|
|
17612
17801
|
}
|
|
17613
17802
|
}
|
|
17614
17803
|
}
|
|
17615
17804
|
|
|
17616
|
-
// bazel-out/
|
|
17805
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
|
|
17617
17806
|
function resolveNames(job) {
|
|
17618
17807
|
for (const unit of job.units) {
|
|
17619
17808
|
processLexicalScope2(unit, unit.create, null);
|
|
@@ -17677,7 +17866,7 @@ function processLexicalScope2(unit, ops, savedView) {
|
|
|
17677
17866
|
}
|
|
17678
17867
|
}
|
|
17679
17868
|
|
|
17680
|
-
// bazel-out/
|
|
17869
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
|
|
17681
17870
|
var sanitizers = /* @__PURE__ */ new Map([
|
|
17682
17871
|
[SecurityContext.HTML, SanitizerFn.Html],
|
|
17683
17872
|
[SecurityContext.SCRIPT, SanitizerFn.Script],
|
|
@@ -17714,7 +17903,7 @@ function isIframeElement(op) {
|
|
|
17714
17903
|
return op.kind === OpKind.ElementStart && ((_a2 = op.tag) == null ? void 0 : _a2.toLowerCase()) === "iframe";
|
|
17715
17904
|
}
|
|
17716
17905
|
|
|
17717
|
-
// bazel-out/
|
|
17906
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
|
|
17718
17907
|
function saveAndRestoreView(job) {
|
|
17719
17908
|
for (const unit of job.units) {
|
|
17720
17909
|
unit.create.prepend([
|
|
@@ -17759,7 +17948,7 @@ function addSaveRestoreViewOperationToListener(unit, op) {
|
|
|
17759
17948
|
}
|
|
17760
17949
|
}
|
|
17761
17950
|
|
|
17762
|
-
// bazel-out/
|
|
17951
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
|
|
17763
17952
|
function allocateSlots(job) {
|
|
17764
17953
|
const slotMap = /* @__PURE__ */ new Map();
|
|
17765
17954
|
for (const unit of job.units) {
|
|
@@ -17784,7 +17973,7 @@ function allocateSlots(job) {
|
|
|
17784
17973
|
}
|
|
17785
17974
|
}
|
|
17786
17975
|
|
|
17787
|
-
// bazel-out/
|
|
17976
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
|
|
17788
17977
|
function specializeStyleBindings(job) {
|
|
17789
17978
|
for (const unit of job.units) {
|
|
17790
17979
|
for (const op of unit.update) {
|
|
@@ -17814,7 +18003,7 @@ function specializeStyleBindings(job) {
|
|
|
17814
18003
|
}
|
|
17815
18004
|
}
|
|
17816
18005
|
|
|
17817
|
-
// bazel-out/
|
|
18006
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
|
|
17818
18007
|
function generateTemporaryVariables(job) {
|
|
17819
18008
|
for (const unit of job.units) {
|
|
17820
18009
|
unit.create.prepend(generateTemporaries(unit.create));
|
|
@@ -17872,7 +18061,7 @@ function assignName(names, expr) {
|
|
|
17872
18061
|
expr.name = name;
|
|
17873
18062
|
}
|
|
17874
18063
|
|
|
17875
|
-
// bazel-out/
|
|
18064
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_generation.mjs
|
|
17876
18065
|
function generateTrackFns(job) {
|
|
17877
18066
|
for (const unit of job.units) {
|
|
17878
18067
|
for (const op of unit.create) {
|
|
@@ -17902,7 +18091,7 @@ function generateTrackFns(job) {
|
|
|
17902
18091
|
}
|
|
17903
18092
|
}
|
|
17904
18093
|
|
|
17905
|
-
// bazel-out/
|
|
18094
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_optimization.mjs
|
|
17906
18095
|
function optimizeTrackFns(job) {
|
|
17907
18096
|
for (const unit of job.units) {
|
|
17908
18097
|
for (const op of unit.create) {
|
|
@@ -17949,7 +18138,7 @@ function isTrackByFunctionCall(rootView, expr) {
|
|
|
17949
18138
|
return true;
|
|
17950
18139
|
}
|
|
17951
18140
|
|
|
17952
|
-
// bazel-out/
|
|
18141
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_variables.mjs
|
|
17953
18142
|
function generateTrackVariables(job) {
|
|
17954
18143
|
for (const unit of job.units) {
|
|
17955
18144
|
for (const op of unit.create) {
|
|
@@ -17970,7 +18159,7 @@ function generateTrackVariables(job) {
|
|
|
17970
18159
|
}
|
|
17971
18160
|
}
|
|
17972
18161
|
|
|
17973
|
-
// bazel-out/
|
|
18162
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
|
|
17974
18163
|
function countVariables(job) {
|
|
17975
18164
|
for (const unit of job.units) {
|
|
17976
18165
|
let varCount = 0;
|
|
@@ -18075,7 +18264,7 @@ function isSingletonInterpolation(expr) {
|
|
|
18075
18264
|
return true;
|
|
18076
18265
|
}
|
|
18077
18266
|
|
|
18078
|
-
// bazel-out/
|
|
18267
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
|
|
18079
18268
|
function optimizeVariables(job) {
|
|
18080
18269
|
for (const unit of job.units) {
|
|
18081
18270
|
inlineAlwaysInlineVariables(unit.create);
|
|
@@ -18325,7 +18514,7 @@ function allowConservativeInlining(decl, target) {
|
|
|
18325
18514
|
}
|
|
18326
18515
|
}
|
|
18327
18516
|
|
|
18328
|
-
// bazel-out/
|
|
18517
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/wrap_icus.mjs
|
|
18329
18518
|
function wrapI18nIcus(job) {
|
|
18330
18519
|
for (const unit of job.units) {
|
|
18331
18520
|
let currentI18nOp = null;
|
|
@@ -18349,7 +18538,7 @@ function wrapI18nIcus(job) {
|
|
|
18349
18538
|
}
|
|
18350
18539
|
}
|
|
18351
18540
|
|
|
18352
|
-
// bazel-out/
|
|
18541
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
|
|
18353
18542
|
var phases = [
|
|
18354
18543
|
{ kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },
|
|
18355
18544
|
{ kind: CompilationJobKind.Host, fn: parseHostStyleProperties },
|
|
@@ -18358,6 +18547,7 @@ var phases = [
|
|
|
18358
18547
|
{ kind: CompilationJobKind.Both, fn: specializeBindings },
|
|
18359
18548
|
{ kind: CompilationJobKind.Tmpl, fn: propagateI18nBlocks },
|
|
18360
18549
|
{ kind: CompilationJobKind.Tmpl, fn: wrapI18nIcus },
|
|
18550
|
+
{ kind: CompilationJobKind.Tmpl, fn: createI18nContexts },
|
|
18361
18551
|
{ kind: CompilationJobKind.Both, fn: extractAttributes },
|
|
18362
18552
|
{ kind: CompilationJobKind.Both, fn: parseExtractedStyles },
|
|
18363
18553
|
{ kind: CompilationJobKind.Tmpl, fn: removeEmptyBindings },
|
|
@@ -18367,7 +18557,7 @@ var phases = [
|
|
|
18367
18557
|
{ kind: CompilationJobKind.Tmpl, fn: createPipes },
|
|
18368
18558
|
{ kind: CompilationJobKind.Tmpl, fn: configureDeferInstructions },
|
|
18369
18559
|
{ kind: CompilationJobKind.Tmpl, fn: extractI18nText },
|
|
18370
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18560
|
+
{ kind: CompilationJobKind.Tmpl, fn: createI18nIcuExpressions },
|
|
18371
18561
|
{ kind: CompilationJobKind.Tmpl, fn: applyI18nExpressions },
|
|
18372
18562
|
{ kind: CompilationJobKind.Tmpl, fn: createVariadicPipes },
|
|
18373
18563
|
{ kind: CompilationJobKind.Both, fn: generatePureLiteralStructures },
|
|
@@ -18388,16 +18578,17 @@ var phases = [
|
|
|
18388
18578
|
{ kind: CompilationJobKind.Both, fn: expandSafeReads },
|
|
18389
18579
|
{ kind: CompilationJobKind.Both, fn: generateTemporaryVariables },
|
|
18390
18580
|
{ kind: CompilationJobKind.Tmpl, fn: allocateSlots },
|
|
18391
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18581
|
+
{ kind: CompilationJobKind.Tmpl, fn: createDeferDepsFns },
|
|
18392
18582
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nElementPlaceholders },
|
|
18393
18583
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nExpressionPlaceholders },
|
|
18394
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18395
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18584
|
+
{ kind: CompilationJobKind.Tmpl, fn: mergeI18nContexts },
|
|
18585
|
+
{ kind: CompilationJobKind.Tmpl, fn: extractI18nMessages },
|
|
18396
18586
|
{ kind: CompilationJobKind.Tmpl, fn: generateTrackFns },
|
|
18397
18587
|
{ kind: CompilationJobKind.Tmpl, fn: collectI18nConsts },
|
|
18398
18588
|
{ kind: CompilationJobKind.Tmpl, fn: collectConstExpressions },
|
|
18399
18589
|
{ kind: CompilationJobKind.Both, fn: collectElementConsts },
|
|
18400
18590
|
{ kind: CompilationJobKind.Tmpl, fn: assignI18nSlotDependencies },
|
|
18591
|
+
{ kind: CompilationJobKind.Tmpl, fn: removeI18nContexts },
|
|
18401
18592
|
{ kind: CompilationJobKind.Both, fn: countVariables },
|
|
18402
18593
|
{ kind: CompilationJobKind.Tmpl, fn: generateAdvance },
|
|
18403
18594
|
{ kind: CompilationJobKind.Both, fn: optimizeVariables },
|
|
@@ -18512,10 +18703,10 @@ function emitHostBindingFunction(job) {
|
|
|
18512
18703
|
);
|
|
18513
18704
|
}
|
|
18514
18705
|
|
|
18515
|
-
// bazel-out/
|
|
18706
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
|
|
18516
18707
|
var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
|
|
18517
|
-
function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds) {
|
|
18518
|
-
const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds);
|
|
18708
|
+
function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta) {
|
|
18709
|
+
const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta);
|
|
18519
18710
|
ingestNodes(job.root, template2);
|
|
18520
18711
|
return job;
|
|
18521
18712
|
}
|
|
@@ -18598,6 +18789,7 @@ function ingestNodes(unit, template2) {
|
|
|
18598
18789
|
}
|
|
18599
18790
|
}
|
|
18600
18791
|
function ingestElement(unit, element2) {
|
|
18792
|
+
var _a2;
|
|
18601
18793
|
if (element2.i18n !== void 0 && !(element2.i18n instanceof Message || element2.i18n instanceof TagPlaceholder)) {
|
|
18602
18794
|
throw Error(`Unhandled i18n metadata type for element: ${element2.i18n.constructor.name}`);
|
|
18603
18795
|
}
|
|
@@ -18608,7 +18800,7 @@ function ingestElement(unit, element2) {
|
|
|
18608
18800
|
ingestBindings(unit, startOp, element2);
|
|
18609
18801
|
ingestReferences(startOp, element2);
|
|
18610
18802
|
ingestNodes(unit, element2.children);
|
|
18611
|
-
const endOp = createElementEndOp(id, element2.endSourceSpan);
|
|
18803
|
+
const endOp = createElementEndOp(id, (_a2 = element2.endSourceSpan) != null ? _a2 : element2.startSourceSpan);
|
|
18612
18804
|
unit.create.push(endOp);
|
|
18613
18805
|
if (element2.i18n instanceof Message) {
|
|
18614
18806
|
const i18nBlockId = unit.job.allocateXrefId();
|
|
@@ -18731,12 +18923,16 @@ function ingestDeferView(unit, suffix, children, sourceSpan) {
|
|
|
18731
18923
|
}
|
|
18732
18924
|
function ingestDeferBlock(unit, deferBlock) {
|
|
18733
18925
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
18926
|
+
const blockMeta = unit.job.deferBlocksMeta.get(deferBlock);
|
|
18927
|
+
if (blockMeta === void 0) {
|
|
18928
|
+
throw new Error(`AssertionError: unable to find metadata for deferred block`);
|
|
18929
|
+
}
|
|
18734
18930
|
const main = ingestDeferView(unit, "", deferBlock.children, deferBlock.sourceSpan);
|
|
18735
18931
|
const loading = ingestDeferView(unit, "Loading", (_a2 = deferBlock.loading) == null ? void 0 : _a2.children, (_b2 = deferBlock.loading) == null ? void 0 : _b2.sourceSpan);
|
|
18736
18932
|
const placeholder = ingestDeferView(unit, "Placeholder", (_c2 = deferBlock.placeholder) == null ? void 0 : _c2.children, (_d2 = deferBlock.placeholder) == null ? void 0 : _d2.sourceSpan);
|
|
18737
18933
|
const error2 = ingestDeferView(unit, "Error", (_e2 = deferBlock.error) == null ? void 0 : _e2.children, (_f2 = deferBlock.error) == null ? void 0 : _f2.sourceSpan);
|
|
18738
18934
|
const deferXref = unit.job.allocateXrefId();
|
|
18739
|
-
const deferOp = createDeferOp(deferXref, main.xref, main.handle, deferBlock.sourceSpan);
|
|
18935
|
+
const deferOp = createDeferOp(deferXref, main.xref, main.handle, blockMeta, deferBlock.sourceSpan);
|
|
18740
18936
|
deferOp.placeholderView = (_g = placeholder == null ? void 0 : placeholder.xref) != null ? _g : null;
|
|
18741
18937
|
deferOp.placeholderSlot = (_h = placeholder == null ? void 0 : placeholder.handle) != null ? _h : null;
|
|
18742
18938
|
deferOp.loadingSlot = (_i = loading == null ? void 0 : loading.handle) != null ? _i : null;
|
|
@@ -18747,17 +18943,18 @@ function ingestDeferBlock(unit, deferBlock) {
|
|
|
18747
18943
|
unit.create.push(deferOp);
|
|
18748
18944
|
let prefetch = false;
|
|
18749
18945
|
let deferOnOps = [];
|
|
18946
|
+
let deferWhenOps = [];
|
|
18750
18947
|
for (const triggers of [deferBlock.triggers, deferBlock.prefetchTriggers]) {
|
|
18751
18948
|
if (triggers.idle !== void 0) {
|
|
18752
|
-
const deferOnOp = createDeferOnOp(deferXref, { kind: DeferTriggerKind.Idle }, prefetch,
|
|
18949
|
+
const deferOnOp = createDeferOnOp(deferXref, { kind: DeferTriggerKind.Idle }, prefetch, triggers.idle.sourceSpan);
|
|
18753
18950
|
deferOnOps.push(deferOnOp);
|
|
18754
18951
|
}
|
|
18755
18952
|
if (triggers.immediate !== void 0) {
|
|
18756
|
-
const deferOnOp = createDeferOnOp(deferXref, { kind: DeferTriggerKind.Immediate }, prefetch,
|
|
18953
|
+
const deferOnOp = createDeferOnOp(deferXref, { kind: DeferTriggerKind.Immediate }, prefetch, triggers.immediate.sourceSpan);
|
|
18757
18954
|
deferOnOps.push(deferOnOp);
|
|
18758
18955
|
}
|
|
18759
18956
|
if (triggers.timer !== void 0) {
|
|
18760
|
-
const deferOnOp = createDeferOnOp(deferXref, { kind: DeferTriggerKind.Timer, delay: triggers.timer.delay }, prefetch,
|
|
18957
|
+
const deferOnOp = createDeferOnOp(deferXref, { kind: DeferTriggerKind.Timer, delay: triggers.timer.delay }, prefetch, triggers.timer.sourceSpan);
|
|
18761
18958
|
deferOnOps.push(deferOnOp);
|
|
18762
18959
|
}
|
|
18763
18960
|
if (triggers.hover !== void 0) {
|
|
@@ -18768,7 +18965,7 @@ function ingestDeferBlock(unit, deferBlock) {
|
|
|
18768
18965
|
targetSlot: null,
|
|
18769
18966
|
targetView: null,
|
|
18770
18967
|
targetSlotViewSteps: null
|
|
18771
|
-
}, prefetch,
|
|
18968
|
+
}, prefetch, triggers.hover.sourceSpan);
|
|
18772
18969
|
deferOnOps.push(deferOnOp);
|
|
18773
18970
|
}
|
|
18774
18971
|
if (triggers.interaction !== void 0) {
|
|
@@ -18779,7 +18976,7 @@ function ingestDeferBlock(unit, deferBlock) {
|
|
|
18779
18976
|
targetSlot: null,
|
|
18780
18977
|
targetView: null,
|
|
18781
18978
|
targetSlotViewSteps: null
|
|
18782
|
-
}, prefetch,
|
|
18979
|
+
}, prefetch, triggers.interaction.sourceSpan);
|
|
18783
18980
|
deferOnOps.push(deferOnOp);
|
|
18784
18981
|
}
|
|
18785
18982
|
if (triggers.viewport !== void 0) {
|
|
@@ -18790,21 +18987,26 @@ function ingestDeferBlock(unit, deferBlock) {
|
|
|
18790
18987
|
targetSlot: null,
|
|
18791
18988
|
targetView: null,
|
|
18792
18989
|
targetSlotViewSteps: null
|
|
18793
|
-
}, prefetch,
|
|
18990
|
+
}, prefetch, triggers.viewport.sourceSpan);
|
|
18794
18991
|
deferOnOps.push(deferOnOp);
|
|
18795
18992
|
}
|
|
18796
|
-
if (
|
|
18993
|
+
if (triggers.when !== void 0) {
|
|
18994
|
+
const deferOnOp = createDeferWhenOp(deferXref, convertAst(triggers.when.value, unit.job, triggers.when.sourceSpan), prefetch, triggers.when.sourceSpan);
|
|
18995
|
+
deferWhenOps.push(deferOnOp);
|
|
18996
|
+
}
|
|
18997
|
+
if (deferOnOps.length === 0 && deferWhenOps.length === 0) {
|
|
18797
18998
|
deferOnOps.push(createDeferOnOp(deferXref, { kind: DeferTriggerKind.Idle }, false, null));
|
|
18798
18999
|
}
|
|
18799
19000
|
prefetch = true;
|
|
18800
19001
|
}
|
|
18801
19002
|
unit.create.push(deferOnOps);
|
|
19003
|
+
unit.update.push(deferWhenOps);
|
|
18802
19004
|
}
|
|
18803
19005
|
function ingestIcu(unit, icu) {
|
|
18804
19006
|
var _a2;
|
|
18805
|
-
if (icu.i18n instanceof Message) {
|
|
19007
|
+
if (icu.i18n instanceof Message && isSingleI18nIcu(icu.i18n)) {
|
|
18806
19008
|
const xref = unit.job.allocateXrefId();
|
|
18807
|
-
unit.create.push(createIcuOp(xref, icu.i18n, null));
|
|
19009
|
+
unit.create.push(createIcuOp(xref, icu.i18n, icu.i18n.nodes[0], icuFromI18nMessage(icu.i18n).name, null));
|
|
18808
19010
|
unit.update.push(createIcuUpdateOp(xref, null));
|
|
18809
19011
|
} else {
|
|
18810
19012
|
throw Error(`Unhandled i18n metadata type for ICU: ${(_a2 = icu.i18n) == null ? void 0 : _a2.constructor.name}`);
|
|
@@ -18862,6 +19064,15 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
18862
19064
|
return new ReadPropExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.name, null, convertSourceSpan(ast.span, baseSourceSpan));
|
|
18863
19065
|
}
|
|
18864
19066
|
} else if (ast instanceof PropertyWrite) {
|
|
19067
|
+
if (ast.receiver instanceof ImplicitReceiver) {
|
|
19068
|
+
return new WritePropExpr(
|
|
19069
|
+
new ContextExpr(job.root.xref),
|
|
19070
|
+
ast.name,
|
|
19071
|
+
convertAst(ast.value, job, baseSourceSpan),
|
|
19072
|
+
null,
|
|
19073
|
+
convertSourceSpan(ast.span, baseSourceSpan)
|
|
19074
|
+
);
|
|
19075
|
+
}
|
|
18865
19076
|
return new WritePropExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.name, convertAst(ast.value, job, baseSourceSpan), void 0, convertSourceSpan(ast.span, baseSourceSpan));
|
|
18866
19077
|
} else if (ast instanceof KeyedWrite) {
|
|
18867
19078
|
return new WriteKeyExpr(convertAst(ast.receiver, job, baseSourceSpan), convertAst(ast.key, job, baseSourceSpan), convertAst(ast.value, job, baseSourceSpan), void 0, convertSourceSpan(ast.span, baseSourceSpan));
|
|
@@ -18911,7 +19122,7 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
18911
19122
|
} else if (ast instanceof EmptyExpr) {
|
|
18912
19123
|
return new EmptyExpr2(convertSourceSpan(ast.span, baseSourceSpan));
|
|
18913
19124
|
} else {
|
|
18914
|
-
throw new Error(`Unhandled expression type
|
|
19125
|
+
throw new Error(`Unhandled expression type "${ast.constructor.name}" in file "${baseSourceSpan == null ? void 0 : baseSourceSpan.start.file.url}"`);
|
|
18915
19126
|
}
|
|
18916
19127
|
}
|
|
18917
19128
|
function isPlainTemplate(tmpl) {
|
|
@@ -19049,15 +19260,16 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
19049
19260
|
for (const attr of root.attributes) {
|
|
19050
19261
|
ingestBinding(unit, xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, BindingFlags.TextValue);
|
|
19051
19262
|
}
|
|
19052
|
-
|
|
19263
|
+
const tagName = root instanceof Element ? root.name : root.tagName;
|
|
19264
|
+
return tagName === "ng-template" ? null : tagName;
|
|
19053
19265
|
}
|
|
19054
19266
|
return null;
|
|
19055
19267
|
}
|
|
19056
19268
|
|
|
19057
|
-
// bazel-out/
|
|
19269
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/switch/index.mjs
|
|
19058
19270
|
var USE_TEMPLATE_PIPELINE = false;
|
|
19059
19271
|
|
|
19060
|
-
// bazel-out/
|
|
19272
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/styling_builder.mjs
|
|
19061
19273
|
var IMPORTANT_FLAG = "!important";
|
|
19062
19274
|
var MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;
|
|
19063
19275
|
var StylingBuilder = class {
|
|
@@ -19390,7 +19602,7 @@ function isEmptyExpression(ast) {
|
|
|
19390
19602
|
return ast instanceof EmptyExpr;
|
|
19391
19603
|
}
|
|
19392
19604
|
|
|
19393
|
-
// bazel-out/
|
|
19605
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
19394
19606
|
var HtmlParser = class extends Parser2 {
|
|
19395
19607
|
constructor() {
|
|
19396
19608
|
super(getHtmlTagDefinition);
|
|
@@ -19400,7 +19612,7 @@ var HtmlParser = class extends Parser2 {
|
|
|
19400
19612
|
}
|
|
19401
19613
|
};
|
|
19402
19614
|
|
|
19403
|
-
// bazel-out/
|
|
19615
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
19404
19616
|
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
19405
19617
|
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
19406
19618
|
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
@@ -19466,7 +19678,7 @@ function visitAllWithSiblings(visitor, nodes) {
|
|
|
19466
19678
|
return result;
|
|
19467
19679
|
}
|
|
19468
19680
|
|
|
19469
|
-
// bazel-out/
|
|
19681
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
19470
19682
|
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
19471
19683
|
var ATTRIBUTE_PREFIX = "attr";
|
|
19472
19684
|
var CLASS_PREFIX = "class";
|
|
@@ -19786,7 +19998,7 @@ function moveParseSourceSpan(sourceSpan, absoluteSpan) {
|
|
|
19786
19998
|
return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);
|
|
19787
19999
|
}
|
|
19788
20000
|
|
|
19789
|
-
// bazel-out/
|
|
20001
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
|
|
19790
20002
|
function isStyleUrlResolvable(url) {
|
|
19791
20003
|
if (url == null || url.length === 0 || url[0] == "/")
|
|
19792
20004
|
return false;
|
|
@@ -19795,7 +20007,7 @@ function isStyleUrlResolvable(url) {
|
|
|
19795
20007
|
}
|
|
19796
20008
|
var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
|
|
19797
20009
|
|
|
19798
|
-
// bazel-out/
|
|
20010
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
|
|
19799
20011
|
var NG_CONTENT_SELECT_ATTR = "select";
|
|
19800
20012
|
var LINK_ELEMENT = "link";
|
|
19801
20013
|
var LINK_STYLE_REL_ATTR = "rel";
|
|
@@ -19865,7 +20077,7 @@ function normalizeNgContentSelect(selectAttr) {
|
|
|
19865
20077
|
return selectAttr;
|
|
19866
20078
|
}
|
|
19867
20079
|
|
|
19868
|
-
// bazel-out/
|
|
20080
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
|
|
19869
20081
|
var FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/;
|
|
19870
20082
|
var FOR_LOOP_TRACK_PATTERN = /^track\s+([\S\s]*)/;
|
|
19871
20083
|
var CONDITIONAL_ALIAS_PATTERN = /^as\s+(.*)/;
|
|
@@ -20156,7 +20368,7 @@ function stripOptionalParentheses(param, errors) {
|
|
|
20156
20368
|
return expression.slice(start, end);
|
|
20157
20369
|
}
|
|
20158
20370
|
|
|
20159
|
-
// bazel-out/
|
|
20371
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
|
|
20160
20372
|
var TIME_PATTERN = /^\d+\.?\d*(ms|s)?$/;
|
|
20161
20373
|
var SEPARATOR_PATTERN = /^\s$/;
|
|
20162
20374
|
var COMMA_DELIMITED_SYNTAX = /* @__PURE__ */ new Map([
|
|
@@ -20420,7 +20632,7 @@ function parseDeferredTime(value) {
|
|
|
20420
20632
|
return parseFloat(time) * (units === "s" ? 1e3 : 1);
|
|
20421
20633
|
}
|
|
20422
20634
|
|
|
20423
|
-
// bazel-out/
|
|
20635
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
|
|
20424
20636
|
var PREFETCH_WHEN_PATTERN = /^prefetch\s+when\s/;
|
|
20425
20637
|
var PREFETCH_ON_PATTERN = /^prefetch\s+on\s/;
|
|
20426
20638
|
var MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
|
|
@@ -20555,7 +20767,7 @@ function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
|
20555
20767
|
return { triggers, prefetchTriggers };
|
|
20556
20768
|
}
|
|
20557
20769
|
|
|
20558
|
-
// bazel-out/
|
|
20770
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
|
|
20559
20771
|
var BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;
|
|
20560
20772
|
var KW_BIND_IDX = 1;
|
|
20561
20773
|
var KW_LET_IDX = 2;
|
|
@@ -20986,7 +21198,7 @@ function textContents(node) {
|
|
|
20986
21198
|
}
|
|
20987
21199
|
}
|
|
20988
21200
|
|
|
20989
|
-
// bazel-out/
|
|
21201
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/i18n/context.mjs
|
|
20990
21202
|
var TagType;
|
|
20991
21203
|
(function(TagType2) {
|
|
20992
21204
|
TagType2[TagType2["ELEMENT"] = 0] = "ELEMENT";
|
|
@@ -21121,7 +21333,7 @@ function serializePlaceholderValue(value) {
|
|
|
21121
21333
|
}
|
|
21122
21334
|
}
|
|
21123
21335
|
|
|
21124
|
-
// bazel-out/
|
|
21336
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
|
|
21125
21337
|
var NG_CONTENT_SELECT_ATTR2 = "select";
|
|
21126
21338
|
var NG_PROJECT_AS_ATTR_NAME = "ngProjectAs";
|
|
21127
21339
|
var EVENT_BINDING_SCOPE_GLOBALS = /* @__PURE__ */ new Set(["$event"]);
|
|
@@ -21947,7 +22159,8 @@ var TemplateDefinitionBuilder = class {
|
|
|
21947
22159
|
}
|
|
21948
22160
|
}
|
|
21949
22161
|
if (root !== null) {
|
|
21950
|
-
|
|
22162
|
+
const name = root instanceof Element ? root.name : root.tagName;
|
|
22163
|
+
tagName = name === NG_TEMPLATE_TAG_NAME ? null : name;
|
|
21951
22164
|
attrsExprs = this.getAttributeExpressions(NG_TEMPLATE_TAG_NAME, root.attributes, root.inputs, []);
|
|
21952
22165
|
}
|
|
21953
22166
|
return { tagName, attrsExprs };
|
|
@@ -22784,7 +22997,7 @@ function createClosureModeGuard2() {
|
|
|
22784
22997
|
return typeofExpr(variable(NG_I18N_CLOSURE_MODE2)).notIdentical(literal("undefined", STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE2));
|
|
22785
22998
|
}
|
|
22786
22999
|
|
|
22787
|
-
// bazel-out/
|
|
23000
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
|
|
22788
23001
|
var ATTR_REGEX = /attr\.([^\]]+)/;
|
|
22789
23002
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
22790
23003
|
var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
|
|
@@ -22897,7 +23110,7 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
22897
23110
|
}
|
|
22898
23111
|
definitionMap.set("template", templateFunctionExpression);
|
|
22899
23112
|
} else {
|
|
22900
|
-
const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool, meta.relativeContextFilePath, meta.i18nUseExternalIds);
|
|
23113
|
+
const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.deferBlocks);
|
|
22901
23114
|
transform(tpl, CompilationJobKind.Tmpl);
|
|
22902
23115
|
const templateFn = emitTemplateFn(tpl, constantPool);
|
|
22903
23116
|
if (tpl.contentSelectors !== null) {
|
|
@@ -23386,7 +23599,7 @@ function createHostDirectivesMappingArray(mapping) {
|
|
|
23386
23599
|
return elements.length > 0 ? literalArr(elements) : null;
|
|
23387
23600
|
}
|
|
23388
23601
|
|
|
23389
|
-
// bazel-out/
|
|
23602
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
|
|
23390
23603
|
var R3TargetBinder = class {
|
|
23391
23604
|
constructor(directiveMatcher) {
|
|
23392
23605
|
this.directiveMatcher = directiveMatcher;
|
|
@@ -23991,11 +24204,11 @@ function extractScopedNodeEntities(rootScope) {
|
|
|
23991
24204
|
return templateEntities;
|
|
23992
24205
|
}
|
|
23993
24206
|
|
|
23994
|
-
// bazel-out/
|
|
24207
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/resource_loader.mjs
|
|
23995
24208
|
var ResourceLoader = class {
|
|
23996
24209
|
};
|
|
23997
24210
|
|
|
23998
|
-
// bazel-out/
|
|
24211
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
|
|
23999
24212
|
var CompilerFacadeImpl = class {
|
|
24000
24213
|
constructor(jitEvaluator = new JitEvaluator()) {
|
|
24001
24214
|
this.jitEvaluator = jitEvaluator;
|
|
@@ -24547,17 +24760,17 @@ function publishFacade(global) {
|
|
|
24547
24760
|
ng.\u0275compilerFacade = new CompilerFacadeImpl();
|
|
24548
24761
|
}
|
|
24549
24762
|
|
|
24550
|
-
// bazel-out/
|
|
24551
|
-
var VERSION2 = new Version("17.0.0-rc.
|
|
24763
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
|
|
24764
|
+
var VERSION2 = new Version("17.0.0-rc.3");
|
|
24552
24765
|
|
|
24553
|
-
// bazel-out/
|
|
24766
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
24554
24767
|
var _VisitorMode;
|
|
24555
24768
|
(function(_VisitorMode2) {
|
|
24556
24769
|
_VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
|
|
24557
24770
|
_VisitorMode2[_VisitorMode2["Merge"] = 1] = "Merge";
|
|
24558
24771
|
})(_VisitorMode || (_VisitorMode = {}));
|
|
24559
24772
|
|
|
24560
|
-
// bazel-out/
|
|
24773
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
|
|
24561
24774
|
var XmlTagDefinition = class {
|
|
24562
24775
|
constructor() {
|
|
24563
24776
|
this.closedByParent = false;
|
|
@@ -24579,7 +24792,7 @@ var XmlTagDefinition = class {
|
|
|
24579
24792
|
};
|
|
24580
24793
|
var _TAG_DEFINITION = new XmlTagDefinition();
|
|
24581
24794
|
|
|
24582
|
-
// bazel-out/
|
|
24795
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
|
|
24583
24796
|
var FactoryTarget2;
|
|
24584
24797
|
(function(FactoryTarget3) {
|
|
24585
24798
|
FactoryTarget3[FactoryTarget3["Directive"] = 0] = "Directive";
|
|
@@ -24589,14 +24802,14 @@ var FactoryTarget2;
|
|
|
24589
24802
|
FactoryTarget3[FactoryTarget3["NgModule"] = 4] = "NgModule";
|
|
24590
24803
|
})(FactoryTarget2 || (FactoryTarget2 = {}));
|
|
24591
24804
|
|
|
24592
|
-
// bazel-out/
|
|
24805
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/compiler.mjs
|
|
24593
24806
|
publishFacade(_global);
|
|
24594
24807
|
|
|
24595
|
-
// bazel-out/
|
|
24808
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/util.mjs
|
|
24596
24809
|
var import_path2 = require("path");
|
|
24597
24810
|
var import_typescript5 = __toESM(require("typescript"), 1);
|
|
24598
24811
|
|
|
24599
|
-
// bazel-out/
|
|
24812
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/types.mjs
|
|
24600
24813
|
var ngif = "*ngIf";
|
|
24601
24814
|
var boundngif = "[ngIf]";
|
|
24602
24815
|
var nakedngif = "ngIf";
|
|
@@ -24607,6 +24820,15 @@ var switchcase = "*ngSwitchCase";
|
|
|
24607
24820
|
var nakedcase = "ngSwitchCase";
|
|
24608
24821
|
var switchdefault = "*ngSwitchDefault";
|
|
24609
24822
|
var nakeddefault = "ngSwitchDefault";
|
|
24823
|
+
var commaSeparatedSyntax = /* @__PURE__ */ new Map([
|
|
24824
|
+
["(", ")"],
|
|
24825
|
+
["{", "}"],
|
|
24826
|
+
["[", "]"]
|
|
24827
|
+
]);
|
|
24828
|
+
var stringPairs = /* @__PURE__ */ new Map([
|
|
24829
|
+
[`"`, `"`],
|
|
24830
|
+
[`'`, `'`]
|
|
24831
|
+
]);
|
|
24610
24832
|
var attributesToMigrate = [
|
|
24611
24833
|
ngif,
|
|
24612
24834
|
nakedngif,
|
|
@@ -24715,7 +24937,7 @@ var ElementCollector = class extends RecursiveVisitor {
|
|
|
24715
24937
|
}
|
|
24716
24938
|
};
|
|
24717
24939
|
|
|
24718
|
-
// bazel-out/
|
|
24940
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/util.mjs
|
|
24719
24941
|
function analyze(sourceFile, analyzedFiles) {
|
|
24720
24942
|
forEachClass(sourceFile, (node) => {
|
|
24721
24943
|
var _a2;
|
|
@@ -24777,7 +24999,7 @@ function migrateTemplate(template2) {
|
|
|
24777
24999
|
const visitor = new ElementCollector();
|
|
24778
25000
|
visitAll2(visitor, parsed.rootNodes);
|
|
24779
25001
|
for (let [key, tmpl] of visitor.templates) {
|
|
24780
|
-
const regex = new RegExp(
|
|
25002
|
+
const regex = new RegExp(`[^a-zA-Z0-9-<]+${key.slice(1)}\\W`, "gm");
|
|
24781
25003
|
const matches = template2.match(regex);
|
|
24782
25004
|
tmpl.count = (_a2 = matches == null ? void 0 : matches.length) != null ? _a2 : 0;
|
|
24783
25005
|
tmpl.generateContents(template2);
|
|
@@ -24851,8 +25073,8 @@ function migrateTemplate(template2) {
|
|
|
24851
25073
|
return { migrated: result, errors };
|
|
24852
25074
|
}
|
|
24853
25075
|
function migrateNgIf(etm, ngTemplates, tmpl, offset) {
|
|
24854
|
-
const matchThen = etm.attr.value.match(/;\s
|
|
24855
|
-
const matchElse = etm.attr.value.match(/;\s
|
|
25076
|
+
const matchThen = etm.attr.value.match(/;\s*then/gm);
|
|
25077
|
+
const matchElse = etm.attr.value.match(/;\s*else/gm);
|
|
24856
25078
|
if (matchThen && matchThen.length > 0) {
|
|
24857
25079
|
return buildIfThenElseBlock(etm, ngTemplates, tmpl, matchThen[0], matchElse[0], offset);
|
|
24858
25080
|
} else if (matchElse && matchElse.length > 0) {
|
|
@@ -24919,7 +25141,7 @@ function migrateNgFor(etm, tmpl, offset) {
|
|
|
24919
25141
|
const aliases = [];
|
|
24920
25142
|
const lbString = etm.hasLineBreaks ? lb : "";
|
|
24921
25143
|
const lbSpaces = etm.hasLineBreaks ? `${lb} ` : "";
|
|
24922
|
-
const parts = etm.attr.value
|
|
25144
|
+
const parts = getNgForParts(etm.attr.value);
|
|
24923
25145
|
const originals = getOriginals(etm, tmpl, offset);
|
|
24924
25146
|
const condition = parts[0].replace("let ", "");
|
|
24925
25147
|
const loopVar = condition.split(" of ")[0];
|
|
@@ -24935,7 +25157,7 @@ function migrateNgFor(etm, tmpl, offset) {
|
|
|
24935
25157
|
const aliasParts = part.split("=");
|
|
24936
25158
|
aliases.push(` ${aliasParts[0].trim()} = $${aliasParts[1].trim()}`);
|
|
24937
25159
|
if (aliasParts[1].trim() === "index") {
|
|
24938
|
-
aliasedIndex = aliasParts[0].
|
|
25160
|
+
aliasedIndex = aliasParts[0].replace("let", "").trim();
|
|
24939
25161
|
}
|
|
24940
25162
|
}
|
|
24941
25163
|
if (part.match(aliasWithAsRegexp)) {
|
|
@@ -24959,6 +25181,37 @@ function migrateNgFor(etm, tmpl, offset) {
|
|
|
24959
25181
|
const post = originals.end.length - endBlock.length;
|
|
24960
25182
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
24961
25183
|
}
|
|
25184
|
+
function getNgForParts(expression) {
|
|
25185
|
+
const parts = [];
|
|
25186
|
+
const commaSeparatedStack = [];
|
|
25187
|
+
const stringStack = [];
|
|
25188
|
+
let current = "";
|
|
25189
|
+
for (let i = 0; i < expression.length; i++) {
|
|
25190
|
+
const char = expression[i];
|
|
25191
|
+
const isInString = stringStack.length === 0;
|
|
25192
|
+
const isInCommaSeparated = commaSeparatedStack.length === 0;
|
|
25193
|
+
if (isInString && current.length > 0 && (char === ";" || char === "," && isInCommaSeparated)) {
|
|
25194
|
+
parts.push(current);
|
|
25195
|
+
current = "";
|
|
25196
|
+
continue;
|
|
25197
|
+
}
|
|
25198
|
+
if (stringPairs.has(char)) {
|
|
25199
|
+
stringStack.push(stringPairs.get(char));
|
|
25200
|
+
} else if (stringStack.length > 0 && stringStack[stringStack.length - 1] === char) {
|
|
25201
|
+
stringStack.pop();
|
|
25202
|
+
}
|
|
25203
|
+
if (commaSeparatedSyntax.has(char)) {
|
|
25204
|
+
commaSeparatedStack.push(commaSeparatedSyntax.get(char));
|
|
25205
|
+
} else if (commaSeparatedStack.length > 0 && commaSeparatedStack[commaSeparatedStack.length - 1] === char) {
|
|
25206
|
+
commaSeparatedStack.pop();
|
|
25207
|
+
}
|
|
25208
|
+
current += char;
|
|
25209
|
+
}
|
|
25210
|
+
if (current.length > 0) {
|
|
25211
|
+
parts.push(current);
|
|
25212
|
+
}
|
|
25213
|
+
return parts;
|
|
25214
|
+
}
|
|
24962
25215
|
function getOriginals(etm, tmpl, offset) {
|
|
24963
25216
|
if (etm.el.children.length > 0) {
|
|
24964
25217
|
const start2 = tmpl.slice(etm.el.sourceSpan.start.offset - offset, etm.el.children[0].sourceSpan.start.offset - offset);
|
|
@@ -25040,7 +25293,7 @@ function forEachClass(sourceFile, callback) {
|
|
|
25040
25293
|
});
|
|
25041
25294
|
}
|
|
25042
25295
|
|
|
25043
|
-
// bazel-out/
|
|
25296
|
+
// bazel-out/k8-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/index.mjs
|
|
25044
25297
|
function control_flow_migration_default(options) {
|
|
25045
25298
|
return (tree, context) => __async(this, null, function* () {
|
|
25046
25299
|
const { buildPaths, testPaths } = yield getProjectTsConfigPaths(tree);
|