@angular/core 17.1.0-next.3 → 17.1.0-next.4
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 +509 -0
- package/esm2022/src/application/application_tokens.mjs +121 -0
- package/esm2022/src/application/create_application.mjs +102 -0
- package/esm2022/src/authoring/input.mjs +41 -0
- package/esm2022/src/authoring/input_signal.mjs +10 -0
- package/esm2022/src/authoring/input_type_checking.mjs +9 -0
- package/esm2022/src/authoring.mjs +12 -0
- package/esm2022/src/change_detection/scheduling.mjs +103 -0
- package/esm2022/src/compiler/compiler_facade_interface.mjs +1 -1
- package/esm2022/src/core.mjs +15 -7
- package/esm2022/src/core_private_export.mjs +5 -3
- 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/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/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/instructions/change_detection.mjs +2 -4
- package/esm2022/src/render3/interfaces/definition.mjs +1 -1
- package/esm2022/src/render3/interfaces/public_definitions.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/view_ref.mjs +7 -1
- package/esm2022/src/transfer_state.mjs +2 -2
- package/esm2022/src/util/performance.mjs +2 -2
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/src/zone/ng_zone.mjs +10 -1
- 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 +1343 -1271
- 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 +156 -21
- 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 +674 -500
- package/schematics/migrations/block-template-entities/bundle.js.map +3 -3
- 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 +830 -552
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +3 -3
- package/schematics/ng-generate/standalone-migration/bundle.js +1958 -1532
- 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/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 = {};
|
|
@@ -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
|
};
|
|
@@ -2586,8 +2586,14 @@ var Identifiers = _Identifiers;
|
|
|
2586
2586
|
(() => {
|
|
2587
2587
|
_Identifiers.validateIframeAttribute = { name: "\u0275\u0275validateIframeAttribute", moduleName: CORE };
|
|
2588
2588
|
})();
|
|
2589
|
+
(() => {
|
|
2590
|
+
_Identifiers.InputSignalBrandWriteType = { name: "\u0275INPUT_SIGNAL_BRAND_WRITE_TYPE", moduleName: CORE };
|
|
2591
|
+
})();
|
|
2592
|
+
(() => {
|
|
2593
|
+
_Identifiers.UnwrapDirectiveSignalInputs = { name: "\u0275UnwrapDirectiveSignalInputs", moduleName: CORE };
|
|
2594
|
+
})();
|
|
2589
2595
|
|
|
2590
|
-
// bazel-out/
|
|
2596
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/util.mjs
|
|
2591
2597
|
var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
|
2592
2598
|
function dashCaseToCamelCase(input) {
|
|
2593
2599
|
return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
|
|
@@ -2675,7 +2681,7 @@ function partitionArray(arr, conditionFn) {
|
|
|
2675
2681
|
return [truthy, falsy];
|
|
2676
2682
|
}
|
|
2677
2683
|
|
|
2678
|
-
// bazel-out/
|
|
2684
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/source_map.mjs
|
|
2679
2685
|
var VERSION = 3;
|
|
2680
2686
|
var JS_B64_PREFIX = "# sourceMappingURL=data:application/json;base64,";
|
|
2681
2687
|
var SourceMapGenerator = class {
|
|
@@ -2804,7 +2810,7 @@ function toBase64Digit(value) {
|
|
|
2804
2810
|
return B64_DIGITS[value];
|
|
2805
2811
|
}
|
|
2806
2812
|
|
|
2807
|
-
// bazel-out/
|
|
2813
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_emitter.mjs
|
|
2808
2814
|
var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
|
|
2809
2815
|
var _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
|
|
2810
2816
|
var _INDENT_WITH = " ";
|
|
@@ -3289,7 +3295,7 @@ function _createIndent(count) {
|
|
|
3289
3295
|
return res;
|
|
3290
3296
|
}
|
|
3291
3297
|
|
|
3292
|
-
// bazel-out/
|
|
3298
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/util.mjs
|
|
3293
3299
|
function typeWithParameters(type, numParams) {
|
|
3294
3300
|
if (numParams === 0) {
|
|
3295
3301
|
return expressionType(type);
|
|
@@ -3354,7 +3360,7 @@ function generateForwardRef(expr) {
|
|
|
3354
3360
|
return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr)]);
|
|
3355
3361
|
}
|
|
3356
3362
|
|
|
3357
|
-
// bazel-out/
|
|
3363
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_factory.mjs
|
|
3358
3364
|
var R3FactoryDelegateType;
|
|
3359
3365
|
(function(R3FactoryDelegateType2) {
|
|
3360
3366
|
R3FactoryDelegateType2[R3FactoryDelegateType2["Class"] = 0] = "Class";
|
|
@@ -3499,7 +3505,7 @@ function getInjectFn(target) {
|
|
|
3499
3505
|
}
|
|
3500
3506
|
}
|
|
3501
3507
|
|
|
3502
|
-
// bazel-out/
|
|
3508
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/tags.mjs
|
|
3503
3509
|
var TagContentType;
|
|
3504
3510
|
(function(TagContentType2) {
|
|
3505
3511
|
TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
|
|
@@ -3532,7 +3538,7 @@ function mergeNsAndName(prefix, localName) {
|
|
|
3532
3538
|
return prefix ? `:${prefix}:${localName}` : localName;
|
|
3533
3539
|
}
|
|
3534
3540
|
|
|
3535
|
-
// bazel-out/
|
|
3541
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_ast.mjs
|
|
3536
3542
|
var Comment = class {
|
|
3537
3543
|
constructor(value, sourceSpan) {
|
|
3538
3544
|
this.value = value;
|
|
@@ -3913,7 +3919,7 @@ function visitAll(visitor, nodes) {
|
|
|
3913
3919
|
return result;
|
|
3914
3920
|
}
|
|
3915
3921
|
|
|
3916
|
-
// bazel-out/
|
|
3922
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_ast.mjs
|
|
3917
3923
|
var Message = class {
|
|
3918
3924
|
constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {
|
|
3919
3925
|
this.nodes = nodes;
|
|
@@ -4073,7 +4079,7 @@ var LocalizeMessageStringVisitor = class {
|
|
|
4073
4079
|
}
|
|
4074
4080
|
};
|
|
4075
4081
|
|
|
4076
|
-
// bazel-out/
|
|
4082
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xml_helper.mjs
|
|
4077
4083
|
var _Visitor = class {
|
|
4078
4084
|
visitTag(tag) {
|
|
4079
4085
|
const strAttrs = this._serializeAttributes(tag.attrs);
|
|
@@ -4101,12 +4107,12 @@ ${doctype.dtd}
|
|
|
4101
4107
|
};
|
|
4102
4108
|
var _visitor = new _Visitor();
|
|
4103
4109
|
|
|
4104
|
-
// bazel-out/
|
|
4110
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xmb.mjs
|
|
4105
4111
|
function toPublicName(internalName) {
|
|
4106
4112
|
return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, "_");
|
|
4107
4113
|
}
|
|
4108
4114
|
|
|
4109
|
-
// bazel-out/
|
|
4115
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/util.mjs
|
|
4110
4116
|
var CLOSURE_TRANSLATION_VAR_PREFIX = "MSG_";
|
|
4111
4117
|
var TRANSLATION_VAR_PREFIX = "i18n_";
|
|
4112
4118
|
var I18N_ATTR = "i18n";
|
|
@@ -4208,7 +4214,7 @@ function declareI18nVariable(variable2) {
|
|
|
4208
4214
|
return new DeclareVarStmt(variable2.name, void 0, INFERRED_TYPE, void 0, variable2.sourceSpan);
|
|
4209
4215
|
}
|
|
4210
4216
|
|
|
4211
|
-
// bazel-out/
|
|
4217
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/util.mjs
|
|
4212
4218
|
var UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;
|
|
4213
4219
|
var TEMPORARY_NAME = "_t";
|
|
4214
4220
|
var CONTEXT_NAME = "ctx";
|
|
@@ -4448,7 +4454,7 @@ function getInstructionStatements(instructions) {
|
|
|
4448
4454
|
return statements;
|
|
4449
4455
|
}
|
|
4450
4456
|
|
|
4451
|
-
// bazel-out/
|
|
4457
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/injectable_compiler_2.mjs
|
|
4452
4458
|
function compileInjectable(meta, resolveForwardRefs) {
|
|
4453
4459
|
let result = null;
|
|
4454
4460
|
const factoryMeta = {
|
|
@@ -4533,7 +4539,7 @@ function createFactoryFunction(type) {
|
|
|
4533
4539
|
return arrowFn([new FnParam("t", DYNAMIC_TYPE)], type.prop("\u0275fac").callFn([variable("t")]));
|
|
4534
4540
|
}
|
|
4535
4541
|
|
|
4536
|
-
// bazel-out/
|
|
4542
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/assertions.mjs
|
|
4537
4543
|
var UNUSABLE_INTERPOLATION_REGEXPS = [
|
|
4538
4544
|
/^\s*$/,
|
|
4539
4545
|
/[<>]/,
|
|
@@ -4555,7 +4561,7 @@ function assertInterpolationSymbols(identifier, value) {
|
|
|
4555
4561
|
}
|
|
4556
4562
|
}
|
|
4557
4563
|
|
|
4558
|
-
// bazel-out/
|
|
4564
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/defaults.mjs
|
|
4559
4565
|
var InterpolationConfig = class {
|
|
4560
4566
|
static fromArray(markers) {
|
|
4561
4567
|
if (!markers) {
|
|
@@ -4572,7 +4578,7 @@ var InterpolationConfig = class {
|
|
|
4572
4578
|
var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
|
|
4573
4579
|
var DEFAULT_CONTAINER_BLOCKS = /* @__PURE__ */ new Set(["switch"]);
|
|
4574
4580
|
|
|
4575
|
-
// bazel-out/
|
|
4581
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/chars.mjs
|
|
4576
4582
|
var $EOF = 0;
|
|
4577
4583
|
var $BSPACE = 8;
|
|
4578
4584
|
var $TAB = 9;
|
|
@@ -4654,7 +4660,7 @@ function isQuote(code) {
|
|
|
4654
4660
|
return code === $SQ || code === $DQ || code === $BT;
|
|
4655
4661
|
}
|
|
4656
4662
|
|
|
4657
|
-
// bazel-out/
|
|
4663
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/parse_util.mjs
|
|
4658
4664
|
var ParseLocation = class {
|
|
4659
4665
|
constructor(file, offset, line, col) {
|
|
4660
4666
|
this.file = file;
|
|
@@ -4801,7 +4807,7 @@ function sanitizeIdentifier(name) {
|
|
|
4801
4807
|
return name.replace(/\W/g, "_");
|
|
4802
4808
|
}
|
|
4803
4809
|
|
|
4804
|
-
// bazel-out/
|
|
4810
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_js_emitter.mjs
|
|
4805
4811
|
var makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})';
|
|
4806
4812
|
var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
4807
4813
|
constructor() {
|
|
@@ -4894,7 +4900,7 @@ var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
|
4894
4900
|
}
|
|
4895
4901
|
};
|
|
4896
4902
|
|
|
4897
|
-
// bazel-out/
|
|
4903
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit_trusted_types.mjs
|
|
4898
4904
|
var policy;
|
|
4899
4905
|
function getPolicy() {
|
|
4900
4906
|
if (policy === void 0) {
|
|
@@ -4932,7 +4938,7 @@ function newTrustedFunctionForJIT(...args) {
|
|
|
4932
4938
|
return fn2.bind(_global);
|
|
4933
4939
|
}
|
|
4934
4940
|
|
|
4935
|
-
// bazel-out/
|
|
4941
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit.mjs
|
|
4936
4942
|
var JitEvaluator = class {
|
|
4937
4943
|
evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {
|
|
4938
4944
|
const converter = new JitEmitterVisitor(refResolver);
|
|
@@ -5023,7 +5029,7 @@ function isUseStrictStatement(statement) {
|
|
|
5023
5029
|
return statement.isEquivalent(literal("use strict").toStmt());
|
|
5024
5030
|
}
|
|
5025
5031
|
|
|
5026
|
-
// bazel-out/
|
|
5032
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_injector_compiler.mjs
|
|
5027
5033
|
function compileInjector(meta) {
|
|
5028
5034
|
const definitionMap = new DefinitionMap();
|
|
5029
5035
|
if (meta.providers !== null) {
|
|
@@ -5040,7 +5046,7 @@ function createInjectorType(meta) {
|
|
|
5040
5046
|
return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
|
|
5041
5047
|
}
|
|
5042
5048
|
|
|
5043
|
-
// bazel-out/
|
|
5049
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_jit.mjs
|
|
5044
5050
|
var R3JitReflector = class {
|
|
5045
5051
|
constructor(context) {
|
|
5046
5052
|
this.context = context;
|
|
@@ -5056,7 +5062,7 @@ var R3JitReflector = class {
|
|
|
5056
5062
|
}
|
|
5057
5063
|
};
|
|
5058
5064
|
|
|
5059
|
-
// bazel-out/
|
|
5065
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_module_compiler.mjs
|
|
5060
5066
|
var R3SelectorScopeMode;
|
|
5061
5067
|
(function(R3SelectorScopeMode2) {
|
|
5062
5068
|
R3SelectorScopeMode2[R3SelectorScopeMode2["Inline"] = 0] = "Inline";
|
|
@@ -5197,7 +5203,7 @@ function tupleOfTypes(types) {
|
|
|
5197
5203
|
return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;
|
|
5198
5204
|
}
|
|
5199
5205
|
|
|
5200
|
-
// bazel-out/
|
|
5206
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_pipe_compiler.mjs
|
|
5201
5207
|
function compilePipeFromMetadata(metadata) {
|
|
5202
5208
|
const definitionMapValues = [];
|
|
5203
5209
|
definitionMapValues.push({ key: "name", value: literal(metadata.pipeName), quoted: false });
|
|
@@ -5218,7 +5224,7 @@ function createPipeType(metadata) {
|
|
|
5218
5224
|
]));
|
|
5219
5225
|
}
|
|
5220
5226
|
|
|
5221
|
-
// bazel-out/
|
|
5227
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/api.mjs
|
|
5222
5228
|
var R3TemplateDependencyKind;
|
|
5223
5229
|
(function(R3TemplateDependencyKind2) {
|
|
5224
5230
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["Directive"] = 0] = "Directive";
|
|
@@ -5226,7 +5232,7 @@ var R3TemplateDependencyKind;
|
|
|
5226
5232
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["NgModule"] = 2] = "NgModule";
|
|
5227
5233
|
})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
|
|
5228
5234
|
|
|
5229
|
-
// bazel-out/
|
|
5235
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/ast.mjs
|
|
5230
5236
|
var ParserError = class {
|
|
5231
5237
|
constructor(message, input, errLocation, ctxLocation) {
|
|
5232
5238
|
this.input = input;
|
|
@@ -5892,7 +5898,7 @@ var BoundElementProperty = class {
|
|
|
5892
5898
|
}
|
|
5893
5899
|
};
|
|
5894
5900
|
|
|
5895
|
-
// bazel-out/
|
|
5901
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler_util/expression_converter.mjs
|
|
5896
5902
|
var _EventHandlerVars = class {
|
|
5897
5903
|
};
|
|
5898
5904
|
var EventHandlerVars = _EventHandlerVars;
|
|
@@ -6533,7 +6539,7 @@ var BuiltinFunctionCall = class extends Call {
|
|
|
6533
6539
|
}
|
|
6534
6540
|
};
|
|
6535
6541
|
|
|
6536
|
-
// bazel-out/
|
|
6542
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_security_schema.mjs
|
|
6537
6543
|
var _SECURITY_SCHEMA;
|
|
6538
6544
|
function SECURITY_SCHEMA() {
|
|
6539
6545
|
if (!_SECURITY_SCHEMA) {
|
|
@@ -6591,7 +6597,7 @@ function isIframeSecuritySensitiveAttr(attrName) {
|
|
|
6591
6597
|
return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
|
|
6592
6598
|
}
|
|
6593
6599
|
|
|
6594
|
-
// bazel-out/
|
|
6600
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/shadow_css.mjs
|
|
6595
6601
|
var animationKeywords = /* @__PURE__ */ new Set([
|
|
6596
6602
|
"inherit",
|
|
6597
6603
|
"initial",
|
|
@@ -7062,7 +7068,7 @@ function repeatGroups(groups, multiples) {
|
|
|
7062
7068
|
}
|
|
7063
7069
|
}
|
|
7064
7070
|
|
|
7065
|
-
// bazel-out/
|
|
7071
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/enums.mjs
|
|
7066
7072
|
var OpKind;
|
|
7067
7073
|
(function(OpKind2) {
|
|
7068
7074
|
OpKind2[OpKind2["ListEnd"] = 0] = "ListEnd";
|
|
@@ -7134,10 +7140,11 @@ var ExpressionKind;
|
|
|
7134
7140
|
ExpressionKind2[ExpressionKind2["AssignTemporaryExpr"] = 18] = "AssignTemporaryExpr";
|
|
7135
7141
|
ExpressionKind2[ExpressionKind2["ReadTemporaryExpr"] = 19] = "ReadTemporaryExpr";
|
|
7136
7142
|
ExpressionKind2[ExpressionKind2["SanitizerExpr"] = 20] = "SanitizerExpr";
|
|
7137
|
-
ExpressionKind2[ExpressionKind2["
|
|
7138
|
-
ExpressionKind2[ExpressionKind2["
|
|
7139
|
-
ExpressionKind2[ExpressionKind2["
|
|
7140
|
-
ExpressionKind2[ExpressionKind2["
|
|
7143
|
+
ExpressionKind2[ExpressionKind2["TrustedValueFnExpr"] = 21] = "TrustedValueFnExpr";
|
|
7144
|
+
ExpressionKind2[ExpressionKind2["SlotLiteralExpr"] = 22] = "SlotLiteralExpr";
|
|
7145
|
+
ExpressionKind2[ExpressionKind2["ConditionalCase"] = 23] = "ConditionalCase";
|
|
7146
|
+
ExpressionKind2[ExpressionKind2["DerivedRepeaterVar"] = 24] = "DerivedRepeaterVar";
|
|
7147
|
+
ExpressionKind2[ExpressionKind2["ConstCollected"] = 25] = "ConstCollected";
|
|
7141
7148
|
})(ExpressionKind || (ExpressionKind = {}));
|
|
7142
7149
|
var VariableFlags;
|
|
7143
7150
|
(function(VariableFlags2) {
|
|
@@ -7156,15 +7163,6 @@ var CompatibilityMode;
|
|
|
7156
7163
|
CompatibilityMode2[CompatibilityMode2["Normal"] = 0] = "Normal";
|
|
7157
7164
|
CompatibilityMode2[CompatibilityMode2["TemplateDefinitionBuilder"] = 1] = "TemplateDefinitionBuilder";
|
|
7158
7165
|
})(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
7166
|
var DeferSecondaryKind;
|
|
7169
7167
|
(function(DeferSecondaryKind2) {
|
|
7170
7168
|
DeferSecondaryKind2[DeferSecondaryKind2["Loading"] = 0] = "Loading";
|
|
@@ -7235,7 +7233,7 @@ var TemplateKind;
|
|
|
7235
7233
|
TemplateKind2[TemplateKind2["Block"] = 2] = "Block";
|
|
7236
7234
|
})(TemplateKind || (TemplateKind = {}));
|
|
7237
7235
|
|
|
7238
|
-
// bazel-out/
|
|
7236
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
|
|
7239
7237
|
var ConsumesSlot = Symbol("ConsumesSlot");
|
|
7240
7238
|
var DependsOnSlotContext = Symbol("DependsOnSlotContext");
|
|
7241
7239
|
var ConsumesVarsTrait = Symbol("ConsumesVars");
|
|
@@ -7267,7 +7265,7 @@ function hasUsesVarOffsetTrait(expr) {
|
|
|
7267
7265
|
return expr[UsesVarOffset] === true;
|
|
7268
7266
|
}
|
|
7269
7267
|
|
|
7270
|
-
// bazel-out/
|
|
7268
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
|
|
7271
7269
|
function createStatementOp(statement) {
|
|
7272
7270
|
return __spreadValues({
|
|
7273
7271
|
kind: OpKind.Statement,
|
|
@@ -7289,7 +7287,7 @@ var NEW_OP = {
|
|
|
7289
7287
|
next: null
|
|
7290
7288
|
};
|
|
7291
7289
|
|
|
7292
|
-
// bazel-out/
|
|
7290
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
|
|
7293
7291
|
function createInterpolateTextOp(xref, interpolation, sourceSpan) {
|
|
7294
7292
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7295
7293
|
kind: OpKind.InterpolateText,
|
|
@@ -7308,7 +7306,7 @@ var Interpolation2 = class {
|
|
|
7308
7306
|
}
|
|
7309
7307
|
}
|
|
7310
7308
|
};
|
|
7311
|
-
function createBindingOp(target, kind, name, expression, unit, securityContext, isTextAttribute,
|
|
7309
|
+
function createBindingOp(target, kind, name, expression, unit, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
|
|
7312
7310
|
return __spreadValues({
|
|
7313
7311
|
kind: OpKind.Binding,
|
|
7314
7312
|
bindingKind: kind,
|
|
@@ -7318,12 +7316,14 @@ function createBindingOp(target, kind, name, expression, unit, securityContext,
|
|
|
7318
7316
|
unit,
|
|
7319
7317
|
securityContext,
|
|
7320
7318
|
isTextAttribute,
|
|
7321
|
-
|
|
7322
|
-
|
|
7319
|
+
isStructuralTemplateAttribute,
|
|
7320
|
+
templateKind,
|
|
7321
|
+
i18nContext: null,
|
|
7322
|
+
i18nMessage,
|
|
7323
7323
|
sourceSpan
|
|
7324
7324
|
}, NEW_OP);
|
|
7325
7325
|
}
|
|
7326
|
-
function createPropertyOp(target, name, expression, isAnimationTrigger, securityContext,
|
|
7326
|
+
function createPropertyOp(target, name, expression, isAnimationTrigger, securityContext, isStructuralTemplateAttribute, templateKind, i18nContext, i18nMessage, sourceSpan) {
|
|
7327
7327
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7328
7328
|
kind: OpKind.Property,
|
|
7329
7329
|
target,
|
|
@@ -7332,8 +7332,10 @@ function createPropertyOp(target, name, expression, isAnimationTrigger, security
|
|
|
7332
7332
|
isAnimationTrigger,
|
|
7333
7333
|
securityContext,
|
|
7334
7334
|
sanitizer: null,
|
|
7335
|
-
|
|
7335
|
+
isStructuralTemplateAttribute,
|
|
7336
|
+
templateKind,
|
|
7336
7337
|
i18nContext,
|
|
7338
|
+
i18nMessage,
|
|
7337
7339
|
sourceSpan
|
|
7338
7340
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7339
7341
|
}
|
|
@@ -7372,7 +7374,7 @@ function createClassMapOp(xref, expression, sourceSpan) {
|
|
|
7372
7374
|
sourceSpan
|
|
7373
7375
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7374
7376
|
}
|
|
7375
|
-
function createAttributeOp(target, name, expression, securityContext, isTextAttribute,
|
|
7377
|
+
function createAttributeOp(target, name, expression, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
|
|
7376
7378
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7377
7379
|
kind: OpKind.Attribute,
|
|
7378
7380
|
target,
|
|
@@ -7381,8 +7383,10 @@ function createAttributeOp(target, name, expression, securityContext, isTextAttr
|
|
|
7381
7383
|
securityContext,
|
|
7382
7384
|
sanitizer: null,
|
|
7383
7385
|
isTextAttribute,
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
+
isStructuralTemplateAttribute,
|
|
7387
|
+
templateKind,
|
|
7388
|
+
i18nContext: null,
|
|
7389
|
+
i18nMessage,
|
|
7386
7390
|
sourceSpan
|
|
7387
7391
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7388
7392
|
}
|
|
@@ -7447,7 +7451,7 @@ function createI18nApplyOp(owner, handle, sourceSpan) {
|
|
|
7447
7451
|
}, NEW_OP);
|
|
7448
7452
|
}
|
|
7449
7453
|
|
|
7450
|
-
// bazel-out/
|
|
7454
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
|
|
7451
7455
|
var _a;
|
|
7452
7456
|
var _b;
|
|
7453
7457
|
var _c;
|
|
@@ -7978,26 +7982,6 @@ var ReadTemporaryExpr = class extends ExpressionBase {
|
|
|
7978
7982
|
return r;
|
|
7979
7983
|
}
|
|
7980
7984
|
};
|
|
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
7985
|
var SlotLiteralExpr = class extends ExpressionBase {
|
|
8002
7986
|
constructor(slot) {
|
|
8003
7987
|
super();
|
|
@@ -8116,7 +8100,6 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8116
8100
|
case OpKind.ClassProp:
|
|
8117
8101
|
case OpKind.ClassMap:
|
|
8118
8102
|
case OpKind.Binding:
|
|
8119
|
-
case OpKind.HostProperty:
|
|
8120
8103
|
if (op.expression instanceof Interpolation2) {
|
|
8121
8104
|
transformExpressionsInInterpolation(op.expression, transform2, flags);
|
|
8122
8105
|
} else {
|
|
@@ -8124,6 +8107,7 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8124
8107
|
}
|
|
8125
8108
|
break;
|
|
8126
8109
|
case OpKind.Property:
|
|
8110
|
+
case OpKind.HostProperty:
|
|
8127
8111
|
case OpKind.Attribute:
|
|
8128
8112
|
if (op.expression instanceof Interpolation2) {
|
|
8129
8113
|
transformExpressionsInInterpolation(op.expression, transform2, flags);
|
|
@@ -8165,6 +8149,7 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8165
8149
|
break;
|
|
8166
8150
|
case OpKind.ExtractedAttribute:
|
|
8167
8151
|
op.expression = op.expression && transformExpressionsInExpression(op.expression, transform2, flags);
|
|
8152
|
+
op.trustedValueFn = op.trustedValueFn && transformExpressionsInExpression(op.trustedValueFn, transform2, flags);
|
|
8168
8153
|
break;
|
|
8169
8154
|
case OpKind.RepeaterCreate:
|
|
8170
8155
|
op.track = transformExpressionsInExpression(op.track, transform2, flags);
|
|
@@ -8272,6 +8257,10 @@ function transformExpressionsInExpression(expr, transform2, flags) {
|
|
|
8272
8257
|
}
|
|
8273
8258
|
} else if (expr instanceof NotExpr) {
|
|
8274
8259
|
expr.condition = transformExpressionsInExpression(expr.condition, transform2, flags);
|
|
8260
|
+
} else if (expr instanceof TaggedTemplateExpr) {
|
|
8261
|
+
expr.tag = transformExpressionsInExpression(expr.tag, transform2, flags);
|
|
8262
|
+
expr.template.expressions = expr.template.expressions.map((e) => transformExpressionsInExpression(e, transform2, flags));
|
|
8263
|
+
} else if (expr instanceof WrappedNodeExpr) {
|
|
8275
8264
|
} else if (expr instanceof ReadVarExpr || expr instanceof ExternalExpr || expr instanceof LiteralExpr) {
|
|
8276
8265
|
} else {
|
|
8277
8266
|
throw new Error(`Unhandled expression kind: ${expr.constructor.name}`);
|
|
@@ -8303,7 +8292,7 @@ function isStringLiteral(expr) {
|
|
|
8303
8292
|
return expr instanceof LiteralExpr && typeof expr.value === "string";
|
|
8304
8293
|
}
|
|
8305
8294
|
|
|
8306
|
-
// bazel-out/
|
|
8295
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
|
|
8307
8296
|
var _OpList = class {
|
|
8308
8297
|
constructor() {
|
|
8309
8298
|
this.debugListId = _OpList.nextListId++;
|
|
@@ -8494,14 +8483,14 @@ var OpList = _OpList;
|
|
|
8494
8483
|
_OpList.nextListId = 0;
|
|
8495
8484
|
})();
|
|
8496
8485
|
|
|
8497
|
-
// bazel-out/
|
|
8486
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/handle.mjs
|
|
8498
8487
|
var SlotHandle = class {
|
|
8499
8488
|
constructor() {
|
|
8500
8489
|
this.slot = null;
|
|
8501
8490
|
}
|
|
8502
8491
|
};
|
|
8503
8492
|
|
|
8504
|
-
// bazel-out/
|
|
8493
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
|
|
8505
8494
|
var elementContainerOpKinds = /* @__PURE__ */ new Set([
|
|
8506
8495
|
OpKind.Element,
|
|
8507
8496
|
OpKind.ElementStart,
|
|
@@ -8545,7 +8534,7 @@ function createTemplateOp(xref, templateKind, tag, functionNameSuffix, namespace
|
|
|
8545
8534
|
sourceSpan
|
|
8546
8535
|
}, TRAIT_CONSUMES_SLOT), NEW_OP);
|
|
8547
8536
|
}
|
|
8548
|
-
function createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, sourceSpan) {
|
|
8537
|
+
function createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, i18nPlaceholder, emptyI18nPlaceholder, sourceSpan) {
|
|
8549
8538
|
return __spreadProps(__spreadValues(__spreadValues({
|
|
8550
8539
|
kind: OpKind.RepeaterCreate,
|
|
8551
8540
|
attributes: null,
|
|
@@ -8563,6 +8552,8 @@ function createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, so
|
|
|
8563
8552
|
vars: null,
|
|
8564
8553
|
varNames,
|
|
8565
8554
|
usesComponentInstance: false,
|
|
8555
|
+
i18nPlaceholder,
|
|
8556
|
+
emptyI18nPlaceholder,
|
|
8566
8557
|
sourceSpan
|
|
8567
8558
|
}, TRAIT_CONSUMES_SLOT), NEW_OP), {
|
|
8568
8559
|
numSlotsUsed: emptyView === null ? 2 : 3
|
|
@@ -8596,7 +8587,9 @@ function createTextOp(xref, initialValue, sourceSpan) {
|
|
|
8596
8587
|
sourceSpan
|
|
8597
8588
|
}, TRAIT_CONSUMES_SLOT), NEW_OP);
|
|
8598
8589
|
}
|
|
8599
|
-
function createListenerOp(target, targetSlot, name, tag, animationPhase, hostListener, sourceSpan) {
|
|
8590
|
+
function createListenerOp(target, targetSlot, name, tag, handlerOps, animationPhase, eventTarget, hostListener, sourceSpan) {
|
|
8591
|
+
const handlerList = new OpList();
|
|
8592
|
+
handlerList.push(handlerOps);
|
|
8600
8593
|
return __spreadValues({
|
|
8601
8594
|
kind: OpKind.Listener,
|
|
8602
8595
|
target,
|
|
@@ -8604,11 +8597,12 @@ function createListenerOp(target, targetSlot, name, tag, animationPhase, hostLis
|
|
|
8604
8597
|
tag,
|
|
8605
8598
|
hostListener,
|
|
8606
8599
|
name,
|
|
8607
|
-
handlerOps:
|
|
8600
|
+
handlerOps: handlerList,
|
|
8608
8601
|
handlerFnName: null,
|
|
8609
8602
|
consumesDollarEvent: false,
|
|
8610
8603
|
isAnimationListener: animationPhase !== null,
|
|
8611
8604
|
animationPhase,
|
|
8605
|
+
eventTarget,
|
|
8612
8606
|
sourceSpan
|
|
8613
8607
|
}, NEW_OP);
|
|
8614
8608
|
}
|
|
@@ -8645,14 +8639,17 @@ function createProjectionOp(xref, selector, i18nPlaceholder, attributes, sourceS
|
|
|
8645
8639
|
sourceSpan
|
|
8646
8640
|
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8647
8641
|
}
|
|
8648
|
-
function createExtractedAttributeOp(target, bindingKind, name, expression, i18nContext) {
|
|
8642
|
+
function createExtractedAttributeOp(target, bindingKind, name, expression, i18nContext, i18nMessage, securityContext) {
|
|
8649
8643
|
return __spreadValues({
|
|
8650
8644
|
kind: OpKind.ExtractedAttribute,
|
|
8651
8645
|
target,
|
|
8652
8646
|
bindingKind,
|
|
8653
8647
|
name,
|
|
8654
8648
|
expression,
|
|
8655
|
-
i18nContext
|
|
8649
|
+
i18nContext,
|
|
8650
|
+
i18nMessage,
|
|
8651
|
+
securityContext,
|
|
8652
|
+
trustedValueFn: null
|
|
8656
8653
|
}, NEW_OP);
|
|
8657
8654
|
}
|
|
8658
8655
|
function createDeferOp(xref, main, mainSlot, metadata, sourceSpan) {
|
|
@@ -8762,22 +8759,24 @@ function createI18nAttributesOp(xref, handle, target) {
|
|
|
8762
8759
|
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8763
8760
|
}
|
|
8764
8761
|
|
|
8765
|
-
// bazel-out/
|
|
8766
|
-
function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext, sourceSpan) {
|
|
8762
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
|
|
8763
|
+
function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext, securityContext, sourceSpan) {
|
|
8767
8764
|
return __spreadValues(__spreadValues({
|
|
8768
8765
|
kind: OpKind.HostProperty,
|
|
8769
8766
|
name,
|
|
8770
8767
|
expression,
|
|
8771
8768
|
isAnimationTrigger,
|
|
8772
8769
|
i18nContext,
|
|
8770
|
+
securityContext,
|
|
8771
|
+
sanitizer: null,
|
|
8773
8772
|
sourceSpan
|
|
8774
8773
|
}, TRAIT_CONSUMES_VARS), NEW_OP);
|
|
8775
8774
|
}
|
|
8776
8775
|
|
|
8777
|
-
// bazel-out/
|
|
8776
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
|
|
8778
8777
|
var CTX_REF = "CTX_REF_MARKER";
|
|
8779
8778
|
|
|
8780
|
-
// bazel-out/
|
|
8779
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
|
|
8781
8780
|
var CompilationJobKind;
|
|
8782
8781
|
(function(CompilationJobKind2) {
|
|
8783
8782
|
CompilationJobKind2[CompilationJobKind2["Tmpl"] = 0] = "Tmpl";
|
|
@@ -8884,7 +8883,7 @@ var HostBindingCompilationUnit = class extends CompilationUnit {
|
|
|
8884
8883
|
}
|
|
8885
8884
|
};
|
|
8886
8885
|
|
|
8887
|
-
// bazel-out/
|
|
8886
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
|
|
8888
8887
|
function deleteAnyCasts(job) {
|
|
8889
8888
|
for (const unit of job.units) {
|
|
8890
8889
|
for (const op of unit.ops()) {
|
|
@@ -8902,7 +8901,7 @@ function removeAnys(e) {
|
|
|
8902
8901
|
return e;
|
|
8903
8902
|
}
|
|
8904
8903
|
|
|
8905
|
-
// bazel-out/
|
|
8904
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
|
|
8906
8905
|
function applyI18nExpressions(job) {
|
|
8907
8906
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
8908
8907
|
for (const unit of job.units) {
|
|
@@ -8945,62 +8944,52 @@ function needsApplication(i18nContexts, op) {
|
|
|
8945
8944
|
return false;
|
|
8946
8945
|
}
|
|
8947
8946
|
|
|
8948
|
-
// bazel-out/
|
|
8947
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs
|
|
8949
8948
|
function assignI18nSlotDependencies(job) {
|
|
8950
|
-
const i18nLastSlotConsumers = /* @__PURE__ */ new Map();
|
|
8951
|
-
let lastSlotConsumer = null;
|
|
8952
|
-
let currentI18nOp = null;
|
|
8953
8949
|
for (const unit of job.units) {
|
|
8954
|
-
|
|
8955
|
-
|
|
8956
|
-
|
|
8950
|
+
let updateOp = unit.update.head;
|
|
8951
|
+
let i18nExpressionsInProgress = [];
|
|
8952
|
+
let state = null;
|
|
8953
|
+
for (const createOp of unit.create) {
|
|
8954
|
+
if (createOp.kind === OpKind.I18nStart) {
|
|
8955
|
+
state = {
|
|
8956
|
+
blockXref: createOp.xref,
|
|
8957
|
+
lastSlotConsumer: createOp.xref
|
|
8958
|
+
};
|
|
8959
|
+
} else if (createOp.kind === OpKind.I18nEnd) {
|
|
8960
|
+
for (const op of i18nExpressionsInProgress) {
|
|
8961
|
+
op.target = state.lastSlotConsumer;
|
|
8962
|
+
OpList.insertBefore(op, updateOp);
|
|
8963
|
+
}
|
|
8964
|
+
i18nExpressionsInProgress.length = 0;
|
|
8965
|
+
state = null;
|
|
8957
8966
|
}
|
|
8958
|
-
|
|
8959
|
-
|
|
8960
|
-
|
|
8961
|
-
|
|
8962
|
-
|
|
8963
|
-
if (
|
|
8964
|
-
|
|
8967
|
+
if (hasConsumesSlotTrait(createOp)) {
|
|
8968
|
+
if (state !== null) {
|
|
8969
|
+
state.lastSlotConsumer = createOp.xref;
|
|
8970
|
+
}
|
|
8971
|
+
while (true) {
|
|
8972
|
+
if (updateOp.next === null) {
|
|
8973
|
+
break;
|
|
8965
8974
|
}
|
|
8966
|
-
if (
|
|
8967
|
-
|
|
8975
|
+
if (state !== null && updateOp.kind === OpKind.I18nExpression && updateOp.usage === I18nExpressionFor.I18nText && updateOp.i18nOwner === state.blockXref) {
|
|
8976
|
+
const opToRemove = updateOp;
|
|
8977
|
+
updateOp = updateOp.next;
|
|
8978
|
+
OpList.remove(opToRemove);
|
|
8979
|
+
i18nExpressionsInProgress.push(opToRemove);
|
|
8980
|
+
continue;
|
|
8968
8981
|
}
|
|
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");
|
|
8982
|
+
if (hasDependsOnSlotContextTrait(updateOp) && updateOp.target !== createOp.xref) {
|
|
8983
|
+
break;
|
|
8984
|
+
}
|
|
8985
|
+
updateOp = updateOp.next;
|
|
8992
8986
|
}
|
|
8993
|
-
op.target = target;
|
|
8994
|
-
moveAfterTarget = op.target;
|
|
8995
8987
|
}
|
|
8996
8988
|
}
|
|
8997
|
-
if (moveAfterTarget !== null) {
|
|
8998
|
-
unit.update.push(opsToMove);
|
|
8999
|
-
}
|
|
9000
8989
|
}
|
|
9001
8990
|
}
|
|
9002
8991
|
|
|
9003
|
-
// bazel-out/
|
|
8992
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
|
|
9004
8993
|
function createOpXrefMap(unit) {
|
|
9005
8994
|
const map = /* @__PURE__ */ new Map();
|
|
9006
8995
|
for (const op of unit.create) {
|
|
@@ -9012,7 +9001,7 @@ function createOpXrefMap(unit) {
|
|
|
9012
9001
|
return map;
|
|
9013
9002
|
}
|
|
9014
9003
|
|
|
9015
|
-
// bazel-out/
|
|
9004
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
|
|
9016
9005
|
function extractAttributes(job) {
|
|
9017
9006
|
for (const unit of job.units) {
|
|
9018
9007
|
const elements = createOpXrefMap(unit);
|
|
@@ -9024,25 +9013,52 @@ function extractAttributes(job) {
|
|
|
9024
9013
|
case OpKind.Property:
|
|
9025
9014
|
if (!op.isAnimationTrigger) {
|
|
9026
9015
|
let bindingKind;
|
|
9027
|
-
if (op.
|
|
9016
|
+
if (op.i18nMessage !== null && op.templateKind === null) {
|
|
9028
9017
|
bindingKind = BindingKind.I18n;
|
|
9029
|
-
} else if (op.
|
|
9018
|
+
} else if (op.isStructuralTemplateAttribute) {
|
|
9030
9019
|
bindingKind = BindingKind.Template;
|
|
9031
9020
|
} else {
|
|
9032
9021
|
bindingKind = BindingKind.Property;
|
|
9033
9022
|
}
|
|
9034
|
-
OpList.insertBefore(
|
|
9023
|
+
OpList.insertBefore(
|
|
9024
|
+
createExtractedAttributeOp(
|
|
9025
|
+
op.target,
|
|
9026
|
+
bindingKind,
|
|
9027
|
+
op.name,
|
|
9028
|
+
null,
|
|
9029
|
+
null,
|
|
9030
|
+
null,
|
|
9031
|
+
op.securityContext
|
|
9032
|
+
),
|
|
9033
|
+
lookupElement(elements, op.target)
|
|
9034
|
+
);
|
|
9035
9035
|
}
|
|
9036
9036
|
break;
|
|
9037
9037
|
case OpKind.StyleProp:
|
|
9038
9038
|
case OpKind.ClassProp:
|
|
9039
9039
|
if (unit.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder && op.expression instanceof EmptyExpr2) {
|
|
9040
|
-
OpList.insertBefore(createExtractedAttributeOp(
|
|
9040
|
+
OpList.insertBefore(createExtractedAttributeOp(
|
|
9041
|
+
op.target,
|
|
9042
|
+
BindingKind.Property,
|
|
9043
|
+
op.name,
|
|
9044
|
+
null,
|
|
9045
|
+
null,
|
|
9046
|
+
null,
|
|
9047
|
+
SecurityContext.STYLE
|
|
9048
|
+
), lookupElement(elements, op.target));
|
|
9041
9049
|
}
|
|
9042
9050
|
break;
|
|
9043
9051
|
case OpKind.Listener:
|
|
9044
9052
|
if (!op.isAnimationListener) {
|
|
9045
|
-
const extractedAttributeOp = createExtractedAttributeOp(
|
|
9053
|
+
const extractedAttributeOp = createExtractedAttributeOp(
|
|
9054
|
+
op.target,
|
|
9055
|
+
BindingKind.Property,
|
|
9056
|
+
op.name,
|
|
9057
|
+
null,
|
|
9058
|
+
null,
|
|
9059
|
+
null,
|
|
9060
|
+
SecurityContext.NONE
|
|
9061
|
+
);
|
|
9046
9062
|
if (job.kind === CompilationJobKind.Host) {
|
|
9047
9063
|
unit.create.push(extractedAttributeOp);
|
|
9048
9064
|
} else {
|
|
@@ -9076,7 +9092,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
9076
9092
|
}
|
|
9077
9093
|
}
|
|
9078
9094
|
if (extractable) {
|
|
9079
|
-
const extractedAttributeOp = createExtractedAttributeOp(op.target, op.
|
|
9095
|
+
const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplateAttribute ? BindingKind.Template : BindingKind.Attribute, op.name, op.expression, op.i18nContext, op.i18nMessage, op.securityContext);
|
|
9080
9096
|
if (unit.job.kind === CompilationJobKind.Host) {
|
|
9081
9097
|
unit.create.push(extractedAttributeOp);
|
|
9082
9098
|
} else {
|
|
@@ -9087,7 +9103,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
9087
9103
|
}
|
|
9088
9104
|
}
|
|
9089
9105
|
|
|
9090
|
-
// bazel-out/
|
|
9106
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
|
|
9091
9107
|
function lookupElement2(elements, xref) {
|
|
9092
9108
|
const el = elements.get(xref);
|
|
9093
9109
|
if (el === void 0) {
|
|
@@ -9117,15 +9133,15 @@ function specializeBindings(job) {
|
|
|
9117
9133
|
const target = lookupElement2(elements, op.target);
|
|
9118
9134
|
target.nonBindable = true;
|
|
9119
9135
|
} else {
|
|
9120
|
-
OpList.replace(op, createAttributeOp(op.target, op.name, op.expression, op.securityContext, op.isTextAttribute, op.
|
|
9136
|
+
OpList.replace(op, createAttributeOp(op.target, op.name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));
|
|
9121
9137
|
}
|
|
9122
9138
|
break;
|
|
9123
9139
|
case BindingKind.Property:
|
|
9124
9140
|
case BindingKind.Animation:
|
|
9125
9141
|
if (job.kind === CompilationJobKind.Host) {
|
|
9126
|
-
OpList.replace(op, createHostPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.Animation, op.i18nContext, op.sourceSpan));
|
|
9142
|
+
OpList.replace(op, createHostPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.Animation, op.i18nContext, op.securityContext, op.sourceSpan));
|
|
9127
9143
|
} else {
|
|
9128
|
-
OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.Animation, op.securityContext, op.
|
|
9144
|
+
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
9145
|
}
|
|
9130
9146
|
break;
|
|
9131
9147
|
case BindingKind.I18n:
|
|
@@ -9137,7 +9153,7 @@ function specializeBindings(job) {
|
|
|
9137
9153
|
}
|
|
9138
9154
|
}
|
|
9139
9155
|
|
|
9140
|
-
// bazel-out/
|
|
9156
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
|
|
9141
9157
|
var CHAINABLE = /* @__PURE__ */ new Set([
|
|
9142
9158
|
Identifiers.attribute,
|
|
9143
9159
|
Identifiers.classProp,
|
|
@@ -9203,7 +9219,7 @@ function chainOperationsInList(opList) {
|
|
|
9203
9219
|
}
|
|
9204
9220
|
}
|
|
9205
9221
|
|
|
9206
|
-
// bazel-out/
|
|
9222
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/collapse_singleton_interpolations.mjs
|
|
9207
9223
|
function collapseSingletonInterpolations(job) {
|
|
9208
9224
|
for (const unit of job.units) {
|
|
9209
9225
|
for (const op of unit.update) {
|
|
@@ -9215,7 +9231,7 @@ function collapseSingletonInterpolations(job) {
|
|
|
9215
9231
|
}
|
|
9216
9232
|
}
|
|
9217
9233
|
|
|
9218
|
-
// bazel-out/
|
|
9234
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
|
|
9219
9235
|
function generateConditionalExpressions(job) {
|
|
9220
9236
|
for (const unit of job.units) {
|
|
9221
9237
|
for (const op of unit.ops()) {
|
|
@@ -9252,7 +9268,7 @@ function generateConditionalExpressions(job) {
|
|
|
9252
9268
|
}
|
|
9253
9269
|
}
|
|
9254
9270
|
|
|
9255
|
-
// bazel-out/
|
|
9271
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
9256
9272
|
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
9257
9273
|
["&&", BinaryOperator.And],
|
|
9258
9274
|
[">", BinaryOperator.Bigger],
|
|
@@ -9302,7 +9318,7 @@ function literalOrArrayLiteral(value) {
|
|
|
9302
9318
|
return literal(value);
|
|
9303
9319
|
}
|
|
9304
9320
|
|
|
9305
|
-
// bazel-out/
|
|
9321
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
|
|
9306
9322
|
function collectElementConsts(job) {
|
|
9307
9323
|
const allElementAttributes = /* @__PURE__ */ new Map();
|
|
9308
9324
|
for (const unit of job.units) {
|
|
@@ -9310,7 +9326,7 @@ function collectElementConsts(job) {
|
|
|
9310
9326
|
if (op.kind === OpKind.ExtractedAttribute) {
|
|
9311
9327
|
const attributes = allElementAttributes.get(op.target) || new ElementAttributes();
|
|
9312
9328
|
allElementAttributes.set(op.target, attributes);
|
|
9313
|
-
attributes.add(op.bindingKind, op.name, op.expression);
|
|
9329
|
+
attributes.add(op.bindingKind, op.name, op.expression, op.trustedValueFn);
|
|
9314
9330
|
OpList.remove(op);
|
|
9315
9331
|
}
|
|
9316
9332
|
}
|
|
@@ -9372,7 +9388,7 @@ var ElementAttributes = class {
|
|
|
9372
9388
|
var _a2;
|
|
9373
9389
|
return (_a2 = this.byKind.get(BindingKind.I18n)) != null ? _a2 : FLYWEIGHT_ARRAY;
|
|
9374
9390
|
}
|
|
9375
|
-
add(kind, name, value) {
|
|
9391
|
+
add(kind, name, value, trustedValueFn) {
|
|
9376
9392
|
var _a2;
|
|
9377
9393
|
if (this.known.has(name)) {
|
|
9378
9394
|
return;
|
|
@@ -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) {
|
|
@@ -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) {
|
|
@@ -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) {
|
|
@@ -9505,11 +9528,12 @@ function createDeferDepsFns(job) {
|
|
|
9505
9528
|
}
|
|
9506
9529
|
}
|
|
9507
9530
|
|
|
9508
|
-
// bazel-out/
|
|
9531
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_i18n_contexts.mjs
|
|
9509
9532
|
function createI18nContexts(job) {
|
|
9510
9533
|
const rootContexts = /* @__PURE__ */ new Map();
|
|
9511
9534
|
let currentI18nOp = null;
|
|
9512
9535
|
let xref;
|
|
9536
|
+
const messageToContext = /* @__PURE__ */ new Map();
|
|
9513
9537
|
for (const unit of job.units) {
|
|
9514
9538
|
for (const op of unit.create) {
|
|
9515
9539
|
switch (op.kind) {
|
|
@@ -9539,6 +9563,24 @@ function createI18nContexts(job) {
|
|
|
9539
9563
|
break;
|
|
9540
9564
|
}
|
|
9541
9565
|
}
|
|
9566
|
+
for (const op of unit.ops()) {
|
|
9567
|
+
switch (op.kind) {
|
|
9568
|
+
case OpKind.Binding:
|
|
9569
|
+
case OpKind.Property:
|
|
9570
|
+
case OpKind.Attribute:
|
|
9571
|
+
case OpKind.ExtractedAttribute:
|
|
9572
|
+
if (!op.i18nMessage) {
|
|
9573
|
+
continue;
|
|
9574
|
+
}
|
|
9575
|
+
if (!messageToContext.has(op.i18nMessage)) {
|
|
9576
|
+
const i18nContext = job.allocateXrefId();
|
|
9577
|
+
unit.create.push(createI18nContextOp(I18nContextKind.Attr, i18nContext, null, op.i18nMessage, null));
|
|
9578
|
+
messageToContext.set(op.i18nMessage, i18nContext);
|
|
9579
|
+
}
|
|
9580
|
+
op.i18nContext = messageToContext.get(op.i18nMessage);
|
|
9581
|
+
break;
|
|
9582
|
+
}
|
|
9583
|
+
}
|
|
9542
9584
|
}
|
|
9543
9585
|
for (const unit of job.units) {
|
|
9544
9586
|
for (const op of unit.create) {
|
|
@@ -9549,7 +9591,7 @@ function createI18nContexts(job) {
|
|
|
9549
9591
|
}
|
|
9550
9592
|
}
|
|
9551
9593
|
|
|
9552
|
-
// bazel-out/
|
|
9594
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_configs.mjs
|
|
9553
9595
|
function configureDeferInstructions(job) {
|
|
9554
9596
|
for (const unit of job.units) {
|
|
9555
9597
|
for (const op of unit.create) {
|
|
@@ -9566,7 +9608,7 @@ function configureDeferInstructions(job) {
|
|
|
9566
9608
|
}
|
|
9567
9609
|
}
|
|
9568
9610
|
|
|
9569
|
-
// bazel-out/
|
|
9611
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_resolve_targets.mjs
|
|
9570
9612
|
function resolveDeferTargetNames(job) {
|
|
9571
9613
|
const scopes = /* @__PURE__ */ new Map();
|
|
9572
9614
|
function getScopeForView2(view) {
|
|
@@ -9660,7 +9702,7 @@ var Scope = class {
|
|
|
9660
9702
|
}
|
|
9661
9703
|
};
|
|
9662
9704
|
|
|
9663
|
-
// bazel-out/
|
|
9705
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
|
|
9664
9706
|
var REPLACEMENTS = /* @__PURE__ */ new Map([
|
|
9665
9707
|
[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
|
|
9666
9708
|
[OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],
|
|
@@ -9687,7 +9729,7 @@ function collapseEmptyInstructions(job) {
|
|
|
9687
9729
|
}
|
|
9688
9730
|
}
|
|
9689
9731
|
|
|
9690
|
-
// bazel-out/
|
|
9732
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
|
|
9691
9733
|
function expandSafeReads(job) {
|
|
9692
9734
|
for (const unit of job.units) {
|
|
9693
9735
|
for (const op of unit.ops()) {
|
|
@@ -9823,7 +9865,7 @@ function ternaryTransform(e) {
|
|
|
9823
9865
|
return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
|
|
9824
9866
|
}
|
|
9825
9867
|
|
|
9826
|
-
// bazel-out/
|
|
9868
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/extract_i18n_messages.mjs
|
|
9827
9869
|
var ESCAPE = "\uFFFD";
|
|
9828
9870
|
var ELEMENT_MARKER = "#";
|
|
9829
9871
|
var TEMPLATE_MARKER = "*";
|
|
@@ -9962,7 +10004,7 @@ function formatValue(value) {
|
|
|
9962
10004
|
return `${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
9963
10005
|
}
|
|
9964
10006
|
|
|
9965
|
-
// bazel-out/
|
|
10007
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
|
|
9966
10008
|
function generateAdvance(job) {
|
|
9967
10009
|
for (const unit of job.units) {
|
|
9968
10010
|
const slotMap = /* @__PURE__ */ new Map();
|
|
@@ -9994,7 +10036,7 @@ function generateAdvance(job) {
|
|
|
9994
10036
|
}
|
|
9995
10037
|
}
|
|
9996
10038
|
|
|
9997
|
-
// bazel-out/
|
|
10039
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
|
|
9998
10040
|
function generateProjectionDefs(job) {
|
|
9999
10041
|
const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;
|
|
10000
10042
|
const selectors = [];
|
|
@@ -10018,7 +10060,7 @@ function generateProjectionDefs(job) {
|
|
|
10018
10060
|
}
|
|
10019
10061
|
}
|
|
10020
10062
|
|
|
10021
|
-
// bazel-out/
|
|
10063
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
|
|
10022
10064
|
function generateVariables(job) {
|
|
10023
10065
|
recursivelyProcessView(job.root, null);
|
|
10024
10066
|
}
|
|
@@ -10027,8 +10069,13 @@ function recursivelyProcessView(view, parentScope) {
|
|
|
10027
10069
|
for (const op of view.create) {
|
|
10028
10070
|
switch (op.kind) {
|
|
10029
10071
|
case OpKind.Template:
|
|
10072
|
+
recursivelyProcessView(view.job.views.get(op.xref), scope);
|
|
10073
|
+
break;
|
|
10030
10074
|
case OpKind.RepeaterCreate:
|
|
10031
10075
|
recursivelyProcessView(view.job.views.get(op.xref), scope);
|
|
10076
|
+
if (op.emptyView) {
|
|
10077
|
+
recursivelyProcessView(view.job.views.get(op.emptyView), scope);
|
|
10078
|
+
}
|
|
10032
10079
|
break;
|
|
10033
10080
|
case OpKind.Listener:
|
|
10034
10081
|
op.handlerOps.prepend(generateVariablesInScopeForView(view, scope));
|
|
@@ -10106,7 +10153,7 @@ function generateVariablesInScopeForView(view, scope) {
|
|
|
10106
10153
|
return newOps;
|
|
10107
10154
|
}
|
|
10108
10155
|
|
|
10109
|
-
// bazel-out/
|
|
10156
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_expression_collection.mjs
|
|
10110
10157
|
function collectConstExpressions(job) {
|
|
10111
10158
|
for (const unit of job.units) {
|
|
10112
10159
|
for (const op of unit.ops()) {
|
|
@@ -10120,7 +10167,7 @@ function collectConstExpressions(job) {
|
|
|
10120
10167
|
}
|
|
10121
10168
|
}
|
|
10122
10169
|
|
|
10123
|
-
// bazel-out/
|
|
10170
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
|
|
10124
10171
|
var STYLE_DOT = "style.";
|
|
10125
10172
|
var CLASS_DOT = "class.";
|
|
10126
10173
|
var STYLE_BANG = "style!";
|
|
@@ -10178,7 +10225,7 @@ function parseProperty(name) {
|
|
|
10178
10225
|
return { property: property2, suffix };
|
|
10179
10226
|
}
|
|
10180
10227
|
|
|
10181
|
-
// bazel-out/
|
|
10228
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/map_util.mjs
|
|
10182
10229
|
function mapLiteral(obj, quoted = false) {
|
|
10183
10230
|
return literalMap(Object.keys(obj).map((key) => ({
|
|
10184
10231
|
key,
|
|
@@ -10187,7 +10234,7 @@ function mapLiteral(obj, quoted = false) {
|
|
|
10187
10234
|
})));
|
|
10188
10235
|
}
|
|
10189
10236
|
|
|
10190
|
-
// bazel-out/
|
|
10237
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
|
|
10191
10238
|
var IcuSerializerVisitor = class {
|
|
10192
10239
|
visitText(text2) {
|
|
10193
10240
|
return text2.value;
|
|
@@ -10221,7 +10268,7 @@ function serializeIcuNode(icu) {
|
|
|
10221
10268
|
return icu.visit(serializer);
|
|
10222
10269
|
}
|
|
10223
10270
|
|
|
10224
|
-
// bazel-out/
|
|
10271
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
|
|
10225
10272
|
var TokenType;
|
|
10226
10273
|
(function(TokenType2) {
|
|
10227
10274
|
TokenType2[TokenType2["Character"] = 0] = "Character";
|
|
@@ -10582,7 +10629,7 @@ function parseIntAutoRadix(text2) {
|
|
|
10582
10629
|
return result;
|
|
10583
10630
|
}
|
|
10584
10631
|
|
|
10585
|
-
// bazel-out/
|
|
10632
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
|
|
10586
10633
|
var SplitInterpolation = class {
|
|
10587
10634
|
constructor(strings, expressions, offsets) {
|
|
10588
10635
|
this.strings = strings;
|
|
@@ -11476,7 +11523,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
|
|
|
11476
11523
|
return offsetMap;
|
|
11477
11524
|
}
|
|
11478
11525
|
|
|
11479
|
-
// bazel-out/
|
|
11526
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
|
|
11480
11527
|
var NodeWithI18n = class {
|
|
11481
11528
|
constructor(sourceSpan, i18n2) {
|
|
11482
11529
|
this.sourceSpan = sourceSpan;
|
|
@@ -11628,11 +11675,11 @@ var RecursiveVisitor = class {
|
|
|
11628
11675
|
}
|
|
11629
11676
|
};
|
|
11630
11677
|
|
|
11631
|
-
// bazel-out/
|
|
11678
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
|
|
11632
11679
|
var ElementSchemaRegistry = class {
|
|
11633
11680
|
};
|
|
11634
11681
|
|
|
11635
|
-
// bazel-out/
|
|
11682
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
|
|
11636
11683
|
var BOOLEAN = "boolean";
|
|
11637
11684
|
var NUMBER = "number";
|
|
11638
11685
|
var STRING = "string";
|
|
@@ -11985,7 +12032,7 @@ function _isPixelDimensionStyle(prop) {
|
|
|
11985
12032
|
}
|
|
11986
12033
|
}
|
|
11987
12034
|
|
|
11988
|
-
// bazel-out/
|
|
12035
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
|
|
11989
12036
|
var HtmlTagDefinition = class {
|
|
11990
12037
|
constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false } = {}) {
|
|
11991
12038
|
this.closedByChildren = {};
|
|
@@ -12103,7 +12150,7 @@ function getHtmlTagDefinition(tagName) {
|
|
|
12103
12150
|
return (_b2 = (_a2 = TAG_DEFINITIONS[tagName]) != null ? _a2 : TAG_DEFINITIONS[tagName.toLowerCase()]) != null ? _b2 : DEFAULT_TAG_DEFINITION;
|
|
12104
12151
|
}
|
|
12105
12152
|
|
|
12106
|
-
// bazel-out/
|
|
12153
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
|
|
12107
12154
|
var TAG_TO_PLACEHOLDER_NAMES = {
|
|
12108
12155
|
"A": "LINK",
|
|
12109
12156
|
"B": "BOLD_TEXT",
|
|
@@ -12225,7 +12272,7 @@ var PlaceholderRegistry = class {
|
|
|
12225
12272
|
}
|
|
12226
12273
|
};
|
|
12227
12274
|
|
|
12228
|
-
// bazel-out/
|
|
12275
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
|
|
12229
12276
|
var _expParser = new Parser(new Lexer());
|
|
12230
12277
|
function createI18nMessageFactory(interpolationConfig, containerBlocks) {
|
|
12231
12278
|
const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks);
|
|
@@ -12404,14 +12451,14 @@ function extractPlaceholderName(input) {
|
|
|
12404
12451
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
12405
12452
|
}
|
|
12406
12453
|
|
|
12407
|
-
// bazel-out/
|
|
12454
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
|
|
12408
12455
|
var I18nError = class extends ParseError {
|
|
12409
12456
|
constructor(span, msg) {
|
|
12410
12457
|
super(span, msg);
|
|
12411
12458
|
}
|
|
12412
12459
|
};
|
|
12413
12460
|
|
|
12414
|
-
// bazel-out/
|
|
12461
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
|
|
12415
12462
|
var NAMED_ENTITIES = {
|
|
12416
12463
|
"AElig": "\xC6",
|
|
12417
12464
|
"AMP": "&",
|
|
@@ -14542,7 +14589,7 @@ var NAMED_ENTITIES = {
|
|
|
14542
14589
|
var NGSP_UNICODE = "\uE500";
|
|
14543
14590
|
NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
|
|
14544
14591
|
|
|
14545
|
-
// bazel-out/
|
|
14592
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
|
|
14546
14593
|
var TokenError = class extends ParseError {
|
|
14547
14594
|
constructor(errorMsg, tokenType, span) {
|
|
14548
14595
|
super(span, errorMsg);
|
|
@@ -15463,7 +15510,7 @@ var CursorError = class {
|
|
|
15463
15510
|
}
|
|
15464
15511
|
};
|
|
15465
15512
|
|
|
15466
|
-
// bazel-out/
|
|
15513
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
|
|
15467
15514
|
var TreeError = class extends ParseError {
|
|
15468
15515
|
static create(elementName, span, msg) {
|
|
15469
15516
|
return new TreeError(elementName, span, msg);
|
|
@@ -15847,7 +15894,7 @@ function decodeEntity(match, entity) {
|
|
|
15847
15894
|
return match;
|
|
15848
15895
|
}
|
|
15849
15896
|
|
|
15850
|
-
// bazel-out/
|
|
15897
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
|
|
15851
15898
|
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
|
|
15852
15899
|
"iframe|srcdoc",
|
|
15853
15900
|
"*|innerhtml",
|
|
@@ -15862,7 +15909,7 @@ function isTrustedTypesSink(tagName, propName) {
|
|
|
15862
15909
|
return TRUSTED_TYPES_SINKS.has(tagName + "|" + propName) || TRUSTED_TYPES_SINKS.has("*|" + propName);
|
|
15863
15910
|
}
|
|
15864
15911
|
|
|
15865
|
-
// bazel-out/
|
|
15912
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
|
|
15866
15913
|
var setI18nRefs = (htmlNode, i18nNode) => {
|
|
15867
15914
|
if (htmlNode instanceof NodeWithI18n) {
|
|
15868
15915
|
if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {
|
|
@@ -16019,7 +16066,7 @@ function i18nMetaToJSDoc(meta) {
|
|
|
16019
16066
|
return jsDocComment(tags);
|
|
16020
16067
|
}
|
|
16021
16068
|
|
|
16022
|
-
// bazel-out/
|
|
16069
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
|
|
16023
16070
|
var GOOG_GET_MSG = "goog.getMsg";
|
|
16024
16071
|
function createGoogleGetMsgStatements(variable2, message, closureVar, placeholderValues) {
|
|
16025
16072
|
const messageString = serializeI18nMessageForGetMsg(message);
|
|
@@ -16070,7 +16117,7 @@ function serializeI18nMessageForGetMsg(message) {
|
|
|
16070
16117
|
return message.nodes.map((node) => node.visit(serializerVisitor2, null)).join("");
|
|
16071
16118
|
}
|
|
16072
16119
|
|
|
16073
|
-
// bazel-out/
|
|
16120
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
|
|
16074
16121
|
function createLocalizeStatements(variable2, message, params) {
|
|
16075
16122
|
const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);
|
|
16076
16123
|
const sourceSpan = getSourceSpan(message);
|
|
@@ -16159,13 +16206,13 @@ function createEmptyMessagePart(location) {
|
|
|
16159
16206
|
return new LiteralPiece("", new ParseSourceSpan(location, location));
|
|
16160
16207
|
}
|
|
16161
16208
|
|
|
16162
|
-
// bazel-out/
|
|
16209
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
|
|
16163
16210
|
var NG_I18N_CLOSURE_MODE = "ngI18nClosureMode";
|
|
16164
16211
|
var TRANSLATION_VAR_PREFIX2 = "i18n_";
|
|
16165
16212
|
var I18N_ICU_MAPPING_PREFIX2 = "I18N_EXP_";
|
|
16166
16213
|
var ESCAPE2 = "\uFFFD";
|
|
16167
16214
|
function collectI18nConsts(job) {
|
|
16168
|
-
var _a2;
|
|
16215
|
+
var _a2, _b2;
|
|
16169
16216
|
const fileBasedI18nSuffix = job.relativeContextFilePath.replace(/[^A-Za-z0-9]/g, "_").toUpperCase() + "_";
|
|
16170
16217
|
const extractedAttributesByI18nContext = /* @__PURE__ */ new Map();
|
|
16171
16218
|
const i18nAttributesByElement = /* @__PURE__ */ new Map();
|
|
@@ -16174,11 +16221,13 @@ function collectI18nConsts(job) {
|
|
|
16174
16221
|
for (const unit of job.units) {
|
|
16175
16222
|
for (const op of unit.ops()) {
|
|
16176
16223
|
if (op.kind === OpKind.ExtractedAttribute && op.i18nContext !== null) {
|
|
16177
|
-
extractedAttributesByI18nContext.
|
|
16224
|
+
const attributes = (_a2 = extractedAttributesByI18nContext.get(op.i18nContext)) != null ? _a2 : [];
|
|
16225
|
+
attributes.push(op);
|
|
16226
|
+
extractedAttributesByI18nContext.set(op.i18nContext, attributes);
|
|
16178
16227
|
} else if (op.kind === OpKind.I18nAttributes) {
|
|
16179
16228
|
i18nAttributesByElement.set(op.target, op);
|
|
16180
16229
|
} else if (op.kind === OpKind.I18nExpression && op.usage === I18nExpressionFor.I18nAttribute) {
|
|
16181
|
-
const expressions = (
|
|
16230
|
+
const expressions = (_b2 = i18nExpressionsByElement.get(op.target)) != null ? _b2 : [];
|
|
16182
16231
|
expressions.push(op);
|
|
16183
16232
|
i18nExpressionsByElement.set(op.target, expressions);
|
|
16184
16233
|
} else if (op.kind === OpKind.I18nMessage) {
|
|
@@ -16199,9 +16248,11 @@ function collectI18nConsts(job) {
|
|
|
16199
16248
|
} else {
|
|
16200
16249
|
job.constsInitializers.push(...statements);
|
|
16201
16250
|
i18nValuesByContext.set(op.i18nContext, mainVar);
|
|
16202
|
-
const
|
|
16203
|
-
if (
|
|
16204
|
-
|
|
16251
|
+
const attributesForMessage = extractedAttributesByI18nContext.get(op.i18nContext);
|
|
16252
|
+
if (attributesForMessage !== void 0) {
|
|
16253
|
+
for (const attr of attributesForMessage) {
|
|
16254
|
+
attr.expression = mainVar.clone();
|
|
16255
|
+
}
|
|
16205
16256
|
}
|
|
16206
16257
|
}
|
|
16207
16258
|
}
|
|
@@ -16317,7 +16368,7 @@ function i18nGenerateClosureVar(pool, messageId, fileBasedI18nSuffix, useExterna
|
|
|
16317
16368
|
return variable(name);
|
|
16318
16369
|
}
|
|
16319
16370
|
|
|
16320
|
-
// bazel-out/
|
|
16371
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
|
|
16321
16372
|
function convertI18nText(job) {
|
|
16322
16373
|
var _a2;
|
|
16323
16374
|
for (const unit of job.units) {
|
|
@@ -16376,7 +16427,7 @@ function convertI18nText(job) {
|
|
|
16376
16427
|
}
|
|
16377
16428
|
}
|
|
16378
16429
|
|
|
16379
|
-
// bazel-out/
|
|
16430
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
|
|
16380
16431
|
function liftLocalRefs(job) {
|
|
16381
16432
|
for (const unit of job.units) {
|
|
16382
16433
|
for (const op of unit.create) {
|
|
@@ -16406,7 +16457,7 @@ function serializeLocalRefs(refs) {
|
|
|
16406
16457
|
return literalArr(constRefs);
|
|
16407
16458
|
}
|
|
16408
16459
|
|
|
16409
|
-
// bazel-out/
|
|
16460
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
16410
16461
|
function emitNamespaceChanges(job) {
|
|
16411
16462
|
for (const unit of job.units) {
|
|
16412
16463
|
let activeNamespace = Namespace.HTML;
|
|
@@ -16422,7 +16473,7 @@ function emitNamespaceChanges(job) {
|
|
|
16422
16473
|
}
|
|
16423
16474
|
}
|
|
16424
16475
|
|
|
16425
|
-
// bazel-out/
|
|
16476
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/style_parser.mjs
|
|
16426
16477
|
function parse(value) {
|
|
16427
16478
|
const styles = [];
|
|
16428
16479
|
let i = 0;
|
|
@@ -16483,7 +16534,7 @@ function hyphenate2(value) {
|
|
|
16483
16534
|
}).toLowerCase();
|
|
16484
16535
|
}
|
|
16485
16536
|
|
|
16486
|
-
// bazel-out/
|
|
16537
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
|
|
16487
16538
|
function nameFunctionsAndVariables(job) {
|
|
16488
16539
|
addNamesToView(job.root, job.componentName, { index: 0 }, job.compatibility === CompatibilityMode.TemplateDefinitionBuilder);
|
|
16489
16540
|
}
|
|
@@ -16598,7 +16649,7 @@ function stripImportant(name) {
|
|
|
16598
16649
|
return name;
|
|
16599
16650
|
}
|
|
16600
16651
|
|
|
16601
|
-
// bazel-out/
|
|
16652
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
|
|
16602
16653
|
function mergeNextContextExpressions(job) {
|
|
16603
16654
|
for (const unit of job.units) {
|
|
16604
16655
|
for (const op of unit.create) {
|
|
@@ -16644,7 +16695,7 @@ function mergeNextContextsInOps(ops) {
|
|
|
16644
16695
|
}
|
|
16645
16696
|
}
|
|
16646
16697
|
|
|
16647
|
-
// bazel-out/
|
|
16698
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
|
|
16648
16699
|
var CONTAINER_TAG = "ng-container";
|
|
16649
16700
|
function generateNgContainerOps(job) {
|
|
16650
16701
|
for (const unit of job.units) {
|
|
@@ -16661,7 +16712,7 @@ function generateNgContainerOps(job) {
|
|
|
16661
16712
|
}
|
|
16662
16713
|
}
|
|
16663
16714
|
|
|
16664
|
-
// bazel-out/
|
|
16715
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
|
|
16665
16716
|
function lookupElement3(elements, xref) {
|
|
16666
16717
|
const el = elements.get(xref);
|
|
16667
16718
|
if (el === void 0) {
|
|
@@ -16691,7 +16742,7 @@ function disableBindings(job) {
|
|
|
16691
16742
|
}
|
|
16692
16743
|
}
|
|
16693
16744
|
|
|
16694
|
-
// bazel-out/
|
|
16745
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
|
|
16695
16746
|
function generateNullishCoalesceExpressions(job) {
|
|
16696
16747
|
for (const unit of job.units) {
|
|
16697
16748
|
for (const op of unit.ops()) {
|
|
@@ -16707,7 +16758,7 @@ function generateNullishCoalesceExpressions(job) {
|
|
|
16707
16758
|
}
|
|
16708
16759
|
}
|
|
16709
16760
|
|
|
16710
|
-
// bazel-out/
|
|
16761
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
|
|
16711
16762
|
function kindTest(kind) {
|
|
16712
16763
|
return (op) => op.kind === kind;
|
|
16713
16764
|
}
|
|
@@ -16781,7 +16832,7 @@ function keepLast(ops) {
|
|
|
16781
16832
|
return ops.slice(ops.length - 1);
|
|
16782
16833
|
}
|
|
16783
16834
|
|
|
16784
|
-
// bazel-out/
|
|
16835
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
|
|
16785
16836
|
function parseExtractedStyles(job) {
|
|
16786
16837
|
for (const unit of job.units) {
|
|
16787
16838
|
for (const op of unit.create) {
|
|
@@ -16789,13 +16840,13 @@ function parseExtractedStyles(job) {
|
|
|
16789
16840
|
if (op.name === "style") {
|
|
16790
16841
|
const parsedStyles = parse(op.expression.value);
|
|
16791
16842
|
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);
|
|
16843
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1]), null, null, SecurityContext.STYLE), op);
|
|
16793
16844
|
}
|
|
16794
16845
|
OpList.remove(op);
|
|
16795
16846
|
} else if (op.name === "class") {
|
|
16796
16847
|
const parsedClasses = op.expression.value.trim().split(/\s+/g);
|
|
16797
16848
|
for (const parsedClass of parsedClasses) {
|
|
16798
|
-
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null, null), op);
|
|
16849
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null, null, null, SecurityContext.NONE), op);
|
|
16799
16850
|
}
|
|
16800
16851
|
OpList.remove(op);
|
|
16801
16852
|
}
|
|
@@ -16804,7 +16855,7 @@ function parseExtractedStyles(job) {
|
|
|
16804
16855
|
}
|
|
16805
16856
|
}
|
|
16806
16857
|
|
|
16807
|
-
// bazel-out/
|
|
16858
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
|
|
16808
16859
|
function removeContentSelectors(job) {
|
|
16809
16860
|
for (const unit of job.units) {
|
|
16810
16861
|
const elements = createOpXrefMap(unit);
|
|
@@ -16838,7 +16889,7 @@ function lookupInXrefMap(map, xref) {
|
|
|
16838
16889
|
return el;
|
|
16839
16890
|
}
|
|
16840
16891
|
|
|
16841
|
-
// bazel-out/
|
|
16892
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
|
|
16842
16893
|
function createPipes(job) {
|
|
16843
16894
|
for (const unit of job.units) {
|
|
16844
16895
|
processPipeBindingsInView(unit);
|
|
@@ -16886,7 +16937,7 @@ function addPipeToCreationBlock(unit, afterTargetXref, binding) {
|
|
|
16886
16937
|
throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);
|
|
16887
16938
|
}
|
|
16888
16939
|
|
|
16889
|
-
// bazel-out/
|
|
16940
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
|
|
16890
16941
|
function createVariadicPipes(job) {
|
|
16891
16942
|
for (const unit of job.units) {
|
|
16892
16943
|
for (const op of unit.update) {
|
|
@@ -16903,7 +16954,7 @@ function createVariadicPipes(job) {
|
|
|
16903
16954
|
}
|
|
16904
16955
|
}
|
|
16905
16956
|
|
|
16906
|
-
// bazel-out/
|
|
16957
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs
|
|
16907
16958
|
function propagateI18nBlocks(job) {
|
|
16908
16959
|
propagateI18nBlocksToTemplates(job.root, 0);
|
|
16909
16960
|
}
|
|
@@ -16922,19 +16973,29 @@ function propagateI18nBlocksToTemplates(unit, subTemplateIndex) {
|
|
|
16922
16973
|
i18nBlock = null;
|
|
16923
16974
|
break;
|
|
16924
16975
|
case OpKind.Template:
|
|
16925
|
-
|
|
16926
|
-
|
|
16927
|
-
|
|
16928
|
-
|
|
16929
|
-
|
|
16930
|
-
|
|
16931
|
-
|
|
16976
|
+
subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.xref), i18nBlock, op.i18nPlaceholder, subTemplateIndex);
|
|
16977
|
+
break;
|
|
16978
|
+
case OpKind.RepeaterCreate:
|
|
16979
|
+
const forView = unit.job.views.get(op.xref);
|
|
16980
|
+
subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.xref), i18nBlock, op.i18nPlaceholder, subTemplateIndex);
|
|
16981
|
+
if (op.emptyView !== null) {
|
|
16982
|
+
subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.emptyView), i18nBlock, op.emptyI18nPlaceholder, subTemplateIndex);
|
|
16932
16983
|
}
|
|
16933
|
-
|
|
16984
|
+
break;
|
|
16934
16985
|
}
|
|
16935
16986
|
}
|
|
16936
16987
|
return subTemplateIndex;
|
|
16937
16988
|
}
|
|
16989
|
+
function propagateI18nBlocksForView(view, i18nBlock, i18nPlaceholder, subTemplateIndex) {
|
|
16990
|
+
if (i18nPlaceholder !== void 0) {
|
|
16991
|
+
if (i18nBlock === null) {
|
|
16992
|
+
throw Error("Expected template with i18n placeholder to be in an i18n block.");
|
|
16993
|
+
}
|
|
16994
|
+
subTemplateIndex++;
|
|
16995
|
+
wrapTemplateWithI18n(view, i18nBlock);
|
|
16996
|
+
}
|
|
16997
|
+
return propagateI18nBlocksToTemplates(view, subTemplateIndex);
|
|
16998
|
+
}
|
|
16938
16999
|
function wrapTemplateWithI18n(unit, parentI18n) {
|
|
16939
17000
|
var _a2;
|
|
16940
17001
|
if (((_a2 = unit.create.head.next) == null ? void 0 : _a2.kind) !== OpKind.I18nStart) {
|
|
@@ -16944,7 +17005,7 @@ function wrapTemplateWithI18n(unit, parentI18n) {
|
|
|
16944
17005
|
}
|
|
16945
17006
|
}
|
|
16946
17007
|
|
|
16947
|
-
// bazel-out/
|
|
17008
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
|
|
16948
17009
|
function extractPureFunctions(job) {
|
|
16949
17010
|
for (const view of job.units) {
|
|
16950
17011
|
for (const op of view.ops()) {
|
|
@@ -16986,7 +17047,7 @@ var PureFunctionConstant = class extends GenericKeyFn {
|
|
|
16986
17047
|
}
|
|
16987
17048
|
};
|
|
16988
17049
|
|
|
16989
|
-
// bazel-out/
|
|
17050
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
|
|
16990
17051
|
function generatePureLiteralStructures(job) {
|
|
16991
17052
|
for (const unit of job.units) {
|
|
16992
17053
|
for (const op of unit.update) {
|
|
@@ -17033,7 +17094,7 @@ function transformLiteralMap(expr) {
|
|
|
17033
17094
|
return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
|
|
17034
17095
|
}
|
|
17035
17096
|
|
|
17036
|
-
// bazel-out/
|
|
17097
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
|
|
17037
17098
|
function element(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
17038
17099
|
return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
17039
17100
|
}
|
|
@@ -17091,17 +17152,13 @@ function disableBindings2() {
|
|
|
17091
17152
|
function enableBindings() {
|
|
17092
17153
|
return call(Identifiers.enableBindings, [], null);
|
|
17093
17154
|
}
|
|
17094
|
-
function listener(name, handlerFn, sourceSpan) {
|
|
17095
|
-
|
|
17096
|
-
|
|
17097
|
-
|
|
17098
|
-
|
|
17099
|
-
}
|
|
17100
|
-
|
|
17101
|
-
return call(Identifiers.syntheticHostListener, [
|
|
17102
|
-
literal(name),
|
|
17103
|
-
handlerFn
|
|
17104
|
-
], sourceSpan);
|
|
17155
|
+
function listener(name, handlerFn, eventTargetResolver, syntheticHost, sourceSpan) {
|
|
17156
|
+
const args = [literal(name), handlerFn];
|
|
17157
|
+
if (eventTargetResolver !== null) {
|
|
17158
|
+
args.push(literal(false));
|
|
17159
|
+
args.push(importExpr(eventTargetResolver));
|
|
17160
|
+
}
|
|
17161
|
+
return call(syntheticHost ? Identifiers.syntheticHostListener : Identifiers.listener, args, sourceSpan);
|
|
17105
17162
|
}
|
|
17106
17163
|
function pipe(slot, name) {
|
|
17107
17164
|
return call(Identifiers.pipe, [
|
|
@@ -17360,8 +17417,12 @@ function classMapInterpolate(strings, expressions, sourceSpan) {
|
|
|
17360
17417
|
const interpolationArgs = collateInterpolationArgs(strings, expressions);
|
|
17361
17418
|
return callVariadicInstruction(CLASS_MAP_INTERPOLATE_CONFIG, [], interpolationArgs, [], sourceSpan);
|
|
17362
17419
|
}
|
|
17363
|
-
function hostProperty(name, expression, sourceSpan) {
|
|
17364
|
-
|
|
17420
|
+
function hostProperty(name, expression, sanitizer, sourceSpan) {
|
|
17421
|
+
const args = [literal(name), expression];
|
|
17422
|
+
if (sanitizer !== null) {
|
|
17423
|
+
args.push(sanitizer);
|
|
17424
|
+
}
|
|
17425
|
+
return call(Identifiers.hostProperty, args, sourceSpan);
|
|
17365
17426
|
}
|
|
17366
17427
|
function syntheticHostProperty(name, expression, sourceSpan) {
|
|
17367
17428
|
return call(Identifiers.syntheticHostProperty, [literal(name), expression], sourceSpan);
|
|
@@ -17548,14 +17609,11 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
|
|
|
17548
17609
|
return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
|
|
17549
17610
|
}
|
|
17550
17611
|
|
|
17551
|
-
// bazel-out/
|
|
17552
|
-
var
|
|
17553
|
-
[
|
|
17554
|
-
[
|
|
17555
|
-
[
|
|
17556
|
-
[SanitizerFn.Script, Identifiers.sanitizeScript],
|
|
17557
|
-
[SanitizerFn.Style, Identifiers.sanitizeStyle],
|
|
17558
|
-
[SanitizerFn.Url, Identifiers.sanitizeUrl]
|
|
17612
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
|
|
17613
|
+
var GLOBAL_TARGET_RESOLVERS = /* @__PURE__ */ new Map([
|
|
17614
|
+
["window", Identifiers.resolveWindow],
|
|
17615
|
+
["document", Identifiers.resolveDocument],
|
|
17616
|
+
["body", Identifiers.resolveBody]
|
|
17559
17617
|
]);
|
|
17560
17618
|
function reify(job) {
|
|
17561
17619
|
for (const unit of job.units) {
|
|
@@ -17625,8 +17683,11 @@ function reifyCreateOperations(unit, ops) {
|
|
|
17625
17683
|
break;
|
|
17626
17684
|
case OpKind.Listener:
|
|
17627
17685
|
const listenerFn = reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, op.consumesDollarEvent);
|
|
17628
|
-
const
|
|
17629
|
-
|
|
17686
|
+
const eventTargetResolver = op.eventTarget ? GLOBAL_TARGET_RESOLVERS.get(op.eventTarget) : null;
|
|
17687
|
+
if (eventTargetResolver === void 0) {
|
|
17688
|
+
throw new Error(`AssertionError: unknown event target ${op.eventTarget}`);
|
|
17689
|
+
}
|
|
17690
|
+
OpList.replace(op, listener(op.name, listenerFn, eventTargetResolver, op.hostListener && op.isAnimationListener, op.sourceSpan));
|
|
17630
17691
|
break;
|
|
17631
17692
|
case OpKind.Variable:
|
|
17632
17693
|
if (op.variable.name === null) {
|
|
@@ -17781,7 +17842,7 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
17781
17842
|
if (op.isAnimationTrigger) {
|
|
17782
17843
|
OpList.replace(op, syntheticHostProperty(op.name, op.expression, op.sourceSpan));
|
|
17783
17844
|
} else {
|
|
17784
|
-
OpList.replace(op, hostProperty(op.name, op.expression, op.sourceSpan));
|
|
17845
|
+
OpList.replace(op, hostProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));
|
|
17785
17846
|
}
|
|
17786
17847
|
}
|
|
17787
17848
|
break;
|
|
@@ -17859,8 +17920,6 @@ function reifyIrExpression(expr) {
|
|
|
17859
17920
|
return pipeBind(expr.targetSlot.slot, expr.varOffset, expr.args);
|
|
17860
17921
|
case ExpressionKind.PipeBindingVariadic:
|
|
17861
17922
|
return pipeBindV(expr.targetSlot.slot, expr.varOffset, expr.args);
|
|
17862
|
-
case ExpressionKind.SanitizerExpr:
|
|
17863
|
-
return importExpr(sanitizerIdentifierMap.get(expr.fn));
|
|
17864
17923
|
case ExpressionKind.SlotLiteralExpr:
|
|
17865
17924
|
return literal(expr.slot.slot);
|
|
17866
17925
|
default:
|
|
@@ -17883,7 +17942,7 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
|
|
|
17883
17942
|
return fn(params, handlerStmts, void 0, void 0, name);
|
|
17884
17943
|
}
|
|
17885
17944
|
|
|
17886
|
-
// bazel-out/
|
|
17945
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
|
|
17887
17946
|
function removeEmptyBindings(job) {
|
|
17888
17947
|
for (const unit of job.units) {
|
|
17889
17948
|
for (const op of unit.update) {
|
|
@@ -17904,7 +17963,7 @@ function removeEmptyBindings(job) {
|
|
|
17904
17963
|
}
|
|
17905
17964
|
}
|
|
17906
17965
|
|
|
17907
|
-
// bazel-out/
|
|
17966
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_i18n_contexts.mjs
|
|
17908
17967
|
function removeI18nContexts(job) {
|
|
17909
17968
|
for (const unit of job.units) {
|
|
17910
17969
|
for (const op of unit.create) {
|
|
@@ -17920,7 +17979,7 @@ function removeI18nContexts(job) {
|
|
|
17920
17979
|
}
|
|
17921
17980
|
}
|
|
17922
17981
|
|
|
17923
|
-
// bazel-out/
|
|
17982
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_unused_i18n_attrs.mjs
|
|
17924
17983
|
function removeUnusedI18nAttributesOps(job) {
|
|
17925
17984
|
for (const unit of job.units) {
|
|
17926
17985
|
const ownersWithI18nExpressions = /* @__PURE__ */ new Set();
|
|
@@ -17942,7 +18001,7 @@ function removeUnusedI18nAttributesOps(job) {
|
|
|
17942
18001
|
}
|
|
17943
18002
|
}
|
|
17944
18003
|
|
|
17945
|
-
// bazel-out/
|
|
18004
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/repeater_derived_vars.mjs
|
|
17946
18005
|
function generateRepeaterDerivedVars(job) {
|
|
17947
18006
|
const repeaters = /* @__PURE__ */ new Map();
|
|
17948
18007
|
for (const unit of job.units) {
|
|
@@ -17974,7 +18033,7 @@ function generateRepeaterDerivedVars(job) {
|
|
|
17974
18033
|
}
|
|
17975
18034
|
}
|
|
17976
18035
|
|
|
17977
|
-
// bazel-out/
|
|
18036
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
|
|
17978
18037
|
function resolveContexts(job) {
|
|
17979
18038
|
for (const unit of job.units) {
|
|
17980
18039
|
processLexicalScope(unit, unit.create);
|
|
@@ -18015,7 +18074,7 @@ function processLexicalScope(view, ops) {
|
|
|
18015
18074
|
}
|
|
18016
18075
|
}
|
|
18017
18076
|
|
|
18018
|
-
// bazel-out/
|
|
18077
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
|
|
18019
18078
|
function resolveDollarEvent(job) {
|
|
18020
18079
|
for (const unit of job.units) {
|
|
18021
18080
|
transformDollarEvent(unit, unit.create);
|
|
@@ -18036,7 +18095,7 @@ function transformDollarEvent(unit, ops) {
|
|
|
18036
18095
|
}
|
|
18037
18096
|
}
|
|
18038
18097
|
|
|
18039
|
-
// bazel-out/
|
|
18098
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_element_placeholders.mjs
|
|
18040
18099
|
function resolveI18nElementPlaceholders(job) {
|
|
18041
18100
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
18042
18101
|
const elements = /* @__PURE__ */ new Map();
|
|
@@ -18101,18 +18160,52 @@ function resolvePlaceholdersForView(job, unit, i18nContexts, elements, pendingSt
|
|
|
18101
18160
|
}
|
|
18102
18161
|
break;
|
|
18103
18162
|
case OpKind.Template:
|
|
18163
|
+
const view = job.views.get(op.xref);
|
|
18104
18164
|
if (op.i18nPlaceholder === void 0) {
|
|
18105
|
-
resolvePlaceholdersForView(job,
|
|
18165
|
+
resolvePlaceholdersForView(job, view, i18nContexts, elements);
|
|
18106
18166
|
} else {
|
|
18107
18167
|
if (currentOps === null) {
|
|
18108
18168
|
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
18109
18169
|
}
|
|
18110
18170
|
if (op.templateKind === TemplateKind.Structural) {
|
|
18111
|
-
resolvePlaceholdersForView(job,
|
|
18171
|
+
resolvePlaceholdersForView(job, view, i18nContexts, elements, op);
|
|
18112
18172
|
} else {
|
|
18113
|
-
recordTemplateStart(job, op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18114
|
-
resolvePlaceholdersForView(job,
|
|
18115
|
-
recordTemplateClose(job, op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18173
|
+
recordTemplateStart(job, view, op.handle.slot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18174
|
+
resolvePlaceholdersForView(job, view, i18nContexts, elements);
|
|
18175
|
+
recordTemplateClose(job, view, op.handle.slot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18176
|
+
pendingStructuralDirective = void 0;
|
|
18177
|
+
}
|
|
18178
|
+
}
|
|
18179
|
+
break;
|
|
18180
|
+
case OpKind.RepeaterCreate:
|
|
18181
|
+
if (pendingStructuralDirective !== void 0) {
|
|
18182
|
+
throw Error("AssertionError: Unexpected structural directive associated with @for block");
|
|
18183
|
+
}
|
|
18184
|
+
const forSlot = op.handle.slot + 1;
|
|
18185
|
+
const forView = job.views.get(op.xref);
|
|
18186
|
+
if (op.i18nPlaceholder === void 0) {
|
|
18187
|
+
resolvePlaceholdersForView(job, forView, i18nContexts, elements);
|
|
18188
|
+
} else {
|
|
18189
|
+
if (currentOps === null) {
|
|
18190
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
18191
|
+
}
|
|
18192
|
+
recordTemplateStart(job, forView, forSlot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18193
|
+
resolvePlaceholdersForView(job, forView, i18nContexts, elements);
|
|
18194
|
+
recordTemplateClose(job, forView, forSlot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18195
|
+
pendingStructuralDirective = void 0;
|
|
18196
|
+
}
|
|
18197
|
+
if (op.emptyView !== null) {
|
|
18198
|
+
const emptySlot = op.handle.slot + 2;
|
|
18199
|
+
const emptyView = job.views.get(op.emptyView);
|
|
18200
|
+
if (op.emptyI18nPlaceholder === void 0) {
|
|
18201
|
+
resolvePlaceholdersForView(job, emptyView, i18nContexts, elements);
|
|
18202
|
+
} else {
|
|
18203
|
+
if (currentOps === null) {
|
|
18204
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
18205
|
+
}
|
|
18206
|
+
recordTemplateStart(job, emptyView, emptySlot, op.emptyI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18207
|
+
resolvePlaceholdersForView(job, emptyView, i18nContexts, elements);
|
|
18208
|
+
recordTemplateClose(job, emptyView, emptySlot, op.emptyI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18116
18209
|
pendingStructuralDirective = void 0;
|
|
18117
18210
|
}
|
|
18118
18211
|
}
|
|
@@ -18145,8 +18238,8 @@ function recordElementClose(op, i18nContext, i18nBlock, structuralDirective) {
|
|
|
18145
18238
|
addParam(i18nContext.params, closeName, value, i18nBlock.subTemplateIndex, flags);
|
|
18146
18239
|
}
|
|
18147
18240
|
}
|
|
18148
|
-
function recordTemplateStart(job,
|
|
18149
|
-
let { startName, closeName } =
|
|
18241
|
+
function recordTemplateStart(job, view, slot, i18nPlaceholder, i18nContext, i18nBlock, structuralDirective) {
|
|
18242
|
+
let { startName, closeName } = i18nPlaceholder;
|
|
18150
18243
|
let flags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.OpenTag;
|
|
18151
18244
|
if (!closeName) {
|
|
18152
18245
|
flags |= I18nParamValueFlags.CloseTag;
|
|
@@ -18154,20 +18247,20 @@ function recordTemplateStart(job, op, i18nContext, i18nBlock, structuralDirectiv
|
|
|
18154
18247
|
if (structuralDirective !== void 0) {
|
|
18155
18248
|
addParam(i18nContext.params, startName, structuralDirective.handle.slot, i18nBlock.subTemplateIndex, flags);
|
|
18156
18249
|
}
|
|
18157
|
-
addParam(i18nContext.params, startName,
|
|
18250
|
+
addParam(i18nContext.params, startName, slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, view), flags);
|
|
18158
18251
|
}
|
|
18159
|
-
function recordTemplateClose(job,
|
|
18160
|
-
const { startName, closeName } =
|
|
18252
|
+
function recordTemplateClose(job, view, slot, i18nPlaceholder, i18nContext, i18nBlock, structuralDirective) {
|
|
18253
|
+
const { startName, closeName } = i18nPlaceholder;
|
|
18161
18254
|
const flags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag;
|
|
18162
18255
|
if (closeName) {
|
|
18163
|
-
addParam(i18nContext.params, closeName,
|
|
18256
|
+
addParam(i18nContext.params, closeName, slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, view), flags);
|
|
18164
18257
|
if (structuralDirective !== void 0) {
|
|
18165
18258
|
addParam(i18nContext.params, closeName, structuralDirective.handle.slot, i18nBlock.subTemplateIndex, flags);
|
|
18166
18259
|
}
|
|
18167
18260
|
}
|
|
18168
18261
|
}
|
|
18169
|
-
function getSubTemplateIndexForTemplateTag(job, i18nOp,
|
|
18170
|
-
for (const childOp of
|
|
18262
|
+
function getSubTemplateIndexForTemplateTag(job, i18nOp, view) {
|
|
18263
|
+
for (const childOp of view.create) {
|
|
18171
18264
|
if (childOp.kind === OpKind.I18nStart) {
|
|
18172
18265
|
return childOp.subTemplateIndex;
|
|
18173
18266
|
}
|
|
@@ -18181,7 +18274,7 @@ function addParam(params, placeholder, value, subTemplateIndex, flags) {
|
|
|
18181
18274
|
params.set(placeholder, values);
|
|
18182
18275
|
}
|
|
18183
18276
|
|
|
18184
|
-
// bazel-out/
|
|
18277
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
|
|
18185
18278
|
function resolveI18nExpressionPlaceholders(job) {
|
|
18186
18279
|
var _a2;
|
|
18187
18280
|
const subTemplateIndicies = /* @__PURE__ */ new Map();
|
|
@@ -18220,7 +18313,7 @@ function resolveI18nExpressionPlaceholders(job) {
|
|
|
18220
18313
|
}
|
|
18221
18314
|
}
|
|
18222
18315
|
|
|
18223
|
-
// bazel-out/
|
|
18316
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_icu_placeholders.mjs
|
|
18224
18317
|
function resolveI18nIcuPlaceholders(job) {
|
|
18225
18318
|
for (const unit of job.units) {
|
|
18226
18319
|
for (const op of unit.create) {
|
|
@@ -18264,7 +18357,7 @@ var ResolveIcuPlaceholdersVisitor = class extends RecurseVisitor {
|
|
|
18264
18357
|
}
|
|
18265
18358
|
};
|
|
18266
18359
|
|
|
18267
|
-
// bazel-out/
|
|
18360
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
|
|
18268
18361
|
function resolveNames(job) {
|
|
18269
18362
|
for (const unit of job.units) {
|
|
18270
18363
|
processLexicalScope2(unit, unit.create, null);
|
|
@@ -18328,31 +18421,55 @@ function processLexicalScope2(unit, ops, savedView) {
|
|
|
18328
18421
|
}
|
|
18329
18422
|
}
|
|
18330
18423
|
|
|
18331
|
-
// bazel-out/
|
|
18332
|
-
var
|
|
18333
|
-
[SecurityContext.HTML,
|
|
18334
|
-
[SecurityContext.
|
|
18335
|
-
[SecurityContext.
|
|
18336
|
-
[SecurityContext.
|
|
18337
|
-
[SecurityContext.
|
|
18424
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
|
|
18425
|
+
var sanitizerFns = /* @__PURE__ */ new Map([
|
|
18426
|
+
[SecurityContext.HTML, Identifiers.sanitizeHtml],
|
|
18427
|
+
[SecurityContext.RESOURCE_URL, Identifiers.sanitizeResourceUrl],
|
|
18428
|
+
[SecurityContext.SCRIPT, Identifiers.sanitizeScript],
|
|
18429
|
+
[SecurityContext.STYLE, Identifiers.sanitizeStyle],
|
|
18430
|
+
[SecurityContext.URL, Identifiers.sanitizeUrl]
|
|
18431
|
+
]);
|
|
18432
|
+
var trustedValueFns = /* @__PURE__ */ new Map([
|
|
18433
|
+
[SecurityContext.HTML, Identifiers.trustConstantHtml],
|
|
18434
|
+
[SecurityContext.RESOURCE_URL, Identifiers.trustConstantResourceUrl]
|
|
18338
18435
|
]);
|
|
18339
18436
|
function resolveSanitizers(job) {
|
|
18437
|
+
var _a2, _b2;
|
|
18340
18438
|
for (const unit of job.units) {
|
|
18341
18439
|
const elements = createOpXrefMap(unit);
|
|
18342
|
-
|
|
18440
|
+
if (job.kind !== CompilationJobKind.Host) {
|
|
18441
|
+
for (const op of unit.create) {
|
|
18442
|
+
if (op.kind === OpKind.ExtractedAttribute) {
|
|
18443
|
+
const trustedValueFn = (_a2 = trustedValueFns.get(getOnlySecurityContext(op.securityContext))) != null ? _a2 : null;
|
|
18444
|
+
op.trustedValueFn = trustedValueFn !== null ? importExpr(trustedValueFn) : null;
|
|
18445
|
+
}
|
|
18446
|
+
}
|
|
18447
|
+
}
|
|
18343
18448
|
for (const op of unit.update) {
|
|
18344
18449
|
switch (op.kind) {
|
|
18345
18450
|
case OpKind.Property:
|
|
18346
18451
|
case OpKind.Attribute:
|
|
18347
|
-
|
|
18348
|
-
|
|
18452
|
+
case OpKind.HostProperty:
|
|
18453
|
+
let sanitizerFn = null;
|
|
18454
|
+
if (Array.isArray(op.securityContext) && op.securityContext.length === 2 && op.securityContext.indexOf(SecurityContext.URL) > -1 && op.securityContext.indexOf(SecurityContext.RESOURCE_URL) > -1) {
|
|
18455
|
+
sanitizerFn = Identifiers.sanitizeUrlOrResourceUrl;
|
|
18456
|
+
} else {
|
|
18457
|
+
sanitizerFn = (_b2 = sanitizerFns.get(getOnlySecurityContext(op.securityContext))) != null ? _b2 : null;
|
|
18458
|
+
}
|
|
18459
|
+
op.sanitizer = sanitizerFn !== null ? importExpr(sanitizerFn) : null;
|
|
18349
18460
|
if (op.sanitizer === null) {
|
|
18350
|
-
|
|
18351
|
-
if (
|
|
18352
|
-
|
|
18461
|
+
let isIframe = false;
|
|
18462
|
+
if (job.kind === CompilationJobKind.Host || op.kind === OpKind.HostProperty) {
|
|
18463
|
+
isIframe = true;
|
|
18464
|
+
} else {
|
|
18465
|
+
const ownerOp = elements.get(op.target);
|
|
18466
|
+
if (ownerOp === void 0 || !isElementOrContainerOp(ownerOp)) {
|
|
18467
|
+
throw Error("Property should have an element-like owner");
|
|
18468
|
+
}
|
|
18469
|
+
isIframe = isIframeElement(ownerOp);
|
|
18353
18470
|
}
|
|
18354
|
-
if (
|
|
18355
|
-
op.sanitizer =
|
|
18471
|
+
if (isIframe && isIframeSecuritySensitiveAttr(op.name)) {
|
|
18472
|
+
op.sanitizer = importExpr(Identifiers.validateIframeAttribute);
|
|
18356
18473
|
}
|
|
18357
18474
|
}
|
|
18358
18475
|
break;
|
|
@@ -18364,8 +18481,17 @@ function isIframeElement(op) {
|
|
|
18364
18481
|
var _a2;
|
|
18365
18482
|
return op.kind === OpKind.ElementStart && ((_a2 = op.tag) == null ? void 0 : _a2.toLowerCase()) === "iframe";
|
|
18366
18483
|
}
|
|
18484
|
+
function getOnlySecurityContext(securityContext) {
|
|
18485
|
+
if (Array.isArray(securityContext)) {
|
|
18486
|
+
if (securityContext.length > 1) {
|
|
18487
|
+
throw Error(`AssertionError: Ambiguous security context`);
|
|
18488
|
+
}
|
|
18489
|
+
return securityContext[0] || SecurityContext.NONE;
|
|
18490
|
+
}
|
|
18491
|
+
return securityContext;
|
|
18492
|
+
}
|
|
18367
18493
|
|
|
18368
|
-
// bazel-out/
|
|
18494
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
|
|
18369
18495
|
function saveAndRestoreView(job) {
|
|
18370
18496
|
for (const unit of job.units) {
|
|
18371
18497
|
unit.create.prepend([
|
|
@@ -18410,7 +18536,7 @@ function addSaveRestoreViewOperationToListener(unit, op) {
|
|
|
18410
18536
|
}
|
|
18411
18537
|
}
|
|
18412
18538
|
|
|
18413
|
-
// bazel-out/
|
|
18539
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
|
|
18414
18540
|
function allocateSlots(job) {
|
|
18415
18541
|
const slotMap = /* @__PURE__ */ new Map();
|
|
18416
18542
|
for (const unit of job.units) {
|
|
@@ -18435,7 +18561,7 @@ function allocateSlots(job) {
|
|
|
18435
18561
|
}
|
|
18436
18562
|
}
|
|
18437
18563
|
|
|
18438
|
-
// bazel-out/
|
|
18564
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
|
|
18439
18565
|
function specializeStyleBindings(job) {
|
|
18440
18566
|
for (const unit of job.units) {
|
|
18441
18567
|
for (const op of unit.update) {
|
|
@@ -18465,7 +18591,7 @@ function specializeStyleBindings(job) {
|
|
|
18465
18591
|
}
|
|
18466
18592
|
}
|
|
18467
18593
|
|
|
18468
|
-
// bazel-out/
|
|
18594
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
|
|
18469
18595
|
function generateTemporaryVariables(job) {
|
|
18470
18596
|
for (const unit of job.units) {
|
|
18471
18597
|
unit.create.prepend(generateTemporaries(unit.create));
|
|
@@ -18523,7 +18649,7 @@ function assignName(names, expr) {
|
|
|
18523
18649
|
expr.name = name;
|
|
18524
18650
|
}
|
|
18525
18651
|
|
|
18526
|
-
// bazel-out/
|
|
18652
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_generation.mjs
|
|
18527
18653
|
function generateTrackFns(job) {
|
|
18528
18654
|
for (const unit of job.units) {
|
|
18529
18655
|
for (const op of unit.create) {
|
|
@@ -18553,7 +18679,7 @@ function generateTrackFns(job) {
|
|
|
18553
18679
|
}
|
|
18554
18680
|
}
|
|
18555
18681
|
|
|
18556
|
-
// bazel-out/
|
|
18682
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_optimization.mjs
|
|
18557
18683
|
function optimizeTrackFns(job) {
|
|
18558
18684
|
for (const unit of job.units) {
|
|
18559
18685
|
for (const op of unit.create) {
|
|
@@ -18600,7 +18726,7 @@ function isTrackByFunctionCall(rootView, expr) {
|
|
|
18600
18726
|
return true;
|
|
18601
18727
|
}
|
|
18602
18728
|
|
|
18603
|
-
// bazel-out/
|
|
18729
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_variables.mjs
|
|
18604
18730
|
function generateTrackVariables(job) {
|
|
18605
18731
|
for (const unit of job.units) {
|
|
18606
18732
|
for (const op of unit.create) {
|
|
@@ -18621,7 +18747,7 @@ function generateTrackVariables(job) {
|
|
|
18621
18747
|
}
|
|
18622
18748
|
}
|
|
18623
18749
|
|
|
18624
|
-
// bazel-out/
|
|
18750
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
|
|
18625
18751
|
function countVariables(job) {
|
|
18626
18752
|
for (const unit of job.units) {
|
|
18627
18753
|
let varCount = 0;
|
|
@@ -18726,7 +18852,7 @@ function isSingletonInterpolation(expr) {
|
|
|
18726
18852
|
return true;
|
|
18727
18853
|
}
|
|
18728
18854
|
|
|
18729
|
-
// bazel-out/
|
|
18855
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
|
|
18730
18856
|
function optimizeVariables(job) {
|
|
18731
18857
|
for (const unit of job.units) {
|
|
18732
18858
|
inlineAlwaysInlineVariables(unit.create);
|
|
@@ -18976,7 +19102,7 @@ function allowConservativeInlining(decl, target) {
|
|
|
18976
19102
|
}
|
|
18977
19103
|
}
|
|
18978
19104
|
|
|
18979
|
-
// bazel-out/
|
|
19105
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/wrap_icus.mjs
|
|
18980
19106
|
function wrapI18nIcus(job) {
|
|
18981
19107
|
for (const unit of job.units) {
|
|
18982
19108
|
let currentI18nOp = null;
|
|
@@ -19006,17 +19132,17 @@ function wrapI18nIcus(job) {
|
|
|
19006
19132
|
}
|
|
19007
19133
|
}
|
|
19008
19134
|
|
|
19009
|
-
// bazel-out/
|
|
19135
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
|
|
19010
19136
|
var phases = [
|
|
19011
19137
|
{ kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },
|
|
19012
19138
|
{ kind: CompilationJobKind.Host, fn: parseHostStyleProperties },
|
|
19013
19139
|
{ kind: CompilationJobKind.Tmpl, fn: emitNamespaceChanges },
|
|
19014
19140
|
{ kind: CompilationJobKind.Tmpl, fn: propagateI18nBlocks },
|
|
19015
19141
|
{ kind: CompilationJobKind.Tmpl, fn: wrapI18nIcus },
|
|
19016
|
-
{ kind: CompilationJobKind.Tmpl, fn: createI18nContexts },
|
|
19017
19142
|
{ kind: CompilationJobKind.Both, fn: specializeStyleBindings },
|
|
19018
19143
|
{ kind: CompilationJobKind.Both, fn: specializeBindings },
|
|
19019
19144
|
{ kind: CompilationJobKind.Both, fn: extractAttributes },
|
|
19145
|
+
{ kind: CompilationJobKind.Tmpl, fn: createI18nContexts },
|
|
19020
19146
|
{ kind: CompilationJobKind.Both, fn: parseExtractedStyles },
|
|
19021
19147
|
{ kind: CompilationJobKind.Tmpl, fn: removeEmptyBindings },
|
|
19022
19148
|
{ kind: CompilationJobKind.Both, fn: collapseSingletonInterpolations },
|
|
@@ -19034,7 +19160,7 @@ var phases = [
|
|
|
19034
19160
|
{ kind: CompilationJobKind.Tmpl, fn: generateProjectionDefs },
|
|
19035
19161
|
{ kind: CompilationJobKind.Tmpl, fn: generateVariables },
|
|
19036
19162
|
{ kind: CompilationJobKind.Tmpl, fn: saveAndRestoreView },
|
|
19037
|
-
{ kind: CompilationJobKind.
|
|
19163
|
+
{ kind: CompilationJobKind.Both, fn: deleteAnyCasts },
|
|
19038
19164
|
{ kind: CompilationJobKind.Both, fn: resolveDollarEvent },
|
|
19039
19165
|
{ kind: CompilationJobKind.Tmpl, fn: generateRepeaterDerivedVars },
|
|
19040
19166
|
{ kind: CompilationJobKind.Tmpl, fn: generateTrackVariables },
|
|
@@ -19042,7 +19168,7 @@ var phases = [
|
|
|
19042
19168
|
{ kind: CompilationJobKind.Tmpl, fn: resolveDeferTargetNames },
|
|
19043
19169
|
{ kind: CompilationJobKind.Tmpl, fn: optimizeTrackFns },
|
|
19044
19170
|
{ kind: CompilationJobKind.Both, fn: resolveContexts },
|
|
19045
|
-
{ kind: CompilationJobKind.
|
|
19171
|
+
{ kind: CompilationJobKind.Both, fn: resolveSanitizers },
|
|
19046
19172
|
{ kind: CompilationJobKind.Tmpl, fn: liftLocalRefs },
|
|
19047
19173
|
{ kind: CompilationJobKind.Both, fn: generateNullishCoalesceExpressions },
|
|
19048
19174
|
{ kind: CompilationJobKind.Both, fn: expandSafeReads },
|
|
@@ -19172,8 +19298,10 @@ function emitHostBindingFunction(job) {
|
|
|
19172
19298
|
);
|
|
19173
19299
|
}
|
|
19174
19300
|
|
|
19175
|
-
// bazel-out/
|
|
19301
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
|
|
19176
19302
|
var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
|
|
19303
|
+
var domSchema = new DomElementSchemaRegistry();
|
|
19304
|
+
var NG_TEMPLATE_TAG_NAME = "ng-template";
|
|
19177
19305
|
function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta) {
|
|
19178
19306
|
const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta);
|
|
19179
19307
|
ingestNodes(job.root, template2);
|
|
@@ -19183,17 +19311,27 @@ function ingestHostBinding(input, bindingParser, constantPool) {
|
|
|
19183
19311
|
var _a2, _b2, _c2;
|
|
19184
19312
|
const job = new HostBindingCompilationJob(input.componentName, constantPool, compatibilityMode);
|
|
19185
19313
|
for (const property2 of (_a2 = input.properties) != null ? _a2 : []) {
|
|
19186
|
-
|
|
19314
|
+
let bindingKind = BindingKind.Property;
|
|
19315
|
+
if (property2.name.startsWith("attr.")) {
|
|
19316
|
+
property2.name = property2.name.substring("attr.".length);
|
|
19317
|
+
bindingKind = BindingKind.Attribute;
|
|
19318
|
+
}
|
|
19319
|
+
if (property2.isAnimation) {
|
|
19320
|
+
bindingKind = BindingKind.Animation;
|
|
19321
|
+
}
|
|
19322
|
+
const securityContexts = bindingParser.calcPossibleSecurityContexts(input.componentSelector, property2.name, bindingKind === BindingKind.Attribute).filter((context) => context !== SecurityContext.NONE);
|
|
19323
|
+
ingestHostProperty(job, property2, bindingKind, false, securityContexts);
|
|
19187
19324
|
}
|
|
19188
19325
|
for (const [name, expr] of (_b2 = Object.entries(input.attributes)) != null ? _b2 : []) {
|
|
19189
|
-
|
|
19326
|
+
const securityContexts = bindingParser.calcPossibleSecurityContexts(input.componentSelector, name, true).filter((context) => context !== SecurityContext.NONE);
|
|
19327
|
+
ingestHostAttribute(job, name, expr, securityContexts);
|
|
19190
19328
|
}
|
|
19191
19329
|
for (const event of (_c2 = input.events) != null ? _c2 : []) {
|
|
19192
19330
|
ingestHostEvent(job, event);
|
|
19193
19331
|
}
|
|
19194
19332
|
return job;
|
|
19195
19333
|
}
|
|
19196
|
-
function ingestHostProperty(job, property2, isTextAttribute) {
|
|
19334
|
+
function ingestHostProperty(job, property2, bindingKind, isTextAttribute, securityContexts) {
|
|
19197
19335
|
let expression;
|
|
19198
19336
|
const ast = property2.expression.ast;
|
|
19199
19337
|
if (ast instanceof Interpolation) {
|
|
@@ -19201,33 +19339,27 @@ function ingestHostProperty(job, property2, isTextAttribute) {
|
|
|
19201
19339
|
} else {
|
|
19202
19340
|
expression = convertAst(ast, job, property2.sourceSpan);
|
|
19203
19341
|
}
|
|
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));
|
|
19342
|
+
job.root.update.push(createBindingOp(job.root.xref, bindingKind, property2.name, expression, null, securityContexts, isTextAttribute, false, null, null, property2.sourceSpan));
|
|
19213
19343
|
}
|
|
19214
|
-
function ingestHostAttribute(job, name, value) {
|
|
19344
|
+
function ingestHostAttribute(job, name, value, securityContexts) {
|
|
19215
19345
|
const attrBinding = createBindingOp(
|
|
19216
19346
|
job.root.xref,
|
|
19217
19347
|
BindingKind.Attribute,
|
|
19218
19348
|
name,
|
|
19219
19349
|
value,
|
|
19220
19350
|
null,
|
|
19221
|
-
|
|
19351
|
+
securityContexts,
|
|
19222
19352
|
true,
|
|
19223
19353
|
false,
|
|
19224
19354
|
null,
|
|
19355
|
+
null,
|
|
19225
19356
|
null
|
|
19226
19357
|
);
|
|
19227
19358
|
job.root.update.push(attrBinding);
|
|
19228
19359
|
}
|
|
19229
19360
|
function ingestHostEvent(job, event) {
|
|
19230
|
-
const
|
|
19361
|
+
const [phase, target] = event.type === 0 ? [null, event.targetOrPhase] : [event.targetOrPhase, null];
|
|
19362
|
+
const eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, [], phase, target, true, event.sourceSpan);
|
|
19231
19363
|
eventBinding.handlerOps.push(createStatementOp(new ReturnStatement(convertAst(event.handler.ast, job, event.sourceSpan), event.handlerSpan)));
|
|
19232
19364
|
job.root.create.push(eventBinding);
|
|
19233
19365
|
}
|
|
@@ -19267,14 +19399,17 @@ function ingestElement(unit, element2) {
|
|
|
19267
19399
|
const [namespaceKey, elementName] = splitNsName(element2.name);
|
|
19268
19400
|
const startOp = createElementStartOp(elementName, id, namespaceForKey(namespaceKey), element2.i18n instanceof TagPlaceholder ? element2.i18n : void 0, element2.startSourceSpan);
|
|
19269
19401
|
unit.create.push(startOp);
|
|
19270
|
-
|
|
19402
|
+
ingestElementBindings(unit, startOp, element2);
|
|
19271
19403
|
ingestReferences(startOp, element2);
|
|
19404
|
+
let i18nBlockId = null;
|
|
19405
|
+
if (element2.i18n instanceof Message) {
|
|
19406
|
+
i18nBlockId = unit.job.allocateXrefId();
|
|
19407
|
+
unit.create.push(createI18nStartOp(i18nBlockId, element2.i18n));
|
|
19408
|
+
}
|
|
19272
19409
|
ingestNodes(unit, element2.children);
|
|
19273
19410
|
const endOp = createElementEndOp(id, (_a2 = element2.endSourceSpan) != null ? _a2 : element2.startSourceSpan);
|
|
19274
19411
|
unit.create.push(endOp);
|
|
19275
|
-
if (
|
|
19276
|
-
const i18nBlockId = unit.job.allocateXrefId();
|
|
19277
|
-
OpList.insertAfter(createI18nStartOp(i18nBlockId, element2.i18n), startOp);
|
|
19412
|
+
if (i18nBlockId !== null) {
|
|
19278
19413
|
OpList.insertBefore(createI18nEndOp(i18nBlockId), endOp);
|
|
19279
19414
|
}
|
|
19280
19415
|
}
|
|
@@ -19294,7 +19429,7 @@ function ingestTemplate(unit, tmpl) {
|
|
|
19294
19429
|
const templateKind = isPlainTemplate(tmpl) ? TemplateKind.NgTemplate : TemplateKind.Structural;
|
|
19295
19430
|
const templateOp = createTemplateOp(childView.xref, templateKind, tagNameWithoutNamespace, functionNameSuffix, namespace, i18nPlaceholder, tmpl.startSourceSpan);
|
|
19296
19431
|
unit.create.push(templateOp);
|
|
19297
|
-
|
|
19432
|
+
ingestTemplateBindings(unit, templateOp, tmpl, templateKind);
|
|
19298
19433
|
ingestReferences(templateOp, tmpl);
|
|
19299
19434
|
ingestNodes(childView, tmpl.children);
|
|
19300
19435
|
for (const { name, value } of tmpl.variables) {
|
|
@@ -19313,7 +19448,8 @@ function ingestContent(unit, content) {
|
|
|
19313
19448
|
const attrs = content.attributes.flatMap((a) => [a.name, a.value]);
|
|
19314
19449
|
const op = createProjectionOp(unit.job.allocateXrefId(), content.selector, content.i18n, attrs, content.sourceSpan);
|
|
19315
19450
|
for (const attr of content.attributes) {
|
|
19316
|
-
|
|
19451
|
+
const securityContext = domSchema.securityContext(content.name, attr.name, true);
|
|
19452
|
+
unit.update.push(createBindingOp(op.xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
|
|
19317
19453
|
}
|
|
19318
19454
|
unit.create.push(op);
|
|
19319
19455
|
}
|
|
@@ -19407,35 +19543,38 @@ function ingestSwitchBlock(unit, switchBlock) {
|
|
|
19407
19543
|
const conditional2 = createConditionalOp(firstXref, firstSlotHandle, convertAst(switchBlock.expression, unit.job, null), conditions, switchBlock.sourceSpan);
|
|
19408
19544
|
unit.update.push(conditional2);
|
|
19409
19545
|
}
|
|
19410
|
-
function ingestDeferView(unit, suffix, children, sourceSpan) {
|
|
19546
|
+
function ingestDeferView(unit, suffix, i18nMeta, children, sourceSpan) {
|
|
19547
|
+
if (i18nMeta !== void 0 && !(i18nMeta instanceof BlockPlaceholder)) {
|
|
19548
|
+
throw Error("Unhandled i18n metadata type for defer block");
|
|
19549
|
+
}
|
|
19411
19550
|
if (children === void 0) {
|
|
19412
19551
|
return null;
|
|
19413
19552
|
}
|
|
19414
19553
|
const secondaryView = unit.job.allocateView(unit.xref);
|
|
19415
19554
|
ingestNodes(secondaryView, children);
|
|
19416
|
-
const templateOp = createTemplateOp(secondaryView.xref, TemplateKind.Block, null, `Defer${suffix}`, Namespace.HTML,
|
|
19555
|
+
const templateOp = createTemplateOp(secondaryView.xref, TemplateKind.Block, null, `Defer${suffix}`, Namespace.HTML, i18nMeta, sourceSpan);
|
|
19417
19556
|
unit.create.push(templateOp);
|
|
19418
19557
|
return templateOp;
|
|
19419
19558
|
}
|
|
19420
19559
|
function ingestDeferBlock(unit, deferBlock) {
|
|
19421
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
19560
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
19422
19561
|
const blockMeta = unit.job.deferBlocksMeta.get(deferBlock);
|
|
19423
19562
|
if (blockMeta === void 0) {
|
|
19424
19563
|
throw new Error(`AssertionError: unable to find metadata for deferred block`);
|
|
19425
19564
|
}
|
|
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", (
|
|
19565
|
+
const main = ingestDeferView(unit, "", deferBlock.i18n, deferBlock.children, deferBlock.sourceSpan);
|
|
19566
|
+
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);
|
|
19567
|
+
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);
|
|
19568
|
+
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
19569
|
const deferXref = unit.job.allocateXrefId();
|
|
19431
19570
|
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 = (
|
|
19571
|
+
deferOp.placeholderView = (_j = placeholder == null ? void 0 : placeholder.xref) != null ? _j : null;
|
|
19572
|
+
deferOp.placeholderSlot = (_k = placeholder == null ? void 0 : placeholder.handle) != null ? _k : null;
|
|
19573
|
+
deferOp.loadingSlot = (_l = loading == null ? void 0 : loading.handle) != null ? _l : null;
|
|
19574
|
+
deferOp.errorSlot = (_m = error2 == null ? void 0 : error2.handle) != null ? _m : null;
|
|
19575
|
+
deferOp.placeholderMinimumTime = (_o = (_n = deferBlock.placeholder) == null ? void 0 : _n.minimumTime) != null ? _o : null;
|
|
19576
|
+
deferOp.loadingMinimumTime = (_q = (_p = deferBlock.loading) == null ? void 0 : _p.minimumTime) != null ? _q : null;
|
|
19577
|
+
deferOp.loadingAfterTime = (_s = (_r = deferBlock.loading) == null ? void 0 : _r.afterTime) != null ? _s : null;
|
|
19439
19578
|
unit.create.push(deferOp);
|
|
19440
19579
|
let prefetch = false;
|
|
19441
19580
|
let deferOnOps = [];
|
|
@@ -19517,7 +19656,7 @@ function ingestIcu(unit, icu) {
|
|
|
19517
19656
|
}
|
|
19518
19657
|
}
|
|
19519
19658
|
function ingestForBlock(unit, forBlock) {
|
|
19520
|
-
var _a2;
|
|
19659
|
+
var _a2, _b2, _c2;
|
|
19521
19660
|
const repeaterView = unit.job.allocateView(unit.xref);
|
|
19522
19661
|
const createRepeaterAlias = (ident, repeaterVar) => {
|
|
19523
19662
|
repeaterView.aliases.add({
|
|
@@ -19551,8 +19690,16 @@ function ingestForBlock(unit, forBlock) {
|
|
|
19551
19690
|
$odd: forBlock.contextVariables.$odd.name,
|
|
19552
19691
|
$implicit: forBlock.item.name
|
|
19553
19692
|
};
|
|
19693
|
+
if (forBlock.i18n !== void 0 && !(forBlock.i18n instanceof BlockPlaceholder)) {
|
|
19694
|
+
throw Error("AssertionError: Unhandled i18n metadata type or @for");
|
|
19695
|
+
}
|
|
19696
|
+
if (((_a2 = forBlock.empty) == null ? void 0 : _a2.i18n) !== void 0 && !(forBlock.empty.i18n instanceof BlockPlaceholder)) {
|
|
19697
|
+
throw Error("AssertionError: Unhandled i18n metadata type or @empty");
|
|
19698
|
+
}
|
|
19699
|
+
const i18nPlaceholder = forBlock.i18n;
|
|
19700
|
+
const emptyI18nPlaceholder = (_b2 = forBlock.empty) == null ? void 0 : _b2.i18n;
|
|
19554
19701
|
const tagName = ingestControlFlowInsertionPoint(unit, repeaterView.xref, forBlock);
|
|
19555
|
-
const repeaterCreate2 = createRepeaterCreateOp(repeaterView.xref, (
|
|
19702
|
+
const repeaterCreate2 = createRepeaterCreateOp(repeaterView.xref, (_c2 = emptyView == null ? void 0 : emptyView.xref) != null ? _c2 : null, tagName, track, varNames, i18nPlaceholder, emptyI18nPlaceholder, forBlock.sourceSpan);
|
|
19556
19703
|
unit.create.push(repeaterCreate2);
|
|
19557
19704
|
const expression = convertAst(forBlock.expression, unit.job, convertSourceSpan(forBlock.expression.span, forBlock.sourceSpan));
|
|
19558
19705
|
const repeater2 = createRepeaterOp(repeaterCreate2.xref, repeaterCreate2.handle, expression, forBlock.sourceSpan);
|
|
@@ -19640,120 +19787,128 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
19640
19787
|
throw new Error(`Unhandled expression type "${ast.constructor.name}" in file "${baseSourceSpan == null ? void 0 : baseSourceSpan.start.file.url}"`);
|
|
19641
19788
|
}
|
|
19642
19789
|
}
|
|
19790
|
+
function convertAstWithInterpolation(job, value, i18nMeta) {
|
|
19791
|
+
var _a2, _b2;
|
|
19792
|
+
let expression;
|
|
19793
|
+
if (value instanceof Interpolation) {
|
|
19794
|
+
expression = new Interpolation2(value.strings, value.expressions.map((e) => convertAst(e, job, null)), Object.keys((_b2 = (_a2 = asMessage(i18nMeta)) == null ? void 0 : _a2.placeholders) != null ? _b2 : {}));
|
|
19795
|
+
} else if (value instanceof AST) {
|
|
19796
|
+
expression = convertAst(value, job, null);
|
|
19797
|
+
} else {
|
|
19798
|
+
expression = literal(value);
|
|
19799
|
+
}
|
|
19800
|
+
return expression;
|
|
19801
|
+
}
|
|
19802
|
+
var BINDING_KINDS = /* @__PURE__ */ new Map([
|
|
19803
|
+
[0, BindingKind.Property],
|
|
19804
|
+
[1, BindingKind.Attribute],
|
|
19805
|
+
[2, BindingKind.ClassName],
|
|
19806
|
+
[3, BindingKind.StyleProperty],
|
|
19807
|
+
[4, BindingKind.Animation]
|
|
19808
|
+
]);
|
|
19643
19809
|
function isPlainTemplate(tmpl) {
|
|
19644
19810
|
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
|
-
}
|
|
19811
|
+
return splitNsName((_a2 = tmpl.tagName) != null ? _a2 : "")[1] === NG_TEMPLATE_TAG_NAME;
|
|
19812
|
+
}
|
|
19813
|
+
function asMessage(i18nMeta) {
|
|
19814
|
+
if (i18nMeta == null) {
|
|
19815
|
+
return null;
|
|
19665
19816
|
}
|
|
19817
|
+
if (!(i18nMeta instanceof Message)) {
|
|
19818
|
+
throw Error(`Expected i18n meta to be a Message, but got: ${i18nMeta.constructor.name}`);
|
|
19819
|
+
}
|
|
19820
|
+
return i18nMeta;
|
|
19821
|
+
}
|
|
19822
|
+
function ingestElementBindings(unit, op, element2) {
|
|
19823
|
+
var _a2;
|
|
19824
|
+
let bindings = new Array();
|
|
19666
19825
|
for (const attr of element2.attributes) {
|
|
19667
|
-
|
|
19668
|
-
|
|
19826
|
+
const securityContext = domSchema.securityContext(element2.name, attr.name, true);
|
|
19827
|
+
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
19828
|
}
|
|
19670
19829
|
for (const input of element2.inputs) {
|
|
19671
|
-
|
|
19672
|
-
hasI18nAttributes || (hasI18nAttributes = input.i18n !== void 0);
|
|
19830
|
+
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
19831
|
}
|
|
19832
|
+
unit.create.push(bindings.filter((b) => (b == null ? void 0 : b.kind) === OpKind.ExtractedAttribute));
|
|
19833
|
+
unit.update.push(bindings.filter((b) => (b == null ? void 0 : b.kind) === OpKind.Binding));
|
|
19674
19834
|
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;
|
|
19684
|
-
}
|
|
19685
|
-
listenerOp = createListenerOp(op.xref, op.handle, output.name, op.tag, output.phase, false, output.sourceSpan);
|
|
19686
|
-
let handlerExprs;
|
|
19687
|
-
let handler = output.handler;
|
|
19688
|
-
if (handler instanceof ASTWithSource) {
|
|
19689
|
-
handler = handler.ast;
|
|
19835
|
+
if (output.type === 1 && output.phase === null) {
|
|
19836
|
+
throw Error("Animation listener should have a phase");
|
|
19690
19837
|
}
|
|
19691
|
-
|
|
19692
|
-
|
|
19838
|
+
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));
|
|
19839
|
+
}
|
|
19840
|
+
if (bindings.some((b) => b == null ? void 0 : b.i18nMessage) !== null) {
|
|
19841
|
+
unit.create.push(createI18nAttributesOp(unit.job.allocateXrefId(), new SlotHandle(), op.xref));
|
|
19842
|
+
}
|
|
19843
|
+
}
|
|
19844
|
+
function ingestTemplateBindings(unit, op, template2, templateKind) {
|
|
19845
|
+
let bindings = new Array();
|
|
19846
|
+
for (const attr of template2.templateAttrs) {
|
|
19847
|
+
if (attr instanceof TextAttribute) {
|
|
19848
|
+
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
|
|
19849
|
+
bindings.push(createTemplateBinding(unit, op.xref, 1, attr.name, attr.value, null, securityContext, true, templateKind, asMessage(attr.i18n), attr.sourceSpan));
|
|
19693
19850
|
} else {
|
|
19694
|
-
|
|
19851
|
+
bindings.push(createTemplateBinding(unit, op.xref, attr.type, attr.name, astOf(attr.value), attr.unit, attr.securityContext, true, templateKind, asMessage(attr.i18n), attr.sourceSpan));
|
|
19852
|
+
}
|
|
19853
|
+
}
|
|
19854
|
+
for (const attr of template2.attributes) {
|
|
19855
|
+
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
|
|
19856
|
+
bindings.push(createTemplateBinding(unit, op.xref, 1, attr.name, attr.value, null, securityContext, false, templateKind, asMessage(attr.i18n), attr.sourceSpan));
|
|
19857
|
+
}
|
|
19858
|
+
for (const input of template2.inputs) {
|
|
19859
|
+
bindings.push(createTemplateBinding(unit, op.xref, input.type, input.name, astOf(input.value), input.unit, input.securityContext, false, templateKind, asMessage(input.i18n), input.sourceSpan));
|
|
19860
|
+
}
|
|
19861
|
+
unit.create.push(bindings.filter((b) => (b == null ? void 0 : b.kind) === OpKind.ExtractedAttribute));
|
|
19862
|
+
unit.update.push(bindings.filter((b) => (b == null ? void 0 : b.kind) === OpKind.Binding));
|
|
19863
|
+
for (const output of template2.outputs) {
|
|
19864
|
+
if (output.type === 1 && output.phase === null) {
|
|
19865
|
+
throw Error("Animation listener should have a phase");
|
|
19695
19866
|
}
|
|
19696
|
-
if (
|
|
19697
|
-
|
|
19867
|
+
if (templateKind === TemplateKind.NgTemplate) {
|
|
19868
|
+
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
19869
|
}
|
|
19699
|
-
|
|
19700
|
-
|
|
19701
|
-
|
|
19702
|
-
const stmtOp = createStatementOp(new ExpressionStatement(expr, expr.sourceSpan));
|
|
19703
|
-
listenerOp.handlerOps.push(stmtOp);
|
|
19870
|
+
if (templateKind === TemplateKind.Structural && output.type !== 1) {
|
|
19871
|
+
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, output.name, false);
|
|
19872
|
+
unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, output.name, null, null, null, securityContext));
|
|
19704
19873
|
}
|
|
19705
|
-
listenerOp.handlerOps.push(createStatementOp(new ReturnStatement(returnExpr, returnExpr.sourceSpan)));
|
|
19706
|
-
unit.create.push(listenerOp);
|
|
19707
19874
|
}
|
|
19708
|
-
if (
|
|
19875
|
+
if (bindings.some((b) => b == null ? void 0 : b.i18nMessage) !== null) {
|
|
19709
19876
|
unit.create.push(createI18nAttributesOp(unit.job.allocateXrefId(), new SlotHandle(), op.xref));
|
|
19710
19877
|
}
|
|
19711
19878
|
}
|
|
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}`);
|
|
19879
|
+
function createTemplateBinding(view, xref, type, name, value, unit, securityContext, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
|
|
19880
|
+
const isTextBinding = typeof value === "string";
|
|
19881
|
+
if (templateKind === TemplateKind.Structural) {
|
|
19882
|
+
if (!isStructuralTemplateAttribute && (type === 0 || type === 2 || type === 3)) {
|
|
19883
|
+
return createExtractedAttributeOp(xref, BindingKind.Property, name, null, null, i18nMessage, securityContext);
|
|
19884
|
+
}
|
|
19885
|
+
if (!isTextBinding && (type === 1 || type === 4)) {
|
|
19886
|
+
return null;
|
|
19735
19887
|
}
|
|
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
19888
|
}
|
|
19743
|
-
let
|
|
19744
|
-
if (
|
|
19745
|
-
|
|
19746
|
-
|
|
19747
|
-
i18nPlaceholders = Object.keys(i18nMeta.placeholders);
|
|
19889
|
+
let bindingType = BINDING_KINDS.get(type);
|
|
19890
|
+
if (templateKind === TemplateKind.NgTemplate) {
|
|
19891
|
+
if (type === 2 || type === 3 || type === 1 && !isTextBinding) {
|
|
19892
|
+
bindingType = BindingKind.Property;
|
|
19748
19893
|
}
|
|
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
19894
|
}
|
|
19755
|
-
|
|
19756
|
-
|
|
19895
|
+
return createBindingOp(xref, bindingType, name, convertAstWithInterpolation(view.job, value, i18nMessage), unit, securityContext, isTextBinding, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan);
|
|
19896
|
+
}
|
|
19897
|
+
function makeListenerHandlerOps(unit, handler, handlerSpan) {
|
|
19898
|
+
handler = astOf(handler);
|
|
19899
|
+
const handlerOps = new Array();
|
|
19900
|
+
let handlerExprs = handler instanceof Chain ? handler.expressions : [handler];
|
|
19901
|
+
if (handlerExprs.length === 0) {
|
|
19902
|
+
throw new Error("Expected listener to have non-empty expression list.");
|
|
19903
|
+
}
|
|
19904
|
+
const expressions = handlerExprs.map((expr) => convertAst(expr, unit.job, handlerSpan));
|
|
19905
|
+
const returnExpr = expressions.pop();
|
|
19906
|
+
handlerOps.push(...expressions.map((e) => createStatementOp(new ExpressionStatement(e, e.sourceSpan))));
|
|
19907
|
+
handlerOps.push(createStatementOp(new ReturnStatement(returnExpr, returnExpr.sourceSpan)));
|
|
19908
|
+
return handlerOps;
|
|
19909
|
+
}
|
|
19910
|
+
function astOf(ast) {
|
|
19911
|
+
return ast instanceof ASTWithSource ? ast.ast : ast;
|
|
19757
19912
|
}
|
|
19758
19913
|
function ingestReferences(op, element2) {
|
|
19759
19914
|
assertIsArray(op.localRefs);
|
|
@@ -19793,18 +19948,19 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
19793
19948
|
}
|
|
19794
19949
|
if (root !== null) {
|
|
19795
19950
|
for (const attr of root.attributes) {
|
|
19796
|
-
|
|
19951
|
+
const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
|
|
19952
|
+
unit.update.push(createBindingOp(xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
|
|
19797
19953
|
}
|
|
19798
19954
|
const tagName = root instanceof Element ? root.name : root.tagName;
|
|
19799
|
-
return tagName ===
|
|
19955
|
+
return tagName === NG_TEMPLATE_TAG_NAME ? null : tagName;
|
|
19800
19956
|
}
|
|
19801
19957
|
return null;
|
|
19802
19958
|
}
|
|
19803
19959
|
|
|
19804
|
-
// bazel-out/
|
|
19960
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/switch/index.mjs
|
|
19805
19961
|
var USE_TEMPLATE_PIPELINE = false;
|
|
19806
19962
|
|
|
19807
|
-
// bazel-out/
|
|
19963
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/styling_builder.mjs
|
|
19808
19964
|
var IMPORTANT_FLAG = "!important";
|
|
19809
19965
|
var MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;
|
|
19810
19966
|
var StylingBuilder = class {
|
|
@@ -20137,7 +20293,7 @@ function isEmptyExpression(ast) {
|
|
|
20137
20293
|
return ast instanceof EmptyExpr;
|
|
20138
20294
|
}
|
|
20139
20295
|
|
|
20140
|
-
// bazel-out/
|
|
20296
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
20141
20297
|
var HtmlParser = class extends Parser2 {
|
|
20142
20298
|
constructor() {
|
|
20143
20299
|
super(getHtmlTagDefinition);
|
|
@@ -20147,7 +20303,7 @@ var HtmlParser = class extends Parser2 {
|
|
|
20147
20303
|
}
|
|
20148
20304
|
};
|
|
20149
20305
|
|
|
20150
|
-
// bazel-out/
|
|
20306
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
20151
20307
|
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
20152
20308
|
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
20153
20309
|
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
@@ -20213,7 +20369,7 @@ function visitAllWithSiblings(visitor, nodes) {
|
|
|
20213
20369
|
return result;
|
|
20214
20370
|
}
|
|
20215
20371
|
|
|
20216
|
-
// bazel-out/
|
|
20372
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
20217
20373
|
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
20218
20374
|
var ATTRIBUTE_PREFIX = "attr";
|
|
20219
20375
|
var CLASS_PREFIX = "class";
|
|
@@ -20533,7 +20689,7 @@ function moveParseSourceSpan(sourceSpan, absoluteSpan) {
|
|
|
20533
20689
|
return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);
|
|
20534
20690
|
}
|
|
20535
20691
|
|
|
20536
|
-
// bazel-out/
|
|
20692
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
|
|
20537
20693
|
function isStyleUrlResolvable(url) {
|
|
20538
20694
|
if (url == null || url.length === 0 || url[0] == "/")
|
|
20539
20695
|
return false;
|
|
@@ -20542,7 +20698,7 @@ function isStyleUrlResolvable(url) {
|
|
|
20542
20698
|
}
|
|
20543
20699
|
var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
|
|
20544
20700
|
|
|
20545
|
-
// bazel-out/
|
|
20701
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
|
|
20546
20702
|
var NG_CONTENT_SELECT_ATTR = "select";
|
|
20547
20703
|
var LINK_ELEMENT = "link";
|
|
20548
20704
|
var LINK_STYLE_REL_ATTR = "rel";
|
|
@@ -20612,7 +20768,7 @@ function normalizeNgContentSelect(selectAttr) {
|
|
|
20612
20768
|
return selectAttr;
|
|
20613
20769
|
}
|
|
20614
20770
|
|
|
20615
|
-
// bazel-out/
|
|
20771
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
|
|
20616
20772
|
var FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/;
|
|
20617
20773
|
var FOR_LOOP_TRACK_PATTERN = /^track\s+([\S\s]*)/;
|
|
20618
20774
|
var CONDITIONAL_ALIAS_PATTERN = /^as\s+(.*)/;
|
|
@@ -20903,7 +21059,7 @@ function stripOptionalParentheses(param, errors) {
|
|
|
20903
21059
|
return expression.slice(start, end);
|
|
20904
21060
|
}
|
|
20905
21061
|
|
|
20906
|
-
// bazel-out/
|
|
21062
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
|
|
20907
21063
|
var TIME_PATTERN = /^\d+\.?\d*(ms|s)?$/;
|
|
20908
21064
|
var SEPARATOR_PATTERN = /^\s$/;
|
|
20909
21065
|
var COMMA_DELIMITED_SYNTAX = /* @__PURE__ */ new Map([
|
|
@@ -21167,7 +21323,7 @@ function parseDeferredTime(value) {
|
|
|
21167
21323
|
return parseFloat(time) * (units === "s" ? 1e3 : 1);
|
|
21168
21324
|
}
|
|
21169
21325
|
|
|
21170
|
-
// bazel-out/
|
|
21326
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
|
|
21171
21327
|
var PREFETCH_WHEN_PATTERN = /^prefetch\s+when\s/;
|
|
21172
21328
|
var PREFETCH_ON_PATTERN = /^prefetch\s+on\s/;
|
|
21173
21329
|
var MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
|
|
@@ -21302,7 +21458,7 @@ function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
|
21302
21458
|
return { triggers, prefetchTriggers };
|
|
21303
21459
|
}
|
|
21304
21460
|
|
|
21305
|
-
// bazel-out/
|
|
21461
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
|
|
21306
21462
|
var BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;
|
|
21307
21463
|
var KW_BIND_IDX = 1;
|
|
21308
21464
|
var KW_LET_IDX = 2;
|
|
@@ -21733,7 +21889,7 @@ function textContents(node) {
|
|
|
21733
21889
|
}
|
|
21734
21890
|
}
|
|
21735
21891
|
|
|
21736
|
-
// bazel-out/
|
|
21892
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/context.mjs
|
|
21737
21893
|
var TagType;
|
|
21738
21894
|
(function(TagType2) {
|
|
21739
21895
|
TagType2[TagType2["ELEMENT"] = 0] = "ELEMENT";
|
|
@@ -21878,21 +22034,21 @@ function serializePlaceholderValue(value) {
|
|
|
21878
22034
|
}
|
|
21879
22035
|
}
|
|
21880
22036
|
|
|
21881
|
-
// bazel-out/
|
|
22037
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
|
|
21882
22038
|
var NG_CONTENT_SELECT_ATTR2 = "select";
|
|
21883
22039
|
var NG_PROJECT_AS_ATTR_NAME = "ngProjectAs";
|
|
21884
22040
|
var EVENT_BINDING_SCOPE_GLOBALS = /* @__PURE__ */ new Set(["$event"]);
|
|
21885
|
-
var
|
|
21886
|
-
var
|
|
22041
|
+
var NG_TEMPLATE_TAG_NAME2 = "ng-template";
|
|
22042
|
+
var GLOBAL_TARGET_RESOLVERS2 = /* @__PURE__ */ new Map([["window", Identifiers.resolveWindow], ["document", Identifiers.resolveDocument], ["body", Identifiers.resolveBody]]);
|
|
21887
22043
|
var LEADING_TRIVIA_CHARS = [" ", "\n", "\r", " "];
|
|
21888
22044
|
function renderFlagCheckIfStmt(flags, statements) {
|
|
21889
22045
|
return ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(flags), null, false), statements);
|
|
21890
22046
|
}
|
|
21891
22047
|
function prepareEventListenerParameters(eventAst, handlerName = null, scope = null) {
|
|
21892
22048
|
const { type, name, target, phase, handler } = eventAst;
|
|
21893
|
-
if (target && !
|
|
22049
|
+
if (target && !GLOBAL_TARGET_RESOLVERS2.has(target)) {
|
|
21894
22050
|
throw new Error(`Unexpected global target '${target}' defined for '${name}' event.
|
|
21895
|
-
Supported list of global targets: ${Array.from(
|
|
22051
|
+
Supported list of global targets: ${Array.from(GLOBAL_TARGET_RESOLVERS2.keys())}.`);
|
|
21896
22052
|
}
|
|
21897
22053
|
const eventArgumentName = "$event";
|
|
21898
22054
|
const implicitReceiverAccesses = /* @__PURE__ */ new Set();
|
|
@@ -21925,7 +22081,7 @@ function prepareEventListenerParameters(eventAst, handlerName = null, scope = nu
|
|
|
21925
22081
|
if (target) {
|
|
21926
22082
|
params.push(
|
|
21927
22083
|
literal(false),
|
|
21928
|
-
importExpr(
|
|
22084
|
+
importExpr(GLOBAL_TARGET_RESOLVERS2.get(target))
|
|
21929
22085
|
);
|
|
21930
22086
|
}
|
|
21931
22087
|
return params;
|
|
@@ -22471,10 +22627,10 @@ var TemplateDefinitionBuilder = class {
|
|
|
22471
22627
|
var _a2;
|
|
22472
22628
|
const tagNameWithoutNamespace = template2.tagName ? splitNsName(template2.tagName)[1] : template2.tagName;
|
|
22473
22629
|
const contextNameSuffix = template2.tagName ? "_" + sanitizeIdentifier(template2.tagName) : "";
|
|
22474
|
-
const attrsExprs = this.getAttributeExpressions(
|
|
22630
|
+
const attrsExprs = this.getAttributeExpressions(NG_TEMPLATE_TAG_NAME2, template2.attributes, template2.inputs, template2.outputs, void 0, template2.templateAttrs);
|
|
22475
22631
|
const templateIndex = this.createEmbeddedTemplateFn(tagNameWithoutNamespace, template2.children, contextNameSuffix, template2.sourceSpan, template2.variables, attrsExprs, template2.references, template2.i18n);
|
|
22476
22632
|
this.templatePropertyBindings(templateIndex, template2.templateAttrs);
|
|
22477
|
-
if (tagNameWithoutNamespace ===
|
|
22633
|
+
if (tagNameWithoutNamespace === NG_TEMPLATE_TAG_NAME2) {
|
|
22478
22634
|
const [i18nInputs, inputs] = partitionArray(template2.inputs, hasI18nMeta);
|
|
22479
22635
|
if (i18nInputs.length > 0) {
|
|
22480
22636
|
this.i18nAttributesInstruction(templateIndex, i18nInputs, (_a2 = template2.startSourceSpan) != null ? _a2 : template2.sourceSpan);
|
|
@@ -22715,8 +22871,8 @@ var TemplateDefinitionBuilder = class {
|
|
|
22715
22871
|
}
|
|
22716
22872
|
if (root !== null) {
|
|
22717
22873
|
const name = root instanceof Element ? root.name : root.tagName;
|
|
22718
|
-
tagName = name ===
|
|
22719
|
-
attrsExprs = this.getAttributeExpressions(
|
|
22874
|
+
tagName = name === NG_TEMPLATE_TAG_NAME2 ? null : name;
|
|
22875
|
+
attrsExprs = this.getAttributeExpressions(NG_TEMPLATE_TAG_NAME2, root.attributes, root.inputs, []);
|
|
22720
22876
|
}
|
|
22721
22877
|
return { tagName, attrsExprs };
|
|
22722
22878
|
}
|
|
@@ -23555,7 +23711,7 @@ function createClosureModeGuard2() {
|
|
|
23555
23711
|
return typeofExpr(variable(NG_I18N_CLOSURE_MODE2)).notIdentical(literal("undefined", STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE2));
|
|
23556
23712
|
}
|
|
23557
23713
|
|
|
23558
|
-
// bazel-out/
|
|
23714
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
|
|
23559
23715
|
var ATTR_REGEX = /attr\.([^\]]+)/;
|
|
23560
23716
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
23561
23717
|
var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
|
|
@@ -23825,14 +23981,14 @@ function createBaseDirectiveTypeParams(meta) {
|
|
|
23825
23981
|
function getInputsTypeExpression(meta) {
|
|
23826
23982
|
return literalMap(Object.keys(meta.inputs).map((key) => {
|
|
23827
23983
|
const value = meta.inputs[key];
|
|
23828
|
-
|
|
23829
|
-
key,
|
|
23830
|
-
value:
|
|
23831
|
-
|
|
23832
|
-
|
|
23833
|
-
|
|
23834
|
-
|
|
23835
|
-
};
|
|
23984
|
+
const values = [
|
|
23985
|
+
{ key: "alias", value: literal(value.bindingPropertyName), quoted: true },
|
|
23986
|
+
{ key: "required", value: literal(value.required), quoted: true }
|
|
23987
|
+
];
|
|
23988
|
+
if (value.isSignal) {
|
|
23989
|
+
values.push({ key: "isSignal", value: literal(value.isSignal), quoted: true });
|
|
23990
|
+
}
|
|
23991
|
+
return { key, value: literalMap(values), quoted: true };
|
|
23836
23992
|
}));
|
|
23837
23993
|
}
|
|
23838
23994
|
function createDirectiveType(meta) {
|
|
@@ -23876,6 +24032,7 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
23876
24032
|
}
|
|
23877
24033
|
const hostJob = ingestHostBinding({
|
|
23878
24034
|
componentName: name,
|
|
24035
|
+
componentSelector: selector,
|
|
23879
24036
|
properties: bindings,
|
|
23880
24037
|
events: eventBindings,
|
|
23881
24038
|
attributes: hostBindingsMetadata.attributes
|
|
@@ -24169,7 +24326,7 @@ function createHostDirectivesMappingArray(mapping) {
|
|
|
24169
24326
|
return elements.length > 0 ? literalArr(elements) : null;
|
|
24170
24327
|
}
|
|
24171
24328
|
|
|
24172
|
-
// bazel-out/
|
|
24329
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
|
|
24173
24330
|
var R3TargetBinder = class {
|
|
24174
24331
|
constructor(directiveMatcher) {
|
|
24175
24332
|
this.directiveMatcher = directiveMatcher;
|
|
@@ -24774,11 +24931,11 @@ function extractScopedNodeEntities(rootScope) {
|
|
|
24774
24931
|
return templateEntities;
|
|
24775
24932
|
}
|
|
24776
24933
|
|
|
24777
|
-
// bazel-out/
|
|
24934
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/resource_loader.mjs
|
|
24778
24935
|
var ResourceLoader = class {
|
|
24779
24936
|
};
|
|
24780
24937
|
|
|
24781
|
-
// bazel-out/
|
|
24938
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
|
|
24782
24939
|
var CompilerFacadeImpl = class {
|
|
24783
24940
|
constructor(jitEvaluator = new JitEvaluator()) {
|
|
24784
24941
|
this.jitEvaluator = jitEvaluator;
|
|
@@ -24994,6 +25151,7 @@ function convertDirectiveFacadeToMetadata(facade) {
|
|
|
24994
25151
|
bindingPropertyName: ann.alias || field,
|
|
24995
25152
|
classPropertyName: field,
|
|
24996
25153
|
required: ann.required || false,
|
|
25154
|
+
isSignal: false,
|
|
24997
25155
|
transformFunction: ann.transform != null ? new WrappedNodeExpr(ann.transform) : null
|
|
24998
25156
|
};
|
|
24999
25157
|
} else if (isOutput(ann)) {
|
|
@@ -25024,7 +25182,7 @@ function convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {
|
|
|
25024
25182
|
type: wrapReference(declaration.type),
|
|
25025
25183
|
typeSourceSpan,
|
|
25026
25184
|
selector: (_a2 = declaration.selector) != null ? _a2 : null,
|
|
25027
|
-
inputs: declaration.inputs ?
|
|
25185
|
+
inputs: declaration.inputs ? inputsPartialMetadataToInputMetadata(declaration.inputs) : {},
|
|
25028
25186
|
outputs: (_b2 = declaration.outputs) != null ? _b2 : {},
|
|
25029
25187
|
host: convertHostDeclarationToMetadata(declaration.host),
|
|
25030
25188
|
queries: ((_c2 = declaration.queries) != null ? _c2 : []).map(convertQueryDeclarationToMetadata),
|
|
@@ -25252,27 +25410,41 @@ function isInput(value) {
|
|
|
25252
25410
|
function isOutput(value) {
|
|
25253
25411
|
return value.ngMetadataName === "Output";
|
|
25254
25412
|
}
|
|
25255
|
-
function
|
|
25256
|
-
return Object.keys(inputs).reduce((result,
|
|
25257
|
-
const value = inputs[
|
|
25258
|
-
if (typeof value === "string") {
|
|
25259
|
-
result[
|
|
25260
|
-
bindingPropertyName: value,
|
|
25261
|
-
classPropertyName: value,
|
|
25262
|
-
transformFunction: null,
|
|
25263
|
-
required: false
|
|
25264
|
-
};
|
|
25413
|
+
function inputsPartialMetadataToInputMetadata(inputs) {
|
|
25414
|
+
return Object.keys(inputs).reduce((result, minifiedClassName) => {
|
|
25415
|
+
const value = inputs[minifiedClassName];
|
|
25416
|
+
if (typeof value === "string" || Array.isArray(value)) {
|
|
25417
|
+
result[minifiedClassName] = parseLegacyInputPartialOutput(value);
|
|
25265
25418
|
} else {
|
|
25266
|
-
result[
|
|
25267
|
-
bindingPropertyName: value
|
|
25268
|
-
classPropertyName:
|
|
25269
|
-
transformFunction: value
|
|
25270
|
-
required:
|
|
25419
|
+
result[minifiedClassName] = {
|
|
25420
|
+
bindingPropertyName: value.publicName,
|
|
25421
|
+
classPropertyName: minifiedClassName,
|
|
25422
|
+
transformFunction: value.transformFunction !== null ? new WrappedNodeExpr(value.transformFunction) : null,
|
|
25423
|
+
required: value.isRequired,
|
|
25424
|
+
isSignal: value.isSignal
|
|
25271
25425
|
};
|
|
25272
25426
|
}
|
|
25273
25427
|
return result;
|
|
25274
25428
|
}, {});
|
|
25275
25429
|
}
|
|
25430
|
+
function parseLegacyInputPartialOutput(value) {
|
|
25431
|
+
if (typeof value === "string") {
|
|
25432
|
+
return {
|
|
25433
|
+
bindingPropertyName: value,
|
|
25434
|
+
classPropertyName: value,
|
|
25435
|
+
transformFunction: null,
|
|
25436
|
+
required: false,
|
|
25437
|
+
isSignal: false
|
|
25438
|
+
};
|
|
25439
|
+
}
|
|
25440
|
+
return {
|
|
25441
|
+
bindingPropertyName: value[0],
|
|
25442
|
+
classPropertyName: value[1],
|
|
25443
|
+
transformFunction: value[2] ? new WrappedNodeExpr(value[2]) : null,
|
|
25444
|
+
required: false,
|
|
25445
|
+
isSignal: false
|
|
25446
|
+
};
|
|
25447
|
+
}
|
|
25276
25448
|
function parseInputsArray(values) {
|
|
25277
25449
|
return values.reduce((results, value) => {
|
|
25278
25450
|
if (typeof value === "string") {
|
|
@@ -25281,6 +25453,7 @@ function parseInputsArray(values) {
|
|
|
25281
25453
|
bindingPropertyName,
|
|
25282
25454
|
classPropertyName,
|
|
25283
25455
|
required: false,
|
|
25456
|
+
isSignal: false,
|
|
25284
25457
|
transformFunction: null
|
|
25285
25458
|
};
|
|
25286
25459
|
} else {
|
|
@@ -25288,6 +25461,7 @@ function parseInputsArray(values) {
|
|
|
25288
25461
|
bindingPropertyName: value.alias || value.name,
|
|
25289
25462
|
classPropertyName: value.name,
|
|
25290
25463
|
required: value.required || false,
|
|
25464
|
+
isSignal: false,
|
|
25291
25465
|
transformFunction: value.transform != null ? new WrappedNodeExpr(value.transform) : null
|
|
25292
25466
|
};
|
|
25293
25467
|
}
|
|
@@ -25330,17 +25504,17 @@ function publishFacade(global) {
|
|
|
25330
25504
|
ng.\u0275compilerFacade = new CompilerFacadeImpl();
|
|
25331
25505
|
}
|
|
25332
25506
|
|
|
25333
|
-
// bazel-out/
|
|
25334
|
-
var VERSION2 = new Version("17.1.0-next.
|
|
25507
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
|
|
25508
|
+
var VERSION2 = new Version("17.1.0-next.4");
|
|
25335
25509
|
|
|
25336
|
-
// bazel-out/
|
|
25510
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
25337
25511
|
var _VisitorMode;
|
|
25338
25512
|
(function(_VisitorMode2) {
|
|
25339
25513
|
_VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
|
|
25340
25514
|
_VisitorMode2[_VisitorMode2["Merge"] = 1] = "Merge";
|
|
25341
25515
|
})(_VisitorMode || (_VisitorMode = {}));
|
|
25342
25516
|
|
|
25343
|
-
// bazel-out/
|
|
25517
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
|
|
25344
25518
|
var XmlTagDefinition = class {
|
|
25345
25519
|
constructor() {
|
|
25346
25520
|
this.closedByParent = false;
|
|
@@ -25362,7 +25536,7 @@ var XmlTagDefinition = class {
|
|
|
25362
25536
|
};
|
|
25363
25537
|
var _TAG_DEFINITION = new XmlTagDefinition();
|
|
25364
25538
|
|
|
25365
|
-
// bazel-out/
|
|
25539
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
|
|
25366
25540
|
var FactoryTarget2;
|
|
25367
25541
|
(function(FactoryTarget3) {
|
|
25368
25542
|
FactoryTarget3[FactoryTarget3["Directive"] = 0] = "Directive";
|
|
@@ -25372,10 +25546,10 @@ var FactoryTarget2;
|
|
|
25372
25546
|
FactoryTarget3[FactoryTarget3["NgModule"] = 4] = "NgModule";
|
|
25373
25547
|
})(FactoryTarget2 || (FactoryTarget2 = {}));
|
|
25374
25548
|
|
|
25375
|
-
// bazel-out/
|
|
25549
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler.mjs
|
|
25376
25550
|
publishFacade(_global);
|
|
25377
25551
|
|
|
25378
|
-
// bazel-out/
|
|
25552
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/util.mjs
|
|
25379
25553
|
var import_path2 = require("path");
|
|
25380
25554
|
var import_typescript3 = __toESM(require("typescript"), 1);
|
|
25381
25555
|
var REPLACEMENTS2 = {
|
|
@@ -25483,7 +25657,7 @@ function forEachClass(sourceFile, callback) {
|
|
|
25483
25657
|
});
|
|
25484
25658
|
}
|
|
25485
25659
|
|
|
25486
|
-
// bazel-out/
|
|
25660
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/index.mjs
|
|
25487
25661
|
function block_template_entities_default() {
|
|
25488
25662
|
return (tree) => __async(this, null, function* () {
|
|
25489
25663
|
const { buildPaths, testPaths } = yield getProjectTsConfigPaths(tree);
|