@angular/core 17.0.6 → 17.0.8
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 +2 -9
- package/esm2022/src/application/application_config.mjs +21 -0
- package/esm2022/src/application/application_init.mjs +188 -0
- package/esm2022/src/application/application_module.mjs +29 -0
- package/esm2022/src/application/application_ref.mjs +505 -0
- package/esm2022/src/application/application_tokens.mjs +121 -0
- package/esm2022/src/application/create_application.mjs +102 -0
- package/esm2022/src/change_detection/flags.mjs +16 -0
- package/esm2022/src/change_detection/scheduling/ng_zone_scheduling.mjs +164 -0
- package/esm2022/src/change_detection/scheduling/zoneless_scheduling.mjs +13 -0
- package/esm2022/src/core.mjs +10 -7
- package/esm2022/src/core_private_export.mjs +8 -4
- package/esm2022/src/core_reactivity_export_internal.mjs +2 -2
- package/esm2022/src/core_render3_private_export.mjs +2 -2
- package/esm2022/src/error_handler.mjs +15 -1
- package/esm2022/src/event_emitter.mjs +1 -2
- package/esm2022/src/hydration/annotate.mjs +1 -1
- package/esm2022/src/hydration/api.mjs +2 -2
- package/esm2022/src/hydration/cleanup.mjs +1 -1
- package/esm2022/src/image_performance_warning.mjs +2 -2
- package/esm2022/src/linker/query_list.mjs +8 -6
- package/esm2022/src/metadata/do_bootstrap.mjs +1 -1
- package/esm2022/src/pending_tasks.mjs +57 -0
- package/esm2022/src/platform/platform.mjs +135 -0
- package/esm2022/src/platform/platform_core_providers.mjs +15 -0
- package/esm2022/src/platform/platform_ref.mjs +179 -0
- package/esm2022/src/render3/after_render_hooks.mjs +2 -2
- package/esm2022/src/render3/component_ref.mjs +13 -9
- package/esm2022/src/render3/instructions/change_detection.mjs +2 -4
- package/esm2022/src/render3/instructions/mark_view_dirty.mjs +3 -2
- package/esm2022/src/render3/instructions/shared.mjs +3 -2
- package/esm2022/src/render3/interfaces/view.mjs +1 -1
- package/esm2022/src/render3/list_reconciliation.mjs +58 -24
- package/esm2022/src/render3/util/change_detection_utils.mjs +3 -1
- package/esm2022/src/render3/util/misc_utils.mjs +2 -2
- package/esm2022/src/render3/util/view_utils.mjs +18 -5
- package/esm2022/src/render3/view_ref.mjs +8 -1
- package/esm2022/src/transfer_state.mjs +2 -2
- package/esm2022/src/util/performance.mjs +2 -2
- package/esm2022/src/version.mjs +6 -5
- package/esm2022/src/zone/ng_zone.mjs +10 -61
- package/esm2022/testing/src/component_fixture.mjs +20 -36
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/test_bed.mjs +5 -6
- package/fesm2022/core.mjs +1409 -1340
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +2 -9
- package/fesm2022/primitives/signals.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +46 -64
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +50 -35
- 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 +863 -673
- 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 +1175 -782
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
- package/schematics/ng-generate/standalone-migration/bundle.js +1168 -933
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +6 -10
- package/esm2022/src/application_config.mjs +0 -21
- package/esm2022/src/application_init.mjs +0 -188
- package/esm2022/src/application_module.mjs +0 -29
- package/esm2022/src/application_ref.mjs +0 -997
- package/esm2022/src/application_tokens.mjs +0 -121
- package/esm2022/src/initial_render_pending_tasks.mjs +0 -49
- package/esm2022/src/platform_core_providers.mjs +0 -15
|
@@ -63,7 +63,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
// bazel-out/
|
|
66
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/index.mjs
|
|
67
67
|
var block_template_entities_exports = {};
|
|
68
68
|
__export(block_template_entities_exports, {
|
|
69
69
|
default: () => block_template_entities_default
|
|
@@ -72,7 +72,7 @@ module.exports = __toCommonJS(block_template_entities_exports);
|
|
|
72
72
|
var import_schematics = require("@angular-devkit/schematics");
|
|
73
73
|
var import_path3 = require("path");
|
|
74
74
|
|
|
75
|
-
// bazel-out/
|
|
75
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/project_tsconfig_paths.mjs
|
|
76
76
|
var import_core = require("@angular-devkit/core");
|
|
77
77
|
function getProjectTsConfigPaths(tree) {
|
|
78
78
|
return __async(this, null, function* () {
|
|
@@ -152,11 +152,11 @@ function getWorkspace(tree) {
|
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
// bazel-out/
|
|
155
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
156
156
|
var import_path = require("path");
|
|
157
157
|
var import_typescript2 = __toESM(require("typescript"), 1);
|
|
158
158
|
|
|
159
|
-
// bazel-out/
|
|
159
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
|
|
160
160
|
var path = __toESM(require("path"), 1);
|
|
161
161
|
var import_typescript = __toESM(require("typescript"), 1);
|
|
162
162
|
function parseTsconfigFile(tsconfigPath, basePath) {
|
|
@@ -173,7 +173,7 @@ function parseTsconfigFile(tsconfigPath, basePath) {
|
|
|
173
173
|
return import_typescript.default.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
// bazel-out/
|
|
176
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
177
177
|
function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
|
|
178
178
|
const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles);
|
|
179
179
|
return import_typescript2.default.createProgram(rootNames, options, host);
|
|
@@ -206,7 +206,7 @@ function canMigrateFile(basePath, sourceFile, program) {
|
|
|
206
206
|
return !(0, import_path.relative)(basePath, sourceFile.fileName).startsWith("..");
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
// bazel-out/
|
|
209
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/selector.mjs
|
|
210
210
|
var _SELECTOR_REGEXP = new RegExp(
|
|
211
211
|
`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,
|
|
212
212
|
"g"
|
|
@@ -514,7 +514,7 @@ var SelectorContext = class {
|
|
|
514
514
|
}
|
|
515
515
|
};
|
|
516
516
|
|
|
517
|
-
// bazel-out/
|
|
517
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/core.mjs
|
|
518
518
|
var ViewEncapsulation;
|
|
519
519
|
(function(ViewEncapsulation2) {
|
|
520
520
|
ViewEncapsulation2[ViewEncapsulation2["Emulated"] = 0] = "Emulated";
|
|
@@ -576,7 +576,7 @@ function parseSelectorToR3Selector(selector) {
|
|
|
576
576
|
return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];
|
|
577
577
|
}
|
|
578
578
|
|
|
579
|
-
// bazel-out/
|
|
579
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/digest.mjs
|
|
580
580
|
var textEncoder;
|
|
581
581
|
function computeDigest(message) {
|
|
582
582
|
return sha1(serializeNodes(message.nodes).join("") + `[${message.meaning}]`);
|
|
@@ -816,7 +816,7 @@ function wordAt(bytes, index, endian) {
|
|
|
816
816
|
return word;
|
|
817
817
|
}
|
|
818
818
|
|
|
819
|
-
// bazel-out/
|
|
819
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_ast.mjs
|
|
820
820
|
var TypeModifier;
|
|
821
821
|
(function(TypeModifier2) {
|
|
822
822
|
TypeModifier2[TypeModifier2["None"] = 0] = "None";
|
|
@@ -1771,7 +1771,7 @@ function serializeTags(tags) {
|
|
|
1771
1771
|
return out;
|
|
1772
1772
|
}
|
|
1773
1773
|
|
|
1774
|
-
// bazel-out/
|
|
1774
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/constant_pool.mjs
|
|
1775
1775
|
var CONSTANT_PREFIX = "_c";
|
|
1776
1776
|
var UNKNOWN_VALUE_KEY = variable("<unknown>");
|
|
1777
1777
|
var KEY_CONTEXT = {};
|
|
@@ -1874,7 +1874,7 @@ var ConstantPool = class {
|
|
|
1874
1874
|
}))));
|
|
1875
1875
|
}
|
|
1876
1876
|
}
|
|
1877
|
-
getSharedFunctionReference(fn2, prefix) {
|
|
1877
|
+
getSharedFunctionReference(fn2, prefix, useUniqueName = true) {
|
|
1878
1878
|
var _a2;
|
|
1879
1879
|
const isArrow = fn2 instanceof ArrowFunctionExpr;
|
|
1880
1880
|
for (const current of this.statements) {
|
|
@@ -1885,7 +1885,7 @@ var ConstantPool = class {
|
|
|
1885
1885
|
return variable(current.name);
|
|
1886
1886
|
}
|
|
1887
1887
|
}
|
|
1888
|
-
const name = this.uniqueName(prefix);
|
|
1888
|
+
const name = useUniqueName ? this.uniqueName(prefix) : prefix;
|
|
1889
1889
|
this.statements.push(fn2.toDeclStmt(name, StmtModifier.Final));
|
|
1890
1890
|
return variable(name);
|
|
1891
1891
|
}
|
|
@@ -1954,7 +1954,7 @@ function isLongStringLiteral(expr) {
|
|
|
1954
1954
|
return expr instanceof LiteralExpr && typeof expr.value === "string" && expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;
|
|
1955
1955
|
}
|
|
1956
1956
|
|
|
1957
|
-
// bazel-out/
|
|
1957
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_identifiers.mjs
|
|
1958
1958
|
var CORE = "@angular/core";
|
|
1959
1959
|
var _Identifiers = class {
|
|
1960
1960
|
};
|
|
@@ -2587,7 +2587,7 @@ var Identifiers = _Identifiers;
|
|
|
2587
2587
|
_Identifiers.validateIframeAttribute = { name: "\u0275\u0275validateIframeAttribute", moduleName: CORE };
|
|
2588
2588
|
})();
|
|
2589
2589
|
|
|
2590
|
-
// bazel-out/
|
|
2590
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/util.mjs
|
|
2591
2591
|
var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
|
2592
2592
|
function dashCaseToCamelCase(input) {
|
|
2593
2593
|
return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
|
|
@@ -2675,7 +2675,7 @@ function partitionArray(arr, conditionFn) {
|
|
|
2675
2675
|
return [truthy, falsy];
|
|
2676
2676
|
}
|
|
2677
2677
|
|
|
2678
|
-
// bazel-out/
|
|
2678
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/source_map.mjs
|
|
2679
2679
|
var VERSION = 3;
|
|
2680
2680
|
var JS_B64_PREFIX = "# sourceMappingURL=data:application/json;base64,";
|
|
2681
2681
|
var SourceMapGenerator = class {
|
|
@@ -2804,7 +2804,7 @@ function toBase64Digit(value) {
|
|
|
2804
2804
|
return B64_DIGITS[value];
|
|
2805
2805
|
}
|
|
2806
2806
|
|
|
2807
|
-
// bazel-out/
|
|
2807
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_emitter.mjs
|
|
2808
2808
|
var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
|
|
2809
2809
|
var _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
|
|
2810
2810
|
var _INDENT_WITH = " ";
|
|
@@ -3289,7 +3289,7 @@ function _createIndent(count) {
|
|
|
3289
3289
|
return res;
|
|
3290
3290
|
}
|
|
3291
3291
|
|
|
3292
|
-
// bazel-out/
|
|
3292
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/util.mjs
|
|
3293
3293
|
function typeWithParameters(type, numParams) {
|
|
3294
3294
|
if (numParams === 0) {
|
|
3295
3295
|
return expressionType(type);
|
|
@@ -3354,7 +3354,7 @@ function generateForwardRef(expr) {
|
|
|
3354
3354
|
return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr)]);
|
|
3355
3355
|
}
|
|
3356
3356
|
|
|
3357
|
-
// bazel-out/
|
|
3357
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_factory.mjs
|
|
3358
3358
|
var R3FactoryDelegateType;
|
|
3359
3359
|
(function(R3FactoryDelegateType2) {
|
|
3360
3360
|
R3FactoryDelegateType2[R3FactoryDelegateType2["Class"] = 0] = "Class";
|
|
@@ -3499,20 +3499,24 @@ function getInjectFn(target) {
|
|
|
3499
3499
|
}
|
|
3500
3500
|
}
|
|
3501
3501
|
|
|
3502
|
-
// bazel-out/
|
|
3502
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/tags.mjs
|
|
3503
3503
|
var TagContentType;
|
|
3504
3504
|
(function(TagContentType2) {
|
|
3505
3505
|
TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
|
|
3506
3506
|
TagContentType2[TagContentType2["ESCAPABLE_RAW_TEXT"] = 1] = "ESCAPABLE_RAW_TEXT";
|
|
3507
3507
|
TagContentType2[TagContentType2["PARSABLE_DATA"] = 2] = "PARSABLE_DATA";
|
|
3508
3508
|
})(TagContentType || (TagContentType = {}));
|
|
3509
|
-
function splitNsName(elementName) {
|
|
3509
|
+
function splitNsName(elementName, fatal = true) {
|
|
3510
3510
|
if (elementName[0] != ":") {
|
|
3511
3511
|
return [null, elementName];
|
|
3512
3512
|
}
|
|
3513
3513
|
const colonIndex = elementName.indexOf(":", 1);
|
|
3514
3514
|
if (colonIndex === -1) {
|
|
3515
|
-
|
|
3515
|
+
if (fatal) {
|
|
3516
|
+
throw new Error(`Unsupported format "${elementName}" expecting ":namespace:name"`);
|
|
3517
|
+
} else {
|
|
3518
|
+
return [null, elementName];
|
|
3519
|
+
}
|
|
3516
3520
|
}
|
|
3517
3521
|
return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];
|
|
3518
3522
|
}
|
|
@@ -3532,7 +3536,7 @@ function mergeNsAndName(prefix, localName) {
|
|
|
3532
3536
|
return prefix ? `:${prefix}:${localName}` : localName;
|
|
3533
3537
|
}
|
|
3534
3538
|
|
|
3535
|
-
// bazel-out/
|
|
3539
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_ast.mjs
|
|
3536
3540
|
var Comment = class {
|
|
3537
3541
|
constructor(value, sourceSpan) {
|
|
3538
3542
|
this.value = value;
|
|
@@ -3913,7 +3917,7 @@ function visitAll(visitor, nodes) {
|
|
|
3913
3917
|
return result;
|
|
3914
3918
|
}
|
|
3915
3919
|
|
|
3916
|
-
// bazel-out/
|
|
3920
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_ast.mjs
|
|
3917
3921
|
var Message = class {
|
|
3918
3922
|
constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {
|
|
3919
3923
|
this.nodes = nodes;
|
|
@@ -4019,28 +4023,6 @@ var BlockPlaceholder = class {
|
|
|
4019
4023
|
return visitor.visitBlockPlaceholder(this, context);
|
|
4020
4024
|
}
|
|
4021
4025
|
};
|
|
4022
|
-
var RecurseVisitor = class {
|
|
4023
|
-
visitText(text2, context) {
|
|
4024
|
-
}
|
|
4025
|
-
visitContainer(container, context) {
|
|
4026
|
-
container.children.forEach((child) => child.visit(this));
|
|
4027
|
-
}
|
|
4028
|
-
visitIcu(icu, context) {
|
|
4029
|
-
Object.keys(icu.cases).forEach((k) => {
|
|
4030
|
-
icu.cases[k].visit(this);
|
|
4031
|
-
});
|
|
4032
|
-
}
|
|
4033
|
-
visitTagPlaceholder(ph, context) {
|
|
4034
|
-
ph.children.forEach((child) => child.visit(this));
|
|
4035
|
-
}
|
|
4036
|
-
visitPlaceholder(ph, context) {
|
|
4037
|
-
}
|
|
4038
|
-
visitIcuPlaceholder(ph, context) {
|
|
4039
|
-
}
|
|
4040
|
-
visitBlockPlaceholder(ph, context) {
|
|
4041
|
-
ph.children.forEach((child) => child.visit(this));
|
|
4042
|
-
}
|
|
4043
|
-
};
|
|
4044
4026
|
function serializeMessage(messageNodes) {
|
|
4045
4027
|
const visitor = new LocalizeMessageStringVisitor();
|
|
4046
4028
|
const str = messageNodes.map((n) => n.visit(visitor)).join("");
|
|
@@ -4073,7 +4055,7 @@ var LocalizeMessageStringVisitor = class {
|
|
|
4073
4055
|
}
|
|
4074
4056
|
};
|
|
4075
4057
|
|
|
4076
|
-
// bazel-out/
|
|
4058
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xml_helper.mjs
|
|
4077
4059
|
var _Visitor = class {
|
|
4078
4060
|
visitTag(tag) {
|
|
4079
4061
|
const strAttrs = this._serializeAttributes(tag.attrs);
|
|
@@ -4101,12 +4083,12 @@ ${doctype.dtd}
|
|
|
4101
4083
|
};
|
|
4102
4084
|
var _visitor = new _Visitor();
|
|
4103
4085
|
|
|
4104
|
-
// bazel-out/
|
|
4086
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xmb.mjs
|
|
4105
4087
|
function toPublicName(internalName) {
|
|
4106
4088
|
return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, "_");
|
|
4107
4089
|
}
|
|
4108
4090
|
|
|
4109
|
-
// bazel-out/
|
|
4091
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/util.mjs
|
|
4110
4092
|
var CLOSURE_TRANSLATION_VAR_PREFIX = "MSG_";
|
|
4111
4093
|
var TRANSLATION_VAR_PREFIX = "i18n_";
|
|
4112
4094
|
var I18N_ATTR = "i18n";
|
|
@@ -4208,7 +4190,7 @@ function declareI18nVariable(variable2) {
|
|
|
4208
4190
|
return new DeclareVarStmt(variable2.name, void 0, INFERRED_TYPE, void 0, variable2.sourceSpan);
|
|
4209
4191
|
}
|
|
4210
4192
|
|
|
4211
|
-
// bazel-out/
|
|
4193
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/util.mjs
|
|
4212
4194
|
var UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;
|
|
4213
4195
|
var TEMPORARY_NAME = "_t";
|
|
4214
4196
|
var CONTEXT_NAME = "ctx";
|
|
@@ -4448,7 +4430,7 @@ function getInstructionStatements(instructions) {
|
|
|
4448
4430
|
return statements;
|
|
4449
4431
|
}
|
|
4450
4432
|
|
|
4451
|
-
// bazel-out/
|
|
4433
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/injectable_compiler_2.mjs
|
|
4452
4434
|
function compileInjectable(meta, resolveForwardRefs) {
|
|
4453
4435
|
let result = null;
|
|
4454
4436
|
const factoryMeta = {
|
|
@@ -4533,7 +4515,7 @@ function createFactoryFunction(type) {
|
|
|
4533
4515
|
return arrowFn([new FnParam("t", DYNAMIC_TYPE)], type.prop("\u0275fac").callFn([variable("t")]));
|
|
4534
4516
|
}
|
|
4535
4517
|
|
|
4536
|
-
// bazel-out/
|
|
4518
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/assertions.mjs
|
|
4537
4519
|
var UNUSABLE_INTERPOLATION_REGEXPS = [
|
|
4538
4520
|
/^\s*$/,
|
|
4539
4521
|
/[<>]/,
|
|
@@ -4555,7 +4537,7 @@ function assertInterpolationSymbols(identifier, value) {
|
|
|
4555
4537
|
}
|
|
4556
4538
|
}
|
|
4557
4539
|
|
|
4558
|
-
// bazel-out/
|
|
4540
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/defaults.mjs
|
|
4559
4541
|
var InterpolationConfig = class {
|
|
4560
4542
|
static fromArray(markers) {
|
|
4561
4543
|
if (!markers) {
|
|
@@ -4572,7 +4554,7 @@ var InterpolationConfig = class {
|
|
|
4572
4554
|
var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
|
|
4573
4555
|
var DEFAULT_CONTAINER_BLOCKS = /* @__PURE__ */ new Set(["switch"]);
|
|
4574
4556
|
|
|
4575
|
-
// bazel-out/
|
|
4557
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/chars.mjs
|
|
4576
4558
|
var $EOF = 0;
|
|
4577
4559
|
var $BSPACE = 8;
|
|
4578
4560
|
var $TAB = 9;
|
|
@@ -4654,7 +4636,7 @@ function isQuote(code) {
|
|
|
4654
4636
|
return code === $SQ || code === $DQ || code === $BT;
|
|
4655
4637
|
}
|
|
4656
4638
|
|
|
4657
|
-
// bazel-out/
|
|
4639
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/parse_util.mjs
|
|
4658
4640
|
var ParseLocation = class {
|
|
4659
4641
|
constructor(file, offset, line, col) {
|
|
4660
4642
|
this.file = file;
|
|
@@ -4801,7 +4783,7 @@ function sanitizeIdentifier(name) {
|
|
|
4801
4783
|
return name.replace(/\W/g, "_");
|
|
4802
4784
|
}
|
|
4803
4785
|
|
|
4804
|
-
// bazel-out/
|
|
4786
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_js_emitter.mjs
|
|
4805
4787
|
var makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})';
|
|
4806
4788
|
var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
4807
4789
|
constructor() {
|
|
@@ -4894,7 +4876,7 @@ var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
|
4894
4876
|
}
|
|
4895
4877
|
};
|
|
4896
4878
|
|
|
4897
|
-
// bazel-out/
|
|
4879
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit_trusted_types.mjs
|
|
4898
4880
|
var policy;
|
|
4899
4881
|
function getPolicy() {
|
|
4900
4882
|
if (policy === void 0) {
|
|
@@ -4932,7 +4914,7 @@ function newTrustedFunctionForJIT(...args) {
|
|
|
4932
4914
|
return fn2.bind(_global);
|
|
4933
4915
|
}
|
|
4934
4916
|
|
|
4935
|
-
// bazel-out/
|
|
4917
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit.mjs
|
|
4936
4918
|
var JitEvaluator = class {
|
|
4937
4919
|
evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {
|
|
4938
4920
|
const converter = new JitEmitterVisitor(refResolver);
|
|
@@ -5023,7 +5005,7 @@ function isUseStrictStatement(statement) {
|
|
|
5023
5005
|
return statement.isEquivalent(literal("use strict").toStmt());
|
|
5024
5006
|
}
|
|
5025
5007
|
|
|
5026
|
-
// bazel-out/
|
|
5008
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_injector_compiler.mjs
|
|
5027
5009
|
function compileInjector(meta) {
|
|
5028
5010
|
const definitionMap = new DefinitionMap();
|
|
5029
5011
|
if (meta.providers !== null) {
|
|
@@ -5040,7 +5022,7 @@ function createInjectorType(meta) {
|
|
|
5040
5022
|
return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
|
|
5041
5023
|
}
|
|
5042
5024
|
|
|
5043
|
-
// bazel-out/
|
|
5025
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_jit.mjs
|
|
5044
5026
|
var R3JitReflector = class {
|
|
5045
5027
|
constructor(context) {
|
|
5046
5028
|
this.context = context;
|
|
@@ -5056,7 +5038,7 @@ var R3JitReflector = class {
|
|
|
5056
5038
|
}
|
|
5057
5039
|
};
|
|
5058
5040
|
|
|
5059
|
-
// bazel-out/
|
|
5041
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_module_compiler.mjs
|
|
5060
5042
|
var R3SelectorScopeMode;
|
|
5061
5043
|
(function(R3SelectorScopeMode2) {
|
|
5062
5044
|
R3SelectorScopeMode2[R3SelectorScopeMode2["Inline"] = 0] = "Inline";
|
|
@@ -5197,7 +5179,7 @@ function tupleOfTypes(types) {
|
|
|
5197
5179
|
return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;
|
|
5198
5180
|
}
|
|
5199
5181
|
|
|
5200
|
-
// bazel-out/
|
|
5182
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_pipe_compiler.mjs
|
|
5201
5183
|
function compilePipeFromMetadata(metadata) {
|
|
5202
5184
|
const definitionMapValues = [];
|
|
5203
5185
|
definitionMapValues.push({ key: "name", value: literal(metadata.pipeName), quoted: false });
|
|
@@ -5218,7 +5200,7 @@ function createPipeType(metadata) {
|
|
|
5218
5200
|
]));
|
|
5219
5201
|
}
|
|
5220
5202
|
|
|
5221
|
-
// bazel-out/
|
|
5203
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/api.mjs
|
|
5222
5204
|
var R3TemplateDependencyKind;
|
|
5223
5205
|
(function(R3TemplateDependencyKind2) {
|
|
5224
5206
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["Directive"] = 0] = "Directive";
|
|
@@ -5226,7 +5208,7 @@ var R3TemplateDependencyKind;
|
|
|
5226
5208
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["NgModule"] = 2] = "NgModule";
|
|
5227
5209
|
})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
|
|
5228
5210
|
|
|
5229
|
-
// bazel-out/
|
|
5211
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/ast.mjs
|
|
5230
5212
|
var ParserError = class {
|
|
5231
5213
|
constructor(message, input, errLocation, ctxLocation) {
|
|
5232
5214
|
this.input = input;
|
|
@@ -5892,7 +5874,7 @@ var BoundElementProperty = class {
|
|
|
5892
5874
|
}
|
|
5893
5875
|
};
|
|
5894
5876
|
|
|
5895
|
-
// bazel-out/
|
|
5877
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler_util/expression_converter.mjs
|
|
5896
5878
|
var _EventHandlerVars = class {
|
|
5897
5879
|
};
|
|
5898
5880
|
var EventHandlerVars = _EventHandlerVars;
|
|
@@ -6533,7 +6515,7 @@ var BuiltinFunctionCall = class extends Call {
|
|
|
6533
6515
|
}
|
|
6534
6516
|
};
|
|
6535
6517
|
|
|
6536
|
-
// bazel-out/
|
|
6518
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_security_schema.mjs
|
|
6537
6519
|
var _SECURITY_SCHEMA;
|
|
6538
6520
|
function SECURITY_SCHEMA() {
|
|
6539
6521
|
if (!_SECURITY_SCHEMA) {
|
|
@@ -6591,7 +6573,7 @@ function isIframeSecuritySensitiveAttr(attrName) {
|
|
|
6591
6573
|
return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
|
|
6592
6574
|
}
|
|
6593
6575
|
|
|
6594
|
-
// bazel-out/
|
|
6576
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/shadow_css.mjs
|
|
6595
6577
|
var animationKeywords = /* @__PURE__ */ new Set([
|
|
6596
6578
|
"inherit",
|
|
6597
6579
|
"initial",
|
|
@@ -7062,7 +7044,7 @@ function repeatGroups(groups, multiples) {
|
|
|
7062
7044
|
}
|
|
7063
7045
|
}
|
|
7064
7046
|
|
|
7065
|
-
// bazel-out/
|
|
7047
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/enums.mjs
|
|
7066
7048
|
var OpKind;
|
|
7067
7049
|
(function(OpKind2) {
|
|
7068
7050
|
OpKind2[OpKind2["ListEnd"] = 0] = "ListEnd";
|
|
@@ -7108,8 +7090,9 @@ var OpKind;
|
|
|
7108
7090
|
OpKind2[OpKind2["I18nApply"] = 40] = "I18nApply";
|
|
7109
7091
|
OpKind2[OpKind2["IcuStart"] = 41] = "IcuStart";
|
|
7110
7092
|
OpKind2[OpKind2["IcuEnd"] = 42] = "IcuEnd";
|
|
7111
|
-
OpKind2[OpKind2["
|
|
7112
|
-
OpKind2[OpKind2["
|
|
7093
|
+
OpKind2[OpKind2["IcuPlaceholder"] = 43] = "IcuPlaceholder";
|
|
7094
|
+
OpKind2[OpKind2["I18nContext"] = 44] = "I18nContext";
|
|
7095
|
+
OpKind2[OpKind2["I18nAttributes"] = 45] = "I18nAttributes";
|
|
7113
7096
|
})(OpKind || (OpKind = {}));
|
|
7114
7097
|
var ExpressionKind;
|
|
7115
7098
|
(function(ExpressionKind2) {
|
|
@@ -7134,10 +7117,11 @@ var ExpressionKind;
|
|
|
7134
7117
|
ExpressionKind2[ExpressionKind2["AssignTemporaryExpr"] = 18] = "AssignTemporaryExpr";
|
|
7135
7118
|
ExpressionKind2[ExpressionKind2["ReadTemporaryExpr"] = 19] = "ReadTemporaryExpr";
|
|
7136
7119
|
ExpressionKind2[ExpressionKind2["SanitizerExpr"] = 20] = "SanitizerExpr";
|
|
7137
|
-
ExpressionKind2[ExpressionKind2["
|
|
7138
|
-
ExpressionKind2[ExpressionKind2["
|
|
7139
|
-
ExpressionKind2[ExpressionKind2["
|
|
7140
|
-
ExpressionKind2[ExpressionKind2["
|
|
7120
|
+
ExpressionKind2[ExpressionKind2["TrustedValueFnExpr"] = 21] = "TrustedValueFnExpr";
|
|
7121
|
+
ExpressionKind2[ExpressionKind2["SlotLiteralExpr"] = 22] = "SlotLiteralExpr";
|
|
7122
|
+
ExpressionKind2[ExpressionKind2["ConditionalCase"] = 23] = "ConditionalCase";
|
|
7123
|
+
ExpressionKind2[ExpressionKind2["DerivedRepeaterVar"] = 24] = "DerivedRepeaterVar";
|
|
7124
|
+
ExpressionKind2[ExpressionKind2["ConstCollected"] = 25] = "ConstCollected";
|
|
7141
7125
|
})(ExpressionKind || (ExpressionKind = {}));
|
|
7142
7126
|
var VariableFlags;
|
|
7143
7127
|
(function(VariableFlags2) {
|
|
@@ -7156,15 +7140,6 @@ var CompatibilityMode;
|
|
|
7156
7140
|
CompatibilityMode2[CompatibilityMode2["Normal"] = 0] = "Normal";
|
|
7157
7141
|
CompatibilityMode2[CompatibilityMode2["TemplateDefinitionBuilder"] = 1] = "TemplateDefinitionBuilder";
|
|
7158
7142
|
})(CompatibilityMode || (CompatibilityMode = {}));
|
|
7159
|
-
var SanitizerFn;
|
|
7160
|
-
(function(SanitizerFn2) {
|
|
7161
|
-
SanitizerFn2[SanitizerFn2["Html"] = 0] = "Html";
|
|
7162
|
-
SanitizerFn2[SanitizerFn2["Script"] = 1] = "Script";
|
|
7163
|
-
SanitizerFn2[SanitizerFn2["Style"] = 2] = "Style";
|
|
7164
|
-
SanitizerFn2[SanitizerFn2["Url"] = 3] = "Url";
|
|
7165
|
-
SanitizerFn2[SanitizerFn2["ResourceUrl"] = 4] = "ResourceUrl";
|
|
7166
|
-
SanitizerFn2[SanitizerFn2["IframeAttribute"] = 5] = "IframeAttribute";
|
|
7167
|
-
})(SanitizerFn || (SanitizerFn = {}));
|
|
7168
7143
|
var DeferSecondaryKind;
|
|
7169
7144
|
(function(DeferSecondaryKind2) {
|
|
7170
7145
|
DeferSecondaryKind2[DeferSecondaryKind2["Loading"] = 0] = "Loading";
|
|
@@ -7235,7 +7210,7 @@ var TemplateKind;
|
|
|
7235
7210
|
TemplateKind2[TemplateKind2["Block"] = 2] = "Block";
|
|
7236
7211
|
})(TemplateKind || (TemplateKind = {}));
|
|
7237
7212
|
|
|
7238
|
-
// bazel-out/
|
|
7213
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
|
|
7239
7214
|
var ConsumesSlot = Symbol("ConsumesSlot");
|
|
7240
7215
|
var DependsOnSlotContext = Symbol("DependsOnSlotContext");
|
|
7241
7216
|
var ConsumesVarsTrait = Symbol("ConsumesVars");
|
|
@@ -7267,7 +7242,7 @@ function hasUsesVarOffsetTrait(expr) {
|
|
|
7267
7242
|
return expr[UsesVarOffset] === true;
|
|
7268
7243
|
}
|
|
7269
7244
|
|
|
7270
|
-
// bazel-out/
|
|
7245
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
|
|
7271
7246
|
function createStatementOp(statement) {
|
|
7272
7247
|
return __spreadValues({
|
|
7273
7248
|
kind: OpKind.Statement,
|
|
@@ -7289,7 +7264,7 @@ var NEW_OP = {
|
|
|
7289
7264
|
next: null
|
|
7290
7265
|
};
|
|
7291
7266
|
|
|
7292
|
-
// bazel-out/
|
|
7267
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
|
|
7293
7268
|
function createInterpolateTextOp(xref, interpolation, sourceSpan) {
|
|
7294
7269
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7295
7270
|
kind: OpKind.InterpolateText,
|
|
@@ -7308,7 +7283,7 @@ var Interpolation2 = class {
|
|
|
7308
7283
|
}
|
|
7309
7284
|
}
|
|
7310
7285
|
};
|
|
7311
|
-
function createBindingOp(target, kind, name, expression, unit, securityContext, isTextAttribute,
|
|
7286
|
+
function createBindingOp(target, kind, name, expression, unit, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
|
|
7312
7287
|
return __spreadValues({
|
|
7313
7288
|
kind: OpKind.Binding,
|
|
7314
7289
|
bindingKind: kind,
|
|
@@ -7318,12 +7293,14 @@ function createBindingOp(target, kind, name, expression, unit, securityContext,
|
|
|
7318
7293
|
unit,
|
|
7319
7294
|
securityContext,
|
|
7320
7295
|
isTextAttribute,
|
|
7321
|
-
|
|
7322
|
-
|
|
7296
|
+
isStructuralTemplateAttribute,
|
|
7297
|
+
templateKind,
|
|
7298
|
+
i18nContext: null,
|
|
7299
|
+
i18nMessage,
|
|
7323
7300
|
sourceSpan
|
|
7324
7301
|
}, NEW_OP);
|
|
7325
7302
|
}
|
|
7326
|
-
function createPropertyOp(target, name, expression, isAnimationTrigger, securityContext,
|
|
7303
|
+
function createPropertyOp(target, name, expression, isAnimationTrigger, securityContext, isStructuralTemplateAttribute, templateKind, i18nContext, i18nMessage, sourceSpan) {
|
|
7327
7304
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7328
7305
|
kind: OpKind.Property,
|
|
7329
7306
|
target,
|
|
@@ -7332,8 +7309,10 @@ function createPropertyOp(target, name, expression, isAnimationTrigger, security
|
|
|
7332
7309
|
isAnimationTrigger,
|
|
7333
7310
|
securityContext,
|
|
7334
7311
|
sanitizer: null,
|
|
7335
|
-
|
|
7312
|
+
isStructuralTemplateAttribute,
|
|
7313
|
+
templateKind,
|
|
7336
7314
|
i18nContext,
|
|
7315
|
+
i18nMessage,
|
|
7337
7316
|
sourceSpan
|
|
7338
7317
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7339
7318
|
}
|
|
@@ -7372,7 +7351,7 @@ function createClassMapOp(xref, expression, sourceSpan) {
|
|
|
7372
7351
|
sourceSpan
|
|
7373
7352
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7374
7353
|
}
|
|
7375
|
-
function createAttributeOp(target, name, expression, securityContext, isTextAttribute,
|
|
7354
|
+
function createAttributeOp(target, name, expression, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
|
|
7376
7355
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7377
7356
|
kind: OpKind.Attribute,
|
|
7378
7357
|
target,
|
|
@@ -7381,8 +7360,10 @@ function createAttributeOp(target, name, expression, securityContext, isTextAttr
|
|
|
7381
7360
|
securityContext,
|
|
7382
7361
|
sanitizer: null,
|
|
7383
7362
|
isTextAttribute,
|
|
7384
|
-
|
|
7385
|
-
|
|
7363
|
+
isStructuralTemplateAttribute,
|
|
7364
|
+
templateKind,
|
|
7365
|
+
i18nContext: null,
|
|
7366
|
+
i18nMessage,
|
|
7386
7367
|
sourceSpan
|
|
7387
7368
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7388
7369
|
}
|
|
@@ -7415,15 +7396,15 @@ function createRepeaterOp(repeaterCreate2, targetSlot, collection, sourceSpan) {
|
|
|
7415
7396
|
}, NEW_OP), TRAIT_DEPENDS_ON_SLOT_CONTEXT);
|
|
7416
7397
|
}
|
|
7417
7398
|
function createDeferWhenOp(target, expr, prefetch, sourceSpan) {
|
|
7418
|
-
return __spreadValues(__spreadValues({
|
|
7399
|
+
return __spreadValues(__spreadValues(__spreadValues({
|
|
7419
7400
|
kind: OpKind.DeferWhen,
|
|
7420
7401
|
target,
|
|
7421
7402
|
expr,
|
|
7422
7403
|
prefetch,
|
|
7423
7404
|
sourceSpan
|
|
7424
|
-
}, NEW_OP), TRAIT_DEPENDS_ON_SLOT_CONTEXT);
|
|
7405
|
+
}, NEW_OP), TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS);
|
|
7425
7406
|
}
|
|
7426
|
-
function createI18nExpressionOp(context, target, i18nOwner, handle, expression, i18nPlaceholder, resolutionTime, usage, name, sourceSpan) {
|
|
7407
|
+
function createI18nExpressionOp(context, target, i18nOwner, handle, expression, icuPlaceholder, i18nPlaceholder, resolutionTime, usage, name, sourceSpan) {
|
|
7427
7408
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7428
7409
|
kind: OpKind.I18nExpression,
|
|
7429
7410
|
context,
|
|
@@ -7431,6 +7412,7 @@ function createI18nExpressionOp(context, target, i18nOwner, handle, expression,
|
|
|
7431
7412
|
i18nOwner,
|
|
7432
7413
|
handle,
|
|
7433
7414
|
expression,
|
|
7415
|
+
icuPlaceholder,
|
|
7434
7416
|
i18nPlaceholder,
|
|
7435
7417
|
resolutionTime,
|
|
7436
7418
|
usage,
|
|
@@ -7447,7 +7429,7 @@ function createI18nApplyOp(owner, handle, sourceSpan) {
|
|
|
7447
7429
|
}, NEW_OP);
|
|
7448
7430
|
}
|
|
7449
7431
|
|
|
7450
|
-
// bazel-out/
|
|
7432
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
|
|
7451
7433
|
var _a;
|
|
7452
7434
|
var _b;
|
|
7453
7435
|
var _c;
|
|
@@ -7978,26 +7960,6 @@ var ReadTemporaryExpr = class extends ExpressionBase {
|
|
|
7978
7960
|
return r;
|
|
7979
7961
|
}
|
|
7980
7962
|
};
|
|
7981
|
-
var SanitizerExpr = class extends ExpressionBase {
|
|
7982
|
-
constructor(fn2) {
|
|
7983
|
-
super();
|
|
7984
|
-
this.fn = fn2;
|
|
7985
|
-
this.kind = ExpressionKind.SanitizerExpr;
|
|
7986
|
-
}
|
|
7987
|
-
visitExpression(visitor, context) {
|
|
7988
|
-
}
|
|
7989
|
-
isEquivalent(e) {
|
|
7990
|
-
return e instanceof SanitizerExpr && e.fn === this.fn;
|
|
7991
|
-
}
|
|
7992
|
-
isConstant() {
|
|
7993
|
-
return true;
|
|
7994
|
-
}
|
|
7995
|
-
clone() {
|
|
7996
|
-
return new SanitizerExpr(this.fn);
|
|
7997
|
-
}
|
|
7998
|
-
transformInternalExpressions() {
|
|
7999
|
-
}
|
|
8000
|
-
};
|
|
8001
7963
|
var SlotLiteralExpr = class extends ExpressionBase {
|
|
8002
7964
|
constructor(slot) {
|
|
8003
7965
|
super();
|
|
@@ -8116,7 +8078,6 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8116
8078
|
case OpKind.ClassProp:
|
|
8117
8079
|
case OpKind.ClassMap:
|
|
8118
8080
|
case OpKind.Binding:
|
|
8119
|
-
case OpKind.HostProperty:
|
|
8120
8081
|
if (op.expression instanceof Interpolation2) {
|
|
8121
8082
|
transformExpressionsInInterpolation(op.expression, transform2, flags);
|
|
8122
8083
|
} else {
|
|
@@ -8124,6 +8085,7 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8124
8085
|
}
|
|
8125
8086
|
break;
|
|
8126
8087
|
case OpKind.Property:
|
|
8088
|
+
case OpKind.HostProperty:
|
|
8127
8089
|
case OpKind.Attribute:
|
|
8128
8090
|
if (op.expression instanceof Interpolation2) {
|
|
8129
8091
|
transformExpressionsInInterpolation(op.expression, transform2, flags);
|
|
@@ -8165,6 +8127,7 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8165
8127
|
break;
|
|
8166
8128
|
case OpKind.ExtractedAttribute:
|
|
8167
8129
|
op.expression = op.expression && transformExpressionsInExpression(op.expression, transform2, flags);
|
|
8130
|
+
op.trustedValueFn = op.trustedValueFn && transformExpressionsInExpression(op.trustedValueFn, transform2, flags);
|
|
8168
8131
|
break;
|
|
8169
8132
|
case OpKind.RepeaterCreate:
|
|
8170
8133
|
op.track = transformExpressionsInExpression(op.track, transform2, flags);
|
|
@@ -8182,6 +8145,9 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8182
8145
|
if (op.placeholderConfig !== null) {
|
|
8183
8146
|
op.placeholderConfig = transformExpressionsInExpression(op.placeholderConfig, transform2, flags);
|
|
8184
8147
|
}
|
|
8148
|
+
if (op.resolverFn !== null) {
|
|
8149
|
+
op.resolverFn = transformExpressionsInExpression(op.resolverFn, transform2, flags);
|
|
8150
|
+
}
|
|
8185
8151
|
break;
|
|
8186
8152
|
case OpKind.I18nMessage:
|
|
8187
8153
|
for (const [placeholder, expr] of op.params) {
|
|
@@ -8218,6 +8184,7 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8218
8184
|
case OpKind.Template:
|
|
8219
8185
|
case OpKind.Text:
|
|
8220
8186
|
case OpKind.I18nAttributes:
|
|
8187
|
+
case OpKind.IcuPlaceholder:
|
|
8221
8188
|
break;
|
|
8222
8189
|
default:
|
|
8223
8190
|
throw new Error(`AssertionError: transformExpressionsInOp doesn't handle ${OpKind[op.kind]}`);
|
|
@@ -8272,6 +8239,10 @@ function transformExpressionsInExpression(expr, transform2, flags) {
|
|
|
8272
8239
|
}
|
|
8273
8240
|
} else if (expr instanceof NotExpr) {
|
|
8274
8241
|
expr.condition = transformExpressionsInExpression(expr.condition, transform2, flags);
|
|
8242
|
+
} else if (expr instanceof TaggedTemplateExpr) {
|
|
8243
|
+
expr.tag = transformExpressionsInExpression(expr.tag, transform2, flags);
|
|
8244
|
+
expr.template.expressions = expr.template.expressions.map((e) => transformExpressionsInExpression(e, transform2, flags));
|
|
8245
|
+
} else if (expr instanceof WrappedNodeExpr) {
|
|
8275
8246
|
} else if (expr instanceof ReadVarExpr || expr instanceof ExternalExpr || expr instanceof LiteralExpr) {
|
|
8276
8247
|
} else {
|
|
8277
8248
|
throw new Error(`Unhandled expression kind: ${expr.constructor.name}`);
|
|
@@ -8303,7 +8274,7 @@ function isStringLiteral(expr) {
|
|
|
8303
8274
|
return expr instanceof LiteralExpr && typeof expr.value === "string";
|
|
8304
8275
|
}
|
|
8305
8276
|
|
|
8306
|
-
// bazel-out/
|
|
8277
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
|
|
8307
8278
|
var _OpList = class {
|
|
8308
8279
|
constructor() {
|
|
8309
8280
|
this.debugListId = _OpList.nextListId++;
|
|
@@ -8494,14 +8465,14 @@ var OpList = _OpList;
|
|
|
8494
8465
|
_OpList.nextListId = 0;
|
|
8495
8466
|
})();
|
|
8496
8467
|
|
|
8497
|
-
// bazel-out/
|
|
8468
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/handle.mjs
|
|
8498
8469
|
var SlotHandle = class {
|
|
8499
8470
|
constructor() {
|
|
8500
8471
|
this.slot = null;
|
|
8501
8472
|
}
|
|
8502
8473
|
};
|
|
8503
8474
|
|
|
8504
|
-
// bazel-out/
|
|
8475
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
|
|
8505
8476
|
var elementContainerOpKinds = /* @__PURE__ */ new Set([
|
|
8506
8477
|
OpKind.Element,
|
|
8507
8478
|
OpKind.ElementStart,
|
|
@@ -8513,7 +8484,7 @@ var elementContainerOpKinds = /* @__PURE__ */ new Set([
|
|
|
8513
8484
|
function isElementOrContainerOp(op) {
|
|
8514
8485
|
return elementContainerOpKinds.has(op.kind);
|
|
8515
8486
|
}
|
|
8516
|
-
function createElementStartOp(tag, xref, namespace, i18nPlaceholder,
|
|
8487
|
+
function createElementStartOp(tag, xref, namespace, i18nPlaceholder, startSourceSpan, wholeSourceSpan) {
|
|
8517
8488
|
return __spreadValues(__spreadValues({
|
|
8518
8489
|
kind: OpKind.ElementStart,
|
|
8519
8490
|
xref,
|
|
@@ -8524,10 +8495,11 @@ function createElementStartOp(tag, xref, namespace, i18nPlaceholder, sourceSpan)
|
|
|
8524
8495
|
nonBindable: false,
|
|
8525
8496
|
namespace,
|
|
8526
8497
|
i18nPlaceholder,
|
|
8527
|
-
|
|
8498
|
+
startSourceSpan,
|
|
8499
|
+
wholeSourceSpan
|
|
8528
8500
|
}, TRAIT_CONSUMES_SLOT), NEW_OP);
|
|
8529
8501
|
}
|
|
8530
|
-
function createTemplateOp(xref, templateKind, tag, functionNameSuffix, namespace, i18nPlaceholder,
|
|
8502
|
+
function createTemplateOp(xref, templateKind, tag, functionNameSuffix, namespace, i18nPlaceholder, startSourceSpan, wholeSourceSpan) {
|
|
8531
8503
|
return __spreadValues(__spreadValues({
|
|
8532
8504
|
kind: OpKind.Template,
|
|
8533
8505
|
xref,
|
|
@@ -8542,11 +8514,12 @@ function createTemplateOp(xref, templateKind, tag, functionNameSuffix, namespace
|
|
|
8542
8514
|
nonBindable: false,
|
|
8543
8515
|
namespace,
|
|
8544
8516
|
i18nPlaceholder,
|
|
8545
|
-
|
|
8517
|
+
startSourceSpan,
|
|
8518
|
+
wholeSourceSpan
|
|
8546
8519
|
}, TRAIT_CONSUMES_SLOT), NEW_OP);
|
|
8547
8520
|
}
|
|
8548
|
-
function createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames,
|
|
8549
|
-
return __spreadProps(__spreadValues(__spreadValues({
|
|
8521
|
+
function createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, i18nPlaceholder, emptyI18nPlaceholder, startSourceSpan, wholeSourceSpan) {
|
|
8522
|
+
return __spreadProps(__spreadValues(__spreadValues(__spreadValues({
|
|
8550
8523
|
kind: OpKind.RepeaterCreate,
|
|
8551
8524
|
attributes: null,
|
|
8552
8525
|
xref: primaryView,
|
|
@@ -8563,8 +8536,11 @@ function createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, so
|
|
|
8563
8536
|
vars: null,
|
|
8564
8537
|
varNames,
|
|
8565
8538
|
usesComponentInstance: false,
|
|
8566
|
-
|
|
8567
|
-
|
|
8539
|
+
i18nPlaceholder,
|
|
8540
|
+
emptyI18nPlaceholder,
|
|
8541
|
+
startSourceSpan,
|
|
8542
|
+
wholeSourceSpan
|
|
8543
|
+
}, TRAIT_CONSUMES_SLOT), NEW_OP), TRAIT_CONSUMES_VARS), {
|
|
8568
8544
|
numSlotsUsed: emptyView === null ? 2 : 3
|
|
8569
8545
|
});
|
|
8570
8546
|
}
|
|
@@ -8587,16 +8563,19 @@ function createEnableBindingsOp(xref) {
|
|
|
8587
8563
|
xref
|
|
8588
8564
|
}, NEW_OP);
|
|
8589
8565
|
}
|
|
8590
|
-
function createTextOp(xref, initialValue, sourceSpan) {
|
|
8566
|
+
function createTextOp(xref, initialValue, icuPlaceholder, sourceSpan) {
|
|
8591
8567
|
return __spreadValues(__spreadValues({
|
|
8592
8568
|
kind: OpKind.Text,
|
|
8593
8569
|
xref,
|
|
8594
8570
|
handle: new SlotHandle(),
|
|
8595
8571
|
initialValue,
|
|
8572
|
+
icuPlaceholder,
|
|
8596
8573
|
sourceSpan
|
|
8597
8574
|
}, TRAIT_CONSUMES_SLOT), NEW_OP);
|
|
8598
8575
|
}
|
|
8599
|
-
function createListenerOp(target, targetSlot, name, tag, animationPhase, hostListener, sourceSpan) {
|
|
8576
|
+
function createListenerOp(target, targetSlot, name, tag, handlerOps, animationPhase, eventTarget, hostListener, sourceSpan) {
|
|
8577
|
+
const handlerList = new OpList();
|
|
8578
|
+
handlerList.push(handlerOps);
|
|
8600
8579
|
return __spreadValues({
|
|
8601
8580
|
kind: OpKind.Listener,
|
|
8602
8581
|
target,
|
|
@@ -8604,11 +8583,12 @@ function createListenerOp(target, targetSlot, name, tag, animationPhase, hostLis
|
|
|
8604
8583
|
tag,
|
|
8605
8584
|
hostListener,
|
|
8606
8585
|
name,
|
|
8607
|
-
handlerOps:
|
|
8586
|
+
handlerOps: handlerList,
|
|
8608
8587
|
handlerFnName: null,
|
|
8609
8588
|
consumesDollarEvent: false,
|
|
8610
8589
|
isAnimationListener: animationPhase !== null,
|
|
8611
8590
|
animationPhase,
|
|
8591
|
+
eventTarget,
|
|
8612
8592
|
sourceSpan
|
|
8613
8593
|
}, NEW_OP);
|
|
8614
8594
|
}
|
|
@@ -8645,14 +8625,17 @@ function createProjectionOp(xref, selector, i18nPlaceholder, attributes, sourceS
|
|
|
8645
8625
|
sourceSpan
|
|
8646
8626
|
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8647
8627
|
}
|
|
8648
|
-
function createExtractedAttributeOp(target, bindingKind, name, expression, i18nContext) {
|
|
8628
|
+
function createExtractedAttributeOp(target, bindingKind, name, expression, i18nContext, i18nMessage, securityContext) {
|
|
8649
8629
|
return __spreadValues({
|
|
8650
8630
|
kind: OpKind.ExtractedAttribute,
|
|
8651
8631
|
target,
|
|
8652
8632
|
bindingKind,
|
|
8653
8633
|
name,
|
|
8654
8634
|
expression,
|
|
8655
|
-
i18nContext
|
|
8635
|
+
i18nContext,
|
|
8636
|
+
i18nMessage,
|
|
8637
|
+
securityContext,
|
|
8638
|
+
trustedValueFn: null
|
|
8656
8639
|
}, NEW_OP);
|
|
8657
8640
|
}
|
|
8658
8641
|
function createDeferOp(xref, main, mainSlot, metadata, sourceSpan) {
|
|
@@ -8737,6 +8720,15 @@ function createIcuEndOp(xref) {
|
|
|
8737
8720
|
xref
|
|
8738
8721
|
}, NEW_OP);
|
|
8739
8722
|
}
|
|
8723
|
+
function createIcuPlaceholderOp(xref, name, strings) {
|
|
8724
|
+
return __spreadValues({
|
|
8725
|
+
kind: OpKind.IcuPlaceholder,
|
|
8726
|
+
xref,
|
|
8727
|
+
name,
|
|
8728
|
+
strings,
|
|
8729
|
+
expressionPlaceholders: []
|
|
8730
|
+
}, NEW_OP);
|
|
8731
|
+
}
|
|
8740
8732
|
function createI18nContextOp(contextKind, xref, i18nBlock, message, sourceSpan) {
|
|
8741
8733
|
if (i18nBlock === null && contextKind !== I18nContextKind.Attr) {
|
|
8742
8734
|
throw new Error("AssertionError: i18nBlock must be provided for non-attribute contexts.");
|
|
@@ -8762,22 +8754,24 @@ function createI18nAttributesOp(xref, handle, target) {
|
|
|
8762
8754
|
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8763
8755
|
}
|
|
8764
8756
|
|
|
8765
|
-
// bazel-out/
|
|
8766
|
-
function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext, sourceSpan) {
|
|
8757
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
|
|
8758
|
+
function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext, securityContext, sourceSpan) {
|
|
8767
8759
|
return __spreadValues(__spreadValues({
|
|
8768
8760
|
kind: OpKind.HostProperty,
|
|
8769
8761
|
name,
|
|
8770
8762
|
expression,
|
|
8771
8763
|
isAnimationTrigger,
|
|
8772
8764
|
i18nContext,
|
|
8765
|
+
securityContext,
|
|
8766
|
+
sanitizer: null,
|
|
8773
8767
|
sourceSpan
|
|
8774
8768
|
}, TRAIT_CONSUMES_VARS), NEW_OP);
|
|
8775
8769
|
}
|
|
8776
8770
|
|
|
8777
|
-
// bazel-out/
|
|
8771
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
|
|
8778
8772
|
var CTX_REF = "CTX_REF_MARKER";
|
|
8779
8773
|
|
|
8780
|
-
// bazel-out/
|
|
8774
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
|
|
8781
8775
|
var CompilationJobKind;
|
|
8782
8776
|
(function(CompilationJobKind2) {
|
|
8783
8777
|
CompilationJobKind2[CompilationJobKind2["Tmpl"] = 0] = "Tmpl";
|
|
@@ -8884,7 +8878,7 @@ var HostBindingCompilationUnit = class extends CompilationUnit {
|
|
|
8884
8878
|
}
|
|
8885
8879
|
};
|
|
8886
8880
|
|
|
8887
|
-
// bazel-out/
|
|
8881
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
|
|
8888
8882
|
function deleteAnyCasts(job) {
|
|
8889
8883
|
for (const unit of job.units) {
|
|
8890
8884
|
for (const op of unit.ops()) {
|
|
@@ -8902,7 +8896,7 @@ function removeAnys(e) {
|
|
|
8902
8896
|
return e;
|
|
8903
8897
|
}
|
|
8904
8898
|
|
|
8905
|
-
// bazel-out/
|
|
8899
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
|
|
8906
8900
|
function applyI18nExpressions(job) {
|
|
8907
8901
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
8908
8902
|
for (const unit of job.units) {
|
|
@@ -8945,62 +8939,52 @@ function needsApplication(i18nContexts, op) {
|
|
|
8945
8939
|
return false;
|
|
8946
8940
|
}
|
|
8947
8941
|
|
|
8948
|
-
// bazel-out/
|
|
8942
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs
|
|
8949
8943
|
function assignI18nSlotDependencies(job) {
|
|
8950
|
-
const i18nLastSlotConsumers = /* @__PURE__ */ new Map();
|
|
8951
|
-
let lastSlotConsumer = null;
|
|
8952
|
-
let currentI18nOp = null;
|
|
8953
8944
|
for (const unit of job.units) {
|
|
8954
|
-
|
|
8955
|
-
|
|
8956
|
-
|
|
8945
|
+
let updateOp = unit.update.head;
|
|
8946
|
+
let i18nExpressionsInProgress = [];
|
|
8947
|
+
let state = null;
|
|
8948
|
+
for (const createOp of unit.create) {
|
|
8949
|
+
if (createOp.kind === OpKind.I18nStart) {
|
|
8950
|
+
state = {
|
|
8951
|
+
blockXref: createOp.xref,
|
|
8952
|
+
lastSlotConsumer: createOp.xref
|
|
8953
|
+
};
|
|
8954
|
+
} else if (createOp.kind === OpKind.I18nEnd) {
|
|
8955
|
+
for (const op of i18nExpressionsInProgress) {
|
|
8956
|
+
op.target = state.lastSlotConsumer;
|
|
8957
|
+
OpList.insertBefore(op, updateOp);
|
|
8958
|
+
}
|
|
8959
|
+
i18nExpressionsInProgress.length = 0;
|
|
8960
|
+
state = null;
|
|
8957
8961
|
}
|
|
8958
|
-
|
|
8959
|
-
|
|
8960
|
-
|
|
8961
|
-
|
|
8962
|
-
|
|
8963
|
-
if (
|
|
8964
|
-
|
|
8962
|
+
if (hasConsumesSlotTrait(createOp)) {
|
|
8963
|
+
if (state !== null) {
|
|
8964
|
+
state.lastSlotConsumer = createOp.xref;
|
|
8965
|
+
}
|
|
8966
|
+
while (true) {
|
|
8967
|
+
if (updateOp.next === null) {
|
|
8968
|
+
break;
|
|
8965
8969
|
}
|
|
8966
|
-
if (
|
|
8967
|
-
|
|
8970
|
+
if (state !== null && updateOp.kind === OpKind.I18nExpression && updateOp.usage === I18nExpressionFor.I18nText && updateOp.i18nOwner === state.blockXref) {
|
|
8971
|
+
const opToRemove = updateOp;
|
|
8972
|
+
updateOp = updateOp.next;
|
|
8973
|
+
OpList.remove(opToRemove);
|
|
8974
|
+
i18nExpressionsInProgress.push(opToRemove);
|
|
8975
|
+
continue;
|
|
8968
8976
|
}
|
|
8969
|
-
|
|
8970
|
-
|
|
8971
|
-
|
|
8972
|
-
|
|
8973
|
-
}
|
|
8974
|
-
let opsToMove = [];
|
|
8975
|
-
let moveAfterTarget = null;
|
|
8976
|
-
let previousTarget = null;
|
|
8977
|
-
for (const op of unit.update) {
|
|
8978
|
-
if (hasDependsOnSlotContextTrait(op)) {
|
|
8979
|
-
if (moveAfterTarget !== null && previousTarget === moveAfterTarget && op.target !== previousTarget) {
|
|
8980
|
-
OpList.insertBefore(opsToMove, op);
|
|
8981
|
-
moveAfterTarget = null;
|
|
8982
|
-
opsToMove = [];
|
|
8983
|
-
}
|
|
8984
|
-
previousTarget = op.target;
|
|
8985
|
-
}
|
|
8986
|
-
if (op.kind === OpKind.I18nExpression && op.usage === I18nExpressionFor.I18nText) {
|
|
8987
|
-
OpList.remove(op);
|
|
8988
|
-
opsToMove.push(op);
|
|
8989
|
-
const target = i18nLastSlotConsumers.get(op.i18nOwner);
|
|
8990
|
-
if (target === void 0) {
|
|
8991
|
-
throw new Error("AssertionError: Expected to find a last slot consumer for an I18nExpressionOp");
|
|
8977
|
+
if (hasDependsOnSlotContextTrait(updateOp) && updateOp.target !== createOp.xref) {
|
|
8978
|
+
break;
|
|
8979
|
+
}
|
|
8980
|
+
updateOp = updateOp.next;
|
|
8992
8981
|
}
|
|
8993
|
-
op.target = target;
|
|
8994
|
-
moveAfterTarget = op.target;
|
|
8995
8982
|
}
|
|
8996
8983
|
}
|
|
8997
|
-
if (moveAfterTarget !== null) {
|
|
8998
|
-
unit.update.push(opsToMove);
|
|
8999
|
-
}
|
|
9000
8984
|
}
|
|
9001
8985
|
}
|
|
9002
8986
|
|
|
9003
|
-
// bazel-out/
|
|
8987
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
|
|
9004
8988
|
function createOpXrefMap(unit) {
|
|
9005
8989
|
const map = /* @__PURE__ */ new Map();
|
|
9006
8990
|
for (const op of unit.create) {
|
|
@@ -9012,7 +8996,7 @@ function createOpXrefMap(unit) {
|
|
|
9012
8996
|
return map;
|
|
9013
8997
|
}
|
|
9014
8998
|
|
|
9015
|
-
// bazel-out/
|
|
8999
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
|
|
9016
9000
|
function extractAttributes(job) {
|
|
9017
9001
|
for (const unit of job.units) {
|
|
9018
9002
|
const elements = createOpXrefMap(unit);
|
|
@@ -9024,25 +9008,52 @@ function extractAttributes(job) {
|
|
|
9024
9008
|
case OpKind.Property:
|
|
9025
9009
|
if (!op.isAnimationTrigger) {
|
|
9026
9010
|
let bindingKind;
|
|
9027
|
-
if (op.
|
|
9011
|
+
if (op.i18nMessage !== null && op.templateKind === null) {
|
|
9028
9012
|
bindingKind = BindingKind.I18n;
|
|
9029
|
-
} else if (op.
|
|
9013
|
+
} else if (op.isStructuralTemplateAttribute) {
|
|
9030
9014
|
bindingKind = BindingKind.Template;
|
|
9031
9015
|
} else {
|
|
9032
9016
|
bindingKind = BindingKind.Property;
|
|
9033
9017
|
}
|
|
9034
|
-
OpList.insertBefore(
|
|
9018
|
+
OpList.insertBefore(
|
|
9019
|
+
createExtractedAttributeOp(
|
|
9020
|
+
op.target,
|
|
9021
|
+
bindingKind,
|
|
9022
|
+
op.name,
|
|
9023
|
+
null,
|
|
9024
|
+
null,
|
|
9025
|
+
null,
|
|
9026
|
+
op.securityContext
|
|
9027
|
+
),
|
|
9028
|
+
lookupElement(elements, op.target)
|
|
9029
|
+
);
|
|
9035
9030
|
}
|
|
9036
9031
|
break;
|
|
9037
9032
|
case OpKind.StyleProp:
|
|
9038
9033
|
case OpKind.ClassProp:
|
|
9039
9034
|
if (unit.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder && op.expression instanceof EmptyExpr2) {
|
|
9040
|
-
OpList.insertBefore(createExtractedAttributeOp(
|
|
9035
|
+
OpList.insertBefore(createExtractedAttributeOp(
|
|
9036
|
+
op.target,
|
|
9037
|
+
BindingKind.Property,
|
|
9038
|
+
op.name,
|
|
9039
|
+
null,
|
|
9040
|
+
null,
|
|
9041
|
+
null,
|
|
9042
|
+
SecurityContext.STYLE
|
|
9043
|
+
), lookupElement(elements, op.target));
|
|
9041
9044
|
}
|
|
9042
9045
|
break;
|
|
9043
9046
|
case OpKind.Listener:
|
|
9044
9047
|
if (!op.isAnimationListener) {
|
|
9045
|
-
const extractedAttributeOp = createExtractedAttributeOp(
|
|
9048
|
+
const extractedAttributeOp = createExtractedAttributeOp(
|
|
9049
|
+
op.target,
|
|
9050
|
+
BindingKind.Property,
|
|
9051
|
+
op.name,
|
|
9052
|
+
null,
|
|
9053
|
+
null,
|
|
9054
|
+
null,
|
|
9055
|
+
SecurityContext.NONE
|
|
9056
|
+
);
|
|
9046
9057
|
if (job.kind === CompilationJobKind.Host) {
|
|
9047
9058
|
unit.create.push(extractedAttributeOp);
|
|
9048
9059
|
} else {
|
|
@@ -9065,18 +9076,12 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
9065
9076
|
if (op.expression instanceof Interpolation2) {
|
|
9066
9077
|
return;
|
|
9067
9078
|
}
|
|
9068
|
-
let extractable = op.expression.isConstant();
|
|
9079
|
+
let extractable = op.isTextAttribute || op.expression.isConstant();
|
|
9069
9080
|
if (unit.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder) {
|
|
9070
|
-
extractable =
|
|
9071
|
-
if (op.name === "style" || op.name === "class") {
|
|
9072
|
-
extractable && (extractable = op.isTextAttribute);
|
|
9073
|
-
}
|
|
9074
|
-
if (unit.job.kind === CompilationJobKind.Host) {
|
|
9075
|
-
extractable && (extractable = op.isTextAttribute);
|
|
9076
|
-
}
|
|
9081
|
+
extractable && (extractable = op.isTextAttribute);
|
|
9077
9082
|
}
|
|
9078
9083
|
if (extractable) {
|
|
9079
|
-
const extractedAttributeOp = createExtractedAttributeOp(op.target, op.
|
|
9084
|
+
const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplateAttribute ? BindingKind.Template : BindingKind.Attribute, op.name, op.expression, op.i18nContext, op.i18nMessage, op.securityContext);
|
|
9080
9085
|
if (unit.job.kind === CompilationJobKind.Host) {
|
|
9081
9086
|
unit.create.push(extractedAttributeOp);
|
|
9082
9087
|
} else {
|
|
@@ -9087,7 +9092,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
9087
9092
|
}
|
|
9088
9093
|
}
|
|
9089
9094
|
|
|
9090
|
-
// bazel-out/
|
|
9095
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
|
|
9091
9096
|
function lookupElement2(elements, xref) {
|
|
9092
9097
|
const el = elements.get(xref);
|
|
9093
9098
|
if (el === void 0) {
|
|
@@ -9117,15 +9122,15 @@ function specializeBindings(job) {
|
|
|
9117
9122
|
const target = lookupElement2(elements, op.target);
|
|
9118
9123
|
target.nonBindable = true;
|
|
9119
9124
|
} else {
|
|
9120
|
-
OpList.replace(op, createAttributeOp(op.target, op.name, op.expression, op.securityContext, op.isTextAttribute, op.
|
|
9125
|
+
OpList.replace(op, createAttributeOp(op.target, op.name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));
|
|
9121
9126
|
}
|
|
9122
9127
|
break;
|
|
9123
9128
|
case BindingKind.Property:
|
|
9124
9129
|
case BindingKind.Animation:
|
|
9125
9130
|
if (job.kind === CompilationJobKind.Host) {
|
|
9126
|
-
OpList.replace(op, createHostPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.Animation, op.i18nContext, op.sourceSpan));
|
|
9131
|
+
OpList.replace(op, createHostPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.Animation, op.i18nContext, op.securityContext, op.sourceSpan));
|
|
9127
9132
|
} else {
|
|
9128
|
-
OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.Animation, op.securityContext, op.
|
|
9133
|
+
OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.Animation, op.securityContext, op.isStructuralTemplateAttribute, op.templateKind, op.i18nContext, op.i18nMessage, op.sourceSpan));
|
|
9129
9134
|
}
|
|
9130
9135
|
break;
|
|
9131
9136
|
case BindingKind.I18n:
|
|
@@ -9137,7 +9142,7 @@ function specializeBindings(job) {
|
|
|
9137
9142
|
}
|
|
9138
9143
|
}
|
|
9139
9144
|
|
|
9140
|
-
// bazel-out/
|
|
9145
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
|
|
9141
9146
|
var CHAINABLE = /* @__PURE__ */ new Set([
|
|
9142
9147
|
Identifiers.attribute,
|
|
9143
9148
|
Identifiers.classProp,
|
|
@@ -9203,7 +9208,7 @@ function chainOperationsInList(opList) {
|
|
|
9203
9208
|
}
|
|
9204
9209
|
}
|
|
9205
9210
|
|
|
9206
|
-
// bazel-out/
|
|
9211
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/collapse_singleton_interpolations.mjs
|
|
9207
9212
|
function collapseSingletonInterpolations(job) {
|
|
9208
9213
|
for (const unit of job.units) {
|
|
9209
9214
|
for (const op of unit.update) {
|
|
@@ -9215,7 +9220,7 @@ function collapseSingletonInterpolations(job) {
|
|
|
9215
9220
|
}
|
|
9216
9221
|
}
|
|
9217
9222
|
|
|
9218
|
-
// bazel-out/
|
|
9223
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
|
|
9219
9224
|
function generateConditionalExpressions(job) {
|
|
9220
9225
|
for (const unit of job.units) {
|
|
9221
9226
|
for (const op of unit.ops()) {
|
|
@@ -9252,7 +9257,7 @@ function generateConditionalExpressions(job) {
|
|
|
9252
9257
|
}
|
|
9253
9258
|
}
|
|
9254
9259
|
|
|
9255
|
-
// bazel-out/
|
|
9260
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
9256
9261
|
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
9257
9262
|
["&&", BinaryOperator.And],
|
|
9258
9263
|
[">", BinaryOperator.Bigger],
|
|
@@ -9302,15 +9307,15 @@ function literalOrArrayLiteral(value) {
|
|
|
9302
9307
|
return literal(value);
|
|
9303
9308
|
}
|
|
9304
9309
|
|
|
9305
|
-
// bazel-out/
|
|
9310
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
|
|
9306
9311
|
function collectElementConsts(job) {
|
|
9307
9312
|
const allElementAttributes = /* @__PURE__ */ new Map();
|
|
9308
9313
|
for (const unit of job.units) {
|
|
9309
9314
|
for (const op of unit.create) {
|
|
9310
9315
|
if (op.kind === OpKind.ExtractedAttribute) {
|
|
9311
|
-
const attributes = allElementAttributes.get(op.target) || new ElementAttributes();
|
|
9316
|
+
const attributes = allElementAttributes.get(op.target) || new ElementAttributes(job.compatibility);
|
|
9312
9317
|
allElementAttributes.set(op.target, attributes);
|
|
9313
|
-
attributes.add(op.bindingKind, op.name, op.expression);
|
|
9318
|
+
attributes.add(op.bindingKind, op.name, op.expression, op.trustedValueFn);
|
|
9314
9319
|
OpList.remove(op);
|
|
9315
9320
|
}
|
|
9316
9321
|
}
|
|
@@ -9343,11 +9348,6 @@ function collectElementConsts(job) {
|
|
|
9343
9348
|
}
|
|
9344
9349
|
var FLYWEIGHT_ARRAY = Object.freeze([]);
|
|
9345
9350
|
var ElementAttributes = class {
|
|
9346
|
-
constructor() {
|
|
9347
|
-
this.known = /* @__PURE__ */ new Set();
|
|
9348
|
-
this.byKind = /* @__PURE__ */ new Map();
|
|
9349
|
-
this.projectAs = null;
|
|
9350
|
-
}
|
|
9351
9351
|
get attributes() {
|
|
9352
9352
|
var _a2;
|
|
9353
9353
|
return (_a2 = this.byKind.get(BindingKind.Attribute)) != null ? _a2 : FLYWEIGHT_ARRAY;
|
|
@@ -9372,12 +9372,28 @@ var ElementAttributes = class {
|
|
|
9372
9372
|
var _a2;
|
|
9373
9373
|
return (_a2 = this.byKind.get(BindingKind.I18n)) != null ? _a2 : FLYWEIGHT_ARRAY;
|
|
9374
9374
|
}
|
|
9375
|
-
|
|
9375
|
+
constructor(compatibility) {
|
|
9376
|
+
this.compatibility = compatibility;
|
|
9377
|
+
this.known = /* @__PURE__ */ new Map();
|
|
9378
|
+
this.byKind = /* @__PURE__ */ new Map();
|
|
9379
|
+
this.projectAs = null;
|
|
9380
|
+
}
|
|
9381
|
+
isKnown(kind, name, value) {
|
|
9376
9382
|
var _a2;
|
|
9377
|
-
|
|
9383
|
+
const nameToValue = (_a2 = this.known.get(kind)) != null ? _a2 : /* @__PURE__ */ new Set();
|
|
9384
|
+
this.known.set(kind, nameToValue);
|
|
9385
|
+
if (nameToValue.has(name)) {
|
|
9386
|
+
return true;
|
|
9387
|
+
}
|
|
9388
|
+
nameToValue.add(name);
|
|
9389
|
+
return false;
|
|
9390
|
+
}
|
|
9391
|
+
add(kind, name, value, trustedValueFn) {
|
|
9392
|
+
var _a2;
|
|
9393
|
+
const allowDuplicates = this.compatibility === CompatibilityMode.TemplateDefinitionBuilder && (kind === BindingKind.Attribute || kind === BindingKind.ClassName || kind === BindingKind.StyleProperty);
|
|
9394
|
+
if (!allowDuplicates && this.isKnown(kind, name, value)) {
|
|
9378
9395
|
return;
|
|
9379
9396
|
}
|
|
9380
|
-
this.known.add(name);
|
|
9381
9397
|
if (name === "ngProjectAs") {
|
|
9382
9398
|
if (value === null || !(value instanceof LiteralExpr) || value.value == null || typeof ((_a2 = value.value) == null ? void 0 : _a2.toString()) !== "string") {
|
|
9383
9399
|
throw Error("ngProjectAs must have a string literal value");
|
|
@@ -9390,7 +9406,14 @@ var ElementAttributes = class {
|
|
|
9390
9406
|
if (value === null) {
|
|
9391
9407
|
throw Error("Attribute, i18n attribute, & style element attributes must have a value");
|
|
9392
9408
|
}
|
|
9393
|
-
|
|
9409
|
+
if (trustedValueFn !== null) {
|
|
9410
|
+
if (!isStringLiteral(value)) {
|
|
9411
|
+
throw Error("AssertionError: extracted attribute value should be string literal");
|
|
9412
|
+
}
|
|
9413
|
+
array.push(taggedTemplate(trustedValueFn, new TemplateLiteral([new TemplateLiteralElement(value.value)], []), void 0, value.sourceSpan));
|
|
9414
|
+
} else {
|
|
9415
|
+
array.push(value);
|
|
9416
|
+
}
|
|
9394
9417
|
}
|
|
9395
9418
|
}
|
|
9396
9419
|
arrayFor(kind) {
|
|
@@ -9401,7 +9424,7 @@ var ElementAttributes = class {
|
|
|
9401
9424
|
}
|
|
9402
9425
|
};
|
|
9403
9426
|
function getAttributeNameLiterals(name) {
|
|
9404
|
-
const [attributeNamespace, attributeName] = splitNsName(name);
|
|
9427
|
+
const [attributeNamespace, attributeName] = splitNsName(name, false);
|
|
9405
9428
|
const nameLiteral = literal(attributeName);
|
|
9406
9429
|
if (attributeNamespace) {
|
|
9407
9430
|
return [
|
|
@@ -9436,7 +9459,7 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
|
|
|
9436
9459
|
return literalArr(attrArray);
|
|
9437
9460
|
}
|
|
9438
9461
|
|
|
9439
|
-
// bazel-out/
|
|
9462
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/convert_i18n_bindings.mjs
|
|
9440
9463
|
function convertI18nBindings(job) {
|
|
9441
9464
|
const i18nAttributesByElem = /* @__PURE__ */ new Map();
|
|
9442
9465
|
for (const unit of job.units) {
|
|
@@ -9468,7 +9491,7 @@ function convertI18nBindings(job) {
|
|
|
9468
9491
|
if (op.expression.i18nPlaceholders.length !== op.expression.expressions.length) {
|
|
9469
9492
|
throw new Error(`AssertionError: An i18n attribute binding instruction requires the same number of expressions and placeholders, but found ${op.expression.i18nPlaceholders.length} placeholders and ${op.expression.expressions.length} expressions`);
|
|
9470
9493
|
}
|
|
9471
|
-
ops.push(createI18nExpressionOp(op.i18nContext, i18nAttributesForElem.target, i18nAttributesForElem.xref, i18nAttributesForElem.handle, expr, op.expression.i18nPlaceholders[i], I18nParamResolutionTime.Creation, I18nExpressionFor.I18nAttribute, op.name, op.sourceSpan));
|
|
9494
|
+
ops.push(createI18nExpressionOp(op.i18nContext, i18nAttributesForElem.target, i18nAttributesForElem.xref, i18nAttributesForElem.handle, expr, null, op.expression.i18nPlaceholders[i], I18nParamResolutionTime.Creation, I18nExpressionFor.I18nAttribute, op.name, op.sourceSpan));
|
|
9472
9495
|
}
|
|
9473
9496
|
OpList.replaceWithMany(op, ops);
|
|
9474
9497
|
break;
|
|
@@ -9477,7 +9500,7 @@ function convertI18nBindings(job) {
|
|
|
9477
9500
|
}
|
|
9478
9501
|
}
|
|
9479
9502
|
|
|
9480
|
-
// bazel-out/
|
|
9503
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_defer_deps_fns.mjs
|
|
9481
9504
|
function createDeferDepsFns(job) {
|
|
9482
9505
|
for (const unit of job.units) {
|
|
9483
9506
|
for (const op of unit.create) {
|
|
@@ -9499,57 +9522,117 @@ function createDeferDepsFns(job) {
|
|
|
9499
9522
|
if (op.handle.slot === null) {
|
|
9500
9523
|
throw new Error("AssertionError: slot must be assigned bfore extracting defer deps functions");
|
|
9501
9524
|
}
|
|
9502
|
-
op.resolverFn = job.pool.getSharedFunctionReference(
|
|
9525
|
+
op.resolverFn = job.pool.getSharedFunctionReference(
|
|
9526
|
+
depsFnExpr,
|
|
9527
|
+
`${job.componentName}_Defer_${op.handle.slot}_DepsFn`,
|
|
9528
|
+
false
|
|
9529
|
+
);
|
|
9503
9530
|
}
|
|
9504
9531
|
}
|
|
9505
9532
|
}
|
|
9506
9533
|
}
|
|
9507
9534
|
|
|
9508
|
-
// bazel-out/
|
|
9535
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_i18n_contexts.mjs
|
|
9509
9536
|
function createI18nContexts(job) {
|
|
9510
|
-
const
|
|
9511
|
-
|
|
9512
|
-
|
|
9537
|
+
const attrContextByMessage = /* @__PURE__ */ new Map();
|
|
9538
|
+
for (const unit of job.units) {
|
|
9539
|
+
for (const op of unit.ops()) {
|
|
9540
|
+
switch (op.kind) {
|
|
9541
|
+
case OpKind.Binding:
|
|
9542
|
+
case OpKind.Property:
|
|
9543
|
+
case OpKind.Attribute:
|
|
9544
|
+
case OpKind.ExtractedAttribute:
|
|
9545
|
+
if (op.i18nMessage === null) {
|
|
9546
|
+
continue;
|
|
9547
|
+
}
|
|
9548
|
+
if (!attrContextByMessage.has(op.i18nMessage)) {
|
|
9549
|
+
const i18nContext = createI18nContextOp(I18nContextKind.Attr, job.allocateXrefId(), null, op.i18nMessage, null);
|
|
9550
|
+
unit.create.push(i18nContext);
|
|
9551
|
+
attrContextByMessage.set(op.i18nMessage, i18nContext.xref);
|
|
9552
|
+
}
|
|
9553
|
+
op.i18nContext = attrContextByMessage.get(op.i18nMessage);
|
|
9554
|
+
break;
|
|
9555
|
+
}
|
|
9556
|
+
}
|
|
9557
|
+
}
|
|
9558
|
+
const blockContextByI18nBlock = /* @__PURE__ */ new Map();
|
|
9513
9559
|
for (const unit of job.units) {
|
|
9514
9560
|
for (const op of unit.create) {
|
|
9515
9561
|
switch (op.kind) {
|
|
9516
9562
|
case OpKind.I18nStart:
|
|
9517
|
-
currentI18nOp = op;
|
|
9518
9563
|
if (op.xref === op.root) {
|
|
9519
|
-
|
|
9520
|
-
unit.create.push(
|
|
9521
|
-
op.context = xref;
|
|
9522
|
-
|
|
9564
|
+
const contextOp = createI18nContextOp(I18nContextKind.RootI18n, job.allocateXrefId(), op.xref, op.message, null);
|
|
9565
|
+
unit.create.push(contextOp);
|
|
9566
|
+
op.context = contextOp.xref;
|
|
9567
|
+
blockContextByI18nBlock.set(op.xref, contextOp);
|
|
9523
9568
|
}
|
|
9524
9569
|
break;
|
|
9570
|
+
}
|
|
9571
|
+
}
|
|
9572
|
+
}
|
|
9573
|
+
for (const unit of job.units) {
|
|
9574
|
+
for (const op of unit.create) {
|
|
9575
|
+
if (op.kind === OpKind.I18nStart && op.xref !== op.root) {
|
|
9576
|
+
const rootContext = blockContextByI18nBlock.get(op.root);
|
|
9577
|
+
if (rootContext === void 0) {
|
|
9578
|
+
throw Error("AssertionError: Root i18n block i18n context should have been created.");
|
|
9579
|
+
}
|
|
9580
|
+
op.context = rootContext.xref;
|
|
9581
|
+
blockContextByI18nBlock.set(op.xref, rootContext);
|
|
9582
|
+
}
|
|
9583
|
+
}
|
|
9584
|
+
}
|
|
9585
|
+
let currentI18nOp = null;
|
|
9586
|
+
for (const unit of job.units) {
|
|
9587
|
+
for (const op of unit.create) {
|
|
9588
|
+
switch (op.kind) {
|
|
9589
|
+
case OpKind.I18nStart:
|
|
9590
|
+
currentI18nOp = op;
|
|
9591
|
+
break;
|
|
9525
9592
|
case OpKind.I18nEnd:
|
|
9526
9593
|
currentI18nOp = null;
|
|
9527
9594
|
break;
|
|
9528
9595
|
case OpKind.IcuStart:
|
|
9529
9596
|
if (currentI18nOp === null) {
|
|
9530
|
-
throw Error("Unexpected ICU outside of an i18n block.");
|
|
9597
|
+
throw Error("AssertionError: Unexpected ICU outside of an i18n block.");
|
|
9531
9598
|
}
|
|
9532
9599
|
if (op.message.id !== currentI18nOp.message.id) {
|
|
9533
|
-
|
|
9534
|
-
unit.create.push(
|
|
9535
|
-
op.context = xref;
|
|
9600
|
+
const contextOp = createI18nContextOp(I18nContextKind.Icu, job.allocateXrefId(), currentI18nOp.xref, op.message, null);
|
|
9601
|
+
unit.create.push(contextOp);
|
|
9602
|
+
op.context = contextOp.xref;
|
|
9536
9603
|
} else {
|
|
9537
9604
|
op.context = currentI18nOp.context;
|
|
9605
|
+
blockContextByI18nBlock.get(currentI18nOp.xref).contextKind = I18nContextKind.Icu;
|
|
9538
9606
|
}
|
|
9539
9607
|
break;
|
|
9540
9608
|
}
|
|
9541
9609
|
}
|
|
9542
9610
|
}
|
|
9611
|
+
}
|
|
9612
|
+
|
|
9613
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/deduplicate_text_bindings.mjs
|
|
9614
|
+
function deduplicateTextBindings(job) {
|
|
9615
|
+
const seen = /* @__PURE__ */ new Map();
|
|
9543
9616
|
for (const unit of job.units) {
|
|
9544
|
-
for (const op of unit.
|
|
9545
|
-
if (op.kind === OpKind.
|
|
9546
|
-
|
|
9617
|
+
for (const op of unit.update.reversed()) {
|
|
9618
|
+
if (op.kind === OpKind.Binding && op.isTextAttribute) {
|
|
9619
|
+
const seenForElement = seen.get(op.target) || /* @__PURE__ */ new Set();
|
|
9620
|
+
if (seenForElement.has(op.name)) {
|
|
9621
|
+
if (job.compatibility === CompatibilityMode.TemplateDefinitionBuilder) {
|
|
9622
|
+
if (op.name === "style" || op.name === "class") {
|
|
9623
|
+
OpList.remove(op);
|
|
9624
|
+
}
|
|
9625
|
+
} else {
|
|
9626
|
+
}
|
|
9627
|
+
}
|
|
9628
|
+
seenForElement.add(op.name);
|
|
9629
|
+
seen.set(op.target, seenForElement);
|
|
9547
9630
|
}
|
|
9548
9631
|
}
|
|
9549
9632
|
}
|
|
9550
9633
|
}
|
|
9551
9634
|
|
|
9552
|
-
// bazel-out/
|
|
9635
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_configs.mjs
|
|
9553
9636
|
function configureDeferInstructions(job) {
|
|
9554
9637
|
for (const unit of job.units) {
|
|
9555
9638
|
for (const op of unit.create) {
|
|
@@ -9566,7 +9649,7 @@ function configureDeferInstructions(job) {
|
|
|
9566
9649
|
}
|
|
9567
9650
|
}
|
|
9568
9651
|
|
|
9569
|
-
// bazel-out/
|
|
9652
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_resolve_targets.mjs
|
|
9570
9653
|
function resolveDeferTargetNames(job) {
|
|
9571
9654
|
const scopes = /* @__PURE__ */ new Map();
|
|
9572
9655
|
function getScopeForView2(view) {
|
|
@@ -9660,7 +9743,7 @@ var Scope = class {
|
|
|
9660
9743
|
}
|
|
9661
9744
|
};
|
|
9662
9745
|
|
|
9663
|
-
// bazel-out/
|
|
9746
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
|
|
9664
9747
|
var REPLACEMENTS = /* @__PURE__ */ new Map([
|
|
9665
9748
|
[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
|
|
9666
9749
|
[OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],
|
|
@@ -9687,7 +9770,7 @@ function collapseEmptyInstructions(job) {
|
|
|
9687
9770
|
}
|
|
9688
9771
|
}
|
|
9689
9772
|
|
|
9690
|
-
// bazel-out/
|
|
9773
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
|
|
9691
9774
|
function expandSafeReads(job) {
|
|
9692
9775
|
for (const unit of job.units) {
|
|
9693
9776
|
for (const op of unit.ops()) {
|
|
@@ -9823,7 +9906,7 @@ function ternaryTransform(e) {
|
|
|
9823
9906
|
return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
|
|
9824
9907
|
}
|
|
9825
9908
|
|
|
9826
|
-
// bazel-out/
|
|
9909
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/extract_i18n_messages.mjs
|
|
9827
9910
|
var ESCAPE = "\uFFFD";
|
|
9828
9911
|
var ELEMENT_MARKER = "#";
|
|
9829
9912
|
var TEMPLATE_MARKER = "*";
|
|
@@ -9833,12 +9916,16 @@ var LIST_START_MARKER = "[";
|
|
|
9833
9916
|
var LIST_END_MARKER = "]";
|
|
9834
9917
|
var LIST_DELIMITER = "|";
|
|
9835
9918
|
function extractI18nMessages(job) {
|
|
9836
|
-
const
|
|
9919
|
+
const i18nMessagesByContext = /* @__PURE__ */ new Map();
|
|
9837
9920
|
const i18nBlocks = /* @__PURE__ */ new Map();
|
|
9921
|
+
const i18nContexts = /* @__PURE__ */ new Map();
|
|
9838
9922
|
for (const unit of job.units) {
|
|
9839
9923
|
for (const op of unit.create) {
|
|
9840
9924
|
switch (op.kind) {
|
|
9841
9925
|
case OpKind.I18nContext:
|
|
9926
|
+
const i18nMessageOp = createI18nMessage(job, op);
|
|
9927
|
+
unit.create.push(i18nMessageOp);
|
|
9928
|
+
i18nMessagesByContext.set(op.xref, i18nMessageOp);
|
|
9842
9929
|
i18nContexts.set(op.xref, op);
|
|
9843
9930
|
break;
|
|
9844
9931
|
case OpKind.I18nStart:
|
|
@@ -9847,49 +9934,40 @@ function extractI18nMessages(job) {
|
|
|
9847
9934
|
}
|
|
9848
9935
|
}
|
|
9849
9936
|
}
|
|
9850
|
-
|
|
9851
|
-
for (const op of unit.create) {
|
|
9852
|
-
if (op.kind !== OpKind.I18nContext || op.contextKind !== I18nContextKind.Attr) {
|
|
9853
|
-
continue;
|
|
9854
|
-
}
|
|
9855
|
-
const i18nMessageOp = createI18nMessage(job, op);
|
|
9856
|
-
unit.create.push(i18nMessageOp);
|
|
9857
|
-
}
|
|
9858
|
-
}
|
|
9859
|
-
const i18nBlockMessages = /* @__PURE__ */ new Map();
|
|
9860
|
-
for (const unit of job.units) {
|
|
9861
|
-
for (const op of unit.create) {
|
|
9862
|
-
if (op.kind === OpKind.I18nStart && op.xref === op.root) {
|
|
9863
|
-
if (!op.context) {
|
|
9864
|
-
throw Error("I18n start op should have its context set.");
|
|
9865
|
-
}
|
|
9866
|
-
const i18nMessageOp = createI18nMessage(job, i18nContexts.get(op.context));
|
|
9867
|
-
i18nBlockMessages.set(op.xref, i18nMessageOp);
|
|
9868
|
-
unit.create.push(i18nMessageOp);
|
|
9869
|
-
}
|
|
9870
|
-
}
|
|
9871
|
-
}
|
|
9937
|
+
let currentIcu = null;
|
|
9872
9938
|
for (const unit of job.units) {
|
|
9873
9939
|
for (const op of unit.create) {
|
|
9874
9940
|
switch (op.kind) {
|
|
9875
9941
|
case OpKind.IcuStart:
|
|
9876
|
-
|
|
9877
|
-
|
|
9942
|
+
currentIcu = op;
|
|
9943
|
+
OpList.remove(op);
|
|
9944
|
+
const icuContext = i18nContexts.get(op.context);
|
|
9945
|
+
if (icuContext.contextKind !== I18nContextKind.Icu) {
|
|
9946
|
+
continue;
|
|
9878
9947
|
}
|
|
9879
|
-
const
|
|
9880
|
-
if (
|
|
9881
|
-
|
|
9882
|
-
throw Error("ICU context should have its i18n block set.");
|
|
9883
|
-
}
|
|
9884
|
-
const subMessage = createI18nMessage(job, i18nContext, op.messagePlaceholder);
|
|
9885
|
-
unit.create.push(subMessage);
|
|
9886
|
-
const rootI18nId = i18nBlocks.get(i18nContext.i18nBlock).root;
|
|
9887
|
-
const parentMessage = i18nBlockMessages.get(rootI18nId);
|
|
9888
|
-
parentMessage == null ? void 0 : parentMessage.subMessages.push(subMessage.xref);
|
|
9948
|
+
const i18nBlock = i18nBlocks.get(icuContext.i18nBlock);
|
|
9949
|
+
if (i18nBlock.context === icuContext.xref) {
|
|
9950
|
+
continue;
|
|
9889
9951
|
}
|
|
9890
|
-
|
|
9952
|
+
const rootI18nBlock = i18nBlocks.get(i18nBlock.root);
|
|
9953
|
+
const rootMessage = i18nMessagesByContext.get(rootI18nBlock.context);
|
|
9954
|
+
if (rootMessage === void 0) {
|
|
9955
|
+
throw Error("AssertionError: ICU sub-message should belong to a root message.");
|
|
9956
|
+
}
|
|
9957
|
+
const subMessage = i18nMessagesByContext.get(icuContext.xref);
|
|
9958
|
+
subMessage.messagePlaceholder = op.messagePlaceholder;
|
|
9959
|
+
rootMessage.subMessages.push(subMessage.xref);
|
|
9891
9960
|
break;
|
|
9892
9961
|
case OpKind.IcuEnd:
|
|
9962
|
+
currentIcu = null;
|
|
9963
|
+
OpList.remove(op);
|
|
9964
|
+
break;
|
|
9965
|
+
case OpKind.IcuPlaceholder:
|
|
9966
|
+
if (currentIcu === null || currentIcu.context == null) {
|
|
9967
|
+
throw Error("AssertionError: Unexpected ICU placeholder outside of i18n context");
|
|
9968
|
+
}
|
|
9969
|
+
const msg = i18nMessagesByContext.get(currentIcu.context);
|
|
9970
|
+
msg.postprocessingParams.set(op.name, literal(formatIcuPlaceholder(op)));
|
|
9893
9971
|
OpList.remove(op);
|
|
9894
9972
|
break;
|
|
9895
9973
|
}
|
|
@@ -9899,14 +9977,16 @@ function extractI18nMessages(job) {
|
|
|
9899
9977
|
function createI18nMessage(job, context, messagePlaceholder) {
|
|
9900
9978
|
let formattedParams = formatParams(context.params);
|
|
9901
9979
|
const formattedPostprocessingParams = formatParams(context.postprocessingParams);
|
|
9902
|
-
let needsPostprocessing =
|
|
9903
|
-
for (const values of context.params.values()) {
|
|
9904
|
-
if (values.length > 1) {
|
|
9905
|
-
needsPostprocessing = true;
|
|
9906
|
-
}
|
|
9907
|
-
}
|
|
9980
|
+
let needsPostprocessing = [...context.params.values()].some((v) => v.length > 1);
|
|
9908
9981
|
return createI18nMessageOp(job.allocateXrefId(), context.xref, context.i18nBlock, context.message, messagePlaceholder != null ? messagePlaceholder : null, formattedParams, formattedPostprocessingParams, needsPostprocessing);
|
|
9909
9982
|
}
|
|
9983
|
+
function formatIcuPlaceholder(op) {
|
|
9984
|
+
if (op.strings.length !== op.expressionPlaceholders.length + 1) {
|
|
9985
|
+
throw Error(`AsserionError: Invalid ICU placeholder with ${op.strings.length} strings and ${op.expressionPlaceholders.length} expressions`);
|
|
9986
|
+
}
|
|
9987
|
+
const values = op.expressionPlaceholders.map(formatValue);
|
|
9988
|
+
return op.strings.flatMap((str, i) => [str, values[i] || ""]).join("");
|
|
9989
|
+
}
|
|
9910
9990
|
function formatParams(params) {
|
|
9911
9991
|
const formattedParams = /* @__PURE__ */ new Map();
|
|
9912
9992
|
for (const [placeholder, placeholderValues] of params) {
|
|
@@ -9962,7 +10042,7 @@ function formatValue(value) {
|
|
|
9962
10042
|
return `${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
9963
10043
|
}
|
|
9964
10044
|
|
|
9965
|
-
// bazel-out/
|
|
10045
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
|
|
9966
10046
|
function generateAdvance(job) {
|
|
9967
10047
|
for (const unit of job.units) {
|
|
9968
10048
|
const slotMap = /* @__PURE__ */ new Map();
|
|
@@ -9994,7 +10074,7 @@ function generateAdvance(job) {
|
|
|
9994
10074
|
}
|
|
9995
10075
|
}
|
|
9996
10076
|
|
|
9997
|
-
// bazel-out/
|
|
10077
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
|
|
9998
10078
|
function generateProjectionDefs(job) {
|
|
9999
10079
|
const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;
|
|
10000
10080
|
const selectors = [];
|
|
@@ -10018,7 +10098,7 @@ function generateProjectionDefs(job) {
|
|
|
10018
10098
|
}
|
|
10019
10099
|
}
|
|
10020
10100
|
|
|
10021
|
-
// bazel-out/
|
|
10101
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
|
|
10022
10102
|
function generateVariables(job) {
|
|
10023
10103
|
recursivelyProcessView(job.root, null);
|
|
10024
10104
|
}
|
|
@@ -10027,8 +10107,13 @@ function recursivelyProcessView(view, parentScope) {
|
|
|
10027
10107
|
for (const op of view.create) {
|
|
10028
10108
|
switch (op.kind) {
|
|
10029
10109
|
case OpKind.Template:
|
|
10110
|
+
recursivelyProcessView(view.job.views.get(op.xref), scope);
|
|
10111
|
+
break;
|
|
10030
10112
|
case OpKind.RepeaterCreate:
|
|
10031
10113
|
recursivelyProcessView(view.job.views.get(op.xref), scope);
|
|
10114
|
+
if (op.emptyView) {
|
|
10115
|
+
recursivelyProcessView(view.job.views.get(op.emptyView), scope);
|
|
10116
|
+
}
|
|
10032
10117
|
break;
|
|
10033
10118
|
case OpKind.Listener:
|
|
10034
10119
|
op.handlerOps.prepend(generateVariablesInScopeForView(view, scope));
|
|
@@ -10106,7 +10191,7 @@ function generateVariablesInScopeForView(view, scope) {
|
|
|
10106
10191
|
return newOps;
|
|
10107
10192
|
}
|
|
10108
10193
|
|
|
10109
|
-
// bazel-out/
|
|
10194
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_expression_collection.mjs
|
|
10110
10195
|
function collectConstExpressions(job) {
|
|
10111
10196
|
for (const unit of job.units) {
|
|
10112
10197
|
for (const op of unit.ops()) {
|
|
@@ -10120,7 +10205,7 @@ function collectConstExpressions(job) {
|
|
|
10120
10205
|
}
|
|
10121
10206
|
}
|
|
10122
10207
|
|
|
10123
|
-
// bazel-out/
|
|
10208
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
|
|
10124
10209
|
var STYLE_DOT = "style.";
|
|
10125
10210
|
var CLASS_DOT = "class.";
|
|
10126
10211
|
var STYLE_BANG = "style!";
|
|
@@ -10128,7 +10213,7 @@ var CLASS_BANG = "class!";
|
|
|
10128
10213
|
var BANG_IMPORTANT = "!important";
|
|
10129
10214
|
function parseHostStyleProperties(job) {
|
|
10130
10215
|
for (const op of job.root.update) {
|
|
10131
|
-
if (op.kind
|
|
10216
|
+
if (!(op.kind === OpKind.Binding && op.bindingKind === BindingKind.Property)) {
|
|
10132
10217
|
continue;
|
|
10133
10218
|
}
|
|
10134
10219
|
if (op.name.endsWith(BANG_IMPORTANT)) {
|
|
@@ -10178,7 +10263,7 @@ function parseProperty(name) {
|
|
|
10178
10263
|
return { property: property2, suffix };
|
|
10179
10264
|
}
|
|
10180
10265
|
|
|
10181
|
-
// bazel-out/
|
|
10266
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/map_util.mjs
|
|
10182
10267
|
function mapLiteral(obj, quoted = false) {
|
|
10183
10268
|
return literalMap(Object.keys(obj).map((key) => ({
|
|
10184
10269
|
key,
|
|
@@ -10187,7 +10272,7 @@ function mapLiteral(obj, quoted = false) {
|
|
|
10187
10272
|
})));
|
|
10188
10273
|
}
|
|
10189
10274
|
|
|
10190
|
-
// bazel-out/
|
|
10275
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
|
|
10191
10276
|
var IcuSerializerVisitor = class {
|
|
10192
10277
|
visitText(text2) {
|
|
10193
10278
|
return text2.value;
|
|
@@ -10221,7 +10306,7 @@ function serializeIcuNode(icu) {
|
|
|
10221
10306
|
return icu.visit(serializer);
|
|
10222
10307
|
}
|
|
10223
10308
|
|
|
10224
|
-
// bazel-out/
|
|
10309
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
|
|
10225
10310
|
var TokenType;
|
|
10226
10311
|
(function(TokenType2) {
|
|
10227
10312
|
TokenType2[TokenType2["Character"] = 0] = "Character";
|
|
@@ -10582,7 +10667,7 @@ function parseIntAutoRadix(text2) {
|
|
|
10582
10667
|
return result;
|
|
10583
10668
|
}
|
|
10584
10669
|
|
|
10585
|
-
// bazel-out/
|
|
10670
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
|
|
10586
10671
|
var SplitInterpolation = class {
|
|
10587
10672
|
constructor(strings, expressions, offsets) {
|
|
10588
10673
|
this.strings = strings;
|
|
@@ -11476,7 +11561,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
|
|
|
11476
11561
|
return offsetMap;
|
|
11477
11562
|
}
|
|
11478
11563
|
|
|
11479
|
-
// bazel-out/
|
|
11564
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
|
|
11480
11565
|
var NodeWithI18n = class {
|
|
11481
11566
|
constructor(sourceSpan, i18n2) {
|
|
11482
11567
|
this.sourceSpan = sourceSpan;
|
|
@@ -11628,11 +11713,11 @@ var RecursiveVisitor = class {
|
|
|
11628
11713
|
}
|
|
11629
11714
|
};
|
|
11630
11715
|
|
|
11631
|
-
// bazel-out/
|
|
11716
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
|
|
11632
11717
|
var ElementSchemaRegistry = class {
|
|
11633
11718
|
};
|
|
11634
11719
|
|
|
11635
|
-
// bazel-out/
|
|
11720
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
|
|
11636
11721
|
var BOOLEAN = "boolean";
|
|
11637
11722
|
var NUMBER = "number";
|
|
11638
11723
|
var STRING = "string";
|
|
@@ -11985,7 +12070,7 @@ function _isPixelDimensionStyle(prop) {
|
|
|
11985
12070
|
}
|
|
11986
12071
|
}
|
|
11987
12072
|
|
|
11988
|
-
// bazel-out/
|
|
12073
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
|
|
11989
12074
|
var HtmlTagDefinition = class {
|
|
11990
12075
|
constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false } = {}) {
|
|
11991
12076
|
this.closedByChildren = {};
|
|
@@ -12103,7 +12188,7 @@ function getHtmlTagDefinition(tagName) {
|
|
|
12103
12188
|
return (_b2 = (_a2 = TAG_DEFINITIONS[tagName]) != null ? _a2 : TAG_DEFINITIONS[tagName.toLowerCase()]) != null ? _b2 : DEFAULT_TAG_DEFINITION;
|
|
12104
12189
|
}
|
|
12105
12190
|
|
|
12106
|
-
// bazel-out/
|
|
12191
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
|
|
12107
12192
|
var TAG_TO_PLACEHOLDER_NAMES = {
|
|
12108
12193
|
"A": "LINK",
|
|
12109
12194
|
"B": "BOLD_TEXT",
|
|
@@ -12225,7 +12310,7 @@ var PlaceholderRegistry = class {
|
|
|
12225
12310
|
}
|
|
12226
12311
|
};
|
|
12227
12312
|
|
|
12228
|
-
// bazel-out/
|
|
12313
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
|
|
12229
12314
|
var _expParser = new Parser(new Lexer());
|
|
12230
12315
|
function createI18nMessageFactory(interpolationConfig, containerBlocks) {
|
|
12231
12316
|
const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks);
|
|
@@ -12404,14 +12489,14 @@ function extractPlaceholderName(input) {
|
|
|
12404
12489
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
12405
12490
|
}
|
|
12406
12491
|
|
|
12407
|
-
// bazel-out/
|
|
12492
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
|
|
12408
12493
|
var I18nError = class extends ParseError {
|
|
12409
12494
|
constructor(span, msg) {
|
|
12410
12495
|
super(span, msg);
|
|
12411
12496
|
}
|
|
12412
12497
|
};
|
|
12413
12498
|
|
|
12414
|
-
// bazel-out/
|
|
12499
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
|
|
12415
12500
|
var NAMED_ENTITIES = {
|
|
12416
12501
|
"AElig": "\xC6",
|
|
12417
12502
|
"AMP": "&",
|
|
@@ -14542,7 +14627,7 @@ var NAMED_ENTITIES = {
|
|
|
14542
14627
|
var NGSP_UNICODE = "\uE500";
|
|
14543
14628
|
NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
|
|
14544
14629
|
|
|
14545
|
-
// bazel-out/
|
|
14630
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
|
|
14546
14631
|
var TokenError = class extends ParseError {
|
|
14547
14632
|
constructor(errorMsg, tokenType, span) {
|
|
14548
14633
|
super(span, errorMsg);
|
|
@@ -15463,7 +15548,7 @@ var CursorError = class {
|
|
|
15463
15548
|
}
|
|
15464
15549
|
};
|
|
15465
15550
|
|
|
15466
|
-
// bazel-out/
|
|
15551
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
|
|
15467
15552
|
var TreeError = class extends ParseError {
|
|
15468
15553
|
static create(elementName, span, msg) {
|
|
15469
15554
|
return new TreeError(elementName, span, msg);
|
|
@@ -15847,7 +15932,7 @@ function decodeEntity(match, entity) {
|
|
|
15847
15932
|
return match;
|
|
15848
15933
|
}
|
|
15849
15934
|
|
|
15850
|
-
// bazel-out/
|
|
15935
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
|
|
15851
15936
|
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
|
|
15852
15937
|
"iframe|srcdoc",
|
|
15853
15938
|
"*|innerhtml",
|
|
@@ -15862,7 +15947,7 @@ function isTrustedTypesSink(tagName, propName) {
|
|
|
15862
15947
|
return TRUSTED_TYPES_SINKS.has(tagName + "|" + propName) || TRUSTED_TYPES_SINKS.has("*|" + propName);
|
|
15863
15948
|
}
|
|
15864
15949
|
|
|
15865
|
-
// bazel-out/
|
|
15950
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
|
|
15866
15951
|
var setI18nRefs = (htmlNode, i18nNode) => {
|
|
15867
15952
|
if (htmlNode instanceof NodeWithI18n) {
|
|
15868
15953
|
if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {
|
|
@@ -16019,7 +16104,7 @@ function i18nMetaToJSDoc(meta) {
|
|
|
16019
16104
|
return jsDocComment(tags);
|
|
16020
16105
|
}
|
|
16021
16106
|
|
|
16022
|
-
// bazel-out/
|
|
16107
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
|
|
16023
16108
|
var GOOG_GET_MSG = "goog.getMsg";
|
|
16024
16109
|
function createGoogleGetMsgStatements(variable2, message, closureVar, placeholderValues) {
|
|
16025
16110
|
const messageString = serializeI18nMessageForGetMsg(message);
|
|
@@ -16070,7 +16155,7 @@ function serializeI18nMessageForGetMsg(message) {
|
|
|
16070
16155
|
return message.nodes.map((node) => node.visit(serializerVisitor2, null)).join("");
|
|
16071
16156
|
}
|
|
16072
16157
|
|
|
16073
|
-
// bazel-out/
|
|
16158
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
|
|
16074
16159
|
function createLocalizeStatements(variable2, message, params) {
|
|
16075
16160
|
const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);
|
|
16076
16161
|
const sourceSpan = getSourceSpan(message);
|
|
@@ -16159,13 +16244,13 @@ function createEmptyMessagePart(location) {
|
|
|
16159
16244
|
return new LiteralPiece("", new ParseSourceSpan(location, location));
|
|
16160
16245
|
}
|
|
16161
16246
|
|
|
16162
|
-
// bazel-out/
|
|
16247
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
|
|
16163
16248
|
var NG_I18N_CLOSURE_MODE = "ngI18nClosureMode";
|
|
16164
16249
|
var TRANSLATION_VAR_PREFIX2 = "i18n_";
|
|
16165
16250
|
var I18N_ICU_MAPPING_PREFIX2 = "I18N_EXP_";
|
|
16166
16251
|
var ESCAPE2 = "\uFFFD";
|
|
16167
16252
|
function collectI18nConsts(job) {
|
|
16168
|
-
var _a2;
|
|
16253
|
+
var _a2, _b2;
|
|
16169
16254
|
const fileBasedI18nSuffix = job.relativeContextFilePath.replace(/[^A-Za-z0-9]/g, "_").toUpperCase() + "_";
|
|
16170
16255
|
const extractedAttributesByI18nContext = /* @__PURE__ */ new Map();
|
|
16171
16256
|
const i18nAttributesByElement = /* @__PURE__ */ new Map();
|
|
@@ -16174,11 +16259,13 @@ function collectI18nConsts(job) {
|
|
|
16174
16259
|
for (const unit of job.units) {
|
|
16175
16260
|
for (const op of unit.ops()) {
|
|
16176
16261
|
if (op.kind === OpKind.ExtractedAttribute && op.i18nContext !== null) {
|
|
16177
|
-
extractedAttributesByI18nContext.
|
|
16262
|
+
const attributes = (_a2 = extractedAttributesByI18nContext.get(op.i18nContext)) != null ? _a2 : [];
|
|
16263
|
+
attributes.push(op);
|
|
16264
|
+
extractedAttributesByI18nContext.set(op.i18nContext, attributes);
|
|
16178
16265
|
} else if (op.kind === OpKind.I18nAttributes) {
|
|
16179
16266
|
i18nAttributesByElement.set(op.target, op);
|
|
16180
16267
|
} else if (op.kind === OpKind.I18nExpression && op.usage === I18nExpressionFor.I18nAttribute) {
|
|
16181
|
-
const expressions = (
|
|
16268
|
+
const expressions = (_b2 = i18nExpressionsByElement.get(op.target)) != null ? _b2 : [];
|
|
16182
16269
|
expressions.push(op);
|
|
16183
16270
|
i18nExpressionsByElement.set(op.target, expressions);
|
|
16184
16271
|
} else if (op.kind === OpKind.I18nMessage) {
|
|
@@ -16199,9 +16286,11 @@ function collectI18nConsts(job) {
|
|
|
16199
16286
|
} else {
|
|
16200
16287
|
job.constsInitializers.push(...statements);
|
|
16201
16288
|
i18nValuesByContext.set(op.i18nContext, mainVar);
|
|
16202
|
-
const
|
|
16203
|
-
if (
|
|
16204
|
-
|
|
16289
|
+
const attributesForMessage = extractedAttributesByI18nContext.get(op.i18nContext);
|
|
16290
|
+
if (attributesForMessage !== void 0) {
|
|
16291
|
+
for (const attr of attributesForMessage) {
|
|
16292
|
+
attr.expression = mainVar.clone();
|
|
16293
|
+
}
|
|
16205
16294
|
}
|
|
16206
16295
|
}
|
|
16207
16296
|
}
|
|
@@ -16266,7 +16355,7 @@ function collectMessage(job, fileBasedI18nSuffix, messages, messageOp) {
|
|
|
16266
16355
|
const mainVar = variable(job.pool.uniqueName(TRANSLATION_VAR_PREFIX2));
|
|
16267
16356
|
const closureVar = i18nGenerateClosureVar(job.pool, messageOp.message.id, fileBasedI18nSuffix, job.i18nUseExternalIds);
|
|
16268
16357
|
let transformFn = void 0;
|
|
16269
|
-
if (messageOp.needsPostprocessing) {
|
|
16358
|
+
if (messageOp.needsPostprocessing || messageOp.postprocessingParams.size > 0) {
|
|
16270
16359
|
const postprocessingParams = Object.fromEntries([...messageOp.postprocessingParams.entries()].sort());
|
|
16271
16360
|
const formattedPostprocessingParams = formatI18nPlaceholderNamesInMap(postprocessingParams, false);
|
|
16272
16361
|
const extraTransformFnParams = [];
|
|
@@ -16285,7 +16374,6 @@ function addSubMessageParams(messageOp, subMessagePlaceholders) {
|
|
|
16285
16374
|
} else {
|
|
16286
16375
|
messageOp.params.set(placeholder, literal(`${ESCAPE2}${I18N_ICU_MAPPING_PREFIX2}${placeholder}${ESCAPE2}`));
|
|
16287
16376
|
messageOp.postprocessingParams.set(placeholder, literalArr(subMessages));
|
|
16288
|
-
messageOp.needsPostprocessing = true;
|
|
16289
16377
|
}
|
|
16290
16378
|
}
|
|
16291
16379
|
}
|
|
@@ -16317,14 +16405,15 @@ function i18nGenerateClosureVar(pool, messageId, fileBasedI18nSuffix, useExterna
|
|
|
16317
16405
|
return variable(name);
|
|
16318
16406
|
}
|
|
16319
16407
|
|
|
16320
|
-
// bazel-out/
|
|
16408
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
|
|
16321
16409
|
function convertI18nText(job) {
|
|
16322
|
-
var _a2;
|
|
16410
|
+
var _a2, _b2, _c2;
|
|
16323
16411
|
for (const unit of job.units) {
|
|
16324
16412
|
let currentI18n = null;
|
|
16325
16413
|
let currentIcu = null;
|
|
16326
16414
|
const textNodeI18nBlocks = /* @__PURE__ */ new Map();
|
|
16327
16415
|
const textNodeIcus = /* @__PURE__ */ new Map();
|
|
16416
|
+
const icuPlaceholderByText = /* @__PURE__ */ new Map();
|
|
16328
16417
|
for (const op of unit.create) {
|
|
16329
16418
|
switch (op.kind) {
|
|
16330
16419
|
case OpKind.I18nStart:
|
|
@@ -16349,7 +16438,13 @@ function convertI18nText(job) {
|
|
|
16349
16438
|
if (currentI18n !== null) {
|
|
16350
16439
|
textNodeI18nBlocks.set(op.xref, currentI18n);
|
|
16351
16440
|
textNodeIcus.set(op.xref, currentIcu);
|
|
16352
|
-
|
|
16441
|
+
if (op.icuPlaceholder !== null) {
|
|
16442
|
+
const icuPlaceholderOp = createIcuPlaceholderOp(job.allocateXrefId(), op.icuPlaceholder, [op.initialValue]);
|
|
16443
|
+
OpList.replace(op, icuPlaceholderOp);
|
|
16444
|
+
icuPlaceholderByText.set(op.xref, icuPlaceholderOp);
|
|
16445
|
+
} else {
|
|
16446
|
+
OpList.remove(op);
|
|
16447
|
+
}
|
|
16353
16448
|
}
|
|
16354
16449
|
break;
|
|
16355
16450
|
}
|
|
@@ -16362,21 +16457,25 @@ function convertI18nText(job) {
|
|
|
16362
16457
|
}
|
|
16363
16458
|
const i18nOp = textNodeI18nBlocks.get(op.target);
|
|
16364
16459
|
const icuOp = textNodeIcus.get(op.target);
|
|
16460
|
+
const icuPlaceholder = icuPlaceholderByText.get(op.target);
|
|
16365
16461
|
const contextId = icuOp ? icuOp.context : i18nOp.context;
|
|
16366
16462
|
const resolutionTime = icuOp ? I18nParamResolutionTime.Postproccessing : I18nParamResolutionTime.Creation;
|
|
16367
16463
|
const ops = [];
|
|
16368
16464
|
for (let i = 0; i < op.interpolation.expressions.length; i++) {
|
|
16369
16465
|
const expr = op.interpolation.expressions[i];
|
|
16370
|
-
ops.push(createI18nExpressionOp(contextId, i18nOp.xref, i18nOp.xref, i18nOp.handle, expr, op.interpolation.i18nPlaceholders[i], resolutionTime, I18nExpressionFor.I18nText, "", (
|
|
16466
|
+
ops.push(createI18nExpressionOp(contextId, i18nOp.xref, i18nOp.xref, i18nOp.handle, expr, (_a2 = icuPlaceholder == null ? void 0 : icuPlaceholder.xref) != null ? _a2 : null, (_b2 = op.interpolation.i18nPlaceholders[i]) != null ? _b2 : null, resolutionTime, I18nExpressionFor.I18nText, "", (_c2 = expr.sourceSpan) != null ? _c2 : op.sourceSpan));
|
|
16371
16467
|
}
|
|
16372
16468
|
OpList.replaceWithMany(op, ops);
|
|
16469
|
+
if (icuPlaceholder !== void 0) {
|
|
16470
|
+
icuPlaceholder.strings = op.interpolation.strings;
|
|
16471
|
+
}
|
|
16373
16472
|
break;
|
|
16374
16473
|
}
|
|
16375
16474
|
}
|
|
16376
16475
|
}
|
|
16377
16476
|
}
|
|
16378
16477
|
|
|
16379
|
-
// bazel-out/
|
|
16478
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
|
|
16380
16479
|
function liftLocalRefs(job) {
|
|
16381
16480
|
for (const unit of job.units) {
|
|
16382
16481
|
for (const op of unit.create) {
|
|
@@ -16406,7 +16505,7 @@ function serializeLocalRefs(refs) {
|
|
|
16406
16505
|
return literalArr(constRefs);
|
|
16407
16506
|
}
|
|
16408
16507
|
|
|
16409
|
-
// bazel-out/
|
|
16508
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
16410
16509
|
function emitNamespaceChanges(job) {
|
|
16411
16510
|
for (const unit of job.units) {
|
|
16412
16511
|
let activeNamespace = Namespace.HTML;
|
|
@@ -16422,7 +16521,7 @@ function emitNamespaceChanges(job) {
|
|
|
16422
16521
|
}
|
|
16423
16522
|
}
|
|
16424
16523
|
|
|
16425
|
-
// bazel-out/
|
|
16524
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/style_parser.mjs
|
|
16426
16525
|
function parse(value) {
|
|
16427
16526
|
const styles = [];
|
|
16428
16527
|
let i = 0;
|
|
@@ -16483,7 +16582,7 @@ function hyphenate2(value) {
|
|
|
16483
16582
|
}).toLowerCase();
|
|
16484
16583
|
}
|
|
16485
16584
|
|
|
16486
|
-
// bazel-out/
|
|
16585
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
|
|
16487
16586
|
function nameFunctionsAndVariables(job) {
|
|
16488
16587
|
addNamesToView(job.root, job.componentName, { index: 0 }, job.compatibility === CompatibilityMode.TemplateDefinitionBuilder);
|
|
16489
16588
|
}
|
|
@@ -16598,7 +16697,7 @@ function stripImportant(name) {
|
|
|
16598
16697
|
return name;
|
|
16599
16698
|
}
|
|
16600
16699
|
|
|
16601
|
-
// bazel-out/
|
|
16700
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
|
|
16602
16701
|
function mergeNextContextExpressions(job) {
|
|
16603
16702
|
for (const unit of job.units) {
|
|
16604
16703
|
for (const op of unit.create) {
|
|
@@ -16644,7 +16743,7 @@ function mergeNextContextsInOps(ops) {
|
|
|
16644
16743
|
}
|
|
16645
16744
|
}
|
|
16646
16745
|
|
|
16647
|
-
// bazel-out/
|
|
16746
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
|
|
16648
16747
|
var CONTAINER_TAG = "ng-container";
|
|
16649
16748
|
function generateNgContainerOps(job) {
|
|
16650
16749
|
for (const unit of job.units) {
|
|
@@ -16661,7 +16760,7 @@ function generateNgContainerOps(job) {
|
|
|
16661
16760
|
}
|
|
16662
16761
|
}
|
|
16663
16762
|
|
|
16664
|
-
// bazel-out/
|
|
16763
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
|
|
16665
16764
|
function lookupElement3(elements, xref) {
|
|
16666
16765
|
const el = elements.get(xref);
|
|
16667
16766
|
if (el === void 0) {
|
|
@@ -16691,7 +16790,7 @@ function disableBindings(job) {
|
|
|
16691
16790
|
}
|
|
16692
16791
|
}
|
|
16693
16792
|
|
|
16694
|
-
// bazel-out/
|
|
16793
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
|
|
16695
16794
|
function generateNullishCoalesceExpressions(job) {
|
|
16696
16795
|
for (const unit of job.units) {
|
|
16697
16796
|
for (const op of unit.ops()) {
|
|
@@ -16707,7 +16806,7 @@ function generateNullishCoalesceExpressions(job) {
|
|
|
16707
16806
|
}
|
|
16708
16807
|
}
|
|
16709
16808
|
|
|
16710
|
-
// bazel-out/
|
|
16809
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
|
|
16711
16810
|
function kindTest(kind) {
|
|
16712
16811
|
return (op) => op.kind === kind;
|
|
16713
16812
|
}
|
|
@@ -16781,21 +16880,33 @@ function keepLast(ops) {
|
|
|
16781
16880
|
return ops.slice(ops.length - 1);
|
|
16782
16881
|
}
|
|
16783
16882
|
|
|
16784
|
-
// bazel-out/
|
|
16883
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
|
|
16785
16884
|
function parseExtractedStyles(job) {
|
|
16885
|
+
const elements = /* @__PURE__ */ new Map();
|
|
16886
|
+
for (const unit of job.units) {
|
|
16887
|
+
for (const op of unit.create) {
|
|
16888
|
+
if (isElementOrContainerOp(op)) {
|
|
16889
|
+
elements.set(op.xref, op);
|
|
16890
|
+
}
|
|
16891
|
+
}
|
|
16892
|
+
}
|
|
16786
16893
|
for (const unit of job.units) {
|
|
16787
16894
|
for (const op of unit.create) {
|
|
16788
16895
|
if (op.kind === OpKind.ExtractedAttribute && op.bindingKind === BindingKind.Attribute && isStringLiteral(op.expression)) {
|
|
16896
|
+
const target = elements.get(op.target);
|
|
16897
|
+
if (target !== void 0 && target.kind === OpKind.Template && target.templateKind === TemplateKind.Structural) {
|
|
16898
|
+
continue;
|
|
16899
|
+
}
|
|
16789
16900
|
if (op.name === "style") {
|
|
16790
16901
|
const parsedStyles = parse(op.expression.value);
|
|
16791
16902
|
for (let i = 0; i < parsedStyles.length - 1; i += 2) {
|
|
16792
|
-
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1]), null), op);
|
|
16903
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1]), null, null, SecurityContext.STYLE), op);
|
|
16793
16904
|
}
|
|
16794
16905
|
OpList.remove(op);
|
|
16795
16906
|
} else if (op.name === "class") {
|
|
16796
16907
|
const parsedClasses = op.expression.value.trim().split(/\s+/g);
|
|
16797
16908
|
for (const parsedClass of parsedClasses) {
|
|
16798
|
-
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null, null), op);
|
|
16909
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null, null, null, SecurityContext.NONE), op);
|
|
16799
16910
|
}
|
|
16800
16911
|
OpList.remove(op);
|
|
16801
16912
|
}
|
|
@@ -16804,7 +16915,7 @@ function parseExtractedStyles(job) {
|
|
|
16804
16915
|
}
|
|
16805
16916
|
}
|
|
16806
16917
|
|
|
16807
|
-
// bazel-out/
|
|
16918
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
|
|
16808
16919
|
function removeContentSelectors(job) {
|
|
16809
16920
|
for (const unit of job.units) {
|
|
16810
16921
|
const elements = createOpXrefMap(unit);
|
|
@@ -16838,7 +16949,7 @@ function lookupInXrefMap(map, xref) {
|
|
|
16838
16949
|
return el;
|
|
16839
16950
|
}
|
|
16840
16951
|
|
|
16841
|
-
// bazel-out/
|
|
16952
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
|
|
16842
16953
|
function createPipes(job) {
|
|
16843
16954
|
for (const unit of job.units) {
|
|
16844
16955
|
processPipeBindingsInView(unit);
|
|
@@ -16886,7 +16997,7 @@ function addPipeToCreationBlock(unit, afterTargetXref, binding) {
|
|
|
16886
16997
|
throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);
|
|
16887
16998
|
}
|
|
16888
16999
|
|
|
16889
|
-
// bazel-out/
|
|
17000
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
|
|
16890
17001
|
function createVariadicPipes(job) {
|
|
16891
17002
|
for (const unit of job.units) {
|
|
16892
17003
|
for (const op of unit.update) {
|
|
@@ -16903,7 +17014,7 @@ function createVariadicPipes(job) {
|
|
|
16903
17014
|
}
|
|
16904
17015
|
}
|
|
16905
17016
|
|
|
16906
|
-
// bazel-out/
|
|
17017
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs
|
|
16907
17018
|
function propagateI18nBlocks(job) {
|
|
16908
17019
|
propagateI18nBlocksToTemplates(job.root, 0);
|
|
16909
17020
|
}
|
|
@@ -16922,19 +17033,29 @@ function propagateI18nBlocksToTemplates(unit, subTemplateIndex) {
|
|
|
16922
17033
|
i18nBlock = null;
|
|
16923
17034
|
break;
|
|
16924
17035
|
case OpKind.Template:
|
|
16925
|
-
|
|
16926
|
-
|
|
16927
|
-
|
|
16928
|
-
|
|
16929
|
-
|
|
16930
|
-
|
|
16931
|
-
|
|
17036
|
+
subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.xref), i18nBlock, op.i18nPlaceholder, subTemplateIndex);
|
|
17037
|
+
break;
|
|
17038
|
+
case OpKind.RepeaterCreate:
|
|
17039
|
+
const forView = unit.job.views.get(op.xref);
|
|
17040
|
+
subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.xref), i18nBlock, op.i18nPlaceholder, subTemplateIndex);
|
|
17041
|
+
if (op.emptyView !== null) {
|
|
17042
|
+
subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.emptyView), i18nBlock, op.emptyI18nPlaceholder, subTemplateIndex);
|
|
16932
17043
|
}
|
|
16933
|
-
|
|
17044
|
+
break;
|
|
16934
17045
|
}
|
|
16935
17046
|
}
|
|
16936
17047
|
return subTemplateIndex;
|
|
16937
17048
|
}
|
|
17049
|
+
function propagateI18nBlocksForView(view, i18nBlock, i18nPlaceholder, subTemplateIndex) {
|
|
17050
|
+
if (i18nPlaceholder !== void 0) {
|
|
17051
|
+
if (i18nBlock === null) {
|
|
17052
|
+
throw Error("Expected template with i18n placeholder to be in an i18n block.");
|
|
17053
|
+
}
|
|
17054
|
+
subTemplateIndex++;
|
|
17055
|
+
wrapTemplateWithI18n(view, i18nBlock);
|
|
17056
|
+
}
|
|
17057
|
+
return propagateI18nBlocksToTemplates(view, subTemplateIndex);
|
|
17058
|
+
}
|
|
16938
17059
|
function wrapTemplateWithI18n(unit, parentI18n) {
|
|
16939
17060
|
var _a2;
|
|
16940
17061
|
if (((_a2 = unit.create.head.next) == null ? void 0 : _a2.kind) !== OpKind.I18nStart) {
|
|
@@ -16944,7 +17065,7 @@ function wrapTemplateWithI18n(unit, parentI18n) {
|
|
|
16944
17065
|
}
|
|
16945
17066
|
}
|
|
16946
17067
|
|
|
16947
|
-
// bazel-out/
|
|
17068
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
|
|
16948
17069
|
function extractPureFunctions(job) {
|
|
16949
17070
|
for (const view of job.units) {
|
|
16950
17071
|
for (const op of view.ops()) {
|
|
@@ -16986,7 +17107,7 @@ var PureFunctionConstant = class extends GenericKeyFn {
|
|
|
16986
17107
|
}
|
|
16987
17108
|
};
|
|
16988
17109
|
|
|
16989
|
-
// bazel-out/
|
|
17110
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
|
|
16990
17111
|
function generatePureLiteralStructures(job) {
|
|
16991
17112
|
for (const unit of job.units) {
|
|
16992
17113
|
for (const op of unit.update) {
|
|
@@ -17033,7 +17154,7 @@ function transformLiteralMap(expr) {
|
|
|
17033
17154
|
return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
|
|
17034
17155
|
}
|
|
17035
17156
|
|
|
17036
|
-
// bazel-out/
|
|
17157
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
|
|
17037
17158
|
function element(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
17038
17159
|
return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
17039
17160
|
}
|
|
@@ -17091,17 +17212,13 @@ function disableBindings2() {
|
|
|
17091
17212
|
function enableBindings() {
|
|
17092
17213
|
return call(Identifiers.enableBindings, [], null);
|
|
17093
17214
|
}
|
|
17094
|
-
function listener(name, handlerFn, sourceSpan) {
|
|
17095
|
-
|
|
17096
|
-
|
|
17097
|
-
|
|
17098
|
-
|
|
17099
|
-
}
|
|
17100
|
-
|
|
17101
|
-
return call(Identifiers.syntheticHostListener, [
|
|
17102
|
-
literal(name),
|
|
17103
|
-
handlerFn
|
|
17104
|
-
], sourceSpan);
|
|
17215
|
+
function listener(name, handlerFn, eventTargetResolver, syntheticHost, sourceSpan) {
|
|
17216
|
+
const args = [literal(name), handlerFn];
|
|
17217
|
+
if (eventTargetResolver !== null) {
|
|
17218
|
+
args.push(literal(false));
|
|
17219
|
+
args.push(importExpr(eventTargetResolver));
|
|
17220
|
+
}
|
|
17221
|
+
return call(syntheticHost ? Identifiers.syntheticHostListener : Identifiers.listener, args, sourceSpan);
|
|
17105
17222
|
}
|
|
17106
17223
|
function pipe(slot, name) {
|
|
17107
17224
|
return call(Identifiers.pipe, [
|
|
@@ -17360,8 +17477,12 @@ function classMapInterpolate(strings, expressions, sourceSpan) {
|
|
|
17360
17477
|
const interpolationArgs = collateInterpolationArgs(strings, expressions);
|
|
17361
17478
|
return callVariadicInstruction(CLASS_MAP_INTERPOLATE_CONFIG, [], interpolationArgs, [], sourceSpan);
|
|
17362
17479
|
}
|
|
17363
|
-
function hostProperty(name, expression, sourceSpan) {
|
|
17364
|
-
|
|
17480
|
+
function hostProperty(name, expression, sanitizer, sourceSpan) {
|
|
17481
|
+
const args = [literal(name), expression];
|
|
17482
|
+
if (sanitizer !== null) {
|
|
17483
|
+
args.push(sanitizer);
|
|
17484
|
+
}
|
|
17485
|
+
return call(Identifiers.hostProperty, args, sourceSpan);
|
|
17365
17486
|
}
|
|
17366
17487
|
function syntheticHostProperty(name, expression, sourceSpan) {
|
|
17367
17488
|
return call(Identifiers.syntheticHostProperty, [literal(name), expression], sourceSpan);
|
|
@@ -17548,14 +17669,11 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
|
|
|
17548
17669
|
return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
|
|
17549
17670
|
}
|
|
17550
17671
|
|
|
17551
|
-
// bazel-out/
|
|
17552
|
-
var
|
|
17553
|
-
[
|
|
17554
|
-
[
|
|
17555
|
-
[
|
|
17556
|
-
[SanitizerFn.Script, Identifiers.sanitizeScript],
|
|
17557
|
-
[SanitizerFn.Style, Identifiers.sanitizeStyle],
|
|
17558
|
-
[SanitizerFn.Url, Identifiers.sanitizeUrl]
|
|
17672
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
|
|
17673
|
+
var GLOBAL_TARGET_RESOLVERS = /* @__PURE__ */ new Map([
|
|
17674
|
+
["window", Identifiers.resolveWindow],
|
|
17675
|
+
["document", Identifiers.resolveDocument],
|
|
17676
|
+
["body", Identifiers.resolveBody]
|
|
17559
17677
|
]);
|
|
17560
17678
|
function reify(job) {
|
|
17561
17679
|
for (const unit of job.units) {
|
|
@@ -17572,19 +17690,19 @@ function reifyCreateOperations(unit, ops) {
|
|
|
17572
17690
|
OpList.replace(op, text(op.handle.slot, op.initialValue, op.sourceSpan));
|
|
17573
17691
|
break;
|
|
17574
17692
|
case OpKind.ElementStart:
|
|
17575
|
-
OpList.replace(op, elementStart(op.handle.slot, op.tag, op.attributes, op.localRefs, op.
|
|
17693
|
+
OpList.replace(op, elementStart(op.handle.slot, op.tag, op.attributes, op.localRefs, op.startSourceSpan));
|
|
17576
17694
|
break;
|
|
17577
17695
|
case OpKind.Element:
|
|
17578
|
-
OpList.replace(op, element(op.handle.slot, op.tag, op.attributes, op.localRefs, op.
|
|
17696
|
+
OpList.replace(op, element(op.handle.slot, op.tag, op.attributes, op.localRefs, op.wholeSourceSpan));
|
|
17579
17697
|
break;
|
|
17580
17698
|
case OpKind.ElementEnd:
|
|
17581
17699
|
OpList.replace(op, elementEnd(op.sourceSpan));
|
|
17582
17700
|
break;
|
|
17583
17701
|
case OpKind.ContainerStart:
|
|
17584
|
-
OpList.replace(op, elementContainerStart(op.handle.slot, op.attributes, op.localRefs, op.
|
|
17702
|
+
OpList.replace(op, elementContainerStart(op.handle.slot, op.attributes, op.localRefs, op.startSourceSpan));
|
|
17585
17703
|
break;
|
|
17586
17704
|
case OpKind.Container:
|
|
17587
|
-
OpList.replace(op, elementContainer(op.handle.slot, op.attributes, op.localRefs, op.
|
|
17705
|
+
OpList.replace(op, elementContainer(op.handle.slot, op.attributes, op.localRefs, op.wholeSourceSpan));
|
|
17588
17706
|
break;
|
|
17589
17707
|
case OpKind.ContainerEnd:
|
|
17590
17708
|
OpList.replace(op, elementContainerEnd());
|
|
@@ -17612,7 +17730,7 @@ function reifyCreateOperations(unit, ops) {
|
|
|
17612
17730
|
throw new Error(`AssertionError: local refs array should have been extracted into a constant`);
|
|
17613
17731
|
}
|
|
17614
17732
|
const childView = unit.job.views.get(op.xref);
|
|
17615
|
-
OpList.replace(op, template(op.handle.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes, op.localRefs, op.
|
|
17733
|
+
OpList.replace(op, template(op.handle.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes, op.localRefs, op.startSourceSpan));
|
|
17616
17734
|
break;
|
|
17617
17735
|
case OpKind.DisableBindings:
|
|
17618
17736
|
OpList.replace(op, disableBindings2());
|
|
@@ -17625,8 +17743,11 @@ function reifyCreateOperations(unit, ops) {
|
|
|
17625
17743
|
break;
|
|
17626
17744
|
case OpKind.Listener:
|
|
17627
17745
|
const listenerFn = reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, op.consumesDollarEvent);
|
|
17628
|
-
const
|
|
17629
|
-
|
|
17746
|
+
const eventTargetResolver = op.eventTarget ? GLOBAL_TARGET_RESOLVERS.get(op.eventTarget) : null;
|
|
17747
|
+
if (eventTargetResolver === void 0) {
|
|
17748
|
+
throw new Error(`Unexpected global target '${op.eventTarget}' defined for '${op.name}' event. Supported list of global targets: window,document,body.`);
|
|
17749
|
+
}
|
|
17750
|
+
OpList.replace(op, listener(op.name, listenerFn, eventTargetResolver, op.hostListener && op.isAnimationListener, op.sourceSpan));
|
|
17630
17751
|
break;
|
|
17631
17752
|
case OpKind.Variable:
|
|
17632
17753
|
if (op.variable.name === null) {
|
|
@@ -17711,7 +17832,7 @@ function reifyCreateOperations(unit, ops) {
|
|
|
17711
17832
|
emptyDecls = emptyView.decls;
|
|
17712
17833
|
emptyVars = emptyView.vars;
|
|
17713
17834
|
}
|
|
17714
|
-
OpList.replace(op, repeaterCreate(op.handle.slot, repeaterView.fnName, op.decls, op.vars, op.tag, op.attributes, op.trackByFn, op.usesComponentInstance, emptyViewFnName, emptyDecls, emptyVars, op.
|
|
17835
|
+
OpList.replace(op, repeaterCreate(op.handle.slot, repeaterView.fnName, op.decls, op.vars, op.tag, op.attributes, op.trackByFn, op.usesComponentInstance, emptyViewFnName, emptyDecls, emptyVars, op.wholeSourceSpan));
|
|
17715
17836
|
break;
|
|
17716
17837
|
case OpKind.Statement:
|
|
17717
17838
|
break;
|
|
@@ -17781,7 +17902,7 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
17781
17902
|
if (op.isAnimationTrigger) {
|
|
17782
17903
|
OpList.replace(op, syntheticHostProperty(op.name, op.expression, op.sourceSpan));
|
|
17783
17904
|
} else {
|
|
17784
|
-
OpList.replace(op, hostProperty(op.name, op.expression, op.sourceSpan));
|
|
17905
|
+
OpList.replace(op, hostProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
17785
17906
|
}
|
|
17786
17907
|
}
|
|
17787
17908
|
break;
|
|
@@ -17859,8 +17980,6 @@ function reifyIrExpression(expr) {
|
|
|
17859
17980
|
return pipeBind(expr.targetSlot.slot, expr.varOffset, expr.args);
|
|
17860
17981
|
case ExpressionKind.PipeBindingVariadic:
|
|
17861
17982
|
return pipeBindV(expr.targetSlot.slot, expr.varOffset, expr.args);
|
|
17862
|
-
case ExpressionKind.SanitizerExpr:
|
|
17863
|
-
return importExpr(sanitizerIdentifierMap.get(expr.fn));
|
|
17864
17983
|
case ExpressionKind.SlotLiteralExpr:
|
|
17865
17984
|
return literal(expr.slot.slot);
|
|
17866
17985
|
default:
|
|
@@ -17883,7 +18002,7 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
|
|
|
17883
18002
|
return fn(params, handlerStmts, void 0, void 0, name);
|
|
17884
18003
|
}
|
|
17885
18004
|
|
|
17886
|
-
// bazel-out/
|
|
18005
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
|
|
17887
18006
|
function removeEmptyBindings(job) {
|
|
17888
18007
|
for (const unit of job.units) {
|
|
17889
18008
|
for (const op of unit.update) {
|
|
@@ -17904,7 +18023,7 @@ function removeEmptyBindings(job) {
|
|
|
17904
18023
|
}
|
|
17905
18024
|
}
|
|
17906
18025
|
|
|
17907
|
-
// bazel-out/
|
|
18026
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_i18n_contexts.mjs
|
|
17908
18027
|
function removeI18nContexts(job) {
|
|
17909
18028
|
for (const unit of job.units) {
|
|
17910
18029
|
for (const op of unit.create) {
|
|
@@ -17920,7 +18039,7 @@ function removeI18nContexts(job) {
|
|
|
17920
18039
|
}
|
|
17921
18040
|
}
|
|
17922
18041
|
|
|
17923
|
-
// bazel-out/
|
|
18042
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_unused_i18n_attrs.mjs
|
|
17924
18043
|
function removeUnusedI18nAttributesOps(job) {
|
|
17925
18044
|
for (const unit of job.units) {
|
|
17926
18045
|
const ownersWithI18nExpressions = /* @__PURE__ */ new Set();
|
|
@@ -17942,7 +18061,7 @@ function removeUnusedI18nAttributesOps(job) {
|
|
|
17942
18061
|
}
|
|
17943
18062
|
}
|
|
17944
18063
|
|
|
17945
|
-
// bazel-out/
|
|
18064
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/repeater_derived_vars.mjs
|
|
17946
18065
|
function generateRepeaterDerivedVars(job) {
|
|
17947
18066
|
const repeaters = /* @__PURE__ */ new Map();
|
|
17948
18067
|
for (const unit of job.units) {
|
|
@@ -17974,7 +18093,7 @@ function generateRepeaterDerivedVars(job) {
|
|
|
17974
18093
|
}
|
|
17975
18094
|
}
|
|
17976
18095
|
|
|
17977
|
-
// bazel-out/
|
|
18096
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
|
|
17978
18097
|
function resolveContexts(job) {
|
|
17979
18098
|
for (const unit of job.units) {
|
|
17980
18099
|
processLexicalScope(unit, unit.create);
|
|
@@ -18015,7 +18134,7 @@ function processLexicalScope(view, ops) {
|
|
|
18015
18134
|
}
|
|
18016
18135
|
}
|
|
18017
18136
|
|
|
18018
|
-
// bazel-out/
|
|
18137
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
|
|
18019
18138
|
function resolveDollarEvent(job) {
|
|
18020
18139
|
for (const unit of job.units) {
|
|
18021
18140
|
transformDollarEvent(unit, unit.create);
|
|
@@ -18036,7 +18155,7 @@ function transformDollarEvent(unit, ops) {
|
|
|
18036
18155
|
}
|
|
18037
18156
|
}
|
|
18038
18157
|
|
|
18039
|
-
// bazel-out/
|
|
18158
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_element_placeholders.mjs
|
|
18040
18159
|
function resolveI18nElementPlaceholders(job) {
|
|
18041
18160
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
18042
18161
|
const elements = /* @__PURE__ */ new Map();
|
|
@@ -18101,18 +18220,52 @@ function resolvePlaceholdersForView(job, unit, i18nContexts, elements, pendingSt
|
|
|
18101
18220
|
}
|
|
18102
18221
|
break;
|
|
18103
18222
|
case OpKind.Template:
|
|
18223
|
+
const view = job.views.get(op.xref);
|
|
18104
18224
|
if (op.i18nPlaceholder === void 0) {
|
|
18105
|
-
resolvePlaceholdersForView(job,
|
|
18225
|
+
resolvePlaceholdersForView(job, view, i18nContexts, elements);
|
|
18106
18226
|
} else {
|
|
18107
18227
|
if (currentOps === null) {
|
|
18108
18228
|
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
18109
18229
|
}
|
|
18110
18230
|
if (op.templateKind === TemplateKind.Structural) {
|
|
18111
|
-
resolvePlaceholdersForView(job,
|
|
18231
|
+
resolvePlaceholdersForView(job, view, i18nContexts, elements, op);
|
|
18112
18232
|
} else {
|
|
18113
|
-
recordTemplateStart(job, op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18114
|
-
resolvePlaceholdersForView(job,
|
|
18115
|
-
recordTemplateClose(job, op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18233
|
+
recordTemplateStart(job, view, op.handle.slot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18234
|
+
resolvePlaceholdersForView(job, view, i18nContexts, elements);
|
|
18235
|
+
recordTemplateClose(job, view, op.handle.slot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18236
|
+
pendingStructuralDirective = void 0;
|
|
18237
|
+
}
|
|
18238
|
+
}
|
|
18239
|
+
break;
|
|
18240
|
+
case OpKind.RepeaterCreate:
|
|
18241
|
+
if (pendingStructuralDirective !== void 0) {
|
|
18242
|
+
throw Error("AssertionError: Unexpected structural directive associated with @for block");
|
|
18243
|
+
}
|
|
18244
|
+
const forSlot = op.handle.slot + 1;
|
|
18245
|
+
const forView = job.views.get(op.xref);
|
|
18246
|
+
if (op.i18nPlaceholder === void 0) {
|
|
18247
|
+
resolvePlaceholdersForView(job, forView, i18nContexts, elements);
|
|
18248
|
+
} else {
|
|
18249
|
+
if (currentOps === null) {
|
|
18250
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
18251
|
+
}
|
|
18252
|
+
recordTemplateStart(job, forView, forSlot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18253
|
+
resolvePlaceholdersForView(job, forView, i18nContexts, elements);
|
|
18254
|
+
recordTemplateClose(job, forView, forSlot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18255
|
+
pendingStructuralDirective = void 0;
|
|
18256
|
+
}
|
|
18257
|
+
if (op.emptyView !== null) {
|
|
18258
|
+
const emptySlot = op.handle.slot + 2;
|
|
18259
|
+
const emptyView = job.views.get(op.emptyView);
|
|
18260
|
+
if (op.emptyI18nPlaceholder === void 0) {
|
|
18261
|
+
resolvePlaceholdersForView(job, emptyView, i18nContexts, elements);
|
|
18262
|
+
} else {
|
|
18263
|
+
if (currentOps === null) {
|
|
18264
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
18265
|
+
}
|
|
18266
|
+
recordTemplateStart(job, emptyView, emptySlot, op.emptyI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18267
|
+
resolvePlaceholdersForView(job, emptyView, i18nContexts, elements);
|
|
18268
|
+
recordTemplateClose(job, emptyView, emptySlot, op.emptyI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18116
18269
|
pendingStructuralDirective = void 0;
|
|
18117
18270
|
}
|
|
18118
18271
|
}
|
|
@@ -18145,8 +18298,8 @@ function recordElementClose(op, i18nContext, i18nBlock, structuralDirective) {
|
|
|
18145
18298
|
addParam(i18nContext.params, closeName, value, i18nBlock.subTemplateIndex, flags);
|
|
18146
18299
|
}
|
|
18147
18300
|
}
|
|
18148
|
-
function recordTemplateStart(job,
|
|
18149
|
-
let { startName, closeName } =
|
|
18301
|
+
function recordTemplateStart(job, view, slot, i18nPlaceholder, i18nContext, i18nBlock, structuralDirective) {
|
|
18302
|
+
let { startName, closeName } = i18nPlaceholder;
|
|
18150
18303
|
let flags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.OpenTag;
|
|
18151
18304
|
if (!closeName) {
|
|
18152
18305
|
flags |= I18nParamValueFlags.CloseTag;
|
|
@@ -18154,20 +18307,20 @@ function recordTemplateStart(job, op, i18nContext, i18nBlock, structuralDirectiv
|
|
|
18154
18307
|
if (structuralDirective !== void 0) {
|
|
18155
18308
|
addParam(i18nContext.params, startName, structuralDirective.handle.slot, i18nBlock.subTemplateIndex, flags);
|
|
18156
18309
|
}
|
|
18157
|
-
addParam(i18nContext.params, startName,
|
|
18310
|
+
addParam(i18nContext.params, startName, slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, view), flags);
|
|
18158
18311
|
}
|
|
18159
|
-
function recordTemplateClose(job,
|
|
18160
|
-
const { startName, closeName } =
|
|
18312
|
+
function recordTemplateClose(job, view, slot, i18nPlaceholder, i18nContext, i18nBlock, structuralDirective) {
|
|
18313
|
+
const { startName, closeName } = i18nPlaceholder;
|
|
18161
18314
|
const flags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag;
|
|
18162
18315
|
if (closeName) {
|
|
18163
|
-
addParam(i18nContext.params, closeName,
|
|
18316
|
+
addParam(i18nContext.params, closeName, slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, view), flags);
|
|
18164
18317
|
if (structuralDirective !== void 0) {
|
|
18165
18318
|
addParam(i18nContext.params, closeName, structuralDirective.handle.slot, i18nBlock.subTemplateIndex, flags);
|
|
18166
18319
|
}
|
|
18167
18320
|
}
|
|
18168
18321
|
}
|
|
18169
|
-
function getSubTemplateIndexForTemplateTag(job, i18nOp,
|
|
18170
|
-
for (const childOp of
|
|
18322
|
+
function getSubTemplateIndexForTemplateTag(job, i18nOp, view) {
|
|
18323
|
+
for (const childOp of view.create) {
|
|
18171
18324
|
if (childOp.kind === OpKind.I18nStart) {
|
|
18172
18325
|
return childOp.subTemplateIndex;
|
|
18173
18326
|
}
|
|
@@ -18181,11 +18334,12 @@ function addParam(params, placeholder, value, subTemplateIndex, flags) {
|
|
|
18181
18334
|
params.set(placeholder, values);
|
|
18182
18335
|
}
|
|
18183
18336
|
|
|
18184
|
-
// bazel-out/
|
|
18337
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
|
|
18185
18338
|
function resolveI18nExpressionPlaceholders(job) {
|
|
18186
18339
|
var _a2;
|
|
18187
18340
|
const subTemplateIndicies = /* @__PURE__ */ new Map();
|
|
18188
18341
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
18342
|
+
const icuPlaceholders = /* @__PURE__ */ new Map();
|
|
18189
18343
|
for (const unit of job.units) {
|
|
18190
18344
|
for (const op of unit.create) {
|
|
18191
18345
|
switch (op.kind) {
|
|
@@ -18195,6 +18349,9 @@ function resolveI18nExpressionPlaceholders(job) {
|
|
|
18195
18349
|
case OpKind.I18nContext:
|
|
18196
18350
|
i18nContexts.set(op.xref, op);
|
|
18197
18351
|
break;
|
|
18352
|
+
case OpKind.IcuPlaceholder:
|
|
18353
|
+
icuPlaceholders.set(op.xref, op);
|
|
18354
|
+
break;
|
|
18198
18355
|
}
|
|
18199
18356
|
}
|
|
18200
18357
|
}
|
|
@@ -18203,68 +18360,34 @@ function resolveI18nExpressionPlaceholders(job) {
|
|
|
18203
18360
|
for (const unit of job.units) {
|
|
18204
18361
|
for (const op of unit.update) {
|
|
18205
18362
|
if (op.kind === OpKind.I18nExpression) {
|
|
18206
|
-
const i18nContext = i18nContexts.get(op.context);
|
|
18207
18363
|
const index = expressionIndices.get(referenceIndex(op)) || 0;
|
|
18208
18364
|
const subTemplateIndex = (_a2 = subTemplateIndicies.get(op.i18nOwner)) != null ? _a2 : null;
|
|
18209
|
-
const
|
|
18210
|
-
const values = params.get(op.i18nPlaceholder) || [];
|
|
18211
|
-
values.push({
|
|
18365
|
+
const value = {
|
|
18212
18366
|
value: index,
|
|
18213
18367
|
subTemplateIndex,
|
|
18214
18368
|
flags: I18nParamValueFlags.ExpressionIndex
|
|
18215
|
-
}
|
|
18216
|
-
|
|
18369
|
+
};
|
|
18370
|
+
updatePlaceholder(op, value, i18nContexts, icuPlaceholders);
|
|
18217
18371
|
expressionIndices.set(referenceIndex(op), index + 1);
|
|
18218
18372
|
}
|
|
18219
18373
|
}
|
|
18220
18374
|
}
|
|
18221
18375
|
}
|
|
18222
|
-
|
|
18223
|
-
|
|
18224
|
-
|
|
18225
|
-
|
|
18226
|
-
|
|
18227
|
-
|
|
18228
|
-
|
|
18229
|
-
node.visit(new ResolveIcuPlaceholdersVisitor(op.postprocessingParams));
|
|
18230
|
-
}
|
|
18231
|
-
}
|
|
18232
|
-
}
|
|
18233
|
-
}
|
|
18234
|
-
}
|
|
18235
|
-
var ResolveIcuPlaceholdersVisitor = class extends RecurseVisitor {
|
|
18236
|
-
constructor(params) {
|
|
18237
|
-
super();
|
|
18238
|
-
this.params = params;
|
|
18376
|
+
function updatePlaceholder(op, value, i18nContexts, icuPlaceholders) {
|
|
18377
|
+
if (op.i18nPlaceholder !== null) {
|
|
18378
|
+
const i18nContext = i18nContexts.get(op.context);
|
|
18379
|
+
const params = op.resolutionTime === I18nParamResolutionTime.Creation ? i18nContext.params : i18nContext.postprocessingParams;
|
|
18380
|
+
const values = params.get(op.i18nPlaceholder) || [];
|
|
18381
|
+
values.push(value);
|
|
18382
|
+
params.set(op.i18nPlaceholder, values);
|
|
18239
18383
|
}
|
|
18240
|
-
|
|
18241
|
-
|
|
18242
|
-
|
|
18243
|
-
this.params.set(placeholder.startName, [{
|
|
18244
|
-
value: (_a2 = placeholder.startSourceSpan) == null ? void 0 : _a2.toString(),
|
|
18245
|
-
subTemplateIndex: null,
|
|
18246
|
-
flags: I18nParamValueFlags.None
|
|
18247
|
-
}]);
|
|
18248
|
-
}
|
|
18249
|
-
if (placeholder.closeName && placeholder.endSourceSpan && !this.params.has(placeholder.closeName)) {
|
|
18250
|
-
this.params.set(placeholder.closeName, [{
|
|
18251
|
-
value: (_b2 = placeholder.endSourceSpan) == null ? void 0 : _b2.toString(),
|
|
18252
|
-
subTemplateIndex: null,
|
|
18253
|
-
flags: I18nParamValueFlags.None
|
|
18254
|
-
}]);
|
|
18255
|
-
}
|
|
18256
|
-
}
|
|
18257
|
-
visitTagPlaceholder(placeholder) {
|
|
18258
|
-
super.visitTagPlaceholder(placeholder);
|
|
18259
|
-
this.visitContainerPlaceholder(placeholder);
|
|
18260
|
-
}
|
|
18261
|
-
visitBlockPlaceholder(placeholder) {
|
|
18262
|
-
super.visitBlockPlaceholder(placeholder);
|
|
18263
|
-
this.visitContainerPlaceholder(placeholder);
|
|
18384
|
+
if (op.icuPlaceholder !== null) {
|
|
18385
|
+
const icuPlaceholderOp = icuPlaceholders.get(op.icuPlaceholder);
|
|
18386
|
+
icuPlaceholderOp == null ? void 0 : icuPlaceholderOp.expressionPlaceholders.push(value);
|
|
18264
18387
|
}
|
|
18265
|
-
}
|
|
18388
|
+
}
|
|
18266
18389
|
|
|
18267
|
-
// bazel-out/
|
|
18390
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
|
|
18268
18391
|
function resolveNames(job) {
|
|
18269
18392
|
for (const unit of job.units) {
|
|
18270
18393
|
processLexicalScope2(unit, unit.create, null);
|
|
@@ -18328,31 +18451,55 @@ function processLexicalScope2(unit, ops, savedView) {
|
|
|
18328
18451
|
}
|
|
18329
18452
|
}
|
|
18330
18453
|
|
|
18331
|
-
// bazel-out/
|
|
18332
|
-
var
|
|
18333
|
-
[SecurityContext.HTML,
|
|
18334
|
-
[SecurityContext.
|
|
18335
|
-
[SecurityContext.
|
|
18336
|
-
[SecurityContext.
|
|
18337
|
-
[SecurityContext.
|
|
18454
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
|
|
18455
|
+
var sanitizerFns = /* @__PURE__ */ new Map([
|
|
18456
|
+
[SecurityContext.HTML, Identifiers.sanitizeHtml],
|
|
18457
|
+
[SecurityContext.RESOURCE_URL, Identifiers.sanitizeResourceUrl],
|
|
18458
|
+
[SecurityContext.SCRIPT, Identifiers.sanitizeScript],
|
|
18459
|
+
[SecurityContext.STYLE, Identifiers.sanitizeStyle],
|
|
18460
|
+
[SecurityContext.URL, Identifiers.sanitizeUrl]
|
|
18461
|
+
]);
|
|
18462
|
+
var trustedValueFns = /* @__PURE__ */ new Map([
|
|
18463
|
+
[SecurityContext.HTML, Identifiers.trustConstantHtml],
|
|
18464
|
+
[SecurityContext.RESOURCE_URL, Identifiers.trustConstantResourceUrl]
|
|
18338
18465
|
]);
|
|
18339
18466
|
function resolveSanitizers(job) {
|
|
18467
|
+
var _a2, _b2;
|
|
18340
18468
|
for (const unit of job.units) {
|
|
18341
18469
|
const elements = createOpXrefMap(unit);
|
|
18342
|
-
|
|
18470
|
+
if (job.kind !== CompilationJobKind.Host) {
|
|
18471
|
+
for (const op of unit.create) {
|
|
18472
|
+
if (op.kind === OpKind.ExtractedAttribute) {
|
|
18473
|
+
const trustedValueFn = (_a2 = trustedValueFns.get(getOnlySecurityContext(op.securityContext))) != null ? _a2 : null;
|
|
18474
|
+
op.trustedValueFn = trustedValueFn !== null ? importExpr(trustedValueFn) : null;
|
|
18475
|
+
}
|
|
18476
|
+
}
|
|
18477
|
+
}
|
|
18343
18478
|
for (const op of unit.update) {
|
|
18344
18479
|
switch (op.kind) {
|
|
18345
18480
|
case OpKind.Property:
|
|
18346
18481
|
case OpKind.Attribute:
|
|
18347
|
-
|
|
18348
|
-
|
|
18482
|
+
case OpKind.HostProperty:
|
|
18483
|
+
let sanitizerFn = null;
|
|
18484
|
+
if (Array.isArray(op.securityContext) && op.securityContext.length === 2 && op.securityContext.indexOf(SecurityContext.URL) > -1 && op.securityContext.indexOf(SecurityContext.RESOURCE_URL) > -1) {
|
|
18485
|
+
sanitizerFn = Identifiers.sanitizeUrlOrResourceUrl;
|
|
18486
|
+
} else {
|
|
18487
|
+
sanitizerFn = (_b2 = sanitizerFns.get(getOnlySecurityContext(op.securityContext))) != null ? _b2 : null;
|
|
18488
|
+
}
|
|
18489
|
+
op.sanitizer = sanitizerFn !== null ? importExpr(sanitizerFn) : null;
|
|
18349
18490
|
if (op.sanitizer === null) {
|
|
18350
|
-
|
|
18351
|
-
if (
|
|
18352
|
-
|
|
18491
|
+
let isIframe = false;
|
|
18492
|
+
if (job.kind === CompilationJobKind.Host || op.kind === OpKind.HostProperty) {
|
|
18493
|
+
isIframe = true;
|
|
18494
|
+
} else {
|
|
18495
|
+
const ownerOp = elements.get(op.target);
|
|
18496
|
+
if (ownerOp === void 0 || !isElementOrContainerOp(ownerOp)) {
|
|
18497
|
+
throw Error("Property should have an element-like owner");
|
|
18498
|
+
}
|
|
18499
|
+
isIframe = isIframeElement(ownerOp);
|
|
18353
18500
|
}
|
|
18354
|
-
if (
|
|
18355
|
-
op.sanitizer =
|
|
18501
|
+
if (isIframe && isIframeSecuritySensitiveAttr(op.name)) {
|
|
18502
|
+
op.sanitizer = importExpr(Identifiers.validateIframeAttribute);
|
|
18356
18503
|
}
|
|
18357
18504
|
}
|
|
18358
18505
|
break;
|
|
@@ -18364,8 +18511,17 @@ function isIframeElement(op) {
|
|
|
18364
18511
|
var _a2;
|
|
18365
18512
|
return op.kind === OpKind.ElementStart && ((_a2 = op.tag) == null ? void 0 : _a2.toLowerCase()) === "iframe";
|
|
18366
18513
|
}
|
|
18514
|
+
function getOnlySecurityContext(securityContext) {
|
|
18515
|
+
if (Array.isArray(securityContext)) {
|
|
18516
|
+
if (securityContext.length > 1) {
|
|
18517
|
+
throw Error(`AssertionError: Ambiguous security context`);
|
|
18518
|
+
}
|
|
18519
|
+
return securityContext[0] || SecurityContext.NONE;
|
|
18520
|
+
}
|
|
18521
|
+
return securityContext;
|
|
18522
|
+
}
|
|
18367
18523
|
|
|
18368
|
-
// bazel-out/
|
|
18524
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
|
|
18369
18525
|
function saveAndRestoreView(job) {
|
|
18370
18526
|
for (const unit of job.units) {
|
|
18371
18527
|
unit.create.prepend([
|
|
@@ -18410,7 +18566,7 @@ function addSaveRestoreViewOperationToListener(unit, op) {
|
|
|
18410
18566
|
}
|
|
18411
18567
|
}
|
|
18412
18568
|
|
|
18413
|
-
// bazel-out/
|
|
18569
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
|
|
18414
18570
|
function allocateSlots(job) {
|
|
18415
18571
|
const slotMap = /* @__PURE__ */ new Map();
|
|
18416
18572
|
for (const unit of job.units) {
|
|
@@ -18435,7 +18591,7 @@ function allocateSlots(job) {
|
|
|
18435
18591
|
}
|
|
18436
18592
|
}
|
|
18437
18593
|
|
|
18438
|
-
// bazel-out/
|
|
18594
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
|
|
18439
18595
|
function specializeStyleBindings(job) {
|
|
18440
18596
|
for (const unit of job.units) {
|
|
18441
18597
|
for (const op of unit.update) {
|
|
@@ -18465,7 +18621,7 @@ function specializeStyleBindings(job) {
|
|
|
18465
18621
|
}
|
|
18466
18622
|
}
|
|
18467
18623
|
|
|
18468
|
-
// bazel-out/
|
|
18624
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
|
|
18469
18625
|
function generateTemporaryVariables(job) {
|
|
18470
18626
|
for (const unit of job.units) {
|
|
18471
18627
|
unit.create.prepend(generateTemporaries(unit.create));
|
|
@@ -18523,7 +18679,7 @@ function assignName(names, expr) {
|
|
|
18523
18679
|
expr.name = name;
|
|
18524
18680
|
}
|
|
18525
18681
|
|
|
18526
|
-
// bazel-out/
|
|
18682
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_generation.mjs
|
|
18527
18683
|
function generateTrackFns(job) {
|
|
18528
18684
|
for (const unit of job.units) {
|
|
18529
18685
|
for (const op of unit.create) {
|
|
@@ -18553,7 +18709,7 @@ function generateTrackFns(job) {
|
|
|
18553
18709
|
}
|
|
18554
18710
|
}
|
|
18555
18711
|
|
|
18556
|
-
// bazel-out/
|
|
18712
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_optimization.mjs
|
|
18557
18713
|
function optimizeTrackFns(job) {
|
|
18558
18714
|
for (const unit of job.units) {
|
|
18559
18715
|
for (const op of unit.create) {
|
|
@@ -18600,7 +18756,7 @@ function isTrackByFunctionCall(rootView, expr) {
|
|
|
18600
18756
|
return true;
|
|
18601
18757
|
}
|
|
18602
18758
|
|
|
18603
|
-
// bazel-out/
|
|
18759
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_variables.mjs
|
|
18604
18760
|
function generateTrackVariables(job) {
|
|
18605
18761
|
for (const unit of job.units) {
|
|
18606
18762
|
for (const op of unit.create) {
|
|
@@ -18621,7 +18777,7 @@ function generateTrackVariables(job) {
|
|
|
18621
18777
|
}
|
|
18622
18778
|
}
|
|
18623
18779
|
|
|
18624
|
-
// bazel-out/
|
|
18780
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
|
|
18625
18781
|
function countVariables(job) {
|
|
18626
18782
|
for (const unit of job.units) {
|
|
18627
18783
|
let varCount = 0;
|
|
@@ -18699,7 +18855,10 @@ function varsUsedByOp(op) {
|
|
|
18699
18855
|
return op.interpolation.expressions.length;
|
|
18700
18856
|
case OpKind.I18nExpression:
|
|
18701
18857
|
case OpKind.Conditional:
|
|
18858
|
+
case OpKind.DeferWhen:
|
|
18702
18859
|
return 1;
|
|
18860
|
+
case OpKind.RepeaterCreate:
|
|
18861
|
+
return op.emptyView ? 1 : 0;
|
|
18703
18862
|
default:
|
|
18704
18863
|
throw new Error(`Unhandled op: ${OpKind[op.kind]}`);
|
|
18705
18864
|
}
|
|
@@ -18726,7 +18885,7 @@ function isSingletonInterpolation(expr) {
|
|
|
18726
18885
|
return true;
|
|
18727
18886
|
}
|
|
18728
18887
|
|
|
18729
|
-
// bazel-out/
|
|
18888
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
|
|
18730
18889
|
function optimizeVariables(job) {
|
|
18731
18890
|
for (const unit of job.units) {
|
|
18732
18891
|
inlineAlwaysInlineVariables(unit.create);
|
|
@@ -18976,7 +19135,7 @@ function allowConservativeInlining(decl, target) {
|
|
|
18976
19135
|
}
|
|
18977
19136
|
}
|
|
18978
19137
|
|
|
18979
|
-
// bazel-out/
|
|
19138
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/wrap_icus.mjs
|
|
18980
19139
|
function wrapI18nIcus(job) {
|
|
18981
19140
|
for (const unit of job.units) {
|
|
18982
19141
|
let currentI18nOp = null;
|
|
@@ -19006,17 +19165,18 @@ function wrapI18nIcus(job) {
|
|
|
19006
19165
|
}
|
|
19007
19166
|
}
|
|
19008
19167
|
|
|
19009
|
-
// bazel-out/
|
|
19168
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
|
|
19010
19169
|
var phases = [
|
|
19011
19170
|
{ kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },
|
|
19012
19171
|
{ kind: CompilationJobKind.Host, fn: parseHostStyleProperties },
|
|
19013
19172
|
{ kind: CompilationJobKind.Tmpl, fn: emitNamespaceChanges },
|
|
19014
19173
|
{ kind: CompilationJobKind.Tmpl, fn: propagateI18nBlocks },
|
|
19015
19174
|
{ kind: CompilationJobKind.Tmpl, fn: wrapI18nIcus },
|
|
19016
|
-
{ kind: CompilationJobKind.
|
|
19175
|
+
{ kind: CompilationJobKind.Both, fn: deduplicateTextBindings },
|
|
19017
19176
|
{ kind: CompilationJobKind.Both, fn: specializeStyleBindings },
|
|
19018
19177
|
{ kind: CompilationJobKind.Both, fn: specializeBindings },
|
|
19019
19178
|
{ kind: CompilationJobKind.Both, fn: extractAttributes },
|
|
19179
|
+
{ kind: CompilationJobKind.Tmpl, fn: createI18nContexts },
|
|
19020
19180
|
{ kind: CompilationJobKind.Both, fn: parseExtractedStyles },
|
|
19021
19181
|
{ kind: CompilationJobKind.Tmpl, fn: removeEmptyBindings },
|
|
19022
19182
|
{ kind: CompilationJobKind.Both, fn: collapseSingletonInterpolations },
|
|
@@ -19034,7 +19194,7 @@ var phases = [
|
|
|
19034
19194
|
{ kind: CompilationJobKind.Tmpl, fn: generateProjectionDefs },
|
|
19035
19195
|
{ kind: CompilationJobKind.Tmpl, fn: generateVariables },
|
|
19036
19196
|
{ kind: CompilationJobKind.Tmpl, fn: saveAndRestoreView },
|
|
19037
|
-
{ kind: CompilationJobKind.
|
|
19197
|
+
{ kind: CompilationJobKind.Both, fn: deleteAnyCasts },
|
|
19038
19198
|
{ kind: CompilationJobKind.Both, fn: resolveDollarEvent },
|
|
19039
19199
|
{ kind: CompilationJobKind.Tmpl, fn: generateRepeaterDerivedVars },
|
|
19040
19200
|
{ kind: CompilationJobKind.Tmpl, fn: generateTrackVariables },
|
|
@@ -19042,7 +19202,7 @@ var phases = [
|
|
|
19042
19202
|
{ kind: CompilationJobKind.Tmpl, fn: resolveDeferTargetNames },
|
|
19043
19203
|
{ kind: CompilationJobKind.Tmpl, fn: optimizeTrackFns },
|
|
19044
19204
|
{ kind: CompilationJobKind.Both, fn: resolveContexts },
|
|
19045
|
-
{ kind: CompilationJobKind.
|
|
19205
|
+
{ kind: CompilationJobKind.Both, fn: resolveSanitizers },
|
|
19046
19206
|
{ kind: CompilationJobKind.Tmpl, fn: liftLocalRefs },
|
|
19047
19207
|
{ kind: CompilationJobKind.Both, fn: generateNullishCoalesceExpressions },
|
|
19048
19208
|
{ kind: CompilationJobKind.Both, fn: expandSafeReads },
|
|
@@ -19051,7 +19211,6 @@ var phases = [
|
|
|
19051
19211
|
{ kind: CompilationJobKind.Tmpl, fn: createDeferDepsFns },
|
|
19052
19212
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nElementPlaceholders },
|
|
19053
19213
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nExpressionPlaceholders },
|
|
19054
|
-
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nIcuPlaceholders },
|
|
19055
19214
|
{ kind: CompilationJobKind.Tmpl, fn: extractI18nMessages },
|
|
19056
19215
|
{ kind: CompilationJobKind.Tmpl, fn: generateTrackFns },
|
|
19057
19216
|
{ kind: CompilationJobKind.Tmpl, fn: collectI18nConsts },
|
|
@@ -19172,8 +19331,10 @@ function emitHostBindingFunction(job) {
|
|
|
19172
19331
|
);
|
|
19173
19332
|
}
|
|
19174
19333
|
|
|
19175
|
-
// bazel-out/
|
|
19334
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
|
|
19176
19335
|
var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
|
|
19336
|
+
var domSchema = new DomElementSchemaRegistry();
|
|
19337
|
+
var NG_TEMPLATE_TAG_NAME = "ng-template";
|
|
19177
19338
|
function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta) {
|
|
19178
19339
|
const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta);
|
|
19179
19340
|
ingestNodes(job.root, template2);
|
|
@@ -19183,17 +19344,27 @@ function ingestHostBinding(input, bindingParser, constantPool) {
|
|
|
19183
19344
|
var _a2, _b2, _c2;
|
|
19184
19345
|
const job = new HostBindingCompilationJob(input.componentName, constantPool, compatibilityMode);
|
|
19185
19346
|
for (const property2 of (_a2 = input.properties) != null ? _a2 : []) {
|
|
19186
|
-
|
|
19347
|
+
let bindingKind = BindingKind.Property;
|
|
19348
|
+
if (property2.name.startsWith("attr.")) {
|
|
19349
|
+
property2.name = property2.name.substring("attr.".length);
|
|
19350
|
+
bindingKind = BindingKind.Attribute;
|
|
19351
|
+
}
|
|
19352
|
+
if (property2.isAnimation) {
|
|
19353
|
+
bindingKind = BindingKind.Animation;
|
|
19354
|
+
}
|
|
19355
|
+
const securityContexts = bindingParser.calcPossibleSecurityContexts(input.componentSelector, property2.name, bindingKind === BindingKind.Attribute).filter((context) => context !== SecurityContext.NONE);
|
|
19356
|
+
ingestHostProperty(job, property2, bindingKind, securityContexts);
|
|
19187
19357
|
}
|
|
19188
19358
|
for (const [name, expr] of (_b2 = Object.entries(input.attributes)) != null ? _b2 : []) {
|
|
19189
|
-
|
|
19359
|
+
const securityContexts = bindingParser.calcPossibleSecurityContexts(input.componentSelector, name, true).filter((context) => context !== SecurityContext.NONE);
|
|
19360
|
+
ingestHostAttribute(job, name, expr, securityContexts);
|
|
19190
19361
|
}
|
|
19191
19362
|
for (const event of (_c2 = input.events) != null ? _c2 : []) {
|
|
19192
19363
|
ingestHostEvent(job, event);
|
|
19193
19364
|
}
|
|
19194
19365
|
return job;
|
|
19195
19366
|
}
|
|
19196
|
-
function ingestHostProperty(job, property2,
|
|
19367
|
+
function ingestHostProperty(job, property2, bindingKind, securityContexts) {
|
|
19197
19368
|
let expression;
|
|
19198
19369
|
const ast = property2.expression.ast;
|
|
19199
19370
|
if (ast instanceof Interpolation) {
|
|
@@ -19201,34 +19372,27 @@ function ingestHostProperty(job, property2, isTextAttribute) {
|
|
|
19201
19372
|
} else {
|
|
19202
19373
|
expression = convertAst(ast, job, property2.sourceSpan);
|
|
19203
19374
|
}
|
|
19204
|
-
|
|
19205
|
-
if (property2.name.startsWith("attr.")) {
|
|
19206
|
-
property2.name = property2.name.substring("attr.".length);
|
|
19207
|
-
bindingKind = BindingKind.Attribute;
|
|
19208
|
-
}
|
|
19209
|
-
if (property2.isAnimation) {
|
|
19210
|
-
bindingKind = BindingKind.Animation;
|
|
19211
|
-
}
|
|
19212
|
-
job.root.update.push(createBindingOp(job.root.xref, bindingKind, property2.name, expression, null, SecurityContext.NONE, isTextAttribute, false, null, property2.sourceSpan));
|
|
19375
|
+
job.root.update.push(createBindingOp(job.root.xref, bindingKind, property2.name, expression, null, securityContexts, false, false, null, null, property2.sourceSpan));
|
|
19213
19376
|
}
|
|
19214
|
-
function ingestHostAttribute(job, name, value) {
|
|
19377
|
+
function ingestHostAttribute(job, name, value, securityContexts) {
|
|
19215
19378
|
const attrBinding = createBindingOp(
|
|
19216
19379
|
job.root.xref,
|
|
19217
19380
|
BindingKind.Attribute,
|
|
19218
19381
|
name,
|
|
19219
19382
|
value,
|
|
19220
19383
|
null,
|
|
19221
|
-
|
|
19384
|
+
securityContexts,
|
|
19222
19385
|
true,
|
|
19223
19386
|
false,
|
|
19224
19387
|
null,
|
|
19225
|
-
null
|
|
19388
|
+
null,
|
|
19389
|
+
value.sourceSpan
|
|
19226
19390
|
);
|
|
19227
19391
|
job.root.update.push(attrBinding);
|
|
19228
19392
|
}
|
|
19229
19393
|
function ingestHostEvent(job, event) {
|
|
19230
|
-
const
|
|
19231
|
-
eventBinding.
|
|
19394
|
+
const [phase, target] = event.type === 0 ? [null, event.targetOrPhase] : [event.targetOrPhase, null];
|
|
19395
|
+
const eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, makeListenerHandlerOps(job.root, event.handler, event.handlerSpan), phase, target, true, event.sourceSpan);
|
|
19232
19396
|
job.root.create.push(eventBinding);
|
|
19233
19397
|
}
|
|
19234
19398
|
function ingestNodes(unit, template2) {
|
|
@@ -19240,9 +19404,9 @@ function ingestNodes(unit, template2) {
|
|
|
19240
19404
|
} else if (node instanceof Content) {
|
|
19241
19405
|
ingestContent(unit, node);
|
|
19242
19406
|
} else if (node instanceof Text) {
|
|
19243
|
-
ingestText(unit, node);
|
|
19407
|
+
ingestText(unit, node, null);
|
|
19244
19408
|
} else if (node instanceof BoundText) {
|
|
19245
|
-
ingestBoundText(unit, node);
|
|
19409
|
+
ingestBoundText(unit, node, null);
|
|
19246
19410
|
} else if (node instanceof IfBlock) {
|
|
19247
19411
|
ingestIfBlock(unit, node);
|
|
19248
19412
|
} else if (node instanceof SwitchBlock) {
|
|
@@ -19265,16 +19429,19 @@ function ingestElement(unit, element2) {
|
|
|
19265
19429
|
}
|
|
19266
19430
|
const id = unit.job.allocateXrefId();
|
|
19267
19431
|
const [namespaceKey, elementName] = splitNsName(element2.name);
|
|
19268
|
-
const startOp = createElementStartOp(elementName, id, namespaceForKey(namespaceKey), element2.i18n instanceof TagPlaceholder ? element2.i18n : void 0, element2.startSourceSpan);
|
|
19432
|
+
const startOp = createElementStartOp(elementName, id, namespaceForKey(namespaceKey), element2.i18n instanceof TagPlaceholder ? element2.i18n : void 0, element2.startSourceSpan, element2.sourceSpan);
|
|
19269
19433
|
unit.create.push(startOp);
|
|
19270
|
-
|
|
19434
|
+
ingestElementBindings(unit, startOp, element2);
|
|
19271
19435
|
ingestReferences(startOp, element2);
|
|
19436
|
+
let i18nBlockId = null;
|
|
19437
|
+
if (element2.i18n instanceof Message) {
|
|
19438
|
+
i18nBlockId = unit.job.allocateXrefId();
|
|
19439
|
+
unit.create.push(createI18nStartOp(i18nBlockId, element2.i18n));
|
|
19440
|
+
}
|
|
19272
19441
|
ingestNodes(unit, element2.children);
|
|
19273
19442
|
const endOp = createElementEndOp(id, (_a2 = element2.endSourceSpan) != null ? _a2 : element2.startSourceSpan);
|
|
19274
19443
|
unit.create.push(endOp);
|
|
19275
|
-
if (
|
|
19276
|
-
const i18nBlockId = unit.job.allocateXrefId();
|
|
19277
|
-
OpList.insertAfter(createI18nStartOp(i18nBlockId, element2.i18n), startOp);
|
|
19444
|
+
if (i18nBlockId !== null) {
|
|
19278
19445
|
OpList.insertBefore(createI18nEndOp(i18nBlockId), endOp);
|
|
19279
19446
|
}
|
|
19280
19447
|
}
|
|
@@ -19292,9 +19459,9 @@ function ingestTemplate(unit, tmpl) {
|
|
|
19292
19459
|
const namespace = namespaceForKey(namespacePrefix);
|
|
19293
19460
|
const functionNameSuffix = tagNameWithoutNamespace === null ? "" : prefixWithNamespace(tagNameWithoutNamespace, namespace);
|
|
19294
19461
|
const templateKind = isPlainTemplate(tmpl) ? TemplateKind.NgTemplate : TemplateKind.Structural;
|
|
19295
|
-
const templateOp = createTemplateOp(childView.xref, templateKind, tagNameWithoutNamespace, functionNameSuffix, namespace, i18nPlaceholder, tmpl.startSourceSpan);
|
|
19462
|
+
const templateOp = createTemplateOp(childView.xref, templateKind, tagNameWithoutNamespace, functionNameSuffix, namespace, i18nPlaceholder, tmpl.startSourceSpan, tmpl.sourceSpan);
|
|
19296
19463
|
unit.create.push(templateOp);
|
|
19297
|
-
|
|
19464
|
+
ingestTemplateBindings(unit, templateOp, tmpl, templateKind);
|
|
19298
19465
|
ingestReferences(templateOp, tmpl);
|
|
19299
19466
|
ingestNodes(childView, tmpl.children);
|
|
19300
19467
|
for (const { name, value } of tmpl.variables) {
|
|
@@ -19313,14 +19480,15 @@ function ingestContent(unit, content) {
|
|
|
19313
19480
|
const attrs = content.attributes.flatMap((a) => [a.name, a.value]);
|
|
19314
19481
|
const op = createProjectionOp(unit.job.allocateXrefId(), content.selector, content.i18n, attrs, content.sourceSpan);
|
|
19315
19482
|
for (const attr of content.attributes) {
|
|
19316
|
-
|
|
19483
|
+
const securityContext = domSchema.securityContext(content.name, attr.name, true);
|
|
19484
|
+
unit.update.push(createBindingOp(op.xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
|
|
19317
19485
|
}
|
|
19318
19486
|
unit.create.push(op);
|
|
19319
19487
|
}
|
|
19320
|
-
function ingestText(unit, text2) {
|
|
19321
|
-
unit.create.push(createTextOp(unit.job.allocateXrefId(), text2.value, text2.sourceSpan));
|
|
19488
|
+
function ingestText(unit, text2, icuPlaceholder) {
|
|
19489
|
+
unit.create.push(createTextOp(unit.job.allocateXrefId(), text2.value, icuPlaceholder, text2.sourceSpan));
|
|
19322
19490
|
}
|
|
19323
|
-
function ingestBoundText(unit, text2,
|
|
19491
|
+
function ingestBoundText(unit, text2, icuPlaceholder) {
|
|
19324
19492
|
var _a2;
|
|
19325
19493
|
let value = text2.value;
|
|
19326
19494
|
if (value instanceof ASTWithSource) {
|
|
@@ -19332,14 +19500,12 @@ function ingestBoundText(unit, text2, i18nPlaceholders) {
|
|
|
19332
19500
|
if (text2.i18n !== void 0 && !(text2.i18n instanceof Container)) {
|
|
19333
19501
|
throw Error(`Unhandled i18n metadata type for text interpolation: ${(_a2 = text2.i18n) == null ? void 0 : _a2.constructor.name}`);
|
|
19334
19502
|
}
|
|
19335
|
-
|
|
19336
|
-
i18nPlaceholders = text2.i18n instanceof Container ? text2.i18n.children.filter((node) => node instanceof Placeholder).map((placeholder) => placeholder.name) : [];
|
|
19337
|
-
}
|
|
19503
|
+
const i18nPlaceholders = text2.i18n instanceof Container ? text2.i18n.children.filter((node) => node instanceof Placeholder).map((placeholder) => placeholder.name) : [];
|
|
19338
19504
|
if (i18nPlaceholders.length > 0 && i18nPlaceholders.length !== value.expressions.length) {
|
|
19339
19505
|
throw Error(`Unexpected number of i18n placeholders (${value.expressions.length}) for BoundText with ${value.expressions.length} expressions`);
|
|
19340
19506
|
}
|
|
19341
19507
|
const textXref = unit.job.allocateXrefId();
|
|
19342
|
-
unit.create.push(createTextOp(textXref, "", text2.sourceSpan));
|
|
19508
|
+
unit.create.push(createTextOp(textXref, "", icuPlaceholder, text2.sourceSpan));
|
|
19343
19509
|
const baseSourceSpan = unit.job.compatibility ? null : text2.sourceSpan;
|
|
19344
19510
|
unit.update.push(createInterpolateTextOp(textXref, new Interpolation2(value.strings, value.expressions.map((expr) => convertAst(expr, unit.job, baseSourceSpan)), i18nPlaceholders), text2.sourceSpan));
|
|
19345
19511
|
}
|
|
@@ -19365,7 +19531,7 @@ function ingestIfBlock(unit, ifBlock) {
|
|
|
19365
19531
|
}
|
|
19366
19532
|
ifCaseI18nMeta = ifCase.i18n;
|
|
19367
19533
|
}
|
|
19368
|
-
const templateOp = createTemplateOp(cView.xref, TemplateKind.Block, tagName, "Conditional", Namespace.HTML, ifCaseI18nMeta, ifCase.sourceSpan);
|
|
19534
|
+
const templateOp = createTemplateOp(cView.xref, TemplateKind.Block, tagName, "Conditional", Namespace.HTML, ifCaseI18nMeta, ifCase.startSourceSpan, ifCase.sourceSpan);
|
|
19369
19535
|
unit.create.push(templateOp);
|
|
19370
19536
|
if (firstXref === null) {
|
|
19371
19537
|
firstXref = cView.xref;
|
|
@@ -19393,7 +19559,7 @@ function ingestSwitchBlock(unit, switchBlock) {
|
|
|
19393
19559
|
}
|
|
19394
19560
|
switchCaseI18nMeta = switchCase.i18n;
|
|
19395
19561
|
}
|
|
19396
|
-
const templateOp = createTemplateOp(cView.xref, TemplateKind.Block, null, "Case", Namespace.HTML, switchCaseI18nMeta, switchCase.sourceSpan);
|
|
19562
|
+
const templateOp = createTemplateOp(cView.xref, TemplateKind.Block, null, "Case", Namespace.HTML, switchCaseI18nMeta, switchCase.startSourceSpan, switchCase.sourceSpan);
|
|
19397
19563
|
unit.create.push(templateOp);
|
|
19398
19564
|
if (firstXref === null) {
|
|
19399
19565
|
firstXref = cView.xref;
|
|
@@ -19407,35 +19573,38 @@ function ingestSwitchBlock(unit, switchBlock) {
|
|
|
19407
19573
|
const conditional2 = createConditionalOp(firstXref, firstSlotHandle, convertAst(switchBlock.expression, unit.job, null), conditions, switchBlock.sourceSpan);
|
|
19408
19574
|
unit.update.push(conditional2);
|
|
19409
19575
|
}
|
|
19410
|
-
function ingestDeferView(unit, suffix, children, sourceSpan) {
|
|
19576
|
+
function ingestDeferView(unit, suffix, i18nMeta, children, sourceSpan) {
|
|
19577
|
+
if (i18nMeta !== void 0 && !(i18nMeta instanceof BlockPlaceholder)) {
|
|
19578
|
+
throw Error("Unhandled i18n metadata type for defer block");
|
|
19579
|
+
}
|
|
19411
19580
|
if (children === void 0) {
|
|
19412
19581
|
return null;
|
|
19413
19582
|
}
|
|
19414
19583
|
const secondaryView = unit.job.allocateView(unit.xref);
|
|
19415
19584
|
ingestNodes(secondaryView, children);
|
|
19416
|
-
const templateOp = createTemplateOp(secondaryView.xref, TemplateKind.Block, null, `Defer${suffix}`, Namespace.HTML,
|
|
19585
|
+
const templateOp = createTemplateOp(secondaryView.xref, TemplateKind.Block, null, `Defer${suffix}`, Namespace.HTML, i18nMeta, sourceSpan, sourceSpan);
|
|
19417
19586
|
unit.create.push(templateOp);
|
|
19418
19587
|
return templateOp;
|
|
19419
19588
|
}
|
|
19420
19589
|
function ingestDeferBlock(unit, deferBlock) {
|
|
19421
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
19590
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
19422
19591
|
const blockMeta = unit.job.deferBlocksMeta.get(deferBlock);
|
|
19423
19592
|
if (blockMeta === void 0) {
|
|
19424
19593
|
throw new Error(`AssertionError: unable to find metadata for deferred block`);
|
|
19425
19594
|
}
|
|
19426
|
-
const main = ingestDeferView(unit, "", deferBlock.children, deferBlock.sourceSpan);
|
|
19427
|
-
const loading = ingestDeferView(unit, "Loading", (_a2 = deferBlock.loading) == null ? void 0 : _a2.
|
|
19428
|
-
const placeholder = ingestDeferView(unit, "Placeholder", (
|
|
19429
|
-
const error2 = ingestDeferView(unit, "Error", (
|
|
19595
|
+
const main = ingestDeferView(unit, "", deferBlock.i18n, deferBlock.children, deferBlock.sourceSpan);
|
|
19596
|
+
const loading = ingestDeferView(unit, "Loading", (_a2 = deferBlock.loading) == null ? void 0 : _a2.i18n, (_b2 = deferBlock.loading) == null ? void 0 : _b2.children, (_c2 = deferBlock.loading) == null ? void 0 : _c2.sourceSpan);
|
|
19597
|
+
const placeholder = ingestDeferView(unit, "Placeholder", (_d2 = deferBlock.placeholder) == null ? void 0 : _d2.i18n, (_e2 = deferBlock.placeholder) == null ? void 0 : _e2.children, (_f2 = deferBlock.placeholder) == null ? void 0 : _f2.sourceSpan);
|
|
19598
|
+
const error2 = ingestDeferView(unit, "Error", (_g = deferBlock.error) == null ? void 0 : _g.i18n, (_h = deferBlock.error) == null ? void 0 : _h.children, (_i = deferBlock.error) == null ? void 0 : _i.sourceSpan);
|
|
19430
19599
|
const deferXref = unit.job.allocateXrefId();
|
|
19431
19600
|
const deferOp = createDeferOp(deferXref, main.xref, main.handle, blockMeta, deferBlock.sourceSpan);
|
|
19432
|
-
deferOp.placeholderView = (
|
|
19433
|
-
deferOp.placeholderSlot = (
|
|
19434
|
-
deferOp.loadingSlot = (
|
|
19435
|
-
deferOp.errorSlot = (
|
|
19436
|
-
deferOp.placeholderMinimumTime = (
|
|
19437
|
-
deferOp.loadingMinimumTime = (
|
|
19438
|
-
deferOp.loadingAfterTime = (
|
|
19601
|
+
deferOp.placeholderView = (_j = placeholder == null ? void 0 : placeholder.xref) != null ? _j : null;
|
|
19602
|
+
deferOp.placeholderSlot = (_k = placeholder == null ? void 0 : placeholder.handle) != null ? _k : null;
|
|
19603
|
+
deferOp.loadingSlot = (_l = loading == null ? void 0 : loading.handle) != null ? _l : null;
|
|
19604
|
+
deferOp.errorSlot = (_m = error2 == null ? void 0 : error2.handle) != null ? _m : null;
|
|
19605
|
+
deferOp.placeholderMinimumTime = (_o = (_n = deferBlock.placeholder) == null ? void 0 : _n.minimumTime) != null ? _o : null;
|
|
19606
|
+
deferOp.loadingMinimumTime = (_q = (_p = deferBlock.loading) == null ? void 0 : _p.minimumTime) != null ? _q : null;
|
|
19607
|
+
deferOp.loadingAfterTime = (_s = (_r = deferBlock.loading) == null ? void 0 : _r.afterTime) != null ? _s : null;
|
|
19439
19608
|
unit.create.push(deferOp);
|
|
19440
19609
|
let prefetch = false;
|
|
19441
19610
|
let deferOnOps = [];
|
|
@@ -19487,6 +19656,9 @@ function ingestDeferBlock(unit, deferBlock) {
|
|
|
19487
19656
|
deferOnOps.push(deferOnOp);
|
|
19488
19657
|
}
|
|
19489
19658
|
if (triggers.when !== void 0) {
|
|
19659
|
+
if (triggers.when.value instanceof Interpolation) {
|
|
19660
|
+
throw new Error(`Unexpected interpolation in defer block when trigger`);
|
|
19661
|
+
}
|
|
19490
19662
|
const deferOnOp = createDeferWhenOp(deferXref, convertAst(triggers.when.value, unit.job, triggers.when.sourceSpan), prefetch, triggers.when.sourceSpan);
|
|
19491
19663
|
deferWhenOps.push(deferOnOp);
|
|
19492
19664
|
}
|
|
@@ -19506,9 +19678,9 @@ function ingestIcu(unit, icu) {
|
|
|
19506
19678
|
unit.create.push(createIcuStartOp(xref, icu.i18n, icuFromI18nMessage(icu.i18n).name, null));
|
|
19507
19679
|
for (const [placeholder, text2] of Object.entries(__spreadValues(__spreadValues({}, icu.vars), icu.placeholders))) {
|
|
19508
19680
|
if (text2 instanceof BoundText) {
|
|
19509
|
-
ingestBoundText(unit, text2,
|
|
19681
|
+
ingestBoundText(unit, text2, placeholder);
|
|
19510
19682
|
} else {
|
|
19511
|
-
ingestText(unit, text2);
|
|
19683
|
+
ingestText(unit, text2, placeholder);
|
|
19512
19684
|
}
|
|
19513
19685
|
}
|
|
19514
19686
|
unit.create.push(createIcuEndOp(xref));
|
|
@@ -19517,7 +19689,7 @@ function ingestIcu(unit, icu) {
|
|
|
19517
19689
|
}
|
|
19518
19690
|
}
|
|
19519
19691
|
function ingestForBlock(unit, forBlock) {
|
|
19520
|
-
var _a2;
|
|
19692
|
+
var _a2, _b2, _c2;
|
|
19521
19693
|
const repeaterView = unit.job.allocateView(unit.xref);
|
|
19522
19694
|
const createRepeaterAlias = (ident, repeaterVar) => {
|
|
19523
19695
|
repeaterView.aliases.add({
|
|
@@ -19551,8 +19723,16 @@ function ingestForBlock(unit, forBlock) {
|
|
|
19551
19723
|
$odd: forBlock.contextVariables.$odd.name,
|
|
19552
19724
|
$implicit: forBlock.item.name
|
|
19553
19725
|
};
|
|
19726
|
+
if (forBlock.i18n !== void 0 && !(forBlock.i18n instanceof BlockPlaceholder)) {
|
|
19727
|
+
throw Error("AssertionError: Unhandled i18n metadata type or @for");
|
|
19728
|
+
}
|
|
19729
|
+
if (((_a2 = forBlock.empty) == null ? void 0 : _a2.i18n) !== void 0 && !(forBlock.empty.i18n instanceof BlockPlaceholder)) {
|
|
19730
|
+
throw Error("AssertionError: Unhandled i18n metadata type or @empty");
|
|
19731
|
+
}
|
|
19732
|
+
const i18nPlaceholder = forBlock.i18n;
|
|
19733
|
+
const emptyI18nPlaceholder = (_b2 = forBlock.empty) == null ? void 0 : _b2.i18n;
|
|
19554
19734
|
const tagName = ingestControlFlowInsertionPoint(unit, repeaterView.xref, forBlock);
|
|
19555
|
-
const repeaterCreate2 = createRepeaterCreateOp(repeaterView.xref, (
|
|
19735
|
+
const repeaterCreate2 = createRepeaterCreateOp(repeaterView.xref, (_c2 = emptyView == null ? void 0 : emptyView.xref) != null ? _c2 : null, tagName, track, varNames, i18nPlaceholder, emptyI18nPlaceholder, forBlock.startSourceSpan, forBlock.sourceSpan);
|
|
19556
19736
|
unit.create.push(repeaterCreate2);
|
|
19557
19737
|
const expression = convertAst(forBlock.expression, unit.job, convertSourceSpan(forBlock.expression.span, forBlock.sourceSpan));
|
|
19558
19738
|
const repeater2 = createRepeaterOp(repeaterCreate2.xref, repeaterCreate2.handle, expression, forBlock.sourceSpan);
|
|
@@ -19640,120 +19820,128 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
19640
19820
|
throw new Error(`Unhandled expression type "${ast.constructor.name}" in file "${baseSourceSpan == null ? void 0 : baseSourceSpan.start.file.url}"`);
|
|
19641
19821
|
}
|
|
19642
19822
|
}
|
|
19823
|
+
function convertAstWithInterpolation(job, value, i18nMeta, sourceSpan) {
|
|
19824
|
+
var _a2, _b2;
|
|
19825
|
+
let expression;
|
|
19826
|
+
if (value instanceof Interpolation) {
|
|
19827
|
+
expression = new Interpolation2(value.strings, value.expressions.map((e) => convertAst(e, job, sourceSpan != null ? sourceSpan : null)), Object.keys((_b2 = (_a2 = asMessage(i18nMeta)) == null ? void 0 : _a2.placeholders) != null ? _b2 : {}));
|
|
19828
|
+
} else if (value instanceof AST) {
|
|
19829
|
+
expression = convertAst(value, job, sourceSpan != null ? sourceSpan : null);
|
|
19830
|
+
} else {
|
|
19831
|
+
expression = literal(value);
|
|
19832
|
+
}
|
|
19833
|
+
return expression;
|
|
19834
|
+
}
|
|
19835
|
+
var BINDING_KINDS = /* @__PURE__ */ new Map([
|
|
19836
|
+
[0, BindingKind.Property],
|
|
19837
|
+
[1, BindingKind.Attribute],
|
|
19838
|
+
[2, BindingKind.ClassName],
|
|
19839
|
+
[3, BindingKind.StyleProperty],
|
|
19840
|
+
[4, BindingKind.Animation]
|
|
19841
|
+
]);
|
|
19643
19842
|
function isPlainTemplate(tmpl) {
|
|
19644
19843
|
var _a2;
|
|
19645
|
-
return splitNsName((_a2 = tmpl.tagName) != null ? _a2 : "")[1] ===
|
|
19646
|
-
}
|
|
19647
|
-
function
|
|
19648
|
-
|
|
19649
|
-
|
|
19650
|
-
if (element2 instanceof Template) {
|
|
19651
|
-
flags |= BindingFlags.OnNgTemplateElement;
|
|
19652
|
-
if (element2 instanceof Template && isPlainTemplate(element2)) {
|
|
19653
|
-
flags |= BindingFlags.BindingTargetsTemplate;
|
|
19654
|
-
}
|
|
19655
|
-
const templateAttrFlags = flags | BindingFlags.BindingTargetsTemplate | BindingFlags.IsStructuralTemplateAttribute;
|
|
19656
|
-
for (const attr of element2.templateAttrs) {
|
|
19657
|
-
if (attr instanceof TextAttribute) {
|
|
19658
|
-
ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, templateAttrFlags | BindingFlags.TextValue, attr.i18n);
|
|
19659
|
-
hasI18nAttributes || (hasI18nAttributes = attr.i18n !== void 0);
|
|
19660
|
-
} else {
|
|
19661
|
-
ingestBinding(unit, op.xref, attr.name, attr.value, attr.type, attr.unit, attr.securityContext, attr.sourceSpan, templateAttrFlags, attr.i18n);
|
|
19662
|
-
hasI18nAttributes || (hasI18nAttributes = attr.i18n !== void 0);
|
|
19663
|
-
}
|
|
19664
|
-
}
|
|
19844
|
+
return splitNsName((_a2 = tmpl.tagName) != null ? _a2 : "")[1] === NG_TEMPLATE_TAG_NAME;
|
|
19845
|
+
}
|
|
19846
|
+
function asMessage(i18nMeta) {
|
|
19847
|
+
if (i18nMeta == null) {
|
|
19848
|
+
return null;
|
|
19665
19849
|
}
|
|
19850
|
+
if (!(i18nMeta instanceof Message)) {
|
|
19851
|
+
throw Error(`Expected i18n meta to be a Message, but got: ${i18nMeta.constructor.name}`);
|
|
19852
|
+
}
|
|
19853
|
+
return i18nMeta;
|
|
19854
|
+
}
|
|
19855
|
+
function ingestElementBindings(unit, op, element2) {
|
|
19856
|
+
var _a2;
|
|
19857
|
+
let bindings = new Array();
|
|
19666
19858
|
for (const attr of element2.attributes) {
|
|
19667
|
-
|
|
19668
|
-
|
|
19859
|
+
const securityContext = domSchema.securityContext(element2.name, attr.name, true);
|
|
19860
|
+
bindings.push(createBindingOp(op.xref, BindingKind.Attribute, attr.name, convertAstWithInterpolation(unit.job, attr.value, attr.i18n), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
|
|
19669
19861
|
}
|
|
19670
19862
|
for (const input of element2.inputs) {
|
|
19671
|
-
|
|
19672
|
-
hasI18nAttributes || (hasI18nAttributes = input.i18n !== void 0);
|
|
19863
|
+
bindings.push(createBindingOp(op.xref, BINDING_KINDS.get(input.type), input.name, convertAstWithInterpolation(unit.job, astOf(input.value), input.i18n), input.unit, input.securityContext, false, false, null, (_a2 = asMessage(input.i18n)) != null ? _a2 : null, input.sourceSpan));
|
|
19673
19864
|
}
|
|
19865
|
+
unit.create.push(bindings.filter((b) => (b == null ? void 0 : b.kind) === OpKind.ExtractedAttribute));
|
|
19866
|
+
unit.update.push(bindings.filter((b) => (b == null ? void 0 : b.kind) === OpKind.Binding));
|
|
19674
19867
|
for (const output of element2.outputs) {
|
|
19675
|
-
|
|
19676
|
-
|
|
19677
|
-
if (output.phase === null) {
|
|
19678
|
-
throw Error("Animation listener should have a phase");
|
|
19679
|
-
}
|
|
19680
|
-
}
|
|
19681
|
-
if (element2 instanceof Template && !isPlainTemplate(element2)) {
|
|
19682
|
-
unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, output.name, null, null));
|
|
19683
|
-
continue;
|
|
19868
|
+
if (output.type === 1 && output.phase === null) {
|
|
19869
|
+
throw Error("Animation listener should have a phase");
|
|
19684
19870
|
}
|
|
19685
|
-
|
|
19686
|
-
|
|
19687
|
-
|
|
19688
|
-
|
|
19689
|
-
|
|
19690
|
-
|
|
19691
|
-
|
|
19692
|
-
|
|
19871
|
+
unit.create.push(createListenerOp(op.xref, op.handle, output.name, op.tag, makeListenerHandlerOps(unit, output.handler, output.handlerSpan), output.phase, output.target, false, output.sourceSpan));
|
|
19872
|
+
}
|
|
19873
|
+
if (bindings.some((b) => b == null ? void 0 : b.i18nMessage) !== null) {
|
|
19874
|
+
unit.create.push(createI18nAttributesOp(unit.job.allocateXrefId(), new SlotHandle(), op.xref));
|
|
19875
|
+
}
|
|
19876
|
+
}
|
|
19877
|
+
function ingestTemplateBindings(unit, op, template2, templateKind) {
|
|
19878
|
+
let bindings = new Array();
|
|
19879
|
+
for (const attr of template2.templateAttrs) {
|
|
19880
|
+
if (attr instanceof TextAttribute) {
|
|
19881
|
+
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
|
|
19882
|
+
bindings.push(createTemplateBinding(unit, op.xref, 1, attr.name, attr.value, null, securityContext, true, templateKind, asMessage(attr.i18n), attr.sourceSpan));
|
|
19693
19883
|
} else {
|
|
19694
|
-
|
|
19884
|
+
bindings.push(createTemplateBinding(unit, op.xref, attr.type, attr.name, astOf(attr.value), attr.unit, attr.securityContext, true, templateKind, asMessage(attr.i18n), attr.sourceSpan));
|
|
19885
|
+
}
|
|
19886
|
+
}
|
|
19887
|
+
for (const attr of template2.attributes) {
|
|
19888
|
+
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
|
|
19889
|
+
bindings.push(createTemplateBinding(unit, op.xref, 1, attr.name, attr.value, null, securityContext, false, templateKind, asMessage(attr.i18n), attr.sourceSpan));
|
|
19890
|
+
}
|
|
19891
|
+
for (const input of template2.inputs) {
|
|
19892
|
+
bindings.push(createTemplateBinding(unit, op.xref, input.type, input.name, astOf(input.value), input.unit, input.securityContext, false, templateKind, asMessage(input.i18n), input.sourceSpan));
|
|
19893
|
+
}
|
|
19894
|
+
unit.create.push(bindings.filter((b) => (b == null ? void 0 : b.kind) === OpKind.ExtractedAttribute));
|
|
19895
|
+
unit.update.push(bindings.filter((b) => (b == null ? void 0 : b.kind) === OpKind.Binding));
|
|
19896
|
+
for (const output of template2.outputs) {
|
|
19897
|
+
if (output.type === 1 && output.phase === null) {
|
|
19898
|
+
throw Error("Animation listener should have a phase");
|
|
19695
19899
|
}
|
|
19696
|
-
if (
|
|
19697
|
-
|
|
19900
|
+
if (templateKind === TemplateKind.NgTemplate) {
|
|
19901
|
+
unit.create.push(createListenerOp(op.xref, op.handle, output.name, op.tag, makeListenerHandlerOps(unit, output.handler, output.handlerSpan), output.phase, output.target, false, output.sourceSpan));
|
|
19698
19902
|
}
|
|
19699
|
-
|
|
19700
|
-
|
|
19701
|
-
|
|
19702
|
-
const stmtOp = createStatementOp(new ExpressionStatement(expr, expr.sourceSpan));
|
|
19703
|
-
listenerOp.handlerOps.push(stmtOp);
|
|
19903
|
+
if (templateKind === TemplateKind.Structural && output.type !== 1) {
|
|
19904
|
+
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, output.name, false);
|
|
19905
|
+
unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, output.name, null, null, null, securityContext));
|
|
19704
19906
|
}
|
|
19705
|
-
listenerOp.handlerOps.push(createStatementOp(new ReturnStatement(returnExpr, returnExpr.sourceSpan)));
|
|
19706
|
-
unit.create.push(listenerOp);
|
|
19707
19907
|
}
|
|
19708
|
-
if (
|
|
19908
|
+
if (bindings.some((b) => b == null ? void 0 : b.i18nMessage) !== null) {
|
|
19709
19909
|
unit.create.push(createI18nAttributesOp(unit.job.allocateXrefId(), new SlotHandle(), op.xref));
|
|
19710
19910
|
}
|
|
19711
19911
|
}
|
|
19712
|
-
|
|
19713
|
-
|
|
19714
|
-
|
|
19715
|
-
|
|
19716
|
-
|
|
19717
|
-
|
|
19718
|
-
|
|
19719
|
-
|
|
19720
|
-
(function(BindingFlags2) {
|
|
19721
|
-
BindingFlags2[BindingFlags2["None"] = 0] = "None";
|
|
19722
|
-
BindingFlags2[BindingFlags2["TextValue"] = 1] = "TextValue";
|
|
19723
|
-
BindingFlags2[BindingFlags2["BindingTargetsTemplate"] = 2] = "BindingTargetsTemplate";
|
|
19724
|
-
BindingFlags2[BindingFlags2["IsStructuralTemplateAttribute"] = 4] = "IsStructuralTemplateAttribute";
|
|
19725
|
-
BindingFlags2[BindingFlags2["OnNgTemplateElement"] = 8] = "OnNgTemplateElement";
|
|
19726
|
-
})(BindingFlags || (BindingFlags = {}));
|
|
19727
|
-
function ingestBinding(view, xref, name, value, type, unit, securityContext, sourceSpan, flags, i18nMeta) {
|
|
19728
|
-
if (value instanceof ASTWithSource) {
|
|
19729
|
-
value = value.ast;
|
|
19730
|
-
}
|
|
19731
|
-
let i18nContext = null;
|
|
19732
|
-
if (i18nMeta !== void 0) {
|
|
19733
|
-
if (!(i18nMeta instanceof Message)) {
|
|
19734
|
-
throw Error(`Unhandled i18n metadata type for binding: ${i18nMeta.constructor.name}`);
|
|
19912
|
+
function createTemplateBinding(view, xref, type, name, value, unit, securityContext, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
|
|
19913
|
+
const isTextBinding = typeof value === "string";
|
|
19914
|
+
if (templateKind === TemplateKind.Structural) {
|
|
19915
|
+
if (!isStructuralTemplateAttribute && (type === 0 || type === 2 || type === 3)) {
|
|
19916
|
+
return createExtractedAttributeOp(xref, BindingKind.Property, name, null, null, i18nMessage, securityContext);
|
|
19917
|
+
}
|
|
19918
|
+
if (!isTextBinding && (type === 1 || type === 4)) {
|
|
19919
|
+
return null;
|
|
19735
19920
|
}
|
|
19736
|
-
i18nContext = view.job.allocateXrefId();
|
|
19737
|
-
view.create.push(createI18nContextOp(I18nContextKind.Attr, i18nContext, null, i18nMeta, null));
|
|
19738
|
-
}
|
|
19739
|
-
if (flags & BindingFlags.OnNgTemplateElement && !(flags & BindingFlags.BindingTargetsTemplate) && type === 0) {
|
|
19740
|
-
view.create.push(createExtractedAttributeOp(xref, BindingKind.Property, name, null, i18nContext));
|
|
19741
|
-
return;
|
|
19742
19921
|
}
|
|
19743
|
-
let
|
|
19744
|
-
if (
|
|
19745
|
-
|
|
19746
|
-
|
|
19747
|
-
i18nPlaceholders = Object.keys(i18nMeta.placeholders);
|
|
19922
|
+
let bindingType = BINDING_KINDS.get(type);
|
|
19923
|
+
if (templateKind === TemplateKind.NgTemplate) {
|
|
19924
|
+
if (type === 2 || type === 3 || type === 1 && !isTextBinding) {
|
|
19925
|
+
bindingType = BindingKind.Property;
|
|
19748
19926
|
}
|
|
19749
|
-
expression = new Interpolation2(value.strings, value.expressions.map((expr) => convertAst(expr, view.job, null)), i18nPlaceholders);
|
|
19750
|
-
} else if (value instanceof AST) {
|
|
19751
|
-
expression = convertAst(value, view.job, null);
|
|
19752
|
-
} else {
|
|
19753
|
-
expression = value;
|
|
19754
19927
|
}
|
|
19755
|
-
|
|
19756
|
-
|
|
19928
|
+
return createBindingOp(xref, bindingType, name, convertAstWithInterpolation(view.job, value, i18nMessage), unit, securityContext, isTextBinding, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan);
|
|
19929
|
+
}
|
|
19930
|
+
function makeListenerHandlerOps(unit, handler, handlerSpan) {
|
|
19931
|
+
handler = astOf(handler);
|
|
19932
|
+
const handlerOps = new Array();
|
|
19933
|
+
let handlerExprs = handler instanceof Chain ? handler.expressions : [handler];
|
|
19934
|
+
if (handlerExprs.length === 0) {
|
|
19935
|
+
throw new Error("Expected listener to have non-empty expression list.");
|
|
19936
|
+
}
|
|
19937
|
+
const expressions = handlerExprs.map((expr) => convertAst(expr, unit.job, handlerSpan));
|
|
19938
|
+
const returnExpr = expressions.pop();
|
|
19939
|
+
handlerOps.push(...expressions.map((e) => createStatementOp(new ExpressionStatement(e, e.sourceSpan))));
|
|
19940
|
+
handlerOps.push(createStatementOp(new ReturnStatement(returnExpr, returnExpr.sourceSpan)));
|
|
19941
|
+
return handlerOps;
|
|
19942
|
+
}
|
|
19943
|
+
function astOf(ast) {
|
|
19944
|
+
return ast instanceof ASTWithSource ? ast.ast : ast;
|
|
19757
19945
|
}
|
|
19758
19946
|
function ingestReferences(op, element2) {
|
|
19759
19947
|
assertIsArray(op.localRefs);
|
|
@@ -19793,18 +19981,19 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
19793
19981
|
}
|
|
19794
19982
|
if (root !== null) {
|
|
19795
19983
|
for (const attr of root.attributes) {
|
|
19796
|
-
|
|
19984
|
+
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
|
|
19985
|
+
unit.update.push(createBindingOp(xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
|
|
19797
19986
|
}
|
|
19798
19987
|
const tagName = root instanceof Element ? root.name : root.tagName;
|
|
19799
|
-
return tagName ===
|
|
19988
|
+
return tagName === NG_TEMPLATE_TAG_NAME ? null : tagName;
|
|
19800
19989
|
}
|
|
19801
19990
|
return null;
|
|
19802
19991
|
}
|
|
19803
19992
|
|
|
19804
|
-
// bazel-out/
|
|
19993
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/switch/index.mjs
|
|
19805
19994
|
var USE_TEMPLATE_PIPELINE = false;
|
|
19806
19995
|
|
|
19807
|
-
// bazel-out/
|
|
19996
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/styling_builder.mjs
|
|
19808
19997
|
var IMPORTANT_FLAG = "!important";
|
|
19809
19998
|
var MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;
|
|
19810
19999
|
var StylingBuilder = class {
|
|
@@ -20137,7 +20326,7 @@ function isEmptyExpression(ast) {
|
|
|
20137
20326
|
return ast instanceof EmptyExpr;
|
|
20138
20327
|
}
|
|
20139
20328
|
|
|
20140
|
-
// bazel-out/
|
|
20329
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
20141
20330
|
var HtmlParser = class extends Parser2 {
|
|
20142
20331
|
constructor() {
|
|
20143
20332
|
super(getHtmlTagDefinition);
|
|
@@ -20147,7 +20336,7 @@ var HtmlParser = class extends Parser2 {
|
|
|
20147
20336
|
}
|
|
20148
20337
|
};
|
|
20149
20338
|
|
|
20150
|
-
// bazel-out/
|
|
20339
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
20151
20340
|
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
20152
20341
|
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
20153
20342
|
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
@@ -20213,7 +20402,7 @@ function visitAllWithSiblings(visitor, nodes) {
|
|
|
20213
20402
|
return result;
|
|
20214
20403
|
}
|
|
20215
20404
|
|
|
20216
|
-
// bazel-out/
|
|
20405
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
20217
20406
|
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
20218
20407
|
var ATTRIBUTE_PREFIX = "attr";
|
|
20219
20408
|
var CLASS_PREFIX = "class";
|
|
@@ -20533,7 +20722,7 @@ function moveParseSourceSpan(sourceSpan, absoluteSpan) {
|
|
|
20533
20722
|
return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);
|
|
20534
20723
|
}
|
|
20535
20724
|
|
|
20536
|
-
// bazel-out/
|
|
20725
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
|
|
20537
20726
|
function isStyleUrlResolvable(url) {
|
|
20538
20727
|
if (url == null || url.length === 0 || url[0] == "/")
|
|
20539
20728
|
return false;
|
|
@@ -20542,7 +20731,7 @@ function isStyleUrlResolvable(url) {
|
|
|
20542
20731
|
}
|
|
20543
20732
|
var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
|
|
20544
20733
|
|
|
20545
|
-
// bazel-out/
|
|
20734
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
|
|
20546
20735
|
var NG_CONTENT_SELECT_ATTR = "select";
|
|
20547
20736
|
var LINK_ELEMENT = "link";
|
|
20548
20737
|
var LINK_STYLE_REL_ATTR = "rel";
|
|
@@ -20612,7 +20801,7 @@ function normalizeNgContentSelect(selectAttr) {
|
|
|
20612
20801
|
return selectAttr;
|
|
20613
20802
|
}
|
|
20614
20803
|
|
|
20615
|
-
// bazel-out/
|
|
20804
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
|
|
20616
20805
|
var FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/;
|
|
20617
20806
|
var FOR_LOOP_TRACK_PATTERN = /^track\s+([\S\s]*)/;
|
|
20618
20807
|
var CONDITIONAL_ALIAS_PATTERN = /^as\s+(.*)/;
|
|
@@ -20903,7 +21092,7 @@ function stripOptionalParentheses(param, errors) {
|
|
|
20903
21092
|
return expression.slice(start, end);
|
|
20904
21093
|
}
|
|
20905
21094
|
|
|
20906
|
-
// bazel-out/
|
|
21095
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
|
|
20907
21096
|
var TIME_PATTERN = /^\d+\.?\d*(ms|s)?$/;
|
|
20908
21097
|
var SEPARATOR_PATTERN = /^\s$/;
|
|
20909
21098
|
var COMMA_DELIMITED_SYNTAX = /* @__PURE__ */ new Map([
|
|
@@ -21167,7 +21356,7 @@ function parseDeferredTime(value) {
|
|
|
21167
21356
|
return parseFloat(time) * (units === "s" ? 1e3 : 1);
|
|
21168
21357
|
}
|
|
21169
21358
|
|
|
21170
|
-
// bazel-out/
|
|
21359
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
|
|
21171
21360
|
var PREFETCH_WHEN_PATTERN = /^prefetch\s+when\s/;
|
|
21172
21361
|
var PREFETCH_ON_PATTERN = /^prefetch\s+on\s/;
|
|
21173
21362
|
var MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
|
|
@@ -21302,7 +21491,7 @@ function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
|
21302
21491
|
return { triggers, prefetchTriggers };
|
|
21303
21492
|
}
|
|
21304
21493
|
|
|
21305
|
-
// bazel-out/
|
|
21494
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
|
|
21306
21495
|
var BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;
|
|
21307
21496
|
var KW_BIND_IDX = 1;
|
|
21308
21497
|
var KW_LET_IDX = 2;
|
|
@@ -21733,7 +21922,7 @@ function textContents(node) {
|
|
|
21733
21922
|
}
|
|
21734
21923
|
}
|
|
21735
21924
|
|
|
21736
|
-
// bazel-out/
|
|
21925
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/context.mjs
|
|
21737
21926
|
var TagType;
|
|
21738
21927
|
(function(TagType2) {
|
|
21739
21928
|
TagType2[TagType2["ELEMENT"] = 0] = "ELEMENT";
|
|
@@ -21878,21 +22067,21 @@ function serializePlaceholderValue(value) {
|
|
|
21878
22067
|
}
|
|
21879
22068
|
}
|
|
21880
22069
|
|
|
21881
|
-
// bazel-out/
|
|
22070
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
|
|
21882
22071
|
var NG_CONTENT_SELECT_ATTR2 = "select";
|
|
21883
22072
|
var NG_PROJECT_AS_ATTR_NAME = "ngProjectAs";
|
|
21884
22073
|
var EVENT_BINDING_SCOPE_GLOBALS = /* @__PURE__ */ new Set(["$event"]);
|
|
21885
|
-
var
|
|
21886
|
-
var
|
|
22074
|
+
var NG_TEMPLATE_TAG_NAME2 = "ng-template";
|
|
22075
|
+
var GLOBAL_TARGET_RESOLVERS2 = /* @__PURE__ */ new Map([["window", Identifiers.resolveWindow], ["document", Identifiers.resolveDocument], ["body", Identifiers.resolveBody]]);
|
|
21887
22076
|
var LEADING_TRIVIA_CHARS = [" ", "\n", "\r", " "];
|
|
21888
22077
|
function renderFlagCheckIfStmt(flags, statements) {
|
|
21889
22078
|
return ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(flags), null, false), statements);
|
|
21890
22079
|
}
|
|
21891
22080
|
function prepareEventListenerParameters(eventAst, handlerName = null, scope = null) {
|
|
21892
22081
|
const { type, name, target, phase, handler } = eventAst;
|
|
21893
|
-
if (target && !
|
|
22082
|
+
if (target && !GLOBAL_TARGET_RESOLVERS2.has(target)) {
|
|
21894
22083
|
throw new Error(`Unexpected global target '${target}' defined for '${name}' event.
|
|
21895
|
-
Supported list of global targets: ${Array.from(
|
|
22084
|
+
Supported list of global targets: ${Array.from(GLOBAL_TARGET_RESOLVERS2.keys())}.`);
|
|
21896
22085
|
}
|
|
21897
22086
|
const eventArgumentName = "$event";
|
|
21898
22087
|
const implicitReceiverAccesses = /* @__PURE__ */ new Set();
|
|
@@ -21925,7 +22114,7 @@ function prepareEventListenerParameters(eventAst, handlerName = null, scope = nu
|
|
|
21925
22114
|
if (target) {
|
|
21926
22115
|
params.push(
|
|
21927
22116
|
literal(false),
|
|
21928
|
-
importExpr(
|
|
22117
|
+
importExpr(GLOBAL_TARGET_RESOLVERS2.get(target))
|
|
21929
22118
|
);
|
|
21930
22119
|
}
|
|
21931
22120
|
return params;
|
|
@@ -22471,10 +22660,10 @@ var TemplateDefinitionBuilder = class {
|
|
|
22471
22660
|
var _a2;
|
|
22472
22661
|
const tagNameWithoutNamespace = template2.tagName ? splitNsName(template2.tagName)[1] : template2.tagName;
|
|
22473
22662
|
const contextNameSuffix = template2.tagName ? "_" + sanitizeIdentifier(template2.tagName) : "";
|
|
22474
|
-
const attrsExprs = this.getAttributeExpressions(
|
|
22663
|
+
const attrsExprs = this.getAttributeExpressions(NG_TEMPLATE_TAG_NAME2, template2.attributes, template2.inputs, template2.outputs, void 0, template2.templateAttrs);
|
|
22475
22664
|
const templateIndex = this.createEmbeddedTemplateFn(tagNameWithoutNamespace, template2.children, contextNameSuffix, template2.sourceSpan, template2.variables, attrsExprs, template2.references, template2.i18n);
|
|
22476
22665
|
this.templatePropertyBindings(templateIndex, template2.templateAttrs);
|
|
22477
|
-
if (tagNameWithoutNamespace ===
|
|
22666
|
+
if (tagNameWithoutNamespace === NG_TEMPLATE_TAG_NAME2) {
|
|
22478
22667
|
const [i18nInputs, inputs] = partitionArray(template2.inputs, hasI18nMeta);
|
|
22479
22668
|
if (i18nInputs.length > 0) {
|
|
22480
22669
|
this.i18nAttributesInstruction(templateIndex, i18nInputs, (_a2 = template2.startSourceSpan) != null ? _a2 : template2.sourceSpan);
|
|
@@ -22715,8 +22904,8 @@ var TemplateDefinitionBuilder = class {
|
|
|
22715
22904
|
}
|
|
22716
22905
|
if (root !== null) {
|
|
22717
22906
|
const name = root instanceof Element ? root.name : root.tagName;
|
|
22718
|
-
tagName = name ===
|
|
22719
|
-
attrsExprs = this.getAttributeExpressions(
|
|
22907
|
+
tagName = name === NG_TEMPLATE_TAG_NAME2 ? null : name;
|
|
22908
|
+
attrsExprs = this.getAttributeExpressions(NG_TEMPLATE_TAG_NAME2, root.attributes, root.inputs, []);
|
|
22720
22909
|
}
|
|
22721
22910
|
return { tagName, attrsExprs };
|
|
22722
22911
|
}
|
|
@@ -23315,12 +23504,15 @@ var BindingScope = class {
|
|
|
23315
23504
|
}
|
|
23316
23505
|
};
|
|
23317
23506
|
var TrackByBindingScope = class extends BindingScope {
|
|
23318
|
-
constructor(parentScope,
|
|
23507
|
+
constructor(parentScope, globalOverrides) {
|
|
23319
23508
|
super(parentScope.bindingLevel + 1, parentScope);
|
|
23320
|
-
this.
|
|
23509
|
+
this.globalOverrides = globalOverrides;
|
|
23321
23510
|
this.componentAccessCount = 0;
|
|
23322
23511
|
}
|
|
23323
23512
|
get(name) {
|
|
23513
|
+
if (this.globalOverrides.hasOwnProperty(name)) {
|
|
23514
|
+
return variable(this.globalOverrides[name]);
|
|
23515
|
+
}
|
|
23324
23516
|
let current = this.parent;
|
|
23325
23517
|
while (current) {
|
|
23326
23518
|
if (current.hasLocal(name)) {
|
|
@@ -23328,9 +23520,6 @@ var TrackByBindingScope = class extends BindingScope {
|
|
|
23328
23520
|
}
|
|
23329
23521
|
current = current.parent;
|
|
23330
23522
|
}
|
|
23331
|
-
if (this.globalAliases[name]) {
|
|
23332
|
-
return variable(this.globalAliases[name]);
|
|
23333
|
-
}
|
|
23334
23523
|
this.componentAccessCount++;
|
|
23335
23524
|
return variable("this").prop(name);
|
|
23336
23525
|
}
|
|
@@ -23555,7 +23744,7 @@ function createClosureModeGuard2() {
|
|
|
23555
23744
|
return typeofExpr(variable(NG_I18N_CLOSURE_MODE2)).notIdentical(literal("undefined", STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE2));
|
|
23556
23745
|
}
|
|
23557
23746
|
|
|
23558
|
-
// bazel-out/
|
|
23747
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
|
|
23559
23748
|
var ATTR_REGEX = /attr\.([^\]]+)/;
|
|
23560
23749
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
23561
23750
|
var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
|
|
@@ -23876,6 +24065,7 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
23876
24065
|
}
|
|
23877
24066
|
const hostJob = ingestHostBinding({
|
|
23878
24067
|
componentName: name,
|
|
24068
|
+
componentSelector: selector,
|
|
23879
24069
|
properties: bindings,
|
|
23880
24070
|
events: eventBindings,
|
|
23881
24071
|
attributes: hostBindingsMetadata.attributes
|
|
@@ -24169,7 +24359,7 @@ function createHostDirectivesMappingArray(mapping) {
|
|
|
24169
24359
|
return elements.length > 0 ? literalArr(elements) : null;
|
|
24170
24360
|
}
|
|
24171
24361
|
|
|
24172
|
-
// bazel-out/
|
|
24362
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
|
|
24173
24363
|
var R3TargetBinder = class {
|
|
24174
24364
|
constructor(directiveMatcher) {
|
|
24175
24365
|
this.directiveMatcher = directiveMatcher;
|
|
@@ -24774,11 +24964,11 @@ function extractScopedNodeEntities(rootScope) {
|
|
|
24774
24964
|
return templateEntities;
|
|
24775
24965
|
}
|
|
24776
24966
|
|
|
24777
|
-
// bazel-out/
|
|
24967
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/resource_loader.mjs
|
|
24778
24968
|
var ResourceLoader = class {
|
|
24779
24969
|
};
|
|
24780
24970
|
|
|
24781
|
-
// bazel-out/
|
|
24971
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
|
|
24782
24972
|
var CompilerFacadeImpl = class {
|
|
24783
24973
|
constructor(jitEvaluator = new JitEvaluator()) {
|
|
24784
24974
|
this.jitEvaluator = jitEvaluator;
|
|
@@ -25330,17 +25520,17 @@ function publishFacade(global) {
|
|
|
25330
25520
|
ng.\u0275compilerFacade = new CompilerFacadeImpl();
|
|
25331
25521
|
}
|
|
25332
25522
|
|
|
25333
|
-
// bazel-out/
|
|
25334
|
-
var VERSION2 = new Version("17.0.
|
|
25523
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
|
|
25524
|
+
var VERSION2 = new Version("17.0.8");
|
|
25335
25525
|
|
|
25336
|
-
// bazel-out/
|
|
25526
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
25337
25527
|
var _VisitorMode;
|
|
25338
25528
|
(function(_VisitorMode2) {
|
|
25339
25529
|
_VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
|
|
25340
25530
|
_VisitorMode2[_VisitorMode2["Merge"] = 1] = "Merge";
|
|
25341
25531
|
})(_VisitorMode || (_VisitorMode = {}));
|
|
25342
25532
|
|
|
25343
|
-
// bazel-out/
|
|
25533
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
|
|
25344
25534
|
var XmlTagDefinition = class {
|
|
25345
25535
|
constructor() {
|
|
25346
25536
|
this.closedByParent = false;
|
|
@@ -25362,7 +25552,7 @@ var XmlTagDefinition = class {
|
|
|
25362
25552
|
};
|
|
25363
25553
|
var _TAG_DEFINITION = new XmlTagDefinition();
|
|
25364
25554
|
|
|
25365
|
-
// bazel-out/
|
|
25555
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
|
|
25366
25556
|
var FactoryTarget2;
|
|
25367
25557
|
(function(FactoryTarget3) {
|
|
25368
25558
|
FactoryTarget3[FactoryTarget3["Directive"] = 0] = "Directive";
|
|
@@ -25372,10 +25562,10 @@ var FactoryTarget2;
|
|
|
25372
25562
|
FactoryTarget3[FactoryTarget3["NgModule"] = 4] = "NgModule";
|
|
25373
25563
|
})(FactoryTarget2 || (FactoryTarget2 = {}));
|
|
25374
25564
|
|
|
25375
|
-
// bazel-out/
|
|
25565
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler.mjs
|
|
25376
25566
|
publishFacade(_global);
|
|
25377
25567
|
|
|
25378
|
-
// bazel-out/
|
|
25568
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/util.mjs
|
|
25379
25569
|
var import_path2 = require("path");
|
|
25380
25570
|
var import_typescript3 = __toESM(require("typescript"), 1);
|
|
25381
25571
|
var REPLACEMENTS2 = {
|
|
@@ -25483,7 +25673,7 @@ function forEachClass(sourceFile, callback) {
|
|
|
25483
25673
|
});
|
|
25484
25674
|
}
|
|
25485
25675
|
|
|
25486
|
-
// bazel-out/
|
|
25676
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/index.mjs
|
|
25487
25677
|
function block_template_entities_default() {
|
|
25488
25678
|
return (tree) => __async(this, null, function* () {
|
|
25489
25679
|
const { buildPaths, testPaths } = yield getProjectTsConfigPaths(tree);
|